@zeyos/zx 5.5.0 → 5.7.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 +210 -0
- package/README.md +73 -7
- package/bin/zx-css.js +328 -0
- package/dist/types/components/account-menu/account-menu.d.ts +4 -2
- package/dist/types/components/activity-list/activity-list.d.ts +14 -8
- package/dist/types/components/agent-thread/ag-ui.d.ts +340 -0
- package/dist/types/components/agent-thread/agent-thread.d.ts +711 -0
- package/dist/types/components/agent-thread/ui-message-stream.d.ts +401 -0
- package/dist/types/components/app-sidebar/app-sidebar.d.ts +14 -8
- package/dist/types/components/approval-card/approval-card.d.ts +596 -0
- package/dist/types/components/avatar/avatar.d.ts +91 -4
- package/dist/types/components/block-view/block-view.d.ts +205 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +3 -3
- package/dist/types/components/calendar/calendar-model.d.ts +9 -2
- package/dist/types/components/calendar/calendar.d.ts +12 -4
- package/dist/types/components/chart/chart.d.ts +25 -13
- package/dist/types/components/code-editor/code-editor.d.ts +7 -2
- package/dist/types/components/composer/composer.d.ts +938 -0
- package/dist/types/components/composer/queue.d.ts +76 -0
- package/dist/types/components/copy/copy-button.d.ts +6 -4
- package/dist/types/components/copy/copy-input.d.ts +10 -6
- package/dist/types/components/datebox/date-range-box.d.ts +33 -0
- package/dist/types/components/datebox/placeholder.d.ts +7 -0
- package/dist/types/components/dock/dock.d.ts +12 -3
- package/dist/types/components/entity-ref/entity-ref.d.ts +5 -3
- package/dist/types/components/field-upload/field-upload.d.ts +3 -2
- package/dist/types/components/file-item/file-item.d.ts +3 -2
- package/dist/types/components/file-list/file-list.d.ts +14 -8
- package/dist/types/components/filter/filter-model.d.ts +31 -1
- package/dist/types/components/filter/filter.d.ts +20 -2
- package/dist/types/components/finder/finder.d.ts +14 -6
- package/dist/types/components/flag/flag.d.ts +99 -0
- package/dist/types/components/grid/grid.d.ts +1 -1
- package/dist/types/components/kanban-view/kanban-view.d.ts +8 -66
- package/dist/types/components/launcher/launcher.d.ts +2 -0
- package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +3 -2
- package/dist/types/components/number-field/number-field.d.ts +17 -6
- package/dist/types/components/prompt-starters/prompt-starters.d.ts +107 -0
- package/dist/types/components/prose/prose.d.ts +9 -6
- package/dist/types/components/questionnaire/conditions.d.ts +270 -0
- package/dist/types/components/questionnaire/items.d.ts +52 -30
- package/dist/types/components/questionnaire/questionnaire.d.ts +44 -4
- package/dist/types/components/rating/rating.d.ts +5 -3
- package/dist/types/components/run-status/run-status.d.ts +393 -0
- package/dist/types/components/run-trace/run-trace.d.ts +624 -0
- package/dist/types/components/select/country.d.ts +106 -0
- package/dist/types/components/select/field-adapter.d.ts +2 -1
- package/dist/types/components/select/locale.d.ts +102 -0
- package/dist/types/components/select/select.d.ts +41 -2
- package/dist/types/components/slider/slider.d.ts +1 -0
- package/dist/types/components/sort-control/sort-control.d.ts +7 -3
- package/dist/types/components/source-list/source-list.d.ts +179 -0
- package/dist/types/components/split-view/split-view.d.ts +5 -3
- package/dist/types/components/surface/catalog.d.ts +260 -0
- package/dist/types/components/surface/elicit.d.ts +81 -0
- package/dist/types/components/surface/mcp.d.ts +165 -0
- package/dist/types/components/surface/schema.d.ts +314 -0
- package/dist/types/components/surface/stream.d.ts +118 -0
- package/dist/types/components/surface/surface.d.ts +718 -0
- package/dist/types/components/surface/text.d.ts +277 -0
- package/dist/types/components/surface/validate.d.ts +339 -0
- package/dist/types/components/table/table.d.ts +55 -3
- package/dist/types/components/table/window.d.ts +203 -0
- package/dist/types/components/toolbar/toolbar.d.ts +10 -6
- package/dist/types/components/tooltip/tooltip.d.ts +2 -2
- package/dist/types/components/tree/tree.d.ts +20 -13
- package/dist/types/core/component.d.ts +10 -0
- package/dist/types/core/date.d.ts +8 -1
- package/dist/types/core/dom.d.ts +1 -0
- package/dist/types/core/http.d.ts +10 -0
- package/dist/types/core/i18n.d.ts +38 -0
- package/dist/types/core/messages.d.ts +479 -1
- package/dist/types/core/storage.d.ts +7 -2
- package/dist/types/elements/define.d.ts +21 -46
- package/dist/types/elements/definitions.d.ts +147 -0
- package/dist/types/elements/kit.d.ts +7 -0
- package/dist/types/elements/reflect.d.ts +6 -3
- package/dist/types/index.d.ts +18 -1
- package/dist/types/internal/agent-model.d.ts +587 -0
- package/dist/types/internal/date-locale.d.ts +7 -0
- package/dist/types/internal/highlight.d.ts +24 -0
- package/dist/types/internal/json-patch.d.ts +146 -0
- package/dist/types/internal/presence-loop.d.ts +148 -0
- package/dist/types/locales/de.d.ts +13 -0
- package/dist/types/locales/en.d.ts +2 -0
- package/dist/types/locales/index.d.ts +823 -0
- package/dist/types/zeyos/view.d.ts +8 -1
- package/dist/zx-zeyos.esm.js +20505 -18748
- package/dist/zx-zeyos.esm.min.js +5 -5
- package/dist/zx.core.css +1276 -0
- package/dist/zx.core.min.css +1 -0
- package/dist/zx.css +2424 -134
- package/dist/zx.esm.js +46167 -28468
- package/dist/zx.esm.min.js +40 -8
- package/dist/zx.global.js +46167 -28468
- package/dist/zx.global.min.js +40 -8
- package/dist/zx.layered.css +17302 -0
- package/dist/zx.layered.min.css +1 -0
- package/dist/zx.min.css +1 -1
- package/docs/agent-catalog.json +12501 -0
- package/docs/agent-surfaces.md +340 -0
- package/docs/api.json +2057 -166
- package/docs/llms.md +1458 -58
- package/docs/llms.txt +38 -8
- package/package.json +29 -6
- package/src/components/account-menu/account-menu.js +6 -3
- package/src/components/activity-item/activity-item.js +2 -1
- package/src/components/activity-list/activity-list.js +16 -10
- package/src/components/agent-thread/ag-ui.js +1439 -0
- package/src/components/agent-thread/agent-thread.css +417 -0
- package/src/components/agent-thread/agent-thread.js +1670 -0
- package/src/components/agent-thread/ui-message-stream.js +1281 -0
- package/src/components/app-sidebar/app-sidebar.js +18 -8
- package/src/components/approval-card/approval-card.css +289 -0
- package/src/components/approval-card/approval-card.js +1378 -0
- package/src/components/avatar/avatar.css +56 -1
- package/src/components/avatar/avatar.js +148 -26
- package/src/components/block-view/block-view.css +300 -0
- package/src/components/block-view/block-view.js +524 -0
- package/src/components/breadcrumb/breadcrumb.js +8 -5
- package/src/components/calendar/calendar-model.js +8 -2
- package/src/components/calendar/calendar.js +53 -18
- package/src/components/chart/chart.js +54 -23
- package/src/components/code-editor/code-editor.js +45 -8
- package/src/components/code-editor/field-adapter.js +1 -1
- package/src/components/composer/composer.css +482 -0
- package/src/components/composer/composer.js +1815 -0
- package/src/components/composer/queue.js +78 -0
- package/src/components/context-menu/context-menu.js +12 -1
- package/src/components/copy/copy-button.js +9 -7
- package/src/components/copy/copy-input.js +10 -6
- package/src/components/date-picker/date-picker.js +2 -1
- package/src/components/date-picker/date-range-picker.js +8 -7
- package/src/components/datebox/date-range-box.js +3 -9
- package/src/components/datebox/datebox.js +18 -21
- package/src/components/datebox/placeholder.js +18 -0
- package/src/components/dialog/dialog.js +1 -1
- package/src/components/dock/dock.js +34 -13
- package/src/components/entity-ref/entity-ref.js +16 -5
- package/src/components/field-upload/field-upload.js +81 -38
- package/src/components/file-item/file-item.js +70 -40
- package/src/components/file-list/file-list.js +15 -9
- package/src/components/filter/filter-model.js +46 -8
- package/src/components/filter/filter.css +3 -3
- package/src/components/filter/filter.js +29 -10
- package/src/components/filter-panel/filter-panel.js +13 -5
- package/src/components/finder/finder.js +50 -26
- package/src/components/flag/flag.css +40 -0
- package/src/components/flag/flag.js +177 -0
- package/src/components/form/form.js +1 -1
- package/src/components/grid/grid.js +22 -8
- package/src/components/kanban-view/kanban-view.js +51 -81
- package/src/components/launcher/launcher.js +17 -2
- package/src/components/list-toolbar/list-toolbar.js +2 -1
- package/src/components/master-panel/master-panel.js +1 -1
- package/src/components/menu-button/menu-button.js +4 -0
- package/src/components/message/message.js +3 -0
- package/src/components/multi-value-editor/multi-value-editor.js +10 -9
- package/src/components/navigation-bar/navigation-bar.js +3 -3
- package/src/components/number-field/number-field.js +29 -13
- package/src/components/prompt-starters/prompt-starters.css +91 -0
- package/src/components/prompt-starters/prompt-starters.js +206 -0
- package/src/components/prose/prose.js +14 -10
- package/src/components/questionnaire/conditions.js +666 -0
- package/src/components/questionnaire/items.js +150 -41
- package/src/components/questionnaire/questionnaire.js +126 -32
- package/src/components/rating/rating.js +5 -4
- package/src/components/run-status/run-status.css +208 -0
- package/src/components/run-status/run-status.js +782 -0
- package/src/components/run-trace/run-trace.css +443 -0
- package/src/components/run-trace/run-trace.js +1209 -0
- package/src/components/select/country.js +136 -0
- package/src/components/select/field-adapter.js +7 -2
- package/src/components/select/locale.js +219 -0
- package/src/components/select/select.css +20 -22
- package/src/components/select/select.js +94 -12
- package/src/components/sheet/sheet-stack.js +10 -1
- package/src/components/slider/slider.js +7 -2
- package/src/components/sort-control/sort-control.js +15 -5
- package/src/components/source-list/source-list.css +208 -0
- package/src/components/source-list/source-list.js +358 -0
- package/src/components/split-view/split-view.js +5 -3
- package/src/components/surface/catalog.js +1334 -0
- package/src/components/surface/elicit.js +107 -0
- package/src/components/surface/mcp.js +243 -0
- package/src/components/surface/schema.js +644 -0
- package/src/components/surface/stream.js +245 -0
- package/src/components/surface/surface.css +308 -0
- package/src/components/surface/surface.js +2291 -0
- package/src/components/surface/text.js +513 -0
- package/src/components/surface/validate.js +2218 -0
- package/src/components/tabbox/tabbox.js +9 -0
- package/src/components/table/table.css +63 -3
- package/src/components/table/table.js +167 -28
- package/src/components/table/window.js +317 -0
- package/src/components/toolbar/toolbar.js +12 -7
- package/src/components/tooltip/tooltip.css +2 -3
- package/src/components/tooltip/tooltip.js +32 -5
- package/src/components/tree/tree.js +53 -23
- package/src/core/component.js +25 -1
- package/src/core/date.js +62 -16
- package/src/core/dom.js +22 -2
- package/src/core/format.js +15 -13
- package/src/core/http.js +29 -20
- package/src/core/i18n.js +83 -10
- package/src/core/keyboard.js +79 -8
- package/src/core/messages.js +519 -2
- package/src/core/overlay-host.js +1 -0
- package/src/core/storage.js +59 -6
- package/src/elements/define.js +178 -130
- package/src/elements/definitions.js +229 -0
- package/src/elements/kit.js +444 -0
- package/src/elements/reflect.js +8 -3
- package/src/index.js +18 -1
- package/src/internal/agent-model.js +488 -0
- package/src/internal/date-locale.js +11 -0
- package/src/internal/highlight.js +104 -0
- package/src/internal/json-patch.js +405 -0
- package/src/internal/presence-loop.js +343 -0
- package/src/locales/de.js +911 -0
- package/src/locales/en.js +2 -0
- package/src/locales/index.js +7 -0
- package/src/zeyos/calendar.js +2 -1
- package/src/zeyos/form.js +2 -1
- package/src/zeyos/launcher.js +7 -6
- package/src/zeyos/module-bar.js +2 -1
- package/src/zeyos/schema.js +37 -23
- package/src/zeyos/select.js +4 -3
- package/src/zeyos/table.js +2 -13
- package/src/zeyos/view.js +57 -17
- package/styles/core.css +11 -0
- package/styles/tokens/semantic.css +1 -0
- package/styles/zeyos.css +2 -0
- package/styles/zx.css +11 -8
- package/styles/zx.layered.css +1 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The queue behind the Composer's queued messages, as pure functions: each takes the queue as it
|
|
3
|
+
* stands and answers with a new one, in the order the messages were added, and never changes what
|
|
4
|
+
* it was given. It knows nothing of messages but their `id`.
|
|
5
|
+
*/
|
|
6
|
+
/** Most messages that wait at once when `queueLimit` names no usable number. */
|
|
7
|
+
export declare const QUEUE_LIMIT = 10;
|
|
8
|
+
/**
|
|
9
|
+
* The limit an option names: a whole number of one or more, anything else `QUEUE_LIMIT`.
|
|
10
|
+
* @param {unknown} value
|
|
11
|
+
* @returns {number}
|
|
12
|
+
*/
|
|
13
|
+
export declare function queueLimit(value: unknown): number;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the queue has no room for another message.
|
|
16
|
+
* @param {readonly {id: string}[]} queue
|
|
17
|
+
* @param {unknown} [limit]
|
|
18
|
+
* @returns {boolean}
|
|
19
|
+
*/
|
|
20
|
+
export declare function isQueueFull(queue: readonly {
|
|
21
|
+
id: string;
|
|
22
|
+
}[], limit?: unknown): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Adds a message at the end, as far as the limit allows.
|
|
25
|
+
* @template {{id: string}} T
|
|
26
|
+
* @param {readonly T[]} queue
|
|
27
|
+
* @param {T} entry
|
|
28
|
+
* @param {unknown} [limit]
|
|
29
|
+
* @returns {{queue: T[], item: T|null}} The new queue, and the message added: null when the queue
|
|
30
|
+
* was full and stays as it was.
|
|
31
|
+
*/
|
|
32
|
+
export declare function addToQueue<T extends {
|
|
33
|
+
id: string;
|
|
34
|
+
}>(queue: readonly T[], entry: T, limit?: unknown): {
|
|
35
|
+
queue: T[];
|
|
36
|
+
item: T | null;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Takes one message out, wherever it stands.
|
|
40
|
+
* @template {{id: string}} T
|
|
41
|
+
* @param {readonly T[]} queue
|
|
42
|
+
* @param {string} id
|
|
43
|
+
* @returns {{queue: T[], item: T|null}} The new queue, and the message taken: null when no message
|
|
44
|
+
* has that id.
|
|
45
|
+
*/
|
|
46
|
+
export declare function removeFromQueue<T extends {
|
|
47
|
+
id: string;
|
|
48
|
+
}>(queue: readonly T[], id: string): {
|
|
49
|
+
queue: T[];
|
|
50
|
+
item: T | null;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Takes the message whose turn it is.
|
|
54
|
+
* @template {{id: string}} T
|
|
55
|
+
* @param {readonly T[]} queue
|
|
56
|
+
* @returns {{queue: T[], item: T|null}} The new queue, and the first message: null when there is
|
|
57
|
+
* none.
|
|
58
|
+
*/
|
|
59
|
+
export declare function takeNext<T extends {
|
|
60
|
+
id: string;
|
|
61
|
+
}>(queue: readonly T[]): {
|
|
62
|
+
queue: T[];
|
|
63
|
+
item: T | null;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Takes every message out.
|
|
67
|
+
* @template {{id: string}} T
|
|
68
|
+
* @param {readonly T[]} queue
|
|
69
|
+
* @returns {{queue: T[], items: T[]}} The empty queue, and the messages taken, in order.
|
|
70
|
+
*/
|
|
71
|
+
export declare function emptyQueue<T extends {
|
|
72
|
+
id: string;
|
|
73
|
+
}>(queue: readonly T[]): {
|
|
74
|
+
queue: T[];
|
|
75
|
+
items: T[];
|
|
76
|
+
};
|
|
@@ -9,13 +9,15 @@ export type CopyButtonOptions = {
|
|
|
9
9
|
*/
|
|
10
10
|
label?: string;
|
|
11
11
|
/**
|
|
12
|
-
* Accessible name, and the native tooltip on the icon-only form
|
|
12
|
+
* Accessible name, and the native tooltip on the icon-only form; by
|
|
13
|
+
* default the `copy.copy` message ("Copy"). Null gives none.
|
|
13
14
|
*/
|
|
14
|
-
title?: string;
|
|
15
|
+
title?: string | null;
|
|
15
16
|
/**
|
|
16
|
-
* Confirmation announced and shown after a copy
|
|
17
|
+
* Confirmation announced and shown after a copy; by default the
|
|
18
|
+
* `copy.copied` message ("Copied"). Null says nothing.
|
|
17
19
|
*/
|
|
18
|
-
feedback?: string;
|
|
20
|
+
feedback?: string | null;
|
|
19
21
|
/**
|
|
20
22
|
* Milliseconds the confirmation stays.
|
|
21
23
|
*/
|
|
@@ -13,13 +13,15 @@ export type CopyInputOptions = {
|
|
|
13
13
|
*/
|
|
14
14
|
hideLabel?: boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Confirmation shown after a copy.
|
|
16
|
+
* Confirmation shown after a copy, by default the `copy.copied`
|
|
17
|
+
* message ("Copied"). Null says nothing.
|
|
17
18
|
*/
|
|
18
|
-
feedback?: string;
|
|
19
|
+
feedback?: string | null;
|
|
19
20
|
/**
|
|
20
|
-
* Accessible name of the copy button
|
|
21
|
+
* Accessible name of the copy button, by default the
|
|
22
|
+
* `copy.copy` message ("Copy"). Null gives none.
|
|
21
23
|
*/
|
|
22
|
-
buttonTitle?: string;
|
|
24
|
+
buttonTitle?: string | null;
|
|
23
25
|
/**
|
|
24
26
|
* Control size.
|
|
25
27
|
*/
|
|
@@ -37,8 +39,10 @@ export type CopyInputOptions = {
|
|
|
37
39
|
* @property {string} [value=''] Text shown and copied.
|
|
38
40
|
* @property {string} [label=''] Visible label above the box.
|
|
39
41
|
* @property {boolean} [hideLabel=false] Whether the label is kept for assistive technology only.
|
|
40
|
-
* @property {string} [feedback
|
|
41
|
-
*
|
|
42
|
+
* @property {string|null} [feedback] Confirmation shown after a copy, by default the `copy.copied`
|
|
43
|
+
* message ("Copied"). Null says nothing.
|
|
44
|
+
* @property {string|null} [buttonTitle] Accessible name of the copy button, by default the
|
|
45
|
+
* `copy.copy` message ("Copy"). Null gives none.
|
|
42
46
|
* @property {'md'|'sm'} [size='md'] Control size.
|
|
43
47
|
* @property {(event: CustomEvent<{value: string, copied: boolean}>) => void} [oncopy] Copy listener.
|
|
44
48
|
*/
|
|
@@ -99,6 +99,39 @@ export type DateRangeBoxSetOptions = {
|
|
|
99
99
|
silent?: boolean;
|
|
100
100
|
};
|
|
101
101
|
export type DateRangeBoxUnit = 'date' | 'seconds';
|
|
102
|
+
/** @typedef {import('../date-picker/date-range-picker.js').DateRange} DateRange */
|
|
103
|
+
/** @typedef {import('../date-picker/date-range-picker.js').DateRangePreset} DateRangePreset */
|
|
104
|
+
/** @typedef {{start: number|null, end: number|null}} DateRangeSeconds */
|
|
105
|
+
/** @typedef {Date|number|string|null} DateRangeInput */
|
|
106
|
+
/**
|
|
107
|
+
* @typedef {Object} DateRangeBoxOptions
|
|
108
|
+
* @property {Date|number|string|null} [start=null] Initial start: Date, Unix seconds, or formatted text.
|
|
109
|
+
* @property {Date|number|string|null} [end=null] Initial end: Date, Unix seconds, or formatted text.
|
|
110
|
+
* @property {string} [format='%d.%m.%Y'] Kernel date format the reader types for both endpoints,
|
|
111
|
+
* shown while the field has focus. Numeric tokens only, since it is parsed.
|
|
112
|
+
* @property {string|null} [displayFormat=null] Format both endpoints are shown in while the field
|
|
113
|
+
* does not have focus. It is never parsed, so it may use any `formatDate()` token, month and
|
|
114
|
+
* weekday names included. Null shows `format`.
|
|
115
|
+
* @property {string} [separator=' – '] Text placed between the two formatted dates.
|
|
116
|
+
* @property {string|null} [placeholder=null] Input placeholder; null derives one from the format.
|
|
117
|
+
* @property {boolean} [clearable=true] Show a clear button while a range is present and the box is
|
|
118
|
+
* enabled; without it the input keeps no room for one.
|
|
119
|
+
* @property {Date|null} [min=null] Earliest selectable local calendar day.
|
|
120
|
+
* @property {Date|null} [max=null] Latest selectable local calendar day.
|
|
121
|
+
* @property {number} [months=2] Month panels in the popover; narrow ones show only the first.
|
|
122
|
+
* @property {number} [weekStart=1] First weekday, from 0 (Sunday) through 6 (Saturday).
|
|
123
|
+
* @property {boolean} [showWeekNumbers=false] Show ISO week numbers.
|
|
124
|
+
* @property {number} [minNights=0] Smallest number of nights a complete range may span.
|
|
125
|
+
* @property {number|null} [maxNights=null] Largest number of nights a complete range may span.
|
|
126
|
+
* @property {DateRangePreset[]|boolean} [presets=[]] Preset buttons, or `true` for the built-in set.
|
|
127
|
+
* @property {boolean} [disabled=false] Disable all controls.
|
|
128
|
+
* @property {(event: CustomEvent<DateRange>) => void} [onchange] Change listener.
|
|
129
|
+
* @property {(event: CustomEvent<{text: string}>) => void} [oninvalid] Invalid-input listener.
|
|
130
|
+
* @property {(event: CustomEvent<Record<string, never>>) => void} [onopen] Open listener.
|
|
131
|
+
* @property {(event: CustomEvent<Record<string, never>>) => void} [onclose] Close listener.
|
|
132
|
+
*/
|
|
133
|
+
/** @typedef {{silent?: boolean}} DateRangeBoxSetOptions */
|
|
134
|
+
/** @typedef {'date'|'seconds'} DateRangeBoxUnit */
|
|
102
135
|
/**
|
|
103
136
|
* Parses `"<start><separator><end>"` into a range. A lone date is read as a one-day range, and a
|
|
104
137
|
* trailing separator as a start-only range, so a half-typed value is not thrown away.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What each numeric format token reads as in a date field's placeholder: `%Y` is `YYYY` in English
|
|
3
|
+
* and `JJJJ` in German. Datebox and DateRangeBox each replace the tokens their format allows.
|
|
4
|
+
* @param {(key: string) => string} message Resolves a message key for the field.
|
|
5
|
+
* @returns {Record<string, string>} Placeholder text by format token.
|
|
6
|
+
*/
|
|
7
|
+
export declare function placeholderTokens(message: (key: string) => string): Record<string, string>;
|
|
@@ -115,9 +115,10 @@ export type DockOptions = {
|
|
|
115
115
|
*/
|
|
116
116
|
storageKey?: string | null;
|
|
117
117
|
/**
|
|
118
|
-
* Accessible name given to every divider
|
|
118
|
+
* Accessible name given to every divider; null reads the
|
|
119
|
+
* `dock.resize` message ("Resize panes").
|
|
119
120
|
*/
|
|
120
|
-
label?: string;
|
|
121
|
+
label?: string | null;
|
|
121
122
|
/**
|
|
122
123
|
* Collapse listener.
|
|
123
124
|
*/
|
|
@@ -197,7 +198,8 @@ export type DockOptions = {
|
|
|
197
198
|
* front.
|
|
198
199
|
* @property {string|null} [storageKey=null] Key under which sizes, collapsed panes, and active
|
|
199
200
|
* tabs are remembered. Storage failures degrade to memory rather than throwing.
|
|
200
|
-
* @property {string} [label=
|
|
201
|
+
* @property {string|null} [label=null] Accessible name given to every divider; null reads the
|
|
202
|
+
* `dock.resize` message ("Resize panes").
|
|
201
203
|
* @property {(event: CustomEvent<{name: string}>) => void} [oncollapse] Collapse listener.
|
|
202
204
|
* @property {(event: CustomEvent<{name: string}>) => void} [onexpand] Expand listener.
|
|
203
205
|
* @property {(event: CustomEvent<{name: string, size: number}>) => void} [onresize] Resize listener.
|
|
@@ -419,6 +421,13 @@ export declare class Dock extends Component<DockOptions> {
|
|
|
419
421
|
* @returns {this}
|
|
420
422
|
*/
|
|
421
423
|
release(sheet: any): this;
|
|
424
|
+
/**
|
|
425
|
+
* Removes adoption-only subscriptions and styling before returning a surviving sheet.
|
|
426
|
+
* @param {Record<string, any>} record Adopted sheet record.
|
|
427
|
+
* @param {boolean} [rehost=true] Whether the sheet is still alive and can be floated.
|
|
428
|
+
* @returns {void}
|
|
429
|
+
*/
|
|
430
|
+
_releaseSheet(record: Record<string, any>, rehost?: boolean): void;
|
|
422
431
|
/**
|
|
423
432
|
* Drops a sheet that destroyed itself while adopted, without re-hosting a dead element.
|
|
424
433
|
* @param {Object} sheet Sheet being destroyed.
|
|
@@ -123,9 +123,10 @@ export type EntityRefOptions = {
|
|
|
123
123
|
*/
|
|
124
124
|
wrap?: boolean;
|
|
125
125
|
/**
|
|
126
|
-
* Accessible name for secondary actions
|
|
126
|
+
* Accessible name for secondary actions; null reads the
|
|
127
|
+
* `entityRef.actions` message ("Entity actions").
|
|
127
128
|
*/
|
|
128
|
-
actionsLabel?: string;
|
|
129
|
+
actionsLabel?: string | null;
|
|
129
130
|
/**
|
|
130
131
|
* Preventable primary-link listener.
|
|
131
132
|
*/
|
|
@@ -232,7 +233,8 @@ export type EntityRefState = {
|
|
|
232
233
|
* @property {EntityRefActionEntry[]} [actions=[]] Secondary controls; element actions keep their own behavior.
|
|
233
234
|
* @property {'sm'|'md'|'lg'} [size='md'] Size of the icon and the identity text.
|
|
234
235
|
* @property {boolean} [wrap=false] Whether long identity text may wrap instead of truncating.
|
|
235
|
-
* @property {string} [actionsLabel=
|
|
236
|
+
* @property {string|null} [actionsLabel=null] Accessible name for secondary actions; null reads the
|
|
237
|
+
* `entityRef.actions` message ("Entity actions").
|
|
236
238
|
* @property {(event: CustomEvent<{id: unknown, entity: Readonly<EntityRefState>, href: string, event: MouseEvent}>) => void} [onactivate]
|
|
237
239
|
* Preventable primary-link listener.
|
|
238
240
|
* @property {(event: CustomEvent<{id: string, action: Readonly<EntityRefAction>, entity: Readonly<EntityRefState>, event: MouseEvent}>) => void} [onaction]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from '../../core/component.js';
|
|
2
|
+
import { Http } from '../../core/http.js';
|
|
2
3
|
export type UploadTransport = {
|
|
3
4
|
/**
|
|
4
5
|
* Upload method used by stubs.
|
|
@@ -202,8 +203,8 @@ export declare class FieldUpload extends Component<FieldUploadOptions> {
|
|
|
202
203
|
_handleDragOver(event: DragEvent): void;
|
|
203
204
|
/** @returns {Promise<unknown>} */
|
|
204
205
|
_uploadInjected(): Promise<unknown>;
|
|
205
|
-
/** @returns {Promise<unknown>} */
|
|
206
|
-
_uploadXhr(): Promise<unknown>;
|
|
206
|
+
/** @param {Http|null} [http=null] Optional client defaults. @returns {Promise<unknown>} */
|
|
207
|
+
_uploadXhr(http?: Http | null): Promise<unknown>;
|
|
207
208
|
/** @param {number} percent @returns {void} */
|
|
208
209
|
_setProgress(percent: number): void;
|
|
209
210
|
/** @returns {void} */
|
|
@@ -75,9 +75,10 @@ export type FileItemOptions = {
|
|
|
75
75
|
*/
|
|
76
76
|
wrap?: boolean;
|
|
77
77
|
/**
|
|
78
|
-
* Accessible name for secondary actions
|
|
78
|
+
* Accessible name for secondary actions; null reads the
|
|
79
|
+
* `fileItem.actions` message ("File actions").
|
|
79
80
|
*/
|
|
80
|
-
actionsLabel?: string;
|
|
81
|
+
actionsLabel?: string | null;
|
|
81
82
|
/**
|
|
82
83
|
* Locale passed to `formatFileSize`.
|
|
83
84
|
*/
|
|
@@ -8,9 +8,10 @@ export type FileListOptions = {
|
|
|
8
8
|
*/
|
|
9
9
|
items?: FileItemOptions[];
|
|
10
10
|
/**
|
|
11
|
-
* Accessible collection name.
|
|
11
|
+
* Accessible collection name; null reads the `fileList.label`
|
|
12
|
+
* message ("Files").
|
|
12
13
|
*/
|
|
13
|
-
label?: string;
|
|
14
|
+
label?: string | null;
|
|
14
15
|
/**
|
|
15
16
|
* Whether initial or incremental files are loading.
|
|
16
17
|
*/
|
|
@@ -20,11 +21,13 @@ export type FileListOptions = {
|
|
|
20
21
|
*/
|
|
21
22
|
loadingCount?: number;
|
|
22
23
|
/**
|
|
23
|
-
* Loading status text.
|
|
24
|
+
* Loading status text, by default the `fileList.loading`
|
|
25
|
+
* message ("Loading files"). Null shows none.
|
|
24
26
|
*/
|
|
25
|
-
loadingText?: string;
|
|
27
|
+
loadingText?: string | null;
|
|
26
28
|
/**
|
|
27
|
-
* Empty-state content
|
|
29
|
+
* Empty-state content, by default the
|
|
30
|
+
* `fileList.empty` message ("No files"). Null shows none.
|
|
28
31
|
*/
|
|
29
32
|
emptyText?: string | number | Node | Component | null;
|
|
30
33
|
/**
|
|
@@ -60,11 +63,14 @@ export type FileListOptions = {
|
|
|
60
63
|
/**
|
|
61
64
|
* @typedef {Object} FileListOptions
|
|
62
65
|
* @property {FileItemOptions[]} [items=[]] Initial files in host-supplied order.
|
|
63
|
-
* @property {string} [label=
|
|
66
|
+
* @property {string|null} [label=null] Accessible collection name; null reads the `fileList.label`
|
|
67
|
+
* message ("Files").
|
|
64
68
|
* @property {boolean} [loading=false] Whether initial or incremental files are loading.
|
|
65
69
|
* @property {number} [loadingCount=3] Placeholder rows shown for an empty loading list.
|
|
66
|
-
* @property {string} [loadingText
|
|
67
|
-
*
|
|
70
|
+
* @property {string|null} [loadingText] Loading status text, by default the `fileList.loading`
|
|
71
|
+
* message ("Loading files"). Null shows none.
|
|
72
|
+
* @property {string|number|Node|Component|null} [emptyText] Empty-state content, by default the
|
|
73
|
+
* `fileList.empty` message ("No files"). Null shows none.
|
|
68
74
|
* @property {(event: CustomEvent<{id: unknown, index: number, file: Readonly<FileItemState>, href: string, event: MouseEvent}>) => void} [onactivate]
|
|
69
75
|
* Preventable native-file-link listener.
|
|
70
76
|
* @property {(event: CustomEvent<{id: string, fileId: unknown, index: number, action: object, file: Readonly<FileItemState>, event: MouseEvent}>) => void} [onaction]
|
|
@@ -37,6 +37,7 @@ export type FilterValidationError = {
|
|
|
37
37
|
code: string;
|
|
38
38
|
message: string;
|
|
39
39
|
};
|
|
40
|
+
export type FilterText = (key: string, ...args: unknown[]) => string;
|
|
40
41
|
/** @typedef {null|boolean|number|string|FilterJson[]|{[key:string]: FilterJson}} FilterJson */
|
|
41
42
|
/** @typedef {{kind:'condition', id:string, field:string, operator:string, value:FilterJson}} FilterCondition */
|
|
42
43
|
/** @typedef {{kind:'group', id:string, logic:'and'|'or', children:FilterNode[]}} FilterGroup */
|
|
@@ -45,8 +46,25 @@ export type FilterValidationError = {
|
|
|
45
46
|
/** @typedef {{id:string, label:string, arity:'none'|'single'|'pair'|'many', types:string[]}} FilterOperator */
|
|
46
47
|
/** @typedef {{id:string, label:string, type:string, operators?:string[], defaultOperator?:string}} FilterField */
|
|
47
48
|
/** @typedef {{nodeId:string, code:string, message:string}} FilterValidationError */
|
|
48
|
-
/**
|
|
49
|
+
/** @typedef {(key:string, ...args:unknown[]) => string} FilterText Resolves a message; a component passes its `msg()`. */
|
|
50
|
+
/**
|
|
51
|
+
* Core operators are application-neutral IDs; an adapter maps them to executable query syntax. The
|
|
52
|
+
* labels here are English data that hosts read. What `Filter` shows for a built-in is the
|
|
53
|
+
* `filter.op.<id>` message, see {@link filterOperatorLabel}.
|
|
54
|
+
*/
|
|
49
55
|
export declare const filterOperators: readonly FilterOperator[];
|
|
56
|
+
/** The catalogue, for code that runs without a component. @type {FilterText} */
|
|
57
|
+
export declare const filterText: FilterText;
|
|
58
|
+
/**
|
|
59
|
+
* The name to show for an operator. A built-in reads its `filter.op.<id>` message. A host-supplied
|
|
60
|
+
* operator keeps its own label, or its lack of one, unless that label is the built-in text for its
|
|
61
|
+
* ID: labels are compared rather than objects so that `operators: filterOperators`, or a spread of a
|
|
62
|
+
* built-in that changes something else, translates too.
|
|
63
|
+
* @param {FilterOperator} operator
|
|
64
|
+
* @param {FilterText} [text=filterText]
|
|
65
|
+
* @returns {string}
|
|
66
|
+
*/
|
|
67
|
+
export declare function filterOperatorLabel(operator: FilterOperator, text?: FilterText): string;
|
|
50
68
|
/** @returns {FilterAst} */
|
|
51
69
|
export declare function emptyFilterAst(): FilterAst;
|
|
52
70
|
/** @param {Partial<FilterCondition>} [initial={}] @returns {FilterCondition} */
|
|
@@ -85,3 +103,15 @@ export declare function validateFilterAst(ast: FilterAst, fields: FilterField[],
|
|
|
85
103
|
valid: boolean;
|
|
86
104
|
errors: FilterValidationError[];
|
|
87
105
|
};
|
|
106
|
+
/**
|
|
107
|
+
* {@link validateFilterAst} with the messages of a component, not exported from the package.
|
|
108
|
+
* @param {FilterAst} ast
|
|
109
|
+
* @param {FilterField[]} fields
|
|
110
|
+
* @param {FilterOperator[]} operators
|
|
111
|
+
* @param {FilterText} [text=filterText] Resolves the messages of the errors.
|
|
112
|
+
* @returns {{valid:boolean, errors:FilterValidationError[]}}
|
|
113
|
+
*/
|
|
114
|
+
export declare function checkFilterAst(ast: FilterAst, fields: FilterField[], operators: FilterOperator[], text?: FilterText): {
|
|
115
|
+
valid: boolean;
|
|
116
|
+
errors: FilterValidationError[];
|
|
117
|
+
};
|
|
@@ -196,6 +196,21 @@ export type FilterValueMessages = {
|
|
|
196
196
|
};
|
|
197
197
|
/** Units a relative date span may be counted in, in the order the editor offers them. */
|
|
198
198
|
export declare const RELATIVE_DATE_UNITS: readonly string[];
|
|
199
|
+
/** What an empty picker asks for, by the part of the condition it sets. */
|
|
200
|
+
declare const PART_PROMPTS: Readonly<{
|
|
201
|
+
field: {
|
|
202
|
+
key: string;
|
|
203
|
+
fallback: string;
|
|
204
|
+
};
|
|
205
|
+
operator: {
|
|
206
|
+
key: string;
|
|
207
|
+
fallback: string;
|
|
208
|
+
};
|
|
209
|
+
value: {
|
|
210
|
+
key: string;
|
|
211
|
+
fallback: string;
|
|
212
|
+
};
|
|
213
|
+
}>;
|
|
199
214
|
/**
|
|
200
215
|
* Backend-neutral dynamic filter expression editor.
|
|
201
216
|
* @fires Filter#change
|
|
@@ -246,6 +261,8 @@ export declare class Filter extends Component<FilterOptions> {
|
|
|
246
261
|
debounce?: number;
|
|
247
262
|
}[];
|
|
248
263
|
_operators: any[];
|
|
264
|
+
/** @type {import('./filter-model.js').FilterText} */
|
|
265
|
+
_text: import('./filter-model.js').FilterText;
|
|
249
266
|
_readonly: boolean;
|
|
250
267
|
_disabled: boolean;
|
|
251
268
|
_async: Map<any, any>;
|
|
@@ -336,14 +353,14 @@ export declare class Filter extends Component<FilterOptions> {
|
|
|
336
353
|
* @param {unknown} value Selected value.
|
|
337
354
|
* @param {string} label Accessible name.
|
|
338
355
|
* @param {string} nodeId Condition ID.
|
|
339
|
-
* @param {
|
|
356
|
+
* @param {keyof typeof PART_PROMPTS} part Focus target name, which also picks the placeholder.
|
|
340
357
|
* @param {(value:unknown)=>void} changed Selection handler.
|
|
341
358
|
* @returns {HTMLElement} Picker root.
|
|
342
359
|
*/
|
|
343
360
|
_searchSelect(items: Array<{
|
|
344
361
|
value: unknown;
|
|
345
362
|
label: string;
|
|
346
|
-
}>, value: unknown, label: string, nodeId: string, part:
|
|
363
|
+
}>, value: unknown, label: string, nodeId: string, part: keyof typeof PART_PROMPTS, changed: (value: unknown) => void): HTMLElement;
|
|
347
364
|
/**
|
|
348
365
|
* Owns a themed multi-value picker for a many-valued operator on a field with static choices:
|
|
349
366
|
* the chosen values as removable tags, the rest in a searchable list. It writes the value without
|
|
@@ -508,3 +525,4 @@ export declare function withFilterMessage(msg: Record<string, any> | null | unde
|
|
|
508
525
|
* @returns {Record<string,string>|null} Actionable validation error, or null.
|
|
509
526
|
*/
|
|
510
527
|
export declare function rootLogicError(value: FilterAst, logic: 'and' | 'or' | null): Record<string, string> | null;
|
|
528
|
+
export {};
|
|
@@ -50,9 +50,10 @@ export type FinderOptions = {
|
|
|
50
50
|
*/
|
|
51
51
|
renderItem?: ((node: TreeNode) => Node | string) | null;
|
|
52
52
|
/**
|
|
53
|
-
* Text shown in an empty column.
|
|
53
|
+
* Text shown in an empty column, by default the `finder.noItems`
|
|
54
|
+
* message ("Empty"). Null shows none.
|
|
54
55
|
*/
|
|
55
|
-
emptyText?: string;
|
|
56
|
+
emptyText?: string | null;
|
|
56
57
|
/**
|
|
57
58
|
* Localized messages.
|
|
58
59
|
*/
|
|
@@ -96,7 +97,8 @@ export type FinderOptions = {
|
|
|
96
97
|
* @property {number|string|null} [height=320] Component height in pixels or any CSS length.
|
|
97
98
|
* @property {boolean} [icons=true] Whether to render folder and file icons.
|
|
98
99
|
* @property {((node: TreeNode) => Node|string)|null} [renderItem=null] Row renderer.
|
|
99
|
-
* @property {string} [emptyText
|
|
100
|
+
* @property {string|null} [emptyText] Text shown in an empty column, by default the `finder.noItems`
|
|
101
|
+
* message ("Empty"). Null shows none.
|
|
100
102
|
* @property {Record<string, string>|Record<string, Record<string, string>>} [msg] Localized messages.
|
|
101
103
|
* @property {(event: CustomEvent<{path: unknown[], nodes: TreeNode[], node: TreeNode|null}>) => void} [onchange] Path listener.
|
|
102
104
|
* @property {(event: CustomEvent<{node: TreeNode, id: unknown}>) => void} [onactivate] Activation listener.
|
|
@@ -123,8 +125,13 @@ export declare class Finder extends Component<FinderOptions> {
|
|
|
123
125
|
owner: TreeNode | null;
|
|
124
126
|
}[];
|
|
125
127
|
_activeColumn: any;
|
|
126
|
-
/** @type {Map<unknown, Promise<
|
|
127
|
-
_loading: Map<unknown, Promise<
|
|
128
|
+
/** @type {Map<unknown, Promise<{children?: TreeNode[], error?: Error}>>} In-flight lazy loads, keyed by node ID. */
|
|
129
|
+
_loading: Map<unknown, Promise<{
|
|
130
|
+
children?: TreeNode[];
|
|
131
|
+
error?: Error;
|
|
132
|
+
}>>;
|
|
133
|
+
_loadGeneration: number;
|
|
134
|
+
_destroyed: boolean;
|
|
128
135
|
_pathSequence: any;
|
|
129
136
|
_createdRoot: boolean;
|
|
130
137
|
_snapshot: import("../../core/dom.js").TargetSnapshot;
|
|
@@ -226,9 +233,10 @@ export declare class Finder extends Component<FinderOptions> {
|
|
|
226
233
|
/**
|
|
227
234
|
* Loads a branch's children through the configured loader, once.
|
|
228
235
|
* @param {TreeNode} node Branch node.
|
|
236
|
+
* @param {number} sequence Navigation that requested the children.
|
|
229
237
|
* @returns {Promise<void>}
|
|
230
238
|
*/
|
|
231
|
-
_ensureChildren(node: TreeNode): Promise<void>;
|
|
239
|
+
_ensureChildren(node: TreeNode, sequence: number): Promise<void>;
|
|
232
240
|
/** @param {number} column @returns {TreeNode[]} */
|
|
233
241
|
_columnNodes(column: number): TreeNode[];
|
|
234
242
|
/** @param {Element} row @returns {{column: number, index: number}} */
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export type FlagKind = 'auto' | 'emoji' | 'code' | 'image';
|
|
2
|
+
export type FlagOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Drawing; `src` implies `image`.
|
|
5
|
+
*/
|
|
6
|
+
kind?: FlagKind;
|
|
7
|
+
/**
|
|
8
|
+
* Image URL. `{code}` in it is replaced by the lower-case region
|
|
9
|
+
* code and `{CODE}` by the upper-case one, so `'/flags/{code}.svg'` serves a whole flag set.
|
|
10
|
+
*/
|
|
11
|
+
src?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Text of the code chip, by default the region code. A chip
|
|
14
|
+
* also stands in for a flag when there is no valid region, as for a language without a country.
|
|
15
|
+
*/
|
|
16
|
+
text?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Accessible name. Without one the flag is decorative
|
|
19
|
+
* (`aria-hidden`) and must sit beside text that names the country or language.
|
|
20
|
+
*/
|
|
21
|
+
label?: string | null;
|
|
22
|
+
};
|
|
23
|
+
export type FlagMode = 'auto' | 'emoji' | 'code' | 'none' | ((region: string | null, item: Record<string, any>) => Node | string | null);
|
|
24
|
+
/**
|
|
25
|
+
* How a flag is drawn: `emoji` is the platform's flag glyph, `code` a small chip carrying the code
|
|
26
|
+
* as text, `image` an `<img>` from a URL the application supplies, and `auto` the emoji where the
|
|
27
|
+
* platform draws flag glyphs and the chip where it does not.
|
|
28
|
+
* @typedef {'auto'|'emoji'|'code'|'image'} FlagKind
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* @typedef {Object} FlagOptions
|
|
32
|
+
* @property {FlagKind} [kind='auto'] Drawing; `src` implies `image`.
|
|
33
|
+
* @property {string|null} [src=null] Image URL. `{code}` in it is replaced by the lower-case region
|
|
34
|
+
* code and `{CODE}` by the upper-case one, so `'/flags/{code}.svg'` serves a whole flag set.
|
|
35
|
+
* @property {string|null} [text=null] Text of the code chip, by default the region code. A chip
|
|
36
|
+
* also stands in for a flag when there is no valid region, as for a language without a country.
|
|
37
|
+
* @property {string|null} [label=null] Accessible name. Without one the flag is decorative
|
|
38
|
+
* (`aria-hidden`) and must sit beside text that names the country or language.
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* What a picker draws in front of each choice: a {@link FlagKind} other than `image`, `none` for
|
|
42
|
+
* nothing, or a function returning the content itself.
|
|
43
|
+
* @typedef {'auto'|'emoji'|'code'|'none'|((region: string|null, item: Record<string, any>) => Node|string|null)} FlagMode
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Every officially assigned ISO 3166-1 alpha-2 code, and `XK` (Kosovo), which is user-assigned but
|
|
47
|
+
* in common use, in alphabetical order. `Select.country()` lists these when given no `countries`.
|
|
48
|
+
* @type {ReadonlyArray<string>}
|
|
49
|
+
*/
|
|
50
|
+
export declare const COUNTRY_CODES: ReadonlyArray<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Settles a region code: two ASCII letters, upper-cased. Anything else — a numeric UN M.49 region
|
|
53
|
+
* such as `419`, an empty value — is not a flag and reads as null.
|
|
54
|
+
* @param {unknown} code Candidate region code.
|
|
55
|
+
* @returns {string|null}
|
|
56
|
+
*/
|
|
57
|
+
export declare function normalizeRegion(code: unknown): string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Spells a region as its flag emoji: the pair of regional indicator symbols the platform's emoji
|
|
60
|
+
* font draws as a flag (`'DE'` → 🇩🇪). Where the font has no flags the pair shows as two letters.
|
|
61
|
+
* @param {unknown} code ISO 3166-1 alpha-2 region code.
|
|
62
|
+
* @returns {string} The emoji, or `''` when the code is not two letters.
|
|
63
|
+
*/
|
|
64
|
+
export declare function flagEmoji(code: unknown): string;
|
|
65
|
+
/**
|
|
66
|
+
* Reports whether this platform draws flag emoji as flags. Windows, for one, draws the regional
|
|
67
|
+
* indicators as plain letters. The test draws a flag into a small canvas and looks for colour,
|
|
68
|
+
* which costs a little each call, so a picker asks once and keeps the answer.
|
|
69
|
+
* @param {Document|null} [doc=globalThis.document] Document to test in.
|
|
70
|
+
* @returns {boolean} False without a document or a 2D canvas, as in Node.
|
|
71
|
+
*/
|
|
72
|
+
export declare function supportsFlagEmoji(doc?: Document | null): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Fills a flag URL template: `{code}` becomes the lower-case region code, `{CODE}` the upper-case.
|
|
75
|
+
* @param {string} template URL template, such as `'/flags/{code}.svg'`.
|
|
76
|
+
* @param {string} region Two-letter region code.
|
|
77
|
+
* @returns {string}
|
|
78
|
+
*/
|
|
79
|
+
export declare function flagSource(template: string, region: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* Draws a country flag, for a picker row, a table cell, or a profile — so a country reads the same
|
|
82
|
+
* wherever it appears. The flag is decorative unless `label` is given: put the country's name
|
|
83
|
+
* beside it.
|
|
84
|
+
*
|
|
85
|
+
* Zx ships no flag artwork. The default is the platform's flag emoji, and a code chip where the
|
|
86
|
+
* platform has none; pass `src` to draw from any flag set the application serves.
|
|
87
|
+
*
|
|
88
|
+
* @param {string|null|undefined} code ISO 3166-1 alpha-2 region code (`'DE'`, `'at'`).
|
|
89
|
+
* @param {FlagOptions} [options={}] Drawing and accessible-name options.
|
|
90
|
+
* @returns {HTMLSpanElement} A `.zx-flag` element whose `data-kind` says how it was drawn.
|
|
91
|
+
*/
|
|
92
|
+
export declare function flag(code: string | null | undefined, options?: FlagOptions): HTMLSpanElement;
|
|
93
|
+
/**
|
|
94
|
+
* Builds the function a picker draws its flags with, resolving `auto` once rather than per row.
|
|
95
|
+
* @param {FlagMode} mode What to draw.
|
|
96
|
+
* @param {string|null} template Flag URL template; wins over the emoji and chip modes.
|
|
97
|
+
* @returns {(region: string|null, text: string, item: Record<string, any>) => Node|string|null}
|
|
98
|
+
*/
|
|
99
|
+
export declare function flagRenderer(mode: FlagMode, template: string | null): (region: string | null, text: string, item: Record<string, any>) => Node | string | null;
|
|
@@ -162,7 +162,7 @@ export declare function isBillingLine(row: BillingRow, fields?: BillingFields):
|
|
|
162
162
|
* @param {{units: unknown, currencies: unknown, currency: string, locale?: string, decimals: number, columnOverrides: Record<string, object>}} options Formatting/editor options.
|
|
163
163
|
* @returns {import('../table/table.js').TableColumn[]}
|
|
164
164
|
*/
|
|
165
|
-
export declare function billingColumns(fields: BillingFields,
|
|
165
|
+
export declare function billingColumns(fields: BillingFields, options: {
|
|
166
166
|
units: unknown;
|
|
167
167
|
currencies: unknown;
|
|
168
168
|
currency: string;
|