import { ElementRef, OnInit, DoCheck, EventEmitter, IterableDiffers } from '@angular/core'; import { CfCoreComponent } from '../core/core.component'; import { TreeComponent } from 'angular-tree-component'; import { TreeviewModel } from '../../models/treeview/treeview.model'; import { TreeviewStylingModel } from '../../models/treeview/treeview-styling.model'; import { TemplateService } from '../../services/template-service/template.service'; /** *
CF TreeView Component
*
*
* import {{'{'}} TreeviewModel {{'}'}} from 'cedrus-fusion'
* import {{'{'}} TreeviewStylingModel {{'}'}} from 'cedrus-fusion'
* <cf-treeview></cf-treeview>
*
*
*/
export declare class CfTreeviewComponent extends CfCoreComponent implements OnInit, DoCheck {
/**@hidden */ elementRef: ElementRef;
/** @hidden
* An array for selected items IDs. Each item ID must be string.
*/
selectedItems: any[];
/**@hidden
* Identifier for template for each item.
*/
itemTemplate: any;
/**
* {{'{'}}
* display: boolean, // Default: true.
* disable: boolean, // Default: false.
* items: [], // Array of items to display.
* options:{{'{'}}
* idField: string, // Key in the items array to refer to as the id of the item. Default: id.
* displayField: string, // Key in the items array to refer to as the display of the item. Default: name.
* childrenField: string, // Key in the items array to refer to as the id of the item. Default: children.
* isExpandedField: string, // Key in the items array to refer to as the id of the item. Default: expanded.
* selectable: boolean, // Whether the items are selectable or not. Default: true.
* allowDrag: boolean // Whether the items are draggable or not. Default: true.
* animateExpand: boolean // Enable or disable animation. Default: false.
* {{'}'}}
*
*
* Example
*{{'{'}}
* display: true,
* items: [
* {{'{'}}
* itemID: '1',
* displayName: 'Microsoft',
* isExpanded: false
* {{'}'}},
* {{'{'}}
* itemID: '2',
* isExpanded: true,
* displayName: 'Apple',
* childrenItems: [
* {{'{'}}
* itemID: '2',
* isExpanded: false,
* displayName: 'iPhone'
* {{'}'}}
* ]
* {{'}'}}
* ],
* options:{{'{'}}
* idField: 'itemID',
* displayField: 'displayName',
* childrenField: 'childrenItems',
* isExpandedField: 'isExpanded',
* selectable: true,
* allowDrag: false,
* animateExpand: false
* {{'}'}}
*{{'}'}}
*
*/
properties: TreeviewModel;
/**
*dynamicClass: function() -> string, // Function that returns name of the class
*class: string // Name of the css class selector
*themeColor: string // primary/accent/warn
*
*{{'{'}}
* // Container surrounding the TreeView
* container:{{'{'}}
* dynamicClass,
* class
* {{'}'}},
* // styling of the item
* item:{{'{'}}
* dynamicClass,
* class,
* themeColor
* {{'}'}}
*{{'}'}}
*
*/
styling: TreeviewStylingModel;
/**
* Emitting event with array of selected items
*/ cfSelected: EventEmitterEmitting event on move
*/ onMoveNode: EventEmitter