@zeyos/zx 5.0.0 → 5.2.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 +164 -0
- package/README.md +2 -1
- package/dist/types/components/account-menu/account-menu.d.ts +8 -0
- package/dist/types/components/activity-list/activity-list.d.ts +9 -1
- package/dist/types/components/app-icon/app-icon.d.ts +14 -2
- package/dist/types/components/app-sidebar/app-sidebar.d.ts +288 -14
- package/dist/types/components/calendar/calendar.d.ts +67 -5
- package/dist/types/components/card-view/card-view.d.ts +7 -4
- package/dist/types/components/card-view/record-card.d.ts +11 -0
- package/dist/types/components/context-menu/context-menu.d.ts +6 -2
- package/dist/types/components/data-filter/data-filter.d.ts +4 -4
- package/dist/types/components/dropdown/dropdown.d.ts +22 -7
- package/dist/types/components/field/field.d.ts +30 -0
- package/dist/types/components/fieldset/external-adapter.d.ts +83 -0
- package/dist/types/components/fieldset/fieldset.d.ts +7 -0
- package/dist/types/components/file-list/file-list.d.ts +35 -3
- package/dist/types/components/filter/filter.d.ts +127 -3
- package/dist/types/components/filter-panel/filter-panel.d.ts +36 -7
- package/dist/types/components/launcher/launcher.d.ts +8 -0
- package/dist/types/components/list-toolbar/list-toolbar.d.ts +15 -6
- package/dist/types/components/menu-button/menu-button.d.ts +6 -0
- package/dist/types/components/message/message.d.ts +14 -1
- package/dist/types/components/modal/modal.d.ts +30 -0
- package/dist/types/components/module-bar/module-bar.d.ts +395 -0
- package/dist/types/components/pagination/pagination.d.ts +17 -3
- package/dist/types/components/select/select.d.ts +6 -0
- package/dist/types/components/sheet/sheet.d.ts +15 -0
- package/dist/types/components/table/table.d.ts +265 -17
- package/dist/types/components/view/record-view.d.ts +59 -2
- package/dist/types/components/view-settings/view-settings.d.ts +879 -0
- package/dist/types/components/workspace-switcher/workspace-switcher.d.ts +327 -0
- package/dist/types/core/component.d.ts +12 -2
- package/dist/types/core/i18n.d.ts +27 -3
- package/dist/types/core/keyboard.d.ts +98 -1
- package/dist/types/core/messages.d.ts +382 -0
- package/dist/types/core/overlay-host.d.ts +28 -1
- package/dist/types/core/overlay-stack.d.ts +260 -0
- package/dist/types/index.d.ts +5 -2
- package/dist/types/internal/app-rail.d.ts +38 -0
- package/dist/types/internal/menu-items.d.ts +71 -3
- package/dist/types/zeyos/index.d.ts +1 -0
- package/dist/types/zeyos/launcher.d.ts +9 -0
- package/dist/types/zeyos/module-bar.d.ts +176 -0
- package/dist/types/zeyos/query.d.ts +31 -5
- package/dist/types/zeyos/table.d.ts +245 -8
- package/dist/types/zeyos/view.d.ts +16 -2
- package/dist/zx-zeyos.esm.js +4422 -430
- package/dist/zx-zeyos.esm.min.js +5 -5
- package/dist/zx.css +1417 -134
- package/dist/zx.esm.js +6986 -830
- package/dist/zx.esm.min.js +8 -8
- package/dist/zx.global.js +6986 -830
- package/dist/zx.global.min.js +8 -8
- package/dist/zx.min.css +1 -1
- package/docs/api.json +794 -17
- package/docs/llms.md +503 -63
- package/docs/llms.txt +6 -2
- package/package.json +1 -1
- package/src/components/account-menu/account-menu.js +12 -0
- package/src/components/activity-list/activity-list.js +27 -1
- package/src/components/app-icon/app-icon.css +13 -2
- package/src/components/app-icon/app-icon.js +11 -1
- package/src/components/app-rail/app-rail.css +19 -0
- package/src/components/app-sidebar/app-sidebar.css +204 -3
- package/src/components/app-sidebar/app-sidebar.js +646 -40
- package/src/components/breadcrumb/breadcrumb.css +1 -1
- package/src/components/calendar/calendar.css +1 -1
- package/src/components/calendar/calendar.js +26 -52
- package/src/components/card/card.css +2 -2
- package/src/components/card-view/card-view.css +5 -5
- package/src/components/card-view/card-view.js +13 -9
- package/src/components/card-view/record-card.js +14 -3
- package/src/components/code-editor/code-editor.css +1 -1
- package/src/components/code-editor/field-adapter.js +9 -2
- package/src/components/context-menu/context-menu.js +8 -2
- package/src/components/copy/copy-input.css +1 -1
- package/src/components/data-filter/data-filter.js +2 -2
- package/src/components/date-picker/time-picker.css +2 -2
- package/src/components/dock/dock.css +5 -4
- package/src/components/dropdown/dropdown.js +157 -72
- package/src/components/field/field.js +33 -3
- package/src/components/fieldset/external-adapter.js +363 -0
- package/src/components/fieldset/fieldset.js +10 -59
- package/src/components/file-list/file-list.js +144 -21
- package/src/components/filter/filter.css +86 -2
- package/src/components/filter/filter.js +300 -8
- package/src/components/filter-panel/filter-panel.js +149 -32
- package/src/components/finder/finder.css +1 -1
- package/src/components/kanban-view/kanban-view.css +3 -3
- package/src/components/kanban-view/kanban-view.js +5 -2
- package/src/components/launcher/launcher.css +1 -1
- package/src/components/launcher/launcher.js +29 -3
- package/src/components/list-toolbar/list-toolbar.js +39 -13
- package/src/components/master-panel/master-panel.js +0 -1
- package/src/components/menu-button/menu-button.css +63 -0
- package/src/components/menu-button/menu-button.js +97 -11
- package/src/components/message/message.js +60 -20
- package/src/components/modal/modal.css +1 -1
- package/src/components/modal/modal.js +66 -13
- package/src/components/module-bar/module-bar.css +486 -0
- package/src/components/module-bar/module-bar.js +1074 -0
- package/src/components/multi-value-editor/multi-value-editor.css +1 -1
- package/src/components/number-field/field-adapter.js +2 -1
- package/src/components/pagination/pagination.css +5 -5
- package/src/components/pagination/pagination.js +20 -4
- package/src/components/panel/panel.css +3 -2
- package/src/components/questionnaire/questionnaire.css +4 -4
- package/src/components/rating/field-adapter.js +2 -1
- package/src/components/rating/rating.css +1 -1
- package/src/components/search/search.css +4 -1
- package/src/components/select/select.js +9 -0
- package/src/components/sheet/sheet.css +1 -1
- package/src/components/sheet/sheet.js +74 -32
- package/src/components/slider/field-adapter.js +6 -1
- package/src/components/slider/slider.css +2 -2
- package/src/components/split-view/split-view.css +1 -1
- package/src/components/stat-tile/stat-tile.css +1 -1
- package/src/components/stepper/stepper.css +1 -1
- package/src/components/tabbox/tabbox.css +9 -5
- package/src/components/table/table.css +86 -11
- package/src/components/table/table.js +628 -57
- package/src/components/tag-picker/field-adapter.js +2 -1
- package/src/components/tooltip/tooltip.js +35 -17
- package/src/components/tree/tree.css +1 -1
- package/src/components/view/record-view.css +1 -1
- package/src/components/view/record-view.js +178 -18
- package/src/components/view-settings/view-settings.css +285 -0
- package/src/components/view-settings/view-settings.js +1830 -0
- package/src/components/workspace-switcher/workspace-switcher.css +188 -0
- package/src/components/workspace-switcher/workspace-switcher.js +463 -0
- package/src/core/component.js +88 -17
- package/src/core/fontawesome.js +5 -1
- package/src/core/i18n.js +47 -4
- package/src/core/icons.js +12 -2
- package/src/core/keyboard.js +206 -11
- package/src/core/messages.js +427 -0
- package/src/core/overlay-host.js +64 -9
- package/src/core/overlay-stack.js +487 -0
- package/src/core/position.js +22 -3
- package/src/index.js +5 -2
- package/src/internal/app-rail.js +134 -53
- package/src/internal/menu-items.js +61 -3
- package/src/zeyos/form.js +5 -3
- package/src/zeyos/index.js +3 -0
- package/src/zeyos/launcher.js +8 -3
- package/src/zeyos/module-bar.js +181 -0
- package/src/zeyos/query.js +44 -13
- package/src/zeyos/table.js +220 -80
- package/src/zeyos/view.js +43 -93
- package/styles/base.css +16 -1
- package/styles/print.css +1 -1
- package/styles/tokens/dark.css +4 -0
- package/styles/tokens/semantic.css +56 -28
- package/styles/zx.css +3 -0
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
import { Component } from '../../core/component.js';
|
|
2
2
|
import { AppRailPresenter as MinimizedPresenter } from '../../internal/app-rail.js';
|
|
3
|
+
import { ModuleBar } from '../module-bar/module-bar.js';
|
|
3
4
|
export type AppNavItem = import('../../internal/app-rail.js').AppNavItem;
|
|
4
5
|
export type AppNavSelectDetail = import('../../internal/app-rail.js').AppNavSelectDetail;
|
|
6
|
+
export type ModuleItem = import('../module-bar/module-bar.js').ModuleItem;
|
|
7
|
+
export type AppSidebarModule = ModuleItem & {
|
|
8
|
+
header?: Node | {
|
|
9
|
+
toElement: () => Node | null;
|
|
10
|
+
};
|
|
11
|
+
content?: Node | {
|
|
12
|
+
toElement: () => Node | null;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type AppSidebarModuleBarOptions = {
|
|
16
|
+
/**
|
|
17
|
+
* Tile treatment.
|
|
18
|
+
*/
|
|
19
|
+
appearance?: 'tint' | 'solid' | 'plain';
|
|
20
|
+
/**
|
|
21
|
+
* Module names on the strip: `'auto'`
|
|
22
|
+
* prints them beside the tiles while expanded and leaves the icons alone while collapsed;
|
|
23
|
+
* `'hidden'` keeps the icon strip beside the panel; `'below'` prints them under the tiles.
|
|
24
|
+
*/
|
|
25
|
+
labels?: 'auto' | 'beside' | 'below' | 'hidden';
|
|
26
|
+
/**
|
|
27
|
+
* The "All modules" button.
|
|
28
|
+
*/
|
|
29
|
+
allModules?: 'auto' | 'always' | 'never';
|
|
30
|
+
/**
|
|
31
|
+
* Strip accessible label; omitted resolves `moduleBar.label`.
|
|
32
|
+
*/
|
|
33
|
+
label?: string | null;
|
|
34
|
+
};
|
|
5
35
|
export type AppSidebarOptions = {
|
|
6
36
|
/**
|
|
7
|
-
* Application navigation tree
|
|
37
|
+
* Application navigation tree; in the
|
|
38
|
+
* modules layout its top level is the modules.
|
|
8
39
|
*/
|
|
9
|
-
items?: AppNavItem[];
|
|
40
|
+
items?: AppNavItem[] | AppSidebarModule[];
|
|
10
41
|
/**
|
|
11
42
|
* Active item id.
|
|
12
43
|
*/
|
|
@@ -31,12 +62,44 @@ export type AppSidebarOptions = {
|
|
|
31
62
|
* Workspace edge occupied by navigation.
|
|
32
63
|
*/
|
|
33
64
|
side?: 'left' | 'right' | 'top' | 'bottom';
|
|
65
|
+
/**
|
|
66
|
+
* `'modules'` draws the top level as a module strip
|
|
67
|
+
* beside a panel showing one module's menu; minimized, the strip remains and menus open as flyouts.
|
|
68
|
+
*/
|
|
69
|
+
layout?: 'tree' | 'modules';
|
|
70
|
+
/**
|
|
71
|
+
* Modules layout: the module the panel shows first.
|
|
72
|
+
* Defaults to the module containing `active`, else the first module with a panel.
|
|
73
|
+
*/
|
|
74
|
+
module?: string | number | null;
|
|
75
|
+
/**
|
|
76
|
+
* Modules layout: strip presentation.
|
|
77
|
+
*/
|
|
78
|
+
moduleBar?: AppSidebarModuleBarOptions;
|
|
79
|
+
/**
|
|
80
|
+
* Modules layout: how much
|
|
81
|
+
* of the navigation shows — both menus expanded (module names beside the side menu), the module
|
|
82
|
+
* menu collapsed to icons beside the side menu, or both collapsed to the icon strip. Defaults
|
|
83
|
+
* to `collapsed` ? `'collapsed'` : `'expanded'`.
|
|
84
|
+
*/
|
|
85
|
+
presentation?: 'expanded' | 'compact' | 'collapsed' | null;
|
|
86
|
+
/**
|
|
87
|
+
* Modules layout: the presentations offered, widest first.
|
|
88
|
+
*/
|
|
89
|
+
presentations?: Array<'expanded' | 'compact' | 'collapsed'>;
|
|
90
|
+
/**
|
|
91
|
+
* Modules layout: whether the strip's foot carries the
|
|
92
|
+
* switch between presentations. Turn it off when the choice lives elsewhere — an account menu,
|
|
93
|
+
* through `presentationChoice()`.
|
|
94
|
+
*/
|
|
95
|
+
presentationSwitch?: boolean;
|
|
34
96
|
/**
|
|
35
97
|
* Navigation accessible label.
|
|
36
98
|
*/
|
|
37
99
|
label?: string;
|
|
38
100
|
/**
|
|
39
|
-
* Expanded header content
|
|
101
|
+
* Expanded header content;
|
|
102
|
+
* in the modules layout, content above every module's menu.
|
|
40
103
|
*/
|
|
41
104
|
header?: Node | string | number | {
|
|
42
105
|
toElement: () => Node | null;
|
|
@@ -48,13 +111,15 @@ export type AppSidebarOptions = {
|
|
|
48
111
|
toElement: () => Node | null;
|
|
49
112
|
} | null;
|
|
50
113
|
/**
|
|
51
|
-
* Minimized leading content
|
|
114
|
+
* Minimized leading content;
|
|
115
|
+
* in the modules layout, the strip's leading content in both states.
|
|
52
116
|
*/
|
|
53
117
|
railHeader?: Node | string | number | {
|
|
54
118
|
toElement: () => Node | null;
|
|
55
119
|
} | null;
|
|
56
120
|
/**
|
|
57
|
-
* Minimized trailing content
|
|
121
|
+
* Minimized trailing content;
|
|
122
|
+
* in the modules layout, the strip's trailing content in both states.
|
|
58
123
|
*/
|
|
59
124
|
railFooter?: Node | string | number | {
|
|
60
125
|
toElement: () => Node | null;
|
|
@@ -98,23 +163,71 @@ export type AppSidebarOptions = {
|
|
|
98
163
|
id: string | number;
|
|
99
164
|
open: boolean;
|
|
100
165
|
}>) => void;
|
|
166
|
+
/**
|
|
167
|
+
* Preventable module-switch listener.
|
|
168
|
+
*/
|
|
169
|
+
onmodulechange?: (event: CustomEvent<{
|
|
170
|
+
item: AppNavItem;
|
|
171
|
+
id: string | number;
|
|
172
|
+
previous: string | number | null;
|
|
173
|
+
}>) => void;
|
|
174
|
+
/**
|
|
175
|
+
* Presentation listener.
|
|
176
|
+
*/
|
|
177
|
+
onpresentationchange?: (event: CustomEvent<{
|
|
178
|
+
presentation: 'expanded' | 'compact' | 'collapsed';
|
|
179
|
+
previous: 'expanded' | 'compact' | 'collapsed';
|
|
180
|
+
}>) => void;
|
|
101
181
|
};
|
|
102
182
|
/** @typedef {import('../../internal/app-rail.js').AppNavItem} AppNavItem */
|
|
103
183
|
/** @typedef {import('../../internal/app-rail.js').AppNavSelectDetail} AppNavSelectDetail */
|
|
184
|
+
/** @typedef {import('../module-bar/module-bar.js').ModuleItem} ModuleItem */
|
|
185
|
+
/**
|
|
186
|
+
* A module in the modules layout: a `ModuleItem` whose panel may carry content of its own.
|
|
187
|
+
* @typedef {ModuleItem & {header?: Node|{toElement: () => Node|null}, content?: Node|{toElement: () => Node|null}}} AppSidebarModule
|
|
188
|
+
*/
|
|
189
|
+
/**
|
|
190
|
+
* Presentation of the module strip in the modules layout.
|
|
191
|
+
* @typedef {Object} AppSidebarModuleBarOptions
|
|
192
|
+
* @property {'tint'|'solid'|'plain'} [appearance='tint'] Tile treatment.
|
|
193
|
+
* @property {'auto'|'beside'|'below'|'hidden'} [labels='auto'] Module names on the strip: `'auto'`
|
|
194
|
+
* prints them beside the tiles while expanded and leaves the icons alone while collapsed;
|
|
195
|
+
* `'hidden'` keeps the icon strip beside the panel; `'below'` prints them under the tiles.
|
|
196
|
+
* @property {'auto'|'always'|'never'} [allModules='auto'] The "All modules" button.
|
|
197
|
+
* @property {string|null} [label=null] Strip accessible label; omitted resolves `moduleBar.label`.
|
|
198
|
+
*/
|
|
104
199
|
/**
|
|
105
200
|
* @typedef {Object} AppSidebarOptions
|
|
106
|
-
* @property {AppNavItem[]} [items=[]] Application navigation tree
|
|
201
|
+
* @property {AppNavItem[]|AppSidebarModule[]} [items=[]] Application navigation tree; in the
|
|
202
|
+
* modules layout its top level is the modules.
|
|
107
203
|
* @property {string|number|null} [active=null] Active item id.
|
|
108
204
|
* @property {Array<string|number>} [expanded=[]] Initially expanded branch ids.
|
|
109
205
|
* @property {boolean} [collapsed=false] Whether the minimized presentation is shown.
|
|
110
206
|
* @property {boolean} [collapsible=true] Whether vertical navigation exposes a mode toggle.
|
|
111
207
|
* @property {'vertical'|'horizontal'} [orientation='vertical'] Navigation flow; horizontal is always minimized.
|
|
112
208
|
* @property {'left'|'right'|'top'|'bottom'} [side='left'] Workspace edge occupied by navigation.
|
|
209
|
+
* @property {'tree'|'modules'} [layout='tree'] `'modules'` draws the top level as a module strip
|
|
210
|
+
* beside a panel showing one module's menu; minimized, the strip remains and menus open as flyouts.
|
|
211
|
+
* @property {string|number|null} [module=null] Modules layout: the module the panel shows first.
|
|
212
|
+
* Defaults to the module containing `active`, else the first module with a panel.
|
|
213
|
+
* @property {AppSidebarModuleBarOptions} [moduleBar={}] Modules layout: strip presentation.
|
|
214
|
+
* @property {'expanded'|'compact'|'collapsed'|null} [presentation=null] Modules layout: how much
|
|
215
|
+
* of the navigation shows — both menus expanded (module names beside the side menu), the module
|
|
216
|
+
* menu collapsed to icons beside the side menu, or both collapsed to the icon strip. Defaults
|
|
217
|
+
* to `collapsed` ? `'collapsed'` : `'expanded'`.
|
|
218
|
+
* @property {Array<'expanded'|'compact'|'collapsed'>} [presentations=['expanded','compact','collapsed']]
|
|
219
|
+
* Modules layout: the presentations offered, widest first.
|
|
220
|
+
* @property {boolean} [presentationSwitch=true] Modules layout: whether the strip's foot carries the
|
|
221
|
+
* switch between presentations. Turn it off when the choice lives elsewhere — an account menu,
|
|
222
|
+
* through `presentationChoice()`.
|
|
113
223
|
* @property {string} [label='Applications'] Navigation accessible label.
|
|
114
|
-
* @property {Node|string|number|{toElement: () => Node|null}|null} [header=null] Expanded header content
|
|
224
|
+
* @property {Node|string|number|{toElement: () => Node|null}|null} [header=null] Expanded header content;
|
|
225
|
+
* in the modules layout, content above every module's menu.
|
|
115
226
|
* @property {Node|string|number|{toElement: () => Node|null}|null} [footer=null] Expanded sticky footer content.
|
|
116
|
-
* @property {Node|string|number|{toElement: () => Node|null}|null} [railHeader=null] Minimized leading content
|
|
117
|
-
*
|
|
227
|
+
* @property {Node|string|number|{toElement: () => Node|null}|null} [railHeader=null] Minimized leading content;
|
|
228
|
+
* in the modules layout, the strip's leading content in both states.
|
|
229
|
+
* @property {Node|string|number|{toElement: () => Node|null}|null} [railFooter=null] Minimized trailing content;
|
|
230
|
+
* in the modules layout, the strip's trailing content in both states.
|
|
118
231
|
* @property {number} [openDelay=80] Minimized flyout hover-open delay.
|
|
119
232
|
* @property {number} [closeDelay=160] Minimized flyout crossing grace.
|
|
120
233
|
* @property {(item: AppNavItem, context: Record<string, any>) => Node|null} [renderIcon] Optional host icon renderer.
|
|
@@ -122,19 +235,24 @@ export type AppSidebarOptions = {
|
|
|
122
235
|
* @property {(event: CustomEvent<{item: AppNavItem|null, id: string|number|null, expanded: boolean|null, ids: Array<string|number>}>) => void} [onbranchchange] Branch-state listener.
|
|
123
236
|
* @property {(event: CustomEvent<{collapsed: boolean}>) => void} [oncollapsechange] Presentation-state listener.
|
|
124
237
|
* @property {(event: CustomEvent<{item: AppNavItem, id: string|number, open: boolean}>) => void} [onflyoutchange] Minimized flyout-state listener.
|
|
238
|
+
* @property {(event: CustomEvent<{item: AppNavItem, id: string|number, previous: string|number|null}>) => void} [onmodulechange] Preventable module-switch listener.
|
|
239
|
+
* @property {(event: CustomEvent<{presentation: 'expanded'|'compact'|'collapsed', previous: 'expanded'|'compact'|'collapsed'}>) => void} [onpresentationchange] Presentation listener.
|
|
125
240
|
*/
|
|
126
241
|
/**
|
|
127
242
|
* One application navigation component. Vertical expanded descendants render inline; minimized
|
|
128
|
-
* vertical and horizontal descendants use pointer-, focus-, and keyboard-accessible flyouts.
|
|
243
|
+
* vertical and horizontal descendants use pointer-, focus-, and keyboard-accessible flyouts. The
|
|
244
|
+
* modules layout puts a `ModuleBar` of the top level beside a panel with the current module's menu.
|
|
129
245
|
* @fires AppSidebar#select
|
|
130
246
|
* @fires AppSidebar#branchchange
|
|
131
247
|
* @fires AppSidebar#collapsechange
|
|
132
248
|
* @fires AppSidebar#flyoutchange
|
|
249
|
+
* @fires AppSidebar#modulechange
|
|
250
|
+
* @fires AppSidebar#presentationchange
|
|
133
251
|
* @extends {Component<AppSidebarOptions>}
|
|
134
252
|
*/
|
|
135
253
|
export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
136
|
-
_rail: MinimizedPresenter;
|
|
137
|
-
_railExpandButton: HTMLElement;
|
|
254
|
+
_rail: MinimizedPresenter | ModuleBar;
|
|
255
|
+
_railExpandButton: HTMLButtonElement | HTMLElement;
|
|
138
256
|
_createdRoot: boolean;
|
|
139
257
|
_original: {
|
|
140
258
|
attributes: string[][];
|
|
@@ -146,6 +264,12 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
146
264
|
_collapsed: boolean;
|
|
147
265
|
_orientation: any;
|
|
148
266
|
_side: "bottom" | "left" | "right" | "top";
|
|
267
|
+
_modules: boolean;
|
|
268
|
+
_moduleLabels: "auto" | "below" | "beside" | "hidden";
|
|
269
|
+
_compact: boolean;
|
|
270
|
+
_presentationGroup: HTMLElement;
|
|
271
|
+
_stripTooltips: any[];
|
|
272
|
+
_shownId: string | number;
|
|
149
273
|
_modeAbort: AbortController;
|
|
150
274
|
static cssName: string;
|
|
151
275
|
/** @type {Readonly<AppSidebarOptions>} */
|
|
@@ -166,8 +290,56 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
166
290
|
* @returns {AppNavItem[]}
|
|
167
291
|
*/
|
|
168
292
|
getItems(): AppNavItem[];
|
|
169
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* Sets the active id without routing. In the modules layout the panel follows the active route
|
|
295
|
+
* into its module.
|
|
296
|
+
* @param {string|number|null} id
|
|
297
|
+
* @returns {this}
|
|
298
|
+
*/
|
|
170
299
|
setActive(id: string | number | null): this;
|
|
300
|
+
/**
|
|
301
|
+
* Updates one badge — a module's, or any destination's — without rebuilding the navigation.
|
|
302
|
+
* @param {string|number} id Item id.
|
|
303
|
+
* @param {string|number|null} badge New badge; null removes it.
|
|
304
|
+
* @returns {this}
|
|
305
|
+
*/
|
|
306
|
+
setBadge(id: string | number, badge: string | number | null): this;
|
|
307
|
+
/**
|
|
308
|
+
* Modules layout: shows a module's menu in the panel. Fires a preventable `modulechange` unless silent.
|
|
309
|
+
* @param {string|number} id Module id.
|
|
310
|
+
* @param {{silent?: boolean}} [options={}]
|
|
311
|
+
* @returns {this}
|
|
312
|
+
*/
|
|
313
|
+
setModule(id: string | number, { silent }?: {
|
|
314
|
+
silent?: boolean;
|
|
315
|
+
}): this;
|
|
316
|
+
/** Modules layout: the module whose menu the panel shows. @returns {string|number|null} */
|
|
317
|
+
getModule(): string | number | null;
|
|
318
|
+
/**
|
|
319
|
+
* Modules layout: whether the strip prints module names — `'auto'` (beside the tiles while
|
|
320
|
+
* expanded, none while collapsed), `'beside'`, `'below'`, or `'hidden'`. A narrow drawer that
|
|
321
|
+
* has no room for a labelled strip beside the panel sets `'hidden'`.
|
|
322
|
+
* @param {'auto'|'beside'|'below'|'hidden'} labels
|
|
323
|
+
* @returns {this}
|
|
324
|
+
*/
|
|
325
|
+
setModuleLabels(labels: 'auto' | 'beside' | 'below' | 'hidden'): this;
|
|
326
|
+
/**
|
|
327
|
+
* How much of the navigation shows: `'expanded'` (in the modules layout, both menus),
|
|
328
|
+
* `'compact'` (the module menu collapsed to icons beside the side menu), or `'collapsed'`.
|
|
329
|
+
* @returns {'expanded'|'compact'|'collapsed'}
|
|
330
|
+
*/
|
|
331
|
+
getPresentation(): 'expanded' | 'compact' | 'collapsed';
|
|
332
|
+
/**
|
|
333
|
+
* Shows the navigation as `'expanded'`, `'compact'` (modules layout), or `'collapsed'`.
|
|
334
|
+
* @param {'expanded'|'compact'|'collapsed'} presentation
|
|
335
|
+
* @param {{silent?: boolean}} [options={}]
|
|
336
|
+
* @returns {this}
|
|
337
|
+
*/
|
|
338
|
+
setPresentation(presentation: 'expanded' | 'compact' | 'collapsed', { silent }?: {
|
|
339
|
+
silent?: boolean;
|
|
340
|
+
}): this;
|
|
341
|
+
/** Moves to the next presentation the strip's switch offers, wrapping (Mod+B in an application). @returns {this} */
|
|
342
|
+
togglePresentation(): this;
|
|
171
343
|
/** Replaces expanded branch ids. @param {Array<string|number>} ids @param {{silent?: boolean}} [options={}] @returns {this} */
|
|
172
344
|
setExpanded(ids: Array<string | number>, { silent }?: {
|
|
173
345
|
silent?: boolean;
|
|
@@ -190,6 +362,17 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
190
362
|
setCollapsed(collapsed: boolean, { silent }?: {
|
|
191
363
|
silent?: boolean;
|
|
192
364
|
}): this;
|
|
365
|
+
/**
|
|
366
|
+
* Applies a collapsed state and, in the modules layout, whether the module menu is collapsed
|
|
367
|
+
* beside an expanded side menu; reports what changed.
|
|
368
|
+
* @param {boolean} collapsed
|
|
369
|
+
* @param {boolean} compact
|
|
370
|
+
* @param {{silent?: boolean}} options
|
|
371
|
+
* @returns {this}
|
|
372
|
+
*/
|
|
373
|
+
_present(collapsed: boolean, compact: boolean, { silent }: {
|
|
374
|
+
silent?: boolean;
|
|
375
|
+
}): this;
|
|
193
376
|
/** Reports the effective presentation state; horizontal navigation is always minimized. @returns {boolean} */
|
|
194
377
|
isCollapsed(): boolean;
|
|
195
378
|
/**
|
|
@@ -214,7 +397,7 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
214
397
|
closeAllFlyouts(): this;
|
|
215
398
|
/** Reports whether a minimized flyout is open. @param {string|number} id @returns {boolean} */
|
|
216
399
|
isFlyoutOpen(id: string | number): boolean;
|
|
217
|
-
/** Focuses the first navigation action. @returns {this} */
|
|
400
|
+
/** Focuses the first navigation action: the module strip's Tab stop in the modules layout. @returns {this} */
|
|
218
401
|
focus(): this;
|
|
219
402
|
/** Destroys flyouts and restores/removes the host. @returns {void} */
|
|
220
403
|
destroy(): void;
|
|
@@ -222,8 +405,81 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
222
405
|
_renderMode(): void;
|
|
223
406
|
/** @returns {void} */
|
|
224
407
|
_renderExpanded(): void;
|
|
408
|
+
/** @returns {HTMLButtonElement} The minimize control of an expanded presentation. */
|
|
409
|
+
_collapseButton(): HTMLButtonElement;
|
|
410
|
+
/** @returns {HTMLButtonElement} The expand control at the head of a minimized vertical rail. */
|
|
411
|
+
_expandButton(): HTMLButtonElement;
|
|
412
|
+
/** @param {HTMLElement} list @returns {void} */
|
|
413
|
+
_listenTree(list: HTMLElement): void;
|
|
225
414
|
/** @returns {void} */
|
|
226
415
|
_renderRail(): void;
|
|
416
|
+
/**
|
|
417
|
+
* The modules layout. Expanded, the strip leaves module menus to the panel beside it; minimized
|
|
418
|
+
* or horizontal, the strip is the whole navigation and menus open as flyouts.
|
|
419
|
+
* @returns {void}
|
|
420
|
+
*/
|
|
421
|
+
_renderModules(): void;
|
|
422
|
+
/**
|
|
423
|
+
* The modules layout's switch between its presentations: an APG radio group of one small
|
|
424
|
+
* pictogram per presentation — both menus, the side menu beside module icons, the icons alone.
|
|
425
|
+
* Its checked option is also the collapse control while expanded and the expand control while
|
|
426
|
+
* collapsed, so focus lands on the checked option of its successor across a re-render.
|
|
427
|
+
* @param {boolean} expanded Whether the side menu shows.
|
|
428
|
+
* @returns {HTMLElement}
|
|
429
|
+
*/
|
|
430
|
+
_presentationSwitch(expanded: boolean): HTMLElement;
|
|
431
|
+
/**
|
|
432
|
+
* The choice between presentations as a menu entry, for an account or settings menu that holds
|
|
433
|
+
* it instead of the strip: `account.setItems([sidebar.presentationChoice(), …])`. It reads the
|
|
434
|
+
* current presentation when called, so rebuild it after `presentationchange`.
|
|
435
|
+
* @param {{label?: string}} [options={}] Row label; omitted resolves `appSidebar.presentation`.
|
|
436
|
+
* @returns {import('../../internal/menu-items.js').MenuChoice}
|
|
437
|
+
*/
|
|
438
|
+
presentationChoice({ label }?: {
|
|
439
|
+
label?: string;
|
|
440
|
+
}): import('../../internal/menu-items.js').MenuChoice;
|
|
441
|
+
/** @returns {Record<'expanded'|'compact'|'collapsed', string>} */
|
|
442
|
+
_presentationLabels(): Record<'expanded' | 'compact' | 'collapsed', string>;
|
|
443
|
+
/** Arrow keys move through the presentations and choose as they go, as in any radio group. @param {KeyboardEvent} event @returns {void} */
|
|
444
|
+
_onPresentationKeydown(event: KeyboardEvent): void;
|
|
445
|
+
/** Checks the current presentation's option and makes it the group's one Tab stop. @returns {void} */
|
|
446
|
+
_syncPresentationSwitch(): void;
|
|
447
|
+
/** @returns {Array<'expanded'|'compact'|'collapsed'>} The presentations the switch offers, widest first. */
|
|
448
|
+
_presentationCycle(): Array<'expanded' | 'compact' | 'collapsed'>;
|
|
449
|
+
/** @returns {'expanded'|'compact'|'collapsed'} */
|
|
450
|
+
_nextPresentation(): 'expanded' | 'compact' | 'collapsed';
|
|
451
|
+
/**
|
|
452
|
+
* What the strip prints for the current state: `'auto'` names the modules beside their tiles
|
|
453
|
+
* while expanded and leaves the icons alone while collapsed.
|
|
454
|
+
* @returns {'hidden'|'below'|'beside'}
|
|
455
|
+
*/
|
|
456
|
+
_stripLabels(): 'hidden' | 'below' | 'beside';
|
|
457
|
+
/** @returns {AppSidebarModule[]} The modules, read through any sections that group them. */
|
|
458
|
+
_moduleList(): AppSidebarModule[];
|
|
459
|
+
/** @param {string} panelId @returns {HTMLElement} */
|
|
460
|
+
_renderPanel(panelId: string): HTMLElement;
|
|
461
|
+
/** Puts the shown module's title, header, menu, and content into the panel. @returns {void} */
|
|
462
|
+
_renderPanelContent(): void;
|
|
463
|
+
/**
|
|
464
|
+
* Shows a module's panel. Returns false when there is no such panel module or a listener
|
|
465
|
+
* prevented the switch.
|
|
466
|
+
* @param {string|number} id Module id.
|
|
467
|
+
* @param {{silent?: boolean}} [options={}]
|
|
468
|
+
* @returns {boolean}
|
|
469
|
+
*/
|
|
470
|
+
_showModule(id: string | number, { silent }?: {
|
|
471
|
+
silent?: boolean;
|
|
472
|
+
}): boolean;
|
|
473
|
+
/** @param {CustomEvent<AppNavSelectDetail>} event @param {boolean} expanded @returns {void} */
|
|
474
|
+
_onModuleSelect(event: CustomEvent<AppNavSelectDetail>, expanded: boolean): void;
|
|
475
|
+
/** The arrow toward the panel shows a module's menu and moves into it. @param {KeyboardEvent} event @returns {void} */
|
|
476
|
+
_onStripKeydown(event: KeyboardEvent): void;
|
|
477
|
+
/** @returns {AppSidebarModule|null} */
|
|
478
|
+
_shownModule(): AppSidebarModule | null;
|
|
479
|
+
/** @param {string|number|null|undefined} preferred @returns {string|number|null} */
|
|
480
|
+
_resolveShown(preferred: string | number | null | undefined): string | number | null;
|
|
481
|
+
/** @returns {AppNavItem[]} The items the tree draws: the shown module's menu in the modules layout. */
|
|
482
|
+
_treeItems(): AppNavItem[];
|
|
227
483
|
/**
|
|
228
484
|
* Keeps a minimized rail's counts readable and audible.
|
|
229
485
|
*
|
|
@@ -240,6 +496,14 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
240
496
|
_renderTree(): void;
|
|
241
497
|
/** @param {AppNavItem} item @param {number} level @returns {HTMLElement} */
|
|
242
498
|
_treeRow(item: AppNavItem, level: number): HTMLElement;
|
|
499
|
+
/**
|
|
500
|
+
* A section: a heading over rows that stay at its own level. It names its list, so a screen
|
|
501
|
+
* reader hears "Records, list, 3 items" rather than a heading floating above unrelated rows.
|
|
502
|
+
* @param {AppNavItem} item Section.
|
|
503
|
+
* @param {number} level Level its rows take.
|
|
504
|
+
* @returns {HTMLElement}
|
|
505
|
+
*/
|
|
506
|
+
_sectionRow(item: AppNavItem, level: number): HTMLElement;
|
|
243
507
|
/** @param {Event} event @returns {void} */
|
|
244
508
|
_onTreeClick(event: Event): void;
|
|
245
509
|
/** @param {KeyboardEvent} event @returns {void} */
|
|
@@ -269,5 +533,15 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
269
533
|
/** @returns {void} */
|
|
270
534
|
_reconcileExpanded(): void;
|
|
271
535
|
}
|
|
536
|
+
/**
|
|
537
|
+
* The pictogram of a presentation: a small window with its navigation drawn in it — the module
|
|
538
|
+
* strip, wide when it is named, and the side menu when it shows. Built from boxes in the text
|
|
539
|
+
* colour, so it follows the theme and forced colours and needs no icon set. Decorative.
|
|
540
|
+
* @param {'expanded'|'compact'|'collapsed'} presentation
|
|
541
|
+
* @returns {HTMLElement}
|
|
542
|
+
*/
|
|
543
|
+
export declare function presentationGlyph(presentation: 'expanded' | 'compact' | 'collapsed'): HTMLElement;
|
|
272
544
|
/** Fired when expanded/minimized presentation changes. @event AppSidebar#collapsechange @type {CustomEvent<{collapsed: boolean}>} */
|
|
273
545
|
/** Fired when a minimized flyout changes. @event AppSidebar#flyoutchange @type {CustomEvent<{item: AppNavItem, id: string|number, open: boolean}>} */
|
|
546
|
+
/** Fired when how much of the navigation shows changes. @event AppSidebar#presentationchange @type {CustomEvent<{presentation: 'expanded'|'compact'|'collapsed', previous: 'expanded'|'compact'|'collapsed'}>} */
|
|
547
|
+
/** Fired before the modules layout's panel switches to another module; preventable. @event AppSidebar#modulechange @type {CustomEvent<{item: AppNavItem, id: string|number, previous: string|number|null}>} */
|
|
@@ -132,7 +132,9 @@ export type CalendarOptions = {
|
|
|
132
132
|
*/
|
|
133
133
|
dateUnit?: 'milliseconds' | 'seconds';
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
135
|
+
* Per-instance messages, keyed `calendar.*` (`calendar.today`,
|
|
136
|
+
* `calendar.next`, …). The bare keys of earlier versions (`today`, `next`) are still read, after the
|
|
137
|
+
* namespaced key, until the next major version.
|
|
136
138
|
*/
|
|
137
139
|
msg?: Record<string, string>;
|
|
138
140
|
/**
|
|
@@ -248,6 +250,68 @@ export type CalendarEventChangeDetail = {
|
|
|
248
250
|
export type CalendarSetOptions = {
|
|
249
251
|
silent?: boolean;
|
|
250
252
|
};
|
|
253
|
+
/** @typedef {import('./calendar-model.js').CalendarEvent} CalendarEvent */
|
|
254
|
+
/** @typedef {import('./calendar-model.js').CalendarView} CalendarView */
|
|
255
|
+
/** @typedef {import('./calendar-model.js').CalendarReader} CalendarReader */
|
|
256
|
+
/**
|
|
257
|
+
* @typedef {Object} CalendarOptions
|
|
258
|
+
* @property {Record<string, any>[]} [events=[]] Event records.
|
|
259
|
+
* @property {Date|string|number|null} [date=null] Initial local anchor date; null uses today.
|
|
260
|
+
* @property {CalendarView} [view='month'] Initial view.
|
|
261
|
+
* @property {CalendarView[]} [views=['agenda','day','week','month','year']] Allowed views.
|
|
262
|
+
* @property {string|string[]} [locale] Intl locale override.
|
|
263
|
+
* @property {number} [weekStart=1] First weekday, 0 (Sunday) through 6 (Saturday).
|
|
264
|
+
* @property {boolean} [weekNumbers=true] Show ISO week numbers in month view.
|
|
265
|
+
* @property {boolean} [workweek=false] Show Monday–Friday in the week time grid.
|
|
266
|
+
* @property {number} [agendaDays=14] Number of days in agenda view.
|
|
267
|
+
* @property {number} [slotDuration=30] Time-grid snap interval in minutes.
|
|
268
|
+
* @property {number} [slotMinTime=0] First visible minute of the day.
|
|
269
|
+
* @property {number} [slotMaxTime=1440] Exclusive last visible minute of the day.
|
|
270
|
+
* @property {number} [scrollTime=480] Minute initially scrolled into view.
|
|
271
|
+
* @property {number} [eventLimit=3] Maximum visible month lanes before a More button.
|
|
272
|
+
* @property {boolean} [selectable=false] Enable pointer time-range selection.
|
|
273
|
+
* @property {boolean} [editable=false] Enable event moving and resizing.
|
|
274
|
+
* @property {boolean|null} [eventStartEditable=null] Global move override; null inherits editable.
|
|
275
|
+
* @property {boolean|null} [eventDurationEditable=null] Global resize override; null inherits editable.
|
|
276
|
+
* @property {boolean} [optimistic=true] Apply event proposals locally before persistence confirms.
|
|
277
|
+
* @property {boolean} [nowIndicator=true] Show the current-time line in day/week views.
|
|
278
|
+
* @property {Date|(() => Date)|null} [now=null] Current-time override for deterministic rendering.
|
|
279
|
+
* @property {boolean} [disabled=false] Disable toolbar, date, selection, and editing controls.
|
|
280
|
+
* @property {CalendarReader} [eventId='id'] Event ID reader.
|
|
281
|
+
* @property {CalendarReader} [eventTitle='title'] Event title reader.
|
|
282
|
+
* @property {CalendarReader} [eventStart='start'] Event start reader.
|
|
283
|
+
* @property {CalendarReader} [eventEnd='end'] Event end reader.
|
|
284
|
+
* @property {CalendarReader} [eventAllDay='allDay'] Event all-day reader.
|
|
285
|
+
* @property {CalendarReader} [eventColor='color'] Event colour reader.
|
|
286
|
+
* @property {CalendarReader} [eventLocation='location'] Event location reader.
|
|
287
|
+
* @property {CalendarReader} [eventEditable='editable'] Per-event move reader.
|
|
288
|
+
* @property {CalendarReader} [eventDurationEditable='durationEditable'] Per-event resize reader.
|
|
289
|
+
* @property {'milliseconds'|'seconds'} [dateUnit='milliseconds'] Unit for numeric event dates.
|
|
290
|
+
* @property {Record<string, string>} [msg] Per-instance messages, keyed `calendar.*` (`calendar.today`,
|
|
291
|
+
* `calendar.next`, …). The bare keys of earlier versions (`today`, `next`) are still read, after the
|
|
292
|
+
* namespaced key, until the next major version.
|
|
293
|
+
* @property {(event: CalendarEvent) => Node|string|null} [renderEvent] Optional safe event-content renderer.
|
|
294
|
+
* @property {(event: CustomEvent<{events: CalendarEvent[]}>) => void} [oneventschange] Programmatic event-data listener.
|
|
295
|
+
* @property {(event: CustomEvent<{view: CalendarView, oldView: CalendarView}>) => void} [onviewchange] View listener.
|
|
296
|
+
* @property {(event: CustomEvent<{view: CalendarView, start: Date, end: Date}>) => void} [ondateschange] Visible-range listener.
|
|
297
|
+
* @property {(event: CustomEvent<{event: CalendarEvent, jsEvent: Event}>) => void} [oneventclick] Event activation listener.
|
|
298
|
+
* @property {(event: CustomEvent<{event: CalendarEvent, jsEvent: Event}>) => void} [oneventdblclick] Event double-activation listener.
|
|
299
|
+
* @property {(event: CustomEvent<{date: Date, allDay: boolean, view: CalendarView, jsEvent: Event}>) => void} [ondateclick] Date/time activation listener.
|
|
300
|
+
* @property {(event: CustomEvent<{start: Date, end: Date, allDay: boolean, view: CalendarView, jsEvent: Event}>) => void} [onselect] Range-selection listener.
|
|
301
|
+
* @property {(event: CustomEvent<CalendarEventChangeDetail>) => void} [oneventchange] Move/resize proposal listener.
|
|
302
|
+
* @property {(event: CustomEvent<{date: Date, view: CalendarView, jsEvent: Event}>) => void} [onnew] New-event command listener.
|
|
303
|
+
* @property {(event: CustomEvent<{date: Date, count: number, jsEvent: Event}>) => void} [onmoreclick] Month-overflow listener.
|
|
304
|
+
*/
|
|
305
|
+
/**
|
|
306
|
+
* @typedef {Object} CalendarEventChangeDetail
|
|
307
|
+
* @property {CalendarEvent} event Proposed event.
|
|
308
|
+
* @property {CalendarEvent} oldEvent Previous event.
|
|
309
|
+
* @property {'move'|'resize'} action Edit action.
|
|
310
|
+
* @property {{milliseconds: number, days: number, minutes: number, endMilliseconds: number}} delta Edit delta.
|
|
311
|
+
* @property {Event} jsEvent Originating pointer or keyboard event.
|
|
312
|
+
* @property {() => boolean} revert Idempotent optimistic revert callback.
|
|
313
|
+
*/
|
|
314
|
+
/** @typedef {{silent?: boolean}} CalendarSetOptions */
|
|
251
315
|
/**
|
|
252
316
|
* Accessible, dependency-free agenda/day/week/month/year scheduling surface.
|
|
253
317
|
* @fires Calendar#viewchange
|
|
@@ -513,10 +577,8 @@ export declare class Calendar extends Component<CalendarOptions> {
|
|
|
513
577
|
*/
|
|
514
578
|
_dayCountLabel(day: Date, count: number): string;
|
|
515
579
|
/**
|
|
516
|
-
* Resolves a message through
|
|
517
|
-
*
|
|
518
|
-
* Distinct from `msg()`: the built-in `msg` option answers the calendar's own vocabulary, so a
|
|
519
|
-
* dotted key falls past it to the host translator, which is what these strings never had.
|
|
580
|
+
* Resolves a message through `msg()`, falling back to the built-in English text. Redundant now
|
|
581
|
+
* that `msg()` ends in the default catalogue; kept until the private copies are removed.
|
|
520
582
|
* @param {string} key Message key.
|
|
521
583
|
* @param {string} fallback Built-in text, with `%1`-style placeholders.
|
|
522
584
|
* @param {...unknown} args Interpolation values.
|
|
@@ -109,9 +109,10 @@ export type CardViewOptions = {
|
|
|
109
109
|
*/
|
|
110
110
|
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
111
111
|
/**
|
|
112
|
-
* Accessible collection label
|
|
112
|
+
* Accessible collection label; null resolves message
|
|
113
|
+
* `cardView.label`, "Card view".
|
|
113
114
|
*/
|
|
114
|
-
label?: string;
|
|
115
|
+
label?: string | null;
|
|
115
116
|
onrecordaction?: (event: CustomEvent<Record<string, unknown>>) => void;
|
|
116
117
|
};
|
|
117
118
|
export type CardViewState = {
|
|
@@ -203,7 +204,8 @@ export type CardRecordGroup = {
|
|
|
203
204
|
* @property {'outlined'|'raised'|'filled'} [variant='outlined'] Card surface treatment.
|
|
204
205
|
* @property {number} [loadingCount=6] Skeleton cards shown while loading.
|
|
205
206
|
* @property {1|2|3|4|5|6} [headingLevel=3] Per-card title heading level.
|
|
206
|
-
* @property {string} [label=
|
|
207
|
+
* @property {string|null} [label=null] Accessible collection label; null resolves message
|
|
208
|
+
* `cardView.label`, "Card view".
|
|
207
209
|
* @property {(event:CustomEvent<Record<string,unknown>>)=>void} [onrecordaction]
|
|
208
210
|
*/
|
|
209
211
|
/**
|
|
@@ -304,8 +306,9 @@ export declare class CardView extends RecordView {
|
|
|
304
306
|
* @param {CardViewOptions['groupBy']} groupBy Group field or resolver.
|
|
305
307
|
* @param {unknown[]} [groupOrder=[]] Preferred group ids.
|
|
306
308
|
* @param {ViewField[]} [fields=[]] Complete fields for accessor-aware grouping.
|
|
309
|
+
* @param {string} [ungroupedLabel='Ungrouped'] Label of the group collecting records without a value.
|
|
307
310
|
* @returns {CardRecordGroup[]} Deterministic groups.
|
|
308
311
|
*/
|
|
309
|
-
export declare function groupCardRecords(records: ViewRecord[], groupBy: CardViewOptions['groupBy'], groupOrder?: unknown[], fields?: ViewField[]): CardRecordGroup[];
|
|
312
|
+
export declare function groupCardRecords(records: ViewRecord[], groupBy: CardViewOptions['groupBy'], groupOrder?: unknown[], fields?: ViewField[], ungroupedLabel?: string): CardRecordGroup[];
|
|
310
313
|
/** @param {unknown} value @returns {string} */
|
|
311
314
|
export declare function normalizeCardWidth(value: unknown): string;
|
|
@@ -139,6 +139,13 @@ export type RecordCardOptions = {
|
|
|
139
139
|
* Listener-free, owner-created controls such as a move handle.
|
|
140
140
|
*/
|
|
141
141
|
controls?: Node[];
|
|
142
|
+
/**
|
|
143
|
+
* Resolves the card's built-in strings
|
|
144
|
+
* (`recordCard.select`, `recordCard.actions`, `recordCard.untitled`, `recordCard.selected`,
|
|
145
|
+
* `recordCard.notSelected`). An owning component passes its own `msg()`; omitted, the host
|
|
146
|
+
* translator and then the default English catalogue answer.
|
|
147
|
+
*/
|
|
148
|
+
message?: (key: string, ...args: unknown[]) => string;
|
|
142
149
|
};
|
|
143
150
|
export type ResolvedRecordPreview = {
|
|
144
151
|
/**
|
|
@@ -218,6 +225,10 @@ export type ResolvedRecordPreview = {
|
|
|
218
225
|
* @property {'outlined'|'raised'|'filled'} [variant='outlined'] Surface treatment.
|
|
219
226
|
* @property {1|2|3|4|5|6} [headingLevel=3] Card title heading level.
|
|
220
227
|
* @property {Node[]} [controls=[]] Listener-free, owner-created controls such as a move handle.
|
|
228
|
+
* @property {(key: string, ...args: unknown[]) => string} [message] Resolves the card's built-in strings
|
|
229
|
+
* (`recordCard.select`, `recordCard.actions`, `recordCard.untitled`, `recordCard.selected`,
|
|
230
|
+
* `recordCard.notSelected`). An owning component passes its own `msg()`; omitted, the host
|
|
231
|
+
* translator and then the default English catalogue answer.
|
|
221
232
|
*/
|
|
222
233
|
/**
|
|
223
234
|
* @typedef {Object} ResolvedRecordPreview
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component } from '../../core/component.js';
|
|
2
2
|
export type MenuItem = import('../../internal/menu-items.js').MenuItem;
|
|
3
|
-
export type ContextMenuEntry = import('../../internal/menu-items.js').
|
|
3
|
+
export type ContextMenuEntry = import('../../internal/menu-items.js').MenuItem | import('../../internal/menu-items.js').MenuHeading | import('../../internal/menu-items.js').MenuSeparator | '-';
|
|
4
4
|
export type ContextMenuOptions = {
|
|
5
5
|
/**
|
|
6
6
|
* Menu
|
|
@@ -35,7 +35,11 @@ export type ContextMenuOptions = {
|
|
|
35
35
|
onclose?: (event: CustomEvent<Record<string, never>>) => void;
|
|
36
36
|
};
|
|
37
37
|
/** @typedef {import('../../internal/menu-items.js').MenuItem} MenuItem */
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* A context menu's entries: the shared menu model without `choice` rows, which a menu that closes
|
|
40
|
+
* on every activation cannot hold.
|
|
41
|
+
* @typedef {import('../../internal/menu-items.js').MenuItem|import('../../internal/menu-items.js').MenuHeading|import('../../internal/menu-items.js').MenuSeparator|'-'} ContextMenuEntry
|
|
42
|
+
*/
|
|
39
43
|
/**
|
|
40
44
|
* @typedef {Object} ContextMenuOptions
|
|
41
45
|
* @property {ContextMenuEntry[]|((context: Element|null) => ContextMenuEntry[])} [items=[]] Menu
|
|
@@ -37,7 +37,7 @@ export type SelectFilterDefinition = {
|
|
|
37
37
|
*/
|
|
38
38
|
options?: Array<unknown | DataFilterOption>;
|
|
39
39
|
/**
|
|
40
|
-
* Empty option label.
|
|
40
|
+
* Empty option label; omitted resolves message `dataFilter.all`, "All".
|
|
41
41
|
*/
|
|
42
42
|
emptyLabel?: string;
|
|
43
43
|
};
|
|
@@ -94,7 +94,7 @@ export type DataFilterOptions = {
|
|
|
94
94
|
*/
|
|
95
95
|
autoApply?: boolean;
|
|
96
96
|
/**
|
|
97
|
-
* Clear button label; null resolves `dataFilter.clear
|
|
97
|
+
* Clear button label; null resolves message `dataFilter.clear`, "Clear".
|
|
98
98
|
*/
|
|
99
99
|
clearLabel?: string | null;
|
|
100
100
|
onfilter?: (event: CustomEvent<DataFilterEventDetail>) => void;
|
|
@@ -118,7 +118,7 @@ export type DataFilterEventDetail = {
|
|
|
118
118
|
* @property {Array<string|((row: DataFilterRow) => unknown)>} [fields] Row fields combined with OR.
|
|
119
119
|
* @property {(row: DataFilterRow) => unknown} [get] Custom value accessor.
|
|
120
120
|
* @property {Array<unknown|DataFilterOption>} [options] Explicit options; omitted derives distinct values.
|
|
121
|
-
* @property {string} [emptyLabel] Empty option label.
|
|
121
|
+
* @property {string} [emptyLabel] Empty option label; omitted resolves message `dataFilter.all`, "All".
|
|
122
122
|
*/
|
|
123
123
|
/**
|
|
124
124
|
* @typedef {Object} TextFilterDefinition
|
|
@@ -142,7 +142,7 @@ export type DataFilterEventDetail = {
|
|
|
142
142
|
* @property {FilterDefinition[]} [filters=[]] Declarative filters.
|
|
143
143
|
* @property {DataFilterRow[]} [data=[]] Rows to filter.
|
|
144
144
|
* @property {boolean} [autoApply=true] Apply and emit whenever a control changes.
|
|
145
|
-
* @property {string|null} [clearLabel=null] Clear button label; null resolves `dataFilter.clear
|
|
145
|
+
* @property {string|null} [clearLabel=null] Clear button label; null resolves message `dataFilter.clear`, "Clear".
|
|
146
146
|
* @property {(event: CustomEvent<DataFilterEventDetail>) => void} [onfilter]
|
|
147
147
|
*/
|
|
148
148
|
/** @typedef {{rows: DataFilterRow[], state: Record<string, unknown>}} DataFilterEventDetail */
|