@zeyos/zx 4.3.4 → 5.0.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.
- package/CHANGELOG.md +438 -0
- package/README.md +49 -10
- package/dist/types/components/activity-item/activity-item.d.ts +351 -0
- package/dist/types/components/activity-list/activity-list.d.ts +217 -0
- package/dist/types/components/app-sidebar/app-sidebar.d.ts +33 -3
- package/dist/types/components/avatar/avatar.d.ts +46 -7
- package/dist/types/components/badge/badge.d.ts +21 -1
- package/dist/types/components/button/button.d.ts +23 -0
- package/dist/types/components/calendar/calendar.d.ts +19 -0
- package/dist/types/components/card/card.d.ts +7 -0
- package/dist/types/components/card-view/card-view.d.ts +11 -3
- package/dist/types/components/card-view/record-card.d.ts +7 -1
- package/dist/types/components/chart/chart.d.ts +10 -0
- package/dist/types/components/checklist/checklist.d.ts +9 -0
- package/dist/types/components/code-editor/code-editor.d.ts +149 -0
- package/dist/types/components/code-editor/field-adapter.d.ts +5 -0
- package/dist/types/components/context-menu/context-menu.d.ts +18 -2
- package/dist/types/components/date-picker/date-picker.d.ts +8 -0
- package/dist/types/components/date-picker/time-picker.d.ts +7 -0
- package/dist/types/components/datebox/date-range-box.d.ts +5 -1
- package/dist/types/components/datebox/datebox.d.ts +7 -2
- package/dist/types/components/dialog/dialog.d.ts +75 -6
- package/dist/types/components/dropdown/dropdown.d.ts +2 -2
- package/dist/types/components/entity-ref/entity-ref.d.ts +331 -0
- package/dist/types/components/field/field.d.ts +24 -2
- package/dist/types/components/fieldset/fieldset.d.ts +19 -1
- package/dist/types/components/file-item/file-item.d.ts +262 -0
- package/dist/types/components/file-list/file-list.d.ts +171 -0
- package/dist/types/components/filter/filter.d.ts +91 -36
- package/dist/types/components/filter-panel/filter-panel.d.ts +449 -0
- package/dist/types/components/form/form.d.ts +12 -1
- package/dist/types/components/kanban-view/kanban-card.d.ts +146 -0
- package/dist/types/components/kanban-view/kanban-view.d.ts +170 -4
- package/dist/types/components/launcher/launcher.d.ts +278 -26
- package/dist/types/components/list-toolbar/list-toolbar.d.ts +599 -0
- package/dist/types/components/menu-button/menu-button.d.ts +37 -42
- package/dist/types/components/message/message.d.ts +126 -17
- package/dist/types/components/modal/modal.d.ts +61 -2
- package/dist/types/components/navigation-bar/navigation-bar.d.ts +105 -21
- package/dist/types/components/panel/panel.d.ts +7 -0
- package/dist/types/components/search/search.d.ts +7 -0
- package/dist/types/components/select/color.d.ts +12 -0
- package/dist/types/components/select/glyphs.d.ts +124 -0
- package/dist/types/components/select/select.d.ts +15 -3
- package/dist/types/components/sort-control/sort-control.d.ts +105 -0
- package/dist/types/components/stat-tile/stat-tile.d.ts +288 -0
- package/dist/types/components/tabbox/tabbox.d.ts +16 -0
- package/dist/types/components/table/table.d.ts +190 -1
- package/dist/types/components/table-view/table-view.d.ts +11 -5
- package/dist/types/components/tag-picker/tag-picker.d.ts +21 -4
- package/dist/types/components/timebox/timebox.d.ts +7 -0
- package/dist/types/components/tree/tree.d.ts +13 -0
- package/dist/types/components/value-list/value-list.d.ts +8 -0
- package/dist/types/components/view/record-view.d.ts +96 -5
- package/dist/types/core/breakpoint.d.ts +1 -1
- package/dist/types/core/icons.d.ts +37 -22
- package/dist/types/core/motion.d.ts +59 -0
- package/dist/types/core/overlay-host.d.ts +15 -1
- package/dist/types/index.d.ts +16 -3
- package/dist/types/internal/app-rail.d.ts +10 -0
- package/dist/types/internal/menu-items.d.ts +134 -0
- package/dist/types/zeyos/connect.d.ts +6 -0
- package/dist/types/zeyos/form.d.ts +50 -9
- package/dist/types/zeyos/index.d.ts +1 -1
- package/dist/types/zeyos/query.d.ts +79 -0
- package/dist/types/zeyos/schema.d.ts +24 -1
- package/dist/types/zeyos/table.d.ts +100 -14
- package/dist/types/zeyos/view.d.ts +10 -0
- package/dist/zx-zeyos.esm.js +2206 -489
- package/dist/zx-zeyos.esm.min.js +56 -1
- package/dist/zx.css +3322 -724
- package/dist/zx.esm.js +12244 -5809
- package/dist/zx.esm.min.js +58 -3
- package/dist/zx.global.js +12246 -5811
- package/dist/zx.global.min.js +58 -3
- package/dist/zx.min.css +1 -1
- package/docs/api.json +1683 -146
- package/docs/llms.md +777 -110
- package/docs/llms.txt +14 -8
- package/package.json +1 -1
- package/src/components/account-menu/account-menu.css +35 -10
- package/src/components/activity-item/activity-item.css +137 -0
- package/src/components/activity-item/activity-item.js +602 -0
- package/src/components/activity-list/activity-list.css +99 -0
- package/src/components/activity-list/activity-list.js +409 -0
- package/src/components/app-icon/app-icon.css +1 -1
- package/src/components/app-rail/app-rail.css +191 -22
- package/src/components/app-sidebar/app-sidebar.css +349 -24
- package/src/components/app-sidebar/app-sidebar.js +86 -11
- package/src/components/aurora/aurora.css +5 -3
- package/src/components/avatar/avatar.css +32 -7
- package/src/components/avatar/avatar.js +72 -8
- package/src/components/badge/badge.css +54 -2
- package/src/components/badge/badge.js +29 -2
- package/src/components/button/button.css +74 -8
- package/src/components/button/button.js +44 -1
- package/src/components/calendar/calendar.css +46 -46
- package/src/components/calendar/calendar.js +33 -3
- package/src/components/card/card.css +2 -2
- package/src/components/card/card.js +12 -1
- package/src/components/card-view/card-view.css +10 -7
- package/src/components/card-view/card-view.js +25 -9
- package/src/components/card-view/record-card.js +7 -3
- package/src/components/chart/chart.css +4 -1
- package/src/components/chart/chart.js +12 -0
- package/src/components/check-button/check-button.css +10 -2
- package/src/components/checklist/checklist.css +9 -2
- package/src/components/checklist/checklist.js +11 -5
- package/src/components/checklist/field-adapter.js +3 -1
- package/src/components/code-editor/code-editor.css +68 -0
- package/src/components/code-editor/code-editor.js +306 -0
- package/src/components/code-editor/field-adapter.js +34 -0
- package/src/components/context-menu/context-menu.css +87 -5
- package/src/components/context-menu/context-menu.js +22 -30
- package/src/components/copy/copy-button.css +6 -0
- package/src/components/copy/copy-input.css +8 -3
- package/src/components/data-filter/data-filter.css +5 -4
- package/src/components/date-picker/date-picker.css +6 -6
- package/src/components/date-picker/date-picker.js +22 -8
- package/src/components/date-picker/date-range-picker.css +3 -3
- package/src/components/date-picker/month-picker.js +3 -3
- package/src/components/date-picker/time-picker.css +1 -1
- package/src/components/date-picker/time-picker.js +20 -8
- package/src/components/datebox/date-range-box.css +79 -2
- package/src/components/datebox/date-range-box.js +13 -2
- package/src/components/datebox/datebox.css +79 -2
- package/src/components/datebox/datebox.js +13 -2
- package/src/components/dialog/dialog.css +26 -0
- package/src/components/dialog/dialog.js +174 -70
- package/src/components/dropdown/dropdown.css +1 -1
- package/src/components/dropdown/dropdown.js +7 -5
- package/src/components/empty-state/empty-state.css +2 -2
- package/src/components/entity-ref/entity-ref.css +182 -0
- package/src/components/entity-ref/entity-ref.js +496 -0
- package/src/components/field/field.css +28 -9
- package/src/components/field/field.js +68 -26
- package/src/components/field-upload/field-upload.css +1 -1
- package/src/components/fieldset/fieldset.css +5 -3
- package/src/components/fieldset/fieldset.js +28 -5
- package/src/components/file-item/file-item.css +88 -0
- package/src/components/file-item/file-item.js +505 -0
- package/src/components/file-list/file-list.css +51 -0
- package/src/components/file-list/file-list.js +320 -0
- package/src/components/filter/filter.css +27 -1
- package/src/components/filter/filter.js +205 -47
- package/src/components/filter-panel/filter-panel.css +104 -0
- package/src/components/filter-panel/filter-panel.js +964 -0
- package/src/components/finder/finder.css +15 -13
- package/src/components/form/form.css +5 -4
- package/src/components/form/form.js +11 -2
- package/src/components/grid/grid.css +1 -1
- package/src/components/groupbox/groupbox.css +1 -1
- package/src/components/kanban-view/kanban-card.js +247 -0
- package/src/components/kanban-view/kanban-view.css +226 -8
- package/src/components/kanban-view/kanban-view.js +255 -12
- package/src/components/launcher/launcher.css +107 -25
- package/src/components/launcher/launcher.js +557 -63
- package/src/components/list-toolbar/list-toolbar.css +194 -0
- package/src/components/list-toolbar/list-toolbar.js +851 -0
- package/src/components/master-panel/master-panel.css +2 -0
- package/src/components/menu-button/menu-button.css +87 -5
- package/src/components/menu-button/menu-button.js +86 -46
- package/src/components/message/message.css +38 -5
- package/src/components/message/message.js +230 -17
- package/src/components/modal/modal.css +15 -0
- package/src/components/modal/modal.js +159 -3
- package/src/components/navigation-bar/navigation-bar.css +95 -11
- package/src/components/navigation-bar/navigation-bar.js +171 -4
- package/src/components/number-field/field-adapter.js +1 -0
- package/src/components/number-field/number-field.css +70 -0
- package/src/components/number-field/number-field.js +2 -0
- package/src/components/pagination/pagination.css +8 -6
- package/src/components/panel/panel.css +1 -1
- package/src/components/panel/panel.js +13 -2
- package/src/components/rating/rating.css +7 -0
- package/src/components/search/search.js +17 -5
- package/src/components/select/color.js +22 -0
- package/src/components/select/field-adapter.js +6 -1
- package/src/components/select/glyphs.js +165 -0
- package/src/components/select/select.css +138 -45
- package/src/components/select/select.js +86 -47
- package/src/components/sheet/sheet.css +11 -8
- package/src/components/slider/slider.css +16 -2
- package/src/components/slider/slider.js +1 -1
- package/src/components/sort-control/sort-control.css +20 -0
- package/src/components/sort-control/sort-control.js +140 -0
- package/src/components/stat-tile/stat-tile.css +208 -0
- package/src/components/stat-tile/stat-tile.js +601 -0
- package/src/components/tabbox/tabbox.css +32 -27
- package/src/components/tabbox/tabbox.js +17 -2
- package/src/components/table/table.css +155 -31
- package/src/components/table/table.js +386 -33
- package/src/components/table-view/table-view.css +8 -2
- package/src/components/table-view/table-view.js +21 -6
- package/src/components/tag-picker/tag-picker.css +86 -6
- package/src/components/tag-picker/tag-picker.js +25 -8
- package/src/components/timebox/timebox.css +22 -2
- package/src/components/timebox/timebox.js +18 -5
- package/src/components/toggle/toggle.css +12 -1
- package/src/components/toolbar/toolbar.js +2 -2
- package/src/components/tooltip/tooltip.css +4 -0
- package/src/components/tooltip/tooltip.js +10 -3
- package/src/components/tree/tree.css +25 -16
- package/src/components/tree/tree.js +31 -0
- package/src/components/value-list/value-list.css +3 -3
- package/src/components/value-list/value-list.js +22 -6
- package/src/components/view/record-view.css +5 -0
- package/src/components/view/record-view.js +100 -7
- package/src/core/breakpoint.js +1 -1
- package/src/core/icons.js +259 -57
- package/src/core/motion.js +147 -0
- package/src/core/overlay-host.js +21 -2
- package/src/index.js +30 -3
- package/src/internal/app-rail.js +18 -1
- package/src/internal/menu-items.js +142 -0
- package/src/zeyos/connect.js +6 -2
- package/src/zeyos/form.js +67 -27
- package/src/zeyos/index.js +1 -1
- package/src/zeyos/query.js +153 -0
- package/src/zeyos/schema.js +144 -27
- package/src/zeyos/table.js +68 -5
- package/src/zeyos/view.js +6 -0
- package/styles/base.css +56 -0
- package/styles/icons.css +11 -1
- package/styles/print.css +192 -0
- package/styles/tokens/dark.css +113 -37
- package/styles/tokens/global.css +121 -27
- package/styles/tokens/semantic.css +100 -31
- package/styles/tokens/themes.css +7 -6
- package/styles/zx.css +11 -1
- package/styles/tokens/density.css +0 -9
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import { Component } from '../../core/component.js';
|
|
2
|
+
import { Avatar } from '../avatar/avatar.js';
|
|
3
|
+
export type ActivityContent = string | number | Node | Component | null;
|
|
4
|
+
export type AvatarOptions = import('../avatar/avatar.js').AvatarOptions;
|
|
5
|
+
export type ActivityAvatar = AvatarOptions | Element | null;
|
|
6
|
+
export type ActivityAction = {
|
|
7
|
+
/**
|
|
8
|
+
* Stable action identifier.
|
|
9
|
+
*/
|
|
10
|
+
id: string | number;
|
|
11
|
+
/**
|
|
12
|
+
* Visible label.
|
|
13
|
+
*/
|
|
14
|
+
label?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Icon name.
|
|
17
|
+
*/
|
|
18
|
+
icon?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Optional safe native-link destination.
|
|
21
|
+
*/
|
|
22
|
+
href?: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Native browsing context.
|
|
25
|
+
*/
|
|
26
|
+
target?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Native link relationship.
|
|
29
|
+
*/
|
|
30
|
+
rel?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Native title and icon-only accessible label.
|
|
33
|
+
*/
|
|
34
|
+
title?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the action is unavailable.
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Visual intent.
|
|
41
|
+
*/
|
|
42
|
+
kind?: 'default' | 'primary' | 'danger' | 'ghost';
|
|
43
|
+
/**
|
|
44
|
+
* Host-owned activation callback.
|
|
45
|
+
*/
|
|
46
|
+
onselect?: (event: MouseEvent) => void;
|
|
47
|
+
};
|
|
48
|
+
export type ActivityActionSlot = Element | ActivityAction;
|
|
49
|
+
export type NormalizedActivityAction = {
|
|
50
|
+
/**
|
|
51
|
+
* Stable action identifier.
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
/**
|
|
55
|
+
* Visible label.
|
|
56
|
+
*/
|
|
57
|
+
label: string;
|
|
58
|
+
/**
|
|
59
|
+
* Icon name.
|
|
60
|
+
*/
|
|
61
|
+
icon: string | null;
|
|
62
|
+
/**
|
|
63
|
+
* Safe native-link destination.
|
|
64
|
+
*/
|
|
65
|
+
href: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* Native browsing context.
|
|
68
|
+
*/
|
|
69
|
+
target: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Native link relationship.
|
|
72
|
+
*/
|
|
73
|
+
rel: string | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Native title.
|
|
76
|
+
*/
|
|
77
|
+
title: string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the action is unavailable.
|
|
80
|
+
*/
|
|
81
|
+
disabled: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Visual intent.
|
|
84
|
+
*/
|
|
85
|
+
kind: 'default' | 'primary' | 'danger' | 'ghost';
|
|
86
|
+
/**
|
|
87
|
+
* Host callback.
|
|
88
|
+
*/
|
|
89
|
+
onselect: ((event: MouseEvent) => void) | undefined;
|
|
90
|
+
};
|
|
91
|
+
export type ActivityTime = {
|
|
92
|
+
/**
|
|
93
|
+
* Machine-readable ISO timestamp when valid.
|
|
94
|
+
*/
|
|
95
|
+
dateTime: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* Human-readable timestamp.
|
|
98
|
+
*/
|
|
99
|
+
label: string;
|
|
100
|
+
};
|
|
101
|
+
export type ActivityState = 'default' | 'pending' | 'failed';
|
|
102
|
+
export type ActivityStateDescriptor = {
|
|
103
|
+
/**
|
|
104
|
+
* Resolved state.
|
|
105
|
+
*/
|
|
106
|
+
state: ActivityState;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the entry is still waiting on its request.
|
|
109
|
+
*/
|
|
110
|
+
busy: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Message key for the built-in word, or null when no badge is shown.
|
|
113
|
+
*/
|
|
114
|
+
key: string | null;
|
|
115
|
+
/**
|
|
116
|
+
* Built-in English word, or null when no badge is shown.
|
|
117
|
+
*/
|
|
118
|
+
fallback: string | null;
|
|
119
|
+
/**
|
|
120
|
+
* Badge intent.
|
|
121
|
+
*/
|
|
122
|
+
kind: 'neutral' | 'danger';
|
|
123
|
+
/**
|
|
124
|
+
* Host-supplied word replacing the built-in one.
|
|
125
|
+
*/
|
|
126
|
+
label: string | null;
|
|
127
|
+
};
|
|
128
|
+
export type ActivityItemOptions = {
|
|
129
|
+
/**
|
|
130
|
+
* Host-owned activity identifier.
|
|
131
|
+
*/
|
|
132
|
+
id?: unknown;
|
|
133
|
+
/**
|
|
134
|
+
* Actor identity text or presentation slot.
|
|
135
|
+
*/
|
|
136
|
+
actor?: ActivityContent;
|
|
137
|
+
/**
|
|
138
|
+
* Avatar descriptor or host-owned avatar element.
|
|
139
|
+
*/
|
|
140
|
+
avatar?: ActivityAvatar;
|
|
141
|
+
/**
|
|
142
|
+
* Activity summary.
|
|
143
|
+
*/
|
|
144
|
+
title?: ActivityContent;
|
|
145
|
+
/**
|
|
146
|
+
* Optional body slot.
|
|
147
|
+
*/
|
|
148
|
+
content?: ActivityContent;
|
|
149
|
+
/**
|
|
150
|
+
* Date, parseable date string, or epoch milliseconds.
|
|
151
|
+
*/
|
|
152
|
+
timestamp?: Date | string | number | null;
|
|
153
|
+
/**
|
|
154
|
+
* Explicit human-readable timestamp.
|
|
155
|
+
*/
|
|
156
|
+
timeLabel?: string | null;
|
|
157
|
+
/**
|
|
158
|
+
* Compact metadata slots.
|
|
159
|
+
*/
|
|
160
|
+
metadata?: ActivityContent[];
|
|
161
|
+
/**
|
|
162
|
+
* Attachment presentation slots, commonly FileItem elements.
|
|
163
|
+
*/
|
|
164
|
+
attachments?: ActivityContent[];
|
|
165
|
+
/**
|
|
166
|
+
* Native action descriptors or host-owned controls.
|
|
167
|
+
*/
|
|
168
|
+
actions?: ActivityActionSlot[];
|
|
169
|
+
/**
|
|
170
|
+
* Product-neutral activity kind exposed as `data-kind`.
|
|
171
|
+
*/
|
|
172
|
+
kind?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Delivery state exposed as `data-state`.
|
|
175
|
+
*/
|
|
176
|
+
state?: ActivityState;
|
|
177
|
+
/**
|
|
178
|
+
* Word shown in the state badge instead of the built-in one.
|
|
179
|
+
*/
|
|
180
|
+
stateLabel?: string | null;
|
|
181
|
+
/**
|
|
182
|
+
* Semantic heading level for the activity summary.
|
|
183
|
+
*/
|
|
184
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
185
|
+
onaction?: (event: CustomEvent<{
|
|
186
|
+
id: string;
|
|
187
|
+
action: NormalizedActivityAction;
|
|
188
|
+
event: MouseEvent;
|
|
189
|
+
}>) => void;
|
|
190
|
+
};
|
|
191
|
+
/** @typedef {string|number|Node|Component|null} ActivityContent */
|
|
192
|
+
/** @typedef {import('../avatar/avatar.js').AvatarOptions} AvatarOptions */
|
|
193
|
+
/** @typedef {AvatarOptions|Element|null} ActivityAvatar */
|
|
194
|
+
/**
|
|
195
|
+
* @typedef {Object} ActivityAction
|
|
196
|
+
* @property {string|number} id Stable action identifier.
|
|
197
|
+
* @property {string} [label=''] Visible label.
|
|
198
|
+
* @property {string|null} [icon=null] Icon name.
|
|
199
|
+
* @property {string|null} [href=null] Optional safe native-link destination.
|
|
200
|
+
* @property {string} [target] Native browsing context.
|
|
201
|
+
* @property {string} [rel] Native link relationship.
|
|
202
|
+
* @property {string} [title] Native title and icon-only accessible label.
|
|
203
|
+
* @property {boolean} [disabled=false] Whether the action is unavailable.
|
|
204
|
+
* @property {'default'|'primary'|'danger'|'ghost'} [kind='ghost'] Visual intent.
|
|
205
|
+
* @property {(event:MouseEvent)=>void} [onselect] Host-owned activation callback.
|
|
206
|
+
*/
|
|
207
|
+
/** @typedef {Element|ActivityAction} ActivityActionSlot */
|
|
208
|
+
/**
|
|
209
|
+
* @typedef {Object} NormalizedActivityAction
|
|
210
|
+
* @property {string} id Stable action identifier.
|
|
211
|
+
* @property {string} label Visible label.
|
|
212
|
+
* @property {string|null} icon Icon name.
|
|
213
|
+
* @property {string|null} href Safe native-link destination.
|
|
214
|
+
* @property {string|undefined} target Native browsing context.
|
|
215
|
+
* @property {string|undefined} rel Native link relationship.
|
|
216
|
+
* @property {string|undefined} title Native title.
|
|
217
|
+
* @property {boolean} disabled Whether the action is unavailable.
|
|
218
|
+
* @property {'default'|'primary'|'danger'|'ghost'} kind Visual intent.
|
|
219
|
+
* @property {((event:MouseEvent)=>void)|undefined} onselect Host callback.
|
|
220
|
+
*/
|
|
221
|
+
/**
|
|
222
|
+
* @typedef {Object} ActivityTime
|
|
223
|
+
* @property {string|null} dateTime Machine-readable ISO timestamp when valid.
|
|
224
|
+
* @property {string} label Human-readable timestamp.
|
|
225
|
+
*/
|
|
226
|
+
/** @typedef {'default'|'pending'|'failed'} ActivityState Delivery state of one entry. */
|
|
227
|
+
/**
|
|
228
|
+
* @typedef {Object} ActivityStateDescriptor
|
|
229
|
+
* @property {ActivityState} state Resolved state.
|
|
230
|
+
* @property {boolean} busy Whether the entry is still waiting on its request.
|
|
231
|
+
* @property {string|null} key Message key for the built-in word, or null when no badge is shown.
|
|
232
|
+
* @property {string|null} fallback Built-in English word, or null when no badge is shown.
|
|
233
|
+
* @property {'neutral'|'danger'} kind Badge intent.
|
|
234
|
+
* @property {string|null} label Host-supplied word replacing the built-in one.
|
|
235
|
+
*/
|
|
236
|
+
/**
|
|
237
|
+
* @typedef {Object} ActivityItemOptions
|
|
238
|
+
* @property {unknown} [id=null] Host-owned activity identifier.
|
|
239
|
+
* @property {ActivityContent} [actor=''] Actor identity text or presentation slot.
|
|
240
|
+
* @property {ActivityAvatar} [avatar=null] Avatar descriptor or host-owned avatar element.
|
|
241
|
+
* @property {ActivityContent} [title=''] Activity summary.
|
|
242
|
+
* @property {ActivityContent} [content=null] Optional body slot.
|
|
243
|
+
* @property {Date|string|number|null} [timestamp=null] Date, parseable date string, or epoch milliseconds.
|
|
244
|
+
* @property {string|null} [timeLabel=null] Explicit human-readable timestamp.
|
|
245
|
+
* @property {ActivityContent[]} [metadata=[]] Compact metadata slots.
|
|
246
|
+
* @property {ActivityContent[]} [attachments=[]] Attachment presentation slots, commonly FileItem elements.
|
|
247
|
+
* @property {ActivityActionSlot[]} [actions=[]] Native action descriptors or host-owned controls.
|
|
248
|
+
* @property {string} [kind='default'] Product-neutral activity kind exposed as `data-kind`.
|
|
249
|
+
* @property {ActivityState} [state='default'] Delivery state exposed as `data-state`.
|
|
250
|
+
* @property {string|null} [stateLabel=null] Word shown in the state badge instead of the built-in one.
|
|
251
|
+
* @property {1|2|3|4|5|6} [headingLevel=3] Semantic heading level for the activity summary.
|
|
252
|
+
* @property {(event:CustomEvent<{id:string,action:NormalizedActivityAction,event:MouseEvent}>)=>void} [onaction]
|
|
253
|
+
*/
|
|
254
|
+
/**
|
|
255
|
+
* One chronological activity entry with safe content slots, timestamp semantics, and native
|
|
256
|
+
* actions. Posting, reactions, routing, permissions, persistence, and content sanitization remain
|
|
257
|
+
* host responsibilities; server HTML is never interpreted by this component.
|
|
258
|
+
*
|
|
259
|
+
* @fires ActivityItem#action
|
|
260
|
+
* @extends {Component<ActivityItemOptions>}
|
|
261
|
+
*/
|
|
262
|
+
export declare class ActivityItem extends Component<ActivityItemOptions> {
|
|
263
|
+
_createdRoot: boolean;
|
|
264
|
+
_original: import("../../core/dom.js").TargetSnapshot;
|
|
265
|
+
_cleaned: boolean;
|
|
266
|
+
_headingId: string;
|
|
267
|
+
_avatarComponent: Avatar;
|
|
268
|
+
_actionsByKey: Map<any, any>;
|
|
269
|
+
_activity: ActivityItemOptions;
|
|
270
|
+
static cssName: string;
|
|
271
|
+
/** @type {Readonly<ActivityItemOptions>} */
|
|
272
|
+
static defaults: Readonly<ActivityItemOptions>;
|
|
273
|
+
/**
|
|
274
|
+
* Creates or enhances an activity item.
|
|
275
|
+
* @param {Element|string|null} [target=null] Existing list item/container, selector, or null.
|
|
276
|
+
* @param {ActivityItemOptions} [options={}] Activity presentation options.
|
|
277
|
+
*/
|
|
278
|
+
constructor(target?: Element | string | null, options?: ActivityItemOptions);
|
|
279
|
+
/** @returns {HTMLElement} */
|
|
280
|
+
render(): HTMLElement;
|
|
281
|
+
/**
|
|
282
|
+
* Replaces any subset of the activity presentation.
|
|
283
|
+
* @param {Partial<ActivityItemOptions>} values New values.
|
|
284
|
+
* @returns {this}
|
|
285
|
+
*/
|
|
286
|
+
setActivity(values?: Partial<ActivityItemOptions>): this;
|
|
287
|
+
/** Returns a shallow, host-safe copy of the current descriptor. @returns {ActivityItemOptions} */
|
|
288
|
+
getActivity(): ActivityItemOptions;
|
|
289
|
+
/** Restores an enhanced target exactly, or removes an owned item. @returns {void} */
|
|
290
|
+
destroy(): void;
|
|
291
|
+
/** @private @returns {void} */
|
|
292
|
+
private _renderActivity;
|
|
293
|
+
/**
|
|
294
|
+
* Builds the delivery badge, or nothing for an ordinary entry.
|
|
295
|
+
* @private
|
|
296
|
+
* @param {ActivityStateDescriptor} state Resolved state.
|
|
297
|
+
* @returns {HTMLElement|null}
|
|
298
|
+
*/
|
|
299
|
+
private _createStateBadge;
|
|
300
|
+
/** @private @param {ActivityAvatar} value @param {ActivityContent} actor @returns {Element|null} */
|
|
301
|
+
private _createAvatar;
|
|
302
|
+
/** @private @param {ActivityActionSlot[]} value @returns {HTMLElement|null} */
|
|
303
|
+
private _createActions;
|
|
304
|
+
/**
|
|
305
|
+
* Resolves a message through the host translator, falling back to the built-in English text.
|
|
306
|
+
* @param {string} key Message key.
|
|
307
|
+
* @param {string} fallback Built-in text, with `%1`-style placeholders.
|
|
308
|
+
* @param {...unknown} args Interpolation values.
|
|
309
|
+
* @returns {string}
|
|
310
|
+
*/
|
|
311
|
+
_message(key: string, fallback: string, ...args: unknown[]): string;
|
|
312
|
+
/** @private @param {MouseEvent} event @returns {void} */
|
|
313
|
+
private _onClick;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Normalizes action descriptors without mutating the caller's array or objects. Invalid entries
|
|
317
|
+
* and duplicate descriptor IDs are discarded; host-owned Elements pass through unchanged.
|
|
318
|
+
* @param {unknown} value Candidate action array.
|
|
319
|
+
* @returns {Array<Element|NormalizedActivityAction>}
|
|
320
|
+
*/
|
|
321
|
+
export declare function resolveActivityActions(value: unknown): Array<Element | NormalizedActivityAction>;
|
|
322
|
+
/**
|
|
323
|
+
* Normalizes one action descriptor and rejects unsafe native destinations.
|
|
324
|
+
* @param {unknown} value Candidate action.
|
|
325
|
+
* @returns {NormalizedActivityAction|null}
|
|
326
|
+
*/
|
|
327
|
+
export declare function normalizeActivityAction(value: unknown): NormalizedActivityAction | null;
|
|
328
|
+
/**
|
|
329
|
+
* Resolves the delivery state of one entry.
|
|
330
|
+
*
|
|
331
|
+
* `failed` is a first-class state and not the absence of `pending`: an optimistic entry that
|
|
332
|
+
* simply disappears when its request fails tells the customer their message was sent when nobody
|
|
333
|
+
* was told, so the component keeps the entry and says what happened to it.
|
|
334
|
+
* @param {unknown} state Requested state.
|
|
335
|
+
* @param {unknown} stateLabel Host-supplied word replacing the built-in one.
|
|
336
|
+
* @returns {ActivityStateDescriptor}
|
|
337
|
+
*/
|
|
338
|
+
export declare function resolveActivityState(state: unknown, stateLabel: unknown): ActivityStateDescriptor;
|
|
339
|
+
/**
|
|
340
|
+
* Resolves a timestamp for native `<time>` markup without treating invalid input as a real date.
|
|
341
|
+
* @param {Date|string|number|null|undefined} timestamp Date-like value.
|
|
342
|
+
* @param {string|null|undefined} timeLabel Explicit display label.
|
|
343
|
+
* @returns {ActivityTime|null}
|
|
344
|
+
*/
|
|
345
|
+
export declare function normalizeActivityTimestamp(timestamp: Date | string | number | null | undefined, timeLabel: string | null | undefined): ActivityTime | null;
|
|
346
|
+
/**
|
|
347
|
+
* Activity action selected before the host callback or native navigation runs. Cancellation from
|
|
348
|
+
* either the component event or bubbling `zx-action` event prevents both callback and navigation.
|
|
349
|
+
* @event ActivityItem#action
|
|
350
|
+
* @type {CustomEvent<{id:string,action:NormalizedActivityAction,event:MouseEvent}>}
|
|
351
|
+
*/
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { Component } from '../../core/component.js';
|
|
2
|
+
export type ActivityItemOptions = import('../activity-item/activity-item.js').ActivityItemOptions;
|
|
3
|
+
export type ActivityListContent = string | number | Node | Component | null;
|
|
4
|
+
export type ActivityGroupReader = string | ((item: ActivityItemOptions, index: number) => unknown) | null;
|
|
5
|
+
export type ActivityGroupLabel = (group: unknown, items: ActivityItemOptions[]) => ActivityListContent;
|
|
6
|
+
export type ActivityListVariant = 'default' | 'compact';
|
|
7
|
+
export type ActivityGroup = {
|
|
8
|
+
/**
|
|
9
|
+
* Group identity returned by the configured reader.
|
|
10
|
+
*/
|
|
11
|
+
id: unknown;
|
|
12
|
+
/**
|
|
13
|
+
* Activities in stable source order.
|
|
14
|
+
*/
|
|
15
|
+
items: ActivityItemOptions[];
|
|
16
|
+
};
|
|
17
|
+
export type ActivityListOptions = {
|
|
18
|
+
/**
|
|
19
|
+
* Initial activities in host-supplied chronological order.
|
|
20
|
+
*/
|
|
21
|
+
items?: ActivityItemOptions[];
|
|
22
|
+
/**
|
|
23
|
+
* Property or resolver used for stable grouping.
|
|
24
|
+
*/
|
|
25
|
+
groupBy?: ActivityGroupReader;
|
|
26
|
+
/**
|
|
27
|
+
* Group-heading renderer.
|
|
28
|
+
*/
|
|
29
|
+
groupLabel?: ActivityGroupLabel | null;
|
|
30
|
+
/**
|
|
31
|
+
* Accessible collection name.
|
|
32
|
+
*/
|
|
33
|
+
label?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Entry layout, reflected as `data-variant` on
|
|
36
|
+
* the root. `'compact'` also makes an avatar descriptor without a `size` small.
|
|
37
|
+
*/
|
|
38
|
+
variant?: ActivityListVariant;
|
|
39
|
+
/**
|
|
40
|
+
* Whether initial or incremental activity is loading.
|
|
41
|
+
*/
|
|
42
|
+
loading?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Placeholder rows shown for an empty loading list.
|
|
45
|
+
*/
|
|
46
|
+
loadingCount?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Loading status text.
|
|
49
|
+
*/
|
|
50
|
+
loadingText?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Empty-state content.
|
|
53
|
+
*/
|
|
54
|
+
emptyText?: ActivityListContent;
|
|
55
|
+
/**
|
|
56
|
+
* Semantic group-heading level.
|
|
57
|
+
*/
|
|
58
|
+
groupHeadingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
59
|
+
/**
|
|
60
|
+
* Default item-heading level.
|
|
61
|
+
*/
|
|
62
|
+
itemHeadingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
63
|
+
ondatachange?: (event: CustomEvent<{
|
|
64
|
+
items: ActivityItemOptions[];
|
|
65
|
+
}>) => void;
|
|
66
|
+
};
|
|
67
|
+
/** @typedef {import('../activity-item/activity-item.js').ActivityItemOptions} ActivityItemOptions */
|
|
68
|
+
/** @typedef {string|number|Node|Component|null} ActivityListContent */
|
|
69
|
+
/** @typedef {string|((item:ActivityItemOptions,index:number)=>unknown)|null} ActivityGroupReader */
|
|
70
|
+
/** @typedef {(group:unknown,items:ActivityItemOptions[])=>ActivityListContent} ActivityGroupLabel */
|
|
71
|
+
/**
|
|
72
|
+
* Entry layout. `'default'` gives each entry its avatar, a heading row, and room for content;
|
|
73
|
+
* below 30rem the time moves under the heading. `'compact'` is one line per entry at any width —
|
|
74
|
+
* actor and summary reading as one sentence, the time at the trailing end, a small avatar, and
|
|
75
|
+
* metadata as a muted second line — for a summary card narrower than 30rem.
|
|
76
|
+
* @typedef {'default'|'compact'} ActivityListVariant
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* @typedef {Object} ActivityGroup
|
|
80
|
+
* @property {unknown} id Group identity returned by the configured reader.
|
|
81
|
+
* @property {ActivityItemOptions[]} items Activities in stable source order.
|
|
82
|
+
*/
|
|
83
|
+
/**
|
|
84
|
+
* @typedef {Object} ActivityListOptions
|
|
85
|
+
* @property {ActivityItemOptions[]} [items=[]] Initial activities in host-supplied chronological order.
|
|
86
|
+
* @property {ActivityGroupReader} [groupBy=null] Property or resolver used for stable grouping.
|
|
87
|
+
* @property {ActivityGroupLabel|null} [groupLabel=null] Group-heading renderer.
|
|
88
|
+
* @property {string} [label='Activity'] Accessible collection name.
|
|
89
|
+
* @property {ActivityListVariant} [variant='default'] Entry layout, reflected as `data-variant` on
|
|
90
|
+
* the root. `'compact'` also makes an avatar descriptor without a `size` small.
|
|
91
|
+
* @property {boolean} [loading=false] Whether initial or incremental activity is loading.
|
|
92
|
+
* @property {number} [loadingCount=3] Placeholder rows shown for an empty loading list.
|
|
93
|
+
* @property {string} [loadingText='Loading activity'] Loading status text.
|
|
94
|
+
* @property {ActivityListContent} [emptyText='No activity yet'] Empty-state content.
|
|
95
|
+
* @property {1|2|3|4|5|6} [groupHeadingLevel=2] Semantic group-heading level.
|
|
96
|
+
* @property {1|2|3|4|5|6} [itemHeadingLevel=3] Default item-heading level.
|
|
97
|
+
* @property {(event:CustomEvent<{items:ActivityItemOptions[]}>)=>void} [ondatachange]
|
|
98
|
+
*/
|
|
99
|
+
/**
|
|
100
|
+
* Accessible chronological activity collection with stable grouping, loading/empty states, and
|
|
101
|
+
* incremental update methods. Ordering stays host-controlled so paginated and live server results
|
|
102
|
+
* are never silently re-sorted. Item `zx-action` events bubble through the list naturally.
|
|
103
|
+
*
|
|
104
|
+
* @fires ActivityList#datachange
|
|
105
|
+
* @extends {Component<ActivityListOptions>}
|
|
106
|
+
*/
|
|
107
|
+
export declare class ActivityList extends Component<ActivityListOptions> {
|
|
108
|
+
_createdRoot: boolean;
|
|
109
|
+
_original: import("../../core/dom.js").TargetSnapshot;
|
|
110
|
+
_cleaned: boolean;
|
|
111
|
+
_items: any;
|
|
112
|
+
_loading: any;
|
|
113
|
+
_itemComponents: any[];
|
|
114
|
+
_groupSequence: number;
|
|
115
|
+
_variant: ActivityListVariant;
|
|
116
|
+
static cssName: string;
|
|
117
|
+
/** @type {Readonly<ActivityListOptions>} */
|
|
118
|
+
static defaults: Readonly<ActivityListOptions>;
|
|
119
|
+
/**
|
|
120
|
+
* Creates or enhances an activity collection.
|
|
121
|
+
* @param {Element|string|null} [target=null] Existing container, selector, or null.
|
|
122
|
+
* @param {ActivityListOptions} [options={}] Collection options.
|
|
123
|
+
*/
|
|
124
|
+
constructor(target?: Element | string | null, options?: ActivityListOptions);
|
|
125
|
+
/** @returns {HTMLElement} */
|
|
126
|
+
render(): HTMLElement;
|
|
127
|
+
/**
|
|
128
|
+
* Replaces all activities.
|
|
129
|
+
* @param {ActivityItemOptions[]} items Activities in desired chronological order.
|
|
130
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
131
|
+
* @returns {this}
|
|
132
|
+
*/
|
|
133
|
+
setItems(items: ActivityItemOptions[], options?: {
|
|
134
|
+
silent?: boolean;
|
|
135
|
+
}): this;
|
|
136
|
+
/** Returns shallow descriptor copies in current display order. @returns {ActivityItemOptions[]} */
|
|
137
|
+
getItems(): ActivityItemOptions[];
|
|
138
|
+
/** Returns a shallow descriptor copy by stable host ID. @param {unknown} id @returns {ActivityItemOptions|null} */
|
|
139
|
+
getItem(id: unknown): ActivityItemOptions | null;
|
|
140
|
+
/**
|
|
141
|
+
* Adds activities after the current source order for older-page or forward-stream updates.
|
|
142
|
+
* @param {ActivityItemOptions|ActivityItemOptions[]} items New activities.
|
|
143
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
144
|
+
* @returns {this}
|
|
145
|
+
*/
|
|
146
|
+
appendItems(items: ActivityItemOptions | ActivityItemOptions[], options?: {
|
|
147
|
+
silent?: boolean;
|
|
148
|
+
}): this;
|
|
149
|
+
/**
|
|
150
|
+
* Adds activities before the current source order for newest-first live updates.
|
|
151
|
+
* @param {ActivityItemOptions|ActivityItemOptions[]} items New activities.
|
|
152
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
153
|
+
* @returns {this}
|
|
154
|
+
*/
|
|
155
|
+
prependItems(items: ActivityItemOptions | ActivityItemOptions[], options?: {
|
|
156
|
+
silent?: boolean;
|
|
157
|
+
}): this;
|
|
158
|
+
/**
|
|
159
|
+
* Patches the first activity whose ID is `Object.is`-equal to the requested ID.
|
|
160
|
+
* @param {unknown} id Stable host identifier.
|
|
161
|
+
* @param {Partial<ActivityItemOptions>} values Replacement fields.
|
|
162
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
163
|
+
* @returns {this}
|
|
164
|
+
*/
|
|
165
|
+
updateItem(id: unknown, values: Partial<ActivityItemOptions>, options?: {
|
|
166
|
+
silent?: boolean;
|
|
167
|
+
}): this;
|
|
168
|
+
/**
|
|
169
|
+
* Removes the first activity whose ID is `Object.is`-equal to the requested ID.
|
|
170
|
+
* @param {unknown} id Stable host identifier.
|
|
171
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
172
|
+
* @returns {this}
|
|
173
|
+
*/
|
|
174
|
+
removeItem(id: unknown, options?: {
|
|
175
|
+
silent?: boolean;
|
|
176
|
+
}): this;
|
|
177
|
+
/** Sets initial/incremental loading presentation. @param {boolean} loading @returns {this} */
|
|
178
|
+
setLoading(loading: boolean): this;
|
|
179
|
+
/** Restores an enhanced target exactly, or removes an owned list. @returns {void} */
|
|
180
|
+
destroy(): void;
|
|
181
|
+
/** @private @returns {void} */
|
|
182
|
+
private _renderList;
|
|
183
|
+
/** @private @param {ActivityGroup} group @param {boolean} grouped @returns {HTMLElement} */
|
|
184
|
+
private _createGroup;
|
|
185
|
+
/** @private @param {boolean} placeholders @returns {HTMLElement} */
|
|
186
|
+
private _createLoading;
|
|
187
|
+
/** @private @returns {void} */
|
|
188
|
+
private _destroyItems;
|
|
189
|
+
/** @private @returns {void} */
|
|
190
|
+
private _emitDataChange;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Groups descriptors in first-seen group order while preserving source order within every group.
|
|
194
|
+
* A null reader returns one ungrouped collection. Neither descriptors nor the input array mutate.
|
|
195
|
+
* @param {ActivityItemOptions[]} items Activity descriptors.
|
|
196
|
+
* @param {ActivityGroupReader} groupBy Group reader.
|
|
197
|
+
* @returns {ActivityGroup[]}
|
|
198
|
+
*/
|
|
199
|
+
export declare function groupActivityItems(items: ActivityItemOptions[], groupBy?: ActivityGroupReader): ActivityGroup[];
|
|
200
|
+
/**
|
|
201
|
+
* Validates and shallow-clones activity descriptors, including each slot array. Explicit
|
|
202
|
+
* duplicate IDs are rejected while id-less entries remain valid.
|
|
203
|
+
* @param {unknown} value Candidate descriptor array.
|
|
204
|
+
* @returns {ActivityItemOptions[]}
|
|
205
|
+
*/
|
|
206
|
+
export declare function normalizeActivityItems(value: unknown): ActivityItemOptions[];
|
|
207
|
+
/**
|
|
208
|
+
* Resolves the entry layout; anything but `'compact'` is the default layout.
|
|
209
|
+
* @param {unknown} value Requested variant.
|
|
210
|
+
* @returns {ActivityListVariant}
|
|
211
|
+
*/
|
|
212
|
+
export declare function normalizeActivityListVariant(value: unknown): ActivityListVariant;
|
|
213
|
+
/**
|
|
214
|
+
* Activity descriptors changed through a list mutation method.
|
|
215
|
+
* @event ActivityList#datachange
|
|
216
|
+
* @type {CustomEvent<{items:ActivityItemOptions[]}>}
|
|
217
|
+
*/
|
|
@@ -160,7 +160,11 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
160
160
|
render(): HTMLElement;
|
|
161
161
|
/** Replaces the navigation tree in the active presentation. @param {AppNavItem[]} items @returns {this} */
|
|
162
162
|
setItems(items: AppNavItem[]): this;
|
|
163
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* Returns a copy of the normalized items. A leaf has no `children` property, as it was written,
|
|
165
|
+
* rather than the empty list normalization gives it.
|
|
166
|
+
* @returns {AppNavItem[]}
|
|
167
|
+
*/
|
|
164
168
|
getItems(): AppNavItem[];
|
|
165
169
|
/** Sets the active id without routing. @param {string|number|null} id @returns {this} */
|
|
166
170
|
setActive(id: string | number | null): this;
|
|
@@ -220,6 +224,16 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
220
224
|
_renderExpanded(): void;
|
|
221
225
|
/** @returns {void} */
|
|
222
226
|
_renderRail(): void;
|
|
227
|
+
/**
|
|
228
|
+
* Keeps a minimized rail's counts readable and audible.
|
|
229
|
+
*
|
|
230
|
+
* A rail destination is icon-only, so its accessible name is the label alone and the badge the
|
|
231
|
+
* expanded tree showed as text is announced by nothing. Here the figure is folded back into the
|
|
232
|
+
* name, and `data-zx-badge` tells the stylesheet whether the count still fits the target or has
|
|
233
|
+
* to be drawn as a dot. Presentation only: no item, option, event, or listener is touched.
|
|
234
|
+
* @returns {void}
|
|
235
|
+
*/
|
|
236
|
+
_decorateRail(): void;
|
|
223
237
|
/** @param {EventTarget} target @param {string} type @param {EventListener} listener @returns {void} */
|
|
224
238
|
_listenMode(target: EventTarget, type: string, listener: EventListener): void;
|
|
225
239
|
/** @returns {void} */
|
|
@@ -234,10 +248,26 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
234
248
|
_select(item: AppNavItem, event: Event): void;
|
|
235
249
|
/** @returns {void} */
|
|
236
250
|
_syncActive(): void;
|
|
251
|
+
/**
|
|
252
|
+
* Flags the sublist a branch toggle just opened so the stylesheet can animate that one branch.
|
|
253
|
+
*
|
|
254
|
+
* `_renderTree()` rebuilds every row on every toggle, so a transition declared on the sublist
|
|
255
|
+
* alone would replay on branches that never moved. The attribute is written after the rebuild
|
|
256
|
+
* and disappears with the element on the next one, which is why it needs no teardown.
|
|
257
|
+
* @param {string} key Branch id as a string.
|
|
258
|
+
* @returns {void}
|
|
259
|
+
*/
|
|
260
|
+
_markBranchMotion(key: string): void;
|
|
261
|
+
/**
|
|
262
|
+
* Resolves a message through the host translator, falling back to the built-in English text.
|
|
263
|
+
* @param {string} key Message key.
|
|
264
|
+
* @param {string} fallback Built-in text, with `%1`-style placeholders.
|
|
265
|
+
* @param {...unknown} args Interpolation values.
|
|
266
|
+
* @returns {string}
|
|
267
|
+
*/
|
|
268
|
+
_message(key: string, fallback: string, ...args: unknown[]): string;
|
|
237
269
|
/** @returns {void} */
|
|
238
270
|
_reconcileExpanded(): void;
|
|
239
271
|
}
|
|
240
|
-
/** Fired when a destination/action is activated. @event AppSidebar#select @type {CustomEvent<AppNavSelectDetail>} */
|
|
241
|
-
/** Fired when an inline branch changes. @event AppSidebar#branchchange @type {CustomEvent<{item: AppNavItem|null, id: string|number|null, expanded: boolean|null, ids: Array<string|number>}>} */
|
|
242
272
|
/** Fired when expanded/minimized presentation changes. @event AppSidebar#collapsechange @type {CustomEvent<{collapsed: boolean}>} */
|
|
243
273
|
/** Fired when a minimized flyout changes. @event AppSidebar#flyoutchange @type {CustomEvent<{item: AppNavItem, id: string|number, open: boolean}>} */
|