@angular/cdk 20.0.3 → 20.1.0-next.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 +100 -8
- package/_adev_assets/cdk_testing.json +634 -61
- package/collections/index.d.ts +4 -4
- package/dialog/index.d.ts +18 -14
- package/drag-drop/index.d.ts +32 -4
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/collections.mjs +2 -2
- package/fesm2022/dialog.mjs +22 -10
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/{dispose-view-repeater-strategy-Cvpav0PR.mjs → dispose-view-repeater-strategy-D_JReLI1.mjs} +3 -3
- package/fesm2022/dispose-view-repeater-strategy-D_JReLI1.mjs.map +1 -0
- package/fesm2022/drag-drop.mjs +99 -25
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/menu.mjs +1 -1
- package/fesm2022/overlay.mjs +1 -1
- package/fesm2022/{recycle-view-repeater-strategy-SfuyU210.mjs → recycle-view-repeater-strategy-DoWdPqVw.mjs} +4 -4
- package/fesm2022/recycle-view-repeater-strategy-DoWdPqVw.mjs.map +1 -0
- package/fesm2022/scrolling.mjs +2 -2
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/table.mjs +3 -3
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/testing.mjs +50 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/{harness-environment.d-BbFzIFDE.d.ts → harness-environment.d-C-TBj7IN.d.ts} +52 -1
- package/menu/index.d.ts +2 -2
- package/overlay/index.d.ts +4 -4
- package/{overlay-module.d-C2CxnwqT.d.ts → overlay-module.d-CVO-IcaN.d.ts} +1 -1
- package/package.json +3 -3
- package/schematics/ng-add/index.js +1 -1
- package/schematics/utils/build-component.js +1 -2
- package/schematics/utils/build-component.js.map +1 -1
- package/scrolling/index.d.ts +1 -1
- package/{scrolling-module.d-C_w4tIrZ.d.ts → scrolling-module.d-BvCGMKMo.d.ts} +1 -1
- package/table/index.d.ts +3 -3
- 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/{view-repeater.d-DUdkOYhk.d.ts → view-repeater.d-BKljR8u8.d.ts} +6 -5
- package/fesm2022/dispose-view-repeater-strategy-Cvpav0PR.mjs.map +0 -1
- package/fesm2022/recycle-view-repeater-strategy-SfuyU210.mjs.map +0 -1
package/collections/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { D as DataSource } from '../data-source.d-Bblv7Zvh.js';
|
|
3
3
|
export { C as CollectionViewer, L as ListRange, i as isDataSource } from '../data-source.d-Bblv7Zvh.js';
|
|
4
4
|
import { IterableChanges, ViewContainerRef } from '@angular/core';
|
|
5
|
-
import { _ as _ViewRepeaterItemContext, a as _ViewRepeater, b as _ViewRepeaterItemContextFactory, c as _ViewRepeaterItemValueResolver, d as _ViewRepeaterItemChanged } from '../view-repeater.d-
|
|
6
|
-
export { h as _VIEW_REPEATER_STRATEGY, g as _ViewRepeaterItemChange, e as _ViewRepeaterItemInsertArgs, f as _ViewRepeaterOperation } from '../view-repeater.d-
|
|
5
|
+
import { _ as _ViewRepeaterItemContext, a as _ViewRepeater, b as _ViewRepeaterItemContextFactory, c as _ViewRepeaterItemValueResolver, d as _ViewRepeaterItemChanged } from '../view-repeater.d-BKljR8u8.js';
|
|
6
|
+
export { h as _VIEW_REPEATER_STRATEGY, g as _ViewRepeaterItemChange, e as _ViewRepeaterItemInsertArgs, f as _ViewRepeaterOperation } from '../view-repeater.d-BKljR8u8.js';
|
|
7
7
|
import { S as SelectionModel } from '../selection-model.d-DNgOONDg.js';
|
|
8
8
|
export { a as SelectionChange, g as getMultipleValuesInSingleSelectionError } from '../selection-model.d-DNgOONDg.js';
|
|
9
9
|
export { U as UniqueSelectionDispatcher, a as UniqueSelectionDispatcherListener } from '../unique-selection-dispatcher.d-DSFqf1MM.js';
|
|
@@ -18,7 +18,7 @@ declare class ArrayDataSource<T> extends DataSource<T> {
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* A repeater that destroys views when they are removed from a
|
|
21
|
-
*
|
|
21
|
+
* {@link ViewContainerRef}. When new items are inserted into the container,
|
|
22
22
|
* the repeater will always construct a new embedded view for each item.
|
|
23
23
|
*
|
|
24
24
|
* @template T The type for the embedded view's $implicit property.
|
|
@@ -32,7 +32,7 @@ declare class _DisposeViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemCont
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* A repeater that caches views when they are removed from a
|
|
35
|
-
*
|
|
35
|
+
* {@link ViewContainerRef}. When new items are inserted into the container,
|
|
36
36
|
* the repeater will reuse one of the cached views instead of creating a new
|
|
37
37
|
* embedded view. Recycling cached views reduces the quantity of expensive DOM
|
|
38
38
|
* inserts.
|
package/dialog/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { ViewContainerRef, Injector, StaticProvider, Type, OnDestroy, ElementRef, NgZone, ChangeDetectorRef, ComponentRef, EmbeddedViewRef, TemplateRef, InjectionToken } from '@angular/core';
|
|
3
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
4
|
import { F as FocusOrigin } from '../focus-monitor.d-CvvJeQRc.js';
|
|
4
5
|
import { F as FocusTrapFactory, A as A11yModule } from '../a11y-module.d-DBHGyKoh.js';
|
|
5
6
|
import { B as BasePortalOutlet, f as CdkPortalOutlet, C as ComponentPortal, T as TemplatePortal, D as DomPortal, a as ComponentType, h as PortalModule } from '../portal-directives.d-DbeNrI5D.js';
|
|
6
7
|
export { c as ɵɵCdkPortal, g as ɵɵPortalHostDirective, d as ɵɵTemplatePortalDirective } from '../portal-directives.d-DbeNrI5D.js';
|
|
7
8
|
import { a as Direction } from '../bidi-module.d-IN1Vp56w.js';
|
|
8
|
-
import { P as PositionStrategy, S as ScrollStrategy, O as OverlayRef, a as OverlayModule } from '../overlay-module.d-
|
|
9
|
-
import { Observable, Subject } from 'rxjs';
|
|
9
|
+
import { P as PositionStrategy, S as ScrollStrategy, O as OverlayRef, a as OverlayModule } from '../overlay-module.d-CVO-IcaN.js';
|
|
10
10
|
import * as _angular_cdk_portal from '@angular/cdk/portal';
|
|
11
11
|
import '../observers/index.js';
|
|
12
12
|
import '../number-property.d-CJVxXUcb.js';
|
|
13
|
-
import '../scrolling-module.d-
|
|
13
|
+
import '../scrolling-module.d-BvCGMKMo.js';
|
|
14
14
|
import '../data-source.d-Bblv7Zvh.js';
|
|
15
15
|
import '@angular/common';
|
|
16
16
|
import '../scrolling/index.js';
|
|
@@ -21,8 +21,14 @@ import '../style-loader.d-BXZfQZTF.js';
|
|
|
21
21
|
type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
|
|
22
22
|
/** Valid ARIA roles for a dialog. */
|
|
23
23
|
type DialogRole = 'dialog' | 'alertdialog';
|
|
24
|
+
/** Component that can be used as the container for the dialog. */
|
|
25
|
+
type DialogContainer = BasePortalOutlet & {
|
|
26
|
+
_focusTrapped?: Observable<void>;
|
|
27
|
+
_closeInteractionType?: FocusOrigin;
|
|
28
|
+
_recaptureFocus?: () => void;
|
|
29
|
+
};
|
|
24
30
|
/** Configuration for opening a modal dialog. */
|
|
25
|
-
declare class DialogConfig<D = unknown, R = unknown, C extends
|
|
31
|
+
declare class DialogConfig<D = unknown, R = unknown, C extends DialogContainer = BasePortalOutlet> {
|
|
26
32
|
/**
|
|
27
33
|
* Where the attached component should live in Angular's *logical* component tree.
|
|
28
34
|
* This affects what is available for injection and the change detection order for the
|
|
@@ -147,7 +153,7 @@ declare function throwDialogContentAlreadyAttachedError(): void;
|
|
|
147
153
|
* Internal component that wraps user-provided dialog content.
|
|
148
154
|
* @docs-private
|
|
149
155
|
*/
|
|
150
|
-
declare class CdkDialogContainer<C extends DialogConfig = DialogConfig> extends BasePortalOutlet implements OnDestroy {
|
|
156
|
+
declare class CdkDialogContainer<C extends DialogConfig = DialogConfig> extends BasePortalOutlet implements DialogContainer, OnDestroy {
|
|
151
157
|
protected _elementRef: ElementRef<HTMLElement>;
|
|
152
158
|
protected _focusTrapFactory: FocusTrapFactory;
|
|
153
159
|
readonly _config: C;
|
|
@@ -155,10 +161,13 @@ declare class CdkDialogContainer<C extends DialogConfig = DialogConfig> extends
|
|
|
155
161
|
protected _ngZone: NgZone;
|
|
156
162
|
private _focusMonitor;
|
|
157
163
|
private _renderer;
|
|
164
|
+
protected readonly _changeDetectorRef: ChangeDetectorRef;
|
|
165
|
+
private _injector;
|
|
158
166
|
private _platform;
|
|
159
167
|
protected _document: Document;
|
|
160
168
|
/** The portal outlet inside of this container into which the dialog content will be loaded. */
|
|
161
169
|
_portalOutlet: CdkPortalOutlet;
|
|
170
|
+
_focusTrapped: Observable<void>;
|
|
162
171
|
/** The class that traps and manages focus within the dialog. */
|
|
163
172
|
private _focusTrap;
|
|
164
173
|
/** Element that was focused before the dialog was opened. Save this to restore upon close. */
|
|
@@ -176,8 +185,6 @@ declare class CdkDialogContainer<C extends DialogConfig = DialogConfig> extends
|
|
|
176
185
|
* the rest are present.
|
|
177
186
|
*/
|
|
178
187
|
_ariaLabelledByQueue: string[];
|
|
179
|
-
protected readonly _changeDetectorRef: ChangeDetectorRef;
|
|
180
|
-
private _injector;
|
|
181
188
|
private _isDestroyed;
|
|
182
189
|
constructor(...args: unknown[]);
|
|
183
190
|
_addAriaLabelledBy(id: string): void;
|
|
@@ -246,7 +253,7 @@ interface DialogCloseOptions {
|
|
|
246
253
|
*/
|
|
247
254
|
declare class DialogRef<R = unknown, C = unknown> {
|
|
248
255
|
readonly overlayRef: OverlayRef;
|
|
249
|
-
readonly config: DialogConfig<any, DialogRef<R, C>,
|
|
256
|
+
readonly config: DialogConfig<any, DialogRef<R, C>, DialogContainer>;
|
|
250
257
|
/**
|
|
251
258
|
* Instance of component opened into the dialog. Will be
|
|
252
259
|
* null when the dialog is opened using a `TemplateRef`.
|
|
@@ -258,10 +265,7 @@ declare class DialogRef<R = unknown, C = unknown> {
|
|
|
258
265
|
*/
|
|
259
266
|
readonly componentRef: ComponentRef<C> | null;
|
|
260
267
|
/** Instance of the container that is rendering out the dialog content. */
|
|
261
|
-
readonly containerInstance:
|
|
262
|
-
_closeInteractionType?: FocusOrigin;
|
|
263
|
-
_recaptureFocus?: () => void;
|
|
264
|
-
};
|
|
268
|
+
readonly containerInstance: DialogContainer;
|
|
265
269
|
/** Whether the user is allowed to close the dialog. */
|
|
266
270
|
disableClose: boolean | undefined;
|
|
267
271
|
/** Emits when the dialog has been closed. */
|
|
@@ -276,7 +280,7 @@ declare class DialogRef<R = unknown, C = unknown> {
|
|
|
276
280
|
readonly id: string;
|
|
277
281
|
/** Subscription to external detachments of the dialog. */
|
|
278
282
|
private _detachSubscription;
|
|
279
|
-
constructor(overlayRef: OverlayRef, config: DialogConfig<any, DialogRef<R, C>,
|
|
283
|
+
constructor(overlayRef: OverlayRef, config: DialogConfig<any, DialogRef<R, C>, DialogContainer>);
|
|
280
284
|
/**
|
|
281
285
|
* Close the dialog.
|
|
282
286
|
* @param result Optional result to return to the dialog opener.
|
|
@@ -405,4 +409,4 @@ declare const DIALOG_DATA: InjectionToken<any>;
|
|
|
405
409
|
declare const DEFAULT_DIALOG_CONFIG: InjectionToken<DialogConfig<unknown, unknown, _angular_cdk_portal.BasePortalOutlet>>;
|
|
406
410
|
|
|
407
411
|
export { CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, Dialog, DialogConfig, DialogModule, DialogRef, throwDialogContentAlreadyAttachedError, CdkPortalOutlet as ɵɵCdkPortalOutlet };
|
|
408
|
-
export type { AutoFocusTarget, DialogCloseOptions, DialogRole };
|
|
412
|
+
export type { AutoFocusTarget, DialogCloseOptions, DialogContainer, DialogRole };
|
package/drag-drop/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { a as Direction } from '../bidi-module.d-IN1Vp56w.js';
|
|
|
4
4
|
import { Subject, Observable } from 'rxjs';
|
|
5
5
|
import { ViewportRuler } from '../scrolling/index.js';
|
|
6
6
|
import { N as NumberInput } from '../number-property.d-CJVxXUcb.js';
|
|
7
|
-
import { b as CdkScrollableModule } from '../scrolling-module.d-
|
|
8
|
-
export { C as ɵɵCdkScrollable } from '../scrolling-module.d-
|
|
7
|
+
import { b as CdkScrollableModule } from '../scrolling-module.d-BvCGMKMo.js';
|
|
8
|
+
export { C as ɵɵCdkScrollable } from '../scrolling-module.d-BvCGMKMo.js';
|
|
9
9
|
import '../data-source.d-Bblv7Zvh.js';
|
|
10
10
|
|
|
11
11
|
/** Possible values that can be used to configure the drag start delay. */
|
|
@@ -63,6 +63,10 @@ declare class DropListRef<T = any> {
|
|
|
63
63
|
autoScrollDisabled: boolean;
|
|
64
64
|
/** Number of pixels to scroll for each frame when auto-scrolling an element. */
|
|
65
65
|
autoScrollStep: number;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the items in the list should leave an anchor node when leaving the initial container.
|
|
68
|
+
*/
|
|
69
|
+
hasAnchor: boolean;
|
|
66
70
|
/**
|
|
67
71
|
* Function that is used to determine whether an item
|
|
68
72
|
* is allowed to be moved into a drop container.
|
|
@@ -229,6 +233,11 @@ declare class DropListRef<T = any> {
|
|
|
229
233
|
* @param item Item whose index should be determined.
|
|
230
234
|
*/
|
|
231
235
|
getItemIndex(item: DragRef): number;
|
|
236
|
+
/**
|
|
237
|
+
* Gets the item at a specific index.
|
|
238
|
+
* @param index Index at which to retrieve the item.
|
|
239
|
+
*/
|
|
240
|
+
getItemAtIndex(index: number): DragRef | null;
|
|
232
241
|
/**
|
|
233
242
|
* Whether the list is able to receive the item that
|
|
234
243
|
* is currently being dragged inside a connected drop list.
|
|
@@ -375,6 +384,18 @@ declare class CdkDropList<T = any> implements OnDestroy {
|
|
|
375
384
|
* ```
|
|
376
385
|
*/
|
|
377
386
|
elementContainerSelector: string | null;
|
|
387
|
+
/**
|
|
388
|
+
* By default when an item leaves its initial container, its placeholder will be transferred
|
|
389
|
+
* to the new container. If that's not desirable for your use case, you can enable this option
|
|
390
|
+
* which will clone the placeholder and leave it inside the original container. If the item is
|
|
391
|
+
* returned to the initial container, the anchor element will be removed automatically.
|
|
392
|
+
*
|
|
393
|
+
* The cloned placeholder can be styled by targeting the `cdk-drag-anchor` class.
|
|
394
|
+
*
|
|
395
|
+
* This option is useful in combination with `cdkDropListSortingDisabled` to implement copying
|
|
396
|
+
* behavior in a drop list.
|
|
397
|
+
*/
|
|
398
|
+
hasAnchor: boolean;
|
|
378
399
|
/** Emits when the user drops an item inside the container. */
|
|
379
400
|
readonly dropped: EventEmitter<CdkDragDrop<T, any>>;
|
|
380
401
|
/**
|
|
@@ -413,10 +434,11 @@ declare class CdkDropList<T = any> implements OnDestroy {
|
|
|
413
434
|
/** Syncs up the registered drag items with underlying drop list ref. */
|
|
414
435
|
private _syncItemsWithRef;
|
|
415
436
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkDropList<any>, never>;
|
|
416
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkDropList<any>, "[cdkDropList], cdk-drop-list", ["cdkDropList"], { "connectedTo": { "alias": "cdkDropListConnectedTo"; "required": false; }; "data": { "alias": "cdkDropListData"; "required": false; }; "orientation": { "alias": "cdkDropListOrientation"; "required": false; }; "id": { "alias": "id"; "required": false; }; "lockAxis": { "alias": "cdkDropListLockAxis"; "required": false; }; "disabled": { "alias": "cdkDropListDisabled"; "required": false; }; "sortingDisabled": { "alias": "cdkDropListSortingDisabled"; "required": false; }; "enterPredicate": { "alias": "cdkDropListEnterPredicate"; "required": false; }; "sortPredicate": { "alias": "cdkDropListSortPredicate"; "required": false; }; "autoScrollDisabled": { "alias": "cdkDropListAutoScrollDisabled"; "required": false; }; "autoScrollStep": { "alias": "cdkDropListAutoScrollStep"; "required": false; }; "elementContainerSelector": { "alias": "cdkDropListElementContainer"; "required": false; }; }, { "dropped": "cdkDropListDropped"; "entered": "cdkDropListEntered"; "exited": "cdkDropListExited"; "sorted": "cdkDropListSorted"; }, never, never, true, never>;
|
|
437
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkDropList<any>, "[cdkDropList], cdk-drop-list", ["cdkDropList"], { "connectedTo": { "alias": "cdkDropListConnectedTo"; "required": false; }; "data": { "alias": "cdkDropListData"; "required": false; }; "orientation": { "alias": "cdkDropListOrientation"; "required": false; }; "id": { "alias": "id"; "required": false; }; "lockAxis": { "alias": "cdkDropListLockAxis"; "required": false; }; "disabled": { "alias": "cdkDropListDisabled"; "required": false; }; "sortingDisabled": { "alias": "cdkDropListSortingDisabled"; "required": false; }; "enterPredicate": { "alias": "cdkDropListEnterPredicate"; "required": false; }; "sortPredicate": { "alias": "cdkDropListSortPredicate"; "required": false; }; "autoScrollDisabled": { "alias": "cdkDropListAutoScrollDisabled"; "required": false; }; "autoScrollStep": { "alias": "cdkDropListAutoScrollStep"; "required": false; }; "elementContainerSelector": { "alias": "cdkDropListElementContainer"; "required": false; }; "hasAnchor": { "alias": "cdkDropListHasAnchor"; "required": false; }; }, { "dropped": "cdkDropListDropped"; "entered": "cdkDropListEntered"; "exited": "cdkDropListExited"; "sorted": "cdkDropListSorted"; }, never, never, true, never>;
|
|
417
438
|
static ngAcceptInputType_disabled: unknown;
|
|
418
439
|
static ngAcceptInputType_sortingDisabled: unknown;
|
|
419
440
|
static ngAcceptInputType_autoScrollDisabled: unknown;
|
|
441
|
+
static ngAcceptInputType_hasAnchor: unknown;
|
|
420
442
|
}
|
|
421
443
|
|
|
422
444
|
/** Event emitted when the user starts dragging a draggable. */
|
|
@@ -927,9 +949,13 @@ declare class DragRef<T = any> {
|
|
|
927
949
|
/** Coordinates on the page at which the user picked up the element. */
|
|
928
950
|
private _pickupPositionOnPage;
|
|
929
951
|
/**
|
|
930
|
-
*
|
|
952
|
+
* Marker node used to save the place in the DOM where the element was
|
|
931
953
|
* picked up so that it can be restored at the end of the drag sequence.
|
|
932
954
|
*/
|
|
955
|
+
private _marker;
|
|
956
|
+
/**
|
|
957
|
+
* Element indicating the position from which the item was picked up initially.
|
|
958
|
+
*/
|
|
933
959
|
private _anchor;
|
|
934
960
|
/**
|
|
935
961
|
* CSS `transform` applied to the element when it isn't being dragged. We need a
|
|
@@ -1288,6 +1314,8 @@ declare class DragRef<T = any> {
|
|
|
1288
1314
|
private _nativeDragStart;
|
|
1289
1315
|
/** Gets a handle that is the target of an event. */
|
|
1290
1316
|
private _getTargetHandle;
|
|
1317
|
+
/** Inserts the anchor element, if it's valid. */
|
|
1318
|
+
private _conditionallyInsertAnchor;
|
|
1291
1319
|
}
|
|
1292
1320
|
|
|
1293
1321
|
/**
|
package/fesm2022/cdk.mjs
CHANGED
package/fesm2022/cdk.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('20.0.
|
|
1
|
+
{"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('20.1.0-next.0');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
|
package/fesm2022/collections.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { U as UniqueSelectionDispatcher } from './unique-selection-dispatcher-Cewa_Eg3.mjs';
|
|
2
|
-
export { A as ArrayDataSource, _ as _RecycleViewRepeaterStrategy, b as _VIEW_REPEATER_STRATEGY, a as _ViewRepeaterOperation } from './recycle-view-repeater-strategy-
|
|
2
|
+
export { A as ArrayDataSource, _ as _RecycleViewRepeaterStrategy, b as _VIEW_REPEATER_STRATEGY, a as _ViewRepeaterOperation } from './recycle-view-repeater-strategy-DoWdPqVw.mjs';
|
|
3
3
|
export { D as DataSource, i as isDataSource } from './data-source-D34wiQZj.mjs';
|
|
4
|
-
export { _ as _DisposeViewRepeaterStrategy } from './dispose-view-repeater-strategy-
|
|
4
|
+
export { _ as _DisposeViewRepeaterStrategy } from './dispose-view-repeater-strategy-D_JReLI1.mjs';
|
|
5
5
|
export { S as SelectionModel, g as getMultipleValuesInSingleSelectionError } from './selection-model-BCgC8uEN.mjs';
|
|
6
6
|
import '@angular/core';
|
|
7
7
|
import 'rxjs';
|
package/fesm2022/dialog.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, NgZone, Renderer2,
|
|
2
|
+
import { inject, ElementRef, NgZone, Renderer2, ChangeDetectorRef, Injector, DOCUMENT, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, InjectionToken, TemplateRef, Injectable, signal, EventEmitter, NgModule } from '@angular/core';
|
|
3
|
+
import { Subject, defer } from 'rxjs';
|
|
3
4
|
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from './portal.mjs';
|
|
4
5
|
export { CdkPortal as ɵɵCdkPortal, PortalHostDirective as ɵɵPortalHostDirective, TemplatePortalDirective as ɵɵTemplatePortalDirective } from './portal.mjs';
|
|
5
6
|
import { F as FocusTrapFactory, I as InteractivityChecker, A as A11yModule } from './a11y-module-DHa4AVFz.mjs';
|
|
6
7
|
import { F as FocusMonitor } from './focus-monitor-DLjkiju1.mjs';
|
|
7
8
|
import { P as Platform } from './platform-DNDzkVcI.mjs';
|
|
8
9
|
import { c as _getFocusedElementPierceShadowDom } from './shadow-dom-B0oHn41l.mjs';
|
|
9
|
-
import { Subject, defer } from 'rxjs';
|
|
10
10
|
import { g as ESCAPE } from './keycodes-CpHkExLC.mjs';
|
|
11
11
|
import { hasModifierKey } from './keycodes.mjs';
|
|
12
|
-
import { startWith } from 'rxjs/operators';
|
|
12
|
+
import { startWith, take } from 'rxjs/operators';
|
|
13
13
|
import { s as createBlockScrollStrategy, O as OverlayContainer, c as createOverlayRef, i as OverlayConfig, f as createGlobalPositionStrategy, d as OverlayRef, t as OverlayModule } from './overlay-module-Bd2UplUU.mjs';
|
|
14
14
|
import { _ as _IdGenerator } from './id-generator-LuoRZSid.mjs';
|
|
15
15
|
import { D as Directionality } from './directionality-CChdj3az.mjs';
|
|
@@ -27,7 +27,7 @@ import './css-pixel-value-C_HEqLhI.mjs';
|
|
|
27
27
|
import './scrolling.mjs';
|
|
28
28
|
import './scrolling-BkvA05C8.mjs';
|
|
29
29
|
import './bidi.mjs';
|
|
30
|
-
import './recycle-view-repeater-strategy-
|
|
30
|
+
import './recycle-view-repeater-strategy-DoWdPqVw.mjs';
|
|
31
31
|
import './data-source-D34wiQZj.mjs';
|
|
32
32
|
|
|
33
33
|
/** Configuration for opening a modal dialog. */
|
|
@@ -163,10 +163,13 @@ class CdkDialogContainer extends BasePortalOutlet {
|
|
|
163
163
|
_ngZone = inject(NgZone);
|
|
164
164
|
_focusMonitor = inject(FocusMonitor);
|
|
165
165
|
_renderer = inject(Renderer2);
|
|
166
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
167
|
+
_injector = inject(Injector);
|
|
166
168
|
_platform = inject(Platform);
|
|
167
169
|
_document = inject(DOCUMENT, { optional: true });
|
|
168
170
|
/** The portal outlet inside of this container into which the dialog content will be loaded. */
|
|
169
171
|
_portalOutlet;
|
|
172
|
+
_focusTrapped = new Subject();
|
|
170
173
|
/** The class that traps and manages focus within the dialog. */
|
|
171
174
|
_focusTrap = null;
|
|
172
175
|
/** Element that was focused before the dialog was opened. Save this to restore upon close. */
|
|
@@ -184,8 +187,6 @@ class CdkDialogContainer extends BasePortalOutlet {
|
|
|
184
187
|
* the rest are present.
|
|
185
188
|
*/
|
|
186
189
|
_ariaLabelledByQueue = [];
|
|
187
|
-
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
188
|
-
_injector = inject(Injector);
|
|
189
190
|
_isDestroyed = false;
|
|
190
191
|
constructor() {
|
|
191
192
|
super();
|
|
@@ -219,6 +220,7 @@ class CdkDialogContainer extends BasePortalOutlet {
|
|
|
219
220
|
this._trapFocus();
|
|
220
221
|
}
|
|
221
222
|
ngOnDestroy() {
|
|
223
|
+
this._focusTrapped.complete();
|
|
222
224
|
this._isDestroyed = true;
|
|
223
225
|
this._restoreFocus();
|
|
224
226
|
}
|
|
@@ -339,6 +341,7 @@ class CdkDialogContainer extends BasePortalOutlet {
|
|
|
339
341
|
this._focusByCssSelector(this._config.autoFocus, options);
|
|
340
342
|
break;
|
|
341
343
|
}
|
|
344
|
+
this._focusTrapped.next();
|
|
342
345
|
}, { injector: this._injector });
|
|
343
346
|
}
|
|
344
347
|
/** Restores focus to the element that was focused before the dialog opened. */
|
|
@@ -604,11 +607,21 @@ class Dialog {
|
|
|
604
607
|
const dialogRef = new DialogRef(overlayRef, config);
|
|
605
608
|
const dialogContainer = this._attachContainer(overlayRef, dialogRef, config);
|
|
606
609
|
dialogRef.containerInstance = dialogContainer;
|
|
607
|
-
this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config);
|
|
608
610
|
// If this is the first dialog that we're opening, hide all the non-overlay content.
|
|
609
611
|
if (!this.openDialogs.length) {
|
|
610
|
-
this
|
|
612
|
+
// Resolve this ahead of time, because some internal apps
|
|
613
|
+
// mock it out and depend on it being synchronous.
|
|
614
|
+
const overlayContainer = this._overlayContainer.getContainerElement();
|
|
615
|
+
if (dialogContainer._focusTrapped) {
|
|
616
|
+
dialogContainer._focusTrapped.pipe(take(1)).subscribe(() => {
|
|
617
|
+
this._hideNonDialogContentFromAssistiveTechnology(overlayContainer);
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
else {
|
|
621
|
+
this._hideNonDialogContentFromAssistiveTechnology(overlayContainer);
|
|
622
|
+
}
|
|
611
623
|
}
|
|
624
|
+
this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config);
|
|
612
625
|
this.openDialogs.push(dialogRef);
|
|
613
626
|
dialogRef.closed.subscribe(() => this._removeOpenDialog(dialogRef, true));
|
|
614
627
|
this.afterOpened.next(dialogRef);
|
|
@@ -793,8 +806,7 @@ class Dialog {
|
|
|
793
806
|
}
|
|
794
807
|
}
|
|
795
808
|
/** Hides all of the content that isn't an overlay from assistive technology. */
|
|
796
|
-
_hideNonDialogContentFromAssistiveTechnology() {
|
|
797
|
-
const overlayContainer = this._overlayContainer.getContainerElement();
|
|
809
|
+
_hideNonDialogContentFromAssistiveTechnology(overlayContainer) {
|
|
798
810
|
// Ensure that the overlay container is attached to the DOM.
|
|
799
811
|
if (overlayContainer.parentElement) {
|
|
800
812
|
const siblings = overlayContainer.parentElement.children;
|