@kelvininc/ui-components
Version:
Kelvin UI Components
57 lines (56 loc) • 2.33 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
import { EIconName } from '../icon/icon.types';
import { ETreeItemLabelSize } from '../../types';
import { ITreeNodeItem } from './tree.types';
/**
* @part tree - The tree container.
* @part tree-item - The tree item container.
*/
export declare class KvTree {
/** (required) The tree hierarchy items to render in this component */
nodes: ITreeNodeItem[];
/** (optional) Defines whether the all tree nodes is loading. */
loading?: boolean;
/** (optional) The currently selected node id */
selectedNode?: string;
/** (optional) Dictionary that defines whether the tree node is hidden. */
hiddenNodes?: {
[key: string]: boolean;
};
/** (optional) Dictionary that defines whether the tree node is expanded or collapsed. Only has visual effect for tree nodes with children. */
expandedNodes?: {
[key: string]: boolean;
};
/** (optional) Dictionary that defines whether the tree node is spotlight. Only has visual effect for tree nodes with children and expanded. */
spotlightedNodes?: {
[key: string]: boolean;
};
/** (optional) Dictionary that defines whether the tree node is disabled. */
disabledNodes?: {
[key: string]: boolean;
};
/** (optional) Dictionary that defines whether the tree node is highlighted. */
highlightedNodes?: {
[key: string]: boolean;
};
/** (optional) Dictionary that defines whether the tree node is loading. */
loadingNodes?: {
[key: string]: boolean;
};
/** (optional) Defines the font size of title and subtitle labels.*/
labelsSize?: ETreeItemLabelSize;
/** (optional) Defines if icon to use for expanding, should be and arrow like icon pointing up. */
expandIcon?: EIconName;
/** (optional) Defines whether the label should be displayed as tooltip.*/
showTooltip?: boolean;
/** (optional) Delay to show tooltip in milliseconds. */
tooltipDelay?: number;
/** Emitted when the node expand toggle is clicked */
nodeToggleExpand: EventEmitter<ITreeNodeItem>;
/** Emitted when the tree node item is clicked */
nodeClick: EventEmitter<ITreeNodeItem>;
private onItemClick;
private onToggleExpand;
private drawNodes;
render(): any;
}