Icard/angular-clarity-master(work.../node_modules/@angular/cdk/fesm2022/collections.mjs.map

1 line
36 KiB
Plaintext
Raw Normal View History

2024-07-16 14:55:36 +00:00
{"version":3,"file":"collections.mjs","sources":["../../../../../../src/cdk/collections/data-source.ts","../../../../../../src/cdk/collections/array-data-source.ts","../../../../../../src/cdk/collections/dispose-view-repeater-strategy.ts","../../../../../../src/cdk/collections/recycle-view-repeater-strategy.ts","../../../../../../src/cdk/collections/selection-model.ts","../../../../../../src/cdk/collections/unique-selection-dispatcher.ts","../../../../../../src/cdk/collections/view-repeater.ts","../../../../../../src/cdk/collections/collections_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 */\n\nimport {ConnectableObservable, Observable} from 'rxjs';\nimport {CollectionViewer} from './collection-viewer';\n\nexport abstract class DataSource<T> {\n /**\n * Connects a collection viewer (such as a data-table) to this data source. Note that\n * the stream provided will be accessed during change detection and should not directly change\n * values that are bound in template views.\n * @param collectionViewer The component that exposes a view over the data provided by this\n * data source.\n * @returns Observable that emits a new value when the data changes.\n */\n abstract connect(collectionViewer: CollectionViewer): Observable<readonly T[]>;\n\n /**\n * Disconnects a collection viewer (such as a data-table) from this data source. Can be used\n * to perform any clean-up or tear-down operations when a view is being destroyed.\n *\n * @param collectionViewer The component that exposes a view over the data provided by this\n * data source.\n */\n abstract disconnect(collectionViewer: CollectionViewer): void;\n}\n\n/** Checks whether an object is a data source. */\nexport function isDataSource(value: any): value is DataSource<any> {\n // Check if the value is a DataSource by observing if it has a connect function. Cannot\n // be checked as an `instanceof DataSource` since people could create their own sources\n // that match the interface, but don't extend DataSource. We also can't use `isObservable`\n // here, because of some internal apps.\n return value && typeof value.connect === 'function' && !(value instanceof ConnectableObservable);\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 {Observable, isObservable, of as observableOf} from 'rxjs';\nimport {DataSource} from './data-source';\n\n/** DataSource wrapper for a native array. */\nexport class ArrayDataSource<T> extends DataSource<T> {\n constructor(private _data: readonly T[] | Observable<readonly T[]>) {\n super();\n }\n\n connect(): Observable<readonly T[]> {\n return isObservable(this._data) ? this._data : observableOf(this._data);\n }\n\n disconnect() {}\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 EmbeddedViewRef,\n IterableChangeRecord,\n IterableChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n _ViewRepeater,\n _ViewRepeaterItemChanged,\n _ViewRepeaterItemContext,\n _ViewRepeaterItemContextFactory,\n _ViewRepeaterItemValueResolver,\n _ViewRepeaterOperation,\n} from './view-repeater';\n\n/**\n * A repeater that destroys views when they are removed from a\n * {@link ViewContainerRef}. When new items are inserted into the container,\n * the repeater will always construct a new embedded view for each item.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport class _Disp