@angular/cdk 21.0.0 → 21.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.
Files changed (65) hide show
  1. package/fesm2022/_a11y-module-chunk.mjs +23 -23
  2. package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
  3. package/fesm2022/_breakpoints-observer-chunk.mjs +6 -6
  4. package/fesm2022/_breakpoints-observer-chunk.mjs.map +1 -1
  5. package/fesm2022/_directionality-chunk.mjs +3 -3
  6. package/fesm2022/_directionality-chunk.mjs.map +1 -1
  7. package/fesm2022/_focus-monitor-chunk.mjs +9 -9
  8. package/fesm2022/_focus-monitor-chunk.mjs.map +1 -1
  9. package/fesm2022/_id-generator-chunk.mjs +3 -3
  10. package/fesm2022/_id-generator-chunk.mjs.map +1 -1
  11. package/fesm2022/_overlay-module-chunk.mjs +52 -68
  12. package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
  13. package/fesm2022/_platform-chunk.mjs +3 -3
  14. package/fesm2022/_platform-chunk.mjs.map +1 -1
  15. package/fesm2022/_style-loader-chunk.mjs +3 -3
  16. package/fesm2022/_style-loader-chunk.mjs.map +1 -1
  17. package/fesm2022/_unique-selection-dispatcher-chunk.mjs +3 -3
  18. package/fesm2022/_unique-selection-dispatcher-chunk.mjs.map +1 -1
  19. package/fesm2022/_visually-hidden-chunk.mjs +46 -0
  20. package/fesm2022/_visually-hidden-chunk.mjs.map +1 -0
  21. package/fesm2022/a11y.mjs +10 -10
  22. package/fesm2022/a11y.mjs.map +1 -1
  23. package/fesm2022/accordion.mjs +10 -10
  24. package/fesm2022/accordion.mjs.map +1 -1
  25. package/fesm2022/bidi.mjs +7 -7
  26. package/fesm2022/bidi.mjs.map +1 -1
  27. package/fesm2022/cdk.mjs +1 -1
  28. package/fesm2022/cdk.mjs.map +1 -1
  29. package/fesm2022/clipboard.mjs +10 -10
  30. package/fesm2022/clipboard.mjs.map +1 -1
  31. package/fesm2022/dialog.mjs +11 -11
  32. package/fesm2022/dialog.mjs.map +1 -1
  33. package/fesm2022/drag-drop.mjs +31 -31
  34. package/fesm2022/drag-drop.mjs.map +1 -1
  35. package/fesm2022/layout.mjs +4 -4
  36. package/fesm2022/listbox.mjs +10 -10
  37. package/fesm2022/listbox.mjs.map +1 -1
  38. package/fesm2022/menu.mjs +49 -49
  39. package/fesm2022/menu.mjs.map +1 -1
  40. package/fesm2022/observers-private.mjs +3 -3
  41. package/fesm2022/observers-private.mjs.map +1 -1
  42. package/fesm2022/observers.mjs +13 -13
  43. package/fesm2022/observers.mjs.map +1 -1
  44. package/fesm2022/overlay.mjs +3 -3
  45. package/fesm2022/overlay.mjs.map +1 -1
  46. package/fesm2022/platform.mjs +4 -4
  47. package/fesm2022/portal.mjs +10 -10
  48. package/fesm2022/portal.mjs.map +1 -1
  49. package/fesm2022/private.mjs +20 -42
  50. package/fesm2022/private.mjs.map +1 -1
  51. package/fesm2022/scrolling.mjs +35 -35
  52. package/fesm2022/scrolling.mjs.map +1 -1
  53. package/fesm2022/stepper.mjs +22 -22
  54. package/fesm2022/stepper.mjs.map +1 -1
  55. package/fesm2022/table.mjs +73 -73
  56. package/fesm2022/table.mjs.map +1 -1
  57. package/fesm2022/testing-testbed.mjs +6 -3
  58. package/fesm2022/testing-testbed.mjs.map +1 -1
  59. package/fesm2022/text-field.mjs +16 -16
  60. package/fesm2022/text-field.mjs.map +1 -1
  61. package/fesm2022/tree.mjs +25 -25
  62. package/fesm2022/tree.mjs.map +1 -1
  63. package/package.json +3 -3
  64. package/schematics/ng-add/index.js +1 -1
  65. package/types/private.d.ts +17 -1
@@ -245,7 +245,7 @@ class ScrollStrategyOptions {
245
245
  reposition = config => createRepositionScrollStrategy(this._injector, config);
246
246
  static ɵfac = i0.ɵɵngDeclareFactory({
247
247
  minVersion: "12.0.0",
248
- version: "20.2.0-next.2",
248
+ version: "21.0.0",
249
249
  ngImport: i0,
250
250
  type: ScrollStrategyOptions,
251
251
  deps: [],
@@ -253,7 +253,7 @@ class ScrollStrategyOptions {
253
253
  });
254
254
  static ɵprov = i0.ɵɵngDeclareInjectable({
255
255
  minVersion: "12.0.0",
256
- version: "20.2.0-next.2",
256
+ version: "21.0.0",
257
257
  ngImport: i0,
258
258
  type: ScrollStrategyOptions,
259
259
  providedIn: 'root'
@@ -261,7 +261,7 @@ class ScrollStrategyOptions {
261
261
  }
262
262
  i0.ɵɵngDeclareClassMetadata({
263
263
  minVersion: "12.0.0",
264
- version: "20.2.0-next.2",
264
+ version: "21.0.0",
265
265
  ngImport: i0,
266
266
  type: ScrollStrategyOptions,
267
267
  decorators: [{
@@ -367,7 +367,7 @@ class BaseOverlayDispatcher {
367
367
  }
368
368
  static ɵfac = i0.ɵɵngDeclareFactory({
369
369
  minVersion: "12.0.0",
370
- version: "20.2.0-next.2",
370
+ version: "21.0.0",
371
371
  ngImport: i0,
372
372
  type: BaseOverlayDispatcher,
373
373
  deps: [],
@@ -375,7 +375,7 @@ class BaseOverlayDispatcher {
375
375
  });
376
376
  static ɵprov = i0.ɵɵngDeclareInjectable({
377
377
  minVersion: "12.0.0",
378
- version: "20.2.0-next.2",
378
+ version: "21.0.0",
379
379
  ngImport: i0,
380
380
  type: BaseOverlayDispatcher,
381
381
  providedIn: 'root'
@@ -383,7 +383,7 @@ class BaseOverlayDispatcher {
383
383
  }
384
384
  i0.ɵɵngDeclareClassMetadata({
385
385
  minVersion: "12.0.0",
386
- version: "20.2.0-next.2",
386
+ version: "21.0.0",
387
387
  ngImport: i0,
388
388
  type: BaseOverlayDispatcher,
389
389
  decorators: [{
@@ -425,7 +425,7 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
425
425
  };
426
426
  static ɵfac = i0.ɵɵngDeclareFactory({
427
427
  minVersion: "12.0.0",
428
- version: "20.2.0-next.2",
428
+ version: "21.0.0",
429
429
  ngImport: i0,
430
430
  type: OverlayKeyboardDispatcher,
431
431
  deps: null,
@@ -433,7 +433,7 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
433
433
  });
434
434
  static ɵprov = i0.ɵɵngDeclareInjectable({
435
435
  minVersion: "12.0.0",
436
- version: "20.2.0-next.2",
436
+ version: "21.0.0",
437
437
  ngImport: i0,
438
438
  type: OverlayKeyboardDispatcher,
439
439
  providedIn: 'root'
@@ -441,7 +441,7 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
441
441
  }
442
442
  i0.ɵɵngDeclareClassMetadata({
443
443
  minVersion: "12.0.0",
444
- version: "20.2.0-next.2",
444
+ version: "21.0.0",
445
445
  ngImport: i0,
446
446
  type: OverlayKeyboardDispatcher,
447
447
  decorators: [{
@@ -514,7 +514,7 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
514
514
  };
515
515
  static ɵfac = i0.ɵɵngDeclareFactory({
516
516
  minVersion: "12.0.0",
517
- version: "20.2.0-next.2",
517
+ version: "21.0.0",
518
518
  ngImport: i0,
519
519
  type: OverlayOutsideClickDispatcher,
520
520
  deps: null,
@@ -522,7 +522,7 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
522
522
  });
523
523
  static ɵprov = i0.ɵɵngDeclareInjectable({
524
524
  minVersion: "12.0.0",
525
- version: "20.2.0-next.2",
525
+ version: "21.0.0",
526
526
  ngImport: i0,
527
527
  type: OverlayOutsideClickDispatcher,
528
528
  providedIn: 'root'
@@ -530,7 +530,7 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
530
530
  }
531
531
  i0.ɵɵngDeclareClassMetadata({
532
532
  minVersion: "12.0.0",
533
- version: "20.2.0-next.2",
533
+ version: "21.0.0",
534
534
  ngImport: i0,
535
535
  type: OverlayOutsideClickDispatcher,
536
536
  decorators: [{
@@ -555,7 +555,7 @@ function containsPierceShadowDom(parent, child) {
555
555
  class _CdkOverlayStyleLoader {
556
556
  static ɵfac = i0.ɵɵngDeclareFactory({
557
557
  minVersion: "12.0.0",
558
- version: "20.2.0-next.2",
558
+ version: "21.0.0",
559
559
  ngImport: i0,
560
560
  type: _CdkOverlayStyleLoader,
561
561
  deps: [],
@@ -563,7 +563,7 @@ class _CdkOverlayStyleLoader {
563
563
  });
564
564
  static ɵcmp = i0.ɵɵngDeclareComponent({
565
565
  minVersion: "14.0.0",
566
- version: "20.2.0-next.2",
566
+ version: "21.0.0",
567
567
  type: _CdkOverlayStyleLoader,
568
568
  isStandalone: true,
569
569
  selector: "ng-component",
@@ -582,7 +582,7 @@ class _CdkOverlayStyleLoader {
582
582
  }
583
583
  i0.ɵɵngDeclareClassMetadata({
584
584
  minVersion: "12.0.0",
585
- version: "20.2.0-next.2",
585
+ version: "21.0.0",
586
586
  ngImport: i0,
587
587
  type: _CdkOverlayStyleLoader,
588
588
  decorators: [{
@@ -637,7 +637,7 @@ class OverlayContainer {
637
637
  }
638
638
  static ɵfac = i0.ɵɵngDeclareFactory({
639
639
  minVersion: "12.0.0",
640
- version: "20.2.0-next.2",
640
+ version: "21.0.0",
641
641
  ngImport: i0,
642
642
  type: OverlayContainer,
643
643
  deps: [],
@@ -645,7 +645,7 @@ class OverlayContainer {
645
645
  });
646
646
  static ɵprov = i0.ɵɵngDeclareInjectable({
647
647
  minVersion: "12.0.0",
648
- version: "20.2.0-next.2",
648
+ version: "21.0.0",
649
649
  ngImport: i0,
650
650
  type: OverlayContainer,
651
651
  providedIn: 'root'
@@ -653,7 +653,7 @@ class OverlayContainer {
653
653
  }
654
654
  i0.ɵɵngDeclareClassMetadata({
655
655
  minVersion: "12.0.0",
656
- version: "20.2.0-next.2",
656
+ version: "21.0.0",
657
657
  ngImport: i0,
658
658
  type: OverlayContainer,
659
659
  decorators: [{
@@ -699,6 +699,9 @@ class BackdropRef {
699
699
  };
700
700
  }
701
701
 
702
+ function isElement(value) {
703
+ return value && value.nodeType === 1;
704
+ }
702
705
  class OverlayRef {
703
706
  _portalOutlet;
704
707
  _host;
@@ -941,14 +944,10 @@ class OverlayRef {
941
944
  _attachHost() {
942
945
  if (!this._host.parentElement) {
943
946
  const customInsertionPoint = this._config.usePopover ? this._positionStrategy?.getPopoverInsertionPoint?.() : null;
944
- if (customInsertionPoint) {
945
- if (customInsertionPoint instanceof Element) {
946
- customInsertionPoint.after(this._host);
947
- } else {
948
- if (customInsertionPoint.type === 'parent') {
949
- customInsertionPoint.element?.appendChild(this._host);
950
- }
951
- }
947
+ if (isElement(customInsertionPoint)) {
948
+ customInsertionPoint.after(this._host);
949
+ } else if (customInsertionPoint?.type === 'parent') {
950
+ customInsertionPoint.element.appendChild(this._host);
952
951
  } else {
953
952
  this._previousHostParent?.appendChild(this._host);
954
953
  }
@@ -1296,27 +1295,16 @@ class FlexibleConnectedPositionStrategy {
1296
1295
  getPopoverInsertionPoint() {
1297
1296
  if (this._popoverLocation === 'global') {
1298
1297
  return null;
1298
+ } else if (this._popoverLocation !== 'inline') {
1299
+ return this._popoverLocation;
1299
1300
  }
1300
- let hostElement = null;
1301
- if (this._popoverLocation === 'inline') {
1302
- if (this._origin instanceof ElementRef) {
1303
- hostElement = this._origin.nativeElement;
1304
- } else if (this._origin instanceof Element) {
1305
- hostElement = this._origin;
1306
- }
1301
+ if (this._origin instanceof ElementRef) {
1302
+ return this._origin.nativeElement;
1303
+ } else if (isElement(this._origin)) {
1304
+ return this._origin;
1307
1305
  } else {
1308
- hostElement = this._popoverLocation.element;
1309
- }
1310
- if (this._popoverLocation === 'inline') {
1311
- return hostElement;
1312
- }
1313
- if (hostElement) {
1314
- return {
1315
- type: 'parent',
1316
- element: hostElement
1317
- };
1306
+ return null;
1318
1307
  }
1319
- return null;
1320
1308
  }
1321
1309
  _getOriginPoint(originRect, containerRect, pos) {
1322
1310
  let x;
@@ -2016,7 +2004,7 @@ class OverlayPositionBuilder {
2016
2004
  }
2017
2005
  static ɵfac = i0.ɵɵngDeclareFactory({
2018
2006
  minVersion: "12.0.0",
2019
- version: "20.2.0-next.2",
2007
+ version: "21.0.0",
2020
2008
  ngImport: i0,
2021
2009
  type: OverlayPositionBuilder,
2022
2010
  deps: [],
@@ -2024,7 +2012,7 @@ class OverlayPositionBuilder {
2024
2012
  });
2025
2013
  static ɵprov = i0.ɵɵngDeclareInjectable({
2026
2014
  minVersion: "12.0.0",
2027
- version: "20.2.0-next.2",
2015
+ version: "21.0.0",
2028
2016
  ngImport: i0,
2029
2017
  type: OverlayPositionBuilder,
2030
2018
  providedIn: 'root'
@@ -2032,7 +2020,7 @@ class OverlayPositionBuilder {
2032
2020
  }
2033
2021
  i0.ɵɵngDeclareClassMetadata({
2034
2022
  minVersion: "12.0.0",
2035
- version: "20.2.0-next.2",
2023
+ version: "21.0.0",
2036
2024
  ngImport: i0,
2037
2025
  type: OverlayPositionBuilder,
2038
2026
  decorators: [{
@@ -2076,14 +2064,10 @@ function createOverlayRef(injector, config) {
2076
2064
  }
2077
2065
  const customInsertionPoint = overlayConfig.usePopover ? overlayConfig.positionStrategy?.getPopoverInsertionPoint?.() : null;
2078
2066
  overlayContainer.getContainerElement().appendChild(host);
2079
- if (customInsertionPoint) {
2080
- if (customInsertionPoint instanceof Element) {
2081
- customInsertionPoint.after(host);
2082
- } else {
2083
- if (customInsertionPoint.type === 'parent') {
2084
- customInsertionPoint.element?.appendChild(host);
2085
- }
2086
- }
2067
+ if (isElement(customInsertionPoint)) {
2068
+ customInsertionPoint.after(host);
2069
+ } else if (customInsertionPoint?.type === 'parent') {
2070
+ customInsertionPoint.element.appendChild(host);
2087
2071
  }
2088
2072
  return new OverlayRef(new DomPortalOutlet(pane, appRef, injector), host, pane, overlayConfig, injector.get(NgZone), injector.get(OverlayKeyboardDispatcher), doc, injector.get(Location), injector.get(OverlayOutsideClickDispatcher), config?.disableAnimations ?? injector.get(ANIMATION_MODULE_TYPE, null, {
2089
2073
  optional: true
@@ -2102,7 +2086,7 @@ class Overlay {
2102
2086
  }
2103
2087
  static ɵfac = i0.ɵɵngDeclareFactory({
2104
2088
  minVersion: "12.0.0",
2105
- version: "20.2.0-next.2",
2089
+ version: "21.0.0",
2106
2090
  ngImport: i0,
2107
2091
  type: Overlay,
2108
2092
  deps: [],
@@ -2110,7 +2094,7 @@ class Overlay {
2110
2094
  });
2111
2095
  static ɵprov = i0.ɵɵngDeclareInjectable({
2112
2096
  minVersion: "12.0.0",
2113
- version: "20.2.0-next.2",
2097
+ version: "21.0.0",
2114
2098
  ngImport: i0,
2115
2099
  type: Overlay,
2116
2100
  providedIn: 'root'
@@ -2118,7 +2102,7 @@ class Overlay {
2118
2102
  }
2119
2103
  i0.ɵɵngDeclareClassMetadata({
2120
2104
  minVersion: "12.0.0",
2121
- version: "20.2.0-next.2",
2105
+ version: "21.0.0",
2122
2106
  ngImport: i0,
2123
2107
  type: Overlay,
2124
2108
  decorators: [{
@@ -2163,7 +2147,7 @@ class CdkOverlayOrigin {
2163
2147
  constructor() {}
2164
2148
  static ɵfac = i0.ɵɵngDeclareFactory({
2165
2149
  minVersion: "12.0.0",
2166
- version: "20.2.0-next.2",
2150
+ version: "21.0.0",
2167
2151
  ngImport: i0,
2168
2152
  type: CdkOverlayOrigin,
2169
2153
  deps: [],
@@ -2171,7 +2155,7 @@ class CdkOverlayOrigin {
2171
2155
  });
2172
2156
  static ɵdir = i0.ɵɵngDeclareDirective({
2173
2157
  minVersion: "14.0.0",
2174
- version: "20.2.0-next.2",
2158
+ version: "21.0.0",
2175
2159
  type: CdkOverlayOrigin,
2176
2160
  isStandalone: true,
2177
2161
  selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",
@@ -2181,7 +2165,7 @@ class CdkOverlayOrigin {
2181
2165
  }
2182
2166
  i0.ɵɵngDeclareClassMetadata({
2183
2167
  minVersion: "12.0.0",
2184
- version: "20.2.0-next.2",
2168
+ version: "21.0.0",
2185
2169
  ngImport: i0,
2186
2170
  type: CdkOverlayOrigin,
2187
2171
  decorators: [{
@@ -2459,7 +2443,7 @@ class CdkConnectedOverlay {
2459
2443
  }
2460
2444
  static ɵfac = i0.ɵɵngDeclareFactory({
2461
2445
  minVersion: "12.0.0",
2462
- version: "20.2.0-next.2",
2446
+ version: "21.0.0",
2463
2447
  ngImport: i0,
2464
2448
  type: CdkConnectedOverlay,
2465
2449
  deps: [],
@@ -2467,7 +2451,7 @@ class CdkConnectedOverlay {
2467
2451
  });
2468
2452
  static ɵdir = i0.ɵɵngDeclareDirective({
2469
2453
  minVersion: "16.1.0",
2470
- version: "20.2.0-next.2",
2454
+ version: "21.0.0",
2471
2455
  type: CdkConnectedOverlay,
2472
2456
  isStandalone: true,
2473
2457
  selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
@@ -2513,7 +2497,7 @@ class CdkConnectedOverlay {
2513
2497
  }
2514
2498
  i0.ɵɵngDeclareClassMetadata({
2515
2499
  minVersion: "12.0.0",
2516
- version: "20.2.0-next.2",
2500
+ version: "21.0.0",
2517
2501
  ngImport: i0,
2518
2502
  type: CdkConnectedOverlay,
2519
2503
  decorators: [{
@@ -2672,7 +2656,7 @@ i0.ɵɵngDeclareClassMetadata({
2672
2656
  class OverlayModule {
2673
2657
  static ɵfac = i0.ɵɵngDeclareFactory({
2674
2658
  minVersion: "12.0.0",
2675
- version: "20.2.0-next.2",
2659
+ version: "21.0.0",
2676
2660
  ngImport: i0,
2677
2661
  type: OverlayModule,
2678
2662
  deps: [],
@@ -2680,7 +2664,7 @@ class OverlayModule {
2680
2664
  });
2681
2665
  static ɵmod = i0.ɵɵngDeclareNgModule({
2682
2666
  minVersion: "14.0.0",
2683
- version: "20.2.0-next.2",
2667
+ version: "21.0.0",
2684
2668
  ngImport: i0,
2685
2669
  type: OverlayModule,
2686
2670
  imports: [BidiModule, PortalModule, ScrollingModule, CdkConnectedOverlay, CdkOverlayOrigin],
@@ -2688,7 +2672,7 @@ class OverlayModule {
2688
2672
  });
2689
2673
  static ɵinj = i0.ɵɵngDeclareInjector({
2690
2674
  minVersion: "12.0.0",
2691
- version: "20.2.0-next.2",
2675
+ version: "21.0.0",
2692
2676
  ngImport: i0,
2693
2677
  type: OverlayModule,
2694
2678
  providers: [Overlay],
@@ -2697,7 +2681,7 @@ class OverlayModule {
2697
2681
  }
2698
2682
  i0.ɵɵngDeclareClassMetadata({
2699
2683
  minVersion: "12.0.0",
2700
- version: "20.2.0-next.2",
2684
+ version: "21.0.0",
2701
2685
  ngImport: i0,
2702
2686
  type: OverlayModule,
2703
2687
  decorators: [{