@progress/kendo-angular-treeview
Advanced tools
Comparing version 0.2.0-dev.201711281158 to 0.2.0-dev.201712201530
@@ -1,1 +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,a,o,d,s,p,c,u,l,f,h,x,g,_){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(11);t.TreeViewModule=r.TreeViewModule;var a=n(4);t.NodeTemplateDirective=a.NodeTemplateDirective;var o=n(22);t.ExpandDirective=o.ExpandDirective;var d=n(25);t.HierarchyBindingDirective=d.HierarchyBindingDirective;var s=n(31);t.FlatDataBindingDirective=s.FlatDataBindingDirective},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),a=n(4),o=n(5),d=n(7),s=n(8),p=n(9),c=n(10),u=function(){function e(e){this.expandService=e,this.classNames=!0,this.expand=new r.EventEmitter,this.collapse=new r.EventEmitter,this.subscriptions=new d.Subscription(function(){}),this.data=new s.BehaviorSubject([]),this._animate=!0,this.hasChildren=function(){return!1},this.isExpanded=function(){return!1},this.children=function(){return p.Observable.of([])}}return 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.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})}))},e}();i.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-treeview"),i.__metadata("design:type",Boolean)],u.prototype,"classNames",void 0),i.__decorate([r.Input(),r.HostBinding("@.disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],u.prototype,"animate",null),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],u.prototype,"expand",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],u.prototype,"collapse",void 0),i.__decorate([r.ContentChild(a.NodeTemplateDirective),i.__metadata("design:type",a.NodeTemplateDirective)],u.prototype,"nodeTemplate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],u.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",Object)],u.prototype,"textField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"hasChildren",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"isExpanded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"children",void 0),u=i.__decorate([r.Component({changeDetection:r.ChangeDetectionStrategy.OnPush,exportAs:"kendoTreeView",providers:[o.ExpandStateService,c.LoadingNotificationService],selector:"kendo-treeview",template:'\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n [children]="children"\n [hasChildren]="hasChildren"\n [isExpanded]="isExpanded"\n [nodeTemplateRef]="nodeTemplate?.templateRef"\n [nodes]="data"\n [textField]="textField"\n >\n </ul>\n '}),i.__metadata("design:paramtypes",[o.ExpandStateService])],u),t.TreeViewComponent=u},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),a=function(){function e(e){this.templateRef=e}return e}();a=i.__decorate([r.Directive({selector:"[kendoTreeViewNodeTemplate]"}),i.__param(0,r.Optional()),i.__metadata("design:paramtypes",[r.TemplateRef])],a),t.NodeTemplateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),a=n(6),o=function(){function e(){this.changes=new a.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}();o=i.__decorate([r.Injectable()],o),t.ExpandStateService=o},function(e,t){e.exports=n},function(e,t){e.exports=i},function(e,t){e.exports=r},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),a=n(6),o=function(){function e(){this.changes=new a.Subject}return e.prototype.notifyLoaded=function(e){this.changes.next(e)},e}();o=i.__decorate([r.Injectable()],o),t.LoadingNotificationService=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),a=n(1),o=n(12),d=n(4),s=n(22),p=n(25),c=n(31),u=[a.TreeViewComponent,d.NodeTemplateDirective,s.ExpandDirective,p.HierarchyBindingDirective,c.FlatDataBindingDirective],l=function(){function e(){}return e}();l=i.__decorate([r.NgModule({exports:[u],imports:[o.SharedModule]})],l),t.TreeViewModule=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),a=n(1),o=n(13),d=n(21),s=n(4),p=n(22),c=n(25),u=n(26),l=n(31),f=[a.TreeViewComponent,o.TreeViewGroupComponent,s.NodeTemplateDirective,p.ExpandDirective,c.HierarchyBindingDirective,u.LoadingIndicatorDirective,l.FlatDataBindingDirective],h=function(){function e(){}return e}();h=i.__decorate([r.NgModule({declarations:[f],exports:[f],imports:[d.CommonModule]})],h),t.SharedModule=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),a=n(14),o=n(5),d=n(15),s=n(16),p=n(10),c=n(9);n(17),n(18),n(19),n(20);var u=function(){function e(e,t,n){this.expandService=e,this.loadingService=t,this.cd=n,this.kGroupClass=!0,this.textField="",this.data=[],this.hasChildren=function(){return!1},this.isExpanded=function(){return!1},this.children=function(){return c.Observable.of([])}}return Object.defineProperty(e.prototype,"hasTemplate",{get:function(){return d.isPresent(this.nodeTemplateRef)},enumerable:!0,configurable:!0}),e.prototype.nodeClick=function(e,t,n){n?this.expandService.expand(e,t):this.expandService.collapse(e,t)},e.prototype.nodeIndex=function(e){return this.parentIndex?this.parentIndex+"_"+e:""+e},e.prototype.nodeText=function(e){var t=d.isArray(this.textField)?this.textField[0]:this.textField;return s.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),c.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}),e}();i.__decorate([r.HostBinding("class.k-group"),i.__metadata("design:type",Boolean)],u.prototype,"kGroupClass",void 0),i.__decorate([r.Input(),i.__metadata("design:type",c.Observable)],u.prototype,"nodes",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],u.prototype,"textField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],u.prototype,"parentIndex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",r.TemplateRef)],u.prototype,"nodeTemplateRef",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"hasChildren",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"isExpanded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"children",void 0),u=i.__decorate([r.Component({animations:[a.trigger("toggle",[a.transition("void => *",[a.style({height:0}),a.animate("0.1s ease-in",a.style({height:"*"}))]),a.transition("* => void",[a.style({height:"*"}),a.animate("0.1s ease-in",a.style({height:0}))])])],selector:"[kendoTreeViewGroup]",template:'\n <li *ngFor="let node of data; let index = index" class="k-item" [@toggle]="true">\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)="nodeClick(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="hasChildren(node)"\n >\n </span>\n <span class="k-in">\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef"\n [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 [nodes]="fetchChildren(node, nodeIndex(index))"\n [children]="children"\n [hasChildren]="hasChildren"\n [isExpanded]="isExpanded"\n [nodeTemplateRef]="nodeTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [textField]="nextFields"\n >\n </ul>\n </li>\n '}),i.__metadata("design:paramtypes",[o.ExpandStateService,p.LoadingNotificationService,r.ChangeDetectorRef])],u),t.TreeViewGroupComponent=u},function(e,t){e.exports=o},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)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(15),r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,a={};a.undefined=function(e){return e},t.getter=function(e,t){var n=e+t;if(a[n])return a[n];var o=[];return e.replace(r,function(e,t,n,r){o.push(i.isPresent(t)?t:n||r)}),a[n]=function(e){for(var n=e,r=0;r<o.length;r++)if(n=n[o[r]],!i.isPresent(n)&&t)return n;return n},a[n]}},function(e,t){e.exports=d},function(e,t){e.exports=s},function(e,t){e.exports=p},function(e,t){e.exports=c},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),a=n(1),o=n(7),d=n(9);n(23),n(24);var s=function(){function e(e){this.treeView=e,this.expandedKeysChange=new r.EventEmitter,this.expandedKeys=[],this.subscriptions=new o.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(d.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}),a=this.expandedKeys.indexOf(r),o=!1;a>-1&&!i?(this.expandedKeys.splice(a,1),o=!0):a===-1&&i&&(this.expandedKeys.push(r),o=!0),o&&this.expandedKeysChange.emit(this.expandedKeys)},e}();i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],s.prototype,"isExpanded",null),i.__decorate([r.Input("kendoTreeViewExpandBy"),i.__metadata("design:type",Object)],s.prototype,"expandKey",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],s.prototype,"expandedKeysChange",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],s.prototype,"expandedKeys",void 0),s=i.__decorate([r.Directive({selector:"[kendoTreeViewExpandBy]"}),i.__metadata("design:paramtypes",[a.TreeViewComponent])],s),t.ExpandDirective=s},function(e,t){e.exports=l},function(e,t){e.exports=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),a=n(1),o=n(16),d=n(15),s=n(9),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;d.isPresent(this.childrenField)&&(this.treeView.children=function(t){return s.Observable.of(o.getter(e.childrenField,!0)(t))},this.treeView.hasChildren=function(t){return e.childrenField in t})},e}();i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],p.prototype,"childrenField",null),p=i.__decorate([r.Directive({selector:"[kendoTreeViewHierarchyBinding]"}),i.__metadata("design:paramtypes",[a.TreeViewComponent])],p),t.HierarchyBindingDirective=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),a=n(5),o=n(10),d=n(9);n(27),n(28),n(29),n(30),n(19);var s=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 d.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()},e}();i.__decorate([r.HostBinding("class.k-i-loading"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],s.prototype,"loading",null),i.__decorate([r.Input("kendoTreeViewLoading"),i.__metadata("design:type",String)],s.prototype,"index",void 0),s=i.__decorate([r.Directive({selector:"[kendoTreeViewLoading]"}),i.__metadata("design:paramtypes",[a.ExpandStateService,o.LoadingNotificationService,r.ChangeDetectorRef])],s),t.LoadingIndicatorDirective=s},function(e,t){e.exports=h},function(e,t){e.exports=x},function(e,t){e.exports=g},function(e,t){e.exports=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),a=n(1),o=n(16),d=n(15),s=n(32),p=n(9),c=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||[],d.isNullOrEmptyString(this.parentIdField))this.treeView.nodes=this.originalData.slice(0);else{var t=o.getter(this.parentIdField,!0);this.treeView.nodes=this.originalData.filter(s.compose(d.isBlank,t))}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;if(d.isPresent(this.parentIdField)&&d.isPresent(this.idField)){var t=function(t){return c(o.getter(e.parentIdField,!0),e.originalData||[],o.getter(e.idField,!0)(t))};this.treeView.hasChildren=function(e){return t(e).length>0},this.treeView.children=function(e){return p.Observable.of(t(e))}}},e.prototype.ngOnChanges=function(e){d.isChanged("parentIdField",e,!1)&&(this.nodes=this.originalData)},e}();i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],u.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],u.prototype,"parentIdField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],u.prototype,"idField",void 0),u=i.__decorate([r.Directive({selector:"[kendoTreeViewFlatDataBinding]"}),i.__metadata("design:paramtypes",[a.TreeViewComponent])],u),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){"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}])}); |
@@ -16,9 +16,9 @@ import { Injectable } from "@angular/core"; | ||
}; | ||
ExpandStateService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ExpandStateService.ctorParameters = function () { return []; }; | ||
return ExpandStateService; | ||
}()); | ||
export { ExpandStateService }; | ||
ExpandStateService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ExpandStateService.ctorParameters = function () { return []; }; |
@@ -7,3 +7,3 @@ import { OnDestroy, OnInit, EventEmitter } from '@angular/core'; | ||
/** | ||
* A directive which manages the expand state of the TreeView component | ||
* A directive which manages the expand state of the TreeView. | ||
*/ | ||
@@ -17,3 +17,3 @@ export declare class ExpandDirective implements OnInit, OnDestroy { | ||
/** | ||
* Defines the item key that will be stored in the `expandedKeys` collection | ||
* Defines the item key that will be stored in the `expandedKeys` collection. | ||
*/ | ||
@@ -25,7 +25,7 @@ expandKey: string | ((context: { | ||
/** | ||
* Fires when the `expandedKeys` collection has been updated. | ||
* Fires when the `expandedKeys` collection was updated. | ||
*/ | ||
expandedKeysChange: EventEmitter<any[]>; | ||
/** | ||
* Defines the collection that will store the expanded keys | ||
* Defines the collection that will store the expanded keys. | ||
*/ | ||
@@ -32,0 +32,0 @@ expandedKeys: any[]; |
@@ -9,3 +9,3 @@ import * as tslib_1 from "tslib"; | ||
/** | ||
* A directive which manages the expand state of the TreeView component | ||
* A directive which manages the expand state of the TreeView. | ||
*/ | ||
@@ -16,7 +16,7 @@ var ExpandDirective = (function () { | ||
/** | ||
* Fires when the `expandedKeys` collection has been updated. | ||
* Fires when the `expandedKeys` collection was updated. | ||
*/ | ||
this.expandedKeysChange = new EventEmitter(); | ||
/** | ||
* Defines the collection that will store the expanded keys | ||
* Defines the collection that will store the expanded keys. | ||
*/ | ||
@@ -74,17 +74,17 @@ this.expandedKeys = []; | ||
}; | ||
ExpandDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewExpandBy]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
ExpandDirective.ctorParameters = function () { return [ | ||
{ type: TreeViewComponent, }, | ||
]; }; | ||
ExpandDirective.propDecorators = { | ||
'isExpanded': [{ type: Input },], | ||
'expandKey': [{ type: Input, args: ["kendoTreeViewExpandBy",] },], | ||
'expandedKeysChange': [{ type: Output },], | ||
'expandedKeys': [{ type: Input },], | ||
}; | ||
return ExpandDirective; | ||
}()); | ||
export { ExpandDirective }; | ||
ExpandDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewExpandBy]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
ExpandDirective.ctorParameters = function () { return [ | ||
{ type: TreeViewComponent, }, | ||
]; }; | ||
ExpandDirective.propDecorators = { | ||
'isExpanded': [{ type: Input },], | ||
'expandKey': [{ type: Input, args: ["kendoTreeViewExpandBy",] },], | ||
'expandedKeysChange': [{ type: Output },], | ||
'expandedKeys': [{ type: Input },], | ||
}; |
import { OnInit, OnChanges, SimpleChanges } from '@angular/core'; | ||
import { TreeViewComponent } from './treeview.component'; | ||
/** | ||
* A directive which encapsulate the retrieval of child nodes. | ||
* A directive which encapsulates the retrieval of the child nodes. | ||
*/ | ||
@@ -9,11 +9,11 @@ export declare class FlatDataBindingDirective implements OnInit, OnChanges { | ||
/** | ||
* The nodes which to be displayed by the component | ||
* The nodes which will be displayed by the TreeView. | ||
*/ | ||
nodes: any[]; | ||
/** | ||
* Represents parent field which value will be matched to parent node | ||
* Represents the parent field whose value will be matched with the parent node. | ||
*/ | ||
parentIdField: string; | ||
/** | ||
* Represents the field which uniquely identifies the node | ||
* Represents the unique field which identifies a node. | ||
*/ | ||
@@ -20,0 +20,0 @@ idField: string; |
@@ -9,3 +9,3 @@ import { Directive, Input } from '@angular/core'; | ||
/** | ||
* A directive which encapsulate the retrieval of child nodes. | ||
* A directive which encapsulates the retrieval of the child nodes. | ||
*/ | ||
@@ -19,3 +19,3 @@ var FlatDataBindingDirective = (function () { | ||
/** | ||
* The nodes which to be displayed by the component | ||
* The nodes which will be displayed by the TreeView. | ||
*/ | ||
@@ -56,16 +56,16 @@ set: function (values) { | ||
}; | ||
FlatDataBindingDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewFlatDataBinding]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
FlatDataBindingDirective.ctorParameters = function () { return [ | ||
{ type: TreeViewComponent, }, | ||
]; }; | ||
FlatDataBindingDirective.propDecorators = { | ||
'nodes': [{ type: Input },], | ||
'parentIdField': [{ type: Input },], | ||
'idField': [{ type: Input },], | ||
}; | ||
return FlatDataBindingDirective; | ||
}()); | ||
export { FlatDataBindingDirective }; | ||
FlatDataBindingDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewFlatDataBinding]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
FlatDataBindingDirective.ctorParameters = function () { return [ | ||
{ type: TreeViewComponent, }, | ||
]; }; | ||
FlatDataBindingDirective.propDecorators = { | ||
'nodes': [{ type: Input },], | ||
'parentIdField': [{ type: Input },], | ||
'idField': [{ type: Input },], | ||
}; |
@@ -5,6 +5,3 @@ /** | ||
*/ | ||
/** | ||
* @hidden | ||
* Performs the right-to-left function composition. Functions should have a unary. | ||
*/ export var compose = function () { | ||
export var compose = function () { | ||
var args = []; | ||
@@ -11,0 +8,0 @@ for (var _i = 0; _i < arguments.length; _i++) { |
import { OnInit } from '@angular/core'; | ||
import { TreeViewComponent } from './treeview.component'; | ||
import 'rxjs/add/observable/of'; | ||
/** | ||
* A directive which encapsulate the retrieval of child nodes. | ||
* A directive which encapsulates the retrieval of child nodes. | ||
*/ | ||
@@ -9,6 +10,6 @@ export declare class HierarchyBindingDirective implements OnInit { | ||
/** | ||
* The field name which holds the child data items. | ||
* The field name which holds the data items of the child component. | ||
*/ | ||
/** | ||
* The field name which holds the child data items. | ||
* The field name which holds the data items of the child component. | ||
*/ | ||
@@ -15,0 +16,0 @@ childrenField: string; |
@@ -6,4 +6,5 @@ import { Directive, Input } from '@angular/core'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import 'rxjs/add/observable/of'; | ||
/** | ||
* A directive which encapsulate the retrieval of child nodes. | ||
* A directive which encapsulates the retrieval of child nodes. | ||
*/ | ||
@@ -16,3 +17,3 @@ var HierarchyBindingDirective = (function () { | ||
/** | ||
* The field name which holds the child data items. | ||
* The field name which holds the data items of the child component. | ||
*/ | ||
@@ -23,3 +24,3 @@ get: function () { | ||
/** | ||
* The field name which holds the child data items. | ||
* The field name which holds the data items of the child component. | ||
*/ | ||
@@ -42,14 +43,14 @@ set: function (value) { | ||
}; | ||
HierarchyBindingDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewHierarchyBinding]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
HierarchyBindingDirective.ctorParameters = function () { return [ | ||
{ type: TreeViewComponent, }, | ||
]; }; | ||
HierarchyBindingDirective.propDecorators = { | ||
'childrenField': [{ type: Input },], | ||
}; | ||
return HierarchyBindingDirective; | ||
}()); | ||
export { HierarchyBindingDirective }; | ||
HierarchyBindingDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewHierarchyBinding]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
HierarchyBindingDirective.ctorParameters = function () { return [ | ||
{ type: TreeViewComponent, }, | ||
]; }; | ||
HierarchyBindingDirective.propDecorators = { | ||
'childrenField': [{ type: Input },], | ||
}; |
@@ -61,17 +61,17 @@ import { Directive, ChangeDetectorRef, HostBinding, Input } from '@angular/core'; | ||
}; | ||
LoadingIndicatorDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewLoading]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
LoadingIndicatorDirective.ctorParameters = function () { return [ | ||
{ type: ExpandStateService, }, | ||
{ type: LoadingNotificationService, }, | ||
{ type: ChangeDetectorRef, }, | ||
]; }; | ||
LoadingIndicatorDirective.propDecorators = { | ||
'loading': [{ type: HostBinding, args: ["class.k-i-loading",] },], | ||
'index': [{ type: Input, args: ["kendoTreeViewLoading",] },], | ||
}; | ||
return LoadingIndicatorDirective; | ||
}()); | ||
export { LoadingIndicatorDirective }; | ||
LoadingIndicatorDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[kendoTreeViewLoading]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
LoadingIndicatorDirective.ctorParameters = function () { return [ | ||
{ type: ExpandStateService, }, | ||
{ type: LoadingNotificationService, }, | ||
{ type: ChangeDetectorRef, }, | ||
]; }; | ||
LoadingIndicatorDirective.propDecorators = { | ||
'loading': [{ type: HostBinding, args: ["class.k-i-loading",] },], | ||
'index': [{ type: Input, args: ["kendoTreeViewLoading",] },], | ||
}; |
@@ -13,9 +13,9 @@ import { Injectable } from "@angular/core"; | ||
}; | ||
LoadingNotificationService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
LoadingNotificationService.ctorParameters = function () { return []; }; | ||
return LoadingNotificationService; | ||
}()); | ||
export { LoadingNotificationService }; | ||
LoadingNotificationService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
LoadingNotificationService.ctorParameters = function () { return []; }; |
@@ -5,3 +5,6 @@ export { TreeViewComponent } from './treeview.component'; | ||
export { ExpandDirective } from './expand.directive'; | ||
export { SelectDirective } from './selection/select.directive'; | ||
export { SelectionMode } from './selection/selection-mode'; | ||
export { SelectionSettings } from './selection/selection-settings'; | ||
export { HierarchyBindingDirective } from './hierarchy-binding.directive'; | ||
export { FlatDataBindingDirective } from './flat-binding.directive'; |
@@ -5,3 +5,4 @@ export { TreeViewComponent } from './treeview.component'; | ||
export { ExpandDirective } from './expand.directive'; | ||
export { SelectDirective } from './selection/select.directive'; | ||
export { HierarchyBindingDirective } from './hierarchy-binding.directive'; | ||
export { FlatDataBindingDirective } from './flat-binding.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":"./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":"./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":"./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"]}]}] |
import { TemplateRef } from "@angular/core"; | ||
/** | ||
* Represents the node template | ||
* Represents the template for the nodes. | ||
* The template helps to customize the content of the nodes. | ||
* To define the node template, nest an `<ng-template>` tag with the | ||
* `kendoTreeViewNodeTemplate` directive inside a `<kendo-treeview>` tag. | ||
* The template context is set to the data item of the current node. | ||
* | ||
* @example | ||
* ```ts | ||
* | ||
* import { Component } from '@angular/core'; | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <kendo-treeview | ||
* [nodes]="data" | ||
* kendoTreeViewExpandBy | ||
* | ||
* kendoTreeViewHierarchyBinding | ||
* childrenField="items"> | ||
* <ng-template kendoTreeViewNodeTemplate let-dataItem> | ||
* <span [style.fontWeight]="dataItem.items ? 'bolder': 'normal' ">{{dataItem.text}}</span> | ||
* </ng-template> | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { | ||
* text: "Inbox", | ||
* items: [{ text: "Read Mail" }] | ||
* }, | ||
* { | ||
* text: "Drafts" | ||
* }, | ||
* { | ||
* text: "Search Folders", | ||
* items: [ | ||
* { text: "Categorized Mail" }, | ||
* { text: "Large Mail" }, | ||
* { text: "Unread Mail"} | ||
* ] | ||
* }, | ||
* { text: "Settings" } | ||
* ]; | ||
* } | ||
* | ||
* ``` | ||
*/ | ||
@@ -5,0 +51,0 @@ export declare class NodeTemplateDirective { |
import { Optional, Directive, TemplateRef } from "@angular/core"; | ||
/** | ||
* Represents the node template | ||
* Represents the template for the nodes. | ||
* The template helps to customize the content of the nodes. | ||
* To define the node template, nest an `<ng-template>` tag with the | ||
* `kendoTreeViewNodeTemplate` directive inside a `<kendo-treeview>` tag. | ||
* The template context is set to the data item of the current node. | ||
* | ||
* @example | ||
* ```ts | ||
* | ||
* import { Component } from '@angular/core'; | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <kendo-treeview | ||
* [nodes]="data" | ||
* kendoTreeViewExpandBy | ||
* | ||
* kendoTreeViewHierarchyBinding | ||
* childrenField="items"> | ||
* <ng-template kendoTreeViewNodeTemplate let-dataItem> | ||
* <span [style.fontWeight]="dataItem.items ? 'bolder': 'normal' ">{{dataItem.text}}</span> | ||
* </ng-template> | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { | ||
* text: "Inbox", | ||
* items: [{ text: "Read Mail" }] | ||
* }, | ||
* { | ||
* text: "Drafts" | ||
* }, | ||
* { | ||
* text: "Search Folders", | ||
* items: [ | ||
* { text: "Categorized Mail" }, | ||
* { text: "Large Mail" }, | ||
* { text: "Unread Mail"} | ||
* ] | ||
* }, | ||
* { text: "Settings" } | ||
* ]; | ||
* } | ||
* | ||
* ``` | ||
*/ | ||
@@ -9,13 +55,13 @@ var NodeTemplateDirective = (function () { | ||
} | ||
NodeTemplateDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[kendoTreeViewNodeTemplate]' | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NodeTemplateDirective.ctorParameters = function () { return [ | ||
{ type: TemplateRef, decorators: [{ type: Optional },] }, | ||
]; }; | ||
return NodeTemplateDirective; | ||
}()); | ||
export { NodeTemplateDirective }; | ||
NodeTemplateDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[kendoTreeViewNodeTemplate]' | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NodeTemplateDirective.ctorParameters = function () { return [ | ||
{ type: TemplateRef, decorators: [{ type: Optional },] }, | ||
]; }; |
/** | ||
* TreeView module | ||
* @hidden | ||
*/ | ||
export declare class SharedModule { | ||
} |
@@ -7,10 +7,16 @@ import { NgModule } from '@angular/core'; | ||
import { ExpandDirective } from './expand.directive'; | ||
import { SelectDirective } from './selection/select.directive'; | ||
import { HierarchyBindingDirective } from './hierarchy-binding.directive'; | ||
import { LoadingIndicatorDirective } from './loading-indicator.directive'; | ||
import { FlatDataBindingDirective } from './flat-binding.directive'; | ||
import { TreeViewItemDirective } from './treeview-item.directive'; | ||
import { TreeViewItemContentDirective } from './treeview-item-content.directive'; | ||
var COMPONENT_DIRECTIVES = [ | ||
TreeViewComponent, | ||
TreeViewGroupComponent, | ||
TreeViewItemDirective, | ||
TreeViewItemContentDirective, | ||
NodeTemplateDirective, | ||
ExpandDirective, | ||
SelectDirective, | ||
HierarchyBindingDirective, | ||
@@ -21,3 +27,3 @@ LoadingIndicatorDirective, | ||
/** | ||
* TreeView module | ||
* @hidden | ||
*/ | ||
@@ -27,13 +33,13 @@ var SharedModule = (function () { | ||
} | ||
SharedModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
declarations: [COMPONENT_DIRECTIVES], | ||
exports: [COMPONENT_DIRECTIVES], | ||
imports: [CommonModule] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
SharedModule.ctorParameters = function () { return []; }; | ||
return SharedModule; | ||
}()); | ||
export { SharedModule }; | ||
SharedModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
declarations: [COMPONENT_DIRECTIVES], | ||
exports: [COMPONENT_DIRECTIVES], | ||
imports: [CommonModule] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
SharedModule.ctorParameters = function () { return []; }; |
@@ -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":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__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":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__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":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__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":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__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":"./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"}]}]}]}}}] |
import { ChangeDetectorRef, TemplateRef, OnInit, OnDestroy } from '@angular/core'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
import { IndexBuilderService } from './index-builder.service'; | ||
import { LoadingNotificationService } from './loading-notification.service'; | ||
@@ -15,4 +16,6 @@ import { Observable } from 'rxjs/Observable'; | ||
protected loadingService: LoadingNotificationService; | ||
protected indexBuilder: IndexBuilderService; | ||
protected cd: ChangeDetectorRef; | ||
kGroupClass: boolean; | ||
readonly role: string; | ||
nodes: Observable<any[]>; | ||
@@ -24,8 +27,9 @@ textField: string | string[]; | ||
private subscription; | ||
constructor(expandService: ExpandStateService, loadingService: LoadingNotificationService, cd: ChangeDetectorRef); | ||
constructor(expandService: ExpandStateService, loadingService: LoadingNotificationService, indexBuilder: IndexBuilderService, cd: ChangeDetectorRef); | ||
hasChildren: <T>(item: T) => boolean; | ||
isExpanded: <T>(item: T, index: string) => boolean; | ||
isSelected: <T>(item: T, index: string) => boolean; | ||
children: <T>(item: T) => Observable<any[]>; | ||
readonly hasTemplate: boolean; | ||
nodeClick(index: string, dataItem: any, expand: boolean): void; | ||
expandNode(index: string, dataItem: any, expand: boolean): void; | ||
nodeIndex(index: number): string; | ||
@@ -32,0 +36,0 @@ nodeText(dataItem: any): any; |
import { Component, ChangeDetectorRef, HostBinding, Input } from '@angular/core'; | ||
import { trigger, style, animate, transition } from '@angular/animations'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
import { IndexBuilderService } from './index-builder.service'; | ||
import { isPresent, isArray } from './utils'; | ||
@@ -16,5 +17,6 @@ import { getter } from './accessor'; | ||
var TreeViewGroupComponent = (function () { | ||
function TreeViewGroupComponent(expandService, loadingService, cd) { | ||
function TreeViewGroupComponent(expandService, loadingService, indexBuilder, cd) { | ||
this.expandService = expandService; | ||
this.loadingService = loadingService; | ||
this.indexBuilder = indexBuilder; | ||
this.cd = cd; | ||
@@ -26,4 +28,10 @@ this.kGroupClass = true; | ||
this.isExpanded = function () { return false; }; | ||
this.isSelected = function () { return false; }; | ||
this.children = function () { return Observable.of([]); }; | ||
} | ||
Object.defineProperty(TreeViewGroupComponent.prototype, "role", { | ||
get: function () { return 'group'; }, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewGroupComponent.prototype, "hasTemplate", { | ||
@@ -36,3 +44,3 @@ get: function () { | ||
}); | ||
TreeViewGroupComponent.prototype.nodeClick = function (index, dataItem, expand) { | ||
TreeViewGroupComponent.prototype.expandNode = function (index, dataItem, expand) { | ||
if (expand) { | ||
@@ -46,3 +54,3 @@ this.expandService.expand(index, dataItem); | ||
TreeViewGroupComponent.prototype.nodeIndex = function (index) { | ||
return this.parentIndex ? this.parentIndex + "_" + index : "" + index; | ||
return this.indexBuilder.nodeIndex(index.toString(), this.parentIndex); | ||
}; | ||
@@ -81,38 +89,41 @@ TreeViewGroupComponent.prototype.nodeText = function (dataItem) { | ||
}); | ||
TreeViewGroupComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
animations: [ | ||
trigger('toggle', [ | ||
transition('void => *', [ | ||
style({ height: 0 }), | ||
animate('0.1s ease-in', style({ height: "*" })) | ||
]), | ||
transition('* => void', [ | ||
style({ height: "*" }), | ||
animate('0.1s ease-in', 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 " | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewGroupComponent.ctorParameters = function () { return [ | ||
{ type: ExpandStateService, }, | ||
{ type: LoadingNotificationService, }, | ||
{ type: IndexBuilderService, }, | ||
{ type: ChangeDetectorRef, }, | ||
]; }; | ||
TreeViewGroupComponent.propDecorators = { | ||
'kGroupClass': [{ type: HostBinding, args: ["class.k-group",] },], | ||
'role': [{ type: HostBinding, args: ["attr.role",] },], | ||
'nodes': [{ type: Input },], | ||
'textField': [{ type: Input },], | ||
'parentIndex': [{ type: Input },], | ||
'nodeTemplateRef': [{ type: Input },], | ||
'hasChildren': [{ type: Input },], | ||
'isExpanded': [{ type: Input },], | ||
'isSelected': [{ type: Input },], | ||
'children': [{ type: Input },], | ||
}; | ||
return TreeViewGroupComponent; | ||
}()); | ||
export { TreeViewGroupComponent }; | ||
TreeViewGroupComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
animations: [ | ||
trigger('toggle', [ | ||
transition('void => *', [ | ||
style({ height: 0 }), | ||
animate('0.1s ease-in', style({ height: "*" })) | ||
]), | ||
transition('* => void', [ | ||
style({ height: "*" }), | ||
animate('0.1s ease-in', style({ height: 0 })) | ||
]) | ||
]) | ||
], | ||
selector: '[kendoTreeViewGroup]', | ||
template: "\n <li *ngFor=\"let node of data; let index = index\" class=\"k-item\" [@toggle]=\"true\">\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)=\"nodeClick(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span class=\"k-in\">\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\"\n [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 [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [textField]=\"nextFields\"\n >\n </ul>\n </li>\n " | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewGroupComponent.ctorParameters = function () { return [ | ||
{ type: ExpandStateService, }, | ||
{ type: LoadingNotificationService, }, | ||
{ type: ChangeDetectorRef, }, | ||
]; }; | ||
TreeViewGroupComponent.propDecorators = { | ||
'kGroupClass': [{ type: HostBinding, args: ["class.k-group",] },], | ||
'nodes': [{ type: Input },], | ||
'textField': [{ type: Input },], | ||
'parentIndex': [{ type: Input },], | ||
'nodeTemplateRef': [{ type: Input },], | ||
'hasChildren': [{ type: Input },], | ||
'isExpanded': [{ type: Input },], | ||
'children': [{ type: Input },], | ||
}; |
@@ -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 *ngFor=\"let node of data; let index = index\" class=\"k-item\" [@toggle]=\"true\">\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)=\"nodeClick(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span class=\"k-in\">\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\"\n [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 [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\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"]}]}],"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":"@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"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeClick":[{"__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 *ngFor=\"let node of data; let index = index\" class=\"k-item\" [@toggle]=\"true\">\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)=\"nodeClick(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span class=\"k-in\">\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\"\n [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 [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\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"]}]}],"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":"@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"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeClick":[{"__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 [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"}]}}}}] |
import { EventEmitter, OnInit, OnDestroy } from '@angular/core'; | ||
import { NodeTemplateDirective } from './node-template.directive'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
import { NavigationService } from './navigation/navigation.service'; | ||
import { SelectionService } from './selection/selection.service'; | ||
import { Subscription } from 'rxjs/Subscription'; | ||
@@ -8,12 +10,62 @@ import { Subject } from 'rxjs/Subject'; | ||
/** | ||
* Kendo UI TreeView component | ||
* Represents the Kendo UI TreeView component for Angular. | ||
* | ||
* @example | ||
* {% meta height:350 %} | ||
* ```ts-preview | ||
* import { Component } from '@angular/core'; | ||
* | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <kendo-treeview | ||
* [nodes]="data" | ||
* textField="text" | ||
* kendoTreeViewExpandBy | ||
* | ||
* kendoTreeViewHierarchyBinding | ||
* childrenField="items"> | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { | ||
* text: "Furniture", items: [ | ||
* { text: "Tables & Chairs" }, | ||
* { text: "Sofas" }, | ||
* { text: "Occasional Furniture" } | ||
* ] | ||
* }, | ||
* { | ||
* text: "Decor", items: [ | ||
* { text: "Bed Linen" }, | ||
* { text: "Curtains & Blinds" }, | ||
* { text: "Carpets" } | ||
* ] | ||
* } | ||
* ]; | ||
* } | ||
* ``` | ||
* {% endmeta %} | ||
*/ | ||
export declare class TreeViewComponent implements OnInit, OnDestroy { | ||
protected expandService: ExpandStateService; | ||
protected navigationService: NavigationService; | ||
protected selectionService: SelectionService; | ||
classNames: boolean; | ||
readonly role: string; | ||
/** | ||
* Determines if content animation is enabled | ||
* Determines whether the content animation is enabled. | ||
*/ | ||
animate: boolean; | ||
/** | ||
* Fires when the user blurs the component. | ||
*/ | ||
onBlur: EventEmitter<any>; | ||
/** | ||
* Fires when the user focuses the component. | ||
*/ | ||
onFocus: EventEmitter<any>; | ||
/** | ||
* Fires when the user expands a tree node. | ||
@@ -33,2 +85,9 @@ */ | ||
/** | ||
* Fires when the user selects a tree node. | ||
*/ | ||
selectionChange: EventEmitter<{ | ||
index: string; | ||
dataItem: any; | ||
}>; | ||
/** | ||
* @hidden | ||
@@ -38,28 +97,50 @@ */ | ||
/** | ||
* The nodes which to be displayed by the component | ||
* The nodes which will be displayed by the TreeView. | ||
*/ | ||
nodes: any[]; | ||
/** | ||
* The field(s) of the data item that provides the text content of the nodes. | ||
* If an array, each level uses the field that is at the same index in the array, or the last item in the array. | ||
* The fields of the data item that provide the text content of the nodes. | ||
* If the `textField` input is set to an array, | ||
* each hierarchical level uses the field that corresponds to the same index in the array, | ||
* or the last item in the array. | ||
*/ | ||
textField: string | string[]; | ||
data: Subject<any[]>; | ||
protected subscriptions: Subscription; | ||
data: Subject<any[]>; | ||
private _animate; | ||
constructor(expandService: ExpandStateService); | ||
/** | ||
* @hidden | ||
*/ | ||
handleKeydown(e: any): void; | ||
/** | ||
* @hidden | ||
*/ | ||
handleFocusin({target}: any): void; | ||
/** | ||
* @hidden | ||
*/ | ||
handleClick({target}: any): void; | ||
/** | ||
* @hidden | ||
*/ | ||
handleFocusout({target}: any): void; | ||
constructor(expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService); | ||
ngOnDestroy(): void; | ||
ngOnInit(): void; | ||
/** | ||
* Function which determines if given node has child nodes | ||
* A function which determines if a given node has child nodes. | ||
*/ | ||
hasChildren: <T>(item: T) => boolean; | ||
/** | ||
* Function which determines if given node is expanded | ||
* A function which determines if a given node is expanded. | ||
*/ | ||
isExpanded: <T>(item: T, index: string) => boolean; | ||
/** | ||
* Function which provides the child nodes for given parent | ||
* A function which determines if a given node is selected. | ||
*/ | ||
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[]>; | ||
} |
@@ -1,4 +0,7 @@ | ||
import { ChangeDetectionStrategy, Component, HostBinding, Input, ContentChild, Output, EventEmitter } from '@angular/core'; | ||
import { ChangeDetectionStrategy, Component, 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 { NavigationService } from './navigation/navigation.service'; | ||
import { SelectionService } from './selection/selection.service'; | ||
import { Subscription } from 'rxjs/Subscription'; | ||
@@ -8,10 +11,67 @@ import { BehaviorSubject } from 'rxjs/BehaviorSubject'; | ||
import { LoadingNotificationService } from './loading-notification.service'; | ||
import { nodeId } from './utils'; | ||
var providers = [ | ||
ExpandStateService, | ||
IndexBuilderService, | ||
LoadingNotificationService, | ||
NavigationService, | ||
SelectionService | ||
]; | ||
/** | ||
* Kendo UI TreeView component | ||
* Represents the Kendo UI TreeView component for Angular. | ||
* | ||
* @example | ||
* {% meta height:350 %} | ||
* ```ts-preview | ||
* import { Component } from '@angular/core'; | ||
* | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <kendo-treeview | ||
* [nodes]="data" | ||
* textField="text" | ||
* kendoTreeViewExpandBy | ||
* | ||
* kendoTreeViewHierarchyBinding | ||
* childrenField="items"> | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { | ||
* text: "Furniture", items: [ | ||
* { text: "Tables & Chairs" }, | ||
* { text: "Sofas" }, | ||
* { text: "Occasional Furniture" } | ||
* ] | ||
* }, | ||
* { | ||
* text: "Decor", items: [ | ||
* { text: "Bed Linen" }, | ||
* { text: "Curtains & Blinds" }, | ||
* { text: "Carpets" } | ||
* ] | ||
* } | ||
* ]; | ||
* } | ||
* ``` | ||
* {% endmeta %} | ||
*/ | ||
var TreeViewComponent = (function () { | ||
function TreeViewComponent(expandService) { | ||
function TreeViewComponent(expandService, navigationService, selectionService) { | ||
this.expandService = expandService; | ||
this.navigationService = navigationService; | ||
this.selectionService = selectionService; | ||
this.classNames = true; | ||
/** | ||
* Fires when the user blurs the component. | ||
*/ | ||
this.onBlur = new EventEmitter(); //tslint:disable-line:no-output-rename | ||
/** | ||
* Fires when the user focuses the component. | ||
*/ | ||
this.onFocus = new EventEmitter(); //tslint:disable-line:no-output-rename | ||
/** | ||
* Fires when the user expands a tree node. | ||
@@ -24,18 +84,31 @@ */ | ||
this.collapse = new EventEmitter(); | ||
/** | ||
* Fires when the user selects a tree node. | ||
*/ | ||
this.selectionChange = new EventEmitter(); | ||
this.data = new BehaviorSubject([]); | ||
this.subscriptions = new Subscription(function () { }); | ||
this.data = new BehaviorSubject([]); | ||
this._animate = true; | ||
/** | ||
* Function which determines if given node has child nodes | ||
* A function which determines if a given node has child nodes. | ||
*/ | ||
this.hasChildren = function () { return false; }; | ||
/** | ||
* Function which determines if given node is expanded | ||
* A function which determines if a given node is expanded. | ||
*/ | ||
this.isExpanded = function () { return false; }; | ||
/** | ||
* Function which provides the child nodes for given parent | ||
* A function which determines if a given node is selected. | ||
*/ | ||
this.isSelected = function () { return false; }; | ||
/** | ||
* A function which provides the child nodes for a given parent node. | ||
*/ | ||
this.children = function () { return Observable.of([]); }; | ||
} | ||
Object.defineProperty(TreeViewComponent.prototype, "role", { | ||
get: function () { return 'tree'; }, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewComponent.prototype, "animate", { | ||
@@ -46,3 +119,3 @@ get: function () { | ||
/** | ||
* Determines if content animation is enabled | ||
* Determines whether the content animation is enabled. | ||
*/ | ||
@@ -57,3 +130,3 @@ set: function (value) { | ||
/** | ||
* The nodes which to be displayed by the component | ||
* The nodes which will be displayed by the TreeView. | ||
*/ | ||
@@ -66,2 +139,51 @@ set: function (value) { | ||
}); | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleKeydown = function (e) { | ||
this.navigationService.move(e); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleFocusin = function (_a) { | ||
var _this = this; | ||
var target = _a.target; | ||
var index = nodeId(target); | ||
if (!index) { | ||
return; | ||
} | ||
this.navigationService.activateIndex(index); | ||
Promise.resolve(null).then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.onFocus.emit(); | ||
} | ||
}); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleClick = function (_a) { | ||
var target = _a.target; | ||
this.handleFocusin({ target: target }); | ||
var index = nodeId(target); | ||
if (!index) { | ||
return; | ||
} | ||
this.navigationService.selectIndex(index); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleFocusout = function (_a) { | ||
var _this = this; | ||
var target = _a.target; | ||
var index = target.getAttribute('data-treeindex'); | ||
Promise.resolve(null).then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.navigationService.deactivate(); | ||
_this.onBlur.emit(); | ||
} | ||
}); | ||
}; | ||
TreeViewComponent.prototype.ngOnDestroy = function () { | ||
@@ -79,30 +201,43 @@ this.subscriptions.unsubscribe(); | ||
})); | ||
this.subscriptions.add(this.selectionService.changes | ||
.subscribe(function (x) { return _this.selectionChange.emit(x); })); | ||
}; | ||
TreeViewComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
exportAs: 'kendoTreeView', | ||
providers: providers, | ||
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 " | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewComponent.ctorParameters = function () { return [ | ||
{ type: ExpandStateService, }, | ||
{ type: NavigationService, }, | ||
{ type: SelectionService, }, | ||
]; }; | ||
TreeViewComponent.propDecorators = { | ||
'classNames': [{ type: HostBinding, args: ["class.k-widget",] }, { type: HostBinding, args: ["class.k-treeview",] },], | ||
'role': [{ type: HostBinding, args: ["attr.role",] },], | ||
'animate': [{ type: Input }, { type: HostBinding, args: ['@.disabled',] },], | ||
'onBlur': [{ type: Output, args: ['blur',] },], | ||
'onFocus': [{ type: Output, args: ['focus',] },], | ||
'expand': [{ type: Output },], | ||
'collapse': [{ type: Output },], | ||
'selectionChange': [{ type: Output },], | ||
'nodeTemplate': [{ type: ContentChild, args: [NodeTemplateDirective,] },], | ||
'nodes': [{ type: Input },], | ||
'textField': [{ type: Input },], | ||
'handleKeydown': [{ type: HostListener, args: ['keydown', ['$event'],] },], | ||
'handleFocusin': [{ type: HostListener, args: ['focusin', ['$event'],] },], | ||
'handleClick': [{ type: HostListener, args: ['click', ['$event'],] },], | ||
'handleFocusout': [{ type: HostListener, args: ['focusout', ['$event'],] },], | ||
'hasChildren': [{ type: Input },], | ||
'isExpanded': [{ type: Input },], | ||
'isSelected': [{ type: Input },], | ||
'children': [{ type: Input },], | ||
}; | ||
return TreeViewComponent; | ||
}()); | ||
export { TreeViewComponent }; | ||
TreeViewComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
exportAs: 'kendoTreeView', | ||
providers: [ExpandStateService, LoadingNotificationService], | ||
selector: 'kendo-treeview', | ||
template: "\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n " | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewComponent.ctorParameters = function () { return [ | ||
{ type: ExpandStateService, }, | ||
]; }; | ||
TreeViewComponent.propDecorators = { | ||
'classNames': [{ type: HostBinding, args: ["class.k-widget",] }, { type: HostBinding, args: ["class.k-treeview",] },], | ||
'animate': [{ type: Input }, { type: HostBinding, args: ['@.disabled',] },], | ||
'expand': [{ type: Output },], | ||
'collapse': [{ type: Output },], | ||
'nodeTemplate': [{ type: ContentChild, args: [NodeTemplateDirective,] },], | ||
'nodes': [{ type: Input },], | ||
'textField': [{ type: Input },], | ||
'hasChildren': [{ type: Input },], | ||
'isExpanded': [{ type: Input },], | ||
'children': [{ type: Input },], | ||
}; |
@@ -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":"./loading-notification.service","name":"LoadingNotificationService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\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"]}]}],"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"]}]}],"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"}}]}],"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"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"}]}],"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"}}]}],"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":"./loading-notification.service","name":"LoadingNotificationService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\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"]}]}],"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"]}]}],"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"}}]}],"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"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"}]}],"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"}}]}],"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":"./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"}}]}]}}}}] |
/** | ||
* TreeView module | ||
* Represents the [NgModule](https://angular.io/guide/ngmodule) definition for the TreeView component. | ||
*/ | ||
export declare class TreeViewModule { | ||
} |
@@ -6,2 +6,3 @@ import { NgModule } from '@angular/core'; | ||
import { ExpandDirective } from './expand.directive'; | ||
import { SelectDirective } from './selection/select.directive'; | ||
import { HierarchyBindingDirective } from './hierarchy-binding.directive'; | ||
@@ -13,2 +14,3 @@ import { FlatDataBindingDirective } from './flat-binding.directive'; | ||
ExpandDirective, | ||
SelectDirective, | ||
HierarchyBindingDirective, | ||
@@ -18,3 +20,3 @@ FlatDataBindingDirective | ||
/** | ||
* TreeView module | ||
* Represents the [NgModule](https://angular.io/guide/ngmodule) definition for the TreeView component. | ||
*/ | ||
@@ -24,12 +26,12 @@ var TreeViewModule = (function () { | ||
} | ||
TreeViewModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
exports: [EXPORTS], | ||
imports: [SharedModule] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewModule.ctorParameters = function () { return []; }; | ||
return TreeViewModule; | ||
}()); | ||
export { TreeViewModule }; | ||
TreeViewModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
exports: [EXPORTS], | ||
imports: [SharedModule] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewModule.ctorParameters = function () { return []; }; |
@@ -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":"./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":"./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":"./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"}]}]}]}}}] |
@@ -25,1 +25,9 @@ /** | ||
export declare const anyChanged: (propertyNames: string[], changes: any, skipFirstChange?: boolean) => boolean; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const nodeId: (node: HTMLElement) => string; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const noop: () => void; |
/** | ||
* @hidden | ||
*/ | ||
export var isPresent = function (value) { return value !== null && value !== undefined; }; | ||
/** | ||
* @hidden | ||
*/ export var isPresent = function (value) { return value !== null && value !== undefined; }; | ||
/** | ||
* @hidden | ||
*/ | ||
@@ -34,1 +32,9 @@ export var isBlank = function (value) { return value === null || value === undefined; }; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
export var nodeId = function (node) { return node.getAttribute('data-treeindex'); }; | ||
/** | ||
* @hidden | ||
*/ | ||
export var noop = function () { }; |
@@ -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}}},{"__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}}}] | ||
[{"__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}}}] |
@@ -18,9 +18,9 @@ "use strict"; | ||
}; | ||
ExpandStateService.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ExpandStateService.ctorParameters = function () { return []; }; | ||
return ExpandStateService; | ||
}()); | ||
ExpandStateService.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ExpandStateService.ctorParameters = function () { return []; }; | ||
exports.ExpandStateService = ExpandStateService; |
@@ -7,3 +7,3 @@ import { OnDestroy, OnInit, EventEmitter } from '@angular/core'; | ||
/** | ||
* A directive which manages the expand state of the TreeView component | ||
* A directive which manages the expand state of the TreeView. | ||
*/ | ||
@@ -17,3 +17,3 @@ export declare class ExpandDirective implements OnInit, OnDestroy { | ||
/** | ||
* Defines the item key that will be stored in the `expandedKeys` collection | ||
* Defines the item key that will be stored in the `expandedKeys` collection. | ||
*/ | ||
@@ -25,7 +25,7 @@ expandKey: string | ((context: { | ||
/** | ||
* Fires when the `expandedKeys` collection has been updated. | ||
* Fires when the `expandedKeys` collection was updated. | ||
*/ | ||
expandedKeysChange: EventEmitter<any[]>; | ||
/** | ||
* Defines the collection that will store the expanded keys | ||
* Defines the collection that will store the expanded keys. | ||
*/ | ||
@@ -32,0 +32,0 @@ expandedKeys: any[]; |
@@ -11,3 +11,3 @@ "use strict"; | ||
/** | ||
* A directive which manages the expand state of the TreeView component | ||
* A directive which manages the expand state of the TreeView. | ||
*/ | ||
@@ -18,7 +18,7 @@ var ExpandDirective = (function () { | ||
/** | ||
* Fires when the `expandedKeys` collection has been updated. | ||
* Fires when the `expandedKeys` collection was updated. | ||
*/ | ||
this.expandedKeysChange = new core_1.EventEmitter(); | ||
/** | ||
* Defines the collection that will store the expanded keys | ||
* Defines the collection that will store the expanded keys. | ||
*/ | ||
@@ -76,17 +76,17 @@ this.expandedKeys = []; | ||
}; | ||
ExpandDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewExpandBy]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
ExpandDirective.ctorParameters = function () { return [ | ||
{ type: treeview_component_1.TreeViewComponent, }, | ||
]; }; | ||
ExpandDirective.propDecorators = { | ||
'isExpanded': [{ type: core_1.Input },], | ||
'expandKey': [{ type: core_1.Input, args: ["kendoTreeViewExpandBy",] },], | ||
'expandedKeysChange': [{ type: core_1.Output },], | ||
'expandedKeys': [{ type: core_1.Input },], | ||
}; | ||
return ExpandDirective; | ||
}()); | ||
ExpandDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewExpandBy]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
ExpandDirective.ctorParameters = function () { return [ | ||
{ type: treeview_component_1.TreeViewComponent, }, | ||
]; }; | ||
ExpandDirective.propDecorators = { | ||
'isExpanded': [{ type: core_1.Input },], | ||
'expandKey': [{ type: core_1.Input, args: ["kendoTreeViewExpandBy",] },], | ||
'expandedKeysChange': [{ type: core_1.Output },], | ||
'expandedKeys': [{ type: core_1.Input },], | ||
}; | ||
exports.ExpandDirective = ExpandDirective; |
import { OnInit, OnChanges, SimpleChanges } from '@angular/core'; | ||
import { TreeViewComponent } from './treeview.component'; | ||
/** | ||
* A directive which encapsulate the retrieval of child nodes. | ||
* A directive which encapsulates the retrieval of the child nodes. | ||
*/ | ||
@@ -9,11 +9,11 @@ export declare class FlatDataBindingDirective implements OnInit, OnChanges { | ||
/** | ||
* The nodes which to be displayed by the component | ||
* The nodes which will be displayed by the TreeView. | ||
*/ | ||
nodes: any[]; | ||
/** | ||
* Represents parent field which value will be matched to parent node | ||
* Represents the parent field whose value will be matched with the parent node. | ||
*/ | ||
parentIdField: string; | ||
/** | ||
* Represents the field which uniquely identifies the node | ||
* Represents the unique field which identifies a node. | ||
*/ | ||
@@ -20,0 +20,0 @@ idField: string; |
@@ -11,3 +11,3 @@ "use strict"; | ||
/** | ||
* A directive which encapsulate the retrieval of child nodes. | ||
* A directive which encapsulates the retrieval of the child nodes. | ||
*/ | ||
@@ -21,3 +21,3 @@ var FlatDataBindingDirective = (function () { | ||
/** | ||
* The nodes which to be displayed by the component | ||
* The nodes which will be displayed by the TreeView. | ||
*/ | ||
@@ -58,16 +58,16 @@ set: function (values) { | ||
}; | ||
FlatDataBindingDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewFlatDataBinding]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
FlatDataBindingDirective.ctorParameters = function () { return [ | ||
{ type: treeview_component_1.TreeViewComponent, }, | ||
]; }; | ||
FlatDataBindingDirective.propDecorators = { | ||
'nodes': [{ type: core_1.Input },], | ||
'parentIdField': [{ type: core_1.Input },], | ||
'idField': [{ type: core_1.Input },], | ||
}; | ||
return FlatDataBindingDirective; | ||
}()); | ||
FlatDataBindingDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewFlatDataBinding]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
FlatDataBindingDirective.ctorParameters = function () { return [ | ||
{ type: treeview_component_1.TreeViewComponent, }, | ||
]; }; | ||
FlatDataBindingDirective.propDecorators = { | ||
'nodes': [{ type: core_1.Input },], | ||
'parentIdField': [{ type: core_1.Input },], | ||
'idField': [{ type: core_1.Input },], | ||
}; | ||
exports.FlatDataBindingDirective = FlatDataBindingDirective; |
import { OnInit } from '@angular/core'; | ||
import { TreeViewComponent } from './treeview.component'; | ||
import 'rxjs/add/observable/of'; | ||
/** | ||
* A directive which encapsulate the retrieval of child nodes. | ||
* A directive which encapsulates the retrieval of child nodes. | ||
*/ | ||
@@ -9,6 +10,6 @@ export declare class HierarchyBindingDirective implements OnInit { | ||
/** | ||
* The field name which holds the child data items. | ||
* The field name which holds the data items of the child component. | ||
*/ | ||
/** | ||
* The field name which holds the child data items. | ||
* The field name which holds the data items of the child component. | ||
*/ | ||
@@ -15,0 +16,0 @@ childrenField: string; |
@@ -8,4 +8,5 @@ "use strict"; | ||
var Observable_1 = require("rxjs/Observable"); | ||
require("rxjs/add/observable/of"); | ||
/** | ||
* A directive which encapsulate the retrieval of child nodes. | ||
* A directive which encapsulates the retrieval of child nodes. | ||
*/ | ||
@@ -18,3 +19,3 @@ var HierarchyBindingDirective = (function () { | ||
/** | ||
* The field name which holds the child data items. | ||
* The field name which holds the data items of the child component. | ||
*/ | ||
@@ -25,3 +26,3 @@ get: function () { | ||
/** | ||
* The field name which holds the child data items. | ||
* The field name which holds the data items of the child component. | ||
*/ | ||
@@ -44,14 +45,14 @@ set: function (value) { | ||
}; | ||
HierarchyBindingDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewHierarchyBinding]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
HierarchyBindingDirective.ctorParameters = function () { return [ | ||
{ type: treeview_component_1.TreeViewComponent, }, | ||
]; }; | ||
HierarchyBindingDirective.propDecorators = { | ||
'childrenField': [{ type: core_1.Input },], | ||
}; | ||
return HierarchyBindingDirective; | ||
}()); | ||
HierarchyBindingDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewHierarchyBinding]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
HierarchyBindingDirective.ctorParameters = function () { return [ | ||
{ type: treeview_component_1.TreeViewComponent, }, | ||
]; }; | ||
HierarchyBindingDirective.propDecorators = { | ||
'childrenField': [{ type: core_1.Input },], | ||
}; | ||
exports.HierarchyBindingDirective = HierarchyBindingDirective; |
@@ -63,17 +63,17 @@ "use strict"; | ||
}; | ||
LoadingIndicatorDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewLoading]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
LoadingIndicatorDirective.ctorParameters = function () { return [ | ||
{ type: expand_state_service_1.ExpandStateService, }, | ||
{ type: loading_notification_service_1.LoadingNotificationService, }, | ||
{ type: core_1.ChangeDetectorRef, }, | ||
]; }; | ||
LoadingIndicatorDirective.propDecorators = { | ||
'loading': [{ type: core_1.HostBinding, args: ["class.k-i-loading",] },], | ||
'index': [{ type: core_1.Input, args: ["kendoTreeViewLoading",] },], | ||
}; | ||
return LoadingIndicatorDirective; | ||
}()); | ||
LoadingIndicatorDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: '[kendoTreeViewLoading]' },] }, | ||
]; | ||
/** @nocollapse */ | ||
LoadingIndicatorDirective.ctorParameters = function () { return [ | ||
{ type: expand_state_service_1.ExpandStateService, }, | ||
{ type: loading_notification_service_1.LoadingNotificationService, }, | ||
{ type: core_1.ChangeDetectorRef, }, | ||
]; }; | ||
LoadingIndicatorDirective.propDecorators = { | ||
'loading': [{ type: core_1.HostBinding, args: ["class.k-i-loading",] },], | ||
'index': [{ type: core_1.Input, args: ["kendoTreeViewLoading",] },], | ||
}; | ||
exports.LoadingIndicatorDirective = LoadingIndicatorDirective; |
@@ -15,9 +15,9 @@ "use strict"; | ||
}; | ||
LoadingNotificationService.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
LoadingNotificationService.ctorParameters = function () { return []; }; | ||
return LoadingNotificationService; | ||
}()); | ||
LoadingNotificationService.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
LoadingNotificationService.ctorParameters = function () { return []; }; | ||
exports.LoadingNotificationService = LoadingNotificationService; |
@@ -5,3 +5,6 @@ export { TreeViewComponent } from './treeview.component'; | ||
export { ExpandDirective } from './expand.directive'; | ||
export { SelectDirective } from './selection/select.directive'; | ||
export { SelectionMode } from './selection/selection-mode'; | ||
export { SelectionSettings } from './selection/selection-settings'; | ||
export { HierarchyBindingDirective } from './hierarchy-binding.directive'; | ||
export { FlatDataBindingDirective } from './flat-binding.directive'; |
@@ -11,2 +11,4 @@ "use strict"; | ||
exports.ExpandDirective = expand_directive_1.ExpandDirective; | ||
var select_directive_1 = require("./selection/select.directive"); | ||
exports.SelectDirective = select_directive_1.SelectDirective; | ||
var hierarchy_binding_directive_1 = require("./hierarchy-binding.directive"); | ||
@@ -13,0 +15,0 @@ exports.HierarchyBindingDirective = hierarchy_binding_directive_1.HierarchyBindingDirective; |
@@ -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":"./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":"./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":"./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"]}]}] |
import { TemplateRef } from "@angular/core"; | ||
/** | ||
* Represents the node template | ||
* Represents the template for the nodes. | ||
* The template helps to customize the content of the nodes. | ||
* To define the node template, nest an `<ng-template>` tag with the | ||
* `kendoTreeViewNodeTemplate` directive inside a `<kendo-treeview>` tag. | ||
* The template context is set to the data item of the current node. | ||
* | ||
* @example | ||
* ```ts | ||
* | ||
* import { Component } from '@angular/core'; | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <kendo-treeview | ||
* [nodes]="data" | ||
* kendoTreeViewExpandBy | ||
* | ||
* kendoTreeViewHierarchyBinding | ||
* childrenField="items"> | ||
* <ng-template kendoTreeViewNodeTemplate let-dataItem> | ||
* <span [style.fontWeight]="dataItem.items ? 'bolder': 'normal' ">{{dataItem.text}}</span> | ||
* </ng-template> | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { | ||
* text: "Inbox", | ||
* items: [{ text: "Read Mail" }] | ||
* }, | ||
* { | ||
* text: "Drafts" | ||
* }, | ||
* { | ||
* text: "Search Folders", | ||
* items: [ | ||
* { text: "Categorized Mail" }, | ||
* { text: "Large Mail" }, | ||
* { text: "Unread Mail"} | ||
* ] | ||
* }, | ||
* { text: "Settings" } | ||
* ]; | ||
* } | ||
* | ||
* ``` | ||
*/ | ||
@@ -5,0 +51,0 @@ export declare class NodeTemplateDirective { |
@@ -5,3 +5,49 @@ "use strict"; | ||
/** | ||
* Represents the node template | ||
* Represents the template for the nodes. | ||
* The template helps to customize the content of the nodes. | ||
* To define the node template, nest an `<ng-template>` tag with the | ||
* `kendoTreeViewNodeTemplate` directive inside a `<kendo-treeview>` tag. | ||
* The template context is set to the data item of the current node. | ||
* | ||
* @example | ||
* ```ts | ||
* | ||
* import { Component } from '@angular/core'; | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <kendo-treeview | ||
* [nodes]="data" | ||
* kendoTreeViewExpandBy | ||
* | ||
* kendoTreeViewHierarchyBinding | ||
* childrenField="items"> | ||
* <ng-template kendoTreeViewNodeTemplate let-dataItem> | ||
* <span [style.fontWeight]="dataItem.items ? 'bolder': 'normal' ">{{dataItem.text}}</span> | ||
* </ng-template> | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { | ||
* text: "Inbox", | ||
* items: [{ text: "Read Mail" }] | ||
* }, | ||
* { | ||
* text: "Drafts" | ||
* }, | ||
* { | ||
* text: "Search Folders", | ||
* items: [ | ||
* { text: "Categorized Mail" }, | ||
* { text: "Large Mail" }, | ||
* { text: "Unread Mail"} | ||
* ] | ||
* }, | ||
* { text: "Settings" } | ||
* ]; | ||
* } | ||
* | ||
* ``` | ||
*/ | ||
@@ -12,13 +58,13 @@ var NodeTemplateDirective = (function () { | ||
} | ||
NodeTemplateDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ | ||
selector: '[kendoTreeViewNodeTemplate]' | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NodeTemplateDirective.ctorParameters = function () { return [ | ||
{ type: core_1.TemplateRef, decorators: [{ type: core_1.Optional },] }, | ||
]; }; | ||
return NodeTemplateDirective; | ||
}()); | ||
NodeTemplateDirective.decorators = [ | ||
{ type: core_1.Directive, args: [{ | ||
selector: '[kendoTreeViewNodeTemplate]' | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NodeTemplateDirective.ctorParameters = function () { return [ | ||
{ type: core_1.TemplateRef, decorators: [{ type: core_1.Optional },] }, | ||
]; }; | ||
exports.NodeTemplateDirective = NodeTemplateDirective; |
/** | ||
* TreeView module | ||
* @hidden | ||
*/ | ||
export declare class SharedModule { | ||
} |
@@ -9,10 +9,16 @@ "use strict"; | ||
var expand_directive_1 = require("./expand.directive"); | ||
var select_directive_1 = require("./selection/select.directive"); | ||
var hierarchy_binding_directive_1 = require("./hierarchy-binding.directive"); | ||
var loading_indicator_directive_1 = require("./loading-indicator.directive"); | ||
var flat_binding_directive_1 = require("./flat-binding.directive"); | ||
var treeview_item_directive_1 = require("./treeview-item.directive"); | ||
var treeview_item_content_directive_1 = require("./treeview-item-content.directive"); | ||
var COMPONENT_DIRECTIVES = [ | ||
treeview_component_1.TreeViewComponent, | ||
treeview_group_component_1.TreeViewGroupComponent, | ||
treeview_item_directive_1.TreeViewItemDirective, | ||
treeview_item_content_directive_1.TreeViewItemContentDirective, | ||
node_template_directive_1.NodeTemplateDirective, | ||
expand_directive_1.ExpandDirective, | ||
select_directive_1.SelectDirective, | ||
hierarchy_binding_directive_1.HierarchyBindingDirective, | ||
@@ -23,3 +29,3 @@ loading_indicator_directive_1.LoadingIndicatorDirective, | ||
/** | ||
* TreeView module | ||
* @hidden | ||
*/ | ||
@@ -29,13 +35,13 @@ var SharedModule = (function () { | ||
} | ||
SharedModule.decorators = [ | ||
{ type: core_1.NgModule, args: [{ | ||
declarations: [COMPONENT_DIRECTIVES], | ||
exports: [COMPONENT_DIRECTIVES], | ||
imports: [common_1.CommonModule] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
SharedModule.ctorParameters = function () { return []; }; | ||
return SharedModule; | ||
}()); | ||
SharedModule.decorators = [ | ||
{ type: core_1.NgModule, args: [{ | ||
declarations: [COMPONENT_DIRECTIVES], | ||
exports: [COMPONENT_DIRECTIVES], | ||
imports: [common_1.CommonModule] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
SharedModule.ctorParameters = function () { return []; }; | ||
exports.SharedModule = SharedModule; |
@@ -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":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__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":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__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":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__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":"./node-template.directive","name":"NodeTemplateDirective"},{"__symbolic":"reference","module":"./expand.directive","name":"ExpandDirective"},{"__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":"./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"}]}]}]}}}] |
import { ChangeDetectorRef, TemplateRef, OnInit, OnDestroy } from '@angular/core'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
import { IndexBuilderService } from './index-builder.service'; | ||
import { LoadingNotificationService } from './loading-notification.service'; | ||
@@ -15,4 +16,6 @@ import { Observable } from 'rxjs/Observable'; | ||
protected loadingService: LoadingNotificationService; | ||
protected indexBuilder: IndexBuilderService; | ||
protected cd: ChangeDetectorRef; | ||
kGroupClass: boolean; | ||
readonly role: string; | ||
nodes: Observable<any[]>; | ||
@@ -24,8 +27,9 @@ textField: string | string[]; | ||
private subscription; | ||
constructor(expandService: ExpandStateService, loadingService: LoadingNotificationService, cd: ChangeDetectorRef); | ||
constructor(expandService: ExpandStateService, loadingService: LoadingNotificationService, indexBuilder: IndexBuilderService, cd: ChangeDetectorRef); | ||
hasChildren: <T>(item: T) => boolean; | ||
isExpanded: <T>(item: T, index: string) => boolean; | ||
isSelected: <T>(item: T, index: string) => boolean; | ||
children: <T>(item: T) => Observable<any[]>; | ||
readonly hasTemplate: boolean; | ||
nodeClick(index: string, dataItem: any, expand: boolean): void; | ||
expandNode(index: string, dataItem: any, expand: boolean): void; | ||
nodeIndex(index: number): string; | ||
@@ -32,0 +36,0 @@ nodeText(dataItem: any): any; |
@@ -6,2 +6,3 @@ "use strict"; | ||
var expand_state_service_1 = require("./expand-state.service"); | ||
var index_builder_service_1 = require("./index-builder.service"); | ||
var utils_1 = require("./utils"); | ||
@@ -19,5 +20,6 @@ var accessor_1 = require("./accessor"); | ||
var TreeViewGroupComponent = (function () { | ||
function TreeViewGroupComponent(expandService, loadingService, cd) { | ||
function TreeViewGroupComponent(expandService, loadingService, indexBuilder, cd) { | ||
this.expandService = expandService; | ||
this.loadingService = loadingService; | ||
this.indexBuilder = indexBuilder; | ||
this.cd = cd; | ||
@@ -29,4 +31,10 @@ this.kGroupClass = true; | ||
this.isExpanded = function () { return false; }; | ||
this.isSelected = function () { return false; }; | ||
this.children = function () { return Observable_1.Observable.of([]); }; | ||
} | ||
Object.defineProperty(TreeViewGroupComponent.prototype, "role", { | ||
get: function () { return 'group'; }, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewGroupComponent.prototype, "hasTemplate", { | ||
@@ -39,3 +47,3 @@ get: function () { | ||
}); | ||
TreeViewGroupComponent.prototype.nodeClick = function (index, dataItem, expand) { | ||
TreeViewGroupComponent.prototype.expandNode = function (index, dataItem, expand) { | ||
if (expand) { | ||
@@ -49,3 +57,3 @@ this.expandService.expand(index, dataItem); | ||
TreeViewGroupComponent.prototype.nodeIndex = function (index) { | ||
return this.parentIndex ? this.parentIndex + "_" + index : "" + index; | ||
return this.indexBuilder.nodeIndex(index.toString(), this.parentIndex); | ||
}; | ||
@@ -84,38 +92,41 @@ TreeViewGroupComponent.prototype.nodeText = function (dataItem) { | ||
}); | ||
TreeViewGroupComponent.decorators = [ | ||
{ type: core_1.Component, args: [{ | ||
animations: [ | ||
animations_1.trigger('toggle', [ | ||
animations_1.transition('void => *', [ | ||
animations_1.style({ height: 0 }), | ||
animations_1.animate('0.1s ease-in', animations_1.style({ height: "*" })) | ||
]), | ||
animations_1.transition('* => void', [ | ||
animations_1.style({ height: "*" }), | ||
animations_1.animate('0.1s ease-in', animations_1.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 " | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewGroupComponent.ctorParameters = function () { return [ | ||
{ type: expand_state_service_1.ExpandStateService, }, | ||
{ type: loading_notification_service_1.LoadingNotificationService, }, | ||
{ type: index_builder_service_1.IndexBuilderService, }, | ||
{ type: core_1.ChangeDetectorRef, }, | ||
]; }; | ||
TreeViewGroupComponent.propDecorators = { | ||
'kGroupClass': [{ type: core_1.HostBinding, args: ["class.k-group",] },], | ||
'role': [{ type: core_1.HostBinding, args: ["attr.role",] },], | ||
'nodes': [{ type: core_1.Input },], | ||
'textField': [{ type: core_1.Input },], | ||
'parentIndex': [{ type: core_1.Input },], | ||
'nodeTemplateRef': [{ type: core_1.Input },], | ||
'hasChildren': [{ type: core_1.Input },], | ||
'isExpanded': [{ type: core_1.Input },], | ||
'isSelected': [{ type: core_1.Input },], | ||
'children': [{ type: core_1.Input },], | ||
}; | ||
return TreeViewGroupComponent; | ||
}()); | ||
TreeViewGroupComponent.decorators = [ | ||
{ type: core_1.Component, args: [{ | ||
animations: [ | ||
animations_1.trigger('toggle', [ | ||
animations_1.transition('void => *', [ | ||
animations_1.style({ height: 0 }), | ||
animations_1.animate('0.1s ease-in', animations_1.style({ height: "*" })) | ||
]), | ||
animations_1.transition('* => void', [ | ||
animations_1.style({ height: "*" }), | ||
animations_1.animate('0.1s ease-in', animations_1.style({ height: 0 })) | ||
]) | ||
]) | ||
], | ||
selector: '[kendoTreeViewGroup]', | ||
template: "\n <li *ngFor=\"let node of data; let index = index\" class=\"k-item\" [@toggle]=\"true\">\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)=\"nodeClick(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span class=\"k-in\">\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\"\n [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 [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [textField]=\"nextFields\"\n >\n </ul>\n </li>\n " | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewGroupComponent.ctorParameters = function () { return [ | ||
{ type: expand_state_service_1.ExpandStateService, }, | ||
{ type: loading_notification_service_1.LoadingNotificationService, }, | ||
{ type: core_1.ChangeDetectorRef, }, | ||
]; }; | ||
TreeViewGroupComponent.propDecorators = { | ||
'kGroupClass': [{ type: core_1.HostBinding, args: ["class.k-group",] },], | ||
'nodes': [{ type: core_1.Input },], | ||
'textField': [{ type: core_1.Input },], | ||
'parentIndex': [{ type: core_1.Input },], | ||
'nodeTemplateRef': [{ type: core_1.Input },], | ||
'hasChildren': [{ type: core_1.Input },], | ||
'isExpanded': [{ type: core_1.Input },], | ||
'children': [{ type: core_1.Input },], | ||
}; | ||
exports.TreeViewGroupComponent = 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 *ngFor=\"let node of data; let index = index\" class=\"k-item\" [@toggle]=\"true\">\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)=\"nodeClick(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span class=\"k-in\">\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\"\n [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 [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\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"]}]}],"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":"@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"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeClick":[{"__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 *ngFor=\"let node of data; let index = index\" class=\"k-item\" [@toggle]=\"true\">\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)=\"nodeClick(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"hasChildren(node)\"\n >\n </span>\n <span class=\"k-in\">\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\"\n [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 [nodes]=\"fetchChildren(node, nodeIndex(index))\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\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"]}]}],"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":"@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"}}]}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeClick":[{"__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 [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"}]}}}}] |
import { EventEmitter, OnInit, OnDestroy } from '@angular/core'; | ||
import { NodeTemplateDirective } from './node-template.directive'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
import { NavigationService } from './navigation/navigation.service'; | ||
import { SelectionService } from './selection/selection.service'; | ||
import { Subscription } from 'rxjs/Subscription'; | ||
@@ -8,12 +10,62 @@ import { Subject } from 'rxjs/Subject'; | ||
/** | ||
* Kendo UI TreeView component | ||
* Represents the Kendo UI TreeView component for Angular. | ||
* | ||
* @example | ||
* {% meta height:350 %} | ||
* ```ts-preview | ||
* import { Component } from '@angular/core'; | ||
* | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <kendo-treeview | ||
* [nodes]="data" | ||
* textField="text" | ||
* kendoTreeViewExpandBy | ||
* | ||
* kendoTreeViewHierarchyBinding | ||
* childrenField="items"> | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { | ||
* text: "Furniture", items: [ | ||
* { text: "Tables & Chairs" }, | ||
* { text: "Sofas" }, | ||
* { text: "Occasional Furniture" } | ||
* ] | ||
* }, | ||
* { | ||
* text: "Decor", items: [ | ||
* { text: "Bed Linen" }, | ||
* { text: "Curtains & Blinds" }, | ||
* { text: "Carpets" } | ||
* ] | ||
* } | ||
* ]; | ||
* } | ||
* ``` | ||
* {% endmeta %} | ||
*/ | ||
export declare class TreeViewComponent implements OnInit, OnDestroy { | ||
protected expandService: ExpandStateService; | ||
protected navigationService: NavigationService; | ||
protected selectionService: SelectionService; | ||
classNames: boolean; | ||
readonly role: string; | ||
/** | ||
* Determines if content animation is enabled | ||
* Determines whether the content animation is enabled. | ||
*/ | ||
animate: boolean; | ||
/** | ||
* Fires when the user blurs the component. | ||
*/ | ||
onBlur: EventEmitter<any>; | ||
/** | ||
* Fires when the user focuses the component. | ||
*/ | ||
onFocus: EventEmitter<any>; | ||
/** | ||
* Fires when the user expands a tree node. | ||
@@ -33,2 +85,9 @@ */ | ||
/** | ||
* Fires when the user selects a tree node. | ||
*/ | ||
selectionChange: EventEmitter<{ | ||
index: string; | ||
dataItem: any; | ||
}>; | ||
/** | ||
* @hidden | ||
@@ -38,28 +97,50 @@ */ | ||
/** | ||
* The nodes which to be displayed by the component | ||
* The nodes which will be displayed by the TreeView. | ||
*/ | ||
nodes: any[]; | ||
/** | ||
* The field(s) of the data item that provides the text content of the nodes. | ||
* If an array, each level uses the field that is at the same index in the array, or the last item in the array. | ||
* The fields of the data item that provide the text content of the nodes. | ||
* If the `textField` input is set to an array, | ||
* each hierarchical level uses the field that corresponds to the same index in the array, | ||
* or the last item in the array. | ||
*/ | ||
textField: string | string[]; | ||
data: Subject<any[]>; | ||
protected subscriptions: Subscription; | ||
data: Subject<any[]>; | ||
private _animate; | ||
constructor(expandService: ExpandStateService); | ||
/** | ||
* @hidden | ||
*/ | ||
handleKeydown(e: any): void; | ||
/** | ||
* @hidden | ||
*/ | ||
handleFocusin({target}: any): void; | ||
/** | ||
* @hidden | ||
*/ | ||
handleClick({target}: any): void; | ||
/** | ||
* @hidden | ||
*/ | ||
handleFocusout({target}: any): void; | ||
constructor(expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService); | ||
ngOnDestroy(): void; | ||
ngOnInit(): void; | ||
/** | ||
* Function which determines if given node has child nodes | ||
* A function which determines if a given node has child nodes. | ||
*/ | ||
hasChildren: <T>(item: T) => boolean; | ||
/** | ||
* Function which determines if given node is expanded | ||
* A function which determines if a given node is expanded. | ||
*/ | ||
isExpanded: <T>(item: T, index: string) => boolean; | ||
/** | ||
* Function which provides the child nodes for given parent | ||
* A function which determines if a given node is selected. | ||
*/ | ||
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[]>; | ||
} |
@@ -6,2 +6,5 @@ "use strict"; | ||
var expand_state_service_1 = require("./expand-state.service"); | ||
var index_builder_service_1 = require("./index-builder.service"); | ||
var navigation_service_1 = require("./navigation/navigation.service"); | ||
var selection_service_1 = require("./selection/selection.service"); | ||
var Subscription_1 = require("rxjs/Subscription"); | ||
@@ -11,10 +14,67 @@ var BehaviorSubject_1 = require("rxjs/BehaviorSubject"); | ||
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, | ||
loading_notification_service_1.LoadingNotificationService, | ||
navigation_service_1.NavigationService, | ||
selection_service_1.SelectionService | ||
]; | ||
/** | ||
* Kendo UI TreeView component | ||
* Represents the Kendo UI TreeView component for Angular. | ||
* | ||
* @example | ||
* {% meta height:350 %} | ||
* ```ts-preview | ||
* import { Component } from '@angular/core'; | ||
* | ||
* @Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <kendo-treeview | ||
* [nodes]="data" | ||
* textField="text" | ||
* kendoTreeViewExpandBy | ||
* | ||
* kendoTreeViewHierarchyBinding | ||
* childrenField="items"> | ||
* </kendo-treeview> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* public data: any[] = [ | ||
* { | ||
* text: "Furniture", items: [ | ||
* { text: "Tables & Chairs" }, | ||
* { text: "Sofas" }, | ||
* { text: "Occasional Furniture" } | ||
* ] | ||
* }, | ||
* { | ||
* text: "Decor", items: [ | ||
* { text: "Bed Linen" }, | ||
* { text: "Curtains & Blinds" }, | ||
* { text: "Carpets" } | ||
* ] | ||
* } | ||
* ]; | ||
* } | ||
* ``` | ||
* {% endmeta %} | ||
*/ | ||
var TreeViewComponent = (function () { | ||
function TreeViewComponent(expandService) { | ||
function TreeViewComponent(expandService, navigationService, selectionService) { | ||
this.expandService = expandService; | ||
this.navigationService = navigationService; | ||
this.selectionService = selectionService; | ||
this.classNames = true; | ||
/** | ||
* Fires when the user blurs the component. | ||
*/ | ||
this.onBlur = new core_1.EventEmitter(); //tslint:disable-line:no-output-rename | ||
/** | ||
* Fires when the user focuses the component. | ||
*/ | ||
this.onFocus = new core_1.EventEmitter(); //tslint:disable-line:no-output-rename | ||
/** | ||
* Fires when the user expands a tree node. | ||
@@ -27,18 +87,31 @@ */ | ||
this.collapse = new core_1.EventEmitter(); | ||
/** | ||
* Fires when the user selects a tree node. | ||
*/ | ||
this.selectionChange = new core_1.EventEmitter(); | ||
this.data = new BehaviorSubject_1.BehaviorSubject([]); | ||
this.subscriptions = new Subscription_1.Subscription(function () { }); | ||
this.data = new BehaviorSubject_1.BehaviorSubject([]); | ||
this._animate = true; | ||
/** | ||
* Function which determines if given node has child nodes | ||
* A function which determines if a given node has child nodes. | ||
*/ | ||
this.hasChildren = function () { return false; }; | ||
/** | ||
* Function which determines if given node is expanded | ||
* A function which determines if a given node is expanded. | ||
*/ | ||
this.isExpanded = function () { return false; }; | ||
/** | ||
* Function which provides the child nodes for given parent | ||
* A function which determines if a given node is selected. | ||
*/ | ||
this.isSelected = function () { return false; }; | ||
/** | ||
* A function which provides the child nodes for a given parent node. | ||
*/ | ||
this.children = function () { return Observable_1.Observable.of([]); }; | ||
} | ||
Object.defineProperty(TreeViewComponent.prototype, "role", { | ||
get: function () { return 'tree'; }, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TreeViewComponent.prototype, "animate", { | ||
@@ -49,3 +122,3 @@ get: function () { | ||
/** | ||
* Determines if content animation is enabled | ||
* Determines whether the content animation is enabled. | ||
*/ | ||
@@ -60,3 +133,3 @@ set: function (value) { | ||
/** | ||
* The nodes which to be displayed by the component | ||
* The nodes which will be displayed by the TreeView. | ||
*/ | ||
@@ -69,2 +142,51 @@ set: function (value) { | ||
}); | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleKeydown = function (e) { | ||
this.navigationService.move(e); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleFocusin = function (_a) { | ||
var _this = this; | ||
var target = _a.target; | ||
var index = utils_1.nodeId(target); | ||
if (!index) { | ||
return; | ||
} | ||
this.navigationService.activateIndex(index); | ||
Promise.resolve(null).then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.onFocus.emit(); | ||
} | ||
}); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleClick = function (_a) { | ||
var target = _a.target; | ||
this.handleFocusin({ target: target }); | ||
var index = utils_1.nodeId(target); | ||
if (!index) { | ||
return; | ||
} | ||
this.navigationService.selectIndex(index); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleFocusout = function (_a) { | ||
var _this = this; | ||
var target = _a.target; | ||
var index = target.getAttribute('data-treeindex'); | ||
Promise.resolve(null).then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.navigationService.deactivate(); | ||
_this.onBlur.emit(); | ||
} | ||
}); | ||
}; | ||
TreeViewComponent.prototype.ngOnDestroy = function () { | ||
@@ -82,30 +204,43 @@ this.subscriptions.unsubscribe(); | ||
})); | ||
this.subscriptions.add(this.selectionService.changes | ||
.subscribe(function (x) { return _this.selectionChange.emit(x); })); | ||
}; | ||
TreeViewComponent.decorators = [ | ||
{ type: core_1.Component, args: [{ | ||
changeDetection: core_1.ChangeDetectionStrategy.OnPush, | ||
exportAs: 'kendoTreeView', | ||
providers: providers, | ||
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 " | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewComponent.ctorParameters = function () { return [ | ||
{ type: expand_state_service_1.ExpandStateService, }, | ||
{ type: navigation_service_1.NavigationService, }, | ||
{ type: selection_service_1.SelectionService, }, | ||
]; }; | ||
TreeViewComponent.propDecorators = { | ||
'classNames': [{ type: core_1.HostBinding, args: ["class.k-widget",] }, { type: core_1.HostBinding, args: ["class.k-treeview",] },], | ||
'role': [{ type: core_1.HostBinding, args: ["attr.role",] },], | ||
'animate': [{ type: core_1.Input }, { type: core_1.HostBinding, args: ['@.disabled',] },], | ||
'onBlur': [{ type: core_1.Output, args: ['blur',] },], | ||
'onFocus': [{ type: core_1.Output, args: ['focus',] },], | ||
'expand': [{ type: core_1.Output },], | ||
'collapse': [{ type: core_1.Output },], | ||
'selectionChange': [{ type: core_1.Output },], | ||
'nodeTemplate': [{ type: core_1.ContentChild, args: [node_template_directive_1.NodeTemplateDirective,] },], | ||
'nodes': [{ type: core_1.Input },], | ||
'textField': [{ type: core_1.Input },], | ||
'handleKeydown': [{ type: core_1.HostListener, args: ['keydown', ['$event'],] },], | ||
'handleFocusin': [{ type: core_1.HostListener, args: ['focusin', ['$event'],] },], | ||
'handleClick': [{ type: core_1.HostListener, args: ['click', ['$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 },], | ||
}; | ||
return TreeViewComponent; | ||
}()); | ||
TreeViewComponent.decorators = [ | ||
{ type: core_1.Component, args: [{ | ||
changeDetection: core_1.ChangeDetectionStrategy.OnPush, | ||
exportAs: 'kendoTreeView', | ||
providers: [expand_state_service_1.ExpandStateService, loading_notification_service_1.LoadingNotificationService], | ||
selector: 'kendo-treeview', | ||
template: "\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n " | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewComponent.ctorParameters = function () { return [ | ||
{ type: expand_state_service_1.ExpandStateService, }, | ||
]; }; | ||
TreeViewComponent.propDecorators = { | ||
'classNames': [{ type: core_1.HostBinding, args: ["class.k-widget",] }, { type: core_1.HostBinding, args: ["class.k-treeview",] },], | ||
'animate': [{ type: core_1.Input }, { type: core_1.HostBinding, args: ['@.disabled',] },], | ||
'expand': [{ type: core_1.Output },], | ||
'collapse': [{ type: core_1.Output },], | ||
'nodeTemplate': [{ type: core_1.ContentChild, args: [node_template_directive_1.NodeTemplateDirective,] },], | ||
'nodes': [{ type: core_1.Input },], | ||
'textField': [{ type: core_1.Input },], | ||
'hasChildren': [{ type: core_1.Input },], | ||
'isExpanded': [{ type: core_1.Input },], | ||
'children': [{ type: core_1.Input },], | ||
}; | ||
exports.TreeViewComponent = TreeViewComponent; |
@@ -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":"./loading-notification.service","name":"LoadingNotificationService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\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"]}]}],"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"]}]}],"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"}}]}],"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"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"}]}],"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"}}]}],"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":"./loading-notification.service","name":"LoadingNotificationService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isExpanded\"\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"]}]}],"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"]}]}],"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"}}]}],"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"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"}]}],"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"}}]}],"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":"./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"}}]}]}}}}] |
/** | ||
* TreeView module | ||
* Represents the [NgModule](https://angular.io/guide/ngmodule) definition for the TreeView component. | ||
*/ | ||
export declare class TreeViewModule { | ||
} |
@@ -8,2 +8,3 @@ "use strict"; | ||
var expand_directive_1 = require("./expand.directive"); | ||
var select_directive_1 = require("./selection/select.directive"); | ||
var hierarchy_binding_directive_1 = require("./hierarchy-binding.directive"); | ||
@@ -15,2 +16,3 @@ var flat_binding_directive_1 = require("./flat-binding.directive"); | ||
expand_directive_1.ExpandDirective, | ||
select_directive_1.SelectDirective, | ||
hierarchy_binding_directive_1.HierarchyBindingDirective, | ||
@@ -20,3 +22,3 @@ flat_binding_directive_1.FlatDataBindingDirective | ||
/** | ||
* TreeView module | ||
* Represents the [NgModule](https://angular.io/guide/ngmodule) definition for the TreeView component. | ||
*/ | ||
@@ -26,12 +28,12 @@ var TreeViewModule = (function () { | ||
} | ||
TreeViewModule.decorators = [ | ||
{ type: core_1.NgModule, args: [{ | ||
exports: [EXPORTS], | ||
imports: [shared_module_1.SharedModule] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewModule.ctorParameters = function () { return []; }; | ||
return TreeViewModule; | ||
}()); | ||
TreeViewModule.decorators = [ | ||
{ type: core_1.NgModule, args: [{ | ||
exports: [EXPORTS], | ||
imports: [shared_module_1.SharedModule] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TreeViewModule.ctorParameters = function () { return []; }; | ||
exports.TreeViewModule = TreeViewModule; |
@@ -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":"./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":"./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":"./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"}]}]}]}}}] |
@@ -25,1 +25,9 @@ /** | ||
export declare const anyChanged: (propertyNames: string[], changes: any, skipFirstChange?: boolean) => boolean; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const nodeId: (node: HTMLElement) => string; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare const noop: () => void; |
@@ -34,1 +34,9 @@ "use strict"; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
exports.nodeId = function (node) { return node.getAttribute('data-treeindex'); }; | ||
/** | ||
* @hidden | ||
*/ | ||
exports.noop = function () { }; |
@@ -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}}},{"__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}}}] | ||
[{"__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}}}] |
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-angular-treeview",["tslib","@angular/core","rxjs/Subscription","rxjs/BehaviorSubject","rxjs/Observable","rxjs/add/observable/merge","rxjs/add/operator/map","rxjs/Subject","@angular/common","@angular/animations","rxjs/add/operator/do","rxjs/add/operator/catch","rxjs/add/observable/of","rxjs/add/observable/empty","rxjs/add/operator/filter","rxjs/add/operator/delay","rxjs/add/operator/takeUntil","rxjs/add/operator/switchMap"],function(e){function t(e){return e.__useDefault?e.default:e}var n,i,r,o,a,d,s,c,p,u,l,f,h,_,g,y,x,v;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){d=t(e)},function(e){s=t(e)},function(e){c=t(e)},function(e){p=t(e)},function(e){u=t(e)},function(e){l=t(e)},function(e){f=t(e)},function(e){h=t(e)},function(e){_=t(e)},function(e){g=t(e)},function(e){y=t(e)},function(e){x=t(e)},function(e){v=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(11);n.TreeViewModule=o.TreeViewModule;var a=i(4);n.NodeTemplateDirective=a.NodeTemplateDirective;var d=i(22);n.ExpandDirective=d.ExpandDirective;var s=i(25);n.HierarchyBindingDirective=s.HierarchyBindingDirective;var c=i(31);n.FlatDataBindingDirective=c.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),d=n(7),s=n(8),c=n(9),p=n(10),u=function(){function e(e){this.expandService=e,this.classNames=!0,this.expand=new r.EventEmitter,this.collapse=new r.EventEmitter,this.subscriptions=new d.Subscription(function(){}),this.data=new s.BehaviorSubject([]),this._animate=!0,this.hasChildren=function(){return!1},this.isExpanded=function(){return!1},this.children=function(){return c.Observable.of([])}}return 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.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})}))},e}();i.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-treeview"),i.__metadata("design:type",Boolean)],u.prototype,"classNames",void 0),i.__decorate([r.Input(),r.HostBinding("@.disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],u.prototype,"animate",null),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],u.prototype,"expand",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],u.prototype,"collapse",void 0),i.__decorate([r.ContentChild(o.NodeTemplateDirective),i.__metadata("design:type",o.NodeTemplateDirective)],u.prototype,"nodeTemplate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],u.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",Object)],u.prototype,"textField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"hasChildren",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"isExpanded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"children",void 0),u=i.__decorate([r.Component({changeDetection:r.ChangeDetectionStrategy.OnPush,exportAs:"kendoTreeView",providers:[a.ExpandStateService,p.LoadingNotificationService],selector:"kendo-treeview",template:'\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n [children]="children"\n [hasChildren]="hasChildren"\n [isExpanded]="isExpanded"\n [nodeTemplateRef]="nodeTemplate?.templateRef"\n [nodes]="data"\n [textField]="textField"\n >\n </ul>\n '}),i.__metadata("design:paramtypes",[a.ExpandStateService])],u),t.TreeViewComponent=u},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(){return function(e){this.templateRef=e}}();o=i.__decorate([r.Directive({selector:"[kendoTreeViewNodeTemplate]"}),i.__param(0,r.Optional()),i.__metadata("design:paramtypes",[r.TemplateRef])],o),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}();a=i.__decorate([r.Injectable()],a),t.ExpandStateService=a},function(e,t){e.exports=c},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t){e.exports=a},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}();a=i.__decorate([r.Injectable()],a),t.LoadingNotificationService=a},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),d=n(4),s=n(22),c=n(25),p=n(31),u=[o.TreeViewComponent,d.NodeTemplateDirective,s.ExpandDirective,c.HierarchyBindingDirective,p.FlatDataBindingDirective],l=function(){return function(){}}();l=i.__decorate([r.NgModule({exports:[u],imports:[a.SharedModule]})],l),t.TreeViewModule=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(1),a=n(13),d=n(21),s=n(4),c=n(22),p=n(25),u=n(26),l=n(31),f=[o.TreeViewComponent,a.TreeViewGroupComponent,s.NodeTemplateDirective,c.ExpandDirective,p.HierarchyBindingDirective,u.LoadingIndicatorDirective,l.FlatDataBindingDirective],h=function(){return function(){}}();h=i.__decorate([r.NgModule({declarations:[f],exports:[f],imports:[d.CommonModule]})],h),t.SharedModule=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(14),a=n(5),d=n(15),s=n(16),c=n(10),p=n(9);n(17),n(18),n(19),n(20);var u=function(){function e(e,t,n){this.expandService=e,this.loadingService=t,this.cd=n,this.kGroupClass=!0,this.textField="",this.data=[],this.hasChildren=function(){return!1},this.isExpanded=function(){return!1},this.children=function(){return p.Observable.of([])}}return Object.defineProperty(e.prototype,"hasTemplate",{get:function(){return d.isPresent(this.nodeTemplateRef)},enumerable:!0,configurable:!0}),e.prototype.nodeClick=function(e,t,n){n?this.expandService.expand(e,t):this.expandService.collapse(e,t)},e.prototype.nodeIndex=function(e){return this.parentIndex?this.parentIndex+"_"+e:""+e},e.prototype.nodeText=function(e){var t=d.isArray(this.textField)?this.textField[0]:this.textField;return s.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}),e}();i.__decorate([r.HostBinding("class.k-group"),i.__metadata("design:type",Boolean)],u.prototype,"kGroupClass",void 0),i.__decorate([r.Input(),i.__metadata("design:type",p.Observable)],u.prototype,"nodes",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],u.prototype,"textField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],u.prototype,"parentIndex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",r.TemplateRef)],u.prototype,"nodeTemplateRef",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"hasChildren",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"isExpanded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Function)],u.prototype,"children",void 0),u=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 *ngFor="let node of data; let index = index" class="k-item" [@toggle]="true">\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)="nodeClick(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="hasChildren(node)"\n >\n </span>\n <span class="k-in">\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef"\n [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 [nodes]="fetchChildren(node, nodeIndex(index))"\n [children]="children"\n [hasChildren]="hasChildren"\n [isExpanded]="isExpanded"\n [nodeTemplateRef]="nodeTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [textField]="nextFields"\n >\n </ul>\n </li>\n '}),i.__metadata("design:paramtypes",[a.ExpandStateService,c.LoadingNotificationService,r.ChangeDetectorRef])],u),t.TreeViewGroupComponent=u},function(e,t){e.exports=u},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)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(15),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=l},function(e,t){e.exports=f},function(e,t){e.exports=h},function(e,t){e.exports=_},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(7),d=n(9);n(23),n(24);var s=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(d.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)},e}();i.__decorate([r.Input(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Function])],s.prototype,"isExpanded",null),i.__decorate([r.Input("kendoTreeViewExpandBy"),i.__metadata("design:type",Object)],s.prototype,"expandKey",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],s.prototype,"expandedKeysChange",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],s.prototype,"expandedKeys",void 0),s=i.__decorate([r.Directive({selector:"[kendoTreeViewExpandBy]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],s),t.ExpandDirective=s},function(e,t){e.exports=d},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),d=n(15),s=n(9),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;d.isPresent(this.childrenField)&&(this.treeView.children=function(t){return s.Observable.of(a.getter(e.childrenField,!0)(t))},this.treeView.hasChildren=function(t){return e.childrenField in t})},e}();i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],c.prototype,"childrenField",null),c=i.__decorate([r.Directive({selector:"[kendoTreeViewHierarchyBinding]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],c),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(10),d=n(9);n(27),n(28),n(29),n(30),n(19);var s=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 d.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()},e}();i.__decorate([r.HostBinding("class.k-i-loading"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],s.prototype,"loading",null),i.__decorate([r.Input("kendoTreeViewLoading"),i.__metadata("design:type",String)],s.prototype,"index",void 0),s=i.__decorate([r.Directive({selector:"[kendoTreeViewLoading]"}),i.__metadata("design:paramtypes",[o.ExpandStateService,a.LoadingNotificationService,r.ChangeDetectorRef])],s),t.LoadingIndicatorDirective=s},function(e,t){e.exports=g},function(e,t){e.exports=y},function(e,t){e.exports=x},function(e,t){e.exports=v},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),d=n(15),s=n(32),c=n(9),p=function(){function e(e){this.treeView=e,this.originalData=[]}return Object.defineProperty(e.prototype,"nodes",{set:function(e){if(this.originalData=e||[],d.isNullOrEmptyString(this.parentIdField))this.treeView.nodes=this.originalData.slice(0);else{var t=a.getter(this.parentIdField,!0);this.treeView.nodes=this.originalData.filter(s.compose(d.isBlank,t))}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;if(d.isPresent(this.parentIdField)&&d.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){d.isChanged("parentIdField",e,!1)&&(this.nodes=this.originalData)},e}();i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],p.prototype,"nodes",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],p.prototype,"parentIdField",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],p.prototype,"idField",void 0),p=i.__decorate([r.Directive({selector:"[kendoTreeViewFlatDataBinding]"}),i.__metadata("design:paramtypes",[o.TreeViewComponent])],p),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)}}}])}}}); | ||
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}])}}}); |
@@ -1,7 +0,11 @@ | ||
[Kendo UI for Angular](http://www.telerik.com/kendo-angular-ui) | ||
# Kendo UI for Angular | ||
Copyright © 2017 Telerik AD. All rights reserved. | ||
This package is part of the [Kendo UI for Angular](http://www.telerik.com/kendo-angular-ui/) suite. | ||
## License | ||
This is commercial software. To use it, you need to agree to the [**Telerik End User License Agreement for Kendo UI Complete**](http://www.telerik.com/purchase/license-agreement/kendo-ui-complete). If you do not own a commercial license, this file shall be governed by the trial license terms. | ||
All available Kendo UI commercial licenses may be obtained at http://www.telerik.com/purchase/kendo-ui. | ||
*Copyright © 2017 Telerik AD. All rights reserved.* |
@@ -6,3 +6,3 @@ { | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
"version": "0.2.0-dev.201711281158", | ||
"version": "0.2.0-dev.201712201530", | ||
"main": "dist/npm/main.js", | ||
@@ -13,3 +13,4 @@ "module": "dist/es/main.js", | ||
"scripts": { | ||
"test": "gulp test", | ||
"test": "jest", | ||
"test:watch": "jest --watch", | ||
"e2e": "gulp e2e", | ||
@@ -46,8 +47,9 @@ "start": "gulp start", | ||
"@angular/platform-server": "^4.0.0", | ||
"@angular/router": "^4.0.0", | ||
"@krux/condition-jenkins": "1.0.1", | ||
"@progress/kendo-angular-tasks": "^9.0.0", | ||
"@progress/kendo-angular-jest-preset": "^1.1.0", | ||
"@progress/kendo-angular-tasks": "^11.0.2", | ||
"@progress/kendo-theme-default": "^2.0.0", | ||
"@telerik/semantic-prerelease": "^1.0.0", | ||
"@types/core-js": "0.9.35", | ||
"@types/jasmine": "2.2.34", | ||
"@types/jest": "^21.1.8", | ||
"@types/zone.js": "0.0.27", | ||
@@ -59,6 +61,7 @@ "codelyzer": "^3.0.0", | ||
"gulp": "^3.9.0", | ||
"jest": "^21.2.1", | ||
"rxjs": "^5.0.1", | ||
"semantic-release": "^6.3.6", | ||
"tslint": "^5.0.0", | ||
"typescript": "~2.3.0", | ||
"typescript": "~2.4.0", | ||
"validate-commit-msg": "^1.1.1", | ||
@@ -90,2 +93,5 @@ "zone.js": "0.8.12" | ||
}, | ||
"jest": { | ||
"preset": "@progress/kendo-angular-jest-preset" | ||
}, | ||
"repository": { | ||
@@ -92,0 +98,0 @@ "type": "git", |
@@ -1,5 +0,9 @@ | ||
# Kendo UI for Angular | ||
<a href="https://www.telerik.com/kendo-angular-ui/" target="_blank"> | ||
<img width="631" src="https://www.telerik.com/kendo-angular-ui/npm-banner.svg"> | ||
</a> | ||
This package is part of the [Kendo UI for Angular](http://www.telerik.com/kendo-angular-ui/) suite. | ||
## Professional Grade Angular UI Components | ||
This package is part of the [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/) suite. | ||
## License | ||
@@ -10,1 +14,18 @@ | ||
All available Kendo UI commercial licenses may be obtained at http://www.telerik.com/purchase/kendo-ui. | ||
## Resources | ||
- [Get Started](https://www.telerik.com/kendo-angular-ui/getting-started) | ||
- [Component References](https://www.telerik.com/kendo-angular-ui/components) | ||
- [Blogs](http://www.telerik.com/blogs/kendo-ui) | ||
## Questions and Feedback | ||
- [FAQ](https://www.telerik.com/kendo-angular-ui/components/faq/) | ||
- [GitHub Issues](https://github.com/telerik/kendo-angular/issues) | ||
- [Feedback Portal](http://kendoui-feedback.telerik.com/forums/555517-kendo-ui-for-angular-2-feedback) | ||
- [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2) | ||
*Copyright © 2017 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.* | ||
*Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.* |
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
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
369848
165
4916
31
28
1