@progress/kendo-angular-treeview
Advanced tools
Comparing version 0.2.0-dev.201712201530 to 0.2.0-dev.201801031208
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("rxjs/Subject"),require("rxjs/Subscription"),require("rxjs/BehaviorSubject"),require("rxjs/Observable"),require("@angular/animations"),require("rxjs/add/operator/do"),require("rxjs/add/operator/catch"),require("rxjs/add/observable/of"),require("rxjs/add/observable/empty"),require("@angular/common"),require("rxjs/add/observable/merge"),require("rxjs/add/operator/map"),require("rxjs/add/operator/filter"),require("rxjs/add/operator/delay"),require("rxjs/add/operator/takeUntil"),require("rxjs/add/operator/switchMap")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","rxjs/Subject","rxjs/Subscription","rxjs/BehaviorSubject","rxjs/Observable","@angular/animations","rxjs/add/operator/do","rxjs/add/operator/catch","rxjs/add/observable/of","rxjs/add/observable/empty","@angular/common","rxjs/add/observable/merge","rxjs/add/operator/map","rxjs/add/operator/filter","rxjs/add/operator/delay","rxjs/add/operator/takeUntil","rxjs/add/operator/switchMap"],t):"object"==typeof exports?exports.KendoAngularTreeview=t(require("tslib"),require("@angular/core"),require("rxjs/Subject"),require("rxjs/Subscription"),require("rxjs/BehaviorSubject"),require("rxjs/Observable"),require("@angular/animations"),require("rxjs/add/operator/do"),require("rxjs/add/operator/catch"),require("rxjs/add/observable/of"),require("rxjs/add/observable/empty"),require("@angular/common"),require("rxjs/add/observable/merge"),require("rxjs/add/operator/map"),require("rxjs/add/operator/filter"),require("rxjs/add/operator/delay"),require("rxjs/add/operator/takeUntil"),require("rxjs/add/operator/switchMap")):e.KendoAngularTreeview=t(e.tslib,e["@angular/core"],e["rxjs/Subject"],e["rxjs/Subscription"],e["rxjs/BehaviorSubject"],e["rxjs/Observable"],e["@angular/animations"],e["rxjs/add/operator/do"],e["rxjs/add/operator/catch"],e["rxjs/add/observable/of"],e["rxjs/add/observable/empty"],e["@angular/common"],e["rxjs/add/observable/merge"],e["rxjs/add/operator/map"],e["rxjs/add/operator/filter"],e["rxjs/add/operator/delay"],e["rxjs/add/operator/takeUntil"],e["rxjs/add/operator/switchMap"])}(this,function(e,t,n,i,r,o,a,s,d,c,u,p,l,h,f,v,y,_){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);t.TreeViewComponent=i.TreeViewComponent;var r=n(17);t.TreeViewModule=r.TreeViewModule;var o=n(4);t.NodeTemplateDirective=o.NodeTemplateDirective;var a=n(27);t.ExpandDirective=a.ExpandDirective;var s=n(30);t.SelectDirective=s.SelectDirective;var d=n(31);t.HierarchyBindingDirective=d.HierarchyBindingDirective;var c=n(37);t.FlatDataBindingDirective=c.FlatDataBindingDirective},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),a=n(5),s=n(7),d=n(8),c=n(11),u=n(12),p=n(13),l=n(14),h=n(15),f=n(16),v=[a.ExpandStateService,s.IndexBuilderService,h.LoadingNotificationService,d.NavigationService,c.SelectionService],y=function(){function e(e,t,n){this.expandService=e,this.navigationService=t,this.selectionService=n,this.classNames=!0,this.onBlur=new r.EventEmitter,this.onFocus=new r.EventEmitter,this.expand=new r.EventEmitter,this.collapse=new r.EventEmitter,this.selectionChange=new r.EventEmitter,this.data=new p.BehaviorSubject([]),this.subscriptions=new u.Subscription(function(){}),this._animate=!0,this.hasChildren=function(){return!1},this.isExpanded=function(){return!1},this.isSelected=function(){return!1},this.children=function(){return l.Observable.of([])}}return Object.defineProperty(e.prototype,"role",{get:function(){return"tree"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return!this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nodes",{set:function(e){this.data.next(e)},enumerable:!0,configurable:!0}),e.prototype.handleKeydown=function(e){this.navigationService.move(e)},e.prototype.handleFocusin=function(e){var t=this,n=e.target,i=f.nodeId(n);i&&(this.navigationService.activateIndex(i),Promise.resolve(null).then(function(){t.navigationService.isActive(i)&&t.onFocus.emit()}))},e.prototype.handleClick=function(e){var t=e.target;this.handleFocusin({target:t});var n=f.nodeId(t);n&&this.navigationService.selectIndex(n)},e.prototype.handleFocusout=function(e){var t=this,n=e.target,i=n.getAttribute("data-treeindex");Promise.resolve(null).then(function(){t.navigationService.isActive(i)&&(t.navigationService.deactivate(),t.onBlur.emit())})},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.expandService.changes.subscribe(function(t){var n=t.index,i=t.dataItem,r=t.expand;return r?e.expand.emit({index:n,dataItem:i}):e.collapse.emit({index:n,dataItem:i})})),this.subscriptions.add(this.selectionService.changes.subscribe(function(t){return e.selectionChange.emit(t)}))},i.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-treeview"),i.__metadata("design:type",Boolean)],e.prototype,"classNames",void 0),i.__decorate([r.HostBinding("attr.role"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"role",null),i.__decorate([r.Input(),r.HostBinding("@.disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"animate",null),i.__decorate([r.Output("blur"),i.__metadata("design:type",r.EventEmitter)],e.prototype,"onBlur",void 0),i.__decorate([r.Output("focus"),i.__metadata("design:type",r.EventEmitter)],e.prototype,"onFocus",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"expand",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"collapse",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"selectionChange",void 0),i.__decorate([r.ContentChild(o.NodeTemplateDirective),i.__metadata("design:type",o.NodeTemplateDirective)],e.prototype,"nodeTemplate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"textField",void 0),i.__decorate([r.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleKeydown",null),i.__decorate([r.HostListener("focusin",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleFocusin",null),i.__decorate([r.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleClick",null),i.__decorate([r.HostListener("focusout",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleFocusout",null),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"hasChildren",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isExpanded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"children",void 0),e=i.__decorate([r.Component({changeDetection:r.ChangeDetectionStrategy.OnPush,exportAs:"kendoTreeView",providers:v,selector:"kendo-treeview",template:'\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n role="group"\n [children]="children"\n [hasChildren]="hasChildren"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplate?.templateRef"\n [nodes]="data"\n [textField]="textField"\n >\n </ul>\n '}),i.__metadata("design:paramtypes",[a.ExpandStateService,d.NavigationService,c.SelectionService])],e)}();t.TreeViewComponent=y},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(){function e(e){this.templateRef=e}return e=i.__decorate([r.Directive({selector:"[kendoTreeViewNodeTemplate]"}),i.__param(0,r.Optional()),i.__metadata("design:paramtypes",[r.TemplateRef])],e)}();t.NodeTemplateDirective=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.expand=function(e,t){this.changes.next({dataItem:t,index:e,expand:!0})},e.prototype.collapse=function(e,t){this.changes.next({dataItem:t,index:e,expand:!1})},e=i.__decorate([r.Injectable()],e)}();t.ExpandStateService=a},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(){function e(){this.INDEX_SEPARATOR="_"}return e.prototype.nodeIndex=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),""+t+(t?this.INDEX_SEPARATOR:"")+e},e.prototype.indexForLevel=function(e,t){return e.split(this.INDEX_SEPARATOR).slice(0,t).join(this.INDEX_SEPARATOR)},e.prototype.level=function(e){return e.split(this.INDEX_SEPARATOR).length},e=i.__decorate([r.Injectable()],e)}();t.IndexBuilderService=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(9),a=n(6),s=n(10),d=function(e){return(e||{}).index},c=function(e,t){return e[t]||e},u=function(){function e(){var e=this;this.expands=new a.Subject,this.moves=new a.Subject,this.selects=new a.Subject,this.actions=(t={},t[s.Keys.up]=function(){return e.activate(c(e.focusableItem,"prev"))},t[s.Keys.down]=function(){return e.activate(c(e.focusableItem,"next"))},t[s.Keys.left]=function(){return e.expand({expand:!1,intercept:e.moveToParent.bind(e)})},t[s.Keys.right]=function(){return e.expand({expand:!0,intercept:e.moveToChild.bind(e)})},t[s.Keys.home]=function(){return e.activate(e.model.firstNode())},t[s.Keys.end]=function(){return e.activate(e.model.lastNode())},t[s.Keys.enter]=function(){return e.selectActiveItem()},t[s.Keys.space]=function(){return e.selectActiveItem()},t),this.isFocused=!1,this._model=new o.NavigationModel;var t}return Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return d(this.activeItem)||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusableItem",{get:function(){return this.activeItem||this.model.firstNode()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActiveExpanded",{get:function(){return this.activeItem&&this.activeItem.children.length>0},enumerable:!0,configurable:!0}),e.prototype.activate=function(e){e&&!this.isActive(d(e))&&(this.isFocused=!0,this.activeItem=e||this.activeItem,this.notifyMove())},e.prototype.activateParent=function(e){this.activate(this.model.findParent(e))},e.prototype.activateIndex=function(e){this.activate(this.model.findNode(e))},e.prototype.deactivate=function(){this.isFocused&&(this.isFocused=!1,this.notifyMove())},e.prototype.selectIndex=function(e){this.isActive(e)&&this.selects.next(e)},e.prototype.isActive=function(e){return!!e&&(this.isFocused&&this.activeIndex===e)},e.prototype.isFocusable=function(e){return d(this.focusableItem)===e},e.prototype.registerItem=function(e){this.model.registerItem(e)},e.prototype.unregisterItem=function(e){this.isActive(e)&&this.activateParent(e),this.model.unregisterItem(e)},e.prototype.move=function(e){var t=this.actions[e.keyCode];t&&(t(),e.preventDefault())},e.prototype.expand=function(e){var t=e.expand,n=e.intercept,i=d(this.activeItem);i&&!n(i)&&this.notifyExpand(t)},e.prototype.moveToParent=function(){return!this.isActiveExpanded&&(this.activate(this.model.findParent(d(this.activeItem))),!0)},e.prototype.moveToChild=function(){return!!this.isActiveExpanded&&(this.activate(this.model.findChild(d(this.activeItem))),!0)},e.prototype.selectActiveItem=function(){this.selectIndex(d(this.activeItem))},e.prototype.notifyExpand=function(e){this.expands.next(this.navigationState(e))},e.prototype.notifyMove=function(){this.moves.next(this.navigationState())},e.prototype.navigationState=function(e){return void 0===e&&(e=!1),{expand:e,index:d(this.activeItem),isFocused:this.isFocused}},e=i.__decorate([r.Injectable()],e)}();t.NavigationService=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=function(e){return e[e.length-1]},o=function(e){return e||{}},a=function(e){return o(e).children||[]},s=function(e){for(var t=e,n=[].concat(a(e));n.length;)n=n.concat(a(r(n))),t=n.shift();return t},d=function(e){var t=e.prev,n=e.next;t&&(t.next=e),n&&(n.prev=e)},c=function(e){var t=e.prev,n=e.next;t&&(t.next=n),n&&(n.prev=t)},u=function(){function e(){this.ib=new i.IndexBuilderService,this.nodes=[]}return e.prototype.firstNode=function(){return this.nodes[0]||null},e.prototype.lastNode=function(){var e=this.nodes[this.nodes.length-1];return e?s(r(this.container(e)))||e:null},e.prototype.findNode=function(e){return this.find(e,this.nodes)},e.prototype.findParent=function(e){var t=this.ib.level(e)-1;return this.findNode(this.ib.indexForLevel(e,t))},e.prototype.findChild=function(e){return a(this.findNode(e))[0]||null},e.prototype.registerItem=function(e){var t=[],n=this.ib.level(e),i=this.findParent(e);if(i||1===n){var r=this.prevNode(i),o=this.nextNode(i),a={children:t,index:e,parent:i,prev:r,next:o};this.container(i).push(a),d(a)}},e.prototype.unregisterItem=function(e){var t=this.find(e,this.nodes);if(t){c(t);var n=this.container(t.parent);n.splice(n.indexOf(t),1)}},e.prototype.childLevel=function(e){return e&&e.length?this.ib.level(e[0].index):1},e.prototype.find=function(e,t){var n=this.childLevel(t),i=this.ib.indexForLevel(e,n),r=n===this.ib.level(e),o=t.find(function(e){return e.index===i});return o?r?o:this.find(e,o.children):null},e.prototype.container=function(e){return e?e.children:this.nodes},e.prototype.prevNode=function(e){return s(r(this.container(e)))||e||null},e.prototype.nextNode=function(e){if(!e)return null;var t=this.container(this.findParent(e.index));return t[t.indexOf(e)+1]||null},e}();t.NavigationModel=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n;!function(e){e[e.enter=13]="enter",e[e.shift=16]="shift",e[e.space=32]="space",e[e.end=35]="end",e[e.home=36]="home",e[e.left=37]="left",e[e.up=38]="up",e[e.right=39]="right",e[e.down=40]="down"}(n=t.Keys||(t.Keys={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.isFirstSelected=function(e){return this.firstIndex===e},e.prototype.setFirstSelected=function(e,t){this.firstIndex===e&&t===!1?this.firstIndex=null:!this.firstIndex&&t&&(this.firstIndex=e)},e.prototype.select=function(e,t){this.changes.next({dataItem:t,index:e})},e=i.__decorate([r.Injectable()],e)}();t.SelectionService=a},function(e,t){e.exports=i},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.notifyLoaded=function(e){this.changes.next(e)},e=i.__decorate([r.Injectable()],e)}();t.LoadingNotificationService=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPresent=function(e){return null!==e&&void 0!==e},t.isBlank=function(e){return null===e||void 0===e},t.isArray=function(e){return Array.isArray(e)},t.isNullOrEmptyString=function(e){return t.isBlank(e)||0===e.trim().length},t.isChanged=function(e,t,n){return void 0===n&&(n=!0),t[e]&&(!t[e].isFirstChange()||!n)&&t[e].previousValue!==t[e].currentValue},t.anyChanged=function(e,n,i){return void 0===i&&(i=!0),e.some(function(e){return t.isChanged(e,n,i)})},t.nodeId=function(e){return e.getAttribute("data-treeindex")},t.noop=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(18),s=n(4),d=n(27),c=n(30),u=n(31),p=n(37),l=[o.TreeViewComponent,s.NodeTemplateDirective,d.ExpandDirective,c.SelectDirective,u.HierarchyBindingDirective,p.FlatDataBindingDirective],h=function(){function e(){}return e=i.__decorate([r.NgModule({exports:[l],imports:[a.SharedModule]})],e)}();t.TreeViewModule=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(19),s=n(26),d=n(4),c=n(27),u=n(30),p=n(31),l=n(32),h=n(37),f=n(39),v=n(40),y=[o.TreeViewComponent,a.TreeViewGroupComponent,f.TreeViewItemDirective,v.TreeViewItemContentDirective,d.NodeTemplateDirective,c.ExpandDirective,u.SelectDirective,p.HierarchyBindingDirective,l.LoadingIndicatorDirective,h.FlatDataBindingDirective],_=function(){function e(){}return e=i.__decorate([r.NgModule({declarations:[y],exports:[y],imports:[s.CommonModule]})],e)}();t.SharedModule=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(20),a=n(5),s=n(7),d=n(16),c=n(21),u=n(15),p=n(14);n(22),n(23),n(24),n(25);var l=function(){function e(e,t,n,i){this.expandService=e,this.loadingService=t,this.indexBuilder=n,this.cd=i,this.kGroupClass=!0,this.textField="",this.data=[],this.hasChildren=function(){return!1},this.isExpanded=function(){return!1},this.isSelected=function(){return!1},this.children=function(){return p.Observable.of([])}}return Object.defineProperty(e.prototype,"role",{get:function(){return"group"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTemplate",{get:function(){return d.isPresent(this.nodeTemplateRef)},enumerable:!0,configurable:!0}),e.prototype.expandNode=function(e,t,n){n?this.expandService.expand(e,t):this.expandService.collapse(e,t)},e.prototype.nodeIndex=function(e){return this.indexBuilder.nodeIndex(e.toString(),this.parentIndex)},e.prototype.nodeText=function(e){var t=d.isArray(this.textField)?this.textField[0]:this.textField;return c.getter(t,!0)(e)},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscription=this.nodes.subscribe(function(t){e.data=t,e.cd.markForCheck()})},e.prototype.fetchChildren=function(e,t){var n=this;return this.children(e).catch(function(){return n.loadingService.notifyLoaded(t),p.Observable.empty()}).do(function(){return n.loadingService.notifyLoaded(t)})},Object.defineProperty(e.prototype,"nextFields",{get:function(){return d.isArray(this.textField)?this.textField.length>1?this.textField.slice(1):this.textField:[this.textField]},enumerable:!0,configurable:!0}),i.__decorate([r.HostBinding("class.k-group"),i.__metadata("design:type",Boolean)],e.prototype,"kGroupClass",void 0),i.__decorate([r.HostBinding("attr.role"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"role",null),i.__decorate([r.Input(),i.__metadata("design:type",p.Observable)],e.prototype,"nodes",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"textField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"parentIndex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",r.TemplateRef)],e.prototype,"nodeTemplateRef",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"hasChildren",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isExpanded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"children",void 0),e=i.__decorate([r.Component({animations:[o.trigger("toggle",[o.transition("void => *",[o.style({height:0}),o.animate("0.1s ease-in",o.style({height:"*"}))]),o.transition("* => void",[o.style({height:"*"}),o.animate("0.1s ease-in",o.style({height:0}))])])],selector:"[kendoTreeViewGroup]",template:'\n <li\n *ngFor="let node of data; let index = index" class="k-item"\n kendoTreeViewItem\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [isExpanded]="isExpanded(node, nodeIndex(index))"\n [isSelected]="isSelected(node, nodeIndex(index))"\n [attr.data-treeindex]="nodeIndex(index)"\n [@toggle]="true"\n >\n <div class="k-mid">\n <span\n class="k-icon"\n [class.k-i-collapse]="isExpanded(node, nodeIndex(index))"\n [class.k-i-expand]="!isExpanded(node, nodeIndex(index))"\n [kendoTreeViewLoading]="nodeIndex(index)"\n (click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="hasChildren(node)"\n >\n </span>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]="nodeIndex(index)"\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [isSelected]="isSelected"\n class="k-in"\n >\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef" [ngTemplateOutletContext]="{$implicit: node}"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf="isExpanded(node, nodeIndex(index)) && hasChildren(node)"\n kendoTreeViewGroup\n role="group"\n [nodes]="fetchChildren(node, nodeIndex(index))"\n [children]="children"\n [hasChildren]="hasChildren"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [textField]="nextFields"\n >\n </ul>\n </li>\n '}),i.__metadata("design:paramtypes",[a.ExpandStateService,u.LoadingNotificationService,s.IndexBuilderService,r.ChangeDetectorRef])],e)}();t.TreeViewGroupComponent=l},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(16),r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,o={};o.undefined=function(e){return e},t.getter=function(e,t){var n=e+t;if(o[n])return o[n];var a=[];return e.replace(r,function(e,t,n,r){a.push(i.isPresent(t)?t:n||r)}),o[n]=function(e){for(var n=e,r=0;r<a.length;r++)if(n=n[a[r]],!i.isPresent(n)&&t)return n;return n},o[n]}},function(e,t){e.exports=s},function(e,t){e.exports=d},function(e,t){e.exports=c},function(e,t){e.exports=u},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(12),s=n(14);n(28),n(29);var d=function(){function e(e){this.treeView=e,this.expandedKeysChange=new r.EventEmitter,this.expandedKeys=[],this.subscriptions=new a.Subscription(function(){})}return Object.defineProperty(e.prototype,"isExpanded",{set:function(e){this.treeView.isExpanded=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(s.Observable.merge(this.treeView.expand.map(function(e){return i.__assign({expand:!0},e)}),this.treeView.collapse.map(function(e){return i.__assign({expand:!1},e)})).subscribe(this.toggleExpand.bind(this))),this.treeView.isExpanded=function(t,n){return e.expandedKeys.indexOf(e.itemKey({dataItem:t,index:n}))>-1}},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.itemKey=function(e){if(this.expandKey){if("string"==typeof this.expandKey)return e.dataItem[this.expandKey];if("function"==typeof this.expandKey)return this.expandKey(e)}return e.index},e.prototype.toggleExpand=function(e){var t=e.index,n=e.dataItem,i=e.expand,r=this.itemKey({index:t,dataItem:n}),o=this.expandedKeys.indexOf(r),a=!1;o>-1&&!i?(this.expandedKeys.splice(o,1),a=!0):o===-1&&i&&(this.expandedKeys.push(r),a=!0),a&&this.expandedKeysChange.emit(this.expandedKeys)},i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isExpanded",null),i.__decorate([r.Input("kendoTreeViewExpandBy"),i.__metadata("design:type",Object)],e.prototype,"expandKey",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"expandedKeysChange",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"expandedKeys",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewExpandBy]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.ExpandDirective=d},function(e,t){e.exports=l},function(e,t){e.exports=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(16),s=n(12);n(28),n(29);var d=function(){function e(e){var t=this;this.treeView=e,this.selectedKeys=[],this.selectedKeysChange=new r.EventEmitter,this.subscriptions=new s.Subscription(function(){}),this.selectActions={multiple:function(e){return t.selectMultiple(e)},single:function(e){return t.selectSingle(e)}}}return Object.defineProperty(e.prototype,"isSelected",{set:function(e){this.treeView.isSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getAriaMultiselectable",{get:function(){return"multiple"===this.options.mode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var e={checkboxOnly:!1,enabled:!0,mode:"single"};if(!a.isPresent(this.selection))return e;var t="boolean"==typeof this.selection,n=t?{enabled:this.selection}:this.selection;return Object.assign(e,n)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this))),this.treeView.isSelected=function(t,n){return e.selectedKeys.indexOf(e.itemKey({dataItem:t,index:n}))>-1}},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.itemKey=function(e){return this.selectKey?"string"==typeof this.selectKey?e.dataItem[this.selectKey]:"function"==typeof this.selectKey?this.selectKey(e):void 0:e.index},e.prototype.select=function(e){var t=this.options,n=t.enabled,i=t.mode,r=this.selectActions[i]||a.noop;n&&r(e)},e.prototype.selectSingle=function(e){var t=this.itemKey(e);this.selectedKeys[0]!==t&&(this.selectedKeys=[t],this.notify())},e.prototype.selectMultiple=function(e){var t=this.itemKey(e),n=this.selectedKeys.indexOf(t);a.isPresent(t)&&(n>-1?this.selectedKeys.splice(n,1):this.selectedKeys.push(t),this.notify())},e.prototype.notify=function(){this.selectedKeysChange.emit(this.selectedKeys)},i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isSelected",null),i.__decorate([r.Input("kendoTreeViewSelectBy"),i.__metadata("design:type",Object)],e.prototype,"selectKey",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"selection",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"selectedKeys",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"selectedKeysChange",void 0),i.__decorate([r.HostBinding("attr.aria-multiselectable"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],e.prototype,"getAriaMultiselectable",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewSelectBy]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.SelectDirective=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(21),s=n(16),d=n(14);n(24);var c=function(){function e(e){this.treeView=e}return Object.defineProperty(e.prototype,"childrenField",{get:function(){return this._childrenField},set:function(e){if(!e)throw new Error("'childrenField' cannot be empty");this._childrenField=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;s.isPresent(this.childrenField)&&(this.treeView.children=function(t){return d.Observable.of(a.getter(e.childrenField,!0)(t))},this.treeView.hasChildren=function(t){return e.childrenField in t})},i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],e.prototype,"childrenField",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewHierarchyBinding]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.HierarchyBindingDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(5),a=n(15),s=n(14);n(33),n(34),n(35),n(36),n(24);var d=function(){function e(e,t,n){this.expandService=e,this.loadingService=t,this.cd=n,this._loading=!1}return Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this,t=this.loadingService.changes.filter(function(t){return t===e.index});this.subscription=this.expandService.changes.filter(function(t){var n=t.index;return n===e.index}).do(function(t){var n=t.expand;!n&&e.loading&&(e.loading=!1)}).filter(function(e){var t=e.expand;return t}).switchMap(function(e){return s.Observable.of(e).delay(100).takeUntil(t)}).subscribe(function(){return e.loading=!0}),this.subscription.add(t.subscribe(function(){return e.loading=!1}))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},i.__decorate([r.HostBinding("class.k-i-loading"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"loading",null),i.__decorate([r.Input("kendoTreeViewLoading"),i.__metadata("design:type",String)],e.prototype,"index",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewLoading]"}),i.__metadata("design:paramtypes",[o.ExpandStateService,a.LoadingNotificationService,r.ChangeDetectorRef])],e)}();t.LoadingIndicatorDirective=d},function(e,t){e.exports=f},function(e,t){e.exports=v},function(e,t){e.exports=y},function(e,t){e.exports=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(21),s=n(16),d=n(38),c=n(14),u=function(e,t,n){return t.filter(function(t){return e(t)===n})},p=function(){function e(e){this.treeView=e,this.originalData=[]}return Object.defineProperty(e.prototype,"nodes",{set:function(e){if(this.originalData=e||[],s.isNullOrEmptyString(this.parentIdField))this.treeView.nodes=this.originalData.slice(0);else{var t=a.getter(this.parentIdField,!0);this.treeView.nodes=this.originalData.filter(d.compose(s.isBlank,t))}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;if(s.isPresent(this.parentIdField)&&s.isPresent(this.idField)){var t=function(t){return u(a.getter(e.parentIdField,!0),e.originalData||[],a.getter(e.idField,!0)(t))};this.treeView.hasChildren=function(e){ | ||
return t(e).length>0},this.treeView.children=function(e){return c.Observable.of(t(e))}}},e.prototype.ngOnChanges=function(e){s.isChanged("parentIdField",e,!1)&&(this.nodes=this.originalData)},i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"parentIdField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"idField",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewFlatDataBinding]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.FlatDataBindingDirective=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduceRight(function(e,t){return t(e)},t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(8),a=n(11),s=n(5),d=n(7),c=n(16);n(33);var u=function(){function e(e,t,n,i,r,o){this.element=e,this.expandService=t,this.navigationService=n,this.selectionService=i,this.renderer=r,this.ib=o,this.isInitialized=!1,this.subscriptions=[],this.subscribe()}return Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded||!1},set:function(e){this._isExpanded=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected||!1},set:function(e){this._isSelected=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.navigationService.registerItem(this.index),this.activateItem(),this.isInitialized=!0,this.setAttribute("role","treeitem"),this.setAriaAttributes(),this.updateTabIndex()},e.prototype.ngOnChanges=function(e){var t=e.index;(t||e.isExpanded||e.isSelected)&&this.setAriaAttributes(),this.moveNode(t)},e.prototype.ngOnDestroy=function(){this.navigationService.unregisterItem(this.index),this.subscriptions.map(function(e){return e.unsubscribe()}),this.subscriptions=[]},e.prototype.subscribe=function(){var e=this;this.subscriptions=[this.navigationService.moves.subscribe(function(){e.updateTabIndex(),e.focusItem()}),this.navigationService.expands.filter(function(t){var n=t.index;return n===e.index}).subscribe(function(t){var n=t.expand;return e.expand(n)})]},e.prototype.activateItem=function(){var e=this.navigationService,t=this.selectionService,n=this.index;t.setFirstSelected(n,this.isSelected),!e.isActive(n)&&t.isFirstSelected(n)&&e.activateIndex(n)},e.prototype.expand=function(e){this.expandService[e?"expand":"collapse"](this.index,this.dataItem)},e.prototype.isFocusable=function(){return this.navigationService.isFocusable(this.index)},e.prototype.focusItem=function(){this.isInitialized&&this.navigationService.isActive(this.index)&&this.element.nativeElement.focus()},e.prototype.moveNode=function(e){void 0===e&&(e={});var t=e.currentValue,n=e.firstChange,i=e.previousValue;!n&&c.isPresent(t)&&c.isPresent(i)&&(this.navigationService.unregisterItem(i),this.navigationService.registerItem(t))},e.prototype.setAriaAttributes=function(){this.setAttribute("aria-level",this.ib.level(this.index).toString()),this.setAttribute("aria-expanded",this.isExpanded.toString()),this.setAttribute("aria-selected",this.isSelected.toString())},e.prototype.updateTabIndex=function(){this.setAttribute("tabIndex",this.isFocusable()?"0":"-1")},e.prototype.setAttribute=function(e,t){this.renderer.setAttribute(this.element.nativeElement,e,t)},i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"index",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"isExpanded",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"isSelected",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewItem]"}),i.__metadata("design:paramtypes",[r.ElementRef,s.ExpandStateService,o.NavigationService,a.SelectionService,r.Renderer2,d.IndexBuilderService])],e)}();t.TreeViewItemDirective=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(8),a=n(11),s=n(12);n(33),n(22);var d=function(){function e(e,t,n,i){var r=this;this.element=e,this.navigationService=t,this.selectionService=n,this.renderer=i,this.subscriptions=new s.Subscription(function(){}),this.subscriptions.add(this.navigationService.moves.subscribe(this.updateItem.bind(this))),this.subscriptions.add(this.navigationService.selects.filter(function(e){return e===r.index}).subscribe(function(e){return r.selectionService.select(e,r.dataItem)})),this.subscriptions.add(this.selectionService.changes.subscribe(this.updateSelection.bind(this)))}return e.prototype.ngOnInit=function(){this.updateSelection()},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.updateItem=function(){this.render(this.navigationService.isActive(this.index),"k-state-focused")},e.prototype.updateSelection=function(){this.render(this.isSelected(this.dataItem,this.index),"k-state-selected")},e.prototype.render=function(e,t){var n=e?"addClass":"removeClass";this.renderer[n](this.element.nativeElement,t)},i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"index",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewItemContent]"}),i.__metadata("design:paramtypes",[r.ElementRef,o.NavigationService,a.SelectionService,r.Renderer2])],e)}();t.TreeViewItemContentDirective=d}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("rxjs/Subject"),require("rxjs/Subscription"),require("rxjs/BehaviorSubject"),require("rxjs/Observable"),require("@angular/animations"),require("rxjs/add/operator/do"),require("rxjs/add/operator/catch"),require("rxjs/add/observable/of"),require("rxjs/add/observable/empty"),require("@angular/common"),require("rxjs/add/observable/merge"),require("rxjs/add/operator/map"),require("rxjs/add/operator/filter"),require("rxjs/add/operator/delay"),require("rxjs/add/operator/takeUntil"),require("rxjs/add/operator/switchMap")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","rxjs/Subject","rxjs/Subscription","rxjs/BehaviorSubject","rxjs/Observable","@angular/animations","rxjs/add/operator/do","rxjs/add/operator/catch","rxjs/add/observable/of","rxjs/add/observable/empty","@angular/common","rxjs/add/observable/merge","rxjs/add/operator/map","rxjs/add/operator/filter","rxjs/add/operator/delay","rxjs/add/operator/takeUntil","rxjs/add/operator/switchMap"],t):"object"==typeof exports?exports.KendoAngularTreeview=t(require("tslib"),require("@angular/core"),require("rxjs/Subject"),require("rxjs/Subscription"),require("rxjs/BehaviorSubject"),require("rxjs/Observable"),require("@angular/animations"),require("rxjs/add/operator/do"),require("rxjs/add/operator/catch"),require("rxjs/add/observable/of"),require("rxjs/add/observable/empty"),require("@angular/common"),require("rxjs/add/observable/merge"),require("rxjs/add/operator/map"),require("rxjs/add/operator/filter"),require("rxjs/add/operator/delay"),require("rxjs/add/operator/takeUntil"),require("rxjs/add/operator/switchMap")):e.KendoAngularTreeview=t(e.tslib,e["@angular/core"],e["rxjs/Subject"],e["rxjs/Subscription"],e["rxjs/BehaviorSubject"],e["rxjs/Observable"],e["@angular/animations"],e["rxjs/add/operator/do"],e["rxjs/add/operator/catch"],e["rxjs/add/observable/of"],e["rxjs/add/observable/empty"],e["@angular/common"],e["rxjs/add/observable/merge"],e["rxjs/add/operator/map"],e["rxjs/add/operator/filter"],e["rxjs/add/operator/delay"],e["rxjs/add/operator/takeUntil"],e["rxjs/add/operator/switchMap"])}(this,function(e,t,n,i,r,o,a,s,d,c,p,u,l,h,f,v,y,m){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);t.TreeViewComponent=i.TreeViewComponent;var r=n(19);t.TreeViewModule=r.TreeViewModule;var o=n(4);t.NodeTemplateDirective=o.NodeTemplateDirective;var a=n(29);t.CheckDirective=a.CheckDirective;var s=n(32);t.ExpandDirective=s.ExpandDirective;var d=n(33);t.SelectDirective=d.SelectDirective;var c=n(34);t.HierarchyBindingDirective=c.HierarchyBindingDirective;var p=n(40);t.FlatDataBindingDirective=p.FlatDataBindingDirective},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),a=n(5),s=n(7),d=n(8),c=n(9),p=n(13),u=n(14),l=n(11),h=n(15),f=n(16),v=n(17),y=n(18),m=[a.ExpandStateService,s.IndexBuilderService,u.TreeViewLookupService,d.LoadingNotificationService,c.NavigationService,p.SelectionService],_=function(){function e(e,t,n,i,o){this.expandService=e,this.navigationService=t,this.selectionService=n,this.treeViewLookupService=i,this.element=o,this.classNames=!0,this.onBlur=new r.EventEmitter,this.onFocus=new r.EventEmitter,this.expand=new r.EventEmitter,this.collapse=new r.EventEmitter,this.checkedChange=new r.EventEmitter,this.selectionChange=new r.EventEmitter,this.navigable=!0,this.checkboxes=!1,this.data=new v.BehaviorSubject([]),this.subscriptions=new f.Subscription(function(){}),this._animate=!0,this.resolvedPromise=Promise.resolve(null),this.children=function(){return y.Observable.of([])}}return Object.defineProperty(e.prototype,"role",{get:function(){return"tree"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return!this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nodes",{set:function(e){this.data.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasChildren",{get:function(){return this._hasChildren||h.hasChildren},set:function(e){this._hasChildren=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isChecked",{get:function(){return this._isChecked||h.isChecked},set:function(e){this._isChecked=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded||h.isExpanded},set:function(e){this._isExpanded=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected||h.isSelected},set:function(e){this._isSelected=e},enumerable:!0,configurable:!0}),e.prototype.handleKeydown=function(e){this.isActive&&l.hasActiveNode(e.target)&&this.navigationService.move(e)},e.prototype.handleFocusin=function(e){var t=e.target,n=l.closestNode(t);l.hasActiveNode(t,n)&&this.activateAndEmit(l.nodeId(n))},e.prototype.handleClick=function(e){var t=e.target,n=l.closestNode(t),i=l.nodeId(n);l.hasActiveNode(t,n)&&i&&(this.activateAndEmit(i),this.navigationService.selectIndex(i))},e.prototype.handleFocusout=function(e){var t=this,n=e.target,i=n.getAttribute("data-treeindex");this.resolvedPromise.then(function(){t.navigationService.isActive(i)&&(t.navigationService.deactivate(),t.isActive=!1,t.onBlur.emit())})},e.prototype.ngOnChanges=function(e){this.checkboxes=Boolean(this._isChecked),this.expandIcons=Boolean(this._isExpanded&&this._hasChildren),this.navigationService.navigable=Boolean(this.navigable)},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.expandService.changes.subscribe(function(t){var n=t.index,i=t.dataItem,r=t.expand;return r?e.expand.emit({index:n,dataItem:i}):e.collapse.emit({index:n,dataItem:i})})),this.subscriptions.add(this.navigationService.checks.subscribe(function(t){return e.checkedChange.emit(e.treeViewLookupService.itemLookup(t))})),this.subscriptions.add(this.selectionService.changes.subscribe(function(t){return e.selectionChange.emit(t)}))},e.prototype.blur=function(){if(l.isDocumentAvailable()){var e=l.focusableNode(this.element);document.activeElement===e&&e.blur()}},e.prototype.focus=function(e){this.navigationService.activateIndex(e);var t=l.focusableNode(this.element);t&&t.focus()},e.prototype.activateAndEmit=function(e){var t=this;e&&(this.navigationService.activateIndex(e),this.resolvedPromise.then(function(){t.navigationService.isActive(e)&&(t.isActive=!0,t.onFocus.emit())}))},i.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-treeview"),i.__metadata("design:type",Boolean)],e.prototype,"classNames",void 0),i.__decorate([r.HostBinding("attr.role"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"role",null),i.__decorate([r.Input(),r.HostBinding("@.disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"animate",null),i.__decorate([r.Output("blur"),i.__metadata("design:type",r.EventEmitter)],e.prototype,"onBlur",void 0),i.__decorate([r.Output("focus"),i.__metadata("design:type",r.EventEmitter)],e.prototype,"onFocus",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"expand",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"collapse",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"checkedChange",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"selectionChange",void 0),i.__decorate([r.ContentChild(o.NodeTemplateDirective),i.__metadata("design:type",o.NodeTemplateDirective)],e.prototype,"nodeTemplate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"textField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"hasChildren",null),i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isChecked",null),i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isExpanded",null),i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isSelected",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"navigable",void 0),i.__decorate([r.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleKeydown",null),i.__decorate([r.HostListener("focusin",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleFocusin",null),i.__decorate([r.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleClick",null),i.__decorate([r.HostListener("focusout",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleFocusout",null),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"children",void 0),e=i.__decorate([r.Component({changeDetection:r.ChangeDetectionStrategy.OnPush,exportAs:"kendoTreeView",providers:m,selector:"kendo-treeview",template:'\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n role="group"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplate?.templateRef"\n [nodes]="data"\n [textField]="textField"\n >\n </ul>\n '}),i.__metadata("design:paramtypes",[a.ExpandStateService,c.NavigationService,p.SelectionService,u.TreeViewLookupService,r.ElementRef])],e)}();t.TreeViewComponent=_},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(){function e(e){this.templateRef=e}return e=i.__decorate([r.Directive({selector:"[kendoTreeViewNodeTemplate]"}),i.__param(0,r.Optional()),i.__metadata("design:paramtypes",[r.TemplateRef])],e)}();t.NodeTemplateDirective=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.expand=function(e,t){this.changes.next({dataItem:t,index:e,expand:!0})},e.prototype.collapse=function(e,t){this.changes.next({dataItem:t,index:e,expand:!1})},e=i.__decorate([r.Injectable()],e)}();t.ExpandStateService=a},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(){function e(){this.INDEX_SEPARATOR="_"}return e.prototype.nodeIndex=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),""+t+(t?this.INDEX_SEPARATOR:"")+e},e.prototype.indexForLevel=function(e,t){return e.split(this.INDEX_SEPARATOR).slice(0,t).join(this.INDEX_SEPARATOR)},e.prototype.level=function(e){return e.split(this.INDEX_SEPARATOR).length},e=i.__decorate([r.Injectable()],e)}();t.IndexBuilderService=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.notifyLoaded=function(e){this.changes.next(e)},e=i.__decorate([r.Injectable()],e)}();t.LoadingNotificationService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(10),a=n(11),s=n(12),d=n(6),c=function(e,t){return e[t]||e},p=function(){function e(){var e=this;this.expands=new d.Subject,this.moves=new d.Subject,this.checks=new d.Subject,this.selects=new d.Subject,this.navigable=!0,this.actions=(t={},t[s.Keys.up]=function(){return e.activate(c(e.focusableItem,"prev"))},t[s.Keys.down]=function(){return e.activate(c(e.focusableItem,"next"))},t[s.Keys.left]=function(){return e.expand({expand:!1,intercept:e.moveToParent.bind(e)})},t[s.Keys.right]=function(){return e.expand({expand:!0,intercept:e.moveToChild.bind(e)})},t[s.Keys.home]=function(){return e.activate(e.model.firstNode())},t[s.Keys.end]=function(){return e.activate(e.model.lastNode())},t[s.Keys.enter]=function(){return e.navigable&&e.selectIndex(a.nodeIndex(e.activeItem))},t[s.Keys.space]=function(){return e.navigable&&e.checkIndex(a.nodeIndex(e.activeItem))},t),this.isFocused=!1,this._model=new o.NavigationModel;var t}return Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return a.nodeIndex(this.activeItem)||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusableItem",{get:function(){return this.activeItem||this.model.firstNode()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActiveExpanded",{get:function(){return this.activeItem&&this.activeItem.children.length>0},enumerable:!0,configurable:!0}),e.prototype.activate=function(e){this.navigable&&e&&!this.isActive(a.nodeIndex(e))&&(this.isFocused=!0,this.activeItem=e||this.activeItem,this.notifyMove())},e.prototype.activateParent=function(e){this.activate(this.model.findParent(e))},e.prototype.activateIndex=function(e){e&&this.activate(this.model.findNode(e))},e.prototype.deactivate=function(){this.navigable&&this.isFocused&&(this.isFocused=!1,this.notifyMove())},e.prototype.checkIndex=function(e){this.checks.next(e)},e.prototype.selectIndex=function(e){this.selects.next(e)},e.prototype.isActive=function(e){return!!e&&(this.isFocused&&this.activeIndex===e)},e.prototype.isFocusable=function(e){return a.nodeIndex(this.focusableItem)===e},e.prototype.registerItem=function(e){this.model.registerItem(e)},e.prototype.unregisterItem=function(e){this.isActive(e)&&this.activateParent(e),this.model.unregisterItem(e)},e.prototype.move=function(e){if(this.navigable){var t=this.actions[e.keyCode];t&&(t(),e.preventDefault())}},e.prototype.expand=function(e){var t=e.expand,n=e.intercept,i=a.nodeIndex(this.activeItem);i&&!n(i)&&this.notifyExpand(t)},e.prototype.moveToParent=function(){return!this.isActiveExpanded&&(this.activate(this.model.findParent(a.nodeIndex(this.activeItem))),!0)},e.prototype.moveToChild=function(){return!!this.isActiveExpanded&&(this.activate(this.model.findChild(a.nodeIndex(this.activeItem))),!0)},e.prototype.notifyExpand=function(e){this.expands.next(this.navigationState(e))},e.prototype.notifyMove=function(){this.moves.next(this.navigationState())},e.prototype.navigationState=function(e){return void 0===e&&(e=!1),{expand:e,index:a.nodeIndex(this.activeItem),isFocused:this.isFocused}},e=i.__decorate([r.Injectable()],e)}();t.NavigationService=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=function(e){return e[e.length-1]},o=function(e){return e||{}},a=function(e){return o(e).children||[]},s=function(e){for(var t=e,n=[].concat(a(e));n.length;)n=n.concat(a(r(n))),t=n.shift();return t},d=function(e){var t=e.prev,n=e.next;t&&(t.next=e),n&&(n.prev=e)},c=function(e){var t=e.prev,n=e.next;t&&(t.next=n),n&&(n.prev=t)},p=function(){function e(){this.ib=new i.IndexBuilderService,this.nodes=[]}return e.prototype.firstNode=function(){return this.nodes[0]||null},e.prototype.lastNode=function(){var e=this.nodes[this.nodes.length-1];return e?s(r(this.container(e)))||e:null},e.prototype.findNode=function(e){return this.find(e,this.nodes)},e.prototype.findParent=function(e){var t=this.ib.level(e)-1;return this.findNode(this.ib.indexForLevel(e,t))},e.prototype.findChild=function(e){return a(this.findNode(e))[0]||null},e.prototype.registerItem=function(e){var t=[],n=this.ib.level(e),i=this.findParent(e);if(i||1===n){var r=this.prevNode(i),o=this.nextNode(i),a={children:t,index:e,parent:i,prev:r,next:o};this.container(i).push(a),d(a)}},e.prototype.unregisterItem=function(e){var t=this.find(e,this.nodes);if(t){c(t);var n=this.container(t.parent);n.splice(n.indexOf(t),1)}},e.prototype.childLevel=function(e){return e&&e.length?this.ib.level(e[0].index):1},e.prototype.find=function(e,t){var n=this.childLevel(t),i=this.ib.indexForLevel(e,n),r=n===this.ib.level(e),o=t.find(function(e){return e.index===i});return o?r?o:this.find(e,o.children):null},e.prototype.container=function(e){return e?e.children:this.nodes},e.prototype.prevNode=function(e){return s(r(this.container(e)))||e||null},e.prototype.nextNode=function(e){if(!e)return null;var t=this.container(this.findParent(e.index));return t[t.indexOf(e)+1]||null},e}();t.NavigationModel=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){},t.isPresent=function(e){return null!==e&&void 0!==e},t.isBlank=function(e){return null===e||void 0===e},t.isArray=function(e){return Array.isArray(e)},t.isNullOrEmptyString=function(e){return t.isBlank(e)||0===e.trim().length},t.isDocumentAvailable=function(){return"undefined"!=typeof document},t.isChanged=function(e,t,n){return void 0===n&&(n=!0),t[e]&&(!t[e].isFirstChange()||!n)&&t[e].previousValue!==t[e].currentValue},t.anyChanged=function(e,n,i){return void 0===i&&(i=!0),e.some(function(e){return t.isChanged(e,n,i)})},t.closestNode=function(e){return e.closest("li.k-item")},t.focusableNode=function(e){return e.nativeElement.querySelector('li[tabindex="0"]')},t.hasActiveNode=function(e,n){var i=n||t.closestNode(e);return i&&(i===e||e.tabIndex<0)},t.nodeId=function(e){return void 0===e&&(e={getAttribute:t.noop}),e.getAttribute("data-treeindex")},t.nodeIndex=function(e){return(e||{}).index},t.guid=function(){for(var e,t="",n=0;n<32;n++)e=16*Math.random()|0,8!==n&&12!==n&&16!==n&&20!==n||(t+="-"),t+=(12===n?4:16===n?3&e|8:e).toString(16);return t}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n;!function(e){e[e.enter=13]="enter",e[e.shift=16]="shift",e[e.space=32]="space",e[e.end=35]="end",e[e.home=36]="home",e[e.left=37]="left",e[e.up=38]="up",e[e.right=39]="right",e[e.down=40]="down"}(n=t.Keys||(t.Keys={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.isFirstSelected=function(e){return this.firstIndex===e},e.prototype.setFirstSelected=function(e,t){this.firstIndex===e&&t===!1?this.firstIndex=null:!this.firstIndex&&t&&(this.firstIndex=e)},e.prototype.select=function(e,t){this.changes.next({dataItem:t,index:e})},e=i.__decorate([r.Injectable()],e)}();t.SelectionService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(11),a=function(){function e(){this.map=new Map}return e.prototype.registerItem=function(e,t){var n={children:[],item:e,parent:this.item(o.nodeIndex(t))};this.map.set(e.index,n)},e.prototype.registerChildren=function(e,t){var n=this.item(e);n&&(n.children=t)},e.prototype.unregisterItem=function(e){this.map.delete(e)},e.prototype.replaceItem=function(e,t,n){var i=this.item(e);i&&t&&(this.unregisterItem(e),this.registerItem(t,n),e===t.index&&this.registerChildren(t.index,i.children.slice()))},e.prototype.itemLookup=function(e){var t=this.item(e);return t?{children:this.mapChildren(t.children),item:t.item,parent:t.parent}:null},e.prototype.hasItem=function(e){return this.map.has(e)},e.prototype.item=function(e){return this.map.get(e)||null},e.prototype.mapChildren=function(e){var t=this;return e.map(function(e){var n=t.item(e.index),i=n.item,r=n.parent,o=n.children;return{children:t.mapChildren(o),item:i,parent:r}})},e=i.__decorate([r.Injectable()],e)}();t.TreeViewLookupService=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=function(){return!1},t.isChecked=function(){return"none"},t.isExpanded=function(){return!0},t.isSelected=function(){return!1}},function(e,t){e.exports=i},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(20),s=n(4),d=n(29),c=n(32),p=n(33),u=n(34),l=n(40),h=[o.TreeViewComponent,s.NodeTemplateDirective,d.CheckDirective,c.ExpandDirective,p.SelectDirective,u.HierarchyBindingDirective,l.FlatDataBindingDirective],f=function(){function e(){}return e=i.__decorate([r.NgModule({exports:[h],imports:[a.SharedModule]})],e)}();t.TreeViewModule=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(21),s=n(28),d=n(4),c=n(29),p=n(32),u=n(33),l=n(34),h=n(35),f=n(40),v=n(42),y=n(43),m=n(44),_=[o.TreeViewComponent,a.TreeViewGroupComponent,v.TreeViewItemDirective,y.TreeViewItemContentDirective,d.NodeTemplateDirective,c.CheckDirective,p.ExpandDirective,u.SelectDirective,l.HierarchyBindingDirective,h.LoadingIndicatorDirective,f.FlatDataBindingDirective],g=function(){function e(){}return e=i.__decorate([r.NgModule({declarations:[_],exports:[_],imports:[s.CommonModule,m.CheckBoxModule]})],e)}();t.SharedModule=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(22),a=n(5),s=n(7),d=n(14),c=n(9),p=n(11),u=n(23),l=n(8),h=n(18);n(24),n(25),n(26),n(27);var f=function(){function e(e,t,n,i,r,o){this.expandService=e,this.loadingService=t,this.indexBuilder=n,this.treeViewLookupService=i,this.navigationService=r,this.cd=o,this.kGroupClass=!0,this.textField="",this._data=[],this.isChecked=function(){return"none"},this.isExpanded=function(){return!1},this.isSelected=function(){return!1},this.children=function(){return h.Observable.of([])},this.hasChildren=function(){return!1}}return Object.defineProperty(e.prototype,"role",{get:function(){return"group"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e,this.updateParentChildren()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTemplate",{get:function(){return p.isPresent(this.nodeTemplateRef)},enumerable:!0,configurable:!0}),e.prototype.expandNode=function(e,t,n){n?this.expandService.expand(e,t):this.expandService.collapse(e,t)},e.prototype.checkNode=function(e){this.navigationService.checkIndex(e),this.navigationService.activateIndex(e)},e.prototype.nodeIndex=function(e){return this.indexBuilder.nodeIndex(e.toString(),this.parentIndex)},e.prototype.nodeText=function(e){var t=p.isArray(this.textField)?this.textField[0]:this.textField;return u.getter(t,!0)(e)},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscription=this.nodes.subscribe(function(t){e.data=t,e.cd.markForCheck()})},e.prototype.ngOnChanges=function(e){e.parentIndex&&this.updateParentChildren()},e.prototype.fetchChildren=function(e,t){var n=this;return this.children(e).catch(function(){return n.loadingService.notifyLoaded(t),h.Observable.empty()}).do(function(){return n.loadingService.notifyLoaded(t)})},Object.defineProperty(e.prototype,"nextFields",{get:function(){return p.isArray(this.textField)?this.textField.length>1?this.textField.slice(1):this.textField:[this.textField]},enumerable:!0,configurable:!0}),e.prototype.updateParentChildren=function(){var e=this.parentIndex?this.mapToTreeItem(this.data):[];this.treeViewLookupService.registerChildren(this.parentIndex,e)},e.prototype.mapToTreeItem=function(e){var t=this;return e.map(function(e,n){return{dataItem:e,index:t.nodeIndex(n)}})},i.__decorate([r.HostBinding("class.k-group"),i.__metadata("design:type",Boolean)],e.prototype,"kGroupClass",void 0),i.__decorate([r.HostBinding("attr.role"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"role",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"checkboxes",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"expandIcons",void 0),i.__decorate([r.Input(),i.__metadata("design:type",h.Observable)],e.prototype,"nodes",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"textField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"parentDataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"parentIndex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",r.TemplateRef)],e.prototype,"nodeTemplateRef",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isChecked",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isExpanded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"children",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"hasChildren",void 0),e=i.__decorate([r.Component({animations:[o.trigger("toggle",[o.transition("void => *",[o.style({height:0}),o.animate("0.1s ease-in",o.style({height:"*"}))]),o.transition("* => void",[o.style({height:"*"}),o.animate("0.1s ease-in",o.style({height:0}))])])],selector:"[kendoTreeViewGroup]",template:'\n <li\n *ngFor="let node of data; let index = index" class="k-item"\n kendoTreeViewItem\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [isChecked]="isChecked(node, nodeIndex(index))"\n [isExpanded]="isExpanded(node, nodeIndex(index))"\n [isSelected]="isSelected(node, nodeIndex(index))"\n [attr.data-treeindex]="nodeIndex(index)"\n >\n <div class="k-mid">\n <span\n class="k-icon"\n [class.k-i-collapse]="isExpanded(node, nodeIndex(index))"\n [class.k-i-expand]="!isExpanded(node, nodeIndex(index))"\n [kendoTreeViewLoading]="nodeIndex(index)"\n (click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="expandIcons && hasChildren(node)"\n >\n </span>\n <kendo-checkbox\n *ngIf="checkboxes"\n [checkState]="isChecked(node, nodeIndex(index))"\n (checkStateChange)="checkNode(nodeIndex(index))"\n tabindex="-1"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]="nodeIndex(index)"\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [isSelected]="isSelected"\n class="k-in"\n >\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef" [ngTemplateOutletContext]="{$implicit: node, index: nodeIndex(index)}"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf="isExpanded(node, nodeIndex(index)) && hasChildren(node)"\n kendoTreeViewGroup\n role="group"\n [nodes]="fetchChildren(node, nodeIndex(index))"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [parentDataItem]="node"\n [textField]="nextFields"\n [@toggle]="true"\n >\n </ul>\n </li>\n '}),i.__metadata("design:paramtypes",[a.ExpandStateService,l.LoadingNotificationService,s.IndexBuilderService,d.TreeViewLookupService,c.NavigationService,r.ChangeDetectorRef])],e)}();t.TreeViewGroupComponent=f},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,o={};o.undefined=function(e){return e},t.getter=function(e,t){var n=e+t;if(o[n])return o[n];var a=[];return e.replace(r,function(e,t,n,r){a.push(i.isPresent(t)?t:n||r)}),o[n]=function(e){for(var n=e,r=0;r<a.length;r++)if(n=n[a[r]],!i.isPresent(n)&&t)return n;return n},o[n]}},function(e,t){e.exports=s},function(e,t){e.exports=d},function(e,t){e.exports=c},function(e,t){e.exports=p},function(e,t){e.exports=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(11),s=n(16);n(30),n(31);var d=function(e,t){return e.filter(function(e){return e===t}).length>0},c=function(){function e(e){var t=this;this.treeView=e,this.checkedKeys=[],this.checkedKeysChange=new r.EventEmitter,this.subscriptions=new s.Subscription(function(){}),this.checkActions={multiple:function(e){return t.checkMultiple(e)},single:function(e){return t.checkSingle(e)}}}return Object.defineProperty(e.prototype,"isChecked",{set:function(e){this.treeView.isChecked=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var e={checkChildren:!0,checkParents:!0,enabled:!0,mode:"multiple"};if(!a.isPresent(this.checkable))return e;var t="boolean"==typeof this.checkable,n=t?{enabled:this.checkable}:this.checkable;return Object.assign(e,n)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.treeView.checkedChange.subscribe(function(t){return e.check(t)})),this.treeView.checkboxes=!0,this.treeView.isChecked=this.isItemChecked.bind(this)},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.isItemChecked=function(e,t){if(!this.checkKey)return this.isIndexChecked(t);var n=this.checkedKeys.indexOf(this.itemKey({dataItem:e,index:t}));return n>-1?"checked":"none"},e.prototype.isIndexChecked=function(e){var t=this.checkedKeys.filter(function(t){return 0===t.indexOf(e)});if(d(t,e))return"checked";var n=this.options,i=n.mode,r=n.checkParents;return"multiple"===i&&r&&t.length?"indeterminate":"none"},e.prototype.itemKey=function(e){return this.checkKey?"string"==typeof this.checkKey?e.dataItem[this.checkKey]:"function"==typeof this.checkKey?this.checkKey(e):void 0:e.index},e.prototype.check=function(e){var t=this.options,n=t.enabled,i=t.mode,r=this.checkActions[i]||a.noop;n&&r(e)},e.prototype.checkSingle=function(e){var t=this.itemKey(e.item);this.checkedKeys=this.checkedKeys[0]!==t?[t]:[],this.notify()},e.prototype.checkMultiple=function(e){this.checkNode(e),this.options.checkParents&&this.checkParents(e.parent), | ||
this.notify()},e.prototype.checkNode=function(e,t){var n=this,i=this.itemKey(e.item),r=this.checkedKeys.indexOf(i),o=r>-1,s=void 0===t?!o:t;!a.isPresent(i)||o&&t||(o?this.checkedKeys.splice(r,1):this.checkedKeys.push(i),this.options.checkChildren&&e.children.map(function(e){return n.checkNode(e,s)}))},e.prototype.checkParents=function(e){for(var t=e;t;){var n=this.itemKey(t.item),i=this.checkedKeys.indexOf(n);this.allChildrenSelected(t.children)?i===-1&&this.checkedKeys.push(n):i>-1&&this.checkedKeys.splice(i,1),t=t.parent}},e.prototype.allChildrenSelected=function(e){var t=this,n=function(e,n){return e&&"checked"===t.isItemChecked(n.dataItem,n.index)};return e.reduce(n,!0)},e.prototype.notify=function(){this.checkedKeysChange.emit(this.checkedKeys.slice())},i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isChecked",null),i.__decorate([r.Input("checkBy"),i.__metadata("design:type",Object)],e.prototype,"checkKey",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"checkedKeys",void 0),i.__decorate([r.Input("kendoTreeViewCheckable"),i.__metadata("design:type",Object)],e.prototype,"checkable",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"checkedKeysChange",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewCheckable]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.CheckDirective=c},function(e,t){e.exports=l},function(e,t){e.exports=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(16),s=n(18);n(30),n(31);var d=function(){function e(e){this.treeView=e,this.expandedKeysChange=new r.EventEmitter,this.expandedKeys=[],this.subscriptions=new a.Subscription(function(){})}return Object.defineProperty(e.prototype,"isExpanded",{set:function(e){this.treeView.isExpanded=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(s.Observable.merge(this.treeView.expand.map(function(e){return i.__assign({expand:!0},e)}),this.treeView.collapse.map(function(e){return i.__assign({expand:!1},e)})).subscribe(this.toggleExpand.bind(this))),this.treeView.expandIcons=!0,this.treeView.isExpanded=function(t,n){return e.expandedKeys.indexOf(e.itemKey({dataItem:t,index:n}))>-1}},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.itemKey=function(e){if(this.expandKey){if("string"==typeof this.expandKey)return e.dataItem[this.expandKey];if("function"==typeof this.expandKey)return this.expandKey(e)}return e.index},e.prototype.toggleExpand=function(e){var t=e.index,n=e.dataItem,i=e.expand,r=this.itemKey({index:t,dataItem:n}),o=this.expandedKeys.indexOf(r),a=!1;o>-1&&!i?(this.expandedKeys.splice(o,1),a=!0):o===-1&&i&&(this.expandedKeys.push(r),a=!0),a&&this.expandedKeysChange.emit(this.expandedKeys)},i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isExpanded",null),i.__decorate([r.Input("expandBy"),i.__metadata("design:type",Object)],e.prototype,"expandKey",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"expandedKeysChange",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"expandedKeys",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewExpandable]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.ExpandDirective=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(11),s=n(16);n(30),n(31);var d=function(){function e(e){var t=this;this.treeView=e,this.selectedKeys=[],this.selectedKeysChange=new r.EventEmitter,this.subscriptions=new s.Subscription(function(){}),this.selectActions={multiple:function(e){return t.selectMultiple(e)},single:function(e){return t.selectSingle(e)}}}return Object.defineProperty(e.prototype,"isSelected",{set:function(e){this.treeView.isSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getAriaMultiselectable",{get:function(){return"multiple"===this.options.mode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var e={enabled:!0,mode:"single"};if(!a.isPresent(this.selection))return e;var t="boolean"==typeof this.selection,n=t?{enabled:this.selection}:this.selection;return Object.assign(e,n)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this))),this.treeView.isSelected=function(t,n){return e.selectedKeys.indexOf(e.itemKey({dataItem:t,index:n}))>-1}},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.itemKey=function(e){return this.selectKey?"string"==typeof this.selectKey?e.dataItem[this.selectKey]:"function"==typeof this.selectKey?this.selectKey(e):void 0:e.index},e.prototype.select=function(e){var t=this.options,n=t.enabled,i=t.mode,r=this.selectActions[i]||a.noop;n&&r(e)},e.prototype.selectSingle=function(e){var t=this.itemKey(e);this.selectedKeys[0]!==t&&(this.selectedKeys=[t],this.notify())},e.prototype.selectMultiple=function(e){var t=this.itemKey(e),n=this.selectedKeys.indexOf(t),i=n>-1;a.isPresent(t)&&(i?this.selectedKeys.splice(n,1):this.selectedKeys.push(t),this.notify())},e.prototype.notify=function(){this.selectedKeysChange.emit(this.selectedKeys.slice())},i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isSelected",null),i.__decorate([r.Input("selectBy"),i.__metadata("design:type",Object)],e.prototype,"selectKey",void 0),i.__decorate([r.Input("kendoTreeViewSelectable"),i.__metadata("design:type",Object)],e.prototype,"selection",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"selectedKeys",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"selectedKeysChange",void 0),i.__decorate([r.HostBinding("attr.aria-multiselectable"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],e.prototype,"getAriaMultiselectable",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewSelectable]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.SelectDirective=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(23),s=n(11),d=n(15),c=n(18);n(26);var p=function(){function e(e){this.treeView=e}return Object.defineProperty(e.prototype,"childrenField",{get:function(){return this._childrenField},set:function(e){if(!e)throw new Error("'childrenField' cannot be empty");this._childrenField=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;s.isPresent(this.childrenField)&&(this.treeView.children=function(t){return c.Observable.of(a.getter(e.childrenField,!0)(t))},this.treeView.hasChildren=function(t){return e.childrenField in t},this.treeView.isExpanded!==d.isExpanded&&(this.treeView.expandIcons=!0))},i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],e.prototype,"childrenField",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewHierarchyBinding]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.HierarchyBindingDirective=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(5),a=n(8),s=n(18);n(36),n(37),n(38),n(39),n(26);var d=function(){function e(e,t,n){this.expandService=e,this.loadingService=t,this.cd=n,this._loading=!1}return Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this,t=this.loadingService.changes.filter(function(t){return t===e.index});this.subscription=this.expandService.changes.filter(function(t){var n=t.index;return n===e.index}).do(function(t){var n=t.expand;!n&&e.loading&&(e.loading=!1)}).filter(function(e){var t=e.expand;return t}).switchMap(function(e){return s.Observable.of(e).delay(100).takeUntil(t)}).subscribe(function(){return e.loading=!0}),this.subscription.add(t.subscribe(function(){return e.loading=!1}))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},i.__decorate([r.HostBinding("class.k-i-loading"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"loading",null),i.__decorate([r.Input("kendoTreeViewLoading"),i.__metadata("design:type",String)],e.prototype,"index",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewLoading]"}),i.__metadata("design:paramtypes",[o.ExpandStateService,a.LoadingNotificationService,r.ChangeDetectorRef])],e)}();t.LoadingIndicatorDirective=d},function(e,t){e.exports=f},function(e,t){e.exports=v},function(e,t){e.exports=y},function(e,t){e.exports=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(23),s=n(11),d=n(41),c=n(18),p=function(e,t,n){return t.filter(function(t){return e(t)===n})},u=function(){function e(e){this.treeView=e,this.originalData=[]}return Object.defineProperty(e.prototype,"nodes",{set:function(e){if(this.originalData=e||[],s.isNullOrEmptyString(this.parentIdField))this.treeView.nodes=this.originalData.slice(0);else{var t=a.getter(this.parentIdField,!0);this.treeView.nodes=this.originalData.filter(d.compose(s.isBlank,t))}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;if(s.isPresent(this.parentIdField)&&s.isPresent(this.idField)){var t=function(t){return p(a.getter(e.parentIdField,!0),e.originalData||[],a.getter(e.idField,!0)(t))};this.treeView.hasChildren=function(e){return t(e).length>0},this.treeView.children=function(e){return c.Observable.of(t(e))}}},e.prototype.ngOnChanges=function(e){s.isChanged("parentIdField",e,!1)&&(this.nodes=this.originalData)},i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"parentIdField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"idField",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewFlatDataBinding]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.FlatDataBindingDirective=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduceRight(function(e,t){return t(e)},t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(9),a=n(13),s=n(5),d=n(7),c=n(14),p=n(11);n(36);var u=function(e,t){return{dataItem:t,index:e}},l=function(){function e(e,t,n,i,r,o,a){this.element=e,this.expandService=t,this.navigationService=n,this.selectionService=i,this.lookupService=r,this.renderer=o,this.ib=a,this.ariaChecked="false",this.isInitialized=!1,this.subscriptions=[],this.subscribe()}return Object.defineProperty(e.prototype,"isChecked",{set:function(e){"checked"===e?this.ariaChecked="true":"indeterminate"===e?this.ariaChecked="mixed":this.ariaChecked="false"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded||!1},set:function(e){this._isExpanded=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected||!1},set:function(e){this._isSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"treeItem",{get:function(){return u(this.index,this.dataItem)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentTreeItem",{get:function(){return this.parentDataItem?u(this.parentIndex,this.parentDataItem):null},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.navigationService.registerItem(this.index),this.lookupService.registerItem(this.treeItem,this.parentTreeItem),this.activateItem(),this.isInitialized=!0,this.setAttribute("role","treeitem"),this.setAriaAttributes(),this.updateTabIndex()},e.prototype.ngOnChanges=function(e){var t=e.index;(t||e.isChecked||e.isExpanded||e.isSelected)&&this.setAriaAttributes(),this.moveLookupItem(e),this.moveNavigationItem(t)},e.prototype.ngOnDestroy=function(){this.navigationService.unregisterItem(this.index),this.subscriptions.map(function(e){return e.unsubscribe()}),this.subscriptions=[]},e.prototype.subscribe=function(){var e=this;this.subscriptions=[this.navigationService.moves.subscribe(function(){e.updateTabIndex(),e.focusItem()}),this.navigationService.expands.filter(function(t){var n=t.index;return n===e.index}).subscribe(function(t){var n=t.expand;return e.expand(n)})]},e.prototype.activateItem=function(){var e=this.navigationService,t=this.selectionService,n=this.index;t.setFirstSelected(n,this.isSelected),!e.isActive(n)&&t.isFirstSelected(n)&&e.activateIndex(n)},e.prototype.expand=function(e){this.expandService[e?"expand":"collapse"](this.index,this.dataItem)},e.prototype.isFocusable=function(){return this.navigationService.isFocusable(this.index)},e.prototype.focusItem=function(){this.isInitialized&&this.navigationService.isActive(this.index)&&this.element.nativeElement.focus()},e.prototype.moveLookupItem=function(e){void 0===e&&(e={});var t=e.dataItem,n=e.index,i=e.parentDataItem,r=e.parentIndex;if((!n||!n.firstChange||this.lookupService.hasItem(this.index))&&(t||n||i||r)){var o=(n||{}).previousValue||this.index;this.lookupService.replaceItem(o,this.treeItem,this.parentTreeItem)}},e.prototype.moveNavigationItem=function(e){void 0===e&&(e={});var t=e.currentValue,n=e.firstChange,i=e.previousValue;!n&&p.isPresent(t)&&p.isPresent(i)&&(this.navigationService.unregisterItem(i),this.navigationService.registerItem(t))},e.prototype.setAriaAttributes=function(){this.setAttribute("aria-level",this.ib.level(this.index).toString()),this.setAttribute("aria-expanded",this.isExpanded.toString()),this.setAttribute("aria-selected",this.isSelected.toString()),this.setAttribute("aria-checked",this.ariaChecked)},e.prototype.updateTabIndex=function(){this.setAttribute("tabIndex",this.isFocusable()?"0":"-1")},e.prototype.setAttribute=function(e,t){this.renderer.setAttribute(this.element.nativeElement,e,t)},i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"index",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"parentDataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"parentIndex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],e.prototype,"isChecked",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"isExpanded",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"isSelected",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewItem]"}),i.__metadata("design:paramtypes",[r.ElementRef,s.ExpandStateService,o.NavigationService,a.SelectionService,c.TreeViewLookupService,r.Renderer2,d.IndexBuilderService])],e)}();t.TreeViewItemDirective=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(9),a=n(13),s=n(16);n(36),n(24);var d=function(){function e(e,t,n,i){var r=this;this.element=e,this.navigationService=t,this.selectionService=n,this.renderer=i,this.subscriptions=new s.Subscription(function(){}),this.subscriptions.add(this.navigationService.moves.subscribe(this.updateItem.bind(this))),this.subscriptions.add(this.navigationService.selects.filter(function(e){return e===r.index}).subscribe(function(e){return r.selectionService.select(e,r.dataItem)})),this.subscriptions.add(this.selectionService.changes.subscribe(this.updateSelection.bind(this)))}return e.prototype.ngOnInit=function(){this.updateSelection()},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.updateItem=function(){this.render(this.navigationService.isActive(this.index),"k-state-focused")},e.prototype.updateSelection=function(){this.render(this.isSelected(this.dataItem,this.index),"k-state-selected")},e.prototype.render=function(e,t){var n=e?"addClass":"removeClass";this.renderer[n](this.element.nativeElement,t)},i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"index",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewItemContent]"}),i.__metadata("design:paramtypes",[r.ElementRef,o.NavigationService,a.SelectionService,r.Renderer2])],e)}();t.TreeViewItemContentDirective=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(45),a=[o.CheckBoxComponent],s=function(){function e(){}return e=i.__decorate([r.NgModule({declarations:[a],exports:[a]})],e)}();t.CheckBoxModule=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(11),a=function(){function e(e,t){this.element=e,this.renderer=t,this.id="_"+o.guid(),this.checkState="none",this.tabindex=0,this.checkStateChange=new r.EventEmitter}return Object.defineProperty(e.prototype,"classWrapper",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indeterminate",{get:function(){return"indeterminate"===this.checkState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checked",{get:function(){return"checked"===this.checkState},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.element.nativeElement,"tabindex")},e.prototype.handleChange=function(e){this.checkStateChange.emit(e.target.checked?"checked":"none")},i.__decorate([r.HostBinding("class.k-checkbox-wrapper"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],e.prototype,"classWrapper",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"id",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"checkState",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"labelText",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Number)],e.prototype,"tabindex",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"checkStateChange",void 0),e=i.__decorate([r.Component({selector:"kendo-checkbox",template:'\n <input\n class="k-checkbox"\n type="checkbox"\n [id]="id"\n [checked]="checked"\n [indeterminate]="indeterminate"\n [tabindex]="tabindex"\n (change)="handleChange($event)"\n />\n <label\n class="k-checkbox-label"\n tabindex="-1"\n [for]="id"\n >{{labelText}}</label>\n '}),i.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2])],e)}();t.CheckBoxComponent=a}])}); |
@@ -37,2 +37,3 @@ import * as tslib_1 from "tslib"; | ||
this.subscriptions.add(Observable.merge(this.treeView.expand.map(function (e) { return (tslib_1.__assign({ expand: true }, e)); }), this.treeView.collapse.map(function (e) { return (tslib_1.__assign({ expand: false }, e)); })).subscribe(this.toggleExpand.bind(this))); | ||
this.treeView.expandIcons = true; | ||
this.treeView.isExpanded = function (dataItem, index) { | ||
@@ -74,3 +75,3 @@ return _this.expandedKeys.indexOf(_this.itemKey({ dataItem: dataItem, index: index })) > -1; | ||
ExpandDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewExpandBy]' },] }, | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewExpandable]' },] }, | ||
]; | ||
@@ -83,3 +84,3 @@ /** @nocollapse */ | ||
'isExpanded': [{ type: Input },], | ||
'expandKey': [{ type: Input, args: ["kendoTreeViewExpandBy",] },], | ||
'expandKey': [{ type: Input, args: ["expandBy",] },], | ||
'expandedKeysChange': [{ type: Output },], | ||
@@ -86,0 +87,0 @@ 'expandedKeys': [{ type: Input },], |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"ExpandDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewExpandBy]"}]}],"members":{"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewExpandBy"]}]}],"expandedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"expandedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"toggleExpand":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"ExpandDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewExpandBy]"}]}],"members":{"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewExpandBy"]}]}],"expandedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"expandedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"toggleExpand":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"ExpandDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewExpandable]"}]}],"members":{"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["expandBy"]}]}],"expandedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"expandedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"toggleExpand":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"ExpandDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewExpandable]"}]}],"members":{"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["expandBy"]}]}],"expandedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"expandedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"toggleExpand":[{"__symbolic":"method"}]}}}}] |
@@ -5,2 +5,3 @@ import { Directive, Input } from '@angular/core'; | ||
import { isPresent } from './utils'; | ||
import { isExpanded as defaultExpanded } from './default-callbacks'; | ||
import { Observable } from 'rxjs/Observable'; | ||
@@ -39,2 +40,5 @@ import 'rxjs/add/observable/of'; | ||
this.treeView.hasChildren = function (item) { return _this.childrenField in item; }; | ||
if (this.treeView.isExpanded !== defaultExpanded) { | ||
this.treeView.expandIcons = true; | ||
} | ||
} | ||
@@ -41,0 +45,0 @@ }; |
export { TreeViewComponent } from './treeview.component'; | ||
export { TreeViewModule } from './treeview.module'; | ||
export { NodeTemplateDirective } from './node-template.directive'; | ||
export { CheckDirective } from './check.directive'; | ||
export { ExpandDirective } from './expand.directive'; | ||
export { SelectDirective } from './selection/select.directive'; | ||
export { SelectionMode } from './selection/selection-mode'; | ||
export { SelectionSettings } from './selection/selection-settings'; | ||
export { SelectableSettings } from './selection/selectable-settings'; | ||
export { CheckableSettings } from './checkable-settings'; | ||
export { CheckedState } from './checkbox/checked-state'; | ||
export { HierarchyBindingDirective } from './hierarchy-binding.directive'; | ||
export { FlatDataBindingDirective } from './flat-binding.directive'; |
export { TreeViewComponent } from './treeview.component'; | ||
export { TreeViewModule } from './treeview.module'; | ||
export { NodeTemplateDirective } from './node-template.directive'; | ||
export { CheckDirective } from './check.directive'; | ||
export { ExpandDirective } from './expand.directive'; | ||
@@ -5,0 +6,0 @@ export { SelectDirective } from './selection/select.directive'; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./treeview.component","export":["TreeViewComponent"]},{"from":"./treeview.module","export":["TreeViewModule"]},{"from":"./node-template.directive","export":["NodeTemplateDirective"]},{"from":"./expand.directive","export":["ExpandDirective"]},{"from":"./selection/select.directive","export":["SelectDirective"]},{"from":"./selection/selection-mode","export":["SelectionMode"]},{"from":"./selection/selection-settings","export":["SelectionSettings"]},{"from":"./hierarchy-binding.directive","export":["HierarchyBindingDirective"]},{"from":"./flat-binding.directive","export":["FlatDataBindingDirective"]}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./treeview.component","export":["TreeViewComponent"]},{"from":"./treeview.module","export":["TreeViewModule"]},{"from":"./node-template.directive","export":["NodeTemplateDirective"]},{"from":"./expand.directive","export":["ExpandDirective"]},{"from":"./selection/select.directive","export":["SelectDirective"]},{"from":"./selection/selection-mode","export":["SelectionMode"]},{"from":"./selection/selection-settings","export":["SelectionSettings"]},{"from":"./hierarchy-binding.directive","export":["HierarchyBindingDirective"]},{"from":"./flat-binding.directive","export":["FlatDataBindingDirective"]}]}] | ||
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./treeview.component","export":["TreeViewComponent"]},{"from":"./treeview.module","export":["TreeViewModule"]},{"from":"./node-template.directive","export":["NodeTemplateDirective"]},{"from":"./check.directive","export":["CheckDirective"]},{"from":"./expand.directive","export":["ExpandDirective"]},{"from":"./selection/select.directive","export":["SelectDirective"]},{"from":"./selection/selectable-settings","export":["SelectableSettings"]},{"from":"./checkable-settings","export":["CheckableSettings"]},{"from":"./checkbox/checked-state","export":["CheckedState"]},{"from":"./hierarchy-binding.directive","export":["HierarchyBindingDirective"]},{"from":"./flat-binding.directive","export":["FlatDataBindingDirective"]}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./treeview.component","export":["TreeViewComponent"]},{"from":"./treeview.module","export":["TreeViewModule"]},{"from":"./node-template.directive","export":["NodeTemplateDirective"]},{"from":"./check.directive","export":["CheckDirective"]},{"from":"./expand.directive","export":["ExpandDirective"]},{"from":"./selection/select.directive","export":["SelectDirective"]},{"from":"./selection/selectable-settings","export":["SelectableSettings"]},{"from":"./checkable-settings","export":["CheckableSettings"]},{"from":"./checkbox/checked-state","export":["CheckedState"]},{"from":"./hierarchy-binding.directive","export":["HierarchyBindingDirective"]},{"from":"./flat-binding.directive","export":["FlatDataBindingDirective"]}]}] |
@@ -11,3 +11,5 @@ import { NavigationItem } from './navigation-item.interface'; | ||
readonly moves: Subject<NavigationState>; | ||
readonly checks: Subject<string>; | ||
readonly selects: Subject<string>; | ||
navigable: boolean; | ||
model: NavigationModel; | ||
@@ -27,2 +29,3 @@ actions: { | ||
deactivate(): void; | ||
checkIndex(index: string): void; | ||
selectIndex(index: string): void; | ||
@@ -37,3 +40,2 @@ isActive(index: string): boolean; | ||
private moveToChild(); | ||
private selectActiveItem(); | ||
private notifyExpand(expand); | ||
@@ -40,0 +42,0 @@ private notifyMove(); |
import { Injectable } from '@angular/core'; | ||
import { NavigationModel } from './navigation-model'; | ||
import { nodeIndex } from '../utils'; | ||
import { Keys } from './keys'; | ||
import { Subject } from "rxjs/Subject"; | ||
import { Keys } from './keys'; | ||
var itemIndex = function (item) { return (item || {}).index; }; | ||
var sibling = function (item, direction) { return item[direction] || item; }; | ||
@@ -15,3 +15,5 @@ /** | ||
this.moves = new Subject(); | ||
this.checks = new Subject(); | ||
this.selects = new Subject(); | ||
this.navigable = true; | ||
this.actions = (_a = {}, | ||
@@ -24,4 +26,4 @@ _a[Keys.up] = function () { return _this.activate(sibling(_this.focusableItem, 'prev')); }, | ||
_a[Keys.end] = function () { return _this.activate(_this.model.lastNode()); }, | ||
_a[Keys.enter] = function () { return _this.selectActiveItem(); }, | ||
_a[Keys.space] = function () { return _this.selectActiveItem(); }, | ||
_a[Keys.enter] = function () { return _this.navigable && _this.selectIndex(nodeIndex(_this.activeItem)); }, | ||
_a[Keys.space] = function () { return _this.navigable && _this.checkIndex(nodeIndex(_this.activeItem)); }, | ||
_a); | ||
@@ -44,3 +46,3 @@ this.isFocused = false; | ||
get: function () { | ||
return itemIndex(this.activeItem) || null; | ||
return nodeIndex(this.activeItem) || null; | ||
}, | ||
@@ -65,3 +67,3 @@ enumerable: true, | ||
NavigationService.prototype.activate = function (item) { | ||
if (!item || this.isActive(itemIndex(item))) { | ||
if (!this.navigable || !item || this.isActive(nodeIndex(item))) { | ||
return; | ||
@@ -77,6 +79,9 @@ } | ||
NavigationService.prototype.activateIndex = function (index) { | ||
if (!index) { | ||
return; | ||
} | ||
this.activate(this.model.findNode(index)); | ||
}; | ||
NavigationService.prototype.deactivate = function () { | ||
if (!this.isFocused) { | ||
if (!this.navigable || !this.isFocused) { | ||
return; | ||
@@ -87,6 +92,6 @@ } | ||
}; | ||
NavigationService.prototype.checkIndex = function (index) { | ||
this.checks.next(index); | ||
}; | ||
NavigationService.prototype.selectIndex = function (index) { | ||
if (!this.isActive(index)) { | ||
return; | ||
} | ||
this.selects.next(index); | ||
@@ -101,3 +106,3 @@ }; | ||
NavigationService.prototype.isFocusable = function (index) { | ||
return itemIndex(this.focusableItem) === index; | ||
return nodeIndex(this.focusableItem) === index; | ||
}; | ||
@@ -114,2 +119,5 @@ NavigationService.prototype.registerItem = function (index) { | ||
NavigationService.prototype.move = function (e) { | ||
if (!this.navigable) { | ||
return; | ||
} | ||
var moveAction = this.actions[e.keyCode]; | ||
@@ -124,3 +132,3 @@ if (!moveAction) { | ||
var expand = _a.expand, intercept = _a.intercept; | ||
var index = itemIndex(this.activeItem); | ||
var index = nodeIndex(this.activeItem); | ||
if (!index || intercept(index)) { | ||
@@ -135,3 +143,3 @@ return; | ||
} | ||
this.activate(this.model.findParent(itemIndex(this.activeItem))); | ||
this.activate(this.model.findParent(nodeIndex(this.activeItem))); | ||
return true; | ||
@@ -143,8 +151,5 @@ }; | ||
} | ||
this.activate(this.model.findChild(itemIndex(this.activeItem))); | ||
this.activate(this.model.findChild(nodeIndex(this.activeItem))); | ||
return true; | ||
}; | ||
NavigationService.prototype.selectActiveItem = function () { | ||
this.selectIndex(itemIndex(this.activeItem)); | ||
}; | ||
NavigationService.prototype.notifyExpand = function (expand) { | ||
@@ -158,3 +163,3 @@ this.expands.next(this.navigationState(expand)); | ||
if (expand === void 0) { expand = false; } | ||
return ({ expand: expand, index: itemIndex(this.activeItem), isFocused: this.isFocused }); | ||
return ({ expand: expand, index: nodeIndex(this.activeItem), isFocused: this.isFocused }); | ||
}; | ||
@@ -161,0 +166,0 @@ NavigationService.decorators = [ |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"NavigationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"activate":[{"__symbolic":"method"}],"activateParent":[{"__symbolic":"method"}],"activateIndex":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"selectIndex":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"registerItem":[{"__symbolic":"method"}],"unregisterItem":[{"__symbolic":"method"}],"move":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"moveToParent":[{"__symbolic":"method"}],"moveToChild":[{"__symbolic":"method"}],"selectActiveItem":[{"__symbolic":"method"}],"notifyExpand":[{"__symbolic":"method"}],"notifyMove":[{"__symbolic":"method"}],"navigationState":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"NavigationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"activate":[{"__symbolic":"method"}],"activateParent":[{"__symbolic":"method"}],"activateIndex":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"selectIndex":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"registerItem":[{"__symbolic":"method"}],"unregisterItem":[{"__symbolic":"method"}],"move":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"moveToParent":[{"__symbolic":"method"}],"moveToChild":[{"__symbolic":"method"}],"selectActiveItem":[{"__symbolic":"method"}],"notifyExpand":[{"__symbolic":"method"}],"notifyMove":[{"__symbolic":"method"}],"navigationState":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"NavigationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"activate":[{"__symbolic":"method"}],"activateParent":[{"__symbolic":"method"}],"activateIndex":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"checkIndex":[{"__symbolic":"method"}],"selectIndex":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"registerItem":[{"__symbolic":"method"}],"unregisterItem":[{"__symbolic":"method"}],"move":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"moveToParent":[{"__symbolic":"method"}],"moveToChild":[{"__symbolic":"method"}],"notifyExpand":[{"__symbolic":"method"}],"notifyMove":[{"__symbolic":"method"}],"navigationState":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"NavigationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"activate":[{"__symbolic":"method"}],"activateParent":[{"__symbolic":"method"}],"activateIndex":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"checkIndex":[{"__symbolic":"method"}],"selectIndex":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"registerItem":[{"__symbolic":"method"}],"unregisterItem":[{"__symbolic":"method"}],"move":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"moveToParent":[{"__symbolic":"method"}],"moveToChild":[{"__symbolic":"method"}],"notifyExpand":[{"__symbolic":"method"}],"notifyMove":[{"__symbolic":"method"}],"navigationState":[{"__symbolic":"method"}]}}}}] |
@@ -18,3 +18,3 @@ import { TemplateRef } from "@angular/core"; | ||
* [nodes]="data" | ||
* kendoTreeViewExpandBy | ||
* kendoTreeViewExpandable | ||
* | ||
@@ -21,0 +21,0 @@ * kendoTreeViewHierarchyBinding |
@@ -18,3 +18,3 @@ import { Optional, Directive, TemplateRef } from "@angular/core"; | ||
* [nodes]="data" | ||
* kendoTreeViewExpandBy | ||
* kendoTreeViewExpandable | ||
* | ||
@@ -21,0 +21,0 @@ * kendoTreeViewHierarchyBinding |
import { OnDestroy, OnInit, EventEmitter } from '@angular/core'; | ||
import { TreeViewComponent } from '../treeview.component'; | ||
import { SelectionSettings } from './selection-settings'; | ||
import { SelectableSettings } from './selectable-settings'; | ||
import { Subscription } from 'rxjs/Subscription'; | ||
@@ -8,3 +8,3 @@ import 'rxjs/add/observable/merge'; | ||
/** | ||
* A directive which manages the node in-memory selection state of the TreeView. | ||
* A directive which manages the in-memory selection state of the TreeView node. | ||
*/ | ||
@@ -27,3 +27,3 @@ export declare class SelectDirective implements OnInit, OnDestroy { | ||
*/ | ||
selection: boolean | SelectionSettings; | ||
selection: boolean | SelectableSettings; | ||
/** | ||
@@ -46,5 +46,5 @@ * Defines the collection that will store the selected keys. | ||
protected select(e: any): void; | ||
protected selectSingle(e: any): void; | ||
protected selectMultiple(e: any): void; | ||
protected notify(): void; | ||
protected selectSingle(node: any): void; | ||
protected selectMultiple(node: any): void; | ||
private notify(); | ||
} |
@@ -8,3 +8,3 @@ import { Directive, HostBinding, Input, Output, EventEmitter } from '@angular/core'; | ||
/** | ||
* A directive which manages the node in-memory selection state of the TreeView. | ||
* A directive which manages the in-memory selection state of the TreeView node. | ||
*/ | ||
@@ -49,3 +49,2 @@ var SelectDirective = (function () { | ||
var defaultOptions = { | ||
checkboxOnly: false, | ||
enabled: true, | ||
@@ -66,7 +65,4 @@ mode: "single" | ||
var _this = this; | ||
this.subscriptions.add(this.treeView.selectionChange | ||
.subscribe(this.select.bind(this))); | ||
this.treeView.isSelected = function (dataItem, index) { | ||
return _this.selectedKeys.indexOf(_this.itemKey({ dataItem: dataItem, index: index })) > -1; | ||
}; | ||
this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this))); | ||
this.treeView.isSelected = function (dataItem, index) { return (_this.selectedKeys.indexOf(_this.itemKey({ dataItem: dataItem, index: index })) > -1); }; | ||
}; | ||
@@ -95,4 +91,4 @@ SelectDirective.prototype.ngOnDestroy = function () { | ||
}; | ||
SelectDirective.prototype.selectSingle = function (e) { | ||
var key = this.itemKey(e); | ||
SelectDirective.prototype.selectSingle = function (node) { | ||
var key = this.itemKey(node); | ||
if (this.selectedKeys[0] === key) { | ||
@@ -104,9 +100,10 @@ return; | ||
}; | ||
SelectDirective.prototype.selectMultiple = function (e) { | ||
var key = this.itemKey(e); | ||
SelectDirective.prototype.selectMultiple = function (node) { | ||
var key = this.itemKey(node); | ||
var idx = this.selectedKeys.indexOf(key); | ||
var isSelected = idx > -1; | ||
if (!isPresent(key)) { | ||
return; | ||
} | ||
if (idx > -1) { | ||
if (isSelected) { | ||
this.selectedKeys.splice(idx, 1); | ||
@@ -120,6 +117,6 @@ } | ||
SelectDirective.prototype.notify = function () { | ||
this.selectedKeysChange.emit(this.selectedKeys); | ||
this.selectedKeysChange.emit(this.selectedKeys.slice()); | ||
}; | ||
SelectDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewSelectBy]' },] }, | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewSelectable]' },] }, | ||
]; | ||
@@ -132,4 +129,4 @@ /** @nocollapse */ | ||
'isSelected': [{ type: Input },], | ||
'selectKey': [{ type: Input, args: ["kendoTreeViewSelectBy",] },], | ||
'selection': [{ type: Input },], | ||
'selectKey': [{ type: Input, args: ["selectBy",] },], | ||
'selection': [{ type: Input, args: ["kendoTreeViewSelectable",] },], | ||
'selectedKeys': [{ type: Input },], | ||
@@ -136,0 +133,0 @@ 'selectedKeysChange': [{ type: Output },], |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"SelectDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewSelectBy]"}]}],"members":{"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewSelectBy"]}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"getAriaMultiselectable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.aria-multiselectable"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"selectSingle":[{"__symbolic":"method"}],"selectMultiple":[{"__symbolic":"method"}],"notify":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"SelectDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewSelectBy]"}]}],"members":{"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewSelectBy"]}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"getAriaMultiselectable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.aria-multiselectable"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"selectSingle":[{"__symbolic":"method"}],"selectMultiple":[{"__symbolic":"method"}],"notify":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"SelectDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewSelectable]"}]}],"members":{"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["selectBy"]}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewSelectable"]}]}],"selectedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"getAriaMultiselectable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.aria-multiselectable"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"selectSingle":[{"__symbolic":"method"}],"selectMultiple":[{"__symbolic":"method"}],"notify":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"SelectDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewSelectable]"}]}],"members":{"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["selectBy"]}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewSelectable"]}]}],"selectedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"getAriaMultiselectable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.aria-multiselectable"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"selectSingle":[{"__symbolic":"method"}],"selectMultiple":[{"__symbolic":"method"}],"notify":[{"__symbolic":"method"}]}}}}] |
@@ -5,3 +5,3 @@ /** | ||
* @example | ||
* ```ts-preview | ||
* ```ts | ||
* | ||
@@ -13,6 +13,7 @@ * _@Component({ | ||
* [nodes]="data" | ||
* kendoTreeViewExpandBy | ||
* kendoTreeViewSelectBy | ||
* | ||
* [kendoTreeViewSelectable]="{ mode: 'multiple' }" | ||
* | ||
* kendoTreeViewExpandable | ||
* kendoTreeViewHierarchyBinding | ||
* [selection]="{ mode: 'multiple' }" | ||
* [childrenField]="'items'" | ||
@@ -22,2 +23,3 @@ * [textField]="'text'" | ||
* </kendo-treeview> | ||
* <i>Press ENTER key or use mouse click to select an item</i> | ||
* ` | ||
@@ -24,0 +26,0 @@ * }) |
@@ -6,2 +6,3 @@ import { NgModule } from '@angular/core'; | ||
import { NodeTemplateDirective } from './node-template.directive'; | ||
import { CheckDirective } from './check.directive'; | ||
import { ExpandDirective } from './expand.directive'; | ||
@@ -14,2 +15,3 @@ import { SelectDirective } from './selection/select.directive'; | ||
import { TreeViewItemContentDirective } from './treeview-item-content.directive'; | ||
import { CheckBoxModule } from './checkbox/checkbox.module'; | ||
var COMPONENT_DIRECTIVES = [ | ||
@@ -21,2 +23,3 @@ TreeViewComponent, | ||
NodeTemplateDirective, | ||
CheckDirective, | ||
ExpandDirective, | ||
@@ -38,3 +41,3 @@ SelectDirective, | ||
exports: [COMPONENT_DIRECTIVES], | ||
imports: [CommonModule] | ||
imports: [CommonModule, CheckBoxModule] | ||
},] }, | ||
@@ -41,0 +44,0 @@ ]; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"SharedModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"SharedModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}]}]}]}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"SharedModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"./checkbox/checkbox.module","name":"CheckBoxModule"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"SharedModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"./checkbox/checkbox.module","name":"CheckBoxModule"}]}]}]}}}] |
@@ -1,5 +0,8 @@ | ||
import { ChangeDetectorRef, TemplateRef, OnInit, OnDestroy } from '@angular/core'; | ||
import { ChangeDetectorRef, TemplateRef, OnChanges, OnInit, OnDestroy } from '@angular/core'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
import { IndexBuilderService } from './index-builder.service'; | ||
import { TreeViewLookupService } from './treeview-lookup.service'; | ||
import { NavigationService } from './navigation/navigation.service'; | ||
import { LoadingNotificationService } from './loading-notification.service'; | ||
import { CheckedState } from './checkbox/checked-state'; | ||
import { Observable } from 'rxjs/Observable'; | ||
@@ -13,22 +16,30 @@ import "rxjs/add/operator/do"; | ||
*/ | ||
export declare class TreeViewGroupComponent implements OnInit, OnDestroy { | ||
export declare class TreeViewGroupComponent implements OnChanges, OnInit, OnDestroy { | ||
protected expandService: ExpandStateService; | ||
protected loadingService: LoadingNotificationService; | ||
protected indexBuilder: IndexBuilderService; | ||
protected treeViewLookupService: TreeViewLookupService; | ||
protected navigationService: NavigationService; | ||
protected cd: ChangeDetectorRef; | ||
kGroupClass: boolean; | ||
readonly role: string; | ||
checkboxes: boolean; | ||
expandIcons: boolean; | ||
nodes: Observable<any[]>; | ||
textField: string | string[]; | ||
parentDataItem: any; | ||
parentIndex: string; | ||
nodeTemplateRef: TemplateRef<any>; | ||
data: any[]; | ||
private _data; | ||
private subscription; | ||
constructor(expandService: ExpandStateService, loadingService: LoadingNotificationService, indexBuilder: IndexBuilderService, cd: ChangeDetectorRef); | ||
hasChildren: <T>(item: T) => boolean; | ||
constructor(expandService: ExpandStateService, loadingService: LoadingNotificationService, indexBuilder: IndexBuilderService, treeViewLookupService: TreeViewLookupService, navigationService: NavigationService, cd: ChangeDetectorRef); | ||
isChecked: <T>(item: T, index: string) => CheckedState; | ||
isExpanded: <T>(item: T, index: string) => boolean; | ||
isSelected: <T>(item: T, index: string) => boolean; | ||
children: <T>(item: T) => Observable<any[]>; | ||
hasChildren: <T>(item: T) => boolean; | ||
readonly hasTemplate: boolean; | ||
expandNode(index: string, dataItem: any, expand: boolean): void; | ||
checkNode(index: string): void; | ||
nodeIndex(index: number): string; | ||
@@ -38,4 +49,7 @@ nodeText(dataItem: any): any; | ||
ngOnInit(): void; | ||
ngOnChanges(changes: any): void; | ||
fetchChildren(node: any, index: string): Observable<any>; | ||
readonly nextFields: string[]; | ||
private updateParentChildren(); | ||
private mapToTreeItem(data); | ||
} |
@@ -5,2 +5,4 @@ import { Component, ChangeDetectorRef, HostBinding, Input } from '@angular/core'; | ||
import { IndexBuilderService } from './index-builder.service'; | ||
import { TreeViewLookupService } from './treeview-lookup.service'; | ||
import { NavigationService } from './navigation/navigation.service'; | ||
import { isPresent, isArray } from './utils'; | ||
@@ -18,14 +20,17 @@ import { getter } from './accessor'; | ||
var TreeViewGroupComponent = (function () { | ||
function TreeViewGroupComponent(expandService, loadingService, indexBuilder, cd) { | ||
function TreeViewGroupComponent(expandService, loadingService, indexBuilder, treeViewLookupService, navigationService, cd) { | ||
this.expandService = expandService; | ||
this.loadingService = loadingService; | ||
this.indexBuilder = indexBuilder; | ||
this.treeViewLookupService = treeViewLookupService; | ||
this.navigationService = navigationService; | ||
this.cd = cd; | ||
this.kGroupClass = true; | ||
this.textField = ""; | ||
this.data = []; | ||
this.hasChildren = function () { return false; }; | ||
this._data = []; | ||
this.isChecked = function () { return 'none'; }; | ||
this.isExpanded = function () { return false; }; | ||
this.isSelected = function () { return false; }; | ||
this.children = function () { return Observable.of([]); }; | ||
this.hasChildren = function () { return false; }; | ||
} | ||
@@ -37,2 +42,13 @@ Object.defineProperty(TreeViewGroupComponent.prototype, "role", { | ||
}); | ||
Object.defineProperty(TreeViewGroupComponent.prototype, "data", { | ||
get: function () { | ||
return this._data; | ||
}, | ||
set: function (data) { | ||
this._data = data; | ||
this.updateParentChildren(); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewGroupComponent.prototype, "hasTemplate", { | ||
@@ -53,2 +69,6 @@ get: function () { | ||
}; | ||
TreeViewGroupComponent.prototype.checkNode = function (index) { | ||
this.navigationService.checkIndex(index); | ||
this.navigationService.activateIndex(index); | ||
}; | ||
TreeViewGroupComponent.prototype.nodeIndex = function (index) { | ||
@@ -70,2 +90,7 @@ return this.indexBuilder.nodeIndex(index.toString(), this.parentIndex); | ||
}; | ||
TreeViewGroupComponent.prototype.ngOnChanges = function (changes) { | ||
if (changes.parentIndex) { | ||
this.updateParentChildren(); | ||
} | ||
}; | ||
TreeViewGroupComponent.prototype.fetchChildren = function (node, index) { | ||
@@ -90,2 +115,10 @@ var _this = this; | ||
}); | ||
TreeViewGroupComponent.prototype.updateParentChildren = function () { | ||
var children = this.parentIndex ? this.mapToTreeItem(this.data) : []; | ||
this.treeViewLookupService.registerChildren(this.parentIndex, children); | ||
}; | ||
TreeViewGroupComponent.prototype.mapToTreeItem = function (data) { | ||
var _this = this; | ||
return data.map(function (dataItem, idx) { return ({ dataItem: dataItem, index: _this.nodeIndex(idx) }); }); | ||
}; | ||
TreeViewGroupComponent.decorators = [ | ||
@@ -106,3 +139,3 @@ { type: Component, args: [{ | ||
selector: '[kendoTreeViewGroup]', | ||
template: "\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [@toggle]=\"true\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [textField]=\"nextFields\"\n >\n </ul>\n </li>\n " | ||
template: "\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [isChecked]=\"isChecked(node, nodeIndex(index))\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"expandIcons && hasChildren(node)\"\n >\n </span>\n <kendo-checkbox\n *ngIf=\"checkboxes\"\n [checkState]=\"isChecked(node, nodeIndex(index))\"\n (checkStateChange)=\"checkNode(nodeIndex(index))\"\n tabindex=\"-1\"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node, index: nodeIndex(index)}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [parentDataItem]=\"node\"\n [textField]=\"nextFields\"\n [@toggle]=\"true\"\n >\n </ul>\n </li>\n " | ||
},] }, | ||
@@ -115,2 +148,4 @@ ]; | ||
{ type: IndexBuilderService, }, | ||
{ type: TreeViewLookupService, }, | ||
{ type: NavigationService, }, | ||
{ type: ChangeDetectorRef, }, | ||
@@ -121,10 +156,14 @@ ]; }; | ||
'role': [{ type: HostBinding, args: ["attr.role",] },], | ||
'checkboxes': [{ type: Input },], | ||
'expandIcons': [{ type: Input },], | ||
'nodes': [{ type: Input },], | ||
'textField': [{ type: Input },], | ||
'parentDataItem': [{ type: Input },], | ||
'parentIndex': [{ type: Input },], | ||
'nodeTemplateRef': [{ type: Input },], | ||
'hasChildren': [{ type: Input },], | ||
'isChecked': [{ type: Input },], | ||
'isExpanded': [{ type: Input },], | ||
'isSelected': [{ type: Input },], | ||
'children': [{ type: Input },], | ||
'hasChildren': [{ type: Input },], | ||
}; | ||
@@ -131,0 +170,0 @@ return TreeViewGroupComponent; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewGroupComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["toggle",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]}]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]}]}]]}]]}],"selector":"[kendoTreeViewGroup]","template":"\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [@toggle]=\"true\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [textField]=\"nextFields\"\n >\n </ul>\n </li>\n "}]}],"members":{"kGroupClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-group"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandNode":[{"__symbolic":"method"}],"nodeIndex":[{"__symbolic":"method"}],"nodeText":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"fetchChildren":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewGroupComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["toggle",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]}]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]}]}]]}]]}],"selector":"[kendoTreeViewGroup]","template":"\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [@toggle]=\"true\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [textField]=\"nextFields\"\n >\n </ul>\n </li>\n "}]}],"members":{"kGroupClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-group"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandNode":[{"__symbolic":"method"}],"nodeIndex":[{"__symbolic":"method"}],"nodeText":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"fetchChildren":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewGroupComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["toggle",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]}]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]}]}]]}]]}],"selector":"[kendoTreeViewGroup]","template":"\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [isChecked]=\"isChecked(node, nodeIndex(index))\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"expandIcons && hasChildren(node)\"\n >\n </span>\n <kendo-checkbox\n *ngIf=\"checkboxes\"\n [checkState]=\"isChecked(node, nodeIndex(index))\"\n (checkStateChange)=\"checkNode(nodeIndex(index))\"\n tabindex=\"-1\"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node, index: nodeIndex(index)}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [parentDataItem]=\"node\"\n [textField]=\"nextFields\"\n [@toggle]=\"true\"\n >\n </ul>\n </li>\n "}]}],"members":{"kGroupClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-group"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"checkboxes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandIcons":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandNode":[{"__symbolic":"method"}],"checkNode":[{"__symbolic":"method"}],"nodeIndex":[{"__symbolic":"method"}],"nodeText":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"fetchChildren":[{"__symbolic":"method"}],"updateParentChildren":[{"__symbolic":"method"}],"mapToTreeItem":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewGroupComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["toggle",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]}]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]}]}]]}]]}],"selector":"[kendoTreeViewGroup]","template":"\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [isChecked]=\"isChecked(node, nodeIndex(index))\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"expandIcons && hasChildren(node)\"\n >\n </span>\n <kendo-checkbox\n *ngIf=\"checkboxes\"\n [checkState]=\"isChecked(node, nodeIndex(index))\"\n (checkStateChange)=\"checkNode(nodeIndex(index))\"\n tabindex=\"-1\"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node, index: nodeIndex(index)}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [parentDataItem]=\"node\"\n [textField]=\"nextFields\"\n [@toggle]=\"true\"\n >\n </ul>\n </li>\n "}]}],"members":{"kGroupClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-group"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"checkboxes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandIcons":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandNode":[{"__symbolic":"method"}],"checkNode":[{"__symbolic":"method"}],"nodeIndex":[{"__symbolic":"method"}],"nodeText":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"fetchChildren":[{"__symbolic":"method"}],"updateParentChildren":[{"__symbolic":"method"}],"mapToTreeItem":[{"__symbolic":"method"}]}}}}] |
@@ -6,2 +6,5 @@ import { ElementRef, OnChanges, OnDestroy, OnInit, Renderer2 } from '@angular/core'; | ||
import { IndexBuilderService } from './index-builder.service'; | ||
import { TreeViewLookupService } from './treeview-lookup.service'; | ||
import { TreeItem } from './treeitem.interface'; | ||
import { CheckedState } from './checkbox/checked-state'; | ||
import 'rxjs/add/operator/filter'; | ||
@@ -18,2 +21,3 @@ /** | ||
private selectionService; | ||
private lookupService; | ||
private renderer; | ||
@@ -23,4 +27,10 @@ private ib; | ||
index: string; | ||
parentDataItem: any; | ||
parentIndex: string; | ||
isChecked: CheckedState; | ||
isExpanded: boolean; | ||
isSelected: boolean; | ||
readonly treeItem: TreeItem; | ||
readonly parentTreeItem: TreeItem; | ||
ariaChecked: string; | ||
private _isExpanded; | ||
@@ -30,3 +40,3 @@ private _isSelected; | ||
private subscriptions; | ||
constructor(element: ElementRef, expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, renderer: Renderer2, ib: IndexBuilderService); | ||
constructor(element: ElementRef, expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, lookupService: TreeViewLookupService, renderer: Renderer2, ib: IndexBuilderService); | ||
ngOnInit(): void; | ||
@@ -40,3 +50,4 @@ ngOnChanges(changes: any): void; | ||
private focusItem(); | ||
private moveNode(change?); | ||
private moveLookupItem(changes?); | ||
private moveNavigationItem(change?); | ||
private setAriaAttributes(); | ||
@@ -43,0 +54,0 @@ private updateTabIndex(); |
@@ -6,4 +6,6 @@ import { Directive, ElementRef, Input, Renderer2 } from '@angular/core'; | ||
import { IndexBuilderService } from './index-builder.service'; | ||
import { TreeViewLookupService } from './treeview-lookup.service'; | ||
import { isPresent } from './utils'; | ||
import 'rxjs/add/operator/filter'; | ||
var buildItem = function (index, dataItem) { return ({ dataItem: dataItem, index: index }); }; | ||
/** | ||
@@ -15,3 +17,3 @@ * @hidden | ||
var TreeViewItemDirective = (function () { | ||
function TreeViewItemDirective(element, expandService, navigationService, selectionService, renderer, ib) { | ||
function TreeViewItemDirective(element, expandService, navigationService, selectionService, lookupService, renderer, ib) { | ||
this.element = element; | ||
@@ -21,4 +23,6 @@ this.expandService = expandService; | ||
this.selectionService = selectionService; | ||
this.lookupService = lookupService; | ||
this.renderer = renderer; | ||
this.ib = ib; | ||
this.ariaChecked = 'false'; | ||
this.isInitialized = false; | ||
@@ -28,2 +32,17 @@ this.subscriptions = []; | ||
} | ||
Object.defineProperty(TreeViewItemDirective.prototype, "isChecked", { | ||
set: function (checked) { | ||
if (checked === 'checked') { | ||
this.ariaChecked = 'true'; | ||
} | ||
else if (checked === 'indeterminate') { | ||
this.ariaChecked = 'mixed'; | ||
} | ||
else { | ||
this.ariaChecked = 'false'; | ||
} | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewItemDirective.prototype, "isExpanded", { | ||
@@ -49,4 +68,19 @@ get: function () { | ||
}); | ||
Object.defineProperty(TreeViewItemDirective.prototype, "treeItem", { | ||
get: function () { | ||
return buildItem(this.index, this.dataItem); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewItemDirective.prototype, "parentTreeItem", { | ||
get: function () { | ||
return this.parentDataItem ? buildItem(this.parentIndex, this.parentDataItem) : null; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
TreeViewItemDirective.prototype.ngOnInit = function () { | ||
this.navigationService.registerItem(this.index); | ||
this.lookupService.registerItem(this.treeItem, this.parentTreeItem); | ||
this.activateItem(); | ||
@@ -60,6 +94,7 @@ this.isInitialized = true; | ||
var indexChange = changes.index; | ||
if (indexChange || changes.isExpanded || changes.isSelected) { | ||
if (indexChange || changes.isChecked || changes.isExpanded || changes.isSelected) { | ||
this.setAriaAttributes(); | ||
} | ||
this.moveNode(indexChange); | ||
this.moveLookupItem(changes); | ||
this.moveNavigationItem(indexChange); | ||
}; | ||
@@ -110,3 +145,15 @@ TreeViewItemDirective.prototype.ngOnDestroy = function () { | ||
}; | ||
TreeViewItemDirective.prototype.moveNode = function (change) { | ||
TreeViewItemDirective.prototype.moveLookupItem = function (changes) { | ||
if (changes === void 0) { changes = {}; } | ||
var dataItem = changes.dataItem, index = changes.index, parentDataItem = changes.parentDataItem, parentIndex = changes.parentIndex; | ||
if (index && index.firstChange && !this.lookupService.hasItem(this.index)) { | ||
return; | ||
} //skip first change | ||
if (!dataItem && !index && !parentDataItem && !parentIndex) { | ||
return; | ||
} | ||
var oldIndex = (index || {}).previousValue || this.index; | ||
this.lookupService.replaceItem(oldIndex, this.treeItem, this.parentTreeItem); | ||
}; | ||
TreeViewItemDirective.prototype.moveNavigationItem = function (change) { | ||
if (change === void 0) { change = {}; } | ||
@@ -124,2 +171,3 @@ var currentValue = change.currentValue, firstChange = change.firstChange, previousValue = change.previousValue; | ||
this.setAttribute('aria-selected', this.isSelected.toString()); | ||
this.setAttribute('aria-checked', this.ariaChecked); | ||
}; | ||
@@ -141,2 +189,3 @@ TreeViewItemDirective.prototype.updateTabIndex = function () { | ||
{ type: SelectionService, }, | ||
{ type: TreeViewLookupService, }, | ||
{ type: Renderer2, }, | ||
@@ -148,2 +197,5 @@ { type: IndexBuilderService, }, | ||
'index': [{ type: Input },], | ||
'parentDataItem': [{ type: Input },], | ||
'parentIndex': [{ type: Input },], | ||
'isChecked': [{ type: Input },], | ||
'isExpanded': [{ type: Input },], | ||
@@ -150,0 +202,0 @@ 'isSelected': [{ type: Input },], |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveNode":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveNode":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}}] |
@@ -1,2 +0,2 @@ | ||
import { EventEmitter, OnInit, OnDestroy } from '@angular/core'; | ||
import { ElementRef, EventEmitter, OnChanges, OnInit, OnDestroy } from '@angular/core'; | ||
import { NodeTemplateDirective } from './node-template.directive'; | ||
@@ -6,2 +6,6 @@ import { ExpandStateService } from './expand-state.service'; | ||
import { SelectionService } from './selection/selection.service'; | ||
import { TreeViewLookupService } from './treeview-lookup.service'; | ||
import { CheckedState } from './checkbox/checked-state'; | ||
import { TreeItemLookup } from './treeitem-lookup.interface'; | ||
import { TreeItem } from './treeitem.interface'; | ||
import { Subscription } from 'rxjs/Subscription'; | ||
@@ -18,3 +22,3 @@ import { Subject } from 'rxjs/Subject'; | ||
* | ||
* @Component({ | ||
* _@Component({ | ||
* selector: 'my-app', | ||
@@ -25,3 +29,5 @@ * template: ` | ||
* textField="text" | ||
* kendoTreeViewExpandBy | ||
* kendoTreeViewCheckable | ||
* kendoTreeViewExpandable | ||
* kendoTreeViewSelectable | ||
* | ||
@@ -54,6 +60,8 @@ * kendoTreeViewHierarchyBinding | ||
*/ | ||
export declare class TreeViewComponent implements OnInit, OnDestroy { | ||
export declare class TreeViewComponent implements OnChanges, OnInit, OnDestroy { | ||
protected expandService: ExpandStateService; | ||
protected navigationService: NavigationService; | ||
protected selectionService: SelectionService; | ||
protected treeViewLookupService: TreeViewLookupService; | ||
private element; | ||
classNames: boolean; | ||
@@ -74,23 +82,18 @@ readonly role: string; | ||
/** | ||
* Fires when the user expands a tree node. | ||
* Fires when the user expands a TreeView node. | ||
*/ | ||
expand: EventEmitter<{ | ||
index: string; | ||
dataItem: any; | ||
}>; | ||
expand: EventEmitter<TreeItem>; | ||
/** | ||
* Fires when the user collapses a tree node. | ||
* Fires when the user collapses a TreeView node. | ||
*/ | ||
collapse: EventEmitter<{ | ||
index: string; | ||
dataItem: any; | ||
}>; | ||
collapse: EventEmitter<TreeItem>; | ||
/** | ||
* Fires when the user selects a tree node. | ||
* Fires when the user selects a TreeView node checkbox. | ||
*/ | ||
selectionChange: EventEmitter<{ | ||
index: string; | ||
dataItem: any; | ||
}>; | ||
checkedChange: EventEmitter<TreeItemLookup>; | ||
/** | ||
* Fires when the user selects a TreeView node. | ||
*/ | ||
selectionChange: EventEmitter<TreeItem>; | ||
/** | ||
* @hidden | ||
@@ -110,9 +113,45 @@ */ | ||
textField: string | string[]; | ||
/** | ||
* A function which determines if a specific node has child nodes. | ||
*/ | ||
hasChildren: <T>(item: T) => boolean; | ||
/** | ||
* A function which determines if a specific node is selected. | ||
*/ | ||
isChecked: <T>(item: T, index: string) => CheckedState; | ||
/** | ||
* A function which determines if a specific node is expanded. | ||
*/ | ||
isExpanded: <T>(item: T, index: string) => boolean; | ||
/** | ||
* A function which determines if a specific node is selected. | ||
*/ | ||
isSelected: <T>(item: T, index: string) => boolean; | ||
/** | ||
* Determines whether the TreeView keyboard navigable is enabled. | ||
*/ | ||
navigable: boolean; | ||
/** | ||
* @hidden | ||
* Determines whether to render checkbox elements. | ||
*/ | ||
checkboxes: boolean; | ||
/** | ||
* @hidden | ||
* Determines whether to render expand or collapse icons. | ||
*/ | ||
expandIcons: boolean; | ||
isActive: boolean; | ||
data: Subject<any[]>; | ||
protected subscriptions: Subscription; | ||
private _animate; | ||
private _isChecked; | ||
private _isExpanded; | ||
private _isSelected; | ||
private _hasChildren; | ||
private resolvedPromise; | ||
/** | ||
* @hidden | ||
*/ | ||
handleKeydown(e: any): void; | ||
handleKeydown(args: any): void; | ||
/** | ||
@@ -130,21 +169,43 @@ * @hidden | ||
handleFocusout({target}: any): void; | ||
constructor(expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService); | ||
constructor(expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, treeViewLookupService: TreeViewLookupService, element: ElementRef); | ||
ngOnChanges(_: any): void; | ||
ngOnDestroy(): void; | ||
ngOnInit(): void; | ||
/** | ||
* A function which determines if a given node has child nodes. | ||
* A function which provides the child nodes for a given parent node. | ||
*/ | ||
hasChildren: <T>(item: T) => boolean; | ||
children: <T>(item: T) => Observable<any[]>; | ||
/** | ||
* A function which determines if a given node is expanded. | ||
* Blurs the focused TreeView item. | ||
*/ | ||
isExpanded: <T>(item: T, index: string) => boolean; | ||
blur(): void; | ||
/** | ||
* A function which determines if a given node is selected. | ||
* Focuses the first focusable item in the TreeView component if no hierarchical index is provided. | ||
* | ||
* @example | ||
* ```ts | ||
* import { Component } from '@angular/core'; | ||
* | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <button (click)="treeview.focus('1')">Focuses the second node</button> | ||
* <kendo-treeview | ||
* #treeview | ||
* [nodes]="data" | ||
* textField="text" | ||
* > | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { text: "Furniture" }, | ||
* { text: "Decor" } | ||
* ]; | ||
* } | ||
* ``` | ||
*/ | ||
isSelected: <T>(item: T, index: string) => boolean; | ||
/** | ||
* A function which provides the child nodes for a given parent node. | ||
*/ | ||
children: <T>(item: T) => Observable<any[]>; | ||
focus(index?: string): void; | ||
private activateAndEmit(index); | ||
} |
@@ -1,15 +0,18 @@ | ||
import { ChangeDetectionStrategy, Component, HostBinding, HostListener, Input, ContentChild, Output, EventEmitter } from '@angular/core'; | ||
import { ChangeDetectionStrategy, Component, ElementRef, HostBinding, HostListener, Input, ContentChild, Output, EventEmitter } from '@angular/core'; | ||
import { NodeTemplateDirective } from './node-template.directive'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
import { IndexBuilderService } from './index-builder.service'; | ||
import { LoadingNotificationService } from './loading-notification.service'; | ||
import { NavigationService } from './navigation/navigation.service'; | ||
import { SelectionService } from './selection/selection.service'; | ||
import { TreeViewLookupService } from './treeview-lookup.service'; | ||
import { closestNode, focusableNode, isDocumentAvailable, hasActiveNode, nodeId } from './utils'; | ||
import { hasChildren, isChecked, isExpanded, isSelected } from './default-callbacks'; | ||
import { Subscription } from 'rxjs/Subscription'; | ||
import { BehaviorSubject } from 'rxjs/BehaviorSubject'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import { LoadingNotificationService } from './loading-notification.service'; | ||
import { nodeId } from './utils'; | ||
var providers = [ | ||
ExpandStateService, | ||
IndexBuilderService, | ||
TreeViewLookupService, | ||
LoadingNotificationService, | ||
@@ -27,3 +30,3 @@ NavigationService, | ||
* | ||
* @Component({ | ||
* _@Component({ | ||
* selector: 'my-app', | ||
@@ -34,3 +37,5 @@ * template: ` | ||
* textField="text" | ||
* kendoTreeViewExpandBy | ||
* kendoTreeViewCheckable | ||
* kendoTreeViewExpandable | ||
* kendoTreeViewSelectable | ||
* | ||
@@ -64,6 +69,8 @@ * kendoTreeViewHierarchyBinding | ||
var TreeViewComponent = (function () { | ||
function TreeViewComponent(expandService, navigationService, selectionService) { | ||
function TreeViewComponent(expandService, navigationService, selectionService, treeViewLookupService, element) { | ||
this.expandService = expandService; | ||
this.navigationService = navigationService; | ||
this.selectionService = selectionService; | ||
this.treeViewLookupService = treeViewLookupService; | ||
this.element = element; | ||
this.classNames = true; | ||
@@ -79,28 +86,30 @@ /** | ||
/** | ||
* Fires when the user expands a tree node. | ||
* Fires when the user expands a TreeView node. | ||
*/ | ||
this.expand = new EventEmitter(); | ||
/** | ||
* Fires when the user collapses a tree node. | ||
* Fires when the user collapses a TreeView node. | ||
*/ | ||
this.collapse = new EventEmitter(); | ||
/** | ||
* Fires when the user selects a tree node. | ||
* Fires when the user selects a TreeView node checkbox. | ||
*/ | ||
this.selectionChange = new EventEmitter(); | ||
this.data = new BehaviorSubject([]); | ||
this.subscriptions = new Subscription(function () { }); | ||
this._animate = true; | ||
this.checkedChange = new EventEmitter(); | ||
/** | ||
* A function which determines if a given node has child nodes. | ||
* Fires when the user selects a TreeView node. | ||
*/ | ||
this.hasChildren = function () { return false; }; | ||
this.selectionChange = new EventEmitter(); | ||
/** | ||
* A function which determines if a given node is expanded. | ||
* Determines whether the TreeView keyboard navigable is enabled. | ||
*/ | ||
this.isExpanded = function () { return false; }; | ||
this.navigable = true; | ||
/** | ||
* A function which determines if a given node is selected. | ||
* @hidden | ||
* Determines whether to render checkbox elements. | ||
*/ | ||
this.isSelected = function () { return false; }; | ||
this.checkboxes = false; | ||
this.data = new BehaviorSubject([]); | ||
this.subscriptions = new Subscription(function () { }); | ||
this._animate = true; | ||
this.resolvedPromise = Promise.resolve(null); | ||
/** | ||
@@ -139,7 +148,62 @@ * A function which provides the child nodes for a given parent node. | ||
}); | ||
Object.defineProperty(TreeViewComponent.prototype, "hasChildren", { | ||
/** | ||
* A function which determines if a specific node has child nodes. | ||
*/ | ||
get: function () { | ||
return this._hasChildren || hasChildren; | ||
}, | ||
set: function (callback) { | ||
this._hasChildren = callback; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewComponent.prototype, "isChecked", { | ||
/** | ||
* A function which determines if a specific node is selected. | ||
*/ | ||
get: function () { | ||
return this._isChecked || isChecked; | ||
}, | ||
set: function (callback) { | ||
this._isChecked = callback; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewComponent.prototype, "isExpanded", { | ||
/** | ||
* A function which determines if a specific node is expanded. | ||
*/ | ||
get: function () { | ||
return this._isExpanded || isExpanded; | ||
}, | ||
set: function (callback) { | ||
this._isExpanded = callback; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewComponent.prototype, "isSelected", { | ||
/** | ||
* A function which determines if a specific node is selected. | ||
*/ | ||
get: function () { | ||
return this._isSelected || isSelected; | ||
}, | ||
set: function (callback) { | ||
this._isSelected = callback; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleKeydown = function (e) { | ||
this.navigationService.move(e); | ||
TreeViewComponent.prototype.handleKeydown = function (args) { | ||
if (!this.isActive || !hasActiveNode(args.target)) { | ||
return; | ||
} | ||
this.navigationService.move(args); | ||
}; | ||
@@ -150,14 +214,8 @@ /** | ||
TreeViewComponent.prototype.handleFocusin = function (_a) { | ||
var _this = this; | ||
var target = _a.target; | ||
var index = nodeId(target); | ||
if (!index) { | ||
var node = closestNode(target); | ||
if (!hasActiveNode(target, node)) { | ||
return; | ||
} | ||
this.navigationService.activateIndex(index); | ||
Promise.resolve(null).then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.onFocus.emit(); | ||
} | ||
}); | ||
this.activateAndEmit(nodeId(node)); | ||
}; | ||
@@ -169,7 +227,8 @@ /** | ||
var target = _a.target; | ||
this.handleFocusin({ target: target }); | ||
var index = nodeId(target); | ||
if (!index) { | ||
var node = closestNode(target); | ||
var index = nodeId(node); | ||
if (!hasActiveNode(target, node) || !index) { | ||
return; | ||
} | ||
this.activateAndEmit(index); | ||
this.navigationService.selectIndex(index); | ||
@@ -184,5 +243,6 @@ }; | ||
var index = target.getAttribute('data-treeindex'); | ||
Promise.resolve(null).then(function () { | ||
this.resolvedPromise.then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.navigationService.deactivate(); | ||
_this.isActive = false; | ||
_this.onBlur.emit(); | ||
@@ -192,2 +252,7 @@ } | ||
}; | ||
TreeViewComponent.prototype.ngOnChanges = function (_) { | ||
this.checkboxes = Boolean(this._isChecked); | ||
this.expandIcons = Boolean(this._isExpanded && this._hasChildren); | ||
this.navigationService.navigable = Boolean(this.navigable); | ||
}; | ||
TreeViewComponent.prototype.ngOnDestroy = function () { | ||
@@ -205,5 +270,68 @@ this.subscriptions.unsubscribe(); | ||
})); | ||
this.subscriptions.add(this.navigationService.checks | ||
.subscribe(function (x) { | ||
return _this.checkedChange.emit(_this.treeViewLookupService.itemLookup(x)); | ||
})); | ||
this.subscriptions.add(this.selectionService.changes | ||
.subscribe(function (x) { return _this.selectionChange.emit(x); })); | ||
}; | ||
/** | ||
* Blurs the focused TreeView item. | ||
*/ | ||
TreeViewComponent.prototype.blur = function () { | ||
if (!isDocumentAvailable()) { | ||
return; | ||
} | ||
var target = focusableNode(this.element); | ||
if (document.activeElement === target) { | ||
target.blur(); | ||
} | ||
}; | ||
/** | ||
* Focuses the first focusable item in the TreeView component if no hierarchical index is provided. | ||
* | ||
* @example | ||
* ```ts | ||
* import { Component } from '@angular/core'; | ||
* | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <button (click)="treeview.focus('1')">Focuses the second node</button> | ||
* <kendo-treeview | ||
* #treeview | ||
* [nodes]="data" | ||
* textField="text" | ||
* > | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { text: "Furniture" }, | ||
* { text: "Decor" } | ||
* ]; | ||
* } | ||
* ``` | ||
*/ | ||
TreeViewComponent.prototype.focus = function (index) { | ||
this.navigationService.activateIndex(index); | ||
var target = focusableNode(this.element); | ||
if (target) { | ||
target.focus(); | ||
} | ||
}; | ||
TreeViewComponent.prototype.activateAndEmit = function (index) { | ||
var _this = this; | ||
if (!index) { | ||
return; | ||
} | ||
this.navigationService.activateIndex(index); | ||
this.resolvedPromise.then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.isActive = true; | ||
_this.onFocus.emit(); | ||
} | ||
}); | ||
}; | ||
TreeViewComponent.decorators = [ | ||
@@ -215,3 +343,3 @@ { type: Component, args: [{ | ||
selector: 'kendo-treeview', | ||
template: "\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n " | ||
template: "\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n " | ||
},] }, | ||
@@ -224,2 +352,4 @@ ]; | ||
{ type: SelectionService, }, | ||
{ type: TreeViewLookupService, }, | ||
{ type: ElementRef, }, | ||
]; }; | ||
@@ -234,2 +364,3 @@ TreeViewComponent.propDecorators = { | ||
'collapse': [{ type: Output },], | ||
'checkedChange': [{ type: Output },], | ||
'selectionChange': [{ type: Output },], | ||
@@ -239,2 +370,7 @@ 'nodeTemplate': [{ type: ContentChild, args: [NodeTemplateDirective,] },], | ||
'textField': [{ type: Input },], | ||
'hasChildren': [{ type: Input },], | ||
'isChecked': [{ type: Input },], | ||
'isExpanded': [{ type: Input },], | ||
'isSelected': [{ type: Input },], | ||
'navigable': [{ type: Input },], | ||
'handleKeydown': [{ type: HostListener, args: ['keydown', ['$event'],] },], | ||
@@ -244,5 +380,2 @@ 'handleFocusin': [{ type: HostListener, args: ['focusin', ['$event'],] },], | ||
'handleFocusout': [{ type: HostListener, args: ['focusout', ['$event'],] },], | ||
'hasChildren': [{ type: Input },], | ||
'isExpanded': [{ type: Input },], | ||
'isSelected': [{ type: Input },], | ||
'children': [{ type: Input },], | ||
@@ -249,0 +382,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"activateAndEmit":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"activateAndEmit":[{"__symbolic":"method"}]}}}}] |
@@ -5,2 +5,3 @@ import { NgModule } from '@angular/core'; | ||
import { NodeTemplateDirective } from './node-template.directive'; | ||
import { CheckDirective } from './check.directive'; | ||
import { ExpandDirective } from './expand.directive'; | ||
@@ -13,2 +14,3 @@ import { SelectDirective } from './selection/select.directive'; | ||
NodeTemplateDirective, | ||
CheckDirective, | ||
ExpandDirective, | ||
@@ -15,0 +17,0 @@ SelectDirective, |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"./shared.module","name":"SharedModule"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"./shared.module","name":"SharedModule"}]}]}]}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"./shared.module","name":"SharedModule"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"./shared.module","name":"SharedModule"}]}]}]}}}] |
@@ -0,4 +1,11 @@ | ||
import { ElementRef } from '@angular/core'; | ||
import { NavigationItem } from './navigation/navigation-item.interface'; | ||
import { TreeItem } from './treeitem.interface'; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const noop: () => void; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const isPresent: Function; | ||
@@ -20,2 +27,6 @@ /** | ||
*/ | ||
export declare const isDocumentAvailable: () => boolean; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const isChanged: (propertyName: string, changes: any, skipFirstChange?: boolean) => boolean; | ||
@@ -29,6 +40,22 @@ /** | ||
*/ | ||
export declare const nodeId: (node: HTMLElement) => string; | ||
export declare const closestNode: (element: HTMLElement) => HTMLElement; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const noop: () => void; | ||
export declare const focusableNode: (element: ElementRef) => HTMLElement; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const hasActiveNode: (target: any, node?: any) => boolean; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const nodeId: (node?: HTMLElement) => string; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const nodeIndex: (item: NavigationItem | TreeItem) => string; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const guid: () => string; |
/** | ||
* @hidden | ||
*/ | ||
export var noop = function () { }; | ||
/** | ||
* @hidden | ||
*/ | ||
export var isPresent = function (value) { return value !== null && value !== undefined; }; | ||
@@ -20,2 +24,6 @@ /** | ||
*/ | ||
export var isDocumentAvailable = function () { return typeof document !== 'undefined'; }; | ||
/** | ||
* @hidden | ||
*/ | ||
export var isChanged = function (propertyName, changes, skipFirstChange) { | ||
@@ -36,6 +44,38 @@ if (skipFirstChange === void 0) { skipFirstChange = true; } | ||
*/ | ||
export var nodeId = function (node) { return node.getAttribute('data-treeindex'); }; | ||
export var closestNode = function (element) { return element.closest('li.k-item'); }; | ||
/** | ||
* @hidden | ||
*/ | ||
export var noop = function () { }; | ||
export var focusableNode = function (element) { return element.nativeElement.querySelector('li[tabindex="0"]'); }; | ||
/** | ||
* @hidden | ||
*/ | ||
export var hasActiveNode = function (target, node) { | ||
var closestItem = node || closestNode(target); | ||
return closestItem && (closestItem === target || target.tabIndex < 0); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
export var nodeId = function (node) { | ||
if (node === void 0) { node = { getAttribute: noop }; } | ||
return node.getAttribute('data-treeindex'); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
export var nodeIndex = function (item) { return (item || {}).index; }; | ||
/** | ||
* @hidden | ||
*/ | ||
export var guid = function () { | ||
var id = "", random; | ||
for (var i = 0; i < 32; i++) { | ||
random = Math.random() * 16 | 0; // tslint:disable-line:no-bitwise | ||
if (i === 8 || i === 12 || i === 16 || i === 20) { | ||
id += "-"; | ||
} | ||
id += (i === 12 ? 4 : (i === 16 ? (random & 3 | 8) : random)).toString(16); // tslint:disable-line:no-bitwise | ||
} | ||
return id; | ||
}; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"isPresent":{"__symbolic":"error","message":"Function call not supported","line":3,"character":35},"isBlank":{"__symbolic":"error","message":"Function call not supported","line":8,"character":23},"isArray":{"__symbolic":"error","message":"Function call not supported","line":13,"character":23},"isNullOrEmptyString":{"__symbolic":"error","message":"Function call not supported","line":18,"character":35},"isChanged":{"__symbolic":"error","message":"Function call not supported","line":23,"character":25},"anyChanged":{"__symbolic":"error","message":"Function call not supported","line":31,"character":26},"nodeId":{"__symbolic":"error","message":"Function call not supported","line":37,"character":22},"noop":{"__symbolic":"error","message":"Function call not supported","line":42,"character":20}}},{"__symbolic":"module","version":1,"metadata":{"isPresent":{"__symbolic":"error","message":"Function call not supported","line":3,"character":35},"isBlank":{"__symbolic":"error","message":"Function call not supported","line":8,"character":23},"isArray":{"__symbolic":"error","message":"Function call not supported","line":13,"character":23},"isNullOrEmptyString":{"__symbolic":"error","message":"Function call not supported","line":18,"character":35},"isChanged":{"__symbolic":"error","message":"Function call not supported","line":23,"character":25},"anyChanged":{"__symbolic":"error","message":"Function call not supported","line":31,"character":26},"nodeId":{"__symbolic":"error","message":"Function call not supported","line":37,"character":22},"noop":{"__symbolic":"error","message":"Function call not supported","line":42,"character":20}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"noop":{"__symbolic":"error","message":"Function call not supported","line":7,"character":20},"isPresent":{"__symbolic":"error","message":"Function call not supported","line":12,"character":35},"isBlank":{"__symbolic":"error","message":"Function call not supported","line":17,"character":23},"isArray":{"__symbolic":"error","message":"Function call not supported","line":22,"character":23},"isNullOrEmptyString":{"__symbolic":"error","message":"Function call not supported","line":27,"character":35},"isDocumentAvailable":{"__symbolic":"error","message":"Function call not supported","line":32,"character":35},"isChanged":{"__symbolic":"error","message":"Function call not supported","line":37,"character":25},"anyChanged":{"__symbolic":"error","message":"Function call not supported","line":45,"character":26},"closestNode":{"__symbolic":"error","message":"Function call not supported","line":51,"character":27},"focusableNode":{"__symbolic":"error","message":"Function call not supported","line":56,"character":29},"hasActiveNode":{"__symbolic":"error","message":"Function call not supported","line":61,"character":29},"nodeId":{"__symbolic":"error","message":"Function call not supported","line":69,"character":22},"nodeIndex":{"__symbolic":"error","message":"Function call not supported","line":74,"character":25},"guid":{"__symbolic":"error","message":"Function call not supported","line":79,"character":20}}},{"__symbolic":"module","version":1,"metadata":{"noop":{"__symbolic":"error","message":"Function call not supported","line":7,"character":20},"isPresent":{"__symbolic":"error","message":"Function call not supported","line":12,"character":35},"isBlank":{"__symbolic":"error","message":"Function call not supported","line":17,"character":23},"isArray":{"__symbolic":"error","message":"Function call not supported","line":22,"character":23},"isNullOrEmptyString":{"__symbolic":"error","message":"Function call not supported","line":27,"character":35},"isDocumentAvailable":{"__symbolic":"error","message":"Function call not supported","line":32,"character":35},"isChanged":{"__symbolic":"error","message":"Function call not supported","line":37,"character":25},"anyChanged":{"__symbolic":"error","message":"Function call not supported","line":45,"character":26},"closestNode":{"__symbolic":"error","message":"Function call not supported","line":51,"character":27},"focusableNode":{"__symbolic":"error","message":"Function call not supported","line":56,"character":29},"hasActiveNode":{"__symbolic":"error","message":"Function call not supported","line":61,"character":29},"nodeId":{"__symbolic":"error","message":"Function call not supported","line":69,"character":22},"nodeIndex":{"__symbolic":"error","message":"Function call not supported","line":74,"character":25},"guid":{"__symbolic":"error","message":"Function call not supported","line":79,"character":20}}}] |
@@ -39,2 +39,3 @@ "use strict"; | ||
this.subscriptions.add(Observable_1.Observable.merge(this.treeView.expand.map(function (e) { return (tslib_1.__assign({ expand: true }, e)); }), this.treeView.collapse.map(function (e) { return (tslib_1.__assign({ expand: false }, e)); })).subscribe(this.toggleExpand.bind(this))); | ||
this.treeView.expandIcons = true; | ||
this.treeView.isExpanded = function (dataItem, index) { | ||
@@ -76,3 +77,3 @@ return _this.expandedKeys.indexOf(_this.itemKey({ dataItem: dataItem, index: index })) > -1; | ||
ExpandDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewExpandBy]' },] }, | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewExpandable]' },] }, | ||
]; | ||
@@ -85,3 +86,3 @@ /** @nocollapse */ | ||
'isExpanded': [{ type: core_1.Input },], | ||
'expandKey': [{ type: core_1.Input, args: ["kendoTreeViewExpandBy",] },], | ||
'expandKey': [{ type: core_1.Input, args: ["expandBy",] },], | ||
'expandedKeysChange': [{ type: core_1.Output },], | ||
@@ -88,0 +89,0 @@ 'expandedKeys': [{ type: core_1.Input },], |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"ExpandDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewExpandBy]"}]}],"members":{"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewExpandBy"]}]}],"expandedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"expandedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"toggleExpand":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"ExpandDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewExpandBy]"}]}],"members":{"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewExpandBy"]}]}],"expandedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"expandedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"toggleExpand":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"ExpandDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewExpandable]"}]}],"members":{"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["expandBy"]}]}],"expandedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"expandedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"toggleExpand":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"ExpandDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewExpandable]"}]}],"members":{"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["expandBy"]}]}],"expandedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"expandedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"toggleExpand":[{"__symbolic":"method"}]}}}}] |
@@ -7,2 +7,3 @@ "use strict"; | ||
var utils_1 = require("./utils"); | ||
var default_callbacks_1 = require("./default-callbacks"); | ||
var Observable_1 = require("rxjs/Observable"); | ||
@@ -41,2 +42,5 @@ require("rxjs/add/observable/of"); | ||
this.treeView.hasChildren = function (item) { return _this.childrenField in item; }; | ||
if (this.treeView.isExpanded !== default_callbacks_1.isExpanded) { | ||
this.treeView.expandIcons = true; | ||
} | ||
} | ||
@@ -43,0 +47,0 @@ }; |
export { TreeViewComponent } from './treeview.component'; | ||
export { TreeViewModule } from './treeview.module'; | ||
export { NodeTemplateDirective } from './node-template.directive'; | ||
export { CheckDirective } from './check.directive'; | ||
export { ExpandDirective } from './expand.directive'; | ||
export { SelectDirective } from './selection/select.directive'; | ||
export { SelectionMode } from './selection/selection-mode'; | ||
export { SelectionSettings } from './selection/selection-settings'; | ||
export { SelectableSettings } from './selection/selectable-settings'; | ||
export { CheckableSettings } from './checkable-settings'; | ||
export { CheckedState } from './checkbox/checked-state'; | ||
export { HierarchyBindingDirective } from './hierarchy-binding.directive'; | ||
export { FlatDataBindingDirective } from './flat-binding.directive'; |
@@ -9,2 +9,4 @@ "use strict"; | ||
exports.NodeTemplateDirective = node_template_directive_1.NodeTemplateDirective; | ||
var check_directive_1 = require("./check.directive"); | ||
exports.CheckDirective = check_directive_1.CheckDirective; | ||
var expand_directive_1 = require("./expand.directive"); | ||
@@ -11,0 +13,0 @@ exports.ExpandDirective = expand_directive_1.ExpandDirective; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./treeview.component","export":["TreeViewComponent"]},{"from":"./treeview.module","export":["TreeViewModule"]},{"from":"./node-template.directive","export":["NodeTemplateDirective"]},{"from":"./expand.directive","export":["ExpandDirective"]},{"from":"./selection/select.directive","export":["SelectDirective"]},{"from":"./selection/selection-mode","export":["SelectionMode"]},{"from":"./selection/selection-settings","export":["SelectionSettings"]},{"from":"./hierarchy-binding.directive","export":["HierarchyBindingDirective"]},{"from":"./flat-binding.directive","export":["FlatDataBindingDirective"]}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./treeview.component","export":["TreeViewComponent"]},{"from":"./treeview.module","export":["TreeViewModule"]},{"from":"./node-template.directive","export":["NodeTemplateDirective"]},{"from":"./expand.directive","export":["ExpandDirective"]},{"from":"./selection/select.directive","export":["SelectDirective"]},{"from":"./selection/selection-mode","export":["SelectionMode"]},{"from":"./selection/selection-settings","export":["SelectionSettings"]},{"from":"./hierarchy-binding.directive","export":["HierarchyBindingDirective"]},{"from":"./flat-binding.directive","export":["FlatDataBindingDirective"]}]}] | ||
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./treeview.component","export":["TreeViewComponent"]},{"from":"./treeview.module","export":["TreeViewModule"]},{"from":"./node-template.directive","export":["NodeTemplateDirective"]},{"from":"./check.directive","export":["CheckDirective"]},{"from":"./expand.directive","export":["ExpandDirective"]},{"from":"./selection/select.directive","export":["SelectDirective"]},{"from":"./selection/selectable-settings","export":["SelectableSettings"]},{"from":"./checkable-settings","export":["CheckableSettings"]},{"from":"./checkbox/checked-state","export":["CheckedState"]},{"from":"./hierarchy-binding.directive","export":["HierarchyBindingDirective"]},{"from":"./flat-binding.directive","export":["FlatDataBindingDirective"]}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./treeview.component","export":["TreeViewComponent"]},{"from":"./treeview.module","export":["TreeViewModule"]},{"from":"./node-template.directive","export":["NodeTemplateDirective"]},{"from":"./check.directive","export":["CheckDirective"]},{"from":"./expand.directive","export":["ExpandDirective"]},{"from":"./selection/select.directive","export":["SelectDirective"]},{"from":"./selection/selectable-settings","export":["SelectableSettings"]},{"from":"./checkable-settings","export":["CheckableSettings"]},{"from":"./checkbox/checked-state","export":["CheckedState"]},{"from":"./hierarchy-binding.directive","export":["HierarchyBindingDirective"]},{"from":"./flat-binding.directive","export":["FlatDataBindingDirective"]}]}] |
@@ -11,3 +11,5 @@ import { NavigationItem } from './navigation-item.interface'; | ||
readonly moves: Subject<NavigationState>; | ||
readonly checks: Subject<string>; | ||
readonly selects: Subject<string>; | ||
navigable: boolean; | ||
model: NavigationModel; | ||
@@ -27,2 +29,3 @@ actions: { | ||
deactivate(): void; | ||
checkIndex(index: string): void; | ||
selectIndex(index: string): void; | ||
@@ -37,3 +40,2 @@ isActive(index: string): boolean; | ||
private moveToChild(); | ||
private selectActiveItem(); | ||
private notifyExpand(expand); | ||
@@ -40,0 +42,0 @@ private notifyMove(); |
@@ -5,5 +5,5 @@ "use strict"; | ||
var navigation_model_1 = require("./navigation-model"); | ||
var utils_1 = require("../utils"); | ||
var keys_1 = require("./keys"); | ||
var Subject_1 = require("rxjs/Subject"); | ||
var keys_1 = require("./keys"); | ||
var itemIndex = function (item) { return (item || {}).index; }; | ||
var sibling = function (item, direction) { return item[direction] || item; }; | ||
@@ -18,3 +18,5 @@ /** | ||
this.moves = new Subject_1.Subject(); | ||
this.checks = new Subject_1.Subject(); | ||
this.selects = new Subject_1.Subject(); | ||
this.navigable = true; | ||
this.actions = (_a = {}, | ||
@@ -27,4 +29,4 @@ _a[keys_1.Keys.up] = function () { return _this.activate(sibling(_this.focusableItem, 'prev')); }, | ||
_a[keys_1.Keys.end] = function () { return _this.activate(_this.model.lastNode()); }, | ||
_a[keys_1.Keys.enter] = function () { return _this.selectActiveItem(); }, | ||
_a[keys_1.Keys.space] = function () { return _this.selectActiveItem(); }, | ||
_a[keys_1.Keys.enter] = function () { return _this.navigable && _this.selectIndex(utils_1.nodeIndex(_this.activeItem)); }, | ||
_a[keys_1.Keys.space] = function () { return _this.navigable && _this.checkIndex(utils_1.nodeIndex(_this.activeItem)); }, | ||
_a); | ||
@@ -47,3 +49,3 @@ this.isFocused = false; | ||
get: function () { | ||
return itemIndex(this.activeItem) || null; | ||
return utils_1.nodeIndex(this.activeItem) || null; | ||
}, | ||
@@ -68,3 +70,3 @@ enumerable: true, | ||
NavigationService.prototype.activate = function (item) { | ||
if (!item || this.isActive(itemIndex(item))) { | ||
if (!this.navigable || !item || this.isActive(utils_1.nodeIndex(item))) { | ||
return; | ||
@@ -80,6 +82,9 @@ } | ||
NavigationService.prototype.activateIndex = function (index) { | ||
if (!index) { | ||
return; | ||
} | ||
this.activate(this.model.findNode(index)); | ||
}; | ||
NavigationService.prototype.deactivate = function () { | ||
if (!this.isFocused) { | ||
if (!this.navigable || !this.isFocused) { | ||
return; | ||
@@ -90,6 +95,6 @@ } | ||
}; | ||
NavigationService.prototype.checkIndex = function (index) { | ||
this.checks.next(index); | ||
}; | ||
NavigationService.prototype.selectIndex = function (index) { | ||
if (!this.isActive(index)) { | ||
return; | ||
} | ||
this.selects.next(index); | ||
@@ -104,3 +109,3 @@ }; | ||
NavigationService.prototype.isFocusable = function (index) { | ||
return itemIndex(this.focusableItem) === index; | ||
return utils_1.nodeIndex(this.focusableItem) === index; | ||
}; | ||
@@ -117,2 +122,5 @@ NavigationService.prototype.registerItem = function (index) { | ||
NavigationService.prototype.move = function (e) { | ||
if (!this.navigable) { | ||
return; | ||
} | ||
var moveAction = this.actions[e.keyCode]; | ||
@@ -127,3 +135,3 @@ if (!moveAction) { | ||
var expand = _a.expand, intercept = _a.intercept; | ||
var index = itemIndex(this.activeItem); | ||
var index = utils_1.nodeIndex(this.activeItem); | ||
if (!index || intercept(index)) { | ||
@@ -138,3 +146,3 @@ return; | ||
} | ||
this.activate(this.model.findParent(itemIndex(this.activeItem))); | ||
this.activate(this.model.findParent(utils_1.nodeIndex(this.activeItem))); | ||
return true; | ||
@@ -146,8 +154,5 @@ }; | ||
} | ||
this.activate(this.model.findChild(itemIndex(this.activeItem))); | ||
this.activate(this.model.findChild(utils_1.nodeIndex(this.activeItem))); | ||
return true; | ||
}; | ||
NavigationService.prototype.selectActiveItem = function () { | ||
this.selectIndex(itemIndex(this.activeItem)); | ||
}; | ||
NavigationService.prototype.notifyExpand = function (expand) { | ||
@@ -161,3 +166,3 @@ this.expands.next(this.navigationState(expand)); | ||
if (expand === void 0) { expand = false; } | ||
return ({ expand: expand, index: itemIndex(this.activeItem), isFocused: this.isFocused }); | ||
return ({ expand: expand, index: utils_1.nodeIndex(this.activeItem), isFocused: this.isFocused }); | ||
}; | ||
@@ -164,0 +169,0 @@ NavigationService.decorators = [ |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"NavigationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"activate":[{"__symbolic":"method"}],"activateParent":[{"__symbolic":"method"}],"activateIndex":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"selectIndex":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"registerItem":[{"__symbolic":"method"}],"unregisterItem":[{"__symbolic":"method"}],"move":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"moveToParent":[{"__symbolic":"method"}],"moveToChild":[{"__symbolic":"method"}],"selectActiveItem":[{"__symbolic":"method"}],"notifyExpand":[{"__symbolic":"method"}],"notifyMove":[{"__symbolic":"method"}],"navigationState":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"NavigationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"activate":[{"__symbolic":"method"}],"activateParent":[{"__symbolic":"method"}],"activateIndex":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"selectIndex":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"registerItem":[{"__symbolic":"method"}],"unregisterItem":[{"__symbolic":"method"}],"move":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"moveToParent":[{"__symbolic":"method"}],"moveToChild":[{"__symbolic":"method"}],"selectActiveItem":[{"__symbolic":"method"}],"notifyExpand":[{"__symbolic":"method"}],"notifyMove":[{"__symbolic":"method"}],"navigationState":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"NavigationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"activate":[{"__symbolic":"method"}],"activateParent":[{"__symbolic":"method"}],"activateIndex":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"checkIndex":[{"__symbolic":"method"}],"selectIndex":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"registerItem":[{"__symbolic":"method"}],"unregisterItem":[{"__symbolic":"method"}],"move":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"moveToParent":[{"__symbolic":"method"}],"moveToChild":[{"__symbolic":"method"}],"notifyExpand":[{"__symbolic":"method"}],"notifyMove":[{"__symbolic":"method"}],"navigationState":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"NavigationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"activate":[{"__symbolic":"method"}],"activateParent":[{"__symbolic":"method"}],"activateIndex":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"checkIndex":[{"__symbolic":"method"}],"selectIndex":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"registerItem":[{"__symbolic":"method"}],"unregisterItem":[{"__symbolic":"method"}],"move":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"moveToParent":[{"__symbolic":"method"}],"moveToChild":[{"__symbolic":"method"}],"notifyExpand":[{"__symbolic":"method"}],"notifyMove":[{"__symbolic":"method"}],"navigationState":[{"__symbolic":"method"}]}}}}] |
@@ -18,3 +18,3 @@ import { TemplateRef } from "@angular/core"; | ||
* [nodes]="data" | ||
* kendoTreeViewExpandBy | ||
* kendoTreeViewExpandable | ||
* | ||
@@ -21,0 +21,0 @@ * kendoTreeViewHierarchyBinding |
@@ -20,3 +20,3 @@ "use strict"; | ||
* [nodes]="data" | ||
* kendoTreeViewExpandBy | ||
* kendoTreeViewExpandable | ||
* | ||
@@ -23,0 +23,0 @@ * kendoTreeViewHierarchyBinding |
import { OnDestroy, OnInit, EventEmitter } from '@angular/core'; | ||
import { TreeViewComponent } from '../treeview.component'; | ||
import { SelectionSettings } from './selection-settings'; | ||
import { SelectableSettings } from './selectable-settings'; | ||
import { Subscription } from 'rxjs/Subscription'; | ||
@@ -8,3 +8,3 @@ import 'rxjs/add/observable/merge'; | ||
/** | ||
* A directive which manages the node in-memory selection state of the TreeView. | ||
* A directive which manages the in-memory selection state of the TreeView node. | ||
*/ | ||
@@ -27,3 +27,3 @@ export declare class SelectDirective implements OnInit, OnDestroy { | ||
*/ | ||
selection: boolean | SelectionSettings; | ||
selection: boolean | SelectableSettings; | ||
/** | ||
@@ -46,5 +46,5 @@ * Defines the collection that will store the selected keys. | ||
protected select(e: any): void; | ||
protected selectSingle(e: any): void; | ||
protected selectMultiple(e: any): void; | ||
protected notify(): void; | ||
protected selectSingle(node: any): void; | ||
protected selectMultiple(node: any): void; | ||
private notify(); | ||
} |
@@ -10,3 +10,3 @@ "use strict"; | ||
/** | ||
* A directive which manages the node in-memory selection state of the TreeView. | ||
* A directive which manages the in-memory selection state of the TreeView node. | ||
*/ | ||
@@ -51,3 +51,2 @@ var SelectDirective = (function () { | ||
var defaultOptions = { | ||
checkboxOnly: false, | ||
enabled: true, | ||
@@ -68,7 +67,4 @@ mode: "single" | ||
var _this = this; | ||
this.subscriptions.add(this.treeView.selectionChange | ||
.subscribe(this.select.bind(this))); | ||
this.treeView.isSelected = function (dataItem, index) { | ||
return _this.selectedKeys.indexOf(_this.itemKey({ dataItem: dataItem, index: index })) > -1; | ||
}; | ||
this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this))); | ||
this.treeView.isSelected = function (dataItem, index) { return (_this.selectedKeys.indexOf(_this.itemKey({ dataItem: dataItem, index: index })) > -1); }; | ||
}; | ||
@@ -97,4 +93,4 @@ SelectDirective.prototype.ngOnDestroy = function () { | ||
}; | ||
SelectDirective.prototype.selectSingle = function (e) { | ||
var key = this.itemKey(e); | ||
SelectDirective.prototype.selectSingle = function (node) { | ||
var key = this.itemKey(node); | ||
if (this.selectedKeys[0] === key) { | ||
@@ -106,9 +102,10 @@ return; | ||
}; | ||
SelectDirective.prototype.selectMultiple = function (e) { | ||
var key = this.itemKey(e); | ||
SelectDirective.prototype.selectMultiple = function (node) { | ||
var key = this.itemKey(node); | ||
var idx = this.selectedKeys.indexOf(key); | ||
var isSelected = idx > -1; | ||
if (!utils_1.isPresent(key)) { | ||
return; | ||
} | ||
if (idx > -1) { | ||
if (isSelected) { | ||
this.selectedKeys.splice(idx, 1); | ||
@@ -122,6 +119,6 @@ } | ||
SelectDirective.prototype.notify = function () { | ||
this.selectedKeysChange.emit(this.selectedKeys); | ||
this.selectedKeysChange.emit(this.selectedKeys.slice()); | ||
}; | ||
SelectDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewSelectBy]' },] }, | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewSelectable]' },] }, | ||
]; | ||
@@ -134,4 +131,4 @@ /** @nocollapse */ | ||
'isSelected': [{ type: core_1.Input },], | ||
'selectKey': [{ type: core_1.Input, args: ["kendoTreeViewSelectBy",] },], | ||
'selection': [{ type: core_1.Input },], | ||
'selectKey': [{ type: core_1.Input, args: ["selectBy",] },], | ||
'selection': [{ type: core_1.Input, args: ["kendoTreeViewSelectable",] },], | ||
'selectedKeys': [{ type: core_1.Input },], | ||
@@ -138,0 +135,0 @@ 'selectedKeysChange': [{ type: core_1.Output },], |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"SelectDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewSelectBy]"}]}],"members":{"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewSelectBy"]}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"getAriaMultiselectable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.aria-multiselectable"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"selectSingle":[{"__symbolic":"method"}],"selectMultiple":[{"__symbolic":"method"}],"notify":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"SelectDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewSelectBy]"}]}],"members":{"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewSelectBy"]}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"getAriaMultiselectable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.aria-multiselectable"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"selectSingle":[{"__symbolic":"method"}],"selectMultiple":[{"__symbolic":"method"}],"notify":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"SelectDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewSelectable]"}]}],"members":{"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["selectBy"]}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewSelectable"]}]}],"selectedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"getAriaMultiselectable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.aria-multiselectable"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"selectSingle":[{"__symbolic":"method"}],"selectMultiple":[{"__symbolic":"method"}],"notify":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"SelectDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewSelectable]"}]}],"members":{"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectKey":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["selectBy"]}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["kendoTreeViewSelectable"]}]}],"selectedKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedKeysChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"getAriaMultiselectable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.aria-multiselectable"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../treeview.component","name":"TreeViewComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"itemKey":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"selectSingle":[{"__symbolic":"method"}],"selectMultiple":[{"__symbolic":"method"}],"notify":[{"__symbolic":"method"}]}}}}] |
@@ -5,3 +5,3 @@ /** | ||
* @example | ||
* ```ts-preview | ||
* ```ts | ||
* | ||
@@ -13,6 +13,7 @@ * _@Component({ | ||
* [nodes]="data" | ||
* kendoTreeViewExpandBy | ||
* kendoTreeViewSelectBy | ||
* | ||
* [kendoTreeViewSelectable]="{ mode: 'multiple' }" | ||
* | ||
* kendoTreeViewExpandable | ||
* kendoTreeViewHierarchyBinding | ||
* [selection]="{ mode: 'multiple' }" | ||
* [childrenField]="'items'" | ||
@@ -22,2 +23,3 @@ * [textField]="'text'" | ||
* </kendo-treeview> | ||
* <i>Press ENTER key or use mouse click to select an item</i> | ||
* ` | ||
@@ -24,0 +26,0 @@ * }) |
@@ -8,2 +8,3 @@ "use strict"; | ||
var node_template_directive_1 = require("./node-template.directive"); | ||
var check_directive_1 = require("./check.directive"); | ||
var expand_directive_1 = require("./expand.directive"); | ||
@@ -16,2 +17,3 @@ var select_directive_1 = require("./selection/select.directive"); | ||
var treeview_item_content_directive_1 = require("./treeview-item-content.directive"); | ||
var checkbox_module_1 = require("./checkbox/checkbox.module"); | ||
var COMPONENT_DIRECTIVES = [ | ||
@@ -23,2 +25,3 @@ treeview_component_1.TreeViewComponent, | ||
node_template_directive_1.NodeTemplateDirective, | ||
check_directive_1.CheckDirective, | ||
expand_directive_1.ExpandDirective, | ||
@@ -40,3 +43,3 @@ select_directive_1.SelectDirective, | ||
exports: [COMPONENT_DIRECTIVES], | ||
imports: [common_1.CommonModule] | ||
imports: [common_1.CommonModule, checkbox_module_1.CheckBoxModule] | ||
},] }, | ||
@@ -43,0 +46,0 @@ ]; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"SharedModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"SharedModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}]}]}]}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"SharedModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"./checkbox/checkbox.module","name":"CheckBoxModule"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"SharedModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./treeview-group.component","name":"TreeViewGroupComponent"},{"__symbolic":"reference","module":"./treeview-item.directive","name":"TreeViewItemDirective"},{"__symbolic":"reference","module":"./treeview-item-content.directive","name":"TreeViewItemContentDirective"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./loading-indicator.directive","name":"LoadingIndicatorDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"./checkbox/checkbox.module","name":"CheckBoxModule"}]}]}]}}}] |
@@ -1,5 +0,8 @@ | ||
import { ChangeDetectorRef, TemplateRef, OnInit, OnDestroy } from '@angular/core'; | ||
import { ChangeDetectorRef, TemplateRef, OnChanges, OnInit, OnDestroy } from '@angular/core'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
import { IndexBuilderService } from './index-builder.service'; | ||
import { TreeViewLookupService } from './treeview-lookup.service'; | ||
import { NavigationService } from './navigation/navigation.service'; | ||
import { LoadingNotificationService } from './loading-notification.service'; | ||
import { CheckedState } from './checkbox/checked-state'; | ||
import { Observable } from 'rxjs/Observable'; | ||
@@ -13,22 +16,30 @@ import "rxjs/add/operator/do"; | ||
*/ | ||
export declare class TreeViewGroupComponent implements OnInit, OnDestroy { | ||
export declare class TreeViewGroupComponent implements OnChanges, OnInit, OnDestroy { | ||
protected expandService: ExpandStateService; | ||
protected loadingService: LoadingNotificationService; | ||
protected indexBuilder: IndexBuilderService; | ||
protected treeViewLookupService: TreeViewLookupService; | ||
protected navigationService: NavigationService; | ||
protected cd: ChangeDetectorRef; | ||
kGroupClass: boolean; | ||
readonly role: string; | ||
checkboxes: boolean; | ||
expandIcons: boolean; | ||
nodes: Observable<any[]>; | ||
textField: string | string[]; | ||
parentDataItem: any; | ||
parentIndex: string; | ||
nodeTemplateRef: TemplateRef<any>; | ||
data: any[]; | ||
private _data; | ||
private subscription; | ||
constructor(expandService: ExpandStateService, loadingService: LoadingNotificationService, indexBuilder: IndexBuilderService, cd: ChangeDetectorRef); | ||
hasChildren: <T>(item: T) => boolean; | ||
constructor(expandService: ExpandStateService, loadingService: LoadingNotificationService, indexBuilder: IndexBuilderService, treeViewLookupService: TreeViewLookupService, navigationService: NavigationService, cd: ChangeDetectorRef); | ||
isChecked: <T>(item: T, index: string) => CheckedState; | ||
isExpanded: <T>(item: T, index: string) => boolean; | ||
isSelected: <T>(item: T, index: string) => boolean; | ||
children: <T>(item: T) => Observable<any[]>; | ||
hasChildren: <T>(item: T) => boolean; | ||
readonly hasTemplate: boolean; | ||
expandNode(index: string, dataItem: any, expand: boolean): void; | ||
checkNode(index: string): void; | ||
nodeIndex(index: number): string; | ||
@@ -38,4 +49,7 @@ nodeText(dataItem: any): any; | ||
ngOnInit(): void; | ||
ngOnChanges(changes: any): void; | ||
fetchChildren(node: any, index: string): Observable<any>; | ||
readonly nextFields: string[]; | ||
private updateParentChildren(); | ||
private mapToTreeItem(data); | ||
} |
@@ -7,2 +7,4 @@ "use strict"; | ||
var index_builder_service_1 = require("./index-builder.service"); | ||
var treeview_lookup_service_1 = require("./treeview-lookup.service"); | ||
var navigation_service_1 = require("./navigation/navigation.service"); | ||
var utils_1 = require("./utils"); | ||
@@ -20,14 +22,17 @@ var accessor_1 = require("./accessor"); | ||
var TreeViewGroupComponent = (function () { | ||
function TreeViewGroupComponent(expandService, loadingService, indexBuilder, cd) { | ||
function TreeViewGroupComponent(expandService, loadingService, indexBuilder, treeViewLookupService, navigationService, cd) { | ||
this.expandService = expandService; | ||
this.loadingService = loadingService; | ||
this.indexBuilder = indexBuilder; | ||
this.treeViewLookupService = treeViewLookupService; | ||
this.navigationService = navigationService; | ||
this.cd = cd; | ||
this.kGroupClass = true; | ||
this.textField = ""; | ||
this.data = []; | ||
this.hasChildren = function () { return false; }; | ||
this._data = []; | ||
this.isChecked = function () { return 'none'; }; | ||
this.isExpanded = function () { return false; }; | ||
this.isSelected = function () { return false; }; | ||
this.children = function () { return Observable_1.Observable.of([]); }; | ||
this.hasChildren = function () { return false; }; | ||
} | ||
@@ -39,2 +44,13 @@ Object.defineProperty(TreeViewGroupComponent.prototype, "role", { | ||
}); | ||
Object.defineProperty(TreeViewGroupComponent.prototype, "data", { | ||
get: function () { | ||
return this._data; | ||
}, | ||
set: function (data) { | ||
this._data = data; | ||
this.updateParentChildren(); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewGroupComponent.prototype, "hasTemplate", { | ||
@@ -55,2 +71,6 @@ get: function () { | ||
}; | ||
TreeViewGroupComponent.prototype.checkNode = function (index) { | ||
this.navigationService.checkIndex(index); | ||
this.navigationService.activateIndex(index); | ||
}; | ||
TreeViewGroupComponent.prototype.nodeIndex = function (index) { | ||
@@ -72,2 +92,7 @@ return this.indexBuilder.nodeIndex(index.toString(), this.parentIndex); | ||
}; | ||
TreeViewGroupComponent.prototype.ngOnChanges = function (changes) { | ||
if (changes.parentIndex) { | ||
this.updateParentChildren(); | ||
} | ||
}; | ||
TreeViewGroupComponent.prototype.fetchChildren = function (node, index) { | ||
@@ -92,2 +117,10 @@ var _this = this; | ||
}); | ||
TreeViewGroupComponent.prototype.updateParentChildren = function () { | ||
var children = this.parentIndex ? this.mapToTreeItem(this.data) : []; | ||
this.treeViewLookupService.registerChildren(this.parentIndex, children); | ||
}; | ||
TreeViewGroupComponent.prototype.mapToTreeItem = function (data) { | ||
var _this = this; | ||
return data.map(function (dataItem, idx) { return ({ dataItem: dataItem, index: _this.nodeIndex(idx) }); }); | ||
}; | ||
TreeViewGroupComponent.decorators = [ | ||
@@ -108,3 +141,3 @@ { type: core_1.Component, args: [{ | ||
selector: '[kendoTreeViewGroup]', | ||
template: "\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [@toggle]=\"true\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [textField]=\"nextFields\"\n >\n </ul>\n </li>\n " | ||
template: "\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [isChecked]=\"isChecked(node, nodeIndex(index))\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"expandIcons && hasChildren(node)\"\n >\n </span>\n <kendo-checkbox\n *ngIf=\"checkboxes\"\n [checkState]=\"isChecked(node, nodeIndex(index))\"\n (checkStateChange)=\"checkNode(nodeIndex(index))\"\n tabindex=\"-1\"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node, index: nodeIndex(index)}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [parentDataItem]=\"node\"\n [textField]=\"nextFields\"\n [@toggle]=\"true\"\n >\n </ul>\n </li>\n " | ||
},] }, | ||
@@ -117,2 +150,4 @@ ]; | ||
{ type: index_builder_service_1.IndexBuilderService, }, | ||
{ type: treeview_lookup_service_1.TreeViewLookupService, }, | ||
{ type: navigation_service_1.NavigationService, }, | ||
{ type: core_1.ChangeDetectorRef, }, | ||
@@ -123,10 +158,14 @@ ]; }; | ||
'role': [{ type: core_1.HostBinding, args: ["attr.role",] },], | ||
'checkboxes': [{ type: core_1.Input },], | ||
'expandIcons': [{ type: core_1.Input },], | ||
'nodes': [{ type: core_1.Input },], | ||
'textField': [{ type: core_1.Input },], | ||
'parentDataItem': [{ type: core_1.Input },], | ||
'parentIndex': [{ type: core_1.Input },], | ||
'nodeTemplateRef': [{ type: core_1.Input },], | ||
'hasChildren': [{ type: core_1.Input },], | ||
'isChecked': [{ type: core_1.Input },], | ||
'isExpanded': [{ type: core_1.Input },], | ||
'isSelected': [{ type: core_1.Input },], | ||
'children': [{ type: core_1.Input },], | ||
'hasChildren': [{ type: core_1.Input },], | ||
}; | ||
@@ -133,0 +172,0 @@ return TreeViewGroupComponent; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewGroupComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["toggle",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]}]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]}]}]]}]]}],"selector":"[kendoTreeViewGroup]","template":"\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [@toggle]=\"true\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [textField]=\"nextFields\"\n >\n </ul>\n </li>\n "}]}],"members":{"kGroupClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-group"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandNode":[{"__symbolic":"method"}],"nodeIndex":[{"__symbolic":"method"}],"nodeText":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"fetchChildren":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewGroupComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["toggle",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]}]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]}]}]]}]]}],"selector":"[kendoTreeViewGroup]","template":"\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [@toggle]=\"true\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [textField]=\"nextFields\"\n >\n </ul>\n </li>\n "}]}],"members":{"kGroupClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-group"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandNode":[{"__symbolic":"method"}],"nodeIndex":[{"__symbolic":"method"}],"nodeText":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"fetchChildren":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewGroupComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["toggle",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]}]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]}]}]]}]]}],"selector":"[kendoTreeViewGroup]","template":"\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [isChecked]=\"isChecked(node, nodeIndex(index))\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"expandIcons && hasChildren(node)\"\n >\n </span>\n <kendo-checkbox\n *ngIf=\"checkboxes\"\n [checkState]=\"isChecked(node, nodeIndex(index))\"\n (checkStateChange)=\"checkNode(nodeIndex(index))\"\n tabindex=\"-1\"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node, index: nodeIndex(index)}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [parentDataItem]=\"node\"\n [textField]=\"nextFields\"\n [@toggle]=\"true\"\n >\n </ul>\n </li>\n "}]}],"members":{"kGroupClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-group"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"checkboxes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandIcons":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandNode":[{"__symbolic":"method"}],"checkNode":[{"__symbolic":"method"}],"nodeIndex":[{"__symbolic":"method"}],"nodeText":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"fetchChildren":[{"__symbolic":"method"}],"updateParentChildren":[{"__symbolic":"method"}],"mapToTreeItem":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewGroupComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["toggle",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]}]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":"*"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":["0.1s ease-in",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"height":0}]}]}]]}]]}],"selector":"[kendoTreeViewGroup]","template":"\n <li\n *ngFor=\"let node of data; let index = index\" class=\"k-item\"\n kendoTreeViewItem\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [isChecked]=\"isChecked(node, nodeIndex(index))\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"expandIcons && hasChildren(node)\"\n >\n </span>\n <kendo-checkbox\n *ngIf=\"checkboxes\"\n [checkState]=\"isChecked(node, nodeIndex(index))\"\n (checkStateChange)=\"checkNode(nodeIndex(index))\"\n tabindex=\"-1\"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\" [ngTemplateOutletContext]=\"{$implicit: node, index: nodeIndex(index)}\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [parentDataItem]=\"node\"\n [textField]=\"nextFields\"\n [@toggle]=\"true\"\n >\n </ul>\n </li>\n "}]}],"members":{"kGroupClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-group"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"checkboxes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandIcons":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"expandNode":[{"__symbolic":"method"}],"checkNode":[{"__symbolic":"method"}],"nodeIndex":[{"__symbolic":"method"}],"nodeText":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"fetchChildren":[{"__symbolic":"method"}],"updateParentChildren":[{"__symbolic":"method"}],"mapToTreeItem":[{"__symbolic":"method"}]}}}}] |
@@ -6,2 +6,5 @@ import { ElementRef, OnChanges, OnDestroy, OnInit, Renderer2 } from '@angular/core'; | ||
import { IndexBuilderService } from './index-builder.service'; | ||
import { TreeViewLookupService } from './treeview-lookup.service'; | ||
import { TreeItem } from './treeitem.interface'; | ||
import { CheckedState } from './checkbox/checked-state'; | ||
import 'rxjs/add/operator/filter'; | ||
@@ -18,2 +21,3 @@ /** | ||
private selectionService; | ||
private lookupService; | ||
private renderer; | ||
@@ -23,4 +27,10 @@ private ib; | ||
index: string; | ||
parentDataItem: any; | ||
parentIndex: string; | ||
isChecked: CheckedState; | ||
isExpanded: boolean; | ||
isSelected: boolean; | ||
readonly treeItem: TreeItem; | ||
readonly parentTreeItem: TreeItem; | ||
ariaChecked: string; | ||
private _isExpanded; | ||
@@ -30,3 +40,3 @@ private _isSelected; | ||
private subscriptions; | ||
constructor(element: ElementRef, expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, renderer: Renderer2, ib: IndexBuilderService); | ||
constructor(element: ElementRef, expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, lookupService: TreeViewLookupService, renderer: Renderer2, ib: IndexBuilderService); | ||
ngOnInit(): void; | ||
@@ -40,3 +50,4 @@ ngOnChanges(changes: any): void; | ||
private focusItem(); | ||
private moveNode(change?); | ||
private moveLookupItem(changes?); | ||
private moveNavigationItem(change?); | ||
private setAriaAttributes(); | ||
@@ -43,0 +54,0 @@ private updateTabIndex(); |
@@ -8,4 +8,6 @@ "use strict"; | ||
var index_builder_service_1 = require("./index-builder.service"); | ||
var treeview_lookup_service_1 = require("./treeview-lookup.service"); | ||
var utils_1 = require("./utils"); | ||
require("rxjs/add/operator/filter"); | ||
var buildItem = function (index, dataItem) { return ({ dataItem: dataItem, index: index }); }; | ||
/** | ||
@@ -17,3 +19,3 @@ * @hidden | ||
var TreeViewItemDirective = (function () { | ||
function TreeViewItemDirective(element, expandService, navigationService, selectionService, renderer, ib) { | ||
function TreeViewItemDirective(element, expandService, navigationService, selectionService, lookupService, renderer, ib) { | ||
this.element = element; | ||
@@ -23,4 +25,6 @@ this.expandService = expandService; | ||
this.selectionService = selectionService; | ||
this.lookupService = lookupService; | ||
this.renderer = renderer; | ||
this.ib = ib; | ||
this.ariaChecked = 'false'; | ||
this.isInitialized = false; | ||
@@ -30,2 +34,17 @@ this.subscriptions = []; | ||
} | ||
Object.defineProperty(TreeViewItemDirective.prototype, "isChecked", { | ||
set: function (checked) { | ||
if (checked === 'checked') { | ||
this.ariaChecked = 'true'; | ||
} | ||
else if (checked === 'indeterminate') { | ||
this.ariaChecked = 'mixed'; | ||
} | ||
else { | ||
this.ariaChecked = 'false'; | ||
} | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewItemDirective.prototype, "isExpanded", { | ||
@@ -51,4 +70,19 @@ get: function () { | ||
}); | ||
Object.defineProperty(TreeViewItemDirective.prototype, "treeItem", { | ||
get: function () { | ||
return buildItem(this.index, this.dataItem); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewItemDirective.prototype, "parentTreeItem", { | ||
get: function () { | ||
return this.parentDataItem ? buildItem(this.parentIndex, this.parentDataItem) : null; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
TreeViewItemDirective.prototype.ngOnInit = function () { | ||
this.navigationService.registerItem(this.index); | ||
this.lookupService.registerItem(this.treeItem, this.parentTreeItem); | ||
this.activateItem(); | ||
@@ -62,6 +96,7 @@ this.isInitialized = true; | ||
var indexChange = changes.index; | ||
if (indexChange || changes.isExpanded || changes.isSelected) { | ||
if (indexChange || changes.isChecked || changes.isExpanded || changes.isSelected) { | ||
this.setAriaAttributes(); | ||
} | ||
this.moveNode(indexChange); | ||
this.moveLookupItem(changes); | ||
this.moveNavigationItem(indexChange); | ||
}; | ||
@@ -112,3 +147,15 @@ TreeViewItemDirective.prototype.ngOnDestroy = function () { | ||
}; | ||
TreeViewItemDirective.prototype.moveNode = function (change) { | ||
TreeViewItemDirective.prototype.moveLookupItem = function (changes) { | ||
if (changes === void 0) { changes = {}; } | ||
var dataItem = changes.dataItem, index = changes.index, parentDataItem = changes.parentDataItem, parentIndex = changes.parentIndex; | ||
if (index && index.firstChange && !this.lookupService.hasItem(this.index)) { | ||
return; | ||
} //skip first change | ||
if (!dataItem && !index && !parentDataItem && !parentIndex) { | ||
return; | ||
} | ||
var oldIndex = (index || {}).previousValue || this.index; | ||
this.lookupService.replaceItem(oldIndex, this.treeItem, this.parentTreeItem); | ||
}; | ||
TreeViewItemDirective.prototype.moveNavigationItem = function (change) { | ||
if (change === void 0) { change = {}; } | ||
@@ -126,2 +173,3 @@ var currentValue = change.currentValue, firstChange = change.firstChange, previousValue = change.previousValue; | ||
this.setAttribute('aria-selected', this.isSelected.toString()); | ||
this.setAttribute('aria-checked', this.ariaChecked); | ||
}; | ||
@@ -143,2 +191,3 @@ TreeViewItemDirective.prototype.updateTabIndex = function () { | ||
{ type: selection_service_1.SelectionService, }, | ||
{ type: treeview_lookup_service_1.TreeViewLookupService, }, | ||
{ type: core_1.Renderer2, }, | ||
@@ -150,2 +199,5 @@ { type: index_builder_service_1.IndexBuilderService, }, | ||
'index': [{ type: core_1.Input },], | ||
'parentDataItem': [{ type: core_1.Input },], | ||
'parentIndex': [{ type: core_1.Input },], | ||
'isChecked': [{ type: core_1.Input },], | ||
'isExpanded': [{ type: core_1.Input },], | ||
@@ -152,0 +204,0 @@ 'isSelected': [{ type: core_1.Input },], |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveNode":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveNode":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}}] |
@@ -1,2 +0,2 @@ | ||
import { EventEmitter, OnInit, OnDestroy } from '@angular/core'; | ||
import { ElementRef, EventEmitter, OnChanges, OnInit, OnDestroy } from '@angular/core'; | ||
import { NodeTemplateDirective } from './node-template.directive'; | ||
@@ -6,2 +6,6 @@ import { ExpandStateService } from './expand-state.service'; | ||
import { SelectionService } from './selection/selection.service'; | ||
import { TreeViewLookupService } from './treeview-lookup.service'; | ||
import { CheckedState } from './checkbox/checked-state'; | ||
import { TreeItemLookup } from './treeitem-lookup.interface'; | ||
import { TreeItem } from './treeitem.interface'; | ||
import { Subscription } from 'rxjs/Subscription'; | ||
@@ -18,3 +22,3 @@ import { Subject } from 'rxjs/Subject'; | ||
* | ||
* @Component({ | ||
* _@Component({ | ||
* selector: 'my-app', | ||
@@ -25,3 +29,5 @@ * template: ` | ||
* textField="text" | ||
* kendoTreeViewExpandBy | ||
* kendoTreeViewCheckable | ||
* kendoTreeViewExpandable | ||
* kendoTreeViewSelectable | ||
* | ||
@@ -54,6 +60,8 @@ * kendoTreeViewHierarchyBinding | ||
*/ | ||
export declare class TreeViewComponent implements OnInit, OnDestroy { | ||
export declare class TreeViewComponent implements OnChanges, OnInit, OnDestroy { | ||
protected expandService: ExpandStateService; | ||
protected navigationService: NavigationService; | ||
protected selectionService: SelectionService; | ||
protected treeViewLookupService: TreeViewLookupService; | ||
private element; | ||
classNames: boolean; | ||
@@ -74,23 +82,18 @@ readonly role: string; | ||
/** | ||
* Fires when the user expands a tree node. | ||
* Fires when the user expands a TreeView node. | ||
*/ | ||
expand: EventEmitter<{ | ||
index: string; | ||
dataItem: any; | ||
}>; | ||
expand: EventEmitter<TreeItem>; | ||
/** | ||
* Fires when the user collapses a tree node. | ||
* Fires when the user collapses a TreeView node. | ||
*/ | ||
collapse: EventEmitter<{ | ||
index: string; | ||
dataItem: any; | ||
}>; | ||
collapse: EventEmitter<TreeItem>; | ||
/** | ||
* Fires when the user selects a tree node. | ||
* Fires when the user selects a TreeView node checkbox. | ||
*/ | ||
selectionChange: EventEmitter<{ | ||
index: string; | ||
dataItem: any; | ||
}>; | ||
checkedChange: EventEmitter<TreeItemLookup>; | ||
/** | ||
* Fires when the user selects a TreeView node. | ||
*/ | ||
selectionChange: EventEmitter<TreeItem>; | ||
/** | ||
* @hidden | ||
@@ -110,9 +113,45 @@ */ | ||
textField: string | string[]; | ||
/** | ||
* A function which determines if a specific node has child nodes. | ||
*/ | ||
hasChildren: <T>(item: T) => boolean; | ||
/** | ||
* A function which determines if a specific node is selected. | ||
*/ | ||
isChecked: <T>(item: T, index: string) => CheckedState; | ||
/** | ||
* A function which determines if a specific node is expanded. | ||
*/ | ||
isExpanded: <T>(item: T, index: string) => boolean; | ||
/** | ||
* A function which determines if a specific node is selected. | ||
*/ | ||
isSelected: <T>(item: T, index: string) => boolean; | ||
/** | ||
* Determines whether the TreeView keyboard navigable is enabled. | ||
*/ | ||
navigable: boolean; | ||
/** | ||
* @hidden | ||
* Determines whether to render checkbox elements. | ||
*/ | ||
checkboxes: boolean; | ||
/** | ||
* @hidden | ||
* Determines whether to render expand or collapse icons. | ||
*/ | ||
expandIcons: boolean; | ||
isActive: boolean; | ||
data: Subject<any[]>; | ||
protected subscriptions: Subscription; | ||
private _animate; | ||
private _isChecked; | ||
private _isExpanded; | ||
private _isSelected; | ||
private _hasChildren; | ||
private resolvedPromise; | ||
/** | ||
* @hidden | ||
*/ | ||
handleKeydown(e: any): void; | ||
handleKeydown(args: any): void; | ||
/** | ||
@@ -130,21 +169,43 @@ * @hidden | ||
handleFocusout({target}: any): void; | ||
constructor(expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService); | ||
constructor(expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, treeViewLookupService: TreeViewLookupService, element: ElementRef); | ||
ngOnChanges(_: any): void; | ||
ngOnDestroy(): void; | ||
ngOnInit(): void; | ||
/** | ||
* A function which determines if a given node has child nodes. | ||
* A function which provides the child nodes for a given parent node. | ||
*/ | ||
hasChildren: <T>(item: T) => boolean; | ||
children: <T>(item: T) => Observable<any[]>; | ||
/** | ||
* A function which determines if a given node is expanded. | ||
* Blurs the focused TreeView item. | ||
*/ | ||
isExpanded: <T>(item: T, index: string) => boolean; | ||
blur(): void; | ||
/** | ||
* A function which determines if a given node is selected. | ||
* Focuses the first focusable item in the TreeView component if no hierarchical index is provided. | ||
* | ||
* @example | ||
* ```ts | ||
* import { Component } from '@angular/core'; | ||
* | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <button (click)="treeview.focus('1')">Focuses the second node</button> | ||
* <kendo-treeview | ||
* #treeview | ||
* [nodes]="data" | ||
* textField="text" | ||
* > | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { text: "Furniture" }, | ||
* { text: "Decor" } | ||
* ]; | ||
* } | ||
* ``` | ||
*/ | ||
isSelected: <T>(item: T, index: string) => boolean; | ||
/** | ||
* A function which provides the child nodes for a given parent node. | ||
*/ | ||
children: <T>(item: T) => Observable<any[]>; | ||
focus(index?: string): void; | ||
private activateAndEmit(index); | ||
} |
@@ -7,12 +7,15 @@ "use strict"; | ||
var index_builder_service_1 = require("./index-builder.service"); | ||
var loading_notification_service_1 = require("./loading-notification.service"); | ||
var navigation_service_1 = require("./navigation/navigation.service"); | ||
var selection_service_1 = require("./selection/selection.service"); | ||
var treeview_lookup_service_1 = require("./treeview-lookup.service"); | ||
var utils_1 = require("./utils"); | ||
var default_callbacks_1 = require("./default-callbacks"); | ||
var Subscription_1 = require("rxjs/Subscription"); | ||
var BehaviorSubject_1 = require("rxjs/BehaviorSubject"); | ||
var Observable_1 = require("rxjs/Observable"); | ||
var loading_notification_service_1 = require("./loading-notification.service"); | ||
var utils_1 = require("./utils"); | ||
var providers = [ | ||
expand_state_service_1.ExpandStateService, | ||
index_builder_service_1.IndexBuilderService, | ||
treeview_lookup_service_1.TreeViewLookupService, | ||
loading_notification_service_1.LoadingNotificationService, | ||
@@ -30,3 +33,3 @@ navigation_service_1.NavigationService, | ||
* | ||
* @Component({ | ||
* _@Component({ | ||
* selector: 'my-app', | ||
@@ -37,3 +40,5 @@ * template: ` | ||
* textField="text" | ||
* kendoTreeViewExpandBy | ||
* kendoTreeViewCheckable | ||
* kendoTreeViewExpandable | ||
* kendoTreeViewSelectable | ||
* | ||
@@ -67,6 +72,8 @@ * kendoTreeViewHierarchyBinding | ||
var TreeViewComponent = (function () { | ||
function TreeViewComponent(expandService, navigationService, selectionService) { | ||
function TreeViewComponent(expandService, navigationService, selectionService, treeViewLookupService, element) { | ||
this.expandService = expandService; | ||
this.navigationService = navigationService; | ||
this.selectionService = selectionService; | ||
this.treeViewLookupService = treeViewLookupService; | ||
this.element = element; | ||
this.classNames = true; | ||
@@ -82,28 +89,30 @@ /** | ||
/** | ||
* Fires when the user expands a tree node. | ||
* Fires when the user expands a TreeView node. | ||
*/ | ||
this.expand = new core_1.EventEmitter(); | ||
/** | ||
* Fires when the user collapses a tree node. | ||
* Fires when the user collapses a TreeView node. | ||
*/ | ||
this.collapse = new core_1.EventEmitter(); | ||
/** | ||
* Fires when the user selects a tree node. | ||
* Fires when the user selects a TreeView node checkbox. | ||
*/ | ||
this.selectionChange = new core_1.EventEmitter(); | ||
this.data = new BehaviorSubject_1.BehaviorSubject([]); | ||
this.subscriptions = new Subscription_1.Subscription(function () { }); | ||
this._animate = true; | ||
this.checkedChange = new core_1.EventEmitter(); | ||
/** | ||
* A function which determines if a given node has child nodes. | ||
* Fires when the user selects a TreeView node. | ||
*/ | ||
this.hasChildren = function () { return false; }; | ||
this.selectionChange = new core_1.EventEmitter(); | ||
/** | ||
* A function which determines if a given node is expanded. | ||
* Determines whether the TreeView keyboard navigable is enabled. | ||
*/ | ||
this.isExpanded = function () { return false; }; | ||
this.navigable = true; | ||
/** | ||
* A function which determines if a given node is selected. | ||
* @hidden | ||
* Determines whether to render checkbox elements. | ||
*/ | ||
this.isSelected = function () { return false; }; | ||
this.checkboxes = false; | ||
this.data = new BehaviorSubject_1.BehaviorSubject([]); | ||
this.subscriptions = new Subscription_1.Subscription(function () { }); | ||
this._animate = true; | ||
this.resolvedPromise = Promise.resolve(null); | ||
/** | ||
@@ -142,7 +151,62 @@ * A function which provides the child nodes for a given parent node. | ||
}); | ||
Object.defineProperty(TreeViewComponent.prototype, "hasChildren", { | ||
/** | ||
* A function which determines if a specific node has child nodes. | ||
*/ | ||
get: function () { | ||
return this._hasChildren || default_callbacks_1.hasChildren; | ||
}, | ||
set: function (callback) { | ||
this._hasChildren = callback; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewComponent.prototype, "isChecked", { | ||
/** | ||
* A function which determines if a specific node is selected. | ||
*/ | ||
get: function () { | ||
return this._isChecked || default_callbacks_1.isChecked; | ||
}, | ||
set: function (callback) { | ||
this._isChecked = callback; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewComponent.prototype, "isExpanded", { | ||
/** | ||
* A function which determines if a specific node is expanded. | ||
*/ | ||
get: function () { | ||
return this._isExpanded || default_callbacks_1.isExpanded; | ||
}, | ||
set: function (callback) { | ||
this._isExpanded = callback; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewComponent.prototype, "isSelected", { | ||
/** | ||
* A function which determines if a specific node is selected. | ||
*/ | ||
get: function () { | ||
return this._isSelected || default_callbacks_1.isSelected; | ||
}, | ||
set: function (callback) { | ||
this._isSelected = callback; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleKeydown = function (e) { | ||
this.navigationService.move(e); | ||
TreeViewComponent.prototype.handleKeydown = function (args) { | ||
if (!this.isActive || !utils_1.hasActiveNode(args.target)) { | ||
return; | ||
} | ||
this.navigationService.move(args); | ||
}; | ||
@@ -153,14 +217,8 @@ /** | ||
TreeViewComponent.prototype.handleFocusin = function (_a) { | ||
var _this = this; | ||
var target = _a.target; | ||
var index = utils_1.nodeId(target); | ||
if (!index) { | ||
var node = utils_1.closestNode(target); | ||
if (!utils_1.hasActiveNode(target, node)) { | ||
return; | ||
} | ||
this.navigationService.activateIndex(index); | ||
Promise.resolve(null).then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.onFocus.emit(); | ||
} | ||
}); | ||
this.activateAndEmit(utils_1.nodeId(node)); | ||
}; | ||
@@ -172,7 +230,8 @@ /** | ||
var target = _a.target; | ||
this.handleFocusin({ target: target }); | ||
var index = utils_1.nodeId(target); | ||
if (!index) { | ||
var node = utils_1.closestNode(target); | ||
var index = utils_1.nodeId(node); | ||
if (!utils_1.hasActiveNode(target, node) || !index) { | ||
return; | ||
} | ||
this.activateAndEmit(index); | ||
this.navigationService.selectIndex(index); | ||
@@ -187,5 +246,6 @@ }; | ||
var index = target.getAttribute('data-treeindex'); | ||
Promise.resolve(null).then(function () { | ||
this.resolvedPromise.then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.navigationService.deactivate(); | ||
_this.isActive = false; | ||
_this.onBlur.emit(); | ||
@@ -195,2 +255,7 @@ } | ||
}; | ||
TreeViewComponent.prototype.ngOnChanges = function (_) { | ||
this.checkboxes = Boolean(this._isChecked); | ||
this.expandIcons = Boolean(this._isExpanded && this._hasChildren); | ||
this.navigationService.navigable = Boolean(this.navigable); | ||
}; | ||
TreeViewComponent.prototype.ngOnDestroy = function () { | ||
@@ -208,5 +273,68 @@ this.subscriptions.unsubscribe(); | ||
})); | ||
this.subscriptions.add(this.navigationService.checks | ||
.subscribe(function (x) { | ||
return _this.checkedChange.emit(_this.treeViewLookupService.itemLookup(x)); | ||
})); | ||
this.subscriptions.add(this.selectionService.changes | ||
.subscribe(function (x) { return _this.selectionChange.emit(x); })); | ||
}; | ||
/** | ||
* Blurs the focused TreeView item. | ||
*/ | ||
TreeViewComponent.prototype.blur = function () { | ||
if (!utils_1.isDocumentAvailable()) { | ||
return; | ||
} | ||
var target = utils_1.focusableNode(this.element); | ||
if (document.activeElement === target) { | ||
target.blur(); | ||
} | ||
}; | ||
/** | ||
* Focuses the first focusable item in the TreeView component if no hierarchical index is provided. | ||
* | ||
* @example | ||
* ```ts | ||
* import { Component } from '@angular/core'; | ||
* | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <button (click)="treeview.focus('1')">Focuses the second node</button> | ||
* <kendo-treeview | ||
* #treeview | ||
* [nodes]="data" | ||
* textField="text" | ||
* > | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { text: "Furniture" }, | ||
* { text: "Decor" } | ||
* ]; | ||
* } | ||
* ``` | ||
*/ | ||
TreeViewComponent.prototype.focus = function (index) { | ||
this.navigationService.activateIndex(index); | ||
var target = utils_1.focusableNode(this.element); | ||
if (target) { | ||
target.focus(); | ||
} | ||
}; | ||
TreeViewComponent.prototype.activateAndEmit = function (index) { | ||
var _this = this; | ||
if (!index) { | ||
return; | ||
} | ||
this.navigationService.activateIndex(index); | ||
this.resolvedPromise.then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.isActive = true; | ||
_this.onFocus.emit(); | ||
} | ||
}); | ||
}; | ||
TreeViewComponent.decorators = [ | ||
@@ -218,3 +346,3 @@ { type: core_1.Component, args: [{ | ||
selector: 'kendo-treeview', | ||
template: "\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n " | ||
template: "\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n " | ||
},] }, | ||
@@ -227,2 +355,4 @@ ]; | ||
{ type: selection_service_1.SelectionService, }, | ||
{ type: treeview_lookup_service_1.TreeViewLookupService, }, | ||
{ type: core_1.ElementRef, }, | ||
]; }; | ||
@@ -237,2 +367,3 @@ TreeViewComponent.propDecorators = { | ||
'collapse': [{ type: core_1.Output },], | ||
'checkedChange': [{ type: core_1.Output },], | ||
'selectionChange': [{ type: core_1.Output },], | ||
@@ -242,2 +373,7 @@ 'nodeTemplate': [{ type: core_1.ContentChild, args: [node_template_directive_1.NodeTemplateDirective,] },], | ||
'textField': [{ type: core_1.Input },], | ||
'hasChildren': [{ type: core_1.Input },], | ||
'isChecked': [{ type: core_1.Input },], | ||
'isExpanded': [{ type: core_1.Input },], | ||
'isSelected': [{ type: core_1.Input },], | ||
'navigable': [{ type: core_1.Input },], | ||
'handleKeydown': [{ type: core_1.HostListener, args: ['keydown', ['$event'],] },], | ||
@@ -247,5 +383,2 @@ 'handleFocusin': [{ type: core_1.HostListener, args: ['focusin', ['$event'],] },], | ||
'handleFocusout': [{ type: core_1.HostListener, args: ['focusout', ['$event'],] },], | ||
'hasChildren': [{ type: core_1.Input },], | ||
'isExpanded': [{ type: core_1.Input },], | ||
'isSelected': [{ type: core_1.Input },], | ||
'children': [{ type: core_1.Input },], | ||
@@ -252,0 +385,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"activateAndEmit":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"activateAndEmit":[{"__symbolic":"method"}]}}}}] |
@@ -7,2 +7,3 @@ "use strict"; | ||
var node_template_directive_1 = require("./node-template.directive"); | ||
var check_directive_1 = require("./check.directive"); | ||
var expand_directive_1 = require("./expand.directive"); | ||
@@ -15,2 +16,3 @@ var select_directive_1 = require("./selection/select.directive"); | ||
node_template_directive_1.NodeTemplateDirective, | ||
check_directive_1.CheckDirective, | ||
expand_directive_1.ExpandDirective, | ||
@@ -17,0 +19,0 @@ select_directive_1.SelectDirective, |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"./shared.module","name":"SharedModule"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"./shared.module","name":"SharedModule"}]}]}]}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"./shared.module","name":"SharedModule"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[[{"__symbolic":"reference","module":"./treeview.component","name":"TreeViewComponent"},{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./check.directive","name":"CheckDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__symbolic":"reference","module":"./selection/select.directive","name":"SelectDirective"},{"__symbolic":"reference","module":"./hierarchy-binding.directive","name":"HierarchyBindingDirective"},{"__symbolic":"reference","module":"./flat-binding.directive","name":"FlatDataBindingDirective"}]],"imports":[{"__symbolic":"reference","module":"./shared.module","name":"SharedModule"}]}]}]}}}] |
@@ -0,4 +1,11 @@ | ||
import { ElementRef } from '@angular/core'; | ||
import { NavigationItem } from './navigation/navigation-item.interface'; | ||
import { TreeItem } from './treeitem.interface'; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const noop: () => void; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const isPresent: Function; | ||
@@ -20,2 +27,6 @@ /** | ||
*/ | ||
export declare const isDocumentAvailable: () => boolean; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const isChanged: (propertyName: string, changes: any, skipFirstChange?: boolean) => boolean; | ||
@@ -29,6 +40,22 @@ /** | ||
*/ | ||
export declare const nodeId: (node: HTMLElement) => string; | ||
export declare const closestNode: (element: HTMLElement) => HTMLElement; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const noop: () => void; | ||
export declare const focusableNode: (element: ElementRef) => HTMLElement; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const hasActiveNode: (target: any, node?: any) => boolean; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const nodeId: (node?: HTMLElement) => string; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const nodeIndex: (item: NavigationItem | TreeItem) => string; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const guid: () => string; |
@@ -6,2 +6,6 @@ "use strict"; | ||
*/ | ||
exports.noop = function () { }; | ||
/** | ||
* @hidden | ||
*/ | ||
exports.isPresent = function (value) { return value !== null && value !== undefined; }; | ||
@@ -23,2 +27,6 @@ /** | ||
*/ | ||
exports.isDocumentAvailable = function () { return typeof document !== 'undefined'; }; | ||
/** | ||
* @hidden | ||
*/ | ||
exports.isChanged = function (propertyName, changes, skipFirstChange) { | ||
@@ -39,6 +47,38 @@ if (skipFirstChange === void 0) { skipFirstChange = true; } | ||
*/ | ||
exports.nodeId = function (node) { return node.getAttribute('data-treeindex'); }; | ||
exports.closestNode = function (element) { return element.closest('li.k-item'); }; | ||
/** | ||
* @hidden | ||
*/ | ||
exports.noop = function () { }; | ||
exports.focusableNode = function (element) { return element.nativeElement.querySelector('li[tabindex="0"]'); }; | ||
/** | ||
* @hidden | ||
*/ | ||
exports.hasActiveNode = function (target, node) { | ||
var closestItem = node || exports.closestNode(target); | ||
return closestItem && (closestItem === target || target.tabIndex < 0); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
exports.nodeId = function (node) { | ||
if (node === void 0) { node = { getAttribute: exports.noop }; } | ||
return node.getAttribute('data-treeindex'); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
exports.nodeIndex = function (item) { return (item || {}).index; }; | ||
/** | ||
* @hidden | ||
*/ | ||
exports.guid = function () { | ||
var id = "", random; | ||
for (var i = 0; i < 32; i++) { | ||
random = Math.random() * 16 | 0; // tslint:disable-line:no-bitwise | ||
if (i === 8 || i === 12 || i === 16 || i === 20) { | ||
id += "-"; | ||
} | ||
id += (i === 12 ? 4 : (i === 16 ? (random & 3 | 8) : random)).toString(16); // tslint:disable-line:no-bitwise | ||
} | ||
return id; | ||
}; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"isPresent":{"__symbolic":"error","message":"Function call not supported","line":3,"character":35},"isBlank":{"__symbolic":"error","message":"Function call not supported","line":8,"character":23},"isArray":{"__symbolic":"error","message":"Function call not supported","line":13,"character":23},"isNullOrEmptyString":{"__symbolic":"error","message":"Function call not supported","line":18,"character":35},"isChanged":{"__symbolic":"error","message":"Function call not supported","line":23,"character":25},"anyChanged":{"__symbolic":"error","message":"Function call not supported","line":31,"character":26},"nodeId":{"__symbolic":"error","message":"Function call not supported","line":37,"character":22},"noop":{"__symbolic":"error","message":"Function call not supported","line":42,"character":20}}},{"__symbolic":"module","version":1,"metadata":{"isPresent":{"__symbolic":"error","message":"Function call not supported","line":3,"character":35},"isBlank":{"__symbolic":"error","message":"Function call not supported","line":8,"character":23},"isArray":{"__symbolic":"error","message":"Function call not supported","line":13,"character":23},"isNullOrEmptyString":{"__symbolic":"error","message":"Function call not supported","line":18,"character":35},"isChanged":{"__symbolic":"error","message":"Function call not supported","line":23,"character":25},"anyChanged":{"__symbolic":"error","message":"Function call not supported","line":31,"character":26},"nodeId":{"__symbolic":"error","message":"Function call not supported","line":37,"character":22},"noop":{"__symbolic":"error","message":"Function call not supported","line":42,"character":20}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"noop":{"__symbolic":"error","message":"Function call not supported","line":7,"character":20},"isPresent":{"__symbolic":"error","message":"Function call not supported","line":12,"character":35},"isBlank":{"__symbolic":"error","message":"Function call not supported","line":17,"character":23},"isArray":{"__symbolic":"error","message":"Function call not supported","line":22,"character":23},"isNullOrEmptyString":{"__symbolic":"error","message":"Function call not supported","line":27,"character":35},"isDocumentAvailable":{"__symbolic":"error","message":"Function call not supported","line":32,"character":35},"isChanged":{"__symbolic":"error","message":"Function call not supported","line":37,"character":25},"anyChanged":{"__symbolic":"error","message":"Function call not supported","line":45,"character":26},"closestNode":{"__symbolic":"error","message":"Function call not supported","line":51,"character":27},"focusableNode":{"__symbolic":"error","message":"Function call not supported","line":56,"character":29},"hasActiveNode":{"__symbolic":"error","message":"Function call not supported","line":61,"character":29},"nodeId":{"__symbolic":"error","message":"Function call not supported","line":69,"character":22},"nodeIndex":{"__symbolic":"error","message":"Function call not supported","line":74,"character":25},"guid":{"__symbolic":"error","message":"Function call not supported","line":79,"character":20}}},{"__symbolic":"module","version":1,"metadata":{"noop":{"__symbolic":"error","message":"Function call not supported","line":7,"character":20},"isPresent":{"__symbolic":"error","message":"Function call not supported","line":12,"character":35},"isBlank":{"__symbolic":"error","message":"Function call not supported","line":17,"character":23},"isArray":{"__symbolic":"error","message":"Function call not supported","line":22,"character":23},"isNullOrEmptyString":{"__symbolic":"error","message":"Function call not supported","line":27,"character":35},"isDocumentAvailable":{"__symbolic":"error","message":"Function call not supported","line":32,"character":35},"isChanged":{"__symbolic":"error","message":"Function call not supported","line":37,"character":25},"anyChanged":{"__symbolic":"error","message":"Function call not supported","line":45,"character":26},"closestNode":{"__symbolic":"error","message":"Function call not supported","line":51,"character":27},"focusableNode":{"__symbolic":"error","message":"Function call not supported","line":56,"character":29},"hasActiveNode":{"__symbolic":"error","message":"Function call not supported","line":61,"character":29},"nodeId":{"__symbolic":"error","message":"Function call not supported","line":69,"character":22},"nodeIndex":{"__symbolic":"error","message":"Function call not supported","line":74,"character":25},"guid":{"__symbolic":"error","message":"Function call not supported","line":79,"character":20}}}] |
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-angular-treeview",["tslib","@angular/core","rxjs/Subscription","rxjs/Observable","rxjs/BehaviorSubject","rxjs/add/observable/merge","rxjs/add/operator/map","rxjs/add/observable/of","@angular/common","rxjs/Subject","rxjs/add/operator/filter","rxjs/add/operator/do","rxjs/add/operator/takeUntil","rxjs/add/operator/delay","@angular/animations","rxjs/add/operator/switchMap","rxjs/add/operator/catch","rxjs/add/observable/empty"],function(e){function t(e){return e.__useDefault?e.default:e}var n,i,r,o,a,s,d,c,u,p,l,h,f,v,y,_,g,m;return{setters:[function(e){n=t(e)},function(e){i=t(e)},function(e){r=t(e)},function(e){o=t(e)},function(e){a=t(e)},function(e){s=t(e)},function(e){d=t(e)},function(e){c=t(e)},function(e){u=t(e)},function(e){p=t(e)},function(e){l=t(e)},function(e){h=t(e)},function(e){f=t(e)},function(e){v=t(e)},function(e){y=t(e)},function(e){_=t(e)},function(e){g=t(e)},function(e){m=t(e)}],execute:function(){!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};t.m=e,t.c=n,t.p="",t(0)}([function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=i(1);n.TreeViewComponent=r.TreeViewComponent;var o=i(17);n.TreeViewModule=o.TreeViewModule;var a=i(4);n.NodeTemplateDirective=a.NodeTemplateDirective;var s=i(27);n.ExpandDirective=s.ExpandDirective;var d=i(30);n.SelectDirective=d.SelectDirective;var c=i(31);n.HierarchyBindingDirective=c.HierarchyBindingDirective;var u=i(37);n.FlatDataBindingDirective=u.FlatDataBindingDirective,function(t){for(var n in t)e(n,t[n])}(n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),a=n(5),s=n(7),d=n(8),c=n(11),u=n(12),p=n(13),l=n(14),h=n(15),f=n(16),v=[a.ExpandStateService,s.IndexBuilderService,h.LoadingNotificationService,d.NavigationService,c.SelectionService],y=function(){function e(e,t,n){this.expandService=e,this.navigationService=t,this.selectionService=n,this.classNames=!0,this.onBlur=new r.EventEmitter,this.onFocus=new r.EventEmitter,this.expand=new r.EventEmitter,this.collapse=new r.EventEmitter,this.selectionChange=new r.EventEmitter,this.data=new p.BehaviorSubject([]),this.subscriptions=new u.Subscription(function(){}),this._animate=!0,this.hasChildren=function(){return!1},this.isExpanded=function(){return!1},this.isSelected=function(){return!1},this.children=function(){return l.Observable.of([])}}return Object.defineProperty(e.prototype,"role",{get:function(){return"tree"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return!this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nodes",{set:function(e){this.data.next(e)},enumerable:!0,configurable:!0}),e.prototype.handleKeydown=function(e){this.navigationService.move(e)},e.prototype.handleFocusin=function(e){var t=this,n=e.target,i=f.nodeId(n);i&&(this.navigationService.activateIndex(i),Promise.resolve(null).then(function(){t.navigationService.isActive(i)&&t.onFocus.emit()}))},e.prototype.handleClick=function(e){var t=e.target;this.handleFocusin({target:t});var n=f.nodeId(t);n&&this.navigationService.selectIndex(n)},e.prototype.handleFocusout=function(e){var t=this,n=e.target.getAttribute("data-treeindex");Promise.resolve(null).then(function(){t.navigationService.isActive(n)&&(t.navigationService.deactivate(),t.onBlur.emit())})},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.expandService.changes.subscribe(function(t){var n=t.index,i=t.dataItem;return t.expand?e.expand.emit({index:n,dataItem:i}):e.collapse.emit({index:n,dataItem:i})})),this.subscriptions.add(this.selectionService.changes.subscribe(function(t){return e.selectionChange.emit(t)}))},i.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-treeview"),i.__metadata("design:type",Boolean)],e.prototype,"classNames",void 0),i.__decorate([r.HostBinding("attr.role"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"role",null),i.__decorate([r.Input(),r.HostBinding("@.disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"animate",null),i.__decorate([r.Output("blur"),i.__metadata("design:type",r.EventEmitter)],e.prototype,"onBlur",void 0),i.__decorate([r.Output("focus"),i.__metadata("design:type",r.EventEmitter)],e.prototype,"onFocus",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"expand",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"collapse",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"selectionChange",void 0),i.__decorate([r.ContentChild(o.NodeTemplateDirective),i.__metadata("design:type",o.NodeTemplateDirective)],e.prototype,"nodeTemplate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"textField",void 0),i.__decorate([r.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleKeydown",null),i.__decorate([r.HostListener("focusin",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleFocusin",null),i.__decorate([r.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleClick",null),i.__decorate([r.HostListener("focusout",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleFocusout",null),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"hasChildren",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isExpanded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"children",void 0),e=i.__decorate([r.Component({changeDetection:r.ChangeDetectionStrategy.OnPush,exportAs:"kendoTreeView",providers:v,selector:"kendo-treeview",template:'\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n role="group"\n [children]="children"\n [hasChildren]="hasChildren"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplate?.templateRef"\n [nodes]="data"\n [textField]="textField"\n >\n </ul>\n '}),i.__metadata("design:paramtypes",[a.ExpandStateService,d.NavigationService,c.SelectionService])],e)}();t.TreeViewComponent=y},function(e,t){e.exports=n},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(){function e(e){this.templateRef=e}return e=i.__decorate([r.Directive({selector:"[kendoTreeViewNodeTemplate]"}),i.__param(0,r.Optional()),i.__metadata("design:paramtypes",[r.TemplateRef])],e)}();t.NodeTemplateDirective=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.expand=function(e,t){this.changes.next({dataItem:t,index:e,expand:!0})},e.prototype.collapse=function(e,t){this.changes.next({dataItem:t,index:e,expand:!1})},e=i.__decorate([r.Injectable()],e)}();t.ExpandStateService=a},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(){function e(){this.INDEX_SEPARATOR="_"}return e.prototype.nodeIndex=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),""+t+(t?this.INDEX_SEPARATOR:"")+e},e.prototype.indexForLevel=function(e,t){return e.split(this.INDEX_SEPARATOR).slice(0,t).join(this.INDEX_SEPARATOR)},e.prototype.level=function(e){return e.split(this.INDEX_SEPARATOR).length},e=i.__decorate([r.Injectable()],e)}();t.IndexBuilderService=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(9),a=n(6),s=n(10),d=function(e){return(e||{}).index},c=function(e,t){return e[t]||e},u=function(){function e(){var e=this;this.expands=new a.Subject,this.moves=new a.Subject,this.selects=new a.Subject,this.actions=(t={},t[s.Keys.up]=function(){return e.activate(c(e.focusableItem,"prev"))},t[s.Keys.down]=function(){return e.activate(c(e.focusableItem,"next"))},t[s.Keys.left]=function(){return e.expand({expand:!1,intercept:e.moveToParent.bind(e)})},t[s.Keys.right]=function(){return e.expand({expand:!0,intercept:e.moveToChild.bind(e)})},t[s.Keys.home]=function(){return e.activate(e.model.firstNode())},t[s.Keys.end]=function(){return e.activate(e.model.lastNode())},t[s.Keys.enter]=function(){return e.selectActiveItem()},t[s.Keys.space]=function(){return e.selectActiveItem()},t),this.isFocused=!1,this._model=new o.NavigationModel;var t}return Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return d(this.activeItem)||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusableItem",{get:function(){return this.activeItem||this.model.firstNode()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActiveExpanded",{get:function(){return this.activeItem&&this.activeItem.children.length>0},enumerable:!0,configurable:!0}),e.prototype.activate=function(e){e&&!this.isActive(d(e))&&(this.isFocused=!0,this.activeItem=e||this.activeItem,this.notifyMove())},e.prototype.activateParent=function(e){this.activate(this.model.findParent(e))},e.prototype.activateIndex=function(e){this.activate(this.model.findNode(e))},e.prototype.deactivate=function(){this.isFocused&&(this.isFocused=!1,this.notifyMove())},e.prototype.selectIndex=function(e){this.isActive(e)&&this.selects.next(e)},e.prototype.isActive=function(e){return!!e&&(this.isFocused&&this.activeIndex===e)},e.prototype.isFocusable=function(e){return d(this.focusableItem)===e},e.prototype.registerItem=function(e){this.model.registerItem(e)},e.prototype.unregisterItem=function(e){this.isActive(e)&&this.activateParent(e),this.model.unregisterItem(e)},e.prototype.move=function(e){var t=this.actions[e.keyCode];t&&(t(),e.preventDefault())},e.prototype.expand=function(e){var t=e.expand,n=e.intercept,i=d(this.activeItem);i&&!n(i)&&this.notifyExpand(t)},e.prototype.moveToParent=function(){return!this.isActiveExpanded&&(this.activate(this.model.findParent(d(this.activeItem))),!0)},e.prototype.moveToChild=function(){return!!this.isActiveExpanded&&(this.activate(this.model.findChild(d(this.activeItem))),!0)},e.prototype.selectActiveItem=function(){this.selectIndex(d(this.activeItem))},e.prototype.notifyExpand=function(e){this.expands.next(this.navigationState(e))},e.prototype.notifyMove=function(){this.moves.next(this.navigationState())},e.prototype.navigationState=function(e){return void 0===e&&(e=!1),{expand:e,index:d(this.activeItem),isFocused:this.isFocused}},e=i.__decorate([r.Injectable()],e)}();t.NavigationService=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=function(e){return e[e.length-1]},o=function(e){return function(e){return e||{}}(e).children||[]},a=function(e){for(var t=e,n=[].concat(o(e));n.length;)t=(n=n.concat(o(r(n)))).shift();return t},s=function(){function e(){this.ib=new i.IndexBuilderService,this.nodes=[]}return e.prototype.firstNode=function(){return this.nodes[0]||null},e.prototype.lastNode=function(){var e=this.nodes[this.nodes.length-1];return e?a(r(this.container(e)))||e:null},e.prototype.findNode=function(e){return this.find(e,this.nodes)},e.prototype.findParent=function(e){var t=this.ib.level(e)-1;return this.findNode(this.ib.indexForLevel(e,t))},e.prototype.findChild=function(e){return o(this.findNode(e))[0]||null},e.prototype.registerItem=function(e){var t=this.ib.level(e),n=this.findParent(e);if(n||1===t){var i={children:[],index:e,parent:n,prev:this.prevNode(n),next:this.nextNode(n)};this.container(n).push(i),function(e){var t=e.prev,n=e.next;t&&(t.next=e),n&&(n.prev=e)}(i)}},e.prototype.unregisterItem=function(e){var t=this.find(e,this.nodes);if(t){!function(e){var t=e.prev,n=e.next;t&&(t.next=n),n&&(n.prev=t)}(t);var n=this.container(t.parent);n.splice(n.indexOf(t),1)}},e.prototype.childLevel=function(e){return e&&e.length?this.ib.level(e[0].index):1},e.prototype.find=function(e,t){var n=this.childLevel(t),i=this.ib.indexForLevel(e,n),r=n===this.ib.level(e),o=t.find(function(e){return e.index===i});return o?r?o:this.find(e,o.children):null},e.prototype.container=function(e){return e?e.children:this.nodes},e.prototype.prevNode=function(e){return a(r(this.container(e)))||e||null},e.prototype.nextNode=function(e){if(!e)return null;var t=this.container(this.findParent(e.index));return t[t.indexOf(e)+1]||null},e}();t.NavigationModel=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.enter=13]="enter",e[e.shift=16]="shift",e[e.space=32]="space",e[e.end=35]="end",e[e.home=36]="home",e[e.left=37]="left",e[e.up=38]="up",e[e.right=39]="right",e[e.down=40]="down"}(t.Keys||(t.Keys={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.isFirstSelected=function(e){return this.firstIndex===e},e.prototype.setFirstSelected=function(e,t){this.firstIndex===e&&!1===t?this.firstIndex=null:!this.firstIndex&&t&&(this.firstIndex=e)},e.prototype.select=function(e,t){this.changes.next({dataItem:t,index:e})},e=i.__decorate([r.Injectable()],e)}();t.SelectionService=a},function(e,t){e.exports=r},function(e,t){e.exports=a},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.notifyLoaded=function(e){this.changes.next(e)},e=i.__decorate([r.Injectable()],e)}();t.LoadingNotificationService=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPresent=function(e){return null!==e&&void 0!==e},t.isBlank=function(e){return null===e||void 0===e},t.isArray=function(e){return Array.isArray(e)},t.isNullOrEmptyString=function(e){return t.isBlank(e)||0===e.trim().length},t.isChanged=function(e,t,n){return void 0===n&&(n=!0),t[e]&&(!t[e].isFirstChange()||!n)&&t[e].previousValue!==t[e].currentValue},t.anyChanged=function(e,n,i){return void 0===i&&(i=!0),e.some(function(e){return t.isChanged(e,n,i)})},t.nodeId=function(e){return e.getAttribute("data-treeindex")},t.noop=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(18),s=n(4),d=n(27),c=n(30),u=n(31),p=n(37),l=[o.TreeViewComponent,s.NodeTemplateDirective,d.ExpandDirective,c.SelectDirective,u.HierarchyBindingDirective,p.FlatDataBindingDirective],h=function(){function e(){}return e=i.__decorate([r.NgModule({exports:[l],imports:[a.SharedModule]})],e)}();t.TreeViewModule=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(19),s=n(26),d=n(4),c=n(27),u=n(30),p=n(31),l=n(32),h=n(37),f=n(39),v=n(40),y=[o.TreeViewComponent,a.TreeViewGroupComponent,f.TreeViewItemDirective,v.TreeViewItemContentDirective,d.NodeTemplateDirective,c.ExpandDirective,u.SelectDirective,p.HierarchyBindingDirective,l.LoadingIndicatorDirective,h.FlatDataBindingDirective],_=function(){function e(){}return e=i.__decorate([r.NgModule({declarations:[y],exports:[y],imports:[s.CommonModule]})],e)}();t.SharedModule=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(20),a=n(5),s=n(7),d=n(16),c=n(21),u=n(15),p=n(14);n(22),n(23),n(24),n(25);var l=function(){function e(e,t,n,i){this.expandService=e,this.loadingService=t,this.indexBuilder=n,this.cd=i,this.kGroupClass=!0,this.textField="",this.data=[],this.hasChildren=function(){return!1},this.isExpanded=function(){return!1},this.isSelected=function(){return!1},this.children=function(){return p.Observable.of([])}}return Object.defineProperty(e.prototype,"role",{get:function(){return"group"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTemplate",{get:function(){return d.isPresent(this.nodeTemplateRef)},enumerable:!0,configurable:!0}),e.prototype.expandNode=function(e,t,n){n?this.expandService.expand(e,t):this.expandService.collapse(e,t)},e.prototype.nodeIndex=function(e){return this.indexBuilder.nodeIndex(e.toString(),this.parentIndex)},e.prototype.nodeText=function(e){var t=d.isArray(this.textField)?this.textField[0]:this.textField;return c.getter(t,!0)(e)},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscription=this.nodes.subscribe(function(t){e.data=t,e.cd.markForCheck()})},e.prototype.fetchChildren=function(e,t){var n=this;return this.children(e).catch(function(){return n.loadingService.notifyLoaded(t),p.Observable.empty()}).do(function(){return n.loadingService.notifyLoaded(t)})},Object.defineProperty(e.prototype,"nextFields",{get:function(){return d.isArray(this.textField)?this.textField.length>1?this.textField.slice(1):this.textField:[this.textField]},enumerable:!0,configurable:!0}),i.__decorate([r.HostBinding("class.k-group"),i.__metadata("design:type",Boolean)],e.prototype,"kGroupClass",void 0),i.__decorate([r.HostBinding("attr.role"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"role",null),i.__decorate([r.Input(),i.__metadata("design:type",p.Observable)],e.prototype,"nodes",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"textField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"parentIndex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",r.TemplateRef)],e.prototype,"nodeTemplateRef",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"hasChildren",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isExpanded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"children",void 0),e=i.__decorate([r.Component({animations:[o.trigger("toggle",[o.transition("void => *",[o.style({height:0}),o.animate("0.1s ease-in",o.style({height:"*"}))]),o.transition("* => void",[o.style({height:"*"}),o.animate("0.1s ease-in",o.style({height:0}))])])],selector:"[kendoTreeViewGroup]",template:'\n <li\n *ngFor="let node of data; let index = index" class="k-item"\n kendoTreeViewItem\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [isExpanded]="isExpanded(node, nodeIndex(index))"\n [isSelected]="isSelected(node, nodeIndex(index))"\n [attr.data-treeindex]="nodeIndex(index)"\n [@toggle]="true"\n >\n <div class="k-mid">\n <span\n class="k-icon"\n [class.k-i-collapse]="isExpanded(node, nodeIndex(index))"\n [class.k-i-expand]="!isExpanded(node, nodeIndex(index))"\n [kendoTreeViewLoading]="nodeIndex(index)"\n (click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="hasChildren(node)"\n >\n </span>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]="nodeIndex(index)"\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [isSelected]="isSelected"\n class="k-in"\n >\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef" [ngTemplateOutletContext]="{$implicit: node}"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf="isExpanded(node, nodeIndex(index)) && hasChildren(node)"\n kendoTreeViewGroup\n role="group"\n [nodes]="fetchChildren(node, nodeIndex(index))"\n [children]="children"\n [hasChildren]="hasChildren"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [textField]="nextFields"\n >\n </ul>\n </li>\n '}),i.__metadata("design:paramtypes",[a.ExpandStateService,u.LoadingNotificationService,s.IndexBuilderService,r.ChangeDetectorRef])],e)}();t.TreeViewGroupComponent=l},function(e,t){e.exports=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(16),r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,o={};o[void 0]=function(e){return e},t.getter=function(e,t){var n=e+t;if(o[n])return o[n];var a=[];return e.replace(r,function(e,t,n,r){a.push(i.isPresent(t)?t:n||r)}),o[n]=function(e){for(var n=e,r=0;r<a.length;r++)if(n=n[a[r]],!i.isPresent(n)&&t)return n;return n},o[n]}},function(e,t){e.exports=h},function(e,t){e.exports=g},function(e,t){e.exports=c},function(e,t){e.exports=m},function(e,t){e.exports=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(12),s=n(14);n(28),n(29);var d=function(){function e(e){this.treeView=e,this.expandedKeysChange=new r.EventEmitter,this.expandedKeys=[],this.subscriptions=new a.Subscription(function(){})}return Object.defineProperty(e.prototype,"isExpanded",{set:function(e){this.treeView.isExpanded=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(s.Observable.merge(this.treeView.expand.map(function(e){return i.__assign({expand:!0},e)}),this.treeView.collapse.map(function(e){return i.__assign({expand:!1},e)})).subscribe(this.toggleExpand.bind(this))),this.treeView.isExpanded=function(t,n){return e.expandedKeys.indexOf(e.itemKey({dataItem:t,index:n}))>-1}},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.itemKey=function(e){if(this.expandKey){if("string"==typeof this.expandKey)return e.dataItem[this.expandKey];if("function"==typeof this.expandKey)return this.expandKey(e)}return e.index},e.prototype.toggleExpand=function(e){var t=e.index,n=e.dataItem,i=e.expand,r=this.itemKey({index:t,dataItem:n}),o=this.expandedKeys.indexOf(r),a=!1;o>-1&&!i?(this.expandedKeys.splice(o,1),a=!0):-1===o&&i&&(this.expandedKeys.push(r),a=!0),a&&this.expandedKeysChange.emit(this.expandedKeys)},i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isExpanded",null),i.__decorate([r.Input("kendoTreeViewExpandBy"),i.__metadata("design:type",Object)],e.prototype,"expandKey",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"expandedKeysChange",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"expandedKeys",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewExpandBy]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.ExpandDirective=d},function(e,t){e.exports=s},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(16),s=n(12);n(28),n(29);var d=function(){function e(e){var t=this;this.treeView=e,this.selectedKeys=[],this.selectedKeysChange=new r.EventEmitter,this.subscriptions=new s.Subscription(function(){}),this.selectActions={multiple:function(e){return t.selectMultiple(e)},single:function(e){return t.selectSingle(e)}}}return Object.defineProperty(e.prototype,"isSelected",{set:function(e){this.treeView.isSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getAriaMultiselectable",{get:function(){return"multiple"===this.options.mode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var e={checkboxOnly:!1,enabled:!0,mode:"single"};if(!a.isPresent(this.selection))return e;var t="boolean"==typeof this.selection?{enabled:this.selection}:this.selection;return Object.assign(e,t)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this))),this.treeView.isSelected=function(t,n){return e.selectedKeys.indexOf(e.itemKey({dataItem:t,index:n}))>-1}},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.itemKey=function(e){return this.selectKey?"string"==typeof this.selectKey?e.dataItem[this.selectKey]:"function"==typeof this.selectKey?this.selectKey(e):void 0:e.index},e.prototype.select=function(e){var t=this.options,n=t.enabled,i=t.mode,r=this.selectActions[i]||a.noop;n&&r(e)},e.prototype.selectSingle=function(e){var t=this.itemKey(e);this.selectedKeys[0]!==t&&(this.selectedKeys=[t],this.notify())},e.prototype.selectMultiple=function(e){var t=this.itemKey(e),n=this.selectedKeys.indexOf(t);a.isPresent(t)&&(n>-1?this.selectedKeys.splice(n,1):this.selectedKeys.push(t),this.notify())},e.prototype.notify=function(){this.selectedKeysChange.emit(this.selectedKeys)},i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isSelected",null),i.__decorate([r.Input("kendoTreeViewSelectBy"),i.__metadata("design:type",Object)],e.prototype,"selectKey",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"selection",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"selectedKeys",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"selectedKeysChange",void 0),i.__decorate([r.HostBinding("attr.aria-multiselectable"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],e.prototype,"getAriaMultiselectable",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewSelectBy]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.SelectDirective=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(21),s=n(16),d=n(14);n(24);var c=function(){function e(e){this.treeView=e}return Object.defineProperty(e.prototype,"childrenField",{get:function(){return this._childrenField},set:function(e){if(!e)throw new Error("'childrenField' cannot be empty");this._childrenField=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;s.isPresent(this.childrenField)&&(this.treeView.children=function(t){return d.Observable.of(a.getter(e.childrenField,!0)(t))},this.treeView.hasChildren=function(t){return e.childrenField in t})},i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],e.prototype,"childrenField",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewHierarchyBinding]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.HierarchyBindingDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(5),a=n(15),s=n(14);n(33),n(34),n(35),n(36),n(24);var d=function(){function e(e,t,n){this.expandService=e,this.loadingService=t,this.cd=n,this._loading=!1}return Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this,t=this.loadingService.changes.filter(function(t){return t===e.index});this.subscription=this.expandService.changes.filter(function(t){return t.index===e.index}).do(function(t){!t.expand&&e.loading&&(e.loading=!1)}).filter(function(e){return e.expand}).switchMap(function(e){return s.Observable.of(e).delay(100).takeUntil(t)}).subscribe(function(){return e.loading=!0}),this.subscription.add(t.subscribe(function(){return e.loading=!1}))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},i.__decorate([r.HostBinding("class.k-i-loading"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"loading",null),i.__decorate([r.Input("kendoTreeViewLoading"),i.__metadata("design:type",String)],e.prototype,"index",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewLoading]"}),i.__metadata("design:paramtypes",[o.ExpandStateService,a.LoadingNotificationService,r.ChangeDetectorRef])],e)}();t.LoadingIndicatorDirective=d},function(e,t){e.exports=l},function(e,t){e.exports=v},function(e,t){e.exports=f},function(e,t){e.exports=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(21),s=n(16),d=n(38),c=n(14),u=function(){function e(e){this.treeView=e,this.originalData=[]}return Object.defineProperty(e.prototype,"nodes",{set:function(e){if(this.originalData=e||[],s.isNullOrEmptyString(this.parentIdField))this.treeView.nodes=this.originalData.slice(0);else{var t=a.getter(this.parentIdField,!0);this.treeView.nodes=this.originalData.filter(d.compose(s.isBlank,t))}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;if(s.isPresent(this.parentIdField)&&s.isPresent(this.idField)){var t=function(t){return function(e,t,n){return t.filter(function(t){return e(t)===n})}(a.getter(e.parentIdField,!0),e.originalData||[],a.getter(e.idField,!0)(t))};this.treeView.hasChildren=function(e){return t(e).length>0},this.treeView.children=function(e){return c.Observable.of(t(e))}}},e.prototype.ngOnChanges=function(e){s.isChanged("parentIdField",e,!1)&&(this.nodes=this.originalData)},i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"parentIdField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"idField",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewFlatDataBinding]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.FlatDataBindingDirective=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduceRight(function(e,t){return t(e)},t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(8),a=n(11),s=n(5),d=n(7),c=n(16);n(33);var u=function(){function e(e,t,n,i,r,o){this.element=e,this.expandService=t,this.navigationService=n,this.selectionService=i,this.renderer=r,this.ib=o,this.isInitialized=!1,this.subscriptions=[],this.subscribe()}return Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded||!1},set:function(e){this._isExpanded=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected||!1},set:function(e){this._isSelected=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.navigationService.registerItem(this.index),this.activateItem(),this.isInitialized=!0,this.setAttribute("role","treeitem"),this.setAriaAttributes(),this.updateTabIndex()},e.prototype.ngOnChanges=function(e){var t=e.index;(t||e.isExpanded||e.isSelected)&&this.setAriaAttributes(),this.moveNode(t)},e.prototype.ngOnDestroy=function(){this.navigationService.unregisterItem(this.index),this.subscriptions.map(function(e){return e.unsubscribe()}),this.subscriptions=[]},e.prototype.subscribe=function(){var e=this;this.subscriptions=[this.navigationService.moves.subscribe(function(){e.updateTabIndex(),e.focusItem()}),this.navigationService.expands.filter(function(t){return t.index===e.index}).subscribe(function(t){var n=t.expand;return e.expand(n)})]},e.prototype.activateItem=function(){var e=this.navigationService,t=this.selectionService,n=this.index;t.setFirstSelected(n,this.isSelected),!e.isActive(n)&&t.isFirstSelected(n)&&e.activateIndex(n)},e.prototype.expand=function(e){this.expandService[e?"expand":"collapse"](this.index,this.dataItem)},e.prototype.isFocusable=function(){return this.navigationService.isFocusable(this.index)},e.prototype.focusItem=function(){this.isInitialized&&this.navigationService.isActive(this.index)&&this.element.nativeElement.focus()},e.prototype.moveNode=function(e){void 0===e&&(e={});var t=e.currentValue,n=e.firstChange,i=e.previousValue;!n&&c.isPresent(t)&&c.isPresent(i)&&(this.navigationService.unregisterItem(i),this.navigationService.registerItem(t))},e.prototype.setAriaAttributes=function(){this.setAttribute("aria-level",this.ib.level(this.index).toString()),this.setAttribute("aria-expanded",this.isExpanded.toString()),this.setAttribute("aria-selected",this.isSelected.toString())},e.prototype.updateTabIndex=function(){this.setAttribute("tabIndex",this.isFocusable()?"0":"-1")},e.prototype.setAttribute=function(e,t){this.renderer.setAttribute(this.element.nativeElement,e,t)},i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"index",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"isExpanded",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"isSelected",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewItem]"}),i.__metadata("design:paramtypes",[r.ElementRef,s.ExpandStateService,o.NavigationService,a.SelectionService,r.Renderer2,d.IndexBuilderService])],e)}();t.TreeViewItemDirective=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(8),a=n(11),s=n(12);n(33),n(22);var d=function(){function e(e,t,n,i){var r=this;this.element=e,this.navigationService=t,this.selectionService=n,this.renderer=i,this.subscriptions=new s.Subscription(function(){}),this.subscriptions.add(this.navigationService.moves.subscribe(this.updateItem.bind(this))),this.subscriptions.add(this.navigationService.selects.filter(function(e){return e===r.index}).subscribe(function(e){return r.selectionService.select(e,r.dataItem)})),this.subscriptions.add(this.selectionService.changes.subscribe(this.updateSelection.bind(this)))}return e.prototype.ngOnInit=function(){this.updateSelection()},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.updateItem=function(){this.render(this.navigationService.isActive(this.index),"k-state-focused")},e.prototype.updateSelection=function(){this.render(this.isSelected(this.dataItem,this.index),"k-state-selected")},e.prototype.render=function(e,t){var n=e?"addClass":"removeClass";this.renderer[n](this.element.nativeElement,t)},i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"index",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewItemContent]"}),i.__metadata("design:paramtypes",[r.ElementRef,o.NavigationService,a.SelectionService,r.Renderer2])],e)}();t.TreeViewItemContentDirective=d}])}}}); | ||
System.register("@progress/kendo-angular-treeview",["tslib","@angular/core","rxjs/Subscription","rxjs/BehaviorSubject","rxjs/Observable","rxjs/add/observable/merge","rxjs/add/operator/map","rxjs/add/observable/of","rxjs/Subject","@angular/common","rxjs/add/operator/catch","@angular/animations","rxjs/add/operator/do","rxjs/add/operator/filter","rxjs/add/observable/empty","rxjs/add/operator/takeUntil","rxjs/add/operator/switchMap","rxjs/add/operator/delay"],function(e){var t,n,i,r,o,a,s,d,c,p,u,l,h,f,v,y,m,_;function g(e){return e.__useDefault?e.default:e}return{setters:[function(e){t=g(e)},function(e){n=g(e)},function(e){i=g(e)},function(e){r=g(e)},function(e){o=g(e)},function(e){a=g(e)},function(e){s=g(e)},function(e){d=g(e)},function(e){c=g(e)},function(e){p=g(e)},function(e){u=g(e)},function(e){l=g(e)},function(e){h=g(e)},function(e){f=g(e)},function(e){v=g(e)},function(e){y=g(e)},function(e){m=g(e)},function(e){_=g(e)}],execute:function(){!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}n.m=e,n.c=t,n.p="",n(0)}([function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=i(1);n.TreeViewComponent=r.TreeViewComponent;var o=i(19);n.TreeViewModule=o.TreeViewModule;var a=i(4);n.NodeTemplateDirective=a.NodeTemplateDirective;var s=i(29);n.CheckDirective=s.CheckDirective;var d=i(32);n.ExpandDirective=d.ExpandDirective;var c=i(33);n.SelectDirective=c.SelectDirective;var p=i(34);n.HierarchyBindingDirective=p.HierarchyBindingDirective;var u=i(40);n.FlatDataBindingDirective=u.FlatDataBindingDirective,function(t){for(var n in t)e(n,t[n])}(n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),a=n(5),s=n(7),d=n(8),c=n(9),p=n(13),u=n(14),l=n(11),h=n(15),f=n(16),v=n(17),y=n(18),m=[a.ExpandStateService,s.IndexBuilderService,u.TreeViewLookupService,d.LoadingNotificationService,c.NavigationService,p.SelectionService],_=function(){function e(e,t,n,i,o){this.expandService=e,this.navigationService=t,this.selectionService=n,this.treeViewLookupService=i,this.element=o,this.classNames=!0,this.onBlur=new r.EventEmitter,this.onFocus=new r.EventEmitter,this.expand=new r.EventEmitter,this.collapse=new r.EventEmitter,this.checkedChange=new r.EventEmitter,this.selectionChange=new r.EventEmitter,this.navigable=!0,this.checkboxes=!1,this.data=new v.BehaviorSubject([]),this.subscriptions=new f.Subscription(function(){}),this._animate=!0,this.resolvedPromise=Promise.resolve(null),this.children=function(){return y.Observable.of([])}}return Object.defineProperty(e.prototype,"role",{get:function(){return"tree"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return!this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nodes",{set:function(e){this.data.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasChildren",{get:function(){return this._hasChildren||h.hasChildren},set:function(e){this._hasChildren=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isChecked",{get:function(){return this._isChecked||h.isChecked},set:function(e){this._isChecked=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded||h.isExpanded},set:function(e){this._isExpanded=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected||h.isSelected},set:function(e){this._isSelected=e},enumerable:!0,configurable:!0}),e.prototype.handleKeydown=function(e){this.isActive&&l.hasActiveNode(e.target)&&this.navigationService.move(e)},e.prototype.handleFocusin=function(e){var t=e.target,n=l.closestNode(t);l.hasActiveNode(t,n)&&this.activateAndEmit(l.nodeId(n))},e.prototype.handleClick=function(e){var t=e.target,n=l.closestNode(t),i=l.nodeId(n);l.hasActiveNode(t,n)&&i&&(this.activateAndEmit(i),this.navigationService.selectIndex(i))},e.prototype.handleFocusout=function(e){var t=this,n=e.target.getAttribute("data-treeindex");this.resolvedPromise.then(function(){t.navigationService.isActive(n)&&(t.navigationService.deactivate(),t.isActive=!1,t.onBlur.emit())})},e.prototype.ngOnChanges=function(e){this.checkboxes=Boolean(this._isChecked),this.expandIcons=Boolean(this._isExpanded&&this._hasChildren),this.navigationService.navigable=Boolean(this.navigable)},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.expandService.changes.subscribe(function(t){var n=t.index,i=t.dataItem;return t.expand?e.expand.emit({index:n,dataItem:i}):e.collapse.emit({index:n,dataItem:i})})),this.subscriptions.add(this.navigationService.checks.subscribe(function(t){return e.checkedChange.emit(e.treeViewLookupService.itemLookup(t))})),this.subscriptions.add(this.selectionService.changes.subscribe(function(t){return e.selectionChange.emit(t)}))},e.prototype.blur=function(){if(l.isDocumentAvailable()){var e=l.focusableNode(this.element);document.activeElement===e&&e.blur()}},e.prototype.focus=function(e){this.navigationService.activateIndex(e);var t=l.focusableNode(this.element);t&&t.focus()},e.prototype.activateAndEmit=function(e){var t=this;e&&(this.navigationService.activateIndex(e),this.resolvedPromise.then(function(){t.navigationService.isActive(e)&&(t.isActive=!0,t.onFocus.emit())}))},i.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-treeview"),i.__metadata("design:type",Boolean)],e.prototype,"classNames",void 0),i.__decorate([r.HostBinding("attr.role"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"role",null),i.__decorate([r.Input(),r.HostBinding("@.disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"animate",null),i.__decorate([r.Output("blur"),i.__metadata("design:type",r.EventEmitter)],e.prototype,"onBlur",void 0),i.__decorate([r.Output("focus"),i.__metadata("design:type",r.EventEmitter)],e.prototype,"onFocus",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"expand",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"collapse",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"checkedChange",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"selectionChange",void 0),i.__decorate([r.ContentChild(o.NodeTemplateDirective),i.__metadata("design:type",o.NodeTemplateDirective)],e.prototype,"nodeTemplate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"textField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"hasChildren",null),i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isChecked",null),i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isExpanded",null),i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isSelected",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"navigable",void 0),i.__decorate([r.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleKeydown",null),i.__decorate([r.HostListener("focusin",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleFocusin",null),i.__decorate([r.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleClick",null),i.__decorate([r.HostListener("focusout",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"handleFocusout",null),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"children",void 0),e=i.__decorate([r.Component({changeDetection:r.ChangeDetectionStrategy.OnPush,exportAs:"kendoTreeView",providers:m,selector:"kendo-treeview",template:'\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n role="group"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplate?.templateRef"\n [nodes]="data"\n [textField]="textField"\n >\n </ul>\n '}),i.__metadata("design:paramtypes",[a.ExpandStateService,c.NavigationService,p.SelectionService,u.TreeViewLookupService,r.ElementRef])],e)}();t.TreeViewComponent=_},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(){function e(e){this.templateRef=e}return e=i.__decorate([r.Directive({selector:"[kendoTreeViewNodeTemplate]"}),i.__param(0,r.Optional()),i.__metadata("design:paramtypes",[r.TemplateRef])],e)}();t.NodeTemplateDirective=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.expand=function(e,t){this.changes.next({dataItem:t,index:e,expand:!0})},e.prototype.collapse=function(e,t){this.changes.next({dataItem:t,index:e,expand:!1})},e=i.__decorate([r.Injectable()],e)}();t.ExpandStateService=a},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(){function e(){this.INDEX_SEPARATOR="_"}return e.prototype.nodeIndex=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),""+t+(t?this.INDEX_SEPARATOR:"")+e},e.prototype.indexForLevel=function(e,t){return e.split(this.INDEX_SEPARATOR).slice(0,t).join(this.INDEX_SEPARATOR)},e.prototype.level=function(e){return e.split(this.INDEX_SEPARATOR).length},e=i.__decorate([r.Injectable()],e)}();t.IndexBuilderService=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.notifyLoaded=function(e){this.changes.next(e)},e=i.__decorate([r.Injectable()],e)}();t.LoadingNotificationService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(10),a=n(11),s=n(12),d=n(6),c=function(e,t){return e[t]||e},p=function(){function e(){var e=this;this.expands=new d.Subject,this.moves=new d.Subject,this.checks=new d.Subject,this.selects=new d.Subject,this.navigable=!0,this.actions=(t={},t[s.Keys.up]=function(){return e.activate(c(e.focusableItem,"prev"))},t[s.Keys.down]=function(){return e.activate(c(e.focusableItem,"next"))},t[s.Keys.left]=function(){return e.expand({expand:!1,intercept:e.moveToParent.bind(e)})},t[s.Keys.right]=function(){return e.expand({expand:!0,intercept:e.moveToChild.bind(e)})},t[s.Keys.home]=function(){return e.activate(e.model.firstNode())},t[s.Keys.end]=function(){return e.activate(e.model.lastNode())},t[s.Keys.enter]=function(){return e.navigable&&e.selectIndex(a.nodeIndex(e.activeItem))},t[s.Keys.space]=function(){return e.navigable&&e.checkIndex(a.nodeIndex(e.activeItem))},t),this.isFocused=!1,this._model=new o.NavigationModel;var t}return Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return a.nodeIndex(this.activeItem)||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusableItem",{get:function(){return this.activeItem||this.model.firstNode()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActiveExpanded",{get:function(){return this.activeItem&&this.activeItem.children.length>0},enumerable:!0,configurable:!0}),e.prototype.activate=function(e){this.navigable&&e&&!this.isActive(a.nodeIndex(e))&&(this.isFocused=!0,this.activeItem=e||this.activeItem,this.notifyMove())},e.prototype.activateParent=function(e){this.activate(this.model.findParent(e))},e.prototype.activateIndex=function(e){e&&this.activate(this.model.findNode(e))},e.prototype.deactivate=function(){this.navigable&&this.isFocused&&(this.isFocused=!1,this.notifyMove())},e.prototype.checkIndex=function(e){this.checks.next(e)},e.prototype.selectIndex=function(e){this.selects.next(e)},e.prototype.isActive=function(e){return!!e&&(this.isFocused&&this.activeIndex===e)},e.prototype.isFocusable=function(e){return a.nodeIndex(this.focusableItem)===e},e.prototype.registerItem=function(e){this.model.registerItem(e)},e.prototype.unregisterItem=function(e){this.isActive(e)&&this.activateParent(e),this.model.unregisterItem(e)},e.prototype.move=function(e){if(this.navigable){var t=this.actions[e.keyCode];t&&(t(),e.preventDefault())}},e.prototype.expand=function(e){var t=e.expand,n=e.intercept,i=a.nodeIndex(this.activeItem);i&&!n(i)&&this.notifyExpand(t)},e.prototype.moveToParent=function(){return!this.isActiveExpanded&&(this.activate(this.model.findParent(a.nodeIndex(this.activeItem))),!0)},e.prototype.moveToChild=function(){return!!this.isActiveExpanded&&(this.activate(this.model.findChild(a.nodeIndex(this.activeItem))),!0)},e.prototype.notifyExpand=function(e){this.expands.next(this.navigationState(e))},e.prototype.notifyMove=function(){this.moves.next(this.navigationState())},e.prototype.navigationState=function(e){return void 0===e&&(e=!1),{expand:e,index:a.nodeIndex(this.activeItem),isFocused:this.isFocused}},e=i.__decorate([r.Injectable()],e)}();t.NavigationService=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=function(e){return e[e.length-1]},o=function(e){return(t=e,t||{}).children||[];var t},a=function(e){for(var t=e,n=[].concat(o(e));n.length;)t=(n=n.concat(o(r(n)))).shift();return t},s=function(){function e(){this.ib=new i.IndexBuilderService,this.nodes=[]}return e.prototype.firstNode=function(){return this.nodes[0]||null},e.prototype.lastNode=function(){var e=this.nodes[this.nodes.length-1];return e?a(r(this.container(e)))||e:null},e.prototype.findNode=function(e){return this.find(e,this.nodes)},e.prototype.findParent=function(e){var t=this.ib.level(e)-1;return this.findNode(this.ib.indexForLevel(e,t))},e.prototype.findChild=function(e){return o(this.findNode(e))[0]||null},e.prototype.registerItem=function(e){var t=this.ib.level(e),n=this.findParent(e);if(n||1===t){var i={children:[],index:e,parent:n,prev:this.prevNode(n),next:this.nextNode(n)};this.container(n).push(i),function(e){var t=e.prev,n=e.next;t&&(t.next=e),n&&(n.prev=e)}(i)}},e.prototype.unregisterItem=function(e){var t=this.find(e,this.nodes);if(t){!function(e){var t=e.prev,n=e.next;t&&(t.next=n),n&&(n.prev=t)}(t);var n=this.container(t.parent);n.splice(n.indexOf(t),1)}},e.prototype.childLevel=function(e){return e&&e.length?this.ib.level(e[0].index):1},e.prototype.find=function(e,t){var n=this.childLevel(t),i=this.ib.indexForLevel(e,n),r=n===this.ib.level(e),o=t.find(function(e){return e.index===i});return o?r?o:this.find(e,o.children):null},e.prototype.container=function(e){return e?e.children:this.nodes},e.prototype.prevNode=function(e){return a(r(this.container(e)))||e||null},e.prototype.nextNode=function(e){if(!e)return null;var t=this.container(this.findParent(e.index));return t[t.indexOf(e)+1]||null},e}();t.NavigationModel=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){},t.isPresent=function(e){return null!==e&&void 0!==e},t.isBlank=function(e){return null===e||void 0===e},t.isArray=function(e){return Array.isArray(e)},t.isNullOrEmptyString=function(e){return t.isBlank(e)||0===e.trim().length},t.isDocumentAvailable=function(){return"undefined"!=typeof document},t.isChanged=function(e,t,n){return void 0===n&&(n=!0),t[e]&&(!t[e].isFirstChange()||!n)&&t[e].previousValue!==t[e].currentValue},t.anyChanged=function(e,n,i){return void 0===i&&(i=!0),e.some(function(e){return t.isChanged(e,n,i)})},t.closestNode=function(e){return e.closest("li.k-item")},t.focusableNode=function(e){return e.nativeElement.querySelector('li[tabindex="0"]')},t.hasActiveNode=function(e,n){var i=n||t.closestNode(e);return i&&(i===e||e.tabIndex<0)},t.nodeId=function(e){return void 0===e&&(e={getAttribute:t.noop}),e.getAttribute("data-treeindex")},t.nodeIndex=function(e){return(e||{}).index},t.guid=function(){for(var e,t="",n=0;n<32;n++)e=16*Math.random()|0,8!==n&&12!==n&&16!==n&&20!==n||(t+="-"),t+=(12===n?4:16===n?3&e|8:e).toString(16);return t}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});(n=t.Keys||(t.Keys={}))[n.enter=13]="enter",n[n.shift=16]="shift",n[n.space=32]="space",n[n.end=35]="end",n[n.home=36]="home",n[n.left=37]="left",n[n.up=38]="up",n[n.right=39]="right",n[n.down=40]="down";var n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.isFirstSelected=function(e){return this.firstIndex===e},e.prototype.setFirstSelected=function(e,t){this.firstIndex===e&&!1===t?this.firstIndex=null:!this.firstIndex&&t&&(this.firstIndex=e)},e.prototype.select=function(e,t){this.changes.next({dataItem:t,index:e})},e=i.__decorate([r.Injectable()],e)}();t.SelectionService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(11),a=function(){function e(){this.map=new Map}return e.prototype.registerItem=function(e,t){var n={children:[],item:e,parent:this.item(o.nodeIndex(t))};this.map.set(e.index,n)},e.prototype.registerChildren=function(e,t){var n=this.item(e);n&&(n.children=t)},e.prototype.unregisterItem=function(e){this.map.delete(e)},e.prototype.replaceItem=function(e,t,n){var i=this.item(e);i&&t&&(this.unregisterItem(e),this.registerItem(t,n),e===t.index&&this.registerChildren(t.index,i.children.slice()))},e.prototype.itemLookup=function(e){var t=this.item(e);return t?{children:this.mapChildren(t.children),item:t.item,parent:t.parent}:null},e.prototype.hasItem=function(e){return this.map.has(e)},e.prototype.item=function(e){return this.map.get(e)||null},e.prototype.mapChildren=function(e){var t=this;return e.map(function(e){var n=t.item(e.index),i=n.item,r=n.parent,o=n.children;return{children:t.mapChildren(o),item:i,parent:r}})},e=i.__decorate([r.Injectable()],e)}();t.TreeViewLookupService=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=function(){return!1},t.isChecked=function(){return"none"},t.isExpanded=function(){return!0},t.isSelected=function(){return!1}},function(e,t){e.exports=i},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(20),s=n(4),d=n(29),c=n(32),p=n(33),u=n(34),l=n(40),h=[o.TreeViewComponent,s.NodeTemplateDirective,d.CheckDirective,c.ExpandDirective,p.SelectDirective,u.HierarchyBindingDirective,l.FlatDataBindingDirective],f=function(){function e(){}return e=i.__decorate([r.NgModule({exports:[h],imports:[a.SharedModule]})],e)}();t.TreeViewModule=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(21),s=n(28),d=n(4),c=n(29),p=n(32),u=n(33),l=n(34),h=n(35),f=n(40),v=n(42),y=n(43),m=n(44),_=[o.TreeViewComponent,a.TreeViewGroupComponent,v.TreeViewItemDirective,y.TreeViewItemContentDirective,d.NodeTemplateDirective,c.CheckDirective,p.ExpandDirective,u.SelectDirective,l.HierarchyBindingDirective,h.LoadingIndicatorDirective,f.FlatDataBindingDirective],g=function(){function e(){}return e=i.__decorate([r.NgModule({declarations:[_],exports:[_],imports:[s.CommonModule,m.CheckBoxModule]})],e)}();t.SharedModule=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(22),a=n(5),s=n(7),d=n(14),c=n(9),p=n(11),u=n(23),l=n(8),h=n(18);n(24),n(25),n(26),n(27);var f=function(){function e(e,t,n,i,r,o){this.expandService=e,this.loadingService=t,this.indexBuilder=n,this.treeViewLookupService=i,this.navigationService=r,this.cd=o,this.kGroupClass=!0,this.textField="",this._data=[],this.isChecked=function(){return"none"},this.isExpanded=function(){return!1},this.isSelected=function(){return!1},this.children=function(){return h.Observable.of([])},this.hasChildren=function(){return!1}}return Object.defineProperty(e.prototype,"role",{get:function(){return"group"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e,this.updateParentChildren()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTemplate",{get:function(){return p.isPresent(this.nodeTemplateRef)},enumerable:!0,configurable:!0}),e.prototype.expandNode=function(e,t,n){n?this.expandService.expand(e,t):this.expandService.collapse(e,t)},e.prototype.checkNode=function(e){this.navigationService.checkIndex(e),this.navigationService.activateIndex(e)},e.prototype.nodeIndex=function(e){return this.indexBuilder.nodeIndex(e.toString(),this.parentIndex)},e.prototype.nodeText=function(e){var t=p.isArray(this.textField)?this.textField[0]:this.textField;return u.getter(t,!0)(e)},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscription=this.nodes.subscribe(function(t){e.data=t,e.cd.markForCheck()})},e.prototype.ngOnChanges=function(e){e.parentIndex&&this.updateParentChildren()},e.prototype.fetchChildren=function(e,t){var n=this;return this.children(e).catch(function(){return n.loadingService.notifyLoaded(t),h.Observable.empty()}).do(function(){return n.loadingService.notifyLoaded(t)})},Object.defineProperty(e.prototype,"nextFields",{get:function(){return p.isArray(this.textField)?this.textField.length>1?this.textField.slice(1):this.textField:[this.textField]},enumerable:!0,configurable:!0}),e.prototype.updateParentChildren=function(){var e=this.parentIndex?this.mapToTreeItem(this.data):[];this.treeViewLookupService.registerChildren(this.parentIndex,e)},e.prototype.mapToTreeItem=function(e){var t=this;return e.map(function(e,n){return{dataItem:e,index:t.nodeIndex(n)}})},i.__decorate([r.HostBinding("class.k-group"),i.__metadata("design:type",Boolean)],e.prototype,"kGroupClass",void 0),i.__decorate([r.HostBinding("attr.role"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"role",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"checkboxes",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"expandIcons",void 0),i.__decorate([r.Input(),i.__metadata("design:type",h.Observable)],e.prototype,"nodes",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"textField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"parentDataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"parentIndex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",r.TemplateRef)],e.prototype,"nodeTemplateRef",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isChecked",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isExpanded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"children",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"hasChildren",void 0),e=i.__decorate([r.Component({animations:[o.trigger("toggle",[o.transition("void => *",[o.style({height:0}),o.animate("0.1s ease-in",o.style({height:"*"}))]),o.transition("* => void",[o.style({height:"*"}),o.animate("0.1s ease-in",o.style({height:0}))])])],selector:"[kendoTreeViewGroup]",template:'\n <li\n *ngFor="let node of data; let index = index" class="k-item"\n kendoTreeViewItem\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [isChecked]="isChecked(node, nodeIndex(index))"\n [isExpanded]="isExpanded(node, nodeIndex(index))"\n [isSelected]="isSelected(node, nodeIndex(index))"\n [attr.data-treeindex]="nodeIndex(index)"\n >\n <div class="k-mid">\n <span\n class="k-icon"\n [class.k-i-collapse]="isExpanded(node, nodeIndex(index))"\n [class.k-i-expand]="!isExpanded(node, nodeIndex(index))"\n [kendoTreeViewLoading]="nodeIndex(index)"\n (click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="expandIcons && hasChildren(node)"\n >\n </span>\n <kendo-checkbox\n *ngIf="checkboxes"\n [checkState]="isChecked(node, nodeIndex(index))"\n (checkStateChange)="checkNode(nodeIndex(index))"\n tabindex="-1"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]="nodeIndex(index)"\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [isSelected]="isSelected"\n class="k-in"\n >\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef" [ngTemplateOutletContext]="{$implicit: node, index: nodeIndex(index)}"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf="isExpanded(node, nodeIndex(index)) && hasChildren(node)"\n kendoTreeViewGroup\n role="group"\n [nodes]="fetchChildren(node, nodeIndex(index))"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [parentDataItem]="node"\n [textField]="nextFields"\n [@toggle]="true"\n >\n </ul>\n </li>\n '}),i.__metadata("design:paramtypes",[a.ExpandStateService,l.LoadingNotificationService,s.IndexBuilderService,d.TreeViewLookupService,c.NavigationService,r.ChangeDetectorRef])],e)}();t.TreeViewGroupComponent=f},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,o={};o[void 0]=function(e){return e},t.getter=function(e,t){var n=e+t;if(o[n])return o[n];var a=[];return e.replace(r,function(e,t,n,r){a.push(i.isPresent(t)?t:n||r)}),o[n]=function(e){for(var n=e,r=0;r<a.length;r++)if(n=n[a[r]],!i.isPresent(n)&&t)return n;return n},o[n]}},function(e,t){e.exports=h},function(e,t){e.exports=u},function(e,t){e.exports=d},function(e,t){e.exports=v},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(11),s=n(16);n(30),n(31);var d=function(){function e(e){var t=this;this.treeView=e,this.checkedKeys=[],this.checkedKeysChange=new r.EventEmitter,this.subscriptions=new s.Subscription(function(){}),this.checkActions={multiple:function(e){return t.checkMultiple(e)},single:function(e){return t.checkSingle(e)}}}return Object.defineProperty(e.prototype,"isChecked",{set:function(e){this.treeView.isChecked=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var e={checkChildren:!0,checkParents:!0,enabled:!0,mode:"multiple"};if(!a.isPresent(this.checkable))return e;var t="boolean"==typeof this.checkable?{enabled:this.checkable}:this.checkable;return Object.assign(e,t)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.treeView.checkedChange.subscribe(function(t){return e.check(t)})),this.treeView.checkboxes=!0,this.treeView.isChecked=this.isItemChecked.bind(this)},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.isItemChecked=function(e,t){if(!this.checkKey)return this.isIndexChecked(t);return this.checkedKeys.indexOf(this.itemKey({dataItem:e,index:t}))>-1?"checked":"none"},e.prototype.isIndexChecked=function(e){var t=this.checkedKeys.filter(function(t){return 0===t.indexOf(e)});if(n=e,t.filter(function(e){return e===n}).length>0)return"checked";var n,i=this.options,r=i.mode,o=i.checkParents;return"multiple"===r&&o&&t.length?"indeterminate":"none"},e.prototype.itemKey=function(e){return this.checkKey?"string"==typeof this.checkKey?e.dataItem[this.checkKey]:"function"==typeof this.checkKey?this.checkKey(e):void 0:e.index},e.prototype.check=function(e){var t=this.options,n=t.enabled,i=t.mode,r=this.checkActions[i]||a.noop;n&&r(e)},e.prototype.checkSingle=function(e){var t=this.itemKey(e.item);this.checkedKeys=this.checkedKeys[0]!==t?[t]:[],this.notify()},e.prototype.checkMultiple=function(e){this.checkNode(e),this.options.checkParents&&this.checkParents(e.parent),this.notify()},e.prototype.checkNode=function(e,t){var n=this,i=this.itemKey(e.item),r=this.checkedKeys.indexOf(i),o=r>-1,s=void 0===t?!o:t;!a.isPresent(i)||o&&t||(o?this.checkedKeys.splice(r,1):this.checkedKeys.push(i),this.options.checkChildren&&e.children.map(function(e){return n.checkNode(e,s)}))},e.prototype.checkParents=function(e){for(var t=e;t;){var n=this.itemKey(t.item),i=this.checkedKeys.indexOf(n);this.allChildrenSelected(t.children)?-1===i&&this.checkedKeys.push(n):i>-1&&this.checkedKeys.splice(i,1),t=t.parent}},e.prototype.allChildrenSelected=function(e){var t=this;return e.reduce(function(e,n){return e&&"checked"===t.isItemChecked(n.dataItem,n.index)},!0)},e.prototype.notify=function(){this.checkedKeysChange.emit(this.checkedKeys.slice())},i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isChecked",null),i.__decorate([r.Input("checkBy"),i.__metadata("design:type",Object)],e.prototype,"checkKey",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"checkedKeys",void 0),i.__decorate([r.Input("kendoTreeViewCheckable"),i.__metadata("design:type",Object)],e.prototype,"checkable",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"checkedKeysChange",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewCheckable]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.CheckDirective=d},function(e,t){e.exports=a},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(16),s=n(18);n(30),n(31);var d=function(){function e(e){this.treeView=e,this.expandedKeysChange=new r.EventEmitter,this.expandedKeys=[],this.subscriptions=new a.Subscription(function(){})}return Object.defineProperty(e.prototype,"isExpanded",{set:function(e){this.treeView.isExpanded=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(s.Observable.merge(this.treeView.expand.map(function(e){return i.__assign({expand:!0},e)}),this.treeView.collapse.map(function(e){return i.__assign({expand:!1},e)})).subscribe(this.toggleExpand.bind(this))),this.treeView.expandIcons=!0,this.treeView.isExpanded=function(t,n){return e.expandedKeys.indexOf(e.itemKey({dataItem:t,index:n}))>-1}},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.itemKey=function(e){if(this.expandKey){if("string"==typeof this.expandKey)return e.dataItem[this.expandKey];if("function"==typeof this.expandKey)return this.expandKey(e)}return e.index},e.prototype.toggleExpand=function(e){var t=e.index,n=e.dataItem,i=e.expand,r=this.itemKey({index:t,dataItem:n}),o=this.expandedKeys.indexOf(r),a=!1;o>-1&&!i?(this.expandedKeys.splice(o,1),a=!0):-1===o&&i&&(this.expandedKeys.push(r),a=!0),a&&this.expandedKeysChange.emit(this.expandedKeys)},i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isExpanded",null),i.__decorate([r.Input("expandBy"),i.__metadata("design:type",Object)],e.prototype,"expandKey",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"expandedKeysChange",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"expandedKeys",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewExpandable]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.ExpandDirective=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(11),s=n(16);n(30),n(31);var d=function(){function e(e){var t=this;this.treeView=e,this.selectedKeys=[],this.selectedKeysChange=new r.EventEmitter,this.subscriptions=new s.Subscription(function(){}),this.selectActions={multiple:function(e){return t.selectMultiple(e)},single:function(e){return t.selectSingle(e)}}}return Object.defineProperty(e.prototype,"isSelected",{set:function(e){this.treeView.isSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getAriaMultiselectable",{get:function(){return"multiple"===this.options.mode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var e={enabled:!0,mode:"single"};if(!a.isPresent(this.selection))return e;var t="boolean"==typeof this.selection?{enabled:this.selection}:this.selection;return Object.assign(e,t)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this))),this.treeView.isSelected=function(t,n){return e.selectedKeys.indexOf(e.itemKey({dataItem:t,index:n}))>-1}},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.itemKey=function(e){return this.selectKey?"string"==typeof this.selectKey?e.dataItem[this.selectKey]:"function"==typeof this.selectKey?this.selectKey(e):void 0:e.index},e.prototype.select=function(e){var t=this.options,n=t.enabled,i=t.mode,r=this.selectActions[i]||a.noop;n&&r(e)},e.prototype.selectSingle=function(e){var t=this.itemKey(e);this.selectedKeys[0]!==t&&(this.selectedKeys=[t],this.notify())},e.prototype.selectMultiple=function(e){var t=this.itemKey(e),n=this.selectedKeys.indexOf(t),i=n>-1;a.isPresent(t)&&(i?this.selectedKeys.splice(n,1):this.selectedKeys.push(t),this.notify())},e.prototype.notify=function(){this.selectedKeysChange.emit(this.selectedKeys.slice())},i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],e.prototype,"isSelected",null),i.__decorate([r.Input("selectBy"),i.__metadata("design:type",Object)],e.prototype,"selectKey",void 0),i.__decorate([r.Input("kendoTreeViewSelectable"),i.__metadata("design:type",Object)],e.prototype,"selection",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"selectedKeys",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"selectedKeysChange",void 0),i.__decorate([r.HostBinding("attr.aria-multiselectable"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],e.prototype,"getAriaMultiselectable",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewSelectable]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.SelectDirective=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(23),s=n(11),d=n(15),c=n(18);n(26);var p=function(){function e(e){this.treeView=e}return Object.defineProperty(e.prototype,"childrenField",{get:function(){return this._childrenField},set:function(e){if(!e)throw new Error("'childrenField' cannot be empty");this._childrenField=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;s.isPresent(this.childrenField)&&(this.treeView.children=function(t){return c.Observable.of(a.getter(e.childrenField,!0)(t))},this.treeView.hasChildren=function(t){return e.childrenField in t},this.treeView.isExpanded!==d.isExpanded&&(this.treeView.expandIcons=!0))},i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],e.prototype,"childrenField",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewHierarchyBinding]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.HierarchyBindingDirective=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(5),a=n(8),s=n(18);n(36),n(37),n(38),n(39),n(26);var d=function(){function e(e,t,n){this.expandService=e,this.loadingService=t,this.cd=n,this._loading=!1}return Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this,t=this.loadingService.changes.filter(function(t){return t===e.index});this.subscription=this.expandService.changes.filter(function(t){return t.index===e.index}).do(function(t){!t.expand&&e.loading&&(e.loading=!1)}).filter(function(e){return e.expand}).switchMap(function(e){return s.Observable.of(e).delay(100).takeUntil(t)}).subscribe(function(){return e.loading=!0}),this.subscription.add(t.subscribe(function(){return e.loading=!1}))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},i.__decorate([r.HostBinding("class.k-i-loading"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"loading",null),i.__decorate([r.Input("kendoTreeViewLoading"),i.__metadata("design:type",String)],e.prototype,"index",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewLoading]"}),i.__metadata("design:paramtypes",[o.ExpandStateService,a.LoadingNotificationService,r.ChangeDetectorRef])],e)}();t.LoadingIndicatorDirective=d},function(e,t){e.exports=f},function(e,t){e.exports=_},function(e,t){e.exports=y},function(e,t){e.exports=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(23),s=n(11),d=n(41),c=n(18),p=function(){function e(e){this.treeView=e,this.originalData=[]}return Object.defineProperty(e.prototype,"nodes",{set:function(e){if(this.originalData=e||[],s.isNullOrEmptyString(this.parentIdField))this.treeView.nodes=this.originalData.slice(0);else{var t=a.getter(this.parentIdField,!0);this.treeView.nodes=this.originalData.filter(d.compose(s.isBlank,t))}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;if(s.isPresent(this.parentIdField)&&s.isPresent(this.idField)){var t=function(t){return n=a.getter(e.parentIdField,!0),i=e.originalData||[],r=a.getter(e.idField,!0)(t),i.filter(function(e){return n(e)===r});var n,i,r};this.treeView.hasChildren=function(e){return t(e).length>0},this.treeView.children=function(e){return c.Observable.of(t(e))}}},e.prototype.ngOnChanges=function(e){s.isChanged("parentIdField",e,!1)&&(this.nodes=this.originalData)},i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"parentIdField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"idField",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewFlatDataBinding]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.FlatDataBindingDirective=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduceRight(function(e,t){return t(e)},t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(9),a=n(13),s=n(5),d=n(7),c=n(14),p=n(11);n(36);var u=function(e,t){return{dataItem:t,index:e}},l=function(){function e(e,t,n,i,r,o,a){this.element=e,this.expandService=t,this.navigationService=n,this.selectionService=i,this.lookupService=r,this.renderer=o,this.ib=a,this.ariaChecked="false",this.isInitialized=!1,this.subscriptions=[],this.subscribe()}return Object.defineProperty(e.prototype,"isChecked",{set:function(e){this.ariaChecked="checked"===e?"true":"indeterminate"===e?"mixed":"false"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded||!1},set:function(e){this._isExpanded=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected||!1},set:function(e){this._isSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"treeItem",{get:function(){return u(this.index,this.dataItem)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentTreeItem",{get:function(){return this.parentDataItem?u(this.parentIndex,this.parentDataItem):null},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.navigationService.registerItem(this.index),this.lookupService.registerItem(this.treeItem,this.parentTreeItem),this.activateItem(),this.isInitialized=!0,this.setAttribute("role","treeitem"),this.setAriaAttributes(),this.updateTabIndex()},e.prototype.ngOnChanges=function(e){var t=e.index;(t||e.isChecked||e.isExpanded||e.isSelected)&&this.setAriaAttributes(),this.moveLookupItem(e),this.moveNavigationItem(t)},e.prototype.ngOnDestroy=function(){this.navigationService.unregisterItem(this.index),this.subscriptions.map(function(e){return e.unsubscribe()}),this.subscriptions=[]},e.prototype.subscribe=function(){var e=this;this.subscriptions=[this.navigationService.moves.subscribe(function(){e.updateTabIndex(),e.focusItem()}),this.navigationService.expands.filter(function(t){return t.index===e.index}).subscribe(function(t){var n=t.expand;return e.expand(n)})]},e.prototype.activateItem=function(){var e=this.navigationService,t=this.selectionService,n=this.index;t.setFirstSelected(n,this.isSelected),!e.isActive(n)&&t.isFirstSelected(n)&&e.activateIndex(n)},e.prototype.expand=function(e){this.expandService[e?"expand":"collapse"](this.index,this.dataItem)},e.prototype.isFocusable=function(){return this.navigationService.isFocusable(this.index)},e.prototype.focusItem=function(){this.isInitialized&&this.navigationService.isActive(this.index)&&this.element.nativeElement.focus()},e.prototype.moveLookupItem=function(e){void 0===e&&(e={});var t=e.dataItem,n=e.index,i=e.parentDataItem,r=e.parentIndex;if((!n||!n.firstChange||this.lookupService.hasItem(this.index))&&(t||n||i||r)){var o=(n||{}).previousValue||this.index;this.lookupService.replaceItem(o,this.treeItem,this.parentTreeItem)}},e.prototype.moveNavigationItem=function(e){void 0===e&&(e={});var t=e.currentValue,n=e.firstChange,i=e.previousValue;!n&&p.isPresent(t)&&p.isPresent(i)&&(this.navigationService.unregisterItem(i),this.navigationService.registerItem(t))},e.prototype.setAriaAttributes=function(){this.setAttribute("aria-level",this.ib.level(this.index).toString()),this.setAttribute("aria-expanded",this.isExpanded.toString()),this.setAttribute("aria-selected",this.isSelected.toString()),this.setAttribute("aria-checked",this.ariaChecked)},e.prototype.updateTabIndex=function(){this.setAttribute("tabIndex",this.isFocusable()?"0":"-1")},e.prototype.setAttribute=function(e,t){this.renderer.setAttribute(this.element.nativeElement,e,t)},i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"index",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"parentDataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"parentIndex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],e.prototype,"isChecked",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"isExpanded",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"isSelected",null),e=i.__decorate([r.Directive({selector:"[kendoTreeViewItem]"}),i.__metadata("design:paramtypes",[r.ElementRef,s.ExpandStateService,o.NavigationService,a.SelectionService,c.TreeViewLookupService,r.Renderer2,d.IndexBuilderService])],e)}();t.TreeViewItemDirective=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(9),a=n(13),s=n(16);n(36),n(24);var d=function(){function e(e,t,n,i){var r=this;this.element=e,this.navigationService=t,this.selectionService=n,this.renderer=i,this.subscriptions=new s.Subscription(function(){}),this.subscriptions.add(this.navigationService.moves.subscribe(this.updateItem.bind(this))),this.subscriptions.add(this.navigationService.selects.filter(function(e){return e===r.index}).subscribe(function(e){return r.selectionService.select(e,r.dataItem)})),this.subscriptions.add(this.selectionService.changes.subscribe(this.updateSelection.bind(this)))}return e.prototype.ngOnInit=function(){this.updateSelection()},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.updateItem=function(){this.render(this.navigationService.isActive(this.index),"k-state-focused")},e.prototype.updateSelection=function(){this.render(this.isSelected(this.dataItem,this.index),"k-state-selected")},e.prototype.render=function(e,t){var n=e?"addClass":"removeClass";this.renderer[n](this.element.nativeElement,t)},i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"index",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),e=i.__decorate([r.Directive({selector:"[kendoTreeViewItemContent]"}),i.__metadata("design:paramtypes",[r.ElementRef,o.NavigationService,a.SelectionService,r.Renderer2])],e)}();t.TreeViewItemContentDirective=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=[n(45).CheckBoxComponent],a=function(){function e(){}return e=i.__decorate([r.NgModule({declarations:[o],exports:[o]})],e)}();t.CheckBoxModule=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(11),a=function(){function e(e,t){this.element=e,this.renderer=t,this.id="_"+o.guid(),this.checkState="none",this.tabindex=0,this.checkStateChange=new r.EventEmitter}return Object.defineProperty(e.prototype,"classWrapper",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indeterminate",{get:function(){return"indeterminate"===this.checkState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checked",{get:function(){return"checked"===this.checkState},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.element.nativeElement,"tabindex")},e.prototype.handleChange=function(e){this.checkStateChange.emit(e.target.checked?"checked":"none")},i.__decorate([r.HostBinding("class.k-checkbox-wrapper"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],e.prototype,"classWrapper",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"id",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"checkState",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"labelText",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Number)],e.prototype,"tabindex",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"checkStateChange",void 0),e=i.__decorate([r.Component({selector:"kendo-checkbox",template:'\n <input\n class="k-checkbox"\n type="checkbox"\n [id]="id"\n [checked]="checked"\n [indeterminate]="indeterminate"\n [tabindex]="tabindex"\n (change)="handleChange($event)"\n />\n <label\n class="k-checkbox-label"\n tabindex="-1"\n [for]="id"\n >{{labelText}}</label>\n '}),i.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2])],e)}();t.CheckBoxComponent=a}])}}}); |
@@ -6,3 +6,3 @@ { | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
"version": "0.2.0-dev.201712201530", | ||
"version": "0.2.0-dev.201801031208", | ||
"main": "dist/npm/main.js", | ||
@@ -43,2 +43,3 @@ "module": "dist/es/main.js", | ||
"@angular/core": "^4.0.0", | ||
"@angular/forms": "^4.0.0", | ||
"@angular/platform-browser": "^4.0.0", | ||
@@ -45,0 +46,0 @@ "@angular/platform-browser-dynamic": "^4.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
519230
225
7236
0
29