@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 @@
|
|
|
1
|
+
{"version":3,"file":"admin-builder.mjs","names":["state: TState","listViews: Record<string, any>","editViews: Record<string, any>"],"sources":["../../../src/client/builder/admin-builder.ts"],"sourcesContent":["/**\n * Admin Builder\n *\n * Main builder class - same pattern as QuestpieBuilder.\n * Single generic TState pattern.\n */\n\nimport {\n\tDEFAULT_LOCALE_CONFIG,\n\ttype Prettify,\n\ttype SetProperty,\n\ttype TypeMerge,\n\ttype UnsetProperty,\n} from \"questpie/shared\";\nimport type {\n\tAdminBuilderState,\n\tFilterEditViews,\n\tFilterListViews,\n} from \"./admin-types\";\nimport { type PageBuilder, page } from \"./page/page\";\nimport type { MaybeLazyComponent } from \"./types/common\";\nimport type { DefaultViewsConfig } from \"./types/views\";\nimport { type WidgetBuilder, widget } from \"./widget/widget\";\n\nexport class AdminBuilder<TState extends AdminBuilderState> {\n\tconstructor(public readonly state: TState) {}\n\n\tstatic empty<TApp = any>(): AdminBuilder<{\n\t\t\"~app\": TApp;\n\t\tfields: {};\n\t\tcomponents: {};\n\t\tlistViews: {};\n\t\teditViews: {};\n\t\tpages: {};\n\t\twidgets: {};\n\t\tblocks: {};\n\t\ttranslations: {};\n\t\tlocale: { default: string; supported: string[] };\n\t\tdefaultViews: {};\n\t}> {\n\t\treturn new AdminBuilder({\n\t\t\t\"~app\": undefined as TApp,\n\t\t\tfields: {},\n\t\t\tcomponents: {},\n\t\t\tlistViews: {},\n\t\t\teditViews: {},\n\t\t\tpages: {},\n\t\t\twidgets: {},\n\t\t\tblocks: {},\n\t\t\ttranslations: {},\n\t\t\tlocale: DEFAULT_LOCALE_CONFIG,\n\t\t\tdefaultViews: {},\n\t\t});\n\t}\n\n\t/**\n\t * Register field definitions\n\t */\n\tfields<TNewFields extends Record<string, any>>(\n\t\tfields: TNewFields,\n\t): AdminBuilder<\n\t\tSetProperty<\n\t\t\tTState,\n\t\t\t\"fields\",\n\t\t\tPrettify<TypeMerge<TState[\"fields\"], TNewFields>>\n\t\t>\n\t> {\n\t\treturn new AdminBuilder({\n\t\t\t...this.state,\n\t\t\tfields: {\n\t\t\t\t...this.state.fields,\n\t\t\t\t...fields,\n\t\t\t},\n\t\t} as any);\n\t}\n\n\t/**\n\t * Register component implementations\n\t */\n\tcomponents<TNewComponents extends Record<string, any>>(\n\t\tcomponents: TNewComponents,\n\t): AdminBuilder<\n\t\tSetProperty<\n\t\t\tTState,\n\t\t\t\"components\",\n\t\t\tPrettify<TypeMerge<TState[\"components\"], TNewComponents>>\n\t\t>\n\t> {\n\t\treturn new AdminBuilder({\n\t\t\t...this.state,\n\t\t\tcomponents: {\n\t\t\t\t...this.state.components,\n\t\t\t\t...components,\n\t\t\t},\n\t\t} as any);\n\t}\n\n\t/**\n\t * Register view definitions (auto-sorted by kind)\n\t */\n\tviews<TNewViews extends Record<string, any>>(\n\t\tviews: TNewViews,\n\t): AdminBuilder<\n\t\tPrettify<\n\t\t\tTypeMerge<\n\t\t\t\tUnsetProperty<TState, \"listViews\" | \"editViews\">,\n\t\t\t\t{\n\t\t\t\t\tlistViews: Prettify<\n\t\t\t\t\t\tTypeMerge<TState[\"listViews\"], FilterListViews<TNewViews>>\n\t\t\t\t\t>;\n\t\t\t\t\teditViews: Prettify<\n\t\t\t\t\t\tTypeMerge<TState[\"editViews\"], FilterEditViews<TNewViews>>\n\t\t\t\t\t>;\n\t\t\t\t}\n\t\t\t>\n\t\t>\n\t> {\n\t\tconst listViews: Record<string, any> = {};\n\t\tconst editViews: Record<string, any> = {};\n\n\t\tfor (const [name, def] of Object.entries(views)) {\n\t\t\t// ViewBuilders now implement Definition interface, so kind is directly accessible\n\t\t\tconst kind = (def as any).kind;\n\t\t\tif (kind === \"list\") {\n\t\t\t\tlistViews[name] = def;\n\t\t\t} else if (kind === \"edit\") {\n\t\t\t\teditViews[name] = def;\n\t\t\t}\n\t\t}\n\n\t\treturn new AdminBuilder({\n\t\t\t...this.state,\n\t\t\tlistViews: { ...this.state.listViews, ...listViews },\n\t\t\teditViews: { ...this.state.editViews, ...editViews },\n\t\t} as any);\n\t}\n\n\t/**\n\t * Register widget definitions\n\t */\n\twidgets<TNewWidgets extends Record<string, any>>(\n\t\twidgets: TNewWidgets,\n\t): AdminBuilder<\n\t\tSetProperty<\n\t\t\tTState,\n\t\t\t\"widgets\",\n\t\t\tPrettify<TypeMerge<TState[\"widgets\"], TNewWidgets>>\n\t\t>\n\t> {\n\t\treturn new AdminBuilder({\n\t\t\t...this.state,\n\t\t\twidgets: {\n\t\t\t\t...this.state.widgets,\n\t\t\t\t...widgets,\n\t\t\t},\n\t\t} as any);\n\t}\n\n\t/**\n\t * Register page definitions\n\t */\n\tpages<TNewPages extends Record<string, any>>(\n\t\tpages: TNewPages,\n\t): AdminBuilder<\n\t\tSetProperty<\n\t\t\tTState,\n\t\t\t\"pages\",\n\t\t\tPrettify<TypeMerge<TState[\"pages\"], TNewPages>>\n\t\t>\n\t> {\n\t\treturn new AdminBuilder({\n\t\t\t...this.state,\n\t\t\tpages: {\n\t\t\t\t...this.state.pages,\n\t\t\t\t...pages,\n\t\t\t},\n\t\t} as any);\n\t}\n\n\t/**\n\t * Compose another builder (merge modules)\n\t */\n\tuse<TOther extends AdminBuilder<any>>(\n\t\tother: TOther,\n\t): AdminBuilder<\n\t\tPrettify<\n\t\t\tTypeMerge<\n\t\t\t\tUnsetProperty<\n\t\t\t\t\tTState,\n\t\t\t\t\t| \"fields\"\n\t\t\t\t\t| \"listViews\"\n\t\t\t\t\t| \"editViews\"\n\t\t\t\t\t| \"widgets\"\n\t\t\t\t\t| \"pages\"\n\t\t\t\t\t| \"components\"\n\t\t\t\t>,\n\t\t\t\t{\n\t\t\t\t\tfields: Prettify<\n\t\t\t\t\t\tTypeMerge<TState[\"fields\"], TOther[\"state\"][\"fields\"]>\n\t\t\t\t\t>;\n\t\t\t\t\tlistViews: Prettify<\n\t\t\t\t\t\tTypeMerge<TState[\"listViews\"], TOther[\"state\"][\"listViews\"]>\n\t\t\t\t\t>;\n\t\t\t\t\teditViews: Prettify<\n\t\t\t\t\t\tTypeMerge<TState[\"editViews\"], TOther[\"state\"][\"editViews\"]>\n\t\t\t\t\t>;\n\t\t\t\t\twidgets: Prettify<\n\t\t\t\t\t\tTypeMerge<TState[\"widgets\"], TOther[\"state\"][\"widgets\"]>\n\t\t\t\t\t>;\n\t\t\t\t\tpages: Prettify<TypeMerge<TState[\"pages\"], TOther[\"state\"][\"pages\"]>>;\n\t\t\t\t\tcomponents: Prettify<\n\t\t\t\t\t\tTypeMerge<TState[\"components\"], TOther[\"state\"][\"components\"]>\n\t\t\t\t\t>;\n\t\t\t\t}\n\t\t\t>\n\t\t>\n\t> {\n\t\tconst otherState = (other as any).state;\n\n\t\treturn new AdminBuilder({\n\t\t\t...this.state,\n\t\t\tfields: { ...this.state.fields, ...otherState.fields },\n\t\t\tlistViews: { ...this.state.listViews, ...otherState.listViews },\n\t\t\teditViews: { ...this.state.editViews, ...otherState.editViews },\n\t\t\twidgets: { ...this.state.widgets, ...otherState.widgets },\n\t\t\tpages: { ...this.state.pages, ...otherState.pages },\n\t\t\tcomponents: { ...this.state.components, ...otherState.components },\n\t\t} as any);\n\t}\n\n\t/**\n\t * Set default views config\n\t */\n\tdefaultViews<TDefaultViews extends DefaultViewsConfig>(\n\t\tconfig: TDefaultViews,\n\t): AdminBuilder<\n\t\tSetProperty<\n\t\t\tTState,\n\t\t\t\"defaultViews\",\n\t\t\tPrettify<TypeMerge<TState[\"defaultViews\"], TDefaultViews>>\n\t\t>\n\t> {\n\t\treturn new AdminBuilder({\n\t\t\t...this.state,\n\t\t\tdefaultViews: {\n\t\t\t\t...(this.state.defaultViews || {}),\n\t\t\t\t...config,\n\t\t\t},\n\t\t} as any);\n\t}\n\n\t/**\n\t * Create a page definition\n\t *\n\t * Creates a custom admin page outside of collections/globals.\n\t *\n\t * @example\n\t * ```ts\n\t * const builder = qa<AppCMS>().use(adminModule);\n\t *\n\t * const analyticsPage = builder.page(\"analytics\", {\n\t * component: AnalyticsPage,\n\t * })\n\t * ```\n\t */\n\tpage<TName extends string, TComponent extends MaybeLazyComponent>(\n\t\tname: TName,\n\t\tconfig: { component: TComponent },\n\t): PageBuilder<{\n\t\tname: TName;\n\t\tcomponent: TComponent;\n\t\tpath: undefined;\n\t}> {\n\t\treturn page(name, config);\n\t}\n\n\t/**\n\t * Create a widget definition\n\t *\n\t * Creates a dashboard widget.\n\t *\n\t * @example\n\t * ```ts\n\t * const builder = qa<AppCMS>().use(adminModule);\n\t *\n\t * const statsWidget = builder.widget(\"stats\", {\n\t * component: StatsWidget,\n\t * })\n\t * ```\n\t */\n\twidget<TName extends string, TComponent extends MaybeLazyComponent>(\n\t\tname: TName,\n\t\tconfig: { component: TComponent },\n\t): WidgetBuilder<{\n\t\tname: TName;\n\t\t\"~config\": any;\n\t\tcomponent: TComponent;\n\t}> {\n\t\treturn widget(name, config);\n\t}\n}\n"],"mappings":";;;;;;;;;;;AAwBA,IAAa,eAAb,MAAa,aAA+C;CAC3D,YAAY,AAAgBA,OAAe;EAAf;;CAE5B,OAAO,QAYJ;AACF,SAAO,IAAI,aAAa;GACvB,QAAQ;GACR,QAAQ,EAAE;GACV,YAAY,EAAE;GACd,WAAW,EAAE;GACb,WAAW,EAAE;GACb,OAAO,EAAE;GACT,SAAS,EAAE;GACX,QAAQ,EAAE;GACV,cAAc,EAAE;GAChB,QAAQ;GACR,cAAc,EAAE;GAChB,CAAC;;;;;CAMH,OACC,QAOC;AACD,SAAO,IAAI,aAAa;GACvB,GAAG,KAAK;GACR,QAAQ;IACP,GAAG,KAAK,MAAM;IACd,GAAG;IACH;GACD,CAAQ;;;;;CAMV,WACC,YAOC;AACD,SAAO,IAAI,aAAa;GACvB,GAAG,KAAK;GACR,YAAY;IACX,GAAG,KAAK,MAAM;IACd,GAAG;IACH;GACD,CAAQ;;;;;CAMV,MACC,OAeC;EACD,MAAMC,YAAiC,EAAE;EACzC,MAAMC,YAAiC,EAAE;AAEzC,OAAK,MAAM,CAAC,MAAM,QAAQ,OAAO,QAAQ,MAAM,EAAE;GAEhD,MAAM,OAAQ,IAAY;AAC1B,OAAI,SAAS,OACZ,WAAU,QAAQ;YACR,SAAS,OACnB,WAAU,QAAQ;;AAIpB,SAAO,IAAI,aAAa;GACvB,GAAG,KAAK;GACR,WAAW;IAAE,GAAG,KAAK,MAAM;IAAW,GAAG;IAAW;GACpD,WAAW;IAAE,GAAG,KAAK,MAAM;IAAW,GAAG;IAAW;GACpD,CAAQ;;;;;CAMV,QACC,SAOC;AACD,SAAO,IAAI,aAAa;GACvB,GAAG,KAAK;GACR,SAAS;IACR,GAAG,KAAK,MAAM;IACd,GAAG;IACH;GACD,CAAQ;;;;;CAMV,MACC,OAOC;AACD,SAAO,IAAI,aAAa;GACvB,GAAG,KAAK;GACR,OAAO;IACN,GAAG,KAAK,MAAM;IACd,GAAG;IACH;GACD,CAAQ;;;;;CAMV,IACC,OAiCC;EACD,MAAM,aAAc,MAAc;AAElC,SAAO,IAAI,aAAa;GACvB,GAAG,KAAK;GACR,QAAQ;IAAE,GAAG,KAAK,MAAM;IAAQ,GAAG,WAAW;IAAQ;GACtD,WAAW;IAAE,GAAG,KAAK,MAAM;IAAW,GAAG,WAAW;IAAW;GAC/D,WAAW;IAAE,GAAG,KAAK,MAAM;IAAW,GAAG,WAAW;IAAW;GAC/D,SAAS;IAAE,GAAG,KAAK,MAAM;IAAS,GAAG,WAAW;IAAS;GACzD,OAAO;IAAE,GAAG,KAAK,MAAM;IAAO,GAAG,WAAW;IAAO;GACnD,YAAY;IAAE,GAAG,KAAK,MAAM;IAAY,GAAG,WAAW;IAAY;GAClE,CAAQ;;;;;CAMV,aACC,QAOC;AACD,SAAO,IAAI,aAAa;GACvB,GAAG,KAAK;GACR,cAAc;IACb,GAAI,KAAK,MAAM,gBAAgB,EAAE;IACjC,GAAG;IACH;GACD,CAAQ;;;;;;;;;;;;;;;;CAiBV,KACC,MACA,QAKE;AACF,SAAO,KAAK,MAAM,OAAO;;;;;;;;;;;;;;;;CAiB1B,OACC,MACA,QAKE;AACF,SAAO,OAAO,MAAM,OAAO"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { SimpleMessages } from "../i18n/simple.mjs";
|
|
2
|
+
import { MaybeLazyComponent } from "./types/common.mjs";
|
|
3
|
+
import { FieldDefinition } from "./field/field.mjs";
|
|
4
|
+
import { PageDefinition } from "./page/page.mjs";
|
|
5
|
+
import { LocaleConfig } from "./types/ui-config.mjs";
|
|
6
|
+
import { DefaultViewsConfig } from "./types/views.mjs";
|
|
7
|
+
import { EditViewDefinition, ListViewDefinition } from "./view/view.mjs";
|
|
8
|
+
import { WidgetDefinition } from "./widget/widget.mjs";
|
|
9
|
+
|
|
10
|
+
//#region src/client/builder/admin-types.d.ts
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Translations map: locale -> key -> message
|
|
14
|
+
*/
|
|
15
|
+
type TranslationsMap = Record<string, SimpleMessages>;
|
|
16
|
+
type FieldDefinitionMap = Record<string, FieldDefinition<string, any>>;
|
|
17
|
+
type ListViewDefinitionMap = Record<string, ListViewDefinition<string, any>>;
|
|
18
|
+
type EditViewDefinitionMap = Record<string, EditViewDefinition<string, any>>;
|
|
19
|
+
type PageDefinitionMap = Record<string, PageDefinition<string>>;
|
|
20
|
+
type WidgetDefinitionMap = Record<string, WidgetDefinition<string, any>>;
|
|
21
|
+
type ComponentDefinitionMap = Record<string, MaybeLazyComponent<any>>;
|
|
22
|
+
type BlockDefinitionMap = Record<string, never>;
|
|
23
|
+
/**
|
|
24
|
+
* Admin builder state - definition-time configuration (type-inferrable)
|
|
25
|
+
*
|
|
26
|
+
* FLAT structure - everything is top-level and mergeable, just like QuestpieBuilderState.
|
|
27
|
+
* No "module" wrapper!
|
|
28
|
+
*
|
|
29
|
+
* TApp: Backend Questpie app type - provides collection/global names for autocomplete
|
|
30
|
+
*/
|
|
31
|
+
interface AdminBuilderState<TApp = any, TFields extends FieldDefinitionMap = FieldDefinitionMap, TComponents extends ComponentDefinitionMap = ComponentDefinitionMap, TListViews extends ListViewDefinitionMap = ListViewDefinitionMap, TEditViews extends EditViewDefinitionMap = EditViewDefinitionMap, TPages extends PageDefinitionMap = PageDefinitionMap, TWidgets extends WidgetDefinitionMap = WidgetDefinitionMap, TBlocks extends BlockDefinitionMap = BlockDefinitionMap, TTranslations extends TranslationsMap = TranslationsMap> {
|
|
32
|
+
"~app": TApp;
|
|
33
|
+
fields: TFields;
|
|
34
|
+
components: TComponents;
|
|
35
|
+
listViews: TListViews;
|
|
36
|
+
editViews: TEditViews;
|
|
37
|
+
pages: TPages;
|
|
38
|
+
widgets: TWidgets;
|
|
39
|
+
blocks: TBlocks;
|
|
40
|
+
translations: TTranslations;
|
|
41
|
+
locale: LocaleConfig;
|
|
42
|
+
defaultViews: DefaultViewsConfig;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get view kind from either Builder (state.kind) or Definition (kind)
|
|
46
|
+
* Normalizes the two patterns into one
|
|
47
|
+
*/
|
|
48
|
+
type GetViewKind<T> = T extends {
|
|
49
|
+
state: {
|
|
50
|
+
kind: infer K;
|
|
51
|
+
};
|
|
52
|
+
} ? K : T extends {
|
|
53
|
+
kind: infer K;
|
|
54
|
+
} ? K : never;
|
|
55
|
+
/**
|
|
56
|
+
* Check if a view is a list view (works with both Builder and Definition)
|
|
57
|
+
*/
|
|
58
|
+
type IsListView<T> = GetViewKind<T> extends "list" ? true : false;
|
|
59
|
+
/**
|
|
60
|
+
* Check if a view is an edit view (works with both Builder and Definition)
|
|
61
|
+
*/
|
|
62
|
+
type IsEditView<T> = GetViewKind<T> extends "edit" ? true : false;
|
|
63
|
+
/**
|
|
64
|
+
* Filter record to only list views
|
|
65
|
+
*/
|
|
66
|
+
type FilterListViews<T extends Record<string, any>> = { [K in keyof T as IsListView<T[K]> extends true ? K : never]: T[K] };
|
|
67
|
+
/**
|
|
68
|
+
* Filter record to only edit views
|
|
69
|
+
*/
|
|
70
|
+
type FilterEditViews<T extends Record<string, any>> = { [K in keyof T as IsEditView<T[K]> extends true ? K : never]: T[K] };
|
|
71
|
+
//#endregion
|
|
72
|
+
export { AdminBuilderState, BlockDefinitionMap, ComponentDefinitionMap, EditViewDefinitionMap, FieldDefinitionMap, FilterEditViews, FilterListViews, ListViewDefinitionMap, PageDefinitionMap, TranslationsMap, WidgetDefinitionMap };
|
|
73
|
+
//# sourceMappingURL=admin-types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-types.d.mts","names":[],"sources":["../../../src/client/builder/admin-types.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAsCA;AACA;AACA;AACY,KAlBA,eAAA,GAAkB,MAkBA,CAAA,MAAG,EAlBY,cAkBN,CAAA;AAgBtB,KA5BL,kBAAA,GAAqB,MA4BC,CAAA,MAAA,EA5Bc,eA4Bd,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA;AAEjB,KA7BL,qBAAA,GAAwB,MA6BnB,CAAA,MAAA,EA3BhB,kBA2BgB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA;AAAqB,KAzB1B,qBAAA,GAAwB,MAyBE,CAAA,MAAA,EAvBrC,kBAuBqC,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA;AACjB,KAtBT,iBAAA,GAAoB,MAsBX,CAAA,MAAA,EAtB0B,cAsB1B,CAAA,MAAA,CAAA,CAAA;AAAyB,KArBlC,mBAAA,GAAsB,MAqBY,CAAA,MAAA,EArBG,gBAqBH,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA;AAC1B,KArBR,sBAAA,GAAyB,MAqBjB,CAAA,MAAA,EArBgC,kBAqBhC,CAAA,GAAA,CAAA,CAAA;AAAwB,KApBhC,kBAAA,GAAqB,MAoBW,CAAA,MAAA,EAAA,KAAA,CAAA;;;;;;;;;AAKH,UATxB,iBASwB,CAAA,OAAA,GAAA,EAAA,gBAPxB,kBAOwB,GAPH,kBAOG,EAAA,oBANpB,sBAMoB,GANK,sBAML,EAAA,mBALrB,qBAKqB,GALG,qBAKH,EAAA,mBAJrB,qBAIqB,GAJG,qBAIH,EAAA,eAHzB,iBAGyB,GAHL,iBAGK,EAAA,iBAFvB,mBAEuB,GAFD,mBAEC,EAAA,gBADxB,kBACwB,GADH,kBACG,EAAA,sBAAlB,eAAkB,GAAA,eAAA,CAAA,CAAA;EAGhC,MAAA,EAAA,IAAA;EAGA,MAAA,EAAA,OAAA;EACI,UAAA,EAAA,WAAA;EACD,SAAA,EAAA,UAAA;EACA,SAAA,EAAA,UAAA;EACJ,KAAA,EAAA,MAAA;EACE,OAAA,EAAA,QAAA;EACD,MAAA,EAAA,OAAA;EACM,YAAA,EAAA,aAAA;EAGN,MAAA,EAAA,YAAA;EACM,YAAA,EAAA,kBAAA;;;;;;KA4EH,iBAAiB;;;;QAE1B;;;;;;KAOS,gBAAgB,YAAY;;;;KAK5B,gBAAgB,YAAY;;;;KAK5B,0BAA0B,qCACzB,KAAK,WAAW,EAAE,mBAAmB,YAAY,EAAE;;;;KAMpD,0BAA0B,qCACzB,KAAK,WAAW,EAAE,mBAAmB,YAAY,EAAE"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { AdminBuilderState } from "./admin-types.mjs";
|
|
2
|
+
import { AdminBuilder } from "./admin-builder.mjs";
|
|
3
|
+
import { RegisteredAdmin } from "./registry.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/client/builder/admin.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Extract state from a builder or return the value as-is.
|
|
9
|
+
* Builders have a `state` property, plain configs do not.
|
|
10
|
+
*/
|
|
11
|
+
type ExtractBuilderState<T> = T extends {
|
|
12
|
+
state: infer S;
|
|
13
|
+
} ? S : T;
|
|
14
|
+
/**
|
|
15
|
+
* Map over a record and extract state from each builder value.
|
|
16
|
+
*/
|
|
17
|
+
type ExtractBuilderStates<T> = { [K in keyof T]: ExtractBuilderState<T[K]> };
|
|
18
|
+
/**
|
|
19
|
+
* Input type for Admin - accepts either an AdminBuilder or Admin instance
|
|
20
|
+
*/
|
|
21
|
+
type AdminInput<TState$1 extends AdminBuilderState = AdminBuilderState> = AdminBuilder<TState$1> | Admin<TState$1>;
|
|
22
|
+
/**
|
|
23
|
+
* Admin runtime instance
|
|
24
|
+
*
|
|
25
|
+
* Provides methods to access admin configuration at runtime.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* import { Admin } from "@questpie/admin/builder";
|
|
30
|
+
*
|
|
31
|
+
* // Direct usage - pass builder to AdminLayoutProvider
|
|
32
|
+
* <AdminLayoutProvider admin={admin} ... />
|
|
33
|
+
*
|
|
34
|
+
* // Or create Admin instance explicitly if needed
|
|
35
|
+
* const adminInstance = Admin.normalize(adminBuilder);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare class Admin<TState$1 extends AdminBuilderState = AdminBuilderState> {
|
|
39
|
+
readonly state: TState$1;
|
|
40
|
+
constructor(state: TState$1);
|
|
41
|
+
/**
|
|
42
|
+
* Normalize input to Admin instance (internal helper)
|
|
43
|
+
*/
|
|
44
|
+
static normalize<TState$1 extends AdminBuilderState>(input: AdminInput<TState$1>): Admin<TState$1>;
|
|
45
|
+
/**
|
|
46
|
+
* Get all custom page configurations.
|
|
47
|
+
* Automatically extracts `.state` from builders.
|
|
48
|
+
*/
|
|
49
|
+
getPages(): ExtractBuilderStates<TState$1["pages"]>;
|
|
50
|
+
/**
|
|
51
|
+
* Get all registered component implementations.
|
|
52
|
+
*/
|
|
53
|
+
getComponents(): ExtractBuilderStates<TState$1["components"]>;
|
|
54
|
+
/**
|
|
55
|
+
* Get a specific component implementation by name.
|
|
56
|
+
*/
|
|
57
|
+
getComponent(name: string): ExtractBuilderState<TState$1["components"][string]> | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Get configuration for a specific page.
|
|
60
|
+
* Automatically extracts `.state` from builder.
|
|
61
|
+
*/
|
|
62
|
+
getPageConfig(name: string): ExtractBuilderState<TState$1["pages"][string]> | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Get default views configuration
|
|
65
|
+
*/
|
|
66
|
+
getDefaultViews(): TState$1["defaultViews"];
|
|
67
|
+
/**
|
|
68
|
+
* Get locale configuration
|
|
69
|
+
*/
|
|
70
|
+
getLocale(): TState$1["locale"];
|
|
71
|
+
/**
|
|
72
|
+
* Get available locales
|
|
73
|
+
*/
|
|
74
|
+
getAvailableLocales(): string[];
|
|
75
|
+
/**
|
|
76
|
+
* Get default locale
|
|
77
|
+
*/
|
|
78
|
+
getDefaultLocale(): string;
|
|
79
|
+
/**
|
|
80
|
+
* Get human-readable label for a locale
|
|
81
|
+
*/
|
|
82
|
+
getLocaleLabel(locale: string): string;
|
|
83
|
+
/**
|
|
84
|
+
* Get translations map from builder state
|
|
85
|
+
* Used by AdminProvider to initialize i18n
|
|
86
|
+
*/
|
|
87
|
+
getTranslations(): TState$1["translations"];
|
|
88
|
+
/**
|
|
89
|
+
* Get all registered field definitions
|
|
90
|
+
*/
|
|
91
|
+
getFields(): TState$1["fields"];
|
|
92
|
+
/**
|
|
93
|
+
* Get a specific field definition
|
|
94
|
+
*/
|
|
95
|
+
getField(name: string): TState$1["fields"][string] | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Get all registered list view definitions
|
|
98
|
+
*/
|
|
99
|
+
getListViews(): TState$1["listViews"];
|
|
100
|
+
/**
|
|
101
|
+
* Get all registered edit view definitions
|
|
102
|
+
*/
|
|
103
|
+
getEditViews(): TState$1["editViews"];
|
|
104
|
+
/**
|
|
105
|
+
* Get all registered widget definitions
|
|
106
|
+
*/
|
|
107
|
+
getWidgets(): TState$1["widgets"];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Infer the CMS type from an Admin instance
|
|
111
|
+
*/
|
|
112
|
+
type InferAdminCMS<TAdmin> = TAdmin extends Admin<infer TState> ? TState extends {
|
|
113
|
+
"~app": infer TApp;
|
|
114
|
+
} ? TApp : unknown : unknown;
|
|
115
|
+
/**
|
|
116
|
+
* Get the registered Admin type (from module augmentation)
|
|
117
|
+
*/
|
|
118
|
+
type AppAdmin = RegisteredAdmin extends AdminBuilder<infer TState> ? Admin<TState> : Admin<AdminBuilderState>;
|
|
119
|
+
//#endregion
|
|
120
|
+
export { Admin, AdminInput, AppAdmin, InferAdminCMS };
|
|
121
|
+
//# sourceMappingURL=admin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.d.mts","names":[],"sources":["../../../src/client/builder/admin.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAqCA;KAZK,mBAYiC,CAAA,CAAA,CAAA,GAZR,CAYQ,SAAA;EAAoB,KAAA,EAAA,KAAA,EAAA;CACzC,GAAA,CAAA,GAbgD,CAahD;;;;KARZ,oBASI,CAAA,CAAA,CAAA,GAAA,QAsBI,MA9BC,CA8BI,GA9BA,mBA8BA,CA9BoB,CA8BpB,CA9BsB,CA8BtB,CAAA,CAAA,EAAgB;;;;AAMA,KA9BtB,UA8BsB,CAAA,iBA9BI,iBA8BJ,GA9BwB,iBA8BxB,CAAA,GA7B9B,YA6B8B,CA7BjB,QA6BiB,CAAA,GA5B9B,KA4B8B,CA5BxB,QA4BwB,CAAA;;;;;;;;;;;;;;;;;AA0KR,cAhLb,KAgLa,CAAA,iBAhLQ,iBAgLR,GAhL4B,iBAgL5B,CAAA,CAAA;EAOR,SAAA,KAAA,EAtLmB,QAsLnB;EAOA,WAAA,CAAA,KAAA,EA7LmB,QA6LnB;EAOF;;AAYhB;EAUY,OAAA,SAAQ,CAAA,iBArNc,iBAqNd,CAAA,CAAA,KAAA,EApNT,UAoNS,CApNE,QAoNF,CAAA,CAAA,EAnNf,KAmNe,CAnNT,QAmNS,CAAA;EAClB;;;;EAEU,QAAA,CAAA,CAAA,EAvME,oBAuMF,CAvMuB,QAuMvB,CAAA,OAAA,CAAA,CAAA;EAAN;;;mBAjLa,qBAAqB;;;;8BAmBnC,oBAAoB;;;;;+BAepB,oBAAoB;;;;qBAiBJ;;;;eAWN;;;;;;;;;;;;;;;;;qBAmDM;;;;eAWN;;;;0BAOW;;;;kBAOR;;;;kBAOA;;;;gBAOF;;;;;KAYJ,wBACV,eAAe;;;;;;KASL,QAAA,GACV,wBAAwB,6BACpB,MAAM,UACN,MAAM"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { DEFAULT_LOCALE, DEFAULT_LOCALE_CONFIG } from "questpie/shared";
|
|
2
|
+
|
|
3
|
+
//#region src/client/builder/admin.ts
|
|
4
|
+
/**
|
|
5
|
+
* Admin Runtime Class
|
|
6
|
+
*
|
|
7
|
+
* Wraps AdminBuilder state with runtime methods for accessing configuration.
|
|
8
|
+
* This is what gets passed to AdminProvider and used throughout the admin UI.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Admin runtime instance
|
|
12
|
+
*
|
|
13
|
+
* Provides methods to access admin configuration at runtime.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { Admin } from "@questpie/admin/builder";
|
|
18
|
+
*
|
|
19
|
+
* // Direct usage - pass builder to AdminLayoutProvider
|
|
20
|
+
* <AdminLayoutProvider admin={admin} ... />
|
|
21
|
+
*
|
|
22
|
+
* // Or create Admin instance explicitly if needed
|
|
23
|
+
* const adminInstance = Admin.normalize(adminBuilder);
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
var Admin = class Admin {
|
|
27
|
+
constructor(state) {
|
|
28
|
+
this.state = state;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Normalize input to Admin instance (internal helper)
|
|
32
|
+
*/
|
|
33
|
+
static normalize(input) {
|
|
34
|
+
if (input instanceof Admin) return input;
|
|
35
|
+
return new Admin(input.state);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get all custom page configurations.
|
|
39
|
+
* Automatically extracts `.state` from builders.
|
|
40
|
+
*/
|
|
41
|
+
getPages() {
|
|
42
|
+
const pages = this.state.pages ?? {};
|
|
43
|
+
const result = {};
|
|
44
|
+
for (const [name, config] of Object.entries(pages)) result[name] = config && typeof config === "object" && "state" in config ? config.state : config;
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get all registered component implementations.
|
|
49
|
+
*/
|
|
50
|
+
getComponents() {
|
|
51
|
+
const components = this.state.components ?? {};
|
|
52
|
+
const result = {};
|
|
53
|
+
for (const [name, config] of Object.entries(components)) result[name] = config && typeof config === "object" && "state" in config ? config.state : config;
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get a specific component implementation by name.
|
|
58
|
+
*/
|
|
59
|
+
getComponent(name) {
|
|
60
|
+
const config = this.state.components?.[name];
|
|
61
|
+
if (!config) return void 0;
|
|
62
|
+
return config && typeof config === "object" && "state" in config ? config.state : config;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get configuration for a specific page.
|
|
66
|
+
* Automatically extracts `.state` from builder.
|
|
67
|
+
*/
|
|
68
|
+
getPageConfig(name) {
|
|
69
|
+
const config = this.state.pages?.[name];
|
|
70
|
+
if (!config) return void 0;
|
|
71
|
+
return config && typeof config === "object" && "state" in config ? config.state : config;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Get default views configuration
|
|
75
|
+
*/
|
|
76
|
+
getDefaultViews() {
|
|
77
|
+
return this.state.defaultViews ?? {};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get locale configuration
|
|
81
|
+
*/
|
|
82
|
+
getLocale() {
|
|
83
|
+
return this.state.locale ?? DEFAULT_LOCALE_CONFIG;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get available locales
|
|
87
|
+
*/
|
|
88
|
+
getAvailableLocales() {
|
|
89
|
+
return this.getLocale().supported ?? [DEFAULT_LOCALE];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Get default locale
|
|
93
|
+
*/
|
|
94
|
+
getDefaultLocale() {
|
|
95
|
+
return this.getLocale().default ?? DEFAULT_LOCALE;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get human-readable label for a locale
|
|
99
|
+
*/
|
|
100
|
+
getLocaleLabel(locale) {
|
|
101
|
+
return {
|
|
102
|
+
en: "English",
|
|
103
|
+
sk: "Slovencina",
|
|
104
|
+
cs: "Cestina",
|
|
105
|
+
de: "Deutsch",
|
|
106
|
+
fr: "Francais",
|
|
107
|
+
es: "Espanol",
|
|
108
|
+
it: "Italiano",
|
|
109
|
+
pt: "Portugues",
|
|
110
|
+
pl: "Polski",
|
|
111
|
+
nl: "Nederlands",
|
|
112
|
+
ru: "Russkij",
|
|
113
|
+
uk: "Ukrainska",
|
|
114
|
+
ja: "Nihongo",
|
|
115
|
+
ko: "Hangugeo",
|
|
116
|
+
zh: "Zhongwen"
|
|
117
|
+
}[locale] ?? locale.toUpperCase();
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Get translations map from builder state
|
|
121
|
+
* Used by AdminProvider to initialize i18n
|
|
122
|
+
*/
|
|
123
|
+
getTranslations() {
|
|
124
|
+
return this.state.translations ?? {};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get all registered field definitions
|
|
128
|
+
*/
|
|
129
|
+
getFields() {
|
|
130
|
+
return this.state.fields ?? {};
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get a specific field definition
|
|
134
|
+
*/
|
|
135
|
+
getField(name) {
|
|
136
|
+
return this.state.fields?.[name];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Get all registered list view definitions
|
|
140
|
+
*/
|
|
141
|
+
getListViews() {
|
|
142
|
+
return this.state.listViews ?? {};
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Get all registered edit view definitions
|
|
146
|
+
*/
|
|
147
|
+
getEditViews() {
|
|
148
|
+
return this.state.editViews ?? {};
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Get all registered widget definitions
|
|
152
|
+
*/
|
|
153
|
+
getWidgets() {
|
|
154
|
+
return this.state.widgets ?? {};
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
//#endregion
|
|
159
|
+
export { Admin };
|
|
160
|
+
//# sourceMappingURL=admin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.mjs","names":["state: TState","result: Record<string, any>"],"sources":["../../../src/client/builder/admin.ts"],"sourcesContent":["/**\n * Admin Runtime Class\n *\n * Wraps AdminBuilder state with runtime methods for accessing configuration.\n * This is what gets passed to AdminProvider and used throughout the admin UI.\n */\n\nimport { DEFAULT_LOCALE, DEFAULT_LOCALE_CONFIG } from \"questpie/shared\";\nimport type { AdminBuilder } from \"./admin-builder\";\nimport type { AdminBuilderState } from \"./admin-types\";\nimport type {\n RegisteredAdmin,\n RegisteredCMS,\n RegisteredCollectionNames,\n RegisteredGlobalNames,\n} from \"./registry\";\n\n// ============================================================================\n// Type Helpers for State Extraction\n// ============================================================================\n\n/**\n * Extract state from a builder or return the value as-is.\n * Builders have a `state` property, plain configs do not.\n */\ntype ExtractBuilderState<T> = T extends { state: infer S } ? S : T;\n\n/**\n * Map over a record and extract state from each builder value.\n */\ntype ExtractBuilderStates<T> = {\n [K in keyof T]: ExtractBuilderState<T[K]>;\n};\n\n/**\n * Input type for Admin - accepts either an AdminBuilder or Admin instance\n */\nexport type AdminInput<TState extends AdminBuilderState = AdminBuilderState> =\n | AdminBuilder<TState>\n | Admin<TState>;\n\n// ============================================================================\n// Admin Class\n// ============================================================================\n\n/**\n * Admin runtime instance\n *\n * Provides methods to access admin configuration at runtime.\n *\n * @example\n * ```ts\n * import { Admin } from \"@questpie/admin/builder\";\n *\n * // Direct usage - pass builder to AdminLayoutProvider\n * <AdminLayoutProvider admin={admin} ... />\n *\n * // Or create Admin instance explicitly if needed\n * const adminInstance = Admin.normalize(adminBuilder);\n * ```\n */\nexport class Admin<TState extends AdminBuilderState = AdminBuilderState> {\n constructor(public readonly state: TState) {}\n\n /**\n * Normalize input to Admin instance (internal helper)\n */\n static normalize<TState extends AdminBuilderState>(\n input: AdminInput<TState>,\n ): Admin<TState> {\n if (input instanceof Admin) {\n return input;\n }\n return new Admin(input.state);\n }\n\n // ============================================================================\n // Page Methods\n // ============================================================================\n\n /**\n * Get all custom page configurations.\n * Automatically extracts `.state` from builders.\n */\n getPages(): ExtractBuilderStates<TState[\"pages\"]> {\n const pages = this.state.pages ?? {};\n const result: Record<string, any> = {};\n\n for (const [name, config] of Object.entries(pages)) {\n // Extract state from builders, pass through plain configs\n result[name] =\n config && typeof config === \"object\" && \"state\" in config\n ? (config as any).state\n : config;\n }\n\n return result as ExtractBuilderStates<TState[\"pages\"]>;\n }\n\n // ============================================================================\n // Component Methods\n // ============================================================================\n\n /**\n * Get all registered component implementations.\n */\n getComponents(): ExtractBuilderStates<TState[\"components\"]> {\n const components = this.state.components ?? {};\n const result: Record<string, any> = {};\n\n for (const [name, config] of Object.entries(components)) {\n result[name] =\n config && typeof config === \"object\" && \"state\" in config\n ? (config as any).state\n : config;\n }\n\n return result as ExtractBuilderStates<TState[\"components\"]>;\n }\n\n /**\n * Get a specific component implementation by name.\n */\n getComponent(\n name: string,\n ): ExtractBuilderState<TState[\"components\"][string]> | undefined {\n const config = (this.state.components as Record<string, any>)?.[name];\n if (!config) return undefined;\n\n return config && typeof config === \"object\" && \"state\" in config\n ? config.state\n : config;\n }\n\n /**\n * Get configuration for a specific page.\n * Automatically extracts `.state` from builder.\n */\n getPageConfig(\n name: string,\n ): ExtractBuilderState<TState[\"pages\"][string]> | undefined {\n const config = (this.state.pages as Record<string, any>)?.[name];\n if (!config) return undefined;\n\n // Extract state from builder, pass through plain config\n return config && typeof config === \"object\" && \"state\" in config\n ? config.state\n : config;\n }\n\n // ============================================================================\n // UI Configuration Methods\n // ============================================================================\n\n /**\n * Get default views configuration\n */\n getDefaultViews(): TState[\"defaultViews\"] {\n return this.state.defaultViews ?? ({} as TState[\"defaultViews\"]);\n }\n\n // ============================================================================\n // Locale Methods\n // ============================================================================\n\n /**\n * Get locale configuration\n */\n getLocale(): TState[\"locale\"] {\n return this.state.locale ?? DEFAULT_LOCALE_CONFIG;\n }\n\n /**\n * Get available locales\n */\n getAvailableLocales(): string[] {\n return this.getLocale().supported ?? [DEFAULT_LOCALE];\n }\n\n /**\n * Get default locale\n */\n getDefaultLocale(): string {\n return this.getLocale().default ?? DEFAULT_LOCALE;\n }\n\n /**\n * Get human-readable label for a locale\n */\n getLocaleLabel(locale: string): string {\n // TODO: Support custom labels from locale config\n const labels: Record<string, string> = {\n en: \"English\",\n sk: \"Slovencina\",\n cs: \"Cestina\",\n de: \"Deutsch\",\n fr: \"Francais\",\n es: \"Espanol\",\n it: \"Italiano\",\n pt: \"Portugues\",\n pl: \"Polski\",\n nl: \"Nederlands\",\n ru: \"Russkij\",\n uk: \"Ukrainska\",\n ja: \"Nihongo\",\n ko: \"Hangugeo\",\n zh: \"Zhongwen\",\n };\n return labels[locale] ?? locale.toUpperCase();\n }\n\n // ============================================================================\n // Translations Methods\n // ============================================================================\n\n /**\n * Get translations map from builder state\n * Used by AdminProvider to initialize i18n\n */\n getTranslations(): TState[\"translations\"] {\n return this.state.translations ?? ({} as TState[\"translations\"]);\n }\n\n // ============================================================================\n // Registry Methods (for field/view lookups)\n // ============================================================================\n\n /**\n * Get all registered field definitions\n */\n getFields(): TState[\"fields\"] {\n return this.state.fields ?? ({} as TState[\"fields\"]);\n }\n\n /**\n * Get a specific field definition\n */\n getField(name: string): TState[\"fields\"][string] | undefined {\n return (this.state.fields as Record<string, any>)?.[name];\n }\n\n /**\n * Get all registered list view definitions\n */\n getListViews(): TState[\"listViews\"] {\n return this.state.listViews ?? ({} as TState[\"listViews\"]);\n }\n\n /**\n * Get all registered edit view definitions\n */\n getEditViews(): TState[\"editViews\"] {\n return this.state.editViews ?? ({} as TState[\"editViews\"]);\n }\n\n /**\n * Get all registered widget definitions\n */\n getWidgets(): TState[\"widgets\"] {\n return this.state.widgets ?? ({} as TState[\"widgets\"]);\n }\n}\n\n// ============================================================================\n// Type Helpers\n// ============================================================================\n\n/**\n * Infer the CMS type from an Admin instance\n */\nexport type InferAdminCMS<TAdmin> =\n TAdmin extends Admin<infer TState>\n ? TState extends { \"~app\": infer TApp }\n ? TApp\n : unknown\n : unknown;\n\n/**\n * Get the registered Admin type (from module augmentation)\n */\nexport type AppAdmin =\n RegisteredAdmin extends AdminBuilder<infer TState>\n ? Admin<TState>\n : Admin<AdminBuilderState>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,IAAa,QAAb,MAAa,MAA4D;CACvE,YAAY,AAAgBA,OAAe;EAAf;;;;;CAK5B,OAAO,UACL,OACe;AACf,MAAI,iBAAiB,MACnB,QAAO;AAET,SAAO,IAAI,MAAM,MAAM,MAAM;;;;;;CAW/B,WAAkD;EAChD,MAAM,QAAQ,KAAK,MAAM,SAAS,EAAE;EACpC,MAAMC,SAA8B,EAAE;AAEtC,OAAK,MAAM,CAAC,MAAM,WAAW,OAAO,QAAQ,MAAM,CAEhD,QAAO,QACL,UAAU,OAAO,WAAW,YAAY,WAAW,SAC9C,OAAe,QAChB;AAGR,SAAO;;;;;CAUT,gBAA4D;EAC1D,MAAM,aAAa,KAAK,MAAM,cAAc,EAAE;EAC9C,MAAMA,SAA8B,EAAE;AAEtC,OAAK,MAAM,CAAC,MAAM,WAAW,OAAO,QAAQ,WAAW,CACrD,QAAO,QACL,UAAU,OAAO,WAAW,YAAY,WAAW,SAC9C,OAAe,QAChB;AAGR,SAAO;;;;;CAMT,aACE,MAC+D;EAC/D,MAAM,SAAU,KAAK,MAAM,aAAqC;AAChE,MAAI,CAAC,OAAQ,QAAO;AAEpB,SAAO,UAAU,OAAO,WAAW,YAAY,WAAW,SACtD,OAAO,QACP;;;;;;CAON,cACE,MAC0D;EAC1D,MAAM,SAAU,KAAK,MAAM,QAAgC;AAC3D,MAAI,CAAC,OAAQ,QAAO;AAGpB,SAAO,UAAU,OAAO,WAAW,YAAY,WAAW,SACtD,OAAO,QACP;;;;;CAUN,kBAA0C;AACxC,SAAO,KAAK,MAAM,gBAAiB,EAAE;;;;;CAUvC,YAA8B;AAC5B,SAAO,KAAK,MAAM,UAAU;;;;;CAM9B,sBAAgC;AAC9B,SAAO,KAAK,WAAW,CAAC,aAAa,CAAC,eAAe;;;;;CAMvD,mBAA2B;AACzB,SAAO,KAAK,WAAW,CAAC,WAAW;;;;;CAMrC,eAAe,QAAwB;AAmBrC,SAjBuC;GACrC,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACL,CACa,WAAW,OAAO,aAAa;;;;;;CAW/C,kBAA0C;AACxC,SAAO,KAAK,MAAM,gBAAiB,EAAE;;;;;CAUvC,YAA8B;AAC5B,SAAO,KAAK,MAAM,UAAW,EAAE;;;;;CAMjC,SAAS,MAAoD;AAC3D,SAAQ,KAAK,MAAM,SAAiC;;;;;CAMtD,eAAoC;AAClC,SAAO,KAAK,MAAM,aAAc,EAAE;;;;;CAMpC,eAAoC;AAClC,SAAO,KAAK,MAAM,aAAc,EAAE;;;;;CAMpC,aAAgC;AAC9B,SAAO,KAAK,MAAM,WAAY,EAAE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Badge, IconifyIcon } from "../../components/component-renderer.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/client/builder/defaults/components.ts
|
|
4
|
+
/**
|
|
5
|
+
* Built-in Component Registry
|
|
6
|
+
*
|
|
7
|
+
* Default component implementations used by the admin UI.
|
|
8
|
+
* Registered through AdminBuilder.components() so nothing is hardcoded.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Built-in components registry
|
|
12
|
+
*/
|
|
13
|
+
const builtInComponents = {
|
|
14
|
+
icon: IconifyIcon,
|
|
15
|
+
badge: Badge
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { builtInComponents };
|
|
20
|
+
//# sourceMappingURL=components.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.mjs","names":[],"sources":["../../../../src/client/builder/defaults/components.ts"],"sourcesContent":["/**\n * Built-in Component Registry\n *\n * Default component implementations used by the admin UI.\n * Registered through AdminBuilder.components() so nothing is hardcoded.\n */\n\nimport { Badge, IconifyIcon } from \"../../components/component-renderer\";\n\n/**\n * Built-in components registry\n */\nexport const builtInComponents = {\n icon: IconifyIcon,\n badge: Badge,\n} as const;\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,oBAAoB;CAC/B,MAAM;CACN,OAAO;CACR"}
|