@angular/cdk 19.1.0-next.2 → 19.1.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 +4 -3
- package/dialog/index.d.ts +1 -0
- package/drag-drop/index.d.ts +34 -3
- package/fesm2022/a11y.mjs +82 -81
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs +10 -10
- package/fesm2022/bidi.mjs +10 -10
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs +10 -10
- package/fesm2022/collections.mjs +3 -3
- package/fesm2022/dialog.mjs +16 -15
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +153 -114
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/layout.mjs +10 -10
- package/fesm2022/listbox.mjs +23 -29
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +131 -114
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/observers/private.mjs +8 -8
- package/fesm2022/observers/private.mjs.map +1 -1
- package/fesm2022/observers.mjs +13 -13
- package/fesm2022/overlay.mjs +89 -106
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/platform.mjs +30 -9
- package/fesm2022/platform.mjs.map +1 -1
- package/fesm2022/portal.mjs +16 -16
- package/fesm2022/private.mjs +6 -6
- package/fesm2022/scrolling.mjs +64 -86
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +22 -22
- package/fesm2022/table.mjs +76 -76
- package/fesm2022/testing/testbed.mjs +83 -40
- package/fesm2022/testing/testbed.mjs.map +1 -1
- package/fesm2022/text-field.mjs +42 -52
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/listbox/index.d.ts +1 -5
- package/menu/index.d.ts +18 -19
- package/observers/private/index.d.ts +1 -0
- package/overlay/index.d.ts +12 -6
- package/package.json +1 -1
- package/platform/index.d.ts +10 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/scrolling/index.d.ts +7 -14
- package/text-field/index.d.ts +4 -4
package/menu/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { OnDestroy } from '@angular/core';
|
|
|
16
16
|
import { Optional } from '@angular/core';
|
|
17
17
|
import { OverlayRef } from '@angular/cdk/overlay';
|
|
18
18
|
import { QueryList } from '@angular/core';
|
|
19
|
+
import { Renderer2 } from '@angular/core';
|
|
19
20
|
import { ScrollStrategy } from '@angular/cdk/overlay';
|
|
20
21
|
import { Subject } from 'rxjs';
|
|
21
22
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
@@ -149,10 +150,10 @@ export declare class CdkMenuBar extends CdkMenuBase implements AfterContentInit
|
|
|
149
150
|
* This class can be extended to create custom menu types.
|
|
150
151
|
*/
|
|
151
152
|
export declare abstract class CdkMenuBase extends CdkMenuGroup implements Menu, AfterContentInit, OnDestroy {
|
|
153
|
+
protected ngZone: NgZone;
|
|
154
|
+
private _renderer;
|
|
152
155
|
/** The menu's native DOM host element. */
|
|
153
156
|
readonly nativeElement: HTMLElement;
|
|
154
|
-
/** The Angular zone. */
|
|
155
|
-
protected ngZone: NgZone;
|
|
156
157
|
/** The stack of menus this menu belongs to. */
|
|
157
158
|
readonly menuStack: MenuStack;
|
|
158
159
|
/** The menu aim service used by this menu. */
|
|
@@ -242,6 +243,8 @@ export declare class CdkMenuItem implements FocusableOption, FocusableElement, T
|
|
|
242
243
|
readonly _elementRef: ElementRef<HTMLElement>;
|
|
243
244
|
protected _ngZone: NgZone;
|
|
244
245
|
private readonly _inputModalityDetector;
|
|
246
|
+
private readonly _renderer;
|
|
247
|
+
private _cleanupMouseEnter;
|
|
245
248
|
/** The menu aim service used by this menu. */
|
|
246
249
|
private readonly _menuAim;
|
|
247
250
|
/** The stack of menus this menu belongs to. */
|
|
@@ -417,6 +420,8 @@ export declare class CdkMenuTrigger extends CdkMenuTriggerBase implements OnDest
|
|
|
417
420
|
private readonly _changeDetectorRef;
|
|
418
421
|
private readonly _inputModalityDetector;
|
|
419
422
|
private readonly _directionality;
|
|
423
|
+
private readonly _renderer;
|
|
424
|
+
private _cleanupMouseenter;
|
|
420
425
|
/** The parent menu this trigger belongs to. */
|
|
421
426
|
private readonly _parentMenu;
|
|
422
427
|
/** The menu aim service used by this menu. */
|
|
@@ -432,6 +437,7 @@ export declare class CdkMenuTrigger extends CdkMenuTriggerBase implements OnDest
|
|
|
432
437
|
* Get a reference to the rendered Menu if the Menu is open and rendered in the DOM.
|
|
433
438
|
*/
|
|
434
439
|
getMenu(): Menu | undefined;
|
|
440
|
+
ngOnDestroy(): void;
|
|
435
441
|
/**
|
|
436
442
|
* Handles keyboard events for the menu item.
|
|
437
443
|
* @param event The keyboard event to handle
|
|
@@ -803,8 +809,10 @@ export declare const PARENT_OR_NEW_MENU_STACK_PROVIDER: {
|
|
|
803
809
|
* observables which emit when the users mouse enters and leaves a tracked element.
|
|
804
810
|
*/
|
|
805
811
|
export declare class PointerFocusTracker<T extends FocusableElement> {
|
|
806
|
-
|
|
812
|
+
private _renderer;
|
|
807
813
|
private readonly _items;
|
|
814
|
+
private _eventCleanups;
|
|
815
|
+
private _itemsSubscription;
|
|
808
816
|
/** Emits when an element is moused into. */
|
|
809
817
|
readonly entered: Observable<T>;
|
|
810
818
|
/** Emits when an element is moused out. */
|
|
@@ -813,23 +821,13 @@ export declare class PointerFocusTracker<T extends FocusableElement> {
|
|
|
813
821
|
activeElement?: T;
|
|
814
822
|
/** The element previously under mouse focus. */
|
|
815
823
|
previousElement?: T;
|
|
816
|
-
|
|
817
|
-
private readonly _destroyed;
|
|
818
|
-
constructor(
|
|
819
|
-
/** The list of items being tracked. */
|
|
820
|
-
_items: QueryList<T>);
|
|
824
|
+
constructor(_renderer: Renderer2, _items: QueryList<T>);
|
|
821
825
|
/** Stop the managers listeners. */
|
|
822
826
|
destroy(): void;
|
|
823
|
-
/**
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
private _getItemPointerEntries;
|
|
828
|
-
/**
|
|
829
|
-
* Gets a stream of pointer (mouse) exits out of the given items.
|
|
830
|
-
* This should typically run outside the Angular zone.
|
|
831
|
-
*/
|
|
832
|
-
private _getItemPointerExits;
|
|
827
|
+
/** Binds the enter/exit events on all the items. */
|
|
828
|
+
private _bindEvents;
|
|
829
|
+
/** Cleans up the currently-bound events. */
|
|
830
|
+
private _cleanupEvents;
|
|
833
831
|
}
|
|
834
832
|
|
|
835
833
|
/**
|
|
@@ -843,8 +841,9 @@ export declare class PointerFocusTracker<T extends FocusableElement> {
|
|
|
843
841
|
* to submenu.
|
|
844
842
|
*/
|
|
845
843
|
export declare class TargetMenuAim implements MenuAim, OnDestroy {
|
|
846
|
-
/** The Angular zone. */
|
|
847
844
|
private readonly _ngZone;
|
|
845
|
+
private readonly _renderer;
|
|
846
|
+
private _cleanupMousemove;
|
|
848
847
|
/** The last NUM_POINTS mouse move events. */
|
|
849
848
|
private readonly _points;
|
|
850
849
|
/** Reference to the root menu in which we are tracking mouse moves. */
|
|
@@ -13,6 +13,7 @@ import { OnDestroy } from '@angular/core';
|
|
|
13
13
|
* earlier calls.
|
|
14
14
|
*/
|
|
15
15
|
export declare class SharedResizeObserver implements OnDestroy {
|
|
16
|
+
private _cleanupErrorListener;
|
|
16
17
|
/** Map of box type to shared resize observer. */
|
|
17
18
|
private _observers;
|
|
18
19
|
/** The Angular zone. */
|
package/overlay/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { OnChanges } from '@angular/core';
|
|
|
21
21
|
import { OnDestroy } from '@angular/core';
|
|
22
22
|
import { Platform } from '@angular/cdk/platform';
|
|
23
23
|
import { PortalOutlet } from '@angular/cdk/portal';
|
|
24
|
+
import { Renderer2 } from '@angular/core';
|
|
24
25
|
import { ScrollDispatcher } from '@angular/cdk/scrolling';
|
|
25
26
|
import { SimpleChanges } from '@angular/core';
|
|
26
27
|
import { Subject } from 'rxjs';
|
|
@@ -549,13 +550,13 @@ export declare type FlexibleConnectedPositionStrategyOrigin = ElementRef | Eleme
|
|
|
549
550
|
* Should be provided in the root component.
|
|
550
551
|
*/
|
|
551
552
|
export declare class FullscreenOverlayContainer extends OverlayContainer implements OnDestroy {
|
|
553
|
+
private _renderer;
|
|
552
554
|
private _fullScreenEventName;
|
|
553
|
-
private
|
|
555
|
+
private _cleanupFullScreenListener;
|
|
554
556
|
constructor(...args: unknown[]);
|
|
555
557
|
ngOnDestroy(): void;
|
|
556
558
|
protected _createContainer(): void;
|
|
557
559
|
private _adjustParentForFullscreenChange;
|
|
558
|
-
private _addFullscreenChangeListener;
|
|
559
560
|
private _getEventName;
|
|
560
561
|
/**
|
|
561
562
|
* When the page is put into fullscreen mode, a specific element is specified.
|
|
@@ -713,6 +714,7 @@ export declare class Overlay {
|
|
|
713
714
|
private _outsideClickDispatcher;
|
|
714
715
|
private _animationsModuleType;
|
|
715
716
|
private _idGenerator;
|
|
717
|
+
private _renderer;
|
|
716
718
|
private _appRef;
|
|
717
719
|
private _styleLoader;
|
|
718
720
|
constructor(...args: unknown[]);
|
|
@@ -826,6 +828,8 @@ export declare class OverlayContainer implements OnDestroy {
|
|
|
826
828
|
*/
|
|
827
829
|
export declare class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
828
830
|
private _ngZone;
|
|
831
|
+
private _renderer;
|
|
832
|
+
private _cleanupKeydown;
|
|
829
833
|
/** Add a new overlay to the list of attached overlay refs. */
|
|
830
834
|
add(overlayRef: OverlayRef): void;
|
|
831
835
|
/** Detaches the global keyboard event listener. */
|
|
@@ -850,14 +854,15 @@ export declare class OverlayModule {
|
|
|
850
854
|
export declare class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
851
855
|
private _platform;
|
|
852
856
|
private _ngZone;
|
|
857
|
+
private _renderer;
|
|
853
858
|
private _cursorOriginalValue;
|
|
854
859
|
private _cursorStyleIsSet;
|
|
855
860
|
private _pointerDownEventTarget;
|
|
861
|
+
private _cleanups;
|
|
856
862
|
/** Add a new overlay to the list of attached overlay refs. */
|
|
857
863
|
add(overlayRef: OverlayRef): void;
|
|
858
864
|
/** Detaches the global keyboard event listener. */
|
|
859
865
|
protected detach(): void;
|
|
860
|
-
private _addEventListeners;
|
|
861
866
|
/** Store pointerdown event target to track origin of click. */
|
|
862
867
|
private _pointerDownListener;
|
|
863
868
|
/** Click event listener that will be attached to the body propagate phase. */
|
|
@@ -902,6 +907,7 @@ export declare class OverlayRef implements PortalOutlet {
|
|
|
902
907
|
private _outsideClickDispatcher;
|
|
903
908
|
private _animationsDisabled;
|
|
904
909
|
private _injector;
|
|
910
|
+
private _renderer;
|
|
905
911
|
private _backdropElement;
|
|
906
912
|
private _backdropTimeout;
|
|
907
913
|
private readonly _backdropClick;
|
|
@@ -910,8 +916,8 @@ export declare class OverlayRef implements PortalOutlet {
|
|
|
910
916
|
private _positionStrategy;
|
|
911
917
|
private _scrollStrategy;
|
|
912
918
|
private _locationChanges;
|
|
913
|
-
private
|
|
914
|
-
private
|
|
919
|
+
private _cleanupBackdropClick;
|
|
920
|
+
private _cleanupBackdropTransitionEnd;
|
|
915
921
|
/**
|
|
916
922
|
* Reference to the parent of the `_host` at the time it was detached. Used to restore
|
|
917
923
|
* the `_host` to its original position in the DOM when it gets re-attached.
|
|
@@ -925,7 +931,7 @@ export declare class OverlayRef implements PortalOutlet {
|
|
|
925
931
|
private _afterRenderRef;
|
|
926
932
|
/** Reference to the currently-running `afterNextRender` call. */
|
|
927
933
|
private _afterNextRenderRef;
|
|
928
|
-
constructor(_portalOutlet: PortalOutlet, _host: HTMLElement, _pane: HTMLElement, _config: ImmutableObject<OverlayConfig>, _ngZone: NgZone, _keyboardDispatcher: OverlayKeyboardDispatcher, _document: Document, _location: Location_2, _outsideClickDispatcher: OverlayOutsideClickDispatcher, _animationsDisabled: boolean | undefined, _injector: EnvironmentInjector);
|
|
934
|
+
constructor(_portalOutlet: PortalOutlet, _host: HTMLElement, _pane: HTMLElement, _config: ImmutableObject<OverlayConfig>, _ngZone: NgZone, _keyboardDispatcher: OverlayKeyboardDispatcher, _document: Document, _location: Location_2, _outsideClickDispatcher: OverlayOutsideClickDispatcher, _animationsDisabled: boolean | undefined, _injector: EnvironmentInjector, _renderer: Renderer2);
|
|
929
935
|
/** The overlay's HTML element */
|
|
930
936
|
get overlayElement(): HTMLElement;
|
|
931
937
|
/** The overlay's backdrop HTML element. */
|
package/package.json
CHANGED
package/platform/index.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
+
import { ListenerOptions } from '@angular/core';
|
|
3
|
+
import { Renderer2 } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Binds an event listener with specific options in a backwards-compatible way.
|
|
7
|
+
* This function is necessary, because `Renderer2.listen` only supports listener options
|
|
8
|
+
* after 19.1 and during the v19 period we support any 19.x version.
|
|
9
|
+
* @docs-private
|
|
10
|
+
*/
|
|
11
|
+
export declare function _bindEventWithOptions(renderer: Renderer2, target: EventTarget, eventName: string, callback: (event: any) => boolean | void, options: ListenerOptions): () => void;
|
|
2
12
|
|
|
3
13
|
/** Gets the target of an event while accounting for Shadow DOM. */
|
|
4
14
|
export declare function _getEventTarget<T extends EventTarget>(event: Event): T | null;
|
|
@@ -29,7 +29,7 @@ function default_1() {
|
|
|
29
29
|
// In order to align the CDK version with other Angular dependencies that are setup by
|
|
30
30
|
// `@schematics/angular`, we use tilde instead of caret. This is default for Angular
|
|
31
31
|
// dependencies in new CLI projects.
|
|
32
|
-
(0, package_config_1.addPackageToPackageJson)(host, '@angular/cdk', `~19.1.0-next.
|
|
32
|
+
(0, package_config_1.addPackageToPackageJson)(host, '@angular/cdk', `~19.1.0-next.3`);
|
|
33
33
|
// Add a task to run the package manager. This is necessary because we updated the
|
|
34
34
|
// workspace "package.json" file and we want lock files to reflect the new version range.
|
|
35
35
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
@@ -29,7 +29,7 @@ function default_1() {
|
|
|
29
29
|
// In order to align the CDK version with other Angular dependencies that are setup by
|
|
30
30
|
// `@schematics/angular`, we use tilde instead of caret. This is default for Angular
|
|
31
31
|
// dependencies in new CLI projects.
|
|
32
|
-
(0, package_config_1.addPackageToPackageJson)(host, '@angular/cdk', `~19.1.0-next.
|
|
32
|
+
(0, package_config_1.addPackageToPackageJson)(host, '@angular/cdk', `~19.1.0-next.3`);
|
|
33
33
|
// Add a task to run the package manager. This is necessary because we updated the
|
|
34
34
|
// workspace "package.json" file and we want lock files to reflect the new version range.
|
|
35
35
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
package/scrolling/index.d.ts
CHANGED
|
@@ -59,8 +59,11 @@ export declare class CdkScrollable implements OnInit, OnDestroy {
|
|
|
59
59
|
protected scrollDispatcher: ScrollDispatcher;
|
|
60
60
|
protected ngZone: NgZone;
|
|
61
61
|
protected dir?: Directionality | null | undefined;
|
|
62
|
+
protected _scrollElement: EventTarget;
|
|
62
63
|
protected readonly _destroyed: Subject<void>;
|
|
63
|
-
|
|
64
|
+
private _renderer;
|
|
65
|
+
private _cleanupScroll;
|
|
66
|
+
private _elementScrolled;
|
|
64
67
|
constructor(...args: unknown[]);
|
|
65
68
|
ngOnInit(): void;
|
|
66
69
|
ngOnDestroy(): void;
|
|
@@ -224,7 +227,6 @@ export declare class CdkVirtualScrollableElement extends CdkVirtualScrollable {
|
|
|
224
227
|
* Provides as virtual scrollable for the global / window scrollbar.
|
|
225
228
|
*/
|
|
226
229
|
export declare class CdkVirtualScrollableWindow extends CdkVirtualScrollable {
|
|
227
|
-
protected _elementScrolled: Observable<Event>;
|
|
228
230
|
constructor(...args: unknown[]);
|
|
229
231
|
measureBoundingClientRectWithScrollOffset(from: 'left' | 'top' | 'right' | 'bottom'): number;
|
|
230
232
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkVirtualScrollableWindow, never>;
|
|
@@ -522,13 +524,11 @@ export declare type _Right = {
|
|
|
522
524
|
export declare class ScrollDispatcher implements OnDestroy {
|
|
523
525
|
private _ngZone;
|
|
524
526
|
private _platform;
|
|
525
|
-
|
|
526
|
-
|
|
527
|
+
private _renderer;
|
|
528
|
+
private _cleanupGlobalListener;
|
|
527
529
|
constructor(...args: unknown[]);
|
|
528
530
|
/** Subject for notifying that a registered scrollable reference element has been scrolled. */
|
|
529
531
|
private readonly _scrolled;
|
|
530
|
-
/** Keeps track of the global `scroll` and `resize` subscriptions. */
|
|
531
|
-
_globalSubscription: Subscription | null;
|
|
532
532
|
/** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */
|
|
533
533
|
private _scrolledCount;
|
|
534
534
|
/**
|
|
@@ -568,14 +568,8 @@ export declare class ScrollDispatcher implements OnDestroy {
|
|
|
568
568
|
ancestorScrolled(elementOrElementRef: ElementRef | HTMLElement, auditTimeInMs?: number): Observable<CdkScrollable | void>;
|
|
569
569
|
/** Returns all registered Scrollables that contain the provided element. */
|
|
570
570
|
getAncestorScrollContainers(elementOrElementRef: ElementRef | HTMLElement): CdkScrollable[];
|
|
571
|
-
/** Use defaultView of injected document if available or fallback to global window reference */
|
|
572
|
-
private _getWindow;
|
|
573
571
|
/** Returns true if the element is contained within the provided Scrollable. */
|
|
574
572
|
private _scrollableContainsElement;
|
|
575
|
-
/** Sets up the global scroll listeners. */
|
|
576
|
-
private _addGlobalListener;
|
|
577
|
-
/** Cleans up the global scroll listener. */
|
|
578
|
-
private _removeGlobalListener;
|
|
579
573
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollDispatcher, never>;
|
|
580
574
|
static ɵprov: i0.ɵɵInjectableDeclaration<ScrollDispatcher>;
|
|
581
575
|
}
|
|
@@ -603,12 +597,11 @@ export declare type _Top = {
|
|
|
603
597
|
*/
|
|
604
598
|
export declare class ViewportRuler implements OnDestroy {
|
|
605
599
|
private _platform;
|
|
600
|
+
private _listeners;
|
|
606
601
|
/** Cached viewport dimensions. */
|
|
607
602
|
private _viewportSize;
|
|
608
603
|
/** Stream of viewport change events. */
|
|
609
604
|
private readonly _change;
|
|
610
|
-
/** Event listener that will be used to handle the viewport change events. */
|
|
611
|
-
private _changeListener;
|
|
612
605
|
/** Used to reference correct document/window */
|
|
613
606
|
protected _document: Document;
|
|
614
607
|
constructor(...args: unknown[]);
|
package/text-field/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare type AutofillEvent = {
|
|
|
24
24
|
export declare class AutofillMonitor implements OnDestroy {
|
|
25
25
|
private _platform;
|
|
26
26
|
private _ngZone;
|
|
27
|
+
private _renderer;
|
|
27
28
|
private _styleLoader;
|
|
28
29
|
private _monitoredElements;
|
|
29
30
|
constructor(...args: unknown[]);
|
|
@@ -72,10 +73,13 @@ export declare class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDe
|
|
|
72
73
|
private _elementRef;
|
|
73
74
|
private _platform;
|
|
74
75
|
private _ngZone;
|
|
76
|
+
private _renderer;
|
|
77
|
+
private _resizeEvents;
|
|
75
78
|
/** Keep track of the previous textarea value to avoid resizing when the value hasn't changed. */
|
|
76
79
|
private _previousValue?;
|
|
77
80
|
private _initialHeight;
|
|
78
81
|
private readonly _destroyed;
|
|
82
|
+
private _listenerCleanups;
|
|
79
83
|
private _minRows;
|
|
80
84
|
private _maxRows;
|
|
81
85
|
private _enabled;
|
|
@@ -136,10 +140,6 @@ export declare class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDe
|
|
|
136
140
|
*/
|
|
137
141
|
reset(): void;
|
|
138
142
|
_noopInputHandler(): void;
|
|
139
|
-
/** Access injected document if available or fallback to global document reference */
|
|
140
|
-
private _getDocument;
|
|
141
|
-
/** Use defaultView of injected document if available or fallback to global window reference */
|
|
142
|
-
private _getWindow;
|
|
143
143
|
/**
|
|
144
144
|
* Scrolls a textarea to the caret position. On Firefox resizing the textarea will
|
|
145
145
|
* prevent it from scrolling to the caret position. We need to re-set the selection
|