@zeyos/zx 5.7.1 → 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 +296 -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 +19 -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 +13 -2
- 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 +11 -0
- 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 +7 -0
- 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 +18 -4
- 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/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 +2998 -451
- 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 +948 -48
- package/dist/zx.esm.js +7432 -3408
- package/dist/zx.esm.min.js +26 -26
- package/dist/zx.global.js +7432 -3408
- package/dist/zx.global.min.js +26 -26
- package/dist/zx.layered.css +950 -48
- 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 +3122 -528
- 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 +697 -100
- 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/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.js +46 -17
- package/src/components/checklist/field-adapter.js +4 -1
- 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 +22 -30
- 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 +70 -25
- 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 +2 -1
- 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 +27 -8
- 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/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 +51 -10
- package/src/core/keyboard.js +83 -9
- package/src/core/messages.js +3 -0
- package/src/core/position.js +2 -2
- 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
package/src/elements/define.js
CHANGED
|
@@ -27,34 +27,42 @@ import { INVALID_ATTRIBUTE, coerceAttribute, serializeAttribute } from './reflec
|
|
|
27
27
|
* @property {string[]|null} [events=null] The component's events. Declared, each also reaches the
|
|
28
28
|
* host under its plain name, and no DOM event of that name passes through from inside the
|
|
29
29
|
* component. Left out, the common `zx-*` set is bridged.
|
|
30
|
-
* @property {ElementMethodMap|null} [methods=null] Component methods the element forwards.
|
|
31
|
-
* the element also carries its live values across a rebuild and across removal.
|
|
30
|
+
* @property {ElementMethodMap|null} [methods=null] Component methods the element forwards.
|
|
32
31
|
*/
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
/*
|
|
34
|
+
* Every table in this module and in `kit.js` is built by a call marked `@__PURE__`. The bundled
|
|
35
|
+
* `dist/zx.esm.js` is one module with side effects, where a bundler drops a statement only if it
|
|
36
|
+
* can see that running it changes nothing: an unmarked `attributes({...})` or `Object.freeze([...])`
|
|
37
|
+
* stays, and a table that names component classes keeps every one of them in an application that
|
|
38
|
+
* never calls `defineElements()`. The tables are still built once, when the module is evaluated.
|
|
39
|
+
* `tests/unit/package-treeshake.test.js` fails when a new table is left unmarked.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
const COMPONENT_EVENTS = /* @__PURE__ */ (() => Object.freeze([
|
|
35
43
|
'change', 'input', 'submit', 'clear', 'open', 'close', 'cancel', 'invalid',
|
|
36
44
|
'query', 'loaded', 'rowclick', 'rowdblclick', 'sort', 'selectionchange', 'datachange'
|
|
37
|
-
]);
|
|
45
|
+
]))();
|
|
38
46
|
|
|
39
47
|
/** Form-control accessors every wrapper carries; an element that is no form control may reuse the names. */
|
|
40
|
-
const FORM_ACCESSORS = Object.freeze(['form', 'labels', 'validity', 'validationMessage', 'willValidate']);
|
|
48
|
+
const FORM_ACCESSORS = /* @__PURE__ */ Object.freeze(['form', 'labels', 'validity', 'validationMessage', 'willValidate']);
|
|
41
49
|
|
|
42
|
-
const TOGGLE_ATTRS = attributes({
|
|
50
|
+
const TOGGLE_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
43
51
|
checked: bool({ always: true, set: (component, value) => component.set(value, { silent: true }), get: (component) => component.get() }),
|
|
44
52
|
value: text({ default: true }),
|
|
45
|
-
label: text({ default: null,
|
|
53
|
+
label: text({ default: null, set: (component, value) => component.setLabel(value) }),
|
|
46
54
|
disabled: bool({ always: true, set: setDisabled })
|
|
47
|
-
});
|
|
55
|
+
}))();
|
|
48
56
|
|
|
49
|
-
const CHECK_BUTTON_ATTRS = attributes({
|
|
57
|
+
const CHECK_BUTTON_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
50
58
|
checked: bool({ always: true, set: (component, value) => component.set(value, { silent: true }), get: (component) => component.get() }),
|
|
51
59
|
value: text({ option: null, default: 'on' }),
|
|
52
60
|
label: text({ default: '', set: (component, value) => component.setLabel(value) }),
|
|
53
61
|
icon: bool({ rebuild: true }),
|
|
54
62
|
disabled: bool({ always: true, set: setDisabled })
|
|
55
|
-
});
|
|
63
|
+
}))();
|
|
56
64
|
|
|
57
|
-
const SELECT_ATTRS = attributes({
|
|
65
|
+
const SELECT_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
58
66
|
items: json({ default: [], set: (component, value) => component.setItems(value) }),
|
|
59
67
|
value: text({ default: null, set: (component, value) => component.set(value, { silent: true }), get: (component) => component.value }),
|
|
60
68
|
'value-key': text({ property: 'valueKey', default: 'ID', rebuild: true }),
|
|
@@ -69,9 +77,9 @@ const SELECT_ATTRS = attributes({
|
|
|
69
77
|
disabled: bool({ always: true, set: setDisabled }),
|
|
70
78
|
required: bool({ option: null, always: true }),
|
|
71
79
|
name: text({ option: null, default: '' })
|
|
72
|
-
});
|
|
80
|
+
}))();
|
|
73
81
|
|
|
74
|
-
const CHECKLIST_ATTRS = attributes({
|
|
82
|
+
const CHECKLIST_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
75
83
|
items: json({ default: [], set: (component, value) => component.setItems(value) }),
|
|
76
84
|
value: json({ option: null, default: [], set: (component, value) => component.setValues(value), get: (component) => component.getValues() }),
|
|
77
85
|
'value-key': text({ property: 'valueKey', default: 'ID', rebuild: true }),
|
|
@@ -80,11 +88,11 @@ const CHECKLIST_ATTRS = attributes({
|
|
|
80
88
|
search: bool({ rebuild: true }),
|
|
81
89
|
height: number({ default: 280, rebuild: true }),
|
|
82
90
|
'default-checked': bool({ property: 'defaultChecked', default: false, rebuild: true }),
|
|
83
|
-
disabled: bool({ option: null, always: true, set:
|
|
91
|
+
disabled: bool({ option: null, always: true, set: setDisabled }),
|
|
84
92
|
name: text({ option: null, default: '' })
|
|
85
|
-
});
|
|
93
|
+
}))();
|
|
86
94
|
|
|
87
|
-
const DATEBOX_ATTRS = attributes({
|
|
95
|
+
const DATEBOX_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
88
96
|
format: text({ default: '%d.%m.%Y', rebuild: true }),
|
|
89
97
|
'display-format': text({ property: 'displayFormat', default: null, rebuild: true }),
|
|
90
98
|
time: bool({ always: true, rebuild: true }),
|
|
@@ -94,37 +102,37 @@ const DATEBOX_ATTRS = attributes({
|
|
|
94
102
|
disabled: bool({ always: true, set: setDisabled }),
|
|
95
103
|
required: bool({ option: null, always: true }),
|
|
96
104
|
name: text({ option: null, default: '' })
|
|
97
|
-
});
|
|
105
|
+
}))();
|
|
98
106
|
|
|
99
|
-
const TIMEBOX_ATTRS = attributes({
|
|
107
|
+
const TIMEBOX_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
100
108
|
value: number({ default: 0, set: (component, value) => component.set(value, { silent: true }), get: (component) => component.get() }),
|
|
101
109
|
unit: text({ default: 'minutes', rebuild: true }),
|
|
102
110
|
seconds: bool({ always: true, rebuild: true }),
|
|
103
111
|
signed: bool({ always: true, rebuild: true }),
|
|
104
112
|
disabled: bool({ always: true, set: setDisabled }),
|
|
105
113
|
name: text({ option: null, default: '' })
|
|
106
|
-
});
|
|
114
|
+
}))();
|
|
107
115
|
|
|
108
|
-
const SEARCH_ATTRS = attributes({
|
|
116
|
+
const SEARCH_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
109
117
|
value: text({ default: '', set: (component, value) => component.set(value, { silent: true }), get: (component) => component.get() }),
|
|
110
118
|
placeholder: text({ default: '', set: (component, value) => { component.refs.input.placeholder = value; } }),
|
|
111
119
|
clearable: bool({ rebuild: true }),
|
|
112
120
|
debounce: number({ default: 250, rebuild: true })
|
|
113
|
-
});
|
|
121
|
+
}))();
|
|
114
122
|
|
|
115
|
-
const GROUPBOX_ATTRS = attributes({
|
|
123
|
+
const GROUPBOX_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
116
124
|
title: text({ default: '', set: (component, value) => component.setTitle(value) }),
|
|
117
125
|
open: bool({ default: false, always: true, set: (component, value) => value ? component.open() : component.close(), get: (component) => component.isOpen() })
|
|
118
|
-
});
|
|
126
|
+
}))();
|
|
119
127
|
|
|
120
|
-
const TABBOX_ATTRS = attributes({
|
|
128
|
+
const TABBOX_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
121
129
|
tabs: json({ default: [], normalize: normalizeTabs, rebuild: true }),
|
|
122
130
|
active: text({ default: null, set: (component, value) => { if (value !== null) component.openTab(value); }, get: (component) => component.getActive() }),
|
|
123
131
|
variant: text({ default: 'divided', rebuild: true }),
|
|
124
132
|
'keep-alive': bool({ property: 'keepAlive', rebuild: true })
|
|
125
|
-
});
|
|
133
|
+
}))();
|
|
126
134
|
|
|
127
|
-
const TABLE_ATTRS = attributes({
|
|
135
|
+
const TABLE_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
128
136
|
columns: json({ default: [], rebuild: true }),
|
|
129
137
|
data: json({ default: [], set: (component, value) => component.setData(value), get: (component) => component.getData() }),
|
|
130
138
|
'row-id': text({ property: 'rowId', default: 'ID', rebuild: true }),
|
|
@@ -135,17 +143,17 @@ const TABLE_ATTRS = attributes({
|
|
|
135
143
|
height: text({ default: null, normalize: normalizeNumberOrString, rebuild: true }),
|
|
136
144
|
'empty-text': text({ property: 'emptyText', default: null, rebuild: true }),
|
|
137
145
|
zebra: bool({ rebuild: true })
|
|
138
|
-
});
|
|
146
|
+
}))();
|
|
139
147
|
|
|
140
|
-
const DIALOG_ATTRS = attributes({
|
|
148
|
+
const DIALOG_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
141
149
|
title: text({ default: '', set: (component, value) => component.setTitle(value) }),
|
|
142
150
|
size: text({ default: 'md', normalize: normalizeNumberOrString, rebuild: true }),
|
|
143
151
|
buttons: json({ default: [], set: (component, value) => component.setButtons(value) }),
|
|
144
152
|
closable: bool({ rebuild: true }),
|
|
145
153
|
open: bool({ option: null, default: false, always: true, set: (component, value) => value ? component.open() : component.close(), get: (component) => component.isOpen() })
|
|
146
|
-
});
|
|
154
|
+
}))();
|
|
147
155
|
|
|
148
|
-
const ELEMENTS = Object.freeze([
|
|
156
|
+
const ELEMENTS = /* @__PURE__ */ (() => Object.freeze([
|
|
149
157
|
['toggle', Toggle, { formAssociated: true, attrs: TOGGLE_ATTRS }],
|
|
150
158
|
['check-button', CheckButton, { formAssociated: true, attrs: CHECK_BUTTON_ATTRS }],
|
|
151
159
|
['select', Select, { formAssociated: true, attrs: SELECT_ATTRS }],
|
|
@@ -158,13 +166,17 @@ const ELEMENTS = Object.freeze([
|
|
|
158
166
|
['table', Table, { formAssociated: false, attrs: TABLE_ATTRS }],
|
|
159
167
|
['dialog', Dialog, { formAssociated: false, attrs: DIALOG_ATTRS }],
|
|
160
168
|
...KIT_ELEMENTS
|
|
161
|
-
]);
|
|
169
|
+
]))();
|
|
162
170
|
|
|
163
171
|
/**
|
|
164
172
|
* Creates a light-DOM custom-element class backed by a Zx component.
|
|
165
173
|
* Groupbox and Dialog wrappers adopt their host's initial children as component content;
|
|
166
174
|
* other wrappers leave unrelated host children untouched and append their component root.
|
|
167
175
|
*
|
|
176
|
+
* Every wrapper carries its component's live values — what the user selected, typed, checked, or
|
|
177
|
+
* opened — across a rebuild (an attribute that needs a new component changed) and across removal
|
|
178
|
+
* and reinsertion, so moving the element keeps its state.
|
|
179
|
+
*
|
|
168
180
|
* A wrapper that declares `methods` forwards them: `element.upsert(item)` calls the component, and
|
|
169
181
|
* a call made while no component exists is queued and runs, in order, once it does. A forwarded
|
|
170
182
|
* call returns the component's answer, with the component itself replaced by the element; a
|
|
@@ -211,8 +223,10 @@ export function elementFor(ComponentClass, {
|
|
|
211
223
|
if (this._component) return;
|
|
212
224
|
this._upgradeProperties(definitions);
|
|
213
225
|
if (contentElement && this._contentNodes === null) this._contentNodes = Array.from(this.childNodes);
|
|
214
|
-
|
|
226
|
+
const capture = formAssociated && this._defaults === null;
|
|
227
|
+
const explicit = capture && this._captureDefaults(definitions);
|
|
215
228
|
this._createComponent(ComponentClass, definitions, contentElement);
|
|
229
|
+
if (capture && !explicit) this._captureInitialValue(definitions);
|
|
216
230
|
this._calls.drain((name, args) => this._invoke(name, args), () => this._component !== null);
|
|
217
231
|
}
|
|
218
232
|
|
|
@@ -323,14 +337,37 @@ export function elementFor(ComponentClass, {
|
|
|
323
337
|
}
|
|
324
338
|
}
|
|
325
339
|
|
|
326
|
-
/**
|
|
340
|
+
/**
|
|
341
|
+
* Records the value a form reset returns to, when the element was given one explicitly — as an
|
|
342
|
+
* attribute or a property set before connection.
|
|
343
|
+
* @param {Record<string, ElementAttribute>} defs
|
|
344
|
+
* @returns {boolean} Whether an explicit value was recorded.
|
|
345
|
+
*/
|
|
327
346
|
_captureDefaults(defs) {
|
|
328
347
|
this._defaults = new Map();
|
|
348
|
+
const entry = this._controlDefinition(defs);
|
|
349
|
+
if (!entry) return false;
|
|
350
|
+
const explicit = this._propertyValues.has(entry.property)
|
|
351
|
+
|| (entry.observed && this.hasAttribute(entry.attribute));
|
|
352
|
+
if (explicit) this._defaults.set(entry.property, cloneDefault(this._readProperty(entry)));
|
|
353
|
+
return explicit;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Records the value the new component started with as the reset value, for an element given no
|
|
358
|
+
* explicit one: a checklist whose items arrive checked through `checkedKey` resets to them.
|
|
359
|
+
* @param {Record<string, ElementAttribute>} defs
|
|
360
|
+
* @returns {void}
|
|
361
|
+
*/
|
|
362
|
+
_captureInitialValue(defs) {
|
|
363
|
+
const entry = this._controlDefinition(defs);
|
|
364
|
+
if (entry && this._defaults) this._defaults.set(entry.property, cloneDefault(this._readProperty(entry)));
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/** @param {Record<string, ElementAttribute>} defs @returns {ElementAttribute|undefined} The form value's definition. */
|
|
368
|
+
_controlDefinition(defs) {
|
|
329
369
|
const property = formControlProperty(ComponentClass);
|
|
330
|
-
|
|
331
|
-
const entry = Object.values(defs).find((definition) => definition.property === property);
|
|
332
|
-
if (entry) this._defaults.set(property, cloneDefault(this._readProperty(entry)));
|
|
333
|
-
}
|
|
370
|
+
return property ? Object.values(defs).find((definition) => definition.property === property) : undefined;
|
|
334
371
|
}
|
|
335
372
|
|
|
336
373
|
/**
|
|
@@ -460,12 +497,12 @@ export function elementFor(ComponentClass, {
|
|
|
460
497
|
|
|
461
498
|
/**
|
|
462
499
|
* Copies the component's live values to the host, so the next component starts where this one
|
|
463
|
-
* stopped.
|
|
500
|
+
* stopped. Any wrapper can drift from what it was given: the user changes a select, a toggle,
|
|
501
|
+
* or a date, and a forwarded method changes its component directly.
|
|
464
502
|
* @param {ElementAttribute|null} changed The definition being replaced, which keeps its new value.
|
|
465
503
|
* @returns {void}
|
|
466
504
|
*/
|
|
467
505
|
_keepLiveValues(changed) {
|
|
468
|
-
if (!methods) return;
|
|
469
506
|
for (const definition of Object.values(definitions)) {
|
|
470
507
|
if (!definition.get || definition === changed) continue;
|
|
471
508
|
this._propertyValues.set(definition.property, definition.get(this._component, this));
|
|
@@ -515,9 +552,14 @@ export function elementFor(ComponentClass, {
|
|
|
515
552
|
this._syncFormState(ComponentClass);
|
|
516
553
|
return;
|
|
517
554
|
}
|
|
555
|
+
const normalized = normalizeValue(definition, value, this);
|
|
556
|
+
// The control's own `disabled` combines with a disabled fieldset or form around it: removing
|
|
557
|
+
// the attribute inside a disabled fieldset leaves the control disabled.
|
|
558
|
+
const applied = name === 'disabled' && definition === definitions.disabled
|
|
559
|
+
? Boolean(normalized) || this._disabledByForm : normalized;
|
|
518
560
|
this._applying = true;
|
|
519
561
|
try {
|
|
520
|
-
definition.set(this._component,
|
|
562
|
+
definition.set(this._component, applied, this);
|
|
521
563
|
} finally {
|
|
522
564
|
this._applying = false;
|
|
523
565
|
}
|
|
@@ -660,13 +702,6 @@ function setDisabled(component, disabled) {
|
|
|
660
702
|
else component.enable();
|
|
661
703
|
}
|
|
662
704
|
|
|
663
|
-
/** @param {any} component @param {boolean} disabled @returns {void} */
|
|
664
|
-
function setChecklistDisabled(component, disabled) {
|
|
665
|
-
component.el.setAttribute('aria-disabled', String(disabled));
|
|
666
|
-
if (component.refs.search) component.refs.search.disabled = disabled;
|
|
667
|
-
for (const input of component.refs.list?.querySelectorAll('input') ?? []) input.disabled = disabled;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
705
|
/** @param {unknown} value @returns {unknown} */
|
|
671
706
|
function normalizeFilter(value) {
|
|
672
707
|
if (value === '' || value === 'true') return 'local';
|
package/src/elements/kit.js
CHANGED
|
@@ -69,7 +69,9 @@ function normalizeCompact(value) {
|
|
|
69
69
|
return value;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
/* The tables below are marked `@__PURE__` so an unused one can be dropped; see `define.js`. */
|
|
73
|
+
|
|
74
|
+
const AGENT_THREAD_ATTRS =/* @__PURE__ */ (() => attributes({
|
|
73
75
|
items: data({ default: [], set: (component, value) => component.setItems(value), get: (component) => component.getItems() }),
|
|
74
76
|
authors: rebuiltData({}),
|
|
75
77
|
me: rebuiltText({ default: 'me' }),
|
|
@@ -88,9 +90,9 @@ const AGENT_THREAD_ATTRS = attributes({
|
|
|
88
90
|
'format-time': rebuiltProp(),
|
|
89
91
|
locale: rebuiltText(),
|
|
90
92
|
msg: messages()
|
|
91
|
-
});
|
|
93
|
+
}))();
|
|
92
94
|
|
|
93
|
-
const COMPOSER_ATTRS = attributes({
|
|
95
|
+
const COMPOSER_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
94
96
|
label: text({ default: null, set: updates('label') }),
|
|
95
97
|
placeholder: text({ default: '', set: updates('placeholder') }),
|
|
96
98
|
value: text({ default: '', reflect: false, set: (component, value) => component.setValue(value), get: (component) => component.getValue() }),
|
|
@@ -114,9 +116,9 @@ const COMPOSER_ATTRS = attributes({
|
|
|
114
116
|
queue: rebuiltBool(),
|
|
115
117
|
'queue-limit': rebuiltNumber(10),
|
|
116
118
|
msg: messages()
|
|
117
|
-
});
|
|
119
|
+
}))();
|
|
118
120
|
|
|
119
|
-
const BLOCK_VIEW_ATTRS = attributes({
|
|
121
|
+
const BLOCK_VIEW_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
120
122
|
blocks: data({ default: [], set: (component, value) => component.setBlocks(value), get: (component) => component.getBlocks() }),
|
|
121
123
|
'heading-level': rebuiltNumber(3),
|
|
122
124
|
size: rebuiltText({ default: 'sm' }),
|
|
@@ -126,9 +128,9 @@ const BLOCK_VIEW_ATTRS = attributes({
|
|
|
126
128
|
}),
|
|
127
129
|
sources: data({ default: null, set: (component, value) => component.setSources(value) }),
|
|
128
130
|
msg: messages()
|
|
129
|
-
});
|
|
131
|
+
}))();
|
|
130
132
|
|
|
131
|
-
const RUN_TRACE_ATTRS = attributes({
|
|
133
|
+
const RUN_TRACE_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
132
134
|
steps: data({ default: [], set: (component, value) => component.setSteps(value), get: (component) => component.getSteps() }),
|
|
133
135
|
open: bool({ set: (component, value) => (value ? component.expand() : component.collapse()), get: (component) => component.isOpen() }),
|
|
134
136
|
label: text({ default: null, set: (component, value) => component.setLabel(value) }),
|
|
@@ -143,14 +145,15 @@ const RUN_TRACE_ATTRS = attributes({
|
|
|
143
145
|
'format-time': rebuiltProp(),
|
|
144
146
|
icons: rebuiltData({}),
|
|
145
147
|
msg: messages()
|
|
146
|
-
});
|
|
148
|
+
}))();
|
|
147
149
|
|
|
148
|
-
const APPROVAL_CARD_ATTRS = attributes({
|
|
150
|
+
const APPROVAL_CARD_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
149
151
|
// Off the attribute, where the browser would show it as a tooltip over the whole card.
|
|
150
152
|
title: text({ default: '', reflect: false, set: updates('title') }),
|
|
151
153
|
description: text({ default: '', set: updates('description') }),
|
|
152
154
|
icon: text({ default: null, set: updates('icon') }),
|
|
153
155
|
tone: text({ default: 'blue', set: updates('tone') }),
|
|
156
|
+
agent: data({ default: null, set: updates('agent') }),
|
|
154
157
|
'heading-level': rebuiltNumber(3),
|
|
155
158
|
status: text({ default: 'pending', set: (component, value) => component.setStatus(value), get: (component) => component.getStatus() }),
|
|
156
159
|
details: data({ default: null, set: updates('details') }),
|
|
@@ -167,18 +170,18 @@ const APPROVAL_CARD_ATTRS = attributes({
|
|
|
167
170
|
now: rebuiltProp(),
|
|
168
171
|
keys: flag({ rebuild: true }),
|
|
169
172
|
msg: messages()
|
|
170
|
-
});
|
|
173
|
+
}))();
|
|
171
174
|
|
|
172
|
-
const SOURCE_LIST_ATTRS = attributes({
|
|
175
|
+
const SOURCE_LIST_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
173
176
|
sources: data({ default: [], set: (component, value) => component.setSources(value), get: (component) => component.getSources() }),
|
|
174
177
|
label: rebuiltText(),
|
|
175
178
|
layout: rebuiltText({ default: 'chips' }),
|
|
176
179
|
numbered: flag({ rebuild: true }),
|
|
177
180
|
icons: rebuiltData({}),
|
|
178
181
|
msg: messages()
|
|
179
|
-
});
|
|
182
|
+
}))();
|
|
180
183
|
|
|
181
|
-
const RUN_STATUS_ATTRS = attributes({
|
|
184
|
+
const RUN_STATUS_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
182
185
|
state: text({ default: 'queued', set: updates('state') }),
|
|
183
186
|
summary: text({ default: '', set: updates('summary') }),
|
|
184
187
|
steps: data({ default: null, set: updates('steps') }),
|
|
@@ -190,15 +193,16 @@ const RUN_STATUS_ATTRS = attributes({
|
|
|
190
193
|
'token-budget': number({ default: null, set: updates('tokenBudget') }),
|
|
191
194
|
cost: data({ default: null, set: updates('cost') }),
|
|
192
195
|
model: text({ default: null, set: updates('model') }),
|
|
196
|
+
agent: data({ default: null, set: updates('agent') }),
|
|
193
197
|
actions: data({ default: [], set: updates('actions') }),
|
|
194
198
|
ticking: flag({ set: updates('ticking') }),
|
|
195
199
|
compact: text({ default: false, normalize: normalizeCompact, set: updates('compact') }),
|
|
196
200
|
now: rebuiltProp(),
|
|
197
201
|
locale: rebuiltText(),
|
|
198
202
|
msg: messages()
|
|
199
|
-
});
|
|
203
|
+
}))();
|
|
200
204
|
|
|
201
|
-
const RECORD_VIEW_ATTRS = Object.freeze({
|
|
205
|
+
const RECORD_VIEW_ATTRS = /* @__PURE__ */ (() => Object.freeze({
|
|
202
206
|
fields: data({ default: [], set: (component, value) => component.setFields(value), get: (component) => component.getFields() }),
|
|
203
207
|
data: data({ default: [], set: (component, value) => component.setData(value), get: (component) => component.getData() }),
|
|
204
208
|
'record-id': textOrValue({ default: 'ID', rebuild: true }),
|
|
@@ -211,9 +215,9 @@ const RECORD_VIEW_ATTRS = Object.freeze({
|
|
|
211
215
|
'hidden-fields': data({ default: [], set: viewState('hiddenFields'), get: (component) => component.getHiddenFields() }),
|
|
212
216
|
'field-controls': flag({ rebuild: true, serialize: reflectPlain('flag') }),
|
|
213
217
|
'empty-text': textOrValue({ default: null, rebuild: true })
|
|
214
|
-
});
|
|
218
|
+
}))();
|
|
215
219
|
|
|
216
|
-
const CARD_VIEW_ATTRS = attributes({
|
|
220
|
+
const CARD_VIEW_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
217
221
|
...RECORD_VIEW_ATTRS,
|
|
218
222
|
'title-field': textOrValue({ default: null, rebuild: true }),
|
|
219
223
|
'subtitle-field': textOrValue({ default: null, rebuild: true }),
|
|
@@ -233,9 +237,9 @@ const CARD_VIEW_ATTRS = attributes({
|
|
|
233
237
|
'collapsible-groups': rebuiltBool(),
|
|
234
238
|
'collapsed-groups': data({ default: [], set: viewState('collapsedGroups'), get: (component) => component.getCollapsedGroups() }),
|
|
235
239
|
'render-group-heading': rebuiltProp()
|
|
236
|
-
});
|
|
240
|
+
}))();
|
|
237
241
|
|
|
238
|
-
const KANBAN_VIEW_ATTRS = attributes({
|
|
242
|
+
const KANBAN_VIEW_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
239
243
|
...RECORD_VIEW_ATTRS,
|
|
240
244
|
'column-by': textOrValue({ default: 'status', rebuild: true }),
|
|
241
245
|
columns: data({ default: null, set: (component, value) => component.setColumns(value) }),
|
|
@@ -288,9 +292,9 @@ const KANBAN_VIEW_ATTRS = attributes({
|
|
|
288
292
|
'show-empty-columns': flag({ rebuild: true }),
|
|
289
293
|
variant: rebuiltText({ default: 'outlined' }),
|
|
290
294
|
label: rebuiltText()
|
|
291
|
-
});
|
|
295
|
+
}))();
|
|
292
296
|
|
|
293
|
-
const TREE_ATTRS = attributes({
|
|
297
|
+
const TREE_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
294
298
|
items: data({ default: [], set: (component, value) => component.setItems(value), get: (component) => component.getItems() }),
|
|
295
299
|
'value-key': textOrValue({ default: 'ID', rebuild: true }),
|
|
296
300
|
'label-key': textOrValue({ default: 'name', rebuild: true }),
|
|
@@ -310,44 +314,46 @@ const TREE_ATTRS = attributes({
|
|
|
310
314
|
'empty-text': rebuiltText(),
|
|
311
315
|
height: rebuiltText({ default: null, normalize: normalizeNumberOrString }),
|
|
312
316
|
msg: messages()
|
|
313
|
-
});
|
|
317
|
+
}))();
|
|
314
318
|
|
|
315
|
-
const CHART_ATTRS = attributes({
|
|
319
|
+
const CHART_ATTRS = /* @__PURE__ */ (() => attributes({
|
|
316
320
|
adapter: prop({ default: null, set: (component, value) => component.setAdapter(value) }),
|
|
317
321
|
type: text({ default: 'bar', set: (component, value) => component.setType(value) }),
|
|
318
322
|
data: data({ default: { labels: [], datasets: [] }, set: (component, value) => component.setData(value) }),
|
|
319
323
|
'chart-options': data({ default: {}, set: (component, value) => component.update(value) }),
|
|
320
|
-
label:
|
|
321
|
-
description:
|
|
322
|
-
summary:
|
|
324
|
+
label: text({ default: null, set: (component, value) => component.setLabel(value) }),
|
|
325
|
+
description: text({ default: '', set: (component, value) => component.setDescription(value) }),
|
|
326
|
+
summary: text({ default: 'hidden', set: (component, value) => component.setSummary(value) }),
|
|
327
|
+
'summary-format': rebuiltProp(),
|
|
328
|
+
fill: bool({ set: (component, value) => component.setFill(value) }),
|
|
323
329
|
// New data ends a load on its own, so the property reads the chart rather than what it was told.
|
|
324
330
|
loading: bool({ set: (component, value) => component.setLoading(value), get: (component) => component.el.dataset.state === 'loading' }),
|
|
325
331
|
'empty-text': rebuiltText(),
|
|
326
332
|
'loading-text': rebuiltText(),
|
|
327
333
|
'error-text': rebuiltText(),
|
|
328
|
-
'aspect-ratio':
|
|
329
|
-
});
|
|
334
|
+
'aspect-ratio': text({ default: '16 / 9', set: (component, value) => component.setAspectRatio(value) })
|
|
335
|
+
}))();
|
|
330
336
|
|
|
331
|
-
const RECORD_VIEW_METHODS = Object.freeze({
|
|
337
|
+
const RECORD_VIEW_METHODS = /* @__PURE__ */ (() => Object.freeze({
|
|
332
338
|
...forward(
|
|
333
339
|
'setData', 'addData', 'updateRecord', 'removeRecord', 'setFields', 'mountFieldControls', 'setFieldVisible',
|
|
334
340
|
'toggleField', 'moveField', 'setFieldOrder', 'setSort', 'setSelection', 'clearSelection', 'toggleSelection',
|
|
335
341
|
'setLoading'
|
|
336
342
|
),
|
|
337
343
|
setViewState: recordsPatch
|
|
338
|
-
});
|
|
344
|
+
}))();
|
|
339
345
|
|
|
340
|
-
const RECORD_VIEW_EVENTS = Object.freeze([
|
|
346
|
+
const RECORD_VIEW_EVENTS = /* @__PURE__ */ (() => Object.freeze([
|
|
341
347
|
'recordclick', 'recorddblclick', 'datachange', 'selectionchange', 'sortchange', 'fieldvisibilitychange',
|
|
342
348
|
'fieldorderchange', 'statechange', 'recordaction'
|
|
343
|
-
]);
|
|
349
|
+
]))();
|
|
344
350
|
|
|
345
351
|
/**
|
|
346
352
|
* The agent kit and the data views, as `[suffix, Component, wrapper options]`. None of them is a
|
|
347
353
|
* form control, so none is form-associated.
|
|
348
354
|
* @type {ReadonlyArray<[string, typeof import('../core/component.js').Component, import('./define.js').ElementWrapperOptions]>}
|
|
349
355
|
*/
|
|
350
|
-
export const KIT_ELEMENTS = Object.freeze([
|
|
356
|
+
export const KIT_ELEMENTS = /* @__PURE__ */ (() => Object.freeze([
|
|
351
357
|
['agent-thread', AgentThread, {
|
|
352
358
|
attrs: AGENT_THREAD_ATTRS,
|
|
353
359
|
methods: forward(
|
|
@@ -437,8 +443,13 @@ export const KIT_ELEMENTS = Object.freeze([
|
|
|
437
443
|
setType: records('type'),
|
|
438
444
|
update: records('chartOptions'),
|
|
439
445
|
setAdapter: records('adapter'),
|
|
440
|
-
setLoading: ([loading = true]) => ({ loading })
|
|
446
|
+
setLoading: ([loading = true]) => ({ loading }),
|
|
447
|
+
setLabel: records('label'),
|
|
448
|
+
setDescription: records('description'),
|
|
449
|
+
setSummary: records('summary'),
|
|
450
|
+
setAspectRatio: records('aspectRatio'),
|
|
451
|
+
setFill: ([fill = true]) => ({ fill })
|
|
441
452
|
},
|
|
442
453
|
events: ['ready', 'update', 'select', 'error']
|
|
443
454
|
}]
|
|
444
|
-
]);
|
|
455
|
+
]))();
|
package/src/index.js
CHANGED
|
@@ -60,7 +60,7 @@ export {
|
|
|
60
60
|
formatDate, parseDate, clampDate, isSameDay, addDays, addMonths, getWeekStart
|
|
61
61
|
} from './core/date.js';
|
|
62
62
|
export {
|
|
63
|
-
icon, icons, iconNames, registerIcons, ICON_SIZE,
|
|
63
|
+
icon, icons, iconAliases, iconNames, registerIcons, ICON_SIZE,
|
|
64
64
|
configureIcons, getIconConfig, useFontAwesome, useBuiltinIcons, loadFontAwesome
|
|
65
65
|
} from './core/icons.js';
|
|
66
66
|
export {
|
|
@@ -107,11 +107,14 @@ export { Tabbox } from './components/tabbox/tabbox.js';
|
|
|
107
107
|
export { NavigationBar } from './components/navigation-bar/navigation-bar.js';
|
|
108
108
|
export { Stepper } from './components/stepper/stepper.js';
|
|
109
109
|
export { Breadcrumb } from './components/breadcrumb/breadcrumb.js';
|
|
110
|
-
export { Pagination, paginationRange } from './components/pagination/pagination.js';
|
|
110
|
+
export { Pagination, fitPageSize, paginationRange } from './components/pagination/pagination.js';
|
|
111
111
|
export { Search } from './components/search/search.js';
|
|
112
112
|
export { AppIcon, appIcon } from './components/app-icon/app-icon.js';
|
|
113
113
|
export { Launcher, rankLauncherItems } from './components/launcher/launcher.js';
|
|
114
114
|
export { AVATAR_TONES, Avatar, avatarInitials, avatarTone } from './components/avatar/avatar.js';
|
|
115
|
+
export {
|
|
116
|
+
AGENT_BODIES, AGENT_EYES, AgentAvatar, agentFace, agentTraits
|
|
117
|
+
} from './components/agent-avatar/agent-avatar.js';
|
|
115
118
|
export {
|
|
116
119
|
EntityRef, normalizeEntityRef, normalizeEntityRefLink,
|
|
117
120
|
normalizeEntityRefMetadata, normalizeEntityRefActions
|
|
@@ -144,7 +147,7 @@ export { WorkspaceSwitcher } from './components/workspace-switcher/workspace-swi
|
|
|
144
147
|
export { normalizeAppItems } from './internal/app-rail.js';
|
|
145
148
|
export { ModuleBar, partitionModules, resolveModuleColor } from './components/module-bar/module-bar.js';
|
|
146
149
|
export { AppSidebar, presentationGlyph } from './components/app-sidebar/app-sidebar.js';
|
|
147
|
-
export { Message } from './components/message/message.js';
|
|
150
|
+
export { Message, messageStackLayout } from './components/message/message.js';
|
|
148
151
|
export { Modal } from './components/modal/modal.js';
|
|
149
152
|
export { Dialog } from './components/dialog/dialog.js';
|
|
150
153
|
export { Sheet } from './components/sheet/sheet.js';
|
|
@@ -199,8 +202,9 @@ export {
|
|
|
199
202
|
} from './components/kanban-view/kanban-card.js';
|
|
200
203
|
export { Grid, billingColumns, isBillingLine } from './components/grid/grid.js';
|
|
201
204
|
export {
|
|
202
|
-
Chart, ChartJsAdapter, chartSummaryTable, cloneChartValue, isEmptyChartData
|
|
205
|
+
Chart, ChartJsAdapter, chartSummaryModel, chartSummaryTable, cloneChartValue, isEmptyChartData
|
|
203
206
|
} from './components/chart/chart.js';
|
|
207
|
+
export { SvgChartAdapter } from './components/chart/svg-adapter.js';
|
|
204
208
|
export { TreeView } from './components/tree/tree.js';
|
|
205
209
|
export { Finder } from './components/finder/finder.js';
|
|
206
210
|
export { DataFilter } from './components/data-filter/data-filter.js';
|