@angular/cdk 21.0.0-next.8 → 21.0.0-rc.0
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/_adev_assets/cdk_drag_drop.json +13 -12
- package/_adev_assets/cdk_testing.json +15 -25
- package/_adev_assets/cdk_testing_protractor.json +1 -1
- package/_adev_assets/cdk_testing_selenium_webdriver.json +1 -1
- package/_adev_assets/cdk_testing_testbed.json +1 -1
- package/fesm2022/_a11y-module-chunk.mjs +755 -869
- package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
- package/fesm2022/_activedescendant-key-manager-chunk.mjs +8 -8
- package/fesm2022/_activedescendant-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_array-chunk.mjs +1 -1
- package/fesm2022/_array-chunk.mjs.map +1 -1
- package/fesm2022/_breakpoints-observer-chunk.mjs +149 -152
- package/fesm2022/_breakpoints-observer-chunk.mjs.map +1 -1
- package/fesm2022/_css-pixel-value-chunk.mjs +4 -5
- package/fesm2022/_css-pixel-value-chunk.mjs.map +1 -1
- package/fesm2022/_data-source-chunk.mjs +2 -8
- package/fesm2022/_data-source-chunk.mjs.map +1 -1
- package/fesm2022/_directionality-chunk.mjs +54 -54
- package/fesm2022/_directionality-chunk.mjs.map +1 -1
- package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs +25 -36
- package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs.map +1 -1
- package/fesm2022/_element-chunk.mjs +6 -17
- package/fesm2022/_element-chunk.mjs.map +1 -1
- package/fesm2022/_fake-event-detection-chunk.mjs +3 -17
- package/fesm2022/_fake-event-detection-chunk.mjs.map +1 -1
- package/fesm2022/_focus-key-manager-chunk.mjs +10 -14
- package/fesm2022/_focus-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_focus-monitor-chunk.mjs +376 -566
- package/fesm2022/_focus-monitor-chunk.mjs.map +1 -1
- package/fesm2022/_id-generator-chunk.mjs +36 -27
- package/fesm2022/_id-generator-chunk.mjs.map +1 -1
- package/fesm2022/_keycodes-chunk.mjs +9 -9
- package/fesm2022/_keycodes-chunk.mjs.map +1 -1
- package/fesm2022/_list-key-manager-chunk.mjs +248 -336
- package/fesm2022/_list-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_overlay-module-chunk.mjs +2534 -2948
- package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
- package/fesm2022/_passive-listeners-chunk.mjs +10 -22
- package/fesm2022/_passive-listeners-chunk.mjs.map +1 -1
- package/fesm2022/_platform-chunk.mjs +42 -65
- package/fesm2022/_platform-chunk.mjs.map +1 -1
- package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs +78 -134
- package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs.map +1 -1
- package/fesm2022/_scrolling-chunk.mjs +44 -85
- package/fesm2022/_scrolling-chunk.mjs.map +1 -1
- package/fesm2022/_selection-model-chunk.mjs +138 -209
- package/fesm2022/_selection-model-chunk.mjs.map +1 -1
- package/fesm2022/_shadow-dom-chunk.mjs +21 -35
- package/fesm2022/_shadow-dom-chunk.mjs.map +1 -1
- package/fesm2022/_style-loader-chunk.mjs +50 -37
- package/fesm2022/_style-loader-chunk.mjs.map +1 -1
- package/fesm2022/_test-environment-chunk.mjs +2 -14
- package/fesm2022/_test-environment-chunk.mjs.map +1 -1
- package/fesm2022/_tree-key-manager-chunk.mjs +229 -308
- package/fesm2022/_tree-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_typeahead-chunk.mjs +52 -74
- package/fesm2022/_typeahead-chunk.mjs.map +1 -1
- package/fesm2022/_unique-selection-dispatcher-chunk.mjs +43 -40
- package/fesm2022/_unique-selection-dispatcher-chunk.mjs.map +1 -1
- package/fesm2022/a11y.mjs +351 -449
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs +254 -192
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/bidi.mjs +121 -64
- package/fesm2022/bidi.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -2
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs +208 -186
- package/fesm2022/clipboard.mjs.map +1 -1
- package/fesm2022/coercion-private.mjs +4 -8
- package/fesm2022/coercion-private.mjs.map +1 -1
- package/fesm2022/coercion.mjs +11 -29
- package/fesm2022/coercion.mjs.map +1 -1
- package/fesm2022/dialog.mjs +660 -808
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +3347 -4286
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/keycodes.mjs +4 -8
- package/fesm2022/keycodes.mjs.map +1 -1
- package/fesm2022/layout.mjs +44 -26
- package/fesm2022/layout.mjs.map +1 -1
- package/fesm2022/listbox.mjs +841 -895
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +1942 -1858
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/observers-private.mjs +88 -106
- package/fesm2022/observers-private.mjs.map +1 -1
- package/fesm2022/observers.mjs +262 -184
- package/fesm2022/observers.mjs.map +1 -1
- package/fesm2022/overlay.mjs +72 -68
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/platform.mjs +43 -54
- package/fesm2022/platform.mjs.map +1 -1
- package/fesm2022/portal.mjs +402 -560
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/private.mjs +38 -10
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +1323 -1400
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +758 -590
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +2327 -2319
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/testing-selenium-webdriver.mjs +252 -325
- package/fesm2022/testing-selenium-webdriver.mjs.map +1 -1
- package/fesm2022/testing-testbed.mjs +592 -709
- package/fesm2022/testing-testbed.mjs.map +1 -1
- package/fesm2022/testing.mjs +368 -889
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/text-field.mjs +459 -388
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree.mjs +1483 -1731
- package/fesm2022/tree.mjs.map +1 -1
- package/overlay/_index.scss +28 -0
- package/overlay-prebuilt.css +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/types/_harness-environment-chunk.d.ts +1 -2
- package/types/_overlay-module-chunk.d.ts +59 -7
- package/types/_portal-directives-chunk.d.ts +2 -18
- package/types/accordion.d.ts +3 -1
- package/types/dialog.d.ts +1 -1
- package/types/overlay.d.ts +6 -2
- package/types/portal.d.ts +1 -1
|
@@ -1,48 +1,34 @@
|
|
|
1
1
|
let shadowDomIsSupported;
|
|
2
|
-
/** Checks whether the user's browser support Shadow DOM. */
|
|
3
2
|
function _supportsShadowDom() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
if (shadowDomIsSupported == null) {
|
|
4
|
+
const head = typeof document !== 'undefined' ? document.head : null;
|
|
5
|
+
shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));
|
|
6
|
+
}
|
|
7
|
+
return shadowDomIsSupported;
|
|
9
8
|
}
|
|
10
|
-
/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */
|
|
11
9
|
function _getShadowRoot(element) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {
|
|
17
|
-
return rootNode;
|
|
18
|
-
}
|
|
10
|
+
if (_supportsShadowDom()) {
|
|
11
|
+
const rootNode = element.getRootNode ? element.getRootNode() : null;
|
|
12
|
+
if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {
|
|
13
|
+
return rootNode;
|
|
19
14
|
}
|
|
20
|
-
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
21
17
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Gets the currently-focused element on the page while
|
|
24
|
-
* also piercing through Shadow DOM boundaries.
|
|
25
|
-
*/
|
|
26
18
|
function _getFocusedElementPierceShadowDom() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
activeElement = newActiveElement;
|
|
37
|
-
}
|
|
19
|
+
let activeElement = typeof document !== 'undefined' && document ? document.activeElement : null;
|
|
20
|
+
while (activeElement && activeElement.shadowRoot) {
|
|
21
|
+
const newActiveElement = activeElement.shadowRoot.activeElement;
|
|
22
|
+
if (newActiveElement === activeElement) {
|
|
23
|
+
break;
|
|
24
|
+
} else {
|
|
25
|
+
activeElement = newActiveElement;
|
|
38
26
|
}
|
|
39
|
-
|
|
27
|
+
}
|
|
28
|
+
return activeElement;
|
|
40
29
|
}
|
|
41
|
-
/** Gets the target of an event while accounting for Shadow DOM. */
|
|
42
30
|
function _getEventTarget(event) {
|
|
43
|
-
|
|
44
|
-
// point to the shadow root so we have to use `composedPath` instead.
|
|
45
|
-
return (event.composedPath ? event.composedPath()[0] : event.target);
|
|
31
|
+
return event.composedPath ? event.composedPath()[0] : event.target;
|
|
46
32
|
}
|
|
47
33
|
|
|
48
34
|
export { _getEventTarget, _getFocusedElementPierceShadowDom, _getShadowRoot, _supportsShadowDom };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shadow-dom-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/platform/features/shadow-dom.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\nlet shadowDomIsSupported: boolean;\n\n/** Checks whether the user's browser support Shadow DOM. */\nexport function _supportsShadowDom(): boolean {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && ((head as any).createShadowRoot || head.attachShadow));\n }\n\n return shadowDomIsSupported;\n}\n\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nexport function _getShadowRoot(element: HTMLElement): ShadowRoot | null {\n if (_supportsShadowDom()) {\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n\n return null;\n}\n\n/**\n * Gets the currently-focused element on the page while\n * also piercing through Shadow DOM boundaries.\n */\nexport function _getFocusedElementPierceShadowDom(): HTMLElement | null {\n let activeElement =\n typeof document !== 'undefined' && document\n ? (document.activeElement as HTMLElement | null)\n : null;\n\n while (activeElement && activeElement.shadowRoot) {\n const newActiveElement = activeElement.shadowRoot.activeElement as HTMLElement | null;\n if (newActiveElement === activeElement) {\n break;\n } else {\n activeElement = newActiveElement;\n }\n }\n\n return activeElement;\n}\n\n/** Gets the target of an event while accounting for Shadow DOM. */\nexport function _getEventTarget<T extends EventTarget>(event: Event): T | null {\n // If an event is bound outside the Shadow DOM, the `event.target` will\n // point to the shadow root so we have to use `composedPath` instead.\n return (event.composedPath ? event.composedPath()[0] : event.target) as T | null;\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"_shadow-dom-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/platform/features/shadow-dom.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\nlet shadowDomIsSupported: boolean;\n\n/** Checks whether the user's browser support Shadow DOM. */\nexport function _supportsShadowDom(): boolean {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && ((head as any).createShadowRoot || head.attachShadow));\n }\n\n return shadowDomIsSupported;\n}\n\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nexport function _getShadowRoot(element: HTMLElement): ShadowRoot | null {\n if (_supportsShadowDom()) {\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n\n return null;\n}\n\n/**\n * Gets the currently-focused element on the page while\n * also piercing through Shadow DOM boundaries.\n */\nexport function _getFocusedElementPierceShadowDom(): HTMLElement | null {\n let activeElement =\n typeof document !== 'undefined' && document\n ? (document.activeElement as HTMLElement | null)\n : null;\n\n while (activeElement && activeElement.shadowRoot) {\n const newActiveElement = activeElement.shadowRoot.activeElement as HTMLElement | null;\n if (newActiveElement === activeElement) {\n break;\n } else {\n activeElement = newActiveElement;\n }\n }\n\n return activeElement;\n}\n\n/** Gets the target of an event while accounting for Shadow DOM. */\nexport function _getEventTarget<T extends EventTarget>(event: Event): T | null {\n // If an event is bound outside the Shadow DOM, the `event.target` will\n // point to the shadow root so we have to use `composedPath` instead.\n return (event.composedPath ? event.composedPath()[0] : event.target) as T | null;\n}\n"],"names":["shadowDomIsSupported","_getShadowRoot","element","getRootNode","rootNode","_getFocusedElementPierceShadowDom","document","newActiveElement","activeElement"],"mappings":"AAQA,IAAAA,oBAAA;;;;;;AAUA,EAAA,OAAAA,oBAAA;AAGA;AAEI,SAAAC,cAAiBA,CAAAC,OAAQ,EAAA;wBAE2C,EAAA,EAAA;4BACE,CAAAC,WAAA,GAAAD,OAAA,CAAAC,WAAA,EAAA,GAAA,IAAA;;AAO1E,MAAA,OAAAC,QAAA;AAEA;;;;AAWI,SAAAC,iCAAA,GAAA;mBAEQ,UAAAC,QAAA,KAAA,WAAA,IAAAA,QAAA;;;IAMV,IAAAC,gBAAA,KAAAC,aAAA,EAAA;AACF,MAAA;KAIyE,MAAA;AACFA,MAAAA,aAAA,GAAAD,gBAAA;AAEvE;;;;;;;;;;"}
|
|
@@ -1,47 +1,60 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injector, EnvironmentInjector, ApplicationRef, createComponent, Injectable } from '@angular/core';
|
|
3
3
|
|
|
4
|
-
/** Apps in which we've loaded styles. */
|
|
5
4
|
const appsWithLoaders = new WeakMap();
|
|
6
|
-
/**
|
|
7
|
-
* Service that loads structural styles dynamically
|
|
8
|
-
* and ensures that they're only loaded once per app.
|
|
9
|
-
*/
|
|
10
5
|
class _CdkPrivateStyleLoader {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
appRef.onDestroy(() => {
|
|
28
|
-
appsWithLoaders.get(appRef)?.refs.forEach(ref => ref.destroy());
|
|
29
|
-
appsWithLoaders.delete(appRef);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
// If the loader hasn't been loaded before, we need to instatiate it.
|
|
33
|
-
if (!data.loaders.has(loader)) {
|
|
34
|
-
data.loaders.add(loader);
|
|
35
|
-
data.refs.push(createComponent(loader, { environmentInjector: this._environmentInjector }));
|
|
36
|
-
}
|
|
6
|
+
_appRef;
|
|
7
|
+
_injector = inject(Injector);
|
|
8
|
+
_environmentInjector = inject(EnvironmentInjector);
|
|
9
|
+
load(loader) {
|
|
10
|
+
const appRef = this._appRef = this._appRef || this._injector.get(ApplicationRef);
|
|
11
|
+
let data = appsWithLoaders.get(appRef);
|
|
12
|
+
if (!data) {
|
|
13
|
+
data = {
|
|
14
|
+
loaders: new Set(),
|
|
15
|
+
refs: []
|
|
16
|
+
};
|
|
17
|
+
appsWithLoaders.set(appRef, data);
|
|
18
|
+
appRef.onDestroy(() => {
|
|
19
|
+
appsWithLoaders.get(appRef)?.refs.forEach(ref => ref.destroy());
|
|
20
|
+
appsWithLoaders.delete(appRef);
|
|
21
|
+
});
|
|
37
22
|
}
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
if (!data.loaders.has(loader)) {
|
|
24
|
+
data.loaders.add(loader);
|
|
25
|
+
data.refs.push(createComponent(loader, {
|
|
26
|
+
environmentInjector: this._environmentInjector
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
31
|
+
minVersion: "12.0.0",
|
|
32
|
+
version: "20.2.0-next.2",
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
type: _CdkPrivateStyleLoader,
|
|
35
|
+
deps: [],
|
|
36
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
37
|
+
});
|
|
38
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
39
|
+
minVersion: "12.0.0",
|
|
40
|
+
version: "20.2.0-next.2",
|
|
41
|
+
ngImport: i0,
|
|
42
|
+
type: _CdkPrivateStyleLoader,
|
|
43
|
+
providedIn: 'root'
|
|
44
|
+
});
|
|
40
45
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
47
|
+
minVersion: "12.0.0",
|
|
48
|
+
version: "20.2.0-next.2",
|
|
49
|
+
ngImport: i0,
|
|
50
|
+
type: _CdkPrivateStyleLoader,
|
|
51
|
+
decorators: [{
|
|
52
|
+
type: Injectable,
|
|
53
|
+
args: [{
|
|
54
|
+
providedIn: 'root'
|
|
55
|
+
}]
|
|
56
|
+
}]
|
|
57
|
+
});
|
|
45
58
|
|
|
46
59
|
export { _CdkPrivateStyleLoader };
|
|
47
60
|
//# sourceMappingURL=_style-loader-chunk.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_style-loader-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/private/style-loader.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 ApplicationRef,\n ComponentRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n Injector,\n Type,\n} from '@angular/core';\n\n/** Apps in which we've loaded styles. */\nconst appsWithLoaders = new WeakMap<\n ApplicationRef,\n {\n /** Style loaders that have been added. */\n loaders: Set<Type<unknown>>;\n\n /** References to the instantiated loaders. */\n refs: ComponentRef<unknown>[];\n }\n>();\n\n/**\n * Service that loads structural styles dynamically\n * and ensures that they're only loaded once per app.\n */\n@Injectable({providedIn: 'root'})\nexport class _CdkPrivateStyleLoader {\n private _appRef: ApplicationRef | undefined;\n private _injector = inject(Injector);\n private _environmentInjector = inject(EnvironmentInjector);\n\n /**\n * Loads a set of styles.\n * @param loader Component which will be instantiated to load the styles.\n */\n load(loader: Type<unknown>): void {\n // Resolve the app ref lazily to avoid circular dependency errors if this is called too early.\n const appRef = (this._appRef = this._appRef || this._injector.get(ApplicationRef));\n let data = appsWithLoaders.get(appRef);\n\n // If we haven't loaded for this app before, we have to initialize it.\n if (!data) {\n data = {loaders: new Set(), refs: []};\n appsWithLoaders.set(appRef, data);\n\n // When the app is destroyed, we need to clean up all the related loaders.\n appRef.onDestroy(() => {\n appsWithLoaders.get(appRef)?.refs.forEach(ref => ref.destroy());\n appsWithLoaders.delete(appRef);\n });\n }\n\n // If the loader hasn't been loaded before, we need to instatiate it.\n if (!data.loaders.has(loader)) {\n data.loaders.add(loader);\n data.refs.push(createComponent(loader, {environmentInjector: this._environmentInjector}));\n }\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_style-loader-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/private/style-loader.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 ApplicationRef,\n ComponentRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n Injector,\n Type,\n} from '@angular/core';\n\n/** Apps in which we've loaded styles. */\nconst appsWithLoaders = new WeakMap<\n ApplicationRef,\n {\n /** Style loaders that have been added. */\n loaders: Set<Type<unknown>>;\n\n /** References to the instantiated loaders. */\n refs: ComponentRef<unknown>[];\n }\n>();\n\n/**\n * Service that loads structural styles dynamically\n * and ensures that they're only loaded once per app.\n */\n@Injectable({providedIn: 'root'})\nexport class _CdkPrivateStyleLoader {\n private _appRef: ApplicationRef | undefined;\n private _injector = inject(Injector);\n private _environmentInjector = inject(EnvironmentInjector);\n\n /**\n * Loads a set of styles.\n * @param loader Component which will be instantiated to load the styles.\n */\n load(loader: Type<unknown>): void {\n // Resolve the app ref lazily to avoid circular dependency errors if this is called too early.\n const appRef = (this._appRef = this._appRef || this._injector.get(ApplicationRef));\n let data = appsWithLoaders.get(appRef);\n\n // If we haven't loaded for this app before, we have to initialize it.\n if (!data) {\n data = {loaders: new Set(), refs: []};\n appsWithLoaders.set(appRef, data);\n\n // When the app is destroyed, we need to clean up all the related loaders.\n appRef.onDestroy(() => {\n appsWithLoaders.get(appRef)?.refs.forEach(ref => ref.destroy());\n appsWithLoaders.delete(appRef);\n });\n }\n\n // If the loader hasn't been loaded before, we need to instatiate it.\n if (!data.loaders.has(loader)) {\n data.loaders.add(loader);\n data.refs.push(createComponent(loader, {environmentInjector: this._environmentInjector}));\n }\n }\n}\n"],"names":["Injector","load","loader"],"mappings":";;;;;;oBAkD0E,CAAAA,QAAA,CAAA;;AAd7DC,EAAAA,IAAAA,CAAAC,MAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
/** Gets whether the code is currently running in a test environment. */
|
|
2
1
|
function _isTestEnvironment() {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// be attached there for some runners like Jest.
|
|
6
|
-
// (see: https://github.com/angular/components/issues/23365#issuecomment-938146643)
|
|
7
|
-
return (
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
(typeof __karma__ !== 'undefined' && !!__karma__) ||
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
(typeof jasmine !== 'undefined' && !!jasmine) ||
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
(typeof jest !== 'undefined' && !!jest) ||
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
(typeof Mocha !== 'undefined' && !!Mocha));
|
|
2
|
+
return (typeof __karma__ !== 'undefined' && !!__karma__ || typeof jasmine !== 'undefined' && !!jasmine || typeof jest !== 'undefined' && !!jest || typeof Mocha !== 'undefined' && !!Mocha
|
|
3
|
+
);
|
|
16
4
|
}
|
|
17
5
|
|
|
18
6
|
export { _isTestEnvironment };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_test-environment-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/platform/features/test-environment.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/** Gets whether the code is currently running in a test environment. */\nexport function _isTestEnvironment(): boolean {\n // We can't use `declare const` because it causes conflicts inside Google with the real typings\n // for these symbols and we can't read them off the global object, because they don't appear to\n // be attached there for some runners like Jest.\n // (see: https://github.com/angular/components/issues/23365#issuecomment-938146643)\n return (\n // @ts-ignore\n (typeof __karma__ !== 'undefined' && !!__karma__) ||\n // @ts-ignore\n (typeof jasmine !== 'undefined' && !!jasmine) ||\n // @ts-ignore\n (typeof jest !== 'undefined' && !!jest) ||\n // @ts-ignore\n (typeof Mocha !== 'undefined' && !!Mocha)\n );\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_test-environment-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/platform/features/test-environment.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/** Gets whether the code is currently running in a test environment. */\nexport function _isTestEnvironment(): boolean {\n // We can't use `declare const` because it causes conflicts inside Google with the real typings\n // for these symbols and we can't read them off the global object, because they don't appear to\n // be attached there for some runners like Jest.\n // (see: https://github.com/angular/components/issues/23365#issuecomment-938146643)\n return (\n // @ts-ignore\n (typeof __karma__ !== 'undefined' && !!__karma__) ||\n // @ts-ignore\n (typeof jasmine !== 'undefined' && !!jasmine) ||\n // @ts-ignore\n (typeof jest !== 'undefined' && !!jest) ||\n // @ts-ignore\n (typeof Mocha !== 'undefined' && !!Mocha)\n );\n}\n"],"names":["__karma__","Mocha"],"mappings":";0BAiBiB,KAAA,WAAA,MAAAA,SAAA,4FAOjB,OAAAC,KAAA,KAAAA,WAAAA,IAAAA,CAAAA,CAAAA;AAAA;;;;;"}
|