@progress/kendo-angular-treeview
Advanced tools
Comparing version 1.0.1 to 1.1.0-dev.201801190920
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("rxjs/Subject"),require("rxjs/Subscription"),require("rxjs/BehaviorSubject"),require("rxjs/Observable"),require("@angular/animations"),require("rxjs/add/operator/do"),require("rxjs/add/operator/catch"),require("rxjs/add/observable/of"),require("rxjs/add/observable/empty"),require("@angular/common"),require("rxjs/add/observable/merge"),require("rxjs/add/operator/map"),require("rxjs/add/operator/filter"),require("rxjs/add/operator/delay"),require("rxjs/add/operator/takeUntil"),require("rxjs/add/operator/switchMap")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","rxjs/Subject","rxjs/Subscription","rxjs/BehaviorSubject","rxjs/Observable","@angular/animations","rxjs/add/operator/do","rxjs/add/operator/catch","rxjs/add/observable/of","rxjs/add/observable/empty","@angular/common","rxjs/add/observable/merge","rxjs/add/operator/map","rxjs/add/operator/filter","rxjs/add/operator/delay","rxjs/add/operator/takeUntil","rxjs/add/operator/switchMap"],t):"object"==typeof exports?exports.KendoAngularTreeview=t(require("tslib"),require("@angular/core"),require("rxjs/Subject"),require("rxjs/Subscription"),require("rxjs/BehaviorSubject"),require("rxjs/Observable"),require("@angular/animations"),require("rxjs/add/operator/do"),require("rxjs/add/operator/catch"),require("rxjs/add/observable/of"),require("rxjs/add/observable/empty"),require("@angular/common"),require("rxjs/add/observable/merge"),require("rxjs/add/operator/map"),require("rxjs/add/operator/filter"),require("rxjs/add/operator/delay"),require("rxjs/add/operator/takeUntil"),require("rxjs/add/operator/switchMap")):e.KendoAngularTreeview=t(e.tslib,e["@angular/core"],e["rxjs/Subject"],e["rxjs/Subscription"],e["rxjs/BehaviorSubject"],e["rxjs/Observable"],e["@angular/animations"],e["rxjs/add/operator/do"],e["rxjs/add/operator/catch"],e["rxjs/add/observable/of"],e["rxjs/add/observable/empty"],e["@angular/common"],e["rxjs/add/observable/merge"],e["rxjs/add/operator/map"],e["rxjs/add/operator/filter"],e["rxjs/add/operator/delay"],e["rxjs/add/operator/takeUntil"],e["rxjs/add/operator/switchMap"])}(this,function(e,t,i,n,r,o,a,s,d,c,p,u,l,h,f,v,y,m){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1);t.TreeViewComponent=n.TreeViewComponent;var r=i(19);t.TreeViewModule=r.TreeViewModule;var o=i(4);t.NodeTemplateDirective=o.NodeTemplateDirective;var a=i(29);t.CheckDirective=a.CheckDirective;var s=i(32);t.DisableDirective=s.DisableDirective;var d=i(33);t.ExpandDirective=d.ExpandDirective;var c=i(34);t.SelectDirective=c.SelectDirective;var p=i(35);t.HierarchyBindingDirective=p.HierarchyBindingDirective;var u=i(41);t.FlatDataBindingDirective=u.FlatDataBindingDirective},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(4),a=i(5),s=i(7),d=i(8),c=i(9),p=i(13),u=i(14),l=i(11),h=i(15),f=i(16),v=i(17),y=i(18),m=function(e){return/k-i-collapse|k-i-expand/.test(e.className)},_=[a.ExpandStateService,s.IndexBuilderService,u.TreeViewLookupService,d.LoadingNotificationService,c.NavigationService,p.SelectionService],g=function(){function e(e,t,i,n,o){this.expandService=e,this.navigationService=t,this.selectionService=i,this.treeViewLookupService=n,this.element=o,this.classNames=!0,this.onBlur=new r.EventEmitter,this.onFocus=new r.EventEmitter,this.expand=new r.EventEmitter,this.collapse=new r.EventEmitter,this.checkedChange=new r.EventEmitter,this.selectionChange=new r.EventEmitter,this.isDisabled=h.isDisabled,this.navigable=!0,this.checkboxes=!1,this.data=new v.BehaviorSubject([]),this.subscriptions=new f.Subscription(function(){}),this._animate=!0,this.resolvedPromise=Promise.resolve(null),this.children=function(){return y.Observable.of([])}}return Object.defineProperty(e.prototype,"role",{get:function(){return"tree"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return!this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nodes",{set:function(e){this.data.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasChildren",{get:function(){return this._hasChildren||h.hasChildren},set:function(e){this._hasChildren=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isChecked",{get:function(){return this._isChecked||h.isChecked},set:function(e){this._isChecked=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded||h.isExpanded},set:function(e){this._isExpanded=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected||h.isSelected},set:function(e){this._isSelected=e},enumerable:!0,configurable:!0}),e.prototype.handleKeydown=function(e){this.isActive&&l.hasActiveNode(e.target)&&this.navigationService.move(e)},e.prototype.handleFocusin=function(e){var t=e.target,i=l.closestNode(t);l.hasActiveNode(t,i)&&this.activateAndEmit(l.nodeId(i))},e.prototype.handleClick=function(e){var t=e.target,i=l.closestNode(t),n=l.nodeId(i);l.hasActiveNode(t,i)&&n&&(this.activateAndEmit(n),m(t)||this.navigationService.selectIndex(n))},e.prototype.handleFocusout=function(e){var t=this,i=e.target,n=i.getAttribute("data-treeindex");this.resolvedPromise.then(function(){t.navigationService.isActive(n)&&(t.navigationService.deactivate(),t.isActive=!1,t.onBlur.emit())})},e.prototype.ngOnChanges=function(e){this.checkboxes=Boolean(this._isChecked),this.expandIcons=Boolean(this._isExpanded&&this._hasChildren),this.navigationService.navigable=Boolean(this.navigable)},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.expandService.changes.subscribe(function(t){var i=t.index,n=t.dataItem,r=t.expand;return r?e.expand.emit({index:i,dataItem:n}):e.collapse.emit({index:i,dataItem:n})})),this.subscriptions.add(this.navigationService.checks.subscribe(function(t){return e.checkedChange.emit(e.treeViewLookupService.itemLookup(t))})),this.subscriptions.add(this.selectionService.changes.subscribe(function(t){return e.selectionChange.emit(t)}))},e.prototype.blur=function(){if(l.isDocumentAvailable()){var e=l.focusableNode(this.element);document.activeElement===e&&e.blur()}},e.prototype.focus=function(e){this.navigationService.activateIndex(e);var t=l.focusableNode(this.element);t&&t.focus()},e.prototype.activateAndEmit=function(e){var t=this;e&&(this.navigationService.activateIndex(e),this.resolvedPromise.then(function(){t.navigationService.isActive(e)&&(t.isActive=!0,t.onFocus.emit())}))},n.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-treeview"),n.__metadata("design:type",Boolean)],e.prototype,"classNames",void 0),n.__decorate([r.HostBinding("attr.role"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"role",null),n.__decorate([r.Input(),r.HostBinding("@.disabled"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"animate",null),n.__decorate([r.Output("blur"),n.__metadata("design:type",r.EventEmitter)],e.prototype,"onBlur",void 0),n.__decorate([r.Output("focus"),n.__metadata("design:type",r.EventEmitter)],e.prototype,"onFocus",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"expand",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"collapse",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"checkedChange",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"selectionChange",void 0),n.__decorate([r.ContentChild(o.NodeTemplateDirective),n.__metadata("design:type",o.NodeTemplateDirective)],e.prototype,"nodeTemplate",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Array),n.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"textField",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"hasChildren",null),n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isChecked",null),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isDisabled",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isExpanded",null),n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isSelected",null),n.__decorate([r.Input(),n.__metadata("design:type",Boolean)],e.prototype,"navigable",void 0),n.__decorate([r.HostListener("keydown",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleKeydown",null),n.__decorate([r.HostListener("focusin",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleFocusin",null),n.__decorate([r.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleClick",null),n.__decorate([r.HostListener("focusout",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleFocusout",null),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"children",void 0),e=n.__decorate([r.Component({changeDetection:r.ChangeDetectionStrategy.OnPush,exportAs:"kendoTreeView",providers:_,selector:"kendo-treeview",template:'\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n role="group"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplate?.templateRef"\n [nodes]="data"\n [textField]="textField"\n >\n </ul>\n '}),n.__metadata("design:paramtypes",[a.ExpandStateService,c.NavigationService,p.SelectionService,u.TreeViewLookupService,r.ElementRef])],e)}();t.TreeViewComponent=g},function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=function(){function e(e){this.templateRef=e}return e=n.__decorate([r.Directive({selector:"[kendoTreeViewNodeTemplate]"}),n.__param(0,r.Optional()),n.__metadata("design:paramtypes",[r.TemplateRef])],e)}();t.NodeTemplateDirective=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(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=n.__decorate([r.Injectable()],e)}();t.ExpandStateService=a},function(e,t){e.exports=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(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.lastLevelIndex=function(e){void 0===e&&(e="");var t=e.split(this.INDEX_SEPARATOR);return t.length?parseInt(t[t.length-1],10):NaN},e.prototype.level=function(e){return e.split(this.INDEX_SEPARATOR).length},e=n.__decorate([r.Injectable()],e)}();t.IndexBuilderService=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.notifyLoaded=function(e){this.changes.next(e)},e=n.__decorate([r.Injectable()],e)}();t.LoadingNotificationService=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(10),a=i(11),s=i(12),d=i(6),c=function(e,t){return e[t]||e},p=function(){function e(){var e=this;this.expands=new d.Subject,this.moves=new d.Subject,this.checks=new d.Subject,this.selects=new d.Subject,this.navigable=!0,this.actions=(t={},t[s.Keys.up]=function(){return e.activate(c(e.focusableItem,"prev"))},t[s.Keys.down]=function(){return e.activate(c(e.focusableItem,"next"))},t[s.Keys.left]=function(){return e.expand({expand:!1,intercept:e.moveToParent.bind(e)})},t[s.Keys.right]=function(){return e.expand({expand:!0,intercept:e.moveToChild.bind(e)})},t[s.Keys.home]=function(){return e.activate(e.model.firstNode())},t[s.Keys.end]=function(){return e.activate(e.model.lastNode())},t[s.Keys.enter]=function(){return e.navigable&&e.selectIndex(a.nodeIndex(e.activeItem))},t[s.Keys.space]=function(){return e.navigable&&e.checkIndex(a.nodeIndex(e.activeItem))},t),this.isFocused=!1,this._model=new o.NavigationModel;var t}return Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return a.nodeIndex(this.activeItem)||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusableItem",{get:function(){return this.activeItem||this.model.firstNode()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActiveExpanded",{get:function(){return this.activeItem&&this.activeItem.children.length>0},enumerable:!0,configurable:!0}),e.prototype.activate=function(e){this.navigable&&e&&!this.isActive(a.nodeIndex(e))&&(this.isFocused=!0,this.activeItem=e||this.activeItem,this.notifyMove())},e.prototype.activateParent=function(e){this.activate(this.model.findParent(e))},e.prototype.activateIndex=function(e){e&&this.activate(this.model.findNode(e))},e.prototype.activateClosest=function(e){e&&a.nodeIndex(this.focusableItem)===e&&(this.activeItem=this.model.closestNode(e),this.notifyMove())},e.prototype.activateFocusable=function(){this.activeItem||(this.activeItem=this.model.firstNode(),this.notifyMove())},e.prototype.deactivate=function(){this.navigable&&this.isFocused&&(this.isFocused=!1,this.notifyMove())},e.prototype.checkIndex=function(e){this.checks.next(e)},e.prototype.selectIndex=function(e){this.selects.next(e)},e.prototype.isActive=function(e){return!!e&&(this.isFocused&&this.activeIndex===e)},e.prototype.isFocusable=function(e){return a.nodeIndex(this.focusableItem)===e},e.prototype.registerItem=function(e){this.model.registerItem(e)},e.prototype.unregisterItem=function(e){this.isActive(e)&&this.activateParent(e),this.model.unregisterItem(e)},e.prototype.move=function(e){if(this.navigable){var t=this.actions[e.keyCode];t&&(t(),e.preventDefault())}},e.prototype.expand=function(e){var t=e.expand,i=e.intercept,n=a.nodeIndex(this.activeItem);n&&!i(n)&&this.notifyExpand(t)},e.prototype.moveToParent=function(){return!this.isActiveExpanded&&(this.activate(this.model.findParent(a.nodeIndex(this.activeItem))),!0)},e.prototype.moveToChild=function(){return!!this.isActiveExpanded&&(this.activate(this.model.findChild(a.nodeIndex(this.activeItem))),!0)},e.prototype.notifyExpand=function(e){this.expands.next(this.navigationState(e))},e.prototype.notifyMove=function(){this.moves.next(this.navigationState())},e.prototype.navigationState=function(e){return void 0===e&&(e=!1),{expand:e,index:a.nodeIndex(this.activeItem),isFocused:this.isFocused}},e=n.__decorate([r.Injectable()],e)}();t.NavigationService=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(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,i=[].concat(a(e));i.length;)i=i.concat(a(r(i))),t=i.shift();return t},d=function(e){var t=e.prev,i=e.next;t&&(t.next=e),i&&(i.prev=e)},c=function(e,t){e&&(e.next=t),t&&(t.prev=e)},p=function(){function e(){this.ib=new n.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.closestNode=function(e){var t=o(this.findNode(e)).prev,i=t||this.firstNode();return o(i).index===e?this.sibling(i,1):i},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=[],i=this.ib.level(e),n=this.findParent(e);if(n||1===i){var r=this.prevNode(n,e),o=this.nextNode(n,e),a={children:t,index:e,parent:n,prev:r,next:o};d(a),this.insert(a,n)}},e.prototype.unregisterItem=function(e){var t=this.find(e,this.nodes);if(t){c(t.prev,this.nextNode(t.parent,t.index));var i=this.container(t.parent);i.splice(i.indexOf(t),1)}},e.prototype.childLevel=function(e){return e&&e.length?this.ib.level(e[0].index):1},e.prototype.container=function(e){return e?e.children:this.nodes},e.prototype.find=function(e,t){var i=this.childLevel(t),n=this.ib.indexForLevel(e,i),r=i===this.ib.level(e),o=t.find(function(e){return e.index===n});return o?r?o:this.find(e,o.children):null},e.prototype.closestIndexPosition=function(e,t){for(var i=this.ib.lastLevelIndex(t),n=0;n<e.length;){if(this.ib.lastLevelIndex(e[n].index)>i)return n;n+=1}return n},e.prototype.insert=function(e,t){var i=this.container(t);i.splice(this.closestIndexPosition(i,e.index),0,e)},e.prototype.prevNode=function(e,t){var i=this.container(e),n=i.slice(0,this.closestIndexPosition(i,t));return s(r(n))||e||null},e.prototype.nextNode=function(e,t){var i=this.container(e),n=this.findNode(t);if(!e&&n)return this.sibling(n,1);var r=this.closestIndexPosition(i,t),o=i.slice(r)[0];return o?o:this.sibling(e,1)},e.prototype.sibling=function(e,t){if(!e)return null;var i=this.findParent(e.index),n=this.container(i);return n[n.indexOf(e)+t]||this.sibling(i,t)||null},e}();t.NavigationModel=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){},t.isPresent=function(e){return null!==e&&void 0!==e},t.isBlank=function(e){return null===e||void 0===e},t.isArray=function(e){return Array.isArray(e)},t.isNullOrEmptyString=function(e){return t.isBlank(e)||0===e.trim().length},t.isDocumentAvailable=function(){return"undefined"!=typeof document},t.isChanged=function(e,t,i){return void 0===i&&(i=!0),t[e]&&(!t[e].isFirstChange()||!i)&&t[e].previousValue!==t[e].currentValue},t.anyChanged=function(e,i,n){return void 0===n&&(n=!0),e.some(function(e){return t.isChanged(e,i,n)})},t.closestNode=function(e){return e.closest("li.k-item")},t.focusableNode=function(e){return e.nativeElement.querySelector('li[tabindex="0"]')},t.hasActiveNode=function(e,i){var n=i||t.closestNode(e);return n&&(n===e||e.tabIndex<0)},t.nodeId=function(e){return e?e.getAttribute("data-treeindex"):""},t.nodeIndex=function(e){return(e||{}).index},t.guid=function(){for(var e,t="",i=0;i<32;i++)e=16*Math.random()|0,8!==i&&12!==i&&16!==i&&20!==i||(t+="-"),t+=(12===i?4:16===i?3&e|8:e).toString(16);return t}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!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"}(i=t.Keys||(t.Keys={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(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=n.__decorate([r.Injectable()],e)}();t.SelectionService=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(11),a=function(){function e(){this.map=new Map}return e.prototype.registerItem=function(e,t){var i={children:[],item:e,parent:this.item(o.nodeIndex(t))};this.map.set(e.index,i)},e.prototype.registerChildren=function(e,t){var i=this.item(e);i&&(i.children=t)},e.prototype.unregisterItem=function(e){this.map.delete(e)},e.prototype.replaceItem=function(e,t,i){var n=this.item(e);n&&t&&(this.unregisterItem(e),this.registerItem(t,i),e===t.index&&this.registerChildren(t.index,n.children.slice()))},e.prototype.itemLookup=function(e){var t=this.item(e);return t?{children:this.mapChildren(t.children),item:t.item,parent:t.parent}:null},e.prototype.hasItem=function(e){return this.map.has(e)},e.prototype.item=function(e){return this.map.get(e)||null},e.prototype.mapChildren=function(e){var t=this;return e.map(function(e){var i=t.item(e.index),n=i.item,r=i.parent,o=i.children;return{children:t.mapChildren(o),item:n,parent:r}})},e=n.__decorate([r.Injectable()],e)}();t.TreeViewLookupService=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=function(){return!1},t.isChecked=function(){return"none"},t.isDisabled=function(){return!1},t.isExpanded=function(){return!0},t.isSelected=function(){return!1}},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(20),s=i(4),d=i(29),c=i(32),p=i(33),u=i(34),l=i(35),h=i(41),f=[o.TreeViewComponent,s.NodeTemplateDirective,d.CheckDirective,c.DisableDirective,p.ExpandDirective,u.SelectDirective,l.HierarchyBindingDirective,h.FlatDataBindingDirective],v=function(){function e(){}return e=n.__decorate([r.NgModule({exports:[f],imports:[a.SharedModule]})],e)}();t.TreeViewModule=v},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(21),s=i(28),d=i(4),c=i(29),p=i(32),u=i(33),l=i(34),h=i(35),f=i(36),v=i(41),y=i(43),m=i(44),_=i(45),g=[o.TreeViewComponent,a.TreeViewGroupComponent,y.TreeViewItemDirective,m.TreeViewItemContentDirective,d.NodeTemplateDirective,c.CheckDirective,p.DisableDirective,u.ExpandDirective,l.SelectDirective,h.HierarchyBindingDirective,f.LoadingIndicatorDirective,v.FlatDataBindingDirective],b=function(){function e(){}return e=n.__decorate([r.NgModule({declarations:[g],exports:[g],imports:[s.CommonModule,_.CheckBoxModule]})],e)}();t.SharedModule=b},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(22),a=i(5),s=i(7),d=i(14),c=i(9),p=i(11),u=i(23),l=i(8),h=i(18);i(24),i(25),i(26),i(27);var f=function(){function e(e,t,i,n,r,o){this.expandService=e,this.loadingService=t,this.indexBuilder=i,this.treeViewLookupService=n,this.navigationService=r,this.cd=o,this.kGroupClass=!0,this.textField="",this._data=[],this.isChecked=function(){return"none"},this.isDisabled=function(){return!1},this.isExpanded=function(){return!1},this.isSelected=function(){return!1},this.children=function(){return h.Observable.of([])},this.hasChildren=function(){return!1}}return Object.defineProperty(e.prototype,"role",{get:function(){return"group"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e,this.updateParentChildren()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTemplate",{get:function(){return p.isPresent(this.nodeTemplateRef)},enumerable:!0,configurable:!0}),e.prototype.expandNode=function(e,t,i){i?this.expandService.expand(e,t):this.expandService.collapse(e,t)},e.prototype.checkNode=function(e){this.navigationService.checkIndex(e),this.navigationService.activateIndex(e)},e.prototype.nodeIndex=function(e){return this.indexBuilder.nodeIndex(e.toString(),this.parentIndex)},e.prototype.nodeText=function(e){var t=p.isArray(this.textField)?this.textField[0]:this.textField;return u.getter(t,!0)(e)},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscription=this.nodes.subscribe(function(t){e.data=t,e.cd.markForCheck()})},e.prototype.ngOnChanges=function(e){e.parentIndex&&this.updateParentChildren()},e.prototype.fetchChildren=function(e,t){var i=this;return this.children(e).catch(function(){return i.loadingService.notifyLoaded(t),h.Observable.empty()}).do(function(){return i.loadingService.notifyLoaded(t)})},Object.defineProperty(e.prototype,"nextFields",{get:function(){return p.isArray(this.textField)?this.textField.length>1?this.textField.slice(1):this.textField:[this.textField]},enumerable:!0,configurable:!0}),e.prototype.updateParentChildren=function(){var e=this.parentIndex?this.mapToTreeItem(this.data):[];this.treeViewLookupService.registerChildren(this.parentIndex,e)},e.prototype.mapToTreeItem=function(e){var t=this;return e.map(function(e,i){return{dataItem:e,index:t.nodeIndex(i)}})},n.__decorate([r.HostBinding("class.k-group"),n.__metadata("design:type",Boolean)],e.prototype,"kGroupClass",void 0),n.__decorate([r.HostBinding("attr.role"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"role",null),n.__decorate([r.Input(),n.__metadata("design:type",Boolean)],e.prototype,"checkboxes",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Boolean)],e.prototype,"expandIcons",void 0),n.__decorate([r.Input(),n.__metadata("design:type",h.Observable)],e.prototype,"nodes",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"textField",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"parentDataItem",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"parentIndex",void 0),n.__decorate([r.Input(),n.__metadata("design:type",r.TemplateRef)],e.prototype,"nodeTemplateRef",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isChecked",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isDisabled",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isExpanded",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"children",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"hasChildren",void 0),e=n.__decorate([r.Component({animations:[o.trigger("toggle",[o.transition("void => *",[o.style({height:0}),o.animate("0.1s ease-in",o.style({height:"*"}))]),o.transition("* => void",[o.style({height:"*"}),o.animate("0.1s ease-in",o.style({height:0}))])])],selector:"[kendoTreeViewGroup]",template:'\n <li\n *ngFor="let node of data; let index = index" class="k-item"\n kendoTreeViewItem\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [isChecked]="isChecked(node, nodeIndex(index))"\n [isDisabled]="isDisabled(node, nodeIndex(index))"\n [isExpanded]="isExpanded(node, nodeIndex(index))"\n [isSelected]="isSelected(node, nodeIndex(index))"\n [attr.data-treeindex]="nodeIndex(index)"\n >\n <div class="k-mid">\n <span\n class="k-icon"\n [class.k-i-collapse]="isExpanded(node, nodeIndex(index))"\n [class.k-i-expand]="!isExpanded(node, nodeIndex(index))"\n [kendoTreeViewLoading]="nodeIndex(index)"\n (click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="expandIcons && hasChildren(node)"\n >\n </span>\n <kendo-checkbox\n *ngIf="checkboxes"\n [checkState]="isChecked(node, nodeIndex(index))"\n (checkStateChange)="checkNode(nodeIndex(index))"\n tabindex="-1"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]="nodeIndex(index)"\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [isSelected]="isSelected"\n class="k-in"\n >\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef" [ngTemplateOutletContext]="{$implicit: node, index: nodeIndex(index)}"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf="isExpanded(node, nodeIndex(index)) && hasChildren(node)"\n kendoTreeViewGroup\n role="group"\n [nodes]="fetchChildren(node, nodeIndex(index))"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [parentDataItem]="node"\n [textField]="nextFields"\n [@toggle]="true"\n >\n </ul>\n </li>\n '}),n.__metadata("design:paramtypes",[a.ExpandStateService,l.LoadingNotificationService,s.IndexBuilderService,d.TreeViewLookupService,c.NavigationService,r.ChangeDetectorRef])],e)}();t.TreeViewGroupComponent=f},function(e,t){e.exports=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(11),r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,o={};o.undefined=function(e){return e},t.getter=function(e,t){var i=e+t;if(o[i])return o[i];var a=[];return e.replace(r,function(e,t,i,r){a.push(n.isPresent(t)?t:i||r)}),o[i]=function(e){for(var i=e,r=0;r<a.length;r++)if(i=i[a[r]],!n.isPresent(i)&&t)return i;return i},o[i]}},function(e,t){e.exports=s},function(e,t){e.exports=d},function(e,t){e.exports=c},function(e,t){e.exports=p},function(e,t){e.exports=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(11),s=i(16);i(30),i(31);var d=function(e,t){return e.filter(function(e){return e===t}).length>0},c=function(){function e(e){var t=this;this.treeView=e,this.checkedKeys=[],this.checkedKeysChange=new r.EventEmitter,this.subscriptions=new s.Subscription(function(){}),this.checkActions={multiple:function(e){return t.checkMultiple(e)},single:function(e){ | ||
return t.checkSingle(e)}}}return Object.defineProperty(e.prototype,"isChecked",{set:function(e){this.treeView.isChecked=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var e={checkChildren:!0,checkParents:!0,enabled:!0,mode:"multiple"};if(!a.isPresent(this.checkable))return e;var t="boolean"==typeof this.checkable,i=t?{enabled:this.checkable}:this.checkable;return Object.assign(e,i)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.treeView.checkedChange.subscribe(function(t){return e.check(t)})),this.treeView.checkboxes=!0,this.treeView.isChecked=this.isItemChecked.bind(this)},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.isItemChecked=function(e,t){if(!this.checkKey)return this.isIndexChecked(t);var i=this.checkedKeys.indexOf(this.itemKey({dataItem:e,index:t}));return i>-1?"checked":"none"},e.prototype.isIndexChecked=function(e){var t=this.checkedKeys.filter(function(t){return 0===t.indexOf(e)});if(d(t,e))return"checked";var i=this.options,n=i.mode,r=i.checkParents;return"multiple"===n&&r&&t.length?"indeterminate":"none"},e.prototype.itemKey=function(e){return this.checkKey?"string"==typeof this.checkKey?e.dataItem[this.checkKey]:"function"==typeof this.checkKey?this.checkKey(e):void 0:e.index},e.prototype.check=function(e){var t=this.options,i=t.enabled,n=t.mode,r=this.checkActions[n]||a.noop;i&&r(e)},e.prototype.checkSingle=function(e){var t=this.itemKey(e.item);this.checkedKeys=this.checkedKeys[0]!==t?[t]:[],this.notify()},e.prototype.checkMultiple=function(e){this.checkNode(e),this.options.checkParents&&this.checkParents(e.parent),this.notify()},e.prototype.checkNode=function(e,t){var i=this,n=this.itemKey(e.item),r=this.checkedKeys.indexOf(n),o=r>-1,s=void 0===t?!o:t;!a.isPresent(n)||o&&t||(o?this.checkedKeys.splice(r,1):this.checkedKeys.push(n),this.options.checkChildren&&e.children.map(function(e){return i.checkNode(e,s)}))},e.prototype.checkParents=function(e){for(var t=e;t;){var i=this.itemKey(t.item),n=this.checkedKeys.indexOf(i);this.allChildrenSelected(t.children)?n===-1&&this.checkedKeys.push(i):n>-1&&this.checkedKeys.splice(n,1),t=t.parent}},e.prototype.allChildrenSelected=function(e){var t=this,i=function(e,i){return e&&"checked"===t.isItemChecked(i.dataItem,i.index)};return e.reduce(i,!0)},e.prototype.notify=function(){this.checkedKeysChange.emit(this.checkedKeys.slice())},n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isChecked",null),n.__decorate([r.Input("checkBy"),n.__metadata("design:type",Object)],e.prototype,"checkKey",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Array)],e.prototype,"checkedKeys",void 0),n.__decorate([r.Input("kendoTreeViewCheckable"),n.__metadata("design:type",Object)],e.prototype,"checkable",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"checkedKeysChange",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewCheckable]"}),n.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.CheckDirective=c},function(e,t){e.exports=l},function(e,t){e.exports=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=function(){function e(e,t){this.treeView=e,this.cdr=t,this.disabledKeys=[]}return Object.defineProperty(e.prototype,"isDisabled",{set:function(e){this.treeView.isDisabled=e},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){void 0===e&&(e={});var t=e.disabledKeys;t&&!t.firstChange&&this.detectChanges()},e.prototype.ngOnInit=function(){var e=this;this.treeView.isDisabled=function(t,i){return e.disabledKeys.indexOf(e.itemKey({dataItem:t,index:i}))>-1}},e.prototype.itemKey=function(e){return this.disableKey?"string"==typeof this.disableKey?e.dataItem[this.disableKey]:"function"==typeof this.disableKey?this.disableKey(e):void 0:e.index},e.prototype.detectChanges=function(){this.cdr.markForCheck()},n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isDisabled",null),n.__decorate([r.Input("kendoTreeViewDisable"),n.__metadata("design:type",Object)],e.prototype,"disableKey",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Array)],e.prototype,"disabledKeys",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewDisable]"}),n.__metadata("design:paramtypes",[o.TreeViewComponent,r.ChangeDetectorRef])],e)}();t.DisableDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(16),s=i(18);i(30),i(31);var d=function(){function e(e){this.treeView=e,this.expandedKeysChange=new r.EventEmitter,this.expandedKeys=[],this.subscriptions=new a.Subscription(function(){})}return Object.defineProperty(e.prototype,"isExpanded",{set:function(e){this.treeView.isExpanded=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(s.Observable.merge(this.treeView.expand.map(function(e){return n.__assign({expand:!0},e)}),this.treeView.collapse.map(function(e){return n.__assign({expand:!1},e)})).subscribe(this.toggleExpand.bind(this))),this.treeView.expandIcons=!0,this.treeView.isExpanded=function(t,i){return e.expandedKeys.indexOf(e.itemKey({dataItem:t,index:i}))>-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,i=e.dataItem,n=e.expand,r=this.itemKey({index:t,dataItem:i}),o=this.expandedKeys.indexOf(r),a=!1;o>-1&&!n?(this.expandedKeys.splice(o,1),a=!0):o===-1&&n&&(this.expandedKeys.push(r),a=!0),a&&this.expandedKeysChange.emit(this.expandedKeys)},n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isExpanded",null),n.__decorate([r.Input("expandBy"),n.__metadata("design:type",Object)],e.prototype,"expandKey",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"expandedKeysChange",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Array)],e.prototype,"expandedKeys",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewExpandable]"}),n.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.ExpandDirective=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(11),s=i(16);i(30),i(31);var d=function(){function e(e){var t=this;this.treeView=e,this.selectedKeys=[],this.selectedKeysChange=new r.EventEmitter,this.subscriptions=new s.Subscription(function(){}),this.selectActions={multiple:function(e){return t.selectMultiple(e)},single:function(e){return t.selectSingle(e)}}}return Object.defineProperty(e.prototype,"isSelected",{set:function(e){this.treeView.isSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getAriaMultiselectable",{get:function(){return"multiple"===this.options.mode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var e={enabled:!0,mode:"single"};if(!a.isPresent(this.selection))return e;var t="boolean"==typeof this.selection,i=t?{enabled:this.selection}:this.selection;return Object.assign(e,i)},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,i){return e.selectedKeys.indexOf(e.itemKey({dataItem:t,index:i}))>-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,i=t.enabled,n=t.mode,r=this.selectActions[n]||a.noop;i&&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),i=this.selectedKeys.indexOf(t),n=i>-1;a.isPresent(t)&&(n?this.selectedKeys.splice(i,1):this.selectedKeys.push(t),this.notify())},e.prototype.notify=function(){this.selectedKeysChange.emit(this.selectedKeys.slice())},n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isSelected",null),n.__decorate([r.Input("selectBy"),n.__metadata("design:type",Object)],e.prototype,"selectKey",void 0),n.__decorate([r.Input("kendoTreeViewSelectable"),n.__metadata("design:type",Object)],e.prototype,"selection",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Array)],e.prototype,"selectedKeys",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"selectedKeysChange",void 0),n.__decorate([r.HostBinding("attr.aria-multiselectable"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"getAriaMultiselectable",null),e=n.__decorate([r.Directive({selector:"[kendoTreeViewSelectable]"}),n.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.SelectDirective=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(23),s=i(11),d=i(15),c=i(18);i(26);var p=function(){function e(e){this.treeView=e}return Object.defineProperty(e.prototype,"childrenField",{get:function(){return this._childrenField},set:function(e){if(!e)throw new Error("'childrenField' cannot be empty");this._childrenField=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;s.isPresent(this.childrenField)&&(this.treeView.children=function(t){return c.Observable.of(a.getter(e.childrenField,!0)(t))},this.treeView.hasChildren=function(t){return e.childrenField in t},this.treeView.isExpanded!==d.isExpanded&&(this.treeView.expandIcons=!0))},n.__decorate([r.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"childrenField",null),e=n.__decorate([r.Directive({selector:"[kendoTreeViewHierarchyBinding]"}),n.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.HierarchyBindingDirective=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(5),a=i(8),s=i(18);i(37),i(38),i(39),i(40),i(26);var d=function(){function e(e,t,i){this.expandService=e,this.loadingService=t,this.cd=i,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 i=t.index;return i===e.index}).do(function(t){var i=t.expand;!i&&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()},n.__decorate([r.HostBinding("class.k-i-loading"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"loading",null),n.__decorate([r.Input("kendoTreeViewLoading"),n.__metadata("design:type",String)],e.prototype,"index",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewLoading]"}),n.__metadata("design:paramtypes",[o.ExpandStateService,a.LoadingNotificationService,r.ChangeDetectorRef])],e)}();t.LoadingIndicatorDirective=d},function(e,t){e.exports=f},function(e,t){e.exports=v},function(e,t){e.exports=y},function(e,t){e.exports=m},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(23),s=i(11),d=i(42),c=i(18),p=function(e,t,i){return t.filter(function(t){return e(t)===i})},u=function(){function e(e){this.treeView=e,this.originalData=[]}return Object.defineProperty(e.prototype,"nodes",{set:function(e){if(this.originalData=e||[],s.isNullOrEmptyString(this.parentIdField))this.treeView.nodes=this.originalData.slice(0);else{var t=a.getter(this.parentIdField,!0);this.treeView.nodes=this.originalData.filter(d.compose(s.isBlank,t))}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;if(s.isPresent(this.parentIdField)&&s.isPresent(this.idField)){var t=function(t){return p(a.getter(e.parentIdField,!0),e.originalData||[],a.getter(e.idField,!0)(t))};this.treeView.hasChildren=function(e){return t(e).length>0},this.treeView.children=function(e){return c.Observable.of(t(e))}}},e.prototype.ngOnChanges=function(e){s.isChanged("parentIdField",e,!1)&&(this.nodes=this.originalData)},n.__decorate([r.Input(),n.__metadata("design:type",Array),n.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"parentIdField",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"idField",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewFlatDataBinding]"}),n.__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,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(9),a=i(13),s=i(5),d=i(7),c=i(14),p=i(11);i(37);var u=function(e,t){return{dataItem:t,index:e}},l=function(){function e(e,t,i,n,r,o,a){this.element=e,this.expandService=t,this.navigationService=i,this.selectionService=n,this.lookupService=r,this.renderer=o,this.ib=a,this.isDisabled=!1,this.ariaChecked="false",this.isInitialized=!1,this.subscriptions=[],this.subscribe()}return Object.defineProperty(e.prototype,"isChecked",{set:function(e){"checked"===e?this.ariaChecked="true":"indeterminate"===e?this.ariaChecked="mixed":this.ariaChecked="false"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded||!1},set:function(e){this._isExpanded=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected||!1},set:function(e){this._isSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"treeItem",{get:function(){return u(this.index,this.dataItem)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentTreeItem",{get:function(){return this.parentDataItem?u(this.parentIndex,this.parentDataItem):null},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.lookupService.registerItem(this.treeItem,this.parentTreeItem),this.registerNavigationItem(),this.isInitialized=!0,this.setAttribute("role","treeitem"),this.setAriaAttributes(),this.setDisabledClass(),this.updateTabIndex()},e.prototype.ngOnChanges=function(e){var t=e.index,i=e.isDisabled;(t||e.isChecked||e.isExpanded||e.isSelected)&&this.setAriaAttributes(),i&&this.setDisabledClass(),this.moveLookupItem(e),this.moveNavigationItem(t),this.disableNavigationItem(i)},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 i=t.index;return i===e.index&&!e.isDisabled}).subscribe(function(t){var i=t.expand;return e.expand(i)})]},e.prototype.registerNavigationItem=function(){this.isDisabled||(this.navigationService.registerItem(this.index),this.activateItem())},e.prototype.activateItem=function(){var e=this.navigationService,t=this.selectionService,i=this.index;t.setFirstSelected(i,this.isSelected),!e.isActive(i)&&t.isFirstSelected(i)&&e.activateIndex(i)},e.prototype.expand=function(e){this.expandService[e?"expand":"collapse"](this.index,this.dataItem)},e.prototype.isFocusable=function(){return!this.isDisabled&&this.navigationService.isFocusable(this.index)},e.prototype.focusItem=function(){this.isInitialized&&!this.isDisabled&&this.navigationService.isActive(this.index)&&this.element.nativeElement.focus()},e.prototype.moveLookupItem=function(e){void 0===e&&(e={});var t=e.dataItem,i=e.index,n=e.parentDataItem,r=e.parentIndex;if((!i||!i.firstChange||this.lookupService.hasItem(this.index))&&(t||i||n||r)){var o=(i||{}).previousValue||this.index;this.lookupService.replaceItem(o,this.treeItem,this.parentTreeItem)}},e.prototype.moveNavigationItem=function(e){void 0===e&&(e={});var t=e.currentValue,i=e.firstChange,n=e.previousValue;!i&&p.isPresent(t)&&p.isPresent(n)&&(this.navigationService.unregisterItem(n),this.navigationService.registerItem(t))},e.prototype.disableNavigationItem=function(e){if(e&&!e.firstChange){var t=this.navigationService;this.isDisabled?(t.activateClosest(this.index),t.unregisterItem(this.index)):(t.registerItem(this.index),t.activateFocusable())}},e.prototype.setAriaAttributes=function(){this.setAttribute("aria-level",this.ib.level(this.index).toString()),this.setAttribute("aria-expanded",this.isExpanded.toString()),this.setAttribute("aria-selected",this.isSelected.toString()),this.setAttribute("aria-checked",this.ariaChecked)},e.prototype.setDisabledClass=function(){this.setClass("k-state-disabled",this.isDisabled)},e.prototype.setClass=function(e,t){var i=t?"addClass":"removeClass";this.renderer[i](this.element.nativeElement,e)},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)},n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"index",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"parentDataItem",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"parentIndex",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"isChecked",null),n.__decorate([r.Input(),n.__metadata("design:type",Boolean)],e.prototype,"isDisabled",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"isExpanded",null),n.__decorate([r.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"isSelected",null),e=n.__decorate([r.Directive({selector:"[kendoTreeViewItem]"}),n.__metadata("design:paramtypes",[r.ElementRef,s.ExpandStateService,o.NavigationService,a.SelectionService,c.TreeViewLookupService,r.Renderer2,d.IndexBuilderService])],e)}();t.TreeViewItemDirective=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(9),a=i(13),s=i(16);i(37),i(24);var d=function(){function e(e,t,i,n){var r=this;this.element=e,this.navigationService=t,this.selectionService=i,this.renderer=n,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 i=e?"addClass":"removeClass";this.renderer[i](this.element.nativeElement,t)},n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"index",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewItemContent]"}),n.__metadata("design:paramtypes",[r.ElementRef,o.NavigationService,a.SelectionService,r.Renderer2])],e)}();t.TreeViewItemContentDirective=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(46),a=[o.CheckBoxComponent],s=function(){function e(){}return e=n.__decorate([r.NgModule({declarations:[a],exports:[a]})],e)}();t.CheckBoxModule=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(11),a=function(){function e(e,t){this.element=e,this.renderer=t,this.id="_"+o.guid(),this.checkState="none",this.tabindex=0,this.checkStateChange=new r.EventEmitter}return Object.defineProperty(e.prototype,"classWrapper",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indeterminate",{get:function(){return"indeterminate"===this.checkState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checked",{get:function(){return"checked"===this.checkState},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.element.nativeElement,"tabindex")},e.prototype.handleChange=function(e){this.checkStateChange.emit(e.target.checked?"checked":"none")},n.__decorate([r.HostBinding("class.k-checkbox-wrapper"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"classWrapper",null),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"id",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"checkState",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"labelText",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Number)],e.prototype,"tabindex",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"checkStateChange",void 0),e=n.__decorate([r.Component({selector:"kendo-checkbox",template:'\n <input\n class="k-checkbox"\n type="checkbox"\n [id]="id"\n [checked]="checked"\n [indeterminate]="indeterminate"\n [tabindex]="tabindex"\n (change)="handleChange($event)"\n />\n <label\n class="k-checkbox-label"\n tabindex="-1"\n [for]="id"\n >{{labelText}}</label>\n '}),n.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2])],e)}();t.CheckBoxComponent=a}])}); | ||
!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("rxjs/add/operator/auditTime"),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","rxjs/add/operator/auditTime","@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("rxjs/add/operator/auditTime"),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["rxjs/add/operator/auditTime"],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,i,n,r,o,a,s,d,c,p,u,l,h,f,v,y,m,_){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1);t.TreeViewComponent=n.TreeViewComponent;var r=i(21);t.TreeViewModule=r.TreeViewModule;var o=i(4);t.NodeTemplateDirective=o.NodeTemplateDirective;var a=i(31);t.CheckDirective=a.CheckDirective;var s=i(34);t.DisableDirective=s.DisableDirective;var d=i(35);t.ExpandDirective=d.ExpandDirective;var c=i(36);t.SelectDirective=c.SelectDirective;var p=i(37);t.HierarchyBindingDirective=p.HierarchyBindingDirective;var u=i(43);t.FlatDataBindingDirective=u.FlatDataBindingDirective},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(4),a=i(5),s=i(7),d=i(8),c=i(9),p=i(10),u=i(14),l=i(15),h=i(12),f=i(16),v=i(17),y=i(18),m=i(19);i(20);var _=function(e){return/k-i-collapse|k-i-expand/.test(e.className)},g=[a.FocusStateService,s.ExpandStateService,d.IndexBuilderService,l.TreeViewLookupService,c.LoadingNotificationService,p.NavigationService,u.SelectionService],b=function(){function e(e,t,i,n,o,a){this.focusService=e,this.expandService=t,this.navigationService=i,this.selectionService=n,this.treeViewLookupService=o,this.element=a,this.classNames=!0,this.onBlur=new r.EventEmitter,this.onFocus=new r.EventEmitter,this.expand=new r.EventEmitter,this.collapse=new r.EventEmitter,this.checkedChange=new r.EventEmitter,this.selectionChange=new r.EventEmitter,this.isDisabled=f.isDisabled,this.navigable=!0,this.checkboxes=!1,this.data=new y.BehaviorSubject([]),this.subscriptions=new v.Subscription(function(){}),this._animate=!0,this.resolvedPromise=Promise.resolve(null),this.children=function(){return m.Observable.of([])}}return Object.defineProperty(e.prototype,"role",{get:function(){return"tree"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return!this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nodes",{set:function(e){this.data.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasChildren",{get:function(){return this._hasChildren||f.hasChildren},set:function(e){this._hasChildren=e,this.expandIcons=Boolean(this._isExpanded&&this._hasChildren)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isChecked",{get:function(){return this._isChecked||f.isChecked},set:function(e){this._isChecked=e,this.checkboxes=Boolean(this._isChecked)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded||f.isExpanded},set:function(e){this._isExpanded=e,this.expandIcons=Boolean(this._isExpanded&&this._hasChildren)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected||f.isSelected},set:function(e){this._isSelected=e},enumerable:!0,configurable:!0}),e.prototype.handleKeydown=function(e){this.isActive&&this.navigationService.move(e)},e.prototype.handleClick=function(e){var t=e.target,i=h.nodeId(h.closestNode(t));i&&!this.focusService.hasActiveContent()&&(this.focusin(i),this.isActive&&!_(t)&&this.navigationService.selectIndex(i))},e.prototype.ngOnChanges=function(e){this.navigationService.navigable=Boolean(this.navigable)},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.focusService.changes.auditTime(1).subscribe(function(t){var i=t.focused,n=t.index;return i?e.focusin(n):e.focusout(n)})),this.subscriptions.add(this.expandService.changes.subscribe(function(t){var i=t.index,n=t.dataItem,r=t.expand;return r?e.expand.emit({index:i,dataItem:n}):e.collapse.emit({index:i,dataItem:n})})),this.subscriptions.add(this.navigationService.checks.subscribe(function(t){return e.checkedChange.emit(e.treeViewLookupService.itemLookup(t))})),this.subscriptions.add(this.selectionService.changes.subscribe(function(t){return e.selectionChange.emit(t)}))},e.prototype.blur=function(){if(h.isDocumentAvailable()){var e=h.focusableNode(this.element);document.activeElement===e&&e.blur()}},e.prototype.focus=function(e){this.navigationService.activateIndex(e);var t=h.focusableNode(this.element);t&&t.focus()},e.prototype.focusin=function(e){var t=this;e&&(this.navigationService.activateIndex(e),this.resolvedPromise.then(function(){!t.isActive&&t.navigationService.isActive(e)&&(t.isActive=!0,t.onFocus.emit())}))},e.prototype.focusout=function(e){var t=this;this.resolvedPromise.then(function(){t.isActive&&t.navigationService.isActive(e)&&(t.navigationService.deactivate(),t.isActive=!1,t.onBlur.emit())})},n.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-treeview"),n.__metadata("design:type",Boolean)],e.prototype,"classNames",void 0),n.__decorate([r.HostBinding("attr.role"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"role",null),n.__decorate([r.Input(),r.HostBinding("@.disabled"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"animate",null),n.__decorate([r.Output("blur"),n.__metadata("design:type",r.EventEmitter)],e.prototype,"onBlur",void 0),n.__decorate([r.Output("focus"),n.__metadata("design:type",r.EventEmitter)],e.prototype,"onFocus",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"expand",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"collapse",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"checkedChange",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"selectionChange",void 0),n.__decorate([r.ContentChild(o.NodeTemplateDirective),n.__metadata("design:type",o.NodeTemplateDirective)],e.prototype,"nodeTemplate",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Array),n.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"textField",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"hasChildren",null),n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isChecked",null),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isDisabled",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isExpanded",null),n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isSelected",null),n.__decorate([r.Input(),n.__metadata("design:type",Boolean)],e.prototype,"navigable",void 0),n.__decorate([r.HostListener("keydown",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleKeydown",null),n.__decorate([r.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleClick",null),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"children",void 0),e=n.__decorate([r.Component({changeDetection:r.ChangeDetectionStrategy.OnPush,exportAs:"kendoTreeView",providers:g,selector:"kendo-treeview",template:'\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n role="group"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplate?.templateRef"\n [nodes]="data"\n [textField]="textField"\n >\n </ul>\n '}),n.__metadata("design:paramtypes",[a.FocusStateService,s.ExpandStateService,p.NavigationService,u.SelectionService,l.TreeViewLookupService,r.ElementRef])],e)}();t.TreeViewComponent=b},function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=function(){function e(e){this.templateRef=e}return e=n.__decorate([r.Directive({selector:"[kendoTreeViewNodeTemplate]"}),n.__param(0,r.Optional()),n.__metadata("design:paramtypes",[r.TemplateRef])],e)}();t.NodeTemplateDirective=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(6),a=function(){function e(){this.changes=new o.Subject,this.activeContent=!1,this.isActive=!1}return e.prototype.hasActiveContent=function(){return!this.isActive&&this.activeContent},e.prototype.focus=function(e){this.isActive=!0,this.changes.next({focused:!0,index:e})},e.prototype.blur=function(e){this.isActive=!1,this.changes.next({focused:!1,index:e})},e.prototype.focusin=function(e){this.activeContent=!0},e.prototype.focusout=function(e){this.activeContent=!1},e=n.__decorate([r.Injectable()],e)}();t.FocusStateService=a},function(e,t){e.exports=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(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=n.__decorate([r.Injectable()],e)}();t.ExpandStateService=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(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.lastLevelIndex=function(e){void 0===e&&(e="");var t=e.split(this.INDEX_SEPARATOR);return t.length?parseInt(t[t.length-1],10):NaN},e.prototype.level=function(e){return e.split(this.INDEX_SEPARATOR).length},e=n.__decorate([r.Injectable()],e)}();t.IndexBuilderService=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(6),a=function(){function e(){this.changes=new o.Subject}return e.prototype.notifyLoaded=function(e){this.changes.next(e)},e=n.__decorate([r.Injectable()],e)}();t.LoadingNotificationService=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(11),a=i(12),s=i(13),d=i(6),c=function(e,t){return e[t]||e},p=function(){function e(){var e=this;this.expands=new d.Subject,this.moves=new d.Subject,this.checks=new d.Subject,this.selects=new d.Subject,this.navigable=!0,this.actions=(t={},t[s.Keys.up]=function(){return e.activate(c(e.focusableItem,"prev"))},t[s.Keys.down]=function(){return e.activate(c(e.focusableItem,"next"))},t[s.Keys.left]=function(){return e.expand({expand:!1,intercept:e.moveToParent.bind(e)})},t[s.Keys.right]=function(){return e.expand({expand:!0,intercept:e.moveToChild.bind(e)})},t[s.Keys.home]=function(){return e.activate(e.model.firstNode())},t[s.Keys.end]=function(){return e.activate(e.model.lastNode())},t[s.Keys.enter]=function(){return e.navigable&&e.selectIndex(a.nodeIndex(e.activeItem))},t[s.Keys.space]=function(){return e.navigable&&e.checkIndex(a.nodeIndex(e.activeItem))},t),this.isFocused=!1,this._model=new o.NavigationModel;var t}return Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return a.nodeIndex(this.activeItem)||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusableItem",{get:function(){return this.activeItem||this.model.firstNode()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActiveExpanded",{get:function(){return this.activeItem&&this.activeItem.children.length>0},enumerable:!0,configurable:!0}),e.prototype.activate=function(e){this.navigable&&e&&!this.isActive(a.nodeIndex(e))&&(this.isFocused=!0,this.activeItem=e||this.activeItem,this.notifyMove())},e.prototype.activateParent=function(e){this.activate(this.model.findParent(e))},e.prototype.activateIndex=function(e){e&&this.activate(this.model.findNode(e))},e.prototype.activateClosest=function(e){e&&a.nodeIndex(this.focusableItem)===e&&(this.activeItem=this.model.closestNode(e),this.notifyMove())},e.prototype.activateFocusable=function(){this.activeItem||(this.activeItem=this.model.firstNode(),this.notifyMove())},e.prototype.deactivate=function(){this.navigable&&this.isFocused&&(this.isFocused=!1,this.notifyMove())},e.prototype.checkIndex=function(e){this.checks.next(e)},e.prototype.selectIndex=function(e){this.selects.next(e)},e.prototype.isActive=function(e){return!!e&&(this.isFocused&&this.activeIndex===e)},e.prototype.isFocusable=function(e){return a.nodeIndex(this.focusableItem)===e},e.prototype.registerItem=function(e){this.model.registerItem(e)},e.prototype.unregisterItem=function(e){this.isActive(e)&&this.activateParent(e),this.model.unregisterItem(e)},e.prototype.move=function(e){if(this.navigable){var t=this.actions[e.keyCode];t&&(t(),e.preventDefault())}},e.prototype.expand=function(e){var t=e.expand,i=e.intercept,n=a.nodeIndex(this.activeItem);n&&!i(n)&&this.notifyExpand(t)},e.prototype.moveToParent=function(){return!this.isActiveExpanded&&(this.activate(this.model.findParent(a.nodeIndex(this.activeItem))),!0)},e.prototype.moveToChild=function(){return!!this.isActiveExpanded&&(this.activate(this.model.findChild(a.nodeIndex(this.activeItem))),!0)},e.prototype.notifyExpand=function(e){this.expands.next(this.navigationState(e))},e.prototype.notifyMove=function(){this.moves.next(this.navigationState())},e.prototype.navigationState=function(e){return void 0===e&&(e=!1),{expand:e,index:a.nodeIndex(this.activeItem),isFocused:this.isFocused}},e=n.__decorate([r.Injectable()],e)}();t.NavigationService=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(8),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,i=[].concat(a(e));i.length;)i=i.concat(a(r(i))),t=i.shift();return t},d=function(e){var t=e.prev,i=e.next;t&&(t.next=e),i&&(i.prev=e)},c=function(e,t){e&&(e.next=t),t&&(t.prev=e)},p=function(){function e(){this.ib=new n.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.closestNode=function(e){var t=o(this.findNode(e)).prev,i=t||this.firstNode();return o(i).index===e?this.sibling(i,1):i},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=[],i=this.ib.level(e),n=this.findParent(e);if(n||1===i){var r=this.prevNode(n,e),o=this.nextNode(n,e),a={children:t,index:e,parent:n,prev:r,next:o};d(a),this.insert(a,n)}},e.prototype.unregisterItem=function(e){var t=this.find(e,this.nodes);if(t){c(t.prev,this.nextNode(t.parent,t.index));var i=this.container(t.parent);i.splice(i.indexOf(t),1)}},e.prototype.childLevel=function(e){return e&&e.length?this.ib.level(e[0].index):1},e.prototype.container=function(e){return e?e.children:this.nodes},e.prototype.find=function(e,t){var i=this.childLevel(t),n=this.ib.indexForLevel(e,i),r=i===this.ib.level(e),o=t.find(function(e){return e.index===n});return o?r?o:this.find(e,o.children):null},e.prototype.closestIndexPosition=function(e,t){for(var i=this.ib.lastLevelIndex(t),n=0;n<e.length;){if(this.ib.lastLevelIndex(e[n].index)>i)return n;n+=1}return n},e.prototype.insert=function(e,t){var i=this.container(t);i.splice(this.closestIndexPosition(i,e.index),0,e)},e.prototype.prevNode=function(e,t){var i=this.container(e),n=i.slice(0,this.closestIndexPosition(i,t));return s(r(n))||e||null},e.prototype.nextNode=function(e,t){var i=this.container(e),n=this.findNode(t);if(!e&&n)return this.sibling(n,1);var r=this.closestIndexPosition(i,t),o=i.slice(r)[0];return o?o:this.sibling(e,1)},e.prototype.sibling=function(e,t){if(!e)return null;var i=this.findParent(e.index),n=this.container(i);return n[n.indexOf(e)+t]||this.sibling(i,t)||null},e}();t.NavigationModel=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){},t.isPresent=function(e){return null!==e&&void 0!==e},t.isBlank=function(e){return null===e||void 0===e},t.isArray=function(e){return Array.isArray(e)},t.isNullOrEmptyString=function(e){return t.isBlank(e)||0===e.trim().length},t.isDocumentAvailable=function(){return"undefined"!=typeof document},t.isChanged=function(e,t,i){return void 0===i&&(i=!0),t[e]&&(!t[e].isFirstChange()||!i)&&t[e].previousValue!==t[e].currentValue},t.anyChanged=function(e,i,n){return void 0===n&&(n=!0),e.some(function(e){return t.isChanged(e,i,n)})},t.closestNode=function(e){return e.closest("li.k-item")},t.focusableNode=function(e){return e.nativeElement.querySelector('li[tabindex="0"]')},t.hasActiveNode=function(e,i){var n=i||t.closestNode(e);return n&&(n===e||e.tabIndex<0)},t.nodeId=function(e){return e?e.getAttribute("data-treeindex"):""},t.nodeIndex=function(e){return(e||{}).index},t.guid=function(){for(var e,t="",i=0;i<32;i++)e=16*Math.random()|0,8!==i&&12!==i&&16!==i&&20!==i||(t+="-"),t+=(12===i?4:16===i?3&e|8:e).toString(16);return t}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!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"}(i=t.Keys||(t.Keys={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(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=n.__decorate([r.Injectable()],e)}();t.SelectionService=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(12),a=function(){function e(){this.map=new Map}return e.prototype.registerItem=function(e,t){var i={children:[],item:e,parent:this.item(o.nodeIndex(t))};this.map.set(e.index,i)},e.prototype.registerChildren=function(e,t){var i=this.item(e);i&&(i.children=t)},e.prototype.unregisterItem=function(e){this.map.delete(e)},e.prototype.replaceItem=function(e,t,i){var n=this.item(e);n&&t&&(this.unregisterItem(e),this.registerItem(t,i),e===t.index&&this.registerChildren(t.index,n.children.slice()))},e.prototype.itemLookup=function(e){var t=this.item(e);return t?{children:this.mapChildren(t.children),item:t.item,parent:t.parent}:null},e.prototype.hasItem=function(e){return this.map.has(e)},e.prototype.item=function(e){return this.map.get(e)||null},e.prototype.mapChildren=function(e){var t=this;return e.map(function(e){var i=t.item(e.index),n=i.item,r=i.parent,o=i.children;return{children:t.mapChildren(o),item:n,parent:r}})},e=n.__decorate([r.Injectable()],e)}();t.TreeViewLookupService=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=function(){return!1},t.isChecked=function(){return"none"},t.isDisabled=function(){return!1},t.isExpanded=function(){return!0},t.isSelected=function(){return!1}},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t){e.exports=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(22),s=i(4),d=i(31),c=i(34),p=i(35),u=i(36),l=i(37),h=i(43),f=[o.TreeViewComponent,s.NodeTemplateDirective,d.CheckDirective,c.DisableDirective,p.ExpandDirective,u.SelectDirective,l.HierarchyBindingDirective,h.FlatDataBindingDirective],v=function(){function e(){}return e=n.__decorate([r.NgModule({exports:[f],imports:[a.SharedModule]})],e)}();t.TreeViewModule=v},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(23),s=i(30),d=i(4),c=i(31),p=i(34),u=i(35),l=i(36),h=i(37),f=i(38),v=i(43),y=i(45),m=i(46),_=i(47),g=[o.TreeViewComponent,a.TreeViewGroupComponent,y.TreeViewItemDirective,m.TreeViewItemContentDirective,d.NodeTemplateDirective,c.CheckDirective,p.DisableDirective,u.ExpandDirective,l.SelectDirective,h.HierarchyBindingDirective,f.LoadingIndicatorDirective,v.FlatDataBindingDirective],b=function(){function e(){}return e=n.__decorate([r.NgModule({declarations:[g],exports:[g],imports:[s.CommonModule,_.CheckBoxModule]})],e)}();t.SharedModule=b},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(24),a=i(7),s=i(8),d=i(15),c=i(10),p=i(12),u=i(25),l=i(9),h=i(19);i(26),i(27),i(28),i(29);var f=function(){function e(e,t,i,n,r,o){this.expandService=e,this.loadingService=t,this.indexBuilder=i,this.treeViewLookupService=n,this.navigationService=r,this.cd=o,this.kGroupClass=!0,this.textField="",this._data=[],this.isChecked=function(){return"none"},this.isDisabled=function(){return!1},this.isExpanded=function(){return!1},this.isSelected=function(){return!1},this.children=function(){return h.Observable.of([])},this.hasChildren=function(){return!1}}return Object.defineProperty(e.prototype,"role",{get:function(){return"group"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e,this.updateParentChildren()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTemplate",{get:function(){return p.isPresent(this.nodeTemplateRef)},enumerable:!0,configurable:!0}),e.prototype.expandNode=function(e,t,i){i?this.expandService.expand(e,t):this.expandService.collapse(e,t)},e.prototype.checkNode=function(e){this.navigationService.checkIndex(e),this.navigationService.activateIndex(e)},e.prototype.nodeIndex=function(e){return this.indexBuilder.nodeIndex(e.toString(),this.parentIndex)},e.prototype.nodeText=function(e){var t=p.isArray(this.textField)?this.textField[0]:this.textField;return u.getter(t,!0)(e)},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.subscription=this.nodes.subscribe(function(t){e.data=t,e.cd.markForCheck()})},e.prototype.ngOnChanges=function(e){e.parentIndex&&this.updateParentChildren()},e.prototype.fetchChildren=function(e,t){var i=this;return this.children(e).catch(function(){return i.loadingService.notifyLoaded(t),h.Observable.empty()}).do(function(){return i.loadingService.notifyLoaded(t)})},Object.defineProperty(e.prototype,"nextFields",{get:function(){return p.isArray(this.textField)?this.textField.length>1?this.textField.slice(1):this.textField:[this.textField]},enumerable:!0,configurable:!0}),e.prototype.updateParentChildren=function(){var e=this.parentIndex?this.mapToTreeItem(this.data):[];this.treeViewLookupService.registerChildren(this.parentIndex,e)},e.prototype.mapToTreeItem=function(e){var t=this;return e.map(function(e,i){return{dataItem:e,index:t.nodeIndex(i)}})},n.__decorate([r.HostBinding("class.k-group"),n.__metadata("design:type",Boolean)],e.prototype,"kGroupClass",void 0),n.__decorate([r.HostBinding("attr.role"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"role",null),n.__decorate([r.Input(),n.__metadata("design:type",Boolean)],e.prototype,"checkboxes",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Boolean)],e.prototype,"expandIcons",void 0),n.__decorate([r.Input(),n.__metadata("design:type",h.Observable)],e.prototype,"nodes",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"textField",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"parentDataItem",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"parentIndex",void 0),n.__decorate([r.Input(),n.__metadata("design:type",r.TemplateRef)],e.prototype,"nodeTemplateRef",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isChecked",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isDisabled",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isExpanded",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"children",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"hasChildren",void 0),e=n.__decorate([r.Component({animations:[o.trigger("toggle",[o.transition("void => *",[o.style({height:0}),o.animate("0.1s ease-in",o.style({height:"*"}))]),o.transition("* => void",[o.style({height:"*"}),o.animate("0.1s ease-in",o.style({height:0}))])])],selector:"[kendoTreeViewGroup]",template:'\n <li\n *ngFor="let node of data; let index = index" class="k-item"\n kendoTreeViewItem\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [isChecked]="isChecked(node, nodeIndex(index))"\n [isDisabled]="isDisabled(node, nodeIndex(index))"\n [isExpanded]="isExpanded(node, nodeIndex(index))"\n [isSelected]="isSelected(node, nodeIndex(index))"\n [attr.data-treeindex]="nodeIndex(index)"\n >\n <div class="k-mid">\n <span\n class="k-icon"\n [class.k-i-collapse]="isExpanded(node, nodeIndex(index))"\n [class.k-i-expand]="!isExpanded(node, nodeIndex(index))"\n [kendoTreeViewLoading]="nodeIndex(index)"\n (click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="expandIcons && hasChildren(node)"\n >\n </span>\n <kendo-checkbox\n *ngIf="checkboxes"\n [checkState]="isChecked(node, nodeIndex(index))"\n (checkStateChange)="checkNode(nodeIndex(index))"\n tabindex="-1"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]="nodeIndex(index)"\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [isSelected]="isSelected"\n class="k-in"\n >\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef" [ngTemplateOutletContext]="{$implicit: node, index: nodeIndex(index)}"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf="isExpanded(node, nodeIndex(index)) && hasChildren(node)"\n kendoTreeViewGroup\n role="group"\n [nodes]="fetchChildren(node, nodeIndex(index))"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [nodeTemplateRef]="nodeTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [parentDataItem]="node"\n [textField]="nextFields"\n [@toggle]="true"\n >\n </ul>\n </li>\n '}),n.__metadata("design:paramtypes",[a.ExpandStateService,l.LoadingNotificationService,s.IndexBuilderService,d.TreeViewLookupService,c.NavigationService,r.ChangeDetectorRef])],e)}();t.TreeViewGroupComponent=f},function(e,t){e.exports=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(12),r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,o={};o.undefined=function(e){return e},t.getter=function(e,t){var i=e+t;if(o[i])return o[i];var a=[];return e.replace(r,function(e,t,i,r){a.push(n.isPresent(t)?t:i||r)}),o[i]=function(e){for(var i=e,r=0;r<a.length;r++)if(i=i[a[r]],!n.isPresent(i)&&t)return i;return i},o[i]}},function(e,t){e.exports=d},function(e,t){e.exports=c},function(e,t){e.exports=p; | ||
},function(e,t){e.exports=u},function(e,t){e.exports=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(12),s=i(17);i(32),i(33);var d=function(e,t){return e.filter(function(e){return e===t}).length>0},c=function(){function e(e){var t=this;this.treeView=e,this.checkedKeys=[],this.checkedKeysChange=new r.EventEmitter,this.subscriptions=new s.Subscription(function(){}),this.checkActions={multiple:function(e){return t.checkMultiple(e)},single:function(e){return t.checkSingle(e)}}}return Object.defineProperty(e.prototype,"isChecked",{set:function(e){this.treeView.isChecked=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var e={checkChildren:!0,checkParents:!0,enabled:!0,mode:"multiple"};if(!a.isPresent(this.checkable))return e;var t="boolean"==typeof this.checkable,i=t?{enabled:this.checkable}:this.checkable;return Object.assign(e,i)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.subscriptions.add(this.treeView.checkedChange.subscribe(function(t){return e.check(t)})),this.treeView.checkboxes=!0,this.treeView.isChecked=this.isItemChecked.bind(this)},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.isItemChecked=function(e,t){if(!this.checkKey)return this.isIndexChecked(t);var i=this.checkedKeys.indexOf(this.itemKey({dataItem:e,index:t}));return i>-1?"checked":"none"},e.prototype.isIndexChecked=function(e){var t=this.checkedKeys.filter(function(t){return 0===t.indexOf(e)});if(d(t,e))return"checked";var i=this.options,n=i.mode,r=i.checkParents;return"multiple"===n&&r&&t.length?"indeterminate":"none"},e.prototype.itemKey=function(e){return this.checkKey?"string"==typeof this.checkKey?e.dataItem[this.checkKey]:"function"==typeof this.checkKey?this.checkKey(e):void 0:e.index},e.prototype.check=function(e){var t=this.options,i=t.enabled,n=t.mode,r=this.checkActions[n]||a.noop;i&&r(e)},e.prototype.checkSingle=function(e){var t=this.itemKey(e.item);this.checkedKeys=this.checkedKeys[0]!==t?[t]:[],this.notify()},e.prototype.checkMultiple=function(e){this.checkNode(e),this.options.checkParents&&this.checkParents(e.parent),this.notify()},e.prototype.checkNode=function(e,t){var i=this,n=this.itemKey(e.item),r=this.checkedKeys.indexOf(n),o=r>-1,s=void 0===t?!o:t;!a.isPresent(n)||o&&t||(o?this.checkedKeys.splice(r,1):this.checkedKeys.push(n),this.options.checkChildren&&e.children.map(function(e){return i.checkNode(e,s)}))},e.prototype.checkParents=function(e){for(var t=e;t;){var i=this.itemKey(t.item),n=this.checkedKeys.indexOf(i);this.allChildrenSelected(t.children)?n===-1&&this.checkedKeys.push(i):n>-1&&this.checkedKeys.splice(n,1),t=t.parent}},e.prototype.allChildrenSelected=function(e){var t=this,i=function(e,i){return e&&"checked"===t.isItemChecked(i.dataItem,i.index)};return e.reduce(i,!0)},e.prototype.notify=function(){this.checkedKeysChange.emit(this.checkedKeys.slice())},n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isChecked",null),n.__decorate([r.Input("checkBy"),n.__metadata("design:type",Object)],e.prototype,"checkKey",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Array)],e.prototype,"checkedKeys",void 0),n.__decorate([r.Input("kendoTreeViewCheckable"),n.__metadata("design:type",Object)],e.prototype,"checkable",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"checkedKeysChange",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewCheckable]"}),n.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.CheckDirective=c},function(e,t){e.exports=h},function(e,t){e.exports=f},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=function(){function e(e,t){this.treeView=e,this.cdr=t,this.disabledKeys=[]}return Object.defineProperty(e.prototype,"isDisabled",{set:function(e){this.treeView.isDisabled=e},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){void 0===e&&(e={});var t=e.disabledKeys;t&&!t.firstChange&&this.detectChanges()},e.prototype.ngOnInit=function(){var e=this;this.treeView.isDisabled=function(t,i){return e.disabledKeys.indexOf(e.itemKey({dataItem:t,index:i}))>-1}},e.prototype.itemKey=function(e){return this.disableKey?"string"==typeof this.disableKey?e.dataItem[this.disableKey]:"function"==typeof this.disableKey?this.disableKey(e):void 0:e.index},e.prototype.detectChanges=function(){this.cdr.markForCheck()},n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isDisabled",null),n.__decorate([r.Input("kendoTreeViewDisable"),n.__metadata("design:type",Object)],e.prototype,"disableKey",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Array)],e.prototype,"disabledKeys",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewDisable]"}),n.__metadata("design:paramtypes",[o.TreeViewComponent,r.ChangeDetectorRef])],e)}();t.DisableDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(17),s=i(19);i(32),i(33);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 n.__assign({expand:!0},e)}),this.treeView.collapse.map(function(e){return n.__assign({expand:!1},e)})).subscribe(this.toggleExpand.bind(this))),this.treeView.isExpanded=function(t,i){return e.expandedKeys.indexOf(e.itemKey({dataItem:t,index:i}))>-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,i=e.dataItem,n=e.expand,r=this.itemKey({index:t,dataItem:i}),o=this.expandedKeys.indexOf(r),a=!1;o>-1&&!n?(this.expandedKeys.splice(o,1),a=!0):o===-1&&n&&(this.expandedKeys.push(r),a=!0),a&&this.expandedKeysChange.emit(this.expandedKeys)},n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isExpanded",null),n.__decorate([r.Input("expandBy"),n.__metadata("design:type",Object)],e.prototype,"expandKey",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"expandedKeysChange",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Array)],e.prototype,"expandedKeys",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewExpandable]"}),n.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.ExpandDirective=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(12),s=i(17);i(32),i(33);var d=function(){function e(e){var t=this;this.treeView=e,this.selectedKeys=[],this.selectedKeysChange=new r.EventEmitter,this.subscriptions=new s.Subscription(function(){}),this.selectActions={multiple:function(e){return t.selectMultiple(e)},single:function(e){return t.selectSingle(e)}}}return Object.defineProperty(e.prototype,"isSelected",{set:function(e){this.treeView.isSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getAriaMultiselectable",{get:function(){return"multiple"===this.options.mode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var e={enabled:!0,mode:"single"};if(!a.isPresent(this.selection))return e;var t="boolean"==typeof this.selection,i=t?{enabled:this.selection}:this.selection;return Object.assign(e,i)},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,i){return e.selectedKeys.indexOf(e.itemKey({dataItem:t,index:i}))>-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,i=t.enabled,n=t.mode,r=this.selectActions[n]||a.noop;i&&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),i=this.selectedKeys.indexOf(t),n=i>-1;a.isPresent(t)&&(n?this.selectedKeys.splice(i,1):this.selectedKeys.push(t),this.notify())},e.prototype.notify=function(){this.selectedKeysChange.emit(this.selectedKeys.slice())},n.__decorate([r.Input(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Function])],e.prototype,"isSelected",null),n.__decorate([r.Input("selectBy"),n.__metadata("design:type",Object)],e.prototype,"selectKey",void 0),n.__decorate([r.Input("kendoTreeViewSelectable"),n.__metadata("design:type",Object)],e.prototype,"selection",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Array)],e.prototype,"selectedKeys",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"selectedKeysChange",void 0),n.__decorate([r.HostBinding("attr.aria-multiselectable"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"getAriaMultiselectable",null),e=n.__decorate([r.Directive({selector:"[kendoTreeViewSelectable]"}),n.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.SelectDirective=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(25),s=i(12),d=i(16),c=i(19);i(28);var p=function(){function e(e){this.treeView=e}return Object.defineProperty(e.prototype,"childrenField",{get:function(){return this._childrenField},set:function(e){if(!e)throw new Error("'childrenField' cannot be empty");this._childrenField=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;s.isPresent(this.childrenField)&&(this.treeView.children=function(t){return c.Observable.of(a.getter(e.childrenField,!0)(t))},this.treeView.hasChildren=function(t){return e.childrenField in t},this.treeView.isExpanded!==d.isExpanded&&(this.treeView.expandIcons=!0))},n.__decorate([r.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"childrenField",null),e=n.__decorate([r.Directive({selector:"[kendoTreeViewHierarchyBinding]"}),n.__metadata("design:paramtypes",[o.TreeViewComponent])],e)}();t.HierarchyBindingDirective=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(7),a=i(9),s=i(19);i(39),i(40),i(41),i(42),i(28);var d=function(){function e(e,t,i){this.expandService=e,this.loadingService=t,this.cd=i,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 i=t.index;return i===e.index}).do(function(t){var i=t.expand;!i&&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()},n.__decorate([r.HostBinding("class.k-i-loading"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"loading",null),n.__decorate([r.Input("kendoTreeViewLoading"),n.__metadata("design:type",String)],e.prototype,"index",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewLoading]"}),n.__metadata("design:paramtypes",[o.ExpandStateService,a.LoadingNotificationService,r.ChangeDetectorRef])],e)}();t.LoadingIndicatorDirective=d},function(e,t){e.exports=v},function(e,t){e.exports=y},function(e,t){e.exports=m},function(e,t){e.exports=_},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(1),a=i(25),s=i(12),d=i(44),c=i(19),p=function(e,t,i){return t.filter(function(t){return e(t)===i})},u=function(){function e(e){this.treeView=e,this.originalData=[]}return Object.defineProperty(e.prototype,"nodes",{set:function(e){if(this.originalData=e||[],s.isNullOrEmptyString(this.parentIdField))this.treeView.nodes=this.originalData.slice(0);else{var t=a.getter(this.parentIdField,!0);this.treeView.nodes=this.originalData.filter(d.compose(s.isBlank,t))}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;if(s.isPresent(this.parentIdField)&&s.isPresent(this.idField)){var t=function(t){return p(a.getter(e.parentIdField,!0),e.originalData||[],a.getter(e.idField,!0)(t))};this.treeView.hasChildren=function(e){return t(e).length>0},this.treeView.children=function(e){return c.Observable.of(t(e))}}},e.prototype.ngOnChanges=function(e){s.isChanged("parentIdField",e,!1)&&(this.nodes=this.originalData)},n.__decorate([r.Input(),n.__metadata("design:type",Array),n.__metadata("design:paramtypes",[Array])],e.prototype,"nodes",null),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"parentIdField",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"idField",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewFlatDataBinding]"}),n.__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,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(10),a=i(14),s=i(5),d=i(7),c=i(8),p=i(15),u=i(12);i(39);var l=function(e,t){return{dataItem:t,index:e}},h=function(){function e(e,t,i,n,r,o,a,s){this.element=e,this.focusService=t,this.expandService=i,this.navigationService=n,this.selectionService=r,this.lookupService=o,this.renderer=a,this.ib=s,this.isDisabled=!1,this.ariaChecked="false",this.isInitialized=!1,this.subscriptions=[],this.subscribe()}return Object.defineProperty(e.prototype,"isChecked",{set:function(e){"checked"===e?this.ariaChecked="true":"indeterminate"===e?this.ariaChecked="mixed":this.ariaChecked="false"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded||!1},set:function(e){this._isExpanded=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected||!1},set:function(e){this._isSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"treeItem",{get:function(){return l(this.index,this.dataItem)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentTreeItem",{get:function(){return this.parentDataItem?l(this.parentIndex,this.parentDataItem):null},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.lookupService.registerItem(this.treeItem,this.parentTreeItem),this.registerNavigationItem(),this.isInitialized=!0,this.initEvents(),this.setAttribute("role","treeitem"),this.setAriaAttributes(),this.setDisabledClass(),this.updateTabIndex()},e.prototype.ngOnChanges=function(e){var t=e.index,i=e.isDisabled;(t||e.isChecked||e.isExpanded||e.isSelected)&&this.setAriaAttributes(),i&&this.setDisabledClass(),this.moveLookupItem(e),this.moveNavigationItem(t),this.disableNavigationItem(i)},e.prototype.ngOnDestroy=function(){this.navigationService.unregisterItem(this.index),this.subscriptions=this.subscriptions.reduce(function(e,t){return t.unsubscribe(),e},[])},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 i=t.index;return i===e.index&&!e.isDisabled}).subscribe(function(t){var i=t.expand;return e.expand(i)})]},e.prototype.initEvents=function(){var e=this;["focusin","focusout","focus","blur"].forEach(function(t){e.subscriptions.push(e.listen(t,function(){return e.focusService[t](e.index)}))})},e.prototype.listen=function(e,t){return{unsubscribe:this.renderer.listen(this.element.nativeElement,e,t)}},e.prototype.registerNavigationItem=function(){this.isDisabled||(this.navigationService.registerItem(this.index),this.activateItem())},e.prototype.activateItem=function(){var e=this.navigationService,t=this.selectionService,i=this.index;t.setFirstSelected(i,this.isSelected),!e.isActive(i)&&t.isFirstSelected(i)&&e.activateIndex(i)},e.prototype.expand=function(e){this.expandService[e?"expand":"collapse"](this.index,this.dataItem)},e.prototype.isFocusable=function(){return!this.isDisabled&&this.navigationService.isFocusable(this.index)},e.prototype.focusItem=function(){this.isInitialized&&!this.isDisabled&&this.navigationService.isActive(this.index)&&this.element.nativeElement.focus()},e.prototype.moveLookupItem=function(e){void 0===e&&(e={});var t=e.dataItem,i=e.index,n=e.parentDataItem,r=e.parentIndex;if((!i||!i.firstChange||this.lookupService.hasItem(this.index))&&(t||i||n||r)){var o=(i||{}).previousValue||this.index;this.lookupService.replaceItem(o,this.treeItem,this.parentTreeItem)}},e.prototype.moveNavigationItem=function(e){void 0===e&&(e={});var t=e.currentValue,i=e.firstChange,n=e.previousValue;!i&&u.isPresent(t)&&u.isPresent(n)&&(this.navigationService.unregisterItem(n),this.navigationService.registerItem(t))},e.prototype.disableNavigationItem=function(e){if(e&&!e.firstChange){var t=this.navigationService;this.isDisabled?(t.activateClosest(this.index),t.unregisterItem(this.index)):(t.registerItem(this.index),t.activateFocusable())}},e.prototype.setAriaAttributes=function(){this.setAttribute("aria-level",this.ib.level(this.index).toString()),this.setAttribute("aria-expanded",this.isExpanded.toString()),this.setAttribute("aria-selected",this.isSelected.toString()),this.setAttribute("aria-checked",this.ariaChecked)},e.prototype.setDisabledClass=function(){this.setClass("k-state-disabled",this.isDisabled)},e.prototype.setClass=function(e,t){var i=t?"addClass":"removeClass";this.renderer[i](this.element.nativeElement,e)},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)},n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"index",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"parentDataItem",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"parentIndex",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"isChecked",null),n.__decorate([r.Input(),n.__metadata("design:type",Boolean)],e.prototype,"isDisabled",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"isExpanded",null),n.__decorate([r.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"isSelected",null),e=n.__decorate([r.Directive({selector:"[kendoTreeViewItem]"}),n.__metadata("design:paramtypes",[r.ElementRef,s.FocusStateService,d.ExpandStateService,o.NavigationService,a.SelectionService,p.TreeViewLookupService,r.Renderer2,c.IndexBuilderService])],e)}();t.TreeViewItemDirective=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(10),a=i(14),s=i(17);i(39),i(26);var d=function(){function e(e,t,i,n){var r=this;this.element=e,this.navigationService=t,this.selectionService=i,this.renderer=n,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 i=e?"addClass":"removeClass";this.renderer[i](this.element.nativeElement,t)},n.__decorate([r.Input(),n.__metadata("design:type",Object)],e.prototype,"dataItem",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"index",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Function)],e.prototype,"isSelected",void 0),e=n.__decorate([r.Directive({selector:"[kendoTreeViewItemContent]"}),n.__metadata("design:paramtypes",[r.ElementRef,o.NavigationService,a.SelectionService,r.Renderer2])],e)}();t.TreeViewItemContentDirective=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(48),a=[o.CheckBoxComponent],s=function(){function e(){}return e=n.__decorate([r.NgModule({declarations:[a],exports:[a]})],e)}();t.CheckBoxModule=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(3),o=i(12),a=function(){function e(e,t){this.element=e,this.renderer=t,this.id="_"+o.guid(),this.checkState="none",this.tabindex=0,this.checkStateChange=new r.EventEmitter}return Object.defineProperty(e.prototype,"classWrapper",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indeterminate",{get:function(){return"indeterminate"===this.checkState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checked",{get:function(){return"checked"===this.checkState},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.element.nativeElement,"tabindex")},e.prototype.handleChange=function(e){this.checkStateChange.emit(e.target.checked?"checked":"none")},n.__decorate([r.HostBinding("class.k-checkbox-wrapper"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"classWrapper",null),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"id",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"checkState",void 0),n.__decorate([r.Input(),n.__metadata("design:type",String)],e.prototype,"labelText",void 0),n.__decorate([r.Input(),n.__metadata("design:type",Number)],e.prototype,"tabindex",void 0),n.__decorate([r.Output(),n.__metadata("design:type",r.EventEmitter)],e.prototype,"checkStateChange",void 0),e=n.__decorate([r.Component({selector:"kendo-checkbox",template:'\n <input\n class="k-checkbox"\n type="checkbox"\n [id]="id"\n [checked]="checked"\n [indeterminate]="indeterminate"\n [tabindex]="tabindex"\n (change)="handleChange($event)"\n />\n <label\n class="k-checkbox-label"\n tabindex="-1"\n [for]="id"\n >{{labelText}}</label>\n '}),n.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2])],e)}();t.CheckBoxComponent=a}])}); |
@@ -37,3 +37,2 @@ import * as tslib_1 from "tslib"; | ||
this.subscriptions.add(Observable.merge(this.treeView.expand.map(function (e) { return (tslib_1.__assign({ expand: true }, e)); }), this.treeView.collapse.map(function (e) { return (tslib_1.__assign({ expand: false }, e)); })).subscribe(this.toggleExpand.bind(this))); | ||
this.treeView.expandIcons = true; | ||
this.treeView.isExpanded = function (dataItem, index) { | ||
@@ -40,0 +39,0 @@ return _this.expandedKeys.indexOf(_this.itemKey({ dataItem: dataItem, index: index })) > -1; |
import { ElementRef, OnChanges, OnDestroy, OnInit, Renderer2 } from '@angular/core'; | ||
import { NavigationService } from './navigation/navigation.service'; | ||
import { SelectionService } from './selection/selection.service'; | ||
import { FocusStateService } from './focus-state.service'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
@@ -17,2 +18,3 @@ import { IndexBuilderService } from './index-builder.service'; | ||
private element; | ||
private focusService; | ||
private expandService; | ||
@@ -39,3 +41,3 @@ private navigationService; | ||
private subscriptions; | ||
constructor(element: ElementRef, expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, lookupService: TreeViewLookupService, renderer: Renderer2, ib: IndexBuilderService); | ||
constructor(element: ElementRef, focusService: FocusStateService, expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, lookupService: TreeViewLookupService, renderer: Renderer2, ib: IndexBuilderService); | ||
ngOnInit(): void; | ||
@@ -45,2 +47,4 @@ ngOnChanges(changes: any): void; | ||
subscribe(): void; | ||
private initEvents(); | ||
private listen(eventName, callback); | ||
private registerNavigationItem(); | ||
@@ -47,0 +51,0 @@ private activateItem(); |
import { Directive, ElementRef, Input, Renderer2 } from '@angular/core'; | ||
import { NavigationService } from './navigation/navigation.service'; | ||
import { SelectionService } from './selection/selection.service'; | ||
import { FocusStateService } from './focus-state.service'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
@@ -16,4 +17,5 @@ import { IndexBuilderService } from './index-builder.service'; | ||
var TreeViewItemDirective = (function () { | ||
function TreeViewItemDirective(element, expandService, navigationService, selectionService, lookupService, renderer, ib) { | ||
function TreeViewItemDirective(element, focusService, expandService, navigationService, selectionService, lookupService, renderer, ib) { | ||
this.element = element; | ||
this.focusService = focusService; | ||
this.expandService = expandService; | ||
@@ -84,2 +86,3 @@ this.navigationService = navigationService; | ||
this.isInitialized = true; | ||
this.initEvents(); | ||
this.setAttribute('role', 'treeitem'); | ||
@@ -104,4 +107,3 @@ this.setAriaAttributes(); | ||
this.navigationService.unregisterItem(this.index); | ||
this.subscriptions.map(function (s) { return s.unsubscribe(); }); | ||
this.subscriptions = []; | ||
this.subscriptions = this.subscriptions.reduce(function (list, callback) { return (callback.unsubscribe(), list); }, []); | ||
}; | ||
@@ -127,2 +129,11 @@ TreeViewItemDirective.prototype.subscribe = function () { | ||
}; | ||
TreeViewItemDirective.prototype.initEvents = function () { | ||
var _this = this; | ||
['focusin', 'focusout', 'focus', 'blur'].forEach(function (name) { | ||
_this.subscriptions.push(_this.listen(name, function () { return _this.focusService[name](_this.index); })); | ||
}); | ||
}; | ||
TreeViewItemDirective.prototype.listen = function (eventName, callback) { | ||
return { unsubscribe: this.renderer.listen(this.element.nativeElement, eventName, callback) }; | ||
}; | ||
TreeViewItemDirective.prototype.registerNavigationItem = function () { | ||
@@ -214,2 +225,3 @@ if (this.isDisabled) { | ||
{ type: ElementRef, }, | ||
{ type: FocusStateService, }, | ||
{ type: ExpandStateService, }, | ||
@@ -216,0 +228,0 @@ { type: NavigationService, }, |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"registerNavigationItem":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"disableNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"setDisabledClass":[{"__symbolic":"method"}],"setClass":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"registerNavigationItem":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"disableNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"setDisabledClass":[{"__symbolic":"method"}],"setClass":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"initEvents":[{"__symbolic":"method"}],"listen":[{"__symbolic":"method"}],"registerNavigationItem":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"disableNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"setDisabledClass":[{"__symbolic":"method"}],"setClass":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"initEvents":[{"__symbolic":"method"}],"listen":[{"__symbolic":"method"}],"registerNavigationItem":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"disableNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"setDisabledClass":[{"__symbolic":"method"}],"setClass":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}}] |
import { ElementRef, EventEmitter, OnChanges, OnInit, OnDestroy } from '@angular/core'; | ||
import { NodeTemplateDirective } from './node-template.directive'; | ||
import { FocusStateService } from './focus-state.service'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
@@ -13,2 +14,3 @@ import { NavigationService } from './navigation/navigation.service'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import 'rxjs/add/operator/auditTime'; | ||
/** | ||
@@ -59,2 +61,3 @@ * Represents the Kendo UI TreeView component for Angular. | ||
export declare class TreeViewComponent implements OnChanges, OnInit, OnDestroy { | ||
protected focusService: FocusStateService; | ||
protected expandService: ExpandStateService; | ||
@@ -160,12 +163,4 @@ protected navigationService: NavigationService; | ||
*/ | ||
handleFocusin({target}: any): void; | ||
/** | ||
* @hidden | ||
*/ | ||
handleClick({target}: any): void; | ||
/** | ||
* @hidden | ||
*/ | ||
handleFocusout({target}: any): void; | ||
constructor(expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, treeViewLookupService: TreeViewLookupService, element: ElementRef); | ||
constructor(focusService: FocusStateService, expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, treeViewLookupService: TreeViewLookupService, element: ElementRef); | ||
ngOnChanges(_: any): void; | ||
@@ -210,3 +205,4 @@ ngOnDestroy(): void; | ||
focus(index?: string): void; | ||
private activateAndEmit(index); | ||
private focusin(index); | ||
private focusout(index); | ||
} |
import { ChangeDetectionStrategy, Component, ElementRef, HostBinding, HostListener, Input, ContentChild, Output, EventEmitter } from '@angular/core'; | ||
import { NodeTemplateDirective } from './node-template.directive'; | ||
import { FocusStateService } from './focus-state.service'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
@@ -9,3 +10,3 @@ import { IndexBuilderService } from './index-builder.service'; | ||
import { TreeViewLookupService } from './treeview-lookup.service'; | ||
import { closestNode, focusableNode, isDocumentAvailable, hasActiveNode, nodeId } from './utils'; | ||
import { closestNode, focusableNode, isDocumentAvailable, nodeId } from './utils'; | ||
import { hasChildren, isChecked, isDisabled, isExpanded, isSelected } from './default-callbacks'; | ||
@@ -15,4 +16,6 @@ import { Subscription } from 'rxjs/Subscription'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import 'rxjs/add/operator/auditTime'; | ||
var isExpandIcon = function (target) { return (/k-i-collapse|k-i-expand/.test(target.className)); }; | ||
var providers = [ | ||
FocusStateService, | ||
ExpandStateService, | ||
@@ -70,3 +73,4 @@ IndexBuilderService, | ||
var TreeViewComponent = (function () { | ||
function TreeViewComponent(expandService, navigationService, selectionService, treeViewLookupService, element) { | ||
function TreeViewComponent(focusService, expandService, navigationService, selectionService, treeViewLookupService, element) { | ||
this.focusService = focusService; | ||
this.expandService = expandService; | ||
@@ -161,2 +165,3 @@ this.navigationService = navigationService; | ||
this._hasChildren = callback; | ||
this.expandIcons = Boolean(this._isExpanded && this._hasChildren); | ||
}, | ||
@@ -175,2 +180,3 @@ enumerable: true, | ||
this._isChecked = callback; | ||
this.checkboxes = Boolean(this._isChecked); | ||
}, | ||
@@ -189,2 +195,3 @@ enumerable: true, | ||
this._isExpanded = callback; | ||
this.expandIcons = Boolean(this._isExpanded && this._hasChildren); | ||
}, | ||
@@ -211,3 +218,3 @@ enumerable: true, | ||
TreeViewComponent.prototype.handleKeydown = function (args) { | ||
if (!this.isActive || !hasActiveNode(args.target)) { | ||
if (!this.isActive) { | ||
return; | ||
@@ -220,43 +227,14 @@ } | ||
*/ | ||
TreeViewComponent.prototype.handleFocusin = function (_a) { | ||
var target = _a.target; | ||
var node = closestNode(target); | ||
if (!hasActiveNode(target, node)) { | ||
return; | ||
} | ||
this.activateAndEmit(nodeId(node)); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleClick = function (_a) { | ||
var target = _a.target; | ||
var node = closestNode(target); | ||
var index = nodeId(node); | ||
if (!hasActiveNode(target, node) || !index) { | ||
var index = nodeId(closestNode(target)); | ||
if (!index || this.focusService.hasActiveContent()) { | ||
return; | ||
} | ||
this.activateAndEmit(index); | ||
if (!isExpandIcon(target)) { | ||
this.focusin(index); | ||
if (this.isActive && !isExpandIcon(target)) { | ||
this.navigationService.selectIndex(index); | ||
} | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleFocusout = function (_a) { | ||
var _this = this; | ||
var target = _a.target; | ||
var index = target.getAttribute('data-treeindex'); | ||
this.resolvedPromise.then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.navigationService.deactivate(); | ||
_this.isActive = false; | ||
_this.onBlur.emit(); | ||
} | ||
}); | ||
}; | ||
TreeViewComponent.prototype.ngOnChanges = function (_) { | ||
this.checkboxes = Boolean(this._isChecked); | ||
this.expandIcons = Boolean(this._isExpanded && this._hasChildren); | ||
this.navigationService.navigable = Boolean(this.navigable); | ||
@@ -269,2 +247,10 @@ }; | ||
var _this = this; | ||
this.subscriptions.add(this.focusService.changes | ||
.auditTime(1) | ||
.subscribe(function (_a) { | ||
var focused = _a.focused, index = _a.index; | ||
return focused | ||
? _this.focusin(index) | ||
: _this.focusout(index); | ||
})); | ||
this.subscriptions.add(this.expandService.changes | ||
@@ -330,3 +316,3 @@ .subscribe(function (_a) { | ||
}; | ||
TreeViewComponent.prototype.activateAndEmit = function (index) { | ||
TreeViewComponent.prototype.focusin = function (index) { | ||
var _this = this; | ||
@@ -338,3 +324,3 @@ if (!index) { | ||
this.resolvedPromise.then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
if (!_this.isActive && _this.navigationService.isActive(index)) { | ||
_this.isActive = true; | ||
@@ -345,2 +331,12 @@ _this.onFocus.emit(); | ||
}; | ||
TreeViewComponent.prototype.focusout = function (index) { | ||
var _this = this; | ||
this.resolvedPromise.then(function () { | ||
if (_this.isActive && _this.navigationService.isActive(index)) { | ||
_this.navigationService.deactivate(); | ||
_this.isActive = false; | ||
_this.onBlur.emit(); | ||
} | ||
}); | ||
}; | ||
TreeViewComponent.decorators = [ | ||
@@ -357,2 +353,3 @@ { type: Component, args: [{ | ||
TreeViewComponent.ctorParameters = function () { return [ | ||
{ type: FocusStateService, }, | ||
{ type: ExpandStateService, }, | ||
@@ -384,5 +381,3 @@ { type: NavigationService, }, | ||
'handleKeydown': [{ type: HostListener, args: ['keydown', ['$event'],] },], | ||
'handleFocusin': [{ type: HostListener, args: ['focusin', ['$event'],] },], | ||
'handleClick': [{ type: HostListener, args: ['click', ['$event'],] },], | ||
'handleFocusout': [{ type: HostListener, args: ['focusout', ['$event'],] },], | ||
'children': [{ type: Input },], | ||
@@ -389,0 +384,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"activateAndEmit":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"activateAndEmit":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":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":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"focusin":[{"__symbolic":"method"}],"focusout":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"focusin":[{"__symbolic":"method"}],"focusout":[{"__symbolic":"method"}]}}}}] |
@@ -39,3 +39,2 @@ "use strict"; | ||
this.subscriptions.add(Observable_1.Observable.merge(this.treeView.expand.map(function (e) { return (tslib_1.__assign({ expand: true }, e)); }), this.treeView.collapse.map(function (e) { return (tslib_1.__assign({ expand: false }, e)); })).subscribe(this.toggleExpand.bind(this))); | ||
this.treeView.expandIcons = true; | ||
this.treeView.isExpanded = function (dataItem, index) { | ||
@@ -42,0 +41,0 @@ return _this.expandedKeys.indexOf(_this.itemKey({ dataItem: dataItem, index: index })) > -1; |
import { ElementRef, OnChanges, OnDestroy, OnInit, Renderer2 } from '@angular/core'; | ||
import { NavigationService } from './navigation/navigation.service'; | ||
import { SelectionService } from './selection/selection.service'; | ||
import { FocusStateService } from './focus-state.service'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
@@ -17,2 +18,3 @@ import { IndexBuilderService } from './index-builder.service'; | ||
private element; | ||
private focusService; | ||
private expandService; | ||
@@ -39,3 +41,3 @@ private navigationService; | ||
private subscriptions; | ||
constructor(element: ElementRef, expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, lookupService: TreeViewLookupService, renderer: Renderer2, ib: IndexBuilderService); | ||
constructor(element: ElementRef, focusService: FocusStateService, expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, lookupService: TreeViewLookupService, renderer: Renderer2, ib: IndexBuilderService); | ||
ngOnInit(): void; | ||
@@ -45,2 +47,4 @@ ngOnChanges(changes: any): void; | ||
subscribe(): void; | ||
private initEvents(); | ||
private listen(eventName, callback); | ||
private registerNavigationItem(); | ||
@@ -47,0 +51,0 @@ private activateItem(); |
@@ -6,2 +6,3 @@ "use strict"; | ||
var selection_service_1 = require("./selection/selection.service"); | ||
var focus_state_service_1 = require("./focus-state.service"); | ||
var expand_state_service_1 = require("./expand-state.service"); | ||
@@ -19,4 +20,5 @@ var index_builder_service_1 = require("./index-builder.service"); | ||
var TreeViewItemDirective = (function () { | ||
function TreeViewItemDirective(element, expandService, navigationService, selectionService, lookupService, renderer, ib) { | ||
function TreeViewItemDirective(element, focusService, expandService, navigationService, selectionService, lookupService, renderer, ib) { | ||
this.element = element; | ||
this.focusService = focusService; | ||
this.expandService = expandService; | ||
@@ -87,2 +89,3 @@ this.navigationService = navigationService; | ||
this.isInitialized = true; | ||
this.initEvents(); | ||
this.setAttribute('role', 'treeitem'); | ||
@@ -107,4 +110,3 @@ this.setAriaAttributes(); | ||
this.navigationService.unregisterItem(this.index); | ||
this.subscriptions.map(function (s) { return s.unsubscribe(); }); | ||
this.subscriptions = []; | ||
this.subscriptions = this.subscriptions.reduce(function (list, callback) { return (callback.unsubscribe(), list); }, []); | ||
}; | ||
@@ -130,2 +132,11 @@ TreeViewItemDirective.prototype.subscribe = function () { | ||
}; | ||
TreeViewItemDirective.prototype.initEvents = function () { | ||
var _this = this; | ||
['focusin', 'focusout', 'focus', 'blur'].forEach(function (name) { | ||
_this.subscriptions.push(_this.listen(name, function () { return _this.focusService[name](_this.index); })); | ||
}); | ||
}; | ||
TreeViewItemDirective.prototype.listen = function (eventName, callback) { | ||
return { unsubscribe: this.renderer.listen(this.element.nativeElement, eventName, callback) }; | ||
}; | ||
TreeViewItemDirective.prototype.registerNavigationItem = function () { | ||
@@ -217,2 +228,3 @@ if (this.isDisabled) { | ||
{ type: core_1.ElementRef, }, | ||
{ type: focus_state_service_1.FocusStateService, }, | ||
{ type: expand_state_service_1.ExpandStateService, }, | ||
@@ -219,0 +231,0 @@ { type: navigation_service_1.NavigationService, }, |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"registerNavigationItem":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"disableNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"setDisabledClass":[{"__symbolic":"method"}],"setClass":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"registerNavigationItem":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"disableNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"setDisabledClass":[{"__symbolic":"method"}],"setClass":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"initEvents":[{"__symbolic":"method"}],"listen":[{"__symbolic":"method"}],"registerNavigationItem":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"disableNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"setDisabledClass":[{"__symbolic":"method"}],"setClass":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTreeViewItem]"}]}],"members":{"dataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"index":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentDataItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"parentIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"initEvents":[{"__symbolic":"method"}],"listen":[{"__symbolic":"method"}],"registerNavigationItem":[{"__symbolic":"method"}],"activateItem":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}],"focusItem":[{"__symbolic":"method"}],"moveLookupItem":[{"__symbolic":"method"}],"moveNavigationItem":[{"__symbolic":"method"}],"disableNavigationItem":[{"__symbolic":"method"}],"setAriaAttributes":[{"__symbolic":"method"}],"setDisabledClass":[{"__symbolic":"method"}],"setClass":[{"__symbolic":"method"}],"updateTabIndex":[{"__symbolic":"method"}],"setAttribute":[{"__symbolic":"method"}]}}}}] |
import { ElementRef, EventEmitter, OnChanges, OnInit, OnDestroy } from '@angular/core'; | ||
import { NodeTemplateDirective } from './node-template.directive'; | ||
import { FocusStateService } from './focus-state.service'; | ||
import { ExpandStateService } from './expand-state.service'; | ||
@@ -13,2 +14,3 @@ import { NavigationService } from './navigation/navigation.service'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import 'rxjs/add/operator/auditTime'; | ||
/** | ||
@@ -59,2 +61,3 @@ * Represents the Kendo UI TreeView component for Angular. | ||
export declare class TreeViewComponent implements OnChanges, OnInit, OnDestroy { | ||
protected focusService: FocusStateService; | ||
protected expandService: ExpandStateService; | ||
@@ -160,12 +163,4 @@ protected navigationService: NavigationService; | ||
*/ | ||
handleFocusin({target}: any): void; | ||
/** | ||
* @hidden | ||
*/ | ||
handleClick({target}: any): void; | ||
/** | ||
* @hidden | ||
*/ | ||
handleFocusout({target}: any): void; | ||
constructor(expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, treeViewLookupService: TreeViewLookupService, element: ElementRef); | ||
constructor(focusService: FocusStateService, expandService: ExpandStateService, navigationService: NavigationService, selectionService: SelectionService, treeViewLookupService: TreeViewLookupService, element: ElementRef); | ||
ngOnChanges(_: any): void; | ||
@@ -210,3 +205,4 @@ ngOnDestroy(): void; | ||
focus(index?: string): void; | ||
private activateAndEmit(index); | ||
private focusin(index); | ||
private focusout(index); | ||
} |
@@ -5,2 +5,3 @@ "use strict"; | ||
var node_template_directive_1 = require("./node-template.directive"); | ||
var focus_state_service_1 = require("./focus-state.service"); | ||
var expand_state_service_1 = require("./expand-state.service"); | ||
@@ -17,4 +18,6 @@ var index_builder_service_1 = require("./index-builder.service"); | ||
var Observable_1 = require("rxjs/Observable"); | ||
require("rxjs/add/operator/auditTime"); | ||
var isExpandIcon = function (target) { return (/k-i-collapse|k-i-expand/.test(target.className)); }; | ||
var providers = [ | ||
focus_state_service_1.FocusStateService, | ||
expand_state_service_1.ExpandStateService, | ||
@@ -72,3 +75,4 @@ index_builder_service_1.IndexBuilderService, | ||
var TreeViewComponent = (function () { | ||
function TreeViewComponent(expandService, navigationService, selectionService, treeViewLookupService, element) { | ||
function TreeViewComponent(focusService, expandService, navigationService, selectionService, treeViewLookupService, element) { | ||
this.focusService = focusService; | ||
this.expandService = expandService; | ||
@@ -163,2 +167,3 @@ this.navigationService = navigationService; | ||
this._hasChildren = callback; | ||
this.expandIcons = Boolean(this._isExpanded && this._hasChildren); | ||
}, | ||
@@ -177,2 +182,3 @@ enumerable: true, | ||
this._isChecked = callback; | ||
this.checkboxes = Boolean(this._isChecked); | ||
}, | ||
@@ -191,2 +197,3 @@ enumerable: true, | ||
this._isExpanded = callback; | ||
this.expandIcons = Boolean(this._isExpanded && this._hasChildren); | ||
}, | ||
@@ -213,3 +220,3 @@ enumerable: true, | ||
TreeViewComponent.prototype.handleKeydown = function (args) { | ||
if (!this.isActive || !utils_1.hasActiveNode(args.target)) { | ||
if (!this.isActive) { | ||
return; | ||
@@ -222,43 +229,14 @@ } | ||
*/ | ||
TreeViewComponent.prototype.handleFocusin = function (_a) { | ||
var target = _a.target; | ||
var node = utils_1.closestNode(target); | ||
if (!utils_1.hasActiveNode(target, node)) { | ||
return; | ||
} | ||
this.activateAndEmit(utils_1.nodeId(node)); | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleClick = function (_a) { | ||
var target = _a.target; | ||
var node = utils_1.closestNode(target); | ||
var index = utils_1.nodeId(node); | ||
if (!utils_1.hasActiveNode(target, node) || !index) { | ||
var index = utils_1.nodeId(utils_1.closestNode(target)); | ||
if (!index || this.focusService.hasActiveContent()) { | ||
return; | ||
} | ||
this.activateAndEmit(index); | ||
if (!isExpandIcon(target)) { | ||
this.focusin(index); | ||
if (this.isActive && !isExpandIcon(target)) { | ||
this.navigationService.selectIndex(index); | ||
} | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
TreeViewComponent.prototype.handleFocusout = function (_a) { | ||
var _this = this; | ||
var target = _a.target; | ||
var index = target.getAttribute('data-treeindex'); | ||
this.resolvedPromise.then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
_this.navigationService.deactivate(); | ||
_this.isActive = false; | ||
_this.onBlur.emit(); | ||
} | ||
}); | ||
}; | ||
TreeViewComponent.prototype.ngOnChanges = function (_) { | ||
this.checkboxes = Boolean(this._isChecked); | ||
this.expandIcons = Boolean(this._isExpanded && this._hasChildren); | ||
this.navigationService.navigable = Boolean(this.navigable); | ||
@@ -271,2 +249,10 @@ }; | ||
var _this = this; | ||
this.subscriptions.add(this.focusService.changes | ||
.auditTime(1) | ||
.subscribe(function (_a) { | ||
var focused = _a.focused, index = _a.index; | ||
return focused | ||
? _this.focusin(index) | ||
: _this.focusout(index); | ||
})); | ||
this.subscriptions.add(this.expandService.changes | ||
@@ -332,3 +318,3 @@ .subscribe(function (_a) { | ||
}; | ||
TreeViewComponent.prototype.activateAndEmit = function (index) { | ||
TreeViewComponent.prototype.focusin = function (index) { | ||
var _this = this; | ||
@@ -340,3 +326,3 @@ if (!index) { | ||
this.resolvedPromise.then(function () { | ||
if (_this.navigationService.isActive(index)) { | ||
if (!_this.isActive && _this.navigationService.isActive(index)) { | ||
_this.isActive = true; | ||
@@ -347,2 +333,12 @@ _this.onFocus.emit(); | ||
}; | ||
TreeViewComponent.prototype.focusout = function (index) { | ||
var _this = this; | ||
this.resolvedPromise.then(function () { | ||
if (_this.isActive && _this.navigationService.isActive(index)) { | ||
_this.navigationService.deactivate(); | ||
_this.isActive = false; | ||
_this.onBlur.emit(); | ||
} | ||
}); | ||
}; | ||
TreeViewComponent.decorators = [ | ||
@@ -359,2 +355,3 @@ { type: core_1.Component, args: [{ | ||
TreeViewComponent.ctorParameters = function () { return [ | ||
{ type: focus_state_service_1.FocusStateService, }, | ||
{ type: expand_state_service_1.ExpandStateService, }, | ||
@@ -386,5 +383,3 @@ { type: navigation_service_1.NavigationService, }, | ||
'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'],] },], | ||
'children': [{ type: core_1.Input },], | ||
@@ -391,0 +386,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"activateAndEmit":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleFocusin":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusin",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"handleFocusout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["focusout",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"activateAndEmit":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":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":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"focusin":[{"__symbolic":"method"}],"focusout":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"TreeViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"exportAs":"kendoTreeView","providers":[{"__symbolic":"reference","module":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./index-builder.service","name":"IndexBuilderService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"./loading-notification.service","name":"LoadingNotificationService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"}],"selector":"kendo-treeview","template":"\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [nodeTemplateRef]=\"nodeTemplate?.templateRef\"\n [nodes]=\"data\"\n [textField]=\"textField\"\n >\n </ul>\n "}]}],"members":{"classNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-widget"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-treeview"]}]}],"role":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.role"]}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["@.disabled"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"expand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"collapse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"checkedChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"nodeTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","module":"./node-template.directive","name":"NodeTemplateDirective"}]}]}],"nodes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textField":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"hasChildren":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isChecked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isExpanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"navigable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"handleKeydown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./focus-state.service","name":"FocusStateService"},{"__symbolic":"reference","module":"./expand-state.service","name":"ExpandStateService"},{"__symbolic":"reference","module":"./navigation/navigation.service","name":"NavigationService"},{"__symbolic":"reference","module":"./selection/selection.service","name":"SelectionService"},{"__symbolic":"reference","module":"./treeview-lookup.service","name":"TreeViewLookupService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"children":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"blur":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"focusin":[{"__symbolic":"method"}],"focusout":[{"__symbolic":"method"}]}}}}] |
@@ -6,3 +6,3 @@ { | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
"version": "1.0.1", | ||
"version": "1.1.0-dev.201801190920", | ||
"main": "dist/npm/main.js", | ||
@@ -9,0 +9,0 @@ "module": "dist/es/main.js", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
236
7805
509334
3