@angular/cdk 22.2.0-rc.0 → 22.2.1

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.
Files changed (51) hide show
  1. package/fesm2022/_a11y-module-chunk.mjs +22 -22
  2. package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
  3. package/fesm2022/_breakpoints-observer-chunk.mjs +6 -6
  4. package/fesm2022/_directionality-chunk.mjs +3 -3
  5. package/fesm2022/_focus-monitor-chunk.mjs +9 -9
  6. package/fesm2022/_id-generator-chunk.mjs +3 -3
  7. package/fesm2022/_overlay-module-chunk.mjs +60 -51
  8. package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
  9. package/fesm2022/_platform-chunk.mjs +3 -3
  10. package/fesm2022/_style-loader-chunk.mjs +3 -3
  11. package/fesm2022/_unique-selection-dispatcher-chunk.mjs +3 -3
  12. package/fesm2022/a11y.mjs +9 -9
  13. package/fesm2022/accordion.mjs +10 -10
  14. package/fesm2022/accordion.mjs.map +1 -1
  15. package/fesm2022/bidi.mjs +7 -7
  16. package/fesm2022/cdk.mjs +1 -1
  17. package/fesm2022/cdk.mjs.map +1 -1
  18. package/fesm2022/clipboard.mjs +10 -10
  19. package/fesm2022/dialog.mjs +10 -10
  20. package/fesm2022/dialog.mjs.map +1 -1
  21. package/fesm2022/drag-drop.mjs +32 -32
  22. package/fesm2022/drag-drop.mjs.map +1 -1
  23. package/fesm2022/layout.mjs +4 -4
  24. package/fesm2022/listbox.mjs +10 -10
  25. package/fesm2022/listbox.mjs.map +1 -1
  26. package/fesm2022/menu.mjs +49 -49
  27. package/fesm2022/menu.mjs.map +1 -1
  28. package/fesm2022/observers-private.mjs +3 -3
  29. package/fesm2022/observers.mjs +13 -13
  30. package/fesm2022/observers.mjs.map +1 -1
  31. package/fesm2022/overlay.mjs +4 -4
  32. package/fesm2022/platform.mjs +4 -4
  33. package/fesm2022/portal.mjs +10 -10
  34. package/fesm2022/portal.mjs.map +1 -1
  35. package/fesm2022/private.mjs +3 -3
  36. package/fesm2022/private.mjs.map +1 -1
  37. package/fesm2022/scrolling.mjs +35 -35
  38. package/fesm2022/scrolling.mjs.map +1 -1
  39. package/fesm2022/stepper.mjs +22 -22
  40. package/fesm2022/stepper.mjs.map +1 -1
  41. package/fesm2022/table.mjs +73 -73
  42. package/fesm2022/table.mjs.map +1 -1
  43. package/fesm2022/text-field.mjs +16 -16
  44. package/fesm2022/text-field.mjs.map +1 -1
  45. package/fesm2022/tree.mjs +25 -25
  46. package/fesm2022/tree.mjs.map +1 -1
  47. package/package.json +5 -5
  48. package/schematics/ng-add/index.js +1 -1
  49. package/types/_overlay-module-chunk.d.ts +16 -12
  50. package/types/dialog.d.ts +3 -7
  51. package/types/overlay.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cdk",
3
- "version": "22.2.0-rc.0",
3
+ "version": "22.2.1",
4
4
  "description": "Angular Material Component Development Kit",
5
5
  "repository": {
6
6
  "type": "git",
@@ -158,10 +158,10 @@
158
158
  }
159
159
  },
160
160
  "peerDependencies": {
161
- "@angular/core": "^22.0.0-0 || ^22.1.0-0 || ^22.2.0-0 || ^22.3.0-0 || ^23.0.0-0",
162
- "@angular/common": "^22.0.0-0 || ^22.1.0-0 || ^22.2.0-0 || ^22.3.0-0 || ^23.0.0-0",
163
- "@angular/forms": "^22.0.0-0 || ^22.1.0-0 || ^22.2.0-0 || ^22.3.0-0 || ^23.0.0-0",
164
- "@angular/platform-browser": "^22.0.0-0 || ^22.1.0-0 || ^22.2.0-0 || ^22.3.0-0 || ^23.0.0-0",
161
+ "@angular/core": "^22.0.0 || ^23.0.0",
162
+ "@angular/common": "^22.0.0 || ^23.0.0",
163
+ "@angular/forms": "^22.0.0 || ^23.0.0",
164
+ "@angular/platform-browser": "^22.0.0 || ^23.0.0",
165
165
  "rxjs": "^6.5.3 || ^7.4.0"
166
166
  },
167
167
  "dependencies": {
@@ -26,6 +26,6 @@ function default_1() {
26
26
  // In order to align the CDK version with other Angular dependencies that are setup by
27
27
  // `@schematics/angular`, we use tilde instead of caret. This is default for Angular
28
28
  // dependencies in new CLI projects.
29
- return (0, utility_1.addDependency)('@angular/cdk', `~22.2.0-rc.0`, { existing: utility_1.ExistingBehavior.Skip });
29
+ return (0, utility_1.addDependency)('@angular/cdk', `~22.2.1`, { existing: utility_1.ExistingBehavior.Skip });
30
30
  }
31
31
  //# sourceMappingURL=index.js.map
@@ -94,8 +94,6 @@ interface ScrollStrategy {
94
94
  type ImmutableObject<T> = {
95
95
  readonly [P in keyof T]: T[P];
96
96
  };
97
- /** Gets all overlays that are currently attached. */
98
- declare function getAttachedOverlays(): OverlayRef[];
99
97
  /**
100
98
  * Reference to an overlay that has been created with the Overlay service.
101
99
  * Used to manipulate or dispose of said overlay.
@@ -249,6 +247,16 @@ interface PositionStrategy {
249
247
  };
250
248
  }
251
249
 
250
+ /**
251
+ * Value that can be used to configure the behavior of `OverlayConfig.disposeOnNavigation`.
252
+ * The value correspond to the following:
253
+ * - `true` or `pop-state` - Overlay is only disposed when the back/forward browser buttons are
254
+ * pressed.
255
+ * - `false` - Overlay does nothing on navigations.
256
+ * - `url-change` - Overlay closes on any URL change. Note that this may close overlays opened
257
+ * from route resolvers immediately.
258
+ */
259
+ type OverlayDisposeOnNavigation = boolean | 'url-change' | 'pop-state';
252
260
  /** Initial configuration used when creating an overlay. */
253
261
  declare class OverlayConfig {
254
262
  /** Strategy with which to position the overlay. */
@@ -280,12 +288,8 @@ declare class OverlayConfig {
280
288
  * is passed in, the overlay will handle changes to its value automatically.
281
289
  */
282
290
  direction?: Direction | Directionality;
283
- /**
284
- * Whether the overlay should be disposed of when the user goes backwards/forwards in history.
285
- * Note that this usually doesn't include clicking on links (unless the user is using
286
- * the `HashLocationStrategy`).
287
- */
288
- disposeOnNavigation?: boolean;
291
+ /** Whether the overlay should be disposed of when the user navigates. */
292
+ disposeOnNavigation?: OverlayDisposeOnNavigation;
289
293
  /**
290
294
  * Whether the overlay should be rendered as a native popover element,
291
295
  * rather than placing it inside of the overlay container.
@@ -782,7 +786,7 @@ interface CdkConnectedOverlayConfig {
782
786
  flexibleDimensions?: boolean;
783
787
  growAfterOpen?: boolean;
784
788
  push?: boolean;
785
- disposeOnNavigation?: boolean;
789
+ disposeOnNavigation?: OverlayDisposeOnNavigation;
786
790
  usePopover?: FlexibleOverlayPopoverLocation | null;
787
791
  matchWidth?: boolean;
788
792
  }
@@ -852,7 +856,7 @@ declare class CdkConnectedOverlay implements OnDestroy, OnChanges {
852
856
  /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */
853
857
  push: boolean;
854
858
  /** Whether the overlay should be disposed of when the user goes backwards/forwards in history. */
855
- disposeOnNavigation: boolean;
859
+ disposeOnNavigation: OverlayDisposeOnNavigation;
856
860
  /** Whether the connected overlay should be rendered inside a popover element or the overlay container. */
857
861
  usePopover: FlexibleOverlayPopoverLocation | null;
858
862
  /** Whether the overlay should match the trigger's width. */
@@ -911,5 +915,5 @@ declare class OverlayModule {
911
915
  static ɵinj: i0.ɵɵInjectorDeclaration<OverlayModule>;
912
916
  }
913
917
 
914
- export { CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG, CdkConnectedOverlay, CdkOverlayOrigin, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, OverlayConfig, OverlayContainer, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayRef, STANDARD_DROPDOWN_ADJACENT_POSITIONS, STANDARD_DROPDOWN_BELOW_POSITIONS, ScrollingVisibility, createFlexibleConnectedPositionStrategy, getAttachedOverlays, validateHorizontalPosition, validateVerticalPosition };
915
- export type { CdkConnectedOverlayConfig, ConnectedPosition, FlexibleConnectedPositionStrategyOrigin, FlexibleOverlayPopoverLocation, HorizontalConnectionPos, OriginConnectionPosition, OverlayConnectionPosition, OverlaySizeConfig, PositionStrategy, ScrollStrategy, VerticalConnectionPos, ViewportMargin };
918
+ export { CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG, CdkConnectedOverlay, CdkOverlayOrigin, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, OverlayConfig, OverlayContainer, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayRef, STANDARD_DROPDOWN_ADJACENT_POSITIONS, STANDARD_DROPDOWN_BELOW_POSITIONS, ScrollingVisibility, createFlexibleConnectedPositionStrategy, validateHorizontalPosition, validateVerticalPosition };
919
+ export type { CdkConnectedOverlayConfig, ConnectedPosition, FlexibleConnectedPositionStrategyOrigin, FlexibleOverlayPopoverLocation, HorizontalConnectionPos, OriginConnectionPosition, OverlayConnectionPosition, OverlayDisposeOnNavigation, OverlaySizeConfig, PositionStrategy, ScrollStrategy, VerticalConnectionPos, ViewportMargin };
package/types/dialog.d.ts CHANGED
@@ -8,7 +8,7 @@ import { ComponentType } from './overlay.js';
8
8
  import { BasePortalOutlet, ComponentPortal, TemplatePortal, DomPortal, PortalModule } from './portal.js';
9
9
  export { CdkPortal as ɵɵCdkPortal } from './_portal-directives-chunk.js';
10
10
  import { Direction } from './bidi.js';
11
- import { PositionStrategy, ScrollStrategy, OverlayRef, OverlayModule } from './overlay.js';
11
+ import { PositionStrategy, ScrollStrategy, OverlayDisposeOnNavigation, OverlayRef, OverlayModule } from './overlay.js';
12
12
  import * as _angular_cdk_portal from '@angular/cdk/portal';
13
13
  import './observers.js';
14
14
  import './_number-property-chunk.js';
@@ -110,12 +110,8 @@ declare class DialogConfig<D = unknown, R = unknown, C extends DialogContainer =
110
110
  * the dialog responds to scrolling underneath the panel element.
111
111
  */
112
112
  scrollStrategy?: ScrollStrategy;
113
- /**
114
- * Whether the dialog should close when the user navigates backwards or forwards through browser
115
- * history. This does not apply to navigation via anchor element unless using URL-hash based
116
- * routing (`HashLocationStrategy` in the Angular router).
117
- */
118
- closeOnNavigation?: boolean;
113
+ /** Whether the dialog should be disposed of when the user navigates. */
114
+ closeOnNavigation?: OverlayDisposeOnNavigation;
119
115
  /**
120
116
  * Whether the dialog should close when the dialog service is destroyed. This is useful if
121
117
  * another service is wrapping the dialog and is managing the destruction instead.
@@ -1,5 +1,5 @@
1
1
  import { ScrollStrategy, OverlayRef, PositionStrategy, FlexibleConnectedPositionStrategyOrigin, FlexibleConnectedPositionStrategy, OverlayConfig, OverlayContainer } from './_overlay-module-chunk.js';
2
- export { CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG, CdkConnectedOverlay, CdkConnectedOverlayConfig, CdkOverlayOrigin, ConnectedOverlayPositionChange, ConnectedPosition, ConnectionPositionPair, FlexibleOverlayPopoverLocation, HorizontalConnectionPos, OriginConnectionPosition, OverlayConnectionPosition, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlaySizeConfig, STANDARD_DROPDOWN_ADJACENT_POSITIONS, STANDARD_DROPDOWN_BELOW_POSITIONS, ScrollingVisibility, VerticalConnectionPos, ViewportMargin, createFlexibleConnectedPositionStrategy, getAttachedOverlays, validateHorizontalPosition, validateVerticalPosition } from './_overlay-module-chunk.js';
2
+ export { CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG, CdkConnectedOverlay, CdkConnectedOverlayConfig, CdkOverlayOrigin, ConnectedOverlayPositionChange, ConnectedPosition, ConnectionPositionPair, FlexibleOverlayPopoverLocation, HorizontalConnectionPos, OriginConnectionPosition, OverlayConnectionPosition, OverlayDisposeOnNavigation, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlaySizeConfig, STANDARD_DROPDOWN_ADJACENT_POSITIONS, STANDARD_DROPDOWN_BELOW_POSITIONS, ScrollingVisibility, VerticalConnectionPos, ViewportMargin, createFlexibleConnectedPositionStrategy, validateHorizontalPosition, validateVerticalPosition } from './_overlay-module-chunk.js';
3
3
  import { ScrollDispatcher } from './_scrolling-module-chunk.js';
4
4
  export { CdkScrollable, CdkFixedSizeVirtualScroll as ɵɵCdkFixedSizeVirtualScroll, CdkScrollableModule as ɵɵCdkScrollableModule, CdkVirtualForOf as ɵɵCdkVirtualForOf, CdkVirtualScrollViewport as ɵɵCdkVirtualScrollViewport, CdkVirtualScrollableElement as ɵɵCdkVirtualScrollableElement, CdkVirtualScrollableWindow as ɵɵCdkVirtualScrollableWindow } from './_scrolling-module-chunk.js';
5
5
  import { ViewportRuler } from './scrolling.js';