@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,128 @@
|
|
|
1
|
+
import { useResolveText } from "../../i18n/hooks.mjs";
|
|
2
|
+
import { cn } from "../../lib/utils.mjs";
|
|
3
|
+
import { Button } from "../../components/ui/button.mjs";
|
|
4
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../components/ui/dropdown-menu.mjs";
|
|
5
|
+
import { Kbd } from "../../components/ui/kbd.mjs";
|
|
6
|
+
import { SidebarTrigger } from "../../components/ui/sidebar.mjs";
|
|
7
|
+
import { Icon } from "@iconify/react";
|
|
8
|
+
import * as React$1 from "react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
|
|
11
|
+
//#region src/client/views/layout/admin-topbar.tsx
|
|
12
|
+
function AdminTopbar({ onSearchOpen, breadcrumbs = [], theme = "system", setTheme, showThemeToggle }) {
|
|
13
|
+
const resolveText = useResolveText();
|
|
14
|
+
const shouldShowThemeToggle = setTheme && showThemeToggle !== false;
|
|
15
|
+
return /* @__PURE__ */ jsxs("header", {
|
|
16
|
+
className: "relative sticky top-0 z-30 flex h-16 w-full items-center justify-between border-b border-border/60 bg-background/60 px-4 md:px-6 backdrop-blur-xl after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-gradient-to-r after:from-transparent after:via-primary/15 after:to-transparent",
|
|
17
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: "flex items-center gap-2",
|
|
19
|
+
children: [/* @__PURE__ */ jsx(SidebarTrigger, {}), /* @__PURE__ */ jsx("nav", {
|
|
20
|
+
className: "hidden md:flex items-center gap-1.5 text-sm text-muted-foreground",
|
|
21
|
+
children: breadcrumbs.map((crumb) => {
|
|
22
|
+
const CrumbIcon = crumb.icon;
|
|
23
|
+
const crumbLabel = resolveText(crumb.label);
|
|
24
|
+
const crumbKey = crumb.href ?? crumbLabel;
|
|
25
|
+
return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [breadcrumbs[0] !== crumb && /* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "text-muted-foreground/40 mx-1",
|
|
27
|
+
children: "/"
|
|
28
|
+
}), crumb.menu ? /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, { render: /* @__PURE__ */ jsxs("button", {
|
|
29
|
+
type: "button",
|
|
30
|
+
className: cn("flex items-center gap-1 hover:text-foreground transition-colors", breadcrumbs[breadcrumbs.length - 1] === crumb && "text-foreground font-medium"),
|
|
31
|
+
children: [
|
|
32
|
+
CrumbIcon && /* @__PURE__ */ jsx(CrumbIcon, { className: "size-3.5" }),
|
|
33
|
+
crumbLabel,
|
|
34
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
35
|
+
icon: "ph:caret-down",
|
|
36
|
+
className: "size-3 opacity-50"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
}) }), /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
40
|
+
align: "start",
|
|
41
|
+
children: crumb.menu.items.map((item) => {
|
|
42
|
+
const ItemIcon = item.icon;
|
|
43
|
+
return /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
44
|
+
onClick: () => {
|
|
45
|
+
window.location.href = item.href;
|
|
46
|
+
},
|
|
47
|
+
children: [ItemIcon && /* @__PURE__ */ jsx(ItemIcon, { className: "size-3.5" }), resolveText(item.label)]
|
|
48
|
+
}, item.href);
|
|
49
|
+
})
|
|
50
|
+
})] }) : crumb.href ? /* @__PURE__ */ jsxs("a", {
|
|
51
|
+
href: crumb.href,
|
|
52
|
+
className: "flex items-center gap-1.5 hover:text-foreground transition-colors",
|
|
53
|
+
children: [CrumbIcon && /* @__PURE__ */ jsx(CrumbIcon, { className: "size-3.5" }), crumbLabel]
|
|
54
|
+
}) : /* @__PURE__ */ jsxs("span", {
|
|
55
|
+
className: cn("flex items-center gap-1.5", breadcrumbs[breadcrumbs.length - 1] === crumb ? "text-foreground font-medium" : ""),
|
|
56
|
+
children: [CrumbIcon && /* @__PURE__ */ jsx(CrumbIcon, { className: "size-3.5" }), crumbLabel]
|
|
57
|
+
})] }, crumbKey);
|
|
58
|
+
})
|
|
59
|
+
})]
|
|
60
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: "flex items-center gap-2",
|
|
62
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
63
|
+
variant: "outline",
|
|
64
|
+
onClick: onSearchOpen,
|
|
65
|
+
className: "gap-2 w-auto md:w-64 justify-between text-muted-foreground",
|
|
66
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
67
|
+
className: "flex items-center gap-2",
|
|
68
|
+
children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:magnifying-glass" }), /* @__PURE__ */ jsx("span", {
|
|
69
|
+
className: "hidden sm:inline",
|
|
70
|
+
children: "Search..."
|
|
71
|
+
})]
|
|
72
|
+
}), /* @__PURE__ */ jsxs(Kbd, {
|
|
73
|
+
className: "hidden md:inline-flex",
|
|
74
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
75
|
+
className: "text-xs",
|
|
76
|
+
children: "⌘"
|
|
77
|
+
}), "K"]
|
|
78
|
+
})]
|
|
79
|
+
}), shouldShowThemeToggle && /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, { render: /* @__PURE__ */ jsxs(Button, {
|
|
80
|
+
variant: "ghost",
|
|
81
|
+
size: "icon",
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
84
|
+
icon: "ph:sun",
|
|
85
|
+
className: "size-4 scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
88
|
+
icon: "ph:moon",
|
|
89
|
+
className: "absolute size-4 scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ jsx("span", {
|
|
92
|
+
className: "sr-only",
|
|
93
|
+
children: "Toggle theme"
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
}) }), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
97
|
+
align: "end",
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
100
|
+
onClick: () => setTheme("light"),
|
|
101
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
102
|
+
icon: "ph:sun",
|
|
103
|
+
className: "mr-2 size-4"
|
|
104
|
+
}), "Light"]
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
107
|
+
onClick: () => setTheme("dark"),
|
|
108
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
109
|
+
icon: "ph:moon",
|
|
110
|
+
className: "mr-2 size-4"
|
|
111
|
+
}), "Dark"]
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
114
|
+
onClick: () => setTheme("system"),
|
|
115
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
116
|
+
icon: "ph:monitor",
|
|
117
|
+
className: "mr-2 size-4"
|
|
118
|
+
}), "System"]
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
})] })]
|
|
122
|
+
})]
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
export { AdminTopbar };
|
|
128
|
+
//# sourceMappingURL=admin-topbar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-topbar.mjs","names":["React"],"sources":["../../../../src/client/views/layout/admin-topbar.tsx"],"sourcesContent":["import { Icon } from \"@iconify/react\";\nimport * as React from \"react\";\nimport { Button } from \"../../components/ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"../../components/ui/dropdown-menu\";\nimport { Kbd } from \"../../components/ui/kbd\";\nimport { SidebarTrigger } from \"../../components/ui/sidebar\";\nimport type { Breadcrumb } from \"../../contexts/breadcrumb-context\";\nimport { useResolveText } from \"../../i18n/hooks\";\nimport { cn } from \"../../lib/utils\";\n\nexport type Theme = \"light\" | \"dark\" | \"system\";\n\nexport interface AdminTopbarProps {\n onSearchOpen: () => void;\n breadcrumbs?: Breadcrumb[];\n theme?: Theme;\n setTheme?: (theme: Theme) => void;\n showThemeToggle?: boolean;\n}\n\nexport function AdminTopbar({\n onSearchOpen,\n breadcrumbs = [],\n theme = \"system\",\n setTheme,\n showThemeToggle,\n}: AdminTopbarProps) {\n const resolveText = useResolveText();\n\n // Show theme toggle if setTheme is provided and showThemeToggle is not explicitly false\n const shouldShowThemeToggle = setTheme && showThemeToggle !== false;\n\n return (\n <header className=\"relative sticky top-0 z-30 flex h-16 w-full items-center justify-between border-b border-border/60 bg-background/60 px-4 md:px-6 backdrop-blur-xl after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-gradient-to-r after:from-transparent after:via-primary/15 after:to-transparent\">\n <div className=\"flex items-center gap-2\">\n {/* Sidebar toggle - works for both mobile (opens sheet) and desktop (collapses) */}\n <SidebarTrigger />\n\n {/* Breadcrumbs */}\n <nav className=\"hidden md:flex items-center gap-1.5 text-sm text-muted-foreground\">\n {breadcrumbs.map((crumb) => {\n const CrumbIcon = crumb.icon;\n const crumbLabel = resolveText(crumb.label);\n const crumbKey = crumb.href ?? crumbLabel;\n return (\n <React.Fragment key={crumbKey}>\n {breadcrumbs[0] !== crumb && (\n <span className=\"text-muted-foreground/40 mx-1\">/</span>\n )}\n\n {crumb.menu ? (\n // Breadcrumb with dropdown menu\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <button\n type=\"button\"\n className={cn(\n \"flex items-center gap-1 hover:text-foreground transition-colors\",\n breadcrumbs[breadcrumbs.length - 1] === crumb &&\n \"text-foreground font-medium\",\n )}\n >\n {CrumbIcon && <CrumbIcon className=\"size-3.5\" />}\n {crumbLabel}\n <Icon\n icon=\"ph:caret-down\"\n className=\"size-3 opacity-50\"\n />\n </button>\n }\n />\n <DropdownMenuContent align=\"start\">\n {crumb.menu.items.map((item) => {\n const ItemIcon = item.icon;\n return (\n <DropdownMenuItem\n key={item.href}\n onClick={() => {\n window.location.href = item.href;\n }}\n >\n {ItemIcon && <ItemIcon className=\"size-3.5\" />}\n {resolveText(item.label)}\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n ) : crumb.href ? (\n // Breadcrumb with link\n <a\n href={crumb.href}\n className=\"flex items-center gap-1.5 hover:text-foreground transition-colors\"\n >\n {CrumbIcon && <CrumbIcon className=\"size-3.5\" />}\n {crumbLabel}\n </a>\n ) : (\n // Static breadcrumb (current page)\n <span\n className={cn(\n \"flex items-center gap-1.5\",\n breadcrumbs[breadcrumbs.length - 1] === crumb\n ? \"text-foreground font-medium\"\n : \"\",\n )}\n >\n {CrumbIcon && <CrumbIcon className=\"size-3.5\" />}\n {crumbLabel}\n </span>\n )}\n </React.Fragment>\n );\n })}\n </nav>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"outline\"\n onClick={onSearchOpen}\n className=\"gap-2 w-auto md:w-64 justify-between text-muted-foreground\"\n >\n <span className=\"flex items-center gap-2\">\n <Icon icon=\"ph:magnifying-glass\" />\n <span className=\"hidden sm:inline\">Search...</span>\n </span>\n <Kbd className=\"hidden md:inline-flex\">\n <span className=\"text-xs\">⌘</span>K\n </Kbd>\n </Button>\n\n {shouldShowThemeToggle && (\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <Button variant=\"ghost\" size=\"icon\">\n <Icon\n icon=\"ph:sun\"\n className=\"size-4 scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90\"\n />\n <Icon\n icon=\"ph:moon\"\n className=\"absolute size-4 scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0\"\n />\n <span className=\"sr-only\">Toggle theme</span>\n </Button>\n }\n />\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem onClick={() => setTheme(\"light\")}>\n <Icon icon=\"ph:sun\" className=\"mr-2 size-4\" />\n Light\n </DropdownMenuItem>\n <DropdownMenuItem onClick={() => setTheme(\"dark\")}>\n <Icon icon=\"ph:moon\" className=\"mr-2 size-4\" />\n Dark\n </DropdownMenuItem>\n <DropdownMenuItem onClick={() => setTheme(\"system\")}>\n <Icon icon=\"ph:monitor\" className=\"mr-2 size-4\" />\n System\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n </header>\n );\n}\n"],"mappings":";;;;;;;;;;;AAyBA,SAAgB,YAAY,EAC1B,cACA,cAAc,EAAE,EAChB,QAAQ,UACR,UACA,mBACmB;CACnB,MAAM,cAAc,gBAAgB;CAGpC,MAAM,wBAAwB,YAAY,oBAAoB;AAE9D,QACE,qBAAC;EAAO,WAAU;aAChB,qBAAC;GAAI,WAAU;cAEb,oBAAC,mBAAiB,EAGlB,oBAAC;IAAI,WAAU;cACZ,YAAY,KAAK,UAAU;KAC1B,MAAM,YAAY,MAAM;KACxB,MAAM,aAAa,YAAY,MAAM,MAAM;KAC3C,MAAM,WAAW,MAAM,QAAQ;AAC/B,YACE,qBAACA,QAAM,uBACJ,YAAY,OAAO,SAClB,oBAAC;MAAK,WAAU;gBAAgC;OAAQ,EAGzD,MAAM,OAEL,qBAAC,2BACC,oBAAC,uBACC,QACE,qBAAC;MACC,MAAK;MACL,WAAW,GACT,mEACA,YAAY,YAAY,SAAS,OAAO,SACtC,8BACH;;OAEA,aAAa,oBAAC,aAAU,WAAU,aAAa;OAC/C;OACD,oBAAC;QACC,MAAK;QACL,WAAU;SACV;;OACK,GAEX,EACF,oBAAC;MAAoB,OAAM;gBACxB,MAAM,KAAK,MAAM,KAAK,SAAS;OAC9B,MAAM,WAAW,KAAK;AACtB,cACE,qBAAC;QAEC,eAAe;AACb,gBAAO,SAAS,OAAO,KAAK;;mBAG7B,YAAY,oBAAC,YAAS,WAAU,aAAa,EAC7C,YAAY,KAAK,MAAM;UANnB,KAAK,KAOO;QAErB;OACkB,IACT,GACb,MAAM,OAER,qBAAC;MACC,MAAM,MAAM;MACZ,WAAU;iBAET,aAAa,oBAAC,aAAU,WAAU,aAAa,EAC/C;OACC,GAGJ,qBAAC;MACC,WAAW,GACT,6BACA,YAAY,YAAY,SAAS,OAAO,QACpC,gCACA,GACL;iBAEA,aAAa,oBAAC,aAAU,WAAU,aAAa,EAC/C;OACI,KAjEU,SAmEJ;MAEnB;KACE;IACF,EAEN,qBAAC;GAAI,WAAU;cACb,qBAAC;IACC,SAAQ;IACR,SAAS;IACT,WAAU;eAEV,qBAAC;KAAK,WAAU;gBACd,oBAAC,QAAK,MAAK,wBAAwB,EACnC,oBAAC;MAAK,WAAU;gBAAmB;OAAgB;MAC9C,EACP,qBAAC;KAAI,WAAU;gBACb,oBAAC;MAAK,WAAU;gBAAU;OAAQ;MAC9B;KACC,EAER,yBACC,qBAAC,2BACC,oBAAC,uBACC,QACE,qBAAC;IAAO,SAAQ;IAAQ,MAAK;;KAC3B,oBAAC;MACC,MAAK;MACL,WAAU;OACV;KACF,oBAAC;MACC,MAAK;MACL,WAAU;OACV;KACF,oBAAC;MAAK,WAAU;gBAAU;OAAmB;;KACtC,GAEX,EACF,qBAAC;IAAoB,OAAM;;KACzB,qBAAC;MAAiB,eAAe,SAAS,QAAQ;iBAChD,oBAAC;OAAK,MAAK;OAAS,WAAU;QAAgB;OAE7B;KACnB,qBAAC;MAAiB,eAAe,SAAS,OAAO;iBAC/C,oBAAC;OAAK,MAAK;OAAU,WAAU;QAAgB;OAE9B;KACnB,qBAAC;MAAiB,eAAe,SAAS,SAAS;iBACjD,oBAAC;OAAK,MAAK;OAAa,WAAU;QAAgB;OAEjC;;KACC,IACT;IAEb;GACC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AdminSidebarProps, LinkComponentProps } from "./admin-sidebar.mjs";
|
|
2
|
+
import { AdminLayout, AdminLayoutProps } from "./admin-layout.mjs";
|
|
3
|
+
import { AdminLayoutProvider, AdminLayoutProviderProps } from "./admin-layout-provider.mjs";
|
|
4
|
+
import "./admin-root.mjs";
|
|
5
|
+
import { AdminRouter, AdminRouterProps } from "./admin-router.mjs";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/views/pages/accept-invite-page.d.ts
|
|
5
|
+
|
|
6
|
+
interface AcceptInvitePageProps {
|
|
7
|
+
/**
|
|
8
|
+
* Invitation token from URL
|
|
9
|
+
*/
|
|
10
|
+
token: string;
|
|
11
|
+
/**
|
|
12
|
+
* Title shown on the page
|
|
13
|
+
* @default "Complete Registration"
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Description shown below the title
|
|
18
|
+
* @default "Create your account to get started"
|
|
19
|
+
*/
|
|
20
|
+
description?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Logo component to show above the form
|
|
23
|
+
*/
|
|
24
|
+
logo?: React$1.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Path to redirect after successful registration
|
|
27
|
+
* @default basePath (e.g., "/admin")
|
|
28
|
+
*/
|
|
29
|
+
redirectTo?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Path to login page (for invalid/expired tokens)
|
|
32
|
+
* @default "{basePath}/login"
|
|
33
|
+
*/
|
|
34
|
+
loginPath?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Minimum password length
|
|
37
|
+
* @default 8
|
|
38
|
+
*/
|
|
39
|
+
minPasswordLength?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Accept invite page component.
|
|
43
|
+
*
|
|
44
|
+
* Validates the invitation token and allows new users to complete registration.
|
|
45
|
+
* Uses authClient from AdminProvider.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* // In your router
|
|
50
|
+
* function AcceptInviteRoute() {
|
|
51
|
+
* const { token } = useParams()
|
|
52
|
+
* return <AcceptInvitePage token={token} />
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function AcceptInvitePage({
|
|
57
|
+
token,
|
|
58
|
+
title,
|
|
59
|
+
description,
|
|
60
|
+
logo,
|
|
61
|
+
redirectTo,
|
|
62
|
+
loginPath,
|
|
63
|
+
minPasswordLength
|
|
64
|
+
}: AcceptInvitePageProps): react_jsx_runtime7.JSX.Element;
|
|
65
|
+
//#endregion
|
|
66
|
+
export { AcceptInvitePage, AcceptInvitePageProps };
|
|
67
|
+
//# sourceMappingURL=accept-invite-page.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accept-invite-page.d.mts","names":[],"sources":["../../../../src/client/views/pages/accept-invite-page.tsx"],"sourcesContent":[],"mappings":";;;;;AAyFE,UAhEe,qBAAA,CAgEf;EACA;;;EAGA,KAAA,EAAA,MAAA;EACA;;;;;;;;;;;;;SAhDO,OAAA,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyCC,gBAAA;;;;;;;;GAQb,wBAAqB,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { selectBasePath, selectBrandName, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
|
|
2
|
+
import { Button } from "../../components/ui/button.mjs";
|
|
3
|
+
import { useAuthClient } from "../../hooks/use-auth.mjs";
|
|
4
|
+
import { Spinner } from "../../components/ui/spinner.mjs";
|
|
5
|
+
import { AuthLayout } from "../auth/auth-layout.mjs";
|
|
6
|
+
import { Alert, AlertDescription } from "../../components/ui/alert.mjs";
|
|
7
|
+
import { AcceptInviteForm } from "../auth/accept-invite-form.mjs";
|
|
8
|
+
import { Icon } from "@iconify/react";
|
|
9
|
+
import * as React$1 from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
|
|
12
|
+
//#region src/client/views/pages/accept-invite-page.tsx
|
|
13
|
+
/**
|
|
14
|
+
* Accept Invite Page
|
|
15
|
+
*
|
|
16
|
+
* Page for new users to complete registration after receiving invitation.
|
|
17
|
+
* Uses Better Auth's admin plugin for invitation acceptance.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Accept invite page component.
|
|
21
|
+
*
|
|
22
|
+
* Validates the invitation token and allows new users to complete registration.
|
|
23
|
+
* Uses authClient from AdminProvider.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* // In your router
|
|
28
|
+
* function AcceptInviteRoute() {
|
|
29
|
+
* const { token } = useParams()
|
|
30
|
+
* return <AcceptInvitePage token={token} />
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
function AcceptInvitePage({ token, title = "Complete Registration", description = "Create your account to get started", logo, redirectTo, loginPath, minPasswordLength = 8 }) {
|
|
35
|
+
const authClient = useAuthClient();
|
|
36
|
+
const navigate = useAdminStore(selectNavigate);
|
|
37
|
+
const basePath = useAdminStore(selectBasePath);
|
|
38
|
+
const brandName = useAdminStore(selectBrandName);
|
|
39
|
+
const [invitation, setInvitation] = React$1.useState({ status: "loading" });
|
|
40
|
+
const [error, setError] = React$1.useState(null);
|
|
41
|
+
React$1.useEffect(() => {
|
|
42
|
+
const validateToken = async () => {
|
|
43
|
+
try {
|
|
44
|
+
const result = await authClient.admin.getInvitation({ query: { token } });
|
|
45
|
+
if (result.error || !result.data) {
|
|
46
|
+
setInvitation({
|
|
47
|
+
status: "invalid",
|
|
48
|
+
message: result.error?.message || "Invalid or expired invitation"
|
|
49
|
+
});
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
setInvitation({
|
|
53
|
+
status: "valid",
|
|
54
|
+
email: result.data.email,
|
|
55
|
+
role: result.data.role
|
|
56
|
+
});
|
|
57
|
+
} catch (err) {
|
|
58
|
+
setInvitation({
|
|
59
|
+
status: "invalid",
|
|
60
|
+
message: "Invalid or expired invitation"
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
validateToken();
|
|
65
|
+
}, [token, authClient]);
|
|
66
|
+
const handleSubmit = async (values) => {
|
|
67
|
+
setError(null);
|
|
68
|
+
try {
|
|
69
|
+
const result = await authClient.admin.acceptInvitation({
|
|
70
|
+
token,
|
|
71
|
+
name: values.name,
|
|
72
|
+
password: values.password
|
|
73
|
+
});
|
|
74
|
+
if (result.error) {
|
|
75
|
+
setError(result.error.message || "Failed to create account");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
navigate(redirectTo ?? basePath);
|
|
79
|
+
} catch (err) {
|
|
80
|
+
setError(err instanceof Error ? err.message : "An error occurred");
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const handleGoToLogin = () => {
|
|
84
|
+
navigate(loginPath ?? `${basePath}/login`);
|
|
85
|
+
};
|
|
86
|
+
if (invitation.status === "loading") return /* @__PURE__ */ jsx(AuthLayout, {
|
|
87
|
+
title: "Validating Invitation",
|
|
88
|
+
description: "Please wait...",
|
|
89
|
+
logo: logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName }),
|
|
90
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
91
|
+
className: "flex justify-center py-8",
|
|
92
|
+
children: /* @__PURE__ */ jsx(Spinner, { className: "size-8" })
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
if (invitation.status === "invalid") return /* @__PURE__ */ jsx(AuthLayout, {
|
|
96
|
+
title: "Invalid Invitation",
|
|
97
|
+
description: "This invitation link is no longer valid",
|
|
98
|
+
logo: logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName }),
|
|
99
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
100
|
+
className: "space-y-4",
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ jsxs(Alert, {
|
|
103
|
+
variant: "destructive",
|
|
104
|
+
children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:warning-circle" }), /* @__PURE__ */ jsx(AlertDescription, { children: invitation.message })]
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsx("p", {
|
|
107
|
+
className: "text-muted-foreground text-center text-sm",
|
|
108
|
+
children: "The invitation may have expired or already been used. Please contact your administrator for a new invitation."
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ jsx(Button, {
|
|
111
|
+
variant: "outline",
|
|
112
|
+
className: "w-full",
|
|
113
|
+
onClick: handleGoToLogin,
|
|
114
|
+
children: "Go to Login"
|
|
115
|
+
})
|
|
116
|
+
]
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
return /* @__PURE__ */ jsx(AuthLayout, {
|
|
120
|
+
title,
|
|
121
|
+
description,
|
|
122
|
+
logo: logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName }),
|
|
123
|
+
children: /* @__PURE__ */ jsx(AcceptInviteForm, {
|
|
124
|
+
onSubmit: handleSubmit,
|
|
125
|
+
email: invitation.email,
|
|
126
|
+
error,
|
|
127
|
+
minPasswordLength
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function DefaultLogo({ brandName }) {
|
|
132
|
+
return /* @__PURE__ */ jsx("div", {
|
|
133
|
+
className: "text-center",
|
|
134
|
+
children: /* @__PURE__ */ jsx("h1", {
|
|
135
|
+
className: "text-xl font-bold",
|
|
136
|
+
children: brandName
|
|
137
|
+
})
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
export { AcceptInvitePage };
|
|
143
|
+
//# sourceMappingURL=accept-invite-page.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accept-invite-page.mjs","names":["React"],"sources":["../../../../src/client/views/pages/accept-invite-page.tsx"],"sourcesContent":["/**\n * Accept Invite Page\n *\n * Page for new users to complete registration after receiving invitation.\n * Uses Better Auth's admin plugin for invitation acceptance.\n */\n\nimport * as React from \"react\";\nimport { useAuthClient } from \"../../hooks/use-auth\";\nimport {\n selectBasePath,\n selectBrandName,\n selectNavigate,\n useAdminStore,\n} from \"../../runtime/provider\";\nimport { AuthLayout } from \"../auth/auth-layout\";\nimport {\n AcceptInviteForm,\n type AcceptInviteFormValues,\n} from \"../auth/accept-invite-form\";\nimport { Alert, AlertDescription } from \"../../components/ui/alert\";\nimport { Button } from \"../../components/ui/button\";\nimport { Spinner } from \"../../components/ui/spinner\";\nimport { Icon } from \"@iconify/react\";\n\nexport interface AcceptInvitePageProps {\n /**\n * Invitation token from URL\n */\n token: string;\n\n /**\n * Title shown on the page\n * @default \"Complete Registration\"\n */\n title?: string;\n\n /**\n * Description shown below the title\n * @default \"Create your account to get started\"\n */\n description?: string;\n\n /**\n * Logo component to show above the form\n */\n logo?: React.ReactNode;\n\n /**\n * Path to redirect after successful registration\n * @default basePath (e.g., \"/admin\")\n */\n redirectTo?: string;\n\n /**\n * Path to login page (for invalid/expired tokens)\n * @default \"{basePath}/login\"\n */\n loginPath?: string;\n\n /**\n * Minimum password length\n * @default 8\n */\n minPasswordLength?: number;\n}\n\ntype InvitationState =\n | { status: \"loading\" }\n | { status: \"valid\"; email: string; role?: string }\n | { status: \"invalid\"; message: string };\n\n/**\n * Accept invite page component.\n *\n * Validates the invitation token and allows new users to complete registration.\n * Uses authClient from AdminProvider.\n *\n * @example\n * ```tsx\n * // In your router\n * function AcceptInviteRoute() {\n * const { token } = useParams()\n * return <AcceptInvitePage token={token} />\n * }\n * ```\n */\nexport function AcceptInvitePage({\n token,\n title = \"Complete Registration\",\n description = \"Create your account to get started\",\n logo,\n redirectTo,\n loginPath,\n minPasswordLength = 8,\n}: AcceptInvitePageProps) {\n const authClient = useAuthClient();\n const navigate = useAdminStore(selectNavigate);\n const basePath = useAdminStore(selectBasePath);\n const brandName = useAdminStore(selectBrandName);\n\n const [invitation, setInvitation] = React.useState<InvitationState>({\n status: \"loading\",\n });\n const [error, setError] = React.useState<string | null>(null);\n\n // Validate token on mount\n React.useEffect(() => {\n const validateToken = async () => {\n try {\n const result = await authClient.admin.getInvitation({\n query: { token },\n });\n\n if (result.error || !result.data) {\n setInvitation({\n status: \"invalid\",\n message: result.error?.message || \"Invalid or expired invitation\",\n });\n return;\n }\n\n setInvitation({\n status: \"valid\",\n email: result.data.email,\n role: result.data.role,\n });\n } catch (err) {\n setInvitation({\n status: \"invalid\",\n message: \"Invalid or expired invitation\",\n });\n }\n };\n\n validateToken();\n }, [token, authClient]);\n\n const handleSubmit = async (values: AcceptInviteFormValues) => {\n setError(null);\n\n try {\n const result = await authClient.admin.acceptInvitation({\n token,\n name: values.name,\n password: values.password,\n });\n\n if (result.error) {\n setError(result.error.message || \"Failed to create account\");\n return;\n }\n\n // Redirect on success\n navigate(redirectTo ?? basePath);\n } catch (err) {\n setError(err instanceof Error ? err.message : \"An error occurred\");\n }\n };\n\n const handleGoToLogin = () => {\n navigate(loginPath ?? `${basePath}/login`);\n };\n\n // Loading state\n if (invitation.status === \"loading\") {\n return (\n <AuthLayout\n title=\"Validating Invitation\"\n description=\"Please wait...\"\n logo={logo ?? <DefaultLogo brandName={brandName} />}\n >\n <div className=\"flex justify-center py-8\">\n <Spinner className=\"size-8\" />\n </div>\n </AuthLayout>\n );\n }\n\n // Invalid token state\n if (invitation.status === \"invalid\") {\n return (\n <AuthLayout\n title=\"Invalid Invitation\"\n description=\"This invitation link is no longer valid\"\n logo={logo ?? <DefaultLogo brandName={brandName} />}\n >\n <div className=\"space-y-4\">\n <Alert variant=\"destructive\">\n <Icon icon=\"ph:warning-circle\" />\n <AlertDescription>{invitation.message}</AlertDescription>\n </Alert>\n <p className=\"text-muted-foreground text-center text-sm\">\n The invitation may have expired or already been used. Please contact\n your administrator for a new invitation.\n </p>\n <Button\n variant=\"outline\"\n className=\"w-full\"\n onClick={handleGoToLogin}\n >\n Go to Login\n </Button>\n </div>\n </AuthLayout>\n );\n }\n\n // Valid token - show registration form\n return (\n <AuthLayout\n title={title}\n description={description}\n logo={logo ?? <DefaultLogo brandName={brandName} />}\n >\n <AcceptInviteForm\n onSubmit={handleSubmit}\n email={invitation.email}\n error={error}\n minPasswordLength={minPasswordLength}\n />\n </AuthLayout>\n );\n}\n\nfunction DefaultLogo({ brandName }: { brandName: string }) {\n return (\n <div className=\"text-center\">\n <h1 className=\"text-xl font-bold\">{brandName}</h1>\n </div>\n );\n}\n\nexport default AcceptInvitePage;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,SAAgB,iBAAiB,EAC/B,OACA,QAAQ,yBACR,cAAc,sCACd,MACA,YACA,WACA,oBAAoB,KACI;CACxB,MAAM,aAAa,eAAe;CAClC,MAAM,WAAW,cAAc,eAAe;CAC9C,MAAM,WAAW,cAAc,eAAe;CAC9C,MAAM,YAAY,cAAc,gBAAgB;CAEhD,MAAM,CAAC,YAAY,iBAAiBA,QAAM,SAA0B,EAClE,QAAQ,WACT,CAAC;CACF,MAAM,CAAC,OAAO,YAAYA,QAAM,SAAwB,KAAK;AAG7D,SAAM,gBAAgB;EACpB,MAAM,gBAAgB,YAAY;AAChC,OAAI;IACF,MAAM,SAAS,MAAM,WAAW,MAAM,cAAc,EAClD,OAAO,EAAE,OAAO,EACjB,CAAC;AAEF,QAAI,OAAO,SAAS,CAAC,OAAO,MAAM;AAChC,mBAAc;MACZ,QAAQ;MACR,SAAS,OAAO,OAAO,WAAW;MACnC,CAAC;AACF;;AAGF,kBAAc;KACZ,QAAQ;KACR,OAAO,OAAO,KAAK;KACnB,MAAM,OAAO,KAAK;KACnB,CAAC;YACK,KAAK;AACZ,kBAAc;KACZ,QAAQ;KACR,SAAS;KACV,CAAC;;;AAIN,iBAAe;IACd,CAAC,OAAO,WAAW,CAAC;CAEvB,MAAM,eAAe,OAAO,WAAmC;AAC7D,WAAS,KAAK;AAEd,MAAI;GACF,MAAM,SAAS,MAAM,WAAW,MAAM,iBAAiB;IACrD;IACA,MAAM,OAAO;IACb,UAAU,OAAO;IAClB,CAAC;AAEF,OAAI,OAAO,OAAO;AAChB,aAAS,OAAO,MAAM,WAAW,2BAA2B;AAC5D;;AAIF,YAAS,cAAc,SAAS;WACzB,KAAK;AACZ,YAAS,eAAe,QAAQ,IAAI,UAAU,oBAAoB;;;CAItE,MAAM,wBAAwB;AAC5B,WAAS,aAAa,GAAG,SAAS,QAAQ;;AAI5C,KAAI,WAAW,WAAW,UACxB,QACE,oBAAC;EACC,OAAM;EACN,aAAY;EACZ,MAAM,QAAQ,oBAAC,eAAuB,YAAa;YAEnD,oBAAC;GAAI,WAAU;aACb,oBAAC,WAAQ,WAAU,WAAW;IAC1B;GACK;AAKjB,KAAI,WAAW,WAAW,UACxB,QACE,oBAAC;EACC,OAAM;EACN,aAAY;EACZ,MAAM,QAAQ,oBAAC,eAAuB,YAAa;YAEnD,qBAAC;GAAI,WAAU;;IACb,qBAAC;KAAM,SAAQ;gBACb,oBAAC,QAAK,MAAK,sBAAsB,EACjC,oBAAC,8BAAkB,WAAW,UAA2B;MACnD;IACR,oBAAC;KAAE,WAAU;eAA4C;MAGrD;IACJ,oBAAC;KACC,SAAQ;KACR,WAAU;KACV,SAAS;eACV;MAEQ;;IACL;GACK;AAKjB,QACE,oBAAC;EACQ;EACM;EACb,MAAM,QAAQ,oBAAC,eAAuB,YAAa;YAEnD,oBAAC;GACC,UAAU;GACV,OAAO,WAAW;GACX;GACY;IACnB;GACS;;AAIjB,SAAS,YAAY,EAAE,aAAoC;AACzD,QACE,oBAAC;EAAI,WAAU;YACb,oBAAC;GAAG,WAAU;aAAqB;IAAe;GAC9C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/client/views/pages/dashboard-page.d.ts
|
|
4
|
+
declare namespace dashboard_page_d_exports {
|
|
5
|
+
export { DashboardPage, DashboardPageProps, DashboardPage as default };
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Dashboard Page
|
|
9
|
+
*
|
|
10
|
+
* Default dashboard page that renders the DashboardGrid component
|
|
11
|
+
* based on the admin configuration.
|
|
12
|
+
*/
|
|
13
|
+
interface DashboardPageProps {
|
|
14
|
+
/**
|
|
15
|
+
* Override dashboard title
|
|
16
|
+
*/
|
|
17
|
+
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Override dashboard description
|
|
20
|
+
*/
|
|
21
|
+
description?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Additional CSS class
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Default dashboard page component.
|
|
29
|
+
*
|
|
30
|
+
* Reads dashboard configuration from AdminProvider and renders DashboardGrid.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* // In your admin config
|
|
35
|
+
* const admin = qa<AppCMS>()
|
|
36
|
+
* .use(coreAdminModule)
|
|
37
|
+
* .dashboard({
|
|
38
|
+
* title: "Welcome",
|
|
39
|
+
* widgets: [
|
|
40
|
+
* { type: "stats", collection: "posts" },
|
|
41
|
+
* ],
|
|
42
|
+
* })
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare function DashboardPage({
|
|
46
|
+
title,
|
|
47
|
+
description,
|
|
48
|
+
className
|
|
49
|
+
}: DashboardPageProps): react_jsx_runtime8.JSX.Element;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { DashboardPage, DashboardPageProps, dashboard_page_d_exports };
|
|
52
|
+
//# sourceMappingURL=dashboard-page.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-page.d.mts","names":[],"sources":["../../../../src/client/views/pages/dashboard-page.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;;UAiBiB,kBAAA;;;AAAjB;EAmCgB,KAAA,CAAA,EAAA,MAAA;EACd;;;EAGC,WAAA,CAAA,EAAA,MAAA;EAAkB;;;;;;;;;;;;;;;;;;;;;;;iBAJL,aAAA;;;;GAIb,qBAAkB,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { selectBasePath, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
|
|
2
|
+
import { useAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
3
|
+
import { DashboardGrid } from "../dashboard/dashboard-grid.mjs";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/client/views/pages/dashboard-page.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Default dashboard page component.
|
|
10
|
+
*
|
|
11
|
+
* Reads dashboard configuration from AdminProvider and renders DashboardGrid.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* // In your admin config
|
|
16
|
+
* const admin = qa<AppCMS>()
|
|
17
|
+
* .use(coreAdminModule)
|
|
18
|
+
* .dashboard({
|
|
19
|
+
* title: "Welcome",
|
|
20
|
+
* widgets: [
|
|
21
|
+
* { type: "stats", collection: "posts" },
|
|
22
|
+
* ],
|
|
23
|
+
* })
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
function DashboardPage({ title, description, className }) {
|
|
27
|
+
const basePath = useAdminStore(selectBasePath);
|
|
28
|
+
const navigate = useAdminStore(selectNavigate);
|
|
29
|
+
const { data: serverConfig } = useAdminConfig();
|
|
30
|
+
return /* @__PURE__ */ jsx(DashboardGrid, {
|
|
31
|
+
config: {
|
|
32
|
+
...serverConfig?.dashboard ?? {},
|
|
33
|
+
...title && { title },
|
|
34
|
+
...description && { description }
|
|
35
|
+
},
|
|
36
|
+
basePath,
|
|
37
|
+
navigate,
|
|
38
|
+
className
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
var dashboard_page_default = DashboardPage;
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { DashboardPage, dashboard_page_default as default };
|
|
45
|
+
//# sourceMappingURL=dashboard-page.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-page.mjs","names":[],"sources":["../../../../src/client/views/pages/dashboard-page.tsx"],"sourcesContent":["/**\n * Dashboard Page\n *\n * Default dashboard page that renders the DashboardGrid component\n * based on the admin configuration.\n */\n\nimport * as React from \"react\";\nimport type { DashboardConfig } from \"../../builder\";\nimport { useAdminConfig } from \"../../hooks/use-admin-config\";\nimport {\n selectBasePath,\n selectNavigate,\n useAdminStore,\n} from \"../../runtime/provider\";\nimport { DashboardGrid } from \"../dashboard/dashboard-grid\";\n\nexport interface DashboardPageProps {\n /**\n * Override dashboard title\n */\n title?: string;\n\n /**\n * Override dashboard description\n */\n description?: string;\n\n /**\n * Additional CSS class\n */\n className?: string;\n}\n\n/**\n * Default dashboard page component.\n *\n * Reads dashboard configuration from AdminProvider and renders DashboardGrid.\n *\n * @example\n * ```tsx\n * // In your admin config\n * const admin = qa<AppCMS>()\n * .use(coreAdminModule)\n * .dashboard({\n * title: \"Welcome\",\n * widgets: [\n * { type: \"stats\", collection: \"posts\" },\n * ],\n * })\n * ```\n */\nexport function DashboardPage({\n title,\n description,\n className,\n}: DashboardPageProps) {\n const basePath = useAdminStore(selectBasePath);\n const navigate = useAdminStore(selectNavigate);\n const { data: serverConfig } = useAdminConfig();\n\n const dashboardConfig = (serverConfig?.dashboard ?? {}) as DashboardConfig;\n\n // Merge props with config\n const config = {\n ...dashboardConfig,\n ...(title && { title }),\n ...(description && { description }),\n };\n\n return (\n <DashboardGrid\n config={config}\n basePath={basePath}\n navigate={navigate}\n className={className}\n />\n );\n}\n\nexport default DashboardPage;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,SAAgB,cAAc,EAC5B,OACA,aACA,aACqB;CACrB,MAAM,WAAW,cAAc,eAAe;CAC9C,MAAM,WAAW,cAAc,eAAe;CAC9C,MAAM,EAAE,MAAM,iBAAiB,gBAAgB;AAW/C,QACE,oBAAC;EACC,QARW;GACb,GAJuB,cAAc,aAAa,EAAE;GAKpD,GAAI,SAAS,EAAE,OAAO;GACtB,GAAI,eAAe,EAAE,aAAa;GACnC;EAKa;EACA;EACC;GACX;;AAIN,6BAAe"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/views/pages/forgot-password-page.d.ts
|
|
5
|
+
declare namespace forgot_password_page_d_exports {
|
|
6
|
+
export { ForgotPasswordPage, ForgotPasswordPageProps, ForgotPasswordPage as default };
|
|
7
|
+
}
|
|
8
|
+
interface ForgotPasswordPageProps {
|
|
9
|
+
/**
|
|
10
|
+
* Title shown on the page
|
|
11
|
+
* @default "Forgot password"
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Description shown below the title
|
|
16
|
+
* @default "Enter your email to receive a password reset link"
|
|
17
|
+
*/
|
|
18
|
+
description?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Logo component to show above the form
|
|
21
|
+
*/
|
|
22
|
+
logo?: React$1.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Path to login page
|
|
25
|
+
* @default "{basePath}/login"
|
|
26
|
+
*/
|
|
27
|
+
loginPath?: string;
|
|
28
|
+
/**
|
|
29
|
+
* URL to redirect to after password reset (included in email)
|
|
30
|
+
* @default "{window.origin}{basePath}/reset-password"
|
|
31
|
+
*/
|
|
32
|
+
resetPasswordRedirectUrl?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Default forgot password page component.
|
|
36
|
+
*
|
|
37
|
+
* Uses authClient from AdminProvider to handle password reset requests.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* // In your admin config
|
|
42
|
+
* const admin = qa<AppCMS>()
|
|
43
|
+
* .use(coreAdminModule)
|
|
44
|
+
* .pages({
|
|
45
|
+
* forgotPassword: page("forgot-password", { component: ForgotPasswordPage })
|
|
46
|
+
* .path("/forgot-password"),
|
|
47
|
+
* })
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function ForgotPasswordPage({
|
|
51
|
+
title,
|
|
52
|
+
description,
|
|
53
|
+
logo,
|
|
54
|
+
loginPath,
|
|
55
|
+
resetPasswordRedirectUrl
|
|
56
|
+
}: ForgotPasswordPageProps): react_jsx_runtime9.JSX.Element;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { ForgotPasswordPage, ForgotPasswordPageProps, forgot_password_page_d_exports };
|
|
59
|
+
//# sourceMappingURL=forgot-password-page.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgot-password-page.d.mts","names":[],"sources":["../../../../src/client/views/pages/forgot-password-page.tsx"],"sourcesContent":[],"mappings":";;;;;;;UAqBiB,uBAAA;;;AAAjB;AA+CA;EACE,KAAA,CAAA,EAAA,MAAA;EACA;;;;EAIC,WAAA,CAAA,EAAA,MAAA;EAAuB;;;SArCjB,OAAA,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+BC,kBAAA;;;;;;GAMb,0BAAuB,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { selectBasePath, selectBrandName, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
|
|
2
|
+
import { useAuthClient } from "../../hooks/use-auth.mjs";
|
|
3
|
+
import { AuthLayout } from "../auth/auth-layout.mjs";
|
|
4
|
+
import { ForgotPasswordForm } from "../auth/forgot-password-form.mjs";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/client/views/pages/forgot-password-page.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Forgot Password Page
|
|
11
|
+
*
|
|
12
|
+
* Default forgot password page that uses AuthLayout and ForgotPasswordForm.
|
|
13
|
+
* Integrates with authClient from AdminProvider context.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Default forgot password page component.
|
|
17
|
+
*
|
|
18
|
+
* Uses authClient from AdminProvider to handle password reset requests.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* // In your admin config
|
|
23
|
+
* const admin = qa<AppCMS>()
|
|
24
|
+
* .use(coreAdminModule)
|
|
25
|
+
* .pages({
|
|
26
|
+
* forgotPassword: page("forgot-password", { component: ForgotPasswordPage })
|
|
27
|
+
* .path("/forgot-password"),
|
|
28
|
+
* })
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
function ForgotPasswordPage({ title = "Forgot password", description = "Enter your email to receive a password reset link", logo, loginPath, resetPasswordRedirectUrl }) {
|
|
32
|
+
const authClient = useAuthClient();
|
|
33
|
+
const navigate = useAdminStore(selectNavigate);
|
|
34
|
+
const basePath = useAdminStore(selectBasePath);
|
|
35
|
+
const brandName = useAdminStore(selectBrandName);
|
|
36
|
+
const [error, setError] = React$1.useState(null);
|
|
37
|
+
const handleSubmit = async (values) => {
|
|
38
|
+
setError(null);
|
|
39
|
+
try {
|
|
40
|
+
const redirectUrl = resetPasswordRedirectUrl ?? `${typeof window !== "undefined" ? window.location.origin : ""}${basePath}/reset-password`;
|
|
41
|
+
const result = await authClient.forgetPassword({
|
|
42
|
+
email: values.email,
|
|
43
|
+
redirectTo: redirectUrl
|
|
44
|
+
});
|
|
45
|
+
if (result.error) {
|
|
46
|
+
setError(result.error.message || "Failed to send reset email");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
} catch (err) {
|
|
50
|
+
setError(err instanceof Error ? err.message : "An error occurred");
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const handleBackToLoginClick = () => {
|
|
54
|
+
navigate(loginPath ?? `${basePath}/login`);
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ jsx(AuthLayout, {
|
|
57
|
+
title,
|
|
58
|
+
description,
|
|
59
|
+
logo: logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName }),
|
|
60
|
+
children: /* @__PURE__ */ jsx(ForgotPasswordForm, {
|
|
61
|
+
onSubmit: handleSubmit,
|
|
62
|
+
onBackToLoginClick: handleBackToLoginClick,
|
|
63
|
+
error
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function DefaultLogo({ brandName }) {
|
|
68
|
+
return /* @__PURE__ */ jsx("div", {
|
|
69
|
+
className: "text-center",
|
|
70
|
+
children: /* @__PURE__ */ jsx("h1", {
|
|
71
|
+
className: "text-xl font-bold",
|
|
72
|
+
children: brandName
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
var forgot_password_page_default = ForgotPasswordPage;
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
export { ForgotPasswordPage, forgot_password_page_default as default };
|
|
80
|
+
//# sourceMappingURL=forgot-password-page.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgot-password-page.mjs","names":["React"],"sources":["../../../../src/client/views/pages/forgot-password-page.tsx"],"sourcesContent":["/**\n * Forgot Password Page\n *\n * Default forgot password page that uses AuthLayout and ForgotPasswordForm.\n * Integrates with authClient from AdminProvider context.\n */\n\nimport * as React from \"react\";\nimport { useAuthClient } from \"../../hooks/use-auth\";\nimport {\n selectBasePath,\n selectBrandName,\n selectNavigate,\n useAdminStore,\n} from \"../../runtime/provider\";\nimport { AuthLayout } from \"../auth/auth-layout\";\nimport {\n ForgotPasswordForm,\n type ForgotPasswordFormValues,\n} from \"../auth/forgot-password-form\";\n\nexport interface ForgotPasswordPageProps {\n /**\n * Title shown on the page\n * @default \"Forgot password\"\n */\n title?: string;\n\n /**\n * Description shown below the title\n * @default \"Enter your email to receive a password reset link\"\n */\n description?: string;\n\n /**\n * Logo component to show above the form\n */\n logo?: React.ReactNode;\n\n /**\n * Path to login page\n * @default \"{basePath}/login\"\n */\n loginPath?: string;\n\n /**\n * URL to redirect to after password reset (included in email)\n * @default \"{window.origin}{basePath}/reset-password\"\n */\n resetPasswordRedirectUrl?: string;\n}\n\n/**\n * Default forgot password page component.\n *\n * Uses authClient from AdminProvider to handle password reset requests.\n *\n * @example\n * ```tsx\n * // In your admin config\n * const admin = qa<AppCMS>()\n * .use(coreAdminModule)\n * .pages({\n * forgotPassword: page(\"forgot-password\", { component: ForgotPasswordPage })\n * .path(\"/forgot-password\"),\n * })\n * ```\n */\nexport function ForgotPasswordPage({\n title = \"Forgot password\",\n description = \"Enter your email to receive a password reset link\",\n logo,\n loginPath,\n resetPasswordRedirectUrl,\n}: ForgotPasswordPageProps) {\n const authClient = useAuthClient();\n const navigate = useAdminStore(selectNavigate);\n const basePath = useAdminStore(selectBasePath);\n const brandName = useAdminStore(selectBrandName);\n\n const [error, setError] = React.useState<string | null>(null);\n\n const handleSubmit = async (values: ForgotPasswordFormValues) => {\n setError(null);\n\n try {\n const redirectUrl =\n resetPasswordRedirectUrl ??\n `${typeof window !== \"undefined\" ? window.location.origin : \"\"}${basePath}/reset-password`;\n\n const result = await authClient.forgetPassword({\n email: values.email,\n redirectTo: redirectUrl,\n });\n\n if (result.error) {\n setError(result.error.message || \"Failed to send reset email\");\n return;\n }\n\n // Success is handled by the form (shows success message)\n } catch (err) {\n setError(err instanceof Error ? err.message : \"An error occurred\");\n }\n };\n\n const handleBackToLoginClick = () => {\n navigate(loginPath ?? `${basePath}/login`);\n };\n\n return (\n <AuthLayout\n title={title}\n description={description}\n logo={logo ?? <DefaultLogo brandName={brandName} />}\n >\n <ForgotPasswordForm\n onSubmit={handleSubmit}\n onBackToLoginClick={handleBackToLoginClick}\n error={error}\n />\n </AuthLayout>\n );\n}\n\nfunction DefaultLogo({ brandName }: { brandName: string }) {\n return (\n <div className=\"text-center\">\n <h1 className=\"text-xl font-bold\">{brandName}</h1>\n </div>\n );\n}\n\nexport default ForgotPasswordPage;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEA,SAAgB,mBAAmB,EACjC,QAAQ,mBACR,cAAc,qDACd,MACA,WACA,4BAC0B;CAC1B,MAAM,aAAa,eAAe;CAClC,MAAM,WAAW,cAAc,eAAe;CAC9C,MAAM,WAAW,cAAc,eAAe;CAC9C,MAAM,YAAY,cAAc,gBAAgB;CAEhD,MAAM,CAAC,OAAO,YAAYA,QAAM,SAAwB,KAAK;CAE7D,MAAM,eAAe,OAAO,WAAqC;AAC/D,WAAS,KAAK;AAEd,MAAI;GACF,MAAM,cACJ,4BACA,GAAG,OAAO,WAAW,cAAc,OAAO,SAAS,SAAS,KAAK,SAAS;GAE5E,MAAM,SAAS,MAAM,WAAW,eAAe;IAC7C,OAAO,OAAO;IACd,YAAY;IACb,CAAC;AAEF,OAAI,OAAO,OAAO;AAChB,aAAS,OAAO,MAAM,WAAW,6BAA6B;AAC9D;;WAIK,KAAK;AACZ,YAAS,eAAe,QAAQ,IAAI,UAAU,oBAAoB;;;CAItE,MAAM,+BAA+B;AACnC,WAAS,aAAa,GAAG,SAAS,QAAQ;;AAG5C,QACE,oBAAC;EACQ;EACM;EACb,MAAM,QAAQ,oBAAC,eAAuB,YAAa;YAEnD,oBAAC;GACC,UAAU;GACV,oBAAoB;GACb;IACP;GACS;;AAIjB,SAAS,YAAY,EAAE,aAAoC;AACzD,QACE,oBAAC;EAAI,WAAU;YACb,oBAAC;GAAG,WAAU;aAAqB;IAAe;GAC9C;;AAIV,mCAAe"}
|