@cosmicdrift/kumiko-renderer 0.373.0 → 0.377.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/README.md +2 -2
- package/dist/app/action-form-support.d.ts +58 -0
- package/dist/app/action-form-support.js +96 -0
- package/dist/app/client-actions.d.ts +46 -0
- package/dist/app/client-actions.js +60 -0
- package/dist/app/column-renderers.js +1 -1
- package/dist/app/config-edit-shim.js +1 -1
- package/dist/app/content-preview.js +1 -6
- package/dist/app/custom-screens.js +1 -1
- package/dist/app/dashboard-body.d.ts +1 -1
- package/dist/app/entity-list-expanded-row.d.ts +1 -1
- package/dist/app/entity-list-expanded-row.js +4 -0
- package/dist/app/form-schema.d.ts +1 -1
- package/dist/app/form-schema.js +2 -2
- package/dist/app/header-actions-bar.d.ts +19 -0
- package/dist/app/header-actions-bar.js +30 -0
- package/dist/app/kumiko-screen.d.ts +1 -1
- package/dist/app/kumiko-screen.js +134 -66
- package/dist/app/list-empty-content.d.ts +2 -2
- package/dist/app/list-empty-content.js +3 -2
- package/dist/app/list-facets.d.ts +1 -1
- package/dist/app/nav.js +2 -2
- package/dist/app/query-state-banners.d.ts +1 -1
- package/dist/app/reference-link.d.ts +1 -1
- package/dist/app/row-actions.d.ts +10 -2
- package/dist/app/row-actions.js +85 -6
- package/dist/app/secret-mint-body.d.ts +1 -1
- package/dist/app/secrets-edit-body.d.ts +1 -1
- package/dist/app/use-record-actions.d.ts +12 -0
- package/dist/app/use-record-actions.js +30 -0
- package/dist/app/write-failed-error.d.ts +1 -1
- package/dist/components/availability-options-select.d.ts +1 -1
- package/dist/components/embedded-list-field.d.ts +1 -1
- package/dist/components/embedded-list-field.js +1 -1
- package/dist/components/file-list-field.d.ts +1 -1
- package/dist/components/grid-cell-for-field.d.ts +4 -2
- package/dist/components/grid-cell-for-field.js +2 -2
- package/dist/components/multi-select-checkboxes.d.ts +1 -1
- package/dist/components/multi-select-checkboxes.js +1 -1
- package/dist/components/query-options-select.d.ts +1 -1
- package/dist/components/related-list-section.d.ts +1 -1
- package/dist/components/related-list-section.js +16 -3
- package/dist/components/render-edit-logic.d.ts +1 -1
- package/dist/components/render-edit-types.d.ts +2 -2
- package/dist/components/render-edit.d.ts +1 -1
- package/dist/components/render-edit.js +5 -3
- package/dist/components/render-field.d.ts +5 -2
- package/dist/components/render-field.js +103 -9
- package/dist/components/render-list.d.ts +1 -1
- package/dist/components/render-list.js +20 -4
- package/dist/components/write-form-section.d.ts +1 -1
- package/dist/components/write-form-section.js +1 -1
- package/dist/context/dispatcher-context.d.ts +1 -1
- package/dist/format-when.js +1 -1
- package/dist/headless/apex/css.d.ts +3 -0
- package/dist/headless/apex/css.js +298 -0
- package/dist/headless/apex/index.d.ts +236 -0
- package/dist/headless/apex/index.js +377 -0
- package/dist/headless/apex/lightbox.d.ts +4 -0
- package/dist/headless/apex/lightbox.js +81 -0
- package/dist/headless/contracts/asset.d.ts +15 -0
- package/dist/headless/contracts/asset.js +17 -0
- package/dist/headless/contracts/index.d.ts +3 -0
- package/dist/headless/contracts/index.js +1 -0
- package/dist/headless/contracts/locale.d.ts +7 -0
- package/dist/headless/contracts/locale.js +11 -0
- package/dist/headless/contracts/primitives.d.ts +93 -0
- package/dist/headless/contracts/primitives.js +21 -0
- package/dist/headless/dispatcher/index.d.ts +2 -0
- package/dist/headless/dispatcher/index.js +1 -0
- package/dist/headless/dispatcher/types.d.ts +86 -0
- package/dist/headless/dispatcher/types.js +34 -0
- package/dist/headless/form/form-controller.d.ts +2 -0
- package/dist/headless/form/form-controller.js +409 -0
- package/dist/headless/form/index.d.ts +3 -0
- package/dist/headless/form/index.js +2 -0
- package/dist/headless/form/types.d.ts +76 -0
- package/dist/headless/form/types.js +1 -0
- package/dist/headless/form/zod-bridge.d.ts +10 -0
- package/dist/headless/form/zod-bridge.js +103 -0
- package/dist/headless/format/document-values.d.ts +12 -0
- package/dist/headless/format/document-values.js +70 -0
- package/dist/headless/format/escape.d.ts +5 -0
- package/dist/headless/format/escape.js +75 -0
- package/dist/headless/format/html-template.d.ts +9 -0
- package/dist/headless/format/html-template.js +39 -0
- package/dist/headless/format/index.d.ts +12 -0
- package/dist/headless/format/index.js +237 -0
- package/dist/headless/format/money.d.ts +3 -0
- package/dist/headless/format/money.js +39 -0
- package/dist/headless/index.d.ts +14 -0
- package/dist/headless/index.js +9 -0
- package/dist/headless/locale-routing/index.d.ts +41 -0
- package/dist/headless/locale-routing/index.js +145 -0
- package/dist/headless/nav/index.d.ts +2 -0
- package/dist/headless/nav/index.js +1 -0
- package/dist/headless/nav/resolve.d.ts +2 -0
- package/dist/headless/nav/resolve.js +71 -0
- package/dist/headless/nav/types.d.ts +26 -0
- package/dist/headless/nav/types.js +1 -0
- package/dist/headless/store/create-store.d.ts +2 -0
- package/dist/headless/store/create-store.js +43 -0
- package/dist/headless/store/equality.d.ts +1 -0
- package/dist/headless/store/equality.js +34 -0
- package/dist/headless/store/index.d.ts +3 -0
- package/dist/headless/store/index.js +2 -0
- package/dist/headless/store/types.d.ts +7 -0
- package/dist/headless/store/types.js +10 -0
- package/dist/headless/view-model/edit.d.ts +18 -0
- package/dist/headless/view-model/edit.js +501 -0
- package/dist/headless/view-model/embedded-list.d.ts +27 -0
- package/dist/headless/view-model/embedded-list.js +63 -0
- package/dist/headless/view-model/index.d.ts +7 -0
- package/dist/headless/view-model/index.js +3 -0
- package/dist/headless/view-model/list-file-display.d.ts +3 -0
- package/dist/headless/view-model/list-file-display.js +27 -0
- package/dist/headless/view-model/list.d.ts +16 -0
- package/dist/headless/view-model/list.js +229 -0
- package/dist/headless/view-model/types.d.ts +382 -0
- package/dist/headless/view-model/types.js +1 -0
- package/dist/hooks/use-ai-text.d.ts +1 -1
- package/dist/hooks/use-form.d.ts +1 -1
- package/dist/hooks/use-form.js +1 -1
- package/dist/hooks/use-mutation.d.ts +1 -1
- package/dist/hooks/use-query.d.ts +1 -1
- package/dist/hooks/use-store.d.ts +1 -1
- package/dist/hooks/use-store.js +7 -7
- package/dist/hooks/use-stream-handler.d.ts +1 -1
- package/dist/i18n-defaults.js +7 -0
- package/dist/i18n.d.ts +1 -1
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +7 -4
- package/dist/live/csrf.d.ts +2 -0
- package/dist/live/csrf.js +60 -0
- package/dist/live/dispatcher-live.d.ts +7 -0
- package/dist/live/dispatcher-live.js +286 -0
- package/dist/live/envelopes.d.ts +101 -0
- package/dist/live/envelopes.js +35 -0
- package/dist/live/error-mapping.d.ts +16 -0
- package/dist/live/error-mapping.js +82 -0
- package/dist/live/index.d.ts +7 -0
- package/dist/live/index.js +5 -0
- package/dist/live/locale.d.ts +2 -0
- package/dist/live/locale.js +25 -0
- package/dist/live/sse-stream.d.ts +14 -0
- package/dist/live/sse-stream.js +128 -0
- package/dist/primitives.d.ts +53 -36
- package/dist/primitives.js +1 -1
- package/dist/session/session-ended.d.ts +1 -1
- package/dist/tokens.d.ts +3 -4
- package/dist/tokens.js +4 -5
- package/dist/web/app/app-schema-boot.d.ts +19 -0
- package/dist/web/app/app-schema-boot.js +124 -0
- package/dist/web/app/browser-locale.d.ts +22 -0
- package/dist/web/app/browser-locale.js +78 -0
- package/dist/web/app/client-plugin.d.ts +106 -0
- package/dist/web/app/client-plugin.js +12 -0
- package/dist/web/app/create-app.d.ts +104 -0
- package/dist/web/app/create-app.js +498 -0
- package/dist/web/app/create-public-surface.d.ts +36 -0
- package/dist/web/app/create-public-surface.js +40 -0
- package/dist/web/app/dashboard-body.d.ts +3 -0
- package/dist/web/app/dashboard-body.js +865 -0
- package/dist/web/app/dashboard-refresh.d.ts +6 -0
- package/dist/web/app/dashboard-refresh.js +15 -0
- package/dist/web/app/document-lang-sync.d.ts +4 -0
- package/dist/web/app/document-lang-sync.js +27 -0
- package/dist/web/app/draft-storage.d.ts +11 -0
- package/dist/web/app/draft-storage.js +53 -0
- package/dist/web/app/nav-providers-context.d.ts +13 -0
- package/dist/web/app/nav-providers-context.js +18 -0
- package/dist/web/app/nav.d.ts +40 -0
- package/dist/web/app/nav.js +231 -0
- package/dist/web/app/plain-content-editor.d.ts +3 -0
- package/dist/web/app/plain-content-editor.js +30 -0
- package/dist/web/app/relative-time.d.ts +10 -0
- package/dist/web/app/relative-time.js +56 -0
- package/dist/web/app/resolvers-context.d.ts +12 -0
- package/dist/web/app/resolvers-context.js +10 -0
- package/dist/web/app/rich-content-editor.d.ts +3 -0
- package/dist/web/app/rich-content-editor.js +15 -0
- package/dist/web/app/root-error-fallback.d.ts +2 -0
- package/dist/web/app/root-error-fallback.js +21 -0
- package/dist/web/app/screen-error-fallback.d.ts +6 -0
- package/dist/web/app/screen-error-fallback.js +17 -0
- package/dist/web/app/tiptap-editor.d.ts +3 -0
- package/dist/web/app/tiptap-editor.js +120 -0
- package/dist/web/app/toast-action-notifier.d.ts +5 -0
- package/dist/web/app/toast-action-notifier.js +17 -0
- package/dist/web/components/config-cascade.d.ts +13 -0
- package/dist/web/components/config-cascade.js +155 -0
- package/dist/web/components/config-source-badge.d.ts +6 -0
- package/dist/web/components/config-source-badge.js +55 -0
- package/dist/web/default-color-scheme.d.ts +2 -0
- package/dist/web/default-color-scheme.js +3 -0
- package/dist/web/icons.d.ts +94 -0
- package/dist/web/icons.js +100 -0
- package/dist/web/index.d.ts +78 -0
- package/dist/web/index.js +53 -0
- package/dist/web/layout/app-layout.d.ts +21 -0
- package/dist/web/layout/app-layout.js +8 -0
- package/dist/web/layout/avatar.d.ts +12 -0
- package/dist/web/layout/avatar.js +63 -0
- package/dist/web/layout/default-app-shell.d.ts +41 -0
- package/dist/web/layout/default-app-shell.js +16 -0
- package/dist/web/layout/editor-panel.d.ts +10 -0
- package/dist/web/layout/editor-panel.js +29 -0
- package/dist/web/layout/fill-classes.d.ts +9 -0
- package/dist/web/layout/fill-classes.js +15 -0
- package/dist/web/layout/filter-app-schema-navs.d.ts +7 -0
- package/dist/web/layout/filter-app-schema-navs.js +68 -0
- package/dist/web/layout/header-action-group.d.ts +6 -0
- package/dist/web/layout/header-action-group.js +8 -0
- package/dist/web/layout/header-overflow-menu.d.ts +4 -0
- package/dist/web/layout/header-overflow-menu.js +8 -0
- package/dist/web/layout/language-menu-items.d.ts +8 -0
- package/dist/web/layout/language-menu-items.js +16 -0
- package/dist/web/layout/language-switcher.d.ts +25 -0
- package/dist/web/layout/language-switcher.js +46 -0
- package/dist/web/layout/nav-tree.d.ts +19 -0
- package/dist/web/layout/nav-tree.js +536 -0
- package/dist/web/layout/page-header-slot.d.ts +25 -0
- package/dist/web/layout/page-header-slot.js +50 -0
- package/dist/web/layout/profile-menu.d.ts +13 -0
- package/dist/web/layout/profile-menu.js +6 -0
- package/dist/web/layout/shell-breadcrumb.d.ts +11 -0
- package/dist/web/layout/shell-breadcrumb.js +34 -0
- package/dist/web/layout/shell-header.d.ts +12 -0
- package/dist/web/layout/shell-header.js +159 -0
- package/dist/web/layout/sidebar-brand.d.ts +15 -0
- package/dist/web/layout/sidebar-brand.js +9 -0
- package/dist/web/layout/sidebar-panel.d.ts +41 -0
- package/dist/web/layout/sidebar-panel.js +107 -0
- package/dist/web/layout/sidebar-user.d.ts +8 -0
- package/dist/web/layout/sidebar-user.js +17 -0
- package/dist/web/layout/sidebar.d.ts +17 -0
- package/dist/web/layout/sidebar.js +11 -0
- package/dist/web/layout/target-resolver-stub.d.ts +13 -0
- package/dist/web/layout/target-resolver-stub.js +61 -0
- package/dist/web/layout/target-url.d.ts +12 -0
- package/dist/web/layout/target-url.js +77 -0
- package/dist/web/layout/theme-label.d.ts +15 -0
- package/dist/web/layout/theme-label.js +35 -0
- package/dist/web/layout/theme-menu-item.d.ts +12 -0
- package/dist/web/layout/theme-menu-item.js +16 -0
- package/dist/web/layout/theme-toggle.d.ts +17 -0
- package/dist/web/layout/theme-toggle.js +22 -0
- package/dist/web/layout/topbar.d.ts +8 -0
- package/dist/web/layout/topbar.js +4 -0
- package/dist/web/layout/workspace-shell.d.ts +63 -0
- package/dist/web/layout/workspace-shell.js +220 -0
- package/dist/web/layout/workspace-switcher.d.ts +15 -0
- package/dist/web/layout/workspace-switcher.js +36 -0
- package/dist/web/lib/accept-attr.d.ts +1 -0
- package/dist/web/lib/accept-attr.js +6 -0
- package/dist/web/lib/clamp.d.ts +1 -0
- package/dist/web/lib/clamp.js +3 -0
- package/dist/web/lib/cn.d.ts +6 -0
- package/dist/web/lib/cn.js +9 -0
- package/dist/web/lib/download.d.ts +2 -0
- package/dist/web/lib/download.js +24 -0
- package/dist/web/lib/file-ref-download.d.ts +15 -0
- package/dist/web/lib/file-ref-download.js +62 -0
- package/dist/web/lib/file-upload-form-data.d.ts +7 -0
- package/dist/web/lib/file-upload-form-data.js +11 -0
- package/dist/web/lib/resize-image.d.ts +1 -0
- package/dist/web/lib/resize-image.js +66 -0
- package/dist/web/lib/upload-file-ref.d.ts +9 -0
- package/dist/web/lib/upload-file-ref.js +29 -0
- package/dist/web/primitives/action-menu.d.ts +34 -0
- package/dist/web/primitives/action-menu.js +30 -0
- package/dist/web/primitives/calendar-popover.d.ts +13 -0
- package/dist/web/primitives/calendar-popover.js +76 -0
- package/dist/web/primitives/combobox.d.ts +56 -0
- package/dist/web/primitives/combobox.js +127 -0
- package/dist/web/primitives/date-field.d.ts +18 -0
- package/dist/web/primitives/date-field.js +74 -0
- package/dist/web/primitives/date-input.d.ts +1 -0
- package/dist/web/primitives/date-input.js +5 -0
- package/dist/web/primitives/date-parse.d.ts +11 -0
- package/dist/web/primitives/date-parse.js +159 -0
- package/dist/web/primitives/dialog.d.ts +3 -0
- package/dist/web/primitives/dialog.js +42 -0
- package/dist/web/primitives/drawer.d.ts +3 -0
- package/dist/web/primitives/drawer.js +17 -0
- package/dist/web/primitives/dropdown-menu.d.ts +15 -0
- package/dist/web/primitives/dropdown-menu.js +56 -0
- package/dist/web/primitives/embedded-list-input.d.ts +9 -0
- package/dist/web/primitives/embedded-list-input.js +382 -0
- package/dist/web/primitives/file-thumbnail.d.ts +25 -0
- package/dist/web/primitives/file-thumbnail.js +90 -0
- package/dist/web/primitives/file-upload.d.ts +21 -0
- package/dist/web/primitives/file-upload.js +56 -0
- package/dist/web/primitives/index.d.ts +34 -0
- package/dist/web/primitives/index.js +2021 -0
- package/dist/web/primitives/json-view.d.ts +7 -0
- package/dist/web/primitives/json-view.js +84 -0
- package/dist/web/primitives/layout.d.ts +27 -0
- package/dist/web/primitives/layout.js +30 -0
- package/dist/web/primitives/lightbox.d.ts +3 -0
- package/dist/web/primitives/lightbox.js +36 -0
- package/dist/web/primitives/locale-number.d.ts +2 -0
- package/dist/web/primitives/locale-number.js +54 -0
- package/dist/web/primitives/located-timestamp-input.d.ts +22 -0
- package/dist/web/primitives/located-timestamp-input.js +22 -0
- package/dist/web/primitives/metric.d.ts +5 -0
- package/dist/web/primitives/metric.js +18 -0
- package/dist/web/primitives/modal-shell.d.ts +17 -0
- package/dist/web/primitives/modal-shell.js +9 -0
- package/dist/web/primitives/modal.d.ts +3 -0
- package/dist/web/primitives/modal.js +13 -0
- package/dist/web/primitives/money-input.d.ts +18 -0
- package/dist/web/primitives/money-input.js +122 -0
- package/dist/web/primitives/narrow-pinned-footer.d.ts +12 -0
- package/dist/web/primitives/narrow-pinned-footer.js +153 -0
- package/dist/web/primitives/number-input.d.ts +18 -0
- package/dist/web/primitives/number-input.js +53 -0
- package/dist/web/primitives/option-groups.d.ts +11 -0
- package/dist/web/primitives/option-groups.js +27 -0
- package/dist/web/primitives/page-header.d.ts +3 -0
- package/dist/web/primitives/page-header.js +52 -0
- package/dist/web/primitives/promo-panel.d.ts +3 -0
- package/dist/web/primitives/promo-panel.js +11 -0
- package/dist/web/primitives/segmented-select.d.ts +21 -0
- package/dist/web/primitives/segmented-select.js +62 -0
- package/dist/web/primitives/share-actions.d.ts +4 -0
- package/dist/web/primitives/share-actions.js +56 -0
- package/dist/web/primitives/status-badge.d.ts +3 -0
- package/dist/web/primitives/status-badge.js +5 -0
- package/dist/web/primitives/sticky-action-bar.d.ts +5 -0
- package/dist/web/primitives/sticky-action-bar.js +15 -0
- package/dist/web/primitives/tabs.d.ts +3 -0
- package/dist/web/primitives/tabs.js +107 -0
- package/dist/web/primitives/timestamp-input.d.ts +27 -0
- package/dist/web/primitives/timestamp-input.js +87 -0
- package/dist/web/primitives/toast.d.ts +19 -0
- package/dist/web/primitives/toast.js +63 -0
- package/dist/web/primitives/tz-input.d.ts +11 -0
- package/dist/web/primitives/tz-input.js +8 -0
- package/dist/web/primitives/tz-options.d.ts +4 -0
- package/dist/web/primitives/tz-options.js +17 -0
- package/dist/web/primitives/use-keyboard-inset.d.ts +1 -0
- package/dist/web/primitives/use-keyboard-inset.js +28 -0
- package/dist/web/primitives/use-narrow-viewport.d.ts +4 -0
- package/dist/web/primitives/use-narrow-viewport.js +46 -0
- package/dist/web/react-css-custom-properties.d.ts +6 -0
- package/dist/web/react-css-custom-properties.js +1 -0
- package/dist/web/sse/live-events.d.ts +15 -0
- package/dist/web/sse/live-events.js +148 -0
- package/dist/web/theme-plugin.d.ts +41 -0
- package/dist/web/theme-plugin.js +123 -0
- package/dist/web/tokens.d.ts +24 -0
- package/dist/web/tokens.js +203 -0
- package/dist/web/ui/avatar.d.ts +11 -0
- package/dist/web/ui/avatar.js +25 -0
- package/dist/web/ui/badge.d.ts +9 -0
- package/dist/web/ui/badge.js +26 -0
- package/dist/web/ui/breadcrumb.d.ts +11 -0
- package/dist/web/ui/breadcrumb.js +29 -0
- package/dist/web/ui/button.d.ts +10 -0
- package/dist/web/ui/button.js +37 -0
- package/dist/web/ui/checkbox.d.ts +4 -0
- package/dist/web/ui/checkbox.js +11 -0
- package/dist/web/ui/input.d.ts +3 -0
- package/dist/web/ui/input.js +8 -0
- package/dist/web/ui/label.d.ts +4 -0
- package/dist/web/ui/label.js +10 -0
- package/dist/web/ui/resizable.d.ts +7 -0
- package/dist/web/ui/resizable.js +16 -0
- package/dist/web/ui/separator.d.ts +4 -0
- package/dist/web/ui/separator.js +10 -0
- package/dist/web/ui/sheet.d.ts +14 -0
- package/dist/web/ui/sheet.js +42 -0
- package/dist/web/ui/sidebar.d.ts +73 -0
- package/dist/web/ui/sidebar.js +211 -0
- package/dist/web/ui/skeleton.d.ts +2 -0
- package/dist/web/ui/skeleton.js +7 -0
- package/dist/web/ui/switch.d.ts +6 -0
- package/dist/web/ui/switch.js +10 -0
- package/dist/web/ui/table.d.ts +10 -0
- package/dist/web/ui/table.js +30 -0
- package/dist/web/ui/tabs.d.ts +11 -0
- package/dist/web/ui/tabs.js +31 -0
- package/dist/web/ui/textarea.d.ts +3 -0
- package/dist/web/ui/textarea.js +8 -0
- package/dist/web/ui/tooltip.d.ts +7 -0
- package/dist/web/ui/tooltip.js +19 -0
- package/dist/web/ui/use-mobile.d.ts +1 -0
- package/dist/web/ui/use-mobile.js +16 -0
- package/dist/web/version/update-checker.d.ts +9 -0
- package/dist/web/version/update-checker.js +88 -0
- package/dist/web/widgets/ai-text-field.d.ts +36 -0
- package/dist/web/widgets/ai-text-field.js +137 -0
- package/dist/web/widgets/chart-window.d.ts +58 -0
- package/dist/web/widgets/chart-window.js +190 -0
- package/dist/web/widgets/charts.d.ts +208 -0
- package/dist/web/widgets/charts.js +685 -0
- package/dist/web/widgets/collapsible-section.d.ts +10 -0
- package/dist/web/widgets/collapsible-section.js +17 -0
- package/dist/web/widgets/dashboard-list.d.ts +21 -0
- package/dist/web/widgets/dashboard-list.js +45 -0
- package/dist/web/widgets/detail-list.d.ts +15 -0
- package/dist/web/widgets/detail-list.js +8 -0
- package/dist/web/widgets/drawer.d.ts +65 -0
- package/dist/web/widgets/drawer.js +142 -0
- package/dist/web/widgets/feed-list.d.ts +13 -0
- package/dist/web/widgets/feed-list.js +9 -0
- package/dist/web/widgets/floating-panel.d.ts +30 -0
- package/dist/web/widgets/floating-panel.js +242 -0
- package/dist/web/widgets/form-fields.d.ts +93 -0
- package/dist/web/widgets/form-fields.js +50 -0
- package/dist/web/widgets/index.d.ts +27 -0
- package/dist/web/widgets/index.js +30 -0
- package/dist/web/widgets/infinity-list.d.ts +46 -0
- package/dist/web/widgets/infinity-list.js +211 -0
- package/dist/web/widgets/mode-switch.d.ts +21 -0
- package/dist/web/widgets/mode-switch.js +25 -0
- package/dist/web/widgets/photo-slots.d.ts +29 -0
- package/dist/web/widgets/photo-slots.js +52 -0
- package/dist/web/widgets/plan-card.d.ts +36 -0
- package/dist/web/widgets/plan-card.js +13 -0
- package/dist/web/widgets/progress-bar.d.ts +19 -0
- package/dist/web/widgets/progress-bar.js +24 -0
- package/dist/web/widgets/progress-list.d.ts +19 -0
- package/dist/web/widgets/progress-list.js +11 -0
- package/dist/web/widgets/public-shell.d.ts +22 -0
- package/dist/web/widgets/public-shell.js +15 -0
- package/dist/web/widgets/query-table.d.ts +29 -0
- package/dist/web/widgets/query-table.js +30 -0
- package/dist/web/widgets/result-panel.d.ts +69 -0
- package/dist/web/widgets/result-panel.js +30 -0
- package/dist/web/widgets/section-card.d.ts +12 -0
- package/dist/web/widgets/section-card.js +9 -0
- package/dist/web/widgets/sheet-parts.d.ts +9 -0
- package/dist/web/widgets/sheet-parts.js +11 -0
- package/dist/web/widgets/side-by-side-table.d.ts +31 -0
- package/dist/web/widgets/side-by-side-table.js +11 -0
- package/dist/web/widgets/stat.d.ts +54 -0
- package/dist/web/widgets/stat.js +65 -0
- package/dist/web/widgets/states.d.ts +23 -0
- package/dist/web/widgets/states.js +20 -0
- package/dist/web/widgets/status-badge.d.ts +15 -0
- package/dist/web/widgets/status-badge.js +24 -0
- package/dist/web/widgets/step-bar.d.ts +35 -0
- package/dist/web/widgets/step-bar.js +60 -0
- package/dist/web/widgets/upload-zone.d.ts +24 -0
- package/dist/web/widgets/upload-zone.js +108 -0
- package/dist/web/widgets/use-draft.d.ts +20 -0
- package/dist/web/widgets/use-draft.js +21 -0
- package/dist/web/widgets/use-pointer-drag.d.ts +21 -0
- package/dist/web/widgets/use-pointer-drag.js +53 -0
- package/package.json +105 -7
- package/src/changes.json +77 -0
- package/src/web/fonts/OFL.txt +93 -0
- package/src/web/fonts/ibm-plex-mono-latin-400.woff2 +0 -0
- package/src/web/fonts/ibm-plex-mono-latin-500.woff2 +0 -0
- package/src/web/fonts/ibm-plex-mono-latin-ext-400.woff2 +0 -0
- package/src/web/fonts/ibm-plex-mono-latin-ext-500.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-400.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-500.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-600.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-ext-400.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-ext-500.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-ext-600.woff2 +0 -0
- package/src/web/styles.css +401 -0
package/dist/app/row-actions.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { evalFieldCondition } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
2
|
import { resolveActionIcon } from "@cosmicdrift/kumiko-types/action-icon";
|
|
3
|
+
import { runClientAction } from "./client-actions.js";
|
|
3
4
|
import { lastSegment } from "./qn.js";
|
|
4
5
|
import { navigateWithReturnTo } from "./return-to.js";
|
|
5
6
|
import { dispatcherErrorText, WriteFailedError } from "./write-failed-error.js";
|
|
@@ -119,8 +120,16 @@ function warnDrawerActionDropped(actionKind, actionId) {
|
|
|
119
120
|
// biome-ignore lint/suspicious/noConsole: dev-warning for a setup error
|
|
120
121
|
console.warn(`[kumiko] ${actionKind} "${actionId}" is kind:"drawer", but the host did not wire openDrawer (RelatedListSection: pass onOpenDrawer) — it will not render.`);
|
|
121
122
|
}
|
|
123
|
+
export function runDrawerRowAction(action, openDrawer, row) {
|
|
124
|
+
openDrawer(action, action.params !== undefined ? evalRowExtractor(action.params, row.values) : undefined);
|
|
125
|
+
}
|
|
126
|
+
/** The action that claims the row-body click (`rowClick: true`); the boot
|
|
127
|
+
* validator allows at most one per list. */
|
|
128
|
+
export function findRowClickAction(rowActions) {
|
|
129
|
+
return rowActions?.find((a) => (a.kind === "navigate" || a.kind === "drawer") && a.rowClick === true);
|
|
130
|
+
}
|
|
122
131
|
export function buildDrawerRowAction(action, translate, openDrawer) {
|
|
123
|
-
const { visible
|
|
132
|
+
const { visible } = action;
|
|
124
133
|
const actionIcon = resolveActionIcon(action.id, action.icon);
|
|
125
134
|
return {
|
|
126
135
|
id: action.id,
|
|
@@ -128,10 +137,9 @@ export function buildDrawerRowAction(action, translate, openDrawer) {
|
|
|
128
137
|
...(action.style !== undefined && { style: action.style }),
|
|
129
138
|
...(action.display !== undefined && { display: action.display }),
|
|
130
139
|
confirmRequired: false,
|
|
140
|
+
...(action.rowClick === true && { rowClick: true }),
|
|
131
141
|
...(actionIcon !== undefined && { icon: actionIcon }),
|
|
132
|
-
onTrigger: (row) =>
|
|
133
|
-
openDrawer(action, params !== undefined ? evalRowExtractor(params, row.values) : undefined);
|
|
134
|
-
},
|
|
142
|
+
onTrigger: (row) => runDrawerRowAction(action, openDrawer, row),
|
|
135
143
|
...(visible !== undefined && {
|
|
136
144
|
isVisible: (row) => evalFieldCondition(visible, row.values),
|
|
137
145
|
}),
|
|
@@ -172,6 +180,36 @@ function buildWriteHandlerRowAction(action, translate, refetch, dispatcher) {
|
|
|
172
180
|
}),
|
|
173
181
|
};
|
|
174
182
|
}
|
|
183
|
+
function clientActionPayload(action, values, defaultId) {
|
|
184
|
+
return action.payload !== undefined
|
|
185
|
+
? evalRowExtractor(action.payload, values)
|
|
186
|
+
: { id: defaultId };
|
|
187
|
+
}
|
|
188
|
+
export function buildClientActionRowAction(action, translate, runtime, refetch) {
|
|
189
|
+
const { visible } = action;
|
|
190
|
+
return {
|
|
191
|
+
id: action.id,
|
|
192
|
+
label: translate(action.label),
|
|
193
|
+
...(action.style !== undefined && { style: action.style }),
|
|
194
|
+
...(action.display !== undefined && { display: action.display }),
|
|
195
|
+
icon: resolveActionIcon(action.id, action.icon),
|
|
196
|
+
...(action.confirm !== undefined && { confirm: translate(action.confirm) }),
|
|
197
|
+
...(action.confirmLabel !== undefined && { confirmLabel: translate(action.confirmLabel) }),
|
|
198
|
+
onTrigger: async (row) => {
|
|
199
|
+
const succeeded = await runClientAction({
|
|
200
|
+
action,
|
|
201
|
+
payload: clientActionPayload(action, row.values, row.values["id"]),
|
|
202
|
+
runtime,
|
|
203
|
+
translate,
|
|
204
|
+
});
|
|
205
|
+
if (succeeded)
|
|
206
|
+
await refetchAfterWrite(refetch);
|
|
207
|
+
},
|
|
208
|
+
...(visible !== undefined && {
|
|
209
|
+
isVisible: (row) => evalFieldCondition(visible, row.values),
|
|
210
|
+
}),
|
|
211
|
+
};
|
|
212
|
+
}
|
|
175
213
|
// Builds the DataTable-ready row-action set for a query-driven row source
|
|
176
214
|
// (projectionList, relatedList) — navigate dispatches through
|
|
177
215
|
// runProjectionRowNavigate, writeHandler dispatches through the shared
|
|
@@ -179,7 +217,7 @@ function buildWriteHandlerRowAction(action, translate, refetch, dispatcher) {
|
|
|
179
217
|
// projectionList's rowActions and a projectionDetail relatedList section's
|
|
180
218
|
// rowActions can't drift apart (fw editable-detail-screens).
|
|
181
219
|
export function buildProjectionRowActions(options) {
|
|
182
|
-
const { rowActions, translate, dispatcher, nav, refetch, openDrawer, defaultEditRowAction, host, } = options;
|
|
220
|
+
const { rowActions, translate, dispatcher, nav, refetch, openDrawer, defaultEditRowAction, host, clientActions, } = options;
|
|
183
221
|
const effectiveActions = mergeDefaultEditAction(rowActions, defaultEditRowAction);
|
|
184
222
|
if (effectiveActions.length === 0)
|
|
185
223
|
return undefined;
|
|
@@ -197,6 +235,10 @@ export function buildProjectionRowActions(options) {
|
|
|
197
235
|
out.push(buildDrawerRowAction(action, translate, openDrawer));
|
|
198
236
|
continue;
|
|
199
237
|
}
|
|
238
|
+
if (action.kind === "clientAction") {
|
|
239
|
+
out.push(buildClientActionRowAction(action, translate, clientActions, refetch));
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
200
242
|
// writeHandler (default-kind) — a swallowed failure result must become a
|
|
201
243
|
// thrown error (fw prod-bug 2026-06-07), same as every other write path.
|
|
202
244
|
if (dispatcher === undefined)
|
|
@@ -369,6 +411,31 @@ function buildDrawerRecordAction(action, options) {
|
|
|
369
411
|
},
|
|
370
412
|
};
|
|
371
413
|
}
|
|
414
|
+
function buildClientActionRecordAction(action, options) {
|
|
415
|
+
const { record, translate, actionIcon, runtime, onWriteSuccess, defaultWritePayloadId, discardChanges, } = options;
|
|
416
|
+
const confirm = withDiscardHint(action.confirm !== undefined ? translate(action.confirm) : undefined, discardChanges);
|
|
417
|
+
const confirmLabel = discardChanges?.confirmLabel ??
|
|
418
|
+
(action.confirmLabel !== undefined ? translate(action.confirmLabel) : undefined);
|
|
419
|
+
return {
|
|
420
|
+
id: action.id,
|
|
421
|
+
label: translate(action.label),
|
|
422
|
+
...(action.style !== undefined && { style: action.style }),
|
|
423
|
+
...(action.display !== undefined && { display: action.display }),
|
|
424
|
+
...(actionIcon !== undefined && { icon: actionIcon }),
|
|
425
|
+
...(confirm !== undefined && { confirm }),
|
|
426
|
+
...(confirmLabel !== undefined && { confirmLabel }),
|
|
427
|
+
onPress: async () => {
|
|
428
|
+
const succeeded = await runClientAction({
|
|
429
|
+
action,
|
|
430
|
+
payload: clientActionPayload(action, record, defaultWritePayloadId ?? record["id"]),
|
|
431
|
+
runtime,
|
|
432
|
+
translate,
|
|
433
|
+
});
|
|
434
|
+
if (succeeded)
|
|
435
|
+
await onWriteSuccess();
|
|
436
|
+
},
|
|
437
|
+
};
|
|
438
|
+
}
|
|
372
439
|
// Entity delete handler QN: `<feature>:write:<entity>:delete` (see
|
|
373
440
|
// entityWriteCommand in kumiko-screen.tsx).
|
|
374
441
|
const ENTITY_DELETE_HANDLER_PATTERN = /:write:[^:]+:delete$/;
|
|
@@ -417,7 +484,7 @@ function buildWriteHandlerRecordAction(action, options) {
|
|
|
417
484
|
// resolved against the record currently being viewed/edited, independent of
|
|
418
485
|
// any table row.
|
|
419
486
|
export function buildRecordActions(options) {
|
|
420
|
-
const { actions, record, translate, nav, host, dispatcher, openDrawer, onWriteSuccess, onRecordLeft, defaultScreenTargetEntityId, sameEntityScreenId, defaultWritePayloadId, discardChanges, } = options;
|
|
487
|
+
const { actions, record, translate, nav, host, dispatcher, openDrawer, onWriteSuccess, onRecordLeft, defaultScreenTargetEntityId, sameEntityScreenId, defaultWritePayloadId, discardChanges, clientActions, } = options;
|
|
421
488
|
const out = [];
|
|
422
489
|
for (const action of actions) {
|
|
423
490
|
if (action.visible !== undefined && !evalFieldCondition(action.visible, record))
|
|
@@ -447,6 +514,18 @@ export function buildRecordActions(options) {
|
|
|
447
514
|
}));
|
|
448
515
|
continue;
|
|
449
516
|
}
|
|
517
|
+
if (action.kind === "clientAction") {
|
|
518
|
+
out.push(buildClientActionRecordAction(action, {
|
|
519
|
+
record,
|
|
520
|
+
translate,
|
|
521
|
+
actionIcon,
|
|
522
|
+
runtime: clientActions,
|
|
523
|
+
onWriteSuccess,
|
|
524
|
+
defaultWritePayloadId,
|
|
525
|
+
discardChanges,
|
|
526
|
+
}));
|
|
527
|
+
continue;
|
|
528
|
+
}
|
|
450
529
|
// writeHandler — skip without a dispatcher instead of crashing.
|
|
451
530
|
if (dispatcher === undefined)
|
|
452
531
|
continue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SecretMintScreenDefinition } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
-
import type { Translate } from "@cosmicdrift/kumiko-headless";
|
|
3
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import type { Translate } from "../headless/index.ts";
|
|
4
4
|
import type { FeatureSchema } from "./feature-schema.ts";
|
|
5
5
|
export type SecretMintBodyProps = {
|
|
6
6
|
readonly schema: FeatureSchema;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SecretsEditScreenDefinition } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
-
import type { Translate } from "@cosmicdrift/kumiko-headless";
|
|
3
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import type { Translate } from "../headless/index.ts";
|
|
4
4
|
export type SecretsEditBodyProps = {
|
|
5
5
|
readonly screen: SecretsEditScreenDefinition;
|
|
6
6
|
readonly translate?: Translate;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RowAction } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
+
import type { RenderEditAction } from "../components/render-edit-types.ts";
|
|
3
|
+
import type { Translate } from "../headless/index.ts";
|
|
4
|
+
/** Header actions on a record shown by a screen that has no drawer host
|
|
5
|
+
* (dashboards): writeHandler, navigate and clientAction, `onWriteSuccess` after a success. */
|
|
6
|
+
export declare function useRecordActions(options: {
|
|
7
|
+
readonly actions: readonly RowAction[] | undefined;
|
|
8
|
+
readonly record: Readonly<Record<string, unknown>>;
|
|
9
|
+
readonly recordId: string;
|
|
10
|
+
readonly translate: Translate;
|
|
11
|
+
readonly onWriteSuccess: () => void | Promise<void>;
|
|
12
|
+
}): readonly RenderEditAction[] | undefined;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useOptionalDispatcher } from "../context/dispatcher-context.js";
|
|
3
|
+
import { useClientActionRuntime } from "./client-actions.js";
|
|
4
|
+
import { useNav } from "./nav.js";
|
|
5
|
+
import { useReturnHost } from "./return-to.js";
|
|
6
|
+
import { buildRecordActions } from "./row-actions.js";
|
|
7
|
+
const NO_DRAWER = () => { };
|
|
8
|
+
/** Header actions on a record shown by a screen that has no drawer host
|
|
9
|
+
* (dashboards): writeHandler, navigate and clientAction, `onWriteSuccess` after a success. */
|
|
10
|
+
export function useRecordActions(options) {
|
|
11
|
+
const { actions, record, recordId, translate, onWriteSuccess } = options;
|
|
12
|
+
const nav = useNav();
|
|
13
|
+
const host = useReturnHost();
|
|
14
|
+
const dispatcher = useOptionalDispatcher();
|
|
15
|
+
const clientActions = useClientActionRuntime();
|
|
16
|
+
return useMemo(() => actions === undefined
|
|
17
|
+
? undefined
|
|
18
|
+
: buildRecordActions({
|
|
19
|
+
actions,
|
|
20
|
+
record,
|
|
21
|
+
translate,
|
|
22
|
+
nav,
|
|
23
|
+
host,
|
|
24
|
+
dispatcher,
|
|
25
|
+
openDrawer: NO_DRAWER,
|
|
26
|
+
onWriteSuccess,
|
|
27
|
+
defaultWritePayloadId: recordId,
|
|
28
|
+
clientActions,
|
|
29
|
+
}), [actions, record, recordId, translate, nav, host, dispatcher, onWriteSuccess, clientActions]);
|
|
30
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DispatcherError } from "
|
|
1
|
+
import type { DispatcherError } from "../headless/index.ts";
|
|
2
2
|
export declare class WriteFailedError extends Error {
|
|
3
3
|
readonly dispatcherError: DispatcherError;
|
|
4
4
|
constructor(error: DispatcherError, message: string);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { EditFieldViewModel } from "@cosmicdrift/kumiko-headless";
|
|
2
1
|
import type { OptionsQueryPayload } from "@cosmicdrift/kumiko-types/fields";
|
|
3
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import type { EditFieldViewModel } from "../headless/index.ts";
|
|
4
4
|
export type SelectOptionEntry = {
|
|
5
5
|
readonly value: string;
|
|
6
6
|
readonly label: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { EditFieldViewModel, FieldIssue } from "@cosmicdrift/kumiko-headless";
|
|
2
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import type { EditFieldViewModel, FieldIssue } from "../headless/index.ts";
|
|
3
3
|
export type EmbeddedListFieldProps = {
|
|
4
4
|
readonly field: EditFieldViewModel;
|
|
5
5
|
readonly id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { computeDerivedCellValue, currencyDecimals, groupEmbeddedListIssues, roundDerivedCellValue, sumEmbeddedListColumn, } from "@cosmicdrift/kumiko-headless";
|
|
3
2
|
import { useState } from "react";
|
|
3
|
+
import { computeDerivedCellValue, currencyDecimals, groupEmbeddedListIssues, roundDerivedCellValue, sumEmbeddedListColumn, } from "../headless/index.js";
|
|
4
4
|
import { REFERENCE_COMBOBOX_LIMIT } from "../hooks/reference-limits.js";
|
|
5
5
|
import { useQuery } from "../hooks/use-query.js";
|
|
6
6
|
import { referenceOptionSource } from "../hooks/use-reference-lookup.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { EditFieldViewModel } from "@cosmicdrift/kumiko-headless";
|
|
2
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { EditFieldViewModel } from "../headless/index.ts";
|
|
3
3
|
export type FileListFieldProps = {
|
|
4
4
|
readonly field: EditFieldViewModel;
|
|
5
5
|
readonly id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { EditFieldViewModel, FieldIssue } from "@cosmicdrift/kumiko-headless";
|
|
2
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { EditFieldViewModel, FieldIssue } from "../headless/index.ts";
|
|
3
3
|
import type { FieldCellWidth, FieldProps, usePrimitives } from "../primitives.tsx";
|
|
4
4
|
export type GridCellForFieldProps = {
|
|
5
5
|
readonly field: EditFieldViewModel;
|
|
@@ -26,6 +26,8 @@ export type GridCellForFieldProps = {
|
|
|
26
26
|
readonly flow?: boolean;
|
|
27
27
|
readonly layout?: FieldProps["layout"];
|
|
28
28
|
readonly accent?: boolean;
|
|
29
|
+
/** Passed through to RenderField — see RenderFieldProps.fillDisabled. */
|
|
30
|
+
readonly fillDisabled?: boolean;
|
|
29
31
|
};
|
|
30
32
|
export declare function fieldCellWidth(field: EditFieldViewModel): FieldCellWidth;
|
|
31
|
-
export declare function GridCellForField({ field, columns, issues, onChange, GridCell, featureName, labelAppendix, fieldAppendix, appendixPlacement, description, status, allIssues, valueDisplay, row, changed, flow, layout, accent, }: GridCellForFieldProps): ReactNode;
|
|
33
|
+
export declare function GridCellForField({ field, columns, issues, onChange, GridCell, featureName, labelAppendix, fieldAppendix, appendixPlacement, description, status, allIssues, valueDisplay, row, changed, flow, layout, accent, fillDisabled, }: GridCellForFieldProps): ReactNode;
|
|
@@ -29,10 +29,10 @@ export function fieldCellWidth(field) {
|
|
|
29
29
|
return "full";
|
|
30
30
|
return FIELD_CELL_WIDTH_BY_TYPE[field.type] ?? "text";
|
|
31
31
|
}
|
|
32
|
-
export function GridCellForField({ field, columns, issues, onChange, GridCell, featureName, labelAppendix, fieldAppendix, appendixPlacement, description, status, allIssues, valueDisplay, row, changed, flow, layout, accent, }) {
|
|
32
|
+
export function GridCellForField({ field, columns, issues, onChange, GridCell, featureName, labelAppendix, fieldAppendix, appendixPlacement, description, status, allIssues, valueDisplay, row, changed, flow, layout, accent, fillDisabled, }) {
|
|
33
33
|
// RenderField renders nothing for a hidden field, but the GridCell around it still claims the row.
|
|
34
34
|
if (!field.visible)
|
|
35
35
|
return null;
|
|
36
36
|
const effectiveSpan = field.span !== undefined ? Math.min(field.span, columns) : 1;
|
|
37
|
-
return (_jsx(GridCell, { span: effectiveSpan, ...(flow === true && { width: fieldCellWidth(field) }), children: _jsx(RenderField, { field: field, ...(issues !== undefined && { issues }), onChange: onChange, featureName: featureName, ...(labelAppendix !== undefined && { labelAppendix }), ...(fieldAppendix !== undefined && { fieldAppendix }), ...(appendixPlacement !== undefined && { appendixPlacement }), ...(description !== undefined && { description }), ...(status !== undefined && { status }), allIssues: allIssues, valueDisplay: valueDisplay, row: row, ...(changed === true && { changed }), ...(layout !== undefined && { layout }), ...(accent === true && { accent }) }) }));
|
|
37
|
+
return (_jsx(GridCell, { span: effectiveSpan, ...(flow === true && { width: fieldCellWidth(field) }), children: _jsx(RenderField, { field: field, ...(issues !== undefined && { issues }), onChange: onChange, featureName: featureName, ...(labelAppendix !== undefined && { labelAppendix }), ...(fieldAppendix !== undefined && { fieldAppendix }), ...(appendixPlacement !== undefined && { appendixPlacement }), ...(description !== undefined && { description }), ...(status !== undefined && { status }), allIssues: allIssues, valueDisplay: valueDisplay, row: row, ...(changed === true && { changed }), ...(layout !== undefined && { layout }), ...(accent === true && { accent }), ...(fillDisabled === true && { fillDisabled }) }) }));
|
|
38
38
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { EditFieldViewModel } from "@cosmicdrift/kumiko-headless";
|
|
2
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { EditFieldViewModel } from "../headless/index.ts";
|
|
3
3
|
export type MultiSelectCheckboxOption = {
|
|
4
4
|
readonly value: string;
|
|
5
5
|
readonly label: string;
|
|
@@ -5,7 +5,7 @@ import { usePrimitives } from "../primitives.js";
|
|
|
5
5
|
// as a visible checkbox plus a select-all toggle, built purely from the
|
|
6
6
|
// platform-neutral Primitives contract (Grid/GridCell/Field/Input kind
|
|
7
7
|
// "boolean", the same primitive `case "boolean"` uses in render-field.tsx).
|
|
8
|
-
// No renderer
|
|
8
|
+
// No renderer/web import here — this file must stay usable from Expo too.
|
|
9
9
|
export function MultiSelectCheckboxes({ field, id, options, value, onChange, }) {
|
|
10
10
|
const { Grid, GridCell, Field, Input, Button } = usePrimitives();
|
|
11
11
|
const t = useTranslation();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { EditFieldViewModel } from "@cosmicdrift/kumiko-headless";
|
|
2
1
|
import { type OptionsQueryPayload } from "@cosmicdrift/kumiko-types/fields";
|
|
3
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import type { EditFieldViewModel } from "../headless/index.ts";
|
|
4
4
|
type ResolvedOptionsQueryPayload = Readonly<Record<string, string | number | boolean>>;
|
|
5
5
|
export declare function resolveOptionsQueryPayload(payload: OptionsQueryPayload, row: Readonly<Record<string, unknown>>): ResolvedOptionsQueryPayload;
|
|
6
6
|
type QueryOptionsSelectProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RowActionDrawer } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
-
import type { EditRelatedListSectionViewModel, Translate } from "@cosmicdrift/kumiko-headless";
|
|
3
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import type { EditRelatedListSectionViewModel, Translate } from "../headless/index.ts";
|
|
4
4
|
export declare function RelatedListSection({ section, parentId, record, featureName, translate, hideTitle, grow, onOpenDrawer, actions, embedded, onAfterWrite, refreshToken, }: {
|
|
5
5
|
readonly section: EditRelatedListSectionViewModel;
|
|
6
6
|
readonly parentId: string;
|
|
@@ -2,11 +2,12 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { evalFieldCondition, normalizeListColumn, parseRefTarget, relatedListGroupHeaderLabel, relatedListGroupKey, } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { useAppFeatures } from "../app/app-features-context.js";
|
|
5
|
+
import { useClientActionRuntime } from "../app/client-actions.js";
|
|
5
6
|
import { buildFilterFacets, buildFilterPayload, mergeReferenceFacetOptions, resolveProjectionFacetSpecs, } from "../app/list-facets.js";
|
|
6
7
|
import { useNav } from "../app/nav.js";
|
|
7
8
|
import { ReferenceFacetBridges, } from "../app/reference-facet-bridge.js";
|
|
8
9
|
import { navigateWithReturnTo, useReturnHost } from "../app/return-to.js";
|
|
9
|
-
import { buildDefaultEditRowAction, buildProjectionRowActions, buildProjectionToolbarActions, buildRecordActions, runProjectionRowNavigate, } from "../app/row-actions.js";
|
|
10
|
+
import { buildDefaultEditRowAction, buildProjectionRowActions, buildProjectionToolbarActions, buildRecordActions, findRowClickAction, runDrawerRowAction, runProjectionRowNavigate, } from "../app/row-actions.js";
|
|
10
11
|
import { findEditScreenFor } from "../app/screen-access.js";
|
|
11
12
|
import { dispatcherErrorText } from "../app/write-failed-error.js";
|
|
12
13
|
import { useOptionalDispatcher } from "../context/dispatcher-context.js";
|
|
@@ -95,6 +96,7 @@ export function RelatedListSection({ section, parentId, record, featureName, tra
|
|
|
95
96
|
const nav = useNav();
|
|
96
97
|
const host = useReturnHost();
|
|
97
98
|
const dispatcher = useOptionalDispatcher();
|
|
99
|
+
const clientActions = useClientActionRuntime();
|
|
98
100
|
const appFeatures = useAppFeatures();
|
|
99
101
|
const userRoles = useUserRoles();
|
|
100
102
|
const defaultEditScreen = useMemo(() => {
|
|
@@ -196,7 +198,7 @@ export function RelatedListSection({ section, parentId, record, featureName, tra
|
|
|
196
198
|
// A row-body click target comes from EITHER the legacy `rowClick` field OR
|
|
197
199
|
// a `rowActions` entry marked rowClick:true — the boot-validator rejects
|
|
198
200
|
// both being set, so this order is just a fallback, not a precedence rule.
|
|
199
|
-
const rowClickAction = section.rowActions
|
|
201
|
+
const rowClickAction = findRowClickAction(section.rowActions);
|
|
200
202
|
const onRowClick = rowClick !== undefined
|
|
201
203
|
? (row) => {
|
|
202
204
|
const id = String(row.values[rowClick.idColumn ?? "id"] ?? "");
|
|
@@ -205,7 +207,14 @@ export function RelatedListSection({ section, parentId, record, featureName, tra
|
|
|
205
207
|
navigateWithReturnTo(nav, { entity: rowClick.entity, id }, host);
|
|
206
208
|
}
|
|
207
209
|
: rowClickAction !== undefined
|
|
208
|
-
? (row) =>
|
|
210
|
+
? (row) => {
|
|
211
|
+
if (rowClickAction.kind === "navigate") {
|
|
212
|
+
runProjectionRowNavigate(nav, rowClickAction, row, host);
|
|
213
|
+
}
|
|
214
|
+
else if (onOpenDrawer !== undefined) {
|
|
215
|
+
runDrawerRowAction(rowClickAction, onOpenDrawer, row);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
209
218
|
: undefined;
|
|
210
219
|
// Same execution path as projectionList's rowActions (kumiko-screen.tsx) —
|
|
211
220
|
// a relatedList row has the identical "no guaranteed id field" shape a
|
|
@@ -220,10 +229,12 @@ export function RelatedListSection({ section, parentId, record, featureName, tra
|
|
|
220
229
|
openDrawer: onOpenDrawer,
|
|
221
230
|
defaultEditRowAction,
|
|
222
231
|
host,
|
|
232
|
+
clientActions,
|
|
223
233
|
}), [
|
|
224
234
|
section.rowActions,
|
|
225
235
|
effectiveTranslate,
|
|
226
236
|
dispatcher,
|
|
237
|
+
clientActions,
|
|
227
238
|
nav,
|
|
228
239
|
refetchSelfAndHost,
|
|
229
240
|
onOpenDrawer,
|
|
@@ -283,6 +294,7 @@ export function RelatedListSection({ section, parentId, record, featureName, tra
|
|
|
283
294
|
dispatcher,
|
|
284
295
|
openDrawer: onOpenDrawer ?? (() => { }),
|
|
285
296
|
onWriteSuccess: refetchSelfAndHost,
|
|
297
|
+
clientActions,
|
|
286
298
|
})?.[0];
|
|
287
299
|
}, [
|
|
288
300
|
section.emptyState,
|
|
@@ -291,6 +303,7 @@ export function RelatedListSection({ section, parentId, record, featureName, tra
|
|
|
291
303
|
nav,
|
|
292
304
|
host,
|
|
293
305
|
dispatcher,
|
|
306
|
+
clientActions,
|
|
294
307
|
onOpenDrawer,
|
|
295
308
|
refetchSelfAndHost,
|
|
296
309
|
]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DispatcherError, EditFieldViewModel, EditSectionViewModel, SubmitResult } from "
|
|
1
|
+
import type { DispatcherError, EditFieldViewModel, EditSectionViewModel, SubmitResult } from "../headless/index.ts";
|
|
2
2
|
export declare function hasEditableSection(sections: readonly EditSectionViewModel[]): boolean;
|
|
3
3
|
export declare function resolveExtensionEntityId(entityIdProp: string | null | undefined, vmId: string | null): string | null;
|
|
4
4
|
export declare function shouldNotifyCaller(result: SubmitResult<unknown>, extensionsPersisted: boolean): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ActionFormFooterAction, EntityDefinition, EntityEditScreenDefinition, IconKey, RowAction, RowActionDrawer } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
-
import type { DispatcherError, FormSnapshot, FormValues, SubmitResult, Translate } from "@cosmicdrift/kumiko-headless";
|
|
3
2
|
import type { ReactNode } from "react";
|
|
4
3
|
import type * as z from "zod";
|
|
4
|
+
import type { DispatcherError, FormSnapshot, FormValues, SubmitResult, Translate } from "../headless/index.ts";
|
|
5
5
|
export type RenderEditProps<TValues extends FormValues, TCtx = unknown> = {
|
|
6
6
|
readonly screen: EntityEditScreenDefinition;
|
|
7
7
|
/** Screen id used for the `screen:<id>.title`/`.subtitle` lookups and as the
|
|
@@ -59,7 +59,7 @@ export type RenderEditProps<TValues extends FormValues, TCtx = unknown> = {
|
|
|
59
59
|
/** Copy-link action (issue #912) — only set in update mode (create mode
|
|
60
60
|
* has no entity id yet, hence no permalink). The callback is already fully
|
|
61
61
|
* bound (URL building + clipboard happen outside, in
|
|
62
|
-
* `@cosmicdrift/kumiko-renderer
|
|
62
|
+
* `@cosmicdrift/kumiko-renderer/web`'s RoutedScreen — this platform-neutral
|
|
63
63
|
* package must not touch `navigator`/`window`, see
|
|
64
64
|
* guard-renderer-boundaries). undefined = no button. */
|
|
65
65
|
readonly onCopyLink?: () => Promise<void> | void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FormValues } from "
|
|
1
|
+
import type { FormValues } from "../headless/index.ts";
|
|
2
2
|
import type { RenderEditProps } from "./render-edit-types.ts";
|
|
3
3
|
export type { RenderEditAction, RenderEditChangeState, RenderEditControls, RenderEditProps, } from "./render-edit-types.ts";
|
|
4
4
|
import { type ReactNode } from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { evalFieldCondition, isFieldsEditSection, normalizeEditField, PROJECTION_DETAIL_ENTITY, sectionFieldSpecs, } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
3
|
-
import { computeEditViewModel, groupIssuesByPath, relevantFieldIssues, zodErrorToFieldIssues, } from "@cosmicdrift/kumiko-headless";
|
|
4
3
|
import { propertyOf } from "@cosmicdrift/kumiko-types/type-guards";
|
|
4
|
+
import { computeEditViewModel, groupIssuesByPath, relevantFieldIssues, zodErrorToFieldIssues, } from "../headless/index.js";
|
|
5
5
|
import { RenderEditActionButton } from "./render-edit-action-button.js";
|
|
6
6
|
import { AllFieldsRequiredProvider } from "./render-field.js";
|
|
7
7
|
import { useActionMenuItems } from "./use-action-menu-items.js";
|
|
@@ -1075,6 +1075,7 @@ export function RenderEdit(props) {
|
|
|
1075
1075
|
wizardBackRef.current = isWizard ? handleWizardBack : () => { };
|
|
1076
1076
|
// Screen forms (entityEdit/actionForm filling the shell height) drop the card;
|
|
1077
1077
|
// the title then lives in the shell header when the shell offers a slot.
|
|
1078
|
+
const rootIssues = snapshot.errors[ROOT_ISSUE_PATH] ?? [];
|
|
1078
1079
|
const isScreenForm = fillScreenHeight === true && hideSectionTitles !== true && !insideDrawer;
|
|
1079
1080
|
const titleInShell = PageHeader !== undefined &&
|
|
1080
1081
|
pageHeaderSlotAvailable &&
|
|
@@ -1430,7 +1431,7 @@ export function RenderEdit(props) {
|
|
|
1430
1431
|
appendixPlacement: fieldAppendixPlacement,
|
|
1431
1432
|
}), ...(fieldDescription !== undefined && {
|
|
1432
1433
|
description: fieldDescription(field.field),
|
|
1433
|
-
}), allIssues: snapshot.errors, valueDisplay: valueDisplay, row: snapshot.values, ...((!isCreate || markChangedFields) &&
|
|
1434
|
+
}), allIssues: snapshot.errors, valueDisplay: valueDisplay, row: snapshot.values, ...(disabled && { fillDisabled: true }), ...((!isCreate || markChangedFields) &&
|
|
1434
1435
|
field.field in snapshot.changes && { changed: true }) }, field.field))) }, gridKey));
|
|
1435
1436
|
// Tabs mode: the tab panel is the surface, so field sections render
|
|
1436
1437
|
// as unframed padded panels; group cards inside stay framed.
|
|
@@ -1480,7 +1481,8 @@ export function RenderEdit(props) {
|
|
|
1480
1481
|
onReload();
|
|
1481
1482
|
setFormError(null);
|
|
1482
1483
|
setExtraDeleteIssues([]);
|
|
1483
|
-
}, testId: "render-edit-form-error-reload", children: translate("kumiko.actions.reload") })) : undefined, children: [_jsx(Text, { testId: "render-edit-form-error-key", children: translate(formError.i18nKey, formError.i18nParams) }),
|
|
1484
|
+
}, testId: "render-edit-form-error-reload", children: translate("kumiko.actions.reload") })) : undefined, children: [_jsx(Text, { testId: "render-edit-form-error-key", children: translate(formError.i18nKey, formError.i18nParams) }), rootIssues.map((issue) => (_jsx(Text, { testId: "render-edit-form-error-root", children: translate(issue.i18nKey, issue.params) }, `${issue.path}:${issue.i18nKey}`))), extraDeleteIssues.map((issue) => (_jsx(Text, { testId: "render-edit-form-error-extra", children: translate(issue.i18nKey, issue.params) }, `${issue.path}:${issue.i18nKey}`)))] })), formError === null &&
|
|
1485
|
+
rootIssues.map((issue) => (_jsx(Banner, { variant: "error", testId: "render-edit-root-issue", children: _jsx(Text, { children: translate(issue.i18nKey, issue.params) }) }, issue.i18nKey))), extensionErrorKey !== null && (_jsx(Banner, { variant: "error", testId: "render-edit-extension-error", children: _jsx(Text, { testId: "render-edit-extension-error-key", children: translate(extensionErrorKey) }) })), actionError !== null && (_jsx(Banner, { variant: "error", testId: "render-edit-action-error", children: actionError })), onDelete !== undefined && (_jsx(Dialog, { open: confirmDeleteOpen, onOpenChange: setConfirmDeleteOpen, title: translate("kumiko.actions.delete-confirm"), confirmLabel: translate("kumiko.actions.delete"), variant: "danger", onConfirm: async () => {
|
|
1484
1486
|
const rejection = await onDelete();
|
|
1485
1487
|
// A rejected delete (e.g. a preDelete hook) carries its reason in
|
|
1486
1488
|
// the field issues; the top-level key is only "validation failed".
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EditFieldViewModel, type FieldIssue } from "@cosmicdrift/kumiko-headless";
|
|
2
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import { type EditFieldViewModel, type FieldIssue } from "../headless/index.ts";
|
|
3
3
|
import { type FieldProps } from "../primitives.tsx";
|
|
4
4
|
export type RenderFieldProps = {
|
|
5
5
|
readonly field: EditFieldViewModel;
|
|
@@ -39,6 +39,9 @@ export type RenderFieldProps = {
|
|
|
39
39
|
readonly changed?: boolean;
|
|
40
40
|
readonly layout?: FieldProps["layout"];
|
|
41
41
|
readonly accent?: boolean;
|
|
42
|
+
/** The surrounding form is locked as a whole: the fill button stays visible
|
|
43
|
+
* but inert, unlike a single readOnly field whose fill button keeps working. */
|
|
44
|
+
readonly fillDisabled?: boolean;
|
|
42
45
|
};
|
|
43
46
|
export declare const AllFieldsRequiredProvider: import("react").Provider<boolean>;
|
|
44
|
-
export declare function RenderField({ field, issues, onChange, featureName, labelAppendix, fieldAppendix, appendixPlacement, description, status, allIssues, valueDisplay, row, changed, layout, accent, }: RenderFieldProps): ReactNode;
|
|
47
|
+
export declare function RenderField({ field, issues, onChange, featureName, labelAppendix, fieldAppendix, appendixPlacement, description, status, allIssues, valueDisplay, row, changed, layout, accent, fillDisabled, }: RenderFieldProps): ReactNode;
|