You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
6.5 KiB
1 lines
6.5 KiB
{"version":3,"file":"tree.d.ts","sources":["tree.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA","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 { FocusableOption } from '@angular/cdk/a11y';\nimport { CollectionViewer, DataSource } from '@angular/cdk/collections';\nimport { AfterContentChecked, ChangeDetectorRef, DoCheck, ElementRef, IterableDiffer, IterableDiffers, OnDestroy, OnInit, QueryList, TrackByFunction, ViewContainerRef } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { TreeControl } from './control/tree-control';\nimport { CdkTreeNodeDef } from './node';\nimport { CdkTreeNodeOutlet } from './outlet';\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 */\nexport declare class CdkTree<T, K = T> implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit {\n private _differs;\n private _changeDetectorRef;\n /** Subject that emits when the component has been destroyed. */\n private readonly _onDestroy;\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer;\n /** Stores the node definition that does not have a when predicate. */\n private _defaultNodeDef;\n /** Data subscription */\n private _dataSubscription;\n /** Level of nodes */\n private _levels;\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 get dataSource(): DataSource<T> | Observable<T[]> | T[];\n set dataSource(dataSource: DataSource<T> | Observable<T[]> | T[]);\n private _dataSource;\n /** The tree controller */\n treeControl: TreeControl<T, K>;\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 trackBy: TrackByFunction<T>;\n _nodeOutlet: CdkTreeNodeOutlet;\n /** The tree node template for the tree */\n _nodeDefs: QueryList<CdkTreeNodeDef<T>>;\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: BehaviorSubject<{\n start: number;\n end: number;\n }>;\n constructor(_differs: IterableDiffers, _changeDetectorRef: ChangeDetectorRef);\n ngOnInit(): void;\n ngOnDestroy(): void;\n ngAfterContentChecked(): void;\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;\n /** Set up a subscription for the data provided by the data source. */\n private _observeRenderChanges;\n /** Check for changes made in the data and render each change (node added/removed/moved). */\n renderNodeChanges(data: readonly T[], dataDiffer?: IterableDiffer<T>, viewContainer?: ViewContainerRef, parentData?: T): void;\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 /**\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): void;\n}\n/**\n * Tree node for CdkTree. It contains the data in the tree node.\n */\nexport declare class CdkTreeNode<T, K = T> implements DoCheck, FocusableOption, OnDestroy, OnInit {\n protected _elementRef: ElementRef<HTMLElement>;\n protected _tree: CdkTree<T, K>;\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 get role(): 'treeitem' | 'group';\n set role(_role: 'treeitem' | 'group');\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;\n /** Subject that emits when the component has been destroyed. */\n protected readonly _destroyed: Subject<void>;\n /** Emits when the node's data has changed. */\n readonly _dataChanges: Subject<void>;\n private _parentNodeAriaLevel;\n /** The tree node's data. */\n get data(): T;\n set data(value: T);\n protected _data: T;\n get isExpanded(): boolean;\n private _setExpanded;\n protected _isAriaExpanded: boolean;\n get level(): number;\n constructor(_elementRef: ElementRef<HTMLElement>, _tree: CdkTree<T, K>);\n ngOnInit(): void;\n ngDoCheck(): void;\n ngOnDestroy(): void;\n /** Focuses the menu item. Implements for FocusableOption. */\n focus(): void;\n protected _setRoleFromData(): void;\n}\n"]}
|