@angular/aria 22.0.0-next.3 → 22.0.0-next.5
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/_accordion-chunk.mjs +5 -5
- package/fesm2022/_accordion-chunk.mjs.map +1 -1
- package/fesm2022/_click-event-manager-chunk.mjs +45 -0
- package/fesm2022/_click-event-manager-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-chunk.mjs +8 -8
- package/fesm2022/_combobox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-listbox-chunk.mjs +17 -7
- package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-tree-chunk.mjs +16 -6
- package/fesm2022/_combobox-tree-chunk.mjs.map +1 -1
- package/fesm2022/_deferred-content-chunk.mjs +6 -6
- package/fesm2022/_element-chunk.mjs +6 -0
- package/fesm2022/_element-chunk.mjs.map +1 -0
- package/fesm2022/_list-chunk.mjs.map +1 -1
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -1
- package/fesm2022/_list-typeahead-chunk.mjs.map +1 -1
- package/fesm2022/_menu-chunk.mjs +33 -12
- package/fesm2022/_menu-chunk.mjs.map +1 -1
- package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -1
- package/fesm2022/_signal-like-chunk.mjs.map +1 -1
- package/fesm2022/_tabs-chunk.mjs +15 -5
- package/fesm2022/_tabs-chunk.mjs.map +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs +13 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
- package/fesm2022/_widget-chunk.mjs +17 -169
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion-testing.mjs +61 -0
- package/fesm2022/accordion-testing.mjs.map +1 -0
- package/fesm2022/accordion.mjs +217 -192
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +15 -15
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +26 -97
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox-testing.mjs +55 -0
- package/fesm2022/listbox-testing.mjs.map +1 -0
- package/fesm2022/listbox.mjs +13 -20
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs +75 -0
- package/fesm2022/menu-testing.mjs.map +1 -0
- package/fesm2022/menu.mjs +18 -22
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +2 -0
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs +57 -0
- package/fesm2022/tabs-testing.mjs.map +1 -0
- package/fesm2022/tabs.mjs +22 -32
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs +56 -0
- package/fesm2022/toolbar-testing.mjs.map +1 -0
- package/fesm2022/toolbar.mjs +20 -26
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs +88 -0
- package/fesm2022/tree-testing.mjs.map +1 -0
- package/fesm2022/tree.mjs +16 -26
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +26 -2
- package/resources/code-examples.db +0 -0
- package/types/_accordion-chunk.d.ts +10 -9
- package/types/_click-event-manager-chunk.d.ts +27 -0
- package/types/_combobox-chunk.d.ts +23 -23
- package/types/_element-chunk.d.ts +10 -0
- package/types/_expansion-chunk.d.ts +1 -1
- package/types/_grid-chunk.d.ts +13 -51
- package/types/_keyboard-event-manager-chunk.d.ts +2 -2
- package/types/_list-chunk.d.ts +19 -18
- package/types/_list-navigation-chunk.d.ts +6 -16
- package/types/_listbox-chunk.d.ts +37 -30
- package/types/_menu-chunk.d.ts +60 -56
- package/types/_pointer-event-manager-chunk.d.ts +1 -1
- package/types/_signal-like-chunk.d.ts +14 -0
- package/types/_tabs-chunk.d.ts +13 -6
- package/types/_toolbar-chunk.d.ts +6 -1
- package/types/_tree-chunk.d.ts +24 -17
- package/types/accordion-testing.d.ts +63 -0
- package/types/accordion.d.ts +69 -55
- package/types/combobox.d.ts +6 -5
- package/types/grid.d.ts +8 -14
- package/types/listbox-testing.d.ts +39 -0
- package/types/listbox.d.ts +21 -22
- package/types/menu-testing.d.ts +50 -0
- package/types/menu.d.ts +4 -3
- package/types/private.d.ts +48 -45
- package/types/tabs-testing.d.ts +57 -0
- package/types/tabs.d.ts +4 -9
- package/types/toolbar-testing.d.ts +72 -0
- package/types/toolbar.d.ts +3 -5
- package/types/tree-testing.d.ts +75 -0
- package/types/tree.d.ts +5 -9
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ComponentHarness, HarnessPredicate, ContentContainerComponentHarness } from '@angular/cdk/testing';
|
|
2
|
+
|
|
3
|
+
var AccordionSection;
|
|
4
|
+
(function (AccordionSection) {
|
|
5
|
+
AccordionSection["TRIGGER"] = "[ngAccordionTrigger]";
|
|
6
|
+
AccordionSection["PANEL"] = "[ngAccordionPanel]";
|
|
7
|
+
})(AccordionSection || (AccordionSection = {}));
|
|
8
|
+
class AccordionHarness extends ContentContainerComponentHarness {
|
|
9
|
+
static hostSelector = '[ngAccordionTrigger]';
|
|
10
|
+
static with(options = {}) {
|
|
11
|
+
return new HarnessPredicate(AccordionHarness, options).addOption('title', options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title)).addOption('expanded', options.expanded, async (harness, expanded) => (await harness.isExpanded()) === expanded).addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);
|
|
12
|
+
}
|
|
13
|
+
async getRootHarnessLoader() {
|
|
14
|
+
const panelId = await (await this.host()).getAttribute('aria-controls');
|
|
15
|
+
const documentRoot = await this.documentRootLocatorFactory().rootHarnessLoader();
|
|
16
|
+
return documentRoot.getChildLoader(`[ngAccordionPanel][id="${panelId}"]`);
|
|
17
|
+
}
|
|
18
|
+
async isExpanded() {
|
|
19
|
+
return (await (await this.host()).getAttribute('aria-expanded')) === 'true';
|
|
20
|
+
}
|
|
21
|
+
async isDisabled() {
|
|
22
|
+
return (await (await this.host()).getAttribute('aria-disabled')) === 'true';
|
|
23
|
+
}
|
|
24
|
+
async getTitle() {
|
|
25
|
+
return (await this.host()).text();
|
|
26
|
+
}
|
|
27
|
+
async toggle() {
|
|
28
|
+
await (await this.host()).click();
|
|
29
|
+
}
|
|
30
|
+
async expand() {
|
|
31
|
+
if (!(await this.isExpanded())) {
|
|
32
|
+
await this.toggle();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async collapse() {
|
|
36
|
+
if (await this.isExpanded()) {
|
|
37
|
+
await this.toggle();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async focus() {
|
|
41
|
+
await (await this.host()).focus();
|
|
42
|
+
}
|
|
43
|
+
async blur() {
|
|
44
|
+
await (await this.host()).blur();
|
|
45
|
+
}
|
|
46
|
+
async isFocused() {
|
|
47
|
+
return (await this.host()).isFocused();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
class AccordionGroupHarness extends ComponentHarness {
|
|
51
|
+
static hostSelector = '[ngAccordionGroup]';
|
|
52
|
+
static with(options = {}) {
|
|
53
|
+
return new HarnessPredicate(AccordionGroupHarness, options);
|
|
54
|
+
}
|
|
55
|
+
async getAccordions(filters = {}) {
|
|
56
|
+
return this.locatorForAll(AccordionHarness.with(filters))();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { AccordionGroupHarness, AccordionHarness, AccordionSection };
|
|
61
|
+
//# sourceMappingURL=accordion-testing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/testing/accordion-harness.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 ComponentHarness,\n ContentContainerComponentHarness,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {AccordionHarnessFilters, AccordionGroupHarnessFilters} from './accordion-harness-filters';\n\n/** Selectors for the sections that may contain user content. */\nexport enum AccordionSection {\n TRIGGER = '[ngAccordionTrigger]',\n PANEL = '[ngAccordionPanel]',\n}\n\n/** Harness for interacting with a standard ngAccordion item in tests. */\nexport class AccordionHarness extends ContentContainerComponentHarness<AccordionSection> {\n static hostSelector = '[ngAccordionTrigger]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for an accordion\n * with specific attributes.\n */\n static with(options: AccordionHarnessFilters = {}): HarnessPredicate<AccordionHarness> {\n return new HarnessPredicate(AccordionHarness, options)\n .addOption('title', options.title, (harness, title) =>\n HarnessPredicate.stringMatches(harness.getTitle(), title),\n )\n .addOption(\n 'expanded',\n options.expanded,\n async (harness, expanded) => (await harness.isExpanded()) === expanded,\n )\n .addOption(\n 'disabled',\n options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled,\n );\n }\n\n /** Overrides the internal loader to automatically resolve queries inside the associated panel. */\n protected override async getRootHarnessLoader() {\n const panelId = await (await this.host()).getAttribute('aria-controls');\n const documentRoot = await this.documentRootLocatorFactory().rootHarnessLoader();\n return documentRoot.getChildLoader(`[ngAccordionPanel][id=\"${panelId}\"]`);\n }\n\n /** Whether the accordion is expanded. */\n async isExpanded(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-expanded')) === 'true';\n }\n\n /** Whether the accordion is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /** Gets the title text of the accordion. */\n async getTitle(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Toggles the expanded state of the accordion by clicking on the trigger. */\n async toggle(): Promise<void> {\n await (await this.host()).click();\n }\n\n /** Expands the accordion if collapsed. */\n async expand(): Promise<void> {\n if (!(await this.isExpanded())) {\n await this.toggle();\n }\n }\n\n /** Collapses the accordion if expanded. */\n async collapse(): Promise<void> {\n if (await this.isExpanded()) {\n await this.toggle();\n }\n }\n\n /** Focuses the accordion trigger. */\n async focus(): Promise<void> {\n await (await this.host()).focus();\n }\n\n /** Blurs the accordion trigger. */\n async blur(): Promise<void> {\n await (await this.host()).blur();\n }\n\n /** Whether the accordion trigger is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n\n/** Harness for interacting with an `ngAccordionGroup` in tests. */\nexport class AccordionGroupHarness extends ComponentHarness {\n static hostSelector = '[ngAccordionGroup]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for an accordion group with specific attributes.\n */\n static with(options: AccordionGroupHarnessFilters = {}): HarnessPredicate<AccordionGroupHarness> {\n return new HarnessPredicate(AccordionGroupHarness, options);\n }\n\n /** Gets all accordions within this group. */\n async getAccordions(filters: AccordionHarnessFilters = {}): Promise<AccordionHarness[]> {\n return this.locatorForAll(AccordionHarness.with(filters))();\n }\n}\n"],"names":["AccordionSection","AccordionHarness","ContentContainerComponentHarness","hostSelector","with","options","HarnessPredicate","addOption","title","harness","stringMatches","getTitle","expanded","isExpanded","disabled","isDisabled","getRootHarnessLoader","panelId","host","getAttribute","documentRoot","documentRootLocatorFactory","rootHarnessLoader","getChildLoader","text","toggle","click","expand","collapse","focus","blur","isFocused","AccordionGroupHarness","ComponentHarness","getAccordions","filters","locatorForAll"],"mappings":";;IAgBYA;AAAZ,CAAA,UAAYA,gBAAgB,EAAA;AAC1BA,EAAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,sBAAgC;AAChCA,EAAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,oBAA4B;AAC9B,CAAC,EAHWA,gBAAgB,KAAhBA,gBAAgB,GAAA,EAAA,CAAA,CAAA;AAMtB,MAAOC,gBAAiB,SAAQC,gCAAkD,CAAA;EACtF,OAAOC,YAAY,GAAG,sBAAsB;AAM5C,EAAA,OAAOC,IAAIA,CAACC,OAAA,GAAmC,EAAE,EAAA;AAC/C,IA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ed, afterRenderEffect, Directive, InjectionToken,
|
|
2
|
+
import { inject, ElementRef, input, computed, afterRenderEffect, Directive, InjectionToken, signal, booleanAttribute, model } from '@angular/core';
|
|
3
3
|
import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.mjs';
|
|
4
4
|
import { Directionality } from '@angular/cdk/bidi';
|
|
5
|
+
import { sortDirectives } from './_element-chunk.mjs';
|
|
6
|
+
import { AccordionGroupPattern, AccordionTriggerPattern } from './_accordion-chunk.mjs';
|
|
5
7
|
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
6
|
-
import { AccordionTriggerPattern, AccordionGroupPattern } from './_accordion-chunk.mjs';
|
|
7
8
|
import './_expansion-chunk.mjs';
|
|
8
9
|
import './_list-navigation-chunk.mjs';
|
|
9
10
|
import './_signal-like-chunk.mjs';
|
|
10
11
|
import '@angular/core/primitives/signals';
|
|
11
|
-
import './
|
|
12
|
+
import './_click-event-manager-chunk.mjs';
|
|
12
13
|
|
|
13
14
|
class AccordionPanel {
|
|
15
|
+
_elementRef = inject(ElementRef);
|
|
16
|
+
element = this._elementRef.nativeElement;
|
|
14
17
|
_deferredContentAware = inject(DeferredContentAware);
|
|
15
18
|
id = input(inject(_IdGenerator).getId('ng-accordion-panel-', true), ...(ngDevMode ? [{
|
|
16
19
|
debugName: "id"
|
|
@@ -35,7 +38,7 @@ class AccordionPanel {
|
|
|
35
38
|
}
|
|
36
39
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
37
40
|
minVersion: "12.0.0",
|
|
38
|
-
version: "22.0.0-next.
|
|
41
|
+
version: "22.0.0-next.6",
|
|
39
42
|
ngImport: i0,
|
|
40
43
|
type: AccordionPanel,
|
|
41
44
|
deps: [],
|
|
@@ -43,7 +46,7 @@ class AccordionPanel {
|
|
|
43
46
|
});
|
|
44
47
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
45
48
|
minVersion: "17.1.0",
|
|
46
|
-
version: "22.0.0-next.
|
|
49
|
+
version: "22.0.0-next.6",
|
|
47
50
|
type: AccordionPanel,
|
|
48
51
|
isStandalone: true,
|
|
49
52
|
selector: "[ngAccordionPanel]",
|
|
@@ -76,7 +79,7 @@ class AccordionPanel {
|
|
|
76
79
|
}
|
|
77
80
|
i0.ɵɵngDeclareClassMetadata({
|
|
78
81
|
minVersion: "12.0.0",
|
|
79
|
-
version: "22.0.0-next.
|
|
82
|
+
version: "22.0.0-next.6",
|
|
80
83
|
ngImport: i0,
|
|
81
84
|
type: AccordionPanel,
|
|
82
85
|
decorators: [{
|
|
@@ -111,6 +114,186 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
111
114
|
|
|
112
115
|
const ACCORDION_GROUP = new InjectionToken('ACCORDION_GROUP');
|
|
113
116
|
|
|
117
|
+
class AccordionGroup {
|
|
118
|
+
_elementRef = inject(ElementRef);
|
|
119
|
+
element = this._elementRef.nativeElement;
|
|
120
|
+
_triggers = signal(new Set(), ...(ngDevMode ? [{
|
|
121
|
+
debugName: "_triggers"
|
|
122
|
+
}] : []));
|
|
123
|
+
_sortedTriggers = computed(() => {
|
|
124
|
+
const triggers = [...this._triggers()];
|
|
125
|
+
const sortFn = triggers[0]?.index() === undefined ? sortDirectives : (a, b) => a.index() - b.index();
|
|
126
|
+
return triggers.sort(sortFn);
|
|
127
|
+
}, ...(ngDevMode ? [{
|
|
128
|
+
debugName: "_sortedTriggers"
|
|
129
|
+
}] : []));
|
|
130
|
+
_triggerPatterns = computed(() => {
|
|
131
|
+
return this._sortedTriggers().map(t => t._pattern);
|
|
132
|
+
}, ...(ngDevMode ? [{
|
|
133
|
+
debugName: "_triggerPatterns"
|
|
134
|
+
}] : []));
|
|
135
|
+
textDirection = inject(Directionality).valueSignal;
|
|
136
|
+
disabled = input(false, {
|
|
137
|
+
...(ngDevMode ? {
|
|
138
|
+
debugName: "disabled"
|
|
139
|
+
} : {}),
|
|
140
|
+
transform: booleanAttribute
|
|
141
|
+
});
|
|
142
|
+
multiExpandable = input(true, {
|
|
143
|
+
...(ngDevMode ? {
|
|
144
|
+
debugName: "multiExpandable"
|
|
145
|
+
} : {}),
|
|
146
|
+
transform: booleanAttribute
|
|
147
|
+
});
|
|
148
|
+
softDisabled = input(true, {
|
|
149
|
+
...(ngDevMode ? {
|
|
150
|
+
debugName: "softDisabled"
|
|
151
|
+
} : {}),
|
|
152
|
+
transform: booleanAttribute
|
|
153
|
+
});
|
|
154
|
+
wrap = input(false, {
|
|
155
|
+
...(ngDevMode ? {
|
|
156
|
+
debugName: "wrap"
|
|
157
|
+
} : {}),
|
|
158
|
+
transform: booleanAttribute
|
|
159
|
+
});
|
|
160
|
+
_pattern = new AccordionGroupPattern({
|
|
161
|
+
...this,
|
|
162
|
+
element: () => this.element,
|
|
163
|
+
activeItem: signal(undefined),
|
|
164
|
+
items: this._triggerPatterns,
|
|
165
|
+
orientation: () => 'vertical'
|
|
166
|
+
});
|
|
167
|
+
expandAll() {
|
|
168
|
+
this._pattern.expandAll();
|
|
169
|
+
}
|
|
170
|
+
collapseAll() {
|
|
171
|
+
this._pattern.collapseAll();
|
|
172
|
+
}
|
|
173
|
+
_registerTrigger(trigger) {
|
|
174
|
+
this._triggers().add(trigger);
|
|
175
|
+
this._triggers.set(new Set(this._triggers()));
|
|
176
|
+
}
|
|
177
|
+
_unregisterTrigger(trigger) {
|
|
178
|
+
this._triggers().delete(trigger);
|
|
179
|
+
this._triggers.set(new Set(this._triggers()));
|
|
180
|
+
}
|
|
181
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
182
|
+
minVersion: "12.0.0",
|
|
183
|
+
version: "22.0.0-next.6",
|
|
184
|
+
ngImport: i0,
|
|
185
|
+
type: AccordionGroup,
|
|
186
|
+
deps: [],
|
|
187
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
188
|
+
});
|
|
189
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
190
|
+
minVersion: "17.1.0",
|
|
191
|
+
version: "22.0.0-next.6",
|
|
192
|
+
type: AccordionGroup,
|
|
193
|
+
isStandalone: true,
|
|
194
|
+
selector: "[ngAccordionGroup]",
|
|
195
|
+
inputs: {
|
|
196
|
+
disabled: {
|
|
197
|
+
classPropertyName: "disabled",
|
|
198
|
+
publicName: "disabled",
|
|
199
|
+
isSignal: true,
|
|
200
|
+
isRequired: false,
|
|
201
|
+
transformFunction: null
|
|
202
|
+
},
|
|
203
|
+
multiExpandable: {
|
|
204
|
+
classPropertyName: "multiExpandable",
|
|
205
|
+
publicName: "multiExpandable",
|
|
206
|
+
isSignal: true,
|
|
207
|
+
isRequired: false,
|
|
208
|
+
transformFunction: null
|
|
209
|
+
},
|
|
210
|
+
softDisabled: {
|
|
211
|
+
classPropertyName: "softDisabled",
|
|
212
|
+
publicName: "softDisabled",
|
|
213
|
+
isSignal: true,
|
|
214
|
+
isRequired: false,
|
|
215
|
+
transformFunction: null
|
|
216
|
+
},
|
|
217
|
+
wrap: {
|
|
218
|
+
classPropertyName: "wrap",
|
|
219
|
+
publicName: "wrap",
|
|
220
|
+
isSignal: true,
|
|
221
|
+
isRequired: false,
|
|
222
|
+
transformFunction: null
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
host: {
|
|
226
|
+
listeners: {
|
|
227
|
+
"keydown": "_pattern.onKeydown($event)",
|
|
228
|
+
"click": "_pattern.onClick($event)",
|
|
229
|
+
"focusin": "_pattern.onFocus($event)"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
providers: [{
|
|
233
|
+
provide: ACCORDION_GROUP,
|
|
234
|
+
useExisting: AccordionGroup
|
|
235
|
+
}],
|
|
236
|
+
exportAs: ["ngAccordionGroup"],
|
|
237
|
+
ngImport: i0
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
241
|
+
minVersion: "12.0.0",
|
|
242
|
+
version: "22.0.0-next.6",
|
|
243
|
+
ngImport: i0,
|
|
244
|
+
type: AccordionGroup,
|
|
245
|
+
decorators: [{
|
|
246
|
+
type: Directive,
|
|
247
|
+
args: [{
|
|
248
|
+
selector: '[ngAccordionGroup]',
|
|
249
|
+
exportAs: 'ngAccordionGroup',
|
|
250
|
+
host: {
|
|
251
|
+
'(keydown)': '_pattern.onKeydown($event)',
|
|
252
|
+
'(click)': '_pattern.onClick($event)',
|
|
253
|
+
'(focusin)': '_pattern.onFocus($event)'
|
|
254
|
+
},
|
|
255
|
+
providers: [{
|
|
256
|
+
provide: ACCORDION_GROUP,
|
|
257
|
+
useExisting: AccordionGroup
|
|
258
|
+
}]
|
|
259
|
+
}]
|
|
260
|
+
}],
|
|
261
|
+
propDecorators: {
|
|
262
|
+
disabled: [{
|
|
263
|
+
type: i0.Input,
|
|
264
|
+
args: [{
|
|
265
|
+
isSignal: true,
|
|
266
|
+
alias: "disabled",
|
|
267
|
+
required: false
|
|
268
|
+
}]
|
|
269
|
+
}],
|
|
270
|
+
multiExpandable: [{
|
|
271
|
+
type: i0.Input,
|
|
272
|
+
args: [{
|
|
273
|
+
isSignal: true,
|
|
274
|
+
alias: "multiExpandable",
|
|
275
|
+
required: false
|
|
276
|
+
}]
|
|
277
|
+
}],
|
|
278
|
+
softDisabled: [{
|
|
279
|
+
type: i0.Input,
|
|
280
|
+
args: [{
|
|
281
|
+
isSignal: true,
|
|
282
|
+
alias: "softDisabled",
|
|
283
|
+
required: false
|
|
284
|
+
}]
|
|
285
|
+
}],
|
|
286
|
+
wrap: [{
|
|
287
|
+
type: i0.Input,
|
|
288
|
+
args: [{
|
|
289
|
+
isSignal: true,
|
|
290
|
+
alias: "wrap",
|
|
291
|
+
required: false
|
|
292
|
+
}]
|
|
293
|
+
}]
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
|
|
114
297
|
class AccordionTrigger {
|
|
115
298
|
_elementRef = inject(ElementRef);
|
|
116
299
|
element = this._elementRef.nativeElement;
|
|
@@ -130,6 +313,9 @@ class AccordionTrigger {
|
|
|
130
313
|
} : {}),
|
|
131
314
|
transform: booleanAttribute
|
|
132
315
|
});
|
|
316
|
+
index = input(...(ngDevMode ? [undefined, {
|
|
317
|
+
debugName: "index"
|
|
318
|
+
}] : []));
|
|
133
319
|
expanded = model(false, ...(ngDevMode ? [{
|
|
134
320
|
debugName: "expanded"
|
|
135
321
|
}] : []));
|
|
@@ -145,6 +331,11 @@ class AccordionTrigger {
|
|
|
145
331
|
accordionPanelId: this.panelId
|
|
146
332
|
});
|
|
147
333
|
this.panel()._pattern = this._pattern;
|
|
334
|
+
this._accordionGroup._registerTrigger(this);
|
|
335
|
+
}
|
|
336
|
+
ngOnDestroy() {
|
|
337
|
+
this.panel()._pattern = undefined;
|
|
338
|
+
this._accordionGroup._unregisterTrigger(this);
|
|
148
339
|
}
|
|
149
340
|
expand() {
|
|
150
341
|
this._pattern.open();
|
|
@@ -157,7 +348,7 @@ class AccordionTrigger {
|
|
|
157
348
|
}
|
|
158
349
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
159
350
|
minVersion: "12.0.0",
|
|
160
|
-
version: "22.0.0-next.
|
|
351
|
+
version: "22.0.0-next.6",
|
|
161
352
|
ngImport: i0,
|
|
162
353
|
type: AccordionTrigger,
|
|
163
354
|
deps: [],
|
|
@@ -165,7 +356,7 @@ class AccordionTrigger {
|
|
|
165
356
|
});
|
|
166
357
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
167
358
|
minVersion: "17.1.0",
|
|
168
|
-
version: "22.0.0-next.
|
|
359
|
+
version: "22.0.0-next.6",
|
|
169
360
|
type: AccordionTrigger,
|
|
170
361
|
isStandalone: true,
|
|
171
362
|
selector: "[ngAccordionTrigger]",
|
|
@@ -191,6 +382,13 @@ class AccordionTrigger {
|
|
|
191
382
|
isRequired: false,
|
|
192
383
|
transformFunction: null
|
|
193
384
|
},
|
|
385
|
+
index: {
|
|
386
|
+
classPropertyName: "index",
|
|
387
|
+
publicName: "index",
|
|
388
|
+
isSignal: true,
|
|
389
|
+
isRequired: false,
|
|
390
|
+
transformFunction: null
|
|
391
|
+
},
|
|
194
392
|
expanded: {
|
|
195
393
|
classPropertyName: "expanded",
|
|
196
394
|
publicName: "expanded",
|
|
@@ -222,7 +420,7 @@ class AccordionTrigger {
|
|
|
222
420
|
}
|
|
223
421
|
i0.ɵɵngDeclareClassMetadata({
|
|
224
422
|
minVersion: "12.0.0",
|
|
225
|
-
version: "22.0.0-next.
|
|
423
|
+
version: "22.0.0-next.6",
|
|
226
424
|
ngImport: i0,
|
|
227
425
|
type: AccordionTrigger,
|
|
228
426
|
decorators: [{
|
|
@@ -267,197 +465,24 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
267
465
|
required: false
|
|
268
466
|
}]
|
|
269
467
|
}],
|
|
270
|
-
|
|
271
|
-
type: i0.Input,
|
|
272
|
-
args: [{
|
|
273
|
-
isSignal: true,
|
|
274
|
-
alias: "expanded",
|
|
275
|
-
required: false
|
|
276
|
-
}]
|
|
277
|
-
}, {
|
|
278
|
-
type: i0.Output,
|
|
279
|
-
args: ["expandedChange"]
|
|
280
|
-
}]
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
class AccordionGroup {
|
|
285
|
-
_elementRef = inject(ElementRef);
|
|
286
|
-
element = this._elementRef.nativeElement;
|
|
287
|
-
_triggers = contentChildren(AccordionTrigger, {
|
|
288
|
-
...(ngDevMode ? {
|
|
289
|
-
debugName: "_triggers"
|
|
290
|
-
} : {}),
|
|
291
|
-
descendants: true
|
|
292
|
-
});
|
|
293
|
-
_triggerPatterns = computed(() => this._triggers().map(t => t._pattern), ...(ngDevMode ? [{
|
|
294
|
-
debugName: "_triggerPatterns"
|
|
295
|
-
}] : []));
|
|
296
|
-
textDirection = inject(Directionality).valueSignal;
|
|
297
|
-
disabled = input(false, {
|
|
298
|
-
...(ngDevMode ? {
|
|
299
|
-
debugName: "disabled"
|
|
300
|
-
} : {}),
|
|
301
|
-
transform: booleanAttribute
|
|
302
|
-
});
|
|
303
|
-
multiExpandable = input(true, {
|
|
304
|
-
...(ngDevMode ? {
|
|
305
|
-
debugName: "multiExpandable"
|
|
306
|
-
} : {}),
|
|
307
|
-
transform: booleanAttribute
|
|
308
|
-
});
|
|
309
|
-
softDisabled = input(true, {
|
|
310
|
-
...(ngDevMode ? {
|
|
311
|
-
debugName: "softDisabled"
|
|
312
|
-
} : {}),
|
|
313
|
-
transform: booleanAttribute
|
|
314
|
-
});
|
|
315
|
-
wrap = input(false, {
|
|
316
|
-
...(ngDevMode ? {
|
|
317
|
-
debugName: "wrap"
|
|
318
|
-
} : {}),
|
|
319
|
-
transform: booleanAttribute
|
|
320
|
-
});
|
|
321
|
-
_pattern = new AccordionGroupPattern({
|
|
322
|
-
...this,
|
|
323
|
-
element: () => this.element,
|
|
324
|
-
activeItem: signal(undefined),
|
|
325
|
-
items: this._triggerPatterns,
|
|
326
|
-
orientation: () => 'vertical'
|
|
327
|
-
});
|
|
328
|
-
expandAll() {
|
|
329
|
-
this._pattern.expandAll();
|
|
330
|
-
}
|
|
331
|
-
collapseAll() {
|
|
332
|
-
this._pattern.collapseAll();
|
|
333
|
-
}
|
|
334
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
335
|
-
minVersion: "12.0.0",
|
|
336
|
-
version: "22.0.0-next.5",
|
|
337
|
-
ngImport: i0,
|
|
338
|
-
type: AccordionGroup,
|
|
339
|
-
deps: [],
|
|
340
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
341
|
-
});
|
|
342
|
-
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
343
|
-
minVersion: "17.2.0",
|
|
344
|
-
version: "22.0.0-next.5",
|
|
345
|
-
type: AccordionGroup,
|
|
346
|
-
isStandalone: true,
|
|
347
|
-
selector: "[ngAccordionGroup]",
|
|
348
|
-
inputs: {
|
|
349
|
-
disabled: {
|
|
350
|
-
classPropertyName: "disabled",
|
|
351
|
-
publicName: "disabled",
|
|
352
|
-
isSignal: true,
|
|
353
|
-
isRequired: false,
|
|
354
|
-
transformFunction: null
|
|
355
|
-
},
|
|
356
|
-
multiExpandable: {
|
|
357
|
-
classPropertyName: "multiExpandable",
|
|
358
|
-
publicName: "multiExpandable",
|
|
359
|
-
isSignal: true,
|
|
360
|
-
isRequired: false,
|
|
361
|
-
transformFunction: null
|
|
362
|
-
},
|
|
363
|
-
softDisabled: {
|
|
364
|
-
classPropertyName: "softDisabled",
|
|
365
|
-
publicName: "softDisabled",
|
|
366
|
-
isSignal: true,
|
|
367
|
-
isRequired: false,
|
|
368
|
-
transformFunction: null
|
|
369
|
-
},
|
|
370
|
-
wrap: {
|
|
371
|
-
classPropertyName: "wrap",
|
|
372
|
-
publicName: "wrap",
|
|
373
|
-
isSignal: true,
|
|
374
|
-
isRequired: false,
|
|
375
|
-
transformFunction: null
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
|
-
host: {
|
|
379
|
-
listeners: {
|
|
380
|
-
"keydown": "_pattern.onKeydown($event)",
|
|
381
|
-
"pointerdown": "_pattern.onPointerdown($event)",
|
|
382
|
-
"focusin": "_pattern.onFocus($event)"
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
providers: [{
|
|
386
|
-
provide: ACCORDION_GROUP,
|
|
387
|
-
useExisting: AccordionGroup
|
|
388
|
-
}],
|
|
389
|
-
queries: [{
|
|
390
|
-
propertyName: "_triggers",
|
|
391
|
-
predicate: AccordionTrigger,
|
|
392
|
-
descendants: true,
|
|
393
|
-
isSignal: true
|
|
394
|
-
}],
|
|
395
|
-
exportAs: ["ngAccordionGroup"],
|
|
396
|
-
ngImport: i0
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
400
|
-
minVersion: "12.0.0",
|
|
401
|
-
version: "22.0.0-next.5",
|
|
402
|
-
ngImport: i0,
|
|
403
|
-
type: AccordionGroup,
|
|
404
|
-
decorators: [{
|
|
405
|
-
type: Directive,
|
|
406
|
-
args: [{
|
|
407
|
-
selector: '[ngAccordionGroup]',
|
|
408
|
-
exportAs: 'ngAccordionGroup',
|
|
409
|
-
host: {
|
|
410
|
-
'(keydown)': '_pattern.onKeydown($event)',
|
|
411
|
-
'(pointerdown)': '_pattern.onPointerdown($event)',
|
|
412
|
-
'(focusin)': '_pattern.onFocus($event)'
|
|
413
|
-
},
|
|
414
|
-
providers: [{
|
|
415
|
-
provide: ACCORDION_GROUP,
|
|
416
|
-
useExisting: AccordionGroup
|
|
417
|
-
}]
|
|
418
|
-
}]
|
|
419
|
-
}],
|
|
420
|
-
propDecorators: {
|
|
421
|
-
_triggers: [{
|
|
422
|
-
type: i0.ContentChildren,
|
|
423
|
-
args: [i0.forwardRef(() => AccordionTrigger), {
|
|
424
|
-
...{
|
|
425
|
-
descendants: true
|
|
426
|
-
},
|
|
427
|
-
isSignal: true
|
|
428
|
-
}]
|
|
429
|
-
}],
|
|
430
|
-
disabled: [{
|
|
431
|
-
type: i0.Input,
|
|
432
|
-
args: [{
|
|
433
|
-
isSignal: true,
|
|
434
|
-
alias: "disabled",
|
|
435
|
-
required: false
|
|
436
|
-
}]
|
|
437
|
-
}],
|
|
438
|
-
multiExpandable: [{
|
|
439
|
-
type: i0.Input,
|
|
440
|
-
args: [{
|
|
441
|
-
isSignal: true,
|
|
442
|
-
alias: "multiExpandable",
|
|
443
|
-
required: false
|
|
444
|
-
}]
|
|
445
|
-
}],
|
|
446
|
-
softDisabled: [{
|
|
468
|
+
index: [{
|
|
447
469
|
type: i0.Input,
|
|
448
470
|
args: [{
|
|
449
471
|
isSignal: true,
|
|
450
|
-
alias: "
|
|
472
|
+
alias: "index",
|
|
451
473
|
required: false
|
|
452
474
|
}]
|
|
453
475
|
}],
|
|
454
|
-
|
|
476
|
+
expanded: [{
|
|
455
477
|
type: i0.Input,
|
|
456
478
|
args: [{
|
|
457
479
|
isSignal: true,
|
|
458
|
-
alias: "
|
|
480
|
+
alias: "expanded",
|
|
459
481
|
required: false
|
|
460
482
|
}]
|
|
483
|
+
}, {
|
|
484
|
+
type: i0.Output,
|
|
485
|
+
args: ["expandedChange"]
|
|
461
486
|
}]
|
|
462
487
|
}
|
|
463
488
|
});
|
|
@@ -465,7 +490,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
465
490
|
class AccordionContent {
|
|
466
491
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
467
492
|
minVersion: "12.0.0",
|
|
468
|
-
version: "22.0.0-next.
|
|
493
|
+
version: "22.0.0-next.6",
|
|
469
494
|
ngImport: i0,
|
|
470
495
|
type: AccordionContent,
|
|
471
496
|
deps: [],
|
|
@@ -473,7 +498,7 @@ class AccordionContent {
|
|
|
473
498
|
});
|
|
474
499
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
475
500
|
minVersion: "14.0.0",
|
|
476
|
-
version: "22.0.0-next.
|
|
501
|
+
version: "22.0.0-next.6",
|
|
477
502
|
type: AccordionContent,
|
|
478
503
|
isStandalone: true,
|
|
479
504
|
selector: "ng-template[ngAccordionContent]",
|
|
@@ -485,7 +510,7 @@ class AccordionContent {
|
|
|
485
510
|
}
|
|
486
511
|
i0.ɵɵngDeclareClassMetadata({
|
|
487
512
|
minVersion: "12.0.0",
|
|
488
|
-
version: "22.0.0-next.
|
|
513
|
+
version: "22.0.0-next.6",
|
|
489
514
|
ngImport: i0,
|
|
490
515
|
type: AccordionContent,
|
|
491
516
|
decorators: [{
|