import { TemplateRef } from '@angular/core'; import { PassThroughOption, PassThrough, TreeNode } from 'primeng/api'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link OrganizationChart.pt} * @group Interface */ interface OrganizationChartPassThroughOptions { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the table's DOM element. */ table?: PassThroughOption; /** * Used to pass attributes to the body's DOM element. */ body?: PassThroughOption; /** * Used to pass attributes to the row's DOM element. */ row?: PassThroughOption; /** * Used to pass attributes to the cell's DOM element. */ cell?: PassThroughOption; /** * Used to pass attributes to the node's DOM element. */ node?: PassThroughOption; /** * Used to pass attributes to the node toggle button's DOM element. */ nodeToggleButton?: PassThroughOption; /** * Used to pass attributes to the node toggle button icon's DOM element. */ nodeToggleButtonIcon?: PassThroughOption; /** * Used to pass attributes to the connectors' DOM element. */ connectors?: PassThroughOption; /** * Used to pass attributes to the line cell's DOM element. */ lineCell?: PassThroughOption; /** * Used to pass attributes to the connector down's DOM element. */ connectorDown?: PassThroughOption; /** * Used to pass attributes to the connector left's DOM element. */ connectorLeft?: PassThroughOption; /** * Used to pass attributes to the connector right's DOM element. */ connectorRight?: PassThroughOption; /** * Used to pass attributes to the node children's DOM element. */ nodeChildren?: PassThroughOption; /** * Used to pass attributes to the node cell's DOM element. */ nodeCell?: PassThroughOption; } /** * Defines valid pass-through options in OrganizationChart. * @see {@link OrganizationChartPassThroughOptions} * * @template I Type of instance. */ type OrganizationChartPassThrough = PassThrough>; /** * Custom node select event. * @see {@link OrganizationChart.onNodeSelect} * @group Events */ interface OrganizationChartNodeSelectEvent { /** * Browser event. */ originalEvent: Event; /** * Node instance. */ node: TreeNode; } /** * Custom node unselect event. * @see {@link OrganizationChart.onNodeUnSelect} * @extends {OrganizationChartNodeSelectEvent} * @group Events */ interface OrganizationChartNodeUnSelectEvent extends OrganizationChartNodeSelectEvent { } /** * Custom node expand event. * @see {@link OrganizationChart.onNodeExpand} * @extends {OrganizationChartNodeSelectEvent} * @group Events */ interface OrganizationChartNodeExpandEvent extends OrganizationChartNodeSelectEvent { } /** * Custom node collapse event. * @see {@link OrganizationChart.onNodeCollapse} * @extends {OrganizationChartNodeSelectEvent} * @group Events */ interface OrganizationChartNodeCollapseEvent extends OrganizationChartNodeSelectEvent { } /** * Defines valid templates in OrganizationChart. * @group Templates */ interface OrganizationChartTemplates { /** * Custom toggler icon template. * @param {Object} context - item data. */ togglericon(context: { /** * Expanded state of the node. */ $implicit: boolean; }): TemplateRef<{ $implicit: boolean; }>; } export type { OrganizationChartNodeCollapseEvent, OrganizationChartNodeExpandEvent, OrganizationChartNodeSelectEvent, OrganizationChartNodeUnSelectEvent, OrganizationChartPassThrough, OrganizationChartPassThroughOptions, OrganizationChartTemplates };