UNPKG

63.8 kBSource Map (JSON)View Raw
1{"version":3,"file":"tree.mjs","sources":["../../../../../../src/cdk/tree/control/base-tree-control.ts","../../../../../../src/cdk/tree/control/flat-tree-control.ts","../../../../../../src/cdk/tree/control/nested-tree-control.ts","../../../../../../src/cdk/tree/outlet.ts","../../../../../../src/cdk/tree/node.ts","../../../../../../src/cdk/tree/tree-errors.ts","../../../../../../src/cdk/tree/tree.ts","../../../../../../src/cdk/tree/nested-node.ts","../../../../../../src/cdk/tree/padding.ts","../../../../../../src/cdk/tree/toggle.ts","../../../../../../src/cdk/tree/tree-module.ts","../../../../../../src/cdk/tree/tree_public_index.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 */\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {Observable} from 'rxjs';\nimport {TreeControl} from './tree-control';\n\n/** Base tree control. It has basic toggle/expand/collapse operations on a single data node. */\nexport abstract class BaseTreeControl<T, K = T> implements TreeControl<T, K> {\n /** Gets a list of descendent data nodes of a subtree rooted at given data node recursively. */\n abstract getDescendants(dataNode: T): T[];\n\n /** Expands all data nodes in the tree. */\n abstract expandAll(): void;\n\n /** Saved data node for `expandAll` action. */\n dataNodes: T[];\n\n /** A selection model with multi-selection to track expansion status. */\n expansionModel: SelectionModel<K> = new SelectionModel<K>(true);\n\n /**\n * Returns the identifier by which a dataNode should be tracked, should its\n * reference change.\n *\n * Similar to trackBy for *ngFor\n */\n trackBy?: (dataNode: T) => K;\n\n /** Get depth of a given data node, return the level number. This is for flat tree node. */\n getLevel: (dataNode: T) => number;\n\n /**\n * Whether the data node is expandable. Returns true if expandable.\n * This is for flat tree node.\n */\n isExpandable: (dataNode: T) => boolean;\n\n /** Gets a stream that emits whenever the given data node's children change. */\n getChildren: (dataNode: T) => Observable<T[]> | T[] | undefined | null;\n\n /** Toggles one single data node's expanded/collapsed state. */\n toggle(dataNode: T): void {\n this.expansionModel.toggle(this._trackByValue(dataNode));\n }\n\n /** Expands one single data node. */\n expand(dataNode: T): void {\n this.expansionModel.select(this._trackByValue(dataNode));\n }\n\n /** Collapses one single data node. */\n collapse(dataNode: T): void {\n this.expansionModel.deselect(this._trackByValue(dataNode));\n }\n\n /** Whether a given data node is expanded or not. Returns true if the data node is expanded. */\n isExpanded(dataNode: T): boolean {\n return this.expansionModel.isSelected(this._trackByValue(dataNode));\n }\n\n /** Toggles a subtree rooted at `node` recursively. */\n toggleDescendants(dataNode: T): void {\n this.expansionModel.isSelected(this._trackByValue(dataNode))\n ? this.collapseDescendants(dataNode)\n : this.expandDescendants(dataNode);\n }\n\n /** Collapse all dataNodes in the tree. */\n collapseAll(): void {\n this.expansionModel.clear();\n }\n\n /** Expands a subtree rooted at given data node recursively. */\n expandDescendants(dataNode: T): void {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.select(...toBeProcessed.map(value => this._trackByValue(value)));\n }\n\n /** Collapses a subtree rooted at given data node recursively. */\n collapseDescendants(dataNode: T): void {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.deselect(...toBeProcessed.map(value => this._trackByValue(value)));\n }\n\n protected _trackByValue(value: T | K): K {\n return this.trackBy ? this.trackBy(value as T) : (value as K);\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 {BaseTreeControl} from './base-tree-control';\n\n/** Optional set of configuration that can be provided to the FlatTreeControl. */\nexport interface FlatTreeControlOptions<T, K> {\n trackBy?: (dataNode: T) => K;\n}\n\n/** Flat tree control. Able to expand/collapse a subtree recursively for flattened tree. */\nexport class FlatTreeControl<T, K = T> extends BaseTreeControl<T, K> {\n /** Construct with flat tree data node functions getLevel and isExpandable. */\n constructor(\n public override getLevel: (dataNode: T) => number,\n public override isExpandable: (dataNode: T) => boolean,\n public options?: FlatTreeControlOptions<T, K>,\n ) {\n super();\n\n if (this.options) {\n this.trackBy = this.options.trackBy;\n }\n }\n\n /**\n * Gets a list of the data node's subtree of descendent data nodes.\n *\n * To make this working, the `dataNodes` of the TreeControl must be flattened tree nodes\n * with correct levels.\n */\n getDescendants(dataNode: T): T[] {\n const startIndex = this.dataNodes.indexOf(dataNode);\n const results: T[] = [];\n\n // Goes through flattened tree nodes in the `dataNodes` array, and get all descendants.\n // The level of descendants of a tree node must be greater than the level of the given\n // tree node.\n // If we reach a node whose level is equal to the level of the tree node, we hit a sibling.\n // If we reach a node whose level is greater than the level of the tree node, we hit a\n // sibling of an ancestor.\n for (\n let i = startIndex + 1;\n i < this.dataNodes.length && this.getLevel(dataNode) < this.getLevel(this.dataNodes[i]);\n i++\n ) {\n results.push(this.dataNodes[i]);\n }\n return results;\n }\n\n /**\n * Expands all data nodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all flattened\n * data nodes of the tree.\n */\n expandAll(): void {\n this.expansionModel.select(...this.dataNodes.map(node => this._trackByValue(node)));\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 {Observable, isObservable} from 'rxjs';\nimport {take, filter} from 'rxjs/operators';\nimport {BaseTreeControl} from './base-tree-control';\n\n/** Optional set of configuration that can be provided to the NestedTreeControl. */\nexport interface NestedTreeControlOptions<T, K> {\n trackBy?: (dataNode: T) => K;\n}\n\n/** Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type. */\nexport class NestedTreeControl<T, K = T> extends BaseTreeControl<T, K> {\n /** Construct with nested tree function getChildren. */\n constructor(\n public override getChildren: (dataNode: T) => Observable<T[]> | T[] | undefined | null,\n public options?: NestedTreeControlOptions<T, K>,\n ) {\n super();\n\n if (this.options) {\n this.trackBy = this.options.trackBy;\n }\n }\n\n /**\n * Expands all dataNodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all root level\n * data nodes of the tree.\n */\n expandAll(): void {\n this.expansionModel.clear();\n const allNodes = this.dataNodes.reduce(\n (accumulator: T[], dataNode) => [...accumulator, ...this.getDescendants(dataNode), dataNode],\n [],\n );\n this.expansionModel.select(...allNodes.map(node => this._trackByValue(node)));\n }\n\n /** Gets a list of descendant dataNodes of a subtree rooted at given data node recursively. */\n getDescendants(dataNode: T): T[] {\n const descendants: T[] = [];\n\n this._getDescendants(descendants, dataNode);\n // Remove the node itself\n return descendants.splice(1);\n }\n\n /** A helper function to get descendants recursively. */\n protected _getDescendants(descendants: T[], dataNode: T): void {\n descendants.push(dataNode);\n const childrenNodes = this.getChildren(dataNode);\n if (Array.isArray(childrenNodes)) {\n childrenNodes.forEach((child: T) => this._getDescendants(descendants, child));\n } else if (isObservable(childrenNodes)) {\n // TypeScript as of version 3.5 doesn't seem to treat `Boolean` like a function that\n // returns a `boolean` specifically in the context of `filter`, so we manually clarify that.\n childrenNodes.pipe(take(1), filter(Boolean as () => boolean)).subscribe(children => {\n for (const child of children) {\n this._getDescendants(descendants, child);\n }\n });\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 */\nimport {Directive, Inject, InjectionToken, Optional, ViewContainerRef} from '@angular/core';\n\n/**\n * Injection token used to provide a `CdkTreeNode` to its outlet.\n * Used primarily to avoid circular imports.\n * @docs-private\n */\nexport const CDK_TREE_NODE_OUTLET_NODE = new InjectionToken<{}>('CDK_TREE_NODE_OUTLET_NODE');\n\n/**\n * Outlet for nested CdkNode. Put `[cdkTreeNodeOutlet]` on a tag to place children dataNodes\n * inside the outlet.\n */\n@Directive({\n selector: '[cdkTreeNodeOutlet]',\n})\nexport class CdkTreeNodeOutlet {\n constructor(\n public viewContainer: ViewContainerRef,\n @Inject(CDK_TREE_NODE_OUTLET_NODE) @Optional() public _node?: any,\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 {Directive, TemplateRef} from '@angular/core';\n\n/** Context provided to the tree node component. */\nexport class CdkTreeNodeOutletContext<T> {\n /** Data for the node. */\n $implicit: T;\n\n /** Depth of the node. */\n level: number;\n\n /** Index location of the node. */\n index?: number;\n\n /** Length of the number of total dataNodes. */\n count?: number;\n\n constructor(data: T) {\n this.$implicit = data;\n }\n}\n\n/**\n * Data node definition for the CdkTree.\n * Captures the node's template and a when predicate that describes when this node should be used.\n */\n@Directive({\n selector: '[cdkTreeNodeDef]',\n inputs: ['when: cdkTreeNodeDefWhen'],\n})\nexport class CdkTreeNodeDef<T> {\n /**\n * Function that should return true if this node template should be used for the provided node\n * data and index. If left undefined, this node will be considered the default node template to\n * use when no other when functions return true for the data.\n * For every node, there must be at least one when function that passes or an undefined to\n * default.\n */\n when: (index: number, nodeData: T) => boolean;\n\n /** @docs-private */\n constructor(public template: TemplateRef<any>) {}\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\n/**\n * Returns an error to be thrown when there is no usable data.\n * @docs-private\n */\nexport function getTreeNoValidDataSourceError() {\n return Error(`A valid data source must be provided.`);\n}\n\n/**\n * Returns an error to be thrown when there are multiple nodes that are missing a when function.\n * @docs-private\n */\nexport function getTreeMultipleDefaultNodeDefsError() {\n return Error(`There can only be one default row without a when predicate function.`);\n}\n\n/**\n * Returns an error to be thrown when there are no matching node defs for a particular set of data.\n * @docs-private\n */\nexport function getTreeMissingMatchingNodeDefError() {\n return Error(`Could not find a matching node definition for the provided node data.`);\n}\n\n/**\n * Returns an error to be thrown when there are tree control.\n * @docs-private\n */\nexport function getTreeControlMissingError() {\n return Error(`Could not find a tree control for the tree.`);\n}\n\n/**\n * Returns an error to be thrown when tree control did not implement functions for flat/nested node.\n * @docs-private\n */\nexport function getTreeControlFunctionsMissingError() {\n return Error(`Could not find functions for nested/flat tree in tree control.`);\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 {FocusableOption} from '@angular/cdk/a11y';\nimport {CollectionViewer, DataSource, isDataSource} from '@angular/cdk/collections';\nimport {\n AfterContentChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n Input,\n IterableChangeRecord,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OnInit,\n QueryList,\n TrackByFunction,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n BehaviorSubject,\n isObservable,\n Observable,\n of as observableOf,\n Subject,\n Subscription,\n} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {TreeControl} from './control/tree-control';\nimport {CdkTreeNodeDef, CdkTreeNodeOutletContext} from './node';\nimport {CdkTreeNodeOutlet} from './outlet';\nimport {\n getTreeControlFunctionsMissingError,\n getTreeControlMissingError,\n getTreeMissingMatchingNodeDefError,\n getTreeMultipleDefaultNodeDefsError,\n getTreeNoValidDataSourceError,\n} from './tree-errors';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\n\n/**\n * CDK tree component that connects with a data source to retrieve data of type `T` and renders\n * dataNodes with hierarchy. Updates the dataNodes when new data is provided by the data source.\n */\n@Component({\n selector: 'cdk-tree',\n exportAs: 'cdkTree',\n template: `<ng-container cdkTreeNodeOutlet></ng-container>`,\n host: {\n 'class': 'cdk-tree',\n 'role': 'tree',\n },\n encapsulation: ViewEncapsulation.None,\n\n // The \"OnPush\" status for the `CdkTree` component is effectively a noop, so we are removing it.\n // The view for `CdkTree` consists entirely of templates declared in other views. As they are\n // declared elsewhere, they are checked when their declaration points are checked.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class CdkTree<T, K = T> implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit {\n /** Subject that emits when the component has been destroyed. */\n private readonly _onDestroy = new Subject<void>();\n\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<T>;\n\n /** Stores the node definition that does not have a when predicate. */\n private _defaultNodeDef: CdkTreeNodeDef<T> | null;\n\n /** Data subscription */\n private _dataSubscription: Subscription | null;\n\n /** Level of nodes */\n private _levels: Map<T, number> = new Map<T, number>();\n\n /**\n * Provides a stream containing the latest data array to render. Influenced by the tree's\n * stream of view window (what dataNodes are currently on screen).\n * Data source can be an observable of data array, or a data array to render.\n */\n @Input()\n get dataSource(): DataSource<T> | Observable<T[]> | T[] {\n return this._dataSource;\n }\n set dataSource(dataSource: DataSource<T> | Observable<T[]> | T[]) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n private _dataSource: DataSource<T> | Observable<T[]> | T[];\n\n /** The tree controller */\n @Input() treeControl: TreeControl<T, K>;\n\n /**\n * Tracking function that will be used to check the differences in data changes. Used similarly\n * to `ngFor` `trackBy` function. Optimize node operations by identifying a node based on its data\n * relative to the function to know if a node should be added/removed/moved.\n * Accepts a function that takes two parameters, `index` and `item`.\n */\n @Input() trackBy: TrackByFunction<T>;\n\n // Outlets within the tree's template where the dataNodes will be inserted.\n @ViewChild(CdkTreeNodeOutlet, {static: true}) _nodeOutlet: CdkTreeNodeOutlet;\n\n /** The tree node template for the tree */\n @ContentChildren(CdkTreeNodeDef, {\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 _nodeDefs: QueryList<CdkTreeNodeDef<T>>;\n\n // TODO(tinayuangao): Setup a listener for scrolling, emit the calculated view to viewChange.\n // Remove the MAX_VALUE in viewChange\n /**\n * Stream containing the latest information on what rows are being displayed on screen.\n * Can be used by the data source to as a heuristic of what data should be provided.\n */\n readonly viewChange = new BehaviorSubject<{start: number; end: number}>({\n start: 0,\n end: Number.MAX_VALUE,\n });\n\n constructor(private _differs: IterableDiffers, private _changeDetectorRef: ChangeDetectorRef) {}\n\n ngOnInit() {\n this._dataDiffer = this._differs.find([]).create(this.trackBy);\n if (!this.treeControl && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTreeControlMissingError();\n }\n }\n\n ngOnDestroy() {\n this._nodeOutlet.viewContainer.clear();\n\n this.viewChange.complete();\n this._onDestroy.next();\n this._onDestroy.complete();\n\n if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') {\n (this.dataSource as DataSource<T>).disconnect(this);\n }\n\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n }\n\n ngAfterContentChecked() {\n const defaultNodeDefs = this._nodeDefs.filter(def => !def.when);\n if (defaultNodeDefs.length > 1 && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTreeMultipleDefaultNodeDefsError();\n }\n this._defaultNodeDef = defaultNodeDefs[0];\n\n if (this.dataSource && this._nodeDefs && !this._dataSubscription) {\n this._observeRenderChanges();\n }\n }\n\n // TODO(tinayuangao): Work on keyboard traversal and actions, make sure it's working for RTL\n // and nested trees.\n\n /**\n * Switch to the provided data source by resetting the data and unsubscribing from the current\n * render change subscription if one exists. If the data source is null, interpret this by\n * clearing the node outlet. Otherwise start listening for new data.\n */\n private _switchDataSource(dataSource: DataSource<T> | Observable<T[]> | T[]) {\n if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') {\n (this.dataSource as DataSource<T>).disconnect(this);\n }\n\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n\n // Remove the all dataNodes if there is now no data source\n if (!dataSource) {\n this._nodeOutlet.viewContainer.clear();\n }\n\n this._dataSource = dataSource;\n if (this._nodeDefs) {\n this._observeRenderChanges();\n }\n }\n\n /** Set up a subscription for the data provided by the data source. */\n private _observeRenderChanges() {\n let dataStream: Observable<readonly T[]> | undefined;\n\n if (isDataSource(this._dataSource)) {\n dataStream = this._dataSource.connect(this);\n } else if (isObservable(this._dataSource)) {\n dataStream = this._dataSource;\n } else if (Array.isArray(this._dataSource)) {\n dataStream = observableOf(this._dataSource);\n }\n\n if (dataStream) {\n this._dataSubscription = dataStream\n .pipe(takeUntil(this._onDestroy))\n .subscribe(data => this.renderNodeChanges(data));\n } else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw getTreeNoValidDataSourceError();\n }\n }\n\n /** Check for changes made in the data and render each change (node added/removed/moved). */\n renderNodeChanges(\n data: readonly T[],\n dataDiffer: IterableDiffer<T> = this._dataDiffer,\n viewContainer: ViewContainerRef = this._nodeOutlet.viewContainer,\n parentData?: T,\n ) {\n const changes = dataDiffer.diff(data);\n if (!changes) {\n return;\n }\n\n changes.forEachOperation(\n (\n item: IterableChangeRecord<T>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n ) => {\n if (item.previousIndex == null) {\n this.insertNode(data[currentIndex!], currentIndex!, viewContainer, parentData);\n } else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex!);\n this._levels.delete(item.item);\n } else {\n const view = viewContainer.get(adjustedPreviousIndex!);\n viewContainer.move(view!, currentIndex);\n }\n },\n );\n\n this._changeDetectorRef.detectChanges();\n }\n\n /**\n * Finds the matching node definition that should be used for this node data. If there is only\n * one node definition, it is returned. Otherwise, find the node definition that has a when\n * predicate that returns true with the data. If none return true, return the default node\n * definition.\n */\n _getNodeDef(data: T, i: number): CdkTreeNodeDef<T> {\n if (this._nodeDefs.length === 1) {\n return this._nodeDefs.first!;\n }\n\n const nodeDef =\n this._nodeDefs.find(def => def.when && def.when(i, data)) || this._defaultNodeDef;\n\n if (!nodeDef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTreeMissingMatchingNodeDefError();\n }\n\n return nodeDef!;\n }\n\n /**\n * Create the embedded view for the data node template and place it in the correct index location\n * within the data node view container.\n */\n insertNode(nodeData: T, index: number, viewContainer?: ViewContainerRef, parentData?: T) {\n const node = this._getNodeDef(nodeData, index);\n\n // Node context that will be provided to created embedded view\n const context = new CdkTreeNodeOutletContext<T>(nodeData);\n\n // If the tree is flat tree, then use the `getLevel` function in flat tree control\n // Otherwise, use the level of parent node.\n if (this.treeControl.getLevel) {\n context.level = this.treeControl.getLevel(nodeData);\n } else if (typeof parentData !== 'undefined' && this._levels.has(parentData)) {\n context.level = this._levels.get(parentData)! + 1;\n } else {\n context.level = 0;\n }\n this._levels.set(nodeData, context.level);\n\n // Use default tree nodeOutlet, or nested node's nodeOutlet\n const container = viewContainer ? viewContainer : this._nodeOutlet.viewContainer;\n container.createEmbeddedView(node.template, context, index);\n\n // Set the data to just created `CdkTreeNode`.\n // The `CdkTreeNode` created from `createEmbeddedView` will be saved in static variable\n // `mostRecentTreeNode`. We get it from static variable and pass the node data to it.\n if (CdkTreeNode.mostRecentTreeNode) {\n CdkTreeNode.mostRecentTreeNode.data = nodeData;\n }\n }\n}\n\n/**\n * Tree node for CdkTree. It contains the data in the tree node.\n */\n@Directive({\n selector: 'cdk-tree-node',\n exportAs: 'cdkTreeNode',\n host: {\n 'class': 'cdk-tree-node',\n '[attr.aria-expanded]': 'isExpanded',\n },\n})\nexport class CdkTreeNode<T, K = T> implements FocusableOption, OnDestroy, OnInit {\n /**\n * The role of the tree node.\n * @deprecated The correct role is 'treeitem', 'group' should not be used. This input will be\n * removed in a future version.\n * @breaking-change 12.0.0 Remove this input\n */\n @Input() get role(): 'treeitem' | 'group' {\n return 'treeitem';\n }\n\n set role(_role: 'treeitem' | 'group') {\n // TODO: move to host after View Engine deprecation\n this._elementRef.nativeElement.setAttribute('role', _role);\n }\n\n /**\n * The most recently created `CdkTreeNode`. We save it in static variable so we can retrieve it\n * in `CdkTree` and set the data to it.\n */\n static mostRecentTreeNode: CdkTreeNode<any> | null = null;\n\n /** Subject that emits when the component has been destroyed. */\n protected readonly _destroyed = new Subject<void>();\n\n /** Emits when the node's data has changed. */\n readonly _dataChanges = new Subject<void>();\n\n private _parentNodeAriaLevel: number;\n\n /** The tree node's data. */\n get data(): T {\n return this._data;\n }\n set data(value: T) {\n if (value !== this._data) {\n this._data = value;\n this._setRoleFromData();\n this._dataChanges.next();\n }\n }\n protected _data: T;\n\n get isExpanded(): boolean {\n return this._tree.treeControl.isExpanded(this._data);\n }\n\n get level(): number {\n // If the treeControl has a getLevel method, use it to get the level. Otherwise read the\n // aria-level off the parent node and use it as the level for this node (note aria-level is\n // 1-indexed, while this property is 0-indexed, so we don't need to increment).\n return this._tree.treeControl.getLevel\n ? this._tree.treeControl.getLevel(this._data)\n : this._parentNodeAriaLevel;\n }\n\n constructor(protected _elementRef: ElementRef<HTMLElement>, protected _tree: CdkTree<T, K>) {\n CdkTreeNode.mostRecentTreeNode = this as CdkTreeNode<T, K>;\n this.role = 'treeitem';\n }\n\n ngOnInit(): void {\n this._parentNodeAriaLevel = getParentNodeAriaLevel(this._elementRef.nativeElement);\n this._elementRef.nativeElement.setAttribute('aria-level', `${this.level + 1}`);\n }\n\n ngOnDestroy() {\n // If this is the last tree node being destroyed,\n // clear out the reference to avoid leaking memory.\n if (CdkTreeNode.mostRecentTreeNode === this) {\n CdkTreeNode.mostRecentTreeNode = null;\n }\n\n this._dataChanges.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Focuses the menu item. Implements for FocusableOption. */\n focus(): void {\n this._elementRef.nativeElement.focus();\n }\n\n // TODO: role should eventually just be set in the component host\n protected _setRoleFromData(): void {\n if (\n !this._tree.treeControl.isExpandable &&\n !this._tree.treeControl.getChildren &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw getTreeControlFunctionsMissingError();\n }\n this.role = 'treeitem';\n }\n}\n\nfunction getParentNodeAriaLevel(nodeElement: HTMLElement): number {\n let parent = nodeElement.parentElement;\n while (parent && !isNodeElement(parent)) {\n parent = parent.parentElement;\n }\n if (!parent) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw Error('Incorrect tree structure containing detached node.');\n } else {\n return -1;\n }\n } else if (parent.classList.contains('cdk-nested-tree-node')) {\n return coerceNumberProperty(parent.getAttribute('aria-level')!);\n } else {\n // The ancestor element is the cdk-tree itself\n return 0;\n }\n}\n\nfunction isNodeElement(element: HTMLElement) {\n const classList = element.classList;\n return !!(classList?.contains('cdk-nested-tree-node') || classList?.contains('cdk-tree'));\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 {\n AfterContentInit,\n ContentChildren,\n Directive,\n ElementRef,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OnInit,\n QueryList,\n} from '@angular/core';\nimport {isObservable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {CDK_TREE_NODE_OUTLET_NODE, CdkTreeNodeOutlet} from './outlet';\nimport {CdkTree, CdkTreeNode} from './tree';\nimport {getTreeControlFunctionsMissingError} from './tree-errors';\n\n/**\n * Nested node is a child of `<cdk-tree>`. It works with nested tree.\n * By using `cdk-nested-tree-node` component in tree node template, children of the parent node will\n * be added in the `cdkTreeNodeOutlet` in tree node template.\n * The children of node will be automatically added to `cdkTreeNodeOutlet`.\n */\n@Directive({\n selector: 'cdk-nested-tree-node',\n exportAs: 'cdkNestedTreeNode',\n inputs: ['role', 'disabled', 'tabIndex'],\n providers: [\n {provide: CdkTreeNode, useExisting: CdkNestedTreeNode},\n {provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: CdkNestedTreeNode},\n ],\n host: {\n 'class': 'cdk-nested-tree-node',\n },\n})\nexport class CdkNestedTreeNode<T, K = T>\n extends CdkTreeNode<T, K>\n implements AfterContentInit, OnDestroy, OnInit\n{\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<T>;\n\n /** The children data dataNodes of current node. They will be placed in `CdkTreeNodeOutlet`. */\n protected _children: T[];\n\n /** The children node placeholder. */\n @ContentChildren(CdkTreeNodeOutlet, {\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<CdkTreeNodeOutlet>;\n\n constructor(\n elementRef: ElementRef<HTMLElement>,\n tree: CdkTree<T, K>,\n protected _differs: IterableDiffers,\n ) {\n super(elementRef, tree);\n }\n\n ngAfterContentInit() {\n this._dataDiffer = this._differs.find([]).create(this._tree.trackBy);\n if (!this._tree.treeControl.getChildren && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTreeControlFunctionsMissingError();\n }\n const childrenNodes = this._tree.treeControl.getChildren(this.data);\n if (Array.isArray(childrenNodes)) {\n this.updateChildrenNodes(childrenNodes as T[]);\n } else if (isObservable(childrenNodes)) {\n childrenNodes\n .pipe(takeUntil(this._destroyed))\n .subscribe(result => this.updateChildrenNodes(result));\n }\n this.nodeOutlet.changes\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this.updateChildrenNodes());\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 override ngOnInit() {\n super.ngOnInit();\n }\n\n override ngOnDestroy() {\n this._clear();\n super.ngOnDestroy();\n }\n\n /** Add children dataNodes to the NodeOutlet */\n protected updateChildrenNodes(children?: T[]): void {\n const outlet = this._getNodeOutlet();\n if (children) {\n this._children = children;\n }\n if (outlet && this._children) {\n const viewContainer = outlet.viewContainer;\n this._tree.renderNodeChanges(this._children, this._dataDiffer, viewContainer, this._data);\n } else {\n // Reset the data differ if there's no children nodes displayed\n this._dataDiffer.diff([]);\n }\n }\n\n /** Clear the children dataNodes. */\n protected _clear(): void {\n const outlet = this._getNodeOutlet();\n if (outlet) {\n outlet.viewContainer.clear();\n this._dataDiffer.diff([]);\n }\n }\n\n /** Gets the outlet for the current node. */\n private _getNodeOutlet() {\n const outlets = this.nodeOutlet;\n\n // Note that since we use `descendants: true` on the query, we have to ensure\n // that we don't pick up the outlet of a child node by accident.\n return outlets && outlets.find(outlet => !outlet._node || outlet._node === this);\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 {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {Directive, ElementRef, Input, OnDestroy, Optional} from '@angular/core';\nimport {takeUntil} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {CdkTree, CdkTreeNode} from './tree';\n\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n\n/**\n * Indent for the children tree dataNodes.\n * This directive will add left-padding to the node to show hierarchy.\n */\n@Directive({\n selector: '[cdkTreeNodePadding]',\n})\nexport class CdkTreeNodePadding<T, K = T> implements OnDestroy {\n /** Current padding value applied to the element. Used to avoid unnecessarily hitting the DOM. */\n private _currentPadding: string | null;\n\n /** Subject that emits when the component has been destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n /** CSS units used for the indentation value. */\n indentUnits = 'px';\n\n /** The level of depth of the tree node. The padding will be `level * indent` pixels. */\n @Input('cdkTreeNodePadding')\n get level(): number {\n return this._level;\n }\n set level(value: NumberInput) {\n this._setLevelInput(value);\n }\n _level: number;\n\n /**\n * The indent for each level. Can be a number or a CSS string.\n * Default number 40px from material design menu sub-menu spec.\n */\n @Input('cdkTreeNodePaddingIndent')\n get indent(): number | string {\n return this._indent;\n }\n set indent(indent: number | string) {\n this._setIndentInput(indent);\n }\n _indent: number = 40;\n\n constructor(\n private _treeNode: CdkTreeNode<T, K>,\n private _tree: CdkTree<T, K>,\n private _element: ElementRef<HTMLElement>,\n @Optional() private _dir: Directionality,\n ) {\n this._setPadding();\n if (_dir) {\n _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => this._setPadding(true));\n }\n\n // In Ivy the indentation binding might be set before the tree node's data has been added,\n // which means that we'll miss the first render. We have to subscribe to changes in the\n // data to ensure that everything is up to date.\n _treeNode._dataChanges.subscribe(() => this._setPadding());\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** The padding indent value for the tree node. Returns a string with px numbers if not null. */\n _paddingIndent(): string | null {\n const nodeLevel =\n this._treeNode.data && this._tree.treeControl.getLevel\n ? this._tree.treeControl.getLevel(this._treeNode.data)\n : null;\n const level = this._level == null ? nodeLevel : this._level;\n return typeof level === 'number' ? `${level * this._indent}${this.indentUnits}` : null;\n }\n\n _setPadding(forceChange = false) {\n const padding = this._paddingIndent();\n\n if (padding !== this._currentPadding || forceChange) {\n const element = this._element.nativeElement;\n const paddingProp = this._dir && this._dir.value === 'rtl' ? 'paddingRight' : 'paddingLeft';\n const resetProp = paddingProp === 'paddingLeft' ? 'paddingRight' : 'paddingLeft';\n element.style[paddingProp] = padding || '';\n element.style[resetProp] = '';\n this._currentPadding = padding;\n }\n }\n\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n protected _setLevelInput(value: NumberInput) {\n // Set to null as the fallback value so that _setPadding can fall back to the node level if the\n // consumer set the directive as `cdkTreeNodePadding=\"\"`. We still want to take this value if\n // they set 0 explicitly.\n this._level = coerceNumberProperty(value, null)!;\n this._setPadding();\n }\n\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n protected _setIndentInput(indent: number | string) {\n let value = indent;\n let units = 'px';\n\n if (typeof indent === 'string') {\n const parts = indent.split(cssUnitPattern);\n value = parts[0];\n units = parts[1] || units;\n }\n\n this.indentUnits = units;\n this._indent = coerceNumberProperty(value);\n this._setPadding();\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 {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, Input} from '@angular/core';\n\nimport {CdkTree, CdkTreeNode} from './tree';\n\n/**\n * Node toggle to expand/collapse the node.\n */\n@Directive({\n selector: '[cdkTreeNodeToggle]',\n host: {\n '(click)': '_toggle($event)',\n },\n})\nexport class CdkTreeNodeToggle<T, K = T> {\n /** Whether expand/collapse the node recursively. */\n @Input('cdkTreeNodeToggleRecursive')\n get recursive(): boolean {\n return this._recursive;\n }\n set recursive(value: BooleanInput) {\n this._recursive = coerceBooleanProperty(value);\n }\n protected _recursive = false;\n\n constructor(protected _tree: CdkTree<T, K>, protected _treeNode: CdkTreeNode<T, K>) {}\n\n _toggle(event: Event): void {\n this.recursive\n ? this._tree.treeControl.toggleDescendants(this._treeNode.data)\n : this._tree.treeControl.toggle(this._treeNode.data);\n\n event.stopPropagation();\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';\nimport {CdkTreeNodeOutlet} from './outlet';\nimport {CdkTreeNodePadding} from './padding';\nimport {CdkTreeNodeToggle} from './toggle';\nimport {CdkTree, CdkTreeNode} from './tree';\nimport {CdkTreeNodeDef} from './node';\nimport {CdkNestedTreeNode} from './nested-node';\n\nconst EXPORTED_DECLARATIONS = [\n CdkNestedTreeNode,\n CdkTreeNodeDef,\n CdkTreeNodePadding,\n CdkTreeNodeToggle,\n CdkTree,\n CdkTreeNode,\n CdkTreeNodeOutlet,\n];\n\n@NgModule({\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n})\nexport class CdkTreeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["observableOf","i1.CdkTreeNodeOutlet","i1.CdkTree","i1.CdkTreeNode"],"mappings":";;;;;;;;AAWA;MACsB,eAAe,CAAA;AAArC,IAAA,WAAA,GAAA;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