@angular/cdk 22.0.0-rc.3 → 22.0.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.
- package/fesm2022/_a11y-module-chunk.mjs +22 -22
- package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
- package/fesm2022/_breakpoints-observer-chunk.mjs +6 -6
- package/fesm2022/_directionality-chunk.mjs +3 -3
- package/fesm2022/_focus-monitor-chunk.mjs +9 -9
- package/fesm2022/_id-generator-chunk.mjs +11 -7
- package/fesm2022/_id-generator-chunk.mjs.map +1 -1
- package/fesm2022/_overlay-module-chunk.mjs +34 -34
- package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
- package/fesm2022/_platform-chunk.mjs +3 -3
- package/fesm2022/_style-loader-chunk.mjs +3 -3
- package/fesm2022/_unique-selection-dispatcher-chunk.mjs +3 -3
- package/fesm2022/a11y.mjs +9 -9
- package/fesm2022/accordion.mjs +10 -10
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/bidi.mjs +7 -7
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs +11 -10
- package/fesm2022/clipboard.mjs.map +1 -1
- package/fesm2022/dialog.mjs +10 -10
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +31 -31
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/layout.mjs +4 -4
- package/fesm2022/listbox.mjs +10 -10
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +49 -49
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/observers-private.mjs +3 -3
- package/fesm2022/observers.mjs +13 -13
- package/fesm2022/observers.mjs.map +1 -1
- package/fesm2022/overlay.mjs +3 -3
- package/fesm2022/platform.mjs +4 -4
- package/fesm2022/portal.mjs +10 -10
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/private.mjs +3 -3
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +35 -35
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +22 -22
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +73 -73
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/text-field.mjs +16 -16
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +4 -4
- package/schematics/ng-add/index.js +1 -1
- package/types/clipboard.d.ts +2 -1
|
@@ -21,7 +21,7 @@ class Platform {
|
|
|
21
21
|
SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;
|
|
22
22
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
23
|
minVersion: "12.0.0",
|
|
24
|
-
version: "22.0.0
|
|
24
|
+
version: "22.0.0",
|
|
25
25
|
ngImport: i0,
|
|
26
26
|
type: Platform,
|
|
27
27
|
deps: [],
|
|
@@ -29,14 +29,14 @@ class Platform {
|
|
|
29
29
|
});
|
|
30
30
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
31
31
|
minVersion: "22.0.0",
|
|
32
|
-
version: "22.0.0
|
|
32
|
+
version: "22.0.0",
|
|
33
33
|
ngImport: i0,
|
|
34
34
|
type: Platform
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
i0.ɵɵngDeclareClassMetadata({
|
|
38
38
|
minVersion: "12.0.0",
|
|
39
|
-
version: "22.0.0
|
|
39
|
+
version: "22.0.0",
|
|
40
40
|
ngImport: i0,
|
|
41
41
|
type: Platform,
|
|
42
42
|
decorators: [{
|
|
@@ -29,7 +29,7 @@ class _CdkPrivateStyleLoader {
|
|
|
29
29
|
}
|
|
30
30
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
31
31
|
minVersion: "12.0.0",
|
|
32
|
-
version: "22.0.0
|
|
32
|
+
version: "22.0.0",
|
|
33
33
|
ngImport: i0,
|
|
34
34
|
type: _CdkPrivateStyleLoader,
|
|
35
35
|
deps: [],
|
|
@@ -37,14 +37,14 @@ class _CdkPrivateStyleLoader {
|
|
|
37
37
|
});
|
|
38
38
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
39
39
|
minVersion: "22.0.0",
|
|
40
|
-
version: "22.0.0
|
|
40
|
+
version: "22.0.0",
|
|
41
41
|
ngImport: i0,
|
|
42
42
|
type: _CdkPrivateStyleLoader
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
i0.ɵɵngDeclareClassMetadata({
|
|
46
46
|
minVersion: "12.0.0",
|
|
47
|
-
version: "22.0.0
|
|
47
|
+
version: "22.0.0",
|
|
48
48
|
ngImport: i0,
|
|
49
49
|
type: _CdkPrivateStyleLoader,
|
|
50
50
|
decorators: [{
|
|
@@ -21,7 +21,7 @@ class UniqueSelectionDispatcher {
|
|
|
21
21
|
}
|
|
22
22
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
23
|
minVersion: "12.0.0",
|
|
24
|
-
version: "22.0.0
|
|
24
|
+
version: "22.0.0",
|
|
25
25
|
ngImport: i0,
|
|
26
26
|
type: UniqueSelectionDispatcher,
|
|
27
27
|
deps: [],
|
|
@@ -29,14 +29,14 @@ class UniqueSelectionDispatcher {
|
|
|
29
29
|
});
|
|
30
30
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
31
31
|
minVersion: "22.0.0",
|
|
32
|
-
version: "22.0.0
|
|
32
|
+
version: "22.0.0",
|
|
33
33
|
ngImport: i0,
|
|
34
34
|
type: UniqueSelectionDispatcher
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
i0.ɵɵngDeclareClassMetadata({
|
|
38
38
|
minVersion: "12.0.0",
|
|
39
|
-
version: "22.0.0
|
|
39
|
+
version: "22.0.0",
|
|
40
40
|
ngImport: i0,
|
|
41
41
|
type: UniqueSelectionDispatcher,
|
|
42
42
|
decorators: [{
|
package/fesm2022/a11y.mjs
CHANGED
|
@@ -188,7 +188,7 @@ class AriaDescriber {
|
|
|
188
188
|
}
|
|
189
189
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
190
190
|
minVersion: "12.0.0",
|
|
191
|
-
version: "22.0.0
|
|
191
|
+
version: "22.0.0",
|
|
192
192
|
ngImport: i0,
|
|
193
193
|
type: AriaDescriber,
|
|
194
194
|
deps: [],
|
|
@@ -196,14 +196,14 @@ class AriaDescriber {
|
|
|
196
196
|
});
|
|
197
197
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
198
198
|
minVersion: "22.0.0",
|
|
199
|
-
version: "22.0.0
|
|
199
|
+
version: "22.0.0",
|
|
200
200
|
ngImport: i0,
|
|
201
201
|
type: AriaDescriber
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
i0.ɵɵngDeclareClassMetadata({
|
|
205
205
|
minVersion: "12.0.0",
|
|
206
|
-
version: "22.0.0
|
|
206
|
+
version: "22.0.0",
|
|
207
207
|
ngImport: i0,
|
|
208
208
|
type: AriaDescriber,
|
|
209
209
|
decorators: [{
|
|
@@ -331,7 +331,7 @@ class FocusTrapManager {
|
|
|
331
331
|
}
|
|
332
332
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
333
333
|
minVersion: "12.0.0",
|
|
334
|
-
version: "22.0.0
|
|
334
|
+
version: "22.0.0",
|
|
335
335
|
ngImport: i0,
|
|
336
336
|
type: FocusTrapManager,
|
|
337
337
|
deps: [],
|
|
@@ -339,14 +339,14 @@ class FocusTrapManager {
|
|
|
339
339
|
});
|
|
340
340
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
341
341
|
minVersion: "22.0.0",
|
|
342
|
-
version: "22.0.0
|
|
342
|
+
version: "22.0.0",
|
|
343
343
|
ngImport: i0,
|
|
344
344
|
type: FocusTrapManager
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
i0.ɵɵngDeclareClassMetadata({
|
|
348
348
|
minVersion: "12.0.0",
|
|
349
|
-
version: "22.0.0
|
|
349
|
+
version: "22.0.0",
|
|
350
350
|
ngImport: i0,
|
|
351
351
|
type: FocusTrapManager,
|
|
352
352
|
decorators: [{
|
|
@@ -374,7 +374,7 @@ class ConfigurableFocusTrapFactory {
|
|
|
374
374
|
}
|
|
375
375
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
376
376
|
minVersion: "12.0.0",
|
|
377
|
-
version: "22.0.0
|
|
377
|
+
version: "22.0.0",
|
|
378
378
|
ngImport: i0,
|
|
379
379
|
type: ConfigurableFocusTrapFactory,
|
|
380
380
|
deps: [],
|
|
@@ -382,14 +382,14 @@ class ConfigurableFocusTrapFactory {
|
|
|
382
382
|
});
|
|
383
383
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
384
384
|
minVersion: "22.0.0",
|
|
385
|
-
version: "22.0.0
|
|
385
|
+
version: "22.0.0",
|
|
386
386
|
ngImport: i0,
|
|
387
387
|
type: ConfigurableFocusTrapFactory
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
390
|
i0.ɵɵngDeclareClassMetadata({
|
|
391
391
|
minVersion: "12.0.0",
|
|
392
|
-
version: "22.0.0
|
|
392
|
+
version: "22.0.0",
|
|
393
393
|
ngImport: i0,
|
|
394
394
|
type: ConfigurableFocusTrapFactory,
|
|
395
395
|
decorators: [{
|
package/fesm2022/accordion.mjs
CHANGED
|
@@ -27,7 +27,7 @@ class CdkAccordion {
|
|
|
27
27
|
}
|
|
28
28
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
29
29
|
minVersion: "12.0.0",
|
|
30
|
-
version: "22.0.0
|
|
30
|
+
version: "22.0.0",
|
|
31
31
|
ngImport: i0,
|
|
32
32
|
type: CdkAccordion,
|
|
33
33
|
deps: [],
|
|
@@ -35,7 +35,7 @@ class CdkAccordion {
|
|
|
35
35
|
});
|
|
36
36
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
37
37
|
minVersion: "16.1.0",
|
|
38
|
-
version: "22.0.0
|
|
38
|
+
version: "22.0.0",
|
|
39
39
|
type: CdkAccordion,
|
|
40
40
|
isStandalone: true,
|
|
41
41
|
selector: "cdk-accordion, [cdkAccordion]",
|
|
@@ -53,7 +53,7 @@ class CdkAccordion {
|
|
|
53
53
|
}
|
|
54
54
|
i0.ɵɵngDeclareClassMetadata({
|
|
55
55
|
minVersion: "12.0.0",
|
|
56
|
-
version: "22.0.0
|
|
56
|
+
version: "22.0.0",
|
|
57
57
|
ngImport: i0,
|
|
58
58
|
type: CdkAccordion,
|
|
59
59
|
decorators: [{
|
|
@@ -160,7 +160,7 @@ class CdkAccordionItem {
|
|
|
160
160
|
}
|
|
161
161
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
162
162
|
minVersion: "12.0.0",
|
|
163
|
-
version: "22.0.0
|
|
163
|
+
version: "22.0.0",
|
|
164
164
|
ngImport: i0,
|
|
165
165
|
type: CdkAccordionItem,
|
|
166
166
|
deps: [],
|
|
@@ -168,7 +168,7 @@ class CdkAccordionItem {
|
|
|
168
168
|
});
|
|
169
169
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
170
170
|
minVersion: "16.1.0",
|
|
171
|
-
version: "22.0.0
|
|
171
|
+
version: "22.0.0",
|
|
172
172
|
type: CdkAccordionItem,
|
|
173
173
|
isStandalone: true,
|
|
174
174
|
selector: "cdk-accordion-item, [cdkAccordionItem]",
|
|
@@ -192,7 +192,7 @@ class CdkAccordionItem {
|
|
|
192
192
|
}
|
|
193
193
|
i0.ɵɵngDeclareClassMetadata({
|
|
194
194
|
minVersion: "12.0.0",
|
|
195
|
-
version: "22.0.0
|
|
195
|
+
version: "22.0.0",
|
|
196
196
|
ngImport: i0,
|
|
197
197
|
type: CdkAccordionItem,
|
|
198
198
|
decorators: [{
|
|
@@ -237,7 +237,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
237
237
|
class CdkAccordionModule {
|
|
238
238
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
239
239
|
minVersion: "12.0.0",
|
|
240
|
-
version: "22.0.0
|
|
240
|
+
version: "22.0.0",
|
|
241
241
|
ngImport: i0,
|
|
242
242
|
type: CdkAccordionModule,
|
|
243
243
|
deps: [],
|
|
@@ -245,7 +245,7 @@ class CdkAccordionModule {
|
|
|
245
245
|
});
|
|
246
246
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
247
247
|
minVersion: "14.0.0",
|
|
248
|
-
version: "22.0.0
|
|
248
|
+
version: "22.0.0",
|
|
249
249
|
ngImport: i0,
|
|
250
250
|
type: CdkAccordionModule,
|
|
251
251
|
imports: [CdkAccordion, CdkAccordionItem],
|
|
@@ -253,14 +253,14 @@ class CdkAccordionModule {
|
|
|
253
253
|
});
|
|
254
254
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
255
255
|
minVersion: "12.0.0",
|
|
256
|
-
version: "22.0.0
|
|
256
|
+
version: "22.0.0",
|
|
257
257
|
ngImport: i0,
|
|
258
258
|
type: CdkAccordionModule
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
i0.ɵɵngDeclareClassMetadata({
|
|
262
262
|
minVersion: "12.0.0",
|
|
263
|
-
version: "22.0.0
|
|
263
|
+
version: "22.0.0",
|
|
264
264
|
ngImport: i0,
|
|
265
265
|
type: CdkAccordionModule,
|
|
266
266
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion-item.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion-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 Directive,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {_IdGenerator} from '../a11y';\nimport {Subject} from 'rxjs';\n\n/**\n * Injection token that can be used to reference instances of `CdkAccordion`. It serves\n * as alternative token to the actual `CdkAccordion` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_ACCORDION = new InjectionToken<CdkAccordion>('CdkAccordion');\n\n/**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\n@Directive({\n selector: 'cdk-accordion, [cdkAccordion]',\n exportAs: 'cdkAccordion',\n providers: [{provide: CDK_ACCORDION, useExisting: CdkAccordion}],\n})\nexport class CdkAccordion implements OnDestroy, OnChanges {\n /** Emits when the state of the accordion changes */\n readonly _stateChanges = new Subject<SimpleChanges<this>>();\n\n /** Stream that emits true/false when openAll/closeAll is triggered. */\n readonly _openCloseAllActions: Subject<boolean> = new Subject<boolean>();\n\n /** A readonly id value to use for unique selection coordination. */\n readonly id: string = inject(_IdGenerator).getId('cdk-accordion-');\n\n /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n @Input({transform: booleanAttribute}) multi: boolean = false;\n\n /** Opens all enabled accordion items in an accordion where multi is enabled. */\n openAll(): void {\n if (this.multi) {\n this._openCloseAllActions.next(true);\n }\n }\n\n /** Closes all enabled accordion items. */\n closeAll(): void {\n this._openCloseAllActions.next(false);\n }\n\n ngOnChanges(changes: SimpleChanges<this>) {\n this._stateChanges.next(changes);\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n this._openCloseAllActions.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 {\n Output,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n ChangeDetectorRef,\n booleanAttribute,\n inject,\n OnInit,\n signal,\n} from '@angular/core';\nimport {_IdGenerator} from '../a11y';\nimport {UniqueSelectionDispatcher} from '../collections';\nimport {CDK_ACCORDION, CdkAccordion} from './accordion';\nimport {Subscription} from 'rxjs';\n\n/**\n * A basic directive expected to be extended and decorated as a component. Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\n@Directive({\n selector: 'cdk-accordion-item, [cdkAccordionItem]',\n exportAs: 'cdkAccordionItem',\n providers: [\n // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from\n // registering to the same accordion.\n {provide: CDK_ACCORDION, useValue: undefined},\n ],\n})\nexport class CdkAccordionItem implements OnInit, OnDestroy {\n accordion = inject<CdkAccordion>(CDK_ACCORDION, {optional: true, skipSelf: true})!;\n private _changeDetectorRef = inject(ChangeDetectorRef);\n protected _expansionDispatcher = inject(UniqueSelectionDispatcher);\n\n /** Subscription to openAll/closeAll events. */\n private _openCloseAllSubscription = Subscription.EMPTY;\n /** Event emitted every time the AccordionItem is closed. */\n @Output() readonly closed: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted every time the AccordionItem is opened. */\n @Output() readonly opened: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted when the AccordionItem is destroyed. */\n @Output() readonly destroyed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n @Output() readonly expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The unique AccordionItem id. */\n readonly id: string = inject(_IdGenerator).getId('cdk-accordion-child-');\n\n /** Whether the AccordionItem is expanded. */\n @Input({transform: booleanAttribute})\n get expanded(): boolean {\n return this._expanded;\n }\n set expanded(expanded: boolean) {\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n const accordionId = this.accordion ? this.accordion.id : this.id;\n this._expansionDispatcher.notify(this.id, accordionId);\n } else {\n this.closed.emit();\n }\n\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this._changeDetectorRef.markForCheck();\n }\n }\n private _expanded = false;\n\n /** Whether the AccordionItem is disabled. */\n @Input({transform: booleanAttribute})\n get disabled() {\n return this._disabled();\n }\n set disabled(value: boolean) {\n this._disabled.set(value);\n }\n private _disabled = signal(false);\n\n /** Unregister function for _expansionDispatcher. */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n ngOnInit() {\n this._removeUniqueSelectionListener = this._expansionDispatcher.listen(\n (id: string, accordionId: string) => {\n if (\n this.accordion &&\n !this.accordion.multi &&\n this.accordion.id === accordionId &&\n this.id !== id\n ) {\n this.expanded = false;\n }\n },\n );\n\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n }\n }\n\n /** Emits an event for the accordion item being destroyed. */\n ngOnDestroy() {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this._removeUniqueSelectionListener();\n this._openCloseAllSubscription.unsubscribe();\n }\n\n /** Toggles the expanded state of the accordion item. */\n toggle(): void {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n }\n\n /** Sets the expanded state of the accordion item to false. */\n close(): void {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n /** Sets the expanded state of the accordion item to true. */\n open(): void {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n private _subscribeToOpenCloseAllActions(): Subscription {\n return this.accordion._openCloseAllActions.subscribe(expanded => {\n // Only change expanded state if item is enabled\n if (!this.disabled) {\n this.expanded = expanded;\n }\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 {NgModule} from '@angular/core';\nimport {CdkAccordion} from './accordion';\nimport {CdkAccordionItem} from './accordion-item';\n\n@NgModule({\n imports: [CdkAccordion, CdkAccordionItem],\n exports: [CdkAccordion, CdkAccordionItem],\n})\nexport class CdkAccordionModule {}\n"],"names":["CDK_ACCORDION","InjectionToken","CdkAccordion","_stateChanges","Subject","_openCloseAllActions","id","inject","_IdGenerator","getId","multi","openAll","next","closeAll","ngOnChanges","changes","ngOnDestroy","complete","deps","target","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isStandalone","selector","inputs","booleanAttribute","providers","provide","useExisting","exportAs","usesOnChanges","ngImport","decorators","args","Input","transform","CdkAccordionItem","accordion","optional","skipSelf","_changeDetectorRef","ChangeDetectorRef","_expansionDispatcher","UniqueSelectionDispatcher","_openCloseAllSubscription","Subscription","EMPTY","closed","EventEmitter","opened","destroyed","expandedChange","expanded","_expanded","emit","accordionId","notify","markForCheck","disabled","_disabled","value","set","signal","_removeUniqueSelectionListener","ngOnInit","listen","_subscribeToOpenCloseAllActions","unsubscribe","toggle","close","open","subscribe","outputs","useValue","undefined","Output","CdkAccordionModule","NgModule","ɵmod","ɵɵngDeclareNgModule","exports","imports"],"mappings":";;;;;;MA0BaA,aAAa,GAAG,IAAIC,cAAc,CAAe,cAAc;MAU/DC,YAAY,CAAA;AAEdC,EAAAA,aAAa,GAAG,IAAIC,OAAO,EAAuB;AAGlDC,EAAAA,oBAAoB,GAAqB,IAAID,OAAO,EAAW;EAG/DE,EAAE,GAAWC,MAAM,CAACC,YAAY,CAAC,CAACC,KAAK,CAAC,gBAAgB,CAAC;AAG5BC,EAAAA,KAAK,GAAY,KAAK;AAG5DC,EAAAA,OAAOA,GAAA;IACL,IAAI,IAAI,CAACD,KAAK,EAAE;AACd,MAAA,IAAI,CAACL,oBAAoB,CAACO,IAAI,CAAC,IAAI,CAAC;AACtC,IAAA;AACF,EAAA;AAGAC,EAAAA,QAAQA,GAAA;AACN,IAAA,IAAI,CAACR,oBAAoB,CAACO,IAAI,CAAC,KAAK,CAAC;AACvC,EAAA;EAEAE,WAAWA,CAACC,OAA4B,EAAA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EwC,gBAAgB;AAAA,GAAA,CAAA;;;;;UAE7BwC;AAAkB,GAAA,CAAA;;;;;;QAAlBA,kBAAkB;AAAA5C,EAAAA,UAAA,EAAA,CAAA;UAJ9B6C,QAAQ;AAAC5C,IAAAA,IAAA,EAAA,CAAA;AACRgD,MAAAA,OAAO,EAAE,CAACrF,YAAY,EAAEwC,gBAAgB,CAAC;AACzC4C,MAAAA,OAAO,EAAE,CAACpF,YAAY,EAAEwC,gBAAgB;KACzC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"accordion.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion-item.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion-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 Directive,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {_IdGenerator} from '../a11y';\nimport {Subject} from 'rxjs';\n\n/**\n * Injection token that can be used to reference instances of `CdkAccordion`. It serves\n * as alternative token to the actual `CdkAccordion` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_ACCORDION = new InjectionToken<CdkAccordion>('CdkAccordion');\n\n/**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\n@Directive({\n selector: 'cdk-accordion, [cdkAccordion]',\n exportAs: 'cdkAccordion',\n providers: [{provide: CDK_ACCORDION, useExisting: CdkAccordion}],\n})\nexport class CdkAccordion implements OnDestroy, OnChanges {\n /** Emits when the state of the accordion changes */\n readonly _stateChanges = new Subject<SimpleChanges<this>>();\n\n /** Stream that emits true/false when openAll/closeAll is triggered. */\n readonly _openCloseAllActions: Subject<boolean> = new Subject<boolean>();\n\n /** A readonly id value to use for unique selection coordination. */\n readonly id: string = inject(_IdGenerator).getId('cdk-accordion-');\n\n /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n @Input({transform: booleanAttribute}) multi: boolean = false;\n\n /** Opens all enabled accordion items in an accordion where multi is enabled. */\n openAll(): void {\n if (this.multi) {\n this._openCloseAllActions.next(true);\n }\n }\n\n /** Closes all enabled accordion items. */\n closeAll(): void {\n this._openCloseAllActions.next(false);\n }\n\n ngOnChanges(changes: SimpleChanges<this>) {\n this._stateChanges.next(changes);\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n this._openCloseAllActions.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 {\n Output,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n ChangeDetectorRef,\n booleanAttribute,\n inject,\n OnInit,\n signal,\n} from '@angular/core';\nimport {_IdGenerator} from '../a11y';\nimport {UniqueSelectionDispatcher} from '../collections';\nimport {CDK_ACCORDION, CdkAccordion} from './accordion';\nimport {Subscription} from 'rxjs';\n\n/**\n * A basic directive expected to be extended and decorated as a component. Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\n@Directive({\n selector: 'cdk-accordion-item, [cdkAccordionItem]',\n exportAs: 'cdkAccordionItem',\n providers: [\n // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from\n // registering to the same accordion.\n {provide: CDK_ACCORDION, useValue: undefined},\n ],\n})\nexport class CdkAccordionItem implements OnInit, OnDestroy {\n accordion = inject<CdkAccordion>(CDK_ACCORDION, {optional: true, skipSelf: true})!;\n private _changeDetectorRef = inject(ChangeDetectorRef);\n protected _expansionDispatcher = inject(UniqueSelectionDispatcher);\n\n /** Subscription to openAll/closeAll events. */\n private _openCloseAllSubscription = Subscription.EMPTY;\n /** Event emitted every time the AccordionItem is closed. */\n @Output() readonly closed: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted every time the AccordionItem is opened. */\n @Output() readonly opened: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted when the AccordionItem is destroyed. */\n @Output() readonly destroyed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n @Output() readonly expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The unique AccordionItem id. */\n readonly id: string = inject(_IdGenerator).getId('cdk-accordion-child-');\n\n /** Whether the AccordionItem is expanded. */\n @Input({transform: booleanAttribute})\n get expanded(): boolean {\n return this._expanded;\n }\n set expanded(expanded: boolean) {\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n const accordionId = this.accordion ? this.accordion.id : this.id;\n this._expansionDispatcher.notify(this.id, accordionId);\n } else {\n this.closed.emit();\n }\n\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this._changeDetectorRef.markForCheck();\n }\n }\n private _expanded = false;\n\n /** Whether the AccordionItem is disabled. */\n @Input({transform: booleanAttribute})\n get disabled() {\n return this._disabled();\n }\n set disabled(value: boolean) {\n this._disabled.set(value);\n }\n private _disabled = signal(false);\n\n /** Unregister function for _expansionDispatcher. */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n ngOnInit() {\n this._removeUniqueSelectionListener = this._expansionDispatcher.listen(\n (id: string, accordionId: string) => {\n if (\n this.accordion &&\n !this.accordion.multi &&\n this.accordion.id === accordionId &&\n this.id !== id\n ) {\n this.expanded = false;\n }\n },\n );\n\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n }\n }\n\n /** Emits an event for the accordion item being destroyed. */\n ngOnDestroy() {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this._removeUniqueSelectionListener();\n this._openCloseAllSubscription.unsubscribe();\n }\n\n /** Toggles the expanded state of the accordion item. */\n toggle(): void {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n }\n\n /** Sets the expanded state of the accordion item to false. */\n close(): void {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n /** Sets the expanded state of the accordion item to true. */\n open(): void {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n private _subscribeToOpenCloseAllActions(): Subscription {\n return this.accordion._openCloseAllActions.subscribe(expanded => {\n // Only change expanded state if item is enabled\n if (!this.disabled) {\n this.expanded = expanded;\n }\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 {NgModule} from '@angular/core';\nimport {CdkAccordion} from './accordion';\nimport {CdkAccordionItem} from './accordion-item';\n\n@NgModule({\n imports: [CdkAccordion, CdkAccordionItem],\n exports: [CdkAccordion, CdkAccordionItem],\n})\nexport class CdkAccordionModule {}\n"],"names":["CDK_ACCORDION","InjectionToken","CdkAccordion","_stateChanges","Subject","_openCloseAllActions","id","inject","_IdGenerator","getId","multi","openAll","next","closeAll","ngOnChanges","changes","ngOnDestroy","complete","deps","target","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isStandalone","selector","inputs","booleanAttribute","providers","provide","useExisting","exportAs","usesOnChanges","ngImport","decorators","args","Input","transform","CdkAccordionItem","accordion","optional","skipSelf","_changeDetectorRef","ChangeDetectorRef","_expansionDispatcher","UniqueSelectionDispatcher","_openCloseAllSubscription","Subscription","EMPTY","closed","EventEmitter","opened","destroyed","expandedChange","expanded","_expanded","emit","accordionId","notify","markForCheck","disabled","_disabled","value","set","signal","_removeUniqueSelectionListener","ngOnInit","listen","_subscribeToOpenCloseAllActions","unsubscribe","toggle","close","open","subscribe","outputs","useValue","undefined","Output","CdkAccordionModule","NgModule","ɵmod","ɵɵngDeclareNgModule","exports","imports"],"mappings":";;;;;;MA0BaA,aAAa,GAAG,IAAIC,cAAc,CAAe,cAAc;MAU/DC,YAAY,CAAA;AAEdC,EAAAA,aAAa,GAAG,IAAIC,OAAO,EAAuB;AAGlDC,EAAAA,oBAAoB,GAAqB,IAAID,OAAO,EAAW;EAG/DE,EAAE,GAAWC,MAAM,CAACC,YAAY,CAAC,CAACC,KAAK,CAAC,gBAAgB,CAAC;AAG5BC,EAAAA,KAAK,GAAY,KAAK;AAG5DC,EAAAA,OAAOA,GAAA;IACL,IAAI,IAAI,CAACD,KAAK,EAAE;AACd,MAAA,IAAI,CAACL,oBAAoB,CAACO,IAAI,CAAC,IAAI,CAAC;AACtC,IAAA;AACF,EAAA;AAGAC,EAAAA,QAAQA,GAAA;AACN,IAAA,IAAI,CAACR,oBAAoB,CAACO,IAAI,CAAC,KAAK,CAAC;AACvC,EAAA;EAEAE,WAAWA,CAACC,OAA4B,EAAA;AACtC,IAAA,IAAI,CAACZ,aAAa,CAACS,IAAI,CAACG,OAAO,CAAC;AAClC,EAAA;AAEAC,EAAAA,WAAWA,GAAA;AACT,IAAA,IAAI,CAACb,aAAa,CAACc,QAAQ,EAAE;AAC7B,IAAA,IAAI,CAACZ,oBAAoB,CAACY,QAAQ,EAAE;AACtC,EAAA;;;;;UAhCWf,YAAY;AAAAgB,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;AAAZ,EAAA,OAAAC,IAAA,GAAAH,EAAA,CAAAI,oBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,QAAA;AAAAC,IAAAA,IAAA,EAAAzB,YAAY;AAAA0B,IA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ngImport: i0,
|
|
37
37
|
type: Dir,
|
|
38
38
|
deps: [],
|
|
@@ -40,7 +40,7 @@ class Dir {
|
|
|
40
40
|
});
|
|
41
41
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
42
42
|
minVersion: "14.0.0",
|
|
43
|
-
version: "22.0.0
|
|
43
|
+
version: "22.0.0",
|
|
44
44
|
type: Dir,
|
|
45
45
|
isStandalone: true,
|
|
46
46
|
selector: "[dir]",
|
|
@@ -65,7 +65,7 @@ class Dir {
|
|
|
65
65
|
}
|
|
66
66
|
i0.ɵɵngDeclareClassMetadata({
|
|
67
67
|
minVersion: "12.0.0",
|
|
68
|
-
version: "22.0.0
|
|
68
|
+
version: "22.0.0",
|
|
69
69
|
ngImport: i0,
|
|
70
70
|
type: Dir,
|
|
71
71
|
decorators: [{
|
|
@@ -96,7 +96,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
96
96
|
class BidiModule {
|
|
97
97
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
98
98
|
minVersion: "12.0.0",
|
|
99
|
-
version: "22.0.0
|
|
99
|
+
version: "22.0.0",
|
|
100
100
|
ngImport: i0,
|
|
101
101
|
type: BidiModule,
|
|
102
102
|
deps: [],
|
|
@@ -104,7 +104,7 @@ class BidiModule {
|
|
|
104
104
|
});
|
|
105
105
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
106
106
|
minVersion: "14.0.0",
|
|
107
|
-
version: "22.0.0
|
|
107
|
+
version: "22.0.0",
|
|
108
108
|
ngImport: i0,
|
|
109
109
|
type: BidiModule,
|
|
110
110
|
imports: [Dir],
|
|
@@ -112,14 +112,14 @@ class BidiModule {
|
|
|
112
112
|
});
|
|
113
113
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
114
114
|
minVersion: "12.0.0",
|
|
115
|
-
version: "22.0.0
|
|
115
|
+
version: "22.0.0",
|
|
116
116
|
ngImport: i0,
|
|
117
117
|
type: BidiModule
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
i0.ɵɵngDeclareClassMetadata({
|
|
121
121
|
minVersion: "12.0.0",
|
|
122
|
-
version: "22.0.0
|
|
122
|
+
version: "22.0.0",
|
|
123
123
|
ngImport: i0,
|
|
124
124
|
type: BidiModule,
|
|
125
125
|
decorators: [{
|
package/fesm2022/cdk.mjs
CHANGED
package/fesm2022/cdk.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/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('22.0.
|
|
1
|
+
{"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/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('22.0.1');\n"],"names":["VERSION","Version"],"mappings":";;MAWaA,OAAO,GAAG,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
|
package/fesm2022/clipboard.mjs
CHANGED
|
@@ -54,7 +54,7 @@ class Clipboard {
|
|
|
54
54
|
}
|
|
55
55
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
56
56
|
minVersion: "12.0.0",
|
|
57
|
-
version: "22.0.0
|
|
57
|
+
version: "22.0.0",
|
|
58
58
|
ngImport: i0,
|
|
59
59
|
type: Clipboard,
|
|
60
60
|
deps: [],
|
|
@@ -62,14 +62,14 @@ class Clipboard {
|
|
|
62
62
|
});
|
|
63
63
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
64
64
|
minVersion: "22.0.0",
|
|
65
|
-
version: "22.0.0
|
|
65
|
+
version: "22.0.0",
|
|
66
66
|
ngImport: i0,
|
|
67
67
|
type: Clipboard
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
i0.ɵɵngDeclareClassMetadata({
|
|
71
71
|
minVersion: "12.0.0",
|
|
72
|
-
version: "22.0.0
|
|
72
|
+
version: "22.0.0",
|
|
73
73
|
ngImport: i0,
|
|
74
74
|
type: Clipboard,
|
|
75
75
|
decorators: [{
|
|
@@ -96,6 +96,7 @@ class CdkCopyToClipboard {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
copy(attempts = this.attempts) {
|
|
99
|
+
attempts = Math.min(attempts, 50);
|
|
99
100
|
if (attempts > 1) {
|
|
100
101
|
let remainingAttempts = attempts;
|
|
101
102
|
const pending = this._clipboard.beginCopy(this.text);
|
|
@@ -126,7 +127,7 @@ class CdkCopyToClipboard {
|
|
|
126
127
|
}
|
|
127
128
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
128
129
|
minVersion: "12.0.0",
|
|
129
|
-
version: "22.0.0
|
|
130
|
+
version: "22.0.0",
|
|
130
131
|
ngImport: i0,
|
|
131
132
|
type: CdkCopyToClipboard,
|
|
132
133
|
deps: [],
|
|
@@ -134,7 +135,7 @@ class CdkCopyToClipboard {
|
|
|
134
135
|
});
|
|
135
136
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
136
137
|
minVersion: "14.0.0",
|
|
137
|
-
version: "22.0.0
|
|
138
|
+
version: "22.0.0",
|
|
138
139
|
type: CdkCopyToClipboard,
|
|
139
140
|
isStandalone: true,
|
|
140
141
|
selector: "[cdkCopyToClipboard]",
|
|
@@ -155,7 +156,7 @@ class CdkCopyToClipboard {
|
|
|
155
156
|
}
|
|
156
157
|
i0.ɵɵngDeclareClassMetadata({
|
|
157
158
|
minVersion: "12.0.0",
|
|
158
|
-
version: "22.0.0
|
|
159
|
+
version: "22.0.0",
|
|
159
160
|
ngImport: i0,
|
|
160
161
|
type: CdkCopyToClipboard,
|
|
161
162
|
decorators: [{
|
|
@@ -187,7 +188,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
187
188
|
class ClipboardModule {
|
|
188
189
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
189
190
|
minVersion: "12.0.0",
|
|
190
|
-
version: "22.0.0
|
|
191
|
+
version: "22.0.0",
|
|
191
192
|
ngImport: i0,
|
|
192
193
|
type: ClipboardModule,
|
|
193
194
|
deps: [],
|
|
@@ -195,7 +196,7 @@ class ClipboardModule {
|
|
|
195
196
|
});
|
|
196
197
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
197
198
|
minVersion: "14.0.0",
|
|
198
|
-
version: "22.0.0
|
|
199
|
+
version: "22.0.0",
|
|
199
200
|
ngImport: i0,
|
|
200
201
|
type: ClipboardModule,
|
|
201
202
|
imports: [CdkCopyToClipboard],
|
|
@@ -203,14 +204,14 @@ class ClipboardModule {
|
|
|
203
204
|
});
|
|
204
205
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
205
206
|
minVersion: "12.0.0",
|
|
206
|
-
version: "22.0.0
|
|
207
|
+
version: "22.0.0",
|
|
207
208
|
ngImport: i0,
|
|
208
209
|
type: ClipboardModule
|
|
209
210
|
});
|
|
210
211
|
}
|
|
211
212
|
i0.ɵɵngDeclareClassMetadata({
|
|
212
213
|
minVersion: "12.0.0",
|
|
213
|
-
version: "22.0.0
|
|
214
|
+
version: "22.0.0",
|
|
214
215
|
ngImport: i0,
|
|
215
216
|
type: ClipboardModule,
|
|
216
217
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/pending-copy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/clipboard.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/copy-to-clipboard.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/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 {Service, inject, DOCUMENT} from '@angular/core';\nimport {PendingCopy} from './pending-copy';\n\n/**\n * A service for copying text to the clipboard.\n */\n@Service()\nexport class Clipboard {\n private readonly _document = inject(DOCUMENT);\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 = false;\n\n /** Timeout for the current copy attempt. */\n private _currentTimeout: any;\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","Service","decorators","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","ngImport","args","Input","Output","ClipboardModule","NgModule","imports","exports"],"mappings":";;;MAqBaA,WAAW,CAAA;EAKHC,SAAA;EAJXC,SAAS;AAEjBC,EAAAA,WAAAA,CACEC,IAAY,EACKH,SAAmB,EAAA;IAAnB,IAAA,CAAAA,SAAS,GAATA,SAAS;AAE1B,IAAA,MAAMI,QAAQ,GAAI,IAAI,CAACH,SAAS,GAAG,IAAI,CAACD,SAAS,CAACK,aAAa,CAAC,UAAU,CAAE;AAC5E,IAAA,MAAMC,MAAM,GAAGF,QAAQ,CAACG,KAAK;IAK7BD,MAAM,CAACE,QAAQ,GAAG,OAAO;AACzBF,IAAAA,MAAM,CAACG,GAAG,GAAGH,MAAM,CAACI,OAAO,GAAG,GAAG;IACjCJ,MAAM,CAACK,IAAI,GAAG,QAAQ;AACtBP,IAAAA,QAAQ,CAACQ,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC;IAC5CR,QAAQ,CAACS,KAAK,GAAGV,IAAI;IAErBC,QAAQ,CAACU,QAAQ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kB;KAC7B;;;;;;"}
|
|
1
|
+
{"version":3,"file":"clipboard.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/pending-copy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/clipboard.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/copy-to-clipboard.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/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 {Service, inject, DOCUMENT} from '@angular/core';\nimport {PendingCopy} from './pending-copy';\n\n/**\n * A service for copying text to the clipboard.\n */\n@Service()\nexport class Clipboard {\n private readonly _document = inject(DOCUMENT);\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. Attempts\n * are cappted out at 50.\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 = false;\n\n /** Timeout for the current copy attempt. */\n private _currentTimeout: any;\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 // Avoid triggering an infinite loop if a large number of attempts is passed in.\n attempts = Math.min(attempts, 50);\n\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","Service","decorators","CDK_COPY_TO_CLIPBOARD_CONFIG","InjectionToken","CdkCopyToClipboard","_clipboard","_ngZone","NgZone","attempts","copied","EventEmitter","_pending","Set","_destroyed","_currentTimeout","config","optional","Math","min","remainingAttempts","pending","add","attempt","runOutsideAngular","setTimeout","delete","emit","ngOnDestroy","clearTimeout","forEach","clear","Directive","isStandalone","selector","inputs","outputs","host","listeners","ngImport","args","Input","Output","ClipboardModule","NgModule","imports","exports"],"mappings":";;;MAqBaA,WAAW,CAAA;EAKHC,SAAA;EAJXC,SAAS;AAEjBC,EAAAA,WAAAA,CACEC,IAAY,EACKH,SAAmB,EAAA;IAAnB,IAAA,CAAAA,SAAS,GAATA,SAAS;AAE1B,IAAA,MAAMI,QAAQ,GAAI,IAAI,CAACH,SAAS,GAAG,IAAI,CAACD,SAAS,CAACK,aAAa,CAAC,UAAU,CAAE;AAC5E,IAAA,MAAMC,MAAM,GAAGF,QAAQ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AA,CAAAC,eAAA,CAAA4C;AAAA,GAAA,CAAA;;;;;UAAfD,eAAe;IAAAE,OAAA,EAAA,CAHhBxC,kBAAkB,CAAA;IAAAyC,OAAA,EAAA,CAClBzC,kBAAkB;AAAA,GAAA,CAAA;;;;;UAEjBsC;AAAe,GAAA,CAAA;;;;;;QAAfA,eAAe;AAAAzC,EAAAA,UAAA,EAAA,CAAA;UAJ3B0C,QAAQ;AAACJ,IAAAA,IAAA,EAAA,CAAA;MACRK,OAAO,EAAE,CAACxC,kBAAkB,CAAC;MAC7ByC,OAAO,EAAE,CAACzC,kBAAkB;KAC7B;;;;;;"}
|
package/fesm2022/dialog.mjs
CHANGED
|
@@ -247,7 +247,7 @@ class CdkDialogContainer extends BasePortalOutlet {
|
|
|
247
247
|
}
|
|
248
248
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
249
249
|
minVersion: "12.0.0",
|
|
250
|
-
version: "22.0.0
|
|
250
|
+
version: "22.0.0",
|
|
251
251
|
ngImport: i0,
|
|
252
252
|
type: CdkDialogContainer,
|
|
253
253
|
deps: [],
|
|
@@ -255,7 +255,7 @@ class CdkDialogContainer extends BasePortalOutlet {
|
|
|
255
255
|
});
|
|
256
256
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
257
257
|
minVersion: "14.0.0",
|
|
258
|
-
version: "22.0.0
|
|
258
|
+
version: "22.0.0",
|
|
259
259
|
type: CdkDialogContainer,
|
|
260
260
|
isStandalone: true,
|
|
261
261
|
selector: "cdk-dialog-container",
|
|
@@ -298,7 +298,7 @@ class CdkDialogContainer extends BasePortalOutlet {
|
|
|
298
298
|
}
|
|
299
299
|
i0.ɵɵngDeclareClassMetadata({
|
|
300
300
|
minVersion: "12.0.0",
|
|
301
|
-
version: "22.0.0
|
|
301
|
+
version: "22.0.0",
|
|
302
302
|
ngImport: i0,
|
|
303
303
|
type: CdkDialogContainer,
|
|
304
304
|
decorators: [{
|
|
@@ -648,7 +648,7 @@ class Dialog {
|
|
|
648
648
|
}
|
|
649
649
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
650
650
|
minVersion: "12.0.0",
|
|
651
|
-
version: "22.0.0
|
|
651
|
+
version: "22.0.0",
|
|
652
652
|
ngImport: i0,
|
|
653
653
|
type: Dialog,
|
|
654
654
|
deps: [],
|
|
@@ -656,14 +656,14 @@ class Dialog {
|
|
|
656
656
|
});
|
|
657
657
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
658
658
|
minVersion: "22.0.0",
|
|
659
|
-
version: "22.0.0
|
|
659
|
+
version: "22.0.0",
|
|
660
660
|
ngImport: i0,
|
|
661
661
|
type: Dialog
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
664
|
i0.ɵɵngDeclareClassMetadata({
|
|
665
665
|
minVersion: "12.0.0",
|
|
666
|
-
version: "22.0.0
|
|
666
|
+
version: "22.0.0",
|
|
667
667
|
ngImport: i0,
|
|
668
668
|
type: Dialog,
|
|
669
669
|
decorators: [{
|
|
@@ -680,7 +680,7 @@ function reverseForEach(items, callback) {
|
|
|
680
680
|
class DialogModule {
|
|
681
681
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
682
682
|
minVersion: "12.0.0",
|
|
683
|
-
version: "22.0.0
|
|
683
|
+
version: "22.0.0",
|
|
684
684
|
ngImport: i0,
|
|
685
685
|
type: DialogModule,
|
|
686
686
|
deps: [],
|
|
@@ -688,7 +688,7 @@ class DialogModule {
|
|
|
688
688
|
});
|
|
689
689
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
690
690
|
minVersion: "14.0.0",
|
|
691
|
-
version: "22.0.0
|
|
691
|
+
version: "22.0.0",
|
|
692
692
|
ngImport: i0,
|
|
693
693
|
type: DialogModule,
|
|
694
694
|
imports: [OverlayModule, PortalModule, A11yModule, CdkDialogContainer],
|
|
@@ -696,7 +696,7 @@ class DialogModule {
|
|
|
696
696
|
});
|
|
697
697
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
698
698
|
minVersion: "12.0.0",
|
|
699
|
-
version: "22.0.0
|
|
699
|
+
version: "22.0.0",
|
|
700
700
|
ngImport: i0,
|
|
701
701
|
type: DialogModule,
|
|
702
702
|
providers: [Dialog],
|
|
@@ -705,7 +705,7 @@ class DialogModule {
|
|
|
705
705
|
}
|
|
706
706
|
i0.ɵɵngDeclareClassMetadata({
|
|
707
707
|
minVersion: "12.0.0",
|
|
708
|
-
version: "22.0.0
|
|
708
|
+
version: "22.0.0",
|
|
709
709
|
ngImport: i0,
|
|
710
710
|
type: DialogModule,
|
|
711
711
|
decorators: [{
|