/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, Renderer2, SimpleChange } from '@angular/core';
import { LocalizationService } from '@progress/kendo-angular-l10n';
import { Group, ImageExportOptions, SVGExportOptions } from '@progress/kendo-drawing';
import { Subscription } from 'rxjs';
import { ConfigurationService } from './common/configuration.service';
import { SankeyThemeService } from './sankey/theme.service';
import { InstanceEventService, SankeyLinkEvent, SankeyNodeEvent } from './sankey/events';
import { Sankey, SankeyEvent, SankeyTooltipEvent } from '@progress/kendo-charts';
import { SankeyExportVisualOptions, SankeyLabelDefaults, SankeyLinkDefaults, SankeyNodeDefaults, SankeyTooltip } from './sankey/api-types';
import { PopupSettings } from './chart/tooltip/popup-settings.interface';
import { SankeyData, SankeyLegend, SankeyTitle } from './sankey/api-types';
import { SankeyTooltipPopupComponent } from './sankey/tooltip/tooltip-popup.component';
import { IntlService } from '@progress/kendo-angular-intl';
import * as i0 from "@angular/core";
/**
* Represents the Kendo UI for Angular Sankey diagram component.
*
* The Sankey diagram visualizes flow data between different categories or stages.
* It displays nodes connected by links where the thickness of each link represents the flow value.
*
* @example
* ```ts
* import { Component } from '@angular/core';
*
* @Component({
* selector: 'my-app',
* template: `
*
*
* `,
* })
* export class AppComponent {
* public data: SankeyData = {
* nodes: [
* { id: 1, label: { text: 'Linux' } },
* { id: 0, label: { text: 'iOS'} },
* { id: 2, label: { text: 'Mobile' } },
* { id: 3, label: { text: 'Desktop' } },
* ],
* links: [
* { sourceId: 0, targetId: 2, value: 1 },
* { sourceId: 1, targetId: 2, value: 2 },
* { sourceId: 1, targetId: 3, value: 3 },
* ],
* };
* }
* ```
*
* @remarks
* Supported children components are: {@link SankeyCustomMessagesComponent}, {@link SankeyLabelsComponent}, {@link SankeyLegendComponent}, {@link SankeyLinksComponent}, {@link SankeyNodesComponent}, {@link SankeyTitleComponent}, and {@link SankeyTooltipComponent}.
*/
export declare class SankeyComponent implements AfterViewInit, OnChanges, OnDestroy {
protected element: ElementRef;
configurationService: ConfigurationService;
themeService: SankeyThemeService;
protected localizationService: LocalizationService;
protected instanceEventService: InstanceEventService;
protected ngZone: NgZone;
protected changeDetector: ChangeDetectorRef;
protected renderer: Renderer2;
protected intlService: IntlService;
/**
* Specifies the data for the Sankey component containing the `links` and `nodes`.
*
* The data object defines the structure and relationships of your flow diagram.
*/
data: SankeyData;
/**
* Specifies the default configuration for links.
*
* The settings are applied to all links unless overridden by individual data items.
*/
links?: SankeyLinkDefaults;
/**
* Specifies the default configuration for nodes.
*
* The settings are applied to all nodes unless overridden by individual data items.
*/
nodes?: SankeyNodeDefaults;
/**
* Specifies the default configuration for labels.
*
* The settings are applied to all labels unless overridden by individual data items.
*/
labels?: SankeyLabelDefaults;
/**
* Specifies the title configuration for the Sankey component.
*/
title?: SankeyTitle;
/**
* Specifies the legend configuration for the Sankey component.
*/
legend?: SankeyLegend;
/**
* Specifies the configuration for the Sankey tooltip.
*/
tooltip?: SankeyTooltip;
/**
* Determines whether the Sankey component performs automatic layout.
*
* When set to `true`, the component will not arrange nodes and links automatically.
*
* @default false
*/
disableAutoLayout?: boolean;
/**
* Determines whether keyboard navigation is enabled for the Sankey component.
*
* When set to `false`, the keyboard navigation will be disabled.
*
* @default true
*/
navigable?: boolean;
/**
* Specifies the settings for the tooltip popup.
*/
popupSettings: PopupSettings;
/**
* Fires when the user hovers over a node.
*
* Similar to the `mouseenter` event.
*/
nodeEnter: EventEmitter;
/**
* Fires when the user stops hovering over a node.
*
* Similar to the `mouseleave` event.
*/
nodeLeave: EventEmitter;
/**
* Fires when the user clicks a node.
*/
nodeClick: EventEmitter;
/**
* Fires when the user hovers over a link.
*
* Similar to the `mouseenter` event.
*/
linkEnter: EventEmitter;
/**
* Fires when the user stops hovering over a link.
*
* Similar to the `mouseleave` event.
*/
linkLeave: EventEmitter;
/**
* Fires when the user clicks a link.
*/
linkClick: EventEmitter;
tooltipInstance: SankeyTooltipPopupComponent;
instanceElement: ElementRef;
/**
* @hidden
*/
showLicenseWatermark: boolean;
/**
* @hidden
*/
licenseMessage?: string;
instance: Sankey;
protected options: any;
protected theme: any;
protected optionsChange: Subscription;
protected redrawTimeout: any;
protected destroyed: boolean;
protected subscriptions: Subscription;
protected rtl: boolean;
protected hostClasses: string[];
constructor(element: ElementRef, configurationService: ConfigurationService, themeService: SankeyThemeService, localizationService: LocalizationService, instanceEventService: InstanceEventService, ngZone: NgZone, changeDetector: ChangeDetectorRef, renderer: Renderer2, intlService: IntlService);
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnChanges(changes: {
[propertyName: string]: SimpleChange;
}): void;
/**
* Updates the component fields with the specified values and refreshes the component.
*
* Use this method when you cannot set configuration values through the template.
*
* @example
* ```ts-no-run
* sankey.notifyChanges({ title: { text: 'New Title' } });
* ```
*
* @param changes An object containing the updated input fields.
*/
notifyChanges(changes: any): void;
ngOnDestroy(): void;
/**
* @hidden
*/
messageFor(key: string): string;
protected createInstance(element: any): void;
/**
* Exports the Sankey diagram as an image.
*
* The export operation is asynchronous and returns a promise.
*
* @param {ImageExportOptions} options - The configuration options for the exported image.
* @returns {Promise} - A promise that resolves with a PNG image encoded as a Data URI.
*/
exportImage(options?: SankeyExportVisualOptions & ImageExportOptions): Promise;
/**
* Exports the Sankey diagram as an SVG document.
*
* The export operation is asynchronous and returns a promise.
*
* @param options The parameters for the exported file.
* @returns A promise that will be resolved with an SVG document that is encoded as a Data URI.
*/
exportSVG(options?: SankeyExportVisualOptions & SVGExportOptions): Promise;
/**
* Exports the visual of the Sankey component to a drawing group.
*
* @param options The parameters for the export operation.
* @returns The root Group of the scene.
*/
exportVisual(options?: SankeyExportVisualOptions): Group;
protected init(): void;
/**
* Reloads the Sankey appearance settings from the current [Kendo UI Theme]({% slug themesandstyles %}).
*
* Call this method after loading a different theme stylesheet.
*/
reloadTheme(): void;
protected onShowTooltip(e: SankeyTooltipEvent): void;
protected onHideTooltip(): void;
protected trigger(name: string, e: SankeyEvent): boolean;
protected requiresHandlers(names: string[]): boolean;
protected refresh(): void;
protected updateOptions(): void;
protected get canRender(): boolean;
protected get instanceOptions(): any;
protected activeEmitter(name: string): any;
protected refreshWait(): void;
protected run(callback: any, inZone?: boolean, detectChanges?: boolean): void;
protected detectChanges(): void;
protected intlChange(): void;
protected rtlChange(): void;
protected setDirection(): void;
protected get isRTL(): boolean;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵcmp: i0.ɵɵComponentDeclaration;
}