@angular/cdk 21.0.0-next.9 → 21.0.0-rc.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 (124) hide show
  1. package/_adev_assets/cdk_drag_drop.json +13 -12
  2. package/_adev_assets/cdk_testing.json +9 -9
  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 +37 -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 +2535 -2947
  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 +30 -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/_overlay-module-chunk.d.ts +69 -7
  119. package/types/_portal-directives-chunk.d.ts +2 -18
  120. package/types/a11y.d.ts +3 -1
  121. package/types/accordion.d.ts +3 -1
  122. package/types/dialog.d.ts +1 -1
  123. package/types/overlay.d.ts +1 -1
  124. package/types/portal.d.ts +1 -1
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/clipboard/pending-copy.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/clipboard/clipboard.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/clipboard/copy-to-clipboard.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/clipboard/clipboard-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\n/**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a re-layout. This re-layout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * re-layout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\nexport class PendingCopy {\n private _textarea: HTMLTextAreaElement | undefined;\n\n constructor(\n text: string,\n private readonly _document: Document,\n ) {\n const textarea = (this._textarea = this._document.createElement('textarea'));\n const styles = textarea.style;\n\n // Hide the element for display and accessibility. Set a fixed position so the page layout\n // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea\n // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.\n styles.position = 'fixed';\n styles.top = styles.opacity = '0';\n styles.left = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n // Making the textarea `readonly` prevents the screen from jumping on iOS Safari (see #25169).\n textarea.readOnly = true;\n // The element needs to be inserted into the fullscreen container, if the page\n // is in fullscreen mode, otherwise the browser won't execute the copy command.\n (this._document.fullscreenElement || this._document.body).appendChild(textarea);\n }\n\n /** Finishes copying the text. */\n copy(): boolean {\n const textarea = this._textarea;\n let successful = false;\n\n try {\n // Older browsers could throw if copy is not supported.\n if (textarea) {\n const currentFocus = this._document.activeElement as HTMLOrSVGElement | null;\n\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n } catch {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n\n return successful;\n }\n\n /** Cleans up DOM changes used to perform the copy operation. */\n destroy() {\n const textarea = this._textarea;\n\n if (textarea) {\n textarea.remove();\n this._textarea = undefined;\n }\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 {Injectable, inject, DOCUMENT} from '@angular/core';\nimport {PendingCopy} from './pending-copy';\n\n/**\n * A service for copying text to the clipboard.\n */\n@Injectable({providedIn: 'root'})\nexport class Clipboard {\n private readonly _document = inject(DOCUMENT);\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n copy(text: string): boolean {\n const pendingCopy = this.beginCopy(text);\n const successful = pendingCopy.copy();\n pendingCopy.destroy();\n\n return successful;\n }\n\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n beginCopy(text: string): PendingCopy {\n return new PendingCopy(text, this._document);\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 {\n Directive,\n EventEmitter,\n Input,\n Output,\n NgZone,\n InjectionToken,\n OnDestroy,\n inject,\n} from '@angular/core';\nimport {Clipboard} from './clipboard';\nimport {PendingCopy} from './pending-copy';\n\n/** Object that can be used to configure the default options for `CdkCopyToClipboard`. */\nexport interface CdkCopyToClipboardConfig {\n /** Default number of attempts to make when copying text to the clipboard. */\n attempts?: number;\n}\n\n/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nexport const CDK_COPY_TO_CLIPBOARD_CONFIG = new InjectionToken<CdkCopyToClipboardConfig>(\n 'CDK_COPY_TO_CLIPBOARD_CONFIG',\n);\n\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\n@Directive({\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n },\n})\nexport class CdkCopyToClipboard implements OnDestroy {\n private _clipboard = inject(Clipboard);\n private _ngZone = inject(NgZone);\n\n /** Content to be copied. */\n @Input('cdkCopyToClipboard') text: string = '';\n\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n @Input('cdkCopyToClipboardAttempts') attempts: number = 1;\n\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n @Output('cdkCopyToClipboardCopied') readonly copied = new EventEmitter<boolean>();\n\n /** Copies that are currently being attempted. */\n private _pending = new Set<PendingCopy>();\n\n /** Whether the directive has been destroyed. */\n private _destroyed: boolean;\n\n /** Timeout for the current copy attempt. */\n private _currentTimeout: any;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const config = inject(CDK_COPY_TO_CLIPBOARD_CONFIG, {optional: true});\n\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n\n /** Copies the current text to the clipboard. */\n copy(attempts: number = this.attempts): void {\n if (attempts > 1) {\n let remainingAttempts = attempts;\n const pending = this._clipboard.beginCopy(this.text);\n this._pending.add(pending);\n\n const attempt = () => {\n const successful = pending.copy();\n if (!successful && --remainingAttempts && !this._destroyed) {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));\n } else {\n this._currentTimeout = null;\n this._pending.delete(pending);\n pending.destroy();\n this.copied.emit(successful);\n }\n };\n attempt();\n } else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n }\n\n ngOnDestroy() {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n\n this._pending.forEach(copy => copy.destroy());\n this._pending.clear();\n this._destroyed = true;\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';\n\nimport {CdkCopyToClipboard} from './copy-to-clipboard';\n\n@NgModule({\n imports: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\n})\nexport class ClipboardModule {}\n"],"names":[],"mappings":";;;AAQA;;;;;;;;;;;;AAYG;MACU,WAAW,CAAA;AAKH,IAAA,SAAA;AAJX,IAAA,SAAS;IAEjB,WACE,CAAA,IAAY,EACK,SAAmB,EAAA;QAAnB,IAAS,CAAA,SAAA,GAAT,SA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EAAA,OAAA,EAAA,CAHhB,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAClB,kBAAkB,CAAA,EAAA,CAAA;+GAEjB,eAAe,EAAA,CAAA;;kGAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC9B,iBAAA;;;;;"}
1
+ {"version":3,"file":"clipboard.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/clipboard/pending-copy.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/clipboard/clipboard.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/clipboard/copy-to-clipboard.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/clipboard/clipboard-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\n/**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a re-layout. This re-layout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * re-layout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\nexport class PendingCopy {\n private _textarea: HTMLTextAreaElement | undefined;\n\n constructor(\n text: string,\n private readonly _document: Document,\n ) {\n const textarea = (this._textarea = this._document.createElement('textarea'));\n const styles = textarea.style;\n\n // Hide the element for display and accessibility. Set a fixed position so the page layout\n // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea\n // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.\n styles.position = 'fixed';\n styles.top = styles.opacity = '0';\n styles.left = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n // Making the textarea `readonly` prevents the screen from jumping on iOS Safari (see #25169).\n textarea.readOnly = true;\n // The element needs to be inserted into the fullscreen container, if the page\n // is in fullscreen mode, otherwise the browser won't execute the copy command.\n (this._document.fullscreenElement || this._document.body).appendChild(textarea);\n }\n\n /** Finishes copying the text. */\n copy(): boolean {\n const textarea = this._textarea;\n let successful = false;\n\n try {\n // Older browsers could throw if copy is not supported.\n if (textarea) {\n const currentFocus = this._document.activeElement as HTMLOrSVGElement | null;\n\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n } catch {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n\n return successful;\n }\n\n /** Cleans up DOM changes used to perform the copy operation. */\n destroy() {\n const textarea = this._textarea;\n\n if (textarea) {\n textarea.remove();\n this._textarea = undefined;\n }\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 {Injectable, inject, DOCUMENT} from '@angular/core';\nimport {PendingCopy} from './pending-copy';\n\n/**\n * A service for copying text to the clipboard.\n */\n@Injectable({providedIn: 'root'})\nexport class Clipboard {\n private readonly _document = inject(DOCUMENT);\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n copy(text: string): boolean {\n const pendingCopy = this.beginCopy(text);\n const successful = pendingCopy.copy();\n pendingCopy.destroy();\n\n return successful;\n }\n\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n beginCopy(text: string): PendingCopy {\n return new PendingCopy(text, this._document);\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 {\n Directive,\n EventEmitter,\n Input,\n Output,\n NgZone,\n InjectionToken,\n OnDestroy,\n inject,\n} from '@angular/core';\nimport {Clipboard} from './clipboard';\nimport {PendingCopy} from './pending-copy';\n\n/** Object that can be used to configure the default options for `CdkCopyToClipboard`. */\nexport interface CdkCopyToClipboardConfig {\n /** Default number of attempts to make when copying text to the clipboard. */\n attempts?: number;\n}\n\n/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nexport const CDK_COPY_TO_CLIPBOARD_CONFIG = new InjectionToken<CdkCopyToClipboardConfig>(\n 'CDK_COPY_TO_CLIPBOARD_CONFIG',\n);\n\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\n@Directive({\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n },\n})\nexport class CdkCopyToClipboard implements OnDestroy {\n private _clipboard = inject(Clipboard);\n private _ngZone = inject(NgZone);\n\n /** Content to be copied. */\n @Input('cdkCopyToClipboard') text: string = '';\n\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n @Input('cdkCopyToClipboardAttempts') attempts: number = 1;\n\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n @Output('cdkCopyToClipboardCopied') readonly copied = new EventEmitter<boolean>();\n\n /** Copies that are currently being attempted. */\n private _pending = new Set<PendingCopy>();\n\n /** Whether the directive has been destroyed. */\n private _destroyed: boolean;\n\n /** Timeout for the current copy attempt. */\n private _currentTimeout: any;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const config = inject(CDK_COPY_TO_CLIPBOARD_CONFIG, {optional: true});\n\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n\n /** Copies the current text to the clipboard. */\n copy(attempts: number = this.attempts): void {\n if (attempts > 1) {\n let remainingAttempts = attempts;\n const pending = this._clipboard.beginCopy(this.text);\n this._pending.add(pending);\n\n const attempt = () => {\n const successful = pending.copy();\n if (!successful && --remainingAttempts && !this._destroyed) {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));\n } else {\n this._currentTimeout = null;\n this._pending.delete(pending);\n pending.destroy();\n this.copied.emit(successful);\n }\n };\n attempt();\n } else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n }\n\n ngOnDestroy() {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n\n this._pending.forEach(copy => copy.destroy());\n this._pending.clear();\n this._destroyed = true;\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';\n\nimport {CdkCopyToClipboard} from './copy-to-clipboard';\n\n@NgModule({\n imports: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\n})\nexport class ClipboardModule {}\n"],"names":["PendingCopy","_document","_textarea","constructor","text","textarea","createElement","styles","style","position","top","opacity","left","setAttribute","value","readOnly","fullscreenElement","body","appendChild","copy","successful","currentFocus","activeElement","select","setSelectionRange","length","execCommand","focus","destroy","remove","undefined","Clipboard","inject","DOCUMENT","pendingCopy","beginCopy","deps","target","i0","ɵɵFactoryTarget","Injectable","ɵprov","ɵɵngDeclareInjectable","minVersion","version","ngImport","type","decorators","providedIn","CDK_COPY_TO_CLIPBOARD_CONFIG","InjectionToken","CdkCopyToClipboard","_clipboard","_ngZone","NgZone","attempts","copied","EventEmitter","_pending","Set","_destroyed","_currentTimeout","config","optional","remainingAttempts","pending","add","attempt","runOutsideAngular","setTimeout","delete","emit","ngOnDestroy","clearTimeout","forEach","clear","Directive","isStandalone","selector","inputs","outputs","host","listeners","args","Input","Output","ClipboardModule","NgModule","imports","exports"],"mappings":";;;MA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ACO,IAAAA,IAAA,EAAA,CAAA;AACTL,MAAAA,QAAQ,EAAE,sBAAsB;AAChCG,MAAAA,IAAI,EAAE;AACJ,QAAA,SAAS,EAAE;AACZ;KACF;;;;AAM8B7E,IAAAA,IAAI,EAAA,CAAA;YAAhCgF,KAAK;aAAC,oBAAoB;;AAMU7B,IAAAA,QAAQ,EAAA,CAAA;YAA5C6B,KAAK;aAAC,4BAA4B;;AAMU5B,IAAAA,MAAM,EAAA,CAAA;YAAlD6B,MAAM;aAAC,0BAA0B;;;;;MC3CvBC,eAAe,CAAA;;;;;UAAfA,eAAe;AAAAlD,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAgD;AAAA,GAAA,CAAA;;;;;UAAfD,eAAe;IAAAE,OAAA,EAAA,CAHhBrC,kBAAkB,CAAA;IAAAsC,OAAA,EAAA,CAClBtC,kBAAkB;AAAA,GAAA,CAAA;;;;;UAEjBmC;AAAe,GAAA,CAAA;;;;;;QAAfA,eAAe;AAAAvC,EAAAA,UAAA,EAAA,CAAA;UAJ3BwC,QAAQ;AAACJ,IAAAA,IAAA,EAAA,CAAA;MACRK,OAAO,EAAE,CAACrC,kBAAkB,CAAC;MAC7BsC,OAAO,EAAE,CAACtC,kBAAkB;KAC7B;;;;;;"}
@@ -1,14 +1,10 @@
1
1
  import { isObservable, of } from 'rxjs';
2
2
 
3
- /**
4
- * Given either an Observable or non-Observable value, returns either the original
5
- * Observable, or wraps it in an Observable that emits the non-Observable value.
6
- */
7
3
  function coerceObservable(data) {
8
- if (!isObservable(data)) {
9
- return of(data);
10
- }
11
- return data;
4
+ if (!isObservable(data)) {
5
+ return of(data);
6
+ }
7
+ return data;
12
8
  }
13
9
 
14
10
  export { coerceObservable };
@@ -1 +1 @@
1
- {"version":3,"file":"coercion-private.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/coercion/private/observable.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 */\nimport {Observable, isObservable, of as observableOf} from 'rxjs';\n\n/**\n * Given either an Observable or non-Observable value, returns either the original\n * Observable, or wraps it in an Observable that emits the non-Observable value.\n */\nexport function coerceObservable<T>(data: T | Observable<T>): Observable<T> {\n if (!isObservable(data)) {\n return observableOf(data);\n }\n return data;\n}\n"],"names":["observableOf"],"mappings":";;AASA;;;AAGG;AACG,SAAU,gBAAgB,CAAI,IAAuB,EAAA;AACzD,IAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;AACvB,QAAA,OAAOA,EAAY,CAAC,IAAI,CAAC;;AAE3B,IAAA,OAAO,IAAI;AACb;;;;"}
1
+ {"version":3,"file":"coercion-private.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/coercion/private/observable.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 */\nimport {Observable, isObservable, of as observableOf} from 'rxjs';\n\n/**\n * Given either an Observable or non-Observable value, returns either the original\n * Observable, or wraps it in an Observable that emits the non-Observable value.\n */\nexport function coerceObservable<T>(data: T | Observable<T>): Observable<T> {\n if (!isObservable(data)) {\n return observableOf(data);\n }\n return data;\n}\n"],"names":["coerceObservable","data","isObservable","observableOf"],"mappings":";;AAaM,SAAUA,gBAAgBA,CAAIC,IAAuB,EAAA;AACzD,EAAA,IAAI,CAACC,YAAY,CAACD,IAAI,CAAC,EAAE;IACvB,OAAOE,EAAY,CAACF,IAAI,CAAC;AAC3B;AACA,EAAA,OAAOA,IAAI;AACb;;;;"}
@@ -3,40 +3,22 @@ export { coerceArray } from './_array-chunk.mjs';
3
3
  export { coerceCssPixelValue } from './_css-pixel-value-chunk.mjs';
4
4
  import '@angular/core';
5
5
 
6
- /** Coerces a data-bound value (typically a string) to a boolean. */
7
6
  function coerceBooleanProperty(value) {
8
- return value != null && `${value}` !== 'false';
7
+ return value != null && `${value}` !== 'false';
9
8
  }
10
9
 
11
- /**
12
- * Coerces a value to an array of trimmed non-empty strings.
13
- * Any input that is not an array, `null` or `undefined` will be turned into a string
14
- * via `toString()` and subsequently split with the given separator.
15
- * `null` and `undefined` will result in an empty array.
16
- * This results in the following outcomes:
17
- * - `null` -&gt; `[]`
18
- * - `[null]` -&gt; `["null"]`
19
- * - `["a", "b ", " "]` -&gt; `["a", "b"]`
20
- * - `[1, [2, 3]]` -&gt; `["1", "2,3"]`
21
- * - `[{ a: 0 }]` -&gt; `["[object Object]"]`
22
- * - `{ a: 0 }` -&gt; `["[object", "Object]"]`
23
- *
24
- * Useful for defining CSS classes or table columns.
25
- * @param value the value to coerce into an array of strings
26
- * @param separator split-separator if value isn't an array
27
- */
28
10
  function coerceStringArray(value, separator = /\s+/) {
29
- const result = [];
30
- if (value != null) {
31
- const sourceValues = Array.isArray(value) ? value : `${value}`.split(separator);
32
- for (const sourceValue of sourceValues) {
33
- const trimmedString = `${sourceValue}`.trim();
34
- if (trimmedString) {
35
- result.push(trimmedString);
36
- }
37
- }
11
+ const result = [];
12
+ if (value != null) {
13
+ const sourceValues = Array.isArray(value) ? value : `${value}`.split(separator);
14
+ for (const sourceValue of sourceValues) {
15
+ const trimmedString = `${sourceValue}`.trim();
16
+ if (trimmedString) {
17
+ result.push(trimmedString);
18
+ }
38
19
  }
39
- return result;
20
+ }
21
+ return result;
40
22
  }
41
23
 
42
24
  export { coerceBooleanProperty, coerceStringArray };
@@ -1 +1 @@
1
- {"version":3,"file":"coercion.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/coercion/boolean-property.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/coercion/string-array.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\n/**\n * Type describing the allowed values for a boolean input.\n * @docs-private\n */\nexport type BooleanInput = string | boolean | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\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\n/**\n * Coerces a value to an array of trimmed non-empty strings.\n * Any input that is not an array, `null` or `undefined` will be turned into a string\n * via `toString()` and subsequently split with the given separator.\n * `null` and `undefined` will result in an empty array.\n * This results in the following outcomes:\n * - `null` -&gt; `[]`\n * - `[null]` -&gt; `[\"null\"]`\n * - `[\"a\", \"b \", \" \"]` -&gt; `[\"a\", \"b\"]`\n * - `[1, [2, 3]]` -&gt; `[\"1\", \"2,3\"]`\n * - `[{ a: 0 }]` -&gt; `[\"[object Object]\"]`\n * - `{ a: 0 }` -&gt; `[\"[object\", \"Object]\"]`\n *\n * Useful for defining CSS classes or table columns.\n * @param value the value to coerce into an array of strings\n * @param separator split-separator if value isn't an array\n */\nexport function coerceStringArray(value: any, separator: string | RegExp = /\\s+/): string[] {\n const result = [];\n\n if (value != null) {\n const sourceValues = Array.isArray(value) ? value : `${value}`.split(separator);\n for (const sourceValue of sourceValues) {\n const trimmedString = `${sourceValue}`.trim();\n if (trimmedString) {\n result.push(trimmedString);\n }\n }\n }\n\n return result;\n}\n"],"names":[],"mappings":";;;;;AAcA;AACM,SAAU,qBAAqB,CAAC,KAAU,EAAA;IAC9C,OAAO,KAAK,IAAI,IAAI,IAAI,GAAG,KAAK,CAAA,CAAE,KAAK,OAAO;AAChD;;ACTA;;;;;;;;;;;;;;;;AAgBG;SACa,iBAAiB,CAAC,KAAU,EAAE,YAA6B,KAAK,EAAA;IAC9E,MAAM,MAAM,GAAG,EAAE;AAEjB,IAAA,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAA,EAAG,KAAK,CAAA,CAAE,CAAC,KAAK,CAAC,SAAS,CAAC;AAC/E,QAAA,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE;YACtC,MAAM,aAAa,GAAG,CAAG,EAAA,WAAW,EAAE,CAAC,IAAI,EAAE;YAC7C,IAAI,aAAa,EAAE;AACjB,gBAAA,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;;;;AAKhC,IAAA,OAAO,MAAM;AACf;;;;"}
1
+ {"version":3,"file":"coercion.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/coercion/boolean-property.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/coercion/string-array.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\n/**\n * Type describing the allowed values for a boolean input.\n * @docs-private\n */\nexport type BooleanInput = string | boolean | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\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\n/**\n * Coerces a value to an array of trimmed non-empty strings.\n * Any input that is not an array, `null` or `undefined` will be turned into a string\n * via `toString()` and subsequently split with the given separator.\n * `null` and `undefined` will result in an empty array.\n * This results in the following outcomes:\n * - `null` -&gt; `[]`\n * - `[null]` -&gt; `[\"null\"]`\n * - `[\"a\", \"b \", \" \"]` -&gt; `[\"a\", \"b\"]`\n * - `[1, [2, 3]]` -&gt; `[\"1\", \"2,3\"]`\n * - `[{ a: 0 }]` -&gt; `[\"[object Object]\"]`\n * - `{ a: 0 }` -&gt; `[\"[object\", \"Object]\"]`\n *\n * Useful for defining CSS classes or table columns.\n * @param value the value to coerce into an array of strings\n * @param separator split-separator if value isn't an array\n */\nexport function coerceStringArray(value: any, separator: string | RegExp = /\\s+/): string[] {\n const result = [];\n\n if (value != null) {\n const sourceValues = Array.isArray(value) ? value : `${value}`.split(separator);\n for (const sourceValue of sourceValues) {\n const trimmedString = `${sourceValue}`.trim();\n if (trimmedString) {\n result.push(trimmedString);\n }\n }\n }\n\n return result;\n}\n"],"names":["coerceBooleanProperty","value","coerceStringArray","separator","result","sourceValues","Array","isArray","split","sourceValue","trimmedString","trim","push"],"mappings":";;;;;AAeM,SAAUA,qBAAqBA,CAACC,KAAU,EAAA;EAC9C,OAAOA,KAAK,IAAI,IAAI,IAAI,GAAGA,KAAK,CAAA,CAAE,KAAK,OAAO;AAChD;;SCQgBC,iBAAiBA,CAACD,KAAU,EAAEE,YAA6B,KAAK,EAAA;EAC9E,MAAMC,MAAM,GAAG,EAAE;EAEjB,IAAIH,KAAK,IAAI,IAAI,EAAE;AACjB,IAAA,MAAMI,YAAY,GAAGC,KAAK,CAACC,OAAO,CAACN,KAAK,CAAC,GAAGA,KAAK,GAAG,GAAGA,KAAK,CAAA,CAAE,CAACO,KAAK,CAACL,SAAS,CAAC;AAC/E,IAAA,KAAK,MAAMM,WAAW,IAAIJ,YAAY,EAAE;MACtC,MAAMK,aAAa,GAAG,CAAGD,EAAAA,WAAW,EAAE,CAACE,IAAI,EAAE;AAC7C,MAAA,IAAID,aAAa,EAAE;AACjBN,QAAAA,MAAM,CAACQ,IAAI,CAACF,aAAa,CAAC;AAC5B;AACF;AACF;AAEA,EAAA,OAAON,MAAM;AACf;;;;"}