@angular/cdk 21.0.0-next.8 → 21.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/_adev_assets/cdk_drag_drop.json +13 -12
  2. package/_adev_assets/cdk_testing.json +15 -25
  3. package/_adev_assets/cdk_testing_protractor.json +1 -1
  4. package/_adev_assets/cdk_testing_selenium_webdriver.json +1 -1
  5. package/_adev_assets/cdk_testing_testbed.json +1 -1
  6. package/fesm2022/_a11y-module-chunk.mjs +755 -869
  7. package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
  8. package/fesm2022/_activedescendant-key-manager-chunk.mjs +8 -8
  9. package/fesm2022/_activedescendant-key-manager-chunk.mjs.map +1 -1
  10. package/fesm2022/_array-chunk.mjs +1 -1
  11. package/fesm2022/_array-chunk.mjs.map +1 -1
  12. package/fesm2022/_breakpoints-observer-chunk.mjs +149 -152
  13. package/fesm2022/_breakpoints-observer-chunk.mjs.map +1 -1
  14. package/fesm2022/_css-pixel-value-chunk.mjs +4 -5
  15. package/fesm2022/_css-pixel-value-chunk.mjs.map +1 -1
  16. package/fesm2022/_data-source-chunk.mjs +2 -8
  17. package/fesm2022/_data-source-chunk.mjs.map +1 -1
  18. package/fesm2022/_directionality-chunk.mjs +54 -54
  19. package/fesm2022/_directionality-chunk.mjs.map +1 -1
  20. package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs +25 -36
  21. package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs.map +1 -1
  22. package/fesm2022/_element-chunk.mjs +6 -17
  23. package/fesm2022/_element-chunk.mjs.map +1 -1
  24. package/fesm2022/_fake-event-detection-chunk.mjs +3 -17
  25. package/fesm2022/_fake-event-detection-chunk.mjs.map +1 -1
  26. package/fesm2022/_focus-key-manager-chunk.mjs +10 -14
  27. package/fesm2022/_focus-key-manager-chunk.mjs.map +1 -1
  28. package/fesm2022/_focus-monitor-chunk.mjs +376 -566
  29. package/fesm2022/_focus-monitor-chunk.mjs.map +1 -1
  30. package/fesm2022/_id-generator-chunk.mjs +36 -27
  31. package/fesm2022/_id-generator-chunk.mjs.map +1 -1
  32. package/fesm2022/_keycodes-chunk.mjs +9 -9
  33. package/fesm2022/_keycodes-chunk.mjs.map +1 -1
  34. package/fesm2022/_list-key-manager-chunk.mjs +248 -336
  35. package/fesm2022/_list-key-manager-chunk.mjs.map +1 -1
  36. package/fesm2022/_overlay-module-chunk.mjs +2534 -2948
  37. package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
  38. package/fesm2022/_passive-listeners-chunk.mjs +10 -22
  39. package/fesm2022/_passive-listeners-chunk.mjs.map +1 -1
  40. package/fesm2022/_platform-chunk.mjs +42 -65
  41. package/fesm2022/_platform-chunk.mjs.map +1 -1
  42. package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs +78 -134
  43. package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs.map +1 -1
  44. package/fesm2022/_scrolling-chunk.mjs +44 -85
  45. package/fesm2022/_scrolling-chunk.mjs.map +1 -1
  46. package/fesm2022/_selection-model-chunk.mjs +138 -209
  47. package/fesm2022/_selection-model-chunk.mjs.map +1 -1
  48. package/fesm2022/_shadow-dom-chunk.mjs +21 -35
  49. package/fesm2022/_shadow-dom-chunk.mjs.map +1 -1
  50. package/fesm2022/_style-loader-chunk.mjs +50 -37
  51. package/fesm2022/_style-loader-chunk.mjs.map +1 -1
  52. package/fesm2022/_test-environment-chunk.mjs +2 -14
  53. package/fesm2022/_test-environment-chunk.mjs.map +1 -1
  54. package/fesm2022/_tree-key-manager-chunk.mjs +229 -308
  55. package/fesm2022/_tree-key-manager-chunk.mjs.map +1 -1
  56. package/fesm2022/_typeahead-chunk.mjs +52 -74
  57. package/fesm2022/_typeahead-chunk.mjs.map +1 -1
  58. package/fesm2022/_unique-selection-dispatcher-chunk.mjs +43 -40
  59. package/fesm2022/_unique-selection-dispatcher-chunk.mjs.map +1 -1
  60. package/fesm2022/a11y.mjs +351 -449
  61. package/fesm2022/a11y.mjs.map +1 -1
  62. package/fesm2022/accordion.mjs +254 -192
  63. package/fesm2022/accordion.mjs.map +1 -1
  64. package/fesm2022/bidi.mjs +121 -64
  65. package/fesm2022/bidi.mjs.map +1 -1
  66. package/fesm2022/cdk.mjs +1 -2
  67. package/fesm2022/cdk.mjs.map +1 -1
  68. package/fesm2022/clipboard.mjs +208 -186
  69. package/fesm2022/clipboard.mjs.map +1 -1
  70. package/fesm2022/coercion-private.mjs +4 -8
  71. package/fesm2022/coercion-private.mjs.map +1 -1
  72. package/fesm2022/coercion.mjs +11 -29
  73. package/fesm2022/coercion.mjs.map +1 -1
  74. package/fesm2022/dialog.mjs +660 -808
  75. package/fesm2022/dialog.mjs.map +1 -1
  76. package/fesm2022/drag-drop.mjs +3347 -4286
  77. package/fesm2022/drag-drop.mjs.map +1 -1
  78. package/fesm2022/keycodes.mjs +4 -8
  79. package/fesm2022/keycodes.mjs.map +1 -1
  80. package/fesm2022/layout.mjs +44 -26
  81. package/fesm2022/layout.mjs.map +1 -1
  82. package/fesm2022/listbox.mjs +841 -895
  83. package/fesm2022/listbox.mjs.map +1 -1
  84. package/fesm2022/menu.mjs +1942 -1858
  85. package/fesm2022/menu.mjs.map +1 -1
  86. package/fesm2022/observers-private.mjs +88 -106
  87. package/fesm2022/observers-private.mjs.map +1 -1
  88. package/fesm2022/observers.mjs +262 -184
  89. package/fesm2022/observers.mjs.map +1 -1
  90. package/fesm2022/overlay.mjs +72 -68
  91. package/fesm2022/overlay.mjs.map +1 -1
  92. package/fesm2022/platform.mjs +43 -54
  93. package/fesm2022/platform.mjs.map +1 -1
  94. package/fesm2022/portal.mjs +402 -560
  95. package/fesm2022/portal.mjs.map +1 -1
  96. package/fesm2022/private.mjs +38 -10
  97. package/fesm2022/private.mjs.map +1 -1
  98. package/fesm2022/scrolling.mjs +1323 -1400
  99. package/fesm2022/scrolling.mjs.map +1 -1
  100. package/fesm2022/stepper.mjs +758 -590
  101. package/fesm2022/stepper.mjs.map +1 -1
  102. package/fesm2022/table.mjs +2327 -2319
  103. package/fesm2022/table.mjs.map +1 -1
  104. package/fesm2022/testing-selenium-webdriver.mjs +252 -325
  105. package/fesm2022/testing-selenium-webdriver.mjs.map +1 -1
  106. package/fesm2022/testing-testbed.mjs +592 -709
  107. package/fesm2022/testing-testbed.mjs.map +1 -1
  108. package/fesm2022/testing.mjs +368 -889
  109. package/fesm2022/testing.mjs.map +1 -1
  110. package/fesm2022/text-field.mjs +459 -388
  111. package/fesm2022/text-field.mjs.map +1 -1
  112. package/fesm2022/tree.mjs +1483 -1731
  113. package/fesm2022/tree.mjs.map +1 -1
  114. package/overlay/_index.scss +28 -0
  115. package/overlay-prebuilt.css +1 -1
  116. package/package.json +1 -1
  117. package/schematics/ng-add/index.js +1 -1
  118. package/types/_harness-environment-chunk.d.ts +1 -2
  119. package/types/_overlay-module-chunk.d.ts +59 -7
  120. package/types/_portal-directives-chunk.d.ts +2 -18
  121. package/types/accordion.d.ts +3 -1
  122. package/types/dialog.d.ts +1 -1
  123. package/types/overlay.d.ts +6 -2
  124. package/types/portal.d.ts +1 -1
@@ -4,213 +4,275 @@ import { Subject, Subscription } from 'rxjs';
4
4
  import { _IdGenerator } from './_id-generator-chunk.mjs';
5
5
  import { UniqueSelectionDispatcher } from './_unique-selection-dispatcher-chunk.mjs';
6
6
 
7
- /**
8
- * Injection token that can be used to reference instances of `CdkAccordion`. It serves
9
- * as alternative token to the actual `CdkAccordion` class which could cause unnecessary
10
- * retention of the class and its directive metadata.
11
- */
12
7
  const CDK_ACCORDION = new InjectionToken('CdkAccordion');
13
- /**
14
- * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.
15
- */
16
8
  class CdkAccordion {
17
- /** Emits when the state of the accordion changes */
18
- _stateChanges = new Subject();
19
- /** Stream that emits true/false when openAll/closeAll is triggered. */
20
- _openCloseAllActions = new Subject();
21
- /** A readonly id value to use for unique selection coordination. */
22
- id = inject(_IdGenerator).getId('cdk-accordion-');
23
- /** Whether the accordion should allow multiple expanded accordion items simultaneously. */
24
- multi = false;
25
- /** Opens all enabled accordion items in an accordion where multi is enabled. */
26
- openAll() {
27
- if (this.multi) {
28
- this._openCloseAllActions.next(true);
29
- }
9
+ _stateChanges = new Subject();
10
+ _openCloseAllActions = new Subject();
11
+ id = inject(_IdGenerator).getId('cdk-accordion-');
12
+ multi = false;
13
+ openAll() {
14
+ if (this.multi) {
15
+ this._openCloseAllActions.next(true);
30
16
  }
31
- /** Closes all enabled accordion items. */
32
- closeAll() {
33
- this._openCloseAllActions.next(false);
34
- }
35
- ngOnChanges(changes) {
36
- this._stateChanges.next(changes);
37
- }
38
- ngOnDestroy() {
39
- this._stateChanges.complete();
40
- this._openCloseAllActions.complete();
41
- }
42
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkAccordion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
43
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-next.2", type: CdkAccordion, isStandalone: true, selector: "cdk-accordion, [cdkAccordion]", inputs: { multi: ["multi", "multi", booleanAttribute] }, providers: [{ provide: CDK_ACCORDION, useExisting: CdkAccordion }], exportAs: ["cdkAccordion"], usesOnChanges: true, ngImport: i0 });
17
+ }
18
+ closeAll() {
19
+ this._openCloseAllActions.next(false);
20
+ }
21
+ ngOnChanges(changes) {
22
+ this._stateChanges.next(changes);
23
+ }
24
+ ngOnDestroy() {
25
+ this._stateChanges.complete();
26
+ this._openCloseAllActions.complete();
27
+ }
28
+ static ɵfac = i0.ɵɵngDeclareFactory({
29
+ minVersion: "12.0.0",
30
+ version: "20.2.0-next.2",
31
+ ngImport: i0,
32
+ type: CdkAccordion,
33
+ deps: [],
34
+ target: i0.ɵɵFactoryTarget.Directive
35
+ });
36
+ static ɵdir = i0.ɵɵngDeclareDirective({
37
+ minVersion: "16.1.0",
38
+ version: "20.2.0-next.2",
39
+ type: CdkAccordion,
40
+ isStandalone: true,
41
+ selector: "cdk-accordion, [cdkAccordion]",
42
+ inputs: {
43
+ multi: ["multi", "multi", booleanAttribute]
44
+ },
45
+ providers: [{
46
+ provide: CDK_ACCORDION,
47
+ useExisting: CdkAccordion
48
+ }],
49
+ exportAs: ["cdkAccordion"],
50
+ usesOnChanges: true,
51
+ ngImport: i0
52
+ });
44
53
  }
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkAccordion, decorators: [{
46
- type: Directive,
47
- args: [{
48
- selector: 'cdk-accordion, [cdkAccordion]',
49
- exportAs: 'cdkAccordion',
50
- providers: [{ provide: CDK_ACCORDION, useExisting: CdkAccordion }],
51
- }]
52
- }], propDecorators: { multi: [{
53
- type: Input,
54
- args: [{ transform: booleanAttribute }]
55
- }] } });
54
+ i0.ɵɵngDeclareClassMetadata({
55
+ minVersion: "12.0.0",
56
+ version: "20.2.0-next.2",
57
+ ngImport: i0,
58
+ type: CdkAccordion,
59
+ decorators: [{
60
+ type: Directive,
61
+ args: [{
62
+ selector: 'cdk-accordion, [cdkAccordion]',
63
+ exportAs: 'cdkAccordion',
64
+ providers: [{
65
+ provide: CDK_ACCORDION,
66
+ useExisting: CdkAccordion
67
+ }]
68
+ }]
69
+ }],
70
+ propDecorators: {
71
+ multi: [{
72
+ type: Input,
73
+ args: [{
74
+ transform: booleanAttribute
75
+ }]
76
+ }]
77
+ }
78
+ });
56
79
 
57
- /**
58
- * A basic directive expected to be extended and decorated as a component. Sets up all
59
- * events and attributes needed to be managed by a CdkAccordion parent.
60
- */
61
80
  class CdkAccordionItem {
62
- accordion = inject(CDK_ACCORDION, { optional: true, skipSelf: true });
63
- _changeDetectorRef = inject(ChangeDetectorRef);
64
- _expansionDispatcher = inject(UniqueSelectionDispatcher);
65
- /** Subscription to openAll/closeAll events. */
66
- _openCloseAllSubscription = Subscription.EMPTY;
67
- /** Event emitted every time the AccordionItem is closed. */
68
- closed = new EventEmitter();
69
- /** Event emitted every time the AccordionItem is opened. */
70
- opened = new EventEmitter();
71
- /** Event emitted when the AccordionItem is destroyed. */
72
- destroyed = new EventEmitter();
73
- /**
74
- * Emits whenever the expanded state of the accordion changes.
75
- * Primarily used to facilitate two-way binding.
76
- * @docs-private
77
- */
78
- expandedChange = new EventEmitter();
79
- /** The unique AccordionItem id. */
80
- id = inject(_IdGenerator).getId('cdk-accordion-child-');
81
- /** Whether the AccordionItem is expanded. */
82
- get expanded() {
83
- return this._expanded;
84
- }
85
- set expanded(expanded) {
86
- // Only emit events and update the internal value if the value changes.
87
- if (this._expanded !== expanded) {
88
- this._expanded = expanded;
89
- this.expandedChange.emit(expanded);
90
- if (expanded) {
91
- this.opened.emit();
92
- /**
93
- * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,
94
- * the name value is the id of the accordion.
95
- */
96
- const accordionId = this.accordion ? this.accordion.id : this.id;
97
- this._expansionDispatcher.notify(this.id, accordionId);
98
- }
99
- else {
100
- this.closed.emit();
101
- }
102
- // Ensures that the animation will run when the value is set outside of an `@Input`.
103
- // This includes cases like the open, close and toggle methods.
104
- this._changeDetectorRef.markForCheck();
105
- }
106
- }
107
- _expanded = false;
108
- /** Whether the AccordionItem is disabled. */
109
- get disabled() {
110
- return this._disabled();
111
- }
112
- set disabled(value) {
113
- this._disabled.set(value);
114
- }
115
- _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
116
- /** Unregister function for _expansionDispatcher. */
117
- _removeUniqueSelectionListener = () => { };
118
- constructor() { }
119
- ngOnInit() {
120
- this._removeUniqueSelectionListener = this._expansionDispatcher.listen((id, accordionId) => {
121
- if (this.accordion &&
122
- !this.accordion.multi &&
123
- this.accordion.id === accordionId &&
124
- this.id !== id) {
125
- this.expanded = false;
126
- }
127
- });
128
- // When an accordion item is hosted in an accordion, subscribe to open/close events.
129
- if (this.accordion) {
130
- this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();
131
- }
132
- }
133
- /** Emits an event for the accordion item being destroyed. */
134
- ngOnDestroy() {
135
- this.opened.complete();
136
- this.closed.complete();
137
- this.destroyed.emit();
138
- this.destroyed.complete();
139
- this._removeUniqueSelectionListener();
140
- this._openCloseAllSubscription.unsubscribe();
81
+ accordion = inject(CDK_ACCORDION, {
82
+ optional: true,
83
+ skipSelf: true
84
+ });
85
+ _changeDetectorRef = inject(ChangeDetectorRef);
86
+ _expansionDispatcher = inject(UniqueSelectionDispatcher);
87
+ _openCloseAllSubscription = Subscription.EMPTY;
88
+ closed = new EventEmitter();
89
+ opened = new EventEmitter();
90
+ destroyed = new EventEmitter();
91
+ expandedChange = new EventEmitter();
92
+ id = inject(_IdGenerator).getId('cdk-accordion-child-');
93
+ get expanded() {
94
+ return this._expanded;
95
+ }
96
+ set expanded(expanded) {
97
+ if (this._expanded !== expanded) {
98
+ this._expanded = expanded;
99
+ this.expandedChange.emit(expanded);
100
+ if (expanded) {
101
+ this.opened.emit();
102
+ const accordionId = this.accordion ? this.accordion.id : this.id;
103
+ this._expansionDispatcher.notify(this.id, accordionId);
104
+ } else {
105
+ this.closed.emit();
106
+ }
107
+ this._changeDetectorRef.markForCheck();
141
108
  }
142
- /** Toggles the expanded state of the accordion item. */
143
- toggle() {
144
- if (!this.disabled) {
145
- this.expanded = !this.expanded;
146
- }
109
+ }
110
+ _expanded = false;
111
+ get disabled() {
112
+ return this._disabled();
113
+ }
114
+ set disabled(value) {
115
+ this._disabled.set(value);
116
+ }
117
+ _disabled = signal(false, ...(ngDevMode ? [{
118
+ debugName: "_disabled"
119
+ }] : []));
120
+ _removeUniqueSelectionListener = () => {};
121
+ constructor() {}
122
+ ngOnInit() {
123
+ this._removeUniqueSelectionListener = this._expansionDispatcher.listen((id, accordionId) => {
124
+ if (this.accordion && !this.accordion.multi && this.accordion.id === accordionId && this.id !== id) {
125
+ this.expanded = false;
126
+ }
127
+ });
128
+ if (this.accordion) {
129
+ this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();
147
130
  }
148
- /** Sets the expanded state of the accordion item to false. */
149
- close() {
150
- if (!this.disabled) {
151
- this.expanded = false;
152
- }
131
+ }
132
+ ngOnDestroy() {
133
+ this.opened.complete();
134
+ this.closed.complete();
135
+ this.destroyed.emit();
136
+ this.destroyed.complete();
137
+ this._removeUniqueSelectionListener();
138
+ this._openCloseAllSubscription.unsubscribe();
139
+ }
140
+ toggle() {
141
+ if (!this.disabled) {
142
+ this.expanded = !this.expanded;
153
143
  }
154
- /** Sets the expanded state of the accordion item to true. */
155
- open() {
156
- if (!this.disabled) {
157
- this.expanded = true;
158
- }
144
+ }
145
+ close() {
146
+ if (!this.disabled) {
147
+ this.expanded = false;
159
148
  }
160
- _subscribeToOpenCloseAllActions() {
161
- return this.accordion._openCloseAllActions.subscribe(expanded => {
162
- // Only change expanded state if item is enabled
163
- if (!this.disabled) {
164
- this.expanded = expanded;
165
- }
166
- });
149
+ }
150
+ open() {
151
+ if (!this.disabled) {
152
+ this.expanded = true;
167
153
  }
168
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkAccordionItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
169
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-next.2", type: CdkAccordionItem, isStandalone: true, selector: "cdk-accordion-item, [cdkAccordionItem]", inputs: { expanded: ["expanded", "expanded", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { closed: "closed", opened: "opened", destroyed: "destroyed", expandedChange: "expandedChange" }, providers: [
170
- // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from
171
- // registering to the same accordion.
172
- { provide: CDK_ACCORDION, useValue: undefined },
173
- ], exportAs: ["cdkAccordionItem"], ngImport: i0 });
154
+ }
155
+ _subscribeToOpenCloseAllActions() {
156
+ return this.accordion._openCloseAllActions.subscribe(expanded => {
157
+ if (!this.disabled) {
158
+ this.expanded = expanded;
159
+ }
160
+ });
161
+ }
162
+ static ɵfac = i0.ɵɵngDeclareFactory({
163
+ minVersion: "12.0.0",
164
+ version: "20.2.0-next.2",
165
+ ngImport: i0,
166
+ type: CdkAccordionItem,
167
+ deps: [],
168
+ target: i0.ɵɵFactoryTarget.Directive
169
+ });
170
+ static ɵdir = i0.ɵɵngDeclareDirective({
171
+ minVersion: "16.1.0",
172
+ version: "20.2.0-next.2",
173
+ type: CdkAccordionItem,
174
+ isStandalone: true,
175
+ selector: "cdk-accordion-item, [cdkAccordionItem]",
176
+ inputs: {
177
+ expanded: ["expanded", "expanded", booleanAttribute],
178
+ disabled: ["disabled", "disabled", booleanAttribute]
179
+ },
180
+ outputs: {
181
+ closed: "closed",
182
+ opened: "opened",
183
+ destroyed: "destroyed",
184
+ expandedChange: "expandedChange"
185
+ },
186
+ providers: [{
187
+ provide: CDK_ACCORDION,
188
+ useValue: undefined
189
+ }],
190
+ exportAs: ["cdkAccordionItem"],
191
+ ngImport: i0
192
+ });
174
193
  }
175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkAccordionItem, decorators: [{
176
- type: Directive,
177
- args: [{
178
- selector: 'cdk-accordion-item, [cdkAccordionItem]',
179
- exportAs: 'cdkAccordionItem',
180
- providers: [
181
- // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from
182
- // registering to the same accordion.
183
- { provide: CDK_ACCORDION, useValue: undefined },
184
- ],
185
- }]
186
- }], ctorParameters: () => [], propDecorators: { closed: [{
187
- type: Output
188
- }], opened: [{
189
- type: Output
190
- }], destroyed: [{
191
- type: Output
192
- }], expandedChange: [{
193
- type: Output
194
- }], expanded: [{
195
- type: Input,
196
- args: [{ transform: booleanAttribute }]
197
- }], disabled: [{
198
- type: Input,
199
- args: [{ transform: booleanAttribute }]
200
- }] } });
194
+ i0.ɵɵngDeclareClassMetadata({
195
+ minVersion: "12.0.0",
196
+ version: "20.2.0-next.2",
197
+ ngImport: i0,
198
+ type: CdkAccordionItem,
199
+ decorators: [{
200
+ type: Directive,
201
+ args: [{
202
+ selector: 'cdk-accordion-item, [cdkAccordionItem]',
203
+ exportAs: 'cdkAccordionItem',
204
+ providers: [{
205
+ provide: CDK_ACCORDION,
206
+ useValue: undefined
207
+ }]
208
+ }]
209
+ }],
210
+ ctorParameters: () => [],
211
+ propDecorators: {
212
+ closed: [{
213
+ type: Output
214
+ }],
215
+ opened: [{
216
+ type: Output
217
+ }],
218
+ destroyed: [{
219
+ type: Output
220
+ }],
221
+ expandedChange: [{
222
+ type: Output
223
+ }],
224
+ expanded: [{
225
+ type: Input,
226
+ args: [{
227
+ transform: booleanAttribute
228
+ }]
229
+ }],
230
+ disabled: [{
231
+ type: Input,
232
+ args: [{
233
+ transform: booleanAttribute
234
+ }]
235
+ }]
236
+ }
237
+ });
201
238
 
202
239
  class CdkAccordionModule {
203
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
204
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkAccordionModule, imports: [CdkAccordion, CdkAccordionItem], exports: [CdkAccordion, CdkAccordionItem] });
205
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkAccordionModule });
240
+ static ɵfac = i0.ɵɵngDeclareFactory({
241
+ minVersion: "12.0.0",
242
+ version: "20.2.0-next.2",
243
+ ngImport: i0,
244
+ type: CdkAccordionModule,
245
+ deps: [],
246
+ target: i0.ɵɵFactoryTarget.NgModule
247
+ });
248
+ static ɵmod = i0.ɵɵngDeclareNgModule({
249
+ minVersion: "14.0.0",
250
+ version: "20.2.0-next.2",
251
+ ngImport: i0,
252
+ type: CdkAccordionModule,
253
+ imports: [CdkAccordion, CdkAccordionItem],
254
+ exports: [CdkAccordion, CdkAccordionItem]
255
+ });
256
+ static ɵinj = i0.ɵɵngDeclareInjector({
257
+ minVersion: "12.0.0",
258
+ version: "20.2.0-next.2",
259
+ ngImport: i0,
260
+ type: CdkAccordionModule
261
+ });
206
262
  }
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkAccordionModule, decorators: [{
208
- type: NgModule,
209
- args: [{
210
- imports: [CdkAccordion, CdkAccordionItem],
211
- exports: [CdkAccordion, CdkAccordionItem],
212
- }]
213
- }] });
263
+ i0.ɵɵngDeclareClassMetadata({
264
+ minVersion: "12.0.0",
265
+ version: "20.2.0-next.2",
266
+ ngImport: i0,
267
+ type: CdkAccordionModule,
268
+ decorators: [{
269
+ type: NgModule,
270
+ args: [{
271
+ imports: [CdkAccordion, CdkAccordionItem],
272
+ exports: [CdkAccordion, CdkAccordionItem]
273
+ }]
274
+ }]
275
+ });
214
276
 
215
277
  export { CDK_ACCORDION, CdkAccordion, CdkAccordionItem, CdkAccordionModule };
216
278
  //# sourceMappingURL=accordion.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/accordion/accordion.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/accordion/accordion-item.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/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>();\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) {\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 constructor(...args: unknown[]);\n constructor() {}\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":[],"mappings":";;;;;;AAqBA;;;;AAIG;MACU,aAAa,GAAG,IAAI,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E7B,kBAAkB,EAAA,CAAA;;kGAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;AACzC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;AAC1C,iBAAA;;;;;"}
1
+ {"version":3,"file":"accordion.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/accordion/accordion.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/accordion/accordion-item.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/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>();\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) {\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 constructor(...args: unknown[]);\n constructor() {}\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","_stateChanges","Subject","id","inject","_IdGenerator","getId","multi","openAll","transform","booleanAttribute","CdkAccordionItem","closed","EventEmitter","opened","expandedChange","expanded","_expanded","emit","accordionId","accordion","_expansionDispatcher","notify","_changeDetectorRef","markForCheck","disabled","_disabled","set","value","debugName","_removeUniqueSelectionListener","ngOnInit","listen","_subscribeToOpenCloseAllActions","complete","_openCloseAllSubscription","unsubscribe","decorators","args","selector","providers","useValue","undefined","ctorParameters","propDecorators","Output","type","Input","ɵmod","i0","ɵɵngDeclareNgModule","minVersion","version","ngImport","CdkAccordionModule","imports","CdkAccordion","exports"],"mappings":";;;;;;AA4Ca,MAAAA,aAA8B,GAAA,IAACC,cAAA,CAAA,cAAA;;AAQtCC,EAAAA,aAAA,OAAA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