@questpie/admin 1.1.0 → 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-B7r47hEd.d.mts +0 -13403
- package/dist/client-B7r47hEd.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-BYyqkWtn.d.mts +0 -2753
- package/dist/index-BYyqkWtn.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,59 @@
|
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/client/views/auth/forgot-password-form.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Forgot Password Form - request password reset email
|
|
6
|
+
*/
|
|
7
|
+
type ForgotPasswordFormValues = {
|
|
8
|
+
email: string;
|
|
9
|
+
};
|
|
10
|
+
type ForgotPasswordFormProps = {
|
|
11
|
+
/** Called when form is submitted with valid data */
|
|
12
|
+
onSubmit: (values: ForgotPasswordFormValues) => Promise<void>;
|
|
13
|
+
/** Called when back to login link is clicked */
|
|
14
|
+
onBackToLoginClick?: () => void;
|
|
15
|
+
/** Default values */
|
|
16
|
+
defaultValues?: Partial<ForgotPasswordFormValues>;
|
|
17
|
+
/** Additional class name */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Error message from auth */
|
|
20
|
+
error?: string | null;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Forgot password form with email field
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* const authClient = createAdminAuthClient<typeof cms>({ baseURL: '...' })
|
|
28
|
+
*
|
|
29
|
+
* function ForgotPasswordPage() {
|
|
30
|
+
* const [error, setError] = useState<string | null>(null)
|
|
31
|
+
*
|
|
32
|
+
* const handleSubmit = async (values: ForgotPasswordFormValues) => {
|
|
33
|
+
* const result = await authClient.forgetPassword({
|
|
34
|
+
* email: values.email,
|
|
35
|
+
* redirectTo: '/reset-password',
|
|
36
|
+
* })
|
|
37
|
+
* if (result.error) {
|
|
38
|
+
* setError(result.error.message)
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
*
|
|
42
|
+
* return (
|
|
43
|
+
* <AuthLayout title="Forgot password">
|
|
44
|
+
* <ForgotPasswordForm onSubmit={handleSubmit} error={error} />
|
|
45
|
+
* </AuthLayout>
|
|
46
|
+
* )
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function ForgotPasswordForm({
|
|
51
|
+
onSubmit,
|
|
52
|
+
onBackToLoginClick,
|
|
53
|
+
defaultValues,
|
|
54
|
+
className,
|
|
55
|
+
error
|
|
56
|
+
}: ForgotPasswordFormProps): react_jsx_runtime3.JSX.Element;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { ForgotPasswordForm, ForgotPasswordFormProps, ForgotPasswordFormValues };
|
|
59
|
+
//# sourceMappingURL=forgot-password-form.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgot-password-form.d.mts","names":[],"sources":["../../../../src/client/views/auth/forgot-password-form.tsx"],"sourcesContent":[],"mappings":";;;;;;AAmBY,KAAA,wBAAA,GAAwB;EAIxB,KAAA,EAAA,MAAA;CAES;AAA6B,KAFtC,uBAAA,GAEsC;EAIxB;EAAR,QAAA,EAAA,CAAA,MAAA,EAJG,wBAIH,EAAA,GAJgC,OAIhC,CAAA,IAAA,CAAA;EAAO;EAmCT,kBAAA,CAAA,EAAkB,GAAA,GAAA,IAAA;EAChC;EACA,aAAA,CAAA,EArCgB,OAqChB,CArCwB,wBAqCxB,CAAA;EACA;EACA,SAAA,CAAA,EAAA,MAAA;EACA;EACC,KAAA,CAAA,EAAA,MAAA,GAAA,IAAA;CAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBANV,kBAAA;;;;;;GAMb,0BAAuB,kBAAA,CAAA,GAAA,CAAA"}
|
package/dist/{forgot-password-page-Bcp-An4Y.mjs → client/views/auth/forgot-password-form.mjs}
RENAMED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { cn } from "../../lib/utils.mjs";
|
|
2
|
+
import { Button } from "../../components/ui/button.mjs";
|
|
3
|
+
import { Input } from "../../components/ui/input.mjs";
|
|
4
|
+
import { Field, FieldContent, FieldError, FieldGroup, FieldLabel } from "../../components/ui/field.mjs";
|
|
5
|
+
import { Alert, AlertDescription } from "../../components/ui/alert.mjs";
|
|
6
|
+
import { Icon } from "@iconify/react";
|
|
5
7
|
import * as React$1 from "react";
|
|
6
8
|
import { useForm } from "react-hook-form";
|
|
7
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -45,17 +47,19 @@ function ForgotPasswordForm({ onSubmit, onBackToLoginClick, defaultValues, class
|
|
|
45
47
|
...defaultValues
|
|
46
48
|
} });
|
|
47
49
|
const handleFormSubmit = handleSubmit(async (values) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
try {
|
|
51
|
+
await onSubmit(values);
|
|
52
|
+
setIsSuccess(true);
|
|
53
|
+
} catch {}
|
|
50
54
|
});
|
|
51
55
|
if (isSuccess) return /* @__PURE__ */ jsxs("div", {
|
|
52
56
|
className: cn("space-y-4 text-center", className),
|
|
53
57
|
children: [
|
|
54
58
|
/* @__PURE__ */ jsx("div", {
|
|
55
59
|
className: "bg-primary/10 mx-auto flex size-12 items-center justify-center",
|
|
56
|
-
children: /* @__PURE__ */ jsx(
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
61
|
+
icon: "ph:check-circle-duotone",
|
|
62
|
+
className: "text-primary size-6"
|
|
59
63
|
})
|
|
60
64
|
}),
|
|
61
65
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -92,9 +96,9 @@ function ForgotPasswordForm({ onSubmit, onBackToLoginClick, defaultValues, class
|
|
|
92
96
|
children: "Email"
|
|
93
97
|
}), /* @__PURE__ */ jsxs(FieldContent, { children: [/* @__PURE__ */ jsxs("div", {
|
|
94
98
|
className: "relative",
|
|
95
|
-
children: [/* @__PURE__ */ jsx(
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
100
|
+
icon: "ph:envelope-duotone",
|
|
101
|
+
className: "text-muted-foreground absolute left-2 top-1/2 size-4 -translate-y-1/2"
|
|
98
102
|
}), /* @__PURE__ */ jsx(Input, {
|
|
99
103
|
id: "email",
|
|
100
104
|
type: "email",
|
|
@@ -114,16 +118,16 @@ function ForgotPasswordForm({ onSubmit, onBackToLoginClick, defaultValues, class
|
|
|
114
118
|
}) }),
|
|
115
119
|
error && /* @__PURE__ */ jsxs(Alert, {
|
|
116
120
|
variant: "destructive",
|
|
117
|
-
children: [/* @__PURE__ */ jsx(
|
|
121
|
+
children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:warning-circle" }), /* @__PURE__ */ jsx(AlertDescription, { children: error })]
|
|
118
122
|
}),
|
|
119
123
|
/* @__PURE__ */ jsx(Button, {
|
|
120
124
|
type: "submit",
|
|
121
125
|
className: "w-full",
|
|
122
126
|
size: "lg",
|
|
123
127
|
disabled: isSubmitting,
|
|
124
|
-
children: isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
children: isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Icon, {
|
|
129
|
+
icon: "ph:spinner-gap-bold",
|
|
130
|
+
className: "animate-spin"
|
|
127
131
|
}), "Sending..."] }) : "Send reset link"
|
|
128
132
|
}),
|
|
129
133
|
/* @__PURE__ */ jsxs("p", {
|
|
@@ -146,76 +150,5 @@ function ForgotPasswordForm({ onSubmit, onBackToLoginClick, defaultValues, class
|
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
//#endregion
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
* Forgot Password Page
|
|
152
|
-
*
|
|
153
|
-
* Default forgot password page that uses AuthLayout and ForgotPasswordForm.
|
|
154
|
-
* Integrates with authClient from AdminProvider context.
|
|
155
|
-
*/
|
|
156
|
-
/**
|
|
157
|
-
* Default forgot password page component.
|
|
158
|
-
*
|
|
159
|
-
* Uses authClient from AdminProvider to handle password reset requests.
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* ```tsx
|
|
163
|
-
* // In your admin config
|
|
164
|
-
* const admin = qa<AppCMS>()
|
|
165
|
-
* .use(coreAdminModule)
|
|
166
|
-
* .pages({
|
|
167
|
-
* forgotPassword: page("forgot-password", { component: ForgotPasswordPage })
|
|
168
|
-
* .path("/forgot-password"),
|
|
169
|
-
* })
|
|
170
|
-
* ```
|
|
171
|
-
*/
|
|
172
|
-
function ForgotPasswordPage({ title = "Forgot password", description = "Enter your email to receive a password reset link", logo, loginPath, resetPasswordRedirectUrl }) {
|
|
173
|
-
const authClient = useAuthClient();
|
|
174
|
-
const navigate = useAdminStore(selectNavigate);
|
|
175
|
-
const basePath = useAdminStore(selectBasePath);
|
|
176
|
-
const brandName = useAdminStore(selectBrandName);
|
|
177
|
-
const [error, setError] = React$1.useState(null);
|
|
178
|
-
const handleSubmit = async (values) => {
|
|
179
|
-
setError(null);
|
|
180
|
-
try {
|
|
181
|
-
const redirectUrl = resetPasswordRedirectUrl ?? `${typeof window !== "undefined" ? window.location.origin : ""}${basePath}/reset-password`;
|
|
182
|
-
const result = await authClient.forgetPassword({
|
|
183
|
-
email: values.email,
|
|
184
|
-
redirectTo: redirectUrl
|
|
185
|
-
});
|
|
186
|
-
if (result.error) {
|
|
187
|
-
setError(result.error.message || "Failed to send reset email");
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
} catch (err) {
|
|
191
|
-
setError(err instanceof Error ? err.message : "An error occurred");
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
const handleBackToLoginClick = () => {
|
|
195
|
-
navigate(loginPath ?? `${basePath}/login`);
|
|
196
|
-
};
|
|
197
|
-
return /* @__PURE__ */ jsx(AuthLayout, {
|
|
198
|
-
title,
|
|
199
|
-
description,
|
|
200
|
-
logo: logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName }),
|
|
201
|
-
children: /* @__PURE__ */ jsx(ForgotPasswordForm, {
|
|
202
|
-
onSubmit: handleSubmit,
|
|
203
|
-
onBackToLoginClick: handleBackToLoginClick,
|
|
204
|
-
error
|
|
205
|
-
})
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
function DefaultLogo({ brandName }) {
|
|
209
|
-
return /* @__PURE__ */ jsx("div", {
|
|
210
|
-
className: "text-center",
|
|
211
|
-
children: /* @__PURE__ */ jsx("h1", {
|
|
212
|
-
className: "text-xl font-bold",
|
|
213
|
-
children: brandName
|
|
214
|
-
})
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
var forgot_password_page_default = ForgotPasswordPage;
|
|
218
|
-
|
|
219
|
-
//#endregion
|
|
220
|
-
export { forgot_password_page_default as n, ForgotPasswordForm as r, ForgotPasswordPage as t };
|
|
221
|
-
//# sourceMappingURL=forgot-password-page-Bcp-An4Y.mjs.map
|
|
153
|
+
export { ForgotPasswordForm };
|
|
154
|
+
//# sourceMappingURL=forgot-password-form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgot-password-form.mjs","names":["React"],"sources":["../../../../src/client/views/auth/forgot-password-form.tsx"],"sourcesContent":["/**\n * Forgot Password Form - request password reset email\n */\n\nimport { Icon } from \"@iconify/react\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { Alert, AlertDescription } from \"../../components/ui/alert\";\nimport { Button } from \"../../components/ui/button\";\nimport {\n Field,\n FieldContent,\n FieldError,\n FieldGroup,\n FieldLabel,\n} from \"../../components/ui/field\";\nimport { Input } from \"../../components/ui/input\";\nimport { cn } from \"../../lib/utils\";\n\nexport type ForgotPasswordFormValues = {\n email: string;\n};\n\nexport type ForgotPasswordFormProps = {\n /** Called when form is submitted with valid data */\n onSubmit: (values: ForgotPasswordFormValues) => Promise<void>;\n /** Called when back to login link is clicked */\n onBackToLoginClick?: () => void;\n /** Default values */\n defaultValues?: Partial<ForgotPasswordFormValues>;\n /** Additional class name */\n className?: string;\n /** Error message from auth */\n error?: string | null;\n};\n\n/**\n * Forgot password form with email field\n *\n * @example\n * ```tsx\n * const authClient = createAdminAuthClient<typeof cms>({ baseURL: '...' })\n *\n * function ForgotPasswordPage() {\n * const [error, setError] = useState<string | null>(null)\n *\n * const handleSubmit = async (values: ForgotPasswordFormValues) => {\n * const result = await authClient.forgetPassword({\n * email: values.email,\n * redirectTo: '/reset-password',\n * })\n * if (result.error) {\n * setError(result.error.message)\n * }\n * }\n *\n * return (\n * <AuthLayout title=\"Forgot password\">\n * <ForgotPasswordForm onSubmit={handleSubmit} error={error} />\n * </AuthLayout>\n * )\n * }\n * ```\n */\nexport function ForgotPasswordForm({\n onSubmit,\n onBackToLoginClick,\n defaultValues,\n className,\n error,\n}: ForgotPasswordFormProps) {\n const [isSuccess, setIsSuccess] = React.useState(false);\n\n const {\n register,\n handleSubmit,\n formState: { errors, isSubmitting },\n } = useForm<ForgotPasswordFormValues>({\n defaultValues: {\n email: \"\",\n ...defaultValues,\n },\n });\n\n const handleFormSubmit = handleSubmit(async (values) => {\n try {\n await onSubmit(values);\n // Only set success if no error was thrown\n // The parent component should throw or not set error prop before this resolves\n setIsSuccess(true);\n } catch {\n // Error will be shown via the error prop from parent\n // Do not set success state on error\n }\n });\n\n // Success state\n if (isSuccess) {\n return (\n <div className={cn(\"space-y-4 text-center\", className)}>\n <div className=\"bg-primary/10 mx-auto flex size-12 items-center justify-center\">\n <Icon\n icon=\"ph:check-circle-duotone\"\n className=\"text-primary size-6\"\n />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-sm font-medium\">Check your email</h3>\n <p className=\"text-muted-foreground text-xs\">\n We've sent a password reset link to your email address. Please check\n your inbox and follow the instructions.\n </p>\n </div>\n <Button\n type=\"button\"\n variant=\"outline\"\n className=\"w-full\"\n onClick={onBackToLoginClick}\n >\n Back to login\n </Button>\n </div>\n );\n }\n\n return (\n <form onSubmit={handleFormSubmit} className={cn(\"space-y-4\", className)}>\n <p className=\"text-muted-foreground text-xs\">\n Enter your email address and we'll send you a link to reset your\n password.\n </p>\n\n <FieldGroup>\n {/* Email Field */}\n <Field data-invalid={!!errors.email}>\n <FieldLabel htmlFor=\"email\">Email</FieldLabel>\n <FieldContent>\n <div className=\"relative\">\n <Icon\n icon=\"ph:envelope-duotone\"\n className=\"text-muted-foreground absolute left-2 top-1/2 size-4 -translate-y-1/2\"\n />\n <Input\n id=\"email\"\n type=\"email\"\n placeholder=\"you@example.com\"\n className=\"pl-8\"\n autoComplete=\"email\"\n aria-invalid={!!errors.email}\n {...register(\"email\", {\n required: \"Email is required\",\n pattern: {\n value: /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/,\n message: \"Invalid email address\",\n },\n })}\n />\n </div>\n <FieldError>{errors.email?.message}</FieldError>\n </FieldContent>\n </Field>\n </FieldGroup>\n\n {/* Error Message */}\n {error && (\n <Alert variant=\"destructive\">\n <Icon icon=\"ph:warning-circle\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n )}\n\n {/* Submit Button */}\n <Button\n type=\"submit\"\n className=\"w-full\"\n size=\"lg\"\n disabled={isSubmitting}\n >\n {isSubmitting ? (\n <>\n <Icon icon=\"ph:spinner-gap-bold\" className=\"animate-spin\" />\n Sending...\n </>\n ) : (\n \"Send reset link\"\n )}\n </Button>\n\n {/* Back to Login Link */}\n <p className=\"text-muted-foreground text-center text-xs\">\n Remember your password?{\" \"}\n <Button\n type=\"button\"\n variant=\"link\"\n size=\"sm\"\n onClick={onBackToLoginClick}\n className=\"h-auto p-0 text-xs\"\n >\n Back to login\n </Button>\n </p>\n </form>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,SAAgB,mBAAmB,EACjC,UACA,oBACA,eACA,WACA,SAC0B;CAC1B,MAAM,CAAC,WAAW,gBAAgBA,QAAM,SAAS,MAAM;CAEvD,MAAM,EACJ,UACA,cACA,WAAW,EAAE,QAAQ,mBACnB,QAAkC,EACpC,eAAe;EACb,OAAO;EACP,GAAG;EACJ,EACF,CAAC;CAEF,MAAM,mBAAmB,aAAa,OAAO,WAAW;AACtD,MAAI;AACF,SAAM,SAAS,OAAO;AAGtB,gBAAa,KAAK;UACZ;GAIR;AAGF,KAAI,UACF,QACE,qBAAC;EAAI,WAAW,GAAG,yBAAyB,UAAU;;GACpD,oBAAC;IAAI,WAAU;cACb,oBAAC;KACC,MAAK;KACL,WAAU;MACV;KACE;GACN,qBAAC;IAAI,WAAU;eACb,oBAAC;KAAG,WAAU;eAAsB;MAAqB,EACzD,oBAAC;KAAE,WAAU;eAAgC;MAGzC;KACA;GACN,oBAAC;IACC,MAAK;IACL,SAAQ;IACR,WAAU;IACV,SAAS;cACV;KAEQ;;GACL;AAIV,QACE,qBAAC;EAAK,UAAU;EAAkB,WAAW,GAAG,aAAa,UAAU;;GACrE,oBAAC;IAAE,WAAU;cAAgC;KAGzC;GAEJ,oBAAC,wBAEC,qBAAC;IAAM,gBAAc,CAAC,CAAC,OAAO;eAC5B,oBAAC;KAAW,SAAQ;eAAQ;MAAkB,EAC9C,qBAAC,2BACC,qBAAC;KAAI,WAAU;gBACb,oBAAC;MACC,MAAK;MACL,WAAU;OACV,EACF,oBAAC;MACC,IAAG;MACH,MAAK;MACL,aAAY;MACZ,WAAU;MACV,cAAa;MACb,gBAAc,CAAC,CAAC,OAAO;MACvB,GAAI,SAAS,SAAS;OACpB,UAAU;OACV,SAAS;QACP,OAAO;QACP,SAAS;QACV;OACF,CAAC;OACF;MACE,EACN,oBAAC,wBAAY,OAAO,OAAO,UAAqB,IACnC;KACT,GACG;GAGZ,SACC,qBAAC;IAAM,SAAQ;eACb,oBAAC,QAAK,MAAK,sBAAsB,EACjC,oBAAC,8BAAkB,QAAyB;KACtC;GAIV,oBAAC;IACC,MAAK;IACL,WAAU;IACV,MAAK;IACL,UAAU;cAET,eACC,4CACE,oBAAC;KAAK,MAAK;KAAsB,WAAU;MAAiB,kBAE3D,GAEH;KAEK;GAGT,qBAAC;IAAE,WAAU;;KAA4C;KAC/B;KACxB,oBAAC;MACC,MAAK;MACL,SAAQ;MACR,MAAK;MACL,SAAS;MACT,WAAU;gBACX;OAEQ;;KACP;;GACC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AuthLayout, AuthLayoutProps } from "./auth-layout.mjs";
|
|
2
|
+
import { LoginForm, LoginFormProps, LoginFormValues } from "./login-form.mjs";
|
|
3
|
+
import { ForgotPasswordForm, ForgotPasswordFormProps, ForgotPasswordFormValues } from "./forgot-password-form.mjs";
|
|
4
|
+
import { ResetPasswordForm, ResetPasswordFormProps, ResetPasswordFormValues } from "./reset-password-form.mjs";
|
|
5
|
+
import "./invite-form.mjs";
|
|
6
|
+
import { AcceptInviteForm, AcceptInviteFormProps, AcceptInviteFormValues } from "./accept-invite-form.mjs";
|
|
7
|
+
import { SetupForm, SetupFormProps, SetupFormValues } from "./setup-form.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { useResolveText } from "../../i18n/hooks.mjs";
|
|
2
|
+
import { cn } from "../../lib/utils.mjs";
|
|
3
|
+
import { Button } from "../../components/ui/button.mjs";
|
|
4
|
+
import { Input } from "../../components/ui/input.mjs";
|
|
5
|
+
import { Textarea } from "../../components/ui/textarea.mjs";
|
|
6
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../components/ui/select.mjs";
|
|
7
|
+
import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel } from "../../components/ui/field.mjs";
|
|
8
|
+
import { Alert, AlertDescription } from "../../components/ui/alert.mjs";
|
|
9
|
+
import { Icon } from "@iconify/react";
|
|
10
|
+
import "react";
|
|
11
|
+
import { useForm } from "react-hook-form";
|
|
12
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
|
|
14
|
+
//#region src/client/views/auth/invite-form.tsx
|
|
15
|
+
/**
|
|
16
|
+
* Invite Form - invite new users to the admin
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Invite form for admins to invite new users
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* function InvitePage() {
|
|
24
|
+
* const authClient = useAuthClient()
|
|
25
|
+
* const [error, setError] = useState<string | null>(null)
|
|
26
|
+
* const [success, setSuccess] = useState<string | null>(null)
|
|
27
|
+
*
|
|
28
|
+
* const handleInvite = async (values: InviteFormValues) => {
|
|
29
|
+
* const result = await authClient.admin.createInvitation({
|
|
30
|
+
* email: values.email,
|
|
31
|
+
* role: values.role,
|
|
32
|
+
* })
|
|
33
|
+
* if (result.error) {
|
|
34
|
+
* setError(result.error.message)
|
|
35
|
+
* } else {
|
|
36
|
+
* setSuccess(`Invitation sent to ${values.email}`)
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
*
|
|
40
|
+
* return (
|
|
41
|
+
* <InviteForm
|
|
42
|
+
* onSubmit={handleInvite}
|
|
43
|
+
* error={error}
|
|
44
|
+
* success={success}
|
|
45
|
+
* />
|
|
46
|
+
* )
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
function InviteForm({ onSubmit, roles = [{
|
|
51
|
+
value: "admin",
|
|
52
|
+
label: "Admin"
|
|
53
|
+
}, {
|
|
54
|
+
value: "user",
|
|
55
|
+
label: "User"
|
|
56
|
+
}], defaultRole = "user", showMessage = true, className, error, success }) {
|
|
57
|
+
const { register, handleSubmit, setValue, watch, reset, formState: { errors, isSubmitting } } = useForm({ defaultValues: {
|
|
58
|
+
email: "",
|
|
59
|
+
role: defaultRole,
|
|
60
|
+
message: ""
|
|
61
|
+
} });
|
|
62
|
+
const selectedRole = watch("role");
|
|
63
|
+
const resolveText = useResolveText();
|
|
64
|
+
return /* @__PURE__ */ jsxs("form", {
|
|
65
|
+
onSubmit: handleSubmit(async (values) => {
|
|
66
|
+
await onSubmit(values);
|
|
67
|
+
if (!error) reset();
|
|
68
|
+
}),
|
|
69
|
+
className: cn("space-y-4", className),
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsxs(FieldGroup, { children: [
|
|
72
|
+
/* @__PURE__ */ jsxs(Field, {
|
|
73
|
+
"data-invalid": !!errors.email,
|
|
74
|
+
children: [/* @__PURE__ */ jsx(FieldLabel, {
|
|
75
|
+
htmlFor: "invite-email",
|
|
76
|
+
children: "Email Address"
|
|
77
|
+
}), /* @__PURE__ */ jsxs(FieldContent, { children: [
|
|
78
|
+
/* @__PURE__ */ jsxs("div", {
|
|
79
|
+
className: "relative",
|
|
80
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
81
|
+
icon: "ph:envelope-duotone",
|
|
82
|
+
className: "text-muted-foreground absolute left-2 top-1/2 size-4 -translate-y-1/2"
|
|
83
|
+
}), /* @__PURE__ */ jsx(Input, {
|
|
84
|
+
id: "invite-email",
|
|
85
|
+
type: "email",
|
|
86
|
+
placeholder: "user@example.com",
|
|
87
|
+
className: "pl-8",
|
|
88
|
+
autoComplete: "email",
|
|
89
|
+
"aria-invalid": !!errors.email,
|
|
90
|
+
...register("email", {
|
|
91
|
+
required: "Email is required",
|
|
92
|
+
pattern: {
|
|
93
|
+
value: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
|
|
94
|
+
message: "Invalid email address"
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
})]
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ jsx(FieldDescription, { children: "An invitation link will be sent to this email" }),
|
|
100
|
+
/* @__PURE__ */ jsx(FieldError, { children: errors.email?.message })
|
|
101
|
+
] })]
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ jsxs(Field, {
|
|
104
|
+
"data-invalid": !!errors.role,
|
|
105
|
+
children: [/* @__PURE__ */ jsx(FieldLabel, {
|
|
106
|
+
htmlFor: "invite-role",
|
|
107
|
+
children: "Role"
|
|
108
|
+
}), /* @__PURE__ */ jsxs(FieldContent, { children: [
|
|
109
|
+
/* @__PURE__ */ jsxs(Select, {
|
|
110
|
+
value: selectedRole,
|
|
111
|
+
onValueChange: (value) => value && setValue("role", value),
|
|
112
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
113
|
+
id: "invite-role",
|
|
114
|
+
children: /* @__PURE__ */ jsx(SelectValue, { children: roles.find((r) => r.value === selectedRole)?.label ? resolveText(roles.find((r) => r.value === selectedRole)?.label) : "Select a role" })
|
|
115
|
+
}), /* @__PURE__ */ jsx(SelectContent, { children: roles.map((role) => /* @__PURE__ */ jsx(SelectItem, {
|
|
116
|
+
value: role.value,
|
|
117
|
+
children: resolveText(role.label)
|
|
118
|
+
}, role.value)) })]
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ jsx(FieldDescription, { children: "The role determines what permissions the user will have" }),
|
|
121
|
+
/* @__PURE__ */ jsx(FieldError, { children: errors.role?.message })
|
|
122
|
+
] })]
|
|
123
|
+
}),
|
|
124
|
+
showMessage && /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, {
|
|
125
|
+
htmlFor: "invite-message",
|
|
126
|
+
children: "Personal Message (Optional)"
|
|
127
|
+
}), /* @__PURE__ */ jsxs(FieldContent, { children: [/* @__PURE__ */ jsx(Textarea, {
|
|
128
|
+
id: "invite-message",
|
|
129
|
+
placeholder: "Add a personal message to the invitation...",
|
|
130
|
+
rows: 3,
|
|
131
|
+
...register("message")
|
|
132
|
+
}), /* @__PURE__ */ jsx(FieldDescription, { children: "This message will be included in the invitation email" })] })] })
|
|
133
|
+
] }),
|
|
134
|
+
error && /* @__PURE__ */ jsxs(Alert, {
|
|
135
|
+
variant: "destructive",
|
|
136
|
+
children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:warning-circle" }), /* @__PURE__ */ jsx(AlertDescription, { children: error })]
|
|
137
|
+
}),
|
|
138
|
+
success && /* @__PURE__ */ jsxs(Alert, { children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:user-plus" }), /* @__PURE__ */ jsx(AlertDescription, { children: success })] }),
|
|
139
|
+
/* @__PURE__ */ jsx(Button, {
|
|
140
|
+
type: "submit",
|
|
141
|
+
className: "w-full",
|
|
142
|
+
size: "lg",
|
|
143
|
+
disabled: isSubmitting,
|
|
144
|
+
children: isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Icon, {
|
|
145
|
+
icon: "ph:spinner-gap-bold",
|
|
146
|
+
className: "animate-spin"
|
|
147
|
+
}), "Sending invitation..."] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:user-plus-bold" }), "Send Invitation"] })
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
//#endregion
|
|
154
|
+
export { InviteForm };
|
|
155
|
+
//# sourceMappingURL=invite-form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invite-form.mjs","names":[],"sources":["../../../../src/client/views/auth/invite-form.tsx"],"sourcesContent":["/**\n * Invite Form - invite new users to the admin\n */\n\nimport { Icon } from \"@iconify/react\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { Alert, AlertDescription } from \"../../components/ui/alert\";\nimport { Button } from \"../../components/ui/button\";\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n} from \"../../components/ui/field\";\nimport { Input } from \"../../components/ui/input\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"../../components/ui/select\";\nimport { Textarea } from \"../../components/ui/textarea\";\nimport { useResolveText } from \"../../i18n/hooks\";\nimport { cn } from \"../../lib/utils\";\n\nexport type InviteFormValues = {\n email: string;\n role: string;\n message?: string;\n};\n\nexport type InviteFormProps = {\n /** Called when form is submitted with valid data */\n onSubmit: (values: InviteFormValues) => Promise<void>;\n /** Available roles for selection */\n roles?: Array<{ value: string; label: string }>;\n /** Default role */\n defaultRole?: string;\n /** Show custom message field */\n showMessage?: boolean;\n /** Additional class name */\n className?: string;\n /** Error message from auth */\n error?: string | null;\n /** Success message after invite sent */\n success?: string | null;\n};\n\n/**\n * Invite form for admins to invite new users\n *\n * @example\n * ```tsx\n * function InvitePage() {\n * const authClient = useAuthClient()\n * const [error, setError] = useState<string | null>(null)\n * const [success, setSuccess] = useState<string | null>(null)\n *\n * const handleInvite = async (values: InviteFormValues) => {\n * const result = await authClient.admin.createInvitation({\n * email: values.email,\n * role: values.role,\n * })\n * if (result.error) {\n * setError(result.error.message)\n * } else {\n * setSuccess(`Invitation sent to ${values.email}`)\n * }\n * }\n *\n * return (\n * <InviteForm\n * onSubmit={handleInvite}\n * error={error}\n * success={success}\n * />\n * )\n * }\n * ```\n */\nexport function InviteForm({\n onSubmit,\n roles = [\n { value: \"admin\", label: \"Admin\" },\n { value: \"user\", label: \"User\" },\n ],\n defaultRole = \"user\",\n showMessage = true,\n className,\n error,\n success,\n}: InviteFormProps) {\n const {\n register,\n handleSubmit,\n setValue,\n watch,\n reset,\n formState: { errors, isSubmitting },\n } = useForm<InviteFormValues>({\n defaultValues: {\n email: \"\",\n role: defaultRole,\n message: \"\",\n },\n });\n\n const selectedRole = watch(\"role\");\n const resolveText = useResolveText();\n\n const handleFormSubmit = handleSubmit(async (values) => {\n await onSubmit(values);\n // Reset form on success\n if (!error) {\n reset();\n }\n });\n\n return (\n <form onSubmit={handleFormSubmit} className={cn(\"space-y-4\", className)}>\n <FieldGroup>\n {/* Email Field */}\n <Field data-invalid={!!errors.email}>\n <FieldLabel htmlFor=\"invite-email\">Email Address</FieldLabel>\n <FieldContent>\n <div className=\"relative\">\n <Icon\n icon=\"ph:envelope-duotone\"\n className=\"text-muted-foreground absolute left-2 top-1/2 size-4 -translate-y-1/2\"\n />\n <Input\n id=\"invite-email\"\n type=\"email\"\n placeholder=\"user@example.com\"\n className=\"pl-8\"\n autoComplete=\"email\"\n aria-invalid={!!errors.email}\n {...register(\"email\", {\n required: \"Email is required\",\n pattern: {\n value: /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/,\n message: \"Invalid email address\",\n },\n })}\n />\n </div>\n <FieldDescription>\n An invitation link will be sent to this email\n </FieldDescription>\n <FieldError>{errors.email?.message}</FieldError>\n </FieldContent>\n </Field>\n\n {/* Role Field */}\n <Field data-invalid={!!errors.role}>\n <FieldLabel htmlFor=\"invite-role\">Role</FieldLabel>\n <FieldContent>\n <Select\n value={selectedRole}\n onValueChange={(value) => value && setValue(\"role\", value)}\n >\n <SelectTrigger id=\"invite-role\">\n <SelectValue>\n {roles.find((r) => r.value === selectedRole)?.label\n ? resolveText(\n roles.find((r) => r.value === selectedRole)?.label,\n )\n : \"Select a role\"}\n </SelectValue>\n </SelectTrigger>\n <SelectContent>\n {roles.map((role) => (\n <SelectItem key={role.value} value={role.value}>\n {resolveText(role.label)}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <FieldDescription>\n The role determines what permissions the user will have\n </FieldDescription>\n <FieldError>{errors.role?.message}</FieldError>\n </FieldContent>\n </Field>\n\n {/* Optional Message Field */}\n {showMessage && (\n <Field>\n <FieldLabel htmlFor=\"invite-message\">\n Personal Message (Optional)\n </FieldLabel>\n <FieldContent>\n <Textarea\n id=\"invite-message\"\n placeholder=\"Add a personal message to the invitation...\"\n rows={3}\n {...register(\"message\")}\n />\n <FieldDescription>\n This message will be included in the invitation email\n </FieldDescription>\n </FieldContent>\n </Field>\n )}\n </FieldGroup>\n\n {/* Error Message */}\n {error && (\n <Alert variant=\"destructive\">\n <Icon icon=\"ph:warning-circle\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n )}\n\n {/* Success Message */}\n {success && (\n <Alert>\n <Icon icon=\"ph:user-plus\" />\n <AlertDescription>{success}</AlertDescription>\n </Alert>\n )}\n\n {/* Submit Button */}\n <Button\n type=\"submit\"\n className=\"w-full\"\n size=\"lg\"\n disabled={isSubmitting}\n >\n {isSubmitting ? (\n <>\n <Icon icon=\"ph:spinner-gap-bold\" className=\"animate-spin\" />\n Sending invitation...\n </>\n ) : (\n <>\n <Icon icon=\"ph:user-plus-bold\" />\n Send Invitation\n </>\n )}\n </Button>\n </form>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFA,SAAgB,WAAW,EACzB,UACA,QAAQ,CACN;CAAE,OAAO;CAAS,OAAO;CAAS,EAClC;CAAE,OAAO;CAAQ,OAAO;CAAQ,CACjC,EACD,cAAc,QACd,cAAc,MACd,WACA,OACA,WACkB;CAClB,MAAM,EACJ,UACA,cACA,UACA,OACA,OACA,WAAW,EAAE,QAAQ,mBACnB,QAA0B,EAC5B,eAAe;EACb,OAAO;EACP,MAAM;EACN,SAAS;EACV,EACF,CAAC;CAEF,MAAM,eAAe,MAAM,OAAO;CAClC,MAAM,cAAc,gBAAgB;AAUpC,QACE,qBAAC;EAAK,UATiB,aAAa,OAAO,WAAW;AACtD,SAAM,SAAS,OAAO;AAEtB,OAAI,CAAC,MACH,QAAO;IAET;EAGkC,WAAW,GAAG,aAAa,UAAU;;GACrE,qBAAC;IAEC,qBAAC;KAAM,gBAAc,CAAC,CAAC,OAAO;gBAC5B,oBAAC;MAAW,SAAQ;gBAAe;OAA0B,EAC7D,qBAAC;MACC,qBAAC;OAAI,WAAU;kBACb,oBAAC;QACC,MAAK;QACL,WAAU;SACV,EACF,oBAAC;QACC,IAAG;QACH,MAAK;QACL,aAAY;QACZ,WAAU;QACV,cAAa;QACb,gBAAc,CAAC,CAAC,OAAO;QACvB,GAAI,SAAS,SAAS;SACpB,UAAU;SACV,SAAS;UACP,OAAO;UACP,SAAS;UACV;SACF,CAAC;SACF;QACE;MACN,oBAAC,8BAAiB,kDAEC;MACnB,oBAAC,wBAAY,OAAO,OAAO,UAAqB;SACnC;MACT;IAGR,qBAAC;KAAM,gBAAc,CAAC,CAAC,OAAO;gBAC5B,oBAAC;MAAW,SAAQ;gBAAc;OAAiB,EACnD,qBAAC;MACC,qBAAC;OACC,OAAO;OACP,gBAAgB,UAAU,SAAS,SAAS,QAAQ,MAAM;kBAE1D,oBAAC;QAAc,IAAG;kBAChB,oBAAC,yBACE,MAAM,MAAM,MAAM,EAAE,UAAU,aAAa,EAAE,QAC1C,YACE,MAAM,MAAM,MAAM,EAAE,UAAU,aAAa,EAAE,MAC9C,GACD,kBACQ;SACA,EAChB,oBAAC,2BACE,MAAM,KAAK,SACV,oBAAC;QAA4B,OAAO,KAAK;kBACtC,YAAY,KAAK,MAAM;UADT,KAAK,MAET,CACb,GACY;QACT;MACT,oBAAC,8BAAiB,4DAEC;MACnB,oBAAC,wBAAY,OAAO,MAAM,UAAqB;SAClC;MACT;IAGP,eACC,qBAAC,oBACC,oBAAC;KAAW,SAAQ;eAAiB;MAExB,EACb,qBAAC,2BACC,oBAAC;KACC,IAAG;KACH,aAAY;KACZ,MAAM;KACN,GAAI,SAAS,UAAU;MACvB,EACF,oBAAC,8BAAiB,0DAEC,IACN,IACT;OAEC;GAGZ,SACC,qBAAC;IAAM,SAAQ;eACb,oBAAC,QAAK,MAAK,sBAAsB,EACjC,oBAAC,8BAAkB,QAAyB;KACtC;GAIT,WACC,qBAAC,oBACC,oBAAC,QAAK,MAAK,iBAAiB,EAC5B,oBAAC,8BAAkB,UAA2B,IACxC;GAIV,oBAAC;IACC,MAAK;IACL,WAAU;IACV,MAAK;IACL,UAAU;cAET,eACC,4CACE,oBAAC;KAAK,MAAK;KAAsB,WAAU;MAAiB,6BAE3D,GAEH,4CACE,oBAAC,QAAK,MAAK,sBAAsB,uBAEhC;KAEE;;GACJ"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/client/views/auth/login-form.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Login Form - email/password authentication
|
|
6
|
+
*/
|
|
7
|
+
type LoginFormValues = {
|
|
8
|
+
email: string;
|
|
9
|
+
password: string;
|
|
10
|
+
rememberMe?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type LoginFormProps = {
|
|
13
|
+
/** Called when form is submitted with valid data */
|
|
14
|
+
onSubmit: (values: LoginFormValues) => Promise<void>;
|
|
15
|
+
/** Called when sign up link is clicked */
|
|
16
|
+
onSignUpClick?: () => void;
|
|
17
|
+
/** Called when forgot password link is clicked */
|
|
18
|
+
onForgotPasswordClick?: () => void;
|
|
19
|
+
/** Show remember me checkbox */
|
|
20
|
+
showRememberMe?: boolean;
|
|
21
|
+
/** Show sign up link */
|
|
22
|
+
showSignUp?: boolean;
|
|
23
|
+
/** Show forgot password link */
|
|
24
|
+
showForgotPassword?: boolean;
|
|
25
|
+
/** Default values */
|
|
26
|
+
defaultValues?: Partial<LoginFormValues>;
|
|
27
|
+
/** Additional class name */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Error message from auth */
|
|
30
|
+
error?: string | null;
|
|
31
|
+
/** Minimum password length (default: 8) */
|
|
32
|
+
minPasswordLength?: number;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Login form with email and password fields
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* const authClient = createAdminAuthClient<typeof cms>({ baseURL: '...' })
|
|
40
|
+
*
|
|
41
|
+
* function LoginPage() {
|
|
42
|
+
* const [error, setError] = useState<string | null>(null)
|
|
43
|
+
*
|
|
44
|
+
* const handleLogin = async (values: LoginFormValues) => {
|
|
45
|
+
* const result = await authClient.signIn.email({
|
|
46
|
+
* email: values.email,
|
|
47
|
+
* password: values.password,
|
|
48
|
+
* })
|
|
49
|
+
* if (result.error) {
|
|
50
|
+
* setError(result.error.message)
|
|
51
|
+
* }
|
|
52
|
+
* }
|
|
53
|
+
*
|
|
54
|
+
* return (
|
|
55
|
+
* <AuthLayout title="Sign in">
|
|
56
|
+
* <LoginForm onSubmit={handleLogin} error={error} />
|
|
57
|
+
* </AuthLayout>
|
|
58
|
+
* )
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
declare function LoginForm({
|
|
63
|
+
onSubmit,
|
|
64
|
+
onSignUpClick,
|
|
65
|
+
onForgotPasswordClick,
|
|
66
|
+
showRememberMe,
|
|
67
|
+
showSignUp,
|
|
68
|
+
showForgotPassword,
|
|
69
|
+
defaultValues,
|
|
70
|
+
className,
|
|
71
|
+
error,
|
|
72
|
+
minPasswordLength
|
|
73
|
+
}: LoginFormProps): react_jsx_runtime4.JSX.Element;
|
|
74
|
+
//#endregion
|
|
75
|
+
export { LoginForm, LoginFormProps, LoginFormValues };
|
|
76
|
+
//# sourceMappingURL=login-form.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login-form.d.mts","names":[],"sources":["../../../../src/client/views/auth/login-form.tsx"],"sourcesContent":[],"mappings":";;;;;;AAqBY,KAAA,eAAA,GAAe;EAMf,KAAA,EAAA,MAAA;EAES,QAAA,EAAA,MAAA;EAAoB,UAAA,CAAA,EAAA,OAAA;CAYf;AAAR,KAdN,cAAA,GAcM;EAAO;EAqCT,QAAA,EAAA,CAAA,MAAS,EAjDJ,eAiDI,EAAA,GAjDgB,OAiDhB,CAAA,IAAA,CAAA;EACvB;EACA,aAAA,CAAA,EAAA,GAAA,GAAA,IAAA;EACA;EACA,qBAAA,CAAA,EAAA,GAAA,GAAA,IAAA;EACA;EACA,cAAA,CAAA,EAAA,OAAA;EACA;EACA,UAAA,CAAA,EAAA,OAAA;EACA;EACA,kBAAA,CAAA,EAAA,OAAA;EACC;EAAc,aAAA,CAAA,EAhDC,OAgDD,CAhDS,eAgDT,CAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAXD,SAAA;;;;;;;;;;;GAWb,iBAAc,kBAAA,CAAA,GAAA,CAAA"}
|