@questpie/admin 2.0.0 → 3.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 +119 -122
- package/dist/augmentation.d.mts +110 -11
- package/dist/client/blocks/block-renderer.d.mts +5 -12
- package/dist/client/blocks/block-renderer.mjs +89 -55
- package/dist/client/blocks/index.d.mts +2 -4
- package/dist/client/blocks/types.d.mts +3 -4
- package/dist/client/blocks/types.mjs +1 -2
- package/dist/client/builder/admin-types.d.mts +11 -44
- package/dist/client/builder/admin.d.mts +34 -45
- package/dist/client/builder/admin.mjs +35 -44
- package/dist/client/builder/field/field.d.mts +27 -205
- package/dist/client/builder/field/field.mjs +22 -68
- package/dist/client/builder/index.d.mts +23 -28
- package/dist/client/builder/page/page.d.mts +15 -27
- package/dist/client/builder/page/page.mjs +21 -17
- package/dist/client/builder/registry.d.mts +14 -34
- package/dist/client/builder/types/action-registry.mjs +148 -14
- package/dist/client/builder/types/action-types.d.mts +8 -35
- package/dist/client/builder/types/collection-types.mjs +1 -2
- package/dist/client/builder/types/common.d.mts +6 -20
- package/dist/client/builder/types/field-types.d.mts +4 -5
- package/dist/client/builder/types/field-types.mjs +1 -2
- package/dist/client/builder/types/ui-config.d.mts +3 -5
- package/dist/client/builder/types/widget-types.d.mts +19 -20
- package/dist/client/builder/validation.d.mts +33 -3
- package/dist/client/builder/validation.mjs +169 -150
- package/dist/client/builder/view/view.d.mts +26 -106
- package/dist/client/builder/view/view.mjs +14 -96
- package/dist/client/builder/widget/widget.d.mts +16 -22
- package/dist/client/builder/widget/widget.mjs +11 -16
- package/dist/client/components/actions/action-button.mjs +207 -97
- package/dist/client/components/actions/action-dialog.mjs +471 -176
- package/dist/client/components/actions/confirmation-dialog.mjs +166 -47
- package/dist/client/components/actions/header-actions.mjs +164 -71
- package/dist/client/components/admin-link.d.mts +8 -9
- package/dist/client/components/admin-link.mjs +127 -48
- package/dist/client/components/auth/auth-guard.d.mts +6 -7
- package/dist/client/components/auth/auth-guard.mjs +9 -9
- package/dist/client/components/auth/auth-loading.d.mts +3 -4
- package/dist/client/components/auth/auth-loading.mjs +38 -10
- package/dist/client/components/blocks/block-canvas.mjs +111 -42
- package/dist/client/components/blocks/block-editor-context.mjs +90 -23
- package/dist/client/components/blocks/block-editor-layout.mjs +176 -59
- package/dist/client/components/blocks/block-editor-provider.mjs +219 -139
- package/dist/client/components/blocks/block-fields-renderer.mjs +212 -42
- package/dist/client/components/blocks/block-insert-button.mjs +168 -51
- package/dist/client/components/blocks/block-item-menu.mjs +312 -110
- package/dist/client/components/blocks/block-item.mjs +372 -125
- package/dist/client/components/blocks/block-library-sidebar.mjs +209 -114
- package/dist/client/components/blocks/block-tree.mjs +73 -15
- package/dist/client/components/blocks/block-type-icon.mjs +65 -20
- package/dist/client/components/blocks/utils/tree-utils.mjs +1 -2
- package/dist/client/components/component-renderer.d.mts +11 -22
- package/dist/client/components/component-renderer.mjs +151 -38
- package/dist/client/components/error-boundary.mjs +77 -25
- package/dist/client/components/fields/array-field.mjs +474 -199
- package/dist/client/components/fields/asset-preview-field.mjs +143 -44
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +143 -35
- package/dist/client/components/fields/boolean-field.mjs +62 -32
- package/dist/client/components/fields/date-field.mjs +46 -12
- package/dist/client/components/fields/datetime-field.mjs +42 -11
- package/dist/client/components/fields/email-field.mjs +57 -28
- package/dist/client/components/fields/field-utils.mjs +1 -2
- package/dist/client/components/fields/field-wrapper.mjs +107 -32
- package/dist/client/components/fields/json-field.mjs +323 -110
- package/dist/client/components/fields/locale-badge.mjs +16 -8
- package/dist/client/components/fields/number-field.mjs +63 -30
- package/dist/client/components/fields/object-array-field.mjs +666 -272
- package/dist/client/components/fields/object-field.mjs +656 -98
- package/dist/client/components/fields/relation/displays/cards-display.mjs +225 -111
- package/dist/client/components/fields/relation/displays/chips-display.mjs +150 -77
- package/dist/client/components/fields/relation/displays/grid-display.mjs +186 -91
- package/dist/client/components/fields/relation/displays/list-display.mjs +230 -111
- package/dist/client/components/fields/relation/displays/table-display.mjs +241 -66
- package/dist/client/components/fields/relation/displays/types.mjs +2 -3
- package/dist/client/components/fields/relation/relation-items-display.mjs +131 -35
- package/dist/client/components/fields/relation-field.mjs +70 -15
- package/dist/client/components/fields/relation-picker.mjs +93 -98
- package/dist/client/components/fields/relation-select.mjs +42 -29
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +90 -41
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +33 -7
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +48 -23
- package/dist/client/components/fields/rich-text-editor/index.mjs +491 -158
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +13 -14
- package/dist/client/components/fields/rich-text-editor/presets.mjs +1 -2
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +96 -53
- package/dist/client/components/fields/rich-text-editor/table-controls.mjs +416 -107
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +476 -215
- package/dist/client/components/fields/rich-text-editor/types.mjs +1 -2
- package/dist/client/components/fields/rich-text-editor/utils.mjs +1 -2
- package/dist/client/components/fields/rich-text-field.mjs +55 -17
- package/dist/client/components/fields/select-field.mjs +79 -44
- package/dist/client/components/fields/text-field.mjs +62 -29
- package/dist/client/components/fields/textarea-field.mjs +61 -29
- package/dist/client/components/fields/time-field.mjs +39 -11
- package/dist/client/components/fields/upload-field.mjs +253 -129
- package/dist/client/components/filter-builder/columns-tab.mjs +287 -93
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +437 -138
- package/dist/client/components/filter-builder/filters-tab.mjs +409 -126
- package/dist/client/components/filter-builder/saved-views-tab.mjs +259 -106
- package/dist/client/components/history-sidebar.mjs +496 -0
- package/dist/client/components/layout/field-layout-renderer.mjs +301 -0
- package/dist/client/components/locale-switcher.mjs +231 -108
- package/dist/client/components/media/media-grid.mjs +259 -84
- package/dist/client/components/media/media-picker-dialog.mjs +500 -192
- package/dist/client/components/preview/live-preview-mode.mjs +416 -124
- package/dist/client/components/preview/preview-pane.mjs +353 -144
- package/dist/client/components/primitives/asset-preview.mjs +665 -257
- package/dist/client/components/primitives/checkbox-input.mjs +37 -11
- package/dist/client/components/primitives/date-input.mjs +392 -149
- package/dist/client/components/primitives/dropzone.mjs +314 -185
- package/dist/client/components/primitives/number-input.mjs +14 -10
- package/dist/client/components/primitives/select-multi.mjs +519 -185
- package/dist/client/components/primitives/select-single.mjs +416 -126
- package/dist/client/components/primitives/text-input.mjs +10 -5
- package/dist/client/components/primitives/textarea-input.mjs +10 -5
- package/dist/client/components/primitives/time-input.mjs +118 -45
- package/dist/client/components/primitives/toggle-input.mjs +31 -11
- package/dist/client/components/primitives/types.mjs +1 -2
- package/dist/client/components/sheets/resource-sheet.mjs +72 -64
- package/dist/client/components/ui/accordion.mjs +156 -37
- package/dist/client/components/ui/alert.mjs +70 -17
- package/dist/client/components/ui/badge.mjs +57 -16
- package/dist/client/components/ui/button.mjs +49 -14
- package/dist/client/components/ui/card.mjs +194 -39
- package/dist/client/components/ui/checkbox.mjs +71 -16
- package/dist/client/components/ui/command.mjs +220 -50
- package/dist/client/components/ui/dialog.mjs +265 -52
- package/dist/client/components/ui/drawer.mjs +260 -57
- package/dist/client/components/ui/dropdown-menu.mjs +293 -67
- package/dist/client/components/ui/empty-state.mjs +72 -26
- package/dist/client/components/ui/field.mjs +332 -56
- package/dist/client/components/ui/input-group.mjs +174 -41
- package/dist/client/components/ui/input.mjs +38 -9
- package/dist/client/components/ui/kbd.mjs +37 -8
- package/dist/client/components/ui/label.mjs +38 -8
- package/dist/client/components/ui/popover.mjs +162 -35
- package/dist/client/components/ui/responsive-dialog.mjs +277 -71
- package/dist/client/components/ui/search-input.mjs +101 -36
- package/dist/client/components/ui/select.mjs +297 -57
- package/dist/client/components/ui/separator.mjs +39 -9
- package/dist/client/components/ui/sheet.mjs +253 -51
- package/dist/client/components/ui/sidebar.mjs +700 -182
- package/dist/client/components/ui/skeleton.mjs +33 -8
- package/dist/client/components/ui/sonner.d.mts +2 -3
- package/dist/client/components/ui/sonner.mjs +45 -15
- package/dist/client/components/ui/spinner.mjs +44 -10
- package/dist/client/components/ui/switch.mjs +47 -12
- package/dist/client/components/ui/table.mjs +260 -50
- package/dist/client/components/ui/tabs.mjs +140 -29
- package/dist/client/components/ui/textarea.mjs +33 -8
- package/dist/client/components/ui/toolbar.mjs +105 -23
- package/dist/client/components/ui/tooltip.mjs +130 -29
- package/dist/client/components/widgets/chart-widget.mjs +456 -156
- package/dist/client/components/widgets/progress-widget.mjs +150 -60
- package/dist/client/components/widgets/quick-actions-widget.mjs +175 -87
- package/dist/client/components/widgets/recent-items-widget.mjs +157 -62
- package/dist/client/components/widgets/stats-widget.mjs +153 -42
- package/dist/client/components/widgets/table-widget.mjs +198 -64
- package/dist/client/components/widgets/timeline-widget.mjs +193 -82
- package/dist/client/components/widgets/value-widget.mjs +257 -56
- package/dist/client/components/widgets/widget-skeletons.mjs +390 -108
- package/dist/client/contexts/breadcrumb-context.mjs +44 -16
- package/dist/client/{context → contexts}/focus-context.d.mts +6 -7
- package/dist/client/{context → contexts}/focus-context.mjs +134 -62
- package/dist/client/hooks/typed-hooks.d.mts +38 -12
- package/dist/client/hooks/typed-hooks.mjs +758 -142
- package/dist/client/hooks/use-action.mjs +197 -69
- package/dist/client/hooks/use-admin-config.mjs +39 -10
- package/dist/client/hooks/use-admin-preferences.mjs +118 -15
- package/dist/client/hooks/use-admin-routes.mjs +60 -27
- package/dist/client/hooks/use-audit-history.mjs +157 -0
- package/dist/client/hooks/use-auth.d.mts +14 -15
- package/dist/client/hooks/use-auth.mjs +8 -9
- package/dist/client/hooks/use-collection-fields.mjs +58 -19
- package/dist/client/hooks/use-collection-meta.mjs +45 -13
- package/dist/client/hooks/use-collection-schema.mjs +34 -11
- package/dist/client/hooks/use-collection-validation.mjs +39 -25
- package/dist/client/hooks/use-collection.d.mts +18 -8
- package/dist/client/hooks/use-collection.mjs +560 -101
- package/dist/client/hooks/use-current-user.d.mts +6 -3
- package/dist/client/hooks/use-current-user.mjs +2 -2
- package/dist/client/hooks/use-field-hooks.mjs +73 -65
- package/dist/client/hooks/use-field-options.d.mts +1 -34
- package/dist/client/hooks/use-field-options.mjs +233 -148
- package/dist/client/hooks/use-global-fields.mjs +47 -16
- package/dist/client/hooks/use-global-meta.mjs +57 -11
- package/dist/client/hooks/use-global-schema.mjs +31 -11
- package/dist/client/hooks/use-global.d.mts +13 -2
- package/dist/client/hooks/use-global.mjs +244 -34
- package/dist/client/hooks/use-locks.mjs +331 -124
- package/dist/client/hooks/use-media-query.d.mts +1 -2
- package/dist/client/hooks/use-media-query.mjs +38 -19
- package/dist/client/hooks/use-prefill-params.mjs +2 -2
- package/dist/client/hooks/use-questpie-query-options.mjs +33 -11
- package/dist/client/hooks/use-reactive-fields.d.mts +6 -3
- package/dist/client/hooks/use-reactive-fields.mjs +130 -93
- package/dist/client/hooks/use-realtime-highlight.mjs +115 -53
- package/dist/client/hooks/use-saved-views.mjs +109 -34
- package/dist/client/hooks/use-search-param-toggle.d.mts +12 -0
- package/dist/client/hooks/use-search-param-toggle.mjs +115 -0
- package/dist/client/hooks/use-search.mjs +147 -36
- package/dist/client/hooks/use-server-actions.mjs +191 -0
- package/dist/client/hooks/use-server-validation.mjs +164 -72
- package/dist/client/hooks/use-server-widget-data.d.mts +2 -3
- package/dist/client/hooks/use-server-widget-data.mjs +36 -11
- package/dist/client/hooks/use-setup-status.d.mts +3 -4
- package/dist/client/hooks/use-setup-status.mjs +28 -16
- package/dist/client/hooks/use-sidebar-search-param.d.mts +9 -0
- package/dist/client/hooks/use-sidebar-search-param.mjs +104 -0
- package/dist/client/hooks/use-transition-stage.mjs +125 -0
- package/dist/client/hooks/use-upload-collection.mjs +1 -2
- package/dist/client/hooks/use-upload.mjs +189 -125
- package/dist/client/hooks/use-validation-error-map.mjs +10 -6
- package/dist/client/hooks/use-view-state.mjs +380 -162
- package/dist/client/i18n/hooks.mjs +191 -67
- package/dist/client/i18n/intl-cache.mjs +1 -2
- package/dist/client/i18n/messages.mjs +1 -2
- package/dist/client/i18n/simple.d.mts +1 -2
- package/dist/client/i18n/simple.mjs +1 -2
- package/dist/client/i18n/types.d.mts +1 -2
- package/dist/client/lib/cookies.mjs +9 -0
- package/dist/client/lib/events.mjs +5 -0
- package/dist/client/lib/render-profiler.mjs +51 -0
- package/dist/client/lib/utils.mjs +1 -6
- package/dist/client/preview/block-scope-context.d.mts +5 -6
- package/dist/client/preview/block-scope-context.mjs +50 -27
- package/dist/client/preview/index.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +3 -4
- package/dist/client/preview/preview-banner.mjs +74 -35
- package/dist/client/preview/preview-field.d.mts +9 -10
- package/dist/client/preview/preview-field.mjs +163 -61
- package/dist/client/preview/types.d.mts +1 -2
- package/dist/client/preview/types.mjs +1 -2
- package/dist/client/preview/use-collection-preview.d.mts +1 -2
- package/dist/client/preview/use-collection-preview.mjs +105 -56
- package/dist/client/runtime/content-locales-provider.mjs +87 -36
- package/dist/client/runtime/index.d.mts +1 -3
- package/dist/client/runtime/index.mjs +1 -3
- package/dist/client/runtime/locale-scope.mjs +69 -29
- package/dist/client/runtime/provider.d.mts +18 -9922
- package/dist/client/runtime/provider.mjs +250 -86
- package/dist/client/runtime/routes.d.mts +7 -7
- package/dist/client/runtime/routes.mjs +4 -20
- package/dist/client/runtime/translations-provider.mjs +114 -53
- package/dist/client/scope/picker.d.mts +3 -4
- package/dist/client/scope/picker.mjs +324 -90
- package/dist/client/scope/provider.d.mts +4 -5
- package/dist/client/scope/provider.mjs +30 -22
- package/dist/client/scope/types.d.mts +1 -2
- package/dist/client/styles/index.css +301 -225
- package/dist/client/utils/auto-expand-fields.mjs +23 -5
- package/dist/client/utils/build-field-definitions-from-schema.mjs +10 -7
- package/dist/client/utils/dependency-tracker.mjs +61 -0
- package/dist/client/utils/detect-relations.mjs +1 -2
- package/dist/client/utils/locale-to-flag.d.mts +8 -7
- package/dist/client/utils/locale-to-flag.mjs +1 -2
- package/dist/client/utils/routes.mjs +1 -2
- package/dist/client/views/auth/accept-invite-form.d.mts +3 -4
- package/dist/client/views/auth/accept-invite-form.mjs +414 -121
- package/dist/client/views/auth/auth-layout.d.mts +7 -8
- package/dist/client/views/auth/auth-layout.mjs +93 -30
- package/dist/client/views/auth/forgot-password-form.d.mts +4 -5
- package/dist/client/views/auth/forgot-password-form.mjs +332 -100
- package/dist/client/views/auth/invite-form.mjs +447 -105
- package/dist/client/views/auth/login-form.d.mts +4 -5
- package/dist/client/views/auth/login-form.mjs +340 -120
- package/dist/client/views/auth/reset-password-form.d.mts +4 -5
- package/dist/client/views/auth/reset-password-form.mjs +458 -131
- package/dist/client/views/auth/setup-form.d.mts +4 -5
- package/dist/client/views/auth/setup-form.mjs +481 -141
- package/dist/client/views/collection/auto-form-fields.mjs +686 -266
- package/dist/client/views/collection/bulk-action-toolbar.mjs +392 -203
- package/dist/client/views/collection/cells/complex-cells.mjs +635 -216
- package/dist/client/views/collection/cells/primitive-cells.mjs +332 -102
- package/dist/client/views/collection/cells/relation-cells.mjs +227 -72
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +456 -136
- package/dist/client/views/collection/cells/shared/cell-helpers.mjs +49 -2
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +109 -25
- package/dist/client/views/collection/cells/upload-cells.mjs +16 -8
- package/dist/client/views/collection/columns/build-columns.mjs +51 -12
- package/dist/client/views/collection/columns/column-defaults.mjs +17 -2
- package/dist/client/views/collection/field-context.mjs +10 -11
- package/dist/client/views/collection/field-renderer.mjs +237 -40
- package/dist/client/views/collection/form-view.mjs +1108 -445
- package/dist/client/views/collection/table-view.mjs +300 -163
- package/dist/client/views/collection/view-skeletons.mjs +181 -87
- package/dist/client/views/common/global-search.mjs +557 -233
- package/dist/client/views/dashboard/dashboard-grid.mjs +707 -211
- package/dist/client/views/dashboard/dashboard-widget.mjs +145 -58
- package/dist/client/views/dashboard/widget-card.mjs +315 -102
- package/dist/client/views/globals/global-form-view.mjs +1256 -131
- package/dist/client/views/layout/admin-layout-provider.d.mts +18 -21
- package/dist/client/views/layout/admin-layout-provider.mjs +135 -32
- package/dist/client/views/layout/admin-layout.d.mts +14 -32
- package/dist/client/views/layout/admin-layout.mjs +254 -96
- package/dist/client/views/layout/admin-router.d.mts +10 -42
- package/dist/client/views/layout/admin-router.mjs +1086 -426
- package/dist/client/views/layout/admin-sidebar.d.mts +10 -16
- package/dist/client/views/layout/admin-sidebar.mjs +1211 -382
- package/dist/client/views/layout/admin-topbar.mjs +220 -112
- package/dist/client/views/pages/accept-invite-page.d.mts +5 -6
- package/dist/client/views/pages/accept-invite-page.mjs +302 -96
- package/dist/client/views/pages/dashboard-page.d.mts +7 -16
- package/dist/client/views/pages/dashboard-page.mjs +62 -23
- package/dist/client/views/pages/forgot-password-page.d.mts +7 -10
- package/dist/client/views/pages/forgot-password-page.mjs +112 -40
- package/dist/client/views/pages/invite-page.d.mts +6 -7
- package/dist/client/views/pages/invite-page.mjs +121 -46
- package/dist/client/views/pages/login-page.d.mts +8 -15
- package/dist/client/views/pages/login-page.mjs +152 -57
- package/dist/client/views/pages/reset-password-page.d.mts +7 -10
- package/dist/client/views/pages/reset-password-page.mjs +209 -57
- package/dist/client/views/pages/setup-page.d.mts +7 -10
- package/dist/client/views/pages/setup-page.mjs +108 -43
- package/dist/client-module.d.mts +3 -0
- package/dist/client-module.mjs +3 -0
- package/dist/client.d.mts +55 -48
- package/dist/client.mjs +26 -28
- package/dist/components/rich-text/rich-text-renderer.d.mts +3 -4
- package/dist/components/rich-text/rich-text-renderer.mjs +97 -70
- package/dist/index.d.mts +36 -39
- package/dist/index.mjs +26 -28
- package/dist/plugin.d.mts +2 -0
- package/dist/plugin.mjs +3 -0
- package/dist/server/adapters/nextjs.d.mts +13 -14
- package/dist/server/adapters/nextjs.mjs +12 -13
- package/dist/server/adapters/tanstack.d.mts +10 -11
- package/dist/server/adapters/tanstack.mjs +11 -12
- package/dist/server/augmentation/actions.d.mts +279 -0
- package/dist/server/augmentation/common.d.mts +76 -0
- package/dist/server/augmentation/dashboard.d.mts +547 -0
- package/dist/server/augmentation/form-layout.d.mts +303 -0
- package/dist/server/augmentation/index.d.mts +44 -0
- package/dist/server/augmentation/index.mjs +10 -0
- package/dist/server/augmentation/sidebar.d.mts +181 -0
- package/dist/server/augmentation/views.d.mts +237 -0
- package/dist/server/augmentation.d.mts +7 -1523
- package/dist/server/block/index.d.mts +4 -3
- package/dist/server/codegen/admin-client-template.mjs +93 -0
- package/dist/server/codegen/projection-validator.mjs +67 -0
- package/dist/server/fields/blocks.d.mts +10 -78
- package/dist/server/fields/blocks.mjs +74 -115
- package/dist/server/fields/index.d.mts +6 -39
- package/dist/server/fields/index.mjs +6 -7
- package/dist/server/fields/rich-text.d.mts +10 -77
- package/dist/server/fields/rich-text.mjs +59 -100
- package/dist/server/i18n/index.mjs +8 -9
- package/dist/server/i18n/messages/cs.mjs +3 -3
- package/dist/server/i18n/messages/de.mjs +3 -3
- package/dist/server/i18n/messages/en.mjs +217 -3
- package/dist/server/i18n/messages/es.mjs +3 -3
- package/dist/server/i18n/messages/fr.mjs +3 -3
- package/dist/server/i18n/messages/index.mjs +1 -2
- package/dist/server/i18n/messages/pl.mjs +3 -3
- package/dist/server/i18n/messages/pt.mjs +3 -3
- package/dist/server/i18n/messages/sk.mjs +202 -3
- package/dist/server/modules/admin/.generated/module.d.mts +52 -0
- package/dist/server/modules/admin/.generated/module.mjs +78 -0
- package/dist/server/modules/admin/.generated/registries.d.mts +22 -0
- package/dist/server/{auth-helpers.d.mts → modules/admin/auth-helpers.d.mts} +13 -14
- package/dist/server/{auth-helpers.mjs → modules/admin/auth-helpers.mjs} +15 -16
- package/dist/server/{block → modules/admin/block}/block-builder.d.mts +96 -32
- package/dist/server/{block → modules/admin/block}/block-builder.mjs +113 -15
- package/dist/server/modules/admin/block/index.d.mts +3 -0
- package/dist/server/{block → modules/admin/block}/introspection.d.mts +10 -5
- package/dist/server/{block → modules/admin/block}/introspection.mjs +18 -7
- package/dist/server/{block → modules/admin/block}/prefetch.d.mts +17 -17
- package/dist/server/{block → modules/admin/block}/prefetch.mjs +17 -16
- package/dist/server/modules/admin/client/.generated/module.d.mts +94 -0
- package/dist/server/modules/admin/client/.generated/module.mjs +91 -0
- package/dist/server/modules/admin/client/components/badge.d.mts +1 -0
- package/dist/server/modules/admin/client/components/icon.d.mts +1 -0
- package/dist/server/modules/admin/client/fields/array.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/array.mjs +12 -0
- package/dist/server/modules/admin/client/fields/assetPreview.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/assetPreview.mjs +18 -0
- package/dist/server/modules/admin/client/fields/blocks.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/blocks.mjs +12 -0
- package/dist/server/modules/admin/client/fields/boolean.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/boolean.mjs +12 -0
- package/dist/server/modules/admin/client/fields/date.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/date.mjs +12 -0
- package/dist/server/modules/admin/client/fields/datetime.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/datetime.mjs +12 -0
- package/dist/server/modules/admin/client/fields/email.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/email.mjs +12 -0
- package/dist/server/modules/admin/client/fields/json.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/json.mjs +11 -0
- package/dist/server/modules/admin/client/fields/number.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/number.mjs +12 -0
- package/dist/server/modules/admin/client/fields/object.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/object.mjs +12 -0
- package/dist/server/modules/admin/client/fields/relation.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/relation.mjs +12 -0
- package/dist/server/modules/admin/client/fields/richText.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/richText.mjs +11 -0
- package/dist/server/modules/admin/client/fields/select.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/select.mjs +12 -0
- package/dist/server/modules/admin/client/fields/text.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/text.mjs +12 -0
- package/dist/server/modules/admin/client/fields/textarea.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/textarea.mjs +12 -0
- package/dist/server/modules/admin/client/fields/time.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/time.mjs +12 -0
- package/dist/server/modules/admin/client/fields/upload.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/upload.mjs +12 -0
- package/dist/server/modules/admin/client/fields/url.d.mts +6 -0
- package/dist/server/modules/admin/client/fields/url.mjs +12 -0
- package/dist/server/modules/admin/client/index.d.mts +1 -0
- package/dist/server/modules/admin/client/pages/dashboard.d.mts +6 -0
- package/dist/server/modules/admin/client/pages/dashboard.mjs +11 -0
- package/dist/server/modules/admin/client/pages/forgotPassword.d.mts +6 -0
- package/dist/server/modules/admin/client/pages/forgotPassword.mjs +11 -0
- package/dist/server/modules/admin/client/pages/login.d.mts +6 -0
- package/dist/server/modules/admin/client/pages/login.mjs +11 -0
- package/dist/server/modules/admin/client/pages/resetPassword.d.mts +6 -0
- package/dist/server/modules/admin/client/pages/resetPassword.mjs +11 -0
- package/dist/server/modules/admin/client/pages/setup.d.mts +6 -0
- package/dist/server/modules/admin/client/pages/setup.mjs +11 -0
- package/dist/server/modules/admin/client/views/collection-form.mjs +10 -0
- package/dist/server/modules/admin/client/views/collection-table.mjs +10 -0
- package/dist/server/modules/admin/client/views/global-form.mjs +10 -0
- package/dist/server/modules/admin/client/widgets/chart.d.mts +6 -0
- package/dist/server/modules/admin/client/widgets/chart.mjs +7 -0
- package/dist/server/modules/admin/client/widgets/progress.d.mts +6 -0
- package/dist/server/modules/admin/client/widgets/progress.mjs +7 -0
- package/dist/server/modules/admin/client/widgets/quickActions.d.mts +6 -0
- package/dist/server/modules/admin/client/widgets/quickActions.mjs +7 -0
- package/dist/server/modules/admin/client/widgets/recentItems.d.mts +6 -0
- package/dist/server/modules/admin/client/widgets/recentItems.mjs +7 -0
- package/dist/server/modules/admin/client/widgets/stats.d.mts +6 -0
- package/dist/server/modules/admin/client/widgets/stats.mjs +7 -0
- package/dist/server/modules/admin/client/widgets/table.d.mts +6 -0
- package/dist/server/modules/admin/client/widgets/table.mjs +7 -0
- package/dist/server/modules/admin/client/widgets/timeline.d.mts +6 -0
- package/dist/server/modules/admin/client/widgets/timeline.mjs +7 -0
- package/dist/server/modules/admin/client/widgets/value.d.mts +6 -0
- package/dist/server/modules/admin/client/widgets/value.mjs +7 -0
- package/dist/server/modules/admin/collections/account.d.mts +77 -0
- package/dist/server/modules/admin/collections/account.mjs +23 -0
- package/dist/server/modules/admin/collections/admin-locks.d.mts +90 -0
- package/dist/server/modules/admin/collections/admin-locks.mjs +16 -0
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +69 -0
- package/dist/server/modules/admin/collections/admin-preferences.mjs +16 -0
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +83 -0
- package/dist/server/modules/admin/collections/admin-saved-views.mjs +16 -0
- package/dist/server/modules/admin/collections/apikey.d.mts +99 -0
- package/dist/server/modules/admin/collections/apikey.mjs +15 -0
- package/dist/server/modules/admin/collections/assets.d.mts +72 -0
- package/dist/server/modules/admin/collections/assets.mjs +71 -0
- package/dist/server/modules/admin/collections/session.d.mts +69 -0
- package/dist/server/modules/admin/collections/session.mjs +15 -0
- package/dist/server/modules/admin/collections/user.d.mts +85 -0
- package/dist/server/modules/admin/collections/user.mjs +204 -0
- package/dist/server/modules/admin/collections/verification.d.mts +63 -0
- package/dist/server/modules/admin/collections/verification.mjs +15 -0
- package/dist/server/modules/admin/components/badge.d.mts +10 -0
- package/dist/server/modules/admin/components/badge.mjs +10 -0
- package/dist/server/modules/admin/components/icon.d.mts +9 -0
- package/dist/server/modules/admin/components/icon.mjs +11 -0
- package/dist/server/modules/admin/config/admin.mjs +34 -0
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +102 -0
- package/dist/server/modules/admin/factories.mjs +172 -0
- package/dist/server/modules/admin/index.d.mts +1060 -16846
- package/dist/server/modules/admin/index.mjs +17 -240
- package/dist/server/modules/admin/modules.mjs +11 -0
- package/dist/server/modules/admin/plugin.mjs +13 -0
- package/dist/server/modules/admin/routes/admin-config.d.mts +28 -0
- package/dist/server/modules/admin/routes/admin-config.mjs +552 -0
- package/dist/server/modules/admin/{functions → routes}/execute-action.d.mts +17 -32
- package/dist/server/modules/admin/{functions → routes}/execute-action.mjs +146 -44
- package/dist/server/modules/admin/routes/locales.d.mts +18 -0
- package/dist/server/modules/admin/routes/locales.mjs +69 -0
- package/dist/server/modules/admin/{functions → routes}/preview.d.mts +25 -15
- package/dist/server/modules/admin/{functions → routes}/preview.mjs +84 -97
- package/dist/server/modules/admin/{functions → routes}/reactive.d.mts +19 -44
- package/dist/server/modules/admin/{functions → routes}/reactive.mjs +89 -117
- package/dist/server/modules/admin/routes/route-helpers.d.mts +23 -0
- package/dist/server/modules/admin/routes/route-helpers.mjs +76 -0
- package/dist/server/modules/admin/{functions → routes}/setup.d.mts +11 -32
- package/dist/server/modules/admin/routes/setup.mjs +114 -0
- package/dist/server/modules/admin/routes/translations.d.mts +26 -0
- package/dist/server/modules/admin/routes/translations.mjs +114 -0
- package/dist/server/modules/admin/routes/widget-data.d.mts +32 -0
- package/dist/server/modules/admin/routes/widget-data.mjs +62 -0
- package/dist/server/modules/admin/views/form.d.mts +8 -0
- package/dist/server/modules/admin/views/form.mjs +7 -0
- package/dist/server/modules/admin/views/global-form.d.mts +8 -0
- package/dist/server/modules/admin/views/global-form.mjs +7 -0
- package/dist/server/modules/admin/views/table.d.mts +8 -0
- package/dist/server/modules/admin/views/table.mjs +7 -0
- package/dist/server/modules/admin-preferences/collections/{admin-preferences.collection.mjs → admin-preferences.mjs} +13 -24
- package/dist/server/modules/admin-preferences/collections/locks.collection.mjs +18 -42
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +99 -0
- package/dist/server/modules/admin-preferences/collections/saved-views.mjs +38 -0
- package/dist/server/modules/audit/.generated/module.d.mts +60 -0
- package/dist/server/modules/audit/.generated/module.mjs +30 -0
- package/dist/server/modules/audit/collections/audit-log.d.mts +214 -0
- package/dist/server/modules/audit/collections/audit-log.mjs +107 -0
- package/dist/server/modules/audit/config/admin.mjs +21 -0
- package/dist/server/modules/audit/config/app.mjs +262 -0
- package/dist/server/modules/audit/index.d.mts +2 -0
- package/dist/server/modules/audit/jobs/audit-cleanup.d.mts +13 -0
- package/dist/server/modules/audit/jobs/audit-cleanup.mjs +28 -0
- package/dist/server/plugin.d.mts +26 -0
- package/dist/server/plugin.mjs +385 -0
- package/dist/server/proxy-factories.d.mts +85 -0
- package/dist/server/proxy-factories.mjs +302 -0
- package/dist/server/registry-helpers.d.mts +83 -0
- package/dist/server/registry-helpers.mjs +104 -0
- package/dist/server.d.mts +30 -18
- package/dist/server.mjs +19 -16
- package/dist/shared/preview-utils.d.mts +2 -3
- package/dist/shared/preview-utils.mjs +2 -3
- package/dist/shared/types/saved-views.types.d.mts +2 -2
- package/package.json +50 -40
- package/skills/questpie-admin/SKILL.md +397 -0
- package/skills/questpie-admin/blocks/SKILL.md +305 -0
- package/skills/questpie-admin/custom-ui/SKILL.md +307 -0
- package/skills/questpie-admin/views/SKILL.md +442 -0
- package/dist/_virtual/rolldown_runtime.mjs +0 -18
- package/dist/augmentation.d.mts.map +0 -1
- package/dist/client/blocks/block-registry.d.mts +0 -199
- package/dist/client/blocks/block-registry.d.mts.map +0 -1
- package/dist/client/blocks/block-registry.mjs +0 -88
- package/dist/client/blocks/block-registry.mjs.map +0 -1
- package/dist/client/blocks/block-renderer.d.mts.map +0 -1
- package/dist/client/blocks/block-renderer.mjs.map +0 -1
- package/dist/client/blocks/prefetch.d.mts +0 -45
- package/dist/client/blocks/prefetch.d.mts.map +0 -1
- package/dist/client/blocks/prefetch.mjs +0 -26
- package/dist/client/blocks/prefetch.mjs.map +0 -1
- package/dist/client/blocks/types.d.mts.map +0 -1
- package/dist/client/blocks/types.mjs.map +0 -1
- package/dist/client/builder/admin-builder.d.mts +0 -112
- package/dist/client/builder/admin-builder.d.mts.map +0 -1
- package/dist/client/builder/admin-builder.mjs +0 -185
- package/dist/client/builder/admin-builder.mjs.map +0 -1
- package/dist/client/builder/admin-types.d.mts.map +0 -1
- package/dist/client/builder/admin.d.mts.map +0 -1
- package/dist/client/builder/admin.mjs.map +0 -1
- package/dist/client/builder/defaults/components.mjs +0 -20
- package/dist/client/builder/defaults/components.mjs.map +0 -1
- package/dist/client/builder/defaults/core.d.mts +0 -354
- package/dist/client/builder/defaults/core.d.mts.map +0 -1
- package/dist/client/builder/defaults/core.mjs +0 -49
- package/dist/client/builder/defaults/core.mjs.map +0 -1
- package/dist/client/builder/defaults/fields.mjs +0 -328
- package/dist/client/builder/defaults/fields.mjs.map +0 -1
- package/dist/client/builder/defaults/pages.mjs +0 -58
- package/dist/client/builder/defaults/pages.mjs.map +0 -1
- package/dist/client/builder/defaults/starter.d.mts +0 -351
- package/dist/client/builder/defaults/starter.d.mts.map +0 -1
- package/dist/client/builder/defaults/starter.mjs +0 -28
- package/dist/client/builder/defaults/starter.mjs.map +0 -1
- package/dist/client/builder/defaults/views.mjs +0 -27
- package/dist/client/builder/defaults/views.mjs.map +0 -1
- package/dist/client/builder/defaults/widgets.mjs +0 -31
- package/dist/client/builder/defaults/widgets.mjs.map +0 -1
- package/dist/client/builder/field/field.d.mts.map +0 -1
- package/dist/client/builder/field/field.mjs.map +0 -1
- package/dist/client/builder/index.d.mts.map +0 -1
- package/dist/client/builder/page/page.d.mts.map +0 -1
- package/dist/client/builder/page/page.mjs.map +0 -1
- package/dist/client/builder/proxies.d.mts +0 -2
- package/dist/client/builder/proxies.mjs +0 -24
- package/dist/client/builder/proxies.mjs.map +0 -1
- package/dist/client/builder/qa.d.mts +0 -50
- package/dist/client/builder/qa.d.mts.map +0 -1
- package/dist/client/builder/qa.mjs +0 -42
- package/dist/client/builder/qa.mjs.map +0 -1
- package/dist/client/builder/registry.d.mts.map +0 -1
- package/dist/client/builder/types/action-registry.d.mts +0 -2
- package/dist/client/builder/types/action-registry.mjs.map +0 -1
- package/dist/client/builder/types/action-types.d.mts.map +0 -1
- package/dist/client/builder/types/collection-types.d.mts +0 -199
- package/dist/client/builder/types/collection-types.d.mts.map +0 -1
- package/dist/client/builder/types/collection-types.mjs.map +0 -1
- package/dist/client/builder/types/common.d.mts.map +0 -1
- package/dist/client/builder/types/field-types.d.mts.map +0 -1
- package/dist/client/builder/types/field-types.mjs.map +0 -1
- package/dist/client/builder/types/global-types.d.mts +0 -22
- package/dist/client/builder/types/global-types.d.mts.map +0 -1
- package/dist/client/builder/types/ui-config.d.mts.map +0 -1
- package/dist/client/builder/types/views.d.mts +0 -89
- package/dist/client/builder/types/views.d.mts.map +0 -1
- package/dist/client/builder/types/widget-types.d.mts.map +0 -1
- package/dist/client/builder/validation.mjs.map +0 -1
- package/dist/client/builder/view/view.d.mts.map +0 -1
- package/dist/client/builder/view/view.mjs.map +0 -1
- package/dist/client/builder/widget/widget.d.mts.map +0 -1
- package/dist/client/builder/widget/widget.mjs.map +0 -1
- package/dist/client/components/actions/action-button.d.mts +0 -2
- package/dist/client/components/actions/action-button.mjs.map +0 -1
- package/dist/client/components/actions/action-dialog.d.mts +0 -2
- package/dist/client/components/actions/action-dialog.mjs.map +0 -1
- package/dist/client/components/actions/confirmation-dialog.d.mts +0 -2
- package/dist/client/components/actions/confirmation-dialog.mjs.map +0 -1
- package/dist/client/components/actions/header-actions.d.mts +0 -2
- package/dist/client/components/actions/header-actions.mjs.map +0 -1
- package/dist/client/components/actions/index.d.mts +0 -4
- package/dist/client/components/admin-link.d.mts.map +0 -1
- package/dist/client/components/admin-link.mjs.map +0 -1
- package/dist/client/components/auth/auth-guard.d.mts.map +0 -1
- package/dist/client/components/auth/auth-guard.mjs.map +0 -1
- package/dist/client/components/auth/auth-loading.d.mts.map +0 -1
- package/dist/client/components/auth/auth-loading.mjs.map +0 -1
- package/dist/client/components/auth/index.d.mts +0 -2
- package/dist/client/components/blocks/block-canvas.mjs.map +0 -1
- package/dist/client/components/blocks/block-editor-context.mjs.map +0 -1
- package/dist/client/components/blocks/block-editor-layout.mjs.map +0 -1
- package/dist/client/components/blocks/block-editor-provider.mjs.map +0 -1
- package/dist/client/components/blocks/block-fields-renderer.mjs.map +0 -1
- package/dist/client/components/blocks/block-insert-button.mjs.map +0 -1
- package/dist/client/components/blocks/block-item-menu.mjs.map +0 -1
- package/dist/client/components/blocks/block-item.mjs.map +0 -1
- package/dist/client/components/blocks/block-library-sidebar.mjs.map +0 -1
- package/dist/client/components/blocks/block-tree.mjs.map +0 -1
- package/dist/client/components/blocks/block-type-icon.mjs.map +0 -1
- package/dist/client/components/blocks/utils/tree-utils.mjs.map +0 -1
- package/dist/client/components/component-renderer.d.mts.map +0 -1
- package/dist/client/components/component-renderer.mjs.map +0 -1
- package/dist/client/components/error-boundary.mjs.map +0 -1
- package/dist/client/components/fields/array-field.d.mts +0 -44
- package/dist/client/components/fields/array-field.d.mts.map +0 -1
- package/dist/client/components/fields/array-field.mjs.map +0 -1
- package/dist/client/components/fields/asset-preview-field.d.mts +0 -52
- package/dist/client/components/fields/asset-preview-field.d.mts.map +0 -1
- package/dist/client/components/fields/asset-preview-field.mjs.map +0 -1
- package/dist/client/components/fields/blocks-field/blocks-field.d.mts +0 -41
- package/dist/client/components/fields/blocks-field/blocks-field.d.mts.map +0 -1
- package/dist/client/components/fields/blocks-field/blocks-field.mjs.map +0 -1
- package/dist/client/components/fields/blocks-field/index.d.mts +0 -1
- package/dist/client/components/fields/boolean-field.d.mts +0 -30
- package/dist/client/components/fields/boolean-field.d.mts.map +0 -1
- package/dist/client/components/fields/boolean-field.mjs.map +0 -1
- package/dist/client/components/fields/custom-field.d.mts +0 -3
- package/dist/client/components/fields/date-field.d.mts +0 -22
- package/dist/client/components/fields/date-field.d.mts.map +0 -1
- package/dist/client/components/fields/date-field.mjs.map +0 -1
- package/dist/client/components/fields/datetime-field.d.mts +0 -23
- package/dist/client/components/fields/datetime-field.d.mts.map +0 -1
- package/dist/client/components/fields/datetime-field.mjs.map +0 -1
- package/dist/client/components/fields/email-field.d.mts +0 -19
- package/dist/client/components/fields/email-field.d.mts.map +0 -1
- package/dist/client/components/fields/email-field.mjs.map +0 -1
- package/dist/client/components/fields/embedded-collection.d.mts +0 -3
- package/dist/client/components/fields/field-types.d.mts +0 -571
- package/dist/client/components/fields/field-types.d.mts.map +0 -1
- package/dist/client/components/fields/field-utils.d.mts +0 -1
- package/dist/client/components/fields/field-utils.mjs.map +0 -1
- package/dist/client/components/fields/field-wrapper.d.mts +0 -3
- package/dist/client/components/fields/field-wrapper.mjs.map +0 -1
- package/dist/client/components/fields/index.d.mts +0 -33
- package/dist/client/components/fields/json-field.d.mts +0 -84
- package/dist/client/components/fields/json-field.d.mts.map +0 -1
- package/dist/client/components/fields/json-field.mjs.map +0 -1
- package/dist/client/components/fields/locale-badge.d.mts +0 -1
- package/dist/client/components/fields/locale-badge.mjs.map +0 -1
- package/dist/client/components/fields/number-field.d.mts +0 -23
- package/dist/client/components/fields/number-field.d.mts.map +0 -1
- package/dist/client/components/fields/number-field.mjs.map +0 -1
- package/dist/client/components/fields/object-array-field.d.mts +0 -2
- package/dist/client/components/fields/object-array-field.mjs.map +0 -1
- package/dist/client/components/fields/object-field.d.mts +0 -32
- package/dist/client/components/fields/object-field.d.mts.map +0 -1
- package/dist/client/components/fields/object-field.mjs.map +0 -1
- package/dist/client/components/fields/relation/displays/cards-display.d.mts +0 -2
- package/dist/client/components/fields/relation/displays/cards-display.mjs.map +0 -1
- package/dist/client/components/fields/relation/displays/chips-display.d.mts +0 -2
- package/dist/client/components/fields/relation/displays/chips-display.mjs.map +0 -1
- package/dist/client/components/fields/relation/displays/grid-display.d.mts +0 -2
- package/dist/client/components/fields/relation/displays/grid-display.mjs.map +0 -1
- package/dist/client/components/fields/relation/displays/index.d.mts +0 -6
- package/dist/client/components/fields/relation/displays/list-display.d.mts +0 -2
- package/dist/client/components/fields/relation/displays/list-display.mjs.map +0 -1
- package/dist/client/components/fields/relation/displays/table-display.d.mts +0 -2
- package/dist/client/components/fields/relation/displays/table-display.mjs.map +0 -1
- package/dist/client/components/fields/relation/displays/types.d.mts +0 -22
- package/dist/client/components/fields/relation/displays/types.d.mts.map +0 -1
- package/dist/client/components/fields/relation/displays/types.mjs.map +0 -1
- package/dist/client/components/fields/relation/index.d.mts +0 -3
- package/dist/client/components/fields/relation/relation-items-display.d.mts +0 -5
- package/dist/client/components/fields/relation/relation-items-display.mjs.map +0 -1
- package/dist/client/components/fields/relation-field.d.mts +0 -134
- package/dist/client/components/fields/relation-field.d.mts.map +0 -1
- package/dist/client/components/fields/relation-field.mjs.map +0 -1
- package/dist/client/components/fields/relation-picker.d.mts +0 -4
- package/dist/client/components/fields/relation-picker.mjs.map +0 -1
- package/dist/client/components/fields/relation-select.d.mts +0 -3
- package/dist/client/components/fields/relation-select.mjs.map +0 -1
- package/dist/client/components/fields/reverse-relation-field.d.mts +0 -2
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/extensions.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/index.d.mts +0 -4
- package/dist/client/components/fields/rich-text-editor/index.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +0 -11
- package/dist/client/components/fields/rich-text-editor/presets.d.mts.map +0 -1
- package/dist/client/components/fields/rich-text-editor/presets.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/table-controls.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/types.d.mts +0 -78
- package/dist/client/components/fields/rich-text-editor/types.d.mts.map +0 -1
- package/dist/client/components/fields/rich-text-editor/types.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/utils.mjs.map +0 -1
- package/dist/client/components/fields/rich-text-editor/variants.d.mts +0 -2
- package/dist/client/components/fields/rich-text-field.d.mts +0 -14
- package/dist/client/components/fields/rich-text-field.d.mts.map +0 -1
- package/dist/client/components/fields/rich-text-field.mjs.map +0 -1
- package/dist/client/components/fields/select-field.d.mts +0 -25
- package/dist/client/components/fields/select-field.d.mts.map +0 -1
- package/dist/client/components/fields/select-field.mjs.map +0 -1
- package/dist/client/components/fields/status-field.d.mts +0 -2
- package/dist/client/components/fields/text-field.d.mts +0 -22
- package/dist/client/components/fields/text-field.d.mts.map +0 -1
- package/dist/client/components/fields/text-field.mjs.map +0 -1
- package/dist/client/components/fields/textarea-field.d.mts +0 -22
- package/dist/client/components/fields/textarea-field.d.mts.map +0 -1
- package/dist/client/components/fields/textarea-field.mjs.map +0 -1
- package/dist/client/components/fields/time-field.d.mts +0 -20
- package/dist/client/components/fields/time-field.d.mts.map +0 -1
- package/dist/client/components/fields/time-field.mjs.map +0 -1
- package/dist/client/components/fields/upload-field.d.mts +0 -97
- package/dist/client/components/fields/upload-field.d.mts.map +0 -1
- package/dist/client/components/fields/upload-field.mjs.map +0 -1
- package/dist/client/components/filter-builder/columns-tab.d.mts +0 -1
- package/dist/client/components/filter-builder/columns-tab.mjs.map +0 -1
- package/dist/client/components/filter-builder/filter-builder-sheet.d.mts +0 -1
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs.map +0 -1
- package/dist/client/components/filter-builder/filters-tab.d.mts +0 -1
- package/dist/client/components/filter-builder/filters-tab.mjs.map +0 -1
- package/dist/client/components/filter-builder/index.d.mts +0 -5
- package/dist/client/components/filter-builder/saved-views-tab.d.mts +0 -1
- package/dist/client/components/filter-builder/saved-views-tab.mjs.map +0 -1
- package/dist/client/components/index.d.mts +0 -80
- package/dist/client/components/locale-switcher.d.mts +0 -2
- package/dist/client/components/locale-switcher.mjs.map +0 -1
- package/dist/client/components/media/media-grid.mjs.map +0 -1
- package/dist/client/components/media/media-picker-dialog.mjs.map +0 -1
- package/dist/client/components/preview/live-preview-mode.mjs.map +0 -1
- package/dist/client/components/preview/preview-pane.mjs.map +0 -1
- package/dist/client/components/primitives/asset-preview.mjs.map +0 -1
- package/dist/client/components/primitives/checkbox-input.mjs.map +0 -1
- package/dist/client/components/primitives/date-input.mjs.map +0 -1
- package/dist/client/components/primitives/dropzone.mjs.map +0 -1
- package/dist/client/components/primitives/number-input.mjs.map +0 -1
- package/dist/client/components/primitives/select-multi.mjs.map +0 -1
- package/dist/client/components/primitives/select-single.mjs.map +0 -1
- package/dist/client/components/primitives/text-input.mjs.map +0 -1
- package/dist/client/components/primitives/textarea-input.mjs.map +0 -1
- package/dist/client/components/primitives/time-input.mjs.map +0 -1
- package/dist/client/components/primitives/toggle-input.mjs.map +0 -1
- package/dist/client/components/primitives/types.d.mts +0 -14
- package/dist/client/components/primitives/types.d.mts.map +0 -1
- package/dist/client/components/primitives/types.mjs.map +0 -1
- package/dist/client/components/sheets/index.d.mts +0 -1
- package/dist/client/components/sheets/resource-sheet.d.mts +0 -1
- package/dist/client/components/sheets/resource-sheet.mjs.map +0 -1
- package/dist/client/components/ui/accordion.d.mts +0 -2
- package/dist/client/components/ui/accordion.mjs.map +0 -1
- package/dist/client/components/ui/alert.mjs.map +0 -1
- package/dist/client/components/ui/avatar.d.mts +0 -3
- package/dist/client/components/ui/badge.d.mts +0 -3
- package/dist/client/components/ui/badge.mjs.map +0 -1
- package/dist/client/components/ui/button.d.mts +0 -3
- package/dist/client/components/ui/button.mjs.map +0 -1
- package/dist/client/components/ui/card.d.mts +0 -2
- package/dist/client/components/ui/card.mjs.map +0 -1
- package/dist/client/components/ui/checkbox.d.mts +0 -2
- package/dist/client/components/ui/checkbox.mjs.map +0 -1
- package/dist/client/components/ui/combobox.d.mts +0 -3
- package/dist/client/components/ui/command.mjs.map +0 -1
- package/dist/client/components/ui/dialog.d.mts +0 -3
- package/dist/client/components/ui/dialog.mjs.map +0 -1
- package/dist/client/components/ui/drawer.mjs.map +0 -1
- package/dist/client/components/ui/dropdown-menu.d.mts +0 -3
- package/dist/client/components/ui/dropdown-menu.mjs.map +0 -1
- package/dist/client/components/ui/empty-state.mjs.map +0 -1
- package/dist/client/components/ui/field.d.mts +0 -3
- package/dist/client/components/ui/field.mjs.map +0 -1
- package/dist/client/components/ui/input-group.d.mts +0 -4
- package/dist/client/components/ui/input-group.mjs.map +0 -1
- package/dist/client/components/ui/input.d.mts +0 -2
- package/dist/client/components/ui/input.mjs.map +0 -1
- package/dist/client/components/ui/kbd.mjs.map +0 -1
- package/dist/client/components/ui/label.d.mts +0 -2
- package/dist/client/components/ui/label.mjs.map +0 -1
- package/dist/client/components/ui/popover.d.mts +0 -3
- package/dist/client/components/ui/popover.mjs.map +0 -1
- package/dist/client/components/ui/responsive-dialog.mjs.map +0 -1
- package/dist/client/components/ui/scroll-area.d.mts +0 -2
- package/dist/client/components/ui/search-input.mjs.map +0 -1
- package/dist/client/components/ui/select.d.mts +0 -3
- package/dist/client/components/ui/select.mjs.map +0 -1
- package/dist/client/components/ui/separator.d.mts +0 -2
- package/dist/client/components/ui/separator.mjs.map +0 -1
- package/dist/client/components/ui/sheet.d.mts +0 -3
- package/dist/client/components/ui/sheet.mjs.map +0 -1
- package/dist/client/components/ui/sidebar.d.mts +0 -8
- package/dist/client/components/ui/sidebar.mjs.map +0 -1
- package/dist/client/components/ui/skeleton.d.mts +0 -1
- package/dist/client/components/ui/skeleton.mjs.map +0 -1
- package/dist/client/components/ui/sonner.d.mts.map +0 -1
- package/dist/client/components/ui/sonner.mjs.map +0 -1
- package/dist/client/components/ui/spinner.d.mts +0 -1
- package/dist/client/components/ui/spinner.mjs.map +0 -1
- package/dist/client/components/ui/switch.d.mts +0 -2
- package/dist/client/components/ui/switch.mjs.map +0 -1
- package/dist/client/components/ui/table.d.mts +0 -2
- package/dist/client/components/ui/table.mjs.map +0 -1
- package/dist/client/components/ui/tabs.d.mts +0 -3
- package/dist/client/components/ui/tabs.mjs.map +0 -1
- package/dist/client/components/ui/textarea.d.mts +0 -2
- package/dist/client/components/ui/textarea.mjs.map +0 -1
- package/dist/client/components/ui/toolbar.mjs.map +0 -1
- package/dist/client/components/ui/tooltip.d.mts +0 -2
- package/dist/client/components/ui/tooltip.mjs.map +0 -1
- package/dist/client/components/widgets/chart-widget.d.mts +0 -57
- package/dist/client/components/widgets/chart-widget.d.mts.map +0 -1
- package/dist/client/components/widgets/chart-widget.mjs.map +0 -1
- package/dist/client/components/widgets/progress-widget.d.mts +0 -41
- package/dist/client/components/widgets/progress-widget.d.mts.map +0 -1
- package/dist/client/components/widgets/progress-widget.mjs.map +0 -1
- package/dist/client/components/widgets/quick-actions-widget.d.mts +0 -29
- package/dist/client/components/widgets/quick-actions-widget.d.mts.map +0 -1
- package/dist/client/components/widgets/quick-actions-widget.mjs.map +0 -1
- package/dist/client/components/widgets/recent-items-widget.d.mts +0 -51
- package/dist/client/components/widgets/recent-items-widget.d.mts.map +0 -1
- package/dist/client/components/widgets/recent-items-widget.mjs.map +0 -1
- package/dist/client/components/widgets/stats-widget.d.mts +0 -55
- package/dist/client/components/widgets/stats-widget.d.mts.map +0 -1
- package/dist/client/components/widgets/stats-widget.mjs.map +0 -1
- package/dist/client/components/widgets/table-widget.d.mts +0 -31
- package/dist/client/components/widgets/table-widget.d.mts.map +0 -1
- package/dist/client/components/widgets/table-widget.mjs.map +0 -1
- package/dist/client/components/widgets/timeline-widget.d.mts +0 -51
- package/dist/client/components/widgets/timeline-widget.d.mts.map +0 -1
- package/dist/client/components/widgets/timeline-widget.mjs.map +0 -1
- package/dist/client/components/widgets/value-widget.d.mts +0 -39
- package/dist/client/components/widgets/value-widget.d.mts.map +0 -1
- package/dist/client/components/widgets/value-widget.mjs.map +0 -1
- package/dist/client/components/widgets/widget-skeletons.mjs.map +0 -1
- package/dist/client/context/focus-context.d.mts.map +0 -1
- package/dist/client/context/focus-context.mjs.map +0 -1
- package/dist/client/contexts/breadcrumb-context.mjs.map +0 -1
- package/dist/client/hooks/typed-hooks.d.mts.map +0 -1
- package/dist/client/hooks/typed-hooks.mjs.map +0 -1
- package/dist/client/hooks/use-action.mjs.map +0 -1
- package/dist/client/hooks/use-admin-config.mjs.map +0 -1
- package/dist/client/hooks/use-admin-preferences.mjs.map +0 -1
- package/dist/client/hooks/use-admin-routes.mjs.map +0 -1
- package/dist/client/hooks/use-auth.d.mts.map +0 -1
- package/dist/client/hooks/use-auth.mjs.map +0 -1
- package/dist/client/hooks/use-collection-fields.mjs.map +0 -1
- package/dist/client/hooks/use-collection-meta.mjs.map +0 -1
- package/dist/client/hooks/use-collection-schema.mjs.map +0 -1
- package/dist/client/hooks/use-collection-validation.mjs.map +0 -1
- package/dist/client/hooks/use-collection.d.mts.map +0 -1
- package/dist/client/hooks/use-collection.mjs.map +0 -1
- package/dist/client/hooks/use-current-user.d.mts.map +0 -1
- package/dist/client/hooks/use-current-user.mjs.map +0 -1
- package/dist/client/hooks/use-field-hooks.mjs.map +0 -1
- package/dist/client/hooks/use-field-options.d.mts.map +0 -1
- package/dist/client/hooks/use-field-options.mjs.map +0 -1
- package/dist/client/hooks/use-global-fields.mjs.map +0 -1
- package/dist/client/hooks/use-global-meta.mjs.map +0 -1
- package/dist/client/hooks/use-global-schema.mjs.map +0 -1
- package/dist/client/hooks/use-global.d.mts.map +0 -1
- package/dist/client/hooks/use-global.mjs.map +0 -1
- package/dist/client/hooks/use-locks.mjs.map +0 -1
- package/dist/client/hooks/use-media-query.d.mts.map +0 -1
- package/dist/client/hooks/use-media-query.mjs.map +0 -1
- package/dist/client/hooks/use-prefill-params.mjs.map +0 -1
- package/dist/client/hooks/use-questpie-query-options.mjs.map +0 -1
- package/dist/client/hooks/use-reactive-fields.d.mts.map +0 -1
- package/dist/client/hooks/use-reactive-fields.mjs.map +0 -1
- package/dist/client/hooks/use-realtime-highlight.mjs.map +0 -1
- package/dist/client/hooks/use-saved-views.mjs.map +0 -1
- package/dist/client/hooks/use-search.mjs.map +0 -1
- package/dist/client/hooks/use-server-validation.mjs.map +0 -1
- package/dist/client/hooks/use-server-widget-data.d.mts.map +0 -1
- package/dist/client/hooks/use-server-widget-data.mjs.map +0 -1
- package/dist/client/hooks/use-setup-status.d.mts.map +0 -1
- package/dist/client/hooks/use-setup-status.mjs.map +0 -1
- package/dist/client/hooks/use-upload-collection.mjs.map +0 -1
- package/dist/client/hooks/use-upload.d.mts +0 -23
- package/dist/client/hooks/use-upload.d.mts.map +0 -1
- package/dist/client/hooks/use-upload.mjs.map +0 -1
- package/dist/client/hooks/use-validation-error-map.mjs.map +0 -1
- package/dist/client/hooks/use-view-state.mjs.map +0 -1
- package/dist/client/i18n/hooks.mjs.map +0 -1
- package/dist/client/i18n/intl-cache.mjs.map +0 -1
- package/dist/client/i18n/messages.mjs.map +0 -1
- package/dist/client/i18n/simple.d.mts.map +0 -1
- package/dist/client/i18n/simple.mjs.map +0 -1
- package/dist/client/i18n/types.d.mts.map +0 -1
- package/dist/client/lib/utils.d.mts +0 -1
- package/dist/client/lib/utils.mjs.map +0 -1
- package/dist/client/preview/block-scope-context.d.mts.map +0 -1
- package/dist/client/preview/block-scope-context.mjs.map +0 -1
- package/dist/client/preview/preview-banner.d.mts.map +0 -1
- package/dist/client/preview/preview-banner.mjs.map +0 -1
- package/dist/client/preview/preview-field.d.mts.map +0 -1
- package/dist/client/preview/preview-field.mjs.map +0 -1
- package/dist/client/preview/types.d.mts.map +0 -1
- package/dist/client/preview/types.mjs.map +0 -1
- package/dist/client/preview/use-collection-preview.d.mts.map +0 -1
- package/dist/client/preview/use-collection-preview.mjs.map +0 -1
- package/dist/client/runtime/content-locales-provider.mjs.map +0 -1
- package/dist/client/runtime/locale-scope.mjs.map +0 -1
- package/dist/client/runtime/provider.d.mts.map +0 -1
- package/dist/client/runtime/provider.mjs.map +0 -1
- package/dist/client/runtime/routes.d.mts.map +0 -1
- package/dist/client/runtime/routes.mjs.map +0 -1
- package/dist/client/runtime/translations-provider.d.mts +0 -2
- package/dist/client/runtime/translations-provider.mjs.map +0 -1
- package/dist/client/scope/picker.d.mts.map +0 -1
- package/dist/client/scope/picker.mjs.map +0 -1
- package/dist/client/scope/provider.d.mts.map +0 -1
- package/dist/client/scope/provider.mjs.map +0 -1
- package/dist/client/scope/types.d.mts.map +0 -1
- package/dist/client/utils/auto-expand-fields.mjs.map +0 -1
- package/dist/client/utils/build-field-definitions-from-schema.mjs.map +0 -1
- package/dist/client/utils/detect-relations.mjs.map +0 -1
- package/dist/client/utils/locale-to-flag.d.mts.map +0 -1
- package/dist/client/utils/locale-to-flag.mjs.map +0 -1
- package/dist/client/utils/routes.mjs.map +0 -1
- package/dist/client/views/auth/accept-invite-form.d.mts.map +0 -1
- package/dist/client/views/auth/accept-invite-form.mjs.map +0 -1
- package/dist/client/views/auth/auth-layout.d.mts.map +0 -1
- package/dist/client/views/auth/auth-layout.mjs.map +0 -1
- package/dist/client/views/auth/forgot-password-form.d.mts.map +0 -1
- package/dist/client/views/auth/forgot-password-form.mjs.map +0 -1
- package/dist/client/views/auth/index.d.mts +0 -7
- package/dist/client/views/auth/invite-form.d.mts +0 -1
- package/dist/client/views/auth/invite-form.mjs.map +0 -1
- package/dist/client/views/auth/login-form.d.mts.map +0 -1
- package/dist/client/views/auth/login-form.mjs.map +0 -1
- package/dist/client/views/auth/reset-password-form.d.mts.map +0 -1
- package/dist/client/views/auth/reset-password-form.mjs.map +0 -1
- package/dist/client/views/auth/setup-form.d.mts.map +0 -1
- package/dist/client/views/auth/setup-form.mjs.map +0 -1
- package/dist/client/views/collection/auto-form-fields.d.mts +0 -4
- package/dist/client/views/collection/auto-form-fields.mjs.map +0 -1
- package/dist/client/views/collection/bulk-action-toolbar.mjs.map +0 -1
- package/dist/client/views/collection/cells/complex-cells.d.mts +0 -46
- package/dist/client/views/collection/cells/complex-cells.d.mts.map +0 -1
- package/dist/client/views/collection/cells/complex-cells.mjs.map +0 -1
- package/dist/client/views/collection/cells/index.d.mts +0 -7
- package/dist/client/views/collection/cells/primitive-cells.d.mts +0 -76
- package/dist/client/views/collection/cells/primitive-cells.d.mts.map +0 -1
- package/dist/client/views/collection/cells/primitive-cells.mjs.map +0 -1
- package/dist/client/views/collection/cells/relation-cells.d.mts +0 -21
- package/dist/client/views/collection/cells/relation-cells.d.mts.map +0 -1
- package/dist/client/views/collection/cells/relation-cells.mjs.map +0 -1
- package/dist/client/views/collection/cells/shared/asset-thumbnail.d.mts +0 -1
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs.map +0 -1
- package/dist/client/views/collection/cells/shared/cell-helpers.d.mts +0 -2
- package/dist/client/views/collection/cells/shared/cell-helpers.mjs.map +0 -1
- package/dist/client/views/collection/cells/shared/relation-chip.d.mts +0 -1
- package/dist/client/views/collection/cells/shared/relation-chip.mjs.map +0 -1
- package/dist/client/views/collection/cells/upload-cells.d.mts +0 -25
- package/dist/client/views/collection/cells/upload-cells.d.mts.map +0 -1
- package/dist/client/views/collection/cells/upload-cells.mjs.map +0 -1
- package/dist/client/views/collection/columns/build-columns.d.mts +0 -2
- package/dist/client/views/collection/columns/build-columns.mjs.map +0 -1
- package/dist/client/views/collection/columns/column-defaults.d.mts +0 -2
- package/dist/client/views/collection/columns/column-defaults.mjs.map +0 -1
- package/dist/client/views/collection/columns/index.d.mts +0 -3
- package/dist/client/views/collection/columns/types.d.mts +0 -2
- package/dist/client/views/collection/field-context.mjs.map +0 -1
- package/dist/client/views/collection/field-renderer.mjs.map +0 -1
- package/dist/client/views/collection/form-view.d.mts +0 -112
- package/dist/client/views/collection/form-view.d.mts.map +0 -1
- package/dist/client/views/collection/form-view.mjs.map +0 -1
- package/dist/client/views/collection/index.d.mts +0 -9
- package/dist/client/views/collection/table-view.d.mts +0 -102
- package/dist/client/views/collection/table-view.d.mts.map +0 -1
- package/dist/client/views/collection/table-view.mjs.map +0 -1
- package/dist/client/views/collection/view-skeletons.mjs.map +0 -1
- package/dist/client/views/common/global-search.d.mts +0 -1
- package/dist/client/views/common/global-search.mjs.map +0 -1
- package/dist/client/views/common/index.d.mts +0 -1
- package/dist/client/views/dashboard/dashboard-grid.mjs.map +0 -1
- package/dist/client/views/dashboard/dashboard-widget.mjs.map +0 -1
- package/dist/client/views/dashboard/widget-card.mjs.map +0 -1
- package/dist/client/views/globals/global-form-view.d.mts +0 -74
- package/dist/client/views/globals/global-form-view.d.mts.map +0 -1
- package/dist/client/views/globals/global-form-view.mjs.map +0 -1
- package/dist/client/views/index.d.mts +0 -28
- package/dist/client/views/layout/admin-layout-provider.d.mts.map +0 -1
- package/dist/client/views/layout/admin-layout-provider.mjs.map +0 -1
- package/dist/client/views/layout/admin-layout.d.mts.map +0 -1
- package/dist/client/views/layout/admin-layout.mjs.map +0 -1
- package/dist/client/views/layout/admin-root.d.mts +0 -7
- package/dist/client/views/layout/admin-router.d.mts.map +0 -1
- package/dist/client/views/layout/admin-router.mjs.map +0 -1
- package/dist/client/views/layout/admin-sidebar.d.mts.map +0 -1
- package/dist/client/views/layout/admin-sidebar.mjs.map +0 -1
- package/dist/client/views/layout/admin-topbar.mjs.map +0 -1
- package/dist/client/views/layout/index.d.mts +0 -5
- package/dist/client/views/pages/accept-invite-page.d.mts.map +0 -1
- package/dist/client/views/pages/accept-invite-page.mjs.map +0 -1
- package/dist/client/views/pages/dashboard-page.d.mts.map +0 -1
- package/dist/client/views/pages/dashboard-page.mjs.map +0 -1
- package/dist/client/views/pages/forgot-password-page.d.mts.map +0 -1
- package/dist/client/views/pages/forgot-password-page.mjs.map +0 -1
- package/dist/client/views/pages/index.d.mts +0 -7
- package/dist/client/views/pages/invite-page.d.mts.map +0 -1
- package/dist/client/views/pages/invite-page.mjs.map +0 -1
- package/dist/client/views/pages/login-page.d.mts.map +0 -1
- package/dist/client/views/pages/login-page.mjs.map +0 -1
- package/dist/client/views/pages/reset-password-page.d.mts.map +0 -1
- package/dist/client/views/pages/reset-password-page.mjs.map +0 -1
- package/dist/client/views/pages/setup-page.d.mts.map +0 -1
- package/dist/client/views/pages/setup-page.mjs.map +0 -1
- package/dist/client.d.mts.map +0 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts.map +0 -1
- package/dist/components/rich-text/rich-text-renderer.mjs.map +0 -1
- package/dist/server/adapters/nextjs.d.mts.map +0 -1
- package/dist/server/adapters/nextjs.mjs.map +0 -1
- package/dist/server/adapters/tanstack.d.mts.map +0 -1
- package/dist/server/adapters/tanstack.mjs.map +0 -1
- package/dist/server/augmentation.d.mts.map +0 -1
- package/dist/server/auth-helpers.d.mts.map +0 -1
- package/dist/server/auth-helpers.mjs.map +0 -1
- package/dist/server/block/block-builder.d.mts.map +0 -1
- package/dist/server/block/block-builder.mjs.map +0 -1
- package/dist/server/block/introspection.d.mts.map +0 -1
- package/dist/server/block/introspection.mjs.map +0 -1
- package/dist/server/block/prefetch.d.mts.map +0 -1
- package/dist/server/block/prefetch.mjs.map +0 -1
- package/dist/server/fields/blocks.d.mts.map +0 -1
- package/dist/server/fields/blocks.mjs.map +0 -1
- package/dist/server/fields/index.d.mts.map +0 -1
- package/dist/server/fields/index.mjs.map +0 -1
- package/dist/server/fields/rich-text.d.mts.map +0 -1
- package/dist/server/fields/rich-text.mjs.map +0 -1
- package/dist/server/i18n/index.d.mts +0 -16
- package/dist/server/i18n/index.d.mts.map +0 -1
- package/dist/server/i18n/index.mjs.map +0 -1
- package/dist/server/i18n/messages/cs.mjs.map +0 -1
- package/dist/server/i18n/messages/de.mjs.map +0 -1
- package/dist/server/i18n/messages/en.mjs.map +0 -1
- package/dist/server/i18n/messages/es.mjs.map +0 -1
- package/dist/server/i18n/messages/fr.mjs.map +0 -1
- package/dist/server/i18n/messages/index.mjs.map +0 -1
- package/dist/server/i18n/messages/pl.mjs.map +0 -1
- package/dist/server/i18n/messages/pt.mjs.map +0 -1
- package/dist/server/i18n/messages/sk.mjs.map +0 -1
- package/dist/server/index.d.mts +0 -20
- package/dist/server/modules/admin/functions/admin-config.mjs +0 -348
- package/dist/server/modules/admin/functions/admin-config.mjs.map +0 -1
- package/dist/server/modules/admin/functions/execute-action.d.mts.map +0 -1
- package/dist/server/modules/admin/functions/execute-action.mjs.map +0 -1
- package/dist/server/modules/admin/functions/locales.mjs +0 -80
- package/dist/server/modules/admin/functions/locales.mjs.map +0 -1
- package/dist/server/modules/admin/functions/preview.d.mts.map +0 -1
- package/dist/server/modules/admin/functions/preview.mjs.map +0 -1
- package/dist/server/modules/admin/functions/reactive.d.mts.map +0 -1
- package/dist/server/modules/admin/functions/reactive.mjs.map +0 -1
- package/dist/server/modules/admin/functions/setup.d.mts.map +0 -1
- package/dist/server/modules/admin/functions/setup.mjs +0 -131
- package/dist/server/modules/admin/functions/setup.mjs.map +0 -1
- package/dist/server/modules/admin/functions/translations.mjs +0 -125
- package/dist/server/modules/admin/functions/translations.mjs.map +0 -1
- package/dist/server/modules/admin/functions/widget-data.d.mts +0 -33
- package/dist/server/modules/admin/functions/widget-data.d.mts.map +0 -1
- package/dist/server/modules/admin/functions/widget-data.mjs +0 -70
- package/dist/server/modules/admin/functions/widget-data.mjs.map +0 -1
- package/dist/server/modules/admin/index.d.mts.map +0 -1
- package/dist/server/modules/admin/index.mjs.map +0 -1
- package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.d.mts +0 -3
- package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.mjs.map +0 -1
- package/dist/server/modules/admin-preferences/collections/locks.collection.d.mts +0 -3
- package/dist/server/modules/admin-preferences/collections/locks.collection.mjs.map +0 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.d.mts +0 -1490
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.d.mts.map +0 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.mjs +0 -57
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.mjs.map +0 -1
- package/dist/server/patch.d.mts +0 -100
- package/dist/server/patch.d.mts.map +0 -1
- package/dist/server/patch.mjs +0 -1062
- package/dist/server/patch.mjs.map +0 -1
- package/dist/shared/preview-utils.d.mts.map +0 -1
- package/dist/shared/preview-utils.mjs.map +0 -1
- package/dist/shared/types/saved-views.types.d.mts.map +0 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import { selectClient, useAdminStore } from "../../runtime/provider.mjs";
|
|
2
|
+
import { useSuspenseAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
3
|
+
import { Card } from "../../components/ui/card.mjs";
|
|
1
4
|
import { parsePrefillParams } from "../../hooks/use-prefill-params.mjs";
|
|
2
|
-
import { useAdminStore } from "../../runtime/provider.mjs";
|
|
3
5
|
import { useCollectionSchema } from "../../hooks/use-collection-schema.mjs";
|
|
6
|
+
import { getCollectionMetaQueryOptions } from "../../hooks/use-collection-meta.mjs";
|
|
4
7
|
import { useGlobalSchema } from "../../hooks/use-global-schema.mjs";
|
|
5
|
-
import {
|
|
8
|
+
import { getGlobalMetaQueryOptions } from "../../hooks/use-global-meta.mjs";
|
|
6
9
|
import { Skeleton } from "../../components/ui/skeleton.mjs";
|
|
7
|
-
import { Card } from "../../components/ui/card.mjs";
|
|
8
10
|
import { DashboardGrid } from "../dashboard/dashboard-grid.mjs";
|
|
11
|
+
import { c } from "react/compiler-runtime";
|
|
9
12
|
import { Icon } from "@iconify/react";
|
|
10
|
-
import * as React
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
11
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
16
|
|
|
13
17
|
//#region src/client/views/layout/admin-router.tsx
|
|
@@ -15,7 +19,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
15
19
|
* AdminRouter Component
|
|
16
20
|
*
|
|
17
21
|
* Handles routing for the admin UI based on URL segments.
|
|
18
|
-
* Uses the view registry to resolve list/
|
|
22
|
+
* Uses the view registry to resolve list/form views dynamically.
|
|
19
23
|
*
|
|
20
24
|
* URL Patterns:
|
|
21
25
|
* - /admin -> Dashboard
|
|
@@ -25,44 +29,96 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
25
29
|
* - /admin/globals/:name -> Global edit
|
|
26
30
|
* - /admin/:customPage -> Custom pages
|
|
27
31
|
*/
|
|
32
|
+
const EMPTY_COLLECTION_COMPONENTS = {};
|
|
33
|
+
const EMPTY_GLOBAL_COMPONENTS = {};
|
|
28
34
|
/**
|
|
29
35
|
* Hook that resolves router configuration using Suspense.
|
|
30
36
|
* Suspends until server config is loaded - no loading checks needed.
|
|
31
37
|
*/
|
|
32
38
|
function useRouterConfig(props) {
|
|
33
|
-
const
|
|
39
|
+
const $ = c(19);
|
|
40
|
+
const admin = useAdminStore(_temp);
|
|
34
41
|
const { data: serverConfig } = useSuspenseAdminConfig();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
let t0;
|
|
43
|
+
if ($[0] !== admin) {
|
|
44
|
+
t0 = admin.getPages();
|
|
45
|
+
$[0] = admin;
|
|
46
|
+
$[1] = t0;
|
|
47
|
+
} else t0 = $[1];
|
|
48
|
+
const storePages = t0;
|
|
49
|
+
let t1;
|
|
50
|
+
if ($[2] !== admin) {
|
|
51
|
+
t1 = admin.getViews();
|
|
52
|
+
$[2] = admin;
|
|
53
|
+
$[3] = t1;
|
|
54
|
+
} else t1 = $[3];
|
|
55
|
+
const storeViews = t1;
|
|
56
|
+
let serverCollections;
|
|
57
|
+
if (props.collections) serverCollections = props.collections;
|
|
58
|
+
else if ($[4] !== serverConfig) {
|
|
59
|
+
serverCollections = {};
|
|
60
|
+
if (serverConfig?.collections) {
|
|
61
|
+
let t2$1;
|
|
62
|
+
if ($[6] !== serverConfig.collections) {
|
|
63
|
+
t2$1 = Object.entries(serverConfig.collections);
|
|
64
|
+
$[6] = serverConfig.collections;
|
|
65
|
+
$[7] = t2$1;
|
|
66
|
+
} else t2$1 = $[7];
|
|
67
|
+
for (const [name, meta] of t2$1) serverCollections[name] = meta ?? {};
|
|
68
|
+
}
|
|
69
|
+
$[4] = serverConfig;
|
|
70
|
+
$[5] = serverCollections;
|
|
71
|
+
} else serverCollections = $[5];
|
|
72
|
+
let serverGlobals;
|
|
73
|
+
if (props.globals) serverGlobals = props.globals;
|
|
74
|
+
else if ($[8] !== serverConfig) {
|
|
75
|
+
serverGlobals = {};
|
|
76
|
+
if (serverConfig?.globals) {
|
|
77
|
+
let t2$1;
|
|
78
|
+
if ($[10] !== serverConfig.globals) {
|
|
79
|
+
t2$1 = Object.entries(serverConfig.globals);
|
|
80
|
+
$[10] = serverConfig.globals;
|
|
81
|
+
$[11] = t2$1;
|
|
82
|
+
} else t2$1 = $[11];
|
|
83
|
+
for (const [name_0, meta_0] of t2$1) serverGlobals[name_0] = meta_0 ?? {};
|
|
84
|
+
}
|
|
85
|
+
$[8] = serverConfig;
|
|
86
|
+
$[9] = serverGlobals;
|
|
87
|
+
} else serverGlobals = $[9];
|
|
88
|
+
serverConfig?.dashboard;
|
|
89
|
+
let t2;
|
|
90
|
+
bb0: {
|
|
52
91
|
const serverDashboard = serverConfig?.dashboard;
|
|
53
|
-
if (serverDashboard?.items?.length)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
92
|
+
if (serverDashboard?.items?.length) {
|
|
93
|
+
t2 = serverDashboard;
|
|
94
|
+
break bb0;
|
|
95
|
+
}
|
|
96
|
+
t2 = props.dashboardConfig;
|
|
97
|
+
}
|
|
98
|
+
const mergedDashboard = t2;
|
|
99
|
+
const t3 = props.pages ?? storePages;
|
|
100
|
+
let t4;
|
|
101
|
+
if ($[12] !== mergedDashboard || $[13] !== props.DashboardComponent || $[14] !== serverCollections || $[15] !== serverGlobals || $[16] !== storeViews || $[17] !== t3) {
|
|
102
|
+
t4 = {
|
|
103
|
+
collections: serverCollections,
|
|
104
|
+
globals: serverGlobals,
|
|
105
|
+
pages: t3,
|
|
106
|
+
views: storeViews,
|
|
107
|
+
dashboardConfig: mergedDashboard,
|
|
108
|
+
DashboardComponent: props.DashboardComponent
|
|
109
|
+
};
|
|
110
|
+
$[12] = mergedDashboard;
|
|
111
|
+
$[13] = props.DashboardComponent;
|
|
112
|
+
$[14] = serverCollections;
|
|
113
|
+
$[15] = serverGlobals;
|
|
114
|
+
$[16] = storeViews;
|
|
115
|
+
$[17] = t3;
|
|
116
|
+
$[18] = t4;
|
|
117
|
+
} else t4 = $[18];
|
|
118
|
+
return t4;
|
|
119
|
+
}
|
|
120
|
+
function _temp(s) {
|
|
121
|
+
return s.admin;
|
|
66
122
|
}
|
|
67
123
|
function matchRoute(segments, _collections = {}, globals = {}, pages = {}) {
|
|
68
124
|
if (segments.length === 0) return { type: "dashboard" };
|
|
@@ -97,24 +153,26 @@ function matchRoute(segments, _collections = {}, globals = {}, pages = {}) {
|
|
|
97
153
|
}
|
|
98
154
|
return { type: "not-found" };
|
|
99
155
|
}
|
|
100
|
-
|
|
101
|
-
|
|
156
|
+
/**
|
|
157
|
+
* Find the first registered view of a given kind from the views registry.
|
|
158
|
+
* Used as a fallback when no explicit view is configured on a collection/global.
|
|
159
|
+
*/
|
|
160
|
+
function findDefaultView(views, kind) {
|
|
161
|
+
for (const [name, def] of Object.entries(views)) if (def && typeof def === "object" && def.kind === kind) return name;
|
|
162
|
+
}
|
|
102
163
|
function getConfiguredViewName(config) {
|
|
103
164
|
if (!config || typeof config !== "object") return void 0;
|
|
104
165
|
const maybeConfig = config;
|
|
105
166
|
if (typeof maybeConfig.view === "string") return maybeConfig.view;
|
|
106
167
|
if (typeof maybeConfig.name === "string") return maybeConfig.name;
|
|
107
|
-
if (typeof maybeConfig.state?.name === "string") return maybeConfig.state.name;
|
|
108
168
|
}
|
|
109
169
|
function getViewLoader(definition) {
|
|
110
170
|
if (!definition || typeof definition !== "object") return void 0;
|
|
111
|
-
|
|
112
|
-
return maybeDefinition.component ?? maybeDefinition.state?.component;
|
|
171
|
+
return definition.component;
|
|
113
172
|
}
|
|
114
173
|
function getViewBaseConfig(definition) {
|
|
115
174
|
if (!definition || typeof definition !== "object") return void 0;
|
|
116
|
-
const
|
|
117
|
-
const config = maybeDefinition["~config"] ?? maybeDefinition.state?.["~config"];
|
|
175
|
+
const config = definition.config;
|
|
118
176
|
if (!config || typeof config !== "object") return void 0;
|
|
119
177
|
return config;
|
|
120
178
|
}
|
|
@@ -135,460 +193,1062 @@ function isDynamicImportLoader(loader) {
|
|
|
135
193
|
return loader.length === 0;
|
|
136
194
|
}
|
|
137
195
|
function ViewLoadingState() {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
className: "
|
|
143
|
-
|
|
144
|
-
|
|
196
|
+
const $ = c(1);
|
|
197
|
+
let t0;
|
|
198
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
199
|
+
t0 = /* @__PURE__ */ jsx("div", {
|
|
200
|
+
className: "text-muted-foreground flex h-64 items-center justify-center",
|
|
201
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
202
|
+
icon: "ph:spinner-gap",
|
|
203
|
+
className: "size-6 animate-spin"
|
|
204
|
+
})
|
|
205
|
+
});
|
|
206
|
+
$[0] = t0;
|
|
207
|
+
} else t0 = $[0];
|
|
208
|
+
return t0;
|
|
145
209
|
}
|
|
146
|
-
function UnknownViewState(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
210
|
+
function UnknownViewState(t0) {
|
|
211
|
+
const $ = c(7);
|
|
212
|
+
const { viewKind, viewId } = t0;
|
|
213
|
+
let t1;
|
|
214
|
+
if ($[0] !== viewKind) {
|
|
215
|
+
t1 = /* @__PURE__ */ jsxs("h1", {
|
|
216
|
+
className: "text-lg font-semibold",
|
|
217
|
+
children: [
|
|
218
|
+
"Unknown ",
|
|
219
|
+
viewKind,
|
|
220
|
+
" view"
|
|
221
|
+
]
|
|
222
|
+
});
|
|
223
|
+
$[0] = viewKind;
|
|
224
|
+
$[1] = t1;
|
|
225
|
+
} else t1 = $[1];
|
|
226
|
+
let t2;
|
|
227
|
+
if ($[2] !== viewId) {
|
|
228
|
+
t2 = /* @__PURE__ */ jsxs("p", {
|
|
229
|
+
className: "text-muted-foreground mt-2 text-sm",
|
|
230
|
+
children: [
|
|
231
|
+
"View \"",
|
|
232
|
+
viewId,
|
|
233
|
+
"\" is not registered in the admin view registry."
|
|
234
|
+
]
|
|
235
|
+
});
|
|
236
|
+
$[2] = viewId;
|
|
237
|
+
$[3] = t2;
|
|
238
|
+
} else t2 = $[3];
|
|
239
|
+
let t3;
|
|
240
|
+
if ($[4] !== t1 || $[5] !== t2) {
|
|
241
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
242
|
+
className: "container",
|
|
243
|
+
children: /* @__PURE__ */ jsxs(Card, {
|
|
244
|
+
className: "border-warning/30 bg-warning/5 p-6",
|
|
245
|
+
children: [t1, t2]
|
|
246
|
+
})
|
|
247
|
+
});
|
|
248
|
+
$[4] = t1;
|
|
249
|
+
$[5] = t2;
|
|
250
|
+
$[6] = t3;
|
|
251
|
+
} else t3 = $[6];
|
|
252
|
+
return t3;
|
|
168
253
|
}
|
|
169
254
|
/**
|
|
170
255
|
* Skeleton shown while router config is loading (Suspense fallback)
|
|
171
256
|
*/
|
|
172
257
|
function RouterSkeleton() {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
258
|
+
const $ = c(3);
|
|
259
|
+
let t0;
|
|
260
|
+
let t1;
|
|
261
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
262
|
+
t0 = /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-48" });
|
|
263
|
+
t1 = /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" });
|
|
264
|
+
$[0] = t0;
|
|
265
|
+
$[1] = t1;
|
|
266
|
+
} else {
|
|
267
|
+
t0 = $[0];
|
|
268
|
+
t1 = $[1];
|
|
269
|
+
}
|
|
270
|
+
let t2;
|
|
271
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
272
|
+
t2 = /* @__PURE__ */ jsxs("div", {
|
|
273
|
+
className: "qa-router-skeleton container space-y-4 py-6",
|
|
274
|
+
children: [
|
|
275
|
+
t0,
|
|
276
|
+
t1,
|
|
277
|
+
/* @__PURE__ */ jsxs("div", {
|
|
278
|
+
className: "space-y-2",
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-12 w-full" }),
|
|
281
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-12 w-full" }),
|
|
282
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-12 w-full" })
|
|
283
|
+
]
|
|
284
|
+
})
|
|
285
|
+
]
|
|
286
|
+
});
|
|
287
|
+
$[2] = t2;
|
|
288
|
+
} else t2 = $[2];
|
|
289
|
+
return t2;
|
|
188
290
|
}
|
|
189
|
-
function
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
let mounted = true;
|
|
213
|
-
setState((prev) => ({
|
|
214
|
-
...prev,
|
|
291
|
+
function shallowEqualComponentProps(a, b) {
|
|
292
|
+
if (a === b) return true;
|
|
293
|
+
const aKeys = Object.keys(a);
|
|
294
|
+
const bKeys = Object.keys(b);
|
|
295
|
+
if (aKeys.length !== bKeys.length) return false;
|
|
296
|
+
for (const key of aKeys) if (a[key] !== b[key]) return false;
|
|
297
|
+
return true;
|
|
298
|
+
}
|
|
299
|
+
function areRegistryViewRendererPropsEqual(prev, next) {
|
|
300
|
+
if (prev.loader !== next.loader) return false;
|
|
301
|
+
if (prev.viewKind !== next.viewKind) return false;
|
|
302
|
+
if (prev.viewId !== next.viewId) return false;
|
|
303
|
+
return shallowEqualComponentProps(prev.componentProps, next.componentProps);
|
|
304
|
+
}
|
|
305
|
+
const RegistryViewRenderer = React.memo(function RegistryViewRenderer$1(t0) {
|
|
306
|
+
const $ = c(12);
|
|
307
|
+
const { loader, componentProps, viewKind, viewId } = t0;
|
|
308
|
+
let t1;
|
|
309
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
310
|
+
t1 = {
|
|
311
|
+
Component: null,
|
|
215
312
|
loading: true,
|
|
216
313
|
error: null
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
314
|
+
};
|
|
315
|
+
$[0] = t1;
|
|
316
|
+
} else t1 = $[0];
|
|
317
|
+
const [state, setState] = React.useState(t1);
|
|
318
|
+
let t2;
|
|
319
|
+
let t3;
|
|
320
|
+
if ($[1] !== loader) {
|
|
321
|
+
t2 = () => {
|
|
322
|
+
if (!loader) {
|
|
222
323
|
setState({
|
|
223
|
-
Component:
|
|
324
|
+
Component: null,
|
|
224
325
|
loading: false,
|
|
225
326
|
error: null
|
|
226
327
|
});
|
|
227
|
-
|
|
228
|
-
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
if (!isDynamicImportLoader(loader)) {
|
|
229
331
|
setState({
|
|
230
|
-
Component:
|
|
332
|
+
Component: loader,
|
|
231
333
|
loading: false,
|
|
232
|
-
error:
|
|
334
|
+
error: null
|
|
233
335
|
});
|
|
336
|
+
return;
|
|
234
337
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
338
|
+
let mounted = true;
|
|
339
|
+
setState(_temp2);
|
|
340
|
+
(async () => {
|
|
341
|
+
try {
|
|
342
|
+
const result = await loader();
|
|
343
|
+
if (!mounted) return;
|
|
344
|
+
let Component;
|
|
345
|
+
if (result.default) Component = result.default;
|
|
346
|
+
else Component = result;
|
|
347
|
+
setState({
|
|
348
|
+
Component,
|
|
349
|
+
loading: false,
|
|
350
|
+
error: null
|
|
351
|
+
});
|
|
352
|
+
} catch (t4$1) {
|
|
353
|
+
const error = t4$1;
|
|
354
|
+
if (!mounted) return;
|
|
355
|
+
let resolvedError;
|
|
356
|
+
if (error instanceof Error) resolvedError = error;
|
|
357
|
+
else resolvedError = /* @__PURE__ */ new Error("Failed to load view component");
|
|
358
|
+
setState({
|
|
359
|
+
Component: null,
|
|
360
|
+
loading: false,
|
|
361
|
+
error: resolvedError
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
})();
|
|
365
|
+
return () => {
|
|
366
|
+
mounted = false;
|
|
367
|
+
};
|
|
238
368
|
};
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
369
|
+
t3 = [loader];
|
|
370
|
+
$[1] = loader;
|
|
371
|
+
$[2] = t2;
|
|
372
|
+
$[3] = t3;
|
|
373
|
+
} else {
|
|
374
|
+
t2 = $[2];
|
|
375
|
+
t3 = $[3];
|
|
376
|
+
}
|
|
377
|
+
React.useEffect(t2, t3);
|
|
378
|
+
if (state.loading) {
|
|
379
|
+
let t4$1;
|
|
380
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
381
|
+
t4$1 = /* @__PURE__ */ jsx(ViewLoadingState, {});
|
|
382
|
+
$[4] = t4$1;
|
|
383
|
+
} else t4$1 = $[4];
|
|
384
|
+
return t4$1;
|
|
385
|
+
}
|
|
386
|
+
if (state.error || !state.Component) {
|
|
387
|
+
let t4$1;
|
|
388
|
+
if ($[5] !== viewId || $[6] !== viewKind) {
|
|
389
|
+
t4$1 = /* @__PURE__ */ jsx(UnknownViewState, {
|
|
390
|
+
viewKind,
|
|
391
|
+
viewId
|
|
392
|
+
});
|
|
393
|
+
$[5] = viewId;
|
|
394
|
+
$[6] = viewKind;
|
|
395
|
+
$[7] = t4$1;
|
|
396
|
+
} else t4$1 = $[7];
|
|
397
|
+
return t4$1;
|
|
398
|
+
}
|
|
399
|
+
const Component_0 = state.Component;
|
|
400
|
+
let t4;
|
|
401
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
402
|
+
t4 = /* @__PURE__ */ jsx(ViewLoadingState, {});
|
|
403
|
+
$[8] = t4;
|
|
404
|
+
} else t4 = $[8];
|
|
405
|
+
let t5;
|
|
406
|
+
if ($[9] !== Component_0 || $[10] !== componentProps) {
|
|
407
|
+
t5 = /* @__PURE__ */ jsx(React.Suspense, {
|
|
408
|
+
fallback: t4,
|
|
409
|
+
children: /* @__PURE__ */ jsx(Component_0, { ...componentProps })
|
|
410
|
+
});
|
|
411
|
+
$[9] = Component_0;
|
|
412
|
+
$[10] = componentProps;
|
|
413
|
+
$[11] = t5;
|
|
414
|
+
} else t5 = $[11];
|
|
415
|
+
return t5;
|
|
416
|
+
}, areRegistryViewRendererPropsEqual);
|
|
417
|
+
function DefaultDashboard() {
|
|
418
|
+
const $ = c(4);
|
|
419
|
+
let t0;
|
|
420
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
421
|
+
t0 = (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
|
|
422
|
+
weekday: "long",
|
|
423
|
+
year: "numeric",
|
|
424
|
+
month: "long",
|
|
425
|
+
day: "numeric"
|
|
426
|
+
});
|
|
427
|
+
$[0] = t0;
|
|
428
|
+
} else t0 = $[0];
|
|
429
|
+
const date = t0;
|
|
430
|
+
let t1;
|
|
431
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
432
|
+
t1 = /* @__PURE__ */ jsx("div", {
|
|
261
433
|
className: "mb-8 flex items-end justify-between",
|
|
262
434
|
children: /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h1", {
|
|
263
435
|
className: "text-3xl font-bold tracking-tight",
|
|
264
|
-
children:
|
|
265
|
-
}),
|
|
266
|
-
className: "text-muted-foreground mt-1 font-mono text-xs
|
|
436
|
+
children: "Dashboard"
|
|
437
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
438
|
+
className: "text-muted-foreground mt-1 font-mono text-xs tracking-widest uppercase",
|
|
267
439
|
children: date
|
|
268
440
|
})] })
|
|
269
|
-
})
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
441
|
+
});
|
|
442
|
+
$[1] = t1;
|
|
443
|
+
} else t1 = $[1];
|
|
444
|
+
let t2;
|
|
445
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
446
|
+
t2 = /* @__PURE__ */ jsx("div", { className: "bg-primary/10 absolute -top-12 -right-12 h-32 w-32 rounded-full blur-3xl" });
|
|
447
|
+
$[2] = t2;
|
|
448
|
+
} else t2 = $[2];
|
|
449
|
+
let t3;
|
|
450
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
451
|
+
t3 = /* @__PURE__ */ jsxs("div", {
|
|
452
|
+
className: "qa-default-dashboard container",
|
|
453
|
+
children: [t1, /* @__PURE__ */ jsx("div", {
|
|
454
|
+
className: "grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",
|
|
455
|
+
children: /* @__PURE__ */ jsxs(Card, {
|
|
456
|
+
className: "relative overflow-hidden p-6",
|
|
457
|
+
children: [t2, /* @__PURE__ */ jsxs("div", {
|
|
458
|
+
className: "relative",
|
|
459
|
+
children: [
|
|
460
|
+
/* @__PURE__ */ jsxs("div", {
|
|
461
|
+
className: "mb-4 flex items-center gap-3",
|
|
462
|
+
children: [/* @__PURE__ */ jsx("div", { className: "bg-primary h-2 w-2 rounded-full" }), /* @__PURE__ */ jsx("h3", {
|
|
463
|
+
className: "text-primary font-mono text-xs font-bold tracking-widest uppercase",
|
|
464
|
+
children: "System Status"
|
|
465
|
+
})]
|
|
466
|
+
}),
|
|
467
|
+
/* @__PURE__ */ jsx("h2", {
|
|
468
|
+
className: "mb-2 text-xl font-bold",
|
|
469
|
+
children: "Welcome back"
|
|
470
|
+
}),
|
|
471
|
+
/* @__PURE__ */ jsx("p", {
|
|
472
|
+
className: "text-muted-foreground text-sm leading-relaxed",
|
|
473
|
+
children: "Select a collection from the sidebar to manage your content."
|
|
474
|
+
})
|
|
475
|
+
]
|
|
476
|
+
})]
|
|
477
|
+
})
|
|
478
|
+
})]
|
|
479
|
+
});
|
|
480
|
+
$[3] = t3;
|
|
481
|
+
} else t3 = $[3];
|
|
482
|
+
return t3;
|
|
296
483
|
}
|
|
297
484
|
function DefaultNotFound() {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
485
|
+
const $ = c(1);
|
|
486
|
+
let t0;
|
|
487
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
488
|
+
t0 = /* @__PURE__ */ jsxs("div", {
|
|
489
|
+
className: "qa-not-found container",
|
|
490
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
491
|
+
className: "mb-4 text-2xl font-bold",
|
|
492
|
+
children: "Page Not Found"
|
|
493
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
494
|
+
className: "text-muted-foreground",
|
|
495
|
+
children: "The page you're looking for doesn't exist."
|
|
496
|
+
})]
|
|
497
|
+
});
|
|
498
|
+
$[0] = t0;
|
|
499
|
+
} else t0 = $[0];
|
|
500
|
+
return t0;
|
|
308
501
|
}
|
|
309
|
-
function RestrictedAccess(
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
502
|
+
function RestrictedAccess(t0) {
|
|
503
|
+
const $ = c(18);
|
|
504
|
+
const { type, name, navigate, basePath } = t0;
|
|
505
|
+
let t1;
|
|
506
|
+
let t2;
|
|
507
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
508
|
+
t1 = /* @__PURE__ */ jsx("div", { className: "bg-muted absolute -top-16 -right-16 h-40 w-40 rounded-full blur-3xl" });
|
|
509
|
+
t2 = /* @__PURE__ */ jsx("div", { className: "bg-muted absolute -bottom-16 -left-16 h-40 w-40 rounded-full blur-3xl" });
|
|
510
|
+
$[0] = t1;
|
|
511
|
+
$[1] = t2;
|
|
512
|
+
} else {
|
|
513
|
+
t1 = $[0];
|
|
514
|
+
t2 = $[1];
|
|
515
|
+
}
|
|
516
|
+
let t3;
|
|
517
|
+
let t4;
|
|
518
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
519
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
520
|
+
className: "bg-muted mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-full",
|
|
521
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
522
|
+
icon: "ph:lock-simple",
|
|
523
|
+
className: "text-muted-foreground h-8 w-8"
|
|
524
|
+
})
|
|
525
|
+
});
|
|
526
|
+
t4 = /* @__PURE__ */ jsx("h1", {
|
|
527
|
+
className: "mb-2 text-xl font-semibold",
|
|
528
|
+
children: "Access Restricted"
|
|
529
|
+
});
|
|
530
|
+
$[2] = t3;
|
|
531
|
+
$[3] = t4;
|
|
532
|
+
} else {
|
|
533
|
+
t3 = $[2];
|
|
534
|
+
t4 = $[3];
|
|
535
|
+
}
|
|
536
|
+
let t5;
|
|
537
|
+
if ($[4] !== name) {
|
|
538
|
+
t5 = /* @__PURE__ */ jsxs("span", {
|
|
539
|
+
className: "text-foreground font-mono",
|
|
314
540
|
children: [
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
children: [
|
|
334
|
-
"The ",
|
|
335
|
-
type,
|
|
336
|
-
" ",
|
|
337
|
-
/* @__PURE__ */ jsxs("span", {
|
|
338
|
-
className: "font-mono text-foreground",
|
|
339
|
-
children: [
|
|
340
|
-
"\"",
|
|
341
|
-
name,
|
|
342
|
-
"\""
|
|
343
|
-
]
|
|
344
|
-
}),
|
|
345
|
-
" is not available in the admin panel. It may be hidden or you don't have permission to access it."
|
|
346
|
-
]
|
|
347
|
-
}),
|
|
348
|
-
/* @__PURE__ */ jsxs("button", {
|
|
349
|
-
type: "button",
|
|
350
|
-
onClick: () => navigate(basePath),
|
|
351
|
-
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",
|
|
352
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
353
|
-
icon: "ph:arrow-left",
|
|
354
|
-
className: "h-4 w-4"
|
|
355
|
-
}), "Back to Dashboard"]
|
|
356
|
-
})
|
|
357
|
-
]
|
|
358
|
-
})
|
|
541
|
+
"\"",
|
|
542
|
+
name,
|
|
543
|
+
"\""
|
|
544
|
+
]
|
|
545
|
+
});
|
|
546
|
+
$[4] = name;
|
|
547
|
+
$[5] = t5;
|
|
548
|
+
} else t5 = $[5];
|
|
549
|
+
let t6;
|
|
550
|
+
if ($[6] !== t5 || $[7] !== type) {
|
|
551
|
+
t6 = /* @__PURE__ */ jsxs("p", {
|
|
552
|
+
className: "text-muted-foreground mb-6 text-sm",
|
|
553
|
+
children: [
|
|
554
|
+
"The ",
|
|
555
|
+
type,
|
|
556
|
+
" ",
|
|
557
|
+
t5,
|
|
558
|
+
" is not available in the admin panel. It may be hidden or you don't have permission to access it."
|
|
359
559
|
]
|
|
360
|
-
})
|
|
361
|
-
|
|
560
|
+
});
|
|
561
|
+
$[6] = t5;
|
|
562
|
+
$[7] = type;
|
|
563
|
+
$[8] = t6;
|
|
564
|
+
} else t6 = $[8];
|
|
565
|
+
let t7;
|
|
566
|
+
if ($[9] !== basePath || $[10] !== navigate) {
|
|
567
|
+
t7 = () => navigate(basePath);
|
|
568
|
+
$[9] = basePath;
|
|
569
|
+
$[10] = navigate;
|
|
570
|
+
$[11] = t7;
|
|
571
|
+
} else t7 = $[11];
|
|
572
|
+
let t8;
|
|
573
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
574
|
+
t8 = /* @__PURE__ */ jsx(Icon, {
|
|
575
|
+
icon: "ph:arrow-left",
|
|
576
|
+
className: "h-4 w-4"
|
|
577
|
+
});
|
|
578
|
+
$[12] = t8;
|
|
579
|
+
} else t8 = $[12];
|
|
580
|
+
let t9;
|
|
581
|
+
if ($[13] !== t7) {
|
|
582
|
+
t9 = /* @__PURE__ */ jsxs("button", {
|
|
583
|
+
type: "button",
|
|
584
|
+
onClick: t7,
|
|
585
|
+
className: "bg-primary text-primary-foreground hover:bg-primary/90 inline-flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors",
|
|
586
|
+
children: [t8, "Back to Dashboard"]
|
|
587
|
+
});
|
|
588
|
+
$[13] = t7;
|
|
589
|
+
$[14] = t9;
|
|
590
|
+
} else t9 = $[14];
|
|
591
|
+
let t10;
|
|
592
|
+
if ($[15] !== t6 || $[16] !== t9) {
|
|
593
|
+
t10 = /* @__PURE__ */ jsx("div", {
|
|
594
|
+
className: "qa-restricted-access container py-12",
|
|
595
|
+
children: /* @__PURE__ */ jsxs(Card, {
|
|
596
|
+
className: "relative mx-auto max-w-lg overflow-hidden p-8 text-center",
|
|
597
|
+
children: [
|
|
598
|
+
t1,
|
|
599
|
+
t2,
|
|
600
|
+
/* @__PURE__ */ jsxs("div", {
|
|
601
|
+
className: "relative",
|
|
602
|
+
children: [
|
|
603
|
+
t3,
|
|
604
|
+
t4,
|
|
605
|
+
t6,
|
|
606
|
+
t9
|
|
607
|
+
]
|
|
608
|
+
})
|
|
609
|
+
]
|
|
610
|
+
})
|
|
611
|
+
});
|
|
612
|
+
$[15] = t6;
|
|
613
|
+
$[16] = t9;
|
|
614
|
+
$[17] = t10;
|
|
615
|
+
} else t10 = $[17];
|
|
616
|
+
return t10;
|
|
362
617
|
}
|
|
363
|
-
function LazyPageRenderer(
|
|
364
|
-
const
|
|
365
|
-
const
|
|
366
|
-
const [
|
|
367
|
-
React
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
618
|
+
function LazyPageRenderer(t0) {
|
|
619
|
+
const $ = c(9);
|
|
620
|
+
const { config } = t0;
|
|
621
|
+
const [Component, setComponent] = React.useState(null);
|
|
622
|
+
const [loading, setLoading] = React.useState(true);
|
|
623
|
+
const [error, setError] = React.useState(null);
|
|
624
|
+
let t1;
|
|
625
|
+
let t2;
|
|
626
|
+
if ($[0] !== config.component) {
|
|
627
|
+
t1 = () => {
|
|
628
|
+
let mounted = true;
|
|
629
|
+
(async function load() {
|
|
630
|
+
try {
|
|
631
|
+
if (typeof config.component === "function") {
|
|
632
|
+
const result = config.component();
|
|
633
|
+
let isThenable = false;
|
|
634
|
+
if (result != null) {
|
|
635
|
+
if (typeof result.then === "function") isThenable = true;
|
|
636
|
+
}
|
|
637
|
+
if (isThenable) {
|
|
638
|
+
const mod = await result;
|
|
639
|
+
if (mounted) {
|
|
640
|
+
let resolved;
|
|
641
|
+
if (mod.default) resolved = mod.default;
|
|
642
|
+
else resolved = mod;
|
|
643
|
+
setComponent(() => resolved);
|
|
644
|
+
}
|
|
645
|
+
} else if (mounted) setComponent(() => config.component);
|
|
646
|
+
} else if (config.component) {
|
|
647
|
+
if (mounted) setComponent(() => config.component);
|
|
648
|
+
}
|
|
649
|
+
if (mounted) setLoading(false);
|
|
650
|
+
} catch (t3$1) {
|
|
651
|
+
const err = t3$1;
|
|
652
|
+
if (mounted) {
|
|
653
|
+
let resolvedError;
|
|
654
|
+
if (err instanceof Error) resolvedError = err;
|
|
655
|
+
else resolvedError = /* @__PURE__ */ new Error("Failed to load");
|
|
656
|
+
setError(resolvedError);
|
|
657
|
+
}
|
|
658
|
+
if (mounted) setLoading(false);
|
|
379
659
|
}
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
load();
|
|
387
|
-
return () => {
|
|
388
|
-
mounted = false;
|
|
660
|
+
})();
|
|
661
|
+
return () => {
|
|
662
|
+
mounted = false;
|
|
663
|
+
};
|
|
389
664
|
};
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
665
|
+
t2 = [config.component];
|
|
666
|
+
$[0] = config.component;
|
|
667
|
+
$[1] = t1;
|
|
668
|
+
$[2] = t2;
|
|
669
|
+
} else {
|
|
670
|
+
t1 = $[1];
|
|
671
|
+
t2 = $[2];
|
|
672
|
+
}
|
|
673
|
+
React.useEffect(t1, t2);
|
|
674
|
+
if (loading) {
|
|
675
|
+
let t3$1;
|
|
676
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
677
|
+
t3$1 = /* @__PURE__ */ jsx("div", {
|
|
678
|
+
className: "text-muted-foreground flex h-64 items-center justify-center",
|
|
679
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
680
|
+
icon: "ph:spinner-gap",
|
|
681
|
+
className: "size-6 animate-spin"
|
|
682
|
+
})
|
|
683
|
+
});
|
|
684
|
+
$[3] = t3$1;
|
|
685
|
+
} else t3$1 = $[3];
|
|
686
|
+
return t3$1;
|
|
687
|
+
}
|
|
688
|
+
if (error) {
|
|
689
|
+
let t3$1;
|
|
690
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
691
|
+
t3$1 = /* @__PURE__ */ jsx("h1", {
|
|
692
|
+
className: "text-destructive mb-4 text-2xl font-bold",
|
|
693
|
+
children: "Error"
|
|
694
|
+
});
|
|
695
|
+
$[4] = t3$1;
|
|
696
|
+
} else t3$1 = $[4];
|
|
697
|
+
let t4;
|
|
698
|
+
if ($[5] !== error.message) {
|
|
699
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
700
|
+
className: "container",
|
|
701
|
+
children: [t3$1, /* @__PURE__ */ jsx("p", {
|
|
702
|
+
className: "text-muted-foreground",
|
|
703
|
+
children: error.message
|
|
704
|
+
})]
|
|
705
|
+
});
|
|
706
|
+
$[5] = error.message;
|
|
707
|
+
$[6] = t4;
|
|
708
|
+
} else t4 = $[6];
|
|
709
|
+
return t4;
|
|
710
|
+
}
|
|
711
|
+
let t3;
|
|
712
|
+
if ($[7] !== Component) {
|
|
713
|
+
t3 = Component ? /* @__PURE__ */ jsx(Component, {}) : /* @__PURE__ */ jsx(DefaultNotFound, {});
|
|
714
|
+
$[7] = Component;
|
|
715
|
+
$[8] = t3;
|
|
716
|
+
} else t3 = $[8];
|
|
717
|
+
return t3;
|
|
409
718
|
}
|
|
410
719
|
/**
|
|
411
720
|
* AdminRouter Component
|
|
412
721
|
*
|
|
413
722
|
* Routes to the appropriate view based on URL segments.
|
|
414
|
-
* Uses the view registry to resolve list/edit views dynamically.
|
|
415
|
-
*
|
|
416
|
-
* When used inside AdminProvider, collections/globals/pages are automatically
|
|
417
|
-
* read from context if not provided as props.
|
|
418
|
-
*
|
|
419
|
-
* @example
|
|
420
|
-
* ```tsx
|
|
421
|
-
* // With AdminProvider (automatic)
|
|
422
|
-
* <AdminProvider admin={admin} client={client}>
|
|
423
|
-
* <AdminRouter segments={segments} navigate={navigate} />
|
|
424
|
-
* </AdminProvider>
|
|
425
|
-
*
|
|
426
|
-
* // Without AdminProvider (manual)
|
|
427
|
-
* <AdminRouter
|
|
428
|
-
* segments={segments}
|
|
429
|
-
* navigate={navigate}
|
|
430
|
-
* collections={collections}
|
|
431
|
-
* globals={globals}
|
|
432
|
-
* />
|
|
433
|
-
* ```
|
|
434
|
-
*/
|
|
435
|
-
/**
|
|
436
|
-
* AdminRouter Component
|
|
437
|
-
*
|
|
438
|
-
* Routes to the appropriate view based on URL segments.
|
|
439
723
|
* Uses Suspense internally - shows skeleton while config loads.
|
|
440
724
|
*/
|
|
441
725
|
function AdminRouter(props) {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
726
|
+
const $ = c(3);
|
|
727
|
+
let t0;
|
|
728
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
729
|
+
t0 = /* @__PURE__ */ jsx(RouterSkeleton, {});
|
|
730
|
+
$[0] = t0;
|
|
731
|
+
} else t0 = $[0];
|
|
732
|
+
let t1;
|
|
733
|
+
if ($[1] !== props) {
|
|
734
|
+
t1 = /* @__PURE__ */ jsx(React.Suspense, {
|
|
735
|
+
fallback: t0,
|
|
736
|
+
children: /* @__PURE__ */ jsx(AdminRouterInner, { ...props })
|
|
737
|
+
});
|
|
738
|
+
$[1] = props;
|
|
739
|
+
$[2] = t1;
|
|
740
|
+
} else t1 = $[2];
|
|
741
|
+
return t1;
|
|
446
742
|
}
|
|
447
743
|
/**
|
|
448
744
|
* Inner router component that uses Suspense for data loading.
|
|
449
745
|
* Guaranteed to have config loaded when rendering.
|
|
450
746
|
*/
|
|
451
|
-
function AdminRouterInner(
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
747
|
+
function AdminRouterInner(t0) {
|
|
748
|
+
const $ = c(134);
|
|
749
|
+
const { segments, navigate, basePath: t1, searchParams: searchParamsProp, collections: collectionsProp, globals: globalsProp, pages: pagesProp, DashboardComponent: DashboardComponentProp, dashboardConfig: dashboardConfigProp, collectionComponents, globalComponents, registry, NotFoundComponent } = t0;
|
|
750
|
+
const basePath = t1 === void 0 ? "/admin" : t1;
|
|
751
|
+
const resolvedCollectionComponents = collectionComponents ?? EMPTY_COLLECTION_COMPONENTS;
|
|
752
|
+
const resolvedGlobalComponents = globalComponents ?? EMPTY_GLOBAL_COMPONENTS;
|
|
753
|
+
let t2;
|
|
754
|
+
bb0: {
|
|
755
|
+
if (searchParamsProp) {
|
|
756
|
+
t2 = searchParamsProp;
|
|
757
|
+
break bb0;
|
|
758
|
+
}
|
|
759
|
+
if (typeof window !== "undefined") {
|
|
760
|
+
let t3$2;
|
|
761
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
762
|
+
t3$2 = new URLSearchParams(window.location.search);
|
|
763
|
+
$[0] = t3$2;
|
|
764
|
+
} else t3$2 = $[0];
|
|
765
|
+
t2 = t3$2;
|
|
766
|
+
break bb0;
|
|
767
|
+
}
|
|
768
|
+
let t3$1;
|
|
769
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
770
|
+
t3$1 = new URLSearchParams();
|
|
771
|
+
$[1] = t3$1;
|
|
772
|
+
} else t3$1 = $[1];
|
|
773
|
+
t2 = t3$1;
|
|
774
|
+
}
|
|
775
|
+
const searchParams = t2;
|
|
776
|
+
let t3;
|
|
777
|
+
if ($[2] !== searchParams) {
|
|
778
|
+
t3 = parsePrefillParams(searchParams);
|
|
779
|
+
$[2] = searchParams;
|
|
780
|
+
$[3] = t3;
|
|
781
|
+
} else t3 = $[3];
|
|
782
|
+
const prefillValues = t3;
|
|
783
|
+
let t4;
|
|
784
|
+
if ($[4] !== DashboardComponentProp || $[5] !== collectionsProp || $[6] !== dashboardConfigProp || $[7] !== globalsProp || $[8] !== pagesProp) {
|
|
785
|
+
t4 = {
|
|
786
|
+
collections: collectionsProp,
|
|
787
|
+
globals: globalsProp,
|
|
788
|
+
pages: pagesProp,
|
|
789
|
+
dashboardConfig: dashboardConfigProp,
|
|
790
|
+
DashboardComponent: DashboardComponentProp
|
|
791
|
+
};
|
|
792
|
+
$[4] = DashboardComponentProp;
|
|
793
|
+
$[5] = collectionsProp;
|
|
794
|
+
$[6] = dashboardConfigProp;
|
|
795
|
+
$[7] = globalsProp;
|
|
796
|
+
$[8] = pagesProp;
|
|
797
|
+
$[9] = t4;
|
|
798
|
+
} else t4 = $[9];
|
|
799
|
+
const { collections, globals, pages, views, dashboardConfig, DashboardComponent } = useRouterConfig(t4);
|
|
800
|
+
let t5;
|
|
801
|
+
if ($[10] !== collections || $[11] !== globals || $[12] !== pages || $[13] !== segments) {
|
|
802
|
+
t5 = matchRoute(segments, collections, globals, pages);
|
|
803
|
+
$[10] = collections;
|
|
804
|
+
$[11] = globals;
|
|
805
|
+
$[12] = pages;
|
|
806
|
+
$[13] = segments;
|
|
807
|
+
$[14] = t5;
|
|
808
|
+
} else t5 = $[14];
|
|
809
|
+
const route = t5;
|
|
467
810
|
const activeCollectionName = route.type === "collection-list" || route.type === "collection-create" || route.type === "collection-edit" ? route.name : "";
|
|
468
811
|
const activeGlobalName = route.type === "global-edit" ? route.name : "";
|
|
469
|
-
const
|
|
470
|
-
const
|
|
812
|
+
const queryClient = useQueryClient();
|
|
813
|
+
const client = useAdminStore(selectClient);
|
|
814
|
+
if (activeCollectionName && client) queryClient.prefetchQuery(getCollectionMetaQueryOptions(activeCollectionName, client));
|
|
815
|
+
if (activeGlobalName && client) queryClient.prefetchQuery(getGlobalMetaQueryOptions(activeGlobalName, client));
|
|
816
|
+
const t6 = !!activeCollectionName;
|
|
817
|
+
let t7;
|
|
818
|
+
if ($[15] !== t6) {
|
|
819
|
+
t7 = { enabled: t6 };
|
|
820
|
+
$[15] = t6;
|
|
821
|
+
$[16] = t7;
|
|
822
|
+
} else t7 = $[16];
|
|
823
|
+
const { data: activeCollectionSchema } = useCollectionSchema(activeCollectionName, t7);
|
|
824
|
+
const t8 = !!activeGlobalName;
|
|
825
|
+
let t9;
|
|
826
|
+
if ($[17] !== t8) {
|
|
827
|
+
t9 = { enabled: t8 };
|
|
828
|
+
$[17] = t8;
|
|
829
|
+
$[18] = t9;
|
|
830
|
+
} else t9 = $[18];
|
|
831
|
+
const { data: activeGlobalSchema } = useGlobalSchema(activeGlobalName, t9);
|
|
832
|
+
let t10;
|
|
833
|
+
if ($[19] !== segments) {
|
|
834
|
+
t10 = segments.join("/");
|
|
835
|
+
$[19] = segments;
|
|
836
|
+
$[20] = t10;
|
|
837
|
+
} else t10 = $[20];
|
|
838
|
+
const routeKey = t10;
|
|
839
|
+
let t11;
|
|
840
|
+
if ($[21] !== route.name || $[22] !== route.type) {
|
|
841
|
+
t11 = () => {
|
|
842
|
+
let pageTitle = "Admin";
|
|
843
|
+
bb54: switch (route.type) {
|
|
844
|
+
case "dashboard":
|
|
845
|
+
pageTitle = "Dashboard";
|
|
846
|
+
break bb54;
|
|
847
|
+
case "collection-list":
|
|
848
|
+
pageTitle = `${route.name} — List`;
|
|
849
|
+
break bb54;
|
|
850
|
+
case "collection-create":
|
|
851
|
+
pageTitle = `${route.name} — Create`;
|
|
852
|
+
break bb54;
|
|
853
|
+
case "collection-edit":
|
|
854
|
+
pageTitle = `${route.name} — Edit`;
|
|
855
|
+
break bb54;
|
|
856
|
+
case "global-edit":
|
|
857
|
+
pageTitle = `${route.name} — Settings`;
|
|
858
|
+
break bb54;
|
|
859
|
+
case "page": pageTitle = route.name;
|
|
860
|
+
}
|
|
861
|
+
document.title = pageTitle;
|
|
862
|
+
const main = document.getElementById("main-content");
|
|
863
|
+
if (main) requestAnimationFrame(() => {
|
|
864
|
+
main.focus({ preventScroll: true });
|
|
865
|
+
});
|
|
866
|
+
};
|
|
867
|
+
$[21] = route.name;
|
|
868
|
+
$[22] = route.type;
|
|
869
|
+
$[23] = t11;
|
|
870
|
+
} else t11 = $[23];
|
|
871
|
+
let t12;
|
|
872
|
+
if ($[24] !== route || $[25] !== routeKey) {
|
|
873
|
+
t12 = [routeKey, route];
|
|
874
|
+
$[24] = route;
|
|
875
|
+
$[25] = routeKey;
|
|
876
|
+
$[26] = t12;
|
|
877
|
+
} else t12 = $[26];
|
|
878
|
+
React.useEffect(t11, t12);
|
|
471
879
|
if (route.type === "dashboard") {
|
|
472
|
-
if (
|
|
473
|
-
|
|
474
|
-
|
|
880
|
+
if (DashboardComponent) {
|
|
881
|
+
let t13$2;
|
|
882
|
+
if ($[27] !== DashboardComponent) {
|
|
883
|
+
t13$2 = /* @__PURE__ */ jsx(DashboardComponent, {});
|
|
884
|
+
$[27] = DashboardComponent;
|
|
885
|
+
$[28] = t13$2;
|
|
886
|
+
} else t13$2 = $[28];
|
|
887
|
+
return t13$2;
|
|
475
888
|
}
|
|
476
|
-
if (
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
889
|
+
if (dashboardConfig?.items?.length || dashboardConfig?.widgets?.length) {
|
|
890
|
+
let t13$2;
|
|
891
|
+
if ($[29] !== basePath || $[30] !== dashboardConfig || $[31] !== navigate) {
|
|
892
|
+
t13$2 = /* @__PURE__ */ jsx(DashboardGrid, {
|
|
893
|
+
config: dashboardConfig,
|
|
894
|
+
basePath,
|
|
895
|
+
navigate
|
|
896
|
+
});
|
|
897
|
+
$[29] = basePath;
|
|
898
|
+
$[30] = dashboardConfig;
|
|
899
|
+
$[31] = navigate;
|
|
900
|
+
$[32] = t13$2;
|
|
901
|
+
} else t13$2 = $[32];
|
|
902
|
+
return t13$2;
|
|
903
|
+
}
|
|
904
|
+
let t13$1;
|
|
905
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
906
|
+
t13$1 = /* @__PURE__ */ jsx(DefaultDashboard, {});
|
|
907
|
+
$[33] = t13$1;
|
|
908
|
+
} else t13$1 = $[33];
|
|
909
|
+
return t13$1;
|
|
483
910
|
}
|
|
484
911
|
if (route.type === "collection-list") {
|
|
485
912
|
const { name } = route;
|
|
486
913
|
const config = collections[name];
|
|
487
|
-
if (!config)
|
|
488
|
-
|
|
489
|
-
name
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
914
|
+
if (!config) {
|
|
915
|
+
let t13$2;
|
|
916
|
+
if ($[34] !== basePath || $[35] !== name || $[36] !== navigate) {
|
|
917
|
+
t13$2 = /* @__PURE__ */ jsx(RestrictedAccess, {
|
|
918
|
+
type: "collection",
|
|
919
|
+
name,
|
|
920
|
+
navigate,
|
|
921
|
+
basePath
|
|
922
|
+
});
|
|
923
|
+
$[34] = basePath;
|
|
924
|
+
$[35] = name;
|
|
925
|
+
$[36] = navigate;
|
|
926
|
+
$[37] = t13$2;
|
|
927
|
+
} else t13$2 = $[37];
|
|
928
|
+
return t13$2;
|
|
929
|
+
}
|
|
930
|
+
const custom = resolvedCollectionComponents[name];
|
|
494
931
|
const viewNameFromSchema = activeCollectionSchema?.admin?.list?.view;
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
932
|
+
const t13$1 = config?.list;
|
|
933
|
+
let t14;
|
|
934
|
+
if ($[38] !== t13$1) {
|
|
935
|
+
t14 = getConfiguredViewName(t13$1);
|
|
936
|
+
$[38] = t13$1;
|
|
937
|
+
$[39] = t14;
|
|
938
|
+
} else t14 = $[39];
|
|
939
|
+
const viewNameFromConfig = t14;
|
|
940
|
+
let t15;
|
|
941
|
+
if ($[40] !== viewNameFromConfig || $[41] !== viewNameFromSchema || $[42] !== views) {
|
|
942
|
+
t15 = viewNameFromSchema ?? viewNameFromConfig ?? findDefaultView(views, "list");
|
|
943
|
+
$[40] = viewNameFromConfig;
|
|
944
|
+
$[41] = viewNameFromSchema;
|
|
945
|
+
$[42] = views;
|
|
946
|
+
$[43] = t15;
|
|
947
|
+
} else t15 = $[43];
|
|
948
|
+
const selectedListView = t15;
|
|
949
|
+
const selectedListViewDefinition = views[selectedListView];
|
|
950
|
+
let t16;
|
|
951
|
+
if ($[44] !== activeCollectionSchema || $[45] !== config || $[46] !== selectedListViewDefinition) {
|
|
952
|
+
t16 = mergeViewConfig(getViewBaseConfig(selectedListViewDefinition), config?.list?.config ?? config?.list ?? activeCollectionSchema?.admin?.list);
|
|
953
|
+
$[44] = activeCollectionSchema;
|
|
954
|
+
$[45] = config;
|
|
955
|
+
$[46] = selectedListViewDefinition;
|
|
956
|
+
$[47] = t16;
|
|
957
|
+
} else t16 = $[47];
|
|
958
|
+
const selectedListViewConfig = t16;
|
|
959
|
+
let t17;
|
|
960
|
+
if ($[48] !== selectedListViewDefinition) {
|
|
961
|
+
t17 = getViewLoader(selectedListViewDefinition);
|
|
962
|
+
$[48] = selectedListViewDefinition;
|
|
963
|
+
$[49] = t17;
|
|
964
|
+
} else t17 = $[49];
|
|
965
|
+
const listViewLoader = t17;
|
|
966
|
+
if (selectedListViewDefinition && selectedListViewDefinition.kind !== "list" && process.env.NODE_ENV !== "production") console.warn(`View "${selectedListView}" kind "${selectedListViewDefinition.kind}" != expected "list"`);
|
|
967
|
+
if (custom?.List) {
|
|
968
|
+
let t18$1;
|
|
969
|
+
if ($[50] !== custom.List) {
|
|
970
|
+
t18$1 = /* @__PURE__ */ jsx(custom.List, {});
|
|
971
|
+
$[50] = custom.List;
|
|
972
|
+
$[51] = t18$1;
|
|
973
|
+
} else t18$1 = $[51];
|
|
974
|
+
return t18$1;
|
|
975
|
+
}
|
|
976
|
+
let t18;
|
|
977
|
+
if ($[52] !== basePath || $[53] !== config || $[54] !== name || $[55] !== navigate || $[56] !== selectedListViewConfig) {
|
|
978
|
+
t18 = {
|
|
506
979
|
collection: name,
|
|
507
980
|
config,
|
|
508
981
|
viewConfig: selectedListViewConfig,
|
|
509
982
|
navigate,
|
|
510
|
-
basePath
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
983
|
+
basePath
|
|
984
|
+
};
|
|
985
|
+
$[52] = basePath;
|
|
986
|
+
$[53] = config;
|
|
987
|
+
$[54] = name;
|
|
988
|
+
$[55] = navigate;
|
|
989
|
+
$[56] = selectedListViewConfig;
|
|
990
|
+
$[57] = t18;
|
|
991
|
+
} else t18 = $[57];
|
|
992
|
+
const listComponentProps = t18;
|
|
993
|
+
let t19;
|
|
994
|
+
if ($[58] !== listComponentProps || $[59] !== listViewLoader || $[60] !== name || $[61] !== selectedListView) {
|
|
995
|
+
t19 = /* @__PURE__ */ jsx(RegistryViewRenderer, {
|
|
996
|
+
loader: listViewLoader,
|
|
997
|
+
viewKind: "list",
|
|
998
|
+
viewId: selectedListView,
|
|
999
|
+
componentProps: listComponentProps
|
|
1000
|
+
}, name);
|
|
1001
|
+
$[58] = listComponentProps;
|
|
1002
|
+
$[59] = listViewLoader;
|
|
1003
|
+
$[60] = name;
|
|
1004
|
+
$[61] = selectedListView;
|
|
1005
|
+
$[62] = t19;
|
|
1006
|
+
} else t19 = $[62];
|
|
1007
|
+
return t19;
|
|
517
1008
|
}
|
|
518
1009
|
if (route.type === "collection-create" || route.type === "collection-edit") {
|
|
519
|
-
const { name } = route;
|
|
1010
|
+
const { name: name_0 } = route;
|
|
520
1011
|
const id = route.type === "collection-edit" ? route.id : void 0;
|
|
521
|
-
const
|
|
522
|
-
if (!
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
1012
|
+
const config_0 = collections[name_0];
|
|
1013
|
+
if (!config_0) {
|
|
1014
|
+
let t13$2;
|
|
1015
|
+
if ($[63] !== basePath || $[64] !== name_0 || $[65] !== navigate) {
|
|
1016
|
+
t13$2 = /* @__PURE__ */ jsx(RestrictedAccess, {
|
|
1017
|
+
type: "collection",
|
|
1018
|
+
name: name_0,
|
|
1019
|
+
navigate,
|
|
1020
|
+
basePath
|
|
1021
|
+
});
|
|
1022
|
+
$[63] = basePath;
|
|
1023
|
+
$[64] = name_0;
|
|
1024
|
+
$[65] = navigate;
|
|
1025
|
+
$[66] = t13$2;
|
|
1026
|
+
} else t13$2 = $[66];
|
|
1027
|
+
return t13$2;
|
|
1028
|
+
}
|
|
1029
|
+
const custom_0 = resolvedCollectionComponents[name_0];
|
|
1030
|
+
const viewNameFromSchema_0 = activeCollectionSchema?.admin?.form?.view;
|
|
1031
|
+
const t13$1 = config_0?.form;
|
|
1032
|
+
let t14;
|
|
1033
|
+
if ($[67] !== t13$1) {
|
|
1034
|
+
t14 = getConfiguredViewName(t13$1);
|
|
1035
|
+
$[67] = t13$1;
|
|
1036
|
+
$[68] = t14;
|
|
1037
|
+
} else t14 = $[68];
|
|
1038
|
+
const viewNameFromConfig_0 = t14;
|
|
1039
|
+
let t15;
|
|
1040
|
+
if ($[69] !== viewNameFromConfig_0 || $[70] !== viewNameFromSchema_0 || $[71] !== views) {
|
|
1041
|
+
t15 = viewNameFromSchema_0 ?? viewNameFromConfig_0 ?? findDefaultView(views, "form");
|
|
1042
|
+
$[69] = viewNameFromConfig_0;
|
|
1043
|
+
$[70] = viewNameFromSchema_0;
|
|
1044
|
+
$[71] = views;
|
|
1045
|
+
$[72] = t15;
|
|
1046
|
+
} else t15 = $[72];
|
|
1047
|
+
const selectedFormView = t15;
|
|
1048
|
+
const selectedFormViewDefinition = views[selectedFormView];
|
|
1049
|
+
let t16;
|
|
1050
|
+
if ($[73] !== activeCollectionSchema || $[74] !== config_0 || $[75] !== selectedFormViewDefinition) {
|
|
1051
|
+
t16 = mergeViewConfig(getViewBaseConfig(selectedFormViewDefinition), config_0?.form?.config ?? config_0?.form ?? activeCollectionSchema?.admin?.form);
|
|
1052
|
+
$[73] = activeCollectionSchema;
|
|
1053
|
+
$[74] = config_0;
|
|
1054
|
+
$[75] = selectedFormViewDefinition;
|
|
1055
|
+
$[76] = t16;
|
|
1056
|
+
} else t16 = $[76];
|
|
1057
|
+
const selectedFormViewConfig = t16;
|
|
1058
|
+
let t17;
|
|
1059
|
+
if ($[77] !== selectedFormViewDefinition) {
|
|
1060
|
+
t17 = getViewLoader(selectedFormViewDefinition);
|
|
1061
|
+
$[77] = selectedFormViewDefinition;
|
|
1062
|
+
$[78] = t17;
|
|
1063
|
+
} else t17 = $[78];
|
|
1064
|
+
const formViewLoader = t17;
|
|
1065
|
+
if (selectedFormViewDefinition && selectedFormViewDefinition.kind !== "form" && process.env.NODE_ENV !== "production") console.warn(`View "${selectedFormView}" kind "${selectedFormViewDefinition.kind}" != expected "form"`);
|
|
1066
|
+
if (custom_0?.Form) {
|
|
1067
|
+
let t18$1;
|
|
1068
|
+
if ($[79] !== custom_0.Form) {
|
|
1069
|
+
t18$1 = /* @__PURE__ */ jsx(custom_0.Form, {});
|
|
1070
|
+
$[79] = custom_0.Form;
|
|
1071
|
+
$[80] = t18$1;
|
|
1072
|
+
} else t18$1 = $[80];
|
|
1073
|
+
return t18$1;
|
|
1074
|
+
}
|
|
1075
|
+
let t18;
|
|
1076
|
+
if ($[81] !== prefillValues || $[82] !== route.type) {
|
|
1077
|
+
t18 = route.type === "collection-create" && Object.keys(prefillValues).length > 0 ? prefillValues : void 0;
|
|
1078
|
+
$[81] = prefillValues;
|
|
1079
|
+
$[82] = route.type;
|
|
1080
|
+
$[83] = t18;
|
|
1081
|
+
} else t18 = $[83];
|
|
1082
|
+
const defaultValues = t18;
|
|
1083
|
+
let t19;
|
|
1084
|
+
if ($[84] !== basePath || $[85] !== collections || $[86] !== config_0 || $[87] !== defaultValues || $[88] !== id || $[89] !== name_0 || $[90] !== navigate || $[91] !== registry || $[92] !== selectedFormViewConfig) {
|
|
1085
|
+
t19 = {
|
|
1086
|
+
collection: name_0,
|
|
543
1087
|
id,
|
|
544
|
-
config,
|
|
545
|
-
viewConfig:
|
|
1088
|
+
config: config_0,
|
|
1089
|
+
viewConfig: selectedFormViewConfig,
|
|
546
1090
|
navigate,
|
|
547
1091
|
basePath,
|
|
548
|
-
defaultValues
|
|
1092
|
+
defaultValues,
|
|
549
1093
|
registry,
|
|
550
|
-
allCollectionsConfig: collections
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
1094
|
+
allCollectionsConfig: collections
|
|
1095
|
+
};
|
|
1096
|
+
$[84] = basePath;
|
|
1097
|
+
$[85] = collections;
|
|
1098
|
+
$[86] = config_0;
|
|
1099
|
+
$[87] = defaultValues;
|
|
1100
|
+
$[88] = id;
|
|
1101
|
+
$[89] = name_0;
|
|
1102
|
+
$[90] = navigate;
|
|
1103
|
+
$[91] = registry;
|
|
1104
|
+
$[92] = selectedFormViewConfig;
|
|
1105
|
+
$[93] = t19;
|
|
1106
|
+
} else t19 = $[93];
|
|
1107
|
+
const editComponentProps = t19;
|
|
1108
|
+
const t20 = `${name_0}-${id ?? "create"}`;
|
|
1109
|
+
let t21;
|
|
1110
|
+
if ($[94] !== editComponentProps || $[95] !== formViewLoader || $[96] !== selectedFormView || $[97] !== t20) {
|
|
1111
|
+
t21 = /* @__PURE__ */ jsx(RegistryViewRenderer, {
|
|
1112
|
+
loader: formViewLoader,
|
|
1113
|
+
viewKind: "form",
|
|
1114
|
+
viewId: selectedFormView,
|
|
1115
|
+
componentProps: editComponentProps
|
|
1116
|
+
}, t20);
|
|
1117
|
+
$[94] = editComponentProps;
|
|
1118
|
+
$[95] = formViewLoader;
|
|
1119
|
+
$[96] = selectedFormView;
|
|
1120
|
+
$[97] = t20;
|
|
1121
|
+
$[98] = t21;
|
|
1122
|
+
} else t21 = $[98];
|
|
1123
|
+
return t21;
|
|
554
1124
|
}
|
|
555
1125
|
if (route.type === "global-edit") {
|
|
556
|
-
const { name } = route;
|
|
557
|
-
const
|
|
558
|
-
if (!
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
1126
|
+
const { name: name_1 } = route;
|
|
1127
|
+
const config_1 = globals[name_1];
|
|
1128
|
+
if (!config_1) {
|
|
1129
|
+
let t13$2;
|
|
1130
|
+
if ($[99] !== basePath || $[100] !== name_1 || $[101] !== navigate) {
|
|
1131
|
+
t13$2 = /* @__PURE__ */ jsx(RestrictedAccess, {
|
|
1132
|
+
type: "global",
|
|
1133
|
+
name: name_1,
|
|
1134
|
+
navigate,
|
|
1135
|
+
basePath
|
|
1136
|
+
});
|
|
1137
|
+
$[99] = basePath;
|
|
1138
|
+
$[100] = name_1;
|
|
1139
|
+
$[101] = navigate;
|
|
1140
|
+
$[102] = t13$2;
|
|
1141
|
+
} else t13$2 = $[102];
|
|
1142
|
+
return t13$2;
|
|
1143
|
+
}
|
|
1144
|
+
const custom_1 = resolvedGlobalComponents[name_1];
|
|
1145
|
+
const viewNameFromSchema_1 = activeGlobalSchema?.admin?.form?.view;
|
|
1146
|
+
const t13$1 = config_1?.form;
|
|
1147
|
+
let t14;
|
|
1148
|
+
if ($[103] !== t13$1) {
|
|
1149
|
+
t14 = getConfiguredViewName(t13$1);
|
|
1150
|
+
$[103] = t13$1;
|
|
1151
|
+
$[104] = t14;
|
|
1152
|
+
} else t14 = $[104];
|
|
1153
|
+
const viewNameFromConfig_1 = t14;
|
|
1154
|
+
let t15;
|
|
1155
|
+
if ($[105] !== viewNameFromConfig_1 || $[106] !== viewNameFromSchema_1 || $[107] !== views) {
|
|
1156
|
+
t15 = viewNameFromSchema_1 ?? viewNameFromConfig_1 ?? findDefaultView(views, "form");
|
|
1157
|
+
$[105] = viewNameFromConfig_1;
|
|
1158
|
+
$[106] = viewNameFromSchema_1;
|
|
1159
|
+
$[107] = views;
|
|
1160
|
+
$[108] = t15;
|
|
1161
|
+
} else t15 = $[108];
|
|
1162
|
+
const selectedFormView_0 = t15;
|
|
1163
|
+
const selectedFormViewDefinition_0 = views[selectedFormView_0];
|
|
1164
|
+
let t16;
|
|
1165
|
+
if ($[109] !== activeGlobalSchema || $[110] !== config_1 || $[111] !== selectedFormViewDefinition_0) {
|
|
1166
|
+
t16 = mergeViewConfig(getViewBaseConfig(selectedFormViewDefinition_0), config_1?.form?.config ?? config_1?.form ?? activeGlobalSchema?.admin?.form);
|
|
1167
|
+
$[109] = activeGlobalSchema;
|
|
1168
|
+
$[110] = config_1;
|
|
1169
|
+
$[111] = selectedFormViewDefinition_0;
|
|
1170
|
+
$[112] = t16;
|
|
1171
|
+
} else t16 = $[112];
|
|
1172
|
+
const selectedFormViewConfig_0 = t16;
|
|
1173
|
+
let t17;
|
|
1174
|
+
if ($[113] !== selectedFormViewDefinition_0) {
|
|
1175
|
+
t17 = getViewLoader(selectedFormViewDefinition_0);
|
|
1176
|
+
$[113] = selectedFormViewDefinition_0;
|
|
1177
|
+
$[114] = t17;
|
|
1178
|
+
} else t17 = $[114];
|
|
1179
|
+
const globalViewLoader = t17;
|
|
1180
|
+
if (selectedFormViewDefinition_0 && selectedFormViewDefinition_0.kind !== "form" && process.env.NODE_ENV !== "production") console.warn(`View "${selectedFormView_0}" kind "${selectedFormViewDefinition_0.kind}" != expected "form"`);
|
|
1181
|
+
if (custom_1?.Form) {
|
|
1182
|
+
let t18$1;
|
|
1183
|
+
if ($[115] !== custom_1.Form) {
|
|
1184
|
+
t18$1 = /* @__PURE__ */ jsx(custom_1.Form, {});
|
|
1185
|
+
$[115] = custom_1.Form;
|
|
1186
|
+
$[116] = t18$1;
|
|
1187
|
+
} else t18$1 = $[116];
|
|
1188
|
+
return t18$1;
|
|
1189
|
+
}
|
|
1190
|
+
let t18;
|
|
1191
|
+
if ($[117] !== basePath || $[118] !== config_1 || $[119] !== globals || $[120] !== name_1 || $[121] !== navigate || $[122] !== registry || $[123] !== selectedFormViewConfig_0) {
|
|
1192
|
+
t18 = {
|
|
1193
|
+
global: name_1,
|
|
1194
|
+
config: config_1,
|
|
1195
|
+
viewConfig: selectedFormViewConfig_0,
|
|
581
1196
|
navigate,
|
|
582
1197
|
basePath,
|
|
583
1198
|
registry,
|
|
584
1199
|
allGlobalsConfig: globals
|
|
585
|
-
}
|
|
586
|
-
|
|
1200
|
+
};
|
|
1201
|
+
$[117] = basePath;
|
|
1202
|
+
$[118] = config_1;
|
|
1203
|
+
$[119] = globals;
|
|
1204
|
+
$[120] = name_1;
|
|
1205
|
+
$[121] = navigate;
|
|
1206
|
+
$[122] = registry;
|
|
1207
|
+
$[123] = selectedFormViewConfig_0;
|
|
1208
|
+
$[124] = t18;
|
|
1209
|
+
} else t18 = $[124];
|
|
1210
|
+
const globalComponentProps = t18;
|
|
1211
|
+
let t19;
|
|
1212
|
+
if ($[125] !== globalComponentProps || $[126] !== globalViewLoader || $[127] !== name_1 || $[128] !== selectedFormView_0) {
|
|
1213
|
+
t19 = /* @__PURE__ */ jsx(RegistryViewRenderer, {
|
|
1214
|
+
loader: globalViewLoader,
|
|
1215
|
+
viewKind: "form",
|
|
1216
|
+
viewId: selectedFormView_0,
|
|
1217
|
+
componentProps: globalComponentProps
|
|
1218
|
+
}, name_1);
|
|
1219
|
+
$[125] = globalComponentProps;
|
|
1220
|
+
$[126] = globalViewLoader;
|
|
1221
|
+
$[127] = name_1;
|
|
1222
|
+
$[128] = selectedFormView_0;
|
|
1223
|
+
$[129] = t19;
|
|
1224
|
+
} else t19 = $[129];
|
|
1225
|
+
return t19;
|
|
587
1226
|
}
|
|
588
|
-
if (route.type === "page")
|
|
589
|
-
|
|
1227
|
+
if (route.type === "page") {
|
|
1228
|
+
let t13$1;
|
|
1229
|
+
if ($[130] !== route.config) {
|
|
1230
|
+
t13$1 = /* @__PURE__ */ jsx(LazyPageRenderer, { config: route.config });
|
|
1231
|
+
$[130] = route.config;
|
|
1232
|
+
$[131] = t13$1;
|
|
1233
|
+
} else t13$1 = $[131];
|
|
1234
|
+
return t13$1;
|
|
1235
|
+
}
|
|
1236
|
+
const NotFound = NotFoundComponent || DefaultNotFound;
|
|
1237
|
+
let t13;
|
|
1238
|
+
if ($[132] !== NotFound) {
|
|
1239
|
+
t13 = /* @__PURE__ */ jsx(NotFound, {});
|
|
1240
|
+
$[132] = NotFound;
|
|
1241
|
+
$[133] = t13;
|
|
1242
|
+
} else t13 = $[133];
|
|
1243
|
+
return t13;
|
|
1244
|
+
}
|
|
1245
|
+
function _temp2(prev) {
|
|
1246
|
+
return {
|
|
1247
|
+
...prev,
|
|
1248
|
+
loading: true,
|
|
1249
|
+
error: null
|
|
1250
|
+
};
|
|
590
1251
|
}
|
|
591
1252
|
|
|
592
1253
|
//#endregion
|
|
593
|
-
export { AdminRouter };
|
|
594
|
-
//# sourceMappingURL=admin-router.mjs.map
|
|
1254
|
+
export { AdminRouter };
|