@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.
Files changed (124) hide show
  1. package/_adev_assets/cdk_drag_drop.json +13 -12
  2. package/_adev_assets/cdk_testing.json +15 -25
  3. package/_adev_assets/cdk_testing_protractor.json +1 -1
  4. package/_adev_assets/cdk_testing_selenium_webdriver.json +1 -1
  5. package/_adev_assets/cdk_testing_testbed.json +1 -1
  6. package/fesm2022/_a11y-module-chunk.mjs +755 -869
  7. package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
  8. package/fesm2022/_activedescendant-key-manager-chunk.mjs +8 -8
  9. package/fesm2022/_activedescendant-key-manager-chunk.mjs.map +1 -1
  10. package/fesm2022/_array-chunk.mjs +1 -1
  11. package/fesm2022/_array-chunk.mjs.map +1 -1
  12. package/fesm2022/_breakpoints-observer-chunk.mjs +149 -152
  13. package/fesm2022/_breakpoints-observer-chunk.mjs.map +1 -1
  14. package/fesm2022/_css-pixel-value-chunk.mjs +4 -5
  15. package/fesm2022/_css-pixel-value-chunk.mjs.map +1 -1
  16. package/fesm2022/_data-source-chunk.mjs +2 -8
  17. package/fesm2022/_data-source-chunk.mjs.map +1 -1
  18. package/fesm2022/_directionality-chunk.mjs +54 -54
  19. package/fesm2022/_directionality-chunk.mjs.map +1 -1
  20. package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs +25 -36
  21. package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs.map +1 -1
  22. package/fesm2022/_element-chunk.mjs +6 -17
  23. package/fesm2022/_element-chunk.mjs.map +1 -1
  24. package/fesm2022/_fake-event-detection-chunk.mjs +3 -17
  25. package/fesm2022/_fake-event-detection-chunk.mjs.map +1 -1
  26. package/fesm2022/_focus-key-manager-chunk.mjs +10 -14
  27. package/fesm2022/_focus-key-manager-chunk.mjs.map +1 -1
  28. package/fesm2022/_focus-monitor-chunk.mjs +376 -566
  29. package/fesm2022/_focus-monitor-chunk.mjs.map +1 -1
  30. package/fesm2022/_id-generator-chunk.mjs +36 -27
  31. package/fesm2022/_id-generator-chunk.mjs.map +1 -1
  32. package/fesm2022/_keycodes-chunk.mjs +9 -9
  33. package/fesm2022/_keycodes-chunk.mjs.map +1 -1
  34. package/fesm2022/_list-key-manager-chunk.mjs +248 -336
  35. package/fesm2022/_list-key-manager-chunk.mjs.map +1 -1
  36. package/fesm2022/_overlay-module-chunk.mjs +2534 -2948
  37. package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
  38. package/fesm2022/_passive-listeners-chunk.mjs +10 -22
  39. package/fesm2022/_passive-listeners-chunk.mjs.map +1 -1
  40. package/fesm2022/_platform-chunk.mjs +42 -65
  41. package/fesm2022/_platform-chunk.mjs.map +1 -1
  42. package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs +78 -134
  43. package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs.map +1 -1
  44. package/fesm2022/_scrolling-chunk.mjs +44 -85
  45. package/fesm2022/_scrolling-chunk.mjs.map +1 -1
  46. package/fesm2022/_selection-model-chunk.mjs +138 -209
  47. package/fesm2022/_selection-model-chunk.mjs.map +1 -1
  48. package/fesm2022/_shadow-dom-chunk.mjs +21 -35
  49. package/fesm2022/_shadow-dom-chunk.mjs.map +1 -1
  50. package/fesm2022/_style-loader-chunk.mjs +50 -37
  51. package/fesm2022/_style-loader-chunk.mjs.map +1 -1
  52. package/fesm2022/_test-environment-chunk.mjs +2 -14
  53. package/fesm2022/_test-environment-chunk.mjs.map +1 -1
  54. package/fesm2022/_tree-key-manager-chunk.mjs +229 -308
  55. package/fesm2022/_tree-key-manager-chunk.mjs.map +1 -1
  56. package/fesm2022/_typeahead-chunk.mjs +52 -74
  57. package/fesm2022/_typeahead-chunk.mjs.map +1 -1
  58. package/fesm2022/_unique-selection-dispatcher-chunk.mjs +43 -40
  59. package/fesm2022/_unique-selection-dispatcher-chunk.mjs.map +1 -1
  60. package/fesm2022/a11y.mjs +351 -449
  61. package/fesm2022/a11y.mjs.map +1 -1
  62. package/fesm2022/accordion.mjs +254 -192
  63. package/fesm2022/accordion.mjs.map +1 -1
  64. package/fesm2022/bidi.mjs +121 -64
  65. package/fesm2022/bidi.mjs.map +1 -1
  66. package/fesm2022/cdk.mjs +1 -2
  67. package/fesm2022/cdk.mjs.map +1 -1
  68. package/fesm2022/clipboard.mjs +208 -186
  69. package/fesm2022/clipboard.mjs.map +1 -1
  70. package/fesm2022/coercion-private.mjs +4 -8
  71. package/fesm2022/coercion-private.mjs.map +1 -1
  72. package/fesm2022/coercion.mjs +11 -29
  73. package/fesm2022/coercion.mjs.map +1 -1
  74. package/fesm2022/dialog.mjs +660 -808
  75. package/fesm2022/dialog.mjs.map +1 -1
  76. package/fesm2022/drag-drop.mjs +3347 -4286
  77. package/fesm2022/drag-drop.mjs.map +1 -1
  78. package/fesm2022/keycodes.mjs +4 -8
  79. package/fesm2022/keycodes.mjs.map +1 -1
  80. package/fesm2022/layout.mjs +44 -26
  81. package/fesm2022/layout.mjs.map +1 -1
  82. package/fesm2022/listbox.mjs +841 -895
  83. package/fesm2022/listbox.mjs.map +1 -1
  84. package/fesm2022/menu.mjs +1942 -1858
  85. package/fesm2022/menu.mjs.map +1 -1
  86. package/fesm2022/observers-private.mjs +88 -106
  87. package/fesm2022/observers-private.mjs.map +1 -1
  88. package/fesm2022/observers.mjs +262 -184
  89. package/fesm2022/observers.mjs.map +1 -1
  90. package/fesm2022/overlay.mjs +72 -68
  91. package/fesm2022/overlay.mjs.map +1 -1
  92. package/fesm2022/platform.mjs +43 -54
  93. package/fesm2022/platform.mjs.map +1 -1
  94. package/fesm2022/portal.mjs +402 -560
  95. package/fesm2022/portal.mjs.map +1 -1
  96. package/fesm2022/private.mjs +38 -10
  97. package/fesm2022/private.mjs.map +1 -1
  98. package/fesm2022/scrolling.mjs +1323 -1400
  99. package/fesm2022/scrolling.mjs.map +1 -1
  100. package/fesm2022/stepper.mjs +758 -590
  101. package/fesm2022/stepper.mjs.map +1 -1
  102. package/fesm2022/table.mjs +2327 -2319
  103. package/fesm2022/table.mjs.map +1 -1
  104. package/fesm2022/testing-selenium-webdriver.mjs +252 -325
  105. package/fesm2022/testing-selenium-webdriver.mjs.map +1 -1
  106. package/fesm2022/testing-testbed.mjs +592 -709
  107. package/fesm2022/testing-testbed.mjs.map +1 -1
  108. package/fesm2022/testing.mjs +368 -889
  109. package/fesm2022/testing.mjs.map +1 -1
  110. package/fesm2022/text-field.mjs +459 -388
  111. package/fesm2022/text-field.mjs.map +1 -1
  112. package/fesm2022/tree.mjs +1483 -1731
  113. package/fesm2022/tree.mjs.map +1 -1
  114. package/overlay/_index.scss +28 -0
  115. package/overlay-prebuilt.css +1 -1
  116. package/package.json +1 -1
  117. package/schematics/ng-add/index.js +1 -1
  118. package/types/_harness-environment-chunk.d.ts +1 -2
  119. package/types/_overlay-module-chunk.d.ts +59 -7
  120. package/types/_portal-directives-chunk.d.ts +2 -18
  121. package/types/accordion.d.ts +3 -1
  122. package/types/dialog.d.ts +1 -1
  123. package/types/overlay.d.ts +6 -2
  124. package/types/portal.d.ts +1 -1
package/fesm2022/bidi.mjs CHANGED
@@ -3,76 +3,133 @@ export { DIR_DOCUMENT } from './_directionality-chunk.mjs';
3
3
  import * as i0 from '@angular/core';
4
4
  import { EventEmitter, signal, Directive, Output, Input, NgModule } from '@angular/core';
5
5
 
6
- /**
7
- * Directive to listen for changes of direction of part of the DOM.
8
- *
9
- * Provides itself as Directionality such that descendant directives only need to ever inject
10
- * Directionality to get the closest direction.
11
- */
12
6
  class Dir {
13
- /** Whether the `value` has been set to its initial value. */
14
- _isInitialized = false;
15
- /** Direction as passed in by the consumer. */
16
- _rawDir;
17
- /** Event emitted when the direction changes. */
18
- change = new EventEmitter();
19
- /** @docs-private */
20
- get dir() {
21
- return this.valueSignal();
7
+ _isInitialized = false;
8
+ _rawDir;
9
+ change = new EventEmitter();
10
+ get dir() {
11
+ return this.valueSignal();
12
+ }
13
+ set dir(value) {
14
+ const previousValue = this.valueSignal();
15
+ this.valueSignal.set(_resolveDirectionality(value));
16
+ this._rawDir = value;
17
+ if (previousValue !== this.valueSignal() && this._isInitialized) {
18
+ this.change.emit(this.valueSignal());
22
19
  }
23
- set dir(value) {
24
- const previousValue = this.valueSignal();
25
- // Note: `_resolveDirectionality` resolves the language based on the browser's language,
26
- // whereas the browser does it based on the content of the element. Since doing so based
27
- // on the content can be expensive, for now we're doing the simpler matching.
28
- this.valueSignal.set(_resolveDirectionality(value));
29
- this._rawDir = value;
30
- if (previousValue !== this.valueSignal() && this._isInitialized) {
31
- this.change.emit(this.valueSignal());
32
- }
33
- }
34
- /** Current layout direction of the element. */
35
- get value() {
36
- return this.dir;
37
- }
38
- valueSignal = signal('ltr', ...(ngDevMode ? [{ debugName: "valueSignal" }] : []));
39
- /** Initialize once default value has been set. */
40
- ngAfterContentInit() {
41
- this._isInitialized = true;
42
- }
43
- ngOnDestroy() {
44
- this.change.complete();
45
- }
46
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: Dir, deps: [], target: i0.ɵɵFactoryTarget.Directive });
47
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: Dir, isStandalone: true, selector: "[dir]", inputs: { dir: "dir" }, outputs: { change: "dirChange" }, host: { properties: { "attr.dir": "_rawDir" } }, providers: [{ provide: Directionality, useExisting: Dir }], exportAs: ["dir"], ngImport: i0 });
20
+ }
21
+ get value() {
22
+ return this.dir;
23
+ }
24
+ valueSignal = signal('ltr', ...(ngDevMode ? [{
25
+ debugName: "valueSignal"
26
+ }] : []));
27
+ ngAfterContentInit() {
28
+ this._isInitialized = true;
29
+ }
30
+ ngOnDestroy() {
31
+ this.change.complete();
32
+ }
33
+ static ɵfac = i0.ɵɵngDeclareFactory({
34
+ minVersion: "12.0.0",
35
+ version: "20.2.0-next.2",
36
+ ngImport: i0,
37
+ type: Dir,
38
+ deps: [],
39
+ target: i0.ɵɵFactoryTarget.Directive
40
+ });
41
+ static ɵdir = i0.ɵɵngDeclareDirective({
42
+ minVersion: "14.0.0",
43
+ version: "20.2.0-next.2",
44
+ type: Dir,
45
+ isStandalone: true,
46
+ selector: "[dir]",
47
+ inputs: {
48
+ dir: "dir"
49
+ },
50
+ outputs: {
51
+ change: "dirChange"
52
+ },
53
+ host: {
54
+ properties: {
55
+ "attr.dir": "_rawDir"
56
+ }
57
+ },
58
+ providers: [{
59
+ provide: Directionality,
60
+ useExisting: Dir
61
+ }],
62
+ exportAs: ["dir"],
63
+ ngImport: i0
64
+ });
48
65
  }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: Dir, decorators: [{
50
- type: Directive,
51
- args: [{
52
- selector: '[dir]',
53
- providers: [{ provide: Directionality, useExisting: Dir }],
54
- host: { '[attr.dir]': '_rawDir' },
55
- exportAs: 'dir',
56
- }]
57
- }], propDecorators: { change: [{
58
- type: Output,
59
- args: ['dirChange']
60
- }], dir: [{
61
- type: Input
62
- }] } });
66
+ i0.ɵɵngDeclareClassMetadata({
67
+ minVersion: "12.0.0",
68
+ version: "20.2.0-next.2",
69
+ ngImport: i0,
70
+ type: Dir,
71
+ decorators: [{
72
+ type: Directive,
73
+ args: [{
74
+ selector: '[dir]',
75
+ providers: [{
76
+ provide: Directionality,
77
+ useExisting: Dir
78
+ }],
79
+ host: {
80
+ '[attr.dir]': '_rawDir'
81
+ },
82
+ exportAs: 'dir'
83
+ }]
84
+ }],
85
+ propDecorators: {
86
+ change: [{
87
+ type: Output,
88
+ args: ['dirChange']
89
+ }],
90
+ dir: [{
91
+ type: Input
92
+ }]
93
+ }
94
+ });
63
95
 
64
96
  class BidiModule {
65
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: BidiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
66
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: BidiModule, imports: [Dir], exports: [Dir] });
67
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: BidiModule });
97
+ static ɵfac = i0.ɵɵngDeclareFactory({
98
+ minVersion: "12.0.0",
99
+ version: "20.2.0-next.2",
100
+ ngImport: i0,
101
+ type: BidiModule,
102
+ deps: [],
103
+ target: i0.ɵɵFactoryTarget.NgModule
104
+ });
105
+ static ɵmod = i0.ɵɵngDeclareNgModule({
106
+ minVersion: "14.0.0",
107
+ version: "20.2.0-next.2",
108
+ ngImport: i0,
109
+ type: BidiModule,
110
+ imports: [Dir],
111
+ exports: [Dir]
112
+ });
113
+ static ɵinj = i0.ɵɵngDeclareInjector({
114
+ minVersion: "12.0.0",
115
+ version: "20.2.0-next.2",
116
+ ngImport: i0,
117
+ type: BidiModule
118
+ });
68
119
  }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: BidiModule, decorators: [{
70
- type: NgModule,
71
- args: [{
72
- imports: [Dir],
73
- exports: [Dir],
74
- }]
75
- }] });
120
+ i0.ɵɵngDeclareClassMetadata({
121
+ minVersion: "12.0.0",
122
+ version: "20.2.0-next.2",
123
+ ngImport: i0,
124
+ type: BidiModule,
125
+ decorators: [{
126
+ type: NgModule,
127
+ args: [{
128
+ imports: [Dir],
129
+ exports: [Dir]
130
+ }]
131
+ }]
132
+ });
76
133
 
77
134
  export { BidiModule, Dir, Directionality };
78
135
  //# sourceMappingURL=bidi.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bidi.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/bidi/dir.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/bidi/bidi-module.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 AfterContentInit,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n signal,\n} from '@angular/core';\n\nimport {Direction, Directionality, _resolveDirectionality} from './directionality';\n\n/**\n * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\n@Directive({\n selector: '[dir]',\n providers: [{provide: Directionality, useExisting: Dir}],\n host: {'[attr.dir]': '_rawDir'},\n exportAs: 'dir',\n})\nexport class Dir implements Directionality, AfterContentInit, OnDestroy {\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Direction as passed in by the consumer. */\n _rawDir: string;\n\n /** Event emitted when the direction changes. */\n @Output('dirChange') readonly change = new EventEmitter<Direction>();\n\n /** @docs-private */\n @Input()\n get dir(): Direction {\n return this.valueSignal();\n }\n set dir(value: Direction | 'auto') {\n const previousValue = this.valueSignal();\n\n // Note: `_resolveDirectionality` resolves the language based on the browser's language,\n // whereas the browser does it based on the content of the element. Since doing so based\n // on the content can be expensive, for now we're doing the simpler matching.\n this.valueSignal.set(_resolveDirectionality(value));\n this._rawDir = value;\n\n if (previousValue !== this.valueSignal() && this._isInitialized) {\n this.change.emit(this.valueSignal());\n }\n }\n\n /** Current layout direction of the element. */\n get value(): Direction {\n return this.dir;\n }\n\n readonly valueSignal = signal<Direction>('ltr');\n\n /** Initialize once default value has been set. */\n ngAfterContentInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n this.change.complete();\n }\n}\n","/**\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 {NgModule} from '@angular/core';\nimport {Dir} from './dir';\n\n@NgModule({\n imports: [Dir],\n exports: [Dir],\n})\nexport class BidiModule {}\n"],"names":[],"mappings":";;;;;AAoBA;;;;;AAKG;MAOU,GAAG,CAAA;;IAEN,cAAc,GAAY,KAAK;;AAGvC,IAAA,OAAO;;AAGuB,IAAA,MAAM,GAAG,IAAI,YAAY,EAAa;;AAGpE,IAAA,IACI,GAAG,GAAA;AACL,QAAA,OAAO,IAAI,CAAC,WAAW,EAAE;;IAE3B,IAAI,GAAG,CAAC,KAAyB,EAAA;AAC/B,QAAA,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,EAAE;;;;QAKxC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;AACnD,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;QAEpB,IAAI,aAAa,KAAK,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE;YAC/D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;;;;AAKxC,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,GAAG;;AAGR,IAAA,WAAW,GAAG,MAAM,CAAY,KAAK,uDAAC;;IAG/C,kBAAkB,GAAA;AAChB,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;IAG5B,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;;8GA1Cb,GAAG,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;kGAAH,GAAG,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,OAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,KAAA,EAAA,EAAA,OAAA,EAAA,EAAA,MAAA,EAAA,WAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,SAAA,EAAA,EAAA,EAAA,SAAA,EAJH,CAAC,EAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,GAAG,EAAC,CAAC,EAAA,QAAA,EAAA,CAAA,KAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;kGAI7C,GAAG,EAAA,UAAA,EAAA,CAAA;kBANf,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,OAAO;oBACjB,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAK,GAAA,EAAC,CAAC;AACxD,oBAAA,IAAI,EAAE,EAAC,YAAY,EAAE,SAAS,EAAC;AAC/B,oBAAA,QAAQ,EAAE,KAAK;AAChB,iBAAA;8BAS+B,MAAM,EAAA,CAAA;sBAAnC,MAAM;uBAAC,WAAW;gBAIf,GAAG,EAAA,CAAA;sBADN;;;MC5BU,UAAU,CAAA;8GAAV,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;+GAAV,UAAU,EAAA,OAAA,EAAA,CAHX,GAAG,CAAA,EAAA,OAAA,EAAA,CACH,GAAG,CAAA,EAAA,CAAA;+GAEF,UAAU,EAAA,CAAA;;kGAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,GAAG,CAAC;oBACd,OAAO,EAAE,CAAC,GAAG,CAAC;AACf,iBAAA;;;;;"}
1
+ {"version":3,"file":"bidi.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/bidi/dir.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/bidi/bidi-module.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 AfterContentInit,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n signal,\n} from '@angular/core';\n\nimport {Direction, Directionality, _resolveDirectionality} from './directionality';\n\n/**\n * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\n@Directive({\n selector: '[dir]',\n providers: [{provide: Directionality, useExisting: Dir}],\n host: {'[attr.dir]': '_rawDir'},\n exportAs: 'dir',\n})\nexport class Dir implements Directionality, AfterContentInit, OnDestroy {\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Direction as passed in by the consumer. */\n _rawDir: string;\n\n /** Event emitted when the direction changes. */\n @Output('dirChange') readonly change = new EventEmitter<Direction>();\n\n /** @docs-private */\n @Input()\n get dir(): Direction {\n return this.valueSignal();\n }\n set dir(value: Direction | 'auto') {\n const previousValue = this.valueSignal();\n\n // Note: `_resolveDirectionality` resolves the language based on the browser's language,\n // whereas the browser does it based on the content of the element. Since doing so based\n // on the content can be expensive, for now we're doing the simpler matching.\n this.valueSignal.set(_resolveDirectionality(value));\n this._rawDir = value;\n\n if (previousValue !== this.valueSignal() && this._isInitialized) {\n this.change.emit(this.valueSignal());\n }\n }\n\n /** Current layout direction of the element. */\n get value(): Direction {\n return this.dir;\n }\n\n readonly valueSignal = signal<Direction>('ltr');\n\n /** Initialize once default value has been set. */\n ngAfterContentInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n this.change.complete();\n }\n}\n","/**\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 {NgModule} from '@angular/core';\nimport {Dir} from './dir';\n\n@NgModule({\n imports: [Dir],\n exports: [Dir],\n})\nexport class BidiModule {}\n"],"names":["valueSignal","dir","value","_isInitialized","change","emit","ngDevMode","debugName","Output","minVersion","version","ngImport","i0","type","BidiModule","decorators"],"mappings":";;;;;;;;;;AAgEE,IAAA,OAAA,IAAA,CAAAA,WAAA,EAAA;;SAKkBC,CAAAC,KAAA,EAAA;;;;qBA3CV,KAAA,IAAA,CAAAF,WAAA,EAAA,IAAA,IAAA,CAAAG,cAAA,EAAA;MAAC,IAAA,CAAAC,MAAA,CAAAC,IAAA,KAAA,CAAAL,WAAA,EAAA,CAAA;;;AAKVE,EAAAA,IAAAA,KAAAA,GAAA;;;sBAaQ,CAAA,KAAA,EAAAI,IAAAA,SAAA,GAAA,CAAA;IAAAC,SAAA,EAAA;AAAA,GAAA,CAAA,GAAA,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAUL,EAAA;IAAAH,MAAA,EAAA,CAAA;AAAA,MAAA,IAAA,EAAAI,MAAA;YAEI,CAAA,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BC7CC,CAAA;EAAAC,UAAA,EAAA,QAAA;EAAAC,OAAA,EAAA,eAAA;AAAAC,EAAAA,QAAA,EAAAC,EAAA;AAAAC,EAAAA,IAAA,EAAAC,UAAA;EAAAC,UAAA,EAAA,CAAA;;;;;;;;;;;"}
package/fesm2022/cdk.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import { Version } from '@angular/core';
2
2
 
3
- /** Current version of the Angular Component Development Kit. */
4
- const VERSION = new Version('21.0.0-next.8');
3
+ const VERSION = new Version('21.0.0-rc.0');
5
4
 
6
5
  export { VERSION };
7
6
  //# sourceMappingURL=cdk.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/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('21.0.0-next.8');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
1
+ {"version":3,"file":"cdk.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,210 +1,232 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, DOCUMENT, Injectable, InjectionToken, NgZone, EventEmitter, Directive, Input, Output, NgModule } from '@angular/core';
3
3
 
4
- /**
5
- * A pending copy-to-clipboard operation.
6
- *
7
- * The implementation of copying text to the clipboard modifies the DOM and
8
- * forces a re-layout. This re-layout can take too long if the string is large,
9
- * causing the execCommand('copy') to happen too long after the user clicked.
10
- * This results in the browser refusing to copy. This object lets the
11
- * re-layout happen in a separate tick from copying by providing a copy function
12
- * that can be called later.
13
- *
14
- * Destroy must be called when no longer in use, regardless of whether `copy` is
15
- * called.
16
- */
17
4
  class PendingCopy {
18
- _document;
19
- _textarea;
20
- constructor(text, _document) {
21
- this._document = _document;
22
- const textarea = (this._textarea = this._document.createElement('textarea'));
23
- const styles = textarea.style;
24
- // Hide the element for display and accessibility. Set a fixed position so the page layout
25
- // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea
26
- // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.
27
- styles.position = 'fixed';
28
- styles.top = styles.opacity = '0';
29
- styles.left = '-999em';
30
- textarea.setAttribute('aria-hidden', 'true');
31
- textarea.value = text;
32
- // Making the textarea `readonly` prevents the screen from jumping on iOS Safari (see #25169).
33
- textarea.readOnly = true;
34
- // The element needs to be inserted into the fullscreen container, if the page
35
- // is in fullscreen mode, otherwise the browser won't execute the copy command.
36
- (this._document.fullscreenElement || this._document.body).appendChild(textarea);
37
- }
38
- /** Finishes copying the text. */
39
- copy() {
40
- const textarea = this._textarea;
41
- let successful = false;
42
- try {
43
- // Older browsers could throw if copy is not supported.
44
- if (textarea) {
45
- const currentFocus = this._document.activeElement;
46
- textarea.select();
47
- textarea.setSelectionRange(0, textarea.value.length);
48
- successful = this._document.execCommand('copy');
49
- if (currentFocus) {
50
- currentFocus.focus();
51
- }
52
- }
53
- }
54
- catch {
55
- // Discard error.
56
- // Initial setting of {@code successful} will represent failure here.
57
- }
58
- return successful;
59
- }
60
- /** Cleans up DOM changes used to perform the copy operation. */
61
- destroy() {
62
- const textarea = this._textarea;
63
- if (textarea) {
64
- textarea.remove();
65
- this._textarea = undefined;
5
+ _document;
6
+ _textarea;
7
+ constructor(text, _document) {
8
+ this._document = _document;
9
+ const textarea = this._textarea = this._document.createElement('textarea');
10
+ const styles = textarea.style;
11
+ styles.position = 'fixed';
12
+ styles.top = styles.opacity = '0';
13
+ styles.left = '-999em';
14
+ textarea.setAttribute('aria-hidden', 'true');
15
+ textarea.value = text;
16
+ textarea.readOnly = true;
17
+ (this._document.fullscreenElement || this._document.body).appendChild(textarea);
18
+ }
19
+ copy() {
20
+ const textarea = this._textarea;
21
+ let successful = false;
22
+ try {
23
+ if (textarea) {
24
+ const currentFocus = this._document.activeElement;
25
+ textarea.select();
26
+ textarea.setSelectionRange(0, textarea.value.length);
27
+ successful = this._document.execCommand('copy');
28
+ if (currentFocus) {
29
+ currentFocus.focus();
66
30
  }
31
+ }
32
+ } catch {}
33
+ return successful;
34
+ }
35
+ destroy() {
36
+ const textarea = this._textarea;
37
+ if (textarea) {
38
+ textarea.remove();
39
+ this._textarea = undefined;
67
40
  }
41
+ }
68
42
  }
69
43
 
70
- /**
71
- * A service for copying text to the clipboard.
72
- */
73
44
  class Clipboard {
74
- _document = inject(DOCUMENT);
75
- constructor() { }
76
- /**
77
- * Copies the provided text into the user's clipboard.
78
- *
79
- * @param text The string to copy.
80
- * @returns Whether the operation was successful.
81
- */
82
- copy(text) {
83
- const pendingCopy = this.beginCopy(text);
84
- const successful = pendingCopy.copy();
85
- pendingCopy.destroy();
86
- return successful;
87
- }
88
- /**
89
- * Prepares a string to be copied later. This is useful for large strings
90
- * which take too long to successfully render and be copied in the same tick.
91
- *
92
- * The caller must call `destroy` on the returned `PendingCopy`.
93
- *
94
- * @param text The string to copy.
95
- * @returns the pending copy operation.
96
- */
97
- beginCopy(text) {
98
- return new PendingCopy(text, this._document);
99
- }
100
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: Clipboard, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
101
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: Clipboard, providedIn: 'root' });
45
+ _document = inject(DOCUMENT);
46
+ constructor() {}
47
+ copy(text) {
48
+ const pendingCopy = this.beginCopy(text);
49
+ const successful = pendingCopy.copy();
50
+ pendingCopy.destroy();
51
+ return successful;
52
+ }
53
+ beginCopy(text) {
54
+ return new PendingCopy(text, this._document);
55
+ }
56
+ static ɵfac = i0.ɵɵngDeclareFactory({
57
+ minVersion: "12.0.0",
58
+ version: "20.2.0-next.2",
59
+ ngImport: i0,
60
+ type: Clipboard,
61
+ deps: [],
62
+ target: i0.ɵɵFactoryTarget.Injectable
63
+ });
64
+ static ɵprov = i0.ɵɵngDeclareInjectable({
65
+ minVersion: "12.0.0",
66
+ version: "20.2.0-next.2",
67
+ ngImport: i0,
68
+ type: Clipboard,
69
+ providedIn: 'root'
70
+ });
102
71
  }
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: Clipboard, decorators: [{
104
- type: Injectable,
105
- args: [{ providedIn: 'root' }]
106
- }], ctorParameters: () => [] });
72
+ i0.ɵɵngDeclareClassMetadata({
73
+ minVersion: "12.0.0",
74
+ version: "20.2.0-next.2",
75
+ ngImport: i0,
76
+ type: Clipboard,
77
+ decorators: [{
78
+ type: Injectable,
79
+ args: [{
80
+ providedIn: 'root'
81
+ }]
82
+ }],
83
+ ctorParameters: () => []
84
+ });
107
85
 
108
- /** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */
109
86
  const CDK_COPY_TO_CLIPBOARD_CONFIG = new InjectionToken('CDK_COPY_TO_CLIPBOARD_CONFIG');
110
- /**
111
- * Provides behavior for a button that when clicked copies content into user's
112
- * clipboard.
113
- */
114
87
  class CdkCopyToClipboard {
115
- _clipboard = inject(Clipboard);
116
- _ngZone = inject(NgZone);
117
- /** Content to be copied. */
118
- text = '';
119
- /**
120
- * How many times to attempt to copy the text. This may be necessary for longer text, because
121
- * the browser needs time to fill an intermediate textarea element and copy the content.
122
- */
123
- attempts = 1;
124
- /**
125
- * Emits when some text is copied to the clipboard. The
126
- * emitted value indicates whether copying was successful.
127
- */
128
- copied = new EventEmitter();
129
- /** Copies that are currently being attempted. */
130
- _pending = new Set();
131
- /** Whether the directive has been destroyed. */
132
- _destroyed;
133
- /** Timeout for the current copy attempt. */
134
- _currentTimeout;
135
- constructor() {
136
- const config = inject(CDK_COPY_TO_CLIPBOARD_CONFIG, { optional: true });
137
- if (config && config.attempts != null) {
138
- this.attempts = config.attempts;
139
- }
88
+ _clipboard = inject(Clipboard);
89
+ _ngZone = inject(NgZone);
90
+ text = '';
91
+ attempts = 1;
92
+ copied = new EventEmitter();
93
+ _pending = new Set();
94
+ _destroyed;
95
+ _currentTimeout;
96
+ constructor() {
97
+ const config = inject(CDK_COPY_TO_CLIPBOARD_CONFIG, {
98
+ optional: true
99
+ });
100
+ if (config && config.attempts != null) {
101
+ this.attempts = config.attempts;
140
102
  }
141
- /** Copies the current text to the clipboard. */
142
- copy(attempts = this.attempts) {
143
- if (attempts > 1) {
144
- let remainingAttempts = attempts;
145
- const pending = this._clipboard.beginCopy(this.text);
146
- this._pending.add(pending);
147
- const attempt = () => {
148
- const successful = pending.copy();
149
- if (!successful && --remainingAttempts && !this._destroyed) {
150
- // We use 1 for the timeout since it's more predictable when flushing in unit tests.
151
- this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));
152
- }
153
- else {
154
- this._currentTimeout = null;
155
- this._pending.delete(pending);
156
- pending.destroy();
157
- this.copied.emit(successful);
158
- }
159
- };
160
- attempt();
161
- }
162
- else {
163
- this.copied.emit(this._clipboard.copy(this.text));
103
+ }
104
+ copy(attempts = this.attempts) {
105
+ if (attempts > 1) {
106
+ let remainingAttempts = attempts;
107
+ const pending = this._clipboard.beginCopy(this.text);
108
+ this._pending.add(pending);
109
+ const attempt = () => {
110
+ const successful = pending.copy();
111
+ if (!successful && --remainingAttempts && !this._destroyed) {
112
+ this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));
113
+ } else {
114
+ this._currentTimeout = null;
115
+ this._pending.delete(pending);
116
+ pending.destroy();
117
+ this.copied.emit(successful);
164
118
  }
119
+ };
120
+ attempt();
121
+ } else {
122
+ this.copied.emit(this._clipboard.copy(this.text));
165
123
  }
166
- ngOnDestroy() {
167
- if (this._currentTimeout) {
168
- clearTimeout(this._currentTimeout);
169
- }
170
- this._pending.forEach(copy => copy.destroy());
171
- this._pending.clear();
172
- this._destroyed = true;
124
+ }
125
+ ngOnDestroy() {
126
+ if (this._currentTimeout) {
127
+ clearTimeout(this._currentTimeout);
173
128
  }
174
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkCopyToClipboard, deps: [], target: i0.ɵɵFactoryTarget.Directive });
175
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkCopyToClipboard, isStandalone: true, selector: "[cdkCopyToClipboard]", inputs: { text: ["cdkCopyToClipboard", "text"], attempts: ["cdkCopyToClipboardAttempts", "attempts"] }, outputs: { copied: "cdkCopyToClipboardCopied" }, host: { listeners: { "click": "copy()" } }, ngImport: i0 });
129
+ this._pending.forEach(copy => copy.destroy());
130
+ this._pending.clear();
131
+ this._destroyed = true;
132
+ }
133
+ static ɵfac = i0.ɵɵngDeclareFactory({
134
+ minVersion: "12.0.0",
135
+ version: "20.2.0-next.2",
136
+ ngImport: i0,
137
+ type: CdkCopyToClipboard,
138
+ deps: [],
139
+ target: i0.ɵɵFactoryTarget.Directive
140
+ });
141
+ static ɵdir = i0.ɵɵngDeclareDirective({
142
+ minVersion: "14.0.0",
143
+ version: "20.2.0-next.2",
144
+ type: CdkCopyToClipboard,
145
+ isStandalone: true,
146
+ selector: "[cdkCopyToClipboard]",
147
+ inputs: {
148
+ text: ["cdkCopyToClipboard", "text"],
149
+ attempts: ["cdkCopyToClipboardAttempts", "attempts"]
150
+ },
151
+ outputs: {
152
+ copied: "cdkCopyToClipboardCopied"
153
+ },
154
+ host: {
155
+ listeners: {
156
+ "click": "copy()"
157
+ }
158
+ },
159
+ ngImport: i0
160
+ });
176
161
  }
177
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkCopyToClipboard, decorators: [{
178
- type: Directive,
179
- args: [{
180
- selector: '[cdkCopyToClipboard]',
181
- host: {
182
- '(click)': 'copy()',
183
- },
184
- }]
185
- }], ctorParameters: () => [], propDecorators: { text: [{
186
- type: Input,
187
- args: ['cdkCopyToClipboard']
188
- }], attempts: [{
189
- type: Input,
190
- args: ['cdkCopyToClipboardAttempts']
191
- }], copied: [{
192
- type: Output,
193
- args: ['cdkCopyToClipboardCopied']
194
- }] } });
162
+ i0.ɵɵngDeclareClassMetadata({
163
+ minVersion: "12.0.0",
164
+ version: "20.2.0-next.2",
165
+ ngImport: i0,
166
+ type: CdkCopyToClipboard,
167
+ decorators: [{
168
+ type: Directive,
169
+ args: [{
170
+ selector: '[cdkCopyToClipboard]',
171
+ host: {
172
+ '(click)': 'copy()'
173
+ }
174
+ }]
175
+ }],
176
+ ctorParameters: () => [],
177
+ propDecorators: {
178
+ text: [{
179
+ type: Input,
180
+ args: ['cdkCopyToClipboard']
181
+ }],
182
+ attempts: [{
183
+ type: Input,
184
+ args: ['cdkCopyToClipboardAttempts']
185
+ }],
186
+ copied: [{
187
+ type: Output,
188
+ args: ['cdkCopyToClipboardCopied']
189
+ }]
190
+ }
191
+ });
195
192
 
196
193
  class ClipboardModule {
197
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ClipboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
198
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: ClipboardModule, imports: [CdkCopyToClipboard], exports: [CdkCopyToClipboard] });
199
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ClipboardModule });
194
+ static ɵfac = i0.ɵɵngDeclareFactory({
195
+ minVersion: "12.0.0",
196
+ version: "20.2.0-next.2",
197
+ ngImport: i0,
198
+ type: ClipboardModule,
199
+ deps: [],
200
+ target: i0.ɵɵFactoryTarget.NgModule
201
+ });
202
+ static ɵmod = i0.ɵɵngDeclareNgModule({
203
+ minVersion: "14.0.0",
204
+ version: "20.2.0-next.2",
205
+ ngImport: i0,
206
+ type: ClipboardModule,
207
+ imports: [CdkCopyToClipboard],
208
+ exports: [CdkCopyToClipboard]
209
+ });
210
+ static ɵinj = i0.ɵɵngDeclareInjector({
211
+ minVersion: "12.0.0",
212
+ version: "20.2.0-next.2",
213
+ ngImport: i0,
214
+ type: ClipboardModule
215
+ });
200
216
  }
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: ClipboardModule, decorators: [{
202
- type: NgModule,
203
- args: [{
204
- imports: [CdkCopyToClipboard],
205
- exports: [CdkCopyToClipboard],
206
- }]
207
- }] });
217
+ i0.ɵɵngDeclareClassMetadata({
218
+ minVersion: "12.0.0",
219
+ version: "20.2.0-next.2",
220
+ ngImport: i0,
221
+ type: ClipboardModule,
222
+ decorators: [{
223
+ type: NgModule,
224
+ args: [{
225
+ imports: [CdkCopyToClipboard],
226
+ exports: [CdkCopyToClipboard]
227
+ }]
228
+ }]
229
+ });
208
230
 
209
231
  export { CDK_COPY_TO_CLIPBOARD_CONFIG, CdkCopyToClipboard, Clipboard, ClipboardModule, PendingCopy };
210
232
  //# sourceMappingURL=clipboard.mjs.map