| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/tree"),require("@angular/core"),require("@angular/material/core"),require("@angular/cdk/coercion"),require("@angular/cdk/collections"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/material/tree",["exports","@angular/cdk/tree","@angular/core","@angular/material/core","@angular/cdk/coercion","@angular/cdk/collections","rxjs","rxjs/operators"],t):t(((e=e||self).ng=e.ng||{},e.ng.material=e.ng.material||{},e.ng.material.tree={}),e.ng.cdk.tree,e.ng.core,e.ng.material.core,e.ng.cdk.coercion,e.ng.cdk.collections,e.rxjs,e.rxjs.operators)}(this,(function(e,t,r,n,o,a,i,s){"use strict"; |
| /*! ***************************************************************************** |
| Copyright (c) Microsoft Corporation. |
| |
| Permission to use, copy, modify, and/or distribute this software for any |
| purpose with or without fee is hereby granted. |
| |
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
| REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
| AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
| INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
| LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
| OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| PERFORMANCE OF THIS SOFTWARE. |
| ***************************************************************************** */var d=function(e,t){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function u(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e}var p=function(e){function t(t,r,n){var o=e.call(this,t,r)||this;return o._elementRef=t,o._tree=r,o.tabIndex=Number(n)||0,o._elementRef.nativeElement.classList.add("mat-tree-node"),o}return c(t,e),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},t.prototype.ngDoCheck=function(){e.prototype.ngDoCheck.call(this)},t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this)},t}(n.mixinTabIndex(n.mixinDisabled(t.CdkTreeNode)));p.decorators=[{type:r.Directive,args:[{selector:"mat-tree-node",exportAs:"matTreeNode",inputs:["role","disabled","tabIndex"],providers:[{provide:t.CdkTreeNode,useExisting:p}]}]}],p.ctorParameters=function(){return[{type:r.ElementRef},{type:t.CdkTree},{type:String,decorators:[{type:r.Attribute,args:["tabindex"]}]}]};var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t}(t.CdkTreeNodeDef);f.decorators=[{type:r.Directive,args:[{selector:"[matTreeNodeDef]",inputs:["when: matTreeNodeDefWhen"],providers:[{provide:t.CdkTreeNodeDef,useExisting:f}]}]}],f.propDecorators={data:[{type:r.Input,args:["matTreeNode"]}]};var g=function(e){function t(t,r,n,o){var a=e.call(this,t,r,n)||this;return a._elementRef=t,a._tree=r,a._differs=n,a._disabled=!1,a.tabIndex=Number(o)||0,a._elementRef.nativeElement.classList.add("mat-nested-tree-node"),a}return c(t,e),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=o.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return this.disabled?-1:this._tabIndex},set:function(e){this._tabIndex=null!=e?e:0},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},t.prototype.ngDoCheck=function(){e.prototype.ngDoCheck.call(this)},t.prototype.ngAfterContentInit=function(){e.prototype.ngAfterContentInit.call(this)},t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this)},t}(t.CdkNestedTreeNode);g.decorators=[{type:r.Directive,args:[{selector:"mat-nested-tree-node",exportAs:"matNestedTreeNode",inputs:["role","disabled","tabIndex"],providers:[{provide:t.CdkNestedTreeNode,useExisting:g},{provide:t.CdkTreeNode,useExisting:g},{provide:t.CDK_TREE_NODE_OUTLET_NODE,useExisting:g}]}]}],g.ctorParameters=function(){return[{type:r.ElementRef},{type:t.CdkTree},{type:r.IterableDiffers},{type:String,decorators:[{type:r.Attribute,args:["tabindex"]}]}]},g.propDecorators={node:[{type:r.Input,args:["matNestedTreeNode"]}],disabled:[{type:r.Input}],tabIndex:[{type:r.Input}]};var y,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),Object.defineProperty(t.prototype,"level",{get:function(){return this._level},set:function(e){this._setLevelInput(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indent",{get:function(){return this._indent},set:function(e){this._setIndentInput(e)},enumerable:!1,configurable:!0}),t}(t.CdkTreeNodePadding);h.decorators=[{type:r.Directive,args:[{selector:"[matTreeNodePadding]",providers:[{provide:t.CdkTreeNodePadding,useExisting:h}]}]}],h.propDecorators={level:[{type:r.Input,args:["matTreeNodePadding"]}],indent:[{type:r.Input,args:["matTreeNodePaddingIndent"]}]},(y=function y(e,t){this.viewContainer=e,this._node=t}).decorators=[{type:r.Directive,args:[{selector:"[matTreeNodeOutlet]",providers:[{provide:t.CdkTreeNodeOutlet,useExisting:y}]}]}],y.ctorParameters=function(){return[{type:r.ViewContainerRef},{type:void 0,decorators:[{type:r.Inject,args:[t.CDK_TREE_NODE_OUTLET_NODE]},{type:r.Optional}]}]};var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t}(t.CdkTree);v.decorators=[{type:r.Component,args:[{selector:"mat-tree",exportAs:"matTree",template:"<ng-container matTreeNodeOutlet></ng-container>",host:{class:"mat-tree cdk-tree",role:"tree"},encapsulation:r.ViewEncapsulation.None,changeDetection:r.ChangeDetectionStrategy.Default,providers:[{provide:t.CdkTree,useExisting:v}],styles:[".mat-tree{display:block}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word}.mat-nested-tree-node{border-bottom-width:0}\n"]}]}],v.propDecorators={_nodeOutlet:[{type:r.ViewChild,args:[y,{static:!0}]}]};var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),Object.defineProperty(t.prototype,"recursive",{get:function(){return this._recursive},set:function(e){this._recursive=o.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),t}(t.CdkTreeNodeToggle);m.decorators=[{type:r.Directive,args:[{selector:"[matTreeNodeToggle]",providers:[{provide:t.CdkTreeNodeToggle,useExisting:m}]}]}],m.propDecorators={recursive:[{type:r.Input,args:["matTreeNodeToggleRecursive"]}]}; |
| /** |
| * @license |
| * Copyright Google LLC All Rights Reserved. |
| * |
| * Use of this source code is governed by an MIT-style license that can be |
| * found in the LICENSE file at https://angular.io/license |
| */ |
| var b,_=[g,f,h,m,v,p,y];(b=function b(){}).decorators=[{type:r.NgModule,args:[{imports:[t.CdkTreeModule,n.MatCommonModule],exports:[n.MatCommonModule,_],declarations:_}]}];var T=function(){function e(e,t,r,n){this.transformFunction=e,this.getLevel=t,this.isExpandable=r,this.getChildren=n}return e.prototype._flattenNode=function(e,t,r,n){var o=this,a=this.transformFunction(e,t);if(r.push(a),this.isExpandable(a)){var i=this.getChildren(e);i&&(Array.isArray(i)?this._flattenChildren(i,t,r,n):i.pipe(s.take(1)).subscribe((function(e){o._flattenChildren(e,t,r,n)})))}return r},e.prototype._flattenChildren=function(e,t,r,n){var o=this;e.forEach((function(a,i){var s=n.slice();s.push(i!=e.length-1),o._flattenNode(a,t+1,r,s)}))},e.prototype.flattenNodes=function(e){var t=this,r=[];return e.forEach((function(e){return t._flattenNode(e,0,r,[])})),r},e.prototype.expandFlattenedNodes=function(e,t){var r=this,n=[],o=[];return o[0]=!0,e.forEach((function(e){for(var a=!0,i=0;i<=r.getLevel(e);i++)a=a&&o[i];a&&n.push(e),r.isExpandable(e)&&(o[r.getLevel(e)+1]=t.isExpanded(e))})),n},e}(),x=function(e){function t(t,r,n){void 0===n&&(n=[]);var o=e.call(this)||this;return o._treeControl=t,o._treeFlattener=r,o._flattenedData=new i.BehaviorSubject([]),o._expandedData=new i.BehaviorSubject([]),o._data=new i.BehaviorSubject(n),o}return c(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this._data.value},set:function(e){this._data.next(e),this._flattenedData.next(this._treeFlattener.flattenNodes(this.data)),this._treeControl.dataNodes=this._flattenedData.value},enumerable:!1,configurable:!0}),t.prototype.connect=function(e){var t=this;return i.merge.apply(void 0,l([e.viewChange,this._treeControl.expansionModel.changed,this._flattenedData])).pipe(s.map((function(){return t._expandedData.next(t._treeFlattener.expandFlattenedNodes(t._flattenedData.value,t._treeControl)),t._expandedData.value})))},t.prototype.disconnect=function(){},t}(a.DataSource),N=function(e){function t(){var t=e.apply(this,l(arguments))||this;return t._data=new i.BehaviorSubject([]),t}return c(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this._data.value},set:function(e){this._data.next(e)},enumerable:!1,configurable:!0}),t.prototype.connect=function(e){var t=this;return i.merge.apply(void 0,l([e.viewChange,this._data])).pipe(s.map((function(){return t.data})))},t.prototype.disconnect=function(){},t}(a.DataSource); |
| /** |
| * @license |
| * Copyright Google LLC All Rights Reserved. |
| * |
| * Use of this source code is governed by an MIT-style license that can be |
| * found in the LICENSE file at https://angular.io/license |
| */ |
| e.MatNestedTreeNode=g,e.MatTree=v,e.MatTreeFlatDataSource=x,e.MatTreeFlattener=T,e.MatTreeModule=b,e.MatTreeNestedDataSource=N,e.MatTreeNode=p,e.MatTreeNodeDef=f,e.MatTreeNodeOutlet=y,e.MatTreeNodePadding=h,e.MatTreeNodeToggle=m,Object.defineProperty(e,"__esModule",{value:!0})})); |