@angular/aria 0.0.1 → 21.0.0-next.8
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/LICENSE +21 -0
- package/README.md +6 -0
- package/fesm2022/accordion.mjs +192 -0
- package/fesm2022/accordion.mjs.map +1 -0
- package/fesm2022/aria.mjs +7 -0
- package/fesm2022/aria.mjs.map +1 -0
- package/fesm2022/combobox.mjs +130 -0
- package/fesm2022/combobox.mjs.map +1 -0
- package/fesm2022/deferred-content.mjs +59 -0
- package/fesm2022/deferred-content.mjs.map +1 -0
- package/fesm2022/listbox.mjs +200 -0
- package/fesm2022/listbox.mjs.map +1 -0
- package/fesm2022/radio-group.mjs +197 -0
- package/fesm2022/radio-group.mjs.map +1 -0
- package/fesm2022/tabs.mjs +299 -0
- package/fesm2022/tabs.mjs.map +1 -0
- package/fesm2022/toolbar.mjs +218 -0
- package/fesm2022/toolbar.mjs.map +1 -0
- package/fesm2022/tree.mjs +328 -0
- package/fesm2022/tree.mjs.map +1 -0
- package/fesm2022/ui-patterns.mjs +2504 -0
- package/fesm2022/ui-patterns.mjs.map +1 -0
- package/package.json +78 -3
- package/types/accordion.d.ts +92 -0
- package/types/aria.d.ts +6 -0
- package/types/combobox.d.ts +51 -0
- package/types/deferred-content.d.ts +37 -0
- package/types/listbox.d.ts +95 -0
- package/types/radio-group.d.ts +82 -0
- package/types/tabs.d.ts +156 -0
- package/types/toolbar.d.ts +113 -0
- package/types/tree.d.ts +151 -0
- package/types/ui-patterns.d.ts +1404 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, computed, ElementRef, signal, input, booleanAttribute, model, afterRenderEffect, untracked, Directive } from '@angular/core';
|
|
3
|
+
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
4
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
5
|
+
import * as i1 from '@angular/aria/deferred-content';
|
|
6
|
+
import { DeferredContentAware, DeferredContent } from '@angular/aria/deferred-content';
|
|
7
|
+
import { ComboboxTreePattern, TreePattern, TreeItemPattern } from '@angular/aria/ui-patterns';
|
|
8
|
+
import { ComboboxPopup } from './combobox.mjs';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Sort directives by their document order.
|
|
12
|
+
*/
|
|
13
|
+
function sortDirectives(a, b) {
|
|
14
|
+
return (a.element().compareDocumentPosition(b.element()) & Node.DOCUMENT_POSITION_PRECEDING) > 0
|
|
15
|
+
? 1
|
|
16
|
+
: -1;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A Tree container.
|
|
20
|
+
*
|
|
21
|
+
* Transforms nested lists into an accessible, ARIA-compliant tree structure.
|
|
22
|
+
*
|
|
23
|
+
* ```html
|
|
24
|
+
* <ul ngTree [(value)]="selectedItems" [multi]="true">
|
|
25
|
+
* <li ngTreeItem [value]="'leaf1'">Leaf Item 1</li>
|
|
26
|
+
* <li ngTreeItem [value]="'parent1'">
|
|
27
|
+
* Parent Item 1
|
|
28
|
+
* <ul ngTreeItemGroup [value]="'parent1'">
|
|
29
|
+
* <ng-template ngTreeItemGroupContent>
|
|
30
|
+
* <li ngTreeItem [value]="'child1.1'">Child Item 1.1</li>
|
|
31
|
+
* <li ngTreeItem [value]="'child1.2'">Child Item 1.2</li>
|
|
32
|
+
* </ng-template>
|
|
33
|
+
* </ul>
|
|
34
|
+
* </li>
|
|
35
|
+
* <li ngTreeItem [value]="'leaf2'" [disabled]="true">Disabled Leaf Item 2</li>
|
|
36
|
+
* </ul>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
class Tree {
|
|
40
|
+
/** A unique identifier for the tree. */
|
|
41
|
+
_generatedId = inject(_IdGenerator).getId('ng-tree-');
|
|
42
|
+
// TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.
|
|
43
|
+
/** A unique identifier for the tree. */
|
|
44
|
+
id = computed(() => this._generatedId, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
45
|
+
/** A reference to the parent combobox popup, if one exists. */
|
|
46
|
+
_popup = inject(ComboboxPopup, {
|
|
47
|
+
optional: true,
|
|
48
|
+
});
|
|
49
|
+
/** A reference to the tree element. */
|
|
50
|
+
_elementRef = inject(ElementRef);
|
|
51
|
+
/** All TreeItem instances within this tree. */
|
|
52
|
+
_unorderedItems = signal(new Set(), ...(ngDevMode ? [{ debugName: "_unorderedItems" }] : []));
|
|
53
|
+
/** Orientation of the tree. */
|
|
54
|
+
orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
55
|
+
/** Whether multi-selection is allowed. */
|
|
56
|
+
multi = input(false, ...(ngDevMode ? [{ debugName: "multi", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
57
|
+
/** Whether the tree is disabled. */
|
|
58
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
59
|
+
/** The selection strategy used by the tree. */
|
|
60
|
+
selectionMode = input('explicit', ...(ngDevMode ? [{ debugName: "selectionMode" }] : []));
|
|
61
|
+
/** The focus strategy used by the tree. */
|
|
62
|
+
focusMode = input('roving', ...(ngDevMode ? [{ debugName: "focusMode" }] : []));
|
|
63
|
+
/** Whether navigation wraps. */
|
|
64
|
+
wrap = input(true, ...(ngDevMode ? [{ debugName: "wrap", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
65
|
+
/** Whether to skip disabled items during navigation. */
|
|
66
|
+
skipDisabled = input(true, ...(ngDevMode ? [{ debugName: "skipDisabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
67
|
+
/** Typeahead delay. */
|
|
68
|
+
typeaheadDelay = input(0.5, ...(ngDevMode ? [{ debugName: "typeaheadDelay" }] : []));
|
|
69
|
+
/** Selected item values. */
|
|
70
|
+
value = model([], ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
71
|
+
/** Text direction. */
|
|
72
|
+
textDirection = inject(Directionality).valueSignal;
|
|
73
|
+
/** Whether the tree is in navigation mode. */
|
|
74
|
+
nav = input(false, ...(ngDevMode ? [{ debugName: "nav" }] : []));
|
|
75
|
+
/** The aria-current type. */
|
|
76
|
+
currentType = input('page', ...(ngDevMode ? [{ debugName: "currentType" }] : []));
|
|
77
|
+
/** The UI pattern for the tree. */
|
|
78
|
+
pattern;
|
|
79
|
+
/** Whether the tree has received focus yet. */
|
|
80
|
+
_hasFocused = signal(false, ...(ngDevMode ? [{ debugName: "_hasFocused" }] : []));
|
|
81
|
+
constructor() {
|
|
82
|
+
const inputs = {
|
|
83
|
+
...this,
|
|
84
|
+
id: this.id,
|
|
85
|
+
allItems: computed(() => [...this._unorderedItems()].sort(sortDirectives).map(item => item.pattern)),
|
|
86
|
+
activeItem: signal(undefined),
|
|
87
|
+
element: () => this._elementRef.nativeElement,
|
|
88
|
+
combobox: () => this._popup?.combobox?.pattern,
|
|
89
|
+
};
|
|
90
|
+
this.pattern = this._popup?.combobox
|
|
91
|
+
? new ComboboxTreePattern(inputs)
|
|
92
|
+
: new TreePattern(inputs);
|
|
93
|
+
if (this._popup?.combobox) {
|
|
94
|
+
this._popup?.controls?.set(this.pattern);
|
|
95
|
+
}
|
|
96
|
+
afterRenderEffect(() => {
|
|
97
|
+
if (!this._hasFocused()) {
|
|
98
|
+
this.pattern.setDefaultState();
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
afterRenderEffect(() => {
|
|
102
|
+
const items = inputs.allItems();
|
|
103
|
+
const activeItem = untracked(() => inputs.activeItem());
|
|
104
|
+
if (!items.some(i => i === activeItem) && activeItem) {
|
|
105
|
+
this.pattern.listBehavior.unfocus();
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
afterRenderEffect(() => {
|
|
109
|
+
const items = inputs.allItems();
|
|
110
|
+
const value = untracked(() => this.value());
|
|
111
|
+
if (items && value.some(v => !items.some(i => i.value() === v))) {
|
|
112
|
+
this.value.set(value.filter(v => items.some(i => i.value() === v)));
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
onFocus() {
|
|
117
|
+
this._hasFocused.set(true);
|
|
118
|
+
}
|
|
119
|
+
register(child) {
|
|
120
|
+
this._unorderedItems().add(child);
|
|
121
|
+
this._unorderedItems.set(new Set(this._unorderedItems()));
|
|
122
|
+
}
|
|
123
|
+
unregister(child) {
|
|
124
|
+
this._unorderedItems().delete(child);
|
|
125
|
+
this._unorderedItems.set(new Set(this._unorderedItems()));
|
|
126
|
+
}
|
|
127
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: Tree, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
128
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.0-next.2", type: Tree, isStandalone: true, selector: "[ngTree]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, focusMode: { classPropertyName: "focusMode", publicName: "focusMode", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, skipDisabled: { classPropertyName: "skipDisabled", publicName: "skipDisabled", isSignal: true, isRequired: false, transformFunction: null }, typeaheadDelay: { classPropertyName: "typeaheadDelay", publicName: "typeaheadDelay", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, nav: { classPropertyName: "nav", publicName: "nav", isSignal: true, isRequired: false, transformFunction: null }, currentType: { classPropertyName: "currentType", publicName: "currentType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "tree" }, listeners: { "keydown": "pattern.onKeydown($event)", "pointerdown": "pattern.onPointerdown($event)", "focusin": "onFocus()" }, properties: { "attr.id": "id()", "attr.aria-orientation": "pattern.orientation()", "attr.aria-multiselectable": "pattern.multi()", "attr.aria-disabled": "pattern.disabled()", "attr.aria-activedescendant": "pattern.activedescendant()", "tabindex": "pattern.tabindex()" }, classAttribute: "ng-tree" }, exportAs: ["ngTree"], hostDirectives: [{ directive: ComboboxPopup }], ngImport: i0 });
|
|
129
|
+
}
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: Tree, decorators: [{
|
|
131
|
+
type: Directive,
|
|
132
|
+
args: [{
|
|
133
|
+
selector: '[ngTree]',
|
|
134
|
+
exportAs: 'ngTree',
|
|
135
|
+
host: {
|
|
136
|
+
'class': 'ng-tree',
|
|
137
|
+
'role': 'tree',
|
|
138
|
+
'[attr.id]': 'id()',
|
|
139
|
+
'[attr.aria-orientation]': 'pattern.orientation()',
|
|
140
|
+
'[attr.aria-multiselectable]': 'pattern.multi()',
|
|
141
|
+
'[attr.aria-disabled]': 'pattern.disabled()',
|
|
142
|
+
'[attr.aria-activedescendant]': 'pattern.activedescendant()',
|
|
143
|
+
'[tabindex]': 'pattern.tabindex()',
|
|
144
|
+
'(keydown)': 'pattern.onKeydown($event)',
|
|
145
|
+
'(pointerdown)': 'pattern.onPointerdown($event)',
|
|
146
|
+
'(focusin)': 'onFocus()',
|
|
147
|
+
},
|
|
148
|
+
hostDirectives: [{ directive: ComboboxPopup }],
|
|
149
|
+
}]
|
|
150
|
+
}], ctorParameters: () => [] });
|
|
151
|
+
/**
|
|
152
|
+
* A selectable and expandable Tree Item in a Tree.
|
|
153
|
+
*/
|
|
154
|
+
class TreeItem {
|
|
155
|
+
/** A reference to the tree item element. */
|
|
156
|
+
_elementRef = inject(ElementRef);
|
|
157
|
+
/** A unique identifier for the tree item. */
|
|
158
|
+
_id = inject(_IdGenerator).getId('ng-tree-item-');
|
|
159
|
+
/** The owned tree item group. */
|
|
160
|
+
_group = signal(undefined, ...(ngDevMode ? [{ debugName: "_group" }] : []));
|
|
161
|
+
/** The id of the owned group. */
|
|
162
|
+
ownsId = computed(() => this._group()?.id, ...(ngDevMode ? [{ debugName: "ownsId" }] : []));
|
|
163
|
+
/** The host native element. */
|
|
164
|
+
element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{ debugName: "element" }] : []));
|
|
165
|
+
/** The value of the tree item. */
|
|
166
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
167
|
+
/** The parent tree root or tree item group. */
|
|
168
|
+
parent = input.required(...(ngDevMode ? [{ debugName: "parent" }] : []));
|
|
169
|
+
/** Whether the tree item is disabled. */
|
|
170
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
171
|
+
/** Optional label for typeahead. Defaults to the element's textContent. */
|
|
172
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
173
|
+
/** Search term for typeahead. */
|
|
174
|
+
searchTerm = computed(() => this.label() ?? this.element().textContent, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
|
|
175
|
+
/** The tree root. */
|
|
176
|
+
tree = computed(() => {
|
|
177
|
+
if (this.parent() instanceof Tree) {
|
|
178
|
+
return this.parent();
|
|
179
|
+
}
|
|
180
|
+
return this.parent().ownedBy().tree();
|
|
181
|
+
}, ...(ngDevMode ? [{ debugName: "tree" }] : []));
|
|
182
|
+
/** The UI pattern for this item. */
|
|
183
|
+
pattern;
|
|
184
|
+
constructor() {
|
|
185
|
+
// Updates the visibility of the owned group.
|
|
186
|
+
afterRenderEffect(() => {
|
|
187
|
+
this._group()?.visible.set(this.pattern.expanded());
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
ngOnInit() {
|
|
191
|
+
this.parent().register(this);
|
|
192
|
+
this.tree().register(this);
|
|
193
|
+
const treePattern = computed(() => this.tree().pattern, ...(ngDevMode ? [{ debugName: "treePattern" }] : []));
|
|
194
|
+
const parentPattern = computed(() => {
|
|
195
|
+
if (this.parent() instanceof Tree) {
|
|
196
|
+
return treePattern();
|
|
197
|
+
}
|
|
198
|
+
return this.parent().ownedBy().pattern;
|
|
199
|
+
}, ...(ngDevMode ? [{ debugName: "parentPattern" }] : []));
|
|
200
|
+
this.pattern = new TreeItemPattern({
|
|
201
|
+
...this,
|
|
202
|
+
id: () => this._id,
|
|
203
|
+
tree: treePattern,
|
|
204
|
+
parent: parentPattern,
|
|
205
|
+
children: computed(() => this._group()
|
|
206
|
+
?.children()
|
|
207
|
+
.map(item => item.pattern) ?? []),
|
|
208
|
+
hasChildren: computed(() => !!this._group()),
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
ngOnDestroy() {
|
|
212
|
+
this.parent().unregister(this);
|
|
213
|
+
this.tree().unregister(this);
|
|
214
|
+
}
|
|
215
|
+
register(group) {
|
|
216
|
+
this._group.set(group);
|
|
217
|
+
}
|
|
218
|
+
unregister() {
|
|
219
|
+
this._group.set(undefined);
|
|
220
|
+
}
|
|
221
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: TreeItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
222
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.0-next.2", type: TreeItem, isStandalone: true, selector: "[ngTreeItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, parent: { classPropertyName: "parent", publicName: "parent", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "treeitem" }, properties: { "attr.data-active": "pattern.active()", "id": "pattern.id()", "attr.aria-expanded": "pattern.expandable() ? pattern.expanded() : null", "attr.aria-selected": "pattern.selected()", "attr.aria-current": "pattern.current()", "attr.aria-disabled": "pattern.disabled()", "attr.aria-level": "pattern.level()", "attr.aria-owns": "ownsId()", "attr.aria-setsize": "pattern.setsize()", "attr.aria-posinset": "pattern.posinset()", "attr.tabindex": "pattern.tabindex()" }, classAttribute: "ng-treeitem" }, exportAs: ["ngTreeItem"], ngImport: i0 });
|
|
223
|
+
}
|
|
224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: TreeItem, decorators: [{
|
|
225
|
+
type: Directive,
|
|
226
|
+
args: [{
|
|
227
|
+
selector: '[ngTreeItem]',
|
|
228
|
+
exportAs: 'ngTreeItem',
|
|
229
|
+
host: {
|
|
230
|
+
'class': 'ng-treeitem',
|
|
231
|
+
'[attr.data-active]': 'pattern.active()',
|
|
232
|
+
'role': 'treeitem',
|
|
233
|
+
'[id]': 'pattern.id()',
|
|
234
|
+
'[attr.aria-expanded]': 'pattern.expandable() ? pattern.expanded() : null',
|
|
235
|
+
'[attr.aria-selected]': 'pattern.selected()',
|
|
236
|
+
'[attr.aria-current]': 'pattern.current()',
|
|
237
|
+
'[attr.aria-disabled]': 'pattern.disabled()',
|
|
238
|
+
'[attr.aria-level]': 'pattern.level()',
|
|
239
|
+
'[attr.aria-owns]': 'ownsId()',
|
|
240
|
+
'[attr.aria-setsize]': 'pattern.setsize()',
|
|
241
|
+
'[attr.aria-posinset]': 'pattern.posinset()',
|
|
242
|
+
'[attr.tabindex]': 'pattern.tabindex()',
|
|
243
|
+
},
|
|
244
|
+
}]
|
|
245
|
+
}], ctorParameters: () => [] });
|
|
246
|
+
/**
|
|
247
|
+
* Container that designates content as a group.
|
|
248
|
+
*/
|
|
249
|
+
class TreeItemGroup {
|
|
250
|
+
/** A reference to the group element. */
|
|
251
|
+
_elementRef = inject(ElementRef);
|
|
252
|
+
/** The DeferredContentAware host directive. */
|
|
253
|
+
_deferredContentAware = inject(DeferredContentAware);
|
|
254
|
+
/** All groupable items that are descendants of the group. */
|
|
255
|
+
_unorderedItems = signal(new Set(), ...(ngDevMode ? [{ debugName: "_unorderedItems" }] : []));
|
|
256
|
+
/** The host native element. */
|
|
257
|
+
element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{ debugName: "element" }] : []));
|
|
258
|
+
/** Unique ID for the group. */
|
|
259
|
+
id = inject(_IdGenerator).getId('ng-tree-group-');
|
|
260
|
+
/** Whether the group is visible. */
|
|
261
|
+
visible = signal(true, ...(ngDevMode ? [{ debugName: "visible" }] : []));
|
|
262
|
+
/** Child items within this group. */
|
|
263
|
+
children = computed(() => [...this._unorderedItems()].sort(sortDirectives), ...(ngDevMode ? [{ debugName: "children" }] : []));
|
|
264
|
+
/** Tree item that owns the group. */
|
|
265
|
+
ownedBy = input.required(...(ngDevMode ? [{ debugName: "ownedBy" }] : []));
|
|
266
|
+
constructor() {
|
|
267
|
+
this._deferredContentAware.preserveContent.set(true);
|
|
268
|
+
// Connect the group's hidden state to the DeferredContentAware's visibility.
|
|
269
|
+
afterRenderEffect(() => {
|
|
270
|
+
this.ownedBy().tree().pattern instanceof ComboboxTreePattern
|
|
271
|
+
? this._deferredContentAware.contentVisible.set(true)
|
|
272
|
+
: this._deferredContentAware.contentVisible.set(this.visible());
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
ngOnInit() {
|
|
276
|
+
this.ownedBy().register(this);
|
|
277
|
+
}
|
|
278
|
+
ngOnDestroy() {
|
|
279
|
+
this.ownedBy().unregister();
|
|
280
|
+
}
|
|
281
|
+
register(child) {
|
|
282
|
+
this._unorderedItems().add(child);
|
|
283
|
+
this._unorderedItems.set(new Set(this._unorderedItems()));
|
|
284
|
+
}
|
|
285
|
+
unregister(child) {
|
|
286
|
+
this._unorderedItems().delete(child);
|
|
287
|
+
this._unorderedItems.set(new Set(this._unorderedItems()));
|
|
288
|
+
}
|
|
289
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: TreeItemGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
290
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.0-next.2", type: TreeItemGroup, isStandalone: true, selector: "[ngTreeItemGroup]", inputs: { ownedBy: { classPropertyName: "ownedBy", publicName: "ownedBy", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "id": "id", "attr.inert": "visible() ? null : true" }, classAttribute: "ng-treeitem-group" }, exportAs: ["ngTreeItemGroup"], hostDirectives: [{ directive: i1.DeferredContentAware, inputs: ["preserveContent", "preserveContent"] }], ngImport: i0 });
|
|
291
|
+
}
|
|
292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: TreeItemGroup, decorators: [{
|
|
293
|
+
type: Directive,
|
|
294
|
+
args: [{
|
|
295
|
+
selector: '[ngTreeItemGroup]',
|
|
296
|
+
exportAs: 'ngTreeItemGroup',
|
|
297
|
+
hostDirectives: [
|
|
298
|
+
{
|
|
299
|
+
directive: DeferredContentAware,
|
|
300
|
+
inputs: ['preserveContent'],
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
host: {
|
|
304
|
+
'class': 'ng-treeitem-group',
|
|
305
|
+
'role': 'group',
|
|
306
|
+
'[id]': 'id',
|
|
307
|
+
'[attr.inert]': 'visible() ? null : true',
|
|
308
|
+
},
|
|
309
|
+
}]
|
|
310
|
+
}], ctorParameters: () => [] });
|
|
311
|
+
/**
|
|
312
|
+
* A structural directive that marks the `ng-template` to be used as the content
|
|
313
|
+
* for a `TreeItemGroup`. This content can be lazily loaded.
|
|
314
|
+
*/
|
|
315
|
+
class TreeItemGroupContent {
|
|
316
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: TreeItemGroupContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
317
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: TreeItemGroupContent, isStandalone: true, selector: "ng-template[ngTreeItemGroupContent]", hostDirectives: [{ directive: i1.DeferredContent }], ngImport: i0 });
|
|
318
|
+
}
|
|
319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: TreeItemGroupContent, decorators: [{
|
|
320
|
+
type: Directive,
|
|
321
|
+
args: [{
|
|
322
|
+
selector: 'ng-template[ngTreeItemGroupContent]',
|
|
323
|
+
hostDirectives: [DeferredContent],
|
|
324
|
+
}]
|
|
325
|
+
}] });
|
|
326
|
+
|
|
327
|
+
export { Tree, TreeItem, TreeItemGroup, TreeItemGroupContent };
|
|
328
|
+
//# sourceMappingURL=tree.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/aria/tree/tree.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 ElementRef,\n afterRenderEffect,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n signal,\n Signal,\n OnInit,\n OnDestroy,\n untracked,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {DeferredContent, DeferredContentAware} from '@angular/aria/deferred-content';\nimport {ComboboxTreePattern, TreeItemPattern, TreePattern} from '@angular/aria/ui-patterns';\nimport {ComboboxPopup} from '../combobox';\n\ninterface HasElement {\n element: Signal<HTMLElement>;\n}\n\n/**\n * Sort directives by their document order.\n */\nfunction sortDirectives(a: HasElement, b: HasElement) {\n return (a.element().compareDocumentPosition(b.element()) & Node.DOCUMENT_POSITION_PRECEDING) > 0\n ? 1\n : -1;\n}\n\n/**\n * A Tree container.\n *\n * Transforms nested lists into an accessible, ARIA-compliant tree structure.\n *\n * ```html\n * <ul ngTree [(value)]=\"selectedItems\" [multi]=\"true\">\n * <li ngTreeItem [value]=\"'leaf1'\">Leaf Item 1</li>\n * <li ngTreeItem [value]=\"'parent1'\">\n * Parent Item 1\n * <ul ngTreeItemGroup [value]=\"'parent1'\">\n * <ng-template ngTreeItemGroupContent>\n * <li ngTreeItem [value]=\"'child1.1'\">Child Item 1.1</li>\n * <li ngTreeItem [value]=\"'child1.2'\">Child Item 1.2</li>\n * </ng-template>\n * </ul>\n * </li>\n * <li ngTreeItem [value]=\"'leaf2'\" [disabled]=\"true\">Disabled Leaf Item 2</li>\n * </ul>\n * ```\n */\n@Directive({\n selector: '[ngTree]',\n exportAs: 'ngTree',\n host: {\n 'class': 'ng-tree',\n 'role': 'tree',\n '[attr.id]': 'id()',\n '[attr.aria-orientation]': 'pattern.orientation()',\n '[attr.aria-multiselectable]': 'pattern.multi()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n '[attr.aria-activedescendant]': 'pattern.activedescendant()',\n '[tabindex]': 'pattern.tabindex()',\n '(keydown)': 'pattern.onKeydown($event)',\n '(pointerdown)': 'pattern.onPointerdown($event)',\n '(focusin)': 'onFocus()',\n },\n hostDirectives: [{directive: ComboboxPopup}],\n})\nexport class Tree<V> {\n /** A unique identifier for the tree. */\n private readonly _generatedId = inject(_IdGenerator).getId('ng-tree-');\n\n // TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.\n /** A unique identifier for the tree. */\n protected id = computed(() => this._generatedId);\n\n /** A reference to the parent combobox popup, if one exists. */\n private readonly _popup = inject<ComboboxPopup<V>>(ComboboxPopup, {\n optional: true,\n });\n\n /** A reference to the tree element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** All TreeItem instances within this tree. */\n private readonly _unorderedItems = signal(new Set<TreeItem<V>>());\n\n /** Orientation of the tree. */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multi-selection is allowed. */\n readonly multi = input(false, {transform: booleanAttribute});\n\n /** Whether the tree is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** The selection strategy used by the tree. */\n readonly selectionMode = input<'explicit' | 'follow'>('explicit');\n\n /** The focus strategy used by the tree. */\n readonly focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** Whether navigation wraps. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /** Whether to skip disabled items during navigation. */\n readonly skipDisabled = input(true, {transform: booleanAttribute});\n\n /** Typeahead delay. */\n readonly typeaheadDelay = input(0.5);\n\n /** Selected item values. */\n readonly value = model<V[]>([]);\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** Whether the tree is in navigation mode. */\n readonly nav = input(false);\n\n /** The aria-current type. */\n readonly currentType = input<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>(\n 'page',\n );\n\n /** The UI pattern for the tree. */\n readonly pattern: TreePattern<V>;\n\n /** Whether the tree has received focus yet. */\n private _hasFocused = signal(false);\n\n constructor() {\n const inputs = {\n ...this,\n id: this.id,\n allItems: computed(() =>\n [...this._unorderedItems()].sort(sortDirectives).map(item => item.pattern),\n ),\n activeItem: signal<TreeItemPattern<V> | undefined>(undefined),\n element: () => this._elementRef.nativeElement,\n combobox: () => this._popup?.combobox?.pattern,\n };\n\n this.pattern = this._popup?.combobox\n ? new ComboboxTreePattern<V>(inputs)\n : new TreePattern<V>(inputs);\n\n if (this._popup?.combobox) {\n this._popup?.controls?.set(this.pattern as ComboboxTreePattern<V>);\n }\n\n afterRenderEffect(() => {\n if (!this._hasFocused()) {\n this.pattern.setDefaultState();\n }\n });\n\n afterRenderEffect(() => {\n const items = inputs.allItems();\n const activeItem = untracked(() => inputs.activeItem());\n\n if (!items.some(i => i === activeItem) && activeItem) {\n this.pattern.listBehavior.unfocus();\n }\n });\n\n afterRenderEffect(() => {\n const items = inputs.allItems();\n const value = untracked(() => this.value());\n\n if (items && value.some(v => !items.some(i => i.value() === v))) {\n this.value.set(value.filter(v => items.some(i => i.value() === v)));\n }\n });\n }\n\n onFocus() {\n this._hasFocused.set(true);\n }\n\n register(child: TreeItem<V>) {\n this._unorderedItems().add(child);\n this._unorderedItems.set(new Set(this._unorderedItems()));\n }\n\n unregister(child: TreeItem<V>) {\n this._unorderedItems().delete(child);\n this._unorderedItems.set(new Set(this._unorderedItems()));\n }\n}\n\n/**\n * A selectable and expandable Tree Item in a Tree.\n */\n@Directive({\n selector: '[ngTreeItem]',\n exportAs: 'ngTreeItem',\n host: {\n 'class': 'ng-treeitem',\n '[attr.data-active]': 'pattern.active()',\n 'role': 'treeitem',\n '[id]': 'pattern.id()',\n '[attr.aria-expanded]': 'pattern.expandable() ? pattern.expanded() : null',\n '[attr.aria-selected]': 'pattern.selected()',\n '[attr.aria-current]': 'pattern.current()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n '[attr.aria-level]': 'pattern.level()',\n '[attr.aria-owns]': 'ownsId()',\n '[attr.aria-setsize]': 'pattern.setsize()',\n '[attr.aria-posinset]': 'pattern.posinset()',\n '[attr.tabindex]': 'pattern.tabindex()',\n },\n})\nexport class TreeItem<V> implements OnInit, OnDestroy, HasElement {\n /** A reference to the tree item element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A unique identifier for the tree item. */\n private readonly _id = inject(_IdGenerator).getId('ng-tree-item-');\n\n /** The owned tree item group. */\n private readonly _group = signal<TreeItemGroup<V> | undefined>(undefined);\n\n /** The id of the owned group. */\n readonly ownsId = computed(() => this._group()?.id);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** The value of the tree item. */\n readonly value = input.required<V>();\n\n /** The parent tree root or tree item group. */\n readonly parent = input.required<Tree<V> | TreeItemGroup<V>>();\n\n /** Whether the tree item is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Optional label for typeahead. Defaults to the element's textContent. */\n readonly label = input<string>();\n\n /** Search term for typeahead. */\n readonly searchTerm = computed(() => this.label() ?? this.element().textContent);\n\n /** The tree root. */\n readonly tree: Signal<Tree<V>> = computed(() => {\n if (this.parent() instanceof Tree) {\n return this.parent() as Tree<V>;\n }\n return (this.parent() as TreeItemGroup<V>).ownedBy().tree();\n });\n\n /** The UI pattern for this item. */\n pattern: TreeItemPattern<V>;\n\n constructor() {\n // Updates the visibility of the owned group.\n afterRenderEffect(() => {\n this._group()?.visible.set(this.pattern.expanded());\n });\n }\n\n ngOnInit() {\n this.parent().register(this);\n this.tree().register(this);\n\n const treePattern = computed(() => this.tree().pattern);\n const parentPattern = computed(() => {\n if (this.parent() instanceof Tree) {\n return treePattern();\n }\n return (this.parent() as TreeItemGroup<V>).ownedBy().pattern;\n });\n this.pattern = new TreeItemPattern<V>({\n ...this,\n id: () => this._id,\n tree: treePattern,\n parent: parentPattern,\n children: computed(\n () =>\n this._group()\n ?.children()\n .map(item => (item as TreeItem<V>).pattern) ?? [],\n ),\n hasChildren: computed(() => !!this._group()),\n });\n }\n\n ngOnDestroy() {\n this.parent().unregister(this);\n this.tree().unregister(this);\n }\n\n register(group: TreeItemGroup<V>) {\n this._group.set(group);\n }\n\n unregister() {\n this._group.set(undefined);\n }\n}\n\n/**\n * Container that designates content as a group.\n */\n@Directive({\n selector: '[ngTreeItemGroup]',\n exportAs: 'ngTreeItemGroup',\n hostDirectives: [\n {\n directive: DeferredContentAware,\n inputs: ['preserveContent'],\n },\n ],\n host: {\n 'class': 'ng-treeitem-group',\n 'role': 'group',\n '[id]': 'id',\n '[attr.inert]': 'visible() ? null : true',\n },\n})\nexport class TreeItemGroup<V> implements OnInit, OnDestroy, HasElement {\n /** A reference to the group element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The DeferredContentAware host directive. */\n private readonly _deferredContentAware = inject(DeferredContentAware);\n\n /** All groupable items that are descendants of the group. */\n private readonly _unorderedItems = signal(new Set<TreeItem<V>>());\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** Unique ID for the group. */\n readonly id = inject(_IdGenerator).getId('ng-tree-group-');\n\n /** Whether the group is visible. */\n readonly visible = signal(true);\n\n /** Child items within this group. */\n readonly children = computed(() => [...this._unorderedItems()].sort(sortDirectives));\n\n /** Tree item that owns the group. */\n readonly ownedBy = input.required<TreeItem<V>>();\n\n constructor() {\n this._deferredContentAware.preserveContent.set(true);\n // Connect the group's hidden state to the DeferredContentAware's visibility.\n afterRenderEffect(() => {\n this.ownedBy().tree().pattern instanceof ComboboxTreePattern\n ? this._deferredContentAware.contentVisible.set(true)\n : this._deferredContentAware.contentVisible.set(this.visible());\n });\n }\n\n ngOnInit() {\n this.ownedBy().register(this);\n }\n\n ngOnDestroy() {\n this.ownedBy().unregister();\n }\n\n register(child: TreeItem<V>) {\n this._unorderedItems().add(child);\n this._unorderedItems.set(new Set(this._unorderedItems()));\n }\n\n unregister(child: TreeItem<V>) {\n this._unorderedItems().delete(child);\n this._unorderedItems.set(new Set(this._unorderedItems()));\n }\n}\n\n/**\n * A structural directive that marks the `ng-template` to be used as the content\n * for a `TreeItemGroup`. This content can be lazily loaded.\n */\n@Directive({\n selector: 'ng-template[ngTreeItemGroupContent]',\n hostDirectives: [DeferredContent],\n})\nexport class TreeItemGroupContent {}\n"],"names":["i1.ComboboxPopup","i2"],"mappings":";;;;;;;;;AAiCA;;AAEG;AACH,SAAS,cAAc,CAAC,CAAa,EAAE,CAAa,EAAA;AAClD,IAAA,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,2BAA2B,IAAI;AAC7F,UAAE;UACA,CAAC,CAAC;AACR;AAEA;;;;;;;;;;;;;;;;;;;;AAoBG;MAmBU,IAAI,CAAA;;IAEE,YAAY,GAAG,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