@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,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useAdminConfig } from "../../../hooks/use-admin-config.mjs";
|
|
4
|
+
import { EMPTY_BLOCK_CONTENT, isBlockContent } from "../../../blocks/types.mjs";
|
|
5
|
+
import { FieldWrapper } from "../field-wrapper.mjs";
|
|
6
|
+
import { Card, CardContent, CardHeader, CardTitle } from "../../ui/card.mjs";
|
|
7
|
+
import { countBlocks } from "../../blocks/utils/tree-utils.mjs";
|
|
8
|
+
import { BlockEditorLayout } from "../../blocks/block-editor-layout.mjs";
|
|
9
|
+
import { BlockEditorProvider } from "../../blocks/block-editor-provider.mjs";
|
|
10
|
+
import * as React$1 from "react";
|
|
11
|
+
import { useFormContext, useWatch } from "react-hook-form";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
|
|
14
|
+
//#region src/client/components/fields/blocks-field/blocks-field.tsx
|
|
15
|
+
/**
|
|
16
|
+
* Blocks Field Component
|
|
17
|
+
*
|
|
18
|
+
* Form field for editing block content using the visual block editor.
|
|
19
|
+
* Block definitions are fetched from server introspection API.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Blocks field component.
|
|
23
|
+
*
|
|
24
|
+
* Renders the visual block editor for editing block content.
|
|
25
|
+
*/
|
|
26
|
+
function BlocksField({ name, value, onChange, label, description, error, required, disabled, readOnly, allowedBlocks, minBlocks, maxBlocks }) {
|
|
27
|
+
const watchedContent = useWatch({
|
|
28
|
+
control: useFormContext().control,
|
|
29
|
+
name
|
|
30
|
+
});
|
|
31
|
+
const { data: adminConfig } = useAdminConfig();
|
|
32
|
+
const content = isBlockContent(watchedContent) ? watchedContent : isBlockContent(value) ? value : EMPTY_BLOCK_CONTENT;
|
|
33
|
+
const blocks = adminConfig?.blocks ?? {};
|
|
34
|
+
const filteredBlocks = React$1.useMemo(() => {
|
|
35
|
+
if (!allowedBlocks || allowedBlocks.length === 0) return blocks;
|
|
36
|
+
return Object.fromEntries(Object.entries(blocks).filter(([name$1]) => allowedBlocks.includes(name$1)));
|
|
37
|
+
}, [blocks, allowedBlocks]);
|
|
38
|
+
const handleChange = React$1.useCallback((newContent) => {
|
|
39
|
+
onChange?.(newContent);
|
|
40
|
+
}, [onChange]);
|
|
41
|
+
const blockCount = countBlocks(content._tree);
|
|
42
|
+
return /* @__PURE__ */ jsxs(FieldWrapper, {
|
|
43
|
+
name,
|
|
44
|
+
label,
|
|
45
|
+
description,
|
|
46
|
+
error,
|
|
47
|
+
required,
|
|
48
|
+
disabled,
|
|
49
|
+
children: [Object.keys(filteredBlocks).length > 0 ? /* @__PURE__ */ jsx(BlockEditorProvider, {
|
|
50
|
+
value: content,
|
|
51
|
+
onChange: handleChange,
|
|
52
|
+
blocks: filteredBlocks,
|
|
53
|
+
allowedBlocks,
|
|
54
|
+
children: /* @__PURE__ */ jsx(BlockEditorLayout, {})
|
|
55
|
+
}) : /* @__PURE__ */ jsxs(Card, {
|
|
56
|
+
className: "border-dashed",
|
|
57
|
+
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
58
|
+
className: "pb-2",
|
|
59
|
+
children: /* @__PURE__ */ jsx(CardTitle, {
|
|
60
|
+
className: "flex items-center justify-between text-sm font-medium",
|
|
61
|
+
children: /* @__PURE__ */ jsxs("span", { children: [
|
|
62
|
+
"Blocks (",
|
|
63
|
+
blockCount,
|
|
64
|
+
")"
|
|
65
|
+
] })
|
|
66
|
+
})
|
|
67
|
+
}), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
68
|
+
className: "py-8 text-center text-muted-foreground",
|
|
69
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
70
|
+
className: "text-sm",
|
|
71
|
+
children: "No block definitions registered"
|
|
72
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
73
|
+
className: "mt-1 text-xs",
|
|
74
|
+
children: "Register blocks with .blocks() in your admin configuration"
|
|
75
|
+
})]
|
|
76
|
+
}) })]
|
|
77
|
+
}), (minBlocks || maxBlocks) && /* @__PURE__ */ jsxs("div", {
|
|
78
|
+
className: "mt-2 text-xs text-muted-foreground",
|
|
79
|
+
children: [
|
|
80
|
+
minBlocks && /* @__PURE__ */ jsxs("span", { children: [
|
|
81
|
+
"Min: ",
|
|
82
|
+
minBlocks,
|
|
83
|
+
" blocks "
|
|
84
|
+
] }),
|
|
85
|
+
maxBlocks && /* @__PURE__ */ jsxs("span", { children: [
|
|
86
|
+
"Max: ",
|
|
87
|
+
maxBlocks,
|
|
88
|
+
" blocks"
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ jsxs("span", {
|
|
91
|
+
className: "ml-2",
|
|
92
|
+
children: ["Current: ", blockCount]
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
})]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
export { BlocksField };
|
|
101
|
+
//# sourceMappingURL=blocks-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks-field.mjs","names":["content: BlockContent","React","name"],"sources":["../../../../../src/client/components/fields/blocks-field/blocks-field.tsx"],"sourcesContent":["/**\n * Blocks Field Component\n *\n * Form field for editing block content using the visual block editor.\n * Block definitions are fetched from server introspection API.\n */\n\n\"use client\";\n\nimport * as React from \"react\";\nimport { useFormContext, useWatch } from \"react-hook-form\";\nimport type { BlockSchema } from \"#questpie/admin/server\";\nimport type { BlockContent } from \"../../../blocks/types.js\";\nimport { EMPTY_BLOCK_CONTENT, isBlockContent } from \"../../../blocks/types.js\";\nimport type { BaseFieldProps } from \"../../../builder/types/common.js\";\nimport {\n\tCard,\n\tCardContent,\n\tCardHeader,\n\tCardTitle,\n} from \"../../../components/ui/card.js\";\nimport { useAdminConfig } from \"../../../hooks/use-admin-config.js\";\nimport { BlockEditorLayout } from \"../../blocks/block-editor-layout.js\";\nimport { BlockEditorProvider } from \"../../blocks/block-editor-provider.js\";\nimport { countBlocks } from \"../../blocks/utils/tree-utils.js\";\nimport { FieldWrapper } from \"../field-wrapper.js\";\n\n/**\n * Blocks field configuration.\n *\n * @typeParam TAllowed - Union of allowed block type names (inferred from admin registry)\n */\nexport type BlocksFieldConfig<TAllowed extends string = string> = {\n\t/** Allowed block types (if not set, all registered blocks are allowed) */\n\tallowedBlocks?: TAllowed[];\n\t/** Minimum number of blocks */\n\tminBlocks?: number;\n\t/** Maximum number of blocks */\n\tmaxBlocks?: number;\n};\n\nexport type BlocksFieldProps = BaseFieldProps & BlocksFieldConfig;\n\n/**\n * Blocks field component.\n *\n * Renders the visual block editor for editing block content.\n */\nexport function BlocksField({\n\tname,\n\tvalue,\n\tonChange,\n\tlabel,\n\tdescription,\n\terror,\n\trequired,\n\tdisabled,\n\treadOnly,\n\tallowedBlocks,\n\tminBlocks,\n\tmaxBlocks,\n}: BlocksFieldProps) {\n\tconst form = useFormContext();\n\tconst watchedContent = useWatch({ control: form.control, name });\n\tconst { data: adminConfig } = useAdminConfig();\n\n\t// Ensure we have valid block content\n\tconst content: BlockContent = isBlockContent(watchedContent)\n\t\t? watchedContent\n\t\t: isBlockContent(value)\n\t\t\t? value\n\t\t\t: EMPTY_BLOCK_CONTENT;\n\n\t// Get blocks from server introspection\n\tconst blocks = adminConfig?.blocks ?? {};\n\n\t// Filter blocks by allowed list\n\tconst filteredBlocks = React.useMemo<Record<string, BlockSchema>>(() => {\n\t\tif (!allowedBlocks || allowedBlocks.length === 0) {\n\t\t\treturn blocks;\n\t\t}\n\t\treturn Object.fromEntries(\n\t\t\tObject.entries(blocks).filter(([name]) => allowedBlocks.includes(name)),\n\t\t);\n\t}, [blocks, allowedBlocks]);\n\n\t// Handle content changes (validation happens on form submit)\n\tconst handleChange = React.useCallback(\n\t\t(newContent: BlockContent) => {\n\t\t\tonChange?.(newContent);\n\t\t},\n\t\t[onChange],\n\t);\n\n\tconst blockCount = countBlocks(content._tree);\n\tconst hasBlocks = Object.keys(filteredBlocks).length > 0;\n\n\treturn (\n\t\t<FieldWrapper\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tdescription={description}\n\t\t\terror={error}\n\t\t\trequired={required}\n\t\t\tdisabled={disabled}\n\t\t>\n\t\t\t{hasBlocks ? (\n\t\t\t\t<BlockEditorProvider\n\t\t\t\t\tvalue={content}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tblocks={filteredBlocks}\n\t\t\t\t\tallowedBlocks={allowedBlocks}\n\t\t\t\t>\n\t\t\t\t\t<BlockEditorLayout />\n\t\t\t\t</BlockEditorProvider>\n\t\t\t) : (\n\t\t\t\t<Card className=\"border-dashed\">\n\t\t\t\t\t<CardHeader className=\"pb-2\">\n\t\t\t\t\t\t<CardTitle className=\"flex items-center justify-between text-sm font-medium\">\n\t\t\t\t\t\t\t<span>Blocks ({blockCount})</span>\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t<div className=\"py-8 text-center text-muted-foreground\">\n\t\t\t\t\t\t\t<p className=\"text-sm\">No block definitions registered</p>\n\t\t\t\t\t\t\t<p className=\"mt-1 text-xs\">\n\t\t\t\t\t\t\t\tRegister blocks with .blocks() in your admin configuration\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t)}\n\n\t\t\t{/* Constraints info */}\n\t\t\t{(minBlocks || maxBlocks) && (\n\t\t\t\t<div className=\"mt-2 text-xs text-muted-foreground\">\n\t\t\t\t\t{minBlocks && <span>Min: {minBlocks} blocks </span>}\n\t\t\t\t\t{maxBlocks && <span>Max: {maxBlocks} blocks</span>}\n\t\t\t\t\t<span className=\"ml-2\">Current: {blockCount}</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</FieldWrapper>\n\t);\n}\n\nexport default BlocksField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,YAAY,EAC3B,MACA,OACA,UACA,OACA,aACA,OACA,UACA,UACA,UACA,eACA,WACA,aACoB;CAEpB,MAAM,iBAAiB,SAAS;EAAE,SADrB,gBAAgB,CACmB;EAAS;EAAM,CAAC;CAChE,MAAM,EAAE,MAAM,gBAAgB,gBAAgB;CAG9C,MAAMA,UAAwB,eAAe,eAAe,GACzD,iBACA,eAAe,MAAM,GACpB,QACA;CAGJ,MAAM,SAAS,aAAa,UAAU,EAAE;CAGxC,MAAM,iBAAiBC,QAAM,cAA2C;AACvE,MAAI,CAAC,iBAAiB,cAAc,WAAW,EAC9C,QAAO;AAER,SAAO,OAAO,YACb,OAAO,QAAQ,OAAO,CAAC,QAAQ,CAACC,YAAU,cAAc,SAASA,OAAK,CAAC,CACvE;IACC,CAAC,QAAQ,cAAc,CAAC;CAG3B,MAAM,eAAeD,QAAM,aACzB,eAA6B;AAC7B,aAAW,WAAW;IAEvB,CAAC,SAAS,CACV;CAED,MAAM,aAAa,YAAY,QAAQ,MAAM;AAG7C,QACC,qBAAC;EACM;EACC;EACM;EACN;EACG;EACA;aATM,OAAO,KAAK,eAAe,CAAC,SAAS,IAYpD,oBAAC;GACA,OAAO;GACP,UAAU;GACV,QAAQ;GACO;aAEf,oBAAC,sBAAoB;IACA,GAEtB,qBAAC;GAAK,WAAU;cACf,oBAAC;IAAW,WAAU;cACrB,oBAAC;KAAU,WAAU;eACpB,qBAAC;MAAK;MAAS;MAAW;SAAQ;MACvB;KACA,EACb,oBAAC,yBACA,qBAAC;IAAI,WAAU;eACd,oBAAC;KAAE,WAAU;eAAU;MAAmC,EAC1D,oBAAC;KAAE,WAAU;eAAe;MAExB;KACC,GACO;IACR,GAIN,aAAa,cACd,qBAAC;GAAI,WAAU;;IACb,aAAa,qBAAC;KAAK;KAAM;KAAU;QAAe;IAClD,aAAa,qBAAC;KAAK;KAAM;KAAU;QAAc;IAClD,qBAAC;KAAK,WAAU;gBAAO,aAAU;MAAkB;;IAC9C;GAEO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { BlocksField, BlocksFieldConfig, BlocksFieldProps } from "./blocks-field.mjs";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseFieldProps } from "./field-types.mjs";
|
|
2
|
+
import * as react_jsx_runtime41 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/components/fields/boolean-field.d.ts
|
|
5
|
+
interface BooleanFieldProps extends BaseFieldProps {
|
|
6
|
+
/**
|
|
7
|
+
* Display mode for the boolean field.
|
|
8
|
+
* @default "checkbox"
|
|
9
|
+
*/
|
|
10
|
+
displayAs?: "checkbox" | "switch";
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Unified boolean field component.
|
|
14
|
+
* Renders as checkbox (default) or switch based on `displayAs` prop.
|
|
15
|
+
*/
|
|
16
|
+
declare function BooleanField({
|
|
17
|
+
name,
|
|
18
|
+
label,
|
|
19
|
+
description,
|
|
20
|
+
required,
|
|
21
|
+
disabled,
|
|
22
|
+
localized,
|
|
23
|
+
locale,
|
|
24
|
+
control,
|
|
25
|
+
className,
|
|
26
|
+
displayAs
|
|
27
|
+
}: BooleanFieldProps): react_jsx_runtime41.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { BooleanField, BooleanFieldProps };
|
|
30
|
+
//# sourceMappingURL=boolean-field.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean-field.d.mts","names":[],"sources":["../../../../src/client/components/fields/boolean-field.tsx"],"sourcesContent":[],"mappings":";;;;UAOiB,iBAAA,SAA0B;;;AAA3C;AAYA;EACE,SAAA,CAAA,EAAA,UAAA,GAAA,QAAA;;;;;;AAMA,iBAPc,YAAA,CAOd;EAAA,IAAA;EAAA,KAAA;EAAA,WAAA;EAAA,QAAA;EAAA,QAAA;EAAA,SAAA;EAAA,MAAA;EAAA,OAAA;EAAA,SAAA;EAAA;AAAA,CAAA,EAIC,iBAJD,CAAA,EAIkB,mBAAA,CAAA,GAAA,CAAA,OAJlB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useResolvedControl } from "./field-utils.mjs";
|
|
2
|
+
import { FieldWrapper } from "./field-wrapper.mjs";
|
|
3
|
+
import { CheckboxInput } from "../primitives/checkbox-input.mjs";
|
|
4
|
+
import { ToggleInput } from "../primitives/toggle-input.mjs";
|
|
5
|
+
import { Controller } from "react-hook-form";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/client/components/fields/boolean-field.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Unified boolean field component.
|
|
11
|
+
* Renders as checkbox (default) or switch based on `displayAs` prop.
|
|
12
|
+
*/
|
|
13
|
+
function BooleanField({ name, label, description, required, disabled, localized, locale, control, className, displayAs = "checkbox" }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
15
|
+
name,
|
|
16
|
+
control: useResolvedControl(control),
|
|
17
|
+
render: ({ field, fieldState }) => /* @__PURE__ */ jsx(FieldWrapper, {
|
|
18
|
+
name,
|
|
19
|
+
label,
|
|
20
|
+
description,
|
|
21
|
+
required,
|
|
22
|
+
disabled,
|
|
23
|
+
localized,
|
|
24
|
+
locale,
|
|
25
|
+
error: fieldState.error?.message,
|
|
26
|
+
children: displayAs === "switch" ? /* @__PURE__ */ jsx(ToggleInput, {
|
|
27
|
+
id: name,
|
|
28
|
+
value: !!field.value,
|
|
29
|
+
onChange: field.onChange,
|
|
30
|
+
disabled,
|
|
31
|
+
"aria-invalid": !!fieldState.error,
|
|
32
|
+
className
|
|
33
|
+
}) : /* @__PURE__ */ jsx(CheckboxInput, {
|
|
34
|
+
id: name,
|
|
35
|
+
value: !!field.value,
|
|
36
|
+
onChange: field.onChange,
|
|
37
|
+
disabled,
|
|
38
|
+
"aria-invalid": !!fieldState.error,
|
|
39
|
+
className
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
export { BooleanField };
|
|
47
|
+
//# sourceMappingURL=boolean-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean-field.mjs","names":[],"sources":["../../../../src/client/components/fields/boolean-field.tsx"],"sourcesContent":["import { Controller } from \"react-hook-form\";\nimport { CheckboxInput } from \"../primitives/checkbox-input\";\nimport { ToggleInput } from \"../primitives/toggle-input\";\nimport type { BaseFieldProps } from \"./field-types\";\nimport { useResolvedControl } from \"./field-utils\";\nimport { FieldWrapper } from \"./field-wrapper\";\n\nexport interface BooleanFieldProps extends BaseFieldProps {\n /**\n * Display mode for the boolean field.\n * @default \"checkbox\"\n */\n displayAs?: \"checkbox\" | \"switch\";\n}\n\n/**\n * Unified boolean field component.\n * Renders as checkbox (default) or switch based on `displayAs` prop.\n */\nexport function BooleanField({\n name,\n label,\n description,\n required,\n disabled,\n localized,\n locale,\n control,\n className,\n displayAs = \"checkbox\",\n}: BooleanFieldProps) {\n const resolvedControl = useResolvedControl(control);\n\n return (\n <Controller\n name={name}\n control={resolvedControl}\n render={({ field, fieldState }) => (\n <FieldWrapper\n name={name}\n label={label}\n description={description}\n required={required}\n disabled={disabled}\n localized={localized}\n locale={locale}\n error={fieldState.error?.message}\n >\n {displayAs === \"switch\" ? (\n <ToggleInput\n id={name}\n value={!!field.value}\n onChange={field.onChange}\n disabled={disabled}\n aria-invalid={!!fieldState.error}\n className={className}\n />\n ) : (\n <CheckboxInput\n id={name}\n value={!!field.value}\n onChange={field.onChange}\n disabled={disabled}\n aria-invalid={!!fieldState.error}\n className={className}\n />\n )}\n </FieldWrapper>\n )}\n />\n );\n}\n\n// Re-export old names for backwards compatibility\nexport { BooleanField as CheckboxField };\nexport { BooleanField as SwitchField };\n"],"mappings":";;;;;;;;;;;;AAmBA,SAAgB,aAAa,EAC3B,MACA,OACA,aACA,UACA,UACA,WACA,QACA,SACA,WACA,YAAY,cACQ;AAGpB,QACE,oBAAC;EACO;EACN,SALoB,mBAAmB,QAAQ;EAM/C,SAAS,EAAE,OAAO,iBAChB,oBAAC;GACO;GACC;GACM;GACH;GACA;GACC;GACH;GACR,OAAO,WAAW,OAAO;aAExB,cAAc,WACb,oBAAC;IACC,IAAI;IACJ,OAAO,CAAC,CAAC,MAAM;IACf,UAAU,MAAM;IACN;IACV,gBAAc,CAAC,CAAC,WAAW;IAChB;KACX,GAEF,oBAAC;IACC,IAAI;IACJ,OAAO,CAAC,CAAC,MAAM;IACf,UAAU,MAAM;IACN;IACV,gBAAc,CAAC,CAAC,WAAW;IAChB;KACX;IAES;GAEjB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DateFieldProps } from "./field-types.mjs";
|
|
2
|
+
import * as react_jsx_runtime206 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/components/fields/date-field.d.ts
|
|
5
|
+
declare function DateField({
|
|
6
|
+
name,
|
|
7
|
+
label,
|
|
8
|
+
description,
|
|
9
|
+
placeholder,
|
|
10
|
+
required,
|
|
11
|
+
disabled,
|
|
12
|
+
localized,
|
|
13
|
+
locale,
|
|
14
|
+
control,
|
|
15
|
+
className,
|
|
16
|
+
minDate,
|
|
17
|
+
maxDate,
|
|
18
|
+
format
|
|
19
|
+
}: DateFieldProps): react_jsx_runtime206.JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { DateField };
|
|
22
|
+
//# sourceMappingURL=date-field.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-field.d.mts","names":[],"sources":["../../../../src/client/components/fields/date-field.tsx"],"sourcesContent":[],"mappings":";;;;iBAMgB,SAAA;;;;;;;;;;;;;;GAcb,iBAAc,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useResolvedControl } from "./field-utils.mjs";
|
|
2
|
+
import { FieldWrapper } from "./field-wrapper.mjs";
|
|
3
|
+
import { DateInput } from "../primitives/date-input.mjs";
|
|
4
|
+
import { Controller } from "react-hook-form";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/client/components/fields/date-field.tsx
|
|
8
|
+
function DateField({ name, label, description, placeholder, required, disabled, localized, locale, control, className, minDate, maxDate, format }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
10
|
+
name,
|
|
11
|
+
control: useResolvedControl(control),
|
|
12
|
+
render: ({ field, fieldState }) => {
|
|
13
|
+
const dateValue = field.value instanceof Date ? field.value : field.value ? new Date(field.value) : null;
|
|
14
|
+
return /* @__PURE__ */ jsx(FieldWrapper, {
|
|
15
|
+
name,
|
|
16
|
+
label,
|
|
17
|
+
description,
|
|
18
|
+
required,
|
|
19
|
+
disabled,
|
|
20
|
+
localized,
|
|
21
|
+
locale,
|
|
22
|
+
error: fieldState.error?.message,
|
|
23
|
+
children: /* @__PURE__ */ jsx(DateInput, {
|
|
24
|
+
id: name,
|
|
25
|
+
value: dateValue,
|
|
26
|
+
onChange: field.onChange,
|
|
27
|
+
minDate,
|
|
28
|
+
maxDate,
|
|
29
|
+
format,
|
|
30
|
+
placeholder,
|
|
31
|
+
disabled,
|
|
32
|
+
"aria-invalid": !!fieldState.error,
|
|
33
|
+
className
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { DateField };
|
|
42
|
+
//# sourceMappingURL=date-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-field.mjs","names":[],"sources":["../../../../src/client/components/fields/date-field.tsx"],"sourcesContent":["import { Controller } from \"react-hook-form\";\nimport { DateInput } from \"../primitives/date-input\";\nimport type { DateFieldProps } from \"./field-types\";\nimport { useResolvedControl } from \"./field-utils\";\nimport { FieldWrapper } from \"./field-wrapper\";\n\nexport function DateField({\n name,\n label,\n description,\n placeholder,\n required,\n disabled,\n localized,\n locale,\n control,\n className,\n minDate,\n maxDate,\n format,\n}: DateFieldProps) {\n const resolvedControl = useResolvedControl(control);\n\n return (\n <Controller\n name={name}\n control={resolvedControl}\n render={({ field, fieldState }) => {\n // Handle string dates from form (convert to Date object)\n const dateValue =\n field.value instanceof Date\n ? field.value\n : field.value\n ? new Date(field.value)\n : null;\n\n return (\n <FieldWrapper\n name={name}\n label={label}\n description={description}\n required={required}\n disabled={disabled}\n localized={localized}\n locale={locale}\n error={fieldState.error?.message}\n >\n <DateInput\n id={name}\n value={dateValue}\n onChange={field.onChange}\n minDate={minDate}\n maxDate={maxDate}\n format={format}\n placeholder={placeholder}\n disabled={disabled}\n aria-invalid={!!fieldState.error}\n className={className}\n />\n </FieldWrapper>\n );\n }}\n />\n );\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,UAAU,EACxB,MACA,OACA,aACA,aACA,UACA,UACA,WACA,QACA,SACA,WACA,SACA,SACA,UACiB;AAGjB,QACE,oBAAC;EACO;EACN,SALoB,mBAAmB,QAAQ;EAM/C,SAAS,EAAE,OAAO,iBAAiB;GAEjC,MAAM,YACJ,MAAM,iBAAiB,OACnB,MAAM,QACN,MAAM,QACJ,IAAI,KAAK,MAAM,MAAM,GACrB;AAER,UACE,oBAAC;IACO;IACC;IACM;IACH;IACA;IACC;IACH;IACR,OAAO,WAAW,OAAO;cAEzB,oBAAC;KACC,IAAI;KACJ,OAAO;KACP,UAAU,MAAM;KACP;KACA;KACD;KACK;KACH;KACV,gBAAc,CAAC,CAAC,WAAW;KAChB;MACX;KACW;;GAGnB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DateTimeFieldProps } from "./field-types.mjs";
|
|
2
|
+
import * as react_jsx_runtime207 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/components/fields/datetime-field.d.ts
|
|
5
|
+
declare function DatetimeField({
|
|
6
|
+
name,
|
|
7
|
+
label,
|
|
8
|
+
description,
|
|
9
|
+
placeholder,
|
|
10
|
+
required,
|
|
11
|
+
disabled,
|
|
12
|
+
localized,
|
|
13
|
+
locale,
|
|
14
|
+
control,
|
|
15
|
+
className,
|
|
16
|
+
minDate,
|
|
17
|
+
maxDate,
|
|
18
|
+
format,
|
|
19
|
+
precision
|
|
20
|
+
}: DateTimeFieldProps): react_jsx_runtime207.JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { DatetimeField };
|
|
23
|
+
//# sourceMappingURL=datetime-field.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datetime-field.d.mts","names":[],"sources":["../../../../src/client/components/fields/datetime-field.tsx"],"sourcesContent":[],"mappings":";;;;iBAMgB,aAAA;;;;;;;;;;;;;;;GAeb,qBAAkB,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useResolvedControl } from "./field-utils.mjs";
|
|
2
|
+
import { FieldWrapper } from "./field-wrapper.mjs";
|
|
3
|
+
import { DateTimeInput } from "../primitives/date-input.mjs";
|
|
4
|
+
import { Controller } from "react-hook-form";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/client/components/fields/datetime-field.tsx
|
|
8
|
+
function DatetimeField({ name, label, description, placeholder, required, disabled, localized, locale, control, className, minDate, maxDate, format, precision }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
10
|
+
name,
|
|
11
|
+
control: useResolvedControl(control),
|
|
12
|
+
render: ({ field, fieldState }) => {
|
|
13
|
+
const dateValue = field.value instanceof Date ? field.value : field.value ? new Date(field.value) : null;
|
|
14
|
+
return /* @__PURE__ */ jsx(FieldWrapper, {
|
|
15
|
+
name,
|
|
16
|
+
label,
|
|
17
|
+
description,
|
|
18
|
+
required,
|
|
19
|
+
disabled,
|
|
20
|
+
localized,
|
|
21
|
+
locale,
|
|
22
|
+
error: fieldState.error?.message,
|
|
23
|
+
children: /* @__PURE__ */ jsx(DateTimeInput, {
|
|
24
|
+
id: name,
|
|
25
|
+
value: dateValue,
|
|
26
|
+
onChange: field.onChange,
|
|
27
|
+
minDate,
|
|
28
|
+
maxDate,
|
|
29
|
+
format,
|
|
30
|
+
precision,
|
|
31
|
+
placeholder,
|
|
32
|
+
disabled,
|
|
33
|
+
"aria-invalid": !!fieldState.error,
|
|
34
|
+
className
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { DatetimeField };
|
|
43
|
+
//# sourceMappingURL=datetime-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datetime-field.mjs","names":[],"sources":["../../../../src/client/components/fields/datetime-field.tsx"],"sourcesContent":["import { Controller } from \"react-hook-form\";\nimport { DateTimeInput } from \"../primitives/date-input\";\nimport type { DateTimeFieldProps } from \"./field-types\";\nimport { useResolvedControl } from \"./field-utils\";\nimport { FieldWrapper } from \"./field-wrapper\";\n\nexport function DatetimeField({\n name,\n label,\n description,\n placeholder,\n required,\n disabled,\n localized,\n locale,\n control,\n className,\n minDate,\n maxDate,\n format,\n precision,\n}: DateTimeFieldProps) {\n const resolvedControl = useResolvedControl(control);\n\n return (\n <Controller\n name={name}\n control={resolvedControl}\n render={({ field, fieldState }) => {\n // Handle string dates from form (convert to Date object)\n const dateValue =\n field.value instanceof Date\n ? field.value\n : field.value\n ? new Date(field.value)\n : null;\n\n return (\n <FieldWrapper\n name={name}\n label={label}\n description={description}\n required={required}\n disabled={disabled}\n localized={localized}\n locale={locale}\n error={fieldState.error?.message}\n >\n <DateTimeInput\n id={name}\n value={dateValue}\n onChange={field.onChange}\n minDate={minDate}\n maxDate={maxDate}\n format={format}\n precision={precision}\n placeholder={placeholder}\n disabled={disabled}\n aria-invalid={!!fieldState.error}\n className={className}\n />\n </FieldWrapper>\n );\n }}\n />\n );\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,cAAc,EAC5B,MACA,OACA,aACA,aACA,UACA,UACA,WACA,QACA,SACA,WACA,SACA,SACA,QACA,aACqB;AAGrB,QACE,oBAAC;EACO;EACN,SALoB,mBAAmB,QAAQ;EAM/C,SAAS,EAAE,OAAO,iBAAiB;GAEjC,MAAM,YACJ,MAAM,iBAAiB,OACnB,MAAM,QACN,MAAM,QACJ,IAAI,KAAK,MAAM,MAAM,GACrB;AAER,UACE,oBAAC;IACO;IACC;IACM;IACH;IACA;IACC;IACH;IACR,OAAO,WAAW,OAAO;cAEzB,oBAAC;KACC,IAAI;KACJ,OAAO;KACP,UAAU,MAAM;KACP;KACA;KACD;KACG;KACE;KACH;KACV,gBAAc,CAAC,CAAC,WAAW;KAChB;MACX;KACW;;GAGnB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseFieldProps } from "./field-types.mjs";
|
|
2
|
+
import * as react_jsx_runtime213 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/components/fields/email-field.d.ts
|
|
5
|
+
declare function EmailField({
|
|
6
|
+
name,
|
|
7
|
+
label,
|
|
8
|
+
description,
|
|
9
|
+
placeholder,
|
|
10
|
+
required,
|
|
11
|
+
disabled,
|
|
12
|
+
localized,
|
|
13
|
+
locale,
|
|
14
|
+
control,
|
|
15
|
+
className
|
|
16
|
+
}: BaseFieldProps): react_jsx_runtime213.JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { EmailField };
|
|
19
|
+
//# sourceMappingURL=email-field.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-field.d.mts","names":[],"sources":["../../../../src/client/components/fields/email-field.tsx"],"sourcesContent":[],"mappings":";;;;iBAMgB,UAAA;;;;;;;;;;;GAWb,iBAAc,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useResolvedControl } from "./field-utils.mjs";
|
|
2
|
+
import { FieldWrapper } from "./field-wrapper.mjs";
|
|
3
|
+
import { TextInput } from "../primitives/text-input.mjs";
|
|
4
|
+
import { Controller } from "react-hook-form";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/client/components/fields/email-field.tsx
|
|
8
|
+
function EmailField({ name, label, description, placeholder, required, disabled, localized, locale, control, className }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
10
|
+
name,
|
|
11
|
+
control: useResolvedControl(control),
|
|
12
|
+
render: ({ field, fieldState }) => /* @__PURE__ */ jsx(FieldWrapper, {
|
|
13
|
+
name,
|
|
14
|
+
label,
|
|
15
|
+
description,
|
|
16
|
+
required,
|
|
17
|
+
disabled,
|
|
18
|
+
localized,
|
|
19
|
+
locale,
|
|
20
|
+
error: fieldState.error?.message,
|
|
21
|
+
children: /* @__PURE__ */ jsx(TextInput, {
|
|
22
|
+
id: name,
|
|
23
|
+
value: field.value ?? "",
|
|
24
|
+
onChange: field.onChange,
|
|
25
|
+
type: "email",
|
|
26
|
+
placeholder,
|
|
27
|
+
disabled,
|
|
28
|
+
autoComplete: "email",
|
|
29
|
+
"aria-invalid": !!fieldState.error,
|
|
30
|
+
className
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { EmailField };
|
|
38
|
+
//# sourceMappingURL=email-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-field.mjs","names":[],"sources":["../../../../src/client/components/fields/email-field.tsx"],"sourcesContent":["import { Controller } from \"react-hook-form\";\nimport { TextInput } from \"../primitives/text-input\";\nimport type { BaseFieldProps } from \"./field-types\";\nimport { useResolvedControl } from \"./field-utils\";\nimport { FieldWrapper } from \"./field-wrapper\";\n\nexport function EmailField({\n name,\n label,\n description,\n placeholder,\n required,\n disabled,\n localized,\n locale,\n control,\n className,\n}: BaseFieldProps) {\n const resolvedControl = useResolvedControl(control);\n\n return (\n <Controller\n name={name}\n control={resolvedControl}\n render={({ field, fieldState }) => (\n <FieldWrapper\n name={name}\n label={label}\n description={description}\n required={required}\n disabled={disabled}\n localized={localized}\n locale={locale}\n error={fieldState.error?.message}\n >\n <TextInput\n id={name}\n value={field.value ?? \"\"}\n onChange={field.onChange}\n type=\"email\"\n placeholder={placeholder}\n disabled={disabled}\n autoComplete=\"email\"\n aria-invalid={!!fieldState.error}\n className={className}\n />\n </FieldWrapper>\n )}\n />\n );\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,WAAW,EACzB,MACA,OACA,aACA,aACA,UACA,UACA,WACA,QACA,SACA,aACiB;AAGjB,QACE,oBAAC;EACO;EACN,SALoB,mBAAmB,QAAQ;EAM/C,SAAS,EAAE,OAAO,iBAChB,oBAAC;GACO;GACC;GACM;GACH;GACA;GACC;GACH;GACR,OAAO,WAAW,OAAO;aAEzB,oBAAC;IACC,IAAI;IACJ,OAAO,MAAM,SAAS;IACtB,UAAU,MAAM;IAChB,MAAK;IACQ;IACH;IACV,cAAa;IACb,gBAAc,CAAC,CAAC,WAAW;IAChB;KACX;IACW;GAEjB"}
|