@angular/cdk 20.0.2 → 20.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/collections/index.d.ts +4 -4
- package/dialog/index.d.ts +2 -2
- package/drag-drop/index.d.ts +2 -2
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/collections.mjs +2 -2
- package/fesm2022/dialog.mjs +1 -1
- package/fesm2022/{dispose-view-repeater-strategy-D_JReLI1.mjs → dispose-view-repeater-strategy-Cvpav0PR.mjs} +3 -3
- package/fesm2022/dispose-view-repeater-strategy-Cvpav0PR.mjs.map +1 -0
- package/fesm2022/drag-drop.mjs +1 -1
- package/fesm2022/menu.mjs +1 -1
- package/fesm2022/overlay.mjs +1 -1
- package/fesm2022/{recycle-view-repeater-strategy-DoWdPqVw.mjs → recycle-view-repeater-strategy-SfuyU210.mjs} +4 -4
- package/fesm2022/recycle-view-repeater-strategy-SfuyU210.mjs.map +1 -0
- package/fesm2022/scrolling.mjs +2 -2
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/table.mjs +3 -3
- package/fesm2022/table.mjs.map +1 -1
- package/menu/index.d.ts +2 -2
- package/overlay/index.d.ts +4 -4
- package/{overlay-module.d-CVO-IcaN.d.ts → overlay-module.d-C2CxnwqT.d.ts} +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/utils/build-component.js +2 -1
- package/schematics/utils/build-component.js.map +1 -1
- package/scrolling/index.d.ts +1 -1
- package/{scrolling-module.d-BvCGMKMo.d.ts → scrolling-module.d-C_w4tIrZ.d.ts} +1 -1
- package/table/index.d.ts +3 -3
- package/{view-repeater.d-BKljR8u8.d.ts → view-repeater.d-DUdkOYhk.d.ts} +5 -6
- package/fesm2022/dispose-view-repeater-strategy-D_JReLI1.mjs.map +0 -1
- package/fesm2022/recycle-view-repeater-strategy-DoWdPqVw.mjs.map +0 -1
package/collections/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { D as DataSource } from '../data-source.d-Bblv7Zvh.js';
|
|
3
3
|
export { C as CollectionViewer, L as ListRange, i as isDataSource } from '../data-source.d-Bblv7Zvh.js';
|
|
4
4
|
import { IterableChanges, ViewContainerRef } from '@angular/core';
|
|
5
|
-
import { _ as _ViewRepeaterItemContext, a as _ViewRepeater, b as _ViewRepeaterItemContextFactory, c as _ViewRepeaterItemValueResolver, d as _ViewRepeaterItemChanged } from '../view-repeater.d-
|
|
6
|
-
export { h as _VIEW_REPEATER_STRATEGY, g as _ViewRepeaterItemChange, e as _ViewRepeaterItemInsertArgs, f as _ViewRepeaterOperation } from '../view-repeater.d-
|
|
5
|
+
import { _ as _ViewRepeaterItemContext, a as _ViewRepeater, b as _ViewRepeaterItemContextFactory, c as _ViewRepeaterItemValueResolver, d as _ViewRepeaterItemChanged } from '../view-repeater.d-DUdkOYhk.js';
|
|
6
|
+
export { h as _VIEW_REPEATER_STRATEGY, g as _ViewRepeaterItemChange, e as _ViewRepeaterItemInsertArgs, f as _ViewRepeaterOperation } from '../view-repeater.d-DUdkOYhk.js';
|
|
7
7
|
import { S as SelectionModel } from '../selection-model.d-DNgOONDg.js';
|
|
8
8
|
export { a as SelectionChange, g as getMultipleValuesInSingleSelectionError } from '../selection-model.d-DNgOONDg.js';
|
|
9
9
|
export { U as UniqueSelectionDispatcher, a as UniqueSelectionDispatcherListener } from '../unique-selection-dispatcher.d-DSFqf1MM.js';
|
|
@@ -18,7 +18,7 @@ declare class ArrayDataSource<T> extends DataSource<T> {
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* A repeater that destroys views when they are removed from a
|
|
21
|
-
*
|
|
21
|
+
* `ViewContainerRef`. When new items are inserted into the container,
|
|
22
22
|
* the repeater will always construct a new embedded view for each item.
|
|
23
23
|
*
|
|
24
24
|
* @template T The type for the embedded view's $implicit property.
|
|
@@ -32,7 +32,7 @@ declare class _DisposeViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemCont
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* A repeater that caches views when they are removed from a
|
|
35
|
-
*
|
|
35
|
+
* `ViewContainerRef`. When new items are inserted into the container,
|
|
36
36
|
* the repeater will reuse one of the cached views instead of creating a new
|
|
37
37
|
* embedded view. Recycling cached views reduces the quantity of expensive DOM
|
|
38
38
|
* inserts.
|
package/dialog/index.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ import { F as FocusTrapFactory, A as A11yModule } from '../a11y-module.d-DBHGyKo
|
|
|
5
5
|
import { B as BasePortalOutlet, f as CdkPortalOutlet, C as ComponentPortal, T as TemplatePortal, D as DomPortal, a as ComponentType, h as PortalModule } from '../portal-directives.d-DbeNrI5D.js';
|
|
6
6
|
export { c as ɵɵCdkPortal, g as ɵɵPortalHostDirective, d as ɵɵTemplatePortalDirective } from '../portal-directives.d-DbeNrI5D.js';
|
|
7
7
|
import { a as Direction } from '../bidi-module.d-IN1Vp56w.js';
|
|
8
|
-
import { P as PositionStrategy, S as ScrollStrategy, O as OverlayRef, a as OverlayModule } from '../overlay-module.d-
|
|
8
|
+
import { P as PositionStrategy, S as ScrollStrategy, O as OverlayRef, a as OverlayModule } from '../overlay-module.d-C2CxnwqT.js';
|
|
9
9
|
import { Observable, Subject } from 'rxjs';
|
|
10
10
|
import * as _angular_cdk_portal from '@angular/cdk/portal';
|
|
11
11
|
import '../observers/index.js';
|
|
12
12
|
import '../number-property.d-CJVxXUcb.js';
|
|
13
|
-
import '../scrolling-module.d-
|
|
13
|
+
import '../scrolling-module.d-C_w4tIrZ.js';
|
|
14
14
|
import '../data-source.d-Bblv7Zvh.js';
|
|
15
15
|
import '@angular/common';
|
|
16
16
|
import '../scrolling/index.js';
|
package/drag-drop/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { a as Direction } from '../bidi-module.d-IN1Vp56w.js';
|
|
|
4
4
|
import { Subject, Observable } from 'rxjs';
|
|
5
5
|
import { ViewportRuler } from '../scrolling/index.js';
|
|
6
6
|
import { N as NumberInput } from '../number-property.d-CJVxXUcb.js';
|
|
7
|
-
import { b as CdkScrollableModule } from '../scrolling-module.d-
|
|
8
|
-
export { C as ɵɵCdkScrollable } from '../scrolling-module.d-
|
|
7
|
+
import { b as CdkScrollableModule } from '../scrolling-module.d-C_w4tIrZ.js';
|
|
8
|
+
export { C as ɵɵCdkScrollable } from '../scrolling-module.d-C_w4tIrZ.js';
|
|
9
9
|
import '../data-source.d-Bblv7Zvh.js';
|
|
10
10
|
|
|
11
11
|
/** Possible values that can be used to configure the drag start delay. */
|
package/fesm2022/cdk.mjs
CHANGED
package/fesm2022/cdk.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/version.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.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('20.0.
|
|
1
|
+
{"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/version.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.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('20.0.3');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
|
package/fesm2022/collections.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { U as UniqueSelectionDispatcher } from './unique-selection-dispatcher-Cewa_Eg3.mjs';
|
|
2
|
-
export { A as ArrayDataSource, _ as _RecycleViewRepeaterStrategy, b as _VIEW_REPEATER_STRATEGY, a as _ViewRepeaterOperation } from './recycle-view-repeater-strategy-
|
|
2
|
+
export { A as ArrayDataSource, _ as _RecycleViewRepeaterStrategy, b as _VIEW_REPEATER_STRATEGY, a as _ViewRepeaterOperation } from './recycle-view-repeater-strategy-SfuyU210.mjs';
|
|
3
3
|
export { D as DataSource, i as isDataSource } from './data-source-D34wiQZj.mjs';
|
|
4
|
-
export { _ as _DisposeViewRepeaterStrategy } from './dispose-view-repeater-strategy-
|
|
4
|
+
export { _ as _DisposeViewRepeaterStrategy } from './dispose-view-repeater-strategy-Cvpav0PR.mjs';
|
|
5
5
|
export { S as SelectionModel, g as getMultipleValuesInSingleSelectionError } from './selection-model-BCgC8uEN.mjs';
|
|
6
6
|
import '@angular/core';
|
|
7
7
|
import 'rxjs';
|
package/fesm2022/dialog.mjs
CHANGED
|
@@ -27,7 +27,7 @@ import './css-pixel-value-C_HEqLhI.mjs';
|
|
|
27
27
|
import './scrolling.mjs';
|
|
28
28
|
import './scrolling-BkvA05C8.mjs';
|
|
29
29
|
import './bidi.mjs';
|
|
30
|
-
import './recycle-view-repeater-strategy-
|
|
30
|
+
import './recycle-view-repeater-strategy-SfuyU210.mjs';
|
|
31
31
|
import './data-source-D34wiQZj.mjs';
|
|
32
32
|
|
|
33
33
|
/** Configuration for opening a modal dialog. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as _ViewRepeaterOperation } from './recycle-view-repeater-strategy-
|
|
1
|
+
import { a as _ViewRepeaterOperation } from './recycle-view-repeater-strategy-SfuyU210.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A repeater that destroys views when they are removed from a
|
|
5
|
-
*
|
|
5
|
+
* `ViewContainerRef`. When new items are inserted into the container,
|
|
6
6
|
* the repeater will always construct a new embedded view for each item.
|
|
7
7
|
*
|
|
8
8
|
* @template T The type for the embedded view's $implicit property.
|
|
@@ -41,4 +41,4 @@ class _DisposeViewRepeaterStrategy {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export { _DisposeViewRepeaterStrategy as _ };
|
|
44
|
-
//# sourceMappingURL=dispose-view-repeater-strategy-
|
|
44
|
+
//# sourceMappingURL=dispose-view-repeater-strategy-Cvpav0PR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispose-view-repeater-strategy-Cvpav0PR.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/collections/dispose-view-repeater-strategy.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.dev/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 * `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 _DisposeViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemContext<T>>\n implements _ViewRepeater<T, R, C>\n{\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ) {\n changes.forEachOperation(\n (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n ) => {\n let view: EmbeddedViewRef<C> | undefined;\n let operation: _ViewRepeaterOperation;\n if (record.previousIndex == null) {\n const insertContext = itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = viewContainerRef.createEmbeddedView(\n insertContext.templateRef,\n insertContext.context,\n insertContext.index,\n );\n operation = _ViewRepeaterOperation.INSERTED;\n } else if (currentIndex == null) {\n viewContainerRef.remove(adjustedPreviousIndex!);\n operation = _ViewRepeaterOperation.REMOVED;\n } else {\n view = viewContainerRef.get(adjustedPreviousIndex!) as EmbeddedViewRef<C>;\n viewContainerRef.move(view!, currentIndex);\n operation = _ViewRepeaterOperation.MOVED;\n }\n\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n },\n );\n }\n\n detach() {}\n}\n"],"names":[],"mappings":";;AAuBA;;;;;;;;AAQG;MACU,4BAA4B,CAAA;IAGvC,YAAY,CACV,OAA2B,EAC3B,gBAAkC,EAClC,kBAA4D,EAC5D,iBAAuD,EACvD,eAAgD,EAAA;QAEhD,OAAO,CAAC,gBAAgB,CACtB,CACE,MAA+B,EAC/B,qBAAoC,EACpC,YAA2B,KACzB;AACF,YAAA,IAAI,IAAoC;AACxC,YAAA,IAAI,SAAiC;AACrC,YAAA,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,EAAE;gBAChC,MAAM,aAAa,GAAG,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,EAAE,YAAY,CAAC;AACrF,gBAAA,IAAI,GAAG,gBAAgB,CAAC,kBAAkB,CACxC,aAAa,CAAC,WAAW,EACzB,aAAa,CAAC,OAAO,EACrB,aAAa,CAAC,KAAK,CACpB;AACD,gBAAA,SAAS,GAAG,sBAAsB,CAAC,QAAQ;;AACtC,iBAAA,IAAI,YAAY,IAAI,IAAI,EAAE;AAC/B,gBAAA,gBAAgB,CAAC,MAAM,CAAC,qBAAsB,CAAC;AAC/C,gBAAA,SAAS,GAAG,sBAAsB,CAAC,OAAO;;iBACrC;AACL,gBAAA,IAAI,GAAG,gBAAgB,CAAC,GAAG,CAAC,qBAAsB,CAAuB;AACzE,gBAAA,gBAAgB,CAAC,IAAI,CAAC,IAAK,EAAE,YAAY,CAAC;AAC1C,gBAAA,SAAS,GAAG,sBAAsB,CAAC,KAAK;;YAG1C,IAAI,eAAe,EAAE;AACnB,gBAAA,eAAe,CAAC;oBACd,OAAO,EAAE,IAAI,EAAE,OAAO;oBACtB,SAAS;oBACT,MAAM;AACP,iBAAA,CAAC;;AAEN,SAAC,CACF;;AAGH,IAAA,MAAM;AACP;;;;"}
|
package/fesm2022/drag-drop.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import './platform-DNDzkVcI.mjs';
|
|
|
15
15
|
import '@angular/common';
|
|
16
16
|
import './scrolling-BkvA05C8.mjs';
|
|
17
17
|
import './bidi.mjs';
|
|
18
|
-
import './recycle-view-repeater-strategy-
|
|
18
|
+
import './recycle-view-repeater-strategy-SfuyU210.mjs';
|
|
19
19
|
import './data-source-D34wiQZj.mjs';
|
|
20
20
|
|
|
21
21
|
/** Creates a deep clone of an element. */
|
package/fesm2022/menu.mjs
CHANGED
|
@@ -22,7 +22,7 @@ import './scrolling.mjs';
|
|
|
22
22
|
import './element-x4z00URv.mjs';
|
|
23
23
|
import './scrolling-BkvA05C8.mjs';
|
|
24
24
|
import './bidi.mjs';
|
|
25
|
-
import './recycle-view-repeater-strategy-
|
|
25
|
+
import './recycle-view-repeater-strategy-SfuyU210.mjs';
|
|
26
26
|
import './data-source-D34wiQZj.mjs';
|
|
27
27
|
import './fake-event-detection-DWOdFTFz.mjs';
|
|
28
28
|
import './passive-listeners-esHZRgIN.mjs';
|
package/fesm2022/overlay.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import './directionality-CChdj3az.mjs';
|
|
|
20
20
|
import './keycodes-CpHkExLC.mjs';
|
|
21
21
|
import './keycodes.mjs';
|
|
22
22
|
import './element-x4z00URv.mjs';
|
|
23
|
-
import './recycle-view-repeater-strategy-
|
|
23
|
+
import './recycle-view-repeater-strategy-SfuyU210.mjs';
|
|
24
24
|
import './data-source-D34wiQZj.mjs';
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -15,7 +15,7 @@ class ArrayDataSource extends DataSource {
|
|
|
15
15
|
disconnect() { }
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
/** Indicates how a view was changed by a
|
|
18
|
+
/** Indicates how a view was changed by a `_ViewRepeater`. */
|
|
19
19
|
var _ViewRepeaterOperation;
|
|
20
20
|
(function (_ViewRepeaterOperation) {
|
|
21
21
|
/** The content of an existing view was replaced with another item. */
|
|
@@ -28,14 +28,14 @@ var _ViewRepeaterOperation;
|
|
|
28
28
|
_ViewRepeaterOperation[_ViewRepeaterOperation["REMOVED"] = 3] = "REMOVED";
|
|
29
29
|
})(_ViewRepeaterOperation || (_ViewRepeaterOperation = {}));
|
|
30
30
|
/**
|
|
31
|
-
* Injection token for
|
|
31
|
+
* Injection token for `_ViewRepeater`. This token is for use by Angular Material only.
|
|
32
32
|
* @docs-private
|
|
33
33
|
*/
|
|
34
34
|
const _VIEW_REPEATER_STRATEGY = new InjectionToken('_ViewRepeater');
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* A repeater that caches views when they are removed from a
|
|
38
|
-
*
|
|
38
|
+
* `ViewContainerRef`. When new items are inserted into the container,
|
|
39
39
|
* the repeater will reuse one of the cached views instead of creating a new
|
|
40
40
|
* embedded view. Recycling cached views reduces the quantity of expensive DOM
|
|
41
41
|
* inserts.
|
|
@@ -153,4 +153,4 @@ class _RecycleViewRepeaterStrategy {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
export { ArrayDataSource as A, _RecycleViewRepeaterStrategy as _, _ViewRepeaterOperation as a, _VIEW_REPEATER_STRATEGY as b };
|
|
156
|
-
//# sourceMappingURL=recycle-view-repeater-strategy-
|
|
156
|
+
//# sourceMappingURL=recycle-view-repeater-strategy-SfuyU210.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recycle-view-repeater-strategy-SfuyU210.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/collections/array-data-source.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/collections/view-repeater.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/collections/recycle-view-repeater-strategy.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.dev/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.dev/license\n */\n\nimport {\n InjectionToken,\n IterableChangeRecord,\n IterableChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * The context for an embedded view in the repeater's view container.\n *\n * @template T The type for the embedded view's $implicit property.\n */\nexport interface _ViewRepeaterItemContext<T> {\n $implicit?: T;\n}\n\n/**\n * The arguments needed to construct an embedded view for an item in a view\n * container.\n *\n * @template C The type for the context passed to each embedded view.\n */\nexport interface _ViewRepeaterItemInsertArgs<C> {\n templateRef: TemplateRef<C>;\n context?: C;\n index?: number;\n}\n\n/**\n * A factory that derives the embedded view context for an item in a view\n * container.\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 type _ViewRepeaterItemContextFactory<T, R, C extends _ViewRepeaterItemContext<T>> = (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n) => _ViewRepeaterItemInsertArgs<C>;\n\n/**\n * Extracts the value of an item from an `IterableChangeRecord`.\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 */\nexport type _ViewRepeaterItemValueResolver<T, R> = (record: IterableChangeRecord<R>) => T;\n\n/** Indicates how a view was changed by a `_ViewRepeater`. */\nexport enum _ViewRepeaterOperation {\n /** The content of an existing view was replaced with another item. */\n REPLACED,\n /** A new view was created with `createEmbeddedView`. */\n INSERTED,\n /** The position of a view changed, but the content remains the same. */\n MOVED,\n /** A view was detached from the view container. */\n REMOVED,\n}\n\n/**\n * Meta data describing the state of a view after it was updated by a `_ViewRepeater`.\n *\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 interface _ViewRepeaterItemChange<R, C> {\n /** The view's context after it was changed. */\n context?: C;\n /** Indicates how the view was changed. */\n operation: _ViewRepeaterOperation;\n /** The view's corresponding change record. */\n record: IterableChangeRecord<R>;\n}\n\n/**\n * Type for a callback to be executed after a view has changed.\n *\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 type _ViewRepeaterItemChanged<R, C> = (change: _ViewRepeaterItemChange<R, C>) => void;\n\n/**\n * Describes a strategy for rendering items in a `ViewContainerRef`.\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 interface _ViewRepeater<T, R, C extends _ViewRepeaterItemContext<T>> {\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ): void;\n\n detach(): void;\n}\n\n/**\n * Injection token for `_ViewRepeater`. This token is for use by Angular Material only.\n * @docs-private\n */\nexport const _VIEW_REPEATER_STRATEGY = new InjectionToken<\n _ViewRepeater<unknown, unknown, _ViewRepeaterItemContext<unknown>>\n>('_ViewRepeater');\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.dev/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 _ViewRepeaterItemInsertArgs,\n _ViewRepeaterItemValueResolver,\n _ViewRepeaterOperation,\n} from './view-repeater';\n\n/**\n * A repeater that caches views when they are removed from a\n * `ViewContainerRef`. When new items are inserted into the container,\n * the repeater will reuse one of the cached views instead of creating a new\n * embedded view. Recycling cached views reduces the quantity of expensive DOM\n * inserts.\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 _RecycleViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemContext<T>>\n implements _ViewRepeater<T, R, C>\n{\n /**\n * The size of the cache used to store unused views.\n * Setting the cache size to `0` will disable caching. Defaults to 20 views.\n */\n viewCacheSize: number = 20;\n\n /**\n * View cache that stores embedded view instances that have been previously stamped out,\n * but don't are not currently rendered. The view repeater will reuse these views rather than\n * creating brand new ones.\n *\n * TODO(michaeljamesparsons) Investigate whether using a linked list would improve performance.\n */\n private _viewCache: EmbeddedViewRef<C>[] = [];\n\n /** Apply changes to the DOM. */\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ) {\n // Rearrange the views to put them in the right location.\n changes.forEachOperation(\n (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n ) => {\n let view: EmbeddedViewRef<C> | undefined;\n let operation: _ViewRepeaterOperation;\n if (record.previousIndex == null) {\n // Item added.\n const viewArgsFactory = () =>\n itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = this._insertView(\n viewArgsFactory,\n currentIndex!,\n viewContainerRef,\n itemValueResolver(record),\n );\n operation = view ? _ViewRepeaterOperation.INSERTED : _ViewRepeaterOperation.REPLACED;\n } else if (currentIndex == null) {\n // Item removed.\n this._detachAndCacheView(adjustedPreviousIndex!, viewContainerRef);\n operation = _ViewRepeaterOperation.REMOVED;\n } else {\n // Item moved.\n view = this._moveView(\n adjustedPreviousIndex!,\n currentIndex!,\n viewContainerRef,\n itemValueResolver(record),\n );\n operation = _ViewRepeaterOperation.MOVED;\n }\n\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n },\n );\n }\n\n detach() {\n for (const view of this._viewCache) {\n view.destroy();\n }\n this._viewCache = [];\n }\n\n /**\n * Inserts a view for a new item, either from the cache or by creating a new\n * one. Returns `undefined` if the item was inserted into a cached view.\n */\n private _insertView(\n viewArgsFactory: () => _ViewRepeaterItemInsertArgs<C>,\n currentIndex: number,\n viewContainerRef: ViewContainerRef,\n value: T,\n ): EmbeddedViewRef<C> | undefined {\n const cachedView = this._insertViewFromCache(currentIndex!, viewContainerRef);\n if (cachedView) {\n cachedView.context.$implicit = value;\n return undefined;\n }\n\n const viewArgs = viewArgsFactory();\n return viewContainerRef.createEmbeddedView(\n viewArgs.templateRef,\n viewArgs.context,\n viewArgs.index,\n );\n }\n\n /** Detaches the view at the given index and inserts into the view cache. */\n private _detachAndCacheView(index: number, viewContainerRef: ViewContainerRef) {\n const detachedView = viewContainerRef.detach(index) as EmbeddedViewRef<C>;\n this._maybeCacheView(detachedView, viewContainerRef);\n }\n\n /** Moves view at the previous index to the current index. */\n private _moveView(\n adjustedPreviousIndex: number,\n currentIndex: number,\n viewContainerRef: ViewContainerRef,\n value: T,\n ): EmbeddedViewRef<C> {\n const view = viewContainerRef.get(adjustedPreviousIndex!) as EmbeddedViewRef<C>;\n viewContainerRef.move(view, currentIndex);\n view.context.$implicit = value;\n return view;\n }\n\n /**\n * Cache the given detached view. If the cache is full, the view will be\n * destroyed.\n */\n private _maybeCacheView(view: EmbeddedViewRef<C>, viewContainerRef: ViewContainerRef) {\n if (this._viewCache.length < this.viewCacheSize) {\n this._viewCache.push(view);\n } else {\n const index = viewContainerRef.indexOf(view);\n\n // The host component could remove views from the container outside of\n // the view repeater. It's unlikely this will occur, but just in case,\n // destroy the view on its own, otherwise destroy it through the\n // container to ensure that all the references are removed.\n if (index === -1) {\n view.destroy();\n } else {\n viewContainerRef.remove(index);\n }\n }\n }\n\n /** Inserts a recycled view from the cache at the given index. */\n private _insertViewFromCache(\n index: number,\n viewContainerRef: ViewContainerRef,\n ): EmbeddedViewRef<C> | null {\n const cachedView = this._viewCache.pop();\n if (cachedView) {\n viewContainerRef.insert(cachedView, index);\n }\n return cachedView || null;\n }\n}\n"],"names":["observableOf"],"mappings":";;;;AAWA;AACM,MAAO,eAAmB,SAAQ,UAAa,CAAA;AAC/B,IAAA,KAAA;AAApB,IAAA,WAAA,CAAoB,KAA8C,EAAA;AAChE,QAAA,KAAK,EAAE;QADW,IAAK,CAAA,KAAA,GAAL,KAAK;;IAIzB,OAAO,GAAA;QACL,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,GAAGA,EAAY,CAAC,IAAI,CAAC,KAAK,CAAC;;AAGzE,IAAA,UAAU;AACX;;ACqCD;IACY;AAAZ,CAAA,UAAY,sBAAsB,EAAA;;AAEhC,IAAA,sBAAA,CAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;;AAER,IAAA,sBAAA,CAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;;AAER,IAAA,sBAAA,CAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK;;AAEL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G;IACK,eAAe,CAAC,IAAwB,EAAE,gBAAkC,EAAA;QAClF,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE;AAC/C,YAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;;aACrB;YACL,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC;;;;;AAM5C,YAAA,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBAChB,IAAI,CAAC,OAAO,EAAE;;iBACT;AACL,gBAAA,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC;;;;;IAM5B,oBAAoB,CAC1B,KAAa,EACb,gBAAkC,EAAA;QAElC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE;QACxC,IAAI,UAAU,EAAE;AACd,YAAA,gBAAgB,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC;;QAE5C,OAAO,UAAU,IAAI,IAAI;;AAE5B;;;;"}
|
package/fesm2022/scrolling.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { D as Directionality } from './directionality-CChdj3az.mjs';
|
|
|
8
8
|
import { g as getRtlScrollAxisType, R as RtlScrollAxisType, s as supportsScrollBehavior } from './scrolling-BkvA05C8.mjs';
|
|
9
9
|
import { BidiModule } from './bidi.mjs';
|
|
10
10
|
export { Dir as ɵɵDir } from './bidi.mjs';
|
|
11
|
-
import { b as _VIEW_REPEATER_STRATEGY, A as ArrayDataSource, _ as _RecycleViewRepeaterStrategy } from './recycle-view-repeater-strategy-
|
|
11
|
+
import { b as _VIEW_REPEATER_STRATEGY, A as ArrayDataSource, _ as _RecycleViewRepeaterStrategy } from './recycle-view-repeater-strategy-SfuyU210.mjs';
|
|
12
12
|
import { i as isDataSource } from './data-source-D34wiQZj.mjs';
|
|
13
13
|
import '@angular/common';
|
|
14
14
|
|
|
@@ -634,7 +634,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
634
634
|
|
|
635
635
|
const VIRTUAL_SCROLLABLE = new InjectionToken('VIRTUAL_SCROLLABLE');
|
|
636
636
|
/**
|
|
637
|
-
* Extending the
|
|
637
|
+
* Extending the `CdkScrollable` to be used as scrolling container for virtual scrolling.
|
|
638
638
|
*/
|
|
639
639
|
class CdkVirtualScrollable extends CdkScrollable {
|
|
640
640
|
constructor() {
|