@zeyos/zx 5.7.0 → 5.8.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 +330 -0
- package/README.md +47 -9
- package/dist/types/components/activity-item/activity-item.d.ts +14 -3
- package/dist/types/components/agent-avatar/agent-avatar.d.ts +165 -0
- package/dist/types/components/agent-avatar/agent-face.d.ts +93 -0
- package/dist/types/components/agent-thread/ag-ui.d.ts +21 -9
- package/dist/types/components/agent-thread/agent-thread.d.ts +26 -0
- package/dist/types/components/agent-thread/ui-message-stream.d.ts +3 -1
- package/dist/types/components/approval-card/approval-card.d.ts +31 -2
- package/dist/types/components/aurora/aurora.d.ts +31 -5
- package/dist/types/components/calendar/calendar.d.ts +39 -26
- package/dist/types/components/chart/chart.d.ts +250 -20
- package/dist/types/components/chart/color.d.ts +66 -0
- package/dist/types/components/chart/svg-adapter.d.ts +103 -0
- package/dist/types/components/chart/svg-geometry.d.ts +203 -0
- package/dist/types/components/check-button/check-button.d.ts +1 -4
- package/dist/types/components/checklist/checklist.d.ts +48 -5
- package/dist/types/components/code-editor/code-editor.d.ts +55 -1
- package/dist/types/components/composer/composer.d.ts +41 -6
- package/dist/types/components/context-menu/context-menu.d.ts +36 -8
- package/dist/types/components/copy/copy-button.d.ts +6 -0
- package/dist/types/components/copy/copy-input.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +14 -0
- package/dist/types/components/date-picker/time-picker.d.ts +26 -17
- package/dist/types/components/datebox/datebox.d.ts +8 -4
- package/dist/types/components/dialog/dialog.d.ts +15 -4
- package/dist/types/components/empty-state/empty-state.d.ts +10 -1
- package/dist/types/components/field/field.d.ts +4 -2
- package/dist/types/components/form/form.d.ts +2 -1
- package/dist/types/components/kanban-view/kanban-card.d.ts +7 -0
- package/dist/types/components/kanban-view/kanban-view.d.ts +15 -3
- package/dist/types/components/launcher/launcher.d.ts +26 -0
- package/dist/types/components/master-panel/master-panel.d.ts +9 -4
- package/dist/types/components/menu-button/menu-button.d.ts +29 -5
- package/dist/types/components/message/message.d.ts +308 -5
- package/dist/types/components/modal/modal.d.ts +45 -8
- package/dist/types/components/modal/native-dialog.d.ts +40 -0
- package/dist/types/components/module-bar/module-bar.d.ts +9 -2
- package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +5 -4
- package/dist/types/components/number-field/number-field.d.ts +31 -1
- package/dist/types/components/pagination/pagination.d.ts +341 -19
- package/dist/types/components/run-status/run-status.d.ts +26 -0
- package/dist/types/components/run-trace/run-trace.d.ts +10 -6
- package/dist/types/components/search/search.d.ts +16 -4
- package/dist/types/components/select/select.d.ts +19 -1
- package/dist/types/components/sheet/sheet.d.ts +20 -6
- package/dist/types/components/slider/slider.d.ts +2 -1
- package/dist/types/components/stat-tile/stat-tile.d.ts +20 -3
- package/dist/types/components/stepper/stepper.d.ts +17 -4
- package/dist/types/components/surface/catalog.d.ts +61 -17
- package/dist/types/components/surface/surface.d.ts +6 -4
- package/dist/types/components/table/table.d.ts +207 -5
- package/dist/types/components/table/window.d.ts +25 -1
- package/dist/types/components/toggle/toggle.d.ts +38 -6
- package/dist/types/components/tooltip/tooltip.d.ts +5 -4
- package/dist/types/components/tree/tree.d.ts +43 -6
- package/dist/types/components/truncate/truncate.d.ts +4 -2
- package/dist/types/components/value-list/value-list.d.ts +9 -2
- package/dist/types/core/date.d.ts +2 -1
- package/dist/types/core/dom.d.ts +14 -0
- package/dist/types/core/drag-axis.d.ts +10 -5
- package/dist/types/core/export.d.ts +2 -2
- package/dist/types/core/format.d.ts +3 -1
- package/dist/types/core/icons.d.ts +36 -3
- package/dist/types/core/keyboard.d.ts +7 -3
- package/dist/types/core/messages.d.ts +3 -0
- package/dist/types/core/storage.d.ts +4 -3
- package/dist/types/core/util.d.ts +3 -1
- package/dist/types/elements/define.d.ts +5 -2
- package/dist/types/index.d.ts +6 -4
- package/dist/types/internal/agent-model.d.ts +99 -0
- package/dist/types/internal/app-rail.d.ts +37 -2
- package/dist/types/internal/collections.d.ts +18 -0
- package/dist/types/internal/menu-items.d.ts +27 -0
- package/dist/types/internal/overlay-content.d.ts +23 -0
- package/dist/types/internal/presence-loop.d.ts +5 -2
- package/dist/types/locales/index.d.ts +3 -0
- package/dist/types/zeyos/calendar.d.ts +43 -7
- package/dist/types/zeyos/connect.d.ts +4 -0
- package/dist/types/zeyos/form.d.ts +13 -5
- package/dist/types/zeyos/select.d.ts +5 -2
- package/dist/types/zeyos/table.d.ts +16 -8
- package/dist/types/zeyos/view.d.ts +2 -1
- package/dist/zx-zeyos.esm.js +3161 -515
- package/dist/zx-zeyos.esm.min.js +4 -4
- package/dist/zx.core.css +4 -0
- package/dist/zx.core.min.css +1 -1
- package/dist/zx.css +970 -57
- package/dist/zx.esm.js +6405 -2249
- package/dist/zx.esm.min.js +26 -26
- package/dist/zx.global.js +6405 -2249
- package/dist/zx.global.min.js +26 -26
- package/dist/zx.layered.css +972 -57
- package/dist/zx.layered.min.css +1 -1
- package/dist/zx.min.css +1 -1
- package/docs/agent-catalog.json +159 -1
- package/docs/agent-surfaces.md +21 -21
- package/docs/api.json +3154 -518
- package/docs/components/account-menu.md +24 -0
- package/docs/components/activity-item.md +23 -0
- package/docs/components/activity-list.md +28 -0
- package/docs/components/agent-avatar.md +59 -0
- package/docs/components/agent-thread.md +275 -0
- package/docs/components/app-icon.md +36 -0
- package/docs/components/app-sidebar.md +92 -0
- package/docs/components/approval-card.md +71 -0
- package/docs/components/aurora.md +34 -0
- package/docs/components/avatar.md +37 -0
- package/docs/components/badge.md +36 -0
- package/docs/components/block-view.md +34 -0
- package/docs/components/breadcrumb.md +20 -0
- package/docs/components/button.md +23 -0
- package/docs/components/calendar.md +68 -0
- package/docs/components/card-view.md +73 -0
- package/docs/components/card.md +25 -0
- package/docs/components/chart.md +109 -0
- package/docs/components/check-button.md +16 -0
- package/docs/components/checklist.md +19 -0
- package/docs/components/code-editor.md +38 -0
- package/docs/components/composer.md +107 -0
- package/docs/components/context-menu.md +32 -0
- package/docs/components/copy.md +37 -0
- package/docs/components/data-filter.md +16 -0
- package/docs/components/date-picker.md +31 -0
- package/docs/components/date-range.md +21 -0
- package/docs/components/datebox.md +31 -0
- package/docs/components/dialog.md +25 -0
- package/docs/components/dock.md +57 -0
- package/docs/components/dropdown.md +39 -0
- package/docs/components/elements.md +63 -0
- package/docs/components/empty-state.md +17 -0
- package/docs/components/entity-ref.md +26 -0
- package/docs/components/field-upload.md +18 -0
- package/docs/components/file-item.md +27 -0
- package/docs/components/file-list.md +23 -0
- package/docs/components/filter-panel.md +45 -0
- package/docs/components/filter.md +47 -0
- package/docs/components/finder.md +25 -0
- package/docs/components/form-widgets.md +42 -0
- package/docs/components/form.md +80 -0
- package/docs/components/grid.md +26 -0
- package/docs/components/groupbox.md +11 -0
- package/docs/components/helpers.md +359 -0
- package/docs/components/icons.md +87 -0
- package/docs/components/index.md +99 -0
- package/docs/components/kanban-view.md +42 -0
- package/docs/components/kbd.md +23 -0
- package/docs/components/kernel.md +41 -0
- package/docs/components/launcher.md +66 -0
- package/docs/components/layout.md +33 -0
- package/docs/components/list-toolbar.md +38 -0
- package/docs/components/loading.md +48 -0
- package/docs/components/menu-button.md +47 -0
- package/docs/components/message.md +76 -0
- package/docs/components/modal.md +27 -0
- package/docs/components/module-bar.md +71 -0
- package/docs/components/multi-value-editor.md +16 -0
- package/docs/components/navigation-bar.md +22 -0
- package/docs/components/number-field.md +34 -0
- package/docs/components/pagination.md +73 -0
- package/docs/components/panel.md +28 -0
- package/docs/components/prompt-starters.md +40 -0
- package/docs/components/prose.md +38 -0
- package/docs/components/questionnaire.md +115 -0
- package/docs/components/rating.md +19 -0
- package/docs/components/run-status.md +50 -0
- package/docs/components/run-trace.md +72 -0
- package/docs/components/search.md +11 -0
- package/docs/components/select.md +129 -0
- package/docs/components/sheet-stack.md +39 -0
- package/docs/components/sheet.md +77 -0
- package/docs/components/skeleton.md +27 -0
- package/docs/components/slider.md +29 -0
- package/docs/components/sort-control.md +21 -0
- package/docs/components/source-list.md +30 -0
- package/docs/components/split-view.md +12 -0
- package/docs/components/stat-tile.md +49 -0
- package/docs/components/stepper.md +27 -0
- package/docs/components/surface.md +152 -0
- package/docs/components/tabbox.md +33 -0
- package/docs/components/table-view.md +43 -0
- package/docs/components/table.md +232 -0
- package/docs/components/tag-picker.md +39 -0
- package/docs/components/timebox.md +16 -0
- package/docs/components/toggle.md +21 -0
- package/docs/components/tokens.md +82 -0
- package/docs/components/toolbar.md +26 -0
- package/docs/components/tooltip.md +16 -0
- package/docs/components/tree.md +48 -0
- package/docs/components/truncate.md +21 -0
- package/docs/components/value-list.md +14 -0
- package/docs/components/view-settings.md +56 -0
- package/docs/components/workspace-switcher.md +42 -0
- package/docs/components/zeyos.md +196 -0
- package/docs/llms-small.txt +299 -0
- package/docs/llms.md +725 -109
- package/docs/llms.txt +46 -19
- package/package.json +9 -4
- package/src/components/activity-item/activity-item.js +21 -2
- package/src/components/agent-avatar/agent-avatar.css +195 -0
- package/src/components/agent-avatar/agent-avatar.js +333 -0
- package/src/components/agent-avatar/agent-face.js +292 -0
- package/src/components/agent-thread/ag-ui.js +44 -11
- package/src/components/agent-thread/agent-thread.js +103 -11
- package/src/components/agent-thread/ui-message-stream.js +3 -1
- package/src/components/app-rail/app-rail.css +5 -0
- package/src/components/app-sidebar/app-sidebar.css +3 -0
- package/src/components/app-sidebar/app-sidebar.js +4 -3
- package/src/components/approval-card/approval-card.css +6 -0
- package/src/components/approval-card/approval-card.js +55 -7
- package/src/components/aurora/aurora.css +149 -14
- package/src/components/aurora/aurora.js +49 -6
- package/src/components/button/button.css +24 -11
- package/src/components/calendar/calendar.css +6 -2
- package/src/components/calendar/calendar.js +127 -47
- package/src/components/card-view/card-view.js +5 -6
- package/src/components/chart/chart.css +159 -1
- package/src/components/chart/chart.js +450 -62
- package/src/components/chart/color.js +297 -0
- package/src/components/chart/svg-adapter.js +576 -0
- package/src/components/chart/svg-geometry.js +323 -0
- package/src/components/check-button/check-button.js +3 -18
- package/src/components/checklist/checklist.css +9 -1
- package/src/components/checklist/checklist.js +105 -20
- package/src/components/checklist/field-adapter.js +6 -12
- package/src/components/code-editor/code-editor.css +33 -0
- package/src/components/code-editor/code-editor.js +97 -8
- package/src/components/code-editor/field-adapter.js +3 -0
- package/src/components/composer/composer.css +3 -0
- package/src/components/composer/composer.js +100 -22
- package/src/components/context-menu/context-menu.js +41 -5
- package/src/components/copy/copy-button.js +9 -1
- package/src/components/copy/copy-input.js +5 -0
- package/src/components/data-filter/filter-core.js +0 -1
- package/src/components/date-picker/date-picker.css +8 -0
- package/src/components/date-picker/date-picker.js +47 -8
- package/src/components/date-picker/date-range-picker.js +1 -1
- package/src/components/date-picker/month-picker.js +19 -3
- package/src/components/date-picker/time-picker.js +54 -19
- package/src/components/datebox/date-range-box.js +7 -3
- package/src/components/datebox/datebox.js +32 -6
- package/src/components/dialog/dialog.css +6 -0
- package/src/components/dialog/dialog.js +24 -33
- package/src/components/dropdown/dropdown.js +1 -18
- package/src/components/empty-state/empty-state.js +21 -2
- package/src/components/field/field.js +19 -3
- package/src/components/fieldset/fieldset.js +3 -1
- package/src/components/filter/filter.js +9 -0
- package/src/components/form/form.js +19 -2
- package/src/components/kanban-view/kanban-card.js +15 -2
- package/src/components/kanban-view/kanban-view.css +21 -0
- package/src/components/kanban-view/kanban-view.js +29 -16
- package/src/components/launcher/launcher.css +14 -0
- package/src/components/launcher/launcher.js +54 -9
- package/src/components/master-panel/master-panel.js +24 -22
- package/src/components/menu-button/menu-button.js +26 -4
- package/src/components/message/message.css +228 -29
- package/src/components/message/message.js +664 -30
- package/src/components/modal/modal.js +129 -30
- package/src/components/modal/native-dialog.js +91 -0
- package/src/components/module-bar/module-bar.css +3 -0
- package/src/components/module-bar/module-bar.js +17 -4
- package/src/components/multi-value-editor/multi-value-editor.css +7 -2
- package/src/components/multi-value-editor/multi-value-editor.js +3 -2
- package/src/components/navigation-bar/navigation-bar.js +13 -1
- package/src/components/number-field/field-adapter.js +3 -0
- package/src/components/number-field/number-field.js +70 -16
- package/src/components/pagination/pagination.css +26 -2
- package/src/components/pagination/pagination.js +551 -65
- package/src/components/prose/prose.js +7 -1
- package/src/components/rating/field-adapter.js +3 -0
- package/src/components/run-status/run-status.js +43 -3
- package/src/components/run-trace/run-trace.js +15 -7
- package/src/components/search/search.js +3 -18
- package/src/components/select/field-adapter.js +8 -1
- package/src/components/select/select.js +68 -13
- package/src/components/sheet/sheet.js +39 -13
- package/src/components/slider/field-adapter.js +3 -0
- package/src/components/slider/slider.js +4 -6
- package/src/components/stat-tile/stat-tile.js +24 -9
- package/src/components/stepper/stepper.css +15 -0
- package/src/components/stepper/stepper.js +34 -2
- package/src/components/surface/catalog.js +185 -28
- package/src/components/surface/surface.js +10 -5
- package/src/components/tabbox/tabbox.js +13 -1
- package/src/components/table/table.css +160 -2
- package/src/components/table/table.js +479 -52
- package/src/components/table/window.js +46 -4
- package/src/components/table-view/table-view.js +1 -10
- package/src/components/tag-picker/field-adapter.js +3 -0
- package/src/components/tag-picker/tag-picker.js +2 -0
- package/src/components/timebox/field-adapter.js +3 -0
- package/src/components/toggle/toggle.js +51 -27
- package/src/components/tooltip/tooltip.js +21 -14
- package/src/components/tree/tree.js +87 -14
- package/src/components/truncate/truncate.js +21 -5
- package/src/components/value-list/value-list.js +37 -9
- package/src/components/view-settings/view-settings.js +1 -5
- package/src/core/component.js +34 -2
- package/src/core/date.js +5 -4
- package/src/core/dom.js +45 -2
- package/src/core/drag-axis.js +24 -7
- package/src/core/export.js +4 -4
- package/src/core/fontawesome.js +34 -3
- package/src/core/format.js +3 -1
- package/src/core/http.js +23 -11
- package/src/core/icons.js +60 -8
- package/src/core/keyboard.js +83 -9
- package/src/core/messages.js +3 -0
- package/src/core/position.js +4 -3
- package/src/core/storage.js +80 -31
- package/src/core/util.js +16 -5
- package/src/elements/define.js +82 -47
- package/src/elements/kit.js +46 -35
- package/src/index.js +8 -4
- package/src/internal/agent-model.js +152 -0
- package/src/internal/app-rail.js +53 -2
- package/src/internal/collections.js +25 -0
- package/src/internal/menu-items.js +59 -0
- package/src/internal/overlay-content.js +35 -0
- package/src/internal/presence-loop.js +61 -14
- package/src/locales/de.js +3 -0
- package/src/zeyos/calendar.js +81 -19
- package/src/zeyos/connect.js +5 -1
- package/src/zeyos/form.js +29 -10
- package/src/zeyos/select.js +36 -12
- package/src/zeyos/table.js +43 -11
- package/src/zeyos/view.js +2 -1
- package/styles/tokens/semantic.css +7 -1
- package/styles/zx.css +1 -0
|
@@ -36,6 +36,19 @@ export type ZeyosCalendarOptions = {
|
|
|
36
36
|
* Persistence listener.
|
|
37
37
|
*/
|
|
38
38
|
oneventchange?: (event: CustomEvent<Record<string, any>>) => void;
|
|
39
|
+
/**
|
|
40
|
+
* IANA time zone of the ZeyOS instance. An appointment running from
|
|
41
|
+
* midnight to midnight in this zone is all-day and shows on the calendar days it names there, for a
|
|
42
|
+
* viewer in any zone; defaults to the runtime's own zone.
|
|
43
|
+
*/
|
|
44
|
+
timeZone?: string;
|
|
45
|
+
};
|
|
46
|
+
export type ZeyosCalendarZoneOptions = {
|
|
47
|
+
/**
|
|
48
|
+
* IANA time zone of the ZeyOS instance; the runtime's own zone when
|
|
49
|
+
* omitted.
|
|
50
|
+
*/
|
|
51
|
+
timeZone?: string;
|
|
39
52
|
};
|
|
40
53
|
/**
|
|
41
54
|
* @typedef {Object} ZeyosCalendarOptions
|
|
@@ -48,29 +61,52 @@ export type ZeyosCalendarOptions = {
|
|
|
48
61
|
* @property {number} [weekStart=1] User-preferred first weekday.
|
|
49
62
|
* @property {boolean} [workweek=false] Show five days in week view.
|
|
50
63
|
* @property {(event: CustomEvent<Record<string, any>>) => void} [oneventchange] Persistence listener.
|
|
64
|
+
* @property {string} [timeZone] IANA time zone of the ZeyOS instance. An appointment running from
|
|
65
|
+
* midnight to midnight in this zone is all-day and shows on the calendar days it names there, for a
|
|
66
|
+
* viewer in any zone; defaults to the runtime's own zone.
|
|
67
|
+
*/
|
|
68
|
+
/**
|
|
69
|
+
* @typedef {Object} ZeyosCalendarZoneOptions
|
|
70
|
+
* @property {string} [timeZone] IANA time zone of the ZeyOS instance; the runtime's own zone when
|
|
71
|
+
* omitted.
|
|
51
72
|
*/
|
|
52
73
|
/**
|
|
53
74
|
* Maps one expanded ZeyOS appointment/event row to the product-neutral Calendar shape. Occurrence
|
|
54
75
|
* identity includes the start timestamp because recurring rows intentionally share their base ID;
|
|
55
|
-
* persistence callers keep using `event.data.ID`.
|
|
76
|
+
* persistence callers keep using `event.data.ID`. A row without an `allDay` flag is all-day when it
|
|
77
|
+
* runs from midnight to midnight, at least a day apart, in `options.timeZone`; with a zone given,
|
|
78
|
+
* an all-day row's start and end become local midnight of the calendar days they name there.
|
|
56
79
|
* @param {Record<string, any>} record ZeyOS row.
|
|
80
|
+
* @param {ZeyosCalendarZoneOptions} [options={}] Instance time zone.
|
|
57
81
|
* @returns {Record<string, any>} Generic Calendar event.
|
|
82
|
+
* @throws {RangeError} When `options.timeZone` names a zone the runtime does not know.
|
|
83
|
+
*/
|
|
84
|
+
export declare function zeyosAppointmentToEvent(record: Record<string, any>, options?: ZeyosCalendarZoneOptions): Record<string, any>;
|
|
85
|
+
/**
|
|
86
|
+
* Maps expanded ZeyOS appointment/event rows with {@link zeyosAppointmentToEvent}.
|
|
87
|
+
* @param {Record<string, any>[]} records ZeyOS rows.
|
|
88
|
+
* @param {ZeyosCalendarZoneOptions} [options={}] Instance time zone.
|
|
89
|
+
* @returns {Record<string, any>[]} Generic Calendar events.
|
|
58
90
|
*/
|
|
59
|
-
export declare function
|
|
60
|
-
/** @param {Record<string, any>[]} records @returns {Record<string, any>[]} */
|
|
61
|
-
export declare function zeyosAppointmentsToEvents(records: Record<string, any>[]): Record<string, any>[];
|
|
91
|
+
export declare function zeyosAppointmentsToEvents(records: Record<string, any>[], options?: ZeyosCalendarZoneOptions): Record<string, any>[];
|
|
62
92
|
/**
|
|
63
93
|
* Converts a proposed Calendar occurrence back to the current ZeyOS appointment update fields.
|
|
64
94
|
* The base appointment identifier remains the source record's `ID`; date values become Unix
|
|
65
|
-
* seconds and the adapter never adds recurrence or DAV fields.
|
|
66
|
-
*
|
|
95
|
+
* seconds and the adapter never adds recurrence or DAV fields. With `options.timeZone`, an all-day
|
|
96
|
+
* event's days are stored as midnight in that zone, the way {@link zeyosAppointmentToEvent} reads
|
|
97
|
+
* them.
|
|
98
|
+
* @param {{start: Date, end: Date, allDay?: boolean, data?: Record<string, any>}} event Calendar event proposal.
|
|
99
|
+
* @param {ZeyosCalendarZoneOptions} [options={}] Instance time zone.
|
|
67
100
|
* @returns {{ID?: unknown, datefrom: number|null, dateto: number|null}}
|
|
101
|
+
* @throws {RangeError} When the event is all-day and `options.timeZone` names a zone the runtime
|
|
102
|
+
* does not know.
|
|
68
103
|
*/
|
|
69
104
|
export declare function calendarEventToZeyosPatch(event: {
|
|
70
105
|
start: Date;
|
|
71
106
|
end: Date;
|
|
107
|
+
allDay?: boolean;
|
|
72
108
|
data?: Record<string, any>;
|
|
73
|
-
}): {
|
|
109
|
+
}, options?: ZeyosCalendarZoneOptions): {
|
|
74
110
|
ID?: unknown;
|
|
75
111
|
datefrom: number | null;
|
|
76
112
|
dateto: number | null;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type ConnectOptions = {
|
|
2
2
|
/**
|
|
3
3
|
* Error reporter.
|
|
4
|
+
* Every failed helper call reaches it, including one for a resource with no matching operation;
|
|
5
|
+
* `context.operation` is the operation id, or the action (`list`, `get`, …) when none was found.
|
|
4
6
|
*/
|
|
5
7
|
onError?: (error: unknown, context?: {
|
|
6
8
|
operation?: string;
|
|
@@ -43,6 +45,8 @@ export type ZeyosFacade = {
|
|
|
43
45
|
/**
|
|
44
46
|
* @typedef {Object} ConnectOptions
|
|
45
47
|
* @property {(error: unknown, context?: {operation?: string, resource?: string}) => unknown} [onError] Error reporter.
|
|
48
|
+
* Every failed helper call reaches it, including one for a resource with no matching operation;
|
|
49
|
+
* `context.operation` is the operation id, or the action (`list`, `get`, …) when none was found.
|
|
46
50
|
* @property {string} [locale] BCP 47 locale applied to Zx i18n/date formatting.
|
|
47
51
|
*/
|
|
48
52
|
/**
|
|
@@ -92,11 +92,15 @@ export type ZeyosFormBinding = {
|
|
|
92
92
|
*/
|
|
93
93
|
form: Form;
|
|
94
94
|
/**
|
|
95
|
-
* Initial value/load readiness.
|
|
95
|
+
* Initial value/load readiness. It rejects
|
|
96
|
+
* when the initial load fails (reported like any failed request); left unawaited, that rejection is
|
|
97
|
+
* not reported a second time as unhandled.
|
|
96
98
|
*/
|
|
97
99
|
ready: Promise<Record<string, unknown> | null>;
|
|
98
100
|
/**
|
|
99
|
-
* Loads and maps one record.
|
|
101
|
+
* Loads and maps one record. Only
|
|
102
|
+
* the latest call shows its record and becomes the one `save()` updates: an earlier call that
|
|
103
|
+
* settles later still resolves with its record, but leaves the form alone.
|
|
100
104
|
*/
|
|
101
105
|
load: (id: unknown) => Promise<Record<string, unknown>>;
|
|
102
106
|
/**
|
|
@@ -148,8 +152,12 @@ export type ZeyosFormBinding = {
|
|
|
148
152
|
/**
|
|
149
153
|
* @typedef {Object} ZeyosFormBinding
|
|
150
154
|
* @property {Form} form Generated Zx form.
|
|
151
|
-
* @property {Promise<Record<string, unknown>|null>} ready Initial value/load readiness.
|
|
152
|
-
*
|
|
155
|
+
* @property {Promise<Record<string, unknown>|null>} ready Initial value/load readiness. It rejects
|
|
156
|
+
* when the initial load fails (reported like any failed request); left unawaited, that rejection is
|
|
157
|
+
* not reported a second time as unhandled.
|
|
158
|
+
* @property {(id: unknown) => Promise<Record<string, unknown>>} load Loads and maps one record. Only
|
|
159
|
+
* the latest call shows its record and becomes the one `save()` updates: an earlier call that
|
|
160
|
+
* settles later still resolves with its record, but leaves the form alone.
|
|
153
161
|
* @property {() => Promise<Record<string, unknown>|null>} save Validates and creates or updates the
|
|
154
162
|
* record, then confirms with a toast in the form's scope unless `notify` is false.
|
|
155
163
|
* @property {() => Form} getForm Returns the generated Zx Form.
|
|
@@ -169,7 +177,7 @@ export declare function buildZeyosFormConfig(client: Record<string, any>, resour
|
|
|
169
177
|
/**
|
|
170
178
|
* Generates a schema-driven Zx Form and a small async binding object. `load(id)` hydrates entity
|
|
171
179
|
* labels and converts Unix seconds to Date objects. `save()` validates, maps values back to API
|
|
172
|
-
* storage types, calls create/update through the
|
|
180
|
+
* storage types, calls create/update through the `connect()` facade, invokes
|
|
173
181
|
* `onSaved(record)`, and shows a success toast. Its toasts — that confirmation and the report of a
|
|
174
182
|
* failed request — appear in the theme scope of `opts.scope` or of the form itself, and
|
|
175
183
|
* `notify: false` silences them. Await `ready` when `opts.id` or `opts.value` is supplied.
|
|
@@ -147,7 +147,10 @@ export declare function buildZeyosSelectConfig(client: Record<string, any>, reso
|
|
|
147
147
|
/**
|
|
148
148
|
* Creates an async Zx Select backed by the injected client's generated list operation. A non-null
|
|
149
149
|
* initial id is hydrated through the resource get operation; await `select.ready` when code must
|
|
150
|
-
* wait for that label before presenting the control.
|
|
150
|
+
* wait for that label before presenting the control. A selection made while that lookup runs wins
|
|
151
|
+
* over the initial id, and a select destroyed meanwhile is left alone. `ready` rejects when the
|
|
152
|
+
* lookup fails (reported through `connect()` like any failed request); left unawaited, that
|
|
153
|
+
* rejection is not reported a second time as unhandled.
|
|
151
154
|
* @param {Record<string, any>} client Injected ZeyOS client instance.
|
|
152
155
|
* @param {string} resource Resource name such as `accounts`.
|
|
153
156
|
* @param {ZeyosSelectOptions} [opts={}] Query and Select options.
|
|
@@ -188,7 +191,7 @@ export declare function buildZeyosEntitySelectConfig(client: Record<string, any>
|
|
|
188
191
|
}): Record<string, any>;
|
|
189
192
|
/**
|
|
190
193
|
* Creates a ZeyOS Entity-box preset. Await `select.ready` when a non-null initial ID must be
|
|
191
|
-
* hydrated before presentation.
|
|
194
|
+
* hydrated before presentation; it settles like {@link zeyosSelect}'s.
|
|
192
195
|
* @param {Record<string, any>} client Injected ZeyOS client instance.
|
|
193
196
|
* @param {string} resource Resource name.
|
|
194
197
|
* @param {Record<string, any>} [opts={}] Entity Select options.
|
|
@@ -224,7 +224,8 @@ export type ZeyosTableBinding = {
|
|
|
224
224
|
*/
|
|
225
225
|
setFilters: (filters: Record<string, unknown>) => Promise<ZeyosTableLoadResult>;
|
|
226
226
|
/**
|
|
227
|
-
* Appends the next page when available
|
|
227
|
+
* Appends the next page when available;
|
|
228
|
+
* sends nothing while a page-zero reload (a new search, filter, or sort) is still in flight.
|
|
228
229
|
*/
|
|
229
230
|
loadMore: () => Promise<ZeyosTableLoadResult>;
|
|
230
231
|
/**
|
|
@@ -330,7 +331,8 @@ export type ServerPager = {
|
|
|
330
331
|
};
|
|
331
332
|
/**
|
|
332
333
|
* Appends the next page when available,
|
|
333
|
-
* else resolves without a request
|
|
334
|
+
* else resolves without a request — also while a page-zero or `replace` load is still in flight,
|
|
335
|
+
* whose rows the next page of the old query would otherwise land on.
|
|
334
336
|
*/
|
|
335
337
|
loadMore: () => Promise<ZeyosTableLoadResult>;
|
|
336
338
|
/**
|
|
@@ -350,7 +352,8 @@ export type ServerPager = {
|
|
|
350
352
|
search?: unknown;
|
|
351
353
|
}) => void;
|
|
352
354
|
/**
|
|
353
|
-
* Forgets the loaded page, count, and `hasMore`.
|
|
355
|
+
* Forgets the loaded page, count, and `hasMore`. A request still in
|
|
356
|
+
* flight is returned to its caller but no longer renders, and the loading state is cleared.
|
|
354
357
|
*/
|
|
355
358
|
reset: () => void;
|
|
356
359
|
/**
|
|
@@ -425,7 +428,8 @@ export type ServerPager = {
|
|
|
425
428
|
* @property {(options?: ZeyosTableLoadOptions) => Promise<ZeyosTableLoadResult>} load Loads/reloads a server page.
|
|
426
429
|
* @property {(search: string) => Promise<ZeyosTableLoadResult>} setSearch Replaces search and reloads page zero.
|
|
427
430
|
* @property {(filters: Record<string, unknown>) => Promise<ZeyosTableLoadResult>} setFilters Replaces predicates and reloads page zero.
|
|
428
|
-
* @property {() => Promise<ZeyosTableLoadResult>} loadMore Appends the next page when available
|
|
431
|
+
* @property {() => Promise<ZeyosTableLoadResult>} loadMore Appends the next page when available;
|
|
432
|
+
* sends nothing while a page-zero reload (a new search, filter, or sort) is still in flight.
|
|
429
433
|
* @property {number|null} count Current server count.
|
|
430
434
|
* @property {number} page Current zero-based page.
|
|
431
435
|
* @property {number} pageSize Current server page size.
|
|
@@ -461,12 +465,14 @@ export type ServerPager = {
|
|
|
461
465
|
* @property {(options?: ZeyosTableLoadOptions) => {page: number, pageSize: number, filters: Record<string, unknown>, search: string}} check
|
|
462
466
|
* Validates load options without applying them; throws what `load()` would reject with.
|
|
463
467
|
* @property {() => Promise<ZeyosTableLoadResult>} loadMore Appends the next page when available,
|
|
464
|
-
* else resolves without a request
|
|
468
|
+
* else resolves without a request — also while a page-zero or `replace` load is still in flight,
|
|
469
|
+
* whose rows the next page of the old query would otherwise land on.
|
|
465
470
|
* @property {(sort: {id: string, dir: 'asc'|'desc'}|null) => void} setSort Replaces the sort used
|
|
466
471
|
* by the next load.
|
|
467
472
|
* @property {(state: {filters?: unknown, search?: unknown}) => void} setQuery Replaces filters and
|
|
468
473
|
* search without loading.
|
|
469
|
-
* @property {() => void} reset Forgets the loaded page, count, and `hasMore`.
|
|
474
|
+
* @property {() => void} reset Forgets the loaded page, count, and `hasMore`. A request still in
|
|
475
|
+
* flight is returned to its caller but no longer renders, and the loading state is cleared.
|
|
470
476
|
* @property {() => void} destroy Stops rendering: in-flight responses are ignored, later loads reject.
|
|
471
477
|
* @property {boolean} destroyed Whether `destroy()` ran.
|
|
472
478
|
* @property {number|null} count Current server count.
|
|
@@ -480,7 +486,7 @@ export type ServerPager = {
|
|
|
480
486
|
/**
|
|
481
487
|
* Builds the DOM-free schema-derived columns and Table options used by {@link zeyosTable}. Entity
|
|
482
488
|
* projections include an `<field>_label` alias from a real label field on the referenced resource.
|
|
483
|
-
* Amount fields use each row's real `currency` value for display while retaining the
|
|
489
|
+
* Amount fields use each row's real `currency` value for display while retaining the typed
|
|
484
490
|
* column strategy and right alignment. Enum columns show labels, date-only columns calendar days in
|
|
485
491
|
* `timeZone`, and Table presentation options and listeners pass through to `tableOptions`.
|
|
486
492
|
* @param {Record<string, any>} client Injected ZeyOS client instance.
|
|
@@ -514,7 +520,9 @@ export declare function zeyosTable(client: Record<string, any>, resource: string
|
|
|
514
520
|
* the rows, a higher page appends them — and keeps `count`, `page`, and `hasMore`.
|
|
515
521
|
*
|
|
516
522
|
* Only the newest request may render: an older one that resolves late is returned to its caller
|
|
517
|
-
* but never touches the target
|
|
523
|
+
* but never touches the target, and `reset()` retires every request in flight the same way. While
|
|
524
|
+
* a page-zero or `replace` load is pending, `loadMore()` sends nothing: the rows on screen belong to
|
|
525
|
+
* the previous query. After `destroy()` nothing renders at all — a response that arrives
|
|
518
526
|
* afterwards is ignored, the loading state is left alone — and further loads reject.
|
|
519
527
|
*
|
|
520
528
|
* Validation is strict and the same for both bindings: a page must be a non-negative integer and a
|
|
@@ -261,7 +261,8 @@ export type ZeyosViewBinding = {
|
|
|
261
261
|
*/
|
|
262
262
|
setFilters: (filters: Record<string, unknown>) => Promise<ZeyosViewLoadResult>;
|
|
263
263
|
/**
|
|
264
|
-
* Loads the next page when available
|
|
264
|
+
* Loads the next page when available; sends
|
|
265
|
+
* nothing while a page-zero reload (a new search, filter, or sort) is still in flight.
|
|
265
266
|
*/
|
|
266
267
|
loadMore: () => Promise<ZeyosViewLoadResult>;
|
|
267
268
|
/**
|