@angular/cdk 20.2.0-next.2 → 20.2.0-next.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/a11y/index.d.ts +8 -8
- package/{a11y-module.d--J1yhM7R.d.ts → a11y-module.d.d.ts} +3 -3
- package/accordion/index.d.ts +1 -1
- package/{activedescendant-key-manager.d-DLNLWTtr.d.ts → activedescendant-key-manager.d.d.ts} +3 -3
- package/bidi/index.d.ts +1 -1
- package/{bidi-module.d-IN1Vp56w.d.ts → bidi-module.d.d.ts} +2 -2
- package/coercion/index.d.ts +1 -1
- package/collections/index.d.ts +7 -7
- package/{data-source.d-Bblv7Zvh.d.ts → data-source.d.d.ts} +2 -2
- package/dialog/index.d.ts +11 -11
- package/drag-drop/index.d.ts +5 -5
- package/fesm2022/{a11y-module-i3TQk2dk.mjs → a11y-module.mjs} +29 -29
- package/fesm2022/a11y-module.mjs.map +1 -0
- package/fesm2022/a11y.mjs +28 -28
- package/fesm2022/accordion.mjs +12 -12
- package/fesm2022/{activedescendant-key-manager-Uaf4ZFAJ.mjs → activedescendant-key-manager.mjs} +3 -3
- package/fesm2022/activedescendant-key-manager.mjs.map +1 -0
- package/fesm2022/{array-I1yfCXUO.mjs → array.mjs} +2 -2
- package/fesm2022/array.mjs.map +1 -0
- package/fesm2022/bidi.mjs +9 -9
- package/fesm2022/{breakpoints-observer-B9oGujtp.mjs → breakpoints-observer.mjs} +10 -10
- package/fesm2022/breakpoints-observer.mjs.map +1 -0
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs +10 -10
- package/fesm2022/coercion.mjs +3 -3
- package/fesm2022/collections.mjs +5 -5
- package/fesm2022/{css-pixel-value-C_HEqLhI.mjs → css-pixel-value.mjs} +2 -2
- package/fesm2022/css-pixel-value.mjs.map +1 -0
- package/fesm2022/{data-source-D34wiQZj.mjs → data-source.mjs} +2 -2
- package/fesm2022/data-source.mjs.map +1 -0
- package/fesm2022/dialog.mjs +29 -29
- package/fesm2022/{directionality-Cbl-1nFG.mjs → directionality.mjs} +5 -5
- package/fesm2022/directionality.mjs.map +1 -0
- package/fesm2022/{dispose-view-repeater-strategy-Cvpav0PR.mjs → dispose-view-repeater-strategy.mjs} +3 -3
- package/fesm2022/dispose-view-repeater-strategy.mjs.map +1 -0
- package/fesm2022/drag-drop.mjs +42 -42
- package/fesm2022/{element-x4z00URv.mjs → element.mjs} +2 -2
- package/fesm2022/element.mjs.map +1 -0
- package/fesm2022/{fake-event-detection-DWOdFTFz.mjs → fake-event-detection.mjs} +2 -2
- package/fesm2022/fake-event-detection.mjs.map +1 -0
- package/fesm2022/{focus-key-manager-C8nuVjSq.mjs → focus-key-manager.mjs} +3 -3
- package/fesm2022/focus-key-manager.mjs.map +1 -0
- package/fesm2022/{focus-monitor-CprcLT6A.mjs → focus-monitor.mjs} +17 -17
- package/fesm2022/focus-monitor.mjs.map +1 -0
- package/fesm2022/{id-generator-CeVEEGXw.mjs → id-generator.mjs} +5 -5
- package/fesm2022/id-generator.mjs.map +1 -0
- package/fesm2022/keycodes.mjs +1 -1
- package/fesm2022/{keycodes-CpHkExLC.mjs → keycodes2.mjs} +2 -2
- package/fesm2022/keycodes2.mjs.map +1 -0
- package/fesm2022/layout.mjs +7 -7
- package/fesm2022/{list-key-manager-BPo6sXWX.mjs → list-key-manager.mjs} +4 -4
- package/fesm2022/list-key-manager.mjs.map +1 -0
- package/fesm2022/listbox.mjs +19 -19
- package/fesm2022/menu.mjs +70 -70
- package/fesm2022/observers/private.mjs +3 -3
- package/fesm2022/observers.mjs +14 -14
- package/fesm2022/{overlay-module-CMC8dXNw.mjs → overlay-module.mjs} +46 -46
- package/fesm2022/overlay-module.mjs.map +1 -0
- package/fesm2022/overlay.mjs +18 -18
- package/fesm2022/{passive-listeners-esHZRgIN.mjs → passive-listeners.mjs} +2 -2
- package/fesm2022/passive-listeners.mjs.map +1 -0
- package/fesm2022/platform.mjs +9 -9
- package/fesm2022/{platform-BWwIqQ_X.mjs → platform2.mjs} +5 -5
- package/fesm2022/platform2.mjs.map +1 -0
- package/fesm2022/portal.mjs +16 -16
- package/fesm2022/private.mjs +4 -4
- package/fesm2022/{recycle-view-repeater-strategy-SfuyU210.mjs → recycle-view-repeater-strategy.mjs} +3 -3
- package/fesm2022/recycle-view-repeater-strategy.mjs.map +1 -0
- package/fesm2022/scrolling.mjs +41 -41
- package/fesm2022/{scrolling-BkvA05C8.mjs → scrolling2.mjs} +2 -2
- package/fesm2022/scrolling2.mjs.map +1 -0
- package/fesm2022/{selection-model-BCgC8uEN.mjs → selection-model.mjs} +2 -2
- package/fesm2022/selection-model.mjs.map +1 -0
- package/fesm2022/{shadow-dom-B0oHn41l.mjs → shadow-dom.mjs} +2 -2
- package/fesm2022/shadow-dom.mjs.map +1 -0
- package/fesm2022/stepper.mjs +29 -29
- package/fesm2022/{style-loader-BTuU6vCe.mjs → style-loader.mjs} +5 -5
- package/fesm2022/style-loader.mjs.map +1 -0
- package/fesm2022/table.mjs +81 -81
- package/fesm2022/{test-environment-CT0XxPyp.mjs → test-environment.mjs} +2 -2
- package/fesm2022/test-environment.mjs.map +1 -0
- package/fesm2022/testing/testbed.mjs +1 -1
- package/fesm2022/text-field.mjs +19 -19
- package/fesm2022/{tree-key-manager-KnCoIkIC.mjs → tree-key-manager.mjs} +3 -3
- package/fesm2022/tree-key-manager.mjs.map +1 -0
- package/fesm2022/tree.mjs +31 -31
- package/fesm2022/{typeahead-9ZW4Dtsf.mjs → typeahead.mjs} +3 -3
- package/fesm2022/typeahead.mjs.map +1 -0
- package/fesm2022/{unique-selection-dispatcher-CSFLc-6k.mjs → unique-selection-dispatcher.mjs} +5 -5
- package/fesm2022/unique-selection-dispatcher.mjs.map +1 -0
- package/{focus-key-manager.d-DBw2_DcY.d.ts → focus-key-manager.d.d.ts} +4 -4
- package/{focus-monitor.d-2iZxjw4R.d.ts → focus-monitor.d.d.ts} +2 -2
- package/{harness-environment.d-C-TBj7IN.d.ts → harness-environment.d.d.ts} +2 -2
- package/{list-key-manager.d-CkFcwXee.d.ts → list-key-manager.d.d.ts} +2 -2
- package/listbox/index.d.ts +3 -3
- package/menu/index.d.ts +11 -11
- package/{number-property.d-CJVxXUcb.d.ts → number-property.d.d.ts} +2 -2
- package/observers/index.d.ts +1 -1
- package/overlay/index.d.ts +10 -10
- package/{overlay-module.d-BvvR6Y05.d.ts → overlay-module.d.d.ts} +7 -7
- package/package.json +1 -1
- package/platform/index.d.ts +1 -1
- package/{platform.d-B3vREl3q.d.ts → platform.d.d.ts} +1 -1
- package/portal/index.d.ts +2 -2
- package/{portal-directives.d-DbeNrI5D.d.ts → portal-directives.d.d.ts} +2 -2
- package/private/index.d.ts +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/scrolling/index.d.ts +4 -4
- package/{scrolling-module.d-3Rw5UxLk.d.ts → scrolling-module.d.d.ts} +5 -5
- package/{selection-model.d-DNgOONDg.d.ts → selection-model.d.d.ts} +2 -2
- package/stepper/index.d.ts +4 -4
- package/{style-loader.d-BXZfQZTF.d.ts → style-loader.d.d.ts} +1 -1
- package/table/index.d.ts +5 -5
- package/testing/index.d.ts +1 -1
- package/testing/selenium-webdriver/index.d.ts +1 -1
- package/testing/testbed/index.d.ts +1 -1
- package/text-field/index.d.ts +1 -1
- package/tree/index.d.ts +3 -3
- package/{tree-key-manager-strategy.d-XB6M79l-.d.ts → tree-key-manager-strategy.d.d.ts} +1 -1
- package/{unique-selection-dispatcher.d-DSFqf1MM.d.ts → unique-selection-dispatcher.d.d.ts} +2 -2
- package/{view-repeater.d-DUdkOYhk.d.ts → view-repeater.d.d.ts} +2 -2
- package/fesm2022/a11y-module-i3TQk2dk.mjs.map +0 -1
- package/fesm2022/activedescendant-key-manager-Uaf4ZFAJ.mjs.map +0 -1
- package/fesm2022/array-I1yfCXUO.mjs.map +0 -1
- package/fesm2022/breakpoints-observer-B9oGujtp.mjs.map +0 -1
- package/fesm2022/css-pixel-value-C_HEqLhI.mjs.map +0 -1
- package/fesm2022/data-source-D34wiQZj.mjs.map +0 -1
- package/fesm2022/directionality-Cbl-1nFG.mjs.map +0 -1
- package/fesm2022/dispose-view-repeater-strategy-Cvpav0PR.mjs.map +0 -1
- package/fesm2022/element-x4z00URv.mjs.map +0 -1
- package/fesm2022/fake-event-detection-DWOdFTFz.mjs.map +0 -1
- package/fesm2022/focus-key-manager-C8nuVjSq.mjs.map +0 -1
- package/fesm2022/focus-monitor-CprcLT6A.mjs.map +0 -1
- package/fesm2022/id-generator-CeVEEGXw.mjs.map +0 -1
- package/fesm2022/keycodes-CpHkExLC.mjs.map +0 -1
- package/fesm2022/list-key-manager-BPo6sXWX.mjs.map +0 -1
- package/fesm2022/overlay-module-CMC8dXNw.mjs.map +0 -1
- package/fesm2022/passive-listeners-esHZRgIN.mjs.map +0 -1
- package/fesm2022/platform-BWwIqQ_X.mjs.map +0 -1
- package/fesm2022/recycle-view-repeater-strategy-SfuyU210.mjs.map +0 -1
- package/fesm2022/scrolling-BkvA05C8.mjs.map +0 -1
- package/fesm2022/selection-model-BCgC8uEN.mjs.map +0 -1
- package/fesm2022/shadow-dom-B0oHn41l.mjs.map +0 -1
- package/fesm2022/style-loader-BTuU6vCe.mjs.map +0 -1
- package/fesm2022/test-environment-CT0XxPyp.mjs.map +0 -1
- package/fesm2022/tree-key-manager-KnCoIkIC.mjs.map +0 -1
- package/fesm2022/typeahead-9ZW4Dtsf.mjs.map +0 -1
- package/fesm2022/unique-selection-dispatcher-CSFLc-6k.mjs.map +0 -1
package/fesm2022/overlay.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { OverlayContainer } from './overlay-module.mjs';
|
|
2
|
+
export { BlockScrollStrategy, CdkConnectedOverlay, CdkOverlayOrigin, CloseScrollStrategy, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, GlobalPositionStrategy, NoopScrollStrategy, Overlay, OverlayConfig, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayPositionBuilder, OverlayRef, RepositionScrollStrategy, STANDARD_DROPDOWN_ADJACENT_POSITIONS, STANDARD_DROPDOWN_BELOW_POSITIONS, ScrollStrategyOptions, ScrollingVisibility, createBlockScrollStrategy, createCloseScrollStrategy, createFlexibleConnectedPositionStrategy, createGlobalPositionStrategy, createNoopScrollStrategy, createOverlayRef, createRepositionScrollStrategy, validateHorizontalPosition, validateVerticalPosition } from './overlay-module.mjs';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, RendererFactory2, Injectable } from '@angular/core';
|
|
5
5
|
export { CdkScrollable, ScrollDispatcher, ViewportRuler, CdkFixedSizeVirtualScroll as ɵɵCdkFixedSizeVirtualScroll, CdkScrollableModule as ɵɵCdkScrollableModule, CdkVirtualForOf as ɵɵCdkVirtualForOf, CdkVirtualScrollViewport as ɵɵCdkVirtualScrollViewport, CdkVirtualScrollableElement as ɵɵCdkVirtualScrollableElement, CdkVirtualScrollableWindow as ɵɵCdkVirtualScrollableWindow } from './scrolling.mjs';
|
|
6
6
|
export { Dir as ɵɵDir } from './bidi.mjs';
|
|
7
7
|
import '@angular/common';
|
|
8
|
-
import './
|
|
9
|
-
import './shadow-dom
|
|
10
|
-
import './test-environment
|
|
11
|
-
import './style-loader
|
|
8
|
+
import './platform2.mjs';
|
|
9
|
+
import './shadow-dom.mjs';
|
|
10
|
+
import './test-environment.mjs';
|
|
11
|
+
import './style-loader.mjs';
|
|
12
12
|
import 'rxjs';
|
|
13
|
-
import './css-pixel-value
|
|
14
|
-
import './array
|
|
13
|
+
import './css-pixel-value.mjs';
|
|
14
|
+
import './array.mjs';
|
|
15
15
|
import './portal.mjs';
|
|
16
|
-
import './
|
|
16
|
+
import './scrolling2.mjs';
|
|
17
17
|
import 'rxjs/operators';
|
|
18
|
-
import './id-generator
|
|
19
|
-
import './directionality
|
|
20
|
-
import './
|
|
18
|
+
import './id-generator.mjs';
|
|
19
|
+
import './directionality.mjs';
|
|
20
|
+
import './keycodes2.mjs';
|
|
21
21
|
import './keycodes.mjs';
|
|
22
|
-
import './element
|
|
23
|
-
import './recycle-view-repeater-strategy
|
|
24
|
-
import './data-source
|
|
22
|
+
import './element.mjs';
|
|
23
|
+
import './recycle-view-repeater-strategy.mjs';
|
|
24
|
+
import './data-source.mjs';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Alternative to OverlayContainer that supports correct displaying of overlay elements in
|
|
@@ -89,10 +89,10 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
89
89
|
_document.msFullscreenElement ||
|
|
90
90
|
null);
|
|
91
91
|
}
|
|
92
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
93
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: FullscreenOverlayContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
93
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: FullscreenOverlayContainer, providedIn: 'root' });
|
|
94
94
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: FullscreenOverlayContainer, decorators: [{
|
|
96
96
|
type: Injectable,
|
|
97
97
|
args: [{ providedIn: 'root' }]
|
|
98
98
|
}], ctorParameters: () => [] });
|
|
@@ -27,5 +27,5 @@ function normalizePassiveListenerOptions(options) {
|
|
|
27
27
|
return supportsPassiveEventListeners() ? options : !!options.capture;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export { normalizePassiveListenerOptions
|
|
31
|
-
//# sourceMappingURL=passive-listeners
|
|
30
|
+
export { normalizePassiveListenerOptions, supportsPassiveEventListeners };
|
|
31
|
+
//# sourceMappingURL=passive-listeners.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passive-listeners.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/platform/features/passive-listeners.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\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener(\n 'test',\n null!,\n Object.defineProperty({}, 'passive', {\n get: () => (supportsPassiveEvents = true),\n }),\n );\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nexport function normalizePassiveListenerOptions(\n options: AddEventListenerOptions,\n): AddEventListenerOptions | boolean {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n}\n"],"names":[],"mappings":"AAQA;AACA,IAAI,qBAA8B;AAElC;;;AAGG;SACa,6BAA6B,GAAA;IAC3C,IAAI,qBAAqB,IAAI,IAAI,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AAClE,QAAA,IAAI;AACF,YAAA,MAAM,CAAC,gBAAgB,CACrB,MAAM,EACN,IAAK,EACL,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE;gBACnC,GAAG,EAAE,OAAO,qBAAqB,GAAG,IAAI,CAAC;AAC1C,aAAA,CAAC,CACH;;gBACO;AACR,YAAA,qBAAqB,GAAG,qBAAqB,IAAI,KAAK;;;AAI1D,IAAA,OAAO,qBAAqB;AAC9B;AAEA;;;;;AAKG;AACG,SAAU,+BAA+B,CAC7C,OAAgC,EAAA;AAEhC,IAAA,OAAO,6BAA6B,EAAE,GAAG,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO;AACtE;;;;"}
|
package/fesm2022/platform.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Platform } from './platform2.mjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { NgModule } from '@angular/core';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
4
|
+
export { normalizePassiveListenerOptions, supportsPassiveEventListeners } from './passive-listeners.mjs';
|
|
5
|
+
export { RtlScrollAxisType, getRtlScrollAxisType, supportsScrollBehavior } from './scrolling2.mjs';
|
|
6
|
+
export { _getEventTarget, _getFocusedElementPierceShadowDom, _getShadowRoot, _supportsShadowDom } from './shadow-dom.mjs';
|
|
7
|
+
export { _isTestEnvironment } from './test-environment.mjs';
|
|
8
8
|
import '@angular/common';
|
|
9
9
|
|
|
10
10
|
class PlatformModule {
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
12
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
13
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: PlatformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: PlatformModule });
|
|
13
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: PlatformModule });
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: PlatformModule, decorators: [{
|
|
16
16
|
type: NgModule,
|
|
17
17
|
args: [{}]
|
|
18
18
|
}] });
|
|
@@ -65,13 +65,13 @@ class Platform {
|
|
|
65
65
|
/** Whether the current browser is Safari. */
|
|
66
66
|
SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;
|
|
67
67
|
constructor() { }
|
|
68
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
69
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
68
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: Platform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
69
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: Platform, providedIn: 'root' });
|
|
70
70
|
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: Platform, decorators: [{
|
|
72
72
|
type: Injectable,
|
|
73
73
|
args: [{ providedIn: 'root' }]
|
|
74
74
|
}], ctorParameters: () => [] });
|
|
75
75
|
|
|
76
|
-
export { Platform
|
|
77
|
-
//# sourceMappingURL=
|
|
76
|
+
export { Platform };
|
|
77
|
+
//# sourceMappingURL=platform2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform2.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/platform/platform.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 {inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator;\n} catch {\n hasV8BreakIterator = false;\n}\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable({providedIn: 'root'})\nexport class Platform {\n private _platformId = inject(PLATFORM_ID);\n\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n isBrowser: boolean = this._platformId\n ? isPlatformBrowser(this._platformId)\n : typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean =\n this.isBrowser &&\n !!((window as any).chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' &&\n !this.EDGE &&\n !this.TRIDENT;\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean =\n this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) &&\n !this.BLINK &&\n !this.EDGE &&\n !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean =\n this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n\n /** Backwards-compatible constructor. */\n constructor(..._args: unknown[]);\n\n constructor() {}\n}\n"],"names":[],"mappings":";;;;AAWA;AACA;AACA,IAAI,kBAA2B;AAE/B;AACA;AACA;AACA;AACA;AACA,IAAI;IACF,kBAAkB,GAAG,OAAO,IAAI,KAAK,WAAW,IAAK,IAAY,CAAC,eAAe;AACnF;AAAE,MAAM;IACN,kBAAkB,GAAG,KAAK;AAC5B;AAEA;;;AAGG;MAEU,QAAQ,CAAA;AACX,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;;;;;IAMzC,SAAS,GAAY,IAAI,CAAC;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A,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAR,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,QAAQ,cADI,MAAM,EAAA,CAAA;;kGAClB,QAAQ,EAAA,UAAA,EAAA,CAAA;kBADpB,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;;;"}
|
package/fesm2022/portal.mjs
CHANGED
|
@@ -390,10 +390,10 @@ class CdkPortal extends TemplatePortal {
|
|
|
390
390
|
const viewContainerRef = inject(ViewContainerRef);
|
|
391
391
|
super(templateRef, viewContainerRef);
|
|
392
392
|
}
|
|
393
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
394
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
393
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
394
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkPortal, isStandalone: true, selector: "[cdkPortal]", exportAs: ["cdkPortal"], usesInheritance: true, ngImport: i0 });
|
|
395
395
|
}
|
|
396
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkPortal, decorators: [{
|
|
397
397
|
type: Directive,
|
|
398
398
|
args: [{
|
|
399
399
|
selector: '[cdkPortal]',
|
|
@@ -405,15 +405,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.1",
|
|
|
405
405
|
* @breaking-change 9.0.0
|
|
406
406
|
*/
|
|
407
407
|
class TemplatePortalDirective extends CdkPortal {
|
|
408
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
409
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
408
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: TemplatePortalDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
409
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: TemplatePortalDirective, isStandalone: true, selector: "[cdk-portal], [portal]", providers: [
|
|
410
410
|
{
|
|
411
411
|
provide: CdkPortal,
|
|
412
412
|
useExisting: TemplatePortalDirective,
|
|
413
413
|
},
|
|
414
414
|
], exportAs: ["cdkPortal"], usesInheritance: true, ngImport: i0 });
|
|
415
415
|
}
|
|
416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: TemplatePortalDirective, decorators: [{
|
|
417
417
|
type: Directive,
|
|
418
418
|
args: [{
|
|
419
419
|
selector: '[cdk-portal], [portal]',
|
|
@@ -555,10 +555,10 @@ class CdkPortalOutlet extends BasePortalOutlet {
|
|
|
555
555
|
? nativeElement
|
|
556
556
|
: nativeElement.parentNode);
|
|
557
557
|
}
|
|
558
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
559
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
558
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkPortalOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
559
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkPortalOutlet, isStandalone: true, selector: "[cdkPortalOutlet]", inputs: { portal: ["cdkPortalOutlet", "portal"] }, outputs: { attached: "attached" }, exportAs: ["cdkPortalOutlet"], usesInheritance: true, ngImport: i0 });
|
|
560
560
|
}
|
|
561
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkPortalOutlet, decorators: [{
|
|
562
562
|
type: Directive,
|
|
563
563
|
args: [{
|
|
564
564
|
selector: '[cdkPortalOutlet]',
|
|
@@ -575,15 +575,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.1",
|
|
|
575
575
|
* @breaking-change 9.0.0
|
|
576
576
|
*/
|
|
577
577
|
class PortalHostDirective extends CdkPortalOutlet {
|
|
578
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
579
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
578
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: PortalHostDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
579
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: PortalHostDirective, isStandalone: true, selector: "[cdkPortalHost], [portalHost]", inputs: { portal: ["cdkPortalHost", "portal"] }, providers: [
|
|
580
580
|
{
|
|
581
581
|
provide: CdkPortalOutlet,
|
|
582
582
|
useExisting: PortalHostDirective,
|
|
583
583
|
},
|
|
584
584
|
], exportAs: ["cdkPortalHost"], usesInheritance: true, ngImport: i0 });
|
|
585
585
|
}
|
|
586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: PortalHostDirective, decorators: [{
|
|
587
587
|
type: Directive,
|
|
588
588
|
args: [{
|
|
589
589
|
selector: '[cdkPortalHost], [portalHost]',
|
|
@@ -598,11 +598,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.1",
|
|
|
598
598
|
}]
|
|
599
599
|
}] });
|
|
600
600
|
class PortalModule {
|
|
601
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
602
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
603
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
601
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: PortalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
602
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: PortalModule, imports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective] });
|
|
603
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: PortalModule });
|
|
604
604
|
}
|
|
605
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
605
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: PortalModule, decorators: [{
|
|
606
606
|
type: NgModule,
|
|
607
607
|
args: [{
|
|
608
608
|
imports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],
|
package/fesm2022/private.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { _CdkPrivateStyleLoader } from './style-loader.mjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
4
4
|
|
|
@@ -7,10 +7,10 @@ import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/
|
|
|
7
7
|
* @docs-private
|
|
8
8
|
*/
|
|
9
9
|
class _VisuallyHiddenLoader {
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
11
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: _VisuallyHiddenLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.2", type: _VisuallyHiddenLoader, isStandalone: true, selector: "ng-component", exportAs: ["cdkVisuallyHidden"], ngImport: i0, template: '', isInline: true, styles: [".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: _VisuallyHiddenLoader, decorators: [{
|
|
14
14
|
type: Component,
|
|
15
15
|
args: [{ exportAs: 'cdkVisuallyHidden', encapsulation: ViewEncapsulation.None, template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}\n"] }]
|
|
16
16
|
}] });
|
package/fesm2022/{recycle-view-repeater-strategy-SfuyU210.mjs → recycle-view-repeater-strategy.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isObservable, of } from 'rxjs';
|
|
2
|
-
import {
|
|
2
|
+
import { DataSource } from './data-source.mjs';
|
|
3
3
|
import { InjectionToken } from '@angular/core';
|
|
4
4
|
|
|
5
5
|
/** DataSource wrapper for a native array. */
|
|
@@ -152,5 +152,5 @@ class _RecycleViewRepeaterStrategy {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
export { ArrayDataSource
|
|
156
|
-
//# sourceMappingURL=recycle-view-repeater-strategy
|
|
155
|
+
export { ArrayDataSource, _RecycleViewRepeaterStrategy, _VIEW_REPEATER_STRATEGY, _ViewRepeaterOperation };
|
|
156
|
+
//# sourceMappingURL=recycle-view-repeater-strategy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recycle-view-repeater-strategy.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,IAAA,sBAAA,CAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;AACT,CAAC,EATW,sBAAsB,KAAtB,sBAAsB,GASjC,EAAA,CAAA,CAAA;AA4CD;;;AAGG;MACU,uBAAuB,GAAG,IAAI,cAAc,CAEvD,eAAe;;AC/FjB;;;;;;;;;;AAUG;MACU,4BAA4B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AAI,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
|
@@ -2,14 +2,14 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, forwardRef, Directive, Input, inject, NgZone, RendererFactory2, Injectable, ElementRef, Renderer2, DOCUMENT, ChangeDetectorRef, signal, Injector, effect, ApplicationRef, DestroyRef, untracked, afterNextRender, booleanAttribute, Optional, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ViewChild, ViewContainerRef, TemplateRef, IterableDiffers, NgModule } from '@angular/core';
|
|
3
3
|
import { Subject, of, Observable, Subscription, animationFrameScheduler, asapScheduler, isObservable } from 'rxjs';
|
|
4
4
|
import { distinctUntilChanged, auditTime, filter, startWith, takeUntil, pairwise, switchMap, shareReplay } from 'rxjs/operators';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { coerceNumberProperty, coerceElement } from './element.mjs';
|
|
6
|
+
import { Platform } from './platform2.mjs';
|
|
7
|
+
import { Directionality } from './directionality.mjs';
|
|
8
|
+
import { getRtlScrollAxisType, RtlScrollAxisType, supportsScrollBehavior } from './scrolling2.mjs';
|
|
9
9
|
import { BidiModule } from './bidi.mjs';
|
|
10
10
|
export { Dir as ɵɵDir } from './bidi.mjs';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { _VIEW_REPEATER_STRATEGY, ArrayDataSource, _RecycleViewRepeaterStrategy } from './recycle-view-repeater-strategy.mjs';
|
|
12
|
+
import { isDataSource } from './data-source.mjs';
|
|
13
13
|
import '@angular/common';
|
|
14
14
|
|
|
15
15
|
/** The injection token used to specify the virtual scrolling strategy. */
|
|
@@ -194,8 +194,8 @@ class CdkFixedSizeVirtualScroll {
|
|
|
194
194
|
ngOnChanges() {
|
|
195
195
|
this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx);
|
|
196
196
|
}
|
|
197
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
198
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
197
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkFixedSizeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
198
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkFixedSizeVirtualScroll, isStandalone: true, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: { itemSize: "itemSize", minBufferPx: "minBufferPx", maxBufferPx: "maxBufferPx" }, providers: [
|
|
199
199
|
{
|
|
200
200
|
provide: VIRTUAL_SCROLL_STRATEGY,
|
|
201
201
|
useFactory: _fixedSizeVirtualScrollStrategyFactory,
|
|
@@ -203,7 +203,7 @@ class CdkFixedSizeVirtualScroll {
|
|
|
203
203
|
},
|
|
204
204
|
], usesOnChanges: true, ngImport: i0 });
|
|
205
205
|
}
|
|
206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkFixedSizeVirtualScroll, decorators: [{
|
|
207
207
|
type: Directive,
|
|
208
208
|
args: [{
|
|
209
209
|
selector: 'cdk-virtual-scroll-viewport[itemSize]',
|
|
@@ -338,10 +338,10 @@ class ScrollDispatcher {
|
|
|
338
338
|
} while ((element = element.parentElement));
|
|
339
339
|
return false;
|
|
340
340
|
}
|
|
341
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
342
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
341
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ScrollDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
342
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ScrollDispatcher, providedIn: 'root' });
|
|
343
343
|
}
|
|
344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ScrollDispatcher, decorators: [{
|
|
345
345
|
type: Injectable,
|
|
346
346
|
args: [{ providedIn: 'root' }]
|
|
347
347
|
}], ctorParameters: () => [] });
|
|
@@ -497,10 +497,10 @@ class CdkScrollable {
|
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
501
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
500
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkScrollable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
501
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkScrollable, isStandalone: true, selector: "[cdk-scrollable], [cdkScrollable]", ngImport: i0 });
|
|
502
502
|
}
|
|
503
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkScrollable, decorators: [{
|
|
504
504
|
type: Directive,
|
|
505
505
|
args: [{
|
|
506
506
|
selector: '[cdk-scrollable], [cdkScrollable]',
|
|
@@ -624,10 +624,10 @@ class ViewportRuler {
|
|
|
624
624
|
? { width: window.innerWidth, height: window.innerHeight }
|
|
625
625
|
: { width: 0, height: 0 };
|
|
626
626
|
}
|
|
627
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
628
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
627
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ViewportRuler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
628
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ViewportRuler, providedIn: 'root' });
|
|
629
629
|
}
|
|
630
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ViewportRuler, decorators: [{
|
|
631
631
|
type: Injectable,
|
|
632
632
|
args: [{ providedIn: 'root' }]
|
|
633
633
|
}], ctorParameters: () => [] });
|
|
@@ -649,10 +649,10 @@ class CdkVirtualScrollable extends CdkScrollable {
|
|
|
649
649
|
const viewportEl = this.elementRef.nativeElement;
|
|
650
650
|
return orientation === 'horizontal' ? viewportEl.clientWidth : viewportEl.clientHeight;
|
|
651
651
|
}
|
|
652
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
653
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
652
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkVirtualScrollable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
653
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkVirtualScrollable, isStandalone: true, usesInheritance: true, ngImport: i0 });
|
|
654
654
|
}
|
|
655
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkVirtualScrollable, decorators: [{
|
|
656
656
|
type: Directive
|
|
657
657
|
}], ctorParameters: () => [] });
|
|
658
658
|
|
|
@@ -1053,8 +1053,8 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
|
|
|
1053
1053
|
this._totalContentHeight.set(this.orientation === 'horizontal' ? '' : `${this._totalContentSize}px`);
|
|
1054
1054
|
this._totalContentWidth.set(this.orientation === 'horizontal' ? `${this._totalContentSize}px` : '');
|
|
1055
1055
|
}
|
|
1056
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1057
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.0-next.
|
|
1056
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkVirtualScrollViewport, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1057
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.0-next.2", type: CdkVirtualScrollViewport, isStandalone: true, selector: "cdk-virtual-scroll-viewport", inputs: { orientation: "orientation", appendOnly: ["appendOnly", "appendOnly", booleanAttribute] }, outputs: { scrolledIndexChange: "scrolledIndexChange" }, host: { properties: { "class.cdk-virtual-scroll-orientation-horizontal": "orientation === \"horizontal\"", "class.cdk-virtual-scroll-orientation-vertical": "orientation !== \"horizontal\"" }, classAttribute: "cdk-virtual-scroll-viewport" }, providers: [
|
|
1058
1058
|
{
|
|
1059
1059
|
provide: CdkScrollable,
|
|
1060
1060
|
useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport,
|
|
@@ -1062,7 +1062,7 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
|
|
|
1062
1062
|
},
|
|
1063
1063
|
], viewQueries: [{ propertyName: "_contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<!--\n Wrap the rendered content in an element that will be used to offset it based on the scroll\n position.\n-->\n<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\">\n <ng-content></ng-content>\n</div>\n<!--\n Spacer used to force the scrolling container to the correct size for the *total* number of items\n so that the scrollbar captures the size of the entire data set.\n-->\n<div class=\"cdk-virtual-scroll-spacer\"\n [style.width]=\"_totalContentWidth()\" [style.height]=\"_totalContentHeight()\"></div>\n", styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1064
1064
|
}
|
|
1065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkVirtualScrollViewport, decorators: [{
|
|
1066
1066
|
type: Component,
|
|
1067
1067
|
args: [{ selector: 'cdk-virtual-scroll-viewport', host: {
|
|
1068
1068
|
'class': 'cdk-virtual-scroll-viewport',
|
|
@@ -1347,10 +1347,10 @@ class CdkVirtualForOf {
|
|
|
1347
1347
|
static ngTemplateContextGuard(directive, context) {
|
|
1348
1348
|
return true;
|
|
1349
1349
|
}
|
|
1350
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1351
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
1350
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkVirtualForOf, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1351
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkVirtualForOf, isStandalone: true, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: { cdkVirtualForOf: "cdkVirtualForOf", cdkVirtualForTrackBy: "cdkVirtualForTrackBy", cdkVirtualForTemplate: "cdkVirtualForTemplate", cdkVirtualForTemplateCacheSize: "cdkVirtualForTemplateCacheSize" }, providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });
|
|
1352
1352
|
}
|
|
1353
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkVirtualForOf, decorators: [{
|
|
1354
1354
|
type: Directive,
|
|
1355
1355
|
args: [{
|
|
1356
1356
|
selector: '[cdkVirtualFor][cdkVirtualForOf]',
|
|
@@ -1377,10 +1377,10 @@ class CdkVirtualScrollableElement extends CdkVirtualScrollable {
|
|
|
1377
1377
|
return (this.getElementRef().nativeElement.getBoundingClientRect()[from] -
|
|
1378
1378
|
this.measureScrollOffset(from));
|
|
1379
1379
|
}
|
|
1380
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1381
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
1380
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkVirtualScrollableElement, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1381
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkVirtualScrollableElement, isStandalone: true, selector: "[cdkVirtualScrollingElement]", host: { classAttribute: "cdk-virtual-scrollable" }, providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }], usesInheritance: true, ngImport: i0 });
|
|
1382
1382
|
}
|
|
1383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkVirtualScrollableElement, decorators: [{
|
|
1384
1384
|
type: Directive,
|
|
1385
1385
|
args: [{
|
|
1386
1386
|
selector: '[cdkVirtualScrollingElement]',
|
|
@@ -1404,10 +1404,10 @@ class CdkVirtualScrollableWindow extends CdkVirtualScrollable {
|
|
|
1404
1404
|
measureBoundingClientRectWithScrollOffset(from) {
|
|
1405
1405
|
return this.getElementRef().nativeElement.getBoundingClientRect()[from];
|
|
1406
1406
|
}
|
|
1407
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1408
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
1407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkVirtualScrollableWindow, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1408
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkVirtualScrollableWindow, isStandalone: true, selector: "cdk-virtual-scroll-viewport[scrollWindow]", providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableWindow }], usesInheritance: true, ngImport: i0 });
|
|
1409
1409
|
}
|
|
1410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkVirtualScrollableWindow, decorators: [{
|
|
1411
1411
|
type: Directive,
|
|
1412
1412
|
args: [{
|
|
1413
1413
|
selector: 'cdk-virtual-scroll-viewport[scrollWindow]',
|
|
@@ -1416,11 +1416,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.1",
|
|
|
1416
1416
|
}], ctorParameters: () => [] });
|
|
1417
1417
|
|
|
1418
1418
|
class CdkScrollableModule {
|
|
1419
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1420
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
1421
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1419
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkScrollableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1420
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkScrollableModule, imports: [CdkScrollable], exports: [CdkScrollable] });
|
|
1421
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkScrollableModule });
|
|
1422
1422
|
}
|
|
1423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkScrollableModule, decorators: [{
|
|
1424
1424
|
type: NgModule,
|
|
1425
1425
|
args: [{
|
|
1426
1426
|
exports: [CdkScrollable],
|
|
@@ -1431,8 +1431,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.1",
|
|
|
1431
1431
|
* @docs-primary-export
|
|
1432
1432
|
*/
|
|
1433
1433
|
class ScrollingModule {
|
|
1434
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1435
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.
|
|
1434
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ScrollingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1435
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: ScrollingModule, imports: [BidiModule, CdkScrollableModule, CdkVirtualScrollViewport,
|
|
1436
1436
|
CdkFixedSizeVirtualScroll,
|
|
1437
1437
|
CdkVirtualForOf,
|
|
1438
1438
|
CdkVirtualScrollableWindow,
|
|
@@ -1441,10 +1441,10 @@ class ScrollingModule {
|
|
|
1441
1441
|
CdkVirtualScrollViewport,
|
|
1442
1442
|
CdkVirtualScrollableWindow,
|
|
1443
1443
|
CdkVirtualScrollableElement] });
|
|
1444
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1444
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ScrollingModule, imports: [BidiModule,
|
|
1445
1445
|
CdkScrollableModule, BidiModule, CdkScrollableModule] });
|
|
1446
1446
|
}
|
|
1447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.
|
|
1447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ScrollingModule, decorators: [{
|
|
1448
1448
|
type: NgModule,
|
|
1449
1449
|
args: [{
|
|
1450
1450
|
imports: [
|
|
@@ -95,5 +95,5 @@ function getRtlScrollAxisType() {
|
|
|
95
95
|
return rtlScrollAxisType;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
export { RtlScrollAxisType
|
|
99
|
-
//# sourceMappingURL=
|
|
98
|
+
export { RtlScrollAxisType, getRtlScrollAxisType, supportsScrollBehavior };
|
|
99
|
+
//# sourceMappingURL=scrolling2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrolling2.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/platform/features/scrolling.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\n/** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */\nexport enum RtlScrollAxisType {\n /**\n * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled\n * all the way right.\n */\n NORMAL,\n /**\n * scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n NEGATED,\n /**\n * scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n INVERTED,\n}\n\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType: RtlScrollAxisType | undefined;\n\n/** Cached result of the check that indicates whether the browser supports scroll behaviors. */\nlet scrollBehaviorSupported: boolean | undefined;\n\n/** Check whether the browser supports scroll behaviors. */\nexport function supportsScrollBehavior(): boolean {\n if (scrollBehaviorSupported == null) {\n // If we're not in the browser, it can't be supported. Also check for `Element`, because\n // some projects stub out the global `document` during SSR which can throw us off.\n if (typeof document !== 'object' || !document || typeof Element !== 'function' || !Element) {\n scrollBehaviorSupported = false;\n return scrollBehaviorSupported;\n }\n\n // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n if ('scrollBehavior' in document.documentElement!.style) {\n scrollBehaviorSupported = true;\n } else {\n // At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's\n // supported but it doesn't handle scroll behavior, or it has been polyfilled.\n const scrollToFunction: Function | undefined = Element.prototype.scrollTo;\n\n if (scrollToFunction) {\n // We can detect if the function has been polyfilled by calling `toString` on it. Native\n // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n // polyfilled functions as supporting scroll behavior.\n scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString());\n } else {\n scrollBehaviorSupported = false;\n }\n }\n }\n\n return scrollBehaviorSupported;\n}\n\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nexport function getRtlScrollAxisType(): RtlScrollAxisType {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return RtlScrollAxisType.NORMAL;\n }\n\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n const scrollContainer = document.createElement('div');\n const containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n\n const content = document.createElement('div');\n const contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n\n rtlScrollAxisType = RtlScrollAxisType.NORMAL;\n\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED;\n }\n\n scrollContainer.remove();\n }\n return rtlScrollAxisType;\n}\n"],"names":[],"mappings":"AAQA;IACY;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AAC3B;;;AAGG;AACH,IAAA,iBAAA,CAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN;;;AAGG;AACH,IAAA,iBAAA,CAAA,iBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;AACP;;;AAGG;AACH,IAAA,iBAAA,CAAA,iBAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;AACV,CAAC,EAhBW,iBAAiB,KAAjB,iBAAiB,GAgB5B,EAAA,CAAA,CAAA;AAED;AACA,IAAI,iBAAgD;AAEpD;AACA,IAAI,uBAA4C;AAEhD;SACgB,sBAAsB,GAAA;AACpC,IAAA,IAAI,uBAAuB,IAAI,IAAI,EAAE;;;AAGnC,QAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,QAAQ,IAAI,OAAO,OAAO,KAAK,UAAU,IAAI,CAAC,OAAO,EAAE;YAC1F,uBAAuB,GAAG,KAAK;AAC/B,YAAA,OAAO,uBAAuB;;;QAIhC,IAAI,gBAAgB,IAAI,QAAQ,CAAC,eAAgB,CAAC,KAAK,EAAE;YACvD,uBAAuB,GAAG,IAAI;;aACzB;;;AAGL,YAAA,MAAM,gBAAgB,GAAyB,OAAO,CAAC,SAAS,CAAC,QAAQ;YAEzE,IAAI,gBAAgB,EAAE;;;;;g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GAAG,iBAAiB,CAAC,OAAO,GAAG,iBAAiB,CAAC,QAAQ;;QAG7F,eAAe,CAAC,MAAM,EAAE;;AAE1B,IAAA,OAAO,iBAAiB;AAC1B;;;;"}
|
|
@@ -217,5 +217,5 @@ function getMultipleValuesInSingleSelectionError() {
|
|
|
217
217
|
return Error('Cannot pass multiple values into SelectionModel with single-value mode.');
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
export { SelectionModel
|
|
221
|
-
//# sourceMappingURL=selection-model
|
|
220
|
+
export { SelectionModel, getMultipleValuesInSingleSelectionError };
|
|
221
|
+
//# sourceMappingURL=selection-model.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-model.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/collections/selection-model.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 {Subject} from 'rxjs';\n\n/**\n * Class to be used to power selecting one or more options from a list.\n */\nexport class SelectionModel<T> {\n /** Currently-selected values. */\n private _selection = new Set<T>();\n\n /** Keeps track of the deselected options that haven't been emitted by the change event. */\n private _deselectedToEmit: T[] = [];\n\n /** Keeps track of the selected options that haven't been emitted by the change event. */\n private _selectedToEmit: T[] = [];\n\n /** Cache for the array value of the selected items. */\n private _selected: T[] | null;\n\n /** Selected values. */\n get selected(): T[] {\n if (!this._selected) {\n this._selected = Array.from(this._selection.values());\n }\n\n return this._selected;\n }\n\n /** Event emitted when the value has changed. */\n readonly changed = new Subject<SelectionChange<T>>();\n\n constructor(\n private _multiple = false,\n initiallySelectedValues?: T[],\n private _emitChanges = true,\n public compareWith?: (o1: T, o2: T) => boolean,\n ) {\n if (initiallySelectedValues && initiallySelectedValues.length) {\n if (_multiple) {\n initiallySelectedValues.forEach(value => this._markSelected(value));\n } else {\n this._markSelected(initiallySelectedValues[0]);\n }\n\n // Clear the array in order to avoid firing the change event for preselected values.\n this._selectedToEmit.length = 0;\n }\n }\n\n /**\n * Selects a value or an array of values.\n * @param values The values to select\n * @return Whether the selection changed as a result of this call\n */\n select(...values: T[]): boolean {\n this._verifyValueAssignment(values);\n values.forEach(value => this._markSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n\n /**\n * Deselects a value or an array of values.\n * @param values The values to deselect\n * @return Whether the selection changed as a result of this call\n */\n deselect(...values: T[]): boolean {\n this._verifyValueAssignment(values);\n values.forEach(value => this._unmarkSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n\n /**\n * Sets the selected values\n * @param values The new selected values\n * @return Whether the selection changed as a result of this call\n */\n setSelection(...values: T[]): boolean {\n this._verifyValueAssignment(values);\n const oldValues = this.selected;\n const newSelectedSet = new Set(values.map(value => this._getConcreteValue(value)));\n values.forEach(value => this._markSelected(value));\n oldValues\n .filter(value => !newSelectedSet.has(this._getConcreteValue(value, newSelectedSet)))\n .forEach(value => this._unmarkSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n\n /**\n * Toggles a value between selected and deselected.\n * @param value The value to toggle\n * @return Whether the selection changed as a result of this call\n */\n toggle(value: T): boolean {\n return this.isSelected(value) ? this.deselect(value) : this.select(value);\n }\n\n /**\n * Clears all of the selected values.\n * @param flushEvent Whether to flush the changes in an event.\n * If false, the changes to the selection will be flushed along with the next event.\n * @return Whether the selection changed as a result of this call\n */\n clear(flushEvent = true): boolean {\n this._unmarkAll();\n const changed = this._hasQueuedChanges();\n if (flushEvent) {\n this._emitChangeEvent();\n }\n return changed;\n }\n\n /**\n * Determines whether a value is selected.\n */\n isSelected(value: T): boolean {\n return this._selection.has(this._getConcreteValue(value));\n }\n\n /**\n * Determines whether the model does not have a value.\n */\n isEmpty(): boolean {\n return this._selection.size === 0;\n }\n\n /**\n * Determines whether the model has a value.\n */\n hasValue(): boolean {\n return !this.isEmpty();\n }\n\n /**\n * Sorts the selected values based on a predicate function.\n */\n sort(predicate?: (a: T, b: T) => number): void {\n if (this._multiple && this.selected) {\n this._selected!.sort(predicate);\n }\n }\n\n /**\n * Gets whether multiple values can be selected.\n */\n isMultipleSelection() {\n return this._multiple;\n }\n\n /** Emits a change event and clears the records of selected and deselected values. */\n private _emitChangeEvent() {\n // Clear the selected values so they can be re-cached.\n this._selected = null;\n\n if (this._selectedToEmit.length || this._deselectedToEmit.length) {\n this.changed.next({\n source: this,\n added: this._selectedToEmit,\n removed: this._deselectedToEmit,\n });\n\n this._deselectedToEmit = [];\n this._selectedToEmit = [];\n }\n }\n\n /** Selects a value. */\n private _markSelected(value: T) {\n value = this._getConcreteValue(value);\n if (!this.isSelected(value)) {\n if (!this._multiple) {\n this._unmarkAll();\n }\n\n if (!this.isSelected(value)) {\n this._selection.add(value);\n }\n\n if (this._emitChanges) {\n this._selectedToEmit.push(value);\n }\n }\n }\n\n /** Deselects a value. */\n private _unmarkSelected(value: T) {\n value = this._getConcreteValue(value);\n if (this.isSelected(value)) {\n this._selection.delete(value);\n\n if (this._emitChanges) {\n this._deselectedToEmit.push(value);\n }\n }\n }\n\n /** Clears out the selected values. */\n private _unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }\n\n /**\n * Verifies the value assignment and throws an error if the specified value array is\n * including multiple values while the selection model is not supporting multiple values.\n */\n private _verifyValueAssignment(values: T[]) {\n if (values.length > 1 && !this._multiple && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMultipleValuesInSingleSelectionError();\n }\n }\n\n /** Whether there are queued up change to be emitted. */\n private _hasQueuedChanges() {\n return !!(this._deselectedToEmit.length || this._selectedToEmit.length);\n }\n\n /** Returns a value that is comparable to inputValue by applying compareWith function, returns the same inputValue otherwise. */\n private _getConcreteValue(inputValue: T, selection?: Set<T>): T {\n if (!this.compareWith) {\n return inputValue;\n } else {\n selection = selection ?? this._selection;\n for (let selectedValue of selection) {\n if (this.compareWith!(inputValue, selectedValue)) {\n return selectedValue;\n }\n }\n return inputValue;\n }\n }\n}\n\n/**\n * Event emitted when the value of a MatSelectionModel has changed.\n * @docs-private\n */\nexport interface SelectionChange<T> {\n /** Model that dispatched the event. */\n source: SelectionModel<T>;\n /** Options that were added to the model. */\n added: T[];\n /** Options that were removed from the model. */\n removed: T[];\n}\n\n/**\n * Returns an error that reports that multiple values are passed into a selection model\n * with a single value.\n * @docs-private\n */\nexport function getMultipleValuesInSingleSelectionError() {\n return Error('Cannot pass multiple values into SelectionModel with single-value mode.');\n}\n"],"names":[],"mappings":";;AAUA;;AAEG;MACU,cAAc,CAAA;AA0Bf,IAAA,SAAA;AAEA,IAAA,YAAA;AACD,IAAA,WAAA;;AA3BD,IAAA,UAAU,GAAG,IAAI,GAAG,EAAK;;IAGzB,iBAAiB,GAAQ,EAAE;;IAG3B,eAAe,GAAQ,EAAE;;AAGzB,IAAA,SAAS;;AAGjB,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AACnB,YAAA,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;;QAGvD,OAAO,IAAI,CAAC,SAAS;;;AAId,IAAA,OAAO,GAAG,IAAI,OAAO,EAAsB;IAEpD,WACU,CAAA,SAAA,GAAY,KAAK,EACzB,uBAA6B,EACrB,YAAe,GAAA,IAAI,EACpB,WAAuC,EAAA;QAHtC,IAAS,CAAA,SAAA,GAAT,SAAS;QAET,IAAY,CAAA,YAAA,GAAZ,YAAY;QACb,IAAW,CAAA,WAAA,GAAX,WAAW;AAElB,QAAA,IAAI,uBAAuB,IAAI,uBAAuB,CAAC,MAAM,EAAE;YAC7D,IAAI,SAAS,EAAE;AACb,gBAAA,uBAAuB,CAAC,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAA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