@questpie/admin 2.0.0 → 3.0.1
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 +173 -143
- 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 +5 -6
- 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 +2 -3
- 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 +21 -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 +51 -40
- 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,19 +1,23 @@
|
|
|
1
|
-
import { useResolveText, useTranslation } from "../../i18n/hooks.mjs";
|
|
1
|
+
import { useResolveText, useSafeI18n, useTranslation } from "../../i18n/hooks.mjs";
|
|
2
2
|
import { cn, formatLabel } from "../../lib/utils.mjs";
|
|
3
|
-
import { selectAdmin, selectBasePath, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
|
|
3
|
+
import { selectAdmin, selectBasePath, selectContentLocale, selectNavigate, selectSetContentLocale, useAdminStore } from "../../runtime/provider.mjs";
|
|
4
|
+
import { useSafeContentLocales } from "../../runtime/content-locales-provider.mjs";
|
|
4
5
|
import { ComponentRenderer } from "../../components/component-renderer.mjs";
|
|
6
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../../components/ui/tooltip.mjs";
|
|
5
7
|
import { useAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
6
8
|
import { getFlagUrl } from "../../utils/locale-to-flag.mjs";
|
|
7
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem,
|
|
9
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../../components/ui/dropdown-menu.mjs";
|
|
8
10
|
import { useAuthClientSafe } from "../../hooks/use-auth.mjs";
|
|
9
|
-
import { useSessionState } from "../../hooks/use-current-user.mjs";
|
|
11
|
+
import { useCurrentUser, useSessionState } from "../../hooks/use-current-user.mjs";
|
|
10
12
|
import { Skeleton } from "../../components/ui/skeleton.mjs";
|
|
11
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "../../components/ui/tooltip.mjs";
|
|
12
13
|
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuItem, SidebarSeparator, useSidebar } from "../../components/ui/sidebar.mjs";
|
|
14
|
+
import { getAdminPreferenceQueryKey, useAdminPreference, useSetAdminPreference } from "../../hooks/use-admin-preferences.mjs";
|
|
15
|
+
import { c } from "react/compiler-runtime";
|
|
13
16
|
import { Icon } from "@iconify/react";
|
|
14
|
-
import * as React
|
|
15
|
-
import {
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
16
19
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
import { toast } from "sonner";
|
|
17
21
|
|
|
18
22
|
//#region src/client/views/layout/admin-sidebar.tsx
|
|
19
23
|
/**
|
|
@@ -43,94 +47,124 @@ function getSidebarItemProps(item) {
|
|
|
43
47
|
* only for page items (which are client-only).
|
|
44
48
|
*/
|
|
45
49
|
function useServerNavigation() {
|
|
50
|
+
const $ = c(6);
|
|
46
51
|
const { data: serverConfig } = useAdminConfig();
|
|
47
|
-
const storeNavigation = useAdminStore(
|
|
52
|
+
const storeNavigation = useAdminStore(_temp);
|
|
48
53
|
const basePath = useAdminStore(selectBasePath);
|
|
49
|
-
|
|
54
|
+
let t0;
|
|
55
|
+
bb0: {
|
|
50
56
|
const sections = serverConfig?.sidebar?.sections;
|
|
51
|
-
if (!sections?.length)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const navItem = element;
|
|
55
|
-
if (navItem.type === "page") pageMap.set(navItem.id, navItem);
|
|
57
|
+
if (!sections?.length) {
|
|
58
|
+
t0 = void 0;
|
|
59
|
+
break bb0;
|
|
56
60
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
61
|
+
let t1;
|
|
62
|
+
if ($[0] !== basePath || $[1] !== sections || $[2] !== serverConfig?.collections || $[3] !== serverConfig?.globals || $[4] !== storeNavigation) {
|
|
63
|
+
const pageMap = /* @__PURE__ */ new Map();
|
|
64
|
+
for (const group of storeNavigation ?? []) for (const element of group.items ?? []) if (element.type !== "divider" && "id" in element) {
|
|
65
|
+
const navItem = element;
|
|
66
|
+
if (navItem.type === "page") pageMap.set(navItem.id, navItem);
|
|
67
|
+
}
|
|
68
|
+
const convertItem = function convertItem$1(item) {
|
|
69
|
+
const props = getSidebarItemProps(item);
|
|
70
|
+
switch (item.type) {
|
|
71
|
+
case "collection": {
|
|
72
|
+
const collectionName = props.collection;
|
|
73
|
+
const meta_0 = serverConfig?.collections?.[collectionName];
|
|
74
|
+
return {
|
|
75
|
+
id: `collection:${collectionName}`,
|
|
76
|
+
label: props.label ?? meta_0?.label ?? formatLabel(collectionName),
|
|
77
|
+
href: `${basePath}/collections/${collectionName}`,
|
|
78
|
+
icon: props.icon ?? meta_0?.icon,
|
|
79
|
+
type: "collection",
|
|
80
|
+
order: 0
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
case "global": {
|
|
84
|
+
const globalName = props.global;
|
|
85
|
+
const meta = serverConfig?.globals?.[globalName];
|
|
86
|
+
return {
|
|
87
|
+
id: `global:${globalName}`,
|
|
88
|
+
label: props.label ?? meta?.label ?? formatLabel(globalName),
|
|
89
|
+
href: `${basePath}/globals/${globalName}`,
|
|
90
|
+
icon: props.icon ?? meta?.icon,
|
|
91
|
+
type: "global",
|
|
92
|
+
order: 0
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
case "page": {
|
|
96
|
+
const found = pageMap.get(`page:${props.pageId}`);
|
|
97
|
+
if (!found) return;
|
|
98
|
+
return {
|
|
99
|
+
...found,
|
|
100
|
+
label: props.label ?? found.label,
|
|
101
|
+
icon: props.icon ?? found.icon
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
case "link": return {
|
|
105
|
+
id: `link:${props.href}`,
|
|
106
|
+
label: props.label ?? "",
|
|
107
|
+
href: props.href,
|
|
108
|
+
icon: props.icon,
|
|
109
|
+
type: "link",
|
|
81
110
|
order: 0
|
|
82
111
|
};
|
|
112
|
+
case "divider": return { type: "divider" };
|
|
113
|
+
default: return;
|
|
83
114
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
case "link": return {
|
|
94
|
-
id: `link:${props.href}`,
|
|
95
|
-
label: props.label ?? "",
|
|
96
|
-
href: props.href,
|
|
97
|
-
icon: props.icon,
|
|
98
|
-
type: "link",
|
|
99
|
-
order: 0
|
|
115
|
+
};
|
|
116
|
+
function convertSection(section) {
|
|
117
|
+
return {
|
|
118
|
+
id: section.id,
|
|
119
|
+
label: section.title,
|
|
120
|
+
icon: section.icon,
|
|
121
|
+
collapsible: section.collapsible,
|
|
122
|
+
items: (section.items ?? []).map(convertItem).filter(_temp2),
|
|
123
|
+
sections: section.sections?.map(convertSection)
|
|
100
124
|
};
|
|
101
|
-
case "divider": return { type: "divider" };
|
|
102
|
-
default: return;
|
|
103
125
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
t1 = sections.map(convertSection);
|
|
127
|
+
$[0] = basePath;
|
|
128
|
+
$[1] = sections;
|
|
129
|
+
$[2] = serverConfig?.collections;
|
|
130
|
+
$[3] = serverConfig?.globals;
|
|
131
|
+
$[4] = storeNavigation;
|
|
132
|
+
$[5] = t1;
|
|
133
|
+
} else t1 = $[5];
|
|
134
|
+
t0 = t1;
|
|
135
|
+
}
|
|
136
|
+
return t0;
|
|
137
|
+
}
|
|
138
|
+
function _temp2(i) {
|
|
139
|
+
return i !== void 0;
|
|
140
|
+
}
|
|
141
|
+
function _temp(s) {
|
|
142
|
+
return s.navigation;
|
|
121
143
|
}
|
|
122
144
|
function useSidebarProps(props) {
|
|
123
|
-
const
|
|
124
|
-
const
|
|
145
|
+
const $ = c(6);
|
|
146
|
+
const storeNavigation = useAdminStore(_temp3);
|
|
147
|
+
const storeBrandName = useAdminStore(_temp4);
|
|
125
148
|
const serverNavigation = useServerNavigation();
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
149
|
+
let t0;
|
|
150
|
+
if ($[0] !== serverNavigation || $[1] !== storeNavigation) {
|
|
151
|
+
t0 = serverNavigation ?? storeNavigation ?? [];
|
|
152
|
+
$[0] = serverNavigation;
|
|
153
|
+
$[1] = storeNavigation;
|
|
154
|
+
$[2] = t0;
|
|
155
|
+
} else t0 = $[2];
|
|
156
|
+
const t1 = props.brandName ?? storeBrandName ?? "Admin";
|
|
157
|
+
let t2;
|
|
158
|
+
if ($[3] !== t0 || $[4] !== t1) {
|
|
159
|
+
t2 = {
|
|
160
|
+
navigation: t0,
|
|
161
|
+
brandName: t1
|
|
162
|
+
};
|
|
163
|
+
$[3] = t0;
|
|
164
|
+
$[4] = t1;
|
|
165
|
+
$[5] = t2;
|
|
166
|
+
} else t2 = $[5];
|
|
167
|
+
return t2;
|
|
134
168
|
}
|
|
135
169
|
/**
|
|
136
170
|
* Render an icon - handles ComponentReference and React components.
|
|
@@ -144,39 +178,124 @@ function useSidebarProps(props) {
|
|
|
144
178
|
* <RenderIcon icon={{ type: "icon", props: { name: "ph:users" } }} />
|
|
145
179
|
* ```
|
|
146
180
|
*/
|
|
147
|
-
function
|
|
181
|
+
function _temp4(s_0) {
|
|
182
|
+
return s_0.brandName;
|
|
183
|
+
}
|
|
184
|
+
function _temp3(s) {
|
|
185
|
+
return s.navigation;
|
|
186
|
+
}
|
|
187
|
+
function areIconValuesEqual(a, b) {
|
|
188
|
+
if (a === b) return true;
|
|
189
|
+
if (!a || !b) return false;
|
|
190
|
+
if (typeof a === "object" && typeof b === "object" && "type" in a && "type" in b) {
|
|
191
|
+
const aRef = a;
|
|
192
|
+
const bRef = b;
|
|
193
|
+
if (aRef.type !== bRef.type) return false;
|
|
194
|
+
const aProps = aRef.props ?? {};
|
|
195
|
+
const bProps = bRef.props ?? {};
|
|
196
|
+
const aKeys = Object.keys(aProps);
|
|
197
|
+
const bKeys = Object.keys(bProps);
|
|
198
|
+
if (aKeys.length !== bKeys.length) return false;
|
|
199
|
+
for (const key of aKeys) if (aProps[key] !== bProps[key]) return false;
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
const RenderIcon = React.memo(function RenderIcon$1(props) {
|
|
205
|
+
const $ = c(10);
|
|
148
206
|
const { icon, className } = props;
|
|
207
|
+
let t0;
|
|
208
|
+
if ($[0] !== className) {
|
|
209
|
+
t0 = cn("size-4 shrink-0", className);
|
|
210
|
+
$[0] = className;
|
|
211
|
+
$[1] = t0;
|
|
212
|
+
} else t0 = $[1];
|
|
213
|
+
const mergedClassName = t0;
|
|
214
|
+
let t1;
|
|
215
|
+
if ($[2] !== mergedClassName) {
|
|
216
|
+
t1 = { className: mergedClassName };
|
|
217
|
+
$[2] = mergedClassName;
|
|
218
|
+
$[3] = t1;
|
|
219
|
+
} else t1 = $[3];
|
|
220
|
+
const additionalProps = t1;
|
|
149
221
|
if (!icon) return null;
|
|
150
|
-
if (typeof icon === "object" && icon !== null && "type" in icon)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
222
|
+
if (typeof icon === "object" && icon !== null && "type" in icon) {
|
|
223
|
+
const t2$1 = icon;
|
|
224
|
+
let t3;
|
|
225
|
+
if ($[4] !== additionalProps || $[5] !== t2$1) {
|
|
226
|
+
t3 = /* @__PURE__ */ jsx(ComponentRenderer, {
|
|
227
|
+
reference: t2$1,
|
|
228
|
+
additionalProps
|
|
229
|
+
});
|
|
230
|
+
$[4] = additionalProps;
|
|
231
|
+
$[5] = t2$1;
|
|
232
|
+
$[6] = t3;
|
|
233
|
+
} else t3 = $[6];
|
|
234
|
+
return t3;
|
|
235
|
+
}
|
|
236
|
+
const IconComp = icon;
|
|
237
|
+
let t2;
|
|
238
|
+
if ($[7] !== IconComp || $[8] !== mergedClassName) {
|
|
239
|
+
t2 = /* @__PURE__ */ jsx(IconComp, { className: mergedClassName });
|
|
240
|
+
$[7] = IconComp;
|
|
241
|
+
$[8] = mergedClassName;
|
|
242
|
+
$[9] = t2;
|
|
243
|
+
} else t2 = $[9];
|
|
244
|
+
return t2;
|
|
245
|
+
}, (prev, next) => {
|
|
246
|
+
if (prev.className !== next.className) return false;
|
|
247
|
+
return areIconValuesEqual(prev.icon, next.icon);
|
|
248
|
+
});
|
|
249
|
+
function QuestpieSymbol(t0) {
|
|
250
|
+
const $ = c(7);
|
|
251
|
+
const { className } = t0;
|
|
252
|
+
let t1;
|
|
253
|
+
if ($[0] !== className) {
|
|
254
|
+
t1 = cn("size-6 shrink-0", className);
|
|
255
|
+
$[0] = className;
|
|
256
|
+
$[1] = t1;
|
|
257
|
+
} else t1 = $[1];
|
|
258
|
+
let t2;
|
|
259
|
+
let t3;
|
|
260
|
+
let t4;
|
|
261
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
262
|
+
t2 = /* @__PURE__ */ jsx("title", { children: "QUESTPIE" });
|
|
263
|
+
t3 = /* @__PURE__ */ jsx("path", {
|
|
264
|
+
d: "M22 10V2H2V22H10",
|
|
265
|
+
stroke: "currentColor",
|
|
266
|
+
strokeWidth: "2",
|
|
267
|
+
strokeLinecap: "square",
|
|
268
|
+
className: "text-[#0a0a0a] dark:text-white"
|
|
269
|
+
});
|
|
270
|
+
t4 = /* @__PURE__ */ jsx("path", {
|
|
271
|
+
d: "M23 13H13V23H23V13Z",
|
|
272
|
+
fill: "#B700FF"
|
|
273
|
+
});
|
|
274
|
+
$[2] = t2;
|
|
275
|
+
$[3] = t3;
|
|
276
|
+
$[4] = t4;
|
|
277
|
+
} else {
|
|
278
|
+
t2 = $[2];
|
|
279
|
+
t3 = $[3];
|
|
280
|
+
t4 = $[4];
|
|
281
|
+
}
|
|
282
|
+
let t5;
|
|
283
|
+
if ($[5] !== t1) {
|
|
284
|
+
t5 = /* @__PURE__ */ jsxs("svg", {
|
|
285
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
286
|
+
viewBox: "0 0 24 24",
|
|
287
|
+
fill: "none",
|
|
288
|
+
className: t1,
|
|
289
|
+
children: [
|
|
290
|
+
t2,
|
|
291
|
+
t3,
|
|
292
|
+
t4
|
|
293
|
+
]
|
|
294
|
+
});
|
|
295
|
+
$[5] = t1;
|
|
296
|
+
$[6] = t5;
|
|
297
|
+
} else t5 = $[6];
|
|
298
|
+
return t5;
|
|
180
299
|
}
|
|
181
300
|
/**
|
|
182
301
|
* Check if element is a navigation item (not divider)
|
|
@@ -200,119 +319,464 @@ function isRouteActive(activeRoute, itemHref, basePath, exact = false) {
|
|
|
200
319
|
/**
|
|
201
320
|
* Menu button styles - QUESTPIE design: clean, technical look
|
|
202
321
|
*/
|
|
203
|
-
const menuButtonStyles = cn("flex w-full items-center gap-2.5 px-3 py-2 text-sm font-medium transition-colors duration-150", "text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent", "focus-visible:
|
|
204
|
-
const menuButtonActiveStyles = cn("bg-sidebar-primary/10 text-sidebar-primary
|
|
205
|
-
|
|
322
|
+
const menuButtonStyles = cn("flex w-full items-center gap-2.5 px-3 py-2 text-sm font-medium transition-colors duration-150", "text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent", "focus-visible:ring-sidebar-ring focus-visible:ring-1 focus-visible:outline-none", "group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-2");
|
|
323
|
+
const menuButtonActiveStyles = cn("bg-sidebar-primary/10 text-sidebar-primary");
|
|
324
|
+
/**
|
|
325
|
+
* Active indicator bar positioned at the sidebar group edge.
|
|
326
|
+
* Uses negative left offset to compensate for SidebarGroupContent nesting padding.
|
|
327
|
+
*/
|
|
328
|
+
function ActiveIndicator(t0) {
|
|
329
|
+
const $ = c(2);
|
|
330
|
+
const { depth } = t0;
|
|
331
|
+
const t1 = `${-depth * .75}rem`;
|
|
332
|
+
let t2;
|
|
333
|
+
if ($[0] !== t1) {
|
|
334
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
335
|
+
className: "bg-sidebar-primary absolute top-0 bottom-0 w-0.5",
|
|
336
|
+
style: { left: t1 },
|
|
337
|
+
"aria-hidden": "true"
|
|
338
|
+
});
|
|
339
|
+
$[0] = t1;
|
|
340
|
+
$[1] = t2;
|
|
341
|
+
} else t2 = $[1];
|
|
342
|
+
return t2;
|
|
343
|
+
}
|
|
344
|
+
function NavItem(t0) {
|
|
345
|
+
const $ = c(66);
|
|
346
|
+
const { item, isActive, LinkComponent, renderNavItem, useActiveProps, className, depth: t1 } = t0;
|
|
347
|
+
const depth = t1 === void 0 ? 0 : t1;
|
|
206
348
|
const { state, isMobile, setOpenMobile } = useSidebar();
|
|
207
349
|
const collapsed = state === "collapsed";
|
|
208
350
|
const resolveText = useResolveText();
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
351
|
+
let t2;
|
|
352
|
+
if ($[0] !== isMobile || $[1] !== setOpenMobile) {
|
|
353
|
+
t2 = () => {
|
|
354
|
+
if (isMobile) setOpenMobile(false);
|
|
355
|
+
};
|
|
356
|
+
$[0] = isMobile;
|
|
357
|
+
$[1] = setOpenMobile;
|
|
358
|
+
$[2] = t2;
|
|
359
|
+
} else t2 = $[2];
|
|
360
|
+
const handleClick = t2;
|
|
361
|
+
if (renderNavItem) {
|
|
362
|
+
const NavItemRenderer = renderNavItem;
|
|
363
|
+
let t3$1;
|
|
364
|
+
if ($[3] !== NavItemRenderer || $[4] !== collapsed || $[5] !== isActive || $[6] !== item) {
|
|
365
|
+
t3$1 = /* @__PURE__ */ jsx(NavItemRenderer, {
|
|
366
|
+
item,
|
|
367
|
+
isActive,
|
|
368
|
+
collapsed
|
|
369
|
+
});
|
|
370
|
+
$[3] = NavItemRenderer;
|
|
371
|
+
$[4] = collapsed;
|
|
372
|
+
$[5] = isActive;
|
|
373
|
+
$[6] = item;
|
|
374
|
+
$[7] = t3$1;
|
|
375
|
+
} else t3$1 = $[7];
|
|
376
|
+
return t3$1;
|
|
377
|
+
}
|
|
378
|
+
let t3;
|
|
379
|
+
if ($[8] !== item.label || $[9] !== resolveText) {
|
|
380
|
+
t3 = resolveText(item.label);
|
|
381
|
+
$[8] = item.label;
|
|
382
|
+
$[9] = resolveText;
|
|
383
|
+
$[10] = t3;
|
|
384
|
+
} else t3 = $[10];
|
|
385
|
+
const label = t3;
|
|
386
|
+
const shouldUseExact = item.type === "link" || item.type === "page";
|
|
387
|
+
let t4;
|
|
388
|
+
if ($[11] !== shouldUseExact || $[12] !== useActiveProps) {
|
|
389
|
+
t4 = useActiveProps ? {
|
|
390
|
+
activeProps: { className: menuButtonActiveStyles },
|
|
391
|
+
activeOptions: { exact: shouldUseExact }
|
|
392
|
+
} : {};
|
|
393
|
+
$[11] = shouldUseExact;
|
|
394
|
+
$[12] = useActiveProps;
|
|
395
|
+
$[13] = t4;
|
|
396
|
+
} else t4 = $[13];
|
|
397
|
+
const linkActiveProps = t4;
|
|
398
|
+
const ariaCurrent = isActive ? "page" : void 0;
|
|
399
|
+
const t5 = item.href;
|
|
400
|
+
const t6 = collapsed ? label : void 0;
|
|
401
|
+
const t7 = isActive && "qa-sidebar__nav-link--active";
|
|
402
|
+
const t8 = isActive && menuButtonActiveStyles;
|
|
403
|
+
let t9;
|
|
404
|
+
if ($[14] !== t7 || $[15] !== t8) {
|
|
405
|
+
t9 = cn("qa-sidebar__nav-link", menuButtonStyles, t7, t8);
|
|
406
|
+
$[14] = t7;
|
|
407
|
+
$[15] = t8;
|
|
408
|
+
$[16] = t9;
|
|
409
|
+
} else t9 = $[16];
|
|
410
|
+
let t10;
|
|
411
|
+
if ($[17] !== item.icon) {
|
|
412
|
+
t10 = item.icon && /* @__PURE__ */ jsx(RenderIcon, {
|
|
413
|
+
icon: item.icon,
|
|
414
|
+
className: "qa-sidebar__nav-icon"
|
|
415
|
+
});
|
|
416
|
+
$[17] = item.icon;
|
|
417
|
+
$[18] = t10;
|
|
418
|
+
} else t10 = $[18];
|
|
419
|
+
let t11;
|
|
420
|
+
if ($[19] !== label) {
|
|
421
|
+
t11 = /* @__PURE__ */ jsx("span", {
|
|
422
|
+
className: "qa-sidebar__nav-label truncate group-data-[collapsible=icon]:hidden",
|
|
229
423
|
children: label
|
|
230
|
-
})
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
424
|
+
});
|
|
425
|
+
$[19] = label;
|
|
426
|
+
$[20] = t11;
|
|
427
|
+
} else t11 = $[20];
|
|
428
|
+
let t12;
|
|
429
|
+
if ($[21] !== LinkComponent || $[22] !== item.href || $[23] !== linkActiveProps || $[24] !== t10 || $[25] !== t11 || $[26] !== t6 || $[27] !== t9) {
|
|
430
|
+
t12 = /* @__PURE__ */ jsxs(LinkComponent, {
|
|
431
|
+
to: t5,
|
|
432
|
+
"aria-label": t6,
|
|
433
|
+
className: t9,
|
|
237
434
|
...linkActiveProps,
|
|
238
|
-
children: [
|
|
435
|
+
children: [t10, t11]
|
|
436
|
+
});
|
|
437
|
+
$[21] = LinkComponent;
|
|
438
|
+
$[22] = item.href;
|
|
439
|
+
$[23] = linkActiveProps;
|
|
440
|
+
$[24] = t10;
|
|
441
|
+
$[25] = t11;
|
|
442
|
+
$[26] = t6;
|
|
443
|
+
$[27] = t9;
|
|
444
|
+
$[28] = t12;
|
|
445
|
+
} else t12 = $[28];
|
|
446
|
+
const linkContent = t12;
|
|
447
|
+
if (collapsed && !isMobile) {
|
|
448
|
+
let t13$1;
|
|
449
|
+
if ($[29] !== isActive) {
|
|
450
|
+
t13$1 = isActive && /* @__PURE__ */ jsx(ActiveIndicator, { depth: 0 });
|
|
451
|
+
$[29] = isActive;
|
|
452
|
+
$[30] = t13$1;
|
|
453
|
+
} else t13$1 = $[30];
|
|
454
|
+
const t14$1 = item.href;
|
|
455
|
+
const t15$1 = isActive && "qa-sidebar__nav-link--active";
|
|
456
|
+
const t16 = isActive && menuButtonActiveStyles;
|
|
457
|
+
let t17;
|
|
458
|
+
if ($[31] !== t15$1 || $[32] !== t16) {
|
|
459
|
+
t17 = cn("qa-sidebar__nav-link", menuButtonStyles, t15$1, t16);
|
|
460
|
+
$[31] = t15$1;
|
|
461
|
+
$[32] = t16;
|
|
462
|
+
$[33] = t17;
|
|
463
|
+
} else t17 = $[33];
|
|
464
|
+
let t18;
|
|
465
|
+
if ($[34] !== item.icon) {
|
|
466
|
+
t18 = item.icon && /* @__PURE__ */ jsx(RenderIcon, { icon: item.icon });
|
|
467
|
+
$[34] = item.icon;
|
|
468
|
+
$[35] = t18;
|
|
469
|
+
} else t18 = $[35];
|
|
470
|
+
let t19;
|
|
471
|
+
if ($[36] !== label) {
|
|
472
|
+
t19 = /* @__PURE__ */ jsx("span", {
|
|
239
473
|
className: "truncate group-data-[collapsible=icon]:hidden",
|
|
240
474
|
children: label
|
|
241
|
-
})
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
475
|
+
});
|
|
476
|
+
$[36] = label;
|
|
477
|
+
$[37] = t19;
|
|
478
|
+
} else t19 = $[37];
|
|
479
|
+
let t20;
|
|
480
|
+
if ($[38] !== LinkComponent || $[39] !== item.href || $[40] !== linkActiveProps || $[41] !== t17 || $[42] !== t18 || $[43] !== t19) {
|
|
481
|
+
t20 = /* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsxs(LinkComponent, {
|
|
482
|
+
to: t14$1,
|
|
483
|
+
className: t17,
|
|
484
|
+
...linkActiveProps,
|
|
485
|
+
children: [t18, t19]
|
|
486
|
+
}) });
|
|
487
|
+
$[38] = LinkComponent;
|
|
488
|
+
$[39] = item.href;
|
|
489
|
+
$[40] = linkActiveProps;
|
|
490
|
+
$[41] = t17;
|
|
491
|
+
$[42] = t18;
|
|
492
|
+
$[43] = t19;
|
|
493
|
+
$[44] = t20;
|
|
494
|
+
} else t20 = $[44];
|
|
495
|
+
let t21;
|
|
496
|
+
if ($[45] !== label) {
|
|
497
|
+
t21 = /* @__PURE__ */ jsx(TooltipContent, {
|
|
498
|
+
side: "right",
|
|
499
|
+
align: "center",
|
|
500
|
+
children: label
|
|
501
|
+
});
|
|
502
|
+
$[45] = label;
|
|
503
|
+
$[46] = t21;
|
|
504
|
+
} else t21 = $[46];
|
|
505
|
+
let t22;
|
|
506
|
+
if ($[47] !== t20 || $[48] !== t21) {
|
|
507
|
+
t22 = /* @__PURE__ */ jsxs(Tooltip, { children: [t20, t21] });
|
|
508
|
+
$[47] = t20;
|
|
509
|
+
$[48] = t21;
|
|
510
|
+
$[49] = t22;
|
|
511
|
+
} else t22 = $[49];
|
|
512
|
+
let t23;
|
|
513
|
+
if ($[50] !== ariaCurrent || $[51] !== handleClick || $[52] !== t13$1 || $[53] !== t22) {
|
|
514
|
+
t23 = /* @__PURE__ */ jsxs(SidebarMenuItem, {
|
|
515
|
+
className: "qa-sidebar__nav-item",
|
|
516
|
+
onClickCapture: handleClick,
|
|
517
|
+
"aria-current": ariaCurrent,
|
|
518
|
+
children: [t13$1, t22]
|
|
519
|
+
});
|
|
520
|
+
$[50] = ariaCurrent;
|
|
521
|
+
$[51] = handleClick;
|
|
522
|
+
$[52] = t13$1;
|
|
523
|
+
$[53] = t22;
|
|
524
|
+
$[54] = t23;
|
|
525
|
+
} else t23 = $[54];
|
|
526
|
+
return t23;
|
|
527
|
+
}
|
|
528
|
+
let t13;
|
|
529
|
+
if ($[55] !== className) {
|
|
530
|
+
t13 = cn("qa-sidebar__nav-item", className);
|
|
531
|
+
$[55] = className;
|
|
532
|
+
$[56] = t13;
|
|
533
|
+
} else t13 = $[56];
|
|
534
|
+
let t14;
|
|
535
|
+
if ($[57] !== depth || $[58] !== isActive) {
|
|
536
|
+
t14 = isActive && /* @__PURE__ */ jsx(ActiveIndicator, { depth });
|
|
537
|
+
$[57] = depth;
|
|
538
|
+
$[58] = isActive;
|
|
539
|
+
$[59] = t14;
|
|
540
|
+
} else t14 = $[59];
|
|
541
|
+
let t15;
|
|
542
|
+
if ($[60] !== ariaCurrent || $[61] !== handleClick || $[62] !== linkContent || $[63] !== t13 || $[64] !== t14) {
|
|
543
|
+
t15 = /* @__PURE__ */ jsxs(SidebarMenuItem, {
|
|
544
|
+
className: t13,
|
|
545
|
+
onClickCapture: handleClick,
|
|
546
|
+
"aria-current": ariaCurrent,
|
|
547
|
+
children: [t14, linkContent]
|
|
548
|
+
});
|
|
549
|
+
$[60] = ariaCurrent;
|
|
550
|
+
$[61] = handleClick;
|
|
551
|
+
$[62] = linkContent;
|
|
552
|
+
$[63] = t13;
|
|
553
|
+
$[64] = t14;
|
|
554
|
+
$[65] = t15;
|
|
555
|
+
} else t15 = $[65];
|
|
556
|
+
return t15;
|
|
557
|
+
}
|
|
558
|
+
const SIDEBAR_COLLAPSED_SECTIONS_KEY = "sidebar:collapsed-sections";
|
|
559
|
+
/**
|
|
560
|
+
* Hook to manage sidebar section collapse state, persisted in admin preferences.
|
|
561
|
+
* Returns the collapsed map and a toggle function.
|
|
562
|
+
* Collapsible sections default to collapsed (true) when no preference is stored.
|
|
563
|
+
*/
|
|
564
|
+
function useSidebarCollapsedSections() {
|
|
565
|
+
const $ = c(13);
|
|
566
|
+
const user = useCurrentUser();
|
|
567
|
+
const queryClient = useQueryClient();
|
|
568
|
+
const { data: stored, isLoading } = useAdminPreference(SIDEBAR_COLLAPSED_SECTIONS_KEY);
|
|
569
|
+
const { mutate: persist } = useSetAdminPreference(SIDEBAR_COLLAPSED_SECTIONS_KEY);
|
|
570
|
+
const t0 = user?.id;
|
|
571
|
+
let t1;
|
|
572
|
+
if ($[0] !== t0) {
|
|
573
|
+
t1 = getAdminPreferenceQueryKey(t0, SIDEBAR_COLLAPSED_SECTIONS_KEY);
|
|
574
|
+
$[0] = t0;
|
|
575
|
+
$[1] = t1;
|
|
576
|
+
} else t1 = $[1];
|
|
577
|
+
const queryKey = t1;
|
|
578
|
+
let t2;
|
|
579
|
+
if ($[2] !== stored) {
|
|
580
|
+
t2 = (sectionId, collapsible) => {
|
|
581
|
+
if (!collapsible || !sectionId) return false;
|
|
582
|
+
return stored?.[sectionId] ?? false;
|
|
583
|
+
};
|
|
584
|
+
$[2] = stored;
|
|
585
|
+
$[3] = t2;
|
|
586
|
+
} else t2 = $[3];
|
|
587
|
+
const isSectionCollapsed = t2;
|
|
588
|
+
let t3;
|
|
589
|
+
if ($[4] !== persist || $[5] !== queryClient || $[6] !== queryKey || $[7] !== stored) {
|
|
590
|
+
t3 = (sectionId_0) => {
|
|
591
|
+
const current = stored ?? {};
|
|
592
|
+
const isCurrentlyCollapsed = current[sectionId_0] ?? false;
|
|
593
|
+
const next = {
|
|
594
|
+
...current,
|
|
595
|
+
[sectionId_0]: !isCurrentlyCollapsed
|
|
596
|
+
};
|
|
597
|
+
queryClient.setQueryData(queryKey, next);
|
|
598
|
+
persist(next);
|
|
599
|
+
};
|
|
600
|
+
$[4] = persist;
|
|
601
|
+
$[5] = queryClient;
|
|
602
|
+
$[6] = queryKey;
|
|
603
|
+
$[7] = stored;
|
|
604
|
+
$[8] = t3;
|
|
605
|
+
} else t3 = $[8];
|
|
606
|
+
const toggleSection = t3;
|
|
607
|
+
let t4;
|
|
608
|
+
if ($[9] !== isLoading || $[10] !== isSectionCollapsed || $[11] !== toggleSection) {
|
|
609
|
+
t4 = {
|
|
610
|
+
isSectionCollapsed,
|
|
611
|
+
toggleSection,
|
|
612
|
+
isLoading
|
|
613
|
+
};
|
|
614
|
+
$[9] = isLoading;
|
|
615
|
+
$[10] = isSectionCollapsed;
|
|
616
|
+
$[11] = toggleSection;
|
|
617
|
+
$[12] = t4;
|
|
618
|
+
} else t4 = $[12];
|
|
619
|
+
return t4;
|
|
253
620
|
}
|
|
254
|
-
function NavGroup(
|
|
255
|
-
const
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
const
|
|
621
|
+
function NavGroup(t0) {
|
|
622
|
+
const $ = c(26);
|
|
623
|
+
const { group, activeRoute, LinkComponent, renderNavItem, basePath, useActiveProps, isSectionCollapsed, toggleSection, depth: t1 } = t0;
|
|
624
|
+
const depth = t1 === void 0 ? 0 : t1;
|
|
625
|
+
const isCollapsed = isSectionCollapsed(group.id, group.collapsible);
|
|
626
|
+
const resolveText = useResolveText();
|
|
627
|
+
let t2;
|
|
628
|
+
if ($[0] !== group.label || $[1] !== resolveText) {
|
|
629
|
+
t2 = resolveText(group.label);
|
|
630
|
+
$[0] = group.label;
|
|
631
|
+
$[1] = resolveText;
|
|
632
|
+
$[2] = t2;
|
|
633
|
+
} else t2 = $[2];
|
|
634
|
+
const groupLabel = t2;
|
|
635
|
+
let t3;
|
|
636
|
+
if ($[3] !== group.items) {
|
|
637
|
+
t3 = group.items ?? [];
|
|
638
|
+
$[3] = group.items;
|
|
639
|
+
$[4] = t3;
|
|
640
|
+
} else t3 = $[4];
|
|
641
|
+
const items = t3;
|
|
642
|
+
let t4;
|
|
643
|
+
if ($[5] !== group.sections) {
|
|
644
|
+
t4 = group.sections ?? [];
|
|
645
|
+
$[5] = group.sections;
|
|
646
|
+
$[6] = t4;
|
|
647
|
+
} else t4 = $[6];
|
|
648
|
+
const sections = t4;
|
|
259
649
|
const hasContent = items.length > 0 || sections.length > 0;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
650
|
+
const T0 = SidebarGroup;
|
|
651
|
+
const t5 = "qa-sidebar__group";
|
|
652
|
+
const t6 = groupLabel && /* @__PURE__ */ jsxs(SidebarGroupLabel, {
|
|
653
|
+
className: cn("qa-sidebar__group-label mt-2 gap-2 px-3", group.collapsible && "hover:text-sidebar-foreground cursor-pointer", depth > 0 && "pl-6"),
|
|
654
|
+
role: group.collapsible ? "button" : void 0,
|
|
655
|
+
tabIndex: group.collapsible ? 0 : void 0,
|
|
656
|
+
"aria-expanded": group.collapsible ? !isCollapsed : void 0,
|
|
657
|
+
onClick: group.collapsible && group.id ? () => toggleSection(group.id) : void 0,
|
|
658
|
+
onKeyDown: group.collapsible && group.id ? (e) => {
|
|
659
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
660
|
+
e.preventDefault();
|
|
661
|
+
toggleSection(group.id);
|
|
662
|
+
}
|
|
663
|
+
} : void 0,
|
|
263
664
|
children: [
|
|
264
665
|
group.icon && /* @__PURE__ */ jsx(RenderIcon, {
|
|
265
666
|
icon: group.icon,
|
|
266
667
|
className: "size-3.5"
|
|
267
668
|
}),
|
|
268
669
|
/* @__PURE__ */ jsx("span", {
|
|
269
|
-
className: "flex-1 font-mono
|
|
670
|
+
className: "flex-1 text-left font-mono",
|
|
270
671
|
children: groupLabel
|
|
271
672
|
}),
|
|
272
|
-
group.
|
|
673
|
+
group.collapsible && /* @__PURE__ */ jsx(Icon, {
|
|
273
674
|
icon: "ph:caret-down",
|
|
274
|
-
className: cn("size-3.5 transition-transform", isCollapsed && "-rotate-90")
|
|
675
|
+
className: cn("size-3.5 transition-transform", isCollapsed && "-rotate-90"),
|
|
676
|
+
"aria-hidden": "true"
|
|
275
677
|
})
|
|
276
678
|
]
|
|
277
|
-
})
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
679
|
+
});
|
|
680
|
+
let t7;
|
|
681
|
+
if ($[7] !== LinkComponent || $[8] !== activeRoute || $[9] !== basePath || $[10] !== depth || $[11] !== group.id || $[12] !== groupLabel || $[13] !== hasContent || $[14] !== isCollapsed || $[15] !== isSectionCollapsed || $[16] !== items || $[17] !== renderNavItem || $[18] !== sections || $[19] !== toggleSection || $[20] !== useActiveProps) {
|
|
682
|
+
t7 = !isCollapsed && hasContent && /* @__PURE__ */ jsxs(SidebarGroupContent, {
|
|
683
|
+
className: cn(depth > 0 && "pl-3"),
|
|
684
|
+
children: [items.length > 0 && /* @__PURE__ */ jsx(SidebarMenu, { children: items.map((element, elementIndex) => {
|
|
685
|
+
if (!isNavigationItem(element)) return /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" }, `${group.id ?? groupLabel ?? "group"}-divider-${elementIndex}`);
|
|
686
|
+
const shouldUseExact = element.type === "link" || element.type === "page";
|
|
687
|
+
return /* @__PURE__ */ jsx(NavItem, {
|
|
688
|
+
item: element,
|
|
689
|
+
isActive: isRouteActive(activeRoute, element.href, basePath, shouldUseExact),
|
|
690
|
+
LinkComponent,
|
|
691
|
+
renderNavItem,
|
|
692
|
+
useActiveProps,
|
|
693
|
+
depth
|
|
694
|
+
}, element.id);
|
|
695
|
+
}) }), sections.map((subSection) => /* @__PURE__ */ jsx(NavGroup, {
|
|
696
|
+
group: subSection,
|
|
697
|
+
activeRoute,
|
|
285
698
|
LinkComponent,
|
|
286
699
|
renderNavItem,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
700
|
+
basePath,
|
|
701
|
+
useActiveProps,
|
|
702
|
+
isSectionCollapsed,
|
|
703
|
+
toggleSection,
|
|
704
|
+
depth: depth + 1
|
|
705
|
+
}, subSection.id))]
|
|
706
|
+
});
|
|
707
|
+
$[7] = LinkComponent;
|
|
708
|
+
$[8] = activeRoute;
|
|
709
|
+
$[9] = basePath;
|
|
710
|
+
$[10] = depth;
|
|
711
|
+
$[11] = group.id;
|
|
712
|
+
$[12] = groupLabel;
|
|
713
|
+
$[13] = hasContent;
|
|
714
|
+
$[14] = isCollapsed;
|
|
715
|
+
$[15] = isSectionCollapsed;
|
|
716
|
+
$[16] = items;
|
|
717
|
+
$[17] = renderNavItem;
|
|
718
|
+
$[18] = sections;
|
|
719
|
+
$[19] = toggleSection;
|
|
720
|
+
$[20] = useActiveProps;
|
|
721
|
+
$[21] = t7;
|
|
722
|
+
} else t7 = $[21];
|
|
723
|
+
let t8;
|
|
724
|
+
if ($[22] !== T0 || $[23] !== t6 || $[24] !== t7) {
|
|
725
|
+
t8 = /* @__PURE__ */ jsxs(T0, {
|
|
726
|
+
className: t5,
|
|
727
|
+
children: [t6, t7]
|
|
728
|
+
});
|
|
729
|
+
$[22] = T0;
|
|
730
|
+
$[23] = t6;
|
|
731
|
+
$[24] = t7;
|
|
732
|
+
$[25] = t8;
|
|
733
|
+
} else t8 = $[25];
|
|
734
|
+
return t8;
|
|
299
735
|
}
|
|
300
736
|
/**
|
|
301
737
|
* Loading skeleton for UserFooter
|
|
302
738
|
*/
|
|
303
|
-
function UserFooterSkeleton(
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
739
|
+
function UserFooterSkeleton(t0) {
|
|
740
|
+
const $ = c(8);
|
|
741
|
+
const { collapsed } = t0;
|
|
742
|
+
const t1 = collapsed && "justify-center";
|
|
743
|
+
let t2;
|
|
744
|
+
if ($[0] !== t1) {
|
|
745
|
+
t2 = cn("flex items-center gap-2.5 p-2", t1);
|
|
746
|
+
$[0] = t1;
|
|
747
|
+
$[1] = t2;
|
|
748
|
+
} else t2 = $[1];
|
|
749
|
+
let t3;
|
|
750
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
751
|
+
t3 = /* @__PURE__ */ jsx(Skeleton, { className: "size-8 shrink-0" });
|
|
752
|
+
$[2] = t3;
|
|
753
|
+
} else t3 = $[2];
|
|
754
|
+
let t4;
|
|
755
|
+
if ($[3] !== collapsed) {
|
|
756
|
+
t4 = !collapsed && /* @__PURE__ */ jsxs("div", {
|
|
757
|
+
className: "grid flex-1 gap-1",
|
|
758
|
+
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-24" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-2 w-32" })]
|
|
759
|
+
});
|
|
760
|
+
$[3] = collapsed;
|
|
761
|
+
$[4] = t4;
|
|
762
|
+
} else t4 = $[4];
|
|
763
|
+
let t5;
|
|
764
|
+
if ($[5] !== t2 || $[6] !== t4) {
|
|
765
|
+
t5 = /* @__PURE__ */ jsx(SidebarFooter, {
|
|
766
|
+
className: "border-sidebar-border border-t p-2",
|
|
767
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
768
|
+
className: t2,
|
|
769
|
+
children: [t3, t4]
|
|
770
|
+
})
|
|
771
|
+
});
|
|
772
|
+
$[5] = t2;
|
|
773
|
+
$[6] = t4;
|
|
774
|
+
$[7] = t5;
|
|
775
|
+
} else t5 = $[7];
|
|
776
|
+
return t5;
|
|
314
777
|
}
|
|
315
778
|
function UserFooter() {
|
|
779
|
+
const $ = c(84);
|
|
316
780
|
const { state, isMobile, setOpenMobile } = useSidebar();
|
|
317
781
|
const collapsed = state === "collapsed";
|
|
318
782
|
const authClient = useAuthClientSafe();
|
|
@@ -321,136 +785,362 @@ function UserFooter() {
|
|
|
321
785
|
const basePath = useAdminStore(selectBasePath);
|
|
322
786
|
const admin = useAdminStore(selectAdmin);
|
|
323
787
|
const { t, locale: uiLocale, setLocale: setUiLocale, getLocaleName } = useTranslation();
|
|
324
|
-
const
|
|
788
|
+
const i18nAdapter = useSafeI18n();
|
|
789
|
+
const localeConfig = admin.getLocale();
|
|
790
|
+
const uiLocales = i18nAdapter?.locales ?? localeConfig.supported ?? ["en"];
|
|
325
791
|
const hasMultipleUiLocales = uiLocales.length > 1;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
]
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
792
|
+
let t0;
|
|
793
|
+
if ($[0] !== getLocaleName) {
|
|
794
|
+
t0 = (code) => ({
|
|
795
|
+
code,
|
|
796
|
+
label: getLocaleName(code)
|
|
797
|
+
});
|
|
798
|
+
$[0] = getLocaleName;
|
|
799
|
+
$[1] = t0;
|
|
800
|
+
} else t0 = $[1];
|
|
801
|
+
const uiLocaleOptions = uiLocales.map(t0);
|
|
802
|
+
const contentLocales = useSafeContentLocales();
|
|
803
|
+
const contentLocale = useAdminStore(selectContentLocale);
|
|
804
|
+
const setContentLocale = useAdminStore(selectSetContentLocale);
|
|
805
|
+
const hasMultipleContentLocales = (contentLocales?.locales?.length ?? 0) > 1;
|
|
806
|
+
let t1;
|
|
807
|
+
if ($[2] !== isMobile || $[3] !== setOpenMobile) {
|
|
808
|
+
t1 = () => {
|
|
809
|
+
if (isMobile) setOpenMobile(false);
|
|
810
|
+
};
|
|
811
|
+
$[2] = isMobile;
|
|
812
|
+
$[3] = setOpenMobile;
|
|
813
|
+
$[4] = t1;
|
|
814
|
+
} else t1 = $[4];
|
|
815
|
+
const closeSidebarOnMobile = t1;
|
|
816
|
+
let t2;
|
|
817
|
+
if ($[5] !== authClient || $[6] !== basePath || $[7] !== closeSidebarOnMobile || $[8] !== navigate || $[9] !== t) {
|
|
818
|
+
t2 = async () => {
|
|
819
|
+
if (!authClient) return;
|
|
820
|
+
try {
|
|
821
|
+
await authClient.signOut();
|
|
822
|
+
closeSidebarOnMobile();
|
|
823
|
+
navigate(`${basePath}/login`);
|
|
824
|
+
} catch (t3$1) {
|
|
825
|
+
toast.error(t("auth.logoutFailed"));
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
$[5] = authClient;
|
|
829
|
+
$[6] = basePath;
|
|
830
|
+
$[7] = closeSidebarOnMobile;
|
|
831
|
+
$[8] = navigate;
|
|
832
|
+
$[9] = t;
|
|
833
|
+
$[10] = t2;
|
|
834
|
+
} else t2 = $[10];
|
|
835
|
+
const handleLogout = t2;
|
|
836
|
+
let t3;
|
|
837
|
+
if ($[11] !== basePath || $[12] !== closeSidebarOnMobile || $[13] !== navigate || $[14] !== user) {
|
|
838
|
+
t3 = () => {
|
|
839
|
+
if (user?.id) {
|
|
840
|
+
closeSidebarOnMobile();
|
|
841
|
+
navigate(`${basePath}/collections/user/${user.id}`);
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
$[11] = basePath;
|
|
845
|
+
$[12] = closeSidebarOnMobile;
|
|
846
|
+
$[13] = navigate;
|
|
847
|
+
$[14] = user;
|
|
848
|
+
$[15] = t3;
|
|
849
|
+
} else t3 = $[15];
|
|
850
|
+
const handleMyAccount = t3;
|
|
851
|
+
if (isPending) {
|
|
852
|
+
let t4$1;
|
|
853
|
+
if ($[16] !== collapsed) {
|
|
854
|
+
t4$1 = /* @__PURE__ */ jsx(UserFooterSkeleton, { collapsed });
|
|
855
|
+
$[16] = collapsed;
|
|
856
|
+
$[17] = t4$1;
|
|
857
|
+
} else t4$1 = $[17];
|
|
858
|
+
return t4$1;
|
|
859
|
+
}
|
|
361
860
|
if (!authClient || !user) return null;
|
|
362
|
-
|
|
861
|
+
let t4;
|
|
862
|
+
if ($[18] !== user.email || $[19] !== user.name) {
|
|
863
|
+
t4 = user.name || user.email?.split("@")[0] || "User";
|
|
864
|
+
$[18] = user.email;
|
|
865
|
+
$[19] = user.name;
|
|
866
|
+
$[20] = t4;
|
|
867
|
+
} else t4 = $[20];
|
|
868
|
+
const displayName = t4;
|
|
363
869
|
const displayEmail = user.email || "";
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
})
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
className: "
|
|
870
|
+
const T0 = SidebarFooter;
|
|
871
|
+
const t5 = "qa-sidebar__footer border-sidebar-border border-t p-2";
|
|
872
|
+
const T1 = SidebarMenu;
|
|
873
|
+
const T2 = SidebarMenuItem;
|
|
874
|
+
const T3 = DropdownMenu;
|
|
875
|
+
const t6 = collapsed && "justify-center";
|
|
876
|
+
let t7;
|
|
877
|
+
if ($[21] !== t6) {
|
|
878
|
+
t7 = cn("flex w-full items-center gap-2.5 p-2 text-left transition-colors duration-150", "hover:bg-sidebar-accent text-sidebar-foreground", "focus-visible:ring-sidebar-ring focus-visible:ring-1 focus-visible:outline-none", t6);
|
|
879
|
+
$[21] = t6;
|
|
880
|
+
$[22] = t7;
|
|
881
|
+
} else t7 = $[22];
|
|
882
|
+
let t8;
|
|
883
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
884
|
+
t8 = /* @__PURE__ */ jsx("div", {
|
|
885
|
+
className: "qa-sidebar__user-avatar bg-sidebar-primary/10 text-sidebar-primary border-sidebar-primary/20 flex size-8 shrink-0 items-center justify-center border",
|
|
886
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
887
|
+
icon: "ph:user-bold",
|
|
888
|
+
className: "size-4"
|
|
889
|
+
})
|
|
890
|
+
});
|
|
891
|
+
$[23] = t8;
|
|
892
|
+
} else t8 = $[23];
|
|
893
|
+
let t9;
|
|
894
|
+
if ($[24] !== collapsed || $[25] !== displayEmail || $[26] !== displayName) {
|
|
895
|
+
t9 = !collapsed && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
896
|
+
className: "grid flex-1 text-left leading-tight",
|
|
897
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
898
|
+
className: "qa-sidebar__user-name truncate text-xs font-medium",
|
|
899
|
+
children: displayName
|
|
900
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
901
|
+
className: "qa-sidebar__user-email text-sidebar-foreground/70 truncate text-[10px]",
|
|
902
|
+
children: displayEmail
|
|
903
|
+
})]
|
|
904
|
+
}), /* @__PURE__ */ jsx(Icon, {
|
|
905
|
+
icon: "ph:caret-up-down",
|
|
906
|
+
className: "text-sidebar-foreground/60 ml-auto size-3.5",
|
|
907
|
+
"aria-hidden": "true"
|
|
908
|
+
})] });
|
|
909
|
+
$[24] = collapsed;
|
|
910
|
+
$[25] = displayEmail;
|
|
911
|
+
$[26] = displayName;
|
|
912
|
+
$[27] = t9;
|
|
913
|
+
} else t9 = $[27];
|
|
914
|
+
let t10;
|
|
915
|
+
if ($[28] !== t7 || $[29] !== t9) {
|
|
916
|
+
t10 = /* @__PURE__ */ jsxs(DropdownMenuTrigger, {
|
|
917
|
+
className: t7,
|
|
918
|
+
children: [t8, t9]
|
|
919
|
+
});
|
|
920
|
+
$[28] = t7;
|
|
921
|
+
$[29] = t9;
|
|
922
|
+
$[30] = t10;
|
|
923
|
+
} else t10 = $[30];
|
|
924
|
+
const T4 = DropdownMenuContent;
|
|
925
|
+
const t11 = collapsed ? "right" : "top";
|
|
926
|
+
const t12 = collapsed ? "start" : "start";
|
|
927
|
+
const t13 = "w-56";
|
|
928
|
+
let t14;
|
|
929
|
+
if ($[31] !== displayName) {
|
|
930
|
+
t14 = /* @__PURE__ */ jsx("p", {
|
|
931
|
+
className: "text-xs font-medium",
|
|
932
|
+
children: displayName
|
|
933
|
+
});
|
|
934
|
+
$[31] = displayName;
|
|
935
|
+
$[32] = t14;
|
|
936
|
+
} else t14 = $[32];
|
|
937
|
+
let t15;
|
|
938
|
+
if ($[33] !== displayEmail) {
|
|
939
|
+
t15 = /* @__PURE__ */ jsx("p", {
|
|
940
|
+
className: "text-muted-foreground text-[10px]",
|
|
941
|
+
children: displayEmail
|
|
942
|
+
});
|
|
943
|
+
$[33] = displayEmail;
|
|
944
|
+
$[34] = t15;
|
|
945
|
+
} else t15 = $[34];
|
|
946
|
+
let t16;
|
|
947
|
+
if ($[35] !== user.role) {
|
|
948
|
+
t16 = user.role && /* @__PURE__ */ jsx("p", {
|
|
949
|
+
className: "text-muted-foreground mt-0.5 text-[10px] capitalize",
|
|
950
|
+
children: user.role
|
|
951
|
+
});
|
|
952
|
+
$[35] = user.role;
|
|
953
|
+
$[36] = t16;
|
|
954
|
+
} else t16 = $[36];
|
|
955
|
+
let t17;
|
|
956
|
+
if ($[37] !== t14 || $[38] !== t15 || $[39] !== t16) {
|
|
957
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
958
|
+
className: "px-2 py-1.5",
|
|
391
959
|
children: [
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
960
|
+
t14,
|
|
961
|
+
t15,
|
|
962
|
+
t16
|
|
963
|
+
]
|
|
964
|
+
});
|
|
965
|
+
$[37] = t14;
|
|
966
|
+
$[38] = t15;
|
|
967
|
+
$[39] = t16;
|
|
968
|
+
$[40] = t17;
|
|
969
|
+
} else t17 = $[40];
|
|
970
|
+
let t18;
|
|
971
|
+
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
972
|
+
t18 = /* @__PURE__ */ jsx(DropdownMenuSeparator, {});
|
|
973
|
+
$[41] = t18;
|
|
974
|
+
} else t18 = $[41];
|
|
975
|
+
let t19;
|
|
976
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
977
|
+
t19 = /* @__PURE__ */ jsx(Icon, {
|
|
978
|
+
icon: "ph:user-circle",
|
|
979
|
+
className: "size-4"
|
|
980
|
+
});
|
|
981
|
+
$[42] = t19;
|
|
982
|
+
} else t19 = $[42];
|
|
983
|
+
let t20;
|
|
984
|
+
if ($[43] !== t) {
|
|
985
|
+
t20 = t("auth.myAccount");
|
|
986
|
+
$[43] = t;
|
|
987
|
+
$[44] = t20;
|
|
988
|
+
} else t20 = $[44];
|
|
989
|
+
let t21;
|
|
990
|
+
if ($[45] !== handleMyAccount || $[46] !== t20) {
|
|
991
|
+
t21 = /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
992
|
+
onClick: handleMyAccount,
|
|
993
|
+
children: [t19, t20]
|
|
994
|
+
});
|
|
995
|
+
$[45] = handleMyAccount;
|
|
996
|
+
$[46] = t20;
|
|
997
|
+
$[47] = t21;
|
|
998
|
+
} else t21 = $[47];
|
|
999
|
+
const t22 = hasMultipleUiLocales && /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:globe" }), t("locale.uiLanguage")] }), /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: uiLocaleOptions.map((locale) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
1000
|
+
onClick: () => setUiLocale(locale.code),
|
|
1001
|
+
children: [
|
|
1002
|
+
/* @__PURE__ */ jsx("img", {
|
|
1003
|
+
src: getFlagUrl(locale.code),
|
|
1004
|
+
alt: locale.code,
|
|
1005
|
+
className: "h-3 w-4 object-cover",
|
|
1006
|
+
onError: _temp5
|
|
1007
|
+
}),
|
|
1008
|
+
/* @__PURE__ */ jsx("span", {
|
|
1009
|
+
className: "w-6 text-xs font-medium uppercase",
|
|
1010
|
+
children: locale.code
|
|
1011
|
+
}),
|
|
1012
|
+
/* @__PURE__ */ jsx("span", {
|
|
1013
|
+
className: "flex-1",
|
|
1014
|
+
children: locale.label
|
|
1015
|
+
}),
|
|
1016
|
+
locale.code === uiLocale && /* @__PURE__ */ jsx(Icon, {
|
|
1017
|
+
icon: "ph:check",
|
|
1018
|
+
className: "text-primary size-4"
|
|
1019
|
+
})
|
|
1020
|
+
]
|
|
1021
|
+
}, locale.code)) })] });
|
|
1022
|
+
let t23;
|
|
1023
|
+
if ($[48] !== contentLocale || $[49] !== contentLocales || $[50] !== hasMultipleContentLocales || $[51] !== setContentLocale || $[52] !== t) {
|
|
1024
|
+
t23 = hasMultipleContentLocales && /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:translate" }), t("locale.contentLanguage")] }), /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: contentLocales.locales.map((locale_0) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
1025
|
+
onClick: () => setContentLocale(locale_0.code),
|
|
1026
|
+
children: [
|
|
1027
|
+
/* @__PURE__ */ jsx("img", {
|
|
1028
|
+
src: getFlagUrl(locale_0.flagCountryCode ?? locale_0.code),
|
|
1029
|
+
alt: locale_0.code,
|
|
1030
|
+
className: "h-3 w-4 object-cover",
|
|
1031
|
+
onError: _temp6
|
|
1032
|
+
}),
|
|
1033
|
+
/* @__PURE__ */ jsx("span", {
|
|
1034
|
+
className: "w-6 text-xs font-medium uppercase",
|
|
1035
|
+
children: locale_0.code
|
|
408
1036
|
}),
|
|
409
|
-
/* @__PURE__ */ jsx(
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
413
|
-
icon: "ph:user-circle",
|
|
414
|
-
className: "size-4"
|
|
415
|
-
}), t("auth.myAccount")]
|
|
1037
|
+
/* @__PURE__ */ jsx("span", {
|
|
1038
|
+
className: "flex-1",
|
|
1039
|
+
children: locale_0.label ?? locale_0.code
|
|
416
1040
|
}),
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
/* @__PURE__ */ jsx("img", {
|
|
421
|
-
src: getFlagUrl(locale.code),
|
|
422
|
-
alt: locale.code,
|
|
423
|
-
className: "h-3 w-4 rounded-[2px] object-cover",
|
|
424
|
-
onError: (e) => {
|
|
425
|
-
e.currentTarget.style.display = "none";
|
|
426
|
-
}
|
|
427
|
-
}),
|
|
428
|
-
/* @__PURE__ */ jsx("span", {
|
|
429
|
-
className: "uppercase text-xs font-medium w-6",
|
|
430
|
-
children: locale.code
|
|
431
|
-
}),
|
|
432
|
-
/* @__PURE__ */ jsx("span", {
|
|
433
|
-
className: "flex-1",
|
|
434
|
-
children: locale.label
|
|
435
|
-
}),
|
|
436
|
-
locale.code === uiLocale && /* @__PURE__ */ jsx(Icon, {
|
|
437
|
-
icon: "ph:check",
|
|
438
|
-
className: "size-4 text-primary"
|
|
439
|
-
})
|
|
440
|
-
]
|
|
441
|
-
}, locale.code)) }) })] }),
|
|
442
|
-
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
443
|
-
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
444
|
-
variant: "destructive",
|
|
445
|
-
onClick: handleLogout,
|
|
446
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
447
|
-
icon: "ph:sign-out",
|
|
448
|
-
className: "size-4"
|
|
449
|
-
}), t("auth.logout")]
|
|
1041
|
+
locale_0.code === contentLocale && /* @__PURE__ */ jsx(Icon, {
|
|
1042
|
+
icon: "ph:check",
|
|
1043
|
+
className: "text-primary size-4"
|
|
450
1044
|
})
|
|
451
1045
|
]
|
|
452
|
-
}
|
|
453
|
-
|
|
1046
|
+
}, locale_0.code)) })] });
|
|
1047
|
+
$[48] = contentLocale;
|
|
1048
|
+
$[49] = contentLocales;
|
|
1049
|
+
$[50] = hasMultipleContentLocales;
|
|
1050
|
+
$[51] = setContentLocale;
|
|
1051
|
+
$[52] = t;
|
|
1052
|
+
$[53] = t23;
|
|
1053
|
+
} else t23 = $[53];
|
|
1054
|
+
let t24;
|
|
1055
|
+
if ($[54] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1056
|
+
t24 = /* @__PURE__ */ jsx(DropdownMenuSeparator, {});
|
|
1057
|
+
$[54] = t24;
|
|
1058
|
+
} else t24 = $[54];
|
|
1059
|
+
let t25;
|
|
1060
|
+
if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1061
|
+
t25 = /* @__PURE__ */ jsx(Icon, {
|
|
1062
|
+
icon: "ph:sign-out",
|
|
1063
|
+
className: "size-4"
|
|
1064
|
+
});
|
|
1065
|
+
$[55] = t25;
|
|
1066
|
+
} else t25 = $[55];
|
|
1067
|
+
let t26;
|
|
1068
|
+
if ($[56] !== t) {
|
|
1069
|
+
t26 = t("auth.logout");
|
|
1070
|
+
$[56] = t;
|
|
1071
|
+
$[57] = t26;
|
|
1072
|
+
} else t26 = $[57];
|
|
1073
|
+
let t27;
|
|
1074
|
+
if ($[58] !== handleLogout || $[59] !== t26) {
|
|
1075
|
+
t27 = /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
1076
|
+
variant: "destructive",
|
|
1077
|
+
onClick: handleLogout,
|
|
1078
|
+
children: [t25, t26]
|
|
1079
|
+
});
|
|
1080
|
+
$[58] = handleLogout;
|
|
1081
|
+
$[59] = t26;
|
|
1082
|
+
$[60] = t27;
|
|
1083
|
+
} else t27 = $[60];
|
|
1084
|
+
let t28;
|
|
1085
|
+
if ($[61] !== T4 || $[62] !== t11 || $[63] !== t12 || $[64] !== t17 || $[65] !== t18 || $[66] !== t21 || $[67] !== t22 || $[68] !== t23 || $[69] !== t27) {
|
|
1086
|
+
t28 = /* @__PURE__ */ jsxs(T4, {
|
|
1087
|
+
side: t11,
|
|
1088
|
+
align: t12,
|
|
1089
|
+
className: t13,
|
|
1090
|
+
children: [
|
|
1091
|
+
t17,
|
|
1092
|
+
t18,
|
|
1093
|
+
t21,
|
|
1094
|
+
t22,
|
|
1095
|
+
t23,
|
|
1096
|
+
t24,
|
|
1097
|
+
t27
|
|
1098
|
+
]
|
|
1099
|
+
});
|
|
1100
|
+
$[61] = T4;
|
|
1101
|
+
$[62] = t11;
|
|
1102
|
+
$[63] = t12;
|
|
1103
|
+
$[64] = t17;
|
|
1104
|
+
$[65] = t18;
|
|
1105
|
+
$[66] = t21;
|
|
1106
|
+
$[67] = t22;
|
|
1107
|
+
$[68] = t23;
|
|
1108
|
+
$[69] = t27;
|
|
1109
|
+
$[70] = t28;
|
|
1110
|
+
} else t28 = $[70];
|
|
1111
|
+
let t29;
|
|
1112
|
+
if ($[71] !== T3 || $[72] !== t10 || $[73] !== t28) {
|
|
1113
|
+
t29 = /* @__PURE__ */ jsxs(T3, { children: [t10, t28] });
|
|
1114
|
+
$[71] = T3;
|
|
1115
|
+
$[72] = t10;
|
|
1116
|
+
$[73] = t28;
|
|
1117
|
+
$[74] = t29;
|
|
1118
|
+
} else t29 = $[74];
|
|
1119
|
+
let t30;
|
|
1120
|
+
if ($[75] !== T2 || $[76] !== t29) {
|
|
1121
|
+
t30 = /* @__PURE__ */ jsx(T2, { children: t29 });
|
|
1122
|
+
$[75] = T2;
|
|
1123
|
+
$[76] = t29;
|
|
1124
|
+
$[77] = t30;
|
|
1125
|
+
} else t30 = $[77];
|
|
1126
|
+
let t31;
|
|
1127
|
+
if ($[78] !== T1 || $[79] !== t30) {
|
|
1128
|
+
t31 = /* @__PURE__ */ jsx(T1, { children: t30 });
|
|
1129
|
+
$[78] = T1;
|
|
1130
|
+
$[79] = t30;
|
|
1131
|
+
$[80] = t31;
|
|
1132
|
+
} else t31 = $[80];
|
|
1133
|
+
let t32;
|
|
1134
|
+
if ($[81] !== T0 || $[82] !== t31) {
|
|
1135
|
+
t32 = /* @__PURE__ */ jsx(T0, {
|
|
1136
|
+
className: t5,
|
|
1137
|
+
children: t31
|
|
1138
|
+
});
|
|
1139
|
+
$[81] = T0;
|
|
1140
|
+
$[82] = t31;
|
|
1141
|
+
$[83] = t32;
|
|
1142
|
+
} else t32 = $[83];
|
|
1143
|
+
return t32;
|
|
454
1144
|
}
|
|
455
1145
|
/**
|
|
456
1146
|
* AdminSidebar Component
|
|
@@ -470,81 +1160,220 @@ function UserFooter() {
|
|
|
470
1160
|
* // Without AdminProvider (manual)
|
|
471
1161
|
* <SidebarProvider>
|
|
472
1162
|
* <AdminSidebar
|
|
473
|
-
* navigation={buildNavigation(admin)}
|
|
474
1163
|
* LinkComponent={Link}
|
|
475
1164
|
* activeRoute="/admin/posts"
|
|
476
|
-
* brandName="My
|
|
1165
|
+
* brandName="My App"
|
|
477
1166
|
* />
|
|
478
1167
|
* </SidebarProvider>
|
|
479
1168
|
* ```
|
|
480
1169
|
*/
|
|
481
|
-
function
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
1170
|
+
function _temp6(e_0) {
|
|
1171
|
+
e_0.currentTarget.style.display = "none";
|
|
1172
|
+
}
|
|
1173
|
+
function _temp5(e) {
|
|
1174
|
+
e.currentTarget.style.display = "none";
|
|
1175
|
+
}
|
|
1176
|
+
function AdminSidebar(t0) {
|
|
1177
|
+
const $ = c(63);
|
|
1178
|
+
const { LinkComponent, activeRoute, basePath: t1, brandName: brandNameProp, className, renderBrand, renderNavItem, footer, afterBrand, beforeFooter, useActiveProps: t2 } = t0;
|
|
1179
|
+
const basePath = t1 === void 0 ? "/admin" : t1;
|
|
1180
|
+
const useActiveProps = t2 === void 0 ? true : t2;
|
|
1181
|
+
let t3;
|
|
1182
|
+
if ($[0] !== brandNameProp) {
|
|
1183
|
+
t3 = { brandName: brandNameProp };
|
|
1184
|
+
$[0] = brandNameProp;
|
|
1185
|
+
$[1] = t3;
|
|
1186
|
+
} else t3 = $[1];
|
|
1187
|
+
const { navigation, brandName } = useSidebarProps(t3);
|
|
486
1188
|
const { state, isMobile, setOpenMobile } = useSidebar();
|
|
487
1189
|
const collapsed = state === "collapsed";
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
1190
|
+
const { isSectionCollapsed, toggleSection } = useSidebarCollapsedSections();
|
|
1191
|
+
let t4;
|
|
1192
|
+
if ($[2] !== isMobile || $[3] !== setOpenMobile) {
|
|
1193
|
+
t4 = () => {
|
|
1194
|
+
if (isMobile) setOpenMobile(false);
|
|
1195
|
+
};
|
|
1196
|
+
$[2] = isMobile;
|
|
1197
|
+
$[3] = setOpenMobile;
|
|
1198
|
+
$[4] = t4;
|
|
1199
|
+
} else t4 = $[4];
|
|
1200
|
+
const handleBrandClick = t4;
|
|
1201
|
+
let t5;
|
|
1202
|
+
if ($[5] !== brandName || $[6] !== collapsed || $[7] !== renderBrand) {
|
|
1203
|
+
t5 = renderBrand ? renderBrand({
|
|
1204
|
+
name: brandName,
|
|
1205
|
+
collapsed
|
|
1206
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(QuestpieSymbol, {}), !collapsed && /* @__PURE__ */ jsx("div", {
|
|
1207
|
+
className: "grid flex-1 text-left leading-tight",
|
|
1208
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1209
|
+
className: "truncate font-bold tracking-tight",
|
|
1210
|
+
children: brandName
|
|
1211
|
+
})
|
|
1212
|
+
})] });
|
|
1213
|
+
$[5] = brandName;
|
|
1214
|
+
$[6] = collapsed;
|
|
1215
|
+
$[7] = renderBrand;
|
|
1216
|
+
$[8] = t5;
|
|
1217
|
+
} else t5 = $[8];
|
|
1218
|
+
const brandContent = t5;
|
|
1219
|
+
const t6 = collapsed && "justify-center";
|
|
1220
|
+
let t7;
|
|
1221
|
+
if ($[9] !== t6) {
|
|
1222
|
+
t7 = cn("qa-sidebar__brand flex items-center gap-2.5 p-2 transition-colors duration-150", "hover:bg-sidebar-accent", t6);
|
|
1223
|
+
$[9] = t6;
|
|
1224
|
+
$[10] = t7;
|
|
1225
|
+
} else t7 = $[10];
|
|
1226
|
+
let t8;
|
|
1227
|
+
if ($[11] !== LinkComponent || $[12] !== basePath || $[13] !== brandContent || $[14] !== t7) {
|
|
1228
|
+
t8 = /* @__PURE__ */ jsx(LinkComponent, {
|
|
1229
|
+
to: basePath,
|
|
1230
|
+
className: t7,
|
|
1231
|
+
children: brandContent
|
|
1232
|
+
});
|
|
1233
|
+
$[11] = LinkComponent;
|
|
1234
|
+
$[12] = basePath;
|
|
1235
|
+
$[13] = brandContent;
|
|
1236
|
+
$[14] = t7;
|
|
1237
|
+
$[15] = t8;
|
|
1238
|
+
} else t8 = $[15];
|
|
1239
|
+
const brandLink = t8;
|
|
1240
|
+
let t9;
|
|
1241
|
+
if ($[16] !== className) {
|
|
1242
|
+
t9 = cn("qa-sidebar", className);
|
|
1243
|
+
$[16] = className;
|
|
1244
|
+
$[17] = t9;
|
|
1245
|
+
} else t9 = $[17];
|
|
1246
|
+
let t10;
|
|
1247
|
+
if ($[18] !== LinkComponent || $[19] !== basePath || $[20] !== brandLink || $[21] !== brandName || $[22] !== collapsed || $[23] !== isMobile || $[24] !== renderBrand) {
|
|
1248
|
+
t10 = collapsed && !isMobile ? /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(LinkComponent, {
|
|
1249
|
+
to: basePath,
|
|
1250
|
+
className: cn("flex items-center gap-2.5 p-2 transition-colors duration-150", "hover:bg-sidebar-accent", "justify-center"),
|
|
1251
|
+
children: renderBrand ? renderBrand({
|
|
1252
|
+
name: brandName,
|
|
1253
|
+
collapsed: true
|
|
1254
|
+
}) : /* @__PURE__ */ jsx(QuestpieSymbol, {})
|
|
1255
|
+
}) }), /* @__PURE__ */ jsx(TooltipContent, {
|
|
1256
|
+
side: "right",
|
|
498
1257
|
children: brandName
|
|
499
|
-
})
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
1258
|
+
})] }) : brandLink;
|
|
1259
|
+
$[18] = LinkComponent;
|
|
1260
|
+
$[19] = basePath;
|
|
1261
|
+
$[20] = brandLink;
|
|
1262
|
+
$[21] = brandName;
|
|
1263
|
+
$[22] = collapsed;
|
|
1264
|
+
$[23] = isMobile;
|
|
1265
|
+
$[24] = renderBrand;
|
|
1266
|
+
$[25] = t10;
|
|
1267
|
+
} else t10 = $[25];
|
|
1268
|
+
let t11;
|
|
1269
|
+
if ($[26] !== handleBrandClick || $[27] !== t10) {
|
|
1270
|
+
t11 = /* @__PURE__ */ jsx(SidebarHeader, {
|
|
1271
|
+
className: "qa-sidebar__header border-sidebar-border border-b p-2",
|
|
1272
|
+
children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
1273
|
+
onClickCapture: handleBrandClick,
|
|
1274
|
+
children: t10
|
|
1275
|
+
}) })
|
|
1276
|
+
});
|
|
1277
|
+
$[26] = handleBrandClick;
|
|
1278
|
+
$[27] = t10;
|
|
1279
|
+
$[28] = t11;
|
|
1280
|
+
} else t11 = $[28];
|
|
1281
|
+
let t12;
|
|
1282
|
+
if ($[29] !== afterBrand || $[30] !== collapsed) {
|
|
1283
|
+
t12 = afterBrand && !collapsed && /* @__PURE__ */ jsx("div", {
|
|
1284
|
+
className: "qa-sidebar__after-brand border-sidebar-border border-b px-3 py-2",
|
|
1285
|
+
children: afterBrand
|
|
1286
|
+
});
|
|
1287
|
+
$[29] = afterBrand;
|
|
1288
|
+
$[30] = collapsed;
|
|
1289
|
+
$[31] = t12;
|
|
1290
|
+
} else t12 = $[31];
|
|
1291
|
+
let t13;
|
|
1292
|
+
if ($[32] !== LinkComponent || $[33] !== activeRoute || $[34] !== basePath || $[35] !== isSectionCollapsed || $[36] !== navigation || $[37] !== renderNavItem || $[38] !== toggleSection || $[39] !== useActiveProps) {
|
|
1293
|
+
let t14$1;
|
|
1294
|
+
if ($[41] !== LinkComponent || $[42] !== activeRoute || $[43] !== basePath || $[44] !== isSectionCollapsed || $[45] !== renderNavItem || $[46] !== toggleSection || $[47] !== useActiveProps) {
|
|
1295
|
+
t14$1 = (group, index) => /* @__PURE__ */ jsx(NavGroup, {
|
|
532
1296
|
group,
|
|
533
1297
|
activeRoute,
|
|
534
1298
|
LinkComponent,
|
|
535
1299
|
renderNavItem,
|
|
536
1300
|
basePath,
|
|
537
|
-
useActiveProps
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
1301
|
+
useActiveProps,
|
|
1302
|
+
isSectionCollapsed,
|
|
1303
|
+
toggleSection
|
|
1304
|
+
}, group.id ?? `group-${index}`);
|
|
1305
|
+
$[41] = LinkComponent;
|
|
1306
|
+
$[42] = activeRoute;
|
|
1307
|
+
$[43] = basePath;
|
|
1308
|
+
$[44] = isSectionCollapsed;
|
|
1309
|
+
$[45] = renderNavItem;
|
|
1310
|
+
$[46] = toggleSection;
|
|
1311
|
+
$[47] = useActiveProps;
|
|
1312
|
+
$[48] = t14$1;
|
|
1313
|
+
} else t14$1 = $[48];
|
|
1314
|
+
t13 = navigation.map(t14$1);
|
|
1315
|
+
$[32] = LinkComponent;
|
|
1316
|
+
$[33] = activeRoute;
|
|
1317
|
+
$[34] = basePath;
|
|
1318
|
+
$[35] = isSectionCollapsed;
|
|
1319
|
+
$[36] = navigation;
|
|
1320
|
+
$[37] = renderNavItem;
|
|
1321
|
+
$[38] = toggleSection;
|
|
1322
|
+
$[39] = useActiveProps;
|
|
1323
|
+
$[40] = t13;
|
|
1324
|
+
} else t13 = $[40];
|
|
1325
|
+
let t14;
|
|
1326
|
+
if ($[49] !== t13) {
|
|
1327
|
+
t14 = /* @__PURE__ */ jsx(SidebarContent, {
|
|
1328
|
+
className: "qa-sidebar__content",
|
|
1329
|
+
children: /* @__PURE__ */ jsx("nav", {
|
|
1330
|
+
"aria-label": "Admin navigation",
|
|
1331
|
+
className: "qa-sidebar__nav",
|
|
1332
|
+
children: t13
|
|
1333
|
+
})
|
|
1334
|
+
});
|
|
1335
|
+
$[49] = t13;
|
|
1336
|
+
$[50] = t14;
|
|
1337
|
+
} else t14 = $[50];
|
|
1338
|
+
let t15;
|
|
1339
|
+
if ($[51] !== beforeFooter || $[52] !== collapsed) {
|
|
1340
|
+
t15 = beforeFooter && !collapsed && /* @__PURE__ */ jsx("div", {
|
|
1341
|
+
className: "qa-sidebar__before-footer border-sidebar-border border-t px-3 py-2",
|
|
1342
|
+
children: beforeFooter
|
|
1343
|
+
});
|
|
1344
|
+
$[51] = beforeFooter;
|
|
1345
|
+
$[52] = collapsed;
|
|
1346
|
+
$[53] = t15;
|
|
1347
|
+
} else t15 = $[53];
|
|
1348
|
+
let t16;
|
|
1349
|
+
if ($[54] !== footer) {
|
|
1350
|
+
t16 = footer ?? /* @__PURE__ */ jsx(UserFooter, {});
|
|
1351
|
+
$[54] = footer;
|
|
1352
|
+
$[55] = t16;
|
|
1353
|
+
} else t16 = $[55];
|
|
1354
|
+
let t17;
|
|
1355
|
+
if ($[56] !== t11 || $[57] !== t12 || $[58] !== t14 || $[59] !== t15 || $[60] !== t16 || $[61] !== t9) {
|
|
1356
|
+
t17 = /* @__PURE__ */ jsxs(Sidebar, {
|
|
1357
|
+
collapsible: "icon",
|
|
1358
|
+
className: t9,
|
|
1359
|
+
children: [
|
|
1360
|
+
t11,
|
|
1361
|
+
t12,
|
|
1362
|
+
t14,
|
|
1363
|
+
t15,
|
|
1364
|
+
t16
|
|
1365
|
+
]
|
|
1366
|
+
});
|
|
1367
|
+
$[56] = t11;
|
|
1368
|
+
$[57] = t12;
|
|
1369
|
+
$[58] = t14;
|
|
1370
|
+
$[59] = t15;
|
|
1371
|
+
$[60] = t16;
|
|
1372
|
+
$[61] = t9;
|
|
1373
|
+
$[62] = t17;
|
|
1374
|
+
} else t17 = $[62];
|
|
1375
|
+
return t17;
|
|
546
1376
|
}
|
|
547
1377
|
|
|
548
1378
|
//#endregion
|
|
549
|
-
export { AdminSidebar };
|
|
550
|
-
//# sourceMappingURL=admin-sidebar.mjs.map
|
|
1379
|
+
export { AdminSidebar };
|