/** Core */ import { CoreComponent } from "cmf.core/src/core"; /** Angular2 */ import * as ng from "@angular/core"; /** Nested components */ import { TreeViewModel, TreeViewModelItem, TreeViewModelNode, TreeViewModelLeaf, TREE_VIEW_PATH_SEPARATOR, TREE_VIEW_ALT_PATH_SEPARATOR, TREE_VIEW_PATH_ITEM_INDEX_SEPARATOR } from "./treeViewNode"; /** Service */ import { TreeViewNodeService } from "./treeViewNodeService"; export { TreeViewModel, TreeViewModelItem, TreeViewModelNode, TreeViewModelLeaf, TREE_VIEW_PATH_SEPARATOR, TREE_VIEW_ALT_PATH_SEPARATOR, TREE_VIEW_PATH_ITEM_INDEX_SEPARATOR }; /** * @whatItDoes * TreeView Component * * @howToUse * This component is used with the inputs and outputs mentioned below. * * ### Inputs * `string` : **path** - The path of this component ; * `TreeViewModel` : **data** - The TreeViewModel of this component ; * `any` : **load-tag** - The load-tag of this component ; * `string` : **node-icon-class** - The node-icon-class of this component ; * `boolean` : **loadMoreEnabled** - Is to show and allow load more options ; * * ### Outputs * `TreeViewModelLeaf` : **valueChange** - When selected leaf(value) change ; * `TreeViewModel` : **dataLoaded** - When root node data was loaded ; * `TreeViewModelLeaf[]` : **leafsLoaded** - When root node data was loaded it returns the list of leafs in the model ; * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * * ``` * */ export declare class TreeView extends CoreComponent implements ng.AfterViewInit, ng.OnChanges { private _elementRef; private _service; /** * Selected value */ _value: TreeViewModelLeaf; /** * Path string to select a leaf */ _path: string; /** * Node icon class */ _nodeIconClass: string; /** * Data model */ _data: TreeViewModel; private _rootNode; /** * De-bounced path set */ private _debouncedPathSet; /** * Path for selected leaf */ path: string; /** * Alternative Path for selected leaf (FlowPath like) */ alternativePath: string; /** * TreeView data */ data: TreeViewModel; /** * Data load tag to provide to the service */ loadTag: any; /** * Load more enabled of tree view node */ loadMoreEnabled: boolean; /** * Node icon class */ nodeIconClass: string; /** * When selected leaf(value) change */ valueChange: ng.EventEmitter; /** * When root node data was loaded */ dataLoaded: ng.EventEmitter; /** * When root node data was loaded it returns the list of leafs in the model */ leafsLoaded: ng.EventEmitter; /** * Tree View disabled */ isDisabled: Boolean; /** * Constructor */ constructor(_elementRef: ng.ElementRef, _service: TreeViewNodeService); private convertAlternativePath; /** * Builds lines connecting elements of the tree */ private buildTreePathLine; /** * Returns the center of an element */ private getPositionOfElement; /** * Draws a line path between points */ private drawPathLine; /** * Draws a line in svg canvas */ private drawLine; /** * Iterates the data model tree */ private iterateTree; /** * Returns all the leafs in the model */ private getLeafs; /** * On select leaf */ onSelectLeaf(leaf: TreeViewModelLeaf): void; /** * When a child node collapses */ onChildNodeCollapse(): void; /** * When a child node collapses */ onRootNodeLoaded(data: TreeViewModelNode): void; /** * On changes */ ngOnChanges(changes: any): void; /** * After view init */ ngAfterViewInit(): void; } /** * TreeViewModule */ export declare class TreeViewModule { }