@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,124 @@
|
|
|
1
|
+
export type StatusIndicator = 'dotted' | 'ring' | 'progress' | 'review' | 'ready' | 'waiting' | 'done' | 'canceled' | 'duplicate';
|
|
2
|
+
export type StatusTone = 'muted' | 'neutral' | 'warning' | 'info' | 'accent' | 'success' | 'danger';
|
|
3
|
+
export type StatusId = 'backlog' | 'todo' | 'in-progress' | 'in-review' | 'review' | 'ready' | 'waiting' | 'done' | 'canceled' | 'cancelled' | 'duplicate';
|
|
4
|
+
export type StatusIconOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* Shape, overriding the status's own.
|
|
7
|
+
*/
|
|
8
|
+
indicator?: StatusIndicator;
|
|
9
|
+
/**
|
|
10
|
+
* Colour, overriding the status's own.
|
|
11
|
+
*/
|
|
12
|
+
tone?: StatusTone;
|
|
13
|
+
/**
|
|
14
|
+
* Accessible name. Without one the glyph is decorative
|
|
15
|
+
* (`aria-hidden`) and must sit beside text, or inside a control with a tooltip, that says the
|
|
16
|
+
* status.
|
|
17
|
+
*/
|
|
18
|
+
label?: string | null;
|
|
19
|
+
};
|
|
20
|
+
export type PriorityIconOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* Accessible name. Without one the glyph is decorative
|
|
23
|
+
* (`aria-hidden`) and must sit beside text, or inside a control with a tooltip, that says the
|
|
24
|
+
* priority.
|
|
25
|
+
*/
|
|
26
|
+
label?: string | null;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The shapes a workflow-status glyph can take. Each status reads by shape first and colour
|
|
30
|
+
* second, so the set stays legible to readers who do not see the colour.
|
|
31
|
+
* @typedef {'dotted'|'ring'|'progress'|'review'|'ready'|'waiting'|'done'|'canceled'|'duplicate'} StatusIndicator
|
|
32
|
+
*/
|
|
33
|
+
/** @typedef {'muted'|'neutral'|'warning'|'info'|'accent'|'success'|'danger'} StatusTone */
|
|
34
|
+
/**
|
|
35
|
+
* The built-in workflow statuses. `review` and `cancelled` are accepted as spellings of
|
|
36
|
+
* `in-review` and `canceled`.
|
|
37
|
+
* @typedef {'backlog'|'todo'|'in-progress'|'in-review'|'review'|'ready'|'waiting'|'done'|'canceled'|'cancelled'|'duplicate'} StatusId
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* @typedef {Object} StatusIconOptions
|
|
41
|
+
* @property {StatusIndicator} [indicator] Shape, overriding the status's own.
|
|
42
|
+
* @property {StatusTone} [tone] Colour, overriding the status's own.
|
|
43
|
+
* @property {string|null} [label=null] Accessible name. Without one the glyph is decorative
|
|
44
|
+
* (`aria-hidden`) and must sit beside text, or inside a control with a tooltip, that says the
|
|
45
|
+
* status.
|
|
46
|
+
*/
|
|
47
|
+
/**
|
|
48
|
+
* @typedef {Object} PriorityIconOptions
|
|
49
|
+
* @property {string|null} [label=null] Accessible name. Without one the glyph is decorative
|
|
50
|
+
* (`aria-hidden`) and must sit beside text, or inside a control with a tooltip, that says the
|
|
51
|
+
* priority.
|
|
52
|
+
*/
|
|
53
|
+
/** Every shape `statusIcon()` draws. */
|
|
54
|
+
export declare const STATUS_INDICATORS: readonly string[];
|
|
55
|
+
/** Every colour a status glyph takes, from the semantic set. */
|
|
56
|
+
export declare const STATUS_TONES: readonly string[];
|
|
57
|
+
/**
|
|
58
|
+
* The built-in statuses in workflow order, as `[id, message key, English name, indicator, tone]`.
|
|
59
|
+
* `Select.status()` lists them; `statusIcon()` draws them.
|
|
60
|
+
*/
|
|
61
|
+
export declare const DEFAULT_STATUSES: readonly string[][];
|
|
62
|
+
/** The top priority level, the one coloured level: a danger square with an exclamation mark. */
|
|
63
|
+
export declare const PRIORITY_URGENT = 4;
|
|
64
|
+
/**
|
|
65
|
+
* Resolves the shape and colour of a status glyph.
|
|
66
|
+
*
|
|
67
|
+
* A status is a built-in id (or one of its other spellings), or a status item of the kind
|
|
68
|
+
* `Select.status({items})` takes, whose own `indicator` and `tone` win over the built-in status
|
|
69
|
+
* its `ID` names. Options win over both. An unknown shape falls back to the empty ring and an
|
|
70
|
+
* unknown colour to muted, as `Select.status()` does with a custom item.
|
|
71
|
+
* @param {StatusId|string|{ID?: unknown, id?: unknown, indicator?: unknown, tone?: unknown}|null|undefined} status
|
|
72
|
+
* @param {StatusIconOptions} [options={}] Overrides.
|
|
73
|
+
* @returns {{indicator: StatusIndicator, tone: StatusTone}}
|
|
74
|
+
*/
|
|
75
|
+
export declare function resolveStatusGlyph(status: StatusId | string | {
|
|
76
|
+
ID?: unknown;
|
|
77
|
+
id?: unknown;
|
|
78
|
+
indicator?: unknown;
|
|
79
|
+
tone?: unknown;
|
|
80
|
+
} | null | undefined, options?: StatusIconOptions): {
|
|
81
|
+
indicator: StatusIndicator;
|
|
82
|
+
tone: StatusTone;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Maps a status id to its built-in spelling: trimmed, lower-cased, and `review` / `cancelled`
|
|
86
|
+
* read as `in-review` / `canceled`.
|
|
87
|
+
* @param {unknown} id Status id.
|
|
88
|
+
* @returns {string}
|
|
89
|
+
*/
|
|
90
|
+
export declare function normalizeStatusId(id: unknown): string;
|
|
91
|
+
/**
|
|
92
|
+
* Settles a priority level: an integer from 0 (lowest) to 4 (highest), or `null` for no priority.
|
|
93
|
+
* Out-of-range numbers clamp; anything that is not a number reads as 0.
|
|
94
|
+
* @param {unknown} level Priority level.
|
|
95
|
+
* @returns {number|null}
|
|
96
|
+
*/
|
|
97
|
+
export declare function normalizePriorityLevel(level: unknown): number | null;
|
|
98
|
+
/**
|
|
99
|
+
* Draws the workflow-status glyph `Select.status()` shows, for a list row, a board column, a
|
|
100
|
+
* filter chip, or a heading — so every place a status appears reads as the picker that changes it.
|
|
101
|
+
*
|
|
102
|
+
* Built-in statuses: `backlog` (dotted ring), `todo` (empty ring), `in-progress` (ring with a
|
|
103
|
+
* centre dot), `in-review` (half filled; also `review`), `ready` (a third filled), `waiting` (two
|
|
104
|
+
* thirds filled), `done` (filled, with a check), `canceled` (filled, with a cross; also
|
|
105
|
+
* `cancelled`), and `duplicate` (ring with a slash). Colour only repeats what the shape says.
|
|
106
|
+
* @param {StatusId|string|{ID?: unknown, indicator?: unknown, tone?: unknown}} status Built-in id,
|
|
107
|
+
* or a status item with its own `indicator` and `tone`.
|
|
108
|
+
* @param {StatusIconOptions} [options={}] Shape, colour, and accessible-name overrides.
|
|
109
|
+
* @returns {HTMLSpanElement} A `.zx-status-icon` element, decorative unless `label` is given.
|
|
110
|
+
*/
|
|
111
|
+
export declare function statusIcon(status: StatusId | string | {
|
|
112
|
+
ID?: unknown;
|
|
113
|
+
indicator?: unknown;
|
|
114
|
+
tone?: unknown;
|
|
115
|
+
}, options?: StatusIconOptions): HTMLSpanElement;
|
|
116
|
+
/**
|
|
117
|
+
* Draws the priority glyph `Select.priority()` shows. Levels 0–3 are four signal bars in muted
|
|
118
|
+
* ink, filled up to the level; level 4, the highest, is a filled danger square whose "!" the
|
|
119
|
+
* stylesheet draws, so it never joins the text beside it; no priority (`null`) is a row of dashes.
|
|
120
|
+
* @param {number|null} level Priority level, 0 (lowest) to 4 (highest), or `null` for none.
|
|
121
|
+
* @param {PriorityIconOptions} [options={}] Accessible-name option.
|
|
122
|
+
* @returns {HTMLSpanElement} A `.zx-priority-icon` element, decorative unless `label` is given.
|
|
123
|
+
*/
|
|
124
|
+
export declare function priorityIcon(level: number | null, options?: PriorityIconOptions): HTMLSpanElement;
|
|
@@ -68,6 +68,10 @@ export type SelectOptions = {
|
|
|
68
68
|
* Empty control text.
|
|
69
69
|
*/
|
|
70
70
|
placeholder?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Accessible combobox name; falls back to the placeholder.
|
|
73
|
+
*/
|
|
74
|
+
label?: string;
|
|
71
75
|
/**
|
|
72
76
|
* Whether selection may be cleared.
|
|
73
77
|
*/
|
|
@@ -143,7 +147,9 @@ export type EntitySelectOptions = {
|
|
|
143
147
|
*/
|
|
144
148
|
iconKey?: string | ((item: SelectItem) => unknown);
|
|
145
149
|
/**
|
|
146
|
-
* Optional icon colour reader
|
|
150
|
+
* Optional icon colour reader: a CSS
|
|
151
|
+
* colour or a token reference such as `var(--zx-color-tone-blue-fg)`. Without one the glyph is a
|
|
152
|
+
* neutral tile in muted ink.
|
|
147
153
|
*/
|
|
148
154
|
colorKey?: string | ((item: SelectItem) => unknown);
|
|
149
155
|
/**
|
|
@@ -210,6 +216,7 @@ export declare class Select extends Component<SelectOptions> {
|
|
|
210
216
|
_createdRoot: boolean;
|
|
211
217
|
_root: HTMLElement;
|
|
212
218
|
_snapshot: import("../../core/dom.js").TargetSnapshot;
|
|
219
|
+
_pointerModality: boolean;
|
|
213
220
|
_handleTypeahead: (event: KeyboardEvent | string) => void;
|
|
214
221
|
static cssName: string;
|
|
215
222
|
/** @type {SelectOptions} */
|
|
@@ -263,9 +270,14 @@ export declare class Select extends Component<SelectOptions> {
|
|
|
263
270
|
/** Moves focus to the combobox input. @returns {this} */
|
|
264
271
|
focus(): this;
|
|
265
272
|
/**
|
|
266
|
-
* Creates the five-level priority preset
|
|
273
|
+
* Creates the five-level priority preset: values 0 (lowest) to 4 (highest), each drawn as grey
|
|
274
|
+
* signal bars filled to its level, except the highest, which is the one coloured level — a
|
|
275
|
+
* danger square with an exclamation mark. A "No priority" row (value null, a row of dashes)
|
|
276
|
+
* heads the list and labels the empty control; `clearable: false` removes it.
|
|
267
277
|
* @param {Element|string|null} target Component target.
|
|
268
|
-
* @param {SelectOptions} [options={}] Select overrides other than
|
|
278
|
+
* @param {SelectOptions} [options={}] Select overrides other than items and renderers.
|
|
279
|
+
* `clearable` defaults to true here; `noneLabel` and `placeholder` default to the
|
|
280
|
+
* `priority.none` message ("No priority").
|
|
269
281
|
* @returns {Select}
|
|
270
282
|
*/
|
|
271
283
|
static priority(target: Element | string | null, options?: SelectOptions): Select;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Component } from '../../core/component.js';
|
|
2
|
+
import { Select } from '../select/select.js';
|
|
3
|
+
export type SortField = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export type SortValue = {
|
|
8
|
+
id: string;
|
|
9
|
+
dir: 'asc' | 'desc';
|
|
10
|
+
};
|
|
11
|
+
export type SortControlOptions = {
|
|
12
|
+
/**
|
|
13
|
+
* Available sort fields, in display order.
|
|
14
|
+
*/
|
|
15
|
+
fields?: SortField[];
|
|
16
|
+
/**
|
|
17
|
+
* Initial sort; null chooses the first field ascending.
|
|
18
|
+
*/
|
|
19
|
+
value?: SortValue | null;
|
|
20
|
+
/**
|
|
21
|
+
* Accessible field label and direction-name prefix.
|
|
22
|
+
*/
|
|
23
|
+
label?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Current/next direction labels, defaulting to Ascending/Descending.
|
|
26
|
+
*/
|
|
27
|
+
labels?: {
|
|
28
|
+
asc?: string;
|
|
29
|
+
desc?: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Whether interaction is disabled.
|
|
33
|
+
*/
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Atomic field/direction change.
|
|
37
|
+
*/
|
|
38
|
+
onchange?: (event: CustomEvent<{
|
|
39
|
+
value: SortValue;
|
|
40
|
+
}>) => void;
|
|
41
|
+
};
|
|
42
|
+
/** @typedef {{id:string,label:string}} SortField */
|
|
43
|
+
/** @typedef {{id:string,dir:'asc'|'desc'}} SortValue */
|
|
44
|
+
/**
|
|
45
|
+
* @typedef {Object} SortControlOptions
|
|
46
|
+
* @property {SortField[]} [fields=[]] Available sort fields, in display order.
|
|
47
|
+
* @property {SortValue|null} [value=null] Initial sort; null chooses the first field ascending.
|
|
48
|
+
* @property {string} [label='Sort by'] Accessible field label and direction-name prefix.
|
|
49
|
+
* @property {{asc?:string,desc?:string}} [labels={}] Current/next direction labels, defaulting to Ascending/Descending.
|
|
50
|
+
* @property {boolean} [disabled=false] Whether interaction is disabled.
|
|
51
|
+
* @property {(event:CustomEvent<{value:SortValue}>)=>void} [onchange] Atomic field/direction change.
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* A searchable field selector with an adjacent direction toggle and one shared sort value.
|
|
55
|
+
* @fires SortControl#change
|
|
56
|
+
* @extends {Component<SortControlOptions>}
|
|
57
|
+
*/
|
|
58
|
+
export declare class SortControl extends Component<SortControlOptions> {
|
|
59
|
+
_createdRoot: boolean;
|
|
60
|
+
_snapshot: import("../../core/dom.js").TargetSnapshot;
|
|
61
|
+
_value: SortValue;
|
|
62
|
+
_disabled: boolean;
|
|
63
|
+
_direction: HTMLButtonElement;
|
|
64
|
+
_select: Select;
|
|
65
|
+
static cssName: string;
|
|
66
|
+
/** @type {SortControlOptions} */
|
|
67
|
+
static defaults: SortControlOptions;
|
|
68
|
+
/** @returns {HTMLElement} */
|
|
69
|
+
render(): HTMLElement;
|
|
70
|
+
/** Returns a defensive copy of the current sort. @returns {SortValue|null} */
|
|
71
|
+
getValue(): SortValue | null;
|
|
72
|
+
/**
|
|
73
|
+
* Replaces the field and direction atomically; rejects unavailable fields and directions.
|
|
74
|
+
* @param {SortValue|null} value Sort state, or null for the first field ascending.
|
|
75
|
+
* @param {{silent?:boolean}} [options={}] Suppress change when silent.
|
|
76
|
+
* @returns {this}
|
|
77
|
+
*/
|
|
78
|
+
setValue(value: SortValue | null, { silent }?: {
|
|
79
|
+
silent?: boolean;
|
|
80
|
+
}): this;
|
|
81
|
+
/** Enables both controls when fields are available. @returns {this} */
|
|
82
|
+
enable(): this;
|
|
83
|
+
/** Disables both controls and closes the option panel. @returns {this} */
|
|
84
|
+
disable(): this;
|
|
85
|
+
/** Updates the icon and accessible current/next direction text. @private @returns {void} */
|
|
86
|
+
private _syncDirection;
|
|
87
|
+
/** Focuses the searchable control. @returns {this} */
|
|
88
|
+
focus(): this;
|
|
89
|
+
/** Releases the owned Select and restores an enhanced target. @returns {void} */
|
|
90
|
+
destroy(): void;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Validates a sort against available fields without retaining caller-owned state.
|
|
94
|
+
* @param {SortValue|null} value Requested sort.
|
|
95
|
+
* @param {SortField[]} fields Available fields.
|
|
96
|
+
* @returns {SortValue|null} Normalized sort, or null for an empty catalogue.
|
|
97
|
+
*/
|
|
98
|
+
export declare function normalizeSortValue(value: SortValue | null, fields: SortField[]): SortValue | null;
|
|
99
|
+
/**
|
|
100
|
+
* Builds one searchable record per field without retaining caller-owned objects.
|
|
101
|
+
* @param {SortField[]} fields Available fields.
|
|
102
|
+
* @returns {SortField[]} Choice records.
|
|
103
|
+
*/
|
|
104
|
+
export declare function sortChoices(fields: SortField[]): SortField[];
|
|
105
|
+
/** @event SortControl#change @type {CustomEvent<{value:SortValue}>} */
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { Component } from '../../core/component.js';
|
|
2
|
+
export type StatTileFormatName = 'number' | 'currency' | 'percent' | 'fileSize' | null;
|
|
3
|
+
export type StatTileFormat = StatTileFormatName | ((value: number | string | null | undefined) => string);
|
|
4
|
+
export type StatTileKind = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';
|
|
5
|
+
export type StatTileDeltaKind = 'positive' | 'negative' | 'neutral';
|
|
6
|
+
export type StatTileDirection = 'up' | 'down' | 'flat';
|
|
7
|
+
export type StatTileDelta = {
|
|
8
|
+
/**
|
|
9
|
+
* Which way the metric moved, read from the sign alone.
|
|
10
|
+
*/
|
|
11
|
+
direction: StatTileDirection;
|
|
12
|
+
/**
|
|
13
|
+
* `'+'`, `'−'` (U+2212), or `''` for an unchanged metric.
|
|
14
|
+
*/
|
|
15
|
+
sign: string;
|
|
16
|
+
/**
|
|
17
|
+
* The formatted absolute change, without a sign.
|
|
18
|
+
*/
|
|
19
|
+
magnitude: string;
|
|
20
|
+
/**
|
|
21
|
+
* The visible change: `sign` followed by `magnitude`.
|
|
22
|
+
*/
|
|
23
|
+
text: string;
|
|
24
|
+
};
|
|
25
|
+
export type StatTileNameParts = {
|
|
26
|
+
/**
|
|
27
|
+
* The metric's name.
|
|
28
|
+
*/
|
|
29
|
+
label?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The formatted value.
|
|
32
|
+
*/
|
|
33
|
+
value?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The context line under the value, e.g. `'of 13,184'`.
|
|
36
|
+
*/
|
|
37
|
+
caption?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The change, already worded for speech (`'up 2'`, not `'+2'`).
|
|
40
|
+
*/
|
|
41
|
+
delta?: string;
|
|
42
|
+
/**
|
|
43
|
+
* What the change is measured against.
|
|
44
|
+
*/
|
|
45
|
+
deltaLabel?: string;
|
|
46
|
+
};
|
|
47
|
+
export type StatTileOptions = {
|
|
48
|
+
/**
|
|
49
|
+
* The metric's name, set small above the value.
|
|
50
|
+
*/
|
|
51
|
+
label?: string;
|
|
52
|
+
/**
|
|
53
|
+
* The metric. A string is rendered as given.
|
|
54
|
+
*/
|
|
55
|
+
value?: number | string | null;
|
|
56
|
+
/**
|
|
57
|
+
* How a numeric value is rendered: a named mode, a
|
|
58
|
+
* callback receiving the raw value, or null to print the value unformatted.
|
|
59
|
+
*/
|
|
60
|
+
format?: StatTileFormat;
|
|
61
|
+
/**
|
|
62
|
+
* ISO 4217 code used by `format: 'currency'`.
|
|
63
|
+
*/
|
|
64
|
+
currency?: string | null;
|
|
65
|
+
/**
|
|
66
|
+
* A muted context line under the value — what the number is out
|
|
67
|
+
* of or measured in, e.g. `'of 13,184'` or `'open tickets'`. Part of the accessible name.
|
|
68
|
+
*/
|
|
69
|
+
caption?: string;
|
|
70
|
+
/**
|
|
71
|
+
* BCP 47 tag for every formatter; defaults to the active language.
|
|
72
|
+
*/
|
|
73
|
+
locale?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Change against the previous period. Rendered with
|
|
76
|
+
* its own sign and an arrow, never with colour alone.
|
|
77
|
+
*/
|
|
78
|
+
delta?: number | string | null;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the change is good, bad, or merely a
|
|
81
|
+
* change. This — not the sign's direction — picks the delta colour: a rising ticket count is not
|
|
82
|
+
* a success, so "up is good" is never assumed.
|
|
83
|
+
*/
|
|
84
|
+
deltaKind?: StatTileDeltaKind;
|
|
85
|
+
/**
|
|
86
|
+
* How the delta is rendered; defaults to `format`.
|
|
87
|
+
*/
|
|
88
|
+
deltaFormat?: StatTileFormat;
|
|
89
|
+
/**
|
|
90
|
+
* What the change is measured against, e.g. `'vs. last week'`.
|
|
91
|
+
*/
|
|
92
|
+
deltaLabel?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Values for a decorative sparkline. Fewer than two usable numbers
|
|
95
|
+
* render nothing.
|
|
96
|
+
*/
|
|
97
|
+
trend?: number[];
|
|
98
|
+
/**
|
|
99
|
+
* Icon name from `icons.js`, shown muted beside the label —
|
|
100
|
+
* a glyph, not a coloured chip.
|
|
101
|
+
*/
|
|
102
|
+
icon?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
* Semantic intent. It tints the sparkline and never the
|
|
105
|
+
* value, which stays at full text contrast whatever intent a record carries.
|
|
106
|
+
*/
|
|
107
|
+
kind?: StatTileKind;
|
|
108
|
+
/**
|
|
109
|
+
* Destination. A tile with an href is an `<a>`.
|
|
110
|
+
*/
|
|
111
|
+
href?: string | null;
|
|
112
|
+
/**
|
|
113
|
+
* Renders a `<button>` without an href. Passing `onclick`
|
|
114
|
+
* sets this implicitly; set it directly to subscribe with `on('click', …)` instead.
|
|
115
|
+
*/
|
|
116
|
+
clickable?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Renders a skeleton shaped like the tile.
|
|
119
|
+
*/
|
|
120
|
+
loading?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Message overrides, keyed as `statTile.*`.
|
|
123
|
+
*/
|
|
124
|
+
msg?: Record<string, unknown>;
|
|
125
|
+
/**
|
|
126
|
+
* Activation listener; its
|
|
127
|
+
* presence is what turns a tile with no href into a button. It is the tile's `click` event, as
|
|
128
|
+
* every Zx component's `on*` option is, so it receives the `CustomEvent` carrying the native
|
|
129
|
+
* event in `detail.event`.
|
|
130
|
+
*/
|
|
131
|
+
onclick?: (event: CustomEvent<{
|
|
132
|
+
event: MouseEvent;
|
|
133
|
+
}>) => void;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Renders a metric: a label, the number it names, and — optionally — how that number moved.
|
|
137
|
+
*
|
|
138
|
+
* The value is the loudest thing on the tile; the label sits small above it and the delta and the
|
|
139
|
+
* sparkline are subordinate to both. Nothing here assumes a fixed set of metrics: the label, the
|
|
140
|
+
* intent colour, the icon and the formatting all arrive per instance, so a tile whose content
|
|
141
|
+
* comes from a server is the normal case rather than the exception.
|
|
142
|
+
*
|
|
143
|
+
* The element shape follows the tile's behaviour, and a tag cannot be rewritten in place, so the
|
|
144
|
+
* component normally builds its own root — pass `null` as the target, or use {@link statTile}. An
|
|
145
|
+
* existing element is adopted only when its tag already is the one the options call for; a mismatch
|
|
146
|
+
* throws rather than silently shipping a `<div>` with a click handler or a link that cannot
|
|
147
|
+
* navigate.
|
|
148
|
+
*
|
|
149
|
+
* @fires StatTile#click
|
|
150
|
+
* @extends {Component<StatTileOptions>}
|
|
151
|
+
*/
|
|
152
|
+
export declare class StatTile extends Component<StatTileOptions> {
|
|
153
|
+
_createdRoot: boolean;
|
|
154
|
+
_snapshot: import("../../core/dom.js").TargetSnapshot;
|
|
155
|
+
_closed: boolean;
|
|
156
|
+
_state: any;
|
|
157
|
+
static cssName: string;
|
|
158
|
+
/** @type {Readonly<StatTileOptions>} */
|
|
159
|
+
static defaults: Readonly<StatTileOptions>;
|
|
160
|
+
/**
|
|
161
|
+
* Creates or adopts one metric tile.
|
|
162
|
+
* @param {Element|string|null} [target=null] Existing element of the required tag, or null.
|
|
163
|
+
* @param {StatTileOptions} [options={}] Tile options.
|
|
164
|
+
*/
|
|
165
|
+
constructor(target?: Element | string | null, options?: StatTileOptions);
|
|
166
|
+
/**
|
|
167
|
+
* @returns {HTMLElement}
|
|
168
|
+
* @throws {TypeError} When an adopted target is not the tag the options require.
|
|
169
|
+
*/
|
|
170
|
+
render(): HTMLElement;
|
|
171
|
+
/**
|
|
172
|
+
* Replaces any subset of the tile's content and redraws it. This is how a tile leaves
|
|
173
|
+
* `loading: true` behind once the server answers.
|
|
174
|
+
* @param {StatTileOptions} options Options to merge over the current ones.
|
|
175
|
+
* @returns {this}
|
|
176
|
+
* @throws {TypeError} When the merged options would need a different element tag.
|
|
177
|
+
*/
|
|
178
|
+
update(options?: StatTileOptions): this;
|
|
179
|
+
/**
|
|
180
|
+
* Reports the tile's own accessible name, which is what assistive technology announces.
|
|
181
|
+
* @returns {string} Label, value, and delta, in that order.
|
|
182
|
+
*/
|
|
183
|
+
getAccessibleName(): string;
|
|
184
|
+
/**
|
|
185
|
+
* Aborts listeners and restores an adopted target to the state it was found in.
|
|
186
|
+
* @returns {void}
|
|
187
|
+
*/
|
|
188
|
+
destroy(): void;
|
|
189
|
+
/**
|
|
190
|
+
* Resolves a message through the host translator, falling back to the built-in English text.
|
|
191
|
+
* @param {string} key Message key.
|
|
192
|
+
* @param {...unknown} args Interpolation values.
|
|
193
|
+
* @returns {string}
|
|
194
|
+
*/
|
|
195
|
+
_message(key: string, ...args: unknown[]): string;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Creates a tile that builds its own root: the convenience form of `new StatTile(null, options)`,
|
|
199
|
+
* the way `tooltip()` stands in for `new Tooltip(…)`.
|
|
200
|
+
*
|
|
201
|
+
* It returns the component, not an element, so there is one construction idiom and one click path.
|
|
202
|
+
* Call `.toElement()` for the node to place.
|
|
203
|
+
*
|
|
204
|
+
* @param {StatTileOptions} [opts={}] Tile options.
|
|
205
|
+
* @returns {StatTile} The component, whose root is an `<a>`, a `<button>`, or a `<div>`.
|
|
206
|
+
*/
|
|
207
|
+
export declare function statTile(opts?: StatTileOptions): StatTile;
|
|
208
|
+
/**
|
|
209
|
+
* Formats the metric itself.
|
|
210
|
+
*
|
|
211
|
+
* A string value is the host's own final text and is passed through untouched; an explicit
|
|
212
|
+
* callback outranks that, because a host that supplies one has asked to decide every case.
|
|
213
|
+
*
|
|
214
|
+
* @param {number|string|null|undefined} value The metric.
|
|
215
|
+
* @param {{format?: StatTileFormat, locale?: string, currency?: string|null}} [options={}] Mode,
|
|
216
|
+
* language, and currency.
|
|
217
|
+
* @returns {string} The text to display; empty for a missing value.
|
|
218
|
+
*/
|
|
219
|
+
export declare function formatStatValue(value: number | string | null | undefined, options?: {
|
|
220
|
+
format?: StatTileFormat;
|
|
221
|
+
locale?: string;
|
|
222
|
+
currency?: string | null;
|
|
223
|
+
}): string;
|
|
224
|
+
/**
|
|
225
|
+
* Describes a change without judging it.
|
|
226
|
+
*
|
|
227
|
+
* The direction is read from the sign and nothing else; whether that direction is good news is
|
|
228
|
+
* `deltaKind`'s business, not this function's. The magnitude is formatted from the absolute value
|
|
229
|
+
* and the sign is prepended, because no locale prints a leading `+` on its own.
|
|
230
|
+
*
|
|
231
|
+
* @param {number|string|null|undefined} delta The change.
|
|
232
|
+
* @param {{format?: StatTileFormat, locale?: string, currency?: string|null}} [options={}]
|
|
233
|
+
* Formatting, defaulting to the tile's own.
|
|
234
|
+
* @returns {StatTileDelta|null} The change, or null when there is none to show.
|
|
235
|
+
*/
|
|
236
|
+
export declare function statDelta(delta: number | string | null | undefined, options?: {
|
|
237
|
+
format?: StatTileFormat;
|
|
238
|
+
locale?: string;
|
|
239
|
+
currency?: string | null;
|
|
240
|
+
}): StatTileDelta | null;
|
|
241
|
+
/**
|
|
242
|
+
* Chooses the element a tile must be, from what the tile does.
|
|
243
|
+
*
|
|
244
|
+
* A destination is a link, an action is a button, and a tile that does neither is a plain
|
|
245
|
+
* container. A `<div>` never gets a click handler, and an href that could execute script is not a
|
|
246
|
+
* destination at all — it falls through to whichever shape the remaining options justify.
|
|
247
|
+
*
|
|
248
|
+
* @param {{href?: string|null, clickable?: boolean, onclick?: unknown}} [options={}] The options
|
|
249
|
+
* that carry behaviour.
|
|
250
|
+
* @returns {'a'|'button'|'div'} The tag to render.
|
|
251
|
+
*/
|
|
252
|
+
export declare function statTileTag(options?: {
|
|
253
|
+
href?: string | null;
|
|
254
|
+
clickable?: boolean;
|
|
255
|
+
onclick?: unknown;
|
|
256
|
+
}): 'a' | 'button' | 'div';
|
|
257
|
+
/**
|
|
258
|
+
* Composes the tile's accessible name: label, then value with its caption, then how it changed.
|
|
259
|
+
*
|
|
260
|
+
* The sparkline is decoration and contributes nothing, and the delta arrives already worded —
|
|
261
|
+
* `'up 2'` rather than `'+2'` — because a screen reader should not have to interpret a glyph. The
|
|
262
|
+
* caption is read with the value it qualifies (`'2,184 of 13,184'`), not as a separate clause.
|
|
263
|
+
*
|
|
264
|
+
* @param {StatTileNameParts} [parts={}] The pieces, already formatted and translated.
|
|
265
|
+
* @returns {string} The name, with empty pieces dropped rather than left as stray punctuation.
|
|
266
|
+
*/
|
|
267
|
+
export declare function statTileName(parts?: StatTileNameParts): string;
|
|
268
|
+
/**
|
|
269
|
+
* Projects a series onto the sparkline's user-unit box.
|
|
270
|
+
*
|
|
271
|
+
* A series needs two usable numbers to be a line; a flat series is drawn down the middle rather
|
|
272
|
+
* than along the floor, which would read as zero.
|
|
273
|
+
*
|
|
274
|
+
* @param {unknown[]} values The series, in order. Unusable entries are dropped.
|
|
275
|
+
* @param {{width?: number, height?: number, inset?: number}} [box={}] The target box.
|
|
276
|
+
* @returns {string|null} An SVG `points` list, or null when there is no line to draw.
|
|
277
|
+
*/
|
|
278
|
+
export declare function statTrendPoints(values: unknown[], box?: {
|
|
279
|
+
width?: number;
|
|
280
|
+
height?: number;
|
|
281
|
+
inset?: number;
|
|
282
|
+
}): string | null;
|
|
283
|
+
/**
|
|
284
|
+
* Fired when a linked or clickable tile is activated. A tile with neither an href nor a click
|
|
285
|
+
* handler is a `<div>` and never emits it.
|
|
286
|
+
* @event StatTile#click
|
|
287
|
+
* @type {CustomEvent<{event: MouseEvent}>}
|
|
288
|
+
*/
|
|
@@ -53,6 +53,12 @@ export type TabboxOptions = {
|
|
|
53
53
|
* Keep inactive panel elements mounted.
|
|
54
54
|
*/
|
|
55
55
|
keepAlive?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Accessible name of the tab list — what the tabs switch between
|
|
58
|
+
* ("Record sections"). A tab list needs one whenever the page has more than one, and screen
|
|
59
|
+
* readers announce it on entry.
|
|
60
|
+
*/
|
|
61
|
+
label?: string;
|
|
56
62
|
/**
|
|
57
63
|
* Change callback.
|
|
58
64
|
*/
|
|
@@ -107,6 +113,9 @@ export type TabRecord = {
|
|
|
107
113
|
* the active tab across a full-width rule; `segmented` renders a compact group that reads as one
|
|
108
114
|
* control, for a toolbar or card header.
|
|
109
115
|
* @property {boolean} [keepAlive=true] Keep inactive panel elements mounted.
|
|
116
|
+
* @property {string} [label] Accessible name of the tab list — what the tabs switch between
|
|
117
|
+
* ("Record sections"). A tab list needs one whenever the page has more than one, and screen
|
|
118
|
+
* readers announce it on entry.
|
|
110
119
|
* @property {(event: CustomEvent<{name: string, previous: string|null}>) => void} [onchange] Change callback.
|
|
111
120
|
* @property {(event: CustomEvent<{name: string}>) => void} [onclose] Close callback, fired when the
|
|
112
121
|
* user dismisses a closable tab.
|
|
@@ -236,4 +245,11 @@ export declare class Tabbox extends Component<TabboxOptions> {
|
|
|
236
245
|
_require(name: string): TabRecord;
|
|
237
246
|
/** @param {Element} tab @returns {TabRecord|null} */
|
|
238
247
|
_recordForTab(tab: Element): TabRecord | null;
|
|
248
|
+
/**
|
|
249
|
+
* Resolves a message through the host translator, falling back to the built-in English text.
|
|
250
|
+
* @param {string} key Message key.
|
|
251
|
+
* @param {string} fallback English default.
|
|
252
|
+
* @returns {string}
|
|
253
|
+
*/
|
|
254
|
+
_message(key: string, fallback: string): string;
|
|
239
255
|
}
|