@questpie/admin 1.1.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +245 -474
- package/dist/_virtual/rolldown_runtime.mjs +18 -0
- package/dist/augmentation.d.mts +315 -0
- package/dist/augmentation.d.mts.map +1 -0
- package/dist/client/blocks/block-registry.d.mts +199 -0
- package/dist/client/blocks/block-registry.d.mts.map +1 -0
- package/dist/client/blocks/block-registry.mjs +88 -0
- package/dist/client/blocks/block-registry.mjs.map +1 -0
- package/dist/client/blocks/block-renderer.d.mts +52 -0
- package/dist/client/blocks/block-renderer.d.mts.map +1 -0
- package/dist/client/blocks/block-renderer.mjs +71 -0
- package/dist/client/blocks/block-renderer.mjs.map +1 -0
- package/dist/client/blocks/index.d.mts +4 -0
- package/dist/client/blocks/prefetch.d.mts +45 -0
- package/dist/client/blocks/prefetch.d.mts.map +1 -0
- package/dist/client/blocks/prefetch.mjs +26 -0
- package/dist/client/blocks/prefetch.mjs.map +1 -0
- package/dist/client/blocks/types.d.mts +69 -0
- package/dist/client/blocks/types.d.mts.map +1 -0
- package/dist/client/blocks/types.mjs +20 -0
- package/dist/client/blocks/types.mjs.map +1 -0
- package/dist/client/builder/admin-builder.d.mts +112 -0
- package/dist/client/builder/admin-builder.d.mts.map +1 -0
- package/dist/client/builder/admin-builder.mjs +185 -0
- package/dist/client/builder/admin-builder.mjs.map +1 -0
- package/dist/client/builder/admin-types.d.mts +73 -0
- package/dist/client/builder/admin-types.d.mts.map +1 -0
- package/dist/client/builder/admin.d.mts +121 -0
- package/dist/client/builder/admin.d.mts.map +1 -0
- package/dist/client/builder/admin.mjs +160 -0
- package/dist/client/builder/admin.mjs.map +1 -0
- package/dist/client/builder/defaults/components.mjs +20 -0
- package/dist/client/builder/defaults/components.mjs.map +1 -0
- package/dist/client/builder/defaults/core.d.mts +354 -0
- package/dist/client/builder/defaults/core.d.mts.map +1 -0
- package/dist/client/builder/defaults/core.mjs +49 -0
- package/dist/client/builder/defaults/core.mjs.map +1 -0
- package/dist/client/builder/defaults/fields.mjs +328 -0
- package/dist/client/builder/defaults/fields.mjs.map +1 -0
- package/dist/client/builder/defaults/pages.mjs +58 -0
- package/dist/client/builder/defaults/pages.mjs.map +1 -0
- package/dist/client/builder/defaults/starter.d.mts +351 -0
- package/dist/client/builder/defaults/starter.d.mts.map +1 -0
- package/dist/client/builder/defaults/starter.mjs +28 -0
- package/dist/client/builder/defaults/starter.mjs.map +1 -0
- package/dist/client/builder/defaults/views.mjs +27 -0
- package/dist/client/builder/defaults/views.mjs.map +1 -0
- package/dist/client/builder/defaults/widgets.mjs +31 -0
- package/dist/client/builder/defaults/widgets.mjs.map +1 -0
- package/dist/client/builder/field/field.d.mts +229 -0
- package/dist/client/builder/field/field.d.mts.map +1 -0
- package/dist/client/builder/field/field.mjs +83 -0
- package/dist/client/builder/field/field.mjs.map +1 -0
- package/dist/client/builder/index.d.mts +36 -0
- package/dist/client/builder/index.d.mts.map +1 -0
- package/dist/client/builder/page/page.d.mts +36 -0
- package/dist/client/builder/page/page.d.mts.map +1 -0
- package/dist/client/builder/page/page.mjs +27 -0
- package/dist/client/builder/page/page.mjs.map +1 -0
- package/dist/client/builder/proxies.d.mts +2 -0
- package/dist/client/builder/proxies.mjs +24 -0
- package/dist/client/builder/proxies.mjs.map +1 -0
- package/dist/client/builder/qa.d.mts +50 -0
- package/dist/client/builder/qa.d.mts.map +1 -0
- package/dist/client/builder/qa.mjs +42 -0
- package/dist/client/builder/qa.mjs.map +1 -0
- package/dist/client/builder/registry.d.mts +70 -0
- package/dist/client/builder/registry.d.mts.map +1 -0
- package/dist/client/builder/types/action-registry.d.mts +2 -0
- package/dist/client/builder/types/action-registry.mjs +142 -0
- package/dist/client/builder/types/action-registry.mjs.map +1 -0
- package/dist/client/builder/types/action-types.d.mts +253 -0
- package/dist/client/builder/types/action-types.d.mts.map +1 -0
- package/dist/client/builder/types/collection-types.d.mts +199 -0
- package/dist/client/builder/types/collection-types.d.mts.map +1 -0
- package/dist/client/builder/types/collection-types.mjs +11 -0
- package/dist/client/builder/types/collection-types.mjs.map +1 -0
- package/dist/client/builder/types/common.d.mts +60 -0
- package/dist/client/builder/types/common.d.mts.map +1 -0
- package/dist/client/builder/types/field-types.d.mts +593 -0
- package/dist/client/builder/types/field-types.d.mts.map +1 -0
- package/dist/client/builder/types/field-types.mjs +19 -0
- package/dist/client/builder/types/field-types.mjs.map +1 -0
- package/dist/client/builder/types/global-types.d.mts +22 -0
- package/dist/client/builder/types/global-types.d.mts.map +1 -0
- package/dist/client/builder/types/ui-config.d.mts +160 -0
- package/dist/client/builder/types/ui-config.d.mts.map +1 -0
- package/dist/client/builder/types/views.d.mts +89 -0
- package/dist/client/builder/types/views.d.mts.map +1 -0
- package/dist/client/builder/types/widget-types.d.mts +563 -0
- package/dist/client/builder/types/widget-types.d.mts.map +1 -0
- package/dist/client/builder/validation.d.mts +3 -0
- package/dist/client/builder/validation.mjs +208 -0
- package/dist/client/builder/validation.mjs.map +1 -0
- package/dist/client/builder/view/view.d.mts +129 -0
- package/dist/client/builder/view/view.d.mts.map +1 -0
- package/dist/client/builder/view/view.mjs +109 -0
- package/dist/client/builder/view/view.mjs.map +1 -0
- package/dist/client/builder/widget/widget.d.mts +33 -0
- package/dist/client/builder/widget/widget.d.mts.map +1 -0
- package/dist/client/builder/widget/widget.mjs +26 -0
- package/dist/client/builder/widget/widget.mjs.map +1 -0
- package/dist/client/components/actions/action-button.d.mts +2 -0
- package/dist/client/components/actions/action-button.mjs +135 -0
- package/dist/client/components/actions/action-button.mjs.map +1 -0
- package/dist/client/components/actions/action-dialog.d.mts +2 -0
- package/dist/client/components/actions/action-dialog.mjs +264 -0
- package/dist/client/components/actions/action-dialog.mjs.map +1 -0
- package/dist/client/components/actions/confirmation-dialog.d.mts +2 -0
- package/dist/client/components/actions/confirmation-dialog.mjs +82 -0
- package/dist/client/components/actions/confirmation-dialog.mjs.map +1 -0
- package/dist/client/components/actions/header-actions.d.mts +2 -0
- package/dist/client/components/actions/header-actions.mjs +117 -0
- package/dist/client/components/actions/header-actions.mjs.map +1 -0
- package/dist/client/components/actions/index.d.mts +4 -0
- package/dist/client/components/admin-link.d.mts +67 -0
- package/dist/client/components/admin-link.d.mts.map +1 -0
- package/dist/client/components/admin-link.mjs +92 -0
- package/dist/client/components/admin-link.mjs.map +1 -0
- package/dist/client/components/auth/auth-guard.d.mts +51 -0
- package/dist/client/components/auth/auth-guard.d.mts.map +1 -0
- package/dist/client/components/auth/auth-guard.mjs +60 -0
- package/dist/client/components/auth/auth-guard.mjs.map +1 -0
- package/dist/client/components/auth/auth-loading.d.mts +36 -0
- package/dist/client/components/auth/auth-loading.d.mts.map +1 -0
- package/dist/client/components/auth/auth-loading.mjs +27 -0
- package/dist/client/components/auth/auth-loading.mjs.map +1 -0
- package/dist/client/components/auth/index.d.mts +2 -0
- package/dist/client/components/blocks/block-canvas.mjs +90 -0
- package/dist/client/components/blocks/block-canvas.mjs.map +1 -0
- package/dist/client/components/blocks/block-editor-context.mjs +58 -0
- package/dist/client/components/blocks/block-editor-context.mjs.map +1 -0
- package/dist/client/components/blocks/block-editor-layout.mjs +82 -0
- package/dist/client/components/blocks/block-editor-layout.mjs.map +1 -0
- package/dist/client/components/blocks/block-editor-provider.mjs +155 -0
- package/dist/client/components/blocks/block-editor-provider.mjs.map +1 -0
- package/dist/client/components/blocks/block-fields-renderer.mjs +70 -0
- package/dist/client/components/blocks/block-fields-renderer.mjs.map +1 -0
- package/dist/client/components/blocks/block-insert-button.mjs +72 -0
- package/dist/client/components/blocks/block-insert-button.mjs.map +1 -0
- package/dist/client/components/blocks/block-item-menu.mjs +161 -0
- package/dist/client/components/blocks/block-item-menu.mjs.map +1 -0
- package/dist/client/components/blocks/block-item.mjs +187 -0
- package/dist/client/components/blocks/block-item.mjs.map +1 -0
- package/dist/client/components/blocks/block-library-sidebar.mjs +190 -0
- package/dist/client/components/blocks/block-library-sidebar.mjs.map +1 -0
- package/dist/client/components/blocks/block-tree.mjs +45 -0
- package/dist/client/components/blocks/block-tree.mjs.map +1 -0
- package/dist/client/components/blocks/block-type-icon.mjs +50 -0
- package/dist/client/components/blocks/block-type-icon.mjs.map +1 -0
- package/dist/client/components/blocks/utils/tree-utils.mjs +186 -0
- package/dist/client/components/blocks/utils/tree-utils.mjs.map +1 -0
- package/dist/client/components/component-renderer.d.mts +125 -0
- package/dist/client/components/component-renderer.d.mts.map +1 -0
- package/dist/client/components/component-renderer.mjs +145 -0
- package/dist/client/components/component-renderer.mjs.map +1 -0
- package/dist/client/components/error-boundary.mjs +92 -0
- package/dist/client/components/error-boundary.mjs.map +1 -0
- package/dist/client/components/fields/array-field.d.mts +44 -0
- package/dist/client/components/fields/array-field.d.mts.map +1 -0
- package/dist/client/components/fields/array-field.mjs +231 -0
- package/dist/client/components/fields/array-field.mjs.map +1 -0
- package/dist/client/components/fields/asset-preview-field.d.mts +52 -0
- package/dist/client/components/fields/asset-preview-field.d.mts.map +1 -0
- package/dist/client/components/fields/asset-preview-field.mjs +60 -0
- package/dist/client/components/fields/asset-preview-field.mjs.map +1 -0
- package/dist/client/components/fields/blocks-field/blocks-field.d.mts +41 -0
- package/dist/client/components/fields/blocks-field/blocks-field.d.mts.map +1 -0
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +101 -0
- package/dist/client/components/fields/blocks-field/blocks-field.mjs.map +1 -0
- package/dist/client/components/fields/blocks-field/index.d.mts +1 -0
- package/dist/client/components/fields/boolean-field.d.mts +30 -0
- package/dist/client/components/fields/boolean-field.d.mts.map +1 -0
- package/dist/client/components/fields/boolean-field.mjs +47 -0
- package/dist/client/components/fields/boolean-field.mjs.map +1 -0
- package/dist/client/components/fields/custom-field.d.mts +3 -0
- package/dist/client/components/fields/date-field.d.mts +22 -0
- package/dist/client/components/fields/date-field.d.mts.map +1 -0
- package/dist/client/components/fields/date-field.mjs +42 -0
- package/dist/client/components/fields/date-field.mjs.map +1 -0
- package/dist/client/components/fields/datetime-field.d.mts +23 -0
- package/dist/client/components/fields/datetime-field.d.mts.map +1 -0
- package/dist/client/components/fields/datetime-field.mjs +43 -0
- package/dist/client/components/fields/datetime-field.mjs.map +1 -0
- package/dist/client/components/fields/email-field.d.mts +19 -0
- package/dist/client/components/fields/email-field.d.mts.map +1 -0
- package/dist/client/components/fields/email-field.mjs +38 -0
- package/dist/client/components/fields/email-field.mjs.map +1 -0
- package/dist/client/components/fields/embedded-collection.d.mts +3 -0
- package/dist/client/components/fields/field-types.d.mts +571 -0
- package/dist/client/components/fields/field-types.d.mts.map +1 -0
- package/dist/client/components/fields/field-utils.d.mts +1 -0
- package/dist/client/components/fields/field-utils.mjs +65 -0
- package/dist/client/components/fields/field-utils.mjs.map +1 -0
- package/dist/client/components/fields/field-wrapper.d.mts +3 -0
- package/dist/client/components/fields/field-wrapper.mjs +49 -0
- package/dist/client/components/fields/field-wrapper.mjs.map +1 -0
- package/dist/client/components/fields/index.d.mts +33 -0
- package/dist/client/components/fields/json-field.d.mts +84 -0
- package/dist/client/components/fields/json-field.d.mts.map +1 -0
- package/dist/client/components/fields/json-field.mjs +248 -0
- package/dist/client/components/fields/json-field.mjs.map +1 -0
- package/dist/client/components/fields/locale-badge.d.mts +1 -0
- package/dist/client/components/fields/locale-badge.mjs +17 -0
- package/dist/client/components/fields/locale-badge.mjs.map +1 -0
- package/dist/client/components/fields/number-field.d.mts +23 -0
- package/dist/client/components/fields/number-field.d.mts.map +1 -0
- package/dist/client/components/fields/number-field.mjs +40 -0
- package/dist/client/components/fields/number-field.mjs.map +1 -0
- package/dist/client/components/fields/object-array-field.d.mts +2 -0
- package/dist/client/components/fields/object-array-field.mjs +313 -0
- package/dist/client/components/fields/object-array-field.mjs.map +1 -0
- package/dist/client/components/fields/object-field.d.mts +32 -0
- package/dist/client/components/fields/object-field.d.mts.map +1 -0
- package/dist/client/components/fields/object-field.mjs +128 -0
- package/dist/client/components/fields/object-field.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/cards-display.d.mts +2 -0
- package/dist/client/components/fields/relation/displays/cards-display.mjs +140 -0
- package/dist/client/components/fields/relation/displays/cards-display.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/chips-display.d.mts +2 -0
- package/dist/client/components/fields/relation/displays/chips-display.mjs +100 -0
- package/dist/client/components/fields/relation/displays/chips-display.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/grid-display.d.mts +2 -0
- package/dist/client/components/fields/relation/displays/grid-display.mjs +114 -0
- package/dist/client/components/fields/relation/displays/grid-display.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/index.d.mts +6 -0
- package/dist/client/components/fields/relation/displays/list-display.d.mts +2 -0
- package/dist/client/components/fields/relation/displays/list-display.mjs +128 -0
- package/dist/client/components/fields/relation/displays/list-display.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/table-display.d.mts +2 -0
- package/dist/client/components/fields/relation/displays/table-display.mjs +134 -0
- package/dist/client/components/fields/relation/displays/table-display.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/types.d.mts +22 -0
- package/dist/client/components/fields/relation/displays/types.d.mts.map +1 -0
- package/dist/client/components/fields/relation/displays/types.mjs +73 -0
- package/dist/client/components/fields/relation/displays/types.mjs.map +1 -0
- package/dist/client/components/fields/relation/index.d.mts +3 -0
- package/dist/client/components/fields/relation/relation-items-display.d.mts +5 -0
- package/dist/client/components/fields/relation/relation-items-display.mjs +47 -0
- package/dist/client/components/fields/relation/relation-items-display.mjs.map +1 -0
- package/dist/client/components/fields/relation-field.d.mts +134 -0
- package/dist/client/components/fields/relation-field.d.mts.map +1 -0
- package/dist/client/components/fields/relation-field.mjs +106 -0
- package/dist/client/components/fields/relation-field.mjs.map +1 -0
- package/dist/client/components/fields/relation-picker.d.mts +4 -0
- package/dist/client/components/fields/relation-picker.mjs +301 -0
- package/dist/client/components/fields/relation-picker.mjs.map +1 -0
- package/dist/client/components/fields/relation-select.d.mts +3 -0
- package/dist/client/components/fields/relation-select.mjs +219 -0
- package/dist/client/components/fields/relation-select.mjs.map +1 -0
- package/dist/client/components/fields/reverse-relation-field.d.mts +2 -0
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +56 -0
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +118 -0
- package/dist/client/components/fields/rich-text-editor/extensions.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +196 -0
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/index.d.mts +4 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs +187 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +86 -0
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +11 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts.map +1 -0
- package/dist/client/components/fields/rich-text-editor/presets.mjs +124 -0
- package/dist/client/components/fields/rich-text-editor/presets.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +145 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/table-controls.mjs +124 -0
- package/dist/client/components/fields/rich-text-editor/table-controls.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +280 -0
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/types.d.mts +78 -0
- package/dist/client/components/fields/rich-text-editor/types.d.mts.map +1 -0
- package/dist/client/components/fields/rich-text-editor/types.mjs +31 -0
- package/dist/client/components/fields/rich-text-editor/types.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/utils.mjs +51 -0
- package/dist/client/components/fields/rich-text-editor/utils.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/variants.d.mts +2 -0
- package/dist/client/components/fields/rich-text-field.d.mts +14 -0
- package/dist/client/components/fields/rich-text-field.d.mts.map +1 -0
- package/dist/client/components/fields/rich-text-field.mjs +26 -0
- package/dist/client/components/fields/rich-text-field.mjs.map +1 -0
- package/dist/client/components/fields/select-field.d.mts +25 -0
- package/dist/client/components/fields/select-field.d.mts.map +1 -0
- package/dist/client/components/fields/select-field.mjs +53 -0
- package/dist/client/components/fields/select-field.mjs.map +1 -0
- package/dist/client/components/fields/status-field.d.mts +2 -0
- package/dist/client/components/fields/text-field.d.mts +22 -0
- package/dist/client/components/fields/text-field.d.mts.map +1 -0
- package/dist/client/components/fields/text-field.mjs +39 -0
- package/dist/client/components/fields/text-field.mjs.map +1 -0
- package/dist/client/components/fields/textarea-field.d.mts +22 -0
- package/dist/client/components/fields/textarea-field.d.mts.map +1 -0
- package/dist/client/components/fields/textarea-field.mjs +39 -0
- package/dist/client/components/fields/textarea-field.mjs.map +1 -0
- package/dist/client/components/fields/time-field.d.mts +20 -0
- package/dist/client/components/fields/time-field.d.mts.map +1 -0
- package/dist/client/components/fields/time-field.mjs +39 -0
- package/dist/client/components/fields/time-field.mjs.map +1 -0
- package/dist/client/components/fields/upload-field.d.mts +97 -0
- package/dist/client/components/fields/upload-field.d.mts.map +1 -0
- package/dist/client/components/fields/upload-field.mjs +497 -0
- package/dist/client/components/fields/upload-field.mjs.map +1 -0
- package/dist/client/components/filter-builder/columns-tab.d.mts +1 -0
- package/dist/client/components/filter-builder/columns-tab.mjs +131 -0
- package/dist/client/components/filter-builder/columns-tab.mjs.map +1 -0
- package/dist/client/components/filter-builder/filter-builder-sheet.d.mts +1 -0
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +157 -0
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs.map +1 -0
- package/dist/client/components/filter-builder/filters-tab.d.mts +1 -0
- package/dist/client/components/filter-builder/filters-tab.mjs +380 -0
- package/dist/client/components/filter-builder/filters-tab.mjs.map +1 -0
- package/dist/client/components/filter-builder/index.d.mts +5 -0
- package/dist/client/components/filter-builder/saved-views-tab.d.mts +1 -0
- package/dist/client/components/filter-builder/saved-views-tab.mjs +125 -0
- package/dist/client/components/filter-builder/saved-views-tab.mjs.map +1 -0
- package/dist/client/components/index.d.mts +80 -0
- package/dist/client/components/locale-switcher.d.mts +2 -0
- package/dist/client/components/locale-switcher.mjs +128 -0
- package/dist/client/components/locale-switcher.mjs.map +1 -0
- package/dist/client/components/media/media-grid.mjs +139 -0
- package/dist/client/components/media/media-grid.mjs.map +1 -0
- package/dist/client/components/media/media-picker-dialog.mjs +255 -0
- package/dist/client/components/media/media-picker-dialog.mjs.map +1 -0
- package/dist/client/components/preview/live-preview-mode.mjs +211 -0
- package/dist/client/components/preview/live-preview-mode.mjs.map +1 -0
- package/dist/client/components/preview/preview-pane.mjs +179 -0
- package/dist/client/components/preview/preview-pane.mjs.map +1 -0
- package/dist/client/components/primitives/asset-preview.mjs +363 -0
- package/dist/client/components/primitives/asset-preview.mjs.map +1 -0
- package/dist/client/components/primitives/checkbox-input.mjs +33 -0
- package/dist/client/components/primitives/checkbox-input.mjs.map +1 -0
- package/dist/client/components/primitives/date-input.mjs +218 -0
- package/dist/client/components/primitives/date-input.mjs.map +1 -0
- package/dist/client/components/primitives/dropzone.mjs +239 -0
- package/dist/client/components/primitives/dropzone.mjs.map +1 -0
- package/dist/client/components/primitives/number-input.mjs +113 -0
- package/dist/client/components/primitives/number-input.mjs.map +1 -0
- package/dist/client/components/primitives/select-multi.mjs +256 -0
- package/dist/client/components/primitives/select-multi.mjs.map +1 -0
- package/dist/client/components/primitives/select-single.mjs +183 -0
- package/dist/client/components/primitives/select-single.mjs.map +1 -0
- package/dist/client/components/primitives/text-input.mjs +40 -0
- package/dist/client/components/primitives/text-input.mjs.map +1 -0
- package/dist/client/components/primitives/textarea-input.mjs +38 -0
- package/dist/client/components/primitives/textarea-input.mjs.map +1 -0
- package/dist/client/components/primitives/time-input.mjs +72 -0
- package/dist/client/components/primitives/time-input.mjs.map +1 -0
- package/dist/client/components/primitives/toggle-input.mjs +31 -0
- package/dist/client/components/primitives/toggle-input.mjs.map +1 -0
- package/dist/client/components/primitives/types.d.mts +14 -0
- package/dist/client/components/primitives/types.d.mts.map +1 -0
- package/dist/client/components/primitives/types.mjs +13 -0
- package/dist/client/components/primitives/types.mjs.map +1 -0
- package/dist/client/components/sheets/index.d.mts +1 -0
- package/dist/client/components/sheets/resource-sheet.d.mts +1 -0
- package/dist/client/components/sheets/resource-sheet.mjs +78 -0
- package/dist/client/components/sheets/resource-sheet.mjs.map +1 -0
- package/dist/client/components/ui/accordion.d.mts +2 -0
- package/dist/client/components/ui/accordion.mjs +50 -0
- package/dist/client/components/ui/accordion.mjs.map +1 -0
- package/dist/client/components/ui/alert.mjs +32 -0
- package/dist/client/components/ui/alert.mjs.map +1 -0
- package/dist/client/components/ui/avatar.d.mts +3 -0
- package/dist/client/components/ui/badge.d.mts +3 -0
- package/dist/client/components/ui/badge.mjs +35 -0
- package/dist/client/components/ui/badge.mjs.map +1 -0
- package/dist/client/components/ui/button.d.mts +3 -0
- package/dist/client/components/ui/button.mjs +49 -0
- package/dist/client/components/ui/button.mjs.map +1 -0
- package/dist/client/components/ui/card.d.mts +2 -0
- package/dist/{card-BKHjBQfw.mjs → client/components/ui/card.mjs} +3 -10
- package/dist/{card-BKHjBQfw.mjs.map → client/components/ui/card.mjs.map} +1 -1
- package/dist/client/components/ui/checkbox.d.mts +2 -0
- package/dist/client/components/ui/checkbox.mjs +27 -0
- package/dist/client/components/ui/checkbox.mjs.map +1 -0
- package/dist/client/components/ui/combobox.d.mts +3 -0
- package/dist/client/components/ui/command.mjs +69 -0
- package/dist/client/components/ui/command.mjs.map +1 -0
- package/dist/client/components/ui/dialog.d.mts +3 -0
- package/dist/client/components/ui/dialog.mjs +83 -0
- package/dist/client/components/ui/dialog.mjs.map +1 -0
- package/dist/client/components/ui/drawer.mjs +75 -0
- package/dist/client/components/ui/drawer.mjs.map +1 -0
- package/dist/client/components/ui/dropdown-menu.d.mts +3 -0
- package/dist/client/components/ui/dropdown-menu.mjs +89 -0
- package/dist/client/components/ui/dropdown-menu.mjs.map +1 -0
- package/dist/client/components/ui/empty-state.mjs +53 -0
- package/dist/client/components/ui/empty-state.mjs.map +1 -0
- package/dist/client/components/ui/field.d.mts +3 -0
- package/dist/client/components/ui/field.mjs +78 -0
- package/dist/client/components/ui/field.mjs.map +1 -0
- package/dist/client/components/ui/input-group.d.mts +4 -0
- package/dist/client/components/ui/input-group.mjs +68 -0
- package/dist/client/components/ui/input-group.mjs.map +1 -0
- package/dist/client/components/ui/input.d.mts +2 -0
- package/dist/client/components/ui/input.mjs +17 -0
- package/dist/client/components/ui/input.mjs.map +1 -0
- package/dist/client/components/ui/kbd.mjs +24 -0
- package/dist/client/components/ui/kbd.mjs.map +1 -0
- package/dist/client/components/ui/label.d.mts +2 -0
- package/dist/client/components/ui/label.mjs +15 -0
- package/dist/client/components/ui/label.mjs.map +1 -0
- package/dist/client/components/ui/popover.d.mts +3 -0
- package/dist/client/components/ui/popover.mjs +49 -0
- package/dist/client/components/ui/popover.mjs.map +1 -0
- package/dist/client/components/ui/responsive-dialog.mjs +102 -0
- package/dist/client/components/ui/responsive-dialog.mjs.map +1 -0
- package/dist/client/components/ui/scroll-area.d.mts +2 -0
- package/dist/client/components/ui/search-input.mjs +74 -0
- package/dist/client/components/ui/search-input.mjs.map +1 -0
- package/dist/client/components/ui/select.d.mts +3 -0
- package/dist/client/components/ui/select.mjs +85 -0
- package/dist/client/components/ui/select.mjs.map +1 -0
- package/dist/client/components/ui/separator.d.mts +2 -0
- package/dist/client/components/ui/separator.mjs +17 -0
- package/dist/client/components/ui/separator.mjs.map +1 -0
- package/dist/client/components/ui/sheet.d.mts +3 -0
- package/dist/client/components/ui/sheet.mjs +78 -0
- package/dist/client/components/ui/sheet.mjs.map +1 -0
- package/dist/client/components/ui/sidebar.d.mts +8 -0
- package/dist/client/components/ui/sidebar.mjs +256 -0
- package/dist/client/components/ui/sidebar.mjs.map +1 -0
- package/dist/client/components/ui/skeleton.d.mts +1 -0
- package/dist/client/components/ui/skeleton.mjs +15 -0
- package/dist/client/components/ui/skeleton.mjs.map +1 -0
- package/dist/client/components/ui/sonner.d.mts +14 -0
- package/dist/client/components/ui/sonner.d.mts.map +1 -0
- package/dist/client/components/ui/sonner.mjs +55 -0
- package/dist/client/components/ui/sonner.mjs.map +1 -0
- package/dist/client/components/ui/spinner.d.mts +1 -0
- package/dist/client/components/ui/spinner.mjs +18 -0
- package/dist/client/components/ui/spinner.mjs.map +1 -0
- package/dist/client/components/ui/switch.d.mts +2 -0
- package/dist/client/components/ui/switch.mjs +23 -0
- package/dist/client/components/ui/switch.mjs.map +1 -0
- package/dist/client/components/ui/table.d.mts +2 -0
- package/dist/client/components/ui/table.mjs +66 -0
- package/dist/client/components/ui/table.mjs.map +1 -0
- package/dist/client/components/ui/tabs.d.mts +3 -0
- package/dist/client/components/ui/tabs.mjs +49 -0
- package/dist/client/components/ui/tabs.mjs.map +1 -0
- package/dist/client/components/ui/textarea.d.mts +2 -0
- package/dist/client/components/ui/textarea.mjs +15 -0
- package/dist/client/components/ui/textarea.mjs.map +1 -0
- package/dist/client/components/ui/toolbar.mjs +54 -0
- package/dist/client/components/ui/toolbar.mjs.map +1 -0
- package/dist/client/components/ui/tooltip.d.mts +2 -0
- package/dist/client/components/ui/tooltip.mjs +45 -0
- package/dist/client/components/ui/tooltip.mjs.map +1 -0
- package/dist/client/components/widgets/chart-widget.d.mts +57 -0
- package/dist/client/components/widgets/chart-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/chart-widget.mjs +282 -0
- package/dist/client/components/widgets/chart-widget.mjs.map +1 -0
- package/dist/client/components/widgets/progress-widget.d.mts +41 -0
- package/dist/client/components/widgets/progress-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/progress-widget.mjs +110 -0
- package/dist/client/components/widgets/progress-widget.mjs.map +1 -0
- package/dist/client/components/widgets/quick-actions-widget.d.mts +29 -0
- package/dist/client/components/widgets/quick-actions-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/quick-actions-widget.mjs +121 -0
- package/dist/client/components/widgets/quick-actions-widget.mjs.map +1 -0
- package/dist/client/components/widgets/recent-items-widget.d.mts +51 -0
- package/dist/client/components/widgets/recent-items-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/recent-items-widget.mjs +101 -0
- package/dist/client/components/widgets/recent-items-widget.mjs.map +1 -0
- package/dist/client/components/widgets/stats-widget.d.mts +55 -0
- package/dist/client/components/widgets/stats-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/stats-widget.mjs +150 -0
- package/dist/client/components/widgets/stats-widget.mjs.map +1 -0
- package/dist/client/components/widgets/table-widget.d.mts +31 -0
- package/dist/client/components/widgets/table-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/table-widget.mjs +139 -0
- package/dist/client/components/widgets/table-widget.mjs.map +1 -0
- package/dist/client/components/widgets/timeline-widget.d.mts +51 -0
- package/dist/client/components/widgets/timeline-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/timeline-widget.mjs +168 -0
- package/dist/client/components/widgets/timeline-widget.mjs.map +1 -0
- package/dist/client/components/widgets/value-widget.d.mts +39 -0
- package/dist/client/components/widgets/value-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/value-widget.mjs +111 -0
- package/dist/client/components/widgets/value-widget.mjs.map +1 -0
- package/dist/client/components/widgets/widget-skeletons.mjs +145 -0
- package/dist/client/components/widgets/widget-skeletons.mjs.map +1 -0
- package/dist/client/context/focus-context.d.mts +88 -0
- package/dist/client/context/focus-context.d.mts.map +1 -0
- package/dist/client/context/focus-context.mjs +178 -0
- package/dist/client/context/focus-context.mjs.map +1 -0
- package/dist/client/contexts/breadcrumb-context.mjs +32 -0
- package/dist/client/contexts/breadcrumb-context.mjs.map +1 -0
- package/dist/client/hooks/typed-hooks.d.mts +84 -0
- package/dist/client/hooks/typed-hooks.d.mts.map +1 -0
- package/dist/client/hooks/typed-hooks.mjs +272 -0
- package/dist/client/hooks/typed-hooks.mjs.map +1 -0
- package/dist/client/hooks/use-action.mjs +201 -0
- package/dist/client/hooks/use-action.mjs.map +1 -0
- package/dist/client/hooks/use-admin-config.mjs +40 -0
- package/dist/client/hooks/use-admin-config.mjs.map +1 -0
- package/dist/client/hooks/use-admin-preferences.mjs +68 -0
- package/dist/client/hooks/use-admin-preferences.mjs.map +1 -0
- package/dist/client/hooks/use-admin-routes.mjs +97 -0
- package/dist/client/hooks/use-admin-routes.mjs.map +1 -0
- package/dist/client/hooks/use-auth.d.mts +98 -0
- package/dist/client/hooks/use-auth.d.mts.map +1 -0
- package/dist/{use-auth-BoLmWtmU.mjs → client/hooks/use-auth.mjs} +3 -3
- package/dist/client/hooks/use-auth.mjs.map +1 -0
- package/dist/client/hooks/use-collection-fields.mjs +32 -0
- package/dist/client/hooks/use-collection-fields.mjs.map +1 -0
- package/dist/client/hooks/use-collection-meta.mjs +121 -0
- package/dist/client/hooks/use-collection-meta.mjs.map +1 -0
- package/dist/client/hooks/use-collection-schema.mjs +67 -0
- package/dist/client/hooks/use-collection-schema.mjs.map +1 -0
- package/dist/client/hooks/use-collection-validation.mjs +74 -0
- package/dist/client/hooks/use-collection-validation.mjs.map +1 -0
- package/dist/client/hooks/use-collection.d.mts +86 -0
- package/dist/client/hooks/use-collection.d.mts.map +1 -0
- package/dist/client/hooks/use-collection.mjs +214 -0
- package/dist/client/hooks/use-collection.mjs.map +1 -0
- package/dist/client/hooks/use-current-user.d.mts +57 -0
- package/dist/client/hooks/use-current-user.d.mts.map +1 -0
- package/dist/client/hooks/use-current-user.mjs +79 -0
- package/dist/client/hooks/use-current-user.mjs.map +1 -0
- package/dist/client/hooks/use-field-hooks.mjs +191 -0
- package/dist/client/hooks/use-field-hooks.mjs.map +1 -0
- package/dist/client/hooks/use-field-options.d.mts +90 -0
- package/dist/client/hooks/use-field-options.d.mts.map +1 -0
- package/dist/client/hooks/use-field-options.mjs +184 -0
- package/dist/client/hooks/use-field-options.mjs.map +1 -0
- package/dist/client/hooks/use-global-fields.mjs +27 -0
- package/dist/client/hooks/use-global-fields.mjs.map +1 -0
- package/dist/client/hooks/use-global-meta.mjs +59 -0
- package/dist/client/hooks/use-global-meta.mjs.map +1 -0
- package/dist/client/hooks/use-global-schema.mjs +33 -0
- package/dist/client/hooks/use-global-schema.mjs.map +1 -0
- package/dist/client/hooks/use-global.d.mts +40 -0
- package/dist/client/hooks/use-global.d.mts.map +1 -0
- package/dist/client/hooks/use-global.mjs +74 -0
- package/dist/client/hooks/use-global.mjs.map +1 -0
- package/dist/client/hooks/use-locks.mjs +245 -0
- package/dist/client/hooks/use-locks.mjs.map +1 -0
- package/dist/client/hooks/use-media-query.d.mts +23 -0
- package/dist/client/hooks/use-media-query.d.mts.map +1 -0
- package/dist/client/hooks/use-media-query.mjs +62 -0
- package/dist/client/hooks/use-media-query.mjs.map +1 -0
- package/dist/client/hooks/use-prefill-params.mjs +47 -0
- package/dist/client/hooks/use-prefill-params.mjs.map +1 -0
- package/dist/client/hooks/use-questpie-query-options.mjs +28 -0
- package/dist/client/hooks/use-questpie-query-options.mjs.map +1 -0
- package/dist/client/hooks/use-reactive-fields.d.mts +75 -0
- package/dist/client/hooks/use-reactive-fields.d.mts.map +1 -0
- package/dist/client/hooks/use-reactive-fields.mjs +164 -0
- package/dist/client/hooks/use-reactive-fields.mjs.map +1 -0
- package/dist/client/hooks/use-realtime-highlight.mjs +96 -0
- package/dist/client/hooks/use-realtime-highlight.mjs.map +1 -0
- package/dist/client/hooks/use-saved-views.mjs +65 -0
- package/dist/client/hooks/use-saved-views.mjs.map +1 -0
- package/dist/client/hooks/use-search.mjs +147 -0
- package/dist/client/hooks/use-search.mjs.map +1 -0
- package/dist/client/hooks/use-server-validation.mjs +199 -0
- package/dist/client/hooks/use-server-validation.mjs.map +1 -0
- package/dist/client/hooks/use-server-widget-data.d.mts +26 -0
- package/dist/client/hooks/use-server-widget-data.d.mts.map +1 -0
- package/dist/client/hooks/use-server-widget-data.mjs +40 -0
- package/dist/client/hooks/use-server-widget-data.mjs.map +1 -0
- package/dist/client/hooks/use-setup-status.d.mts +39 -0
- package/dist/client/hooks/use-setup-status.d.mts.map +1 -0
- package/dist/client/hooks/use-setup-status.mjs +50 -0
- package/dist/client/hooks/use-setup-status.mjs.map +1 -0
- package/dist/client/hooks/use-upload-collection.mjs +32 -0
- package/dist/client/hooks/use-upload-collection.mjs.map +1 -0
- package/dist/client/hooks/use-upload.d.mts +23 -0
- package/dist/client/hooks/use-upload.d.mts.map +1 -0
- package/dist/client/hooks/use-upload.mjs +145 -0
- package/dist/client/hooks/use-upload.mjs.map +1 -0
- package/dist/client/hooks/use-validation-error-map.mjs +53 -0
- package/dist/client/hooks/use-validation-error-map.mjs.map +1 -0
- package/dist/client/hooks/use-view-state.mjs +261 -0
- package/dist/client/hooks/use-view-state.mjs.map +1 -0
- package/dist/client/i18n/hooks.mjs +160 -0
- package/dist/client/i18n/hooks.mjs.map +1 -0
- package/dist/client/i18n/intl-cache.mjs +65 -0
- package/dist/client/i18n/intl-cache.mjs.map +1 -0
- package/dist/client/i18n/messages.mjs +7 -0
- package/dist/client/i18n/messages.mjs.map +1 -0
- package/dist/client/i18n/simple.d.mts +22 -0
- package/dist/client/i18n/simple.d.mts.map +1 -0
- package/dist/client/i18n/simple.mjs +157 -0
- package/dist/client/i18n/simple.mjs.map +1 -0
- package/dist/client/i18n/types.d.mts +110 -0
- package/dist/client/i18n/types.d.mts.map +1 -0
- package/dist/client/lib/utils.d.mts +1 -0
- package/dist/client/lib/utils.mjs +28 -0
- package/dist/client/lib/utils.mjs.map +1 -0
- package/dist/client/preview/block-scope-context.d.mts +74 -0
- package/dist/client/preview/block-scope-context.d.mts.map +1 -0
- package/dist/client/preview/block-scope-context.mjs +93 -0
- package/dist/client/preview/block-scope-context.mjs.map +1 -0
- package/dist/client/preview/index.d.mts +5 -0
- package/dist/client/preview/preview-banner.d.mts +46 -0
- package/dist/client/preview/preview-banner.d.mts.map +1 -0
- package/dist/client/preview/preview-banner.mjs +95 -0
- package/dist/client/preview/preview-banner.mjs.map +1 -0
- package/dist/client/preview/preview-field.d.mts +108 -0
- package/dist/client/preview/preview-field.d.mts.map +1 -0
- package/dist/client/preview/preview-field.mjs +125 -0
- package/dist/client/preview/preview-field.mjs.map +1 -0
- package/dist/client/preview/types.d.mts +115 -0
- package/dist/client/preview/types.d.mts.map +1 -0
- package/dist/client/preview/types.mjs +21 -0
- package/dist/client/preview/types.mjs.map +1 -0
- package/dist/client/preview/use-collection-preview.d.mts +71 -0
- package/dist/client/preview/use-collection-preview.d.mts.map +1 -0
- package/dist/client/preview/use-collection-preview.mjs +114 -0
- package/dist/client/preview/use-collection-preview.mjs.map +1 -0
- package/dist/client/runtime/content-locales-provider.d.mts +1 -0
- package/dist/client/runtime/content-locales-provider.mjs +85 -0
- package/dist/client/runtime/content-locales-provider.mjs.map +1 -0
- package/dist/client/runtime/index.d.mts +7 -0
- package/dist/client/runtime/index.mjs +8 -0
- package/dist/client/runtime/locale-scope.d.mts +2 -0
- package/dist/{runtime-6VZM878K.mjs → client/runtime/locale-scope.mjs} +3 -4
- package/dist/client/runtime/locale-scope.mjs.map +1 -0
- package/dist/client/runtime/provider.d.mts +10107 -0
- package/dist/client/runtime/provider.d.mts.map +1 -0
- package/dist/client/runtime/provider.mjs +229 -0
- package/dist/client/runtime/provider.mjs.map +1 -0
- package/dist/client/runtime/routes.d.mts +49 -0
- package/dist/client/runtime/routes.d.mts.map +1 -0
- package/dist/client/runtime/routes.mjs +107 -0
- package/dist/client/runtime/routes.mjs.map +1 -0
- package/dist/client/runtime/translations-provider.d.mts +2 -0
- package/dist/client/runtime/translations-provider.mjs +181 -0
- package/dist/client/runtime/translations-provider.mjs.map +1 -0
- package/dist/client/scope/index.d.mts +3 -0
- package/dist/client/scope/picker.d.mts +54 -0
- package/dist/client/scope/picker.d.mts.map +1 -0
- package/dist/client/scope/picker.mjs +161 -0
- package/dist/client/scope/picker.mjs.map +1 -0
- package/dist/client/scope/provider.d.mts +104 -0
- package/dist/client/scope/provider.d.mts.map +1 -0
- package/dist/client/scope/provider.mjs +159 -0
- package/dist/client/scope/provider.mjs.map +1 -0
- package/dist/client/scope/types.d.mts +112 -0
- package/dist/client/scope/types.d.mts.map +1 -0
- package/dist/client/styles/index.css +80 -0
- package/dist/client/utils/auto-expand-fields.mjs +65 -0
- package/dist/client/utils/auto-expand-fields.mjs.map +1 -0
- package/dist/client/utils/build-field-definitions-from-schema.mjs +256 -0
- package/dist/client/utils/build-field-definitions-from-schema.mjs.map +1 -0
- package/dist/client/utils/detect-relations.mjs +46 -0
- package/dist/client/utils/detect-relations.mjs.map +1 -0
- package/dist/client/utils/locale-to-flag.d.mts +118 -0
- package/dist/client/utils/locale-to-flag.d.mts.map +1 -0
- package/dist/client/utils/locale-to-flag.mjs +130 -0
- package/dist/client/utils/locale-to-flag.mjs.map +1 -0
- package/dist/client/utils/routes.mjs +196 -0
- package/dist/client/utils/routes.mjs.map +1 -0
- package/dist/client/views/auth/accept-invite-form.d.mts +73 -0
- package/dist/client/views/auth/accept-invite-form.d.mts.map +1 -0
- package/dist/client/views/auth/accept-invite-form.mjs +180 -0
- package/dist/client/views/auth/accept-invite-form.mjs.map +1 -0
- package/dist/client/views/auth/auth-layout.d.mts +44 -0
- package/dist/client/views/auth/auth-layout.d.mts.map +1 -0
- package/dist/client/views/auth/auth-layout.mjs +53 -0
- package/dist/client/views/auth/auth-layout.mjs.map +1 -0
- package/dist/client/views/auth/forgot-password-form.d.mts +59 -0
- package/dist/client/views/auth/forgot-password-form.d.mts.map +1 -0
- package/dist/{forgot-password-page-Bcp-An4Y.mjs → client/views/auth/forgot-password-form.mjs} +22 -89
- package/dist/client/views/auth/forgot-password-form.mjs.map +1 -0
- package/dist/client/views/auth/index.d.mts +7 -0
- package/dist/client/views/auth/invite-form.d.mts +1 -0
- package/dist/client/views/auth/invite-form.mjs +155 -0
- package/dist/client/views/auth/invite-form.mjs.map +1 -0
- package/dist/client/views/auth/login-form.d.mts +76 -0
- package/dist/client/views/auth/login-form.d.mts.map +1 -0
- package/dist/client/views/auth/login-form.mjs +167 -0
- package/dist/client/views/auth/login-form.mjs.map +1 -0
- package/dist/client/views/auth/reset-password-form.d.mts +66 -0
- package/dist/client/views/auth/reset-password-form.d.mts.map +1 -0
- package/dist/client/views/auth/reset-password-form.mjs +188 -0
- package/dist/client/views/auth/reset-password-form.mjs.map +1 -0
- package/dist/client/views/auth/setup-form.d.mts +61 -0
- package/dist/client/views/auth/setup-form.d.mts.map +1 -0
- package/dist/{setup-page-YAP_fzqh.mjs → client/views/auth/setup-form.mjs} +46 -124
- package/dist/client/views/auth/setup-form.mjs.map +1 -0
- package/dist/client/views/collection/auto-form-fields.d.mts +4 -0
- package/dist/client/views/collection/auto-form-fields.mjs +453 -0
- package/dist/client/views/collection/auto-form-fields.mjs.map +1 -0
- package/dist/client/views/collection/bulk-action-toolbar.mjs +291 -0
- package/dist/client/views/collection/bulk-action-toolbar.mjs.map +1 -0
- package/dist/client/views/collection/cells/complex-cells.d.mts +46 -0
- package/dist/client/views/collection/cells/complex-cells.d.mts.map +1 -0
- package/dist/client/views/collection/cells/complex-cells.mjs +327 -0
- package/dist/client/views/collection/cells/complex-cells.mjs.map +1 -0
- package/dist/client/views/collection/cells/index.d.mts +7 -0
- package/dist/client/views/collection/cells/primitive-cells.d.mts +76 -0
- package/dist/client/views/collection/cells/primitive-cells.d.mts.map +1 -0
- package/dist/client/views/collection/cells/primitive-cells.mjs +165 -0
- package/dist/client/views/collection/cells/primitive-cells.mjs.map +1 -0
- package/dist/client/views/collection/cells/relation-cells.d.mts +21 -0
- package/dist/client/views/collection/cells/relation-cells.d.mts.map +1 -0
- package/dist/client/views/collection/cells/relation-cells.mjs +105 -0
- package/dist/client/views/collection/cells/relation-cells.mjs.map +1 -0
- package/dist/client/views/collection/cells/shared/asset-thumbnail.d.mts +1 -0
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +189 -0
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs.map +1 -0
- package/dist/client/views/collection/cells/shared/cell-helpers.d.mts +2 -0
- package/dist/client/views/collection/cells/shared/cell-helpers.mjs +78 -0
- package/dist/client/views/collection/cells/shared/cell-helpers.mjs.map +1 -0
- package/dist/client/views/collection/cells/shared/relation-chip.d.mts +1 -0
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +37 -0
- package/dist/client/views/collection/cells/shared/relation-chip.mjs.map +1 -0
- package/dist/client/views/collection/cells/upload-cells.d.mts +25 -0
- package/dist/client/views/collection/cells/upload-cells.d.mts.map +1 -0
- package/dist/client/views/collection/cells/upload-cells.mjs +20 -0
- package/dist/client/views/collection/cells/upload-cells.mjs.map +1 -0
- package/dist/client/views/collection/columns/build-columns.d.mts +2 -0
- package/dist/client/views/collection/columns/build-columns.mjs +156 -0
- package/dist/client/views/collection/columns/build-columns.mjs.map +1 -0
- package/dist/client/views/collection/columns/column-defaults.d.mts +2 -0
- package/dist/client/views/collection/columns/column-defaults.mjs +108 -0
- package/dist/client/views/collection/columns/column-defaults.mjs.map +1 -0
- package/dist/client/views/collection/columns/index.d.mts +3 -0
- package/dist/client/views/collection/columns/types.d.mts +2 -0
- package/dist/client/views/collection/field-context.mjs +127 -0
- package/dist/client/views/collection/field-context.mjs.map +1 -0
- package/dist/client/views/collection/field-renderer.mjs +171 -0
- package/dist/client/views/collection/field-renderer.mjs.map +1 -0
- package/dist/client/views/collection/form-view.d.mts +112 -0
- package/dist/client/views/collection/form-view.d.mts.map +1 -0
- package/dist/client/views/collection/form-view.mjs +903 -0
- package/dist/client/views/collection/form-view.mjs.map +1 -0
- package/dist/client/views/collection/index.d.mts +9 -0
- package/dist/client/views/collection/table-view.d.mts +102 -0
- package/dist/client/views/collection/table-view.d.mts.map +1 -0
- package/dist/client/views/collection/table-view.mjs +695 -0
- package/dist/client/views/collection/table-view.mjs.map +1 -0
- package/dist/client/views/collection/view-skeletons.mjs +121 -0
- package/dist/client/views/collection/view-skeletons.mjs.map +1 -0
- package/dist/client/views/common/global-search.d.mts +1 -0
- package/dist/client/views/common/global-search.mjs +376 -0
- package/dist/client/views/common/global-search.mjs.map +1 -0
- package/dist/client/views/common/index.d.mts +1 -0
- package/dist/client/views/dashboard/dashboard-grid.mjs +385 -0
- package/dist/client/views/dashboard/dashboard-grid.mjs.map +1 -0
- package/dist/client/views/dashboard/dashboard-widget.mjs +178 -0
- package/dist/client/views/dashboard/dashboard-widget.mjs.map +1 -0
- package/dist/client/views/dashboard/widget-card.mjs +159 -0
- package/dist/client/views/dashboard/widget-card.mjs.map +1 -0
- package/dist/client/views/globals/global-form-view.d.mts +74 -0
- package/dist/client/views/globals/global-form-view.d.mts.map +1 -0
- package/dist/client/views/globals/global-form-view.mjs +181 -0
- package/dist/client/views/globals/global-form-view.mjs.map +1 -0
- package/dist/client/views/index.d.mts +28 -0
- package/dist/client/views/layout/admin-layout-provider.d.mts +140 -0
- package/dist/client/views/layout/admin-layout-provider.d.mts.map +1 -0
- package/dist/client/views/layout/admin-layout-provider.mjs +90 -0
- package/dist/client/views/layout/admin-layout-provider.mjs.map +1 -0
- package/dist/client/views/layout/admin-layout.d.mts +151 -0
- package/dist/client/views/layout/admin-layout.d.mts.map +1 -0
- package/dist/client/views/layout/admin-layout.mjs +144 -0
- package/dist/client/views/layout/admin-layout.mjs.map +1 -0
- package/dist/client/views/layout/admin-root.d.mts +7 -0
- package/dist/client/views/layout/admin-router.d.mts +125 -0
- package/dist/client/views/layout/admin-router.d.mts.map +1 -0
- package/dist/client/views/layout/admin-router.mjs +594 -0
- package/dist/client/views/layout/admin-router.mjs.map +1 -0
- package/dist/client/views/layout/admin-sidebar.d.mts +105 -0
- package/dist/client/views/layout/admin-sidebar.d.mts.map +1 -0
- package/dist/client/views/layout/admin-sidebar.mjs +550 -0
- package/dist/client/views/layout/admin-sidebar.mjs.map +1 -0
- package/dist/client/views/layout/admin-topbar.mjs +128 -0
- package/dist/client/views/layout/admin-topbar.mjs.map +1 -0
- package/dist/client/views/layout/index.d.mts +5 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +67 -0
- package/dist/client/views/pages/accept-invite-page.d.mts.map +1 -0
- package/dist/client/views/pages/accept-invite-page.mjs +143 -0
- package/dist/client/views/pages/accept-invite-page.mjs.map +1 -0
- package/dist/client/views/pages/dashboard-page.d.mts +52 -0
- package/dist/client/views/pages/dashboard-page.d.mts.map +1 -0
- package/dist/client/views/pages/dashboard-page.mjs +45 -0
- package/dist/client/views/pages/dashboard-page.mjs.map +1 -0
- package/dist/client/views/pages/forgot-password-page.d.mts +59 -0
- package/dist/client/views/pages/forgot-password-page.d.mts.map +1 -0
- package/dist/client/views/pages/forgot-password-page.mjs +80 -0
- package/dist/client/views/pages/forgot-password-page.mjs.map +1 -0
- package/dist/client/views/pages/index.d.mts +7 -0
- package/dist/client/views/pages/invite-page.d.mts +71 -0
- package/dist/client/views/pages/invite-page.d.mts.map +1 -0
- package/dist/client/views/pages/invite-page.mjs +86 -0
- package/dist/client/views/pages/invite-page.mjs.map +1 -0
- package/dist/client/views/pages/login-page.d.mts +76 -0
- package/dist/client/views/pages/login-page.d.mts.map +1 -0
- package/dist/client/views/pages/login-page.mjs +98 -0
- package/dist/client/views/pages/login-page.mjs.map +1 -0
- package/dist/client/views/pages/reset-password-page.d.mts +66 -0
- package/dist/client/views/pages/reset-password-page.d.mts.map +1 -0
- package/dist/client/views/pages/reset-password-page.mjs +105 -0
- package/dist/client/views/pages/reset-password-page.mjs.map +1 -0
- package/dist/client/views/pages/setup-page.d.mts +64 -0
- package/dist/client/views/pages/setup-page.d.mts.map +1 -0
- package/dist/client/views/pages/setup-page.mjs +91 -0
- package/dist/client/views/pages/setup-page.mjs.map +1 -0
- package/dist/client.d.mts +92 -3
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +54 -12
- package/dist/components/rich-text/index.d.mts +1 -0
- package/dist/components/rich-text/rich-text-renderer.d.mts +104 -0
- package/dist/components/rich-text/rich-text-renderer.d.mts.map +1 -0
- package/dist/components/rich-text/rich-text-renderer.mjs +210 -0
- package/dist/components/rich-text/rich-text-renderer.mjs.map +1 -0
- package/dist/index.d.mts +62 -3
- package/dist/index.mjs +54 -12
- package/dist/server/adapters/nextjs.d.mts +121 -0
- package/dist/server/adapters/nextjs.d.mts.map +1 -0
- package/dist/server/adapters/nextjs.mjs +111 -0
- package/dist/server/adapters/nextjs.mjs.map +1 -0
- package/dist/server/adapters/tanstack.d.mts +133 -0
- package/dist/server/adapters/tanstack.d.mts.map +1 -0
- package/dist/server/adapters/tanstack.mjs +90 -0
- package/dist/server/adapters/tanstack.mjs.map +1 -0
- package/dist/server/augmentation.d.mts +1523 -0
- package/dist/server/augmentation.d.mts.map +1 -0
- package/dist/server/auth-helpers.d.mts +143 -0
- package/dist/server/auth-helpers.d.mts.map +1 -0
- package/dist/server/auth-helpers.mjs +108 -0
- package/dist/server/auth-helpers.mjs.map +1 -0
- package/dist/server/block/block-builder.d.mts +319 -0
- package/dist/server/block/block-builder.d.mts.map +1 -0
- package/dist/server/block/block-builder.mjs +217 -0
- package/dist/server/block/block-builder.mjs.map +1 -0
- package/dist/server/block/index.d.mts +3 -0
- package/dist/server/block/introspection.d.mts +84 -0
- package/dist/server/block/introspection.d.mts.map +1 -0
- package/dist/server/block/introspection.mjs +89 -0
- package/dist/server/block/introspection.mjs.map +1 -0
- package/dist/server/block/prefetch.d.mts +78 -0
- package/dist/server/block/prefetch.d.mts.map +1 -0
- package/dist/server/block/prefetch.mjs +240 -0
- package/dist/server/block/prefetch.mjs.map +1 -0
- package/dist/server/fields/blocks.d.mts +139 -0
- package/dist/server/fields/blocks.d.mts.map +1 -0
- package/dist/server/fields/blocks.mjs +192 -0
- package/dist/server/fields/blocks.mjs.map +1 -0
- package/dist/server/fields/index.d.mts +48 -0
- package/dist/server/fields/index.d.mts.map +1 -0
- package/dist/server/fields/index.mjs +16 -0
- package/dist/server/fields/index.mjs.map +1 -0
- package/dist/server/fields/rich-text.d.mts +135 -0
- package/dist/server/fields/rich-text.d.mts.map +1 -0
- package/dist/server/fields/rich-text.mjs +188 -0
- package/dist/server/fields/rich-text.mjs.map +1 -0
- package/dist/server/i18n/index.d.mts +16 -0
- package/dist/server/i18n/index.d.mts.map +1 -0
- package/dist/server/i18n/index.mjs +44 -0
- package/dist/server/i18n/index.mjs.map +1 -0
- package/dist/server/i18n/messages/cs.mjs +461 -0
- package/dist/server/i18n/messages/cs.mjs.map +1 -0
- package/dist/server/i18n/messages/de.mjs +461 -0
- package/dist/server/i18n/messages/de.mjs.map +1 -0
- package/dist/server/i18n/messages/en.mjs +493 -0
- package/dist/server/i18n/messages/en.mjs.map +1 -0
- package/dist/server/i18n/messages/es.mjs +461 -0
- package/dist/server/i18n/messages/es.mjs.map +1 -0
- package/dist/server/i18n/messages/fr.mjs +461 -0
- package/dist/server/i18n/messages/fr.mjs.map +1 -0
- package/dist/server/i18n/messages/index.mjs +24 -0
- package/dist/server/i18n/messages/index.mjs.map +1 -0
- package/dist/server/i18n/messages/pl.mjs +461 -0
- package/dist/server/i18n/messages/pl.mjs.map +1 -0
- package/dist/server/i18n/messages/pt.mjs +464 -0
- package/dist/server/i18n/messages/pt.mjs.map +1 -0
- package/dist/server/i18n/messages/sk.mjs +490 -0
- package/dist/server/i18n/messages/sk.mjs.map +1 -0
- package/dist/server/index.d.mts +20 -0
- package/dist/server/modules/admin/functions/admin-config.mjs +348 -0
- package/dist/server/modules/admin/functions/admin-config.mjs.map +1 -0
- package/dist/server/modules/admin/functions/execute-action.d.mts +107 -0
- package/dist/server/modules/admin/functions/execute-action.d.mts.map +1 -0
- package/dist/server/modules/admin/functions/execute-action.mjs +331 -0
- package/dist/server/modules/admin/functions/execute-action.mjs.map +1 -0
- package/dist/server/modules/admin/functions/locales.mjs +80 -0
- package/dist/server/modules/admin/functions/locales.mjs.map +1 -0
- package/dist/server/modules/admin/functions/preview.d.mts +70 -0
- package/dist/server/modules/admin/functions/preview.d.mts.map +1 -0
- package/dist/server/modules/admin/functions/preview.mjs +243 -0
- package/dist/server/modules/admin/functions/preview.mjs.map +1 -0
- package/dist/server/modules/admin/functions/reactive.d.mts +99 -0
- package/dist/server/modules/admin/functions/reactive.d.mts.map +1 -0
- package/dist/server/modules/admin/functions/reactive.mjs +378 -0
- package/dist/server/modules/admin/functions/reactive.mjs.map +1 -0
- package/dist/server/modules/admin/functions/setup.d.mts +84 -0
- package/dist/server/modules/admin/functions/setup.d.mts.map +1 -0
- package/dist/server/modules/admin/functions/setup.mjs +131 -0
- package/dist/server/modules/admin/functions/setup.mjs.map +1 -0
- package/dist/server/modules/admin/functions/translations.mjs +125 -0
- package/dist/server/modules/admin/functions/translations.mjs.map +1 -0
- package/dist/server/modules/admin/functions/widget-data.d.mts +33 -0
- package/dist/server/modules/admin/functions/widget-data.d.mts.map +1 -0
- package/dist/server/modules/admin/functions/widget-data.mjs +70 -0
- package/dist/server/modules/admin/functions/widget-data.mjs.map +1 -0
- package/dist/server/modules/admin/index.d.mts +16879 -0
- package/dist/server/modules/admin/index.d.mts.map +1 -0
- package/dist/server/modules/admin/index.mjs +249 -0
- package/dist/server/modules/admin/index.mjs.map +1 -0
- package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.d.mts +3 -0
- package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.mjs +48 -0
- package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.mjs.map +1 -0
- package/dist/server/modules/admin-preferences/collections/locks.collection.d.mts +3 -0
- package/dist/server/modules/admin-preferences/collections/locks.collection.mjs +79 -0
- package/dist/server/modules/admin-preferences/collections/locks.collection.mjs.map +1 -0
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.d.mts +1490 -0
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.d.mts.map +1 -0
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.mjs +57 -0
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.mjs.map +1 -0
- package/dist/server/patch.d.mts +100 -0
- package/dist/server/patch.d.mts.map +1 -0
- package/dist/server/patch.mjs +1062 -0
- package/dist/server/patch.mjs.map +1 -0
- package/dist/server.d.mts +21 -250
- package/dist/server.mjs +19 -832
- package/dist/shared/preview-utils.d.mts +54 -0
- package/dist/shared/preview-utils.d.mts.map +1 -0
- package/dist/{preview-utils-BKQ9-TMa.mjs → shared/preview-utils.mjs} +2 -2
- package/dist/shared/preview-utils.mjs.map +1 -0
- package/dist/{saved-views.types-BMsz5mCy.d.mts → shared/types/saved-views.types.d.mts} +7 -2
- package/dist/shared/types/saved-views.types.d.mts.map +1 -0
- package/dist/shared.d.mts +3 -57
- package/dist/shared.mjs +1 -1
- package/package.json +12 -17
- package/dist/auth-layout-M8K8_q5R.mjs +0 -181
- package/dist/auth-layout-M8K8_q5R.mjs.map +0 -1
- package/dist/bulk-upload-dialog-D7w7W1Hl.mjs +0 -273
- package/dist/bulk-upload-dialog-D7w7W1Hl.mjs.map +0 -1
- package/dist/client-D1DqawtP.d.mts +0 -13403
- package/dist/client-D1DqawtP.d.mts.map +0 -1
- package/dist/client-njX1rZmi.mjs +0 -22612
- package/dist/client-njX1rZmi.mjs.map +0 -1
- package/dist/content-locales-provider-BXvuIgfg.mjs +0 -1650
- package/dist/content-locales-provider-BXvuIgfg.mjs.map +0 -1
- package/dist/dashboard-page-B4PGEdc2.mjs +0 -2500
- package/dist/dashboard-page-B4PGEdc2.mjs.map +0 -1
- package/dist/dashboard-page-mCY0pgZv.mjs +0 -3
- package/dist/dropzone-Do3awXKd.mjs +0 -634
- package/dist/dropzone-Do3awXKd.mjs.map +0 -1
- package/dist/forgot-password-page-Bcp-An4Y.mjs.map +0 -1
- package/dist/forgot-password-page-CEwsdLwn.mjs +0 -3
- package/dist/index-B4H3amCD.d.mts +0 -2753
- package/dist/index-B4H3amCD.d.mts.map +0 -1
- package/dist/login-page-BUnpCbCa.mjs +0 -3
- package/dist/login-page-CP4gA-dl.mjs +0 -298
- package/dist/login-page-CP4gA-dl.mjs.map +0 -1
- package/dist/preview-utils-BKQ9-TMa.mjs.map +0 -1
- package/dist/reset-password-page-BqfDmLxA.mjs +0 -281
- package/dist/reset-password-page-BqfDmLxA.mjs.map +0 -1
- package/dist/reset-password-page-CufHz3h3.mjs +0 -3
- package/dist/runtime-6VZM878K.mjs.map +0 -1
- package/dist/saved-views.types-BMsz5mCy.d.mts.map +0 -1
- package/dist/server.d.mts.map +0 -1
- package/dist/server.mjs.map +0 -1
- package/dist/setup-page-BNNzt_Z6.mjs +0 -3
- package/dist/setup-page-YAP_fzqh.mjs.map +0 -1
- package/dist/shared.d.mts.map +0 -1
- package/dist/use-auth-BoLmWtmU.mjs.map +0 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { AdminBuilder } from "./admin-builder.mjs";
|
|
2
|
+
import { Questpie } from "questpie";
|
|
3
|
+
|
|
4
|
+
//#region src/client/builder/registry.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Admin Type Registry for module augmentation.
|
|
8
|
+
*
|
|
9
|
+
* @deprecated Use `createTypedHooks<AppCMS>()` instead for new projects.
|
|
10
|
+
* Module augmentation is still supported for backwards compatibility.
|
|
11
|
+
*
|
|
12
|
+
* Legacy usage (still works but not recommended):
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* // In your admin.ts after creating the admin config:
|
|
16
|
+
* export const admin = qa()
|
|
17
|
+
* .use(coreAdminModule)
|
|
18
|
+
* .collections({ barbers, services })
|
|
19
|
+
*
|
|
20
|
+
* declare module "@questpie/admin" {
|
|
21
|
+
* interface AdminTypeRegistry {
|
|
22
|
+
* cms: AppCMS
|
|
23
|
+
* admin: typeof admin
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* New recommended pattern:
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* import type { AppCMS } from './server/cms';
|
|
32
|
+
* import { createTypedHooks } from '@questpie/admin/client';
|
|
33
|
+
*
|
|
34
|
+
* export const {
|
|
35
|
+
* useCollectionList,
|
|
36
|
+
* useCollectionItem,
|
|
37
|
+
* useGlobal,
|
|
38
|
+
* } = createTypedHooks<AppCMS>();
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
interface AdminTypeRegistry {}
|
|
42
|
+
/**
|
|
43
|
+
* Extract the CMS type from AdminTypeRegistry if augmented, otherwise unknown.
|
|
44
|
+
*/
|
|
45
|
+
type RegisteredCMS = AdminTypeRegistry extends {
|
|
46
|
+
cms: infer T;
|
|
47
|
+
} ? T extends Questpie<any> ? T : unknown : unknown;
|
|
48
|
+
/**
|
|
49
|
+
* Extract the Admin config type from AdminTypeRegistry if augmented, otherwise unknown.
|
|
50
|
+
*/
|
|
51
|
+
type RegisteredAdmin = AdminTypeRegistry extends {
|
|
52
|
+
admin: infer T;
|
|
53
|
+
} ? T extends AdminBuilder<any> ? T : unknown : unknown;
|
|
54
|
+
/**
|
|
55
|
+
* Extract collection names from registered CMS.
|
|
56
|
+
* Falls back to string if CMS is not registered.
|
|
57
|
+
*/
|
|
58
|
+
type RegisteredCollectionNames = RegisteredCMS extends Questpie<infer TConfig> ? keyof TConfig["collections"] & string : string;
|
|
59
|
+
/**
|
|
60
|
+
* Extract global names from registered CMS.
|
|
61
|
+
* Falls back to string if CMS is not registered.
|
|
62
|
+
*/
|
|
63
|
+
type RegisteredGlobalNames = RegisteredCMS extends Questpie<infer TConfig> ? keyof TConfig["globals"] & string : string;
|
|
64
|
+
/**
|
|
65
|
+
* Check if the registry has been augmented with a CMS type.
|
|
66
|
+
*/
|
|
67
|
+
type IsRegistered = RegisteredCMS extends unknown ? RegisteredCMS extends Questpie<any> ? true : false : false;
|
|
68
|
+
//#endregion
|
|
69
|
+
export { AdminTypeRegistry, IsRegistered, RegisteredAdmin, RegisteredCMS, RegisteredCollectionNames, RegisteredGlobalNames };
|
|
70
|
+
//# sourceMappingURL=registry.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.mts","names":[],"sources":["../../../src/client/builder/registry.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAmEiB,iBAAA;;;;KAoBL,aAAA,GAAgB;;cACd;;;;KAQF,eAAA,GAAkB;;cAChB;;;;;KASF,yBAAA,GACV,sBAAsB,gCACZ;;;;;KAOA,qBAAA,GACV,sBAAsB,gCACZ;;;;KAMA,YAAA,GAAe,gCACvB,sBAAsB"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { buildPrefillUrl } from "../../hooks/use-prefill-params.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/client/builder/types/action-registry.ts
|
|
4
|
+
/**
|
|
5
|
+
* Create a "Create" action
|
|
6
|
+
*/
|
|
7
|
+
function createCreateAction(opts) {
|
|
8
|
+
return {
|
|
9
|
+
id: "create",
|
|
10
|
+
label: "Create",
|
|
11
|
+
icon: {
|
|
12
|
+
type: "icon",
|
|
13
|
+
props: { name: "ph:plus" }
|
|
14
|
+
},
|
|
15
|
+
variant: "default",
|
|
16
|
+
handler: {
|
|
17
|
+
type: "navigate",
|
|
18
|
+
path: "create"
|
|
19
|
+
},
|
|
20
|
+
...opts
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Create a "Duplicate" action (bulk action, shows only when 1 item selected)
|
|
25
|
+
*/
|
|
26
|
+
function createDuplicateAction(opts) {
|
|
27
|
+
return {
|
|
28
|
+
id: "duplicate",
|
|
29
|
+
label: "Duplicate",
|
|
30
|
+
icon: {
|
|
31
|
+
type: "icon",
|
|
32
|
+
props: { name: "ph:copy" }
|
|
33
|
+
},
|
|
34
|
+
variant: "ghost",
|
|
35
|
+
visible: (ctx) => {
|
|
36
|
+
if (Array.isArray(ctx.item)) return ctx.item.length === 1;
|
|
37
|
+
return !!ctx.item;
|
|
38
|
+
},
|
|
39
|
+
handler: {
|
|
40
|
+
type: "custom",
|
|
41
|
+
fn: async (ctx) => {
|
|
42
|
+
const item = Array.isArray(ctx.item) ? ctx.item[0] : ctx.item;
|
|
43
|
+
if (!item) return;
|
|
44
|
+
const { id, createdAt, updatedAt, ...data } = item;
|
|
45
|
+
const prefillUrl = buildPrefillUrl(`${ctx.helpers.basePath}/collections/${ctx.collection}/create`, data);
|
|
46
|
+
ctx.helpers.navigate(prefillUrl);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
...opts
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Create a "Delete Many" (bulk delete) action
|
|
54
|
+
*
|
|
55
|
+
* Note: The actual deletion is handled by BulkActionToolbar via onBulkDelete callback.
|
|
56
|
+
* This action definition just configures the UI and confirmation.
|
|
57
|
+
*/
|
|
58
|
+
function createDeleteManyAction(opts) {
|
|
59
|
+
return {
|
|
60
|
+
id: "deleteMany",
|
|
61
|
+
label: "Delete Selected",
|
|
62
|
+
icon: {
|
|
63
|
+
type: "icon",
|
|
64
|
+
props: { name: "ph:trash" }
|
|
65
|
+
},
|
|
66
|
+
variant: "destructive",
|
|
67
|
+
confirmation: {
|
|
68
|
+
title: "Delete selected items?",
|
|
69
|
+
description: "This action cannot be undone. All selected items will be permanently deleted.",
|
|
70
|
+
confirmLabel: "Delete All",
|
|
71
|
+
destructive: true
|
|
72
|
+
},
|
|
73
|
+
handler: {
|
|
74
|
+
type: "custom",
|
|
75
|
+
fn: async () => {}
|
|
76
|
+
},
|
|
77
|
+
...opts
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Create a "Delete" action for single item (form view)
|
|
82
|
+
*/
|
|
83
|
+
function createDeleteAction(opts) {
|
|
84
|
+
return {
|
|
85
|
+
id: "delete",
|
|
86
|
+
label: "Delete",
|
|
87
|
+
icon: {
|
|
88
|
+
type: "icon",
|
|
89
|
+
props: { name: "ph:trash" }
|
|
90
|
+
},
|
|
91
|
+
variant: "destructive",
|
|
92
|
+
confirmation: {
|
|
93
|
+
title: "Delete item?",
|
|
94
|
+
description: "This action cannot be undone. The item will be permanently deleted.",
|
|
95
|
+
confirmLabel: "Delete",
|
|
96
|
+
destructive: true
|
|
97
|
+
},
|
|
98
|
+
handler: {
|
|
99
|
+
type: "api",
|
|
100
|
+
endpoint: "{id}",
|
|
101
|
+
method: "DELETE"
|
|
102
|
+
},
|
|
103
|
+
...opts
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Get default header actions for a collection
|
|
108
|
+
*/
|
|
109
|
+
function getDefaultHeaderActions() {
|
|
110
|
+
return {
|
|
111
|
+
primary: [createCreateAction()],
|
|
112
|
+
secondary: []
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Get default bulk actions for a collection
|
|
117
|
+
*/
|
|
118
|
+
function getDefaultBulkActions() {
|
|
119
|
+
return [createDeleteManyAction(), createDuplicateAction()];
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get default form actions for a collection (edit view)
|
|
123
|
+
*/
|
|
124
|
+
function getDefaultFormActions() {
|
|
125
|
+
return {
|
|
126
|
+
primary: [],
|
|
127
|
+
secondary: [createDuplicateAction(), createDeleteAction()]
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get complete default actions config
|
|
132
|
+
*/
|
|
133
|
+
function getDefaultActionsConfig() {
|
|
134
|
+
return {
|
|
135
|
+
header: getDefaultHeaderActions(),
|
|
136
|
+
bulk: getDefaultBulkActions()
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
//#endregion
|
|
141
|
+
export { getDefaultActionsConfig, getDefaultFormActions };
|
|
142
|
+
//# sourceMappingURL=action-registry.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-registry.mjs","names":[],"sources":["../../../../src/client/builder/types/action-registry.ts"],"sourcesContent":["/**\n * Action Registry\n *\n * Provides built-in action factories and the action registry proxy\n * for type-safe action configuration in collection builders.\n */\n\nimport type { ComponentReference } from \"#questpie/admin/server\";\nimport { buildPrefillUrl } from \"../../hooks/use-prefill-params\";\nimport type { FormViewActionsConfig } from \"./field-types\";\nimport type {\n ActionContext,\n ActionDefinition,\n ActionsConfig,\n HeaderActionsConfig,\n} from \"./action-types\";\n\n// ============================================================================\n// Action Registry Proxy Type\n// ============================================================================\n\n/**\n * Proxy type for building actions with autocomplete\n */\nexport interface ActionRegistryProxy<TItem = any> {\n /**\n * Create action - navigates to create page (header action)\n */\n create(opts?: Partial<ActionDefinition<TItem>>): ActionDefinition<TItem>;\n\n /**\n * Duplicate action - creates a copy of the selected item\n * For bulk: shows only when 1 item selected\n * For form: always visible\n */\n duplicate(opts?: Partial<ActionDefinition<TItem>>): ActionDefinition<TItem>;\n\n /**\n * Delete action - deletes single item with confirmation (form action)\n */\n delete(opts?: Partial<ActionDefinition<TItem>>): ActionDefinition<TItem>;\n\n /**\n * Delete many action - bulk delete selected items\n */\n deleteMany(opts?: Partial<ActionDefinition<TItem>>): ActionDefinition<TItem>;\n\n /**\n * Custom action - define a fully custom action\n */\n action(def: ActionDefinition<TItem>): ActionDefinition<TItem>;\n}\n\n// ============================================================================\n// Built-in Action Factories\n// ============================================================================\n\n/**\n * Create a \"Create\" action\n */\nfunction createCreateAction<TItem>(\n opts?: Partial<ActionDefinition<TItem>>,\n): ActionDefinition<TItem> {\n return {\n id: \"create\",\n label: \"Create\",\n icon: {\n type: \"icon\",\n props: { name: \"ph:plus\" },\n } satisfies ComponentReference,\n variant: \"default\",\n handler: {\n type: \"navigate\",\n path: \"create\",\n },\n ...opts,\n };\n}\n\n/**\n * Create a \"Duplicate\" action (bulk action, shows only when 1 item selected)\n */\nfunction createDuplicateAction<TItem>(\n opts?: Partial<ActionDefinition<TItem>>,\n): ActionDefinition<TItem> {\n return {\n id: \"duplicate\",\n label: \"Duplicate\",\n icon: {\n type: \"icon\",\n props: { name: \"ph:copy\" },\n } satisfies ComponentReference,\n variant: \"ghost\",\n // Default visibility: only show when exactly 1 item selected\n visible: (ctx) => {\n // For bulk context, ctx.item is an array\n if (Array.isArray(ctx.item)) {\n return ctx.item.length === 1;\n }\n // For form context, ctx.item is a single item\n return !!ctx.item;\n },\n handler: {\n type: \"custom\",\n fn: async (ctx: ActionContext<TItem>) => {\n // Get the item - either single item or first from array\n const item = Array.isArray(ctx.item) ? ctx.item[0] : ctx.item;\n if (!item) return;\n\n // Clone the item, removing id and timestamps\n const { id, createdAt, updatedAt, ...data } = item as any;\n\n // Navigate to create page with prefilled data\n const createPath = `${ctx.helpers.basePath}/collections/${ctx.collection}/create`;\n const prefillUrl = buildPrefillUrl(createPath, data);\n ctx.helpers.navigate(prefillUrl);\n },\n },\n ...opts,\n };\n}\n\n/**\n * Create a \"Delete Many\" (bulk delete) action\n *\n * Note: The actual deletion is handled by BulkActionToolbar via onBulkDelete callback.\n * This action definition just configures the UI and confirmation.\n */\nfunction createDeleteManyAction<TItem>(\n opts?: Partial<ActionDefinition<TItem>>,\n): ActionDefinition<TItem> {\n return {\n id: \"deleteMany\",\n label: \"Delete Selected\",\n icon: {\n type: \"icon\",\n props: { name: \"ph:trash\" },\n } satisfies ComponentReference,\n variant: \"destructive\",\n confirmation: {\n title: \"Delete selected items?\",\n description:\n \"This action cannot be undone. All selected items will be permanently deleted.\",\n confirmLabel: \"Delete All\",\n destructive: true,\n },\n handler: {\n // Handler is a no-op as deletion is handled by BulkActionToolbar\n // when it detects action.id === \"deleteMany\" and calls onBulkDelete\n type: \"custom\",\n fn: async () => {\n // No-op: actual deletion handled by BulkActionToolbar.onBulkDelete\n },\n },\n ...opts,\n };\n}\n\n/**\n * Create a \"Delete\" action for single item (form view)\n */\nfunction createDeleteAction<TItem>(\n opts?: Partial<ActionDefinition<TItem>>,\n): ActionDefinition<TItem> {\n return {\n id: \"delete\",\n label: \"Delete\",\n icon: {\n type: \"icon\",\n props: { name: \"ph:trash\" },\n } satisfies ComponentReference,\n variant: \"destructive\",\n confirmation: {\n title: \"Delete item?\",\n description:\n \"This action cannot be undone. The item will be permanently deleted.\",\n confirmLabel: \"Delete\",\n destructive: true,\n },\n handler: {\n type: \"api\",\n endpoint: \"{id}\",\n method: \"DELETE\",\n },\n ...opts,\n };\n}\n\n// ============================================================================\n// Create Action Registry Proxy\n// ============================================================================\n\n/**\n * Creates an action registry proxy for type-safe action building\n */\nexport function createActionRegistryProxy<\n TItem = any,\n>(): ActionRegistryProxy<TItem> {\n return {\n create: (opts) => createCreateAction<TItem>(opts),\n duplicate: (opts) => createDuplicateAction<TItem>(opts),\n delete: (opts) => createDeleteAction<TItem>(opts),\n deleteMany: (opts) => createDeleteManyAction<TItem>(opts),\n action: (def) => def,\n };\n}\n\n// ============================================================================\n// Default Actions\n// ============================================================================\n\n/**\n * Get default header actions for a collection\n */\nexport function getDefaultHeaderActions<\n TItem = any,\n>(): HeaderActionsConfig<TItem> {\n return {\n primary: [createCreateAction<TItem>()],\n secondary: [],\n };\n}\n\n/**\n * Get default bulk actions for a collection\n */\nexport function getDefaultBulkActions<\n TItem = any,\n>(): ActionDefinition<TItem>[] {\n return [createDeleteManyAction<TItem>(), createDuplicateAction<TItem>()];\n}\n\n/**\n * Get default form actions for a collection (edit view)\n */\nexport function getDefaultFormActions<\n TItem = any,\n>(): FormViewActionsConfig<TItem> {\n return {\n primary: [],\n secondary: [createDuplicateAction<TItem>(), createDeleteAction<TItem>()],\n };\n}\n\n/**\n * Get complete default actions config\n */\nexport function getDefaultActionsConfig<TItem = any>(): ActionsConfig<TItem> {\n return {\n header: getDefaultHeaderActions<TItem>(),\n bulk: getDefaultBulkActions<TItem>(),\n };\n}\n"],"mappings":";;;;;;AA4DA,SAAS,mBACP,MACyB;AACzB,QAAO;EACL,IAAI;EACJ,OAAO;EACP,MAAM;GACJ,MAAM;GACN,OAAO,EAAE,MAAM,WAAW;GAC3B;EACD,SAAS;EACT,SAAS;GACP,MAAM;GACN,MAAM;GACP;EACD,GAAG;EACJ;;;;;AAMH,SAAS,sBACP,MACyB;AACzB,QAAO;EACL,IAAI;EACJ,OAAO;EACP,MAAM;GACJ,MAAM;GACN,OAAO,EAAE,MAAM,WAAW;GAC3B;EACD,SAAS;EAET,UAAU,QAAQ;AAEhB,OAAI,MAAM,QAAQ,IAAI,KAAK,CACzB,QAAO,IAAI,KAAK,WAAW;AAG7B,UAAO,CAAC,CAAC,IAAI;;EAEf,SAAS;GACP,MAAM;GACN,IAAI,OAAO,QAA8B;IAEvC,MAAM,OAAO,MAAM,QAAQ,IAAI,KAAK,GAAG,IAAI,KAAK,KAAK,IAAI;AACzD,QAAI,CAAC,KAAM;IAGX,MAAM,EAAE,IAAI,WAAW,WAAW,GAAG,SAAS;IAI9C,MAAM,aAAa,gBADA,GAAG,IAAI,QAAQ,SAAS,eAAe,IAAI,WAAW,UAC1B,KAAK;AACpD,QAAI,QAAQ,SAAS,WAAW;;GAEnC;EACD,GAAG;EACJ;;;;;;;;AASH,SAAS,uBACP,MACyB;AACzB,QAAO;EACL,IAAI;EACJ,OAAO;EACP,MAAM;GACJ,MAAM;GACN,OAAO,EAAE,MAAM,YAAY;GAC5B;EACD,SAAS;EACT,cAAc;GACZ,OAAO;GACP,aACE;GACF,cAAc;GACd,aAAa;GACd;EACD,SAAS;GAGP,MAAM;GACN,IAAI,YAAY;GAGjB;EACD,GAAG;EACJ;;;;;AAMH,SAAS,mBACP,MACyB;AACzB,QAAO;EACL,IAAI;EACJ,OAAO;EACP,MAAM;GACJ,MAAM;GACN,OAAO,EAAE,MAAM,YAAY;GAC5B;EACD,SAAS;EACT,cAAc;GACZ,OAAO;GACP,aACE;GACF,cAAc;GACd,aAAa;GACd;EACD,SAAS;GACP,MAAM;GACN,UAAU;GACV,QAAQ;GACT;EACD,GAAG;EACJ;;;;;AA6BH,SAAgB,0BAEgB;AAC9B,QAAO;EACL,SAAS,CAAC,oBAA2B,CAAC;EACtC,WAAW,EAAE;EACd;;;;;AAMH,SAAgB,wBAEe;AAC7B,QAAO,CAAC,wBAA+B,EAAE,uBAA8B,CAAC;;;;;AAM1E,SAAgB,wBAEkB;AAChC,QAAO;EACL,SAAS,EAAE;EACX,WAAW,CAAC,uBAA8B,EAAE,oBAA2B,CAAC;EACzE;;;;;AAMH,SAAgB,0BAA6D;AAC3E,QAAO;EACL,QAAQ,yBAAgC;EACxC,MAAM,uBAA8B;EACrC"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { I18nText } from "../../i18n/types.mjs";
|
|
2
|
+
import { IconComponent, MaybeLazyComponent } from "./common.mjs";
|
|
3
|
+
import { ComponentReference } from "../../../server/augmentation.mjs";
|
|
4
|
+
import "../../../server/index.mjs";
|
|
5
|
+
import { FieldDefinition } from "../field/field.mjs";
|
|
6
|
+
|
|
7
|
+
//#region src/client/builder/types/action-types.d.ts
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Action helpers provided to action handlers
|
|
11
|
+
*/
|
|
12
|
+
interface ActionHelpers {
|
|
13
|
+
/** Navigate to a path */
|
|
14
|
+
navigate: (path: string) => void;
|
|
15
|
+
/** Show toast notification */
|
|
16
|
+
toast: {
|
|
17
|
+
success: (message: string) => void;
|
|
18
|
+
error: (message: string) => void;
|
|
19
|
+
info: (message: string) => void;
|
|
20
|
+
warning: (message: string) => void;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Translate a message key
|
|
24
|
+
* @param key - Translation key
|
|
25
|
+
* @param params - Interpolation parameters
|
|
26
|
+
*/
|
|
27
|
+
t: (key: string, params?: Record<string, unknown>) => string;
|
|
28
|
+
/**
|
|
29
|
+
* Invalidate collection queries (triggers refetch)
|
|
30
|
+
* @param collection - Collection name (defaults to current collection)
|
|
31
|
+
*/
|
|
32
|
+
invalidateCollection: (collection?: string) => Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Invalidate a specific item query
|
|
35
|
+
* @param id - Item ID
|
|
36
|
+
* @param collection - Collection name (defaults to current collection)
|
|
37
|
+
*/
|
|
38
|
+
invalidateItem: (id: string, collection?: string) => Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Invalidate all CMS queries
|
|
41
|
+
*/
|
|
42
|
+
invalidateAll: () => Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Refresh the current view/data (alias for invalidateCollection)
|
|
45
|
+
* @deprecated Use invalidateCollection() instead for clarity
|
|
46
|
+
*/
|
|
47
|
+
refresh: () => void;
|
|
48
|
+
/** Close the current dialog */
|
|
49
|
+
closeDialog: () => void;
|
|
50
|
+
/** Base path for admin routes */
|
|
51
|
+
basePath: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Query client interface for advanced query operations
|
|
55
|
+
*/
|
|
56
|
+
interface ActionQueryClient {
|
|
57
|
+
/** Invalidate queries matching the filter */
|
|
58
|
+
invalidateQueries: (filters: {
|
|
59
|
+
queryKey?: readonly unknown[];
|
|
60
|
+
}) => Promise<void>;
|
|
61
|
+
/** Refetch queries matching the filter */
|
|
62
|
+
refetchQueries: (filters: {
|
|
63
|
+
queryKey?: readonly unknown[];
|
|
64
|
+
}) => Promise<void>;
|
|
65
|
+
/** Reset queries matching the filter */
|
|
66
|
+
resetQueries: (filters: {
|
|
67
|
+
queryKey?: readonly unknown[];
|
|
68
|
+
}) => Promise<void>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Context provided to action handlers and callbacks
|
|
72
|
+
*/
|
|
73
|
+
interface ActionContext<TItem = any> {
|
|
74
|
+
/** Item(s) being acted upon - single item for form actions, array for bulk */
|
|
75
|
+
item?: TItem;
|
|
76
|
+
/** Multiple items (for bulk actions) */
|
|
77
|
+
items?: TItem[];
|
|
78
|
+
/** Collection name */
|
|
79
|
+
collection: string;
|
|
80
|
+
/** Action helpers */
|
|
81
|
+
helpers: ActionHelpers;
|
|
82
|
+
/** Query client for advanced cache operations */
|
|
83
|
+
queryClient: ActionQueryClient;
|
|
84
|
+
/** Auth client for authentication operations (signUp, signIn, etc.) */
|
|
85
|
+
authClient?: any | null;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Navigate handler - navigates to a path
|
|
89
|
+
*/
|
|
90
|
+
interface NavigateHandler<TItem = any> {
|
|
91
|
+
type: "navigate";
|
|
92
|
+
/** Path to navigate to (can be a function for dynamic paths) */
|
|
93
|
+
path: string | ((item: TItem) => string);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Props for dialog components
|
|
97
|
+
*/
|
|
98
|
+
interface ActionDialogProps<TItem = any> {
|
|
99
|
+
/** Item being acted upon */
|
|
100
|
+
item?: TItem;
|
|
101
|
+
/** Multiple items for bulk actions */
|
|
102
|
+
items?: TItem[];
|
|
103
|
+
/** Collection name */
|
|
104
|
+
collection: string;
|
|
105
|
+
/** Close the dialog */
|
|
106
|
+
onClose: () => void;
|
|
107
|
+
/** Success callback */
|
|
108
|
+
onSuccess?: () => void;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Dialog handler - opens a dialog component
|
|
112
|
+
*/
|
|
113
|
+
interface DialogHandler<TItem = any> {
|
|
114
|
+
type: "dialog";
|
|
115
|
+
/** Component to render in the dialog */
|
|
116
|
+
component: MaybeLazyComponent<ActionDialogProps<TItem>>;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Form handler configuration
|
|
120
|
+
*
|
|
121
|
+
* Uses FieldDefinition from the admin builder for full field system support.
|
|
122
|
+
* Fields are validated automatically using buildValidationSchema.
|
|
123
|
+
*/
|
|
124
|
+
interface ActionFormConfig<TItem = any> {
|
|
125
|
+
/** Dialog title */
|
|
126
|
+
title: I18nText;
|
|
127
|
+
/** Dialog description */
|
|
128
|
+
description?: I18nText;
|
|
129
|
+
/** Form fields using FieldDefinition */
|
|
130
|
+
fields: Record<string, FieldDefinition>;
|
|
131
|
+
/** Default values */
|
|
132
|
+
defaultValues?: Record<string, any>;
|
|
133
|
+
/** Submit handler */
|
|
134
|
+
onSubmit: (data: Record<string, any>, ctx: ActionContext<TItem>) => void | Promise<void>;
|
|
135
|
+
/** Submit button label */
|
|
136
|
+
submitLabel?: I18nText;
|
|
137
|
+
/** Cancel button label */
|
|
138
|
+
cancelLabel?: I18nText;
|
|
139
|
+
/** Dialog width */
|
|
140
|
+
width?: "sm" | "md" | "lg" | "xl";
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Form handler - opens a form dialog
|
|
144
|
+
*/
|
|
145
|
+
interface FormHandler<TItem = any> {
|
|
146
|
+
type: "form";
|
|
147
|
+
/** Form configuration */
|
|
148
|
+
config: ActionFormConfig<TItem>;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* API handler - calls an API endpoint
|
|
152
|
+
*/
|
|
153
|
+
interface ApiHandler {
|
|
154
|
+
type: "api";
|
|
155
|
+
/** Endpoint path (can include {id} placeholder) */
|
|
156
|
+
endpoint: string;
|
|
157
|
+
/** HTTP method */
|
|
158
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
159
|
+
/** Request body factory */
|
|
160
|
+
body?: (ctx: ActionContext) => Record<string, any>;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Custom handler - runs arbitrary code
|
|
164
|
+
*/
|
|
165
|
+
interface CustomHandler<TItem = any> {
|
|
166
|
+
type: "custom";
|
|
167
|
+
/** Handler function */
|
|
168
|
+
fn: (ctx: ActionContext<TItem>) => void | Promise<void>;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Server handler - executes action on the server via API.
|
|
172
|
+
* Used for server-defined actions where the handler runs server-side.
|
|
173
|
+
*/
|
|
174
|
+
interface ServerHandler {
|
|
175
|
+
type: "server";
|
|
176
|
+
/** Server action ID (matches ServerActionDefinition.id) */
|
|
177
|
+
actionId: string;
|
|
178
|
+
/** Collection name for the action endpoint */
|
|
179
|
+
collection: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Union of all action handler types
|
|
183
|
+
*/
|
|
184
|
+
type ActionHandler<TItem = any> = NavigateHandler<TItem> | DialogHandler<TItem> | FormHandler<TItem> | ApiHandler | CustomHandler<TItem> | ServerHandler;
|
|
185
|
+
/**
|
|
186
|
+
* Confirmation dialog configuration
|
|
187
|
+
*/
|
|
188
|
+
interface ConfirmationConfig {
|
|
189
|
+
/** Dialog title */
|
|
190
|
+
title: string;
|
|
191
|
+
/** Dialog description */
|
|
192
|
+
description?: string;
|
|
193
|
+
/** Confirm button label */
|
|
194
|
+
confirmLabel?: string;
|
|
195
|
+
/** Cancel button label */
|
|
196
|
+
cancelLabel?: string;
|
|
197
|
+
/** Use destructive styling */
|
|
198
|
+
destructive?: boolean;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Button variant types (matching shadcn button variants)
|
|
202
|
+
*/
|
|
203
|
+
type ActionVariant = "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
204
|
+
/**
|
|
205
|
+
* Complete action definition
|
|
206
|
+
*/
|
|
207
|
+
interface ActionDefinition<TItem = any> {
|
|
208
|
+
/** Unique action identifier */
|
|
209
|
+
id: string;
|
|
210
|
+
/** Display label */
|
|
211
|
+
label: I18nText;
|
|
212
|
+
/** Icon component or server-defined component reference */
|
|
213
|
+
icon?: IconComponent | ComponentReference;
|
|
214
|
+
/** Button variant */
|
|
215
|
+
variant?: ActionVariant;
|
|
216
|
+
/** Whether action is visible (static or dynamic) */
|
|
217
|
+
visible?: boolean | ((ctx: ActionContext<TItem>) => boolean);
|
|
218
|
+
/** Whether action is disabled (static or dynamic) */
|
|
219
|
+
disabled?: boolean | ((ctx: ActionContext<TItem>) => boolean);
|
|
220
|
+
/** Action handler */
|
|
221
|
+
handler: ActionHandler<TItem>;
|
|
222
|
+
/** Confirmation dialog before executing */
|
|
223
|
+
confirmation?: ConfirmationConfig;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Header actions configuration with primary/secondary split
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```ts
|
|
230
|
+
* header: {
|
|
231
|
+
* primary: [a.create()], // Shown as buttons
|
|
232
|
+
* secondary: [a.action({...})], // Shown in dropdown menu
|
|
233
|
+
* }
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
interface HeaderActionsConfig<TItem = any> {
|
|
237
|
+
/** Actions shown as buttons */
|
|
238
|
+
primary?: ActionDefinition<TItem>[];
|
|
239
|
+
/** Actions shown in dropdown menu */
|
|
240
|
+
secondary?: ActionDefinition<TItem>[];
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Collection actions configuration for list views
|
|
244
|
+
*/
|
|
245
|
+
interface ActionsConfig<TItem = any> {
|
|
246
|
+
/** Actions displayed in the header area (create, import, etc.) */
|
|
247
|
+
header?: HeaderActionsConfig<TItem>;
|
|
248
|
+
/** Actions for bulk operations on selected items (deleteMany, duplicate, etc.) */
|
|
249
|
+
bulk?: ActionDefinition<TItem>[];
|
|
250
|
+
}
|
|
251
|
+
//#endregion
|
|
252
|
+
export { ActionContext, ActionDefinition, ActionDialogProps, ActionFormConfig, ActionHandler, ActionHelpers, ActionVariant, ActionsConfig, ApiHandler, ConfirmationConfig, CustomHandler, DialogHandler, FormHandler, HeaderActionsConfig, NavigateHandler };
|
|
253
|
+
//# sourceMappingURL=action-types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-types.d.mts","names":[],"sources":["../../../../src/client/builder/types/action-types.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAoEA;;;AAQgE,UArD/C,aAAA,CAqD+C;EAAO;EAMtD,QAAA,EAAA,CAAA,IAAA,EAAa,MAAA,EAAA,GAAA,IAAA;EAErB;EAEC,KAAA,EAAA;IAIC,OAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,GAAA,IAAA;IAEI,KAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,GAAA,IAAA;IAAiB,IAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,GAAA,IAAA;IAYf,OAAA,EAAA,CAAA,OAAe,EAAA,MAAA,EAAA,GAAA,IAGP;EAMR,CAAA;EAgBA;;;;;EAYA,CAAA,EAAA,CAAA,GAAA,EAAA,MAAA,EAAA,MAAgB,CAAA,EAvGL,MAuGK,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,GAAA,MAAA;EAExB;;;;EAMS,oBAAA,EAAA,CAAA,UAAA,CAAA,EAAA,MAAA,EAAA,GA1G+B,OA0G/B,CAAA,IAAA,CAAA;EAGR;;;;;EAMM,cAAA,EAAA,CAAA,EAAA,EAAA,MAAA,EAAA,UAAA,CAAA,EAAA,MAAA,EAAA,GA7GuC,OA6GvC,CAAA,IAAA,CAAA;EAAQ;AAQxB;AASA;EAaiB,aAAA,EAAA,GAAa,GAvIP,OAuIO,CAAA,IAAA,CAAA;EAGJ;;;;EAOT,OAAA,EAAA,GAAA,GAAA,IAAa;EAWlB;EACQ,WAAA,EAAA,GAAA,GAAA,IAAA;EAAhB;EACc,QAAA,EAAA,MAAA;;;;;AAGA,UAlJD,iBAAA,CAkJC;EAAd;EACA,iBAAA,EAAA,CAAA,OAAA,EAAA;IAAa,QAAA,CAAA,EAAA,SAAA,OAAA,EAAA;EASA,CAAA,EAAA,GAxJT,OAwJS,CAAA,IAAA,CAAA;EAoBL;EAWK,cAAA,EAAA,CAAA,OAAgB,EAAA;IAIxB,QAAA,CAAA,EAAA,SAAA,OAAA,EAAA;EAEA,CAAA,EAAA,GA3LyD,OA2LzD,CAAA,IAAA,CAAA;EAAgB;EAEb,YAAA,EAAA,CAAA,OAAA,EAAA;IAE+B,QAAA,CAAA,EAAA,SAAA,OAAA,EAAA;EAAd,CAAA,EAAA,GA7LmC,OA6LnC,CAAA,IAAA,CAAA;;;;;AAMZ,UA7LA,aA6LA,CAAA,QAAA,GAAA,CAAA,CAAA;EAAkB;EAkBlB,IAAA,CAAA,EA7MR,KA6MQ;EAEY;EAAjB,KAAA,CAAA,EA7MF,KA6ME,EAAA;EAEmB;EAAjB,UAAA,EAAA,MAAA;EAAgB;EAMb,OAAA,EAjNN,aAiNmB;EAEC;EAApB,WAAA,EAjNI,iBAiNJ;EAEe;EAAjB,UAAA,CAAA,EAAA,GAAA,GAAA,IAAA;;;;;UAvMQ;;;yBAGQ;;;;;UAMR;;SAER;;UAEC;;;;;;;;;;;UAYO;;;aAGJ,mBAAmB,kBAAkB;;;;;;;;UASjC;;SAER;;gBAEO;;UAEN,eAAe;;kBAEP;;mBAGR,0BACD,cAAc,kBACT;;gBAEE;;gBAEA;;;;;;;UAQC;;;UAGP,iBAAiB;;;;;UAMV,UAAA;;;;;;;eAOF,kBAAkB;;;;;UAMhB;;;YAGL,cAAc,kBAAkB;;;;;;UAO3B,aAAA;;;;;;;;;;KAWL,6BACR,gBAAgB,SAChB,cAAc,SACd,YAAY,SACZ,aACA,cAAc,SACd;;;;UASa,kBAAA;;;;;;;;;;;;;;;KAoBL,aAAA;;;;UAWK;;;;SAIR;;SAEA,gBAAgB;;YAEb;;6BAEiB,cAAc;;8BAEb,cAAc;;WAEjC,cAAc;;iBAER;;;;;;;;;;;;;UAkBA;;YAEL,iBAAiB;;cAEf,iBAAiB;;;;;UAMd;;WAEN,oBAAoB;;SAEtB,iBAAiB"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { I18nText } from "../../i18n/types.mjs";
|
|
2
|
+
import { IconComponent, MaybeLazyComponent } from "./common.mjs";
|
|
3
|
+
import { ComponentReference } from "../../../server/augmentation.mjs";
|
|
4
|
+
import "../../../server/index.mjs";
|
|
5
|
+
import { ActionsConfig } from "./action-types.mjs";
|
|
6
|
+
import "./field-types.mjs";
|
|
7
|
+
import { FieldDefinition } from "../field/field.mjs";
|
|
8
|
+
import { AdminBuilder } from "../admin-builder.mjs";
|
|
9
|
+
|
|
10
|
+
//#region src/client/builder/types/collection-types.d.ts
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Column configuration for list views
|
|
14
|
+
* Can be a simple field name or detailed config object
|
|
15
|
+
*/
|
|
16
|
+
type ColumnConfig<TFieldNames extends string = string> = TFieldNames | ColumnConfigObject<TFieldNames>;
|
|
17
|
+
/**
|
|
18
|
+
* Detailed column configuration object
|
|
19
|
+
*/
|
|
20
|
+
interface ColumnConfigObject<TFieldNames extends string = string> {
|
|
21
|
+
/**
|
|
22
|
+
* Field name to display
|
|
23
|
+
*/
|
|
24
|
+
field: TFieldNames;
|
|
25
|
+
/**
|
|
26
|
+
* Custom header label (defaults to field label)
|
|
27
|
+
*/
|
|
28
|
+
header?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Column width (CSS value like "200px", "20%", etc.)
|
|
31
|
+
*/
|
|
32
|
+
width?: string | number;
|
|
33
|
+
/**
|
|
34
|
+
* Minimum column width
|
|
35
|
+
*/
|
|
36
|
+
minWidth?: string | number;
|
|
37
|
+
/**
|
|
38
|
+
* Maximum column width
|
|
39
|
+
*/
|
|
40
|
+
maxWidth?: string | number;
|
|
41
|
+
/**
|
|
42
|
+
* Enable sorting for this column
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
sortable?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Custom cell renderer component
|
|
48
|
+
* Overrides the field's default cell component
|
|
49
|
+
*/
|
|
50
|
+
cell?: MaybeLazyComponent;
|
|
51
|
+
/**
|
|
52
|
+
* Column visibility
|
|
53
|
+
* Can be a boolean or function for conditional visibility
|
|
54
|
+
*/
|
|
55
|
+
visible?: boolean | ((row: any) => boolean);
|
|
56
|
+
/**
|
|
57
|
+
* Custom CSS class for column cells
|
|
58
|
+
*/
|
|
59
|
+
className?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Text alignment
|
|
62
|
+
*/
|
|
63
|
+
align?: "left" | "center" | "right";
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* List view configuration
|
|
67
|
+
*/
|
|
68
|
+
interface ListViewConfig<TFieldNames extends string = string> {
|
|
69
|
+
/**
|
|
70
|
+
* Columns to display (field names or column configs)
|
|
71
|
+
*/
|
|
72
|
+
columns?: ColumnConfig<TFieldNames>[];
|
|
73
|
+
/**
|
|
74
|
+
* Relations to include in query
|
|
75
|
+
*/
|
|
76
|
+
with?: string[];
|
|
77
|
+
/**
|
|
78
|
+
* Default sort
|
|
79
|
+
*/
|
|
80
|
+
defaultSort?: {
|
|
81
|
+
field: TFieldNames;
|
|
82
|
+
direction: "asc" | "desc";
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Enable search
|
|
86
|
+
* @default true
|
|
87
|
+
*/
|
|
88
|
+
searchable?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Searchable fields (defaults to all text-like fields)
|
|
91
|
+
*/
|
|
92
|
+
searchFields?: TFieldNames[];
|
|
93
|
+
/**
|
|
94
|
+
* Enable row selection
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
selectable?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Enable pagination
|
|
100
|
+
* @default true
|
|
101
|
+
*/
|
|
102
|
+
paginated?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Enable realtime invalidation for list queries.
|
|
105
|
+
* Falls back to AdminProvider realtime config when undefined.
|
|
106
|
+
*/
|
|
107
|
+
realtime?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Default page size
|
|
110
|
+
* @default 25
|
|
111
|
+
*/
|
|
112
|
+
pageSize?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Available page size options
|
|
115
|
+
* @default [10, 25, 50, 100]
|
|
116
|
+
*/
|
|
117
|
+
pageSizeOptions?: number[];
|
|
118
|
+
/**
|
|
119
|
+
* Actions configuration for list view
|
|
120
|
+
*/
|
|
121
|
+
actions?: ActionsConfig;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Preview configuration for live preview in form view
|
|
125
|
+
*/
|
|
126
|
+
interface PreviewConfig {
|
|
127
|
+
/**
|
|
128
|
+
* URL builder function that returns preview URL for current form values
|
|
129
|
+
* @param values - Current form values
|
|
130
|
+
* @param locale - Current content locale
|
|
131
|
+
* @returns Preview URL string
|
|
132
|
+
*/
|
|
133
|
+
url: (values: Record<string, unknown>, locale: string) => string;
|
|
134
|
+
/**
|
|
135
|
+
* Whether preview is enabled (default: true)
|
|
136
|
+
*/
|
|
137
|
+
enabled?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Position of the preview panel (default: "right")
|
|
140
|
+
*/
|
|
141
|
+
position?: "right" | "bottom";
|
|
142
|
+
/**
|
|
143
|
+
* Default width/height percentage of preview panel (default: 50)
|
|
144
|
+
*/
|
|
145
|
+
defaultWidth?: number;
|
|
146
|
+
/**
|
|
147
|
+
* Minimum width/height percentage (default: 30)
|
|
148
|
+
*/
|
|
149
|
+
minWidth?: number;
|
|
150
|
+
/**
|
|
151
|
+
* Maximum width/height percentage (default: 70)
|
|
152
|
+
*/
|
|
153
|
+
maxWidth?: number;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Autosave configuration for form view
|
|
157
|
+
*/
|
|
158
|
+
interface AutoSaveConfig {
|
|
159
|
+
/**
|
|
160
|
+
* Whether autosave is enabled
|
|
161
|
+
* @default false
|
|
162
|
+
*/
|
|
163
|
+
enabled?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Debounce delay in milliseconds before autosave triggers
|
|
166
|
+
* @default 500 (0.5s as specified)
|
|
167
|
+
*/
|
|
168
|
+
debounce?: number;
|
|
169
|
+
/**
|
|
170
|
+
* Show autosave status indicator in form header
|
|
171
|
+
* @default true
|
|
172
|
+
*/
|
|
173
|
+
indicator?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Warn user before navigating away with unsaved changes
|
|
176
|
+
* @default true
|
|
177
|
+
*/
|
|
178
|
+
preventNavigation?: boolean;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Collection builder state - internal state during building
|
|
182
|
+
*/
|
|
183
|
+
interface CollectionBuilderState<TAdminApp extends AdminBuilder<any> = AdminBuilder<any>> {
|
|
184
|
+
readonly name: string;
|
|
185
|
+
readonly "~adminApp": TAdminApp;
|
|
186
|
+
/** Display label - supports inline translations */
|
|
187
|
+
readonly label?: I18nText;
|
|
188
|
+
/** Description - supports inline translations */
|
|
189
|
+
readonly description?: I18nText;
|
|
190
|
+
readonly icon?: IconComponent | ComponentReference;
|
|
191
|
+
readonly fields?: Record<string, FieldDefinition<any, any>>;
|
|
192
|
+
readonly list?: any;
|
|
193
|
+
readonly form?: any;
|
|
194
|
+
readonly preview?: PreviewConfig;
|
|
195
|
+
readonly autoSave?: AutoSaveConfig;
|
|
196
|
+
}
|
|
197
|
+
//#endregion
|
|
198
|
+
export { AutoSaveConfig, CollectionBuilderState, ColumnConfig, ColumnConfigObject, ListViewConfig, PreviewConfig };
|
|
199
|
+
//# sourceMappingURL=collection-types.d.mts.map
|