blob: fae9c16156cc7e45ab5c67dfb60cc43fa103001e [file] [log] [blame]
{"version":3,"file":"tree.es5.js","sources":["../../../src/material/tree/data-source/nested-data-source.ts","../../../src/material/tree/data-source/flat-data-source.ts","../../../src/material/tree/tree-module.ts","../../../src/material/tree/toggle.ts","../../../src/material/tree/tree.ts","../../../src/material/tree/padding.ts","../../../src/material/tree/node.ts","../../../src/material/tree/outlet.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CollectionViewer, DataSource} from '@angular/cdk/collections';\nimport {BehaviorSubject, merge, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n\n/**\n * Data source for nested tree.\n *\n * The data source for nested tree doesn't have to consider node flattener, or the way to expand\n * or collapse. The expansion/collapsion will be handled by TreeControl and each non-leaf node.\n */\nexport class MatTreeNestedDataSource<T> extends DataSource<T> {\n _data = new BehaviorSubject<T[]>([]);\n\n /**\n * Data for the nested tree\n */\n get data() { return this._data.value; }\n set data(value: T[]) { this._data.next(value); }\n\n connect(collectionViewer: CollectionViewer): Observable<T[]> {\n return merge(...[collectionViewer.viewChange, this._data])\n .pipe(map(() => {\n return this.data;\n }));\n }\n\n disconnect() {\n // no op\n }\n}\n\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CollectionViewer, DataSource} from '@angular/cdk/collections';\nimport {FlatTreeControl, TreeControl} from '@angular/cdk/tree';\nimport {BehaviorSubject, merge, Observable} from 'rxjs';\nimport {map, take} from 'rxjs/operators';\n\n/**\n * Tree flattener to convert a normal type of node to node with children & level information.\n * Transform nested nodes of type `T` to flattened nodes of type `F`.\n *\n * For example, the input data of type `T` is nested, and contains its children data:\n * SomeNode: {\n * key: 'Fruits',\n * children: [\n * NodeOne: {\n * key: 'Apple',\n * },\n * NodeTwo: {\n * key: 'Pear',\n * }\n * ]\n * }\n * After flattener flatten the tree, the structure will become\n * SomeNode: {\n * key: 'Fruits',\n * expandable: true,\n * level: 1\n * },\n * NodeOne: {\n * key: 'Apple',\n * expandable: false,\n * level: 2\n * },\n * NodeTwo: {\n * key: 'Pear',\n * expandable: false,\n * level: 2\n * }\n * and the output flattened type is `F` with additional information.\n */\nexport class MatTreeFlattener<T, F> {\n\n constructor(public transformFunction: (node: T, level: number) => F,\n public getLevel: (node: F) => number,\n public isExpandable: (node: F) => boolean,\n public getChildren: (node: T) =>\n Observable<T[]> | T[] | undefined | null) {}\n\n _flattenNode(node: T, level: number,\n resultNodes: F[], parentMap: boolean[]): F[] {\n const flatNode = this.transformFunction(node, level);\n resultNodes.push(flatNode);\n\n if (this.isExpandable(flatNode)) {\n const childrenNodes = this.getChildren(node);\n if (childrenNodes) {\n if (Array.isArray(childrenNodes)) {\n this._flattenChildren(childrenNodes, level, resultNodes, parentMap);\n } else {\n childrenNodes.pipe(take(1)).subscribe(children => {\n this._flattenChildren(children, level, resultNodes, parentMap);\n });\n }\n }\n }\n return resultNodes;\n }\n\n _flattenChildren(children: T[], level: number,\n resultNodes: F[], parentMap: boolean[]): void {\n children.forEach((child, index) => {\n let childParentMap: boolean[] = parentMap.slice();\n childParentMap.push(index != children.length - 1);\n this._flattenNode(child, level + 1, resultNodes, childParentMap);\n });\n }\n\n /**\n * Flatten a list of node type T to flattened version of node F.\n * Please note that type T may be nested, and the length of `structuredData` may be different\n * from that of returned list `F[]`.\n */\n flattenNodes(structuredData: T[]): F[] {\n let resultNodes: F[] = [];\n structuredData.forEach(node => this._flattenNode(node, 0, resultNodes, []));\n return resultNodes;\n }\n\n /**\n * Expand flattened node with current expansion status.\n * The returned list may have different length.\n */\n expandFlattenedNodes(nodes: F[], treeControl: TreeControl<F>): F[] {\n let results: F[] = [];\n let currentExpand: boolean[] = [];\n currentExpand[0] = true;\n\n nodes.forEach(node => {\n let expand = true;\n for (let i = 0; i <= this.getLevel(node); i++) {\n expand = expand && currentExpand[i];\n }\n if (expand) {\n results.push(node);\n }\n if (this.isExpandable(node)) {\n currentExpand[this.getLevel(node) + 1] = treeControl.isExpanded(node);\n }\n });\n return results;\n }\n}\n\n\n/**\n * Data source for flat tree.\n * The data source need to handle expansion/collapsion of the tree node and change the data feed\n * to `MatTree`.\n * The nested tree nodes of type `T` are flattened through `MatTreeFlattener`, and converted\n * to type `F` for `MatTree` to consume.\n */\nexport class MatTreeFlatDataSource<T, F> extends DataSource<F> {\n _flattenedData = new BehaviorSubject<F[]>([]);\n\n _expandedData = new BehaviorSubject<F[]>([]);\n\n _data: BehaviorSubject<T[]>;\n get data() { return this._data.value; }\n set data(value: T[]) {\n this._data.next(value);\n this._flattenedData.next(this._treeFlattener.flattenNodes(this.data));\n this._treeControl.dataNodes = this._flattenedData.value;\n }\n\n constructor(private _treeControl: FlatTreeControl<F>,\n private _treeFlattener: MatTreeFlattener<T, F>,\n initialData: T[] = []) {\n super();\n this._data = new BehaviorSubject<T[]>(initialData);\n }\n\n connect(collectionViewer: CollectionViewer): Observable<F[]> {\n const changes = [\n collectionViewer.viewChange,\n this._treeControl.expansionModel.onChange,\n this._flattenedData\n ];\n return merge(...changes).pipe(map(() => {\n this._expandedData.next(\n this._treeFlattener.expandFlattenedNodes(this._flattenedData.value, this._treeControl));\n return this._expandedData.value;\n }));\n }\n\n disconnect() {\n // no op\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {CdkTreeModule} from '@angular/cdk/tree';\nimport {CommonModule} from '@angular/common';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatNestedTreeNode, MatTreeNodeDef, MatTreeNode} from './node';\nimport {MatTree} from './tree';\nimport {MatTreeNodeToggle} from './toggle';\nimport {MatTreeNodeOutlet} from './outlet';\nimport {MatTreeNodePadding} from './padding';\n\nconst MAT_TREE_DIRECTIVES = [\n MatNestedTreeNode,\n MatTreeNodeDef,\n MatTreeNodePadding,\n MatTreeNodeToggle,\n MatTree,\n MatTreeNode,\n MatTreeNodeOutlet\n];\n\n@NgModule({\n imports: [CdkTreeModule, CommonModule, MatCommonModule],\n exports: MAT_TREE_DIRECTIVES,\n declarations: MAT_TREE_DIRECTIVES,\n})\nexport class MatTreeModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CdkTreeNodeToggle} from '@angular/cdk/tree';\nimport {Directive, Input} from '@angular/core';\n\n/**\n * Wrapper for the CdkTree's toggle with Material design styles.\n */\n@Directive({\n selector: '[matTreeNodeToggle]',\n providers: [{provide: CdkTreeNodeToggle, useExisting: MatTreeNodeToggle}]\n})\nexport class MatTreeNodeToggle<T> extends CdkTreeNodeToggle<T> {\n @Input('matTreeNodeToggleRecursive') recursive: boolean = false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CdkTree} from '@angular/cdk/tree';\nimport {ChangeDetectionStrategy, Component, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {MatTreeNodeOutlet} from './outlet';\n\n/**\n * Wrapper for the CdkTable with Material design styles.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-tree',\n exportAs: 'matTree',\n template: `<ng-container matTreeNodeOutlet></ng-container>`,\n host: {\n 'class': 'mat-tree',\n 'role': 'tree',\n },\n styleUrls: ['tree.css'],\n encapsulation: ViewEncapsulation.None,\n // See note on CdkTree for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [{provide: CdkTree, useExisting: MatTree}]\n})\nexport class MatTree<T> extends CdkTree<T> {\n // Outlets within the tree's template where the dataNodes will be inserted.\n @ViewChild(MatTreeNodeOutlet, {static: true}) _nodeOutlet: MatTreeNodeOutlet;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {CdkTreeNodePadding} from '@angular/cdk/tree';\nimport {Directive, Input} from '@angular/core';\n\n/**\n * Wrapper for the CdkTree padding with Material design styles.\n */\n@Directive({\n selector: '[matTreeNodePadding]',\n providers: [{provide: CdkTreeNodePadding, useExisting: MatTreeNodePadding}]\n})\nexport class MatTreeNodePadding<T> extends CdkTreeNodePadding<T> {\n\n /** The level of depth of the tree node. The padding will be `level * indent` pixels. */\n @Input('matTreeNodePadding') level: number;\n\n /** The indent for each level. Default number 40px from material design menu sub-menu spec. */\n @Input('matTreeNodePaddingIndent') indent: number;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n CDK_TREE_NODE_OUTLET_NODE,\n CdkNestedTreeNode,\n CdkTree,\n CdkTreeNode,\n CdkTreeNodeDef,\n} from '@angular/cdk/tree';\nimport {\n AfterContentInit,\n Attribute,\n ContentChildren,\n Directive,\n ElementRef,\n Input,\n IterableDiffers,\n OnDestroy,\n QueryList,\n} from '@angular/core';\nimport {\n CanDisable,\n CanDisableCtor,\n HasTabIndex,\n HasTabIndexCtor,\n mixinDisabled,\n mixinTabIndex,\n} from '@angular/material/core';\n\nimport {MatTreeNodeOutlet} from './outlet';\n\nconst _MatTreeNodeMixinBase: HasTabIndexCtor & CanDisableCtor & typeof CdkTreeNode =\n mixinTabIndex(mixinDisabled(CdkTreeNode));\n\nconst _MatNestedTreeNodeMixinBase:\n HasTabIndexCtor & CanDisableCtor & typeof CdkNestedTreeNode =\n mixinTabIndex(mixinDisabled(CdkNestedTreeNode));\n\n/**\n * Wrapper for the CdkTree node with Material design styles.\n */\n@Directive({\n selector: 'mat-tree-node',\n exportAs: 'matTreeNode',\n inputs: ['disabled', 'tabIndex'],\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.aria-level]': 'role === \"treeitem\" ? level : null',\n '[attr.role]': 'role',\n 'class': 'mat-tree-node'\n },\n providers: [{provide: CdkTreeNode, useExisting: MatTreeNode}]\n})\nexport class MatTreeNode<T> extends _MatTreeNodeMixinBase<T>\n implements CanDisable, HasTabIndex {\n @Input() role: 'treeitem' | 'group' = 'treeitem';\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>,\n @Attribute('tabindex') tabIndex: string) {\n super(_elementRef, _tree);\n\n this.tabIndex = Number(tabIndex) || 0;\n }\n}\n\n/**\n * Wrapper for the CdkTree node definition with Material design styles.\n */\n@Directive({\n selector: '[matTreeNodeDef]',\n inputs: [\n 'when: matTreeNodeDefWhen'\n ],\n providers: [{provide: CdkTreeNodeDef, useExisting: MatTreeNodeDef}]\n})\nexport class MatTreeNodeDef<T> extends CdkTreeNodeDef<T> {\n @Input('matTreeNode') data: T;\n}\n\n/**\n * Wrapper for the CdkTree nested node with Material design styles.\n */\n@Directive({\n selector: 'mat-nested-tree-node',\n exportAs: 'matNestedTreeNode',\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.role]': 'role',\n 'class': 'mat-nested-tree-node',\n },\n inputs: ['disabled', 'tabIndex'],\n providers: [\n {provide: CdkNestedTreeNode, useExisting: MatNestedTreeNode},\n {provide: CdkTreeNode, useExisting: MatNestedTreeNode},\n {provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: MatNestedTreeNode}\n ]\n})\nexport class MatNestedTreeNode<T> extends _MatNestedTreeNodeMixinBase<T> implements\n AfterContentInit, CanDisable, HasTabIndex, OnDestroy {\n @Input('matNestedTreeNode') node: T;\n\n /** The children node placeholder. */\n @ContentChildren(MatTreeNodeOutlet, {\n // We need to use `descendants: true`, because Ivy will no longer match\n // indirect descendants if it's left as false.\n descendants: true\n })\n nodeOutlet: QueryList<MatTreeNodeOutlet>;\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>,\n protected _differs: IterableDiffers,\n @Attribute('tabindex') tabIndex: string) {\n super(_elementRef, _tree, _differs);\n\n this.tabIndex = Number(tabIndex) || 0;\n }\n\n // This is a workaround for https://github.com/angular/angular/issues/23091\n // In aot mode, the lifecycle hooks from parent class are not called.\n // TODO(tinayuangao): Remove when the angular issue #23091 is fixed\n ngAfterContentInit() {\n super.ngAfterContentInit();\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {CDK_TREE_NODE_OUTLET_NODE, CdkTreeNodeOutlet} from '@angular/cdk/tree';\nimport {\n Directive,\n Inject,\n Optional,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * Outlet for nested CdkNode. Put `[matTreeNodeOutlet]` on a tag to place children dataNodes\n * inside the outlet.\n */\n@Directive({\n selector: '[matTreeNodeOutlet]'\n})\nexport class MatTreeNodeOutlet implements CdkTreeNodeOutlet {\n constructor(\n public viewContainer: ViewContainerRef,\n @Inject(CDK_TREE_NODE_OUTLET_NODE) @Optional() public _node?: any) {}\n}\n"],"names":["tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AOmBA,AAAA,IAAA,iBAAA,kBAAA,YAAA;IAIE,SAAF,iBAAA,CACa,aAA+B,EACgB,KAAW,EAFvE;QACa,IAAb,CAAA,aAA0B,GAAb,aAAa,CAAkB;QACgB,IAA5D,CAAA,KAAiE,GAAL,KAAK,CAAM;KAAI;;QAN3E,EAAA,IAAA,EAAC,SAAS,EAAV,IAAA,EAAA,CAAW;oBACT,QAAQ,EAAE,qBAAqB;iBAChC,EAAD,EAAA;;;;QATA,EAAA,IAAA,EAAE,gBAAgB,EAAlB;QAaA,EAAA,IAAA,EAAA,SA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