@angular/aria 21.0.0-next.9 → 21.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_adev_assets/aria-accordion.json +373 -0
- package/_adev_assets/aria-combobox.json +383 -0
- package/_adev_assets/aria-grid.json +647 -0
- package/_adev_assets/aria-listbox.json +511 -0
- package/_adev_assets/aria-menu.json +852 -0
- package/_adev_assets/aria-tabs.json +987 -0
- package/_adev_assets/aria-toolbar.json +696 -0
- package/_adev_assets/aria-tree.json +1071 -0
- package/fesm2022/_widget-chunk.mjs +949 -0
- package/fesm2022/_widget-chunk.mjs.map +1 -0
- package/fesm2022/accordion.mjs +372 -174
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -2
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +308 -116
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +566 -0
- package/fesm2022/grid.mjs.map +1 -0
- package/fesm2022/listbox.mjs +384 -184
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +591 -0
- package/fesm2022/menu.mjs.map +1 -0
- package/fesm2022/private.mjs +2338 -0
- package/fesm2022/private.mjs.map +1 -0
- package/fesm2022/tabs.mjs +484 -276
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +366 -200
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +515 -267
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +12 -12
- package/types/_grid-chunk.d.ts +608 -0
- package/types/accordion.d.ts +8 -8
- package/types/combobox.d.ts +20 -7
- package/types/grid.d.ts +120 -0
- package/types/listbox.d.ts +9 -7
- package/types/menu.d.ts +170 -0
- package/types/{ui-patterns.d.ts → private.d.ts} +555 -433
- package/types/tabs.d.ts +8 -8
- package/types/toolbar.d.ts +31 -28
- package/types/tree.d.ts +11 -9
- package/fesm2022/deferred-content.mjs +0 -60
- package/fesm2022/deferred-content.mjs.map +0 -1
- package/fesm2022/radio-group.mjs +0 -197
- package/fesm2022/radio-group.mjs.map +0 -1
- package/fesm2022/ui-patterns.mjs +0 -2504
- package/fesm2022/ui-patterns.mjs.map +0 -1
- package/types/deferred-content.d.ts +0 -38
- package/types/radio-group.d.ts +0 -82
package/fesm2022/tabs.mjs
CHANGED
|
@@ -1,299 +1,507 @@
|
|
|
1
|
-
import * as i1 from '@angular/aria/deferred-content';
|
|
2
|
-
import { DeferredContentAware, DeferredContent } from '@angular/aria/deferred-content';
|
|
3
1
|
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
4
2
|
import { Directionality } from '@angular/cdk/bidi';
|
|
5
3
|
import * as i0 from '@angular/core';
|
|
6
4
|
import { signal, computed, Directive, inject, ElementRef, linkedSignal, input, booleanAttribute, model, afterRenderEffect } from '@angular/core';
|
|
7
|
-
import
|
|
5
|
+
import * as i1 from '@angular/aria/private';
|
|
6
|
+
import { TabListPattern, TabPattern, DeferredContentAware, TabPanelPattern, DeferredContent } from '@angular/aria/private';
|
|
8
7
|
|
|
9
|
-
/**
|
|
10
|
-
* Sort directives by their document order.
|
|
11
|
-
*/
|
|
12
8
|
function sortDirectives(a, b) {
|
|
13
|
-
|
|
14
|
-
? 1
|
|
15
|
-
: -1;
|
|
9
|
+
return (a.element().compareDocumentPosition(b.element()) & Node.DOCUMENT_POSITION_PRECEDING) > 0 ? 1 : -1;
|
|
16
10
|
}
|
|
17
|
-
/**
|
|
18
|
-
* A Tabs container.
|
|
19
|
-
*
|
|
20
|
-
* Represents a set of layered sections of content. The Tabs is a container meant to be used with
|
|
21
|
-
* TabList, Tab, and TabPanel as follows:
|
|
22
|
-
*
|
|
23
|
-
* ```html
|
|
24
|
-
* <div ngTabs>
|
|
25
|
-
* <ul ngTabList>
|
|
26
|
-
* <li ngTab value="tab1">Tab 1</li>
|
|
27
|
-
* <li ngTab value="tab2">Tab 2</li>
|
|
28
|
-
* <li ngTab value="tab3">Tab 3</li>
|
|
29
|
-
* </ul>
|
|
30
|
-
*
|
|
31
|
-
* <div ngTabPanel value="tab1">
|
|
32
|
-
* <ng-template ngTabContent>Tab content 1</ng-template>
|
|
33
|
-
* </div>
|
|
34
|
-
* <div ngTabPanel value="tab2">
|
|
35
|
-
* <ng-template ngTabContent>Tab content 2</ng-template>
|
|
36
|
-
* </div>
|
|
37
|
-
* <div ngTabPanel value="tab3">
|
|
38
|
-
* <ng-template ngTabContent>Tab content 3</ng-template>
|
|
39
|
-
* </div>
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
11
|
class Tabs {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
12
|
+
_tablist = signal(undefined, ...(ngDevMode ? [{
|
|
13
|
+
debugName: "_tablist"
|
|
14
|
+
}] : []));
|
|
15
|
+
_unorderedPanels = signal(new Set(), ...(ngDevMode ? [{
|
|
16
|
+
debugName: "_unorderedPanels"
|
|
17
|
+
}] : []));
|
|
18
|
+
tabs = computed(() => this._tablist()?.tabs(), ...(ngDevMode ? [{
|
|
19
|
+
debugName: "tabs"
|
|
20
|
+
}] : []));
|
|
21
|
+
unorderedTabpanels = computed(() => [...this._unorderedPanels()].map(tabpanel => tabpanel._pattern), ...(ngDevMode ? [{
|
|
22
|
+
debugName: "unorderedTabpanels"
|
|
23
|
+
}] : []));
|
|
24
|
+
register(child) {
|
|
25
|
+
if (child instanceof TabList) {
|
|
26
|
+
this._tablist.set(child);
|
|
59
27
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
if (child instanceof TabPanel) {
|
|
65
|
-
this._unorderedPanels().delete(child);
|
|
66
|
-
this._unorderedPanels.set(new Set(this._unorderedPanels()));
|
|
67
|
-
}
|
|
28
|
+
if (child instanceof TabPanel) {
|
|
29
|
+
this._unorderedPanels().add(child);
|
|
30
|
+
this._unorderedPanels.set(new Set(this._unorderedPanels()));
|
|
68
31
|
}
|
|
69
|
-
|
|
70
|
-
|
|
32
|
+
}
|
|
33
|
+
deregister(child) {
|
|
34
|
+
if (child instanceof TabList) {
|
|
35
|
+
this._tablist.set(undefined);
|
|
36
|
+
}
|
|
37
|
+
if (child instanceof TabPanel) {
|
|
38
|
+
this._unorderedPanels().delete(child);
|
|
39
|
+
this._unorderedPanels.set(new Set(this._unorderedPanels()));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
43
|
+
minVersion: "12.0.0",
|
|
44
|
+
version: "20.2.0-next.2",
|
|
45
|
+
ngImport: i0,
|
|
46
|
+
type: Tabs,
|
|
47
|
+
deps: [],
|
|
48
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
49
|
+
});
|
|
50
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
51
|
+
minVersion: "14.0.0",
|
|
52
|
+
version: "20.2.0-next.2",
|
|
53
|
+
type: Tabs,
|
|
54
|
+
isStandalone: true,
|
|
55
|
+
selector: "[ngTabs]",
|
|
56
|
+
host: {
|
|
57
|
+
classAttribute: "ng-tabs"
|
|
58
|
+
},
|
|
59
|
+
exportAs: ["ngTabs"],
|
|
60
|
+
ngImport: i0
|
|
61
|
+
});
|
|
71
62
|
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
64
|
+
minVersion: "12.0.0",
|
|
65
|
+
version: "20.2.0-next.2",
|
|
66
|
+
ngImport: i0,
|
|
67
|
+
type: Tabs,
|
|
68
|
+
decorators: [{
|
|
69
|
+
type: Directive,
|
|
70
|
+
args: [{
|
|
71
|
+
selector: '[ngTabs]',
|
|
72
|
+
exportAs: 'ngTabs',
|
|
73
|
+
host: {
|
|
74
|
+
'class': 'ng-tabs'
|
|
75
|
+
}
|
|
76
|
+
}]
|
|
77
|
+
}]
|
|
78
|
+
});
|
|
87
79
|
class TabList {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
80
|
+
_elementRef = inject(ElementRef);
|
|
81
|
+
_tabs = inject(Tabs);
|
|
82
|
+
_unorderedTabs = signal(new Set(), ...(ngDevMode ? [{
|
|
83
|
+
debugName: "_unorderedTabs"
|
|
84
|
+
}] : []));
|
|
85
|
+
_selection = linkedSignal(() => this.selectedTab() ? [this.selectedTab()] : []);
|
|
86
|
+
textDirection = inject(Directionality).valueSignal;
|
|
87
|
+
tabs = computed(() => [...this._unorderedTabs()].sort(sortDirectives).map(tab => tab._pattern), ...(ngDevMode ? [{
|
|
88
|
+
debugName: "tabs"
|
|
89
|
+
}] : []));
|
|
90
|
+
orientation = input('horizontal', ...(ngDevMode ? [{
|
|
91
|
+
debugName: "orientation"
|
|
92
|
+
}] : []));
|
|
93
|
+
wrap = input(true, ...(ngDevMode ? [{
|
|
94
|
+
debugName: "wrap",
|
|
95
|
+
transform: booleanAttribute
|
|
96
|
+
}] : [{
|
|
97
|
+
transform: booleanAttribute
|
|
98
|
+
}]));
|
|
99
|
+
softDisabled = input(true, ...(ngDevMode ? [{
|
|
100
|
+
debugName: "softDisabled",
|
|
101
|
+
transform: booleanAttribute
|
|
102
|
+
}] : [{
|
|
103
|
+
transform: booleanAttribute
|
|
104
|
+
}]));
|
|
105
|
+
focusMode = input('roving', ...(ngDevMode ? [{
|
|
106
|
+
debugName: "focusMode"
|
|
107
|
+
}] : []));
|
|
108
|
+
selectionMode = input('follow', ...(ngDevMode ? [{
|
|
109
|
+
debugName: "selectionMode"
|
|
110
|
+
}] : []));
|
|
111
|
+
disabled = input(false, ...(ngDevMode ? [{
|
|
112
|
+
debugName: "disabled",
|
|
113
|
+
transform: booleanAttribute
|
|
114
|
+
}] : [{
|
|
115
|
+
transform: booleanAttribute
|
|
116
|
+
}]));
|
|
117
|
+
selectedTab = model(...(ngDevMode ? [undefined, {
|
|
118
|
+
debugName: "selectedTab"
|
|
119
|
+
}] : []));
|
|
120
|
+
_pattern = new TabListPattern({
|
|
121
|
+
...this,
|
|
122
|
+
items: this.tabs,
|
|
123
|
+
value: this._selection,
|
|
124
|
+
activeItem: signal(undefined),
|
|
125
|
+
element: () => this._elementRef.nativeElement
|
|
126
|
+
});
|
|
127
|
+
_hasFocused = signal(false, ...(ngDevMode ? [{
|
|
128
|
+
debugName: "_hasFocused"
|
|
129
|
+
}] : []));
|
|
130
|
+
constructor() {
|
|
131
|
+
afterRenderEffect(() => this.selectedTab.set(this._selection()[0]));
|
|
132
|
+
afterRenderEffect(() => {
|
|
133
|
+
if (!this._hasFocused()) {
|
|
134
|
+
this._pattern.setDefaultState();
|
|
135
|
+
}
|
|
121
136
|
});
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
137
|
+
}
|
|
138
|
+
onFocus() {
|
|
139
|
+
this._hasFocused.set(true);
|
|
140
|
+
}
|
|
141
|
+
ngOnInit() {
|
|
142
|
+
this._tabs.register(this);
|
|
143
|
+
}
|
|
144
|
+
ngOnDestroy() {
|
|
145
|
+
this._tabs.deregister(this);
|
|
146
|
+
}
|
|
147
|
+
register(child) {
|
|
148
|
+
this._unorderedTabs().add(child);
|
|
149
|
+
this._unorderedTabs.set(new Set(this._unorderedTabs()));
|
|
150
|
+
}
|
|
151
|
+
deregister(child) {
|
|
152
|
+
this._unorderedTabs().delete(child);
|
|
153
|
+
this._unorderedTabs.set(new Set(this._unorderedTabs()));
|
|
154
|
+
}
|
|
155
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
156
|
+
minVersion: "12.0.0",
|
|
157
|
+
version: "20.2.0-next.2",
|
|
158
|
+
ngImport: i0,
|
|
159
|
+
type: TabList,
|
|
160
|
+
deps: [],
|
|
161
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
162
|
+
});
|
|
163
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
164
|
+
minVersion: "17.1.0",
|
|
165
|
+
version: "20.2.0-next.2",
|
|
166
|
+
type: TabList,
|
|
167
|
+
isStandalone: true,
|
|
168
|
+
selector: "[ngTabList]",
|
|
169
|
+
inputs: {
|
|
170
|
+
orientation: {
|
|
171
|
+
classPropertyName: "orientation",
|
|
172
|
+
publicName: "orientation",
|
|
173
|
+
isSignal: true,
|
|
174
|
+
isRequired: false,
|
|
175
|
+
transformFunction: null
|
|
176
|
+
},
|
|
177
|
+
wrap: {
|
|
178
|
+
classPropertyName: "wrap",
|
|
179
|
+
publicName: "wrap",
|
|
180
|
+
isSignal: true,
|
|
181
|
+
isRequired: false,
|
|
182
|
+
transformFunction: null
|
|
183
|
+
},
|
|
184
|
+
softDisabled: {
|
|
185
|
+
classPropertyName: "softDisabled",
|
|
186
|
+
publicName: "softDisabled",
|
|
187
|
+
isSignal: true,
|
|
188
|
+
isRequired: false,
|
|
189
|
+
transformFunction: null
|
|
190
|
+
},
|
|
191
|
+
focusMode: {
|
|
192
|
+
classPropertyName: "focusMode",
|
|
193
|
+
publicName: "focusMode",
|
|
194
|
+
isSignal: true,
|
|
195
|
+
isRequired: false,
|
|
196
|
+
transformFunction: null
|
|
197
|
+
},
|
|
198
|
+
selectionMode: {
|
|
199
|
+
classPropertyName: "selectionMode",
|
|
200
|
+
publicName: "selectionMode",
|
|
201
|
+
isSignal: true,
|
|
202
|
+
isRequired: false,
|
|
203
|
+
transformFunction: null
|
|
204
|
+
},
|
|
205
|
+
disabled: {
|
|
206
|
+
classPropertyName: "disabled",
|
|
207
|
+
publicName: "disabled",
|
|
208
|
+
isSignal: true,
|
|
209
|
+
isRequired: false,
|
|
210
|
+
transformFunction: null
|
|
211
|
+
},
|
|
212
|
+
selectedTab: {
|
|
213
|
+
classPropertyName: "selectedTab",
|
|
214
|
+
publicName: "selectedTab",
|
|
215
|
+
isSignal: true,
|
|
216
|
+
isRequired: false,
|
|
217
|
+
transformFunction: null
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
outputs: {
|
|
221
|
+
selectedTab: "selectedTabChange"
|
|
222
|
+
},
|
|
223
|
+
host: {
|
|
224
|
+
attributes: {
|
|
225
|
+
"role": "tablist"
|
|
226
|
+
},
|
|
227
|
+
listeners: {
|
|
228
|
+
"keydown": "_pattern.onKeydown($event)",
|
|
229
|
+
"pointerdown": "_pattern.onPointerdown($event)",
|
|
230
|
+
"focusin": "onFocus()"
|
|
231
|
+
},
|
|
232
|
+
properties: {
|
|
233
|
+
"attr.tabindex": "_pattern.tabIndex()",
|
|
234
|
+
"attr.aria-disabled": "_pattern.disabled()",
|
|
235
|
+
"attr.aria-orientation": "_pattern.orientation()",
|
|
236
|
+
"attr.aria-activedescendant": "_pattern.activeDescendant()"
|
|
237
|
+
},
|
|
238
|
+
classAttribute: "ng-tablist"
|
|
239
|
+
},
|
|
240
|
+
exportAs: ["ngTabList"],
|
|
241
|
+
ngImport: i0
|
|
242
|
+
});
|
|
151
243
|
}
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
244
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
245
|
+
minVersion: "12.0.0",
|
|
246
|
+
version: "20.2.0-next.2",
|
|
247
|
+
ngImport: i0,
|
|
248
|
+
type: TabList,
|
|
249
|
+
decorators: [{
|
|
250
|
+
type: Directive,
|
|
251
|
+
args: [{
|
|
252
|
+
selector: '[ngTabList]',
|
|
253
|
+
exportAs: 'ngTabList',
|
|
254
|
+
host: {
|
|
255
|
+
'role': 'tablist',
|
|
256
|
+
'class': 'ng-tablist',
|
|
257
|
+
'[attr.tabindex]': '_pattern.tabIndex()',
|
|
258
|
+
'[attr.aria-disabled]': '_pattern.disabled()',
|
|
259
|
+
'[attr.aria-orientation]': '_pattern.orientation()',
|
|
260
|
+
'[attr.aria-activedescendant]': '_pattern.activeDescendant()',
|
|
261
|
+
'(keydown)': '_pattern.onKeydown($event)',
|
|
262
|
+
'(pointerdown)': '_pattern.onPointerdown($event)',
|
|
263
|
+
'(focusin)': 'onFocus()'
|
|
264
|
+
}
|
|
265
|
+
}]
|
|
266
|
+
}],
|
|
267
|
+
ctorParameters: () => []
|
|
268
|
+
});
|
|
171
269
|
class Tab {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
270
|
+
_elementRef = inject(ElementRef);
|
|
271
|
+
_tabs = inject(Tabs);
|
|
272
|
+
_tabList = inject(TabList);
|
|
273
|
+
_id = inject(_IdGenerator).getId('ng-tab-');
|
|
274
|
+
element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
|
|
275
|
+
debugName: "element"
|
|
276
|
+
}] : []));
|
|
277
|
+
tablist = computed(() => this._tabList._pattern, ...(ngDevMode ? [{
|
|
278
|
+
debugName: "tablist"
|
|
279
|
+
}] : []));
|
|
280
|
+
tabpanel = computed(() => this._tabs.unorderedTabpanels().find(tabpanel => tabpanel.value() === this.value()), ...(ngDevMode ? [{
|
|
281
|
+
debugName: "tabpanel"
|
|
282
|
+
}] : []));
|
|
283
|
+
disabled = input(false, ...(ngDevMode ? [{
|
|
284
|
+
debugName: "disabled",
|
|
285
|
+
transform: booleanAttribute
|
|
286
|
+
}] : [{
|
|
287
|
+
transform: booleanAttribute
|
|
288
|
+
}]));
|
|
289
|
+
value = input.required(...(ngDevMode ? [{
|
|
290
|
+
debugName: "value"
|
|
291
|
+
}] : []));
|
|
292
|
+
_pattern = new TabPattern({
|
|
293
|
+
...this,
|
|
294
|
+
id: () => this._id,
|
|
295
|
+
tablist: this.tablist,
|
|
296
|
+
tabpanel: this.tabpanel,
|
|
297
|
+
value: this.value
|
|
298
|
+
});
|
|
299
|
+
ngOnInit() {
|
|
300
|
+
this._tabList.register(this);
|
|
301
|
+
}
|
|
302
|
+
ngOnDestroy() {
|
|
303
|
+
this._tabList.deregister(this);
|
|
304
|
+
}
|
|
305
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
306
|
+
minVersion: "12.0.0",
|
|
307
|
+
version: "20.2.0-next.2",
|
|
308
|
+
ngImport: i0,
|
|
309
|
+
type: Tab,
|
|
310
|
+
deps: [],
|
|
311
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
312
|
+
});
|
|
313
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
314
|
+
minVersion: "17.1.0",
|
|
315
|
+
version: "20.2.0-next.2",
|
|
316
|
+
type: Tab,
|
|
317
|
+
isStandalone: true,
|
|
318
|
+
selector: "[ngTab]",
|
|
319
|
+
inputs: {
|
|
320
|
+
disabled: {
|
|
321
|
+
classPropertyName: "disabled",
|
|
322
|
+
publicName: "disabled",
|
|
323
|
+
isSignal: true,
|
|
324
|
+
isRequired: false,
|
|
325
|
+
transformFunction: null
|
|
326
|
+
},
|
|
327
|
+
value: {
|
|
328
|
+
classPropertyName: "value",
|
|
329
|
+
publicName: "value",
|
|
330
|
+
isSignal: true,
|
|
331
|
+
isRequired: true,
|
|
332
|
+
transformFunction: null
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
host: {
|
|
336
|
+
attributes: {
|
|
337
|
+
"role": "tab"
|
|
338
|
+
},
|
|
339
|
+
properties: {
|
|
340
|
+
"attr.data-active": "_pattern.active()",
|
|
341
|
+
"attr.id": "_pattern.id()",
|
|
342
|
+
"attr.tabindex": "_pattern.tabIndex()",
|
|
343
|
+
"attr.aria-selected": "_pattern.selected()",
|
|
344
|
+
"attr.aria-disabled": "_pattern.disabled()",
|
|
345
|
+
"attr.aria-controls": "_pattern.controls()"
|
|
346
|
+
},
|
|
347
|
+
classAttribute: "ng-tab"
|
|
348
|
+
},
|
|
349
|
+
exportAs: ["ngTab"],
|
|
350
|
+
ngImport: i0
|
|
351
|
+
});
|
|
206
352
|
}
|
|
207
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
* and a proper styling is required.
|
|
231
|
-
*/
|
|
353
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
354
|
+
minVersion: "12.0.0",
|
|
355
|
+
version: "20.2.0-next.2",
|
|
356
|
+
ngImport: i0,
|
|
357
|
+
type: Tab,
|
|
358
|
+
decorators: [{
|
|
359
|
+
type: Directive,
|
|
360
|
+
args: [{
|
|
361
|
+
selector: '[ngTab]',
|
|
362
|
+
exportAs: 'ngTab',
|
|
363
|
+
host: {
|
|
364
|
+
'role': 'tab',
|
|
365
|
+
'class': 'ng-tab',
|
|
366
|
+
'[attr.data-active]': '_pattern.active()',
|
|
367
|
+
'[attr.id]': '_pattern.id()',
|
|
368
|
+
'[attr.tabindex]': '_pattern.tabIndex()',
|
|
369
|
+
'[attr.aria-selected]': '_pattern.selected()',
|
|
370
|
+
'[attr.aria-disabled]': '_pattern.disabled()',
|
|
371
|
+
'[attr.aria-controls]': '_pattern.controls()'
|
|
372
|
+
}
|
|
373
|
+
}]
|
|
374
|
+
}]
|
|
375
|
+
});
|
|
232
376
|
class TabPanel {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
377
|
+
_deferredContentAware = inject(DeferredContentAware);
|
|
378
|
+
_Tabs = inject(Tabs);
|
|
379
|
+
_id = inject(_IdGenerator).getId('ng-tabpanel-', true);
|
|
380
|
+
tab = computed(() => this._Tabs.tabs()?.find(tab => tab.value() === this.value()), ...(ngDevMode ? [{
|
|
381
|
+
debugName: "tab"
|
|
382
|
+
}] : []));
|
|
383
|
+
value = input.required(...(ngDevMode ? [{
|
|
384
|
+
debugName: "value"
|
|
385
|
+
}] : []));
|
|
386
|
+
_pattern = new TabPanelPattern({
|
|
387
|
+
...this,
|
|
388
|
+
id: () => this._id,
|
|
389
|
+
tab: this.tab
|
|
390
|
+
});
|
|
391
|
+
constructor() {
|
|
392
|
+
afterRenderEffect(() => this._deferredContentAware.contentVisible.set(!this._pattern.hidden()));
|
|
393
|
+
}
|
|
394
|
+
ngOnInit() {
|
|
395
|
+
this._Tabs.register(this);
|
|
396
|
+
}
|
|
397
|
+
ngOnDestroy() {
|
|
398
|
+
this._Tabs.deregister(this);
|
|
399
|
+
}
|
|
400
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
401
|
+
minVersion: "12.0.0",
|
|
402
|
+
version: "20.2.0-next.2",
|
|
403
|
+
ngImport: i0,
|
|
404
|
+
type: TabPanel,
|
|
405
|
+
deps: [],
|
|
406
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
407
|
+
});
|
|
408
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
409
|
+
minVersion: "17.1.0",
|
|
410
|
+
version: "20.2.0-next.2",
|
|
411
|
+
type: TabPanel,
|
|
412
|
+
isStandalone: true,
|
|
413
|
+
selector: "[ngTabPanel]",
|
|
414
|
+
inputs: {
|
|
415
|
+
value: {
|
|
416
|
+
classPropertyName: "value",
|
|
417
|
+
publicName: "value",
|
|
418
|
+
isSignal: true,
|
|
419
|
+
isRequired: true,
|
|
420
|
+
transformFunction: null
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
host: {
|
|
424
|
+
attributes: {
|
|
425
|
+
"role": "tabpanel"
|
|
426
|
+
},
|
|
427
|
+
properties: {
|
|
428
|
+
"attr.id": "_pattern.id()",
|
|
429
|
+
"attr.tabindex": "_pattern.tabIndex()",
|
|
430
|
+
"attr.inert": "_pattern.hidden() ? true : null",
|
|
431
|
+
"attr.aria-labelledby": "_pattern.labelledBy()"
|
|
432
|
+
},
|
|
433
|
+
classAttribute: "ng-tabpanel"
|
|
434
|
+
},
|
|
435
|
+
exportAs: ["ngTabPanel"],
|
|
436
|
+
hostDirectives: [{
|
|
437
|
+
directive: i1.DeferredContentAware,
|
|
438
|
+
inputs: ["preserveContent", "preserveContent"]
|
|
439
|
+
}],
|
|
440
|
+
ngImport: i0
|
|
441
|
+
});
|
|
260
442
|
}
|
|
261
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
443
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
444
|
+
minVersion: "12.0.0",
|
|
445
|
+
version: "20.2.0-next.2",
|
|
446
|
+
ngImport: i0,
|
|
447
|
+
type: TabPanel,
|
|
448
|
+
decorators: [{
|
|
449
|
+
type: Directive,
|
|
450
|
+
args: [{
|
|
451
|
+
selector: '[ngTabPanel]',
|
|
452
|
+
exportAs: 'ngTabPanel',
|
|
453
|
+
host: {
|
|
454
|
+
'role': 'tabpanel',
|
|
455
|
+
'class': 'ng-tabpanel',
|
|
456
|
+
'[attr.id]': '_pattern.id()',
|
|
457
|
+
'[attr.tabindex]': '_pattern.tabIndex()',
|
|
458
|
+
'[attr.inert]': '_pattern.hidden() ? true : null',
|
|
459
|
+
'[attr.aria-labelledby]': '_pattern.labelledBy()'
|
|
460
|
+
},
|
|
461
|
+
hostDirectives: [{
|
|
462
|
+
directive: DeferredContentAware,
|
|
463
|
+
inputs: ['preserveContent']
|
|
464
|
+
}]
|
|
465
|
+
}]
|
|
466
|
+
}],
|
|
467
|
+
ctorParameters: () => []
|
|
468
|
+
});
|
|
285
469
|
class TabContent {
|
|
286
|
-
|
|
287
|
-
|
|
470
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
471
|
+
minVersion: "12.0.0",
|
|
472
|
+
version: "20.2.0-next.2",
|
|
473
|
+
ngImport: i0,
|
|
474
|
+
type: TabContent,
|
|
475
|
+
deps: [],
|
|
476
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
477
|
+
});
|
|
478
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
479
|
+
minVersion: "14.0.0",
|
|
480
|
+
version: "20.2.0-next.2",
|
|
481
|
+
type: TabContent,
|
|
482
|
+
isStandalone: true,
|
|
483
|
+
selector: "ng-template[ngTabContent]",
|
|
484
|
+
exportAs: ["ngTabContent"],
|
|
485
|
+
hostDirectives: [{
|
|
486
|
+
directive: i1.DeferredContent
|
|
487
|
+
}],
|
|
488
|
+
ngImport: i0
|
|
489
|
+
});
|
|
288
490
|
}
|
|
289
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
491
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
492
|
+
minVersion: "12.0.0",
|
|
493
|
+
version: "20.2.0-next.2",
|
|
494
|
+
ngImport: i0,
|
|
495
|
+
type: TabContent,
|
|
496
|
+
decorators: [{
|
|
497
|
+
type: Directive,
|
|
498
|
+
args: [{
|
|
499
|
+
selector: 'ng-template[ngTabContent]',
|
|
500
|
+
exportAs: 'ngTabContent',
|
|
501
|
+
hostDirectives: [DeferredContent]
|
|
502
|
+
}]
|
|
503
|
+
}]
|
|
504
|
+
});
|
|
297
505
|
|
|
298
506
|
export { Tab, TabContent, TabList, TabPanel, Tabs };
|
|
299
507
|
//# sourceMappingURL=tabs.mjs.map
|