@progress/kendo-angular-treeview 7.0.0-next.202204080806 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kendo-angular-treeview.umd.js +1 -1
- package/drag-and-drop/models/treeitem-drag-event.d.ts +2 -0
- package/esm2015/drag-and-drop/drag-and-drop-utils.js +1 -1
- package/esm2015/drag-and-drop/drag-and-drop.directive.js +1 -1
- package/esm2015/drag-and-drop/models/treeitem-drag-event.js +2 -0
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/treeview-group.component.js +24 -3
- package/fesm2015/kendo-angular-treeview.js +29 -6
- package/package.json +9 -11
- package/schematics/ngAdd/index.js +2 -2
- package/treeview-group.component.d.ts +4 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-angular-common"),require("@progress/kendo-angular-l10n"),require("rxjs"),require("@progress/kendo-licensing"),require("@progress/kendo-common"),require("@progress/kendo-angular-inputs"),require("@angular/animations"),require("rxjs/operators"),require("@angular/common"),require("@telerik/kendo-draggable")):"function"==typeof define&&define.amd?define("KendoAngularTreeview",["exports","@angular/core","@progress/kendo-angular-common","@progress/kendo-angular-l10n","rxjs","@progress/kendo-licensing","@progress/kendo-common","@progress/kendo-angular-inputs","@angular/animations","rxjs/operators","@angular/common","@telerik/kendo-draggable"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularTreeview={},e.ng.core,e.KendoAngularCommon,e.KendoAngularL10N,e.rxjs,e.KendoLicensing,e.KendoCommon,e.KendoAngularInputs,e.ng.animations,e.rxjs.operators,e.ng.common,e.Draggable)}(this,function(l,h,p,e,u,A,g,P,t,r,j,n){"use strict";function z(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function K(n){if(n&&n.__esModule)return n;var i=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),i.default=n,Object.freeze(i)}var i=K(h),L=K(e),o=K(P),s=K(j),_=z(n),H={name:"@progress/kendo-angular-treeview",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649405026,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"},G=(Z.prototype.notify=function(){this.changes.emit()},Z);function Z(){this.changes=new h.EventEmitter}function q(){return!1}function X(){return"none"}function U(){return!1}function Y(){return!0}function $(){return!1}function Q(){return!0}function W(e,t){return t}J.prototype.expand=function(e,t){this.changes.next({dataItem:t,index:e,expand:!0})},J.prototype.collapse=function(e,t){this.changes.next({dataItem:t,index:e,expand:!1})};var a=J;function J(){this.changes=new u.Subject}a.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:a,deps:[],target:i.ɵɵFactoryTarget.Injectable}),a.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:a}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:a,decorators:[{type:h.Injectable}]});ee.prototype.nodeIndex=function(e,t){return""+(t=void 0===t?"":t)+(t?this.INDEX_SEPARATOR:"")+(e=void 0===e?"":e)},ee.prototype.indexForLevel=function(e,t){return e.split(this.INDEX_SEPARATOR).slice(0,t).join(this.INDEX_SEPARATOR)},ee.prototype.lastLevelIndex=function(e){e=(e=void 0===e?"":e).split(this.INDEX_SEPARATOR);return e.length?parseInt(e[e.length-1],10):NaN},ee.prototype.level=function(e){return e.split(this.INDEX_SEPARATOR).length};var d=ee;function ee(){this.INDEX_SEPARATOR="_"}d.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:d,deps:[],target:i.ɵɵFactoryTarget.Injectable}),d.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:d}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:d,decorators:[{type:h.Injectable}]});ne.prototype.notifyLoaded=function(e){this.changes.next(e)};var te=ne;function ne(){this.changes=new u.Subject}te.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:te,deps:[],target:i.ɵɵFactoryTarget.Injectable}),te.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:te}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:te,decorators:[{type:h.Injectable}]});function ie(e,t){if(!document.documentElement.contains(e))return null;for(var n=e;null!==n&&1===n.nodeType;){if(Te(n,t))return n;n=n.parentElement||n.parentNode}return null}function oe(){}function re(e){return null==e}function se(e){return Array.isArray(e)}function ae(e){return"boolean"==typeof e}function de(e){var t="li.k-treeview-item";return p.isDocumentAvailable()?e.closest?e.closest(t):ie(e,t):null}function ce(e){var t,n,i;return!!e.tagName&&(t=e.tagName.toLowerCase(),n="-1"===(i=e.getAttribute("tabIndex")),i=null!==i&&!n,we.test(t)?!e.disabled&&!n:i)}function le(e){if(p.isDocumentAvailable()){for(var t=e;t&&!Te(t,".k-treeview-leaf:not(.k-treeview-load-more-button),.k-treeview-item,.k-treeview");)t=t.parentNode;return t?Te(t,".k-treeview-leaf:not(.k-treeview-load-more-button)"):void 0}}function pe(e){return m(ie(e,".k-treeview-leaf.k-treeview-load-more-button"))}function he(e,t){return Boolean(function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}(e,function(e){return e===t}))}function ue(e){return e.nativeElement.querySelector('li[tabindex="0"]')}function ge(e){return e?e.getAttribute("data-treeindex"):""}function me(e){return(e||{}).index}function fe(e,t){return!m(e)&&!m(t)||m(e)&&m(t)&&e.item.dataItem===t.item.dataItem}function c(e){return m(e)?e.item.dataItem:e}function ye(e){return e&&Array.isArray(e)&&0!==e.length}function ve(e,r,t,s,a){var d=t.operator,c=t.ignoreCase,l=t.mode,p=(void 0===a&&(a=0),"string"==typeof s?s:s[a]);e.forEach(function(e){var n,i,o,t=("string"==typeof d?(n=p,i=d,o=c,function(e,t){return Me(Ee[i],o)(g.getter(n)(e),t)}):d)(e.dataItem,r);e.isMatch=t,e.visible=t,e.containsMatches=!1,t&&Ve(e.parent),e.children&&0<e.children.length&&("strict"!==l&&t?Oe(e.children):ve(e.children,r,{operator:d,ignoreCase:c,mode:l},s,a+1))})}function be(e,t){return[e,t].filter(function(e){return m(e)}).join("_")}function Ie(e,t){if(!m(e)||0===e.children.length)return[];var n=e.children;return(n=m(t)?n.filter(t):n).forEach(function(e){return n=n.concat(Ie(e,t))}),n}function xe(e,t){return e.size===t.size&&Array.from(e).every(function(e){return t.has(e)})}function De(e,t){return{small:"k-"+e+"-sm",medium:"k-"+e+"-md",large:"k-"+e+"-lg"}[t]}function ke(e){return e||{}}function Ce(e){return(e||{}).children||[]}function Se(e){if(!Array.isArray(e)||0===e.length)return null;for(var t=e.length-1;0<=t;--t){var n=e[t];if(n.visible)return n}return null}var we=/^(?:a|input|select|option|textarea|button|object)$/i,Te=function(e,t){var n=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return!!n&&n.call(e,t)},m=function(e){return null!=e},Ve=function(e){m(e)&&(e.containsMatches=!0,e.visible=!0,m(e.parent)&&!e.parent.containsMatches&&Ve(e.parent))},Oe=function(e){e.forEach(function(e){e.visible=!0,e.children&&Oe(e.children)})},Ee={contains:function(e,t){return 0<=e.indexOf(t)},doesnotcontain:function(e,t){return-1===e.indexOf(t)},startswith:function(e,t){return 0===e.lastIndexOf(t,0)},doesnotstartwith:function(e,t){return-1===e.lastIndexOf(t,0)},endswith:function(e,t){return 0<=e.indexOf(t,e.length-t.length)},doesnotendwith:function(e,t){return e.indexOf(t,e.length-t.length)<0}},Me=function(n,i){return function(e,t){return i?n(e.toLowerCase(),t.toLowerCase()):n(e,t)}},Ne=(f.prototype.firstVisibleNode=function(){return(this.nodes||[]).find(function(e){return e.visible})},f.prototype.lastVisibleNode=function(){for(var e=Se(this.nodes);m(e)&&0<Ce(e).length;){var t=Ce(e),t=Se(t);if(!m(t))return e;e=t}return e},f.prototype.closestNode=function(e){var t=ke(this.findNode(e)).prev||this.firstVisibleNode();return(t||{}).index===e?this.visibleSibling(t,1):t},f.prototype.firstFocusableNode=function(){return this.nodes.find(function(e){return!e.disabled&&e.visible})},f.prototype.findNode=function(e){return this.find(e,this.nodes)},f.prototype.findParent=function(e){var t=this.ib.level(e)-1;return this.findNode(this.ib.indexForLevel(e,t))},f.prototype.findVisibleChild=function(e){e=this.findNode(e);return Ce(e).find(function(e){return e.visible})},f.prototype.findVisiblePrev=function(e){var e=e.index,t=this.findParent(e),n=this.ib.lastLevelIndex(e),i=this.container(t).slice(0,n).every(function(e){return!e.visible});if(0===n||i)return t;var n=this.findNode(e),o=this.visibleSibling(n,-1);if(o)for(var r=this.container(o);0<r.length&&r.some(function(e){return e.visible});)o=Se(r),r=this.container(o);return o},f.prototype.findVisibleNext=function(e){var t=this.container(e),n=t.some(function(e){return e.visible});return 0!==t.length&&n?t.find(function(e){return e.visible}):this.visibleSibling(e,1)},f.prototype.registerItem=function(e,t,n,i,o){void 0===i&&(i=!1),void 0===o&&(o=!0);var r=this.ib.level(t),s=this.findParent(t);!s&&1!==r||this.insert({id:e,children:[],index:t,parent:s,disabled:n,loadMoreButton:i,visible:o},s)},f.prototype.unregisterItem=function(e,t){t=this.find(t,this.nodes);t&&t.id===e&&(e=this.container(t.parent)).splice(e.indexOf(t),1)},f.prototype.childLevel=function(e){e=e.filter(function(e){return m(e)});return e&&e.length?this.ib.level(e[0].index):1},f.prototype.container=function(e){return e?e.children:this.nodes},f.prototype.find=function(e,t){var n=this.childLevel(t),i=this.ib.indexForLevel(e,n),n=n===this.ib.level(e),t=t.find(function(e){return e&&e.index===i});return t?n?t:this.find(e,t.children):null},f.prototype.insert=function(e,t){this.container(t).splice(this.ib.lastLevelIndex(e.index),0,e)},f.prototype.visibleSibling=function(e,t){if(!e)return null;for(var n=this.findParent(e.index),i=this.container(n),o=i.indexOf(e)+t,r=i[o];m(r);){if(r.visible)return r;r=i[o+=t]}return this.visibleSibling(n,t)},f);function f(){this.ib=new d,this.nodes=[]}Object.defineProperty(v.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"activeIndex",{get:function(){return me(this.activeItem)||null},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isActiveExpanded",{get:function(){return this.activeItem&&0<this.activeItem.children.length},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isLoadMoreButton",{get:function(){return this.activeItem&&this.activeItem.loadMoreButton},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"focusableItem",{get:function(){return this.activeItem||this.model.firstFocusableNode()},enumerable:!1,configurable:!0}),v.prototype.activate=function(e,t){void 0===t&&(t=!1),this.navigable&&e&&!this.isActive(me(e))&&(this.isFocused=!0,this.activeItem=e||this.activeItem,this.shouldScroll=t,this.notifyMove())},v.prototype.activateParent=function(e){this.activate(this.model.findParent(e))},v.prototype.activateIndex=function(e){e&&this.activate(this.model.findNode(e))},v.prototype.activateClosest=function(e){e&&me(this.focusableItem)===e&&(this.activeItem=this.model.closestNode(e),this.notifyMove())},v.prototype.activateFocusable=function(){this.activeItem||(this.activeItem=this.model.firstVisibleNode(),this.notifyMove())},v.prototype.deactivate=function(){this.navigable&&this.isFocused&&(this.isFocused=!1,this.notifyMove())},v.prototype.checkIndex=function(e){this.isDisabled(e)||this.checks.next(e)},v.prototype.selectIndex=function(e){this.isDisabled(e)||this.selects.next(e)},v.prototype.notifyLoadMore=function(e){m(e)&&this.loadMore.next(e)},v.prototype.isActive=function(e){return!!e&&(this.isFocused&&this.activeIndex===e)},v.prototype.isFocusable=function(e){return me(this.focusableItem)===e},v.prototype.isDisabled=function(e){return this.model.findNode(e).disabled},v.prototype.registerItem=function(e,t,n,i,o){void 0===i&&(i=!1),void 0===o&&(o=!0);var r=this.model.findNode(t);m(r)&&(this.model.unregisterItem(r.id,r.index),this.isActive(t)&&this.deactivate()),this.model.registerItem(e,t,n,i,o)},v.prototype.unregisterItem=function(e,t){this.isActive(t)&&this.activateParent(t),this.model.unregisterItem(e,t)},v.prototype.move=function(e){var t;!this.navigable||(t=this.actions[e.keyCode])&&(t(),e.preventDefault())},v.prototype.expand=function(e){var t=e.expand,e=e.intercept,n=me(this.activeItem);n&&!e(n)&&this.notifyExpand(t)},v.prototype.moveToParent=function(){return!this.isActiveExpanded&&(this.activate(this.model.findParent(me(this.activeItem))),!0)},v.prototype.moveToFirstVisibleChild=function(){return!!this.isActiveExpanded&&(this.activate(this.model.findVisibleChild(me(this.activeItem))),!0)},v.prototype.notifyExpand=function(e){this.expands.next(this.navigationState(e))},v.prototype.notifyMove=function(){this.moves.next(this.navigationState())},v.prototype.navigationState=function(e){return{expand:e=void 0===e?!1:e,index:this.activeIndex,isFocused:this.isFocused,shouldScroll:this.shouldScroll}},v.prototype.handleEnter=function(){this.navigable&&(this.isLoadMoreButton?this.notifyLoadMore(this.activeIndex):this.selectIndex(this.activeIndex))},v.prototype.handleSpace=function(){this.navigable&&(this.isLoadMoreButton?this.notifyLoadMore(this.activeIndex):this.checkIndex(this.activeIndex))};var y=v;function v(e){var t=this;this.localization=e,this.expands=new u.Subject,this.moves=new u.Subject,this.checks=new u.Subject,this.selects=new u.Subject,this.loadMore=new u.Subject,this.navigable=!0,this.actions=((e={})[p.Keys.ArrowUp]=function(){return t.activate(t.model.findVisiblePrev(t.focusableItem),!0)},e[p.Keys.ArrowDown]=function(){return t.activate(t.model.findVisibleNext(t.focusableItem),!0)},e[p.Keys.ArrowLeft]=function(){return!t.isLoadMoreButton&&t.expand({expand:t.localization.rtl,intercept:t.localization.rtl?t.moveToFirstVisibleChild:t.moveToParent})},e[p.Keys.ArrowRight]=function(){return!t.isLoadMoreButton&&t.expand({expand:!t.localization.rtl,intercept:t.localization.rtl?t.moveToParent:t.moveToFirstVisibleChild})},e[p.Keys.Home]=function(){return t.activate(t.model.firstVisibleNode(),!0)},e[p.Keys.End]=function(){return t.activate(t.model.lastVisibleNode(),!0)},e[p.Keys.Enter]=function(){return t.handleEnter()},e[p.Keys.Space]=function(){return t.handleSpace()},e),this.isFocused=!1,this.shouldScroll=!1,this._model=new Ne,this.moveToFirstVisibleChild=this.moveToFirstVisibleChild.bind(this),this.moveToParent=this.moveToParent.bind(this)}y.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:y,deps:[{token:L.LocalizationService}],target:i.ɵɵFactoryTarget.Injectable}),y.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:y}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:y,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:L.LocalizationService}]}});Re.prototype.childrenLoaded=function(e,t){this.changes.next({item:e,children:t})};var Fe=Re;function Re(){this.changes=new u.Subject}Fe.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Fe,deps:[],target:i.ɵɵFactoryTarget.Injectable}),Fe.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Fe}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Fe,decorators:[{type:h.Injectable}]});var n=function(e){this.templateRef=e},b=(n.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:n,deps:[{token:i.TemplateRef,optional:!0}],target:i.ɵɵFactoryTarget.Directive}),n.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:n,selector:"[kendoTreeViewNodeTemplate]",ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:n,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewNodeTemplate]"}]}],ctorParameters:function(){return[{type:i.TemplateRef,decorators:[{type:h.Optional}]}]}}),function(e){this.templateRef=e}),I=(b.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:b,deps:[{token:i.TemplateRef,optional:!0}],target:i.ɵɵFactoryTarget.Directive}),b.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:b,selector:"[kendoTreeViewLoadMoreButtonTemplate]",ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:b,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewLoadMoreButtonTemplate]"}]}],ctorParameters:function(){return[{type:i.TemplateRef,decorators:[{type:h.Optional}]}]}}),function(){}),Be=(I.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:I,deps:[],target:i.ɵɵFactoryTarget.Injectable}),I.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:I}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:I,decorators:[{type:h.Injectable}]}),function(){}),x=(Be.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Be,deps:[],target:i.ɵɵFactoryTarget.Injectable}),Be.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Be}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Be,decorators:[{type:h.Injectable}]}),Ae.prototype.isFirstSelected=function(e){return this.firstIndex===e},Ae.prototype.setFirstSelected=function(e,t){this.firstIndex===e&&!1===t?this.firstIndex=null:!this.firstIndex&&t&&(this.firstIndex=e)},Ae.prototype.select=function(e,t){this.changes.next({dataItem:t,index:e})},Ae);function Ae(){this.changes=new u.Subject}x.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:x,deps:[],target:i.ɵɵFactoryTarget.Injectable}),x.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:x}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:x,decorators:[{type:h.Injectable}]});var Pe=/\d+$/,D=(k.prototype.reset=function(){this.map.clear()},k.prototype.registerItem=function(e,t){t={children:[],item:e,parent:this.item(me(t))};this.map.set(e.index,t)},k.prototype.registerChildren=function(e,t){e=this.item(e);e&&(e.children=t)},k.prototype.unregisterItem=function(e,t){var n=this.item(e);n&&n.item.dataItem===t&&(this.map.delete(e),n.parent&&n.parent.children&&(n.parent.children=n.parent.children.filter(function(e){return e.dataItem!==t})))},k.prototype.replaceItem=function(e,t,n){t&&(this.unregisterItem(e,t.dataItem),this.registerItem(t,n),this.addToParent(t,n))},k.prototype.itemLookup=function(e){e=this.item(e);return e?{children:this.mapChildren(e.children),item:e.item,parent:e.parent}:null},k.prototype.hasItem=function(e){return this.map.has(e)},k.prototype.item=function(e){return this.map.get(e)||null},k.prototype.addToParent=function(e,t){var n;t&&(t=this.item(t.index),n=parseInt(Pe.exec(e.index)[0],10),t.children=t.children||[],t.children.splice(n,0,e))},k.prototype.mapChildren=function(e){var i=this;return(e=void 0===e?[]:e).map(function(e){var e=i.item(e.index),t=e.item,n=e.parent,e=e.children;return{children:i.mapChildren(e),item:t,parent:n}})},k);function k(){this.map=new Map}D.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:D,deps:[],target:i.ɵɵFactoryTarget.Injectable}),D.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:D}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:D,decorators:[{type:h.Injectable}]});Object.defineProperty(je.prototype,"classWrapper",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"indeterminate",{get:function(){return"indeterminate"===this.checkState},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"checked",{get:function(){return"checked"===this.checkState},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"checkBoxClasses",{get:function(){return"k-checkbox "+(this.size?De("checkbox",this.size):"")+" k-rounded-md"},enumerable:!1,configurable:!0}),je.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.element.nativeElement,"tabindex")},je.prototype.ngDoCheck=function(){this.checkState=this.isChecked(this.node,this.index)},je.prototype.handleChange=function(e){e=e.target.checked?"checked":"none";this.checkState=e,this.changeDetector.detectChanges(),this.checkStateChange.emit(e)};var C=je;function je(e,t,n){this.element=e,this.renderer=t,this.changeDetector=n,this.id="_"+p.guid(),this.tabindex=0,this.size="medium",this.checkStateChange=new h.EventEmitter,this.checkState="none"}C.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:C,deps:[{token:i.ElementRef},{token:i.Renderer2},{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Component}),C.ɵcmp=i.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"kendo-checkbox",inputs:{id:"id",isChecked:"isChecked",node:"node",index:"index",labelText:"labelText",tabindex:"tabindex",size:"size"},outputs:{checkStateChange:"checkStateChange"},host:{properties:{"class.k-checkbox-wrapper":"this.classWrapper"}},ngImport:i,template:'\n <input\n type="checkbox"\n [class]="checkBoxClasses"\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 ',isInline:!0}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:C,decorators:[{type:h.Component,args:[{selector:"kendo-checkbox",template:'\n <input\n type="checkbox"\n [class]="checkBoxClasses"\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 '}]}],ctorParameters:function(){return[{type:i.ElementRef},{type:i.Renderer2},{type:i.ChangeDetectorRef}]},propDecorators:{classWrapper:[{type:h.HostBinding,args:["class.k-checkbox-wrapper"]}],id:[{type:h.Input}],isChecked:[{type:h.Input}],node:[{type:h.Input}],index:[{type:h.Input}],labelText:[{type:h.Input}],tabindex:[{type:h.Input}],size:[{type:h.Input}],checkStateChange:[{type:h.Output}]}});function ze(e,t){return{dataItem:t,index:e}}var Ke=0,S=(Object.defineProperty(w.prototype,"isChecked",{set:function(e){this.ariaChecked="checked"===e?"true":"indeterminate"===e?"mixed":"false"},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isExpanded",{get:function(){return this._isExpanded||!1},set:function(e){this._isExpanded=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isSelected",{get:function(){return this._isSelected||!1},set:function(e){this._isSelected=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isButton",{get:function(){return"button"===this.role},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"treeItem",{get:function(){return ze(this.index,this.dataItem)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"parentTreeItem",{get:function(){return this.parentDataItem?ze(this.parentIndex,this.parentDataItem):null},enumerable:!1,configurable:!0}),w.prototype.ngOnInit=function(){this.loadOnDemand&&!this.isButton&&this.lookupService.registerItem(this.treeItem,this.parentTreeItem),this.registerNavigationItem(),this.isInitialized=!0,this.setAttribute("role",this.role),this.setAriaAttributes(),this.setDisabledClass(),this.updateTabIndex()},w.prototype.ngOnChanges=function(e){var t=e.index,n=e.isDisabled;p.anyChanged(["index","checkable","isChecked","expandable","isExpanded","selectable","isSelected"],e)&&this.setAriaAttributes(),n&&this.setDisabledClass(),this.loadOnDemand&&!this.isButton&&this.moveLookupItem(e),this.moveNavigationItem(t),p.anyChanged(["isDisabled","isVisible"],e)&&this.updateNodeAvailability()},w.prototype.ngOnDestroy=function(){this.navigationService.unregisterItem(this.id,this.index),this.loadOnDemand&&!this.isButton&&this.lookupService.unregisterItem(this.index,this.dataItem),this.subscriptions=this.subscriptions.reduce(function(e,t){return t.unsubscribe(),e},[])},w.prototype.subscribe=function(){var t=this;this.subscriptions=[this.navigationService.moves.subscribe(function(e){t.updateTabIndex(),t.focusItem(e.shouldScroll)}),this.navigationService.expands.pipe(r.filter(function(e){return e.index===t.index&&!t.isDisabled})).subscribe(function(e){e=e.expand;return t.expand(e)})]},w.prototype.registerNavigationItem=function(){this.navigationService.registerItem(this.id,this.index,this.isDisabled,this.isButton,this.isVisible),this.activateItem()},w.prototype.activateItem=function(){var e,t,n;this.isDisabled||(e=this.navigationService,t=this.selectionService,n=this.index,t.setFirstSelected(n,this.isSelected),!e.isActive(n)&&t.isFirstSelected(n)&&e.activateIndex(n))},w.prototype.expand=function(e){this.expandService[e?"expand":"collapse"](this.index,this.dataItem)},w.prototype.isFocusable=function(){return!this.isDisabled&&this.navigationService.isFocusable(this.index)},w.prototype.focusItem=function(e){void 0===e&&(e=!1),this.isInitialized&&this.navigationService.isActive(this.index)&&this.element.nativeElement.focus({preventScroll:!e})},w.prototype.moveLookupItem=function(e){var t=(e=void 0===e?{}:e).dataItem,n=e.index,i=e.parentDataItem,e=e.parentIndex;n&&n.firstChange||!t&&!n&&!i&&!e||(t=(n||{}).previousValue||this.index,this.lookupService.replaceItem(t,this.treeItem,this.parentTreeItem))},w.prototype.moveNavigationItem=function(e){var t=(e=void 0===e?{}:e).currentValue,n=e.firstChange,e=e.previousValue;!n&&m(t)&&m(e)&&(this.navigationService.unregisterItem(this.id,e),this.navigationService.registerItem(this.id,t,this.isDisabled,this.isButton))},w.prototype.updateNodeAvailability=function(){var e=this.navigationService;this.isDisabled||!this.isVisible?e.activateClosest(this.index):e.activateFocusable(),e.unregisterItem(this.id,this.index),e.registerItem(this.id,this.index,this.isDisabled,this.isButton,this.isVisible)},w.prototype.setAriaAttributes=function(){this.setAttribute("aria-level",this.ib.level(this.index).toString()),this.setAttribute("aria-expanded",this.expandable?this.isExpanded.toString():null),this.setAttribute("aria-selected",this.selectable?this.isSelected.toString():null),this.setAttribute("aria-checked",this.checkable?this.ariaChecked:null)},w.prototype.setDisabledClass=function(){this.setClass("k-disabled",this.isDisabled)},w.prototype.setClass=function(e,t){this.renderer[t?"addClass":"removeClass"](this.element.nativeElement,e)},w.prototype.updateTabIndex=function(){this.setAttribute("tabIndex",this.isFocusable()?"0":"-1")},w.prototype.setAttribute=function(e,t){m(t)?this.renderer.setAttribute(this.element.nativeElement,e,t):this.renderer.removeAttribute(this.element.nativeElement,e)},w);function w(e,t,n,i,o,r,s){this.element=e,this.expandService=t,this.navigationService=n,this.selectionService=i,this.lookupService=o,this.renderer=r,this.ib=s,this.role="treeitem",this.loadOnDemand=!0,this.isDisabled=!1,this.isVisible=!0,this.ariaChecked="false",this.id=Ke++,this.isInitialized=!1,this.subscriptions=[],this.subscribe()}S.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,deps:[{token:i.ElementRef},{token:a},{token:y},{token:x},{token:D},{token:i.Renderer2},{token:d}],target:i.ɵɵFactoryTarget.Directive}),S.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:S,selector:"[kendoTreeViewItem]",inputs:{dataItem:"dataItem",index:"index",parentDataItem:"parentDataItem",parentIndex:"parentIndex",role:"role",loadOnDemand:"loadOnDemand",checkable:"checkable",selectable:"selectable",expandable:"expandable",isChecked:"isChecked",isDisabled:"isDisabled",isVisible:"isVisible",isExpanded:"isExpanded",isSelected:"isSelected"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewItem]"}]}],ctorParameters:function(){return[{type:i.ElementRef},{type:a},{type:y},{type:x},{type:D},{type:i.Renderer2},{type:d}]},propDecorators:{dataItem:[{type:h.Input}],index:[{type:h.Input}],parentDataItem:[{type:h.Input}],parentIndex:[{type:h.Input}],role:[{type:h.Input}],loadOnDemand:[{type:h.Input}],checkable:[{type:h.Input}],selectable:[{type:h.Input}],expandable:[{type:h.Input}],isChecked:[{type:h.Input}],isDisabled:[{type:h.Input}],isVisible:[{type:h.Input}],isExpanded:[{type:h.Input}],isSelected:[{type:h.Input}]}});Object.defineProperty(_e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.cd.markForCheck()},enumerable:!1,configurable:!0}),_e.prototype.ngOnInit=function(){var t=this,n=this.loadingService.changes.pipe(r.filter(function(e){return e===t.index}));this.subscription=this.expandService.changes.pipe(r.filter(function(e){return e.index===t.index}),r.tap(function(e){!e.expand&&t.loading&&(t.loading=!1)}),r.filter(function(e){return e.expand}),r.switchMap(function(e){return u.of(e).pipe(r.delay(100),r.takeUntil(n))})).subscribe(function(){return t.loading=!0}),this.subscription.add(n.subscribe(function(){return t.loading=!1}))},_e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()};var Le=_e;function _e(e,t,n){this.expandService=e,this.loadingService=t,this.cd=n,this._loading=!1}Le.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Le,deps:[{token:a},{token:te},{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Directive}),Le.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:Le,selector:"[kendoTreeViewLoading]",inputs:{index:["kendoTreeViewLoading","index"]},host:{properties:{"class.k-i-loading":"this.loading"}},ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Le,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewLoading]"}]}],ctorParameters:function(){return[{type:a},{type:te},{type:i.ChangeDetectorRef}]},propDecorators:{loading:[{type:h.HostBinding,args:["class.k-i-loading"]}],index:[{type:h.Input,args:["kendoTreeViewLoading"]}]}});Ge.prototype.ngOnChanges=function(e){e.initialSelection&&this.updateSelectionClass(this.initialSelection),e.index&&this.updateFocusClass()},Ge.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},Ge.prototype.updateFocusClass=function(){this.render(this.navigationService.isActive(this.index),"k-focus")},Ge.prototype.updateSelectionClass=function(e){this.render(e,"k-selected")},Ge.prototype.render=function(e,t){this.renderer[e?"addClass":"removeClass"](this.element.nativeElement,t)};var He=Ge;function Ge(e,t,n,i){var o=this;this.element=e,this.navigationService=t,this.selectionService=n,this.renderer=i,this.initialSelection=!1,this.isSelected=$,this.subscriptions=new u.Subscription,this.subscriptions.add(this.navigationService.moves.subscribe(this.updateFocusClass.bind(this))),this.subscriptions.add(this.navigationService.selects.pipe(r.filter(function(e){return e===o.index})).subscribe(function(e){return o.selectionService.select(e,o.dataItem)})),this.subscriptions.add(this.selectionService.changes.subscribe(function(){o.updateSelectionClass(o.isSelected(o.dataItem,o.index))}))}He.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:He,deps:[{token:i.ElementRef},{token:y},{token:x},{token:i.Renderer2}],target:i.ɵɵFactoryTarget.Directive}),He.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:He,selector:"[kendoTreeViewItemContent]",inputs:{dataItem:"dataItem",index:"index",initialSelection:"initialSelection",isSelected:"isSelected"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:He,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewItemContent]"}]}],ctorParameters:function(){return[{type:i.ElementRef},{type:y},{type:x},{type:i.Renderer2}]},propDecorators:{dataItem:[{type:h.Input}],index:[{type:h.Input}],initialSelection:[{type:h.Input}],isSelected:[{type:h.Input}]}});Object.defineProperty(T.prototype,"moreNodesAvailable",{get:function(){return!(!m(this.loadMoreService)||0===this.data.length)&&this.pageSize<this.totalNodesCount},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"pageSize",{get:function(){return m(this.loadMoreService)?this.loadMoreService.getGroupSize(this.parentDataItem):null},set:function(e){this.loadMoreService.setGroupSize(this.parentDataItem,e)},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"data",{get:function(){var e;return m(this.pageSize)?(e=0<this.pageSize?this.pageSize:0,this._data.slice(0,e)):this._data},set:function(e){this._data=e,this.registerLoadedNodes(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"loadMoreButtonIndex",{get:function(){return this.loadMoreService?this.nodeIndex(this.data.length):null},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"totalNodesCount",{get:function(){return this.loadMoreService?this.loadMoreService.getTotalNodesCount(this.parentDataItem,this._data.length):this.data.length},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"hasTemplate",{get:function(){return m(this.nodeTemplateRef)},enumerable:!1,configurable:!0}),T.prototype.expandNode=function(e,t,n){n?this.expandService.expand(e,t):this.expandService.collapse(e,t)},T.prototype.checkNode=function(e){this.navigationService.checkIndex(e),this.navigationService.activateIndex(e)},T.prototype.nodeIndex=function(e){return this.indexBuilder.nodeIndex(e.toString(),this.parentIndex)},T.prototype.nodeText=function(e){var t=se(this.textField)?this.textField[0]:this.textField;return g.getter(t)(e)},T.prototype.ngOnDestroy=function(){m(this.nodesSubscription)&&this.nodesSubscription.unsubscribe(),m(this.loadMoreNodesSubscription)&&this.loadMoreNodesSubscription.unsubscribe(),this.singleRecordSubscriptions.unsubscribe()},T.prototype.ngOnInit=function(){var t=this;this.subscribeToNodesChange(),this.singleRecordSubscriptions.add(this.dataChangeNotification.changes.subscribe(this.subscribeToNodesChange.bind(this))),this.singleRecordSubscriptions.add(this.navigationService.loadMore.pipe(r.filter(function(e){return e===t.loadMoreButtonIndex})).subscribe(this.loadMoreNodes.bind(this)))},T.prototype.ngOnChanges=function(e){e.parentIndex&&this.loadOnDemand&&this.setNodeChildren(this.mapToTreeItem(this.data))},T.prototype.fetchChildren=function(e,t){var n=this;return this.children(e).pipe(r.catchError(function(){return n.loadingService.notifyLoaded(t),u.EMPTY}),r.tap(function(){return n.loadingService.notifyLoaded(t)}))},Object.defineProperty(T.prototype,"nextFields",{get:function(){return se(this.textField)?1<this.textField.length?this.textField.slice(1):this.textField:[this.textField]},enumerable:!1,configurable:!0}),T.prototype.loadMoreNodes=function(){m(this.loadMoreService.loadMoreNodes)?this.fetchMoreNodes():this.loadMoreLocalNodes()},T.prototype.loadMoreLocalNodes=function(){var e=this.loadMoreButtonIndex;this.pageSize+=this.loadMoreService.getInitialPageSize(this.parentDataItem),this.registerLoadedNodes(this.data),this.changeDetectorRef.detectChanges(),this.reselectItemAt(e)},T.prototype.fetchMoreNodes=function(){var n=this;this.loadingMoreNodes||(this.loadingMoreNodes=!0,m(this.loadMoreNodesSubscription)&&this.loadMoreNodesSubscription.unsubscribe(),this.loadMoreNodesSubscription=this.loadMoreService.loadMoreNodes({dataItem:this.parentDataItem,skip:this.data.length,take:this.loadMoreService.getInitialPageSize(this.parentDataItem)}).pipe(r.finalize(function(){return n.loadingMoreNodes=!1})).subscribe(function(e){var t;Array.isArray(e)&&0<e.length&&(t=n.loadMoreButtonIndex,n.pageSize+=e.length,n.data=n.data.concat(e),n.navigationService.isActive(t)&&(n.changeDetectorRef.detectChanges(),n.reselectItemAt(t)))}))},T.prototype.setNodeChildren=function(e){this.treeViewLookupService.registerChildren(this.parentIndex,e)},T.prototype.mapToTreeItem=function(e){var n=this;return this.parentIndex?e.map(function(e,t){return{dataItem:e,index:n.nodeIndex(t)}}):[]},T.prototype.emitChildrenLoaded=function(e){this.parentIndex&&(e=e.filter(function(e){return e.dataItem}),this.nodeChildrenService.childrenLoaded({dataItem:this.parentDataItem,index:this.parentIndex},e))},T.prototype.subscribeToNodesChange=function(){var t=this;this.nodesSubscription&&this.nodesSubscription.unsubscribe(),this.nodesSubscription=this.nodes(this.parentDataItem,this.parentIndex).subscribe(function(e){t.data=e,t.initialNodesLoaded=!0})},T.prototype.reselectItemAt=function(e){m(e)&&(this.navigationService.deactivate(),this.navigationService.activateIndex(e))},T.prototype.registerLoadedNodes=function(e){e=this.mapToTreeItem(e=void 0===e?[]:e);this.loadOnDemand&&this.setNodeChildren(e),this.emitChildrenLoaded(e)};var Ze=T;function T(e,t,n,i,o,r,s,a){this.expandService=e,this.loadingService=t,this.indexBuilder=n,this.treeViewLookupService=i,this.navigationService=o,this.nodeChildrenService=r,this.dataChangeNotification=s,this.changeDetectorRef=a,this.kGroupClass=!0,this.role="group",this.loadOnDemand=!0,this.textField="",this.size="medium",this.initialNodesLoaded=!1,this.loadingMoreNodes=!1,this._data=[],this.singleRecordSubscriptions=new u.Subscription,this.isChecked=function(){return"none"},this.isDisabled=function(){return!1},this.isExpanded=function(){return!1},this.isVisible=function(){return!0},this.isSelected=function(){return!1},this.children=function(){return u.of([])},this.hasChildren=function(){return!1}}Ze.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Ze,deps:[{token:a},{token:te},{token:d},{token:D},{token:y},{token:Fe},{token:G},{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Component}),Ze.ɵcmp=i.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Ze,selector:"[kendoTreeViewGroup]",inputs:{checkboxes:"checkboxes",expandIcons:"expandIcons",disabled:"disabled",selectable:"selectable",touchActions:"touchActions",loadOnDemand:"loadOnDemand",trackBy:"trackBy",nodes:"nodes",textField:"textField",parentDataItem:"parentDataItem",parentIndex:"parentIndex",nodeTemplateRef:"nodeTemplateRef",loadMoreButtonTemplateRef:"loadMoreButtonTemplateRef",loadMoreService:"loadMoreService",size:"size",isChecked:"isChecked",isDisabled:"isDisabled",isExpanded:"isExpanded",isVisible:"isVisible",isSelected:"isSelected",children:"children",hasChildren:"hasChildren"},host:{properties:{"class.k-treeview-group":"this.kGroupClass","attr.role":"this.role"}},usesOnChanges:!0,ngImport:i,template:'\n <li\n *ngFor="let node of data; let index = index; trackBy: trackBy"\n class="k-treeview-item"\n [class.k-display-none]="!isVisible(node, nodeIndex(index))"\n kendoTreeViewItem\n [attr.aria-setsize]="totalNodesCount"\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [loadOnDemand]="loadOnDemand"\n [checkable]="checkboxes"\n [isChecked]="isChecked(node, nodeIndex(index))"\n [isDisabled]="disabled || isDisabled(node, nodeIndex(index))"\n [isVisible]="isVisible(node, nodeIndex(index))"\n [expandable]="expandIcons && hasChildren(node)"\n [isExpanded]="isExpanded(node, nodeIndex(index))"\n [selectable]="selectable"\n [isSelected]="isSelected(node, nodeIndex(index))"\n [attr.data-treeindex]="nodeIndex(index)"\n >\n <div class="k-treeview-mid">\n <span\n class="k-treeview-toggle"\n [kendoTreeViewLoading]="nodeIndex(index)"\n (click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="expandIcons && hasChildren(node)"\n >\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 >\n </span>\n </span>\n <kendo-checkbox\n *ngIf="checkboxes"\n [size]="size"\n [node]="node"\n [index]="nodeIndex(index)"\n [isChecked]="isChecked"\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 [initialSelection]="isSelected(node, nodeIndex(index))"\n [isSelected]="isSelected"\n class="k-treeview-leaf"\n [style.touch-action]="touchActions ? \'\' : \'none\'"\n >\n <span class="k-treeview-leaf-text">\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef"\n [ngTemplateOutletContext]="{\n $implicit: node,\n index: nodeIndex(index)\n }"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </span>\n </div>\n <ul\n *ngIf="isExpanded(node, nodeIndex(index)) && hasChildren(node)"\n kendoTreeViewGroup\n role="group"\n [nodes]="fetchChildren"\n [loadOnDemand]="loadOnDemand"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [selectable]="selectable"\n [touchActions]="touchActions"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [disabled]="disabled || isDisabled(node, nodeIndex(index))"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [isVisible]="isVisible"\n [nodeTemplateRef]="nodeTemplateRef"\n [loadMoreButtonTemplateRef]="loadMoreButtonTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [parentDataItem]="node"\n [textField]="nextFields"\n [loadMoreService]="loadMoreService"\n [@toggle]="true"\n [trackBy]="trackBy"\n >\n </ul>\n </li>\n <li\n *ngIf="initialNodesLoaded && moreNodesAvailable"\n class="k-treeview-item"\n [class.k-treeview-load-more-checkboxes-container]="checkboxes"\n kendoTreeViewItem\n role="button"\n [selectable]="false"\n [checkable]="false"\n [expandable]="false"\n [index]="loadMoreButtonIndex"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [attr.data-treeindex]="loadMoreButtonIndex"\n >\n <div class="k-treeview-mid">\n <span\n *ngIf="loadingMoreNodes"\n class="k-icon k-i-loading k-i-expand"\n >\n </span>\n <span\n class="k-treeview-leaf k-treeview-load-more-button"\n [attr.data-treeindex]="loadMoreButtonIndex"\n kendoTreeViewItemContent\n [index]="loadMoreButtonIndex"\n >\n <span class="k-treeview-leaf-text">\n <ng-template\n *ngIf="loadMoreButtonTemplateRef"\n [ngTemplateOutlet]="loadMoreButtonTemplateRef"\n [ngTemplateOutletContext]="{\n index: loadMoreButtonIndex\n }"\n >\n </ng-template>\n <ng-container *ngIf="!loadMoreButtonTemplateRef">\n Load more\n </ng-container>\n </span>\n </span>\n </div>\n </li>\n ',isInline:!0,components:[{type:C,selector:"kendo-checkbox",inputs:["id","isChecked","node","index","labelText","tabindex","size"],outputs:["checkStateChange"]},{type:Ze,selector:"[kendoTreeViewGroup]",inputs:["checkboxes","expandIcons","disabled","selectable","touchActions","loadOnDemand","trackBy","nodes","textField","parentDataItem","parentIndex","nodeTemplateRef","loadMoreButtonTemplateRef","loadMoreService","size","isChecked","isDisabled","isExpanded","isVisible","isSelected","children","hasChildren"]}],directives:[{type:s.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:S,selector:"[kendoTreeViewItem]",inputs:["dataItem","index","parentDataItem","parentIndex","role","loadOnDemand","checkable","selectable","expandable","isChecked","isDisabled","isVisible","isExpanded","isSelected"]},{type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:Le,selector:"[kendoTreeViewLoading]",inputs:["kendoTreeViewLoading"]},{type:He,selector:"[kendoTreeViewItemContent]",inputs:["dataItem","index","initialSelection","isSelected"]},{type:s.NgSwitch,selector:"[ngSwitch]",inputs:["ngSwitch"]},{type:s.NgSwitchCase,selector:"[ngSwitchCase]",inputs:["ngSwitchCase"]},{type:s.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]},{type:s.NgSwitchDefault,selector:"[ngSwitchDefault]"}],animations:[t.trigger("toggle",[t.transition("void => *",[t.style({height:0}),t.animate("0.1s ease-in",t.style({height:"*"}))]),t.transition("* => void",[t.style({height:"*"}),t.animate("0.1s ease-in",t.style({height:0}))])])]}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Ze,decorators:[{type:h.Component,args:[{animations:[t.trigger("toggle",[t.transition("void => *",[t.style({height:0}),t.animate("0.1s ease-in",t.style({height:"*"}))]),t.transition("* => void",[t.style({height:"*"}),t.animate("0.1s ease-in",t.style({height:0}))])])],selector:"[kendoTreeViewGroup]",template:'\n <li\n *ngFor="let node of data; let index = index; trackBy: trackBy"\n class="k-treeview-item"\n [class.k-display-none]="!isVisible(node, nodeIndex(index))"\n kendoTreeViewItem\n [attr.aria-setsize]="totalNodesCount"\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [loadOnDemand]="loadOnDemand"\n [checkable]="checkboxes"\n [isChecked]="isChecked(node, nodeIndex(index))"\n [isDisabled]="disabled || isDisabled(node, nodeIndex(index))"\n [isVisible]="isVisible(node, nodeIndex(index))"\n [expandable]="expandIcons && hasChildren(node)"\n [isExpanded]="isExpanded(node, nodeIndex(index))"\n [selectable]="selectable"\n [isSelected]="isSelected(node, nodeIndex(index))"\n [attr.data-treeindex]="nodeIndex(index)"\n >\n <div class="k-treeview-mid">\n <span\n class="k-treeview-toggle"\n [kendoTreeViewLoading]="nodeIndex(index)"\n (click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="expandIcons && hasChildren(node)"\n >\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 >\n </span>\n </span>\n <kendo-checkbox\n *ngIf="checkboxes"\n [size]="size"\n [node]="node"\n [index]="nodeIndex(index)"\n [isChecked]="isChecked"\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 [initialSelection]="isSelected(node, nodeIndex(index))"\n [isSelected]="isSelected"\n class="k-treeview-leaf"\n [style.touch-action]="touchActions ? \'\' : \'none\'"\n >\n <span class="k-treeview-leaf-text">\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef"\n [ngTemplateOutletContext]="{\n $implicit: node,\n index: nodeIndex(index)\n }"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </span>\n </div>\n <ul\n *ngIf="isExpanded(node, nodeIndex(index)) && hasChildren(node)"\n kendoTreeViewGroup\n role="group"\n [nodes]="fetchChildren"\n [loadOnDemand]="loadOnDemand"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [selectable]="selectable"\n [touchActions]="touchActions"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [disabled]="disabled || isDisabled(node, nodeIndex(index))"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [isVisible]="isVisible"\n [nodeTemplateRef]="nodeTemplateRef"\n [loadMoreButtonTemplateRef]="loadMoreButtonTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [parentDataItem]="node"\n [textField]="nextFields"\n [loadMoreService]="loadMoreService"\n [@toggle]="true"\n [trackBy]="trackBy"\n >\n </ul>\n </li>\n <li\n *ngIf="initialNodesLoaded && moreNodesAvailable"\n class="k-treeview-item"\n [class.k-treeview-load-more-checkboxes-container]="checkboxes"\n kendoTreeViewItem\n role="button"\n [selectable]="false"\n [checkable]="false"\n [expandable]="false"\n [index]="loadMoreButtonIndex"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [attr.data-treeindex]="loadMoreButtonIndex"\n >\n <div class="k-treeview-mid">\n <span\n *ngIf="loadingMoreNodes"\n class="k-icon k-i-loading k-i-expand"\n >\n </span>\n <span\n class="k-treeview-leaf k-treeview-load-more-button"\n [attr.data-treeindex]="loadMoreButtonIndex"\n kendoTreeViewItemContent\n [index]="loadMoreButtonIndex"\n >\n <span class="k-treeview-leaf-text">\n <ng-template\n *ngIf="loadMoreButtonTemplateRef"\n [ngTemplateOutlet]="loadMoreButtonTemplateRef"\n [ngTemplateOutletContext]="{\n index: loadMoreButtonIndex\n }"\n >\n </ng-template>\n <ng-container *ngIf="!loadMoreButtonTemplateRef">\n Load more\n </ng-container>\n </span>\n </span>\n </div>\n </li>\n '}]}],ctorParameters:function(){return[{type:a},{type:te},{type:d},{type:D},{type:y},{type:Fe},{type:G},{type:i.ChangeDetectorRef}]},propDecorators:{kGroupClass:[{type:h.HostBinding,args:["class.k-treeview-group"]}],role:[{type:h.HostBinding,args:["attr.role"]}],checkboxes:[{type:h.Input}],expandIcons:[{type:h.Input}],disabled:[{type:h.Input}],selectable:[{type:h.Input}],touchActions:[{type:h.Input}],loadOnDemand:[{type:h.Input}],trackBy:[{type:h.Input}],nodes:[{type:h.Input}],textField:[{type:h.Input}],parentDataItem:[{type:h.Input}],parentIndex:[{type:h.Input}],nodeTemplateRef:[{type:h.Input}],loadMoreButtonTemplateRef:[{type:h.Input}],loadMoreService:[{type:h.Input}],size:[{type:h.Input}],isChecked:[{type:h.Input}],isDisabled:[{type:h.Input}],isExpanded:[{type:h.Input}],isVisible:[{type:h.Input}],isSelected:[{type:h.Input}],children:[{type:h.Input}],hasChildren:[{type:h.Input}]}});var t=[a,d,D,te,Fe,y,x,G,e.LocalizationService,{provide:e.L10N_PREFIX,useValue:"kendo.treeview"},{provide:I,useExisting:h.forwardRef(function(){return V})},{provide:Be,useExisting:h.forwardRef(function(){return V})}],V=(Object.defineProperty(O.prototype,"direction",{get:function(){return this.localization.rtl?"rtl":"ltr"},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"animate",{get:function(){return!this._animate},set:function(e){this._animate=e},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"nodeTemplateRef",{get:function(){return this._nodeTemplateRef||this.nodeTemplateQuery},set:function(e){this._nodeTemplateRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"loadMoreButtonTemplateRef",{get:function(){return this._loadMoreButtonTemplateRef||this.loadMoreButtonTemplateQuery},set:function(e){this._loadMoreButtonTemplateRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"nodes",{get:function(){return this.data.value},set:function(e){this.data.next(e||[]),this.dataChangeNotification.notify()},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"hasChildren",{get:function(){return this._hasChildren||q},set:function(e){this._hasChildren=e,this.expandIcons=Boolean(this._isExpanded&&this._hasChildren)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isChecked",{get:function(){return this._isChecked||X},set:function(e){this._isChecked=e,this.checkboxes=Boolean(this._isChecked)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isExpanded",{get:function(){return this._isExpanded||Y},set:function(e){this._isExpanded=e,this.expandIcons=Boolean(this._isExpanded&&this._hasChildren)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isSelected",{get:function(){return this._isSelected||$},set:function(e){this._isSelected=e,this.selectable=Boolean(this._isSelected)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"size",{get:function(){return this._size},set:function(e){var t=e||"medium";"none"!==this.size&&this.renderer.removeClass(this.element.nativeElement,De("treeview",this.size)),this.renderer.addClass(this.element.nativeElement,De("treeview",t)),this._size=e},enumerable:!1,configurable:!0}),O.prototype.ngOnChanges=function(e){this.navigationService.navigable=Boolean(this.navigable),p.anyChanged(["nodes","children","hasChildren","loadOnDemand"],e,!1)&&!this.loadOnDemand&&this.preloadChildNodes()},O.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe(),this.domSubscriptions.forEach(function(e){return e()})},O.prototype.ngOnInit=function(){var i=this;this.subscriptions.add(this.nodeChildrenService.changes.subscribe(function(e){return i.childrenLoaded.emit(e)})),this.subscriptions.add(this.expandService.changes.subscribe(function(e){var t=e.index,n=e.dataItem;return(e.expand?i.expand:i.collapse).emit({index:t,dataItem:n})})),this.subscriptions.add(this.navigationService.checks.subscribe(function(e){return i.checkedChange.emit(i.treeViewLookupService.itemLookup(e))})),this.subscriptions.add(this.selectionService.changes.subscribe(function(e){p.hasObservers(i.selectionChange)&&i.ngZone.run(function(){i.selectionChange.emit(e)})})),this.element&&this.ngZone.runOutsideAngular(function(){i.attachDomHandlers()}),this.size&&this.renderer.addClass(this.element.nativeElement,De("treeview",this.size))},O.prototype.blur=function(){var e;p.isDocumentAvailable()&&(e=ue(this.element),document.activeElement===e&&e.blur())},O.prototype.focus=function(e){e=e||me(this.navigationService.focusableItem),this.navigationService.activateIndex(e),e=ue(this.element);e&&e.focus()},O.prototype.itemLookup=function(e){return this.treeViewLookupService.itemLookup(e)},O.prototype.rebindChildren=function(){this.dataChangeNotification.notify()},O.prototype.expandNode=function(e,t){this.expandService.expand(t,e)},O.prototype.collapseNode=function(e,t){this.expandService.collapse(t,e)},O.prototype.getNodePageSize=function(e){return this.verifyLoadMoreService(),this.loadMoreService.getGroupSize(e)},O.prototype.setNodePageSize=function(e,t){this.verifyLoadMoreService(),this.loadMoreService.setGroupSize(e,t)},O.prototype.preloadChildNodes=function(){this.treeViewLookupService.reset(),this.registerLookupItems(this.nodes)},O.prototype.attachDomHandlers=function(){var e=this.element.nativeElement;this.clickHandler=this.clickHandler.bind(this),this.domSubscriptions.push(this.renderer.listen(e,"contextmenu",this.clickHandler),this.renderer.listen(e,"click",this.clickHandler),this.renderer.listen(e,"dblclick",this.clickHandler),this.renderer.listen(e,"focusin",this.focusHandler.bind(this)),this.renderer.listen(e,"focusout",this.blurHandler.bind(this)),this.renderer.listen(e,"keydown",this.keydownHandler.bind(this)))},O.prototype.focusHandler=function(e){var t,n=this;Te(e.target,".k-treeview-item")?t=e.target:ce(e.target)||(t=de(e.target)),t&&(this.navigationService.activateIndex(ge(e.target)),!this.isActive&&p.hasObservers(this.onFocus)&&this.ngZone.run(function(){n.onFocus.emit()}),this.isActive=!0)},O.prototype.blurHandler=function(e){var t=this;!this.isActive||!Te(e.target,".k-treeview-item")||e.relatedTarget&&Te(e.relatedTarget,".k-treeview-item")&&he(e.relatedTarget,this.element.nativeElement)||(this.navigationService.deactivate(),this.isActive=!1,p.hasObservers(this.onBlur)&&this.ngZone.run(function(){t.onBlur.emit()}))},O.prototype.clickHandler=function(t){var n,i=this,e=t.target;"contextmenu"===t.type&&!p.hasObservers(this.nodeClick)||"click"===t.type&&!p.hasObservers(this.nodeClick)&&!p.hasObservers(this.selectionChange)&&!pe(e)||"dblclick"===t.type&&!p.hasObservers(this.nodeDblClick)||ce(e)||!le(e)&&!pe(e)||!he(e,this.element.nativeElement)||(n=ge(de(e)))&&!this.navigationService.isDisabled(n)&&this.ngZone.run(function(){var e=i.treeViewLookupService.itemLookup(n);if("click"===t.type){if(i.navigationService.model.findNode(n).loadMoreButton)return void i.navigationService.notifyLoadMore(n);i.navigationService.selectIndex(n)}("dblclick"===t.type?i.nodeDblClick:i.nodeClick).emit({item:e.item,originalEvent:t,type:t.type})})},O.prototype.keydownHandler=function(e){var t=this;this.isActive&&this.navigable&&this.ngZone.run(function(){t.navigationService.move(e)})},O.prototype.verifyLoadMoreService=function(){if(h.isDevMode()&&!m(this.loadMoreService))throw new Error("To use the TreeView paging functionality, you need to assign the `kendoTreeViewLoadMore` directive. See http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/.")},O.prototype.registerLookupItems=function(e,n){var i,o=this;void 0===n&&(n=null),m(e)&&0!==e.length&&(i=me(n),e=e.map(function(e,t){return t=t,n=i,m(e=e)?{dataItem:e,index:be(n,t)}:null;var n}),m(n)&&this.treeViewLookupService.registerChildren(i,e),e.forEach(function(t){o.treeViewLookupService.registerItem(t,n),o.hasChildren(t.dataItem)&&o.children(t.dataItem).subscribe(function(e){return o.registerLookupItems(e,t)})}))},O);function O(e,t,n,i,o,r,s,a,d,c,l){var p=this;this.element=e,this.changeDetectorRef=t,this.expandService=n,this.navigationService=i,this.nodeChildrenService=o,this.selectionService=r,this.treeViewLookupService=s,this.ngZone=a,this.renderer=d,this.dataChangeNotification=c,this.localization=l,this.classNames=!0,this.role="tree",this.filterInputPlaceholder="",this.fetchNodes=function(){return p.data},this.childrenLoaded=new h.EventEmitter,this.onBlur=new h.EventEmitter,this.onFocus=new h.EventEmitter,this.expand=new h.EventEmitter,this.collapse=new h.EventEmitter,this.nodeDragStart=new h.EventEmitter,this.nodeDrag=new h.EventEmitter,this.filterStateChange=new h.EventEmitter,this.nodeDrop=new h.EventEmitter,this.nodeDragEnd=new h.EventEmitter,this.addItem=new h.EventEmitter,this.removeItem=new h.EventEmitter,this.checkedChange=new h.EventEmitter,this.selectionChange=new h.EventEmitter,this.filterChange=new h.EventEmitter,this.nodeClick=new h.EventEmitter,this.nodeDblClick=new h.EventEmitter,this.trackBy=W,this.isDisabled=U,this.isVisible=Q,this.navigable=!0,this.children=function(){return u.of([])},this.loadOnDemand=!0,this.filterable=!1,this.filter="",this.checkboxes=!1,this.expandIcons=!1,this.selectable=!1,this.touchActions=!0,this.isActive=!1,this.data=new u.BehaviorSubject([]),this._animate=!0,this._size="medium",this.subscriptions=new u.Subscription,this.domSubscriptions=[],A.validatePackage(H)}V.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:V,deps:[{token:i.ElementRef},{token:i.ChangeDetectorRef},{token:a},{token:y},{token:Fe},{token:x},{token:D},{token:i.NgZone},{token:i.Renderer2},{token:G},{token:L.LocalizationService}],target:i.ɵɵFactoryTarget.Component}),V.ɵcmp=i.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:V,selector:"kendo-treeview",inputs:{filterInputPlaceholder:"filterInputPlaceholder",animate:"animate",nodeTemplateRef:["nodeTemplate","nodeTemplateRef"],loadMoreButtonTemplateRef:["loadMoreButtonTemplate","loadMoreButtonTemplateRef"],trackBy:"trackBy",nodes:"nodes",textField:"textField",hasChildren:"hasChildren",isChecked:"isChecked",isDisabled:"isDisabled",isExpanded:"isExpanded",isSelected:"isSelected",isVisible:"isVisible",navigable:"navigable",children:"children",loadOnDemand:"loadOnDemand",filterable:"filterable",filter:"filter",size:"size"},outputs:{childrenLoaded:"childrenLoaded",onBlur:"blur",onFocus:"focus",expand:"expand",collapse:"collapse",nodeDragStart:"nodeDragStart",nodeDrag:"nodeDrag",filterStateChange:"filterStateChange",nodeDrop:"nodeDrop",nodeDragEnd:"nodeDragEnd",addItem:"addItem",removeItem:"removeItem",checkedChange:"checkedChange",selectionChange:"selectionChange",filterChange:"filterChange",nodeClick:"nodeClick",nodeDblClick:"nodeDblClick"},host:{properties:{"class.k-treeview":"this.classNames","attr.role":"this.role","attr.dir":"this.direction","@.disabled":"this.animate"}},providers:t,queries:[{propertyName:"nodeTemplateQuery",first:!0,predicate:n,descendants:!0},{propertyName:"loadMoreButtonTemplateQuery",first:!0,predicate:b,descendants:!0}],viewQueries:[{propertyName:"assetsContainer",first:!0,predicate:["assetsContainer"],descendants:!0,read:h.ViewContainerRef,static:!0}],exportAs:["kendoTreeView"],usesOnChanges:!0,ngImport:i,template:'\n <span\n class="k-treeview-filter"\n *ngIf="filterable"\n >\n <kendo-textbox\n [size]="size"\n [value]="filter"\n [clearButton]="true"\n (valueChange)="filterChange.emit($event)"\n [placeholder]="filterInputPlaceholder"\n >\n <ng-template kendoTextBoxPrefixTemplate>\n <span class="k-input-icon k-icon k-i-search"></span>\n </ng-template>\n </kendo-textbox>\n </span>\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n role="group"\n [size]="size"\n [loadOnDemand]="loadOnDemand"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [selectable]="selectable"\n [touchActions]="touchActions"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [isVisible]="isVisible"\n [nodeTemplateRef]="nodeTemplateRef?.templateRef"\n [loadMoreButtonTemplateRef]="loadMoreButtonTemplateRef?.templateRef"\n [textField]="textField"\n [nodes]="fetchNodes"\n [loadMoreService]="loadMoreService"\n [trackBy]="trackBy"\n >\n </ul>\n <ng-container #assetsContainer></ng-container>\n ',isInline:!0,components:[{type:o.TextBoxComponent,selector:"kendo-textbox",inputs:["focusableId","title","disabled","readonly","tabindex","value","selectOnFocus","showSuccessIcon","showErrorIcon","clearButton","successIcon","errorIcon","clearButtonIcon","size","rounded","fillMode","tabIndex","placeholder","maxlength"],outputs:["valueChange","inputFocus","inputBlur","focus","blur"],exportAs:["kendoTextBox"]},{type:Ze,selector:"[kendoTreeViewGroup]",inputs:["checkboxes","expandIcons","disabled","selectable","touchActions","loadOnDemand","trackBy","nodes","textField","parentDataItem","parentIndex","nodeTemplateRef","loadMoreButtonTemplateRef","loadMoreService","size","isChecked","isDisabled","isExpanded","isVisible","isSelected","children","hasChildren"]}],directives:[{type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:o.TextBoxPrefixTemplateDirective,selector:"[kendoTextBoxPrefixTemplate]"}],changeDetection:i.ChangeDetectionStrategy.Default}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:V,decorators:[{type:h.Component,args:[{changeDetection:h.ChangeDetectionStrategy.Default,exportAs:"kendoTreeView",providers:t,selector:"kendo-treeview",template:'\n <span\n class="k-treeview-filter"\n *ngIf="filterable"\n >\n <kendo-textbox\n [size]="size"\n [value]="filter"\n [clearButton]="true"\n (valueChange)="filterChange.emit($event)"\n [placeholder]="filterInputPlaceholder"\n >\n <ng-template kendoTextBoxPrefixTemplate>\n <span class="k-input-icon k-icon k-i-search"></span>\n </ng-template>\n </kendo-textbox>\n </span>\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n role="group"\n [size]="size"\n [loadOnDemand]="loadOnDemand"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [selectable]="selectable"\n [touchActions]="touchActions"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [isVisible]="isVisible"\n [nodeTemplateRef]="nodeTemplateRef?.templateRef"\n [loadMoreButtonTemplateRef]="loadMoreButtonTemplateRef?.templateRef"\n [textField]="textField"\n [nodes]="fetchNodes"\n [loadMoreService]="loadMoreService"\n [trackBy]="trackBy"\n >\n </ul>\n <ng-container #assetsContainer></ng-container>\n '}]}],ctorParameters:function(){return[{type:i.ElementRef},{type:i.ChangeDetectorRef},{type:a},{type:y},{type:Fe},{type:x},{type:D},{type:i.NgZone},{type:i.Renderer2},{type:G},{type:L.LocalizationService}]},propDecorators:{classNames:[{type:h.HostBinding,args:["class.k-treeview"]}],role:[{type:h.HostBinding,args:["attr.role"]}],direction:[{type:h.HostBinding,args:["attr.dir"]}],assetsContainer:[{type:h.ViewChild,args:["assetsContainer",{read:h.ViewContainerRef,static:!0}]}],filterInputPlaceholder:[{type:h.Input}],animate:[{type:h.Input},{type:h.HostBinding,args:["@.disabled"]}],childrenLoaded:[{type:h.Output}],onBlur:[{type:h.Output,args:["blur"]}],onFocus:[{type:h.Output,args:["focus"]}],expand:[{type:h.Output}],collapse:[{type:h.Output}],nodeDragStart:[{type:h.Output}],nodeDrag:[{type:h.Output}],filterStateChange:[{type:h.Output}],nodeDrop:[{type:h.Output}],nodeDragEnd:[{type:h.Output}],addItem:[{type:h.Output}],removeItem:[{type:h.Output}],checkedChange:[{type:h.Output}],selectionChange:[{type:h.Output}],filterChange:[{type:h.Output}],nodeClick:[{type:h.Output}],nodeDblClick:[{type:h.Output}],nodeTemplateQuery:[{type:h.ContentChild,args:[n,{static:!1}]}],nodeTemplateRef:[{type:h.Input,args:["nodeTemplate"]}],loadMoreButtonTemplateQuery:[{type:h.ContentChild,args:[b,{static:!1}]}],loadMoreButtonTemplateRef:[{type:h.Input,args:["loadMoreButtonTemplate"]}],trackBy:[{type:h.Input}],nodes:[{type:h.Input}],textField:[{type:h.Input}],hasChildren:[{type:h.Input}],isChecked:[{type:h.Input}],isDisabled:[{type:h.Input}],isExpanded:[{type:h.Input}],isSelected:[{type:h.Input}],isVisible:[{type:h.Input}],navigable:[{type:h.Input}],children:[{type:h.Input}],loadOnDemand:[{type:h.Input}],filterable:[{type:h.Input}],filter:[{type:h.Input}],size:[{type:h.Input}]}});var qe=function(e,t){return(qe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Xe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}qe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function Ue(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(i=r.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function Ye(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||((i=i||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;Object.defineProperty(E.prototype,"isChecked",{set:function(e){this.treeView.isChecked=e},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"options",{get:function(){var e={checkChildren:!0,checkParents:!0,enabled:!0,mode:"multiple"};if(!m(this.checkable)||"string"==typeof this.checkable)return e;var t=ae(this.checkable)?{enabled:this.checkable}:this.checkable;return Object.assign(e,t)},enumerable:!1,configurable:!0}),E.prototype.ngOnChanges=function(e){e.checkable&&(this.treeView.checkboxes=this.options.enabled,this.toggleCheckOnClick()),p.isChanged("checkedKeys",e,!1)&&e.checkedKeys.currentValue!==this.lastChange&&(this.state=new Set(e.checkedKeys.currentValue))},E.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe(),this.unsubscribeClick()},E.prototype.isItemChecked=function(e,t){return this.checkKey?this.state.has(this.itemKey({dataItem:e,index:t}))?"checked":"none":this.isIndexChecked(t)},E.prototype.isIndexChecked=function(e){var i,t,n=Array.from(this.state).filter((i=e,function(e){return i===e||!!e.split&&e.split("_").reduce(function(e,t){var n=e.key,e=e.result;return i===(n+=t)||e?{result:!0}:{key:n+="_",result:!1}},{key:"",result:!1}).result}));if(t=e,0<n.filter(function(e){return e===t}).length)return"checked";var e=this.options,o=e.mode,e=e.checkParents;return"multiple"===o&&e&&n.length?"indeterminate":"none"},E.prototype.itemKey=function(e){return m(this.checkKey)?"string"==typeof this.checkKey&&m(e.dataItem)?e.dataItem[this.checkKey]:"function"==typeof this.checkKey?this.checkKey(e):void 0:e.index},E.prototype.check=function(e){var t=this.options,n=t.enabled,t=t.mode,t=this.checkActions[t]||oe;n&&t(e)},E.prototype.checkSingle=function(e){var e=this.itemKey(e.item),t=this.state.has(e);this.state.clear(),t||this.state.add(e),this.notify()},E.prototype.checkMultiple=function(e){this.checkNode(e),this.options.checkParents&&this.checkParents(e.parent),this.notify()},E.prototype.toggleCheckOnClick=function(){var t=this;this.unsubscribeClick(),this.options.checkOnClick&&(this.clickSubscription=this.treeView.nodeClick.subscribe(function(e){"click"===e.type&&(e=t.treeView.itemLookup(e.item.index),t.check(e))}))},E.prototype.unsubscribeClick=function(){this.clickSubscription&&(this.clickSubscription.unsubscribe(),this.clickSubscription=null)},E.prototype.checkNode=function(e){var t,n,i,o=this;m(e.item.dataItem)&&!this.treeView.isDisabled(e.item.dataItem,e.item.index)&&(t=this.itemKey(e.item),m(t)&&(n=[t],this.options.checkChildren&&(e=Ie(e,function(e){e=e.item;return o.treeView.isVisible(e.dataItem,e.index)&&!o.treeView.isDisabled(e.dataItem,e.index)}).map(function(e){e=e.item;return o.itemKey(e)}),n.push.apply(n,Ye([],Ue(e)))),i=!this.state.has(t),n.forEach(function(e){i?o.state.add(e):o.state.delete(e)})))},E.prototype.checkParents=function(e){var t=this;if(m(e))for(var n=e;n;){var i=this.itemKey(n.item);n.children.every(function(e){return t.state.has(t.itemKey(e))})?this.state.add(i):this.state.delete(i),n=n.parent}},E.prototype.notify=function(){this.lastChange=Array.from(this.state),this.checkedKeysChange.emit(this.lastChange)},E.prototype.addCheckedItemsChildren=function(e){var t,n=this;m(e)&&0!==e.length&&(t=this.state.size,e.forEach(function(t){var e=n.itemKey(t.item);n.state.has(e)&&t.children.forEach(function(e){n.treeView.isDisabled(t.item.dataItem,t.item.index)||n.treeView.isDisabled(e.dataItem,e.index)||n.state.add(n.itemKey(e))})}),t!==this.state.size&&this.zone.run(function(){return n.notify()}))};e=E;function E(e,t){var n=this,i=(this.treeView=e,this.zone=t,this.checkedKeysChange=new h.EventEmitter,this.subscriptions=new u.Subscription,this.checkActions={multiple:function(e){return n.checkMultiple(e)},single:function(e){return n.checkSingle(e)}},this.state=new Set,this.subscriptions.add(this.treeView.checkedChange.subscribe(function(e){return n.check(e)})),[]);this.subscriptions.add(this.treeView.childrenLoaded.pipe(r.filter(function(){return n.options.checkChildren&&n.treeView.loadOnDemand}),r.tap(function(e){return i.push(e)}),r.switchMap(function(){return n.zone.onStable.pipe(r.take(1))})).subscribe(function(){return n.addCheckedItemsChildren(i)})),this.treeView.isChecked=this.isItemChecked.bind(this)}e.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:e,deps:[{token:V},{token:i.NgZone}],target:i.ɵɵFactoryTarget.Directive}),e.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:e,selector:"[kendoTreeViewCheckable]",inputs:{isChecked:"isChecked",checkKey:["checkBy","checkKey"],checkedKeys:"checkedKeys",checkable:["kendoTreeViewCheckable","checkable"]},outputs:{checkedKeysChange:"checkedKeysChange"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:e,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewCheckable]"}]}],ctorParameters:function(){return[{type:V},{type:i.NgZone}]},propDecorators:{isChecked:[{type:h.Input}],checkKey:[{type:h.Input,args:["checkBy"]}],checkedKeys:[{type:h.Input}],checkable:[{type:h.Input,args:["kendoTreeViewCheckable"]}],checkedKeysChange:[{type:h.Output}]}});Object.defineProperty($e.prototype,"isDisabled",{set:function(e){this.treeView.isDisabled=e},enumerable:!1,configurable:!0}),$e.prototype.ngOnChanges=function(e){e=(e=void 0===e?{}:e).disabledKeys;e&&!e.firstChange&&this.cdr.markForCheck()},$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};o=$e;function $e(e,t){var n=this;this.treeView=e,this.cdr=t,this.disabledKeys=[],this.treeView.isDisabled=function(e,t){return-1<n.disabledKeys.indexOf(n.itemKey({dataItem:e,index:t}))}}o.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:o,deps:[{token:V},{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Directive}),o.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:o,selector:"[kendoTreeViewDisable]",inputs:{isDisabled:"isDisabled",disableKey:["kendoTreeViewDisable","disableKey"],disabledKeys:"disabledKeys"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:o,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewDisable]"}]}],ctorParameters:function(){return[{type:V},{type:i.ChangeDetectorRef}]},propDecorators:{isDisabled:[{type:h.Input}],disableKey:[{type:h.Input,args:["kendoTreeViewDisable"]}],disabledKeys:[{type:h.Input}]}});var Qe={maxAutoExpandResults:-1,expandMatches:!1,expandedOnClear:"none"},t=(Object.defineProperty(We.prototype,"isExpanded",{set:function(e){this.component.isExpanded=e},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"filterExpandSettings",{get:function(){var e=ae(this.expandOnFilter)?{enabled:this.expandOnFilter}:Object.assign(Object.assign({},this.expandOnFilter),{enabled:!0});return Object.assign({},Qe,e)},enumerable:!1,configurable:!0}),We.prototype.ngOnChanges=function(e){p.isChanged("expandedKeys",e,!1)&&e.expandedKeys.currentValue!==this.lastChange&&(this.state=new Set(e.expandedKeys.currentValue))},We.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},We.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},We.prototype.toggleExpand=function(e){var t=e.index,n=e.dataItem,e=e.expand,t=this.itemKey({index:t,dataItem:n}),n=this.state.has(t),i=!1;n&&!e?(this.state.delete(t),i=!0):!n&&e&&(this.state.add(t),i=!0),i&&this.notify()},We.prototype.handleAutoExpand=function(e){var n=this,t=e.nodes,i=e.matchCount,e=e.term;if(this.filterExpandSettings.enabled){var o=this.filterExpandSettings,r=o.maxAutoExpandResults,s=o.expandMatches,o=o.expandedOnClear;if(this.isFiltered||(this.originalExpandedKeys=new Set(this.state)),this.isFiltered&&!e||-1!==r&&r<i){switch(o){case"initial":xe(this.state,this.originalExpandedKeys)||(this.state=this.originalExpandedKeys,this.notify());break;case"all":this.state=new Set(t.reduce(function(e,t){return n.getEveryExpandKey(e,t),e},[])),this.notify();break;case"unchanged":break;default:0!==this.state.size&&(this.state.clear(),this.notify())}this.isFiltered=!1}else{e=new Set(t.reduce(function(e,t){return n.updateExpandedNodes(e,t,s),e},[]));xe(this.state,e)||(this.state=e,this.notify()),this.isFiltered=!0}}},We.prototype.notify=function(){this.lastChange=Array.from(this.state),this.expandedKeysChange.emit(this.lastChange)},We);function We(e){var i=this;this.component=e,this.expandOnFilter=!1,this.expandedKeysChange=new h.EventEmitter,this.subscriptions=new u.Subscription,this.state=new Set,this.originalExpandedKeys=new Set,this.isFiltered=!1,this.updateExpandedNodes=function(t,e,n){(e.containsMatches||e.isMatch&&n&&ye(e.children))&&t.push(i.itemKey({dataItem:e.dataItem,index:e.index})),ye(e.children)&&e.children.forEach(function(e){i.updateExpandedNodes(t,e,n)})},this.getEveryExpandKey=function(t,e){ye(e.children)&&t.push(i.itemKey({dataItem:e.dataItem,index:e.index})),ye(e.children)&&e.children.forEach(function(e){i.getEveryExpandKey(t,e)})},this.subscriptions.add(u.merge(this.component.expand.pipe(r.map(function(e){return Object.assign({expand:!0},e)})),this.component.collapse.pipe(r.map(function(e){return Object.assign({expand:!1},e)}))).subscribe(this.toggleExpand.bind(this))),this.component.filterStateChange&&this.subscriptions.add(this.component.filterStateChange.subscribe(this.handleAutoExpand.bind(this))),this.component.isExpanded=function(e,t){return i.state.has(i.itemKey({dataItem:e,index:t}))}}t.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:t,deps:[{token:Be}],target:i.ɵɵFactoryTarget.Directive}),t.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:t,selector:"[kendoTreeViewExpandable]",inputs:{isExpanded:"isExpanded",expandKey:["expandBy","expandKey"],expandOnFilter:"expandOnFilter",expandedKeys:"expandedKeys"},outputs:{expandedKeysChange:"expandedKeysChange"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:t,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewExpandable]"}]}],ctorParameters:function(){return[{type:Be}]},propDecorators:{isExpanded:[{type:h.Input}],expandKey:[{type:h.Input,args:["expandBy"]}],expandOnFilter:[{type:h.Input}],expandedKeysChange:[{type:h.Output}],expandedKeys:[{type:h.Input}]}});Object.defineProperty(tt.prototype,"isSelected",{set:function(e){this.treeView.isSelected=e},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"getAriaMultiselectable",{get:function(){return"multiple"===this.options.mode},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"options",{get:function(){var e={enabled:!0,mode:"single"};if(!m(this.selection)||"string"==typeof this.selection)return e;var t=ae(this.selection)?{enabled:this.selection}:this.selection;return Object.assign(e,t)},enumerable:!1,configurable:!0}),tt.prototype.ngOnChanges=function(e){p.isChanged("selectedKeys",e,!1)&&e.selectedKeys.currentValue!==this.lastChange&&(this.state=new Set(e.selectedKeys.currentValue))},tt.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},tt.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},tt.prototype.select=function(e){var t=this.options,n=t.enabled,t=t.mode,t=this.selectActions[t]||oe;n&&t(e)},tt.prototype.selectSingle=function(e){e=this.itemKey(e);this.state.has(e)||(this.state.clear(),this.state.add(e),this.notify())},tt.prototype.selectMultiple=function(e){var e=this.itemKey(e),t=this.state.has(e);m(e)&&(t?this.state.delete(e):this.state.add(e),this.notify())},tt.prototype.notify=function(){this.lastChange=Array.from(this.state),this.selectedKeysChange.emit(this.lastChange)};var Je,et=tt;function tt(e){var n=this;this.treeView=e,this.selectedKeysChange=new h.EventEmitter,this.subscriptions=new u.Subscription,this.selectActions={multiple:function(e){return n.selectMultiple(e)},single:function(e){return n.selectSingle(e)}},this.state=new Set,this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this))),this.treeView.isSelected=function(e,t){return n.state.has(n.itemKey({dataItem:e,index:t}))}}et.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:et,deps:[{token:V}],target:i.ɵɵFactoryTarget.Directive}),et.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:et,selector:"[kendoTreeViewSelectable]",inputs:{isSelected:"isSelected",selectKey:["selectBy","selectKey"],selection:["kendoTreeViewSelectable","selection"],selectedKeys:"selectedKeys"},outputs:{selectedKeysChange:"selectedKeysChange"},host:{properties:{"attr.aria-multiselectable":"this.getAriaMultiselectable"}},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:et,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewSelectable]"}]}],ctorParameters:function(){return[{type:V}]},propDecorators:{isSelected:[{type:h.Input}],selectKey:[{type:h.Input,args:["selectBy"]}],selection:[{type:h.Input,args:["kendoTreeViewSelectable"]}],selectedKeys:[{type:h.Input}],selectedKeysChange:[{type:h.Output}],getAriaMultiselectable:[{type:h.HostBinding,args:["attr.aria-multiselectable"]}]}}),l.DropAction=void 0,(M=l.DropAction||(l.DropAction={}))[M.Add=0]="Add",M[M.InsertTop=1]="InsertTop",M[M.InsertBottom=2]="InsertBottom",M[M.InsertMiddle=3]="InsertMiddle",M[M.Invalid=4]="Invalid",l.DropPosition=void 0,(M=l.DropPosition||(l.DropPosition={}))[M.Over=0]="Over",M[M.Before=1]="Before",M[M.After=2]="After",(M=Je=Je||{})[M.Up=-1]="Up",M[M.Down=1]="Down";nt.prototype.preventDefault=function(){this.prevented=!0},nt.prototype.isDefaultPrevented=function(){return this.prevented};var M=nt;function nt(){this.prevented=!1}Xe(rt,it=M),rt.prototype.setValid=function(e){this.isValid=e};var it,ot=rt;function rt(e,t){var n=it.call(this)||this;return n.isValid=!0,Object.assign(n,e),n.originalEvent=t,n}Xe(dt,st=M);var st,at=dt;function dt(e){var t=st.call(this)||this;return Object.assign(t,e),t}function ct(){}ht=!(lt=function(){if(!p.isDocumentAvailable()||!m(document.body))return!1;var e=document.createElement("div"),t=(e.style.transform="matrix(10, 0, 0, 10, 0, 0)",e.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(e),10!==e.children[0].getBoundingClientRect().top);return document.body.removeChild(e),t});var lt,pt,ht,ut=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ht||(pt=lt.apply(void 0,Ye([],Ue(e))),ht=!0),pt};function gt(e,t,n,i,o){if(m(e)&&m(t)&&m(i)&&m(o)){i=ie(t,".k-treeview-mid");if(m(i)){var r=function(e){if(!m(e))return null;var t=".k-treeview-leaf:not(.k-treeview-load-more-button)";return Te(e,t)?e:e.querySelector(t)}(i),i=he(i,de(e));if(m(r)&&r!==e&&!i)return i=(e=r.getBoundingClientRect()).height/(le(t)?4:2),(r=n-o.top)<(t=e.top-o.top)+i?l.DropPosition.Before:r>=t+e.height-i?l.DropPosition.After:l.DropPosition.Over}}}function mt(e,t){return m(e)&&m(t)?(t=de(t),t=ge(t),e=e.itemLookup(t),m(e)&&m(e.item.dataItem)?e:null):null}function ft(e,t,n){m(e)&&0===t.length&&n.isExpanded(e.item.dataItem,e.item.index)&&n.collapseNode(e.item.dataItem,e.item.index)}function yt(e,t){t.isExpanded(e.item.dataItem,e.item.index)||t.expandNode(e.item.dataItem,e.item.index)}function vt(e){return p.isDocumentAvailable()&&m(document.elementFromPoint)?document.elementFromPoint(e.clientX,e.clientY):e.target}function bt(e,t){var n=e.split("_"),t=t.split("_");if(n.length<t.length)return e;var i=t.length-1,o=t.slice(0,i).join("_"),i=n.slice(0,i).join("_"),r=t.length-1,t=Number(t[r]),s=Number(n[r]);return o===i&&t<s?(n[r]=String(s-1),n.join("_")):e}function It(e,t,n){if(m(e)&&p.isDocumentAvailable())for(var i,o=e.scrollTop,r=t,s=0;o===e.scrollTop&&!(n===Je.Up&&Math.floor(e.scrollTop)<=0)&&!(n===Je.Down&&(i=e,Math.ceil(i.scrollTop)>=i.scrollHeight-i.clientHeight))&&s<20;)e.scrollTop+=r*n,r+=1,s+=1}function xt(e,t,n){m(e.loadMoreService)&&(t=e.getNodePageSize(t),e.setNodePageSize(n,t))}function Dt(e,t){var n;m(e.loadMoreService)&&(n=e.getNodePageSize(t),e.setNodePageSize(t,n+1))}function kt(e,t){var n;m(e.loadMoreService)&&(n=e.getNodePageSize(t),e.setNodePageSize(t,n-1))}var Ct=new RegExp("(auto|scroll)"),St=(wt.prototype.add=function(e){var t,n,i=e.sourceItem,o=e.destinationItem,r=e.dropPosition,s=e.sourceTree,e=e.destinationTree,a=Object.assign({},c(i)),d=(r===l.DropPosition.Over?(yt(o,e),d=this.childrenFor(c(o)),t=m(e.loadMoreService)?Math.min(e.loadMoreService.getGroupSize(c(o)),d.length):d.length,d.splice(t,0,a),g.setter(this.hierarchyBinding.childrenField)(c(o),d),this.movedItemNewIndex=be(o.item.index,t)):(d=this.getParentNodes(o,e),n=r===l.DropPosition.After?1:0,t=d.indexOf(c(o))+n,d.splice(t,0,a),n=o.parent?o.parent.item.index:null,this.movedItemNewIndex=be(n,t)),r===l.DropPosition.Over?c(o):c(o.parent));Dt(e,d),xt(e,c(i),a),s===e||e.loadOnDemand||e.preloadChildNodes(),s!==e&&(e.changeDetectorRef.detectChanges(),e.focus(this.movedItemNewIndex))},wt.prototype.remove=function(e){var t=e.sourceItem,n=e.sourceTree,e=e.destinationTree,i=this.getParentNodes(t,n),o=i.indexOf(c(t));i.splice(o,1),ft(t.parent,i,n),kt(n,c(t.parent)),n.loadOnDemand||n.preloadChildNodes(),n===e&&(e.changeDetectorRef.detectChanges(),o=bt(this.movedItemNewIndex,t.item.index),e.focus(o))},wt.prototype.getParentNodes=function(e,t){return m(e.parent)?this.childrenFor(c(e.parent)):t.nodes},wt.prototype.childrenFor=function(e){return g.getter(this.hierarchyBinding.childrenField)(e)||[]},wt);function wt(e){this.hierarchyBinding=e}var Tt={operator:"contains",ignoreCase:!0,mode:"lenient"},M=(Object.defineProperty(Vt.prototype,"filterSettings",{get:function(){return this._filterSettings},set:function(e){this._filterSettings=Object.assign(Object.assign({},Tt),e)},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"filter",{set:function(e){this.handleFilterChange(e)},enumerable:!1,configurable:!0}),Vt.prototype.handleFilterChange=function(e){this.filterData&&(this.resetNodesVisibility(this.filterData),e&&ve(this.filterData,e,this.filterSettings,this.component.textField),this.updateVisibleNodes(this.filterData),m(this.component.filterStateChange)&&this.component.filterStateChange.emit({nodes:this.filterData,matchCount:this.visibleNodes.size,term:e,filterSettings:this.filterSettings}))},Vt.prototype.updateVisibleNodes=function(e){var t=this;e.forEach(function(e){e.visible&&t.visibleNodes.add(e.dataItem),e.children&&t.updateVisibleNodes(e.children)})},Vt.prototype.resetNodesVisibility=function(e){var t=this;this.visibleNodes.clear(),e.forEach(function(e){e.visible=!0,e.children&&t.resetNodesVisibility(e.children)})},Vt);function Vt(e){this.component=e,this.visibleNodes=new Set,this._filterSettings=Tt}M.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:M,deps:[{token:I}],target:i.ɵɵFactoryTarget.Directive}),M.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:M,inputs:{filterSettings:"filterSettings",filter:"filter"},ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:M,decorators:[{type:h.Directive}],ctorParameters:function(){return[{type:I}]},propDecorators:{filterSettings:[{type:h.Input}],filter:[{type:h.Input}]}});Object.defineProperty(Et.prototype,"statusIconClass",{get:function(){switch(this.action){case l.DropAction.Add:return"k-i-plus";case l.DropAction.InsertTop:return"k-i-insert-up";case l.DropAction.InsertBottom:return"k-i-insert-down";case l.DropAction.InsertMiddle:return"k-i-insert-middle";default:l.DropAction.Invalid;return"k-i-cancel"}},enumerable:!1,configurable:!0}),Et.prototype.detectChanges=function(){this.cdr.detectChanges()};var Ot=Et;function Et(e){this.cdr=e,this.hostClasses=!0,this.posistionStyle="fixed"}Ot.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Ot,deps:[{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Component}),Ot.ɵcmp=i.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Ot,selector:"kendo-treeview-drag-clue",host:{properties:{"class.k-header":"this.hostClasses","class.k-drag-clue":"this.hostClasses","style.position":"this.posistionStyle"}},ngImport:i,template:'\n <ng-container *ngIf="!template">\n <span class="k-icon {{statusIconClass}} k-drag-status"></span>\n <span>{{text}}</span>\n </ng-container>\n\n <ng-template\n *ngIf="template"\n [ngTemplateOutlet]="template"\n [ngTemplateOutletContext]="{\n text: text,\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }"\n >\n </ng-template>\n ',isInline:!0,directives:[{type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:s.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]}],changeDetection:i.ChangeDetectionStrategy.OnPush}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Ot,decorators:[{type:h.Component,args:[{changeDetection:h.ChangeDetectionStrategy.OnPush,selector:"kendo-treeview-drag-clue",template:'\n <ng-container *ngIf="!template">\n <span class="k-icon {{statusIconClass}} k-drag-status"></span>\n <span>{{text}}</span>\n </ng-container>\n\n <ng-template\n *ngIf="template"\n [ngTemplateOutlet]="template"\n [ngTemplateOutletContext]="{\n text: text,\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }"\n >\n </ng-template>\n '}]}],ctorParameters:function(){return[{type:i.ChangeDetectorRef}]},propDecorators:{hostClasses:[{type:h.HostBinding,args:["class.k-header"]},{type:h.HostBinding,args:["class.k-drag-clue"]}],posistionStyle:[{type:h.HostBinding,args:["style.position"]}]}});Object.defineProperty(Mt.prototype,"componentRef",{get:function(){if(m(this._componentRef))return this._componentRef;throw new Error("The `initalize` method must be called before calling other service methods.")},set:function(e){this._componentRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(Mt.prototype,"element",{get:function(){return this.componentRef.location.nativeElement},enumerable:!1,configurable:!0}),Mt.prototype.ngOnDestroy=function(){m(this._componentRef)&&(this.element.parentElement.removeChild(this.element),this.componentRef.destroy(),this.componentRef=null)},Mt.prototype.show=function(){this.element.style.display=""},Mt.prototype.hide=function(){this.element.style.display="none"},Mt.prototype.move=function(e,t,n){this.element.style.left=e+(n=void 0===n?0:n)+"px",this.element.style.top=t+n+"px"};var N=Mt;function Mt(){}N.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:N,deps:[],target:i.ɵɵFactoryTarget.Injectable}),N.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:N}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:N,decorators:[{type:h.Injectable}]});Xe(Rt,Nt=N),Rt.prototype.initialize=function(e,t){m(this._componentRef)&&this.ngOnDestroy();var n=this.componentFactoryResolver.resolveComponentFactory(Ot);this.componentRef=e.createComponent(n),this.hide(),this.componentRef.instance.template=t,this.componentRef.changeDetectorRef.detectChanges()},Rt.prototype.ngOnDestroy=function(){this.cancelReturnAnimation(),this.cancelScroll(),Nt.prototype.ngOnDestroy.call(this)},Rt.prototype.move=function(e,t){Nt.prototype.move.call(this,e,t,10)},Rt.prototype.animateDragClueToElementPosition=function(e){var t,n=this;m(e)&&m(this.element.animate)?(e=e.getBoundingClientRect(),t=this.element.getBoundingClientRect(),this.returnAnimation=this.element.animate([{transform:"translate(0, 0)"},{transform:"translate("+(e.left-t.left)+"px, "+(e.top-t.top)+"px)"}],200),this.returnAnimation.onfinish=function(){return n.hide()}):this.hide()},Rt.prototype.cancelReturnAnimation=function(){m(this.returnAnimation)&&(this.returnAnimation.cancel(),this.returnAnimation=null)},Rt.prototype.updateDragClueData=function(e,t,n){var i=this.componentRef.instance;e===i.action&&fe(t,i.sourceItem)&&fe(n,i.destinationItem)||(i.action=e,i.sourceItem=t,i.destinationItem=n,i.detectChanges())},Rt.prototype.updateText=function(e){e!==this.componentRef.instance.text&&(this.componentRef.instance.text=e,this.componentRef.instance.detectChanges())},Rt.prototype.scrollIntoView=function(e){var t,n,i,o,r=e.step,e=e.interval,s=(this.cancelScroll(),function(e){for(;m(e)&&"HTML"!==e.nodeName;){var t=e.scrollHeight>e.clientHeight,n=Ct.test(getComputedStyle(e).overflowY);if(t&&n)return e;e=e.parentNode}return e}(this.element));m(s)&&(t=s.getBoundingClientRect(),n=this.element.getBoundingClientRect(),i=(o=Math.max(t.top,0))+n.height,o=o+Math.min(t.bottom,s.clientHeight),n.top<i?this.scrollInterval=setInterval(function(){return It(s,r,Je.Up)},e):n.bottom>o&&(this.scrollInterval=setInterval(function(){return It(s,r,Je.Down)},e)))},Rt.prototype.cancelScroll=function(){m(this.scrollInterval)&&(clearInterval(this.scrollInterval),this.scrollInterval=null)};var Nt,Ft=Rt;function Rt(e){var t=Nt.call(this)||this;return t.componentFactoryResolver=e,t}Ft.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Ft,deps:[{token:i.ComponentFactoryResolver}],target:i.ɵɵFactoryTarget.Injectable}),Ft.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Ft}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Ft,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:i.ComponentFactoryResolver}]}});At.prototype.detectChanges=function(){this.changeDetectorRef.detectChanges()};var Bt=At;function At(e){this.changeDetectorRef=e,this.hostClass=!0,this.position="fixed",this.pointerEvents="none"}Bt.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Bt,deps:[{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Component}),Bt.ɵcmp=i.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Bt,selector:"kendo-treeview-drop-hint",host:{properties:{"class.k-drop-hint-container":"this.hostClass","style.position":"this.position","style.pointer-events":"this.pointerEvents"}},ngImport:i,template:'\n <div\n *ngIf="!template"\n class="k-drop-hint k-drop-hint-h"\n >\n <div class=\'k-drop-hint-start\'></div>\n <div class=\'k-drop-hint-line\'></div>\n </div>\n\n <ng-template\n *ngIf="template"\n [ngTemplateOutlet]="template"\n [ngTemplateOutletContext]="{\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }"\n >\n <ng-template>\n ',isInline:!0,directives:[{type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:s.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]}],changeDetection:i.ChangeDetectionStrategy.OnPush}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Bt,decorators:[{type:h.Component,args:[{changeDetection:h.ChangeDetectionStrategy.OnPush,selector:"kendo-treeview-drop-hint",template:'\n <div\n *ngIf="!template"\n class="k-drop-hint k-drop-hint-h"\n >\n <div class=\'k-drop-hint-start\'></div>\n <div class=\'k-drop-hint-line\'></div>\n </div>\n\n <ng-template\n *ngIf="template"\n [ngTemplateOutlet]="template"\n [ngTemplateOutletContext]="{\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }"\n >\n <ng-template>\n '}]}],ctorParameters:function(){return[{type:i.ChangeDetectorRef}]},propDecorators:{hostClass:[{type:h.HostBinding,args:["class.k-drop-hint-container"]}],position:[{type:h.HostBinding,args:["style.position"]}],pointerEvents:[{type:h.HostBinding,args:["style.pointer-events"]}]}});Xe(zt,Pt=N),zt.prototype.initialize=function(e,t){m(this._componentRef)&&this.ngOnDestroy();var n=this.componentFactoryResolver.resolveComponentFactory(Bt);this.componentRef=e.createComponent(n),this.hide(),this.componentRef.instance.template=t,this.componentRef.changeDetectorRef.detectChanges()},zt.prototype.updateDropHintData=function(e,t,n){var i=this.componentRef.instance;e===i.action&&fe(t,i.sourceItem)&&fe(n,i.destinationItem)||(i.action=e,i.sourceItem=t,i.destinationItem=n,i.detectChanges())};var Pt,jt=zt;function zt(e){var t=Pt.call(this)||this;return t.componentFactoryResolver=e,t}jt.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:jt,deps:[{token:i.ComponentFactoryResolver}],target:i.ɵɵFactoryTarget.Injectable}),jt.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:jt}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:jt,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:i.ComponentFactoryResolver}]}});var s=function(e){this.templateRef=e},N=(s.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:s,deps:[{token:i.TemplateRef,optional:!0}],target:i.ɵɵFactoryTarget.Directive}),s.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:s,selector:"[kendoTreeViewDragClueTemplate]",ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:s,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewDragClueTemplate]"}]}],ctorParameters:function(){return[{type:i.TemplateRef,decorators:[{type:h.Optional}]}]}}),function(e){this.templateRef=e}),Kt=(N.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:N,deps:[{token:i.TemplateRef,optional:!0}],target:i.ɵɵFactoryTarget.Directive}),N.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:N,selector:"[kendoTreeViewDropHintTemplate]",ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:N,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewDropHintTemplate]"}]}],ctorParameters:function(){return[{type:i.TemplateRef,decorators:[{type:h.Optional}]}]}}),{enabled:!0,step:1,interval:1}),F=(Object.defineProperty(R.prototype,"scrollSettings",{get:function(){var e="boolean"==typeof this.autoScroll?{enabled:this.autoScroll}:this.autoScroll;return Object.assign({},Kt,e)},enumerable:!1,configurable:!0}),R.prototype.ngAfterContentInit=function(){this.initalizeDraggable(),this.dragClueService.initialize(this.treeview.assetsContainer,this.dragClueTemplate&&this.dragClueTemplate.templateRef),this.dropHintService.initialize(this.treeview.assetsContainer,this.dropHintTemplate&&this.dropHintTemplate.templateRef)},R.prototype.ngOnDestroy=function(){this.draggable.destroy()},R.prototype.handlePress=function(e){e=e.originalEvent;le(e.target)&&(this.draggedItem=ie(e.target,".k-treeview-leaf"),this.pendingDragStartEvent=e)},R.prototype.handleDrag=function(e){var t,n,i,o,r,s,a=this,d=e.originalEvent,c=e.clientX,e=e.clientY;this.shouldInitiateDragStart({clientX:c,clientY:e})&&this.initiateDragStart(),m(this.draggedItem)&&!m(this.pendingDragStartEvent)&&(t=vt(d),p.hasObservers(this.treeview.nodeDrag)&&this.zone.run(function(){return a.notifyDrag(d,t)}),s=this.getTargetTreeView(t),n=gt(this.draggedItem,t,e,s,this.containerOffset),i=ie(t,".k-treeview-mid"),o=function(e,t){if(!m(e)||!m(t))return l.DropAction.Invalid;switch(e){case l.DropPosition.Over:return l.DropAction.Add;case l.DropPosition.Before:return m(de(t).previousElementSibling)?l.DropAction.InsertMiddle:l.DropAction.InsertTop;case l.DropPosition.After:return m(de(t).nextElementSibling)?l.DropAction.InsertMiddle:l.DropAction.InsertBottom;default:return l.DropAction.Invalid}}(n,t),r=mt(this.treeview,this.draggedItem),s=mt(s,t),this.updateDropHintState(n,i,o,r,s),this.updateDragClueState(o,c,e,r,s),this.scrollSettings.enabled&&this.dragClueService.scrollIntoView(this.scrollSettings))},R.prototype.handleRelease=function(e){var t=this,n=e.originalEvent,e=e.clientY;if(this.scrollSettings.enabled&&this.dragClueService.cancelScroll(),!m(this.draggedItem)||m(this.pendingDragStartEvent))return this.pendingDragStartEvent=null,void(this.draggedItem=null);var i=vt(n),o=this.treeview,r=this.getTargetTreeView(i),s=gt(this.draggedItem,i,e,this.getTargetTreeView(i),this.containerOffset),a=mt(o,this.draggedItem),d=mt(r,i);m(d)&&m(s)?this.zone.run(function(){return t.notifyDrop({sourceItem:a,destinationItem:d,dropPosition:s,sourceTree:o,destinationTree:r},n)}):this.dragClueService.animateDragClueToElementPosition(this.draggedItem),p.hasObservers(this.treeview.nodeDragEnd)&&this.zone.run(function(){return t.notifyDragEnd({sourceItem:a,destinationItem:d,originalEvent:n})}),this.dropHintService.hide(),this.draggedItem=null},R.prototype.updateDropHintState=function(e,t,n,i,o){m(t)&&e!==l.DropPosition.Over&&m(e)?(t=t.getBoundingClientRect(),e=e===l.DropPosition.Before?t.top:t.top+t.height,this.dropHintService.updateDropHintData(n,i,o),this.dropHintService.move(t.left-this.containerOffset.left,e-this.containerOffset.top),this.dropHintService.show()):this.dropHintService.hide()},R.prototype.updateDragClueState=function(e,t,n,i,o){this.dragClueService.move(t-this.containerOffset.left,n-this.containerOffset.top),this.dragClueService.updateDragClueData(e,i,o),this.dragClueService.show()},R.prototype.initalizeDraggable=function(){var e=this;this.draggable=new _.default({press:this.handlePress.bind(this),drag:this.handleDrag.bind(this),release:this.handleRelease.bind(this)}),this.zone.runOutsideAngular(function(){return e.draggable.bindTo(e.element.nativeElement)})},R.prototype.notifyDragStart=function(e,t){t=mt(this.treeview,t),t=new at({sourceItem:t,originalEvent:e});return this.treeview.nodeDragStart.emit(t),t},R.prototype.notifyDrag=function(e,t){t={sourceItem:mt(this.treeview,this.draggedItem),destinationItem:mt(this.getTargetTreeView(t),t),originalEvent:e};this.treeview.nodeDrag.emit(t)},R.prototype.notifyDrop=function(e,t){var n=new ot(e,t);e.destinationTree.nodeDrop.emit(n),this.disableAnimationsForNextTick(e.destinationTree),e.sourceTree!==e.destinationTree&&this.disableAnimationsForNextTick(e.sourceTree),!n.isDefaultPrevented()&&n.isValid?(this.dragClueService.hide(),e.destinationTree.addItem.emit(e),t.ctrlKey&&this.allowCopy||e.sourceTree.removeItem.emit(e)):n.isDefaultPrevented()?this.dragClueService.hide():n.isValid||this.dragClueService.animateDragClueToElementPosition(this.draggedItem)},R.prototype.notifyDragEnd=function(e){this.treeview.nodeDragEnd.emit(e)},R.prototype.getTargetTreeView=function(e){var t=this.treeview.element.nativeElement.tagName,n=ie(e,t);return Ye([this.treeview],Ue(this.dropZoneTreeViews)).find(function(e){return m(e)&&e.element.nativeElement===n})},R.prototype.disableAnimationsForNextTick=function(e){e.animate||(e.animate=!1,this.zone.runOutsideAngular(function(){return setTimeout(function(){return e.animate=!0})}))},R.prototype.shouldInitiateDragStart=function(e){return!!m(this.pendingDragStartEvent)&&Math.sqrt(Math.pow(this.pendingDragStartEvent.clientX-e.clientX,2)+Math.pow(this.pendingDragStartEvent.clientY-e.clientY,2))>=this.startDragAfter},R.prototype.initiateDragStart=function(){var e=this;if(p.hasObservers(this.treeview.nodeDragStart)&&this.zone.run(function(){return e.notifyDragStart(e.pendingDragStartEvent,vt(e.pendingDragStartEvent))}).isDefaultPrevented())return this.pendingDragStartEvent=null,void(this.draggedItem=null);this.dragClueService.cancelReturnAnimation(),this.dragClueService.updateText(this.draggedItem.innerText),this.containerOffset=function(e){if(!e||!ut())return{left:0,top:0};for(var t=e.parentElement;t&&"none"===window.getComputedStyle(t).transform;)t=t.parentElement;return t?{left:(e=t.getBoundingClientRect()).left-t.scrollLeft,top:e.top-t.scrollTop}:{left:0,top:0}}(this.draggedItem),this.pendingDragStartEvent=null},R);function R(e,t,n,i,o){this.element=e,this.zone=t,this.treeview=n,this.dragClueService=i,this.dropHintService=o,this.allowCopy=!1,this.dropZoneTreeViews=[],this.startDragAfter=5,this.autoScroll=!0,this.userSelectStyle="none",this.containerOffset={top:0,left:0},this.treeview.touchActions=!1}F.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:F,deps:[{token:i.ElementRef},{token:i.NgZone},{token:V},{token:Ft},{token:jt}],target:i.ɵɵFactoryTarget.Directive}),F.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:F,selector:"[kendoTreeViewDragAndDrop]",inputs:{allowCopy:"allowCopy",dropZoneTreeViews:"dropZoneTreeViews",startDragAfter:"startDragAfter",autoScroll:"autoScroll"},host:{properties:{"style.user-select":"this.userSelectStyle","style.-ms-user-select":"this.userSelectStyle","style.-moz-user-select":"this.userSelectStyle","style.-webkit-user-select":"this.userSelectStyle"}},providers:[Ft,jt],queries:[{propertyName:"dragClueTemplate",first:!0,predicate:s,descendants:!0},{propertyName:"dropHintTemplate",first:!0,predicate:N,descendants:!0}],ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:F,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewDragAndDrop]",providers:[Ft,jt]}]}],ctorParameters:function(){return[{type:i.ElementRef},{type:i.NgZone},{type:V},{type:Ft},{type:jt}]},propDecorators:{allowCopy:[{type:h.Input}],dropZoneTreeViews:[{type:h.Input}],startDragAfter:[{type:h.Input}],autoScroll:[{type:h.Input}],dragClueTemplate:[{type:h.ContentChild,args:[s,{static:!1}]}],dropHintTemplate:[{type:h.ContentChild,args:[N,{static:!1}]}],userSelectStyle:[{type:h.HostBinding,args:["style.user-select"]},{type:h.HostBinding,args:["style.-ms-user-select"]},{type:h.HostBinding,args:["style.-moz-user-select"]},{type:h.HostBinding,args:["style.-webkit-user-select"]}]}});function Lt(e,i,o,r){return void 0===o&&(o=null),void 0===r&&(r=""),ye(e)?e.map(function(e,t){var t=Ht.nodeIndex(t.toString(),r),n={dataItem:e,index:t,parent:o,visible:!0};return n.children=Lt(g.getter(i)(e),i,n,t),n}):[]}var _t,Ht=new d,Gt=(Xe(Zt,_t=M),Object.defineProperty(Zt.prototype,"childrenField",{get:function(){return this._childrenField},set:function(e){if(!e)throw new Error("'childrenField' cannot be empty");this._childrenField=e},enumerable:!1,configurable:!0}),Object.defineProperty(Zt.prototype,"nodes",{set:function(e){this.originalData=e||[],this.filterData=Lt(e,this.childrenField)||[],this.updateVisibleNodes(this.filterData)},enumerable:!1,configurable:!0}),Object.defineProperty(Zt.prototype,"isVisible",{set:function(e){this.component.isVisible=e},enumerable:!1,configurable:!0}),Zt.prototype.ngOnInit=function(){var t=this;m(this.childrenField)&&(this.component.children=function(e){return u.of(g.getter(t.childrenField)(e))},this.component.hasChildren=function(e){e=g.getter(t.childrenField)(e);return Boolean(e&&e.length)},this.component.editService=new St(this),this.component.filterChange.subscribe(this.handleFilterChange.bind(this)),this.component.filter&&this.handleFilterChange(this.component.filter),!this.loadOnDemand&&m(this.component.preloadChildNodes)&&this.component.preloadChildNodes())},Zt.prototype.ngOnChanges=function(e){p.isChanged("childrenField",e,!1)&&(this.nodes=this.originalData),p.anyChanged(["nodes","loadOnDemand"],e)&&!this.loadOnDemand&&m(this.component.preloadChildNodes)&&this.component.preloadChildNodes()},Zt);function Zt(e,t){var n=_t.call(this,e)||this,e=(n.component=e,n.dragAndDropDirective=t,n.loadOnDemand=!0,n.originalData=[],!m(n.dragAndDropDirective));return n.component.isVisible=e?function(e){return n.visibleNodes.has(e)}:Q,n}Gt.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Gt,deps:[{token:I},{token:F,host:!0,optional:!0}],target:i.ɵɵFactoryTarget.Directive}),Gt.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:Gt,selector:"[kendoTreeViewHierarchyBinding]",inputs:{childrenField:"childrenField",nodes:"nodes",isVisible:"isVisible",loadOnDemand:"loadOnDemand"},usesInheritance:!0,usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Gt,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewHierarchyBinding]"}]}],ctorParameters:function(){return[{type:I},{type:F,decorators:[{type:h.Optional},{type:h.Host}]}]},propDecorators:{childrenField:[{type:h.Input}],nodes:[{type:h.Input}],isVisible:[{type:h.Input}],loadOnDemand:[{type:h.Input}]}});Xt.prototype.add=function(e){var t,n,i=e.sourceItem,o=e.destinationItem,r=e.dropPosition,s=e.sourceTree,e=e.destinationTree,a=Object.assign({},c(i)),d=(r===l.DropPosition.Over?(yt(o,e),t=g.getter(this.flatBinding.idField)(c(o)),g.setter(this.flatBinding.parentIdField)(a,t),t=this.getLastVisibleChildNodeIndex(e,this.flatBinding.originalData,c(o))+1,this.flatBinding.originalData.splice(t,0,a),this.rebindData(),n=this.fetchChildNodes(c(o),e).indexOf(a),this.movedItemNewIndex=be(o.item.index,n)):(d=r===l.DropPosition.After?1:0,t=this.flatBinding.originalData.indexOf(c(o))+d,this.flatBinding.originalData.splice(t,0,a),d=g.getter(this.flatBinding.parentIdField)(c(o)),g.setter(this.flatBinding.parentIdField)(a,d),this.rebindData(),t=o.parent?o.parent.item.index:null,n=(o.parent?this.fetchChildNodes(c(o.parent),e):e.nodes).indexOf(a),this.movedItemNewIndex=be(t,n)),s!==e&&this.addChildNodes(a,s),r===l.DropPosition.Over?c(o):c(o.parent));Dt(e,d),xt(e,c(i),a),s===e||e.loadOnDemand||e.preloadChildNodes(),s!==e&&(e.changeDetectorRef.detectChanges(),e.focus(this.movedItemNewIndex))},Xt.prototype.remove=function(e){var t=e.sourceItem,n=e.sourceTree,e=e.destinationTree,i=c(t),o=this.flatBinding.originalData.indexOf(i),o=(this.flatBinding.originalData.splice(o,1),n!==e&&this.removeChildNodes(i,n),this.rebindData(),t.parent?t.parent.children:[]);ft(t.parent,o,n),kt(n,c(t.parent)),n.loadOnDemand||n.preloadChildNodes(),n===e&&(e.changeDetectorRef.detectChanges(),i=bt(this.movedItemNewIndex,t.item.index),e.focus(i))},Xt.prototype.addChildNodes=function(e,t){e=this.fetchAllDescendantNodes(e,t);(t=this.flatBinding.originalData).push.apply(t,Ye([],Ue(e)))},Xt.prototype.removeChildNodes=function(e,t){var n=this;this.fetchAllDescendantNodes(e,t).forEach(function(e){e=n.flatBinding.originalData.indexOf(e);n.flatBinding.originalData.splice(e,1)})},Xt.prototype.fetchAllDescendantNodes=function(e,t){var n=this,i=this.fetchChildNodes(e,t);return i.forEach(function(e){return i=i.concat(n.fetchAllDescendantNodes(e,t)||[])}),i},Xt.prototype.fetchChildNodes=function(e,t){if(!e)return[];var n=[];return t.children(e).pipe(r.take(1)).subscribe(function(e){return n=n.concat(e||[])}),n},Xt.prototype.getLastVisibleChildNodeIndex=function(e,t,n){if(!m(e.loadMoreService)||!e.hasChildren(n))return t.length;var i=e.loadMoreService.getGroupSize(n),n=this.fetchChildNodes(n,e).slice(0,i),e=n[n.length-1];return t.indexOf(e)},Xt.prototype.rebindData=function(){this.flatBinding.nodes=this.flatBinding.originalData};var qt=Xt;function Xt(e){this.flatBinding=e}function Ut(t,e,n){return e.filter(function(e){return t(e)===n})}function Yt(e,i,o,r,s,a){return void 0===s&&(s=null),void 0===a&&(a=""),ye(e)?e.map(function(e,t){var t=Qt.nodeIndex(t.toString(),a),n={dataItem:e,index:t,parent:s,visible:!0};return n.children=Yt(Ut(g.getter(o),i||[],g.getter(r)(e)),i,o,r,n,t),n}):[]}var $t,Qt=new d,M=(Xe(Wt,$t=M),Object.defineProperty(Wt.prototype,"nodes",{set:function(e){this.originalData=e||[],e=this.parentIdField,re(e)||0===e.trim().length?this.component.nodes=this.originalData.slice(0):(e=g.getter(this.parentIdField),this.component.nodes=this.originalData.filter(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(re,e)),this.filterData=Yt(this.component.nodes,this.originalData,this.parentIdField,this.idField),this.updateVisibleNodes(this.filterData))},enumerable:!1,configurable:!0}),Object.defineProperty(Wt.prototype,"isVisible",{set:function(e){this.component.isVisible=e},enumerable:!1,configurable:!0}),Wt.prototype.ngOnInit=function(){var t,n=this;m(this.parentIdField)&&m(this.idField)&&(t=function(e){return Ut(g.getter(n.parentIdField),n.originalData||[],g.getter(n.idField)(e))},this.component.hasChildren=function(e){return 0<t(e).length},this.component.children=function(e){return u.of(t(e))},this.component.editService=new qt(this),this.component.filterChange.subscribe(this.handleFilterChange.bind(this)),this.component.filter&&this.handleFilterChange(this.component.filter),!this.loadOnDemand&&m(this.component.preloadChildNodes)&&this.component.preloadChildNodes())},Wt.prototype.ngOnChanges=function(e){p.isChanged("parentIdField",e,!1)&&(this.nodes=this.originalData),p.anyChanged(["nodes","loadOnDemand"],e)&&!this.loadOnDemand&&m(this.component.preloadChildNodes)&&this.component.preloadChildNodes()},Wt);function Wt(e){var t=$t.call(this,e)||this;return t.component=e,t.loadOnDemand=!0,t.originalData=[],t.component.isVisible=function(e){return t.visibleNodes.has(e)},t}M.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:M,deps:[{token:I}],target:i.ɵɵFactoryTarget.Directive}),M.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:M,selector:"[kendoTreeViewFlatDataBinding]",inputs:{nodes:"nodes",parentIdField:"parentIdField",idField:"idField",loadOnDemand:"loadOnDemand",isVisible:"isVisible"},usesInheritance:!0,usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:M,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewFlatDataBinding]"}]}],ctorParameters:function(){return[{type:I}]},propDecorators:{nodes:[{type:h.Input}],parentIdField:[{type:h.Input}],idField:[{type:h.Input}],loadOnDemand:[{type:h.Input}],isVisible:[{type:h.Input}]}});var B=[C],Jt=function(){},C=(Jt.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Jt,deps:[],target:i.ɵɵFactoryTarget.NgModule}),Jt.ɵmod=i.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Jt,declarations:[C],exports:[C]}),Jt.ɵinj=i.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Jt}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Jt,decorators:[{type:h.NgModule,args:[{declarations:[B],exports:[B]}]}]}),Object.defineProperty(en.prototype,"editService",{set:function(e){this.treeview.editService=e},enumerable:!1,configurable:!0}),en.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},en.prototype.handleAdd=function(e){if(!m(this.treeview.editService))throw new Error("No `editService` provided. Either provide your own implementation or use this directive in combination with one of the data binding directives (`kendoTreeViewHierarchyBinding` or `kendoTreeViewFlatDataBinding`).");this.treeview.editService.add(e)},en.prototype.handleRemove=function(e){if(!m(this.treeview.editService))throw new Error("No `editService` provided. Either provide your own implementation or use this directive in combination with one of the data binding directives (`kendoTreeViewHierarchyBinding` or `kendoTreeViewFlatDataBinding`).");this.treeview.editService.remove(e)},en);function en(e){this.treeview=e,this.subscriptions=new u.Subscription,this.subscriptions.add(this.treeview.addItem.subscribe(this.handleAdd.bind(this))),this.subscriptions.add(this.treeview.removeItem.subscribe(this.handleRemove.bind(this)))}C.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:C,deps:[{token:V}],target:i.ɵɵFactoryTarget.Directive}),C.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"[kendoTreeViewDragAndDropEditing]",inputs:{editService:"editService"},ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:C,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewDragAndDropEditing]"}]}],ctorParameters:function(){return[{type:V}]},propDecorators:{editService:[{type:h.Input}]}});var tn="http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/",B=(Object.defineProperty(nn.prototype,"loadMoreNodes",{set:function(e){"string"!=typeof e&&(this.treeview.loadMoreService.loadMoreNodes=e)},enumerable:!1,configurable:!0}),nn.prototype.ngOnChanges=function(){this.verifySettings()},nn.prototype.verifySettings=function(){if(h.isDevMode()){if(!m(this.pageSize))throw new Error("To use the TreeView `kendoTreeViewLoadMore` directive, you need to assign a `pageSize` value. See "+tn+".");var e=this.treeview.loadMoreService.loadMoreNodes;if(m(e)&&"function"!=typeof e)throw new Error("The passed value to the `kendoTreeViewLoadMore` directive must be a function that retrieves additional nodes. See "+tn+".");if(m(e)&&!m(this.totalField))throw new Error("When a function to fetch additional nodes is provided to the `kendoTreeViewLoadMore` directive, the `totalField` and `totalRootNodes` values must also be provided. See "+tn+".")}},nn.prototype.getGroupSize=function(e){e=e||this.rootLevelId;return this.pageSizes.has(e)?this.pageSizes.get(e):this.pageSize},nn.prototype.setGroupSize=function(e,t){e=e||this.rootLevelId;this.pageSizes.set(e,0<t?t:0)},nn.prototype.getTotalNodesCount=function(e,t){return m(e)&&m(this.totalField)?e[this.totalField]:!m(e)&&m(this.totalRootNodes)?this.totalRootNodes:t},nn.prototype.getInitalPageSize=function(){return this.pageSize},nn);function nn(e){this.treeview=e,this.pageSizes=new Map,this.rootLevelId=p.guid(),this.treeview.loadMoreService={getInitialPageSize:this.getInitalPageSize.bind(this),getGroupSize:this.getGroupSize.bind(this),setGroupSize:this.setGroupSize.bind(this),getTotalNodesCount:this.getTotalNodesCount.bind(this)}}B.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:B,deps:[{token:V}],target:i.ɵɵFactoryTarget.Directive}),B.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:B,selector:"[kendoTreeViewLoadMore]",inputs:{loadMoreNodes:["kendoTreeViewLoadMore","loadMoreNodes"],pageSize:"pageSize",totalRootNodes:"totalRootNodes",totalField:"totalField"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:B,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewLoadMore]"}]}],ctorParameters:function(){return[{type:V}]},propDecorators:{loadMoreNodes:[{type:h.Input,args:["kendoTreeViewLoadMore"]}],pageSize:[{type:h.Input}],totalRootNodes:[{type:h.Input}],totalField:[{type:h.Input}]}});var on=[V,Ze,S,He,n,e,o,t,et,Gt,Le,M,F,s,Ot,N,Bt,C,B,b],rn=function(){},Ze=(rn.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:rn,deps:[],target:i.ɵɵFactoryTarget.NgModule}),rn.ɵmod=i.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:rn,declarations:[V,Ze,S,He,n,e,o,t,et,Gt,Le,M,F,s,Ot,N,Bt,C,B,b],imports:[j.CommonModule,Jt,P.InputsModule],exports:[V,Ze,S,He,n,e,o,t,et,Gt,Le,M,F,s,Ot,N,Bt,C,B,b]}),rn.ɵinj=i.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:rn,imports:[[j.CommonModule,Jt,P.InputsModule]]}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:rn,decorators:[{type:h.NgModule,args:[{declarations:[on],exports:[on],imports:[j.CommonModule,Jt,P.InputsModule],entryComponents:[Ot,Bt]}]}]}),[V,n,e,o,t,et,Gt,M,F,s,N,C,B,b]),S=function(){};S.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,deps:[],target:i.ɵɵFactoryTarget.NgModule}),S.ɵmod=i.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,imports:[rn],exports:[V,n,e,o,t,et,Gt,M,F,s,N,C,B,b]}),S.ɵinj=i.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,imports:[[rn]]}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,decorators:[{type:h.NgModule,args:[{exports:[Ze],imports:[rn]}]}]}),l.CheckDirective=e,l.DataBoundComponent=I,l.DisableDirective=o,l.DragAndDropDirective=F,l.DragAndDropEditingDirective=C,l.DragClueTemplateDirective=s,l.DropHintTemplateDirective=N,l.ExpandDirective=t,l.ExpandableComponent=Be,l.FlatDataBindingDirective=M,l.HierarchyBindingDirective=Gt,l.LoadMoreButtonTemplateDirective=b,l.LoadMoreDirective=B,l.NodeTemplateDirective=n,l.SelectDirective=et,l.TreeItemDragEvent=ct,l.TreeItemDragStartEvent=at,l.TreeItemDropEvent=ot,l.TreeViewComponent=V,l.TreeViewModule=S,Object.defineProperty(l,"__esModule",{value:!0})});
|
|
5
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-angular-common"),require("@progress/kendo-angular-l10n"),require("rxjs"),require("@progress/kendo-licensing"),require("@progress/kendo-common"),require("@progress/kendo-angular-inputs"),require("@angular/animations"),require("rxjs/operators"),require("@angular/common"),require("@telerik/kendo-draggable")):"function"==typeof define&&define.amd?define("KendoAngularTreeview",["exports","@angular/core","@progress/kendo-angular-common","@progress/kendo-angular-l10n","rxjs","@progress/kendo-licensing","@progress/kendo-common","@progress/kendo-angular-inputs","@angular/animations","rxjs/operators","@angular/common","@telerik/kendo-draggable"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularTreeview={},e.ng.core,e.KendoAngularCommon,e.KendoAngularL10N,e.rxjs,e.KendoLicensing,e.KendoCommon,e.KendoAngularInputs,e.ng.animations,e.rxjs.operators,e.ng.common,e.Draggable)}(this,function(l,h,p,e,u,A,g,P,t,r,j,n){"use strict";function z(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function K(n){if(n&&n.__esModule)return n;var i=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),i.default=n,Object.freeze(i)}var i=K(h),L=K(e),o=K(P),s=K(j),_=z(n),H={name:"@progress/kendo-angular-treeview",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1650440753,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"},G=(Z.prototype.notify=function(){this.changes.emit()},Z);function Z(){this.changes=new h.EventEmitter}function q(){return!1}function X(){return"none"}function U(){return!1}function Y(){return!0}function $(){return!1}function Q(){return!0}function W(e,t){return t}J.prototype.expand=function(e,t){this.changes.next({dataItem:t,index:e,expand:!0})},J.prototype.collapse=function(e,t){this.changes.next({dataItem:t,index:e,expand:!1})};var a=J;function J(){this.changes=new u.Subject}a.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:a,deps:[],target:i.ɵɵFactoryTarget.Injectable}),a.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:a}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:a,decorators:[{type:h.Injectable}]});ee.prototype.nodeIndex=function(e,t){return""+(t=void 0===t?"":t)+(t?this.INDEX_SEPARATOR:"")+(e=void 0===e?"":e)},ee.prototype.indexForLevel=function(e,t){return e.split(this.INDEX_SEPARATOR).slice(0,t).join(this.INDEX_SEPARATOR)},ee.prototype.lastLevelIndex=function(e){e=(e=void 0===e?"":e).split(this.INDEX_SEPARATOR);return e.length?parseInt(e[e.length-1],10):NaN},ee.prototype.level=function(e){return e.split(this.INDEX_SEPARATOR).length};var d=ee;function ee(){this.INDEX_SEPARATOR="_"}d.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:d,deps:[],target:i.ɵɵFactoryTarget.Injectable}),d.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:d}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:d,decorators:[{type:h.Injectable}]});ne.prototype.notifyLoaded=function(e){this.changes.next(e)};var te=ne;function ne(){this.changes=new u.Subject}te.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:te,deps:[],target:i.ɵɵFactoryTarget.Injectable}),te.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:te}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:te,decorators:[{type:h.Injectable}]});function ie(e,t){if(!document.documentElement.contains(e))return null;for(var n=e;null!==n&&1===n.nodeType;){if(Te(n,t))return n;n=n.parentElement||n.parentNode}return null}function oe(){}function re(e){return null==e}function se(e){return Array.isArray(e)}function ae(e){return"boolean"==typeof e}function de(e){var t="li.k-treeview-item";return p.isDocumentAvailable()?e.closest?e.closest(t):ie(e,t):null}function ce(e){var t,n,i;return!!e.tagName&&(t=e.tagName.toLowerCase(),n="-1"===(i=e.getAttribute("tabIndex")),i=null!==i&&!n,we.test(t)?!e.disabled&&!n:i)}function le(e){if(p.isDocumentAvailable()){for(var t=e;t&&!Te(t,".k-treeview-leaf:not(.k-treeview-load-more-button),.k-treeview-item,.k-treeview");)t=t.parentNode;return t?Te(t,".k-treeview-leaf:not(.k-treeview-load-more-button)"):void 0}}function pe(e){return m(ie(e,".k-treeview-leaf.k-treeview-load-more-button"))}function he(e,t){return Boolean(function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}(e,function(e){return e===t}))}function ue(e){return e.nativeElement.querySelector('li[tabindex="0"]')}function ge(e){return e?e.getAttribute("data-treeindex"):""}function me(e){return(e||{}).index}function fe(e,t){return!m(e)&&!m(t)||m(e)&&m(t)&&e.item.dataItem===t.item.dataItem}function c(e){return m(e)?e.item.dataItem:e}function ye(e){return e&&Array.isArray(e)&&0!==e.length}function ve(e,r,t,s,a){var d=t.operator,c=t.ignoreCase,l=t.mode,p=(void 0===a&&(a=0),"string"==typeof s?s:s[a]);e.forEach(function(e){var n,i,o,t=("string"==typeof d?(n=p,i=d,o=c,function(e,t){return Me(Ee[i],o)(g.getter(n)(e),t)}):d)(e.dataItem,r);e.isMatch=t,e.visible=t,e.containsMatches=!1,t&&Ve(e.parent),e.children&&0<e.children.length&&("strict"!==l&&t?Oe(e.children):ve(e.children,r,{operator:d,ignoreCase:c,mode:l},s,a+1))})}function be(e,t){return[e,t].filter(function(e){return m(e)}).join("_")}function Ie(e,t){if(!m(e)||0===e.children.length)return[];var n=e.children;return(n=m(t)?n.filter(t):n).forEach(function(e){return n=n.concat(Ie(e,t))}),n}function xe(e,t){return e.size===t.size&&Array.from(e).every(function(e){return t.has(e)})}function ke(e,t){return{small:"k-"+e+"-sm",medium:"k-"+e+"-md",large:"k-"+e+"-lg"}[t]}function De(e){return e||{}}function Ce(e){return(e||{}).children||[]}function Se(e){if(!Array.isArray(e)||0===e.length)return null;for(var t=e.length-1;0<=t;--t){var n=e[t];if(n.visible)return n}return null}var we=/^(?:a|input|select|option|textarea|button|object)$/i,Te=function(e,t){var n=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return!!n&&n.call(e,t)},m=function(e){return null!=e},Ve=function(e){m(e)&&(e.containsMatches=!0,e.visible=!0,m(e.parent)&&!e.parent.containsMatches&&Ve(e.parent))},Oe=function(e){e.forEach(function(e){e.visible=!0,e.children&&Oe(e.children)})},Ee={contains:function(e,t){return 0<=e.indexOf(t)},doesnotcontain:function(e,t){return-1===e.indexOf(t)},startswith:function(e,t){return 0===e.lastIndexOf(t,0)},doesnotstartwith:function(e,t){return-1===e.lastIndexOf(t,0)},endswith:function(e,t){return 0<=e.indexOf(t,e.length-t.length)},doesnotendwith:function(e,t){return e.indexOf(t,e.length-t.length)<0}},Me=function(n,i){return function(e,t){return i?n(e.toLowerCase(),t.toLowerCase()):n(e,t)}},Ne=(f.prototype.firstVisibleNode=function(){return(this.nodes||[]).find(function(e){return e.visible})},f.prototype.lastVisibleNode=function(){for(var e=Se(this.nodes);m(e)&&0<Ce(e).length;){var t=Ce(e),t=Se(t);if(!m(t))return e;e=t}return e},f.prototype.closestNode=function(e){var t=De(this.findNode(e)).prev||this.firstVisibleNode();return(t||{}).index===e?this.visibleSibling(t,1):t},f.prototype.firstFocusableNode=function(){return this.nodes.find(function(e){return!e.disabled&&e.visible})},f.prototype.findNode=function(e){return this.find(e,this.nodes)},f.prototype.findParent=function(e){var t=this.ib.level(e)-1;return this.findNode(this.ib.indexForLevel(e,t))},f.prototype.findVisibleChild=function(e){e=this.findNode(e);return Ce(e).find(function(e){return e.visible})},f.prototype.findVisiblePrev=function(e){var e=e.index,t=this.findParent(e),n=this.ib.lastLevelIndex(e),i=this.container(t).slice(0,n).every(function(e){return!e.visible});if(0===n||i)return t;var n=this.findNode(e),o=this.visibleSibling(n,-1);if(o)for(var r=this.container(o);0<r.length&&r.some(function(e){return e.visible});)o=Se(r),r=this.container(o);return o},f.prototype.findVisibleNext=function(e){var t=this.container(e),n=t.some(function(e){return e.visible});return 0!==t.length&&n?t.find(function(e){return e.visible}):this.visibleSibling(e,1)},f.prototype.registerItem=function(e,t,n,i,o){void 0===i&&(i=!1),void 0===o&&(o=!0);var r=this.ib.level(t),s=this.findParent(t);!s&&1!==r||this.insert({id:e,children:[],index:t,parent:s,disabled:n,loadMoreButton:i,visible:o},s)},f.prototype.unregisterItem=function(e,t){t=this.find(t,this.nodes);t&&t.id===e&&(e=this.container(t.parent)).splice(e.indexOf(t),1)},f.prototype.childLevel=function(e){e=e.filter(function(e){return m(e)});return e&&e.length?this.ib.level(e[0].index):1},f.prototype.container=function(e){return e?e.children:this.nodes},f.prototype.find=function(e,t){var n=this.childLevel(t),i=this.ib.indexForLevel(e,n),n=n===this.ib.level(e),t=t.find(function(e){return e&&e.index===i});return t?n?t:this.find(e,t.children):null},f.prototype.insert=function(e,t){this.container(t).splice(this.ib.lastLevelIndex(e.index),0,e)},f.prototype.visibleSibling=function(e,t){if(!e)return null;for(var n=this.findParent(e.index),i=this.container(n),o=i.indexOf(e)+t,r=i[o];m(r);){if(r.visible)return r;r=i[o+=t]}return this.visibleSibling(n,t)},f);function f(){this.ib=new d,this.nodes=[]}Object.defineProperty(v.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"activeIndex",{get:function(){return me(this.activeItem)||null},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isActiveExpanded",{get:function(){return this.activeItem&&0<this.activeItem.children.length},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isLoadMoreButton",{get:function(){return this.activeItem&&this.activeItem.loadMoreButton},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"focusableItem",{get:function(){return this.activeItem||this.model.firstFocusableNode()},enumerable:!1,configurable:!0}),v.prototype.activate=function(e,t){void 0===t&&(t=!1),this.navigable&&e&&!this.isActive(me(e))&&(this.isFocused=!0,this.activeItem=e||this.activeItem,this.shouldScroll=t,this.notifyMove())},v.prototype.activateParent=function(e){this.activate(this.model.findParent(e))},v.prototype.activateIndex=function(e){e&&this.activate(this.model.findNode(e))},v.prototype.activateClosest=function(e){e&&me(this.focusableItem)===e&&(this.activeItem=this.model.closestNode(e),this.notifyMove())},v.prototype.activateFocusable=function(){this.activeItem||(this.activeItem=this.model.firstVisibleNode(),this.notifyMove())},v.prototype.deactivate=function(){this.navigable&&this.isFocused&&(this.isFocused=!1,this.notifyMove())},v.prototype.checkIndex=function(e){this.isDisabled(e)||this.checks.next(e)},v.prototype.selectIndex=function(e){this.isDisabled(e)||this.selects.next(e)},v.prototype.notifyLoadMore=function(e){m(e)&&this.loadMore.next(e)},v.prototype.isActive=function(e){return!!e&&(this.isFocused&&this.activeIndex===e)},v.prototype.isFocusable=function(e){return me(this.focusableItem)===e},v.prototype.isDisabled=function(e){return this.model.findNode(e).disabled},v.prototype.registerItem=function(e,t,n,i,o){void 0===i&&(i=!1),void 0===o&&(o=!0);var r=this.model.findNode(t);m(r)&&(this.model.unregisterItem(r.id,r.index),this.isActive(t)&&this.deactivate()),this.model.registerItem(e,t,n,i,o)},v.prototype.unregisterItem=function(e,t){this.isActive(t)&&this.activateParent(t),this.model.unregisterItem(e,t)},v.prototype.move=function(e){var t;!this.navigable||(t=this.actions[e.keyCode])&&(t(),e.preventDefault())},v.prototype.expand=function(e){var t=e.expand,e=e.intercept,n=me(this.activeItem);n&&!e(n)&&this.notifyExpand(t)},v.prototype.moveToParent=function(){return!this.isActiveExpanded&&(this.activate(this.model.findParent(me(this.activeItem))),!0)},v.prototype.moveToFirstVisibleChild=function(){return!!this.isActiveExpanded&&(this.activate(this.model.findVisibleChild(me(this.activeItem))),!0)},v.prototype.notifyExpand=function(e){this.expands.next(this.navigationState(e))},v.prototype.notifyMove=function(){this.moves.next(this.navigationState())},v.prototype.navigationState=function(e){return{expand:e=void 0===e?!1:e,index:this.activeIndex,isFocused:this.isFocused,shouldScroll:this.shouldScroll}},v.prototype.handleEnter=function(){this.navigable&&(this.isLoadMoreButton?this.notifyLoadMore(this.activeIndex):this.selectIndex(this.activeIndex))},v.prototype.handleSpace=function(){this.navigable&&(this.isLoadMoreButton?this.notifyLoadMore(this.activeIndex):this.checkIndex(this.activeIndex))};var y=v;function v(e){var t=this;this.localization=e,this.expands=new u.Subject,this.moves=new u.Subject,this.checks=new u.Subject,this.selects=new u.Subject,this.loadMore=new u.Subject,this.navigable=!0,this.actions=((e={})[p.Keys.ArrowUp]=function(){return t.activate(t.model.findVisiblePrev(t.focusableItem),!0)},e[p.Keys.ArrowDown]=function(){return t.activate(t.model.findVisibleNext(t.focusableItem),!0)},e[p.Keys.ArrowLeft]=function(){return!t.isLoadMoreButton&&t.expand({expand:t.localization.rtl,intercept:t.localization.rtl?t.moveToFirstVisibleChild:t.moveToParent})},e[p.Keys.ArrowRight]=function(){return!t.isLoadMoreButton&&t.expand({expand:!t.localization.rtl,intercept:t.localization.rtl?t.moveToParent:t.moveToFirstVisibleChild})},e[p.Keys.Home]=function(){return t.activate(t.model.firstVisibleNode(),!0)},e[p.Keys.End]=function(){return t.activate(t.model.lastVisibleNode(),!0)},e[p.Keys.Enter]=function(){return t.handleEnter()},e[p.Keys.Space]=function(){return t.handleSpace()},e),this.isFocused=!1,this.shouldScroll=!1,this._model=new Ne,this.moveToFirstVisibleChild=this.moveToFirstVisibleChild.bind(this),this.moveToParent=this.moveToParent.bind(this)}y.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:y,deps:[{token:L.LocalizationService}],target:i.ɵɵFactoryTarget.Injectable}),y.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:y}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:y,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:L.LocalizationService}]}});Re.prototype.childrenLoaded=function(e,t){this.changes.next({item:e,children:t})};var Fe=Re;function Re(){this.changes=new u.Subject}Fe.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Fe,deps:[],target:i.ɵɵFactoryTarget.Injectable}),Fe.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Fe}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Fe,decorators:[{type:h.Injectable}]});var n=function(e){this.templateRef=e},b=(n.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:n,deps:[{token:i.TemplateRef,optional:!0}],target:i.ɵɵFactoryTarget.Directive}),n.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:n,selector:"[kendoTreeViewNodeTemplate]",ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:n,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewNodeTemplate]"}]}],ctorParameters:function(){return[{type:i.TemplateRef,decorators:[{type:h.Optional}]}]}}),function(e){this.templateRef=e}),I=(b.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:b,deps:[{token:i.TemplateRef,optional:!0}],target:i.ɵɵFactoryTarget.Directive}),b.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:b,selector:"[kendoTreeViewLoadMoreButtonTemplate]",ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:b,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewLoadMoreButtonTemplate]"}]}],ctorParameters:function(){return[{type:i.TemplateRef,decorators:[{type:h.Optional}]}]}}),function(){}),Be=(I.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:I,deps:[],target:i.ɵɵFactoryTarget.Injectable}),I.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:I}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:I,decorators:[{type:h.Injectable}]}),function(){}),x=(Be.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Be,deps:[],target:i.ɵɵFactoryTarget.Injectable}),Be.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Be}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Be,decorators:[{type:h.Injectable}]}),Ae.prototype.isFirstSelected=function(e){return this.firstIndex===e},Ae.prototype.setFirstSelected=function(e,t){this.firstIndex===e&&!1===t?this.firstIndex=null:!this.firstIndex&&t&&(this.firstIndex=e)},Ae.prototype.select=function(e,t){this.changes.next({dataItem:t,index:e})},Ae);function Ae(){this.changes=new u.Subject}x.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:x,deps:[],target:i.ɵɵFactoryTarget.Injectable}),x.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:x}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:x,decorators:[{type:h.Injectable}]});var Pe=/\d+$/,k=(D.prototype.reset=function(){this.map.clear()},D.prototype.registerItem=function(e,t){t={children:[],item:e,parent:this.item(me(t))};this.map.set(e.index,t)},D.prototype.registerChildren=function(e,t){e=this.item(e);e&&(e.children=t)},D.prototype.unregisterItem=function(e,t){var n=this.item(e);n&&n.item.dataItem===t&&(this.map.delete(e),n.parent&&n.parent.children&&(n.parent.children=n.parent.children.filter(function(e){return e.dataItem!==t})))},D.prototype.replaceItem=function(e,t,n){t&&(this.unregisterItem(e,t.dataItem),this.registerItem(t,n),this.addToParent(t,n))},D.prototype.itemLookup=function(e){e=this.item(e);return e?{children:this.mapChildren(e.children),item:e.item,parent:e.parent}:null},D.prototype.hasItem=function(e){return this.map.has(e)},D.prototype.item=function(e){return this.map.get(e)||null},D.prototype.addToParent=function(e,t){var n;t&&(t=this.item(t.index),n=parseInt(Pe.exec(e.index)[0],10),t.children=t.children||[],t.children.splice(n,0,e))},D.prototype.mapChildren=function(e){var i=this;return(e=void 0===e?[]:e).map(function(e){var e=i.item(e.index),t=e.item,n=e.parent,e=e.children;return{children:i.mapChildren(e),item:t,parent:n}})},D);function D(){this.map=new Map}k.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:k,deps:[],target:i.ɵɵFactoryTarget.Injectable}),k.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:k}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:k,decorators:[{type:h.Injectable}]});Object.defineProperty(je.prototype,"classWrapper",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"indeterminate",{get:function(){return"indeterminate"===this.checkState},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"checked",{get:function(){return"checked"===this.checkState},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"checkBoxClasses",{get:function(){return"k-checkbox "+(this.size?ke("checkbox",this.size):"")+" k-rounded-md"},enumerable:!1,configurable:!0}),je.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.element.nativeElement,"tabindex")},je.prototype.ngDoCheck=function(){this.checkState=this.isChecked(this.node,this.index)},je.prototype.handleChange=function(e){e=e.target.checked?"checked":"none";this.checkState=e,this.changeDetector.detectChanges(),this.checkStateChange.emit(e)};var C=je;function je(e,t,n){this.element=e,this.renderer=t,this.changeDetector=n,this.id="_"+p.guid(),this.tabindex=0,this.size="medium",this.checkStateChange=new h.EventEmitter,this.checkState="none"}C.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:C,deps:[{token:i.ElementRef},{token:i.Renderer2},{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Component}),C.ɵcmp=i.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"kendo-checkbox",inputs:{id:"id",isChecked:"isChecked",node:"node",index:"index",labelText:"labelText",tabindex:"tabindex",size:"size"},outputs:{checkStateChange:"checkStateChange"},host:{properties:{"class.k-checkbox-wrapper":"this.classWrapper"}},ngImport:i,template:'\n <input\n type="checkbox"\n [class]="checkBoxClasses"\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 ',isInline:!0}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:C,decorators:[{type:h.Component,args:[{selector:"kendo-checkbox",template:'\n <input\n type="checkbox"\n [class]="checkBoxClasses"\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 '}]}],ctorParameters:function(){return[{type:i.ElementRef},{type:i.Renderer2},{type:i.ChangeDetectorRef}]},propDecorators:{classWrapper:[{type:h.HostBinding,args:["class.k-checkbox-wrapper"]}],id:[{type:h.Input}],isChecked:[{type:h.Input}],node:[{type:h.Input}],index:[{type:h.Input}],labelText:[{type:h.Input}],tabindex:[{type:h.Input}],size:[{type:h.Input}],checkStateChange:[{type:h.Output}]}});function ze(e,t){return{dataItem:t,index:e}}var Ke=0,S=(Object.defineProperty(w.prototype,"isChecked",{set:function(e){this.ariaChecked="checked"===e?"true":"indeterminate"===e?"mixed":"false"},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isExpanded",{get:function(){return this._isExpanded||!1},set:function(e){this._isExpanded=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isSelected",{get:function(){return this._isSelected||!1},set:function(e){this._isSelected=e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isButton",{get:function(){return"button"===this.role},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"treeItem",{get:function(){return ze(this.index,this.dataItem)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"parentTreeItem",{get:function(){return this.parentDataItem?ze(this.parentIndex,this.parentDataItem):null},enumerable:!1,configurable:!0}),w.prototype.ngOnInit=function(){this.loadOnDemand&&!this.isButton&&this.lookupService.registerItem(this.treeItem,this.parentTreeItem),this.registerNavigationItem(),this.isInitialized=!0,this.setAttribute("role",this.role),this.setAriaAttributes(),this.setDisabledClass(),this.updateTabIndex()},w.prototype.ngOnChanges=function(e){var t=e.index,n=e.isDisabled;p.anyChanged(["index","checkable","isChecked","expandable","isExpanded","selectable","isSelected"],e)&&this.setAriaAttributes(),n&&this.setDisabledClass(),this.loadOnDemand&&!this.isButton&&this.moveLookupItem(e),this.moveNavigationItem(t),p.anyChanged(["isDisabled","isVisible"],e)&&this.updateNodeAvailability()},w.prototype.ngOnDestroy=function(){this.navigationService.unregisterItem(this.id,this.index),this.loadOnDemand&&!this.isButton&&this.lookupService.unregisterItem(this.index,this.dataItem),this.subscriptions=this.subscriptions.reduce(function(e,t){return t.unsubscribe(),e},[])},w.prototype.subscribe=function(){var t=this;this.subscriptions=[this.navigationService.moves.subscribe(function(e){t.updateTabIndex(),t.focusItem(e.shouldScroll)}),this.navigationService.expands.pipe(r.filter(function(e){return e.index===t.index&&!t.isDisabled})).subscribe(function(e){e=e.expand;return t.expand(e)})]},w.prototype.registerNavigationItem=function(){this.navigationService.registerItem(this.id,this.index,this.isDisabled,this.isButton,this.isVisible),this.activateItem()},w.prototype.activateItem=function(){var e,t,n;this.isDisabled||(e=this.navigationService,t=this.selectionService,n=this.index,t.setFirstSelected(n,this.isSelected),!e.isActive(n)&&t.isFirstSelected(n)&&e.activateIndex(n))},w.prototype.expand=function(e){this.expandService[e?"expand":"collapse"](this.index,this.dataItem)},w.prototype.isFocusable=function(){return!this.isDisabled&&this.navigationService.isFocusable(this.index)},w.prototype.focusItem=function(e){void 0===e&&(e=!1),this.isInitialized&&this.navigationService.isActive(this.index)&&this.element.nativeElement.focus({preventScroll:!e})},w.prototype.moveLookupItem=function(e){var t=(e=void 0===e?{}:e).dataItem,n=e.index,i=e.parentDataItem,e=e.parentIndex;n&&n.firstChange||!t&&!n&&!i&&!e||(t=(n||{}).previousValue||this.index,this.lookupService.replaceItem(t,this.treeItem,this.parentTreeItem))},w.prototype.moveNavigationItem=function(e){var t=(e=void 0===e?{}:e).currentValue,n=e.firstChange,e=e.previousValue;!n&&m(t)&&m(e)&&(this.navigationService.unregisterItem(this.id,e),this.navigationService.registerItem(this.id,t,this.isDisabled,this.isButton))},w.prototype.updateNodeAvailability=function(){var e=this.navigationService;this.isDisabled||!this.isVisible?e.activateClosest(this.index):e.activateFocusable(),e.unregisterItem(this.id,this.index),e.registerItem(this.id,this.index,this.isDisabled,this.isButton,this.isVisible)},w.prototype.setAriaAttributes=function(){this.setAttribute("aria-level",this.ib.level(this.index).toString()),this.setAttribute("aria-expanded",this.expandable?this.isExpanded.toString():null),this.setAttribute("aria-selected",this.selectable?this.isSelected.toString():null),this.setAttribute("aria-checked",this.checkable?this.ariaChecked:null)},w.prototype.setDisabledClass=function(){this.setClass("k-disabled",this.isDisabled)},w.prototype.setClass=function(e,t){this.renderer[t?"addClass":"removeClass"](this.element.nativeElement,e)},w.prototype.updateTabIndex=function(){this.setAttribute("tabIndex",this.isFocusable()?"0":"-1")},w.prototype.setAttribute=function(e,t){m(t)?this.renderer.setAttribute(this.element.nativeElement,e,t):this.renderer.removeAttribute(this.element.nativeElement,e)},w);function w(e,t,n,i,o,r,s){this.element=e,this.expandService=t,this.navigationService=n,this.selectionService=i,this.lookupService=o,this.renderer=r,this.ib=s,this.role="treeitem",this.loadOnDemand=!0,this.isDisabled=!1,this.isVisible=!0,this.ariaChecked="false",this.id=Ke++,this.isInitialized=!1,this.subscriptions=[],this.subscribe()}S.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,deps:[{token:i.ElementRef},{token:a},{token:y},{token:x},{token:k},{token:i.Renderer2},{token:d}],target:i.ɵɵFactoryTarget.Directive}),S.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:S,selector:"[kendoTreeViewItem]",inputs:{dataItem:"dataItem",index:"index",parentDataItem:"parentDataItem",parentIndex:"parentIndex",role:"role",loadOnDemand:"loadOnDemand",checkable:"checkable",selectable:"selectable",expandable:"expandable",isChecked:"isChecked",isDisabled:"isDisabled",isVisible:"isVisible",isExpanded:"isExpanded",isSelected:"isSelected"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewItem]"}]}],ctorParameters:function(){return[{type:i.ElementRef},{type:a},{type:y},{type:x},{type:k},{type:i.Renderer2},{type:d}]},propDecorators:{dataItem:[{type:h.Input}],index:[{type:h.Input}],parentDataItem:[{type:h.Input}],parentIndex:[{type:h.Input}],role:[{type:h.Input}],loadOnDemand:[{type:h.Input}],checkable:[{type:h.Input}],selectable:[{type:h.Input}],expandable:[{type:h.Input}],isChecked:[{type:h.Input}],isDisabled:[{type:h.Input}],isVisible:[{type:h.Input}],isExpanded:[{type:h.Input}],isSelected:[{type:h.Input}]}});Object.defineProperty(_e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.cd.markForCheck()},enumerable:!1,configurable:!0}),_e.prototype.ngOnInit=function(){var t=this,n=this.loadingService.changes.pipe(r.filter(function(e){return e===t.index}));this.subscription=this.expandService.changes.pipe(r.filter(function(e){return e.index===t.index}),r.tap(function(e){!e.expand&&t.loading&&(t.loading=!1)}),r.filter(function(e){return e.expand}),r.switchMap(function(e){return u.of(e).pipe(r.delay(100),r.takeUntil(n))})).subscribe(function(){return t.loading=!0}),this.subscription.add(n.subscribe(function(){return t.loading=!1}))},_e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()};var Le=_e;function _e(e,t,n){this.expandService=e,this.loadingService=t,this.cd=n,this._loading=!1}Le.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Le,deps:[{token:a},{token:te},{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Directive}),Le.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:Le,selector:"[kendoTreeViewLoading]",inputs:{index:["kendoTreeViewLoading","index"]},host:{properties:{"class.k-i-loading":"this.loading"}},ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Le,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewLoading]"}]}],ctorParameters:function(){return[{type:a},{type:te},{type:i.ChangeDetectorRef}]},propDecorators:{loading:[{type:h.HostBinding,args:["class.k-i-loading"]}],index:[{type:h.Input,args:["kendoTreeViewLoading"]}]}});Ge.prototype.ngOnChanges=function(e){e.initialSelection&&this.updateSelectionClass(this.initialSelection),e.index&&this.updateFocusClass()},Ge.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},Ge.prototype.updateFocusClass=function(){this.render(this.navigationService.isActive(this.index),"k-focus")},Ge.prototype.updateSelectionClass=function(e){this.render(e,"k-selected")},Ge.prototype.render=function(e,t){this.renderer[e?"addClass":"removeClass"](this.element.nativeElement,t)};var He=Ge;function Ge(e,t,n,i){var o=this;this.element=e,this.navigationService=t,this.selectionService=n,this.renderer=i,this.initialSelection=!1,this.isSelected=$,this.subscriptions=new u.Subscription,this.subscriptions.add(this.navigationService.moves.subscribe(this.updateFocusClass.bind(this))),this.subscriptions.add(this.navigationService.selects.pipe(r.filter(function(e){return e===o.index})).subscribe(function(e){return o.selectionService.select(e,o.dataItem)})),this.subscriptions.add(this.selectionService.changes.subscribe(function(){o.updateSelectionClass(o.isSelected(o.dataItem,o.index))}))}He.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:He,deps:[{token:i.ElementRef},{token:y},{token:x},{token:i.Renderer2}],target:i.ɵɵFactoryTarget.Directive}),He.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:He,selector:"[kendoTreeViewItemContent]",inputs:{dataItem:"dataItem",index:"index",initialSelection:"initialSelection",isSelected:"isSelected"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:He,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewItemContent]"}]}],ctorParameters:function(){return[{type:i.ElementRef},{type:y},{type:x},{type:i.Renderer2}]},propDecorators:{dataItem:[{type:h.Input}],index:[{type:h.Input}],initialSelection:[{type:h.Input}],isSelected:[{type:h.Input}]}});var Ze="k-treeview-top",qe="k-treeview-bot",Xe=(Object.defineProperty(T.prototype,"moreNodesAvailable",{get:function(){return!(!m(this.loadMoreService)||0===this.data.length)&&this.pageSize<this.totalNodesCount},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"pageSize",{get:function(){return m(this.loadMoreService)?this.loadMoreService.getGroupSize(this.parentDataItem):null},set:function(e){this.loadMoreService.setGroupSize(this.parentDataItem,e)},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"data",{get:function(){var e;return m(this.pageSize)?(e=0<this.pageSize?this.pageSize:0,this._data.slice(0,e)):this._data},set:function(e){this._data=e,this.registerLoadedNodes(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"loadMoreButtonIndex",{get:function(){return this.loadMoreService?this.nodeIndex(this.data.length):null},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"totalNodesCount",{get:function(){return this.loadMoreService?this.loadMoreService.getTotalNodesCount(this.parentDataItem,this._data.length):this.data.length},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"hasTemplate",{get:function(){return m(this.nodeTemplateRef)},enumerable:!1,configurable:!0}),T.prototype.expandNode=function(e,t,n){n?this.expandService.expand(e,t):this.expandService.collapse(e,t)},T.prototype.checkNode=function(e){this.navigationService.checkIndex(e),this.navigationService.activateIndex(e)},T.prototype.nodeIndex=function(e){return this.indexBuilder.nodeIndex(e.toString(),this.parentIndex)},T.prototype.nodeText=function(e){var t=se(this.textField)?this.textField[0]:this.textField;return g.getter(t)(e)},T.prototype.ngOnDestroy=function(){m(this.nodesSubscription)&&this.nodesSubscription.unsubscribe(),m(this.loadMoreNodesSubscription)&&this.loadMoreNodesSubscription.unsubscribe(),this.singleRecordSubscriptions.unsubscribe()},T.prototype.ngOnInit=function(){var t=this;this.subscribeToNodesChange(),this.singleRecordSubscriptions.add(this.dataChangeNotification.changes.subscribe(this.subscribeToNodesChange.bind(this))),this.singleRecordSubscriptions.add(this.navigationService.loadMore.pipe(r.filter(function(e){return e===t.loadMoreButtonIndex})).subscribe(this.loadMoreNodes.bind(this)))},T.prototype.ngOnChanges=function(e){e.parentIndex&&this.loadOnDemand&&this.setNodeChildren(this.mapToTreeItem(this.data))},T.prototype.fetchChildren=function(e,t){var n=this;return this.children(e).pipe(r.catchError(function(){return n.loadingService.notifyLoaded(t),u.EMPTY}),r.tap(function(){return n.loadingService.notifyLoaded(t)}))},Object.defineProperty(T.prototype,"nextFields",{get:function(){return se(this.textField)?1<this.textField.length?this.textField.slice(1):this.textField:[this.textField]},enumerable:!1,configurable:!0}),T.prototype.loadMoreNodes=function(){m(this.loadMoreService.loadMoreNodes)?this.fetchMoreNodes():this.loadMoreLocalNodes()},T.prototype.setItemClasses=function(e,t){return 1===e?this.parentIndex?qe:Ze+" "+qe:0===t?Ze:0<t&&t<e-1?"k-treeview-mid":t===e-1?qe:void 0},T.prototype.loadMoreLocalNodes=function(){var e=this.loadMoreButtonIndex;this.pageSize+=this.loadMoreService.getInitialPageSize(this.parentDataItem),this.registerLoadedNodes(this.data),this.changeDetectorRef.detectChanges(),this.reselectItemAt(e)},T.prototype.fetchMoreNodes=function(){var n=this;this.loadingMoreNodes||(this.loadingMoreNodes=!0,m(this.loadMoreNodesSubscription)&&this.loadMoreNodesSubscription.unsubscribe(),this.loadMoreNodesSubscription=this.loadMoreService.loadMoreNodes({dataItem:this.parentDataItem,skip:this.data.length,take:this.loadMoreService.getInitialPageSize(this.parentDataItem)}).pipe(r.finalize(function(){return n.loadingMoreNodes=!1})).subscribe(function(e){var t;Array.isArray(e)&&0<e.length&&(t=n.loadMoreButtonIndex,n.pageSize+=e.length,n.data=n.data.concat(e),n.navigationService.isActive(t)&&(n.changeDetectorRef.detectChanges(),n.reselectItemAt(t)))}))},T.prototype.setNodeChildren=function(e){this.treeViewLookupService.registerChildren(this.parentIndex,e)},T.prototype.mapToTreeItem=function(e){var n=this;return this.parentIndex?e.map(function(e,t){return{dataItem:e,index:n.nodeIndex(t)}}):[]},T.prototype.emitChildrenLoaded=function(e){this.parentIndex&&(e=e.filter(function(e){return e.dataItem}),this.nodeChildrenService.childrenLoaded({dataItem:this.parentDataItem,index:this.parentIndex},e))},T.prototype.subscribeToNodesChange=function(){var t=this;this.nodesSubscription&&this.nodesSubscription.unsubscribe(),this.nodesSubscription=this.nodes(this.parentDataItem,this.parentIndex).subscribe(function(e){t.data=e,t.initialNodesLoaded=!0})},T.prototype.reselectItemAt=function(e){m(e)&&(this.navigationService.deactivate(),this.navigationService.activateIndex(e))},T.prototype.registerLoadedNodes=function(e){e=this.mapToTreeItem(e=void 0===e?[]:e);this.loadOnDemand&&this.setNodeChildren(e),this.emitChildrenLoaded(e)},T);function T(e,t,n,i,o,r,s,a){this.expandService=e,this.loadingService=t,this.indexBuilder=n,this.treeViewLookupService=i,this.navigationService=o,this.nodeChildrenService=r,this.dataChangeNotification=s,this.changeDetectorRef=a,this.kGroupClass=!0,this.role="group",this.loadOnDemand=!0,this.textField="",this.size="medium",this.initialNodesLoaded=!1,this.loadingMoreNodes=!1,this._data=[],this.singleRecordSubscriptions=new u.Subscription,this.isChecked=function(){return"none"},this.isDisabled=function(){return!1},this.isExpanded=function(){return!1},this.isVisible=function(){return!0},this.isSelected=function(){return!1},this.children=function(){return u.of([])},this.hasChildren=function(){return!1}}Xe.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Xe,deps:[{token:a},{token:te},{token:d},{token:k},{token:y},{token:Fe},{token:G},{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Component}),Xe.ɵcmp=i.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Xe,selector:"[kendoTreeViewGroup]",inputs:{checkboxes:"checkboxes",expandIcons:"expandIcons",disabled:"disabled",selectable:"selectable",touchActions:"touchActions",loadOnDemand:"loadOnDemand",trackBy:"trackBy",nodes:"nodes",textField:"textField",parentDataItem:"parentDataItem",parentIndex:"parentIndex",nodeTemplateRef:"nodeTemplateRef",loadMoreButtonTemplateRef:"loadMoreButtonTemplateRef",loadMoreService:"loadMoreService",size:"size",isChecked:"isChecked",isDisabled:"isDisabled",isExpanded:"isExpanded",isVisible:"isVisible",isSelected:"isSelected",children:"children",hasChildren:"hasChildren"},host:{properties:{"class.k-treeview-group":"this.kGroupClass","attr.role":"this.role"}},usesOnChanges:!0,ngImport:i,template:'\n <li\n *ngFor="let node of data; let index = index; trackBy: trackBy"\n class="k-treeview-item"\n [class.k-display-none]="!isVisible(node, nodeIndex(index))"\n kendoTreeViewItem\n [attr.aria-setsize]="totalNodesCount"\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [loadOnDemand]="loadOnDemand"\n [checkable]="checkboxes"\n [isChecked]="isChecked(node, nodeIndex(index))"\n [isDisabled]="disabled || isDisabled(node, nodeIndex(index))"\n [isVisible]="isVisible(node, nodeIndex(index))"\n [expandable]="expandIcons && hasChildren(node)"\n [isExpanded]="isExpanded(node, nodeIndex(index))"\n [selectable]="selectable"\n [isSelected]="isSelected(node, nodeIndex(index))"\n [attr.data-treeindex]="nodeIndex(index)"\n >\n <div [ngClass]="setItemClasses(data.length, index)">\n <span\n class="k-treeview-toggle"\n [kendoTreeViewLoading]="nodeIndex(index)"\n (click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="expandIcons && hasChildren(node)"\n >\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 >\n </span>\n </span>\n <kendo-checkbox\n *ngIf="checkboxes"\n [size]="size"\n [node]="node"\n [index]="nodeIndex(index)"\n [isChecked]="isChecked"\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 [initialSelection]="isSelected(node, nodeIndex(index))"\n [isSelected]="isSelected"\n class="k-treeview-leaf"\n [style.touch-action]="touchActions ? \'\' : \'none\'"\n >\n <span class="k-treeview-leaf-text">\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef"\n [ngTemplateOutletContext]="{\n $implicit: node,\n index: nodeIndex(index)\n }"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </span>\n </div>\n <ul\n *ngIf="isExpanded(node, nodeIndex(index)) && hasChildren(node)"\n kendoTreeViewGroup\n role="group"\n [nodes]="fetchChildren"\n [loadOnDemand]="loadOnDemand"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [selectable]="selectable"\n [touchActions]="touchActions"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [disabled]="disabled || isDisabled(node, nodeIndex(index))"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [isVisible]="isVisible"\n [nodeTemplateRef]="nodeTemplateRef"\n [loadMoreButtonTemplateRef]="loadMoreButtonTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [parentDataItem]="node"\n [textField]="nextFields"\n [loadMoreService]="loadMoreService"\n [@toggle]="true"\n [trackBy]="trackBy"\n >\n </ul>\n </li>\n <li\n *ngIf="initialNodesLoaded && moreNodesAvailable"\n class="k-treeview-item"\n [class.k-treeview-load-more-checkboxes-container]="checkboxes"\n kendoTreeViewItem\n role="button"\n [selectable]="false"\n [checkable]="false"\n [expandable]="false"\n [index]="loadMoreButtonIndex"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [attr.data-treeindex]="loadMoreButtonIndex"\n >\n <div class="k-treeview-mid">\n <span\n *ngIf="loadingMoreNodes"\n class="k-icon k-i-loading k-i-expand"\n >\n </span>\n <span\n class="k-treeview-leaf k-treeview-load-more-button"\n [attr.data-treeindex]="loadMoreButtonIndex"\n kendoTreeViewItemContent\n [index]="loadMoreButtonIndex"\n >\n <span class="k-treeview-leaf-text">\n <ng-template\n *ngIf="loadMoreButtonTemplateRef"\n [ngTemplateOutlet]="loadMoreButtonTemplateRef"\n [ngTemplateOutletContext]="{\n index: loadMoreButtonIndex\n }"\n >\n </ng-template>\n <ng-container *ngIf="!loadMoreButtonTemplateRef">\n Load more\n </ng-container>\n </span>\n </span>\n </div>\n </li>\n ',isInline:!0,components:[{type:C,selector:"kendo-checkbox",inputs:["id","isChecked","node","index","labelText","tabindex","size"],outputs:["checkStateChange"]},{type:Xe,selector:"[kendoTreeViewGroup]",inputs:["checkboxes","expandIcons","disabled","selectable","touchActions","loadOnDemand","trackBy","nodes","textField","parentDataItem","parentIndex","nodeTemplateRef","loadMoreButtonTemplateRef","loadMoreService","size","isChecked","isDisabled","isExpanded","isVisible","isSelected","children","hasChildren"]}],directives:[{type:s.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:S,selector:"[kendoTreeViewItem]",inputs:["dataItem","index","parentDataItem","parentIndex","role","loadOnDemand","checkable","selectable","expandable","isChecked","isDisabled","isVisible","isExpanded","isSelected"]},{type:s.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:Le,selector:"[kendoTreeViewLoading]",inputs:["kendoTreeViewLoading"]},{type:He,selector:"[kendoTreeViewItemContent]",inputs:["dataItem","index","initialSelection","isSelected"]},{type:s.NgSwitch,selector:"[ngSwitch]",inputs:["ngSwitch"]},{type:s.NgSwitchCase,selector:"[ngSwitchCase]",inputs:["ngSwitchCase"]},{type:s.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]},{type:s.NgSwitchDefault,selector:"[ngSwitchDefault]"}],animations:[t.trigger("toggle",[t.transition("void => *",[t.style({height:0}),t.animate("0.1s ease-in",t.style({height:"*"}))]),t.transition("* => void",[t.style({height:"*"}),t.animate("0.1s ease-in",t.style({height:0}))])])]}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Xe,decorators:[{type:h.Component,args:[{animations:[t.trigger("toggle",[t.transition("void => *",[t.style({height:0}),t.animate("0.1s ease-in",t.style({height:"*"}))]),t.transition("* => void",[t.style({height:"*"}),t.animate("0.1s ease-in",t.style({height:0}))])])],selector:"[kendoTreeViewGroup]",template:'\n <li\n *ngFor="let node of data; let index = index; trackBy: trackBy"\n class="k-treeview-item"\n [class.k-display-none]="!isVisible(node, nodeIndex(index))"\n kendoTreeViewItem\n [attr.aria-setsize]="totalNodesCount"\n [dataItem]="node"\n [index]="nodeIndex(index)"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [loadOnDemand]="loadOnDemand"\n [checkable]="checkboxes"\n [isChecked]="isChecked(node, nodeIndex(index))"\n [isDisabled]="disabled || isDisabled(node, nodeIndex(index))"\n [isVisible]="isVisible(node, nodeIndex(index))"\n [expandable]="expandIcons && hasChildren(node)"\n [isExpanded]="isExpanded(node, nodeIndex(index))"\n [selectable]="selectable"\n [isSelected]="isSelected(node, nodeIndex(index))"\n [attr.data-treeindex]="nodeIndex(index)"\n >\n <div [ngClass]="setItemClasses(data.length, index)">\n <span\n class="k-treeview-toggle"\n [kendoTreeViewLoading]="nodeIndex(index)"\n (click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"\n *ngIf="expandIcons && hasChildren(node)"\n >\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 >\n </span>\n </span>\n <kendo-checkbox\n *ngIf="checkboxes"\n [size]="size"\n [node]="node"\n [index]="nodeIndex(index)"\n [isChecked]="isChecked"\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 [initialSelection]="isSelected(node, nodeIndex(index))"\n [isSelected]="isSelected"\n class="k-treeview-leaf"\n [style.touch-action]="touchActions ? \'\' : \'none\'"\n >\n <span class="k-treeview-leaf-text">\n <ng-container [ngSwitch]="hasTemplate">\n <ng-container *ngSwitchCase="true">\n <ng-template\n [ngTemplateOutlet]="nodeTemplateRef"\n [ngTemplateOutletContext]="{\n $implicit: node,\n index: nodeIndex(index)\n }"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </span>\n </div>\n <ul\n *ngIf="isExpanded(node, nodeIndex(index)) && hasChildren(node)"\n kendoTreeViewGroup\n role="group"\n [nodes]="fetchChildren"\n [loadOnDemand]="loadOnDemand"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [selectable]="selectable"\n [touchActions]="touchActions"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [disabled]="disabled || isDisabled(node, nodeIndex(index))"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [isVisible]="isVisible"\n [nodeTemplateRef]="nodeTemplateRef"\n [loadMoreButtonTemplateRef]="loadMoreButtonTemplateRef"\n [parentIndex]="nodeIndex(index)"\n [parentDataItem]="node"\n [textField]="nextFields"\n [loadMoreService]="loadMoreService"\n [@toggle]="true"\n [trackBy]="trackBy"\n >\n </ul>\n </li>\n <li\n *ngIf="initialNodesLoaded && moreNodesAvailable"\n class="k-treeview-item"\n [class.k-treeview-load-more-checkboxes-container]="checkboxes"\n kendoTreeViewItem\n role="button"\n [selectable]="false"\n [checkable]="false"\n [expandable]="false"\n [index]="loadMoreButtonIndex"\n [parentDataItem]="parentDataItem"\n [parentIndex]="parentIndex"\n [attr.data-treeindex]="loadMoreButtonIndex"\n >\n <div class="k-treeview-mid">\n <span\n *ngIf="loadingMoreNodes"\n class="k-icon k-i-loading k-i-expand"\n >\n </span>\n <span\n class="k-treeview-leaf k-treeview-load-more-button"\n [attr.data-treeindex]="loadMoreButtonIndex"\n kendoTreeViewItemContent\n [index]="loadMoreButtonIndex"\n >\n <span class="k-treeview-leaf-text">\n <ng-template\n *ngIf="loadMoreButtonTemplateRef"\n [ngTemplateOutlet]="loadMoreButtonTemplateRef"\n [ngTemplateOutletContext]="{\n index: loadMoreButtonIndex\n }"\n >\n </ng-template>\n <ng-container *ngIf="!loadMoreButtonTemplateRef">\n Load more\n </ng-container>\n </span>\n </span>\n </div>\n </li>\n '}]}],ctorParameters:function(){return[{type:a},{type:te},{type:d},{type:k},{type:y},{type:Fe},{type:G},{type:i.ChangeDetectorRef}]},propDecorators:{kGroupClass:[{type:h.HostBinding,args:["class.k-treeview-group"]}],role:[{type:h.HostBinding,args:["attr.role"]}],checkboxes:[{type:h.Input}],expandIcons:[{type:h.Input}],disabled:[{type:h.Input}],selectable:[{type:h.Input}],touchActions:[{type:h.Input}],loadOnDemand:[{type:h.Input}],trackBy:[{type:h.Input}],nodes:[{type:h.Input}],textField:[{type:h.Input}],parentDataItem:[{type:h.Input}],parentIndex:[{type:h.Input}],nodeTemplateRef:[{type:h.Input}],loadMoreButtonTemplateRef:[{type:h.Input}],loadMoreService:[{type:h.Input}],size:[{type:h.Input}],isChecked:[{type:h.Input}],isDisabled:[{type:h.Input}],isExpanded:[{type:h.Input}],isVisible:[{type:h.Input}],isSelected:[{type:h.Input}],children:[{type:h.Input}],hasChildren:[{type:h.Input}]}});var t=[a,d,k,te,Fe,y,x,G,e.LocalizationService,{provide:e.L10N_PREFIX,useValue:"kendo.treeview"},{provide:I,useExisting:h.forwardRef(function(){return V})},{provide:Be,useExisting:h.forwardRef(function(){return V})}],V=(Object.defineProperty(O.prototype,"direction",{get:function(){return this.localization.rtl?"rtl":"ltr"},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"animate",{get:function(){return!this._animate},set:function(e){this._animate=e},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"nodeTemplateRef",{get:function(){return this._nodeTemplateRef||this.nodeTemplateQuery},set:function(e){this._nodeTemplateRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"loadMoreButtonTemplateRef",{get:function(){return this._loadMoreButtonTemplateRef||this.loadMoreButtonTemplateQuery},set:function(e){this._loadMoreButtonTemplateRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"nodes",{get:function(){return this.data.value},set:function(e){this.data.next(e||[]),this.dataChangeNotification.notify()},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"hasChildren",{get:function(){return this._hasChildren||q},set:function(e){this._hasChildren=e,this.expandIcons=Boolean(this._isExpanded&&this._hasChildren)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isChecked",{get:function(){return this._isChecked||X},set:function(e){this._isChecked=e,this.checkboxes=Boolean(this._isChecked)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isExpanded",{get:function(){return this._isExpanded||Y},set:function(e){this._isExpanded=e,this.expandIcons=Boolean(this._isExpanded&&this._hasChildren)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isSelected",{get:function(){return this._isSelected||$},set:function(e){this._isSelected=e,this.selectable=Boolean(this._isSelected)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"size",{get:function(){return this._size},set:function(e){var t=e||"medium";"none"!==this.size&&this.renderer.removeClass(this.element.nativeElement,ke("treeview",this.size)),this.renderer.addClass(this.element.nativeElement,ke("treeview",t)),this._size=e},enumerable:!1,configurable:!0}),O.prototype.ngOnChanges=function(e){this.navigationService.navigable=Boolean(this.navigable),p.anyChanged(["nodes","children","hasChildren","loadOnDemand"],e,!1)&&!this.loadOnDemand&&this.preloadChildNodes()},O.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe(),this.domSubscriptions.forEach(function(e){return e()})},O.prototype.ngOnInit=function(){var i=this;this.subscriptions.add(this.nodeChildrenService.changes.subscribe(function(e){return i.childrenLoaded.emit(e)})),this.subscriptions.add(this.expandService.changes.subscribe(function(e){var t=e.index,n=e.dataItem;return(e.expand?i.expand:i.collapse).emit({index:t,dataItem:n})})),this.subscriptions.add(this.navigationService.checks.subscribe(function(e){return i.checkedChange.emit(i.treeViewLookupService.itemLookup(e))})),this.subscriptions.add(this.selectionService.changes.subscribe(function(e){p.hasObservers(i.selectionChange)&&i.ngZone.run(function(){i.selectionChange.emit(e)})})),this.element&&this.ngZone.runOutsideAngular(function(){i.attachDomHandlers()}),this.size&&this.renderer.addClass(this.element.nativeElement,ke("treeview",this.size))},O.prototype.blur=function(){var e;p.isDocumentAvailable()&&(e=ue(this.element),document.activeElement===e&&e.blur())},O.prototype.focus=function(e){e=e||me(this.navigationService.focusableItem),this.navigationService.activateIndex(e),e=ue(this.element);e&&e.focus()},O.prototype.itemLookup=function(e){return this.treeViewLookupService.itemLookup(e)},O.prototype.rebindChildren=function(){this.dataChangeNotification.notify()},O.prototype.expandNode=function(e,t){this.expandService.expand(t,e)},O.prototype.collapseNode=function(e,t){this.expandService.collapse(t,e)},O.prototype.getNodePageSize=function(e){return this.verifyLoadMoreService(),this.loadMoreService.getGroupSize(e)},O.prototype.setNodePageSize=function(e,t){this.verifyLoadMoreService(),this.loadMoreService.setGroupSize(e,t)},O.prototype.preloadChildNodes=function(){this.treeViewLookupService.reset(),this.registerLookupItems(this.nodes)},O.prototype.attachDomHandlers=function(){var e=this.element.nativeElement;this.clickHandler=this.clickHandler.bind(this),this.domSubscriptions.push(this.renderer.listen(e,"contextmenu",this.clickHandler),this.renderer.listen(e,"click",this.clickHandler),this.renderer.listen(e,"dblclick",this.clickHandler),this.renderer.listen(e,"focusin",this.focusHandler.bind(this)),this.renderer.listen(e,"focusout",this.blurHandler.bind(this)),this.renderer.listen(e,"keydown",this.keydownHandler.bind(this)))},O.prototype.focusHandler=function(e){var t,n=this;Te(e.target,".k-treeview-item")?t=e.target:ce(e.target)||(t=de(e.target)),t&&(this.navigationService.activateIndex(ge(e.target)),!this.isActive&&p.hasObservers(this.onFocus)&&this.ngZone.run(function(){n.onFocus.emit()}),this.isActive=!0)},O.prototype.blurHandler=function(e){var t=this;!this.isActive||!Te(e.target,".k-treeview-item")||e.relatedTarget&&Te(e.relatedTarget,".k-treeview-item")&&he(e.relatedTarget,this.element.nativeElement)||(this.navigationService.deactivate(),this.isActive=!1,p.hasObservers(this.onBlur)&&this.ngZone.run(function(){t.onBlur.emit()}))},O.prototype.clickHandler=function(t){var n,i=this,e=t.target;"contextmenu"===t.type&&!p.hasObservers(this.nodeClick)||"click"===t.type&&!p.hasObservers(this.nodeClick)&&!p.hasObservers(this.selectionChange)&&!pe(e)||"dblclick"===t.type&&!p.hasObservers(this.nodeDblClick)||ce(e)||!le(e)&&!pe(e)||!he(e,this.element.nativeElement)||(n=ge(de(e)))&&!this.navigationService.isDisabled(n)&&this.ngZone.run(function(){var e=i.treeViewLookupService.itemLookup(n);if("click"===t.type){if(i.navigationService.model.findNode(n).loadMoreButton)return void i.navigationService.notifyLoadMore(n);i.navigationService.selectIndex(n)}("dblclick"===t.type?i.nodeDblClick:i.nodeClick).emit({item:e.item,originalEvent:t,type:t.type})})},O.prototype.keydownHandler=function(e){var t=this;this.isActive&&this.navigable&&this.ngZone.run(function(){t.navigationService.move(e)})},O.prototype.verifyLoadMoreService=function(){if(h.isDevMode()&&!m(this.loadMoreService))throw new Error("To use the TreeView paging functionality, you need to assign the `kendoTreeViewLoadMore` directive. See http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/.")},O.prototype.registerLookupItems=function(e,n){var i,o=this;void 0===n&&(n=null),m(e)&&0!==e.length&&(i=me(n),e=e.map(function(e,t){return t=t,n=i,m(e=e)?{dataItem:e,index:be(n,t)}:null;var n}),m(n)&&this.treeViewLookupService.registerChildren(i,e),e.forEach(function(t){o.treeViewLookupService.registerItem(t,n),o.hasChildren(t.dataItem)&&o.children(t.dataItem).subscribe(function(e){return o.registerLookupItems(e,t)})}))},O);function O(e,t,n,i,o,r,s,a,d,c,l){var p=this;this.element=e,this.changeDetectorRef=t,this.expandService=n,this.navigationService=i,this.nodeChildrenService=o,this.selectionService=r,this.treeViewLookupService=s,this.ngZone=a,this.renderer=d,this.dataChangeNotification=c,this.localization=l,this.classNames=!0,this.role="tree",this.filterInputPlaceholder="",this.fetchNodes=function(){return p.data},this.childrenLoaded=new h.EventEmitter,this.onBlur=new h.EventEmitter,this.onFocus=new h.EventEmitter,this.expand=new h.EventEmitter,this.collapse=new h.EventEmitter,this.nodeDragStart=new h.EventEmitter,this.nodeDrag=new h.EventEmitter,this.filterStateChange=new h.EventEmitter,this.nodeDrop=new h.EventEmitter,this.nodeDragEnd=new h.EventEmitter,this.addItem=new h.EventEmitter,this.removeItem=new h.EventEmitter,this.checkedChange=new h.EventEmitter,this.selectionChange=new h.EventEmitter,this.filterChange=new h.EventEmitter,this.nodeClick=new h.EventEmitter,this.nodeDblClick=new h.EventEmitter,this.trackBy=W,this.isDisabled=U,this.isVisible=Q,this.navigable=!0,this.children=function(){return u.of([])},this.loadOnDemand=!0,this.filterable=!1,this.filter="",this.checkboxes=!1,this.expandIcons=!1,this.selectable=!1,this.touchActions=!0,this.isActive=!1,this.data=new u.BehaviorSubject([]),this._animate=!0,this._size="medium",this.subscriptions=new u.Subscription,this.domSubscriptions=[],A.validatePackage(H)}V.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:V,deps:[{token:i.ElementRef},{token:i.ChangeDetectorRef},{token:a},{token:y},{token:Fe},{token:x},{token:k},{token:i.NgZone},{token:i.Renderer2},{token:G},{token:L.LocalizationService}],target:i.ɵɵFactoryTarget.Component}),V.ɵcmp=i.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:V,selector:"kendo-treeview",inputs:{filterInputPlaceholder:"filterInputPlaceholder",animate:"animate",nodeTemplateRef:["nodeTemplate","nodeTemplateRef"],loadMoreButtonTemplateRef:["loadMoreButtonTemplate","loadMoreButtonTemplateRef"],trackBy:"trackBy",nodes:"nodes",textField:"textField",hasChildren:"hasChildren",isChecked:"isChecked",isDisabled:"isDisabled",isExpanded:"isExpanded",isSelected:"isSelected",isVisible:"isVisible",navigable:"navigable",children:"children",loadOnDemand:"loadOnDemand",filterable:"filterable",filter:"filter",size:"size"},outputs:{childrenLoaded:"childrenLoaded",onBlur:"blur",onFocus:"focus",expand:"expand",collapse:"collapse",nodeDragStart:"nodeDragStart",nodeDrag:"nodeDrag",filterStateChange:"filterStateChange",nodeDrop:"nodeDrop",nodeDragEnd:"nodeDragEnd",addItem:"addItem",removeItem:"removeItem",checkedChange:"checkedChange",selectionChange:"selectionChange",filterChange:"filterChange",nodeClick:"nodeClick",nodeDblClick:"nodeDblClick"},host:{properties:{"class.k-treeview":"this.classNames","attr.role":"this.role","attr.dir":"this.direction","@.disabled":"this.animate"}},providers:t,queries:[{propertyName:"nodeTemplateQuery",first:!0,predicate:n,descendants:!0},{propertyName:"loadMoreButtonTemplateQuery",first:!0,predicate:b,descendants:!0}],viewQueries:[{propertyName:"assetsContainer",first:!0,predicate:["assetsContainer"],descendants:!0,read:h.ViewContainerRef,static:!0}],exportAs:["kendoTreeView"],usesOnChanges:!0,ngImport:i,template:'\n <span\n class="k-treeview-filter"\n *ngIf="filterable"\n >\n <kendo-textbox\n [size]="size"\n [value]="filter"\n [clearButton]="true"\n (valueChange)="filterChange.emit($event)"\n [placeholder]="filterInputPlaceholder"\n >\n <ng-template kendoTextBoxPrefixTemplate>\n <span class="k-input-icon k-icon k-i-search"></span>\n </ng-template>\n </kendo-textbox>\n </span>\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n role="group"\n [size]="size"\n [loadOnDemand]="loadOnDemand"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [selectable]="selectable"\n [touchActions]="touchActions"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [isVisible]="isVisible"\n [nodeTemplateRef]="nodeTemplateRef?.templateRef"\n [loadMoreButtonTemplateRef]="loadMoreButtonTemplateRef?.templateRef"\n [textField]="textField"\n [nodes]="fetchNodes"\n [loadMoreService]="loadMoreService"\n [trackBy]="trackBy"\n >\n </ul>\n <ng-container #assetsContainer></ng-container>\n ',isInline:!0,components:[{type:o.TextBoxComponent,selector:"kendo-textbox",inputs:["focusableId","title","disabled","readonly","tabindex","value","selectOnFocus","showSuccessIcon","showErrorIcon","clearButton","successIcon","errorIcon","clearButtonIcon","size","rounded","fillMode","tabIndex","placeholder","maxlength"],outputs:["valueChange","inputFocus","inputBlur","focus","blur"],exportAs:["kendoTextBox"]},{type:Xe,selector:"[kendoTreeViewGroup]",inputs:["checkboxes","expandIcons","disabled","selectable","touchActions","loadOnDemand","trackBy","nodes","textField","parentDataItem","parentIndex","nodeTemplateRef","loadMoreButtonTemplateRef","loadMoreService","size","isChecked","isDisabled","isExpanded","isVisible","isSelected","children","hasChildren"]}],directives:[{type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:o.TextBoxPrefixTemplateDirective,selector:"[kendoTextBoxPrefixTemplate]"}],changeDetection:i.ChangeDetectionStrategy.Default}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:V,decorators:[{type:h.Component,args:[{changeDetection:h.ChangeDetectionStrategy.Default,exportAs:"kendoTreeView",providers:t,selector:"kendo-treeview",template:'\n <span\n class="k-treeview-filter"\n *ngIf="filterable"\n >\n <kendo-textbox\n [size]="size"\n [value]="filter"\n [clearButton]="true"\n (valueChange)="filterChange.emit($event)"\n [placeholder]="filterInputPlaceholder"\n >\n <ng-template kendoTextBoxPrefixTemplate>\n <span class="k-input-icon k-icon k-i-search"></span>\n </ng-template>\n </kendo-textbox>\n </span>\n <ul class="k-treeview-lines"\n kendoTreeViewGroup\n role="group"\n [size]="size"\n [loadOnDemand]="loadOnDemand"\n [checkboxes]="checkboxes"\n [expandIcons]="expandIcons"\n [selectable]="selectable"\n [touchActions]="touchActions"\n [children]="children"\n [hasChildren]="hasChildren"\n [isChecked]="isChecked"\n [isDisabled]="isDisabled"\n [isExpanded]="isExpanded"\n [isSelected]="isSelected"\n [isVisible]="isVisible"\n [nodeTemplateRef]="nodeTemplateRef?.templateRef"\n [loadMoreButtonTemplateRef]="loadMoreButtonTemplateRef?.templateRef"\n [textField]="textField"\n [nodes]="fetchNodes"\n [loadMoreService]="loadMoreService"\n [trackBy]="trackBy"\n >\n </ul>\n <ng-container #assetsContainer></ng-container>\n '}]}],ctorParameters:function(){return[{type:i.ElementRef},{type:i.ChangeDetectorRef},{type:a},{type:y},{type:Fe},{type:x},{type:k},{type:i.NgZone},{type:i.Renderer2},{type:G},{type:L.LocalizationService}]},propDecorators:{classNames:[{type:h.HostBinding,args:["class.k-treeview"]}],role:[{type:h.HostBinding,args:["attr.role"]}],direction:[{type:h.HostBinding,args:["attr.dir"]}],assetsContainer:[{type:h.ViewChild,args:["assetsContainer",{read:h.ViewContainerRef,static:!0}]}],filterInputPlaceholder:[{type:h.Input}],animate:[{type:h.Input},{type:h.HostBinding,args:["@.disabled"]}],childrenLoaded:[{type:h.Output}],onBlur:[{type:h.Output,args:["blur"]}],onFocus:[{type:h.Output,args:["focus"]}],expand:[{type:h.Output}],collapse:[{type:h.Output}],nodeDragStart:[{type:h.Output}],nodeDrag:[{type:h.Output}],filterStateChange:[{type:h.Output}],nodeDrop:[{type:h.Output}],nodeDragEnd:[{type:h.Output}],addItem:[{type:h.Output}],removeItem:[{type:h.Output}],checkedChange:[{type:h.Output}],selectionChange:[{type:h.Output}],filterChange:[{type:h.Output}],nodeClick:[{type:h.Output}],nodeDblClick:[{type:h.Output}],nodeTemplateQuery:[{type:h.ContentChild,args:[n,{static:!1}]}],nodeTemplateRef:[{type:h.Input,args:["nodeTemplate"]}],loadMoreButtonTemplateQuery:[{type:h.ContentChild,args:[b,{static:!1}]}],loadMoreButtonTemplateRef:[{type:h.Input,args:["loadMoreButtonTemplate"]}],trackBy:[{type:h.Input}],nodes:[{type:h.Input}],textField:[{type:h.Input}],hasChildren:[{type:h.Input}],isChecked:[{type:h.Input}],isDisabled:[{type:h.Input}],isExpanded:[{type:h.Input}],isSelected:[{type:h.Input}],isVisible:[{type:h.Input}],navigable:[{type:h.Input}],children:[{type:h.Input}],loadOnDemand:[{type:h.Input}],filterable:[{type:h.Input}],filter:[{type:h.Input}],size:[{type:h.Input}]}});var Ue=function(e,t){return(Ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Ye(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ue(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function $e(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(i=r.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function Qe(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||((i=i||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;Object.defineProperty(E.prototype,"isChecked",{set:function(e){this.treeView.isChecked=e},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"options",{get:function(){var e={checkChildren:!0,checkParents:!0,enabled:!0,mode:"multiple"};if(!m(this.checkable)||"string"==typeof this.checkable)return e;var t=ae(this.checkable)?{enabled:this.checkable}:this.checkable;return Object.assign(e,t)},enumerable:!1,configurable:!0}),E.prototype.ngOnChanges=function(e){e.checkable&&(this.treeView.checkboxes=this.options.enabled,this.toggleCheckOnClick()),p.isChanged("checkedKeys",e,!1)&&e.checkedKeys.currentValue!==this.lastChange&&(this.state=new Set(e.checkedKeys.currentValue))},E.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe(),this.unsubscribeClick()},E.prototype.isItemChecked=function(e,t){return this.checkKey?this.state.has(this.itemKey({dataItem:e,index:t}))?"checked":"none":this.isIndexChecked(t)},E.prototype.isIndexChecked=function(e){var i,t,n=Array.from(this.state).filter((i=e,function(e){return i===e||!!e.split&&e.split("_").reduce(function(e,t){var n=e.key,e=e.result;return i===(n+=t)||e?{result:!0}:{key:n+="_",result:!1}},{key:"",result:!1}).result}));if(t=e,0<n.filter(function(e){return e===t}).length)return"checked";var e=this.options,o=e.mode,e=e.checkParents;return"multiple"===o&&e&&n.length?"indeterminate":"none"},E.prototype.itemKey=function(e){return m(this.checkKey)?"string"==typeof this.checkKey&&m(e.dataItem)?e.dataItem[this.checkKey]:"function"==typeof this.checkKey?this.checkKey(e):void 0:e.index},E.prototype.check=function(e){var t=this.options,n=t.enabled,t=t.mode,t=this.checkActions[t]||oe;n&&t(e)},E.prototype.checkSingle=function(e){var e=this.itemKey(e.item),t=this.state.has(e);this.state.clear(),t||this.state.add(e),this.notify()},E.prototype.checkMultiple=function(e){this.checkNode(e),this.options.checkParents&&this.checkParents(e.parent),this.notify()},E.prototype.toggleCheckOnClick=function(){var t=this;this.unsubscribeClick(),this.options.checkOnClick&&(this.clickSubscription=this.treeView.nodeClick.subscribe(function(e){"click"===e.type&&(e=t.treeView.itemLookup(e.item.index),t.check(e))}))},E.prototype.unsubscribeClick=function(){this.clickSubscription&&(this.clickSubscription.unsubscribe(),this.clickSubscription=null)},E.prototype.checkNode=function(e){var t,n,i,o=this;m(e.item.dataItem)&&!this.treeView.isDisabled(e.item.dataItem,e.item.index)&&(t=this.itemKey(e.item),m(t)&&(n=[t],this.options.checkChildren&&(e=Ie(e,function(e){e=e.item;return o.treeView.isVisible(e.dataItem,e.index)&&!o.treeView.isDisabled(e.dataItem,e.index)}).map(function(e){e=e.item;return o.itemKey(e)}),n.push.apply(n,Qe([],$e(e)))),i=!this.state.has(t),n.forEach(function(e){i?o.state.add(e):o.state.delete(e)})))},E.prototype.checkParents=function(e){var t=this;if(m(e))for(var n=e;n;){var i=this.itemKey(n.item);n.children.every(function(e){return t.state.has(t.itemKey(e))})?this.state.add(i):this.state.delete(i),n=n.parent}},E.prototype.notify=function(){this.lastChange=Array.from(this.state),this.checkedKeysChange.emit(this.lastChange)},E.prototype.addCheckedItemsChildren=function(e){var t,n=this;m(e)&&0!==e.length&&(t=this.state.size,e.forEach(function(t){var e=n.itemKey(t.item);n.state.has(e)&&t.children.forEach(function(e){n.treeView.isDisabled(t.item.dataItem,t.item.index)||n.treeView.isDisabled(e.dataItem,e.index)||n.state.add(n.itemKey(e))})}),t!==this.state.size&&this.zone.run(function(){return n.notify()}))};e=E;function E(e,t){var n=this,i=(this.treeView=e,this.zone=t,this.checkedKeysChange=new h.EventEmitter,this.subscriptions=new u.Subscription,this.checkActions={multiple:function(e){return n.checkMultiple(e)},single:function(e){return n.checkSingle(e)}},this.state=new Set,this.subscriptions.add(this.treeView.checkedChange.subscribe(function(e){return n.check(e)})),[]);this.subscriptions.add(this.treeView.childrenLoaded.pipe(r.filter(function(){return n.options.checkChildren&&n.treeView.loadOnDemand}),r.tap(function(e){return i.push(e)}),r.switchMap(function(){return n.zone.onStable.pipe(r.take(1))})).subscribe(function(){return n.addCheckedItemsChildren(i)})),this.treeView.isChecked=this.isItemChecked.bind(this)}e.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:e,deps:[{token:V},{token:i.NgZone}],target:i.ɵɵFactoryTarget.Directive}),e.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:e,selector:"[kendoTreeViewCheckable]",inputs:{isChecked:"isChecked",checkKey:["checkBy","checkKey"],checkedKeys:"checkedKeys",checkable:["kendoTreeViewCheckable","checkable"]},outputs:{checkedKeysChange:"checkedKeysChange"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:e,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewCheckable]"}]}],ctorParameters:function(){return[{type:V},{type:i.NgZone}]},propDecorators:{isChecked:[{type:h.Input}],checkKey:[{type:h.Input,args:["checkBy"]}],checkedKeys:[{type:h.Input}],checkable:[{type:h.Input,args:["kendoTreeViewCheckable"]}],checkedKeysChange:[{type:h.Output}]}});Object.defineProperty(We.prototype,"isDisabled",{set:function(e){this.treeView.isDisabled=e},enumerable:!1,configurable:!0}),We.prototype.ngOnChanges=function(e){e=(e=void 0===e?{}:e).disabledKeys;e&&!e.firstChange&&this.cdr.markForCheck()},We.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};o=We;function We(e,t){var n=this;this.treeView=e,this.cdr=t,this.disabledKeys=[],this.treeView.isDisabled=function(e,t){return-1<n.disabledKeys.indexOf(n.itemKey({dataItem:e,index:t}))}}o.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:o,deps:[{token:V},{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Directive}),o.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:o,selector:"[kendoTreeViewDisable]",inputs:{isDisabled:"isDisabled",disableKey:["kendoTreeViewDisable","disableKey"],disabledKeys:"disabledKeys"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:o,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewDisable]"}]}],ctorParameters:function(){return[{type:V},{type:i.ChangeDetectorRef}]},propDecorators:{isDisabled:[{type:h.Input}],disableKey:[{type:h.Input,args:["kendoTreeViewDisable"]}],disabledKeys:[{type:h.Input}]}});var Je={maxAutoExpandResults:-1,expandMatches:!1,expandedOnClear:"none"},t=(Object.defineProperty(et.prototype,"isExpanded",{set:function(e){this.component.isExpanded=e},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"filterExpandSettings",{get:function(){var e=ae(this.expandOnFilter)?{enabled:this.expandOnFilter}:Object.assign(Object.assign({},this.expandOnFilter),{enabled:!0});return Object.assign({},Je,e)},enumerable:!1,configurable:!0}),et.prototype.ngOnChanges=function(e){p.isChanged("expandedKeys",e,!1)&&e.expandedKeys.currentValue!==this.lastChange&&(this.state=new Set(e.expandedKeys.currentValue))},et.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},et.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},et.prototype.toggleExpand=function(e){var t=e.index,n=e.dataItem,e=e.expand,t=this.itemKey({index:t,dataItem:n}),n=this.state.has(t),i=!1;n&&!e?(this.state.delete(t),i=!0):!n&&e&&(this.state.add(t),i=!0),i&&this.notify()},et.prototype.handleAutoExpand=function(e){var n=this,t=e.nodes,i=e.matchCount,e=e.term;if(this.filterExpandSettings.enabled){var o=this.filterExpandSettings,r=o.maxAutoExpandResults,s=o.expandMatches,o=o.expandedOnClear;if(this.isFiltered||(this.originalExpandedKeys=new Set(this.state)),this.isFiltered&&!e||-1!==r&&r<i){switch(o){case"initial":xe(this.state,this.originalExpandedKeys)||(this.state=this.originalExpandedKeys,this.notify());break;case"all":this.state=new Set(t.reduce(function(e,t){return n.getEveryExpandKey(e,t),e},[])),this.notify();break;case"unchanged":break;default:0!==this.state.size&&(this.state.clear(),this.notify())}this.isFiltered=!1}else{e=new Set(t.reduce(function(e,t){return n.updateExpandedNodes(e,t,s),e},[]));xe(this.state,e)||(this.state=e,this.notify()),this.isFiltered=!0}}},et.prototype.notify=function(){this.lastChange=Array.from(this.state),this.expandedKeysChange.emit(this.lastChange)},et);function et(e){var i=this;this.component=e,this.expandOnFilter=!1,this.expandedKeysChange=new h.EventEmitter,this.subscriptions=new u.Subscription,this.state=new Set,this.originalExpandedKeys=new Set,this.isFiltered=!1,this.updateExpandedNodes=function(t,e,n){(e.containsMatches||e.isMatch&&n&&ye(e.children))&&t.push(i.itemKey({dataItem:e.dataItem,index:e.index})),ye(e.children)&&e.children.forEach(function(e){i.updateExpandedNodes(t,e,n)})},this.getEveryExpandKey=function(t,e){ye(e.children)&&t.push(i.itemKey({dataItem:e.dataItem,index:e.index})),ye(e.children)&&e.children.forEach(function(e){i.getEveryExpandKey(t,e)})},this.subscriptions.add(u.merge(this.component.expand.pipe(r.map(function(e){return Object.assign({expand:!0},e)})),this.component.collapse.pipe(r.map(function(e){return Object.assign({expand:!1},e)}))).subscribe(this.toggleExpand.bind(this))),this.component.filterStateChange&&this.subscriptions.add(this.component.filterStateChange.subscribe(this.handleAutoExpand.bind(this))),this.component.isExpanded=function(e,t){return i.state.has(i.itemKey({dataItem:e,index:t}))}}t.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:t,deps:[{token:Be}],target:i.ɵɵFactoryTarget.Directive}),t.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:t,selector:"[kendoTreeViewExpandable]",inputs:{isExpanded:"isExpanded",expandKey:["expandBy","expandKey"],expandOnFilter:"expandOnFilter",expandedKeys:"expandedKeys"},outputs:{expandedKeysChange:"expandedKeysChange"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:t,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewExpandable]"}]}],ctorParameters:function(){return[{type:Be}]},propDecorators:{isExpanded:[{type:h.Input}],expandKey:[{type:h.Input,args:["expandBy"]}],expandOnFilter:[{type:h.Input}],expandedKeysChange:[{type:h.Output}],expandedKeys:[{type:h.Input}]}});Object.defineProperty(it.prototype,"isSelected",{set:function(e){this.treeView.isSelected=e},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"getAriaMultiselectable",{get:function(){return"multiple"===this.options.mode},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"options",{get:function(){var e={enabled:!0,mode:"single"};if(!m(this.selection)||"string"==typeof this.selection)return e;var t=ae(this.selection)?{enabled:this.selection}:this.selection;return Object.assign(e,t)},enumerable:!1,configurable:!0}),it.prototype.ngOnChanges=function(e){p.isChanged("selectedKeys",e,!1)&&e.selectedKeys.currentValue!==this.lastChange&&(this.state=new Set(e.selectedKeys.currentValue))},it.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},it.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},it.prototype.select=function(e){var t=this.options,n=t.enabled,t=t.mode,t=this.selectActions[t]||oe;n&&t(e)},it.prototype.selectSingle=function(e){e=this.itemKey(e);this.state.has(e)||(this.state.clear(),this.state.add(e),this.notify())},it.prototype.selectMultiple=function(e){var e=this.itemKey(e),t=this.state.has(e);m(e)&&(t?this.state.delete(e):this.state.add(e),this.notify())},it.prototype.notify=function(){this.lastChange=Array.from(this.state),this.selectedKeysChange.emit(this.lastChange)};var tt,nt=it;function it(e){var n=this;this.treeView=e,this.selectedKeysChange=new h.EventEmitter,this.subscriptions=new u.Subscription,this.selectActions={multiple:function(e){return n.selectMultiple(e)},single:function(e){return n.selectSingle(e)}},this.state=new Set,this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this))),this.treeView.isSelected=function(e,t){return n.state.has(n.itemKey({dataItem:e,index:t}))}}nt.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:nt,deps:[{token:V}],target:i.ɵɵFactoryTarget.Directive}),nt.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:nt,selector:"[kendoTreeViewSelectable]",inputs:{isSelected:"isSelected",selectKey:["selectBy","selectKey"],selection:["kendoTreeViewSelectable","selection"],selectedKeys:"selectedKeys"},outputs:{selectedKeysChange:"selectedKeysChange"},host:{properties:{"attr.aria-multiselectable":"this.getAriaMultiselectable"}},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:nt,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewSelectable]"}]}],ctorParameters:function(){return[{type:V}]},propDecorators:{isSelected:[{type:h.Input}],selectKey:[{type:h.Input,args:["selectBy"]}],selection:[{type:h.Input,args:["kendoTreeViewSelectable"]}],selectedKeys:[{type:h.Input}],selectedKeysChange:[{type:h.Output}],getAriaMultiselectable:[{type:h.HostBinding,args:["attr.aria-multiselectable"]}]}}),l.DropAction=void 0,(M=l.DropAction||(l.DropAction={}))[M.Add=0]="Add",M[M.InsertTop=1]="InsertTop",M[M.InsertBottom=2]="InsertBottom",M[M.InsertMiddle=3]="InsertMiddle",M[M.Invalid=4]="Invalid",l.DropPosition=void 0,(M=l.DropPosition||(l.DropPosition={}))[M.Over=0]="Over",M[M.Before=1]="Before",M[M.After=2]="After",(M=tt=tt||{})[M.Up=-1]="Up",M[M.Down=1]="Down";ot.prototype.preventDefault=function(){this.prevented=!0},ot.prototype.isDefaultPrevented=function(){return this.prevented};var M=ot;function ot(){this.prevented=!1}Ye(at,rt=M),at.prototype.setValid=function(e){this.isValid=e};var rt,st=at;function at(e,t){var n=rt.call(this)||this;return n.isValid=!0,Object.assign(n,e),n.originalEvent=t,n}Ye(lt,dt=M);var dt,ct=lt;function lt(e){var t=dt.call(this)||this;return Object.assign(t,e),t}function pt(){}gt=!(ht=function(){if(!p.isDocumentAvailable()||!m(document.body))return!1;var e=document.createElement("div"),t=(e.style.transform="matrix(10, 0, 0, 10, 0, 0)",e.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(e),10!==e.children[0].getBoundingClientRect().top);return document.body.removeChild(e),t});var ht,ut,gt,mt=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return gt||(ut=ht.apply(void 0,Qe([],$e(e))),gt=!0),ut};function ft(e,t,n,i,o){if(m(e)&&m(t)&&m(i)&&m(o)){i=ie(t,".k-treeview-top, .k-treeview-mid, .k-treeview-bot");if(m(i)){var r=function(e){if(!m(e))return null;var t=".k-treeview-leaf:not(.k-treeview-load-more-button)";return Te(e,t)?e:e.querySelector(t)}(i),i=he(i,de(e));if(m(r)&&r!==e&&!i)return i=(e=r.getBoundingClientRect()).height/(le(t)?4:2),(r=n-o.top)<(t=e.top-o.top)+i?l.DropPosition.Before:r>=t+e.height-i?l.DropPosition.After:l.DropPosition.Over}}}function yt(e,t){return m(e)&&m(t)?(t=de(t),t=ge(t),e=e.itemLookup(t),m(e)&&m(e.item.dataItem)?e:null):null}function vt(e,t,n){m(e)&&0===t.length&&n.isExpanded(e.item.dataItem,e.item.index)&&n.collapseNode(e.item.dataItem,e.item.index)}function bt(e,t){t.isExpanded(e.item.dataItem,e.item.index)||t.expandNode(e.item.dataItem,e.item.index)}function It(e){return p.isDocumentAvailable()&&m(document.elementFromPoint)?document.elementFromPoint(e.clientX,e.clientY):e.target}function xt(e,t){var n=e.split("_"),t=t.split("_");if(n.length<t.length)return e;var i=t.length-1,o=t.slice(0,i).join("_"),i=n.slice(0,i).join("_"),r=t.length-1,t=Number(t[r]),s=Number(n[r]);return o===i&&t<s?(n[r]=String(s-1),n.join("_")):e}function kt(e,t,n){if(m(e)&&p.isDocumentAvailable())for(var i,o=e.scrollTop,r=t,s=0;o===e.scrollTop&&!(n===tt.Up&&Math.floor(e.scrollTop)<=0)&&!(n===tt.Down&&(i=e,Math.ceil(i.scrollTop)>=i.scrollHeight-i.clientHeight))&&s<20;)e.scrollTop+=r*n,r+=1,s+=1}function Dt(e,t,n){m(e.loadMoreService)&&(t=e.getNodePageSize(t),e.setNodePageSize(n,t))}function Ct(e,t){var n;m(e.loadMoreService)&&(n=e.getNodePageSize(t),e.setNodePageSize(t,n+1))}function St(e,t){var n;m(e.loadMoreService)&&(n=e.getNodePageSize(t),e.setNodePageSize(t,n-1))}var wt=new RegExp("(auto|scroll)"),Tt=(Vt.prototype.add=function(e){var t,n,i=e.sourceItem,o=e.destinationItem,r=e.dropPosition,s=e.sourceTree,e=e.destinationTree,a=Object.assign({},c(i)),d=(r===l.DropPosition.Over?(bt(o,e),d=this.childrenFor(c(o)),t=m(e.loadMoreService)?Math.min(e.loadMoreService.getGroupSize(c(o)),d.length):d.length,d.splice(t,0,a),g.setter(this.hierarchyBinding.childrenField)(c(o),d),this.movedItemNewIndex=be(o.item.index,t)):(d=this.getParentNodes(o,e),n=r===l.DropPosition.After?1:0,t=d.indexOf(c(o))+n,d.splice(t,0,a),n=o.parent?o.parent.item.index:null,this.movedItemNewIndex=be(n,t)),r===l.DropPosition.Over?c(o):c(o.parent));Ct(e,d),Dt(e,c(i),a),s===e||e.loadOnDemand||e.preloadChildNodes(),s!==e&&(e.changeDetectorRef.detectChanges(),e.focus(this.movedItemNewIndex))},Vt.prototype.remove=function(e){var t=e.sourceItem,n=e.sourceTree,e=e.destinationTree,i=this.getParentNodes(t,n),o=i.indexOf(c(t));i.splice(o,1),vt(t.parent,i,n),St(n,c(t.parent)),n.loadOnDemand||n.preloadChildNodes(),n===e&&(e.changeDetectorRef.detectChanges(),o=xt(this.movedItemNewIndex,t.item.index),e.focus(o))},Vt.prototype.getParentNodes=function(e,t){return m(e.parent)?this.childrenFor(c(e.parent)):t.nodes},Vt.prototype.childrenFor=function(e){return g.getter(this.hierarchyBinding.childrenField)(e)||[]},Vt);function Vt(e){this.hierarchyBinding=e}var Ot={operator:"contains",ignoreCase:!0,mode:"lenient"},M=(Object.defineProperty(Et.prototype,"filterSettings",{get:function(){return this._filterSettings},set:function(e){this._filterSettings=Object.assign(Object.assign({},Ot),e)},enumerable:!1,configurable:!0}),Object.defineProperty(Et.prototype,"filter",{set:function(e){this.handleFilterChange(e)},enumerable:!1,configurable:!0}),Et.prototype.handleFilterChange=function(e){this.filterData&&(this.resetNodesVisibility(this.filterData),e&&ve(this.filterData,e,this.filterSettings,this.component.textField),this.updateVisibleNodes(this.filterData),m(this.component.filterStateChange)&&this.component.filterStateChange.emit({nodes:this.filterData,matchCount:this.visibleNodes.size,term:e,filterSettings:this.filterSettings}))},Et.prototype.updateVisibleNodes=function(e){var t=this;e.forEach(function(e){e.visible&&t.visibleNodes.add(e.dataItem),e.children&&t.updateVisibleNodes(e.children)})},Et.prototype.resetNodesVisibility=function(e){var t=this;this.visibleNodes.clear(),e.forEach(function(e){e.visible=!0,e.children&&t.resetNodesVisibility(e.children)})},Et);function Et(e){this.component=e,this.visibleNodes=new Set,this._filterSettings=Ot}M.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:M,deps:[{token:I}],target:i.ɵɵFactoryTarget.Directive}),M.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:M,inputs:{filterSettings:"filterSettings",filter:"filter"},ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:M,decorators:[{type:h.Directive}],ctorParameters:function(){return[{type:I}]},propDecorators:{filterSettings:[{type:h.Input}],filter:[{type:h.Input}]}});Object.defineProperty(Nt.prototype,"statusIconClass",{get:function(){switch(this.action){case l.DropAction.Add:return"k-i-plus";case l.DropAction.InsertTop:return"k-i-insert-up";case l.DropAction.InsertBottom:return"k-i-insert-down";case l.DropAction.InsertMiddle:return"k-i-insert-middle";default:l.DropAction.Invalid;return"k-i-cancel"}},enumerable:!1,configurable:!0}),Nt.prototype.detectChanges=function(){this.cdr.detectChanges()};var Mt=Nt;function Nt(e){this.cdr=e,this.hostClasses=!0,this.posistionStyle="fixed"}Mt.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Mt,deps:[{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Component}),Mt.ɵcmp=i.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Mt,selector:"kendo-treeview-drag-clue",host:{properties:{"class.k-header":"this.hostClasses","class.k-drag-clue":"this.hostClasses","style.position":"this.posistionStyle"}},ngImport:i,template:'\n <ng-container *ngIf="!template">\n <span class="k-icon {{statusIconClass}} k-drag-status"></span>\n <span>{{text}}</span>\n </ng-container>\n\n <ng-template\n *ngIf="template"\n [ngTemplateOutlet]="template"\n [ngTemplateOutletContext]="{\n text: text,\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }"\n >\n </ng-template>\n ',isInline:!0,directives:[{type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:s.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]}],changeDetection:i.ChangeDetectionStrategy.OnPush}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Mt,decorators:[{type:h.Component,args:[{changeDetection:h.ChangeDetectionStrategy.OnPush,selector:"kendo-treeview-drag-clue",template:'\n <ng-container *ngIf="!template">\n <span class="k-icon {{statusIconClass}} k-drag-status"></span>\n <span>{{text}}</span>\n </ng-container>\n\n <ng-template\n *ngIf="template"\n [ngTemplateOutlet]="template"\n [ngTemplateOutletContext]="{\n text: text,\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }"\n >\n </ng-template>\n '}]}],ctorParameters:function(){return[{type:i.ChangeDetectorRef}]},propDecorators:{hostClasses:[{type:h.HostBinding,args:["class.k-header"]},{type:h.HostBinding,args:["class.k-drag-clue"]}],posistionStyle:[{type:h.HostBinding,args:["style.position"]}]}});Object.defineProperty(Ft.prototype,"componentRef",{get:function(){if(m(this._componentRef))return this._componentRef;throw new Error("The `initalize` method must be called before calling other service methods.")},set:function(e){this._componentRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"element",{get:function(){return this.componentRef.location.nativeElement},enumerable:!1,configurable:!0}),Ft.prototype.ngOnDestroy=function(){m(this._componentRef)&&(this.element.parentElement.removeChild(this.element),this.componentRef.destroy(),this.componentRef=null)},Ft.prototype.show=function(){this.element.style.display=""},Ft.prototype.hide=function(){this.element.style.display="none"},Ft.prototype.move=function(e,t,n){this.element.style.left=e+(n=void 0===n?0:n)+"px",this.element.style.top=t+n+"px"};var N=Ft;function Ft(){}N.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:N,deps:[],target:i.ɵɵFactoryTarget.Injectable}),N.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:N}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:N,decorators:[{type:h.Injectable}]});Ye(At,Rt=N),At.prototype.initialize=function(e,t){m(this._componentRef)&&this.ngOnDestroy();var n=this.componentFactoryResolver.resolveComponentFactory(Mt);this.componentRef=e.createComponent(n),this.hide(),this.componentRef.instance.template=t,this.componentRef.changeDetectorRef.detectChanges()},At.prototype.ngOnDestroy=function(){this.cancelReturnAnimation(),this.cancelScroll(),Rt.prototype.ngOnDestroy.call(this)},At.prototype.move=function(e,t){Rt.prototype.move.call(this,e,t,10)},At.prototype.animateDragClueToElementPosition=function(e){var t,n=this;m(e)&&m(this.element.animate)?(e=e.getBoundingClientRect(),t=this.element.getBoundingClientRect(),this.returnAnimation=this.element.animate([{transform:"translate(0, 0)"},{transform:"translate("+(e.left-t.left)+"px, "+(e.top-t.top)+"px)"}],200),this.returnAnimation.onfinish=function(){return n.hide()}):this.hide()},At.prototype.cancelReturnAnimation=function(){m(this.returnAnimation)&&(this.returnAnimation.cancel(),this.returnAnimation=null)},At.prototype.updateDragClueData=function(e,t,n){var i=this.componentRef.instance;e===i.action&&fe(t,i.sourceItem)&&fe(n,i.destinationItem)||(i.action=e,i.sourceItem=t,i.destinationItem=n,i.detectChanges())},At.prototype.updateText=function(e){e!==this.componentRef.instance.text&&(this.componentRef.instance.text=e,this.componentRef.instance.detectChanges())},At.prototype.scrollIntoView=function(e){var t,n,i,o,r=e.step,e=e.interval,s=(this.cancelScroll(),function(e){for(;m(e)&&"HTML"!==e.nodeName;){var t=e.scrollHeight>e.clientHeight,n=wt.test(getComputedStyle(e).overflowY);if(t&&n)return e;e=e.parentNode}return e}(this.element));m(s)&&(t=s.getBoundingClientRect(),n=this.element.getBoundingClientRect(),i=(o=Math.max(t.top,0))+n.height,o=o+Math.min(t.bottom,s.clientHeight),n.top<i?this.scrollInterval=setInterval(function(){return kt(s,r,tt.Up)},e):n.bottom>o&&(this.scrollInterval=setInterval(function(){return kt(s,r,tt.Down)},e)))},At.prototype.cancelScroll=function(){m(this.scrollInterval)&&(clearInterval(this.scrollInterval),this.scrollInterval=null)};var Rt,Bt=At;function At(e){var t=Rt.call(this)||this;return t.componentFactoryResolver=e,t}Bt.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Bt,deps:[{token:i.ComponentFactoryResolver}],target:i.ɵɵFactoryTarget.Injectable}),Bt.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Bt}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Bt,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:i.ComponentFactoryResolver}]}});jt.prototype.detectChanges=function(){this.changeDetectorRef.detectChanges()};var Pt=jt;function jt(e){this.changeDetectorRef=e,this.hostClass=!0,this.position="fixed",this.pointerEvents="none"}Pt.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Pt,deps:[{token:i.ChangeDetectorRef}],target:i.ɵɵFactoryTarget.Component}),Pt.ɵcmp=i.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Pt,selector:"kendo-treeview-drop-hint",host:{properties:{"class.k-drop-hint-container":"this.hostClass","style.position":"this.position","style.pointer-events":"this.pointerEvents"}},ngImport:i,template:'\n <div\n *ngIf="!template"\n class="k-drop-hint k-drop-hint-h"\n >\n <div class=\'k-drop-hint-start\'></div>\n <div class=\'k-drop-hint-line\'></div>\n </div>\n\n <ng-template\n *ngIf="template"\n [ngTemplateOutlet]="template"\n [ngTemplateOutletContext]="{\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }"\n >\n <ng-template>\n ',isInline:!0,directives:[{type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:s.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]}],changeDetection:i.ChangeDetectionStrategy.OnPush}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Pt,decorators:[{type:h.Component,args:[{changeDetection:h.ChangeDetectionStrategy.OnPush,selector:"kendo-treeview-drop-hint",template:'\n <div\n *ngIf="!template"\n class="k-drop-hint k-drop-hint-h"\n >\n <div class=\'k-drop-hint-start\'></div>\n <div class=\'k-drop-hint-line\'></div>\n </div>\n\n <ng-template\n *ngIf="template"\n [ngTemplateOutlet]="template"\n [ngTemplateOutletContext]="{\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }"\n >\n <ng-template>\n '}]}],ctorParameters:function(){return[{type:i.ChangeDetectorRef}]},propDecorators:{hostClass:[{type:h.HostBinding,args:["class.k-drop-hint-container"]}],position:[{type:h.HostBinding,args:["style.position"]}],pointerEvents:[{type:h.HostBinding,args:["style.pointer-events"]}]}});Ye(Lt,zt=N),Lt.prototype.initialize=function(e,t){m(this._componentRef)&&this.ngOnDestroy();var n=this.componentFactoryResolver.resolveComponentFactory(Pt);this.componentRef=e.createComponent(n),this.hide(),this.componentRef.instance.template=t,this.componentRef.changeDetectorRef.detectChanges()},Lt.prototype.updateDropHintData=function(e,t,n){var i=this.componentRef.instance;e===i.action&&fe(t,i.sourceItem)&&fe(n,i.destinationItem)||(i.action=e,i.sourceItem=t,i.destinationItem=n,i.detectChanges())};var zt,Kt=Lt;function Lt(e){var t=zt.call(this)||this;return t.componentFactoryResolver=e,t}Kt.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Kt,deps:[{token:i.ComponentFactoryResolver}],target:i.ɵɵFactoryTarget.Injectable}),Kt.ɵprov=i.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Kt}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:Kt,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:i.ComponentFactoryResolver}]}});var s=function(e){this.templateRef=e},N=(s.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:s,deps:[{token:i.TemplateRef,optional:!0}],target:i.ɵɵFactoryTarget.Directive}),s.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:s,selector:"[kendoTreeViewDragClueTemplate]",ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:s,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewDragClueTemplate]"}]}],ctorParameters:function(){return[{type:i.TemplateRef,decorators:[{type:h.Optional}]}]}}),function(e){this.templateRef=e}),_t=(N.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:N,deps:[{token:i.TemplateRef,optional:!0}],target:i.ɵɵFactoryTarget.Directive}),N.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:N,selector:"[kendoTreeViewDropHintTemplate]",ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:N,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewDropHintTemplate]"}]}],ctorParameters:function(){return[{type:i.TemplateRef,decorators:[{type:h.Optional}]}]}}),{enabled:!0,step:1,interval:1}),F=(Object.defineProperty(R.prototype,"scrollSettings",{get:function(){var e="boolean"==typeof this.autoScroll?{enabled:this.autoScroll}:this.autoScroll;return Object.assign({},_t,e)},enumerable:!1,configurable:!0}),R.prototype.ngAfterContentInit=function(){this.initalizeDraggable(),this.dragClueService.initialize(this.treeview.assetsContainer,this.dragClueTemplate&&this.dragClueTemplate.templateRef),this.dropHintService.initialize(this.treeview.assetsContainer,this.dropHintTemplate&&this.dropHintTemplate.templateRef)},R.prototype.ngOnDestroy=function(){this.draggable.destroy()},R.prototype.handlePress=function(e){e=e.originalEvent;le(e.target)&&(this.draggedItem=ie(e.target,".k-treeview-leaf"),this.pendingDragStartEvent=e)},R.prototype.handleDrag=function(e){var t,n,i,o,r,s,a=this,d=e.originalEvent,c=e.clientX,e=e.clientY;this.shouldInitiateDragStart({clientX:c,clientY:e})&&this.initiateDragStart(),m(this.draggedItem)&&!m(this.pendingDragStartEvent)&&(t=It(d),p.hasObservers(this.treeview.nodeDrag)&&this.zone.run(function(){return a.notifyDrag(d,t)}),s=this.getTargetTreeView(t),n=ft(this.draggedItem,t,e,s,this.containerOffset),i=ie(t,".k-treeview-top, .k-treeview-mid, .k-treeview-bot"),o=function(e,t){if(!m(e)||!m(t))return l.DropAction.Invalid;switch(e){case l.DropPosition.Over:return l.DropAction.Add;case l.DropPosition.Before:return m(de(t).previousElementSibling)?l.DropAction.InsertMiddle:l.DropAction.InsertTop;case l.DropPosition.After:return m(de(t).nextElementSibling)?l.DropAction.InsertMiddle:l.DropAction.InsertBottom;default:return l.DropAction.Invalid}}(n,t),r=yt(this.treeview,this.draggedItem),s=yt(s,t),this.updateDropHintState(n,i,o,r,s),this.updateDragClueState(o,c,e,r,s),this.scrollSettings.enabled&&this.dragClueService.scrollIntoView(this.scrollSettings))},R.prototype.handleRelease=function(e){var t=this,n=e.originalEvent,e=e.clientY;if(this.scrollSettings.enabled&&this.dragClueService.cancelScroll(),!m(this.draggedItem)||m(this.pendingDragStartEvent))return this.pendingDragStartEvent=null,void(this.draggedItem=null);var i=It(n),o=this.treeview,r=this.getTargetTreeView(i),s=ft(this.draggedItem,i,e,this.getTargetTreeView(i),this.containerOffset),a=yt(o,this.draggedItem),d=yt(r,i);m(d)&&m(s)?this.zone.run(function(){return t.notifyDrop({sourceItem:a,destinationItem:d,dropPosition:s,sourceTree:o,destinationTree:r},n)}):this.dragClueService.animateDragClueToElementPosition(this.draggedItem),p.hasObservers(this.treeview.nodeDragEnd)&&this.zone.run(function(){return t.notifyDragEnd({sourceItem:a,destinationItem:d,originalEvent:n})}),this.dropHintService.hide(),this.draggedItem=null},R.prototype.updateDropHintState=function(e,t,n,i,o){m(t)&&e!==l.DropPosition.Over&&m(e)?(t=t.getBoundingClientRect(),e=e===l.DropPosition.Before?t.top:t.top+t.height,this.dropHintService.updateDropHintData(n,i,o),this.dropHintService.move(t.left-this.containerOffset.left,e-this.containerOffset.top),this.dropHintService.show()):this.dropHintService.hide()},R.prototype.updateDragClueState=function(e,t,n,i,o){this.dragClueService.move(t-this.containerOffset.left,n-this.containerOffset.top),this.dragClueService.updateDragClueData(e,i,o),this.dragClueService.show()},R.prototype.initalizeDraggable=function(){var e=this;this.draggable=new _.default({press:this.handlePress.bind(this),drag:this.handleDrag.bind(this),release:this.handleRelease.bind(this)}),this.zone.runOutsideAngular(function(){return e.draggable.bindTo(e.element.nativeElement)})},R.prototype.notifyDragStart=function(e,t){t=yt(this.treeview,t),t=new ct({sourceItem:t,originalEvent:e});return this.treeview.nodeDragStart.emit(t),t},R.prototype.notifyDrag=function(e,t){t={sourceItem:yt(this.treeview,this.draggedItem),destinationItem:yt(this.getTargetTreeView(t),t),originalEvent:e};this.treeview.nodeDrag.emit(t)},R.prototype.notifyDrop=function(e,t){var n=new st(e,t);e.destinationTree.nodeDrop.emit(n),this.disableAnimationsForNextTick(e.destinationTree),e.sourceTree!==e.destinationTree&&this.disableAnimationsForNextTick(e.sourceTree),!n.isDefaultPrevented()&&n.isValid?(this.dragClueService.hide(),e.destinationTree.addItem.emit(e),t.ctrlKey&&this.allowCopy||e.sourceTree.removeItem.emit(e)):n.isDefaultPrevented()?this.dragClueService.hide():n.isValid||this.dragClueService.animateDragClueToElementPosition(this.draggedItem)},R.prototype.notifyDragEnd=function(e){this.treeview.nodeDragEnd.emit(e)},R.prototype.getTargetTreeView=function(e){var t=this.treeview.element.nativeElement.tagName,n=ie(e,t);return Qe([this.treeview],$e(this.dropZoneTreeViews)).find(function(e){return m(e)&&e.element.nativeElement===n})},R.prototype.disableAnimationsForNextTick=function(e){e.animate||(e.animate=!1,this.zone.runOutsideAngular(function(){return setTimeout(function(){return e.animate=!0})}))},R.prototype.shouldInitiateDragStart=function(e){return!!m(this.pendingDragStartEvent)&&Math.sqrt(Math.pow(this.pendingDragStartEvent.clientX-e.clientX,2)+Math.pow(this.pendingDragStartEvent.clientY-e.clientY,2))>=this.startDragAfter},R.prototype.initiateDragStart=function(){var e=this;if(p.hasObservers(this.treeview.nodeDragStart)&&this.zone.run(function(){return e.notifyDragStart(e.pendingDragStartEvent,It(e.pendingDragStartEvent))}).isDefaultPrevented())return this.pendingDragStartEvent=null,void(this.draggedItem=null);this.dragClueService.cancelReturnAnimation(),this.dragClueService.updateText(this.draggedItem.innerText),this.containerOffset=function(e){if(!e||!mt())return{left:0,top:0};for(var t=e.parentElement;t&&"none"===window.getComputedStyle(t).transform;)t=t.parentElement;return t?{left:(e=t.getBoundingClientRect()).left-t.scrollLeft,top:e.top-t.scrollTop}:{left:0,top:0}}(this.draggedItem),this.pendingDragStartEvent=null},R);function R(e,t,n,i,o){this.element=e,this.zone=t,this.treeview=n,this.dragClueService=i,this.dropHintService=o,this.allowCopy=!1,this.dropZoneTreeViews=[],this.startDragAfter=5,this.autoScroll=!0,this.userSelectStyle="none",this.containerOffset={top:0,left:0},this.treeview.touchActions=!1}F.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:F,deps:[{token:i.ElementRef},{token:i.NgZone},{token:V},{token:Bt},{token:Kt}],target:i.ɵɵFactoryTarget.Directive}),F.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:F,selector:"[kendoTreeViewDragAndDrop]",inputs:{allowCopy:"allowCopy",dropZoneTreeViews:"dropZoneTreeViews",startDragAfter:"startDragAfter",autoScroll:"autoScroll"},host:{properties:{"style.user-select":"this.userSelectStyle","style.-ms-user-select":"this.userSelectStyle","style.-moz-user-select":"this.userSelectStyle","style.-webkit-user-select":"this.userSelectStyle"}},providers:[Bt,Kt],queries:[{propertyName:"dragClueTemplate",first:!0,predicate:s,descendants:!0},{propertyName:"dropHintTemplate",first:!0,predicate:N,descendants:!0}],ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:F,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewDragAndDrop]",providers:[Bt,Kt]}]}],ctorParameters:function(){return[{type:i.ElementRef},{type:i.NgZone},{type:V},{type:Bt},{type:Kt}]},propDecorators:{allowCopy:[{type:h.Input}],dropZoneTreeViews:[{type:h.Input}],startDragAfter:[{type:h.Input}],autoScroll:[{type:h.Input}],dragClueTemplate:[{type:h.ContentChild,args:[s,{static:!1}]}],dropHintTemplate:[{type:h.ContentChild,args:[N,{static:!1}]}],userSelectStyle:[{type:h.HostBinding,args:["style.user-select"]},{type:h.HostBinding,args:["style.-ms-user-select"]},{type:h.HostBinding,args:["style.-moz-user-select"]},{type:h.HostBinding,args:["style.-webkit-user-select"]}]}});function Ht(e,i,o,r){return void 0===o&&(o=null),void 0===r&&(r=""),ye(e)?e.map(function(e,t){var t=Zt.nodeIndex(t.toString(),r),n={dataItem:e,index:t,parent:o,visible:!0};return n.children=Ht(g.getter(i)(e),i,n,t),n}):[]}var Gt,Zt=new d,qt=(Ye(Xt,Gt=M),Object.defineProperty(Xt.prototype,"childrenField",{get:function(){return this._childrenField},set:function(e){if(!e)throw new Error("'childrenField' cannot be empty");this._childrenField=e},enumerable:!1,configurable:!0}),Object.defineProperty(Xt.prototype,"nodes",{set:function(e){this.originalData=e||[],this.filterData=Ht(e,this.childrenField)||[],this.updateVisibleNodes(this.filterData)},enumerable:!1,configurable:!0}),Object.defineProperty(Xt.prototype,"isVisible",{set:function(e){this.component.isVisible=e},enumerable:!1,configurable:!0}),Xt.prototype.ngOnInit=function(){var t=this;m(this.childrenField)&&(this.component.children=function(e){return u.of(g.getter(t.childrenField)(e))},this.component.hasChildren=function(e){e=g.getter(t.childrenField)(e);return Boolean(e&&e.length)},this.component.editService=new Tt(this),this.component.filterChange.subscribe(this.handleFilterChange.bind(this)),this.component.filter&&this.handleFilterChange(this.component.filter),!this.loadOnDemand&&m(this.component.preloadChildNodes)&&this.component.preloadChildNodes())},Xt.prototype.ngOnChanges=function(e){p.isChanged("childrenField",e,!1)&&(this.nodes=this.originalData),p.anyChanged(["nodes","loadOnDemand"],e)&&!this.loadOnDemand&&m(this.component.preloadChildNodes)&&this.component.preloadChildNodes()},Xt);function Xt(e,t){var n=Gt.call(this,e)||this,e=(n.component=e,n.dragAndDropDirective=t,n.loadOnDemand=!0,n.originalData=[],!m(n.dragAndDropDirective));return n.component.isVisible=e?function(e){return n.visibleNodes.has(e)}:Q,n}qt.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:qt,deps:[{token:I},{token:F,host:!0,optional:!0}],target:i.ɵɵFactoryTarget.Directive}),qt.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:qt,selector:"[kendoTreeViewHierarchyBinding]",inputs:{childrenField:"childrenField",nodes:"nodes",isVisible:"isVisible",loadOnDemand:"loadOnDemand"},usesInheritance:!0,usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:qt,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewHierarchyBinding]"}]}],ctorParameters:function(){return[{type:I},{type:F,decorators:[{type:h.Optional},{type:h.Host}]}]},propDecorators:{childrenField:[{type:h.Input}],nodes:[{type:h.Input}],isVisible:[{type:h.Input}],loadOnDemand:[{type:h.Input}]}});Yt.prototype.add=function(e){var t,n,i=e.sourceItem,o=e.destinationItem,r=e.dropPosition,s=e.sourceTree,e=e.destinationTree,a=Object.assign({},c(i)),d=(r===l.DropPosition.Over?(bt(o,e),t=g.getter(this.flatBinding.idField)(c(o)),g.setter(this.flatBinding.parentIdField)(a,t),t=this.getLastVisibleChildNodeIndex(e,this.flatBinding.originalData,c(o))+1,this.flatBinding.originalData.splice(t,0,a),this.rebindData(),n=this.fetchChildNodes(c(o),e).indexOf(a),this.movedItemNewIndex=be(o.item.index,n)):(d=r===l.DropPosition.After?1:0,t=this.flatBinding.originalData.indexOf(c(o))+d,this.flatBinding.originalData.splice(t,0,a),d=g.getter(this.flatBinding.parentIdField)(c(o)),g.setter(this.flatBinding.parentIdField)(a,d),this.rebindData(),t=o.parent?o.parent.item.index:null,n=(o.parent?this.fetchChildNodes(c(o.parent),e):e.nodes).indexOf(a),this.movedItemNewIndex=be(t,n)),s!==e&&this.addChildNodes(a,s),r===l.DropPosition.Over?c(o):c(o.parent));Ct(e,d),Dt(e,c(i),a),s===e||e.loadOnDemand||e.preloadChildNodes(),s!==e&&(e.changeDetectorRef.detectChanges(),e.focus(this.movedItemNewIndex))},Yt.prototype.remove=function(e){var t=e.sourceItem,n=e.sourceTree,e=e.destinationTree,i=c(t),o=this.flatBinding.originalData.indexOf(i),o=(this.flatBinding.originalData.splice(o,1),n!==e&&this.removeChildNodes(i,n),this.rebindData(),t.parent?t.parent.children:[]);vt(t.parent,o,n),St(n,c(t.parent)),n.loadOnDemand||n.preloadChildNodes(),n===e&&(e.changeDetectorRef.detectChanges(),i=xt(this.movedItemNewIndex,t.item.index),e.focus(i))},Yt.prototype.addChildNodes=function(e,t){e=this.fetchAllDescendantNodes(e,t);(t=this.flatBinding.originalData).push.apply(t,Qe([],$e(e)))},Yt.prototype.removeChildNodes=function(e,t){var n=this;this.fetchAllDescendantNodes(e,t).forEach(function(e){e=n.flatBinding.originalData.indexOf(e);n.flatBinding.originalData.splice(e,1)})},Yt.prototype.fetchAllDescendantNodes=function(e,t){var n=this,i=this.fetchChildNodes(e,t);return i.forEach(function(e){return i=i.concat(n.fetchAllDescendantNodes(e,t)||[])}),i},Yt.prototype.fetchChildNodes=function(e,t){if(!e)return[];var n=[];return t.children(e).pipe(r.take(1)).subscribe(function(e){return n=n.concat(e||[])}),n},Yt.prototype.getLastVisibleChildNodeIndex=function(e,t,n){if(!m(e.loadMoreService)||!e.hasChildren(n))return t.length;var i=e.loadMoreService.getGroupSize(n),n=this.fetchChildNodes(n,e).slice(0,i),e=n[n.length-1];return t.indexOf(e)},Yt.prototype.rebindData=function(){this.flatBinding.nodes=this.flatBinding.originalData};var Ut=Yt;function Yt(e){this.flatBinding=e}function $t(t,e,n){return e.filter(function(e){return t(e)===n})}function Qt(e,i,o,r,s,a){return void 0===s&&(s=null),void 0===a&&(a=""),ye(e)?e.map(function(e,t){var t=Jt.nodeIndex(t.toString(),a),n={dataItem:e,index:t,parent:s,visible:!0};return n.children=Qt($t(g.getter(o),i||[],g.getter(r)(e)),i,o,r,n,t),n}):[]}var Wt,Jt=new d,M=(Ye(en,Wt=M),Object.defineProperty(en.prototype,"nodes",{set:function(e){this.originalData=e||[],e=this.parentIdField,re(e)||0===e.trim().length?this.component.nodes=this.originalData.slice(0):(e=g.getter(this.parentIdField),this.component.nodes=this.originalData.filter(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(re,e)),this.filterData=Qt(this.component.nodes,this.originalData,this.parentIdField,this.idField),this.updateVisibleNodes(this.filterData))},enumerable:!1,configurable:!0}),Object.defineProperty(en.prototype,"isVisible",{set:function(e){this.component.isVisible=e},enumerable:!1,configurable:!0}),en.prototype.ngOnInit=function(){var t,n=this;m(this.parentIdField)&&m(this.idField)&&(t=function(e){return $t(g.getter(n.parentIdField),n.originalData||[],g.getter(n.idField)(e))},this.component.hasChildren=function(e){return 0<t(e).length},this.component.children=function(e){return u.of(t(e))},this.component.editService=new Ut(this),this.component.filterChange.subscribe(this.handleFilterChange.bind(this)),this.component.filter&&this.handleFilterChange(this.component.filter),!this.loadOnDemand&&m(this.component.preloadChildNodes)&&this.component.preloadChildNodes())},en.prototype.ngOnChanges=function(e){p.isChanged("parentIdField",e,!1)&&(this.nodes=this.originalData),p.anyChanged(["nodes","loadOnDemand"],e)&&!this.loadOnDemand&&m(this.component.preloadChildNodes)&&this.component.preloadChildNodes()},en);function en(e){var t=Wt.call(this,e)||this;return t.component=e,t.loadOnDemand=!0,t.originalData=[],t.component.isVisible=function(e){return t.visibleNodes.has(e)},t}M.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:M,deps:[{token:I}],target:i.ɵɵFactoryTarget.Directive}),M.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:M,selector:"[kendoTreeViewFlatDataBinding]",inputs:{nodes:"nodes",parentIdField:"parentIdField",idField:"idField",loadOnDemand:"loadOnDemand",isVisible:"isVisible"},usesInheritance:!0,usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:M,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewFlatDataBinding]"}]}],ctorParameters:function(){return[{type:I}]},propDecorators:{nodes:[{type:h.Input}],parentIdField:[{type:h.Input}],idField:[{type:h.Input}],loadOnDemand:[{type:h.Input}],isVisible:[{type:h.Input}]}});var B=[C],tn=function(){},C=(tn.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:tn,deps:[],target:i.ɵɵFactoryTarget.NgModule}),tn.ɵmod=i.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:tn,declarations:[C],exports:[C]}),tn.ɵinj=i.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:tn}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:tn,decorators:[{type:h.NgModule,args:[{declarations:[B],exports:[B]}]}]}),Object.defineProperty(nn.prototype,"editService",{set:function(e){this.treeview.editService=e},enumerable:!1,configurable:!0}),nn.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},nn.prototype.handleAdd=function(e){if(!m(this.treeview.editService))throw new Error("No `editService` provided. Either provide your own implementation or use this directive in combination with one of the data binding directives (`kendoTreeViewHierarchyBinding` or `kendoTreeViewFlatDataBinding`).");this.treeview.editService.add(e)},nn.prototype.handleRemove=function(e){if(!m(this.treeview.editService))throw new Error("No `editService` provided. Either provide your own implementation or use this directive in combination with one of the data binding directives (`kendoTreeViewHierarchyBinding` or `kendoTreeViewFlatDataBinding`).");this.treeview.editService.remove(e)},nn);function nn(e){this.treeview=e,this.subscriptions=new u.Subscription,this.subscriptions.add(this.treeview.addItem.subscribe(this.handleAdd.bind(this))),this.subscriptions.add(this.treeview.removeItem.subscribe(this.handleRemove.bind(this)))}C.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:C,deps:[{token:V}],target:i.ɵɵFactoryTarget.Directive}),C.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"[kendoTreeViewDragAndDropEditing]",inputs:{editService:"editService"},ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:C,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewDragAndDropEditing]"}]}],ctorParameters:function(){return[{type:V}]},propDecorators:{editService:[{type:h.Input}]}});var on="http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/",B=(Object.defineProperty(rn.prototype,"loadMoreNodes",{set:function(e){"string"!=typeof e&&(this.treeview.loadMoreService.loadMoreNodes=e)},enumerable:!1,configurable:!0}),rn.prototype.ngOnChanges=function(){this.verifySettings()},rn.prototype.verifySettings=function(){if(h.isDevMode()){if(!m(this.pageSize))throw new Error("To use the TreeView `kendoTreeViewLoadMore` directive, you need to assign a `pageSize` value. See "+on+".");var e=this.treeview.loadMoreService.loadMoreNodes;if(m(e)&&"function"!=typeof e)throw new Error("The passed value to the `kendoTreeViewLoadMore` directive must be a function that retrieves additional nodes. See "+on+".");if(m(e)&&!m(this.totalField))throw new Error("When a function to fetch additional nodes is provided to the `kendoTreeViewLoadMore` directive, the `totalField` and `totalRootNodes` values must also be provided. See "+on+".")}},rn.prototype.getGroupSize=function(e){e=e||this.rootLevelId;return this.pageSizes.has(e)?this.pageSizes.get(e):this.pageSize},rn.prototype.setGroupSize=function(e,t){e=e||this.rootLevelId;this.pageSizes.set(e,0<t?t:0)},rn.prototype.getTotalNodesCount=function(e,t){return m(e)&&m(this.totalField)?e[this.totalField]:!m(e)&&m(this.totalRootNodes)?this.totalRootNodes:t},rn.prototype.getInitalPageSize=function(){return this.pageSize},rn);function rn(e){this.treeview=e,this.pageSizes=new Map,this.rootLevelId=p.guid(),this.treeview.loadMoreService={getInitialPageSize:this.getInitalPageSize.bind(this),getGroupSize:this.getGroupSize.bind(this),setGroupSize:this.setGroupSize.bind(this),getTotalNodesCount:this.getTotalNodesCount.bind(this)}}B.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:B,deps:[{token:V}],target:i.ɵɵFactoryTarget.Directive}),B.ɵdir=i.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:B,selector:"[kendoTreeViewLoadMore]",inputs:{loadMoreNodes:["kendoTreeViewLoadMore","loadMoreNodes"],pageSize:"pageSize",totalRootNodes:"totalRootNodes",totalField:"totalField"},usesOnChanges:!0,ngImport:i}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:B,decorators:[{type:h.Directive,args:[{selector:"[kendoTreeViewLoadMore]"}]}],ctorParameters:function(){return[{type:V}]},propDecorators:{loadMoreNodes:[{type:h.Input,args:["kendoTreeViewLoadMore"]}],pageSize:[{type:h.Input}],totalRootNodes:[{type:h.Input}],totalField:[{type:h.Input}]}});var sn=[V,Xe,S,He,n,e,o,t,nt,qt,Le,M,F,s,Mt,N,Pt,C,B,b],an=function(){},Xe=(an.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:an,deps:[],target:i.ɵɵFactoryTarget.NgModule}),an.ɵmod=i.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:an,declarations:[V,Xe,S,He,n,e,o,t,nt,qt,Le,M,F,s,Mt,N,Pt,C,B,b],imports:[j.CommonModule,tn,P.InputsModule],exports:[V,Xe,S,He,n,e,o,t,nt,qt,Le,M,F,s,Mt,N,Pt,C,B,b]}),an.ɵinj=i.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:an,imports:[[j.CommonModule,tn,P.InputsModule]]}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:an,decorators:[{type:h.NgModule,args:[{declarations:[sn],exports:[sn],imports:[j.CommonModule,tn,P.InputsModule],entryComponents:[Mt,Pt]}]}]}),[V,n,e,o,t,nt,qt,M,F,s,N,C,B,b]),S=function(){};S.ɵfac=i.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,deps:[],target:i.ɵɵFactoryTarget.NgModule}),S.ɵmod=i.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,imports:[an],exports:[V,n,e,o,t,nt,qt,M,F,s,N,C,B,b]}),S.ɵinj=i.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,imports:[[an]]}),i.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:i,type:S,decorators:[{type:h.NgModule,args:[{exports:[Xe],imports:[an]}]}]}),l.CheckDirective=e,l.DataBoundComponent=I,l.DisableDirective=o,l.DragAndDropDirective=F,l.DragAndDropEditingDirective=C,l.DragClueTemplateDirective=s,l.DropHintTemplateDirective=N,l.ExpandDirective=t,l.ExpandableComponent=Be,l.FlatDataBindingDirective=M,l.HierarchyBindingDirective=qt,l.LoadMoreButtonTemplateDirective=b,l.LoadMoreDirective=B,l.NodeTemplateDirective=n,l.SelectDirective=nt,l.TreeItemDragEvent=pt,l.TreeItemDragStartEvent=ct,l.TreeItemDropEvent=st,l.TreeViewComponent=V,l.TreeViewModule=S,Object.defineProperty(l,"__esModule",{value:!0})});
|
|
@@ -8,6 +8,8 @@ import { TreeItemLookup } from '../../treeitem-lookup.interface';
|
|
|
8
8
|
* [`nodeDragEnd`]({% slug api_treeview_treeviewcomponent %}#toc-nodedragend) events.
|
|
9
9
|
*/
|
|
10
10
|
export declare class TreeItemDragEvent {
|
|
11
|
+
/** @hidden */
|
|
12
|
+
constructor();
|
|
11
13
|
/**
|
|
12
14
|
* The look-up info for the dragged item.
|
|
13
15
|
*/
|
|
@@ -92,7 +92,7 @@ export const getDropPosition = (draggedItem, target, clientY, targetTreeView, co
|
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
// the .k-treeview-mid element starts just after the checkbox/expand arrow and stretches till the end of the treeview on the right
|
|
95
|
-
const item = closestWithMatch(target, '.k-treeview-mid');
|
|
95
|
+
const item = closestWithMatch(target, '.k-treeview-top, .k-treeview-mid, .k-treeview-bot');
|
|
96
96
|
if (!isPresent(item)) {
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
@@ -124,7 +124,7 @@ export class DragAndDropDirective {
|
|
|
124
124
|
}
|
|
125
125
|
const targetTreeView = this.getTargetTreeView(dropTarget);
|
|
126
126
|
const dropPosition = getDropPosition(this.draggedItem, dropTarget, clientY, targetTreeView, this.containerOffset);
|
|
127
|
-
const dropHintAnchor = closestWithMatch(dropTarget, '.k-treeview-mid');
|
|
127
|
+
const dropHintAnchor = closestWithMatch(dropTarget, '.k-treeview-top, .k-treeview-mid, .k-treeview-bot');
|
|
128
128
|
const dropAction = getDropAction(dropPosition, dropTarget);
|
|
129
129
|
const sourceItem = treeItemFromEventTarget(this.treeview, this.draggedItem);
|
|
130
130
|
const destinationItem = treeItemFromEventTarget(targetTreeView, dropTarget);
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-treeview',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1650440753,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -21,6 +21,9 @@ import * as i9 from "@angular/common";
|
|
|
21
21
|
import * as i10 from "./treeview-item.directive";
|
|
22
22
|
import * as i11 from "./loading-indicator.directive";
|
|
23
23
|
import * as i12 from "./treeview-item-content.directive";
|
|
24
|
+
const TOP_ITEM = 'k-treeview-top';
|
|
25
|
+
const MID_ITEM = 'k-treeview-mid';
|
|
26
|
+
const BOT_ITEM = 'k-treeview-bot';
|
|
24
27
|
/**
|
|
25
28
|
* @hidden
|
|
26
29
|
*/
|
|
@@ -158,6 +161,23 @@ export class TreeViewGroupComponent {
|
|
|
158
161
|
this.loadMoreLocalNodes();
|
|
159
162
|
}
|
|
160
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* @hidden
|
|
166
|
+
*/
|
|
167
|
+
setItemClasses(dataLength, index) {
|
|
168
|
+
if (dataLength === 1) {
|
|
169
|
+
return this.parentIndex ? BOT_ITEM : `${TOP_ITEM} ${BOT_ITEM}`;
|
|
170
|
+
}
|
|
171
|
+
if (index === 0) {
|
|
172
|
+
return TOP_ITEM;
|
|
173
|
+
}
|
|
174
|
+
if (index > 0 && index < dataLength - 1) {
|
|
175
|
+
return MID_ITEM;
|
|
176
|
+
}
|
|
177
|
+
if (index === dataLength - 1) {
|
|
178
|
+
return BOT_ITEM;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
161
181
|
loadMoreLocalNodes() {
|
|
162
182
|
const initialLoadMoreButtonIndex = this.loadMoreButtonIndex;
|
|
163
183
|
this.pageSize += this.loadMoreService.getInitialPageSize(this.parentDataItem);
|
|
@@ -261,7 +281,7 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
261
281
|
[isSelected]="isSelected(node, nodeIndex(index))"
|
|
262
282
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
263
283
|
>
|
|
264
|
-
<div
|
|
284
|
+
<div [ngClass]="setItemClasses(data.length, index)">
|
|
265
285
|
<span
|
|
266
286
|
class="k-treeview-toggle"
|
|
267
287
|
[kendoTreeViewLoading]="nodeIndex(index)"
|
|
@@ -383,7 +403,7 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
383
403
|
</span>
|
|
384
404
|
</div>
|
|
385
405
|
</li>
|
|
386
|
-
`, isInline: true, components: [{ type: i8.CheckBoxComponent, selector: "kendo-checkbox", inputs: ["id", "isChecked", "node", "index", "labelText", "tabindex", "size"], outputs: ["checkStateChange"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "isChecked", "isDisabled", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.LoadingIndicatorDirective, selector: "[kendoTreeViewLoading]", inputs: ["kendoTreeViewLoading"] }, { type: i12.TreeViewItemContentDirective, selector: "[kendoTreeViewItemContent]", inputs: ["dataItem", "index", "initialSelection", "isSelected"] }, { type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.NgSwitchDefault, selector: "[ngSwitchDefault]" }], animations: [
|
|
406
|
+
`, isInline: true, components: [{ type: i8.CheckBoxComponent, selector: "kendo-checkbox", inputs: ["id", "isChecked", "node", "index", "labelText", "tabindex", "size"], outputs: ["checkStateChange"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "isChecked", "isDisabled", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.LoadingIndicatorDirective, selector: "[kendoTreeViewLoading]", inputs: ["kendoTreeViewLoading"] }, { type: i12.TreeViewItemContentDirective, selector: "[kendoTreeViewItemContent]", inputs: ["dataItem", "index", "initialSelection", "isSelected"] }, { type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.NgSwitchDefault, selector: "[ngSwitchDefault]" }], animations: [
|
|
387
407
|
trigger('toggle', [
|
|
388
408
|
transition('void => *', [
|
|
389
409
|
style({ height: 0 }),
|
|
@@ -410,6 +430,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
410
430
|
])
|
|
411
431
|
])
|
|
412
432
|
],
|
|
433
|
+
// eslint-disable-next-line
|
|
413
434
|
selector: '[kendoTreeViewGroup]',
|
|
414
435
|
template: `
|
|
415
436
|
<li
|
|
@@ -433,7 +454,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
433
454
|
[isSelected]="isSelected(node, nodeIndex(index))"
|
|
434
455
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
435
456
|
>
|
|
436
|
-
<div
|
|
457
|
+
<div [ngClass]="setItemClasses(data.length, index)">
|
|
437
458
|
<span
|
|
438
459
|
class="k-treeview-toggle"
|
|
439
460
|
[kendoTreeViewLoading]="nodeIndex(index)"
|
|
@@ -25,7 +25,7 @@ const packageMetadata = {
|
|
|
25
25
|
name: '@progress/kendo-angular-treeview',
|
|
26
26
|
productName: 'Kendo UI for Angular',
|
|
27
27
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
28
|
-
publishDate:
|
|
28
|
+
publishDate: 1650440753,
|
|
29
29
|
version: '',
|
|
30
30
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
31
31
|
};
|
|
@@ -1487,6 +1487,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1487
1487
|
type: Input
|
|
1488
1488
|
}] } });
|
|
1489
1489
|
|
|
1490
|
+
const TOP_ITEM = 'k-treeview-top';
|
|
1491
|
+
const MID_ITEM = 'k-treeview-mid';
|
|
1492
|
+
const BOT_ITEM = 'k-treeview-bot';
|
|
1490
1493
|
/**
|
|
1491
1494
|
* @hidden
|
|
1492
1495
|
*/
|
|
@@ -1624,6 +1627,23 @@ class TreeViewGroupComponent {
|
|
|
1624
1627
|
this.loadMoreLocalNodes();
|
|
1625
1628
|
}
|
|
1626
1629
|
}
|
|
1630
|
+
/**
|
|
1631
|
+
* @hidden
|
|
1632
|
+
*/
|
|
1633
|
+
setItemClasses(dataLength, index) {
|
|
1634
|
+
if (dataLength === 1) {
|
|
1635
|
+
return this.parentIndex ? BOT_ITEM : `${TOP_ITEM} ${BOT_ITEM}`;
|
|
1636
|
+
}
|
|
1637
|
+
if (index === 0) {
|
|
1638
|
+
return TOP_ITEM;
|
|
1639
|
+
}
|
|
1640
|
+
if (index > 0 && index < dataLength - 1) {
|
|
1641
|
+
return MID_ITEM;
|
|
1642
|
+
}
|
|
1643
|
+
if (index === dataLength - 1) {
|
|
1644
|
+
return BOT_ITEM;
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1627
1647
|
loadMoreLocalNodes() {
|
|
1628
1648
|
const initialLoadMoreButtonIndex = this.loadMoreButtonIndex;
|
|
1629
1649
|
this.pageSize += this.loadMoreService.getInitialPageSize(this.parentDataItem);
|
|
@@ -1727,7 +1747,7 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1727
1747
|
[isSelected]="isSelected(node, nodeIndex(index))"
|
|
1728
1748
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
1729
1749
|
>
|
|
1730
|
-
<div
|
|
1750
|
+
<div [ngClass]="setItemClasses(data.length, index)">
|
|
1731
1751
|
<span
|
|
1732
1752
|
class="k-treeview-toggle"
|
|
1733
1753
|
[kendoTreeViewLoading]="nodeIndex(index)"
|
|
@@ -1849,7 +1869,7 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1849
1869
|
</span>
|
|
1850
1870
|
</div>
|
|
1851
1871
|
</li>
|
|
1852
|
-
`, isInline: true, components: [{ type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["id", "isChecked", "node", "index", "labelText", "tabindex", "size"], outputs: ["checkStateChange"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "isChecked", "isDisabled", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: LoadingIndicatorDirective, selector: "[kendoTreeViewLoading]", inputs: ["kendoTreeViewLoading"] }, { type: TreeViewItemContentDirective, selector: "[kendoTreeViewItemContent]", inputs: ["dataItem", "index", "initialSelection", "isSelected"] }, { type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.NgSwitchDefault, selector: "[ngSwitchDefault]" }], animations: [
|
|
1872
|
+
`, isInline: true, components: [{ type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["id", "isChecked", "node", "index", "labelText", "tabindex", "size"], outputs: ["checkStateChange"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "isChecked", "isDisabled", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: LoadingIndicatorDirective, selector: "[kendoTreeViewLoading]", inputs: ["kendoTreeViewLoading"] }, { type: TreeViewItemContentDirective, selector: "[kendoTreeViewItemContent]", inputs: ["dataItem", "index", "initialSelection", "isSelected"] }, { type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.NgSwitchDefault, selector: "[ngSwitchDefault]" }], animations: [
|
|
1853
1873
|
trigger('toggle', [
|
|
1854
1874
|
transition('void => *', [
|
|
1855
1875
|
style({ height: 0 }),
|
|
@@ -1876,6 +1896,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1876
1896
|
])
|
|
1877
1897
|
])
|
|
1878
1898
|
],
|
|
1899
|
+
// eslint-disable-next-line
|
|
1879
1900
|
selector: '[kendoTreeViewGroup]',
|
|
1880
1901
|
template: `
|
|
1881
1902
|
<li
|
|
@@ -1899,7 +1920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1899
1920
|
[isSelected]="isSelected(node, nodeIndex(index))"
|
|
1900
1921
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
1901
1922
|
>
|
|
1902
|
-
<div
|
|
1923
|
+
<div [ngClass]="setItemClasses(data.length, index)">
|
|
1903
1924
|
<span
|
|
1904
1925
|
class="k-treeview-toggle"
|
|
1905
1926
|
[kendoTreeViewLoading]="nodeIndex(index)"
|
|
@@ -3535,6 +3556,8 @@ class TreeItemDragStartEvent extends PreventableEvent {
|
|
|
3535
3556
|
* [`nodeDragEnd`]({% slug api_treeview_treeviewcomponent %}#toc-nodedragend) events.
|
|
3536
3557
|
*/
|
|
3537
3558
|
class TreeItemDragEvent {
|
|
3559
|
+
/** @hidden */
|
|
3560
|
+
constructor() { }
|
|
3538
3561
|
}
|
|
3539
3562
|
|
|
3540
3563
|
/**
|
|
@@ -3624,7 +3647,7 @@ const getDropPosition = (draggedItem, target, clientY, targetTreeView, container
|
|
|
3624
3647
|
return;
|
|
3625
3648
|
}
|
|
3626
3649
|
// the .k-treeview-mid element starts just after the checkbox/expand arrow and stretches till the end of the treeview on the right
|
|
3627
|
-
const item = closestWithMatch(target, '.k-treeview-mid');
|
|
3650
|
+
const item = closestWithMatch(target, '.k-treeview-top, .k-treeview-mid, .k-treeview-bot');
|
|
3628
3651
|
if (!isPresent(item)) {
|
|
3629
3652
|
return;
|
|
3630
3653
|
}
|
|
@@ -4495,7 +4518,7 @@ class DragAndDropDirective {
|
|
|
4495
4518
|
}
|
|
4496
4519
|
const targetTreeView = this.getTargetTreeView(dropTarget);
|
|
4497
4520
|
const dropPosition = getDropPosition(this.draggedItem, dropTarget, clientY, targetTreeView, this.containerOffset);
|
|
4498
|
-
const dropHintAnchor = closestWithMatch(dropTarget, '.k-treeview-mid');
|
|
4521
|
+
const dropHintAnchor = closestWithMatch(dropTarget, '.k-treeview-top, .k-treeview-mid, .k-treeview-bot');
|
|
4499
4522
|
const dropAction = getDropAction(dropPosition, dropTarget);
|
|
4500
4523
|
const sourceItem = treeItemFromEventTarget(this.treeview, this.draggedItem);
|
|
4501
4524
|
const destinationItem = treeItemFromEventTarget(targetTreeView, dropTarget);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-treeview",
|
|
3
|
-
"version": "7.0.0
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Kendo UI TreeView for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"tslib": "^2.3.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@angular/animations": "
|
|
32
|
-
"@angular/common": "
|
|
33
|
-
"@angular/core": "
|
|
34
|
-
"@progress/kendo-angular-common": "
|
|
35
|
-
"@progress/kendo-angular-inputs": "
|
|
36
|
-
"@progress/kendo-angular-l10n": "
|
|
31
|
+
"@angular/animations": "12 - 14",
|
|
32
|
+
"@angular/common": "12 - 14",
|
|
33
|
+
"@angular/core": "12 - 14",
|
|
34
|
+
"@progress/kendo-angular-common": "^3.0.0",
|
|
35
|
+
"@progress/kendo-angular-inputs": "^9.0.0",
|
|
36
|
+
"@progress/kendo-angular-l10n": "^4.0.0",
|
|
37
37
|
"@progress/kendo-licensing": "^1.1.1",
|
|
38
38
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
39
39
|
},
|
|
@@ -64,12 +64,10 @@
|
|
|
64
64
|
"release": {
|
|
65
65
|
"debug": false,
|
|
66
66
|
"branchTags": {
|
|
67
|
-
"develop": "dev"
|
|
68
|
-
"ng12-update": "next"
|
|
67
|
+
"develop": "dev"
|
|
69
68
|
},
|
|
70
69
|
"fallbackTags": {
|
|
71
|
-
"dev": "latest"
|
|
72
|
-
"next": "latest"
|
|
70
|
+
"dev": "latest"
|
|
73
71
|
},
|
|
74
72
|
"analyzeCommits": "@telerik/semantic-prerelease/analyzeCommits",
|
|
75
73
|
"generateNotes": "@progress/kendo-angular-tasks/lib/generateNotes",
|
|
@@ -8,8 +8,8 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
8
8
|
function default_1(options) {
|
|
9
9
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'TreeViewModule', package: 'treeview', peerDependencies: {
|
|
10
10
|
// Peers of kendo-angular-inputs
|
|
11
|
-
"@progress/kendo-angular-intl": "^
|
|
12
|
-
"@progress/kendo-angular-popup": "^
|
|
11
|
+
"@progress/kendo-angular-intl": "^4.0.0",
|
|
12
|
+
"@progress/kendo-angular-popup": "^5.0.0",
|
|
13
13
|
"@progress/kendo-drawing": "^1.9.3"
|
|
14
14
|
} });
|
|
15
15
|
return schematics_1.externalSchematic('@progress/kendo-schematics', 'ng-add', finalOptions);
|
|
@@ -79,6 +79,10 @@ export declare class TreeViewGroupComponent implements OnChanges, OnInit, OnDest
|
|
|
79
79
|
fetchChildren(node: any, index: string): Observable<any>;
|
|
80
80
|
get nextFields(): string[];
|
|
81
81
|
loadMoreNodes(): void;
|
|
82
|
+
/**
|
|
83
|
+
* @hidden
|
|
84
|
+
*/
|
|
85
|
+
setItemClasses(dataLength: number, index: any): string;
|
|
82
86
|
private loadMoreLocalNodes;
|
|
83
87
|
private fetchMoreNodes;
|
|
84
88
|
private setNodeChildren;
|