@questpie/admin 3.0.2 → 3.0.4
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 +34 -5
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/blocks/block-renderer.mjs +4 -1
- package/dist/client/builder/types/action-types.d.mts +31 -3
- package/dist/client/builder/types/collection-types.d.mts +140 -0
- package/dist/client/builder/types/ui-config.d.mts +16 -2
- package/dist/client/builder/types/views.d.mts +57 -0
- package/dist/client/builder/types/widget-types.d.mts +5 -0
- package/dist/client/components/actions/action-button.mjs +137 -199
- package/dist/client/components/actions/action-dialog.mjs +198 -156
- package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
- package/dist/client/components/actions/header-actions.mjs +52 -53
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/auth/auth-loading.mjs +41 -18
- package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
- package/dist/client/components/blocks/block-insert-button.mjs +4 -4
- package/dist/client/components/blocks/block-item.mjs +2 -2
- package/dist/client/components/blocks/block-library-sidebar.mjs +2 -2
- package/dist/client/components/component-renderer.mjs +1 -1
- package/dist/client/components/fields/array-field.mjs +14 -14
- package/dist/client/components/fields/asset-preview-field.mjs +1 -1
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
- package/dist/client/components/fields/json-field.mjs +2 -2
- package/dist/client/components/fields/object-array-field.mjs +22 -22
- package/dist/client/components/fields/object-field.mjs +5 -5
- package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
- package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
- package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
- package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
- package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
- package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
- package/dist/client/components/fields/relation-picker.mjs +7 -6
- package/dist/client/components/fields/relation-select.mjs +71 -47
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
- package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
- package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
- package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
- package/dist/client/components/fields/upload-field.mjs +45 -49
- package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
- package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
- package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
- package/dist/client/components/history-sidebar.mjs +850 -340
- package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
- package/dist/client/components/locale-switcher.mjs +8 -8
- package/dist/client/components/media/media-grid.mjs +12 -9
- package/dist/client/components/media/media-picker-dialog.mjs +242 -230
- package/dist/client/components/preview/live-preview-mode.mjs +1 -1
- package/dist/client/components/primitives/asset-preview.mjs +37 -22
- package/dist/client/components/primitives/date-input.mjs +212 -249
- package/dist/client/components/primitives/dropzone.mjs +192 -159
- package/dist/client/components/primitives/field-select-control.mjs +93 -0
- package/dist/client/components/primitives/select-multi.mjs +251 -230
- package/dist/client/components/primitives/select-single.mjs +345 -290
- package/dist/client/components/primitives/time-input.mjs +2 -2
- package/dist/client/components/sheets/resource-sheet.mjs +2 -0
- package/dist/client/components/ui/accordion.mjs +4 -4
- package/dist/client/components/ui/alert.mjs +3 -3
- package/dist/client/components/ui/badge.mjs +4 -4
- package/dist/client/components/ui/button.mjs +47 -37
- package/dist/client/components/ui/card.mjs +2 -2
- package/dist/client/components/ui/checkbox.mjs +1 -1
- package/dist/client/components/ui/command.mjs +5 -5
- package/dist/client/components/ui/dialog.mjs +3 -3
- package/dist/client/components/ui/drawer.mjs +1 -1
- package/dist/client/components/ui/dropdown-menu.mjs +157 -15
- package/dist/client/components/ui/empty-state.mjs +88 -59
- package/dist/client/components/ui/field.mjs +2 -2
- package/dist/client/components/ui/input-group.mjs +3 -3
- package/dist/client/components/ui/input.mjs +1 -1
- package/dist/client/components/ui/kbd.mjs +1 -1
- package/dist/client/components/ui/label.mjs +1 -1
- package/dist/client/components/ui/popover.mjs +19 -11
- package/dist/client/components/ui/scroll-fade.mjs +170 -0
- package/dist/client/components/ui/search-input.mjs +1 -1
- package/dist/client/components/ui/select.mjs +129 -27
- package/dist/client/components/ui/sheet.mjs +54 -34
- package/dist/client/components/ui/sidebar.mjs +15 -14
- package/dist/client/components/ui/skeleton.mjs +28 -12
- package/dist/client/components/ui/switch.mjs +2 -2
- package/dist/client/components/ui/table.mjs +82 -74
- package/dist/client/components/ui/tabs.mjs +26 -31
- package/dist/client/components/ui/textarea.mjs +1 -1
- package/dist/client/components/ui/tooltip.mjs +1 -1
- package/dist/client/components/widgets/chart-widget.mjs +134 -96
- package/dist/client/components/widgets/progress-widget.mjs +59 -34
- package/dist/client/components/widgets/quick-actions-widget.mjs +184 -113
- package/dist/client/components/widgets/recent-items-widget.mjs +144 -102
- package/dist/client/components/widgets/stats-widget.mjs +91 -72
- package/dist/client/components/widgets/table-widget.mjs +159 -246
- package/dist/client/components/widgets/timeline-widget.mjs +66 -43
- package/dist/client/components/widgets/value-widget.mjs +261 -152
- package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
- package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
- package/dist/client/contexts/focus-context.d.mts +2 -2
- package/dist/client/hooks/use-action.mjs +63 -55
- package/dist/client/hooks/use-audit-history.mjs +1 -65
- package/dist/client/hooks/use-collection-validation.mjs +36 -23
- package/dist/client/hooks/use-collection.mjs +96 -1
- package/dist/client/hooks/use-saved-views.mjs +70 -49
- package/dist/client/hooks/use-server-actions.mjs +59 -40
- package/dist/client/hooks/use-server-validation.mjs +156 -41
- package/dist/client/hooks/use-server-widget-data.mjs +1 -1
- package/dist/client/hooks/use-setup-status.d.mts +3 -3
- package/dist/client/hooks/use-setup-status.mjs +2 -2
- package/dist/client/hooks/use-transition-stage.mjs +2 -10
- package/dist/client/hooks/use-validation-error-map.mjs +31 -13
- package/dist/client/hooks/use-view-state.mjs +238 -174
- package/dist/client/i18n/date-locale.mjs +33 -0
- package/dist/client/i18n/hooks.mjs +17 -1
- package/dist/client/lib/utils.mjs +3 -2
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/preview/preview-field.mjs +2 -2
- package/dist/client/runtime/provider.mjs +8 -1
- package/dist/client/runtime/translations-provider.mjs +1 -1
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +1022 -0
- package/dist/client/styles/index.css +3 -589
- package/dist/client/utils/auto-expand-fields.mjs +4 -2
- package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
- package/dist/client/utils/use-lazy-component.mjs +80 -0
- package/dist/client/views/auth/auth-layout.d.mts +18 -11
- package/dist/client/views/auth/auth-layout.mjs +291 -80
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/forgot-password-form.mjs +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.mjs +1 -1
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.mjs +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +11 -9
- package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
- package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
- package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
- package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
- package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
- package/dist/client/views/collection/columns/build-columns.mjs +29 -9
- package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
- package/dist/client/views/collection/field-renderer.mjs +50 -89
- package/dist/client/views/collection/form-view.mjs +237 -227
- package/dist/client/views/collection/table-view.mjs +1162 -229
- package/dist/client/views/collection/view-skeletons.mjs +222 -79
- package/dist/client/views/common/global-search.mjs +29 -18
- package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
- package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
- package/dist/client/views/dashboard/widget-card.mjs +23 -14
- package/dist/client/views/globals/global-form-view.mjs +634 -589
- package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
- package/dist/client/views/layout/admin-layout.d.mts +3 -6
- package/dist/client/views/layout/admin-layout.mjs +149 -172
- package/dist/client/views/layout/admin-router.mjs +747 -544
- package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
- package/dist/client/views/layout/admin-sidebar.mjs +751 -591
- package/dist/client/views/layout/admin-theme.d.mts +10 -0
- package/dist/client/views/layout/admin-theme.mjs +84 -0
- package/dist/client/views/layout/admin-view-layout.mjs +161 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/accept-invite-page.mjs +49 -26
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.mjs +2 -19
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.mjs +2 -19
- package/dist/client/views/pages/login-page.d.mts +3 -3
- package/dist/client/views/pages/login-page.mjs +4 -21
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +3 -20
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.mjs +3 -20
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +2 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +2 -1
- package/dist/server/augmentation/dashboard.d.mts +67 -3
- package/dist/server/augmentation/form-layout.d.mts +21 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/codegen/admin-client-template.mjs +4 -0
- package/dist/server/fields/blocks.d.mts +1 -1
- package/dist/server/fields/blocks.mjs +12 -0
- package/dist/server/fields/rich-text.d.mts +1 -1
- package/dist/server/fields/rich-text.mjs +8 -0
- package/dist/server/i18n/index.mjs +17 -1
- package/dist/server/i18n/messages/cs.mjs +23 -0
- package/dist/server/i18n/messages/de.mjs +23 -0
- package/dist/server/i18n/messages/en.mjs +64 -1
- package/dist/server/i18n/messages/es.mjs +23 -0
- package/dist/server/i18n/messages/fr.mjs +23 -0
- package/dist/server/i18n/messages/pl.mjs +23 -0
- package/dist/server/i18n/messages/pt.mjs +23 -0
- package/dist/server/i18n/messages/sk.mjs +83 -1
- package/dist/server/modules/admin/block/introspection.mjs +4 -1
- package/dist/server/modules/admin/block/prefetch.mjs +12 -2
- package/dist/server/modules/admin/collections/account.d.mts +50 -50
- package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +64 -64
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/assets.mjs +0 -1
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +40 -28
- package/dist/server/modules/admin/collections/user.mjs +40 -9
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
- package/dist/server/modules/admin/factories.mjs +7 -18
- package/dist/server/modules/admin/index.d.mts +1 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +33 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/setup.d.mts +10 -10
- package/dist/server/modules/admin/routes/setup.mjs +7 -7
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/translations.mjs +5 -1
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +25 -25
- package/dist/server/modules/audit/.generated/module.d.mts +7 -7
- package/dist/server/modules/audit/.generated/module.mjs +1 -1
- package/dist/server/modules/audit/collections/audit-log.d.mts +39 -39
- package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
- package/dist/server/modules/audit/config/app.mjs +99 -42
- package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
- package/dist/server/plugin.mjs +4 -2
- package/dist/server/proxy-factories.d.mts +4 -3
- package/dist/server/proxy-factories.mjs +34 -8
- package/dist/shared/types/saved-views.types.d.mts +2 -0
- package/package.json +6 -4
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
- package/dist/client/components/ui/spinner.mjs +0 -52
- package/dist/client/components/ui/toolbar.mjs +0 -136
- package/dist/client/contexts/breadcrumb-context.mjs +0 -60
- package/dist/client/views/layout/admin-topbar.mjs +0 -236
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { useResolveText, useTranslation } from "../../i18n/hooks.mjs";
|
|
2
|
+
import { formatLabel } from "../../lib/utils.mjs";
|
|
1
3
|
import { selectClient, useAdminStore } from "../../runtime/provider.mjs";
|
|
4
|
+
import { Button } from "../../components/ui/button.mjs";
|
|
2
5
|
import { useSuspenseAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
3
6
|
import { Card } from "../../components/ui/card.mjs";
|
|
7
|
+
import { Skeleton } from "../../components/ui/skeleton.mjs";
|
|
4
8
|
import { parsePrefillParams } from "../../hooks/use-prefill-params.mjs";
|
|
5
9
|
import { useCollectionSchema } from "../../hooks/use-collection-schema.mjs";
|
|
6
10
|
import { getCollectionMetaQueryOptions } from "../../hooks/use-collection-meta.mjs";
|
|
7
11
|
import { useGlobalSchema } from "../../hooks/use-global-schema.mjs";
|
|
8
12
|
import { getGlobalMetaQueryOptions } from "../../hooks/use-global-meta.mjs";
|
|
9
|
-
import {
|
|
13
|
+
import { AdminViewHeader } from "./admin-view-layout.mjs";
|
|
14
|
+
import { FormViewSkeleton, TableViewSkeleton } from "../collection/view-skeletons.mjs";
|
|
10
15
|
import { DashboardGrid } from "../dashboard/dashboard-grid.mjs";
|
|
11
16
|
import { c } from "react/compiler-runtime";
|
|
12
17
|
import { Icon } from "@iconify/react";
|
|
@@ -31,12 +36,20 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
31
36
|
*/
|
|
32
37
|
const EMPTY_COLLECTION_COMPONENTS = {};
|
|
33
38
|
const EMPTY_GLOBAL_COMPONENTS = {};
|
|
39
|
+
const AUTH_ROUTE_SEGMENTS = new Set([
|
|
40
|
+
"login",
|
|
41
|
+
"forgot-password",
|
|
42
|
+
"reset-password",
|
|
43
|
+
"accept-invite",
|
|
44
|
+
"setup"
|
|
45
|
+
]);
|
|
46
|
+
const componentLoaderCache = /* @__PURE__ */ new WeakMap();
|
|
34
47
|
/**
|
|
35
48
|
* Hook that resolves router configuration using Suspense.
|
|
36
49
|
* Suspends until server config is loaded - no loading checks needed.
|
|
37
50
|
*/
|
|
38
51
|
function useRouterConfig(props) {
|
|
39
|
-
const $ = c(
|
|
52
|
+
const $ = c(20);
|
|
40
53
|
const admin = useAdminStore(_temp);
|
|
41
54
|
const { data: serverConfig } = useSuspenseAdminConfig();
|
|
42
55
|
let t0;
|
|
@@ -97,13 +110,15 @@ function useRouterConfig(props) {
|
|
|
97
110
|
}
|
|
98
111
|
const mergedDashboard = t2;
|
|
99
112
|
const t3 = props.pages ?? storePages;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
113
|
+
const t4 = serverConfig?.branding?.name;
|
|
114
|
+
let t5;
|
|
115
|
+
if ($[12] !== mergedDashboard || $[13] !== props.DashboardComponent || $[14] !== serverCollections || $[15] !== serverGlobals || $[16] !== storeViews || $[17] !== t3 || $[18] !== t4) {
|
|
116
|
+
t5 = {
|
|
103
117
|
collections: serverCollections,
|
|
104
118
|
globals: serverGlobals,
|
|
105
119
|
pages: t3,
|
|
106
120
|
views: storeViews,
|
|
121
|
+
brandingName: t4,
|
|
107
122
|
dashboardConfig: mergedDashboard,
|
|
108
123
|
DashboardComponent: props.DashboardComponent
|
|
109
124
|
};
|
|
@@ -114,8 +129,9 @@ function useRouterConfig(props) {
|
|
|
114
129
|
$[16] = storeViews;
|
|
115
130
|
$[17] = t3;
|
|
116
131
|
$[18] = t4;
|
|
117
|
-
|
|
118
|
-
|
|
132
|
+
$[19] = t5;
|
|
133
|
+
} else t5 = $[19];
|
|
134
|
+
return t5;
|
|
119
135
|
}
|
|
120
136
|
function _temp(s) {
|
|
121
137
|
return s.admin;
|
|
@@ -153,6 +169,24 @@ function matchRoute(segments, _collections = {}, globals = {}, pages = {}) {
|
|
|
153
169
|
}
|
|
154
170
|
return { type: "not-found" };
|
|
155
171
|
}
|
|
172
|
+
function formatDocumentTitle(pageTitle, appTitle) {
|
|
173
|
+
const title = pageTitle.trim();
|
|
174
|
+
const app = appTitle.trim() || "Admin";
|
|
175
|
+
if (!title || title === app) return app;
|
|
176
|
+
return `${title} | ${app}`;
|
|
177
|
+
}
|
|
178
|
+
function setDocumentMetaDescription(description) {
|
|
179
|
+
const content = description.trim();
|
|
180
|
+
if (!content) return;
|
|
181
|
+
let meta = document.querySelector("meta[name=\"description\"]");
|
|
182
|
+
if (!meta) {
|
|
183
|
+
meta = document.createElement("meta");
|
|
184
|
+
meta.name = "description";
|
|
185
|
+
meta.setAttribute("data-questpie-admin", "true");
|
|
186
|
+
document.head.appendChild(meta);
|
|
187
|
+
}
|
|
188
|
+
meta.content = content;
|
|
189
|
+
}
|
|
156
190
|
/**
|
|
157
191
|
* Find the first registered view of a given kind from the views registry.
|
|
158
192
|
* Used as a fallback when no explicit view is configured on a collection/global.
|
|
@@ -192,20 +226,24 @@ function isDynamicImportLoader(loader) {
|
|
|
192
226
|
if (candidate.$$typeof) return false;
|
|
193
227
|
return loader.length === 0;
|
|
194
228
|
}
|
|
195
|
-
function
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
229
|
+
function getCachedComponent(loader) {
|
|
230
|
+
if (!isDynamicImportLoader(loader)) return void 0;
|
|
231
|
+
return componentLoaderCache.get(loader);
|
|
232
|
+
}
|
|
233
|
+
function cacheComponent(loader, Component) {
|
|
234
|
+
if (!isDynamicImportLoader(loader)) return;
|
|
235
|
+
componentLoaderCache.set(loader, Component);
|
|
236
|
+
}
|
|
237
|
+
function ViewLoadingState(t0) {
|
|
238
|
+
const $ = c(2);
|
|
239
|
+
const { viewKind } = t0;
|
|
240
|
+
let t1;
|
|
241
|
+
if ($[0] !== viewKind) {
|
|
242
|
+
t1 = viewKind === "list" ? /* @__PURE__ */ jsx(TableViewSkeleton, {}) : /* @__PURE__ */ jsx(FormViewSkeleton, {});
|
|
243
|
+
$[0] = viewKind;
|
|
244
|
+
$[1] = t1;
|
|
245
|
+
} else t1 = $[1];
|
|
246
|
+
return t1;
|
|
209
247
|
}
|
|
210
248
|
function UnknownViewState(t0) {
|
|
211
249
|
const $ = c(7);
|
|
@@ -288,6 +326,79 @@ function RouterSkeleton() {
|
|
|
288
326
|
} else t2 = $[2];
|
|
289
327
|
return t2;
|
|
290
328
|
}
|
|
329
|
+
function AuthPageSkeleton() {
|
|
330
|
+
const $ = c(3);
|
|
331
|
+
let t0;
|
|
332
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
333
|
+
t0 = /* @__PURE__ */ jsxs("aside", {
|
|
334
|
+
className: "qa-auth-layout__brand flex flex-col items-center justify-center gap-8",
|
|
335
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
336
|
+
className: "flex items-center gap-3",
|
|
337
|
+
children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-9" }), /* @__PURE__ */ jsx(Skeleton, {
|
|
338
|
+
variant: "text",
|
|
339
|
+
className: "h-4 w-36"
|
|
340
|
+
})]
|
|
341
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
342
|
+
variant: "text",
|
|
343
|
+
className: "hidden h-3 w-40 lg:block"
|
|
344
|
+
})]
|
|
345
|
+
});
|
|
346
|
+
$[0] = t0;
|
|
347
|
+
} else t0 = $[0];
|
|
348
|
+
let t1;
|
|
349
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
350
|
+
t1 = /* @__PURE__ */ jsxs("div", {
|
|
351
|
+
className: "space-y-2",
|
|
352
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
353
|
+
variant: "text",
|
|
354
|
+
className: "h-4 w-20"
|
|
355
|
+
}), /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" })]
|
|
356
|
+
});
|
|
357
|
+
$[1] = t1;
|
|
358
|
+
} else t1 = $[1];
|
|
359
|
+
let t2;
|
|
360
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
361
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
362
|
+
className: "qa-auth-layout bg-background text-foreground relative flex min-h-screen items-center justify-center overflow-hidden px-5 py-8 sm:px-8",
|
|
363
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
364
|
+
className: "qa-auth-layout__shell grid w-full max-w-4xl items-center gap-10 lg:grid-cols-[minmax(220px,280px)_minmax(360px,384px)] lg:gap-16",
|
|
365
|
+
children: [t0, /* @__PURE__ */ jsx("main", {
|
|
366
|
+
className: "qa-auth-layout__form-panel flex items-center justify-center",
|
|
367
|
+
children: /* @__PURE__ */ jsx(Card, {
|
|
368
|
+
className: "border-border-subtle w-full max-w-sm shadow-none",
|
|
369
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
370
|
+
className: "space-y-5 p-4",
|
|
371
|
+
children: [
|
|
372
|
+
t1,
|
|
373
|
+
/* @__PURE__ */ jsxs("div", {
|
|
374
|
+
className: "space-y-2",
|
|
375
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
376
|
+
variant: "text",
|
|
377
|
+
className: "h-4 w-24"
|
|
378
|
+
}), /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" })]
|
|
379
|
+
}),
|
|
380
|
+
/* @__PURE__ */ jsx(Skeleton, {
|
|
381
|
+
variant: "text",
|
|
382
|
+
className: "h-4 w-28"
|
|
383
|
+
}),
|
|
384
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" })
|
|
385
|
+
]
|
|
386
|
+
})
|
|
387
|
+
})
|
|
388
|
+
})]
|
|
389
|
+
})
|
|
390
|
+
});
|
|
391
|
+
$[2] = t2;
|
|
392
|
+
} else t2 = $[2];
|
|
393
|
+
return t2;
|
|
394
|
+
}
|
|
395
|
+
function getFallbackForSegments(segments) {
|
|
396
|
+
const [first, second, third] = segments;
|
|
397
|
+
if (first && AUTH_ROUTE_SEGMENTS.has(first)) return /* @__PURE__ */ jsx(AuthPageSkeleton, {});
|
|
398
|
+
if (first === "collections" && second) return third ? /* @__PURE__ */ jsx(FormViewSkeleton, {}) : /* @__PURE__ */ jsx(TableViewSkeleton, {});
|
|
399
|
+
if (first === "globals" && second) return /* @__PURE__ */ jsx(FormViewSkeleton, {});
|
|
400
|
+
return /* @__PURE__ */ jsx(RouterSkeleton, {});
|
|
401
|
+
}
|
|
291
402
|
function shallowEqualComponentProps(a, b) {
|
|
292
403
|
if (a === b) return true;
|
|
293
404
|
const aKeys = Object.keys(a);
|
|
@@ -303,21 +414,25 @@ function areRegistryViewRendererPropsEqual(prev, next) {
|
|
|
303
414
|
return shallowEqualComponentProps(prev.componentProps, next.componentProps);
|
|
304
415
|
}
|
|
305
416
|
const RegistryViewRenderer = React.memo(function RegistryViewRenderer$1(t0) {
|
|
306
|
-
const $ = c(
|
|
417
|
+
const $ = c(18);
|
|
307
418
|
const { loader, componentProps, viewKind, viewId } = t0;
|
|
308
419
|
let t1;
|
|
309
|
-
if ($[0]
|
|
310
|
-
t1 = {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
420
|
+
if ($[0] !== loader) {
|
|
421
|
+
t1 = () => {
|
|
422
|
+
const cachedComponent = getCachedComponent(loader);
|
|
423
|
+
return {
|
|
424
|
+
Component: cachedComponent ?? null,
|
|
425
|
+
loading: !cachedComponent,
|
|
426
|
+
error: null
|
|
427
|
+
};
|
|
314
428
|
};
|
|
315
|
-
$[0] =
|
|
316
|
-
|
|
429
|
+
$[0] = loader;
|
|
430
|
+
$[1] = t1;
|
|
431
|
+
} else t1 = $[1];
|
|
317
432
|
const [state, setState] = React.useState(t1);
|
|
318
433
|
let t2;
|
|
319
434
|
let t3;
|
|
320
|
-
if ($[
|
|
435
|
+
if ($[2] !== loader) {
|
|
321
436
|
t2 = () => {
|
|
322
437
|
if (!loader) {
|
|
323
438
|
setState({
|
|
@@ -335,6 +450,15 @@ const RegistryViewRenderer = React.memo(function RegistryViewRenderer$1(t0) {
|
|
|
335
450
|
});
|
|
336
451
|
return;
|
|
337
452
|
}
|
|
453
|
+
const cachedComponent_0 = getCachedComponent(loader);
|
|
454
|
+
if (cachedComponent_0) {
|
|
455
|
+
setState({
|
|
456
|
+
Component: cachedComponent_0,
|
|
457
|
+
loading: false,
|
|
458
|
+
error: null
|
|
459
|
+
});
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
338
462
|
let mounted = true;
|
|
339
463
|
setState(_temp2);
|
|
340
464
|
(async () => {
|
|
@@ -344,6 +468,7 @@ const RegistryViewRenderer = React.memo(function RegistryViewRenderer$1(t0) {
|
|
|
344
468
|
let Component;
|
|
345
469
|
if (result.default) Component = result.default;
|
|
346
470
|
else Component = result;
|
|
471
|
+
cacheComponent(loader, Component);
|
|
347
472
|
setState({
|
|
348
473
|
Component,
|
|
349
474
|
loading: false,
|
|
@@ -367,55 +492,64 @@ const RegistryViewRenderer = React.memo(function RegistryViewRenderer$1(t0) {
|
|
|
367
492
|
};
|
|
368
493
|
};
|
|
369
494
|
t3 = [loader];
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
495
|
+
$[2] = loader;
|
|
496
|
+
$[3] = t2;
|
|
497
|
+
$[4] = t3;
|
|
373
498
|
} else {
|
|
374
|
-
t2 = $[
|
|
375
|
-
t3 = $[
|
|
499
|
+
t2 = $[3];
|
|
500
|
+
t3 = $[4];
|
|
376
501
|
}
|
|
377
502
|
React.useEffect(t2, t3);
|
|
378
503
|
if (state.loading) {
|
|
379
504
|
let t4$1;
|
|
380
|
-
if ($[
|
|
381
|
-
t4$1 = /* @__PURE__ */ jsx(ViewLoadingState, {});
|
|
382
|
-
$[
|
|
383
|
-
|
|
505
|
+
if ($[5] !== viewKind) {
|
|
506
|
+
t4$1 = /* @__PURE__ */ jsx(ViewLoadingState, { viewKind });
|
|
507
|
+
$[5] = viewKind;
|
|
508
|
+
$[6] = t4$1;
|
|
509
|
+
} else t4$1 = $[6];
|
|
384
510
|
return t4$1;
|
|
385
511
|
}
|
|
386
512
|
if (state.error || !state.Component) {
|
|
387
513
|
let t4$1;
|
|
388
|
-
if ($[
|
|
514
|
+
if ($[7] !== viewId || $[8] !== viewKind) {
|
|
389
515
|
t4$1 = /* @__PURE__ */ jsx(UnknownViewState, {
|
|
390
516
|
viewKind,
|
|
391
517
|
viewId
|
|
392
518
|
});
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
} else t4$1 = $[
|
|
519
|
+
$[7] = viewId;
|
|
520
|
+
$[8] = viewKind;
|
|
521
|
+
$[9] = t4$1;
|
|
522
|
+
} else t4$1 = $[9];
|
|
397
523
|
return t4$1;
|
|
398
524
|
}
|
|
399
525
|
const Component_0 = state.Component;
|
|
400
526
|
let t4;
|
|
401
|
-
if ($[
|
|
402
|
-
t4 = /* @__PURE__ */ jsx(ViewLoadingState, {});
|
|
403
|
-
$[
|
|
404
|
-
|
|
527
|
+
if ($[10] !== viewKind) {
|
|
528
|
+
t4 = /* @__PURE__ */ jsx(ViewLoadingState, { viewKind });
|
|
529
|
+
$[10] = viewKind;
|
|
530
|
+
$[11] = t4;
|
|
531
|
+
} else t4 = $[11];
|
|
405
532
|
let t5;
|
|
406
|
-
if ($[
|
|
407
|
-
t5 = /* @__PURE__ */ jsx(
|
|
533
|
+
if ($[12] !== Component_0 || $[13] !== componentProps) {
|
|
534
|
+
t5 = /* @__PURE__ */ jsx(Component_0, { ...componentProps });
|
|
535
|
+
$[12] = Component_0;
|
|
536
|
+
$[13] = componentProps;
|
|
537
|
+
$[14] = t5;
|
|
538
|
+
} else t5 = $[14];
|
|
539
|
+
let t6;
|
|
540
|
+
if ($[15] !== t4 || $[16] !== t5) {
|
|
541
|
+
t6 = /* @__PURE__ */ jsx(React.Suspense, {
|
|
408
542
|
fallback: t4,
|
|
409
|
-
children:
|
|
543
|
+
children: t5
|
|
410
544
|
});
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
} else
|
|
415
|
-
return
|
|
545
|
+
$[15] = t4;
|
|
546
|
+
$[16] = t5;
|
|
547
|
+
$[17] = t6;
|
|
548
|
+
} else t6 = $[17];
|
|
549
|
+
return t6;
|
|
416
550
|
}, areRegistryViewRendererPropsEqual);
|
|
417
551
|
function DefaultDashboard() {
|
|
418
|
-
const $ = c(
|
|
552
|
+
const $ = c(3);
|
|
419
553
|
let t0;
|
|
420
554
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
421
555
|
t0 = (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
|
|
@@ -429,57 +563,44 @@ function DefaultDashboard() {
|
|
|
429
563
|
const date = t0;
|
|
430
564
|
let t1;
|
|
431
565
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
432
|
-
t1 = /* @__PURE__ */ jsx(
|
|
433
|
-
className: "mb-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
children: "Dashboard"
|
|
437
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
438
|
-
className: "text-muted-foreground mt-1 font-mono text-xs tracking-widest uppercase",
|
|
439
|
-
children: date
|
|
440
|
-
})] })
|
|
566
|
+
t1 = /* @__PURE__ */ jsx(AdminViewHeader, {
|
|
567
|
+
className: "mb-4",
|
|
568
|
+
title: "Dashboard",
|
|
569
|
+
meta: date
|
|
441
570
|
});
|
|
442
571
|
$[1] = t1;
|
|
443
572
|
} else t1 = $[1];
|
|
444
573
|
let t2;
|
|
445
574
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
446
|
-
t2 = /* @__PURE__ */
|
|
447
|
-
$[2] = t2;
|
|
448
|
-
} else t2 = $[2];
|
|
449
|
-
let t3;
|
|
450
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
451
|
-
t3 = /* @__PURE__ */ jsxs("div", {
|
|
575
|
+
t2 = /* @__PURE__ */ jsxs("div", {
|
|
452
576
|
className: "qa-default-dashboard container",
|
|
453
577
|
children: [t1, /* @__PURE__ */ jsx("div", {
|
|
454
578
|
className: "grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",
|
|
455
|
-
children: /* @__PURE__ */
|
|
456
|
-
className: "
|
|
457
|
-
children:
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
/* @__PURE__ */
|
|
461
|
-
className: "
|
|
462
|
-
children:
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
})
|
|
475
|
-
]
|
|
476
|
-
})]
|
|
579
|
+
children: /* @__PURE__ */ jsx(Card, {
|
|
580
|
+
className: "p-6",
|
|
581
|
+
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
582
|
+
/* @__PURE__ */ jsxs("div", {
|
|
583
|
+
className: "mb-4 flex items-center gap-3",
|
|
584
|
+
children: [/* @__PURE__ */ jsx("div", { className: "bg-primary h-2 w-2 rounded-full" }), /* @__PURE__ */ jsx("h3", {
|
|
585
|
+
className: "text-muted-foreground font-chrome chrome-meta text-xs font-medium",
|
|
586
|
+
children: "System Status"
|
|
587
|
+
})]
|
|
588
|
+
}),
|
|
589
|
+
/* @__PURE__ */ jsx("h2", {
|
|
590
|
+
className: "mb-2 text-xl font-semibold",
|
|
591
|
+
children: "Welcome back"
|
|
592
|
+
}),
|
|
593
|
+
/* @__PURE__ */ jsx("p", {
|
|
594
|
+
className: "text-muted-foreground text-sm leading-relaxed",
|
|
595
|
+
children: "Select a collection from the sidebar to manage your content."
|
|
596
|
+
})
|
|
597
|
+
] })
|
|
477
598
|
})
|
|
478
599
|
})]
|
|
479
600
|
});
|
|
480
|
-
$[
|
|
481
|
-
} else
|
|
482
|
-
return
|
|
601
|
+
$[2] = t2;
|
|
602
|
+
} else t2 = $[2];
|
|
603
|
+
return t2;
|
|
483
604
|
}
|
|
484
605
|
function DefaultNotFound() {
|
|
485
606
|
const $ = c(1);
|
|
@@ -500,42 +621,31 @@ function DefaultNotFound() {
|
|
|
500
621
|
return t0;
|
|
501
622
|
}
|
|
502
623
|
function RestrictedAccess(t0) {
|
|
503
|
-
const $ = c(
|
|
624
|
+
const $ = c(16);
|
|
504
625
|
const { type, name, navigate, basePath } = t0;
|
|
505
626
|
let t1;
|
|
506
627
|
let t2;
|
|
507
628
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
508
|
-
t1 = /* @__PURE__ */ jsx("div", {
|
|
509
|
-
t2 = /* @__PURE__ */ jsx("div", { className: "bg-muted absolute -bottom-16 -left-16 h-40 w-40 rounded-full blur-3xl" });
|
|
510
|
-
$[0] = t1;
|
|
511
|
-
$[1] = t2;
|
|
512
|
-
} else {
|
|
513
|
-
t1 = $[0];
|
|
514
|
-
t2 = $[1];
|
|
515
|
-
}
|
|
516
|
-
let t3;
|
|
517
|
-
let t4;
|
|
518
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
519
|
-
t3 = /* @__PURE__ */ jsx("div", {
|
|
629
|
+
t1 = /* @__PURE__ */ jsx("div", {
|
|
520
630
|
className: "bg-muted mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-full",
|
|
521
631
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
522
632
|
icon: "ph:lock-simple",
|
|
523
633
|
className: "text-muted-foreground h-8 w-8"
|
|
524
634
|
})
|
|
525
635
|
});
|
|
526
|
-
|
|
636
|
+
t2 = /* @__PURE__ */ jsx("h1", {
|
|
527
637
|
className: "mb-2 text-xl font-semibold",
|
|
528
638
|
children: "Access Restricted"
|
|
529
639
|
});
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
640
|
+
$[0] = t1;
|
|
641
|
+
$[1] = t2;
|
|
532
642
|
} else {
|
|
533
|
-
|
|
534
|
-
|
|
643
|
+
t1 = $[0];
|
|
644
|
+
t2 = $[1];
|
|
535
645
|
}
|
|
536
|
-
let
|
|
537
|
-
if ($[
|
|
538
|
-
|
|
646
|
+
let t3;
|
|
647
|
+
if ($[2] !== name) {
|
|
648
|
+
t3 = /* @__PURE__ */ jsxs("span", {
|
|
539
649
|
className: "text-foreground font-mono",
|
|
540
650
|
children: [
|
|
541
651
|
"\"",
|
|
@@ -543,93 +653,111 @@ function RestrictedAccess(t0) {
|
|
|
543
653
|
"\""
|
|
544
654
|
]
|
|
545
655
|
});
|
|
546
|
-
$[
|
|
547
|
-
$[
|
|
548
|
-
} else
|
|
549
|
-
let
|
|
550
|
-
if ($[
|
|
551
|
-
|
|
656
|
+
$[2] = name;
|
|
657
|
+
$[3] = t3;
|
|
658
|
+
} else t3 = $[3];
|
|
659
|
+
let t4;
|
|
660
|
+
if ($[4] !== t3 || $[5] !== type) {
|
|
661
|
+
t4 = /* @__PURE__ */ jsxs("p", {
|
|
552
662
|
className: "text-muted-foreground mb-6 text-sm",
|
|
553
663
|
children: [
|
|
554
664
|
"The ",
|
|
555
665
|
type,
|
|
556
666
|
" ",
|
|
557
|
-
|
|
667
|
+
t3,
|
|
558
668
|
" is not available in the admin panel. It may be hidden or you don't have permission to access it."
|
|
559
669
|
]
|
|
560
670
|
});
|
|
561
|
-
$[
|
|
562
|
-
$[
|
|
563
|
-
$[
|
|
564
|
-
} else
|
|
565
|
-
let
|
|
566
|
-
if ($[
|
|
567
|
-
|
|
568
|
-
$[
|
|
569
|
-
$[
|
|
570
|
-
$[
|
|
571
|
-
} else
|
|
572
|
-
let
|
|
573
|
-
if ($[
|
|
574
|
-
|
|
671
|
+
$[4] = t3;
|
|
672
|
+
$[5] = type;
|
|
673
|
+
$[6] = t4;
|
|
674
|
+
} else t4 = $[6];
|
|
675
|
+
let t5;
|
|
676
|
+
if ($[7] !== basePath || $[8] !== navigate) {
|
|
677
|
+
t5 = () => navigate(basePath);
|
|
678
|
+
$[7] = basePath;
|
|
679
|
+
$[8] = navigate;
|
|
680
|
+
$[9] = t5;
|
|
681
|
+
} else t5 = $[9];
|
|
682
|
+
let t6;
|
|
683
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
684
|
+
t6 = /* @__PURE__ */ jsx(Icon, {
|
|
575
685
|
icon: "ph:arrow-left",
|
|
576
686
|
className: "h-4 w-4"
|
|
577
687
|
});
|
|
578
|
-
$[
|
|
579
|
-
} else
|
|
580
|
-
let
|
|
581
|
-
if ($[
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
onClick:
|
|
585
|
-
|
|
586
|
-
children: [t8, "Back to Dashboard"]
|
|
688
|
+
$[10] = t6;
|
|
689
|
+
} else t6 = $[10];
|
|
690
|
+
let t7;
|
|
691
|
+
if ($[11] !== t5) {
|
|
692
|
+
t7 = /* @__PURE__ */ jsxs(Button, {
|
|
693
|
+
variant: "outline",
|
|
694
|
+
onClick: t5,
|
|
695
|
+
children: [t6, "Back to Dashboard"]
|
|
587
696
|
});
|
|
588
|
-
$[
|
|
589
|
-
$[
|
|
590
|
-
} else
|
|
591
|
-
let
|
|
592
|
-
if ($[
|
|
593
|
-
|
|
697
|
+
$[11] = t5;
|
|
698
|
+
$[12] = t7;
|
|
699
|
+
} else t7 = $[12];
|
|
700
|
+
let t8;
|
|
701
|
+
if ($[13] !== t4 || $[14] !== t7) {
|
|
702
|
+
t8 = /* @__PURE__ */ jsx("div", {
|
|
594
703
|
className: "qa-restricted-access container py-12",
|
|
595
|
-
children: /* @__PURE__ */
|
|
596
|
-
className: "
|
|
597
|
-
children: [
|
|
704
|
+
children: /* @__PURE__ */ jsx(Card, {
|
|
705
|
+
className: "mx-auto max-w-lg p-8 text-center",
|
|
706
|
+
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
598
707
|
t1,
|
|
599
708
|
t2,
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
t3,
|
|
604
|
-
t4,
|
|
605
|
-
t6,
|
|
606
|
-
t9
|
|
607
|
-
]
|
|
608
|
-
})
|
|
609
|
-
]
|
|
709
|
+
t4,
|
|
710
|
+
t7
|
|
711
|
+
] })
|
|
610
712
|
})
|
|
611
713
|
});
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
614
|
-
$[
|
|
615
|
-
} else
|
|
616
|
-
return
|
|
714
|
+
$[13] = t4;
|
|
715
|
+
$[14] = t7;
|
|
716
|
+
$[15] = t8;
|
|
717
|
+
} else t8 = $[15];
|
|
718
|
+
return t8;
|
|
617
719
|
}
|
|
618
720
|
function LazyPageRenderer(t0) {
|
|
619
|
-
const $ = c(
|
|
721
|
+
const $ = c(14);
|
|
620
722
|
const { config } = t0;
|
|
621
|
-
const
|
|
622
|
-
const [loading, setLoading] = React.useState(true);
|
|
623
|
-
const [error, setError] = React.useState(null);
|
|
723
|
+
const component = config.component;
|
|
624
724
|
let t1;
|
|
725
|
+
if ($[0] !== component) {
|
|
726
|
+
t1 = () => getCachedComponent(component) ?? null;
|
|
727
|
+
$[0] = component;
|
|
728
|
+
$[1] = t1;
|
|
729
|
+
} else t1 = $[1];
|
|
730
|
+
const [Component, setComponent] = React.useState(t1);
|
|
625
731
|
let t2;
|
|
626
|
-
if ($[
|
|
627
|
-
|
|
732
|
+
if ($[2] !== Component) {
|
|
733
|
+
t2 = () => Component == null;
|
|
734
|
+
$[2] = Component;
|
|
735
|
+
$[3] = t2;
|
|
736
|
+
} else t2 = $[3];
|
|
737
|
+
const [loading, setLoading] = React.useState(t2);
|
|
738
|
+
const [error, setError] = React.useState(null);
|
|
739
|
+
let t3;
|
|
740
|
+
let t4;
|
|
741
|
+
if ($[4] !== component) {
|
|
742
|
+
t3 = () => {
|
|
628
743
|
let mounted = true;
|
|
629
744
|
(async function load() {
|
|
630
745
|
try {
|
|
631
|
-
|
|
632
|
-
|
|
746
|
+
const cachedComponent = getCachedComponent(component);
|
|
747
|
+
if (cachedComponent) {
|
|
748
|
+
if (mounted) {
|
|
749
|
+
setComponent(() => cachedComponent);
|
|
750
|
+
setLoading(false);
|
|
751
|
+
setError(null);
|
|
752
|
+
}
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
if (mounted) {
|
|
756
|
+
setLoading(true);
|
|
757
|
+
setError(null);
|
|
758
|
+
}
|
|
759
|
+
if (typeof component === "function") {
|
|
760
|
+
const result = component();
|
|
633
761
|
let isThenable = false;
|
|
634
762
|
if (result != null) {
|
|
635
763
|
if (typeof result.then === "function") isThenable = true;
|
|
@@ -640,15 +768,16 @@ function LazyPageRenderer(t0) {
|
|
|
640
768
|
let resolved;
|
|
641
769
|
if (mod.default) resolved = mod.default;
|
|
642
770
|
else resolved = mod;
|
|
771
|
+
cacheComponent(component, resolved);
|
|
643
772
|
setComponent(() => resolved);
|
|
644
773
|
}
|
|
645
|
-
} else if (mounted) setComponent(() =>
|
|
646
|
-
} else if (
|
|
647
|
-
if (mounted) setComponent(() =>
|
|
774
|
+
} else if (mounted) setComponent(() => component);
|
|
775
|
+
} else if (component) {
|
|
776
|
+
if (mounted) setComponent(() => component);
|
|
648
777
|
}
|
|
649
778
|
if (mounted) setLoading(false);
|
|
650
|
-
} catch (
|
|
651
|
-
const err =
|
|
779
|
+
} catch (t5$1) {
|
|
780
|
+
const err = t5$1;
|
|
652
781
|
if (mounted) {
|
|
653
782
|
let resolvedError;
|
|
654
783
|
if (err instanceof Error) resolvedError = err;
|
|
@@ -662,59 +791,55 @@ function LazyPageRenderer(t0) {
|
|
|
662
791
|
mounted = false;
|
|
663
792
|
};
|
|
664
793
|
};
|
|
665
|
-
|
|
666
|
-
$[
|
|
667
|
-
$[
|
|
668
|
-
$[
|
|
794
|
+
t4 = [component];
|
|
795
|
+
$[4] = component;
|
|
796
|
+
$[5] = t3;
|
|
797
|
+
$[6] = t4;
|
|
669
798
|
} else {
|
|
670
|
-
|
|
671
|
-
|
|
799
|
+
t3 = $[5];
|
|
800
|
+
t4 = $[6];
|
|
672
801
|
}
|
|
673
|
-
React.useEffect(
|
|
802
|
+
React.useEffect(t3, t4);
|
|
674
803
|
if (loading) {
|
|
675
|
-
let
|
|
676
|
-
if ($[
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
});
|
|
684
|
-
$[3] = t3$1;
|
|
685
|
-
} else t3$1 = $[3];
|
|
686
|
-
return t3$1;
|
|
804
|
+
let t5$1;
|
|
805
|
+
if ($[7] !== config.path) {
|
|
806
|
+
const path = config.path?.replace(/^\//, "") ?? "";
|
|
807
|
+
t5$1 = AUTH_ROUTE_SEGMENTS.has(path) ? /* @__PURE__ */ jsx(AuthPageSkeleton, {}) : /* @__PURE__ */ jsx(RouterSkeleton, {});
|
|
808
|
+
$[7] = config.path;
|
|
809
|
+
$[8] = t5$1;
|
|
810
|
+
} else t5$1 = $[8];
|
|
811
|
+
return t5$1;
|
|
687
812
|
}
|
|
688
813
|
if (error) {
|
|
689
|
-
let
|
|
690
|
-
if ($[
|
|
691
|
-
|
|
814
|
+
let t5$1;
|
|
815
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
816
|
+
t5$1 = /* @__PURE__ */ jsx("h1", {
|
|
692
817
|
className: "text-destructive mb-4 text-2xl font-bold",
|
|
693
818
|
children: "Error"
|
|
694
819
|
});
|
|
695
|
-
$[
|
|
696
|
-
} else
|
|
697
|
-
let
|
|
698
|
-
if ($[
|
|
699
|
-
|
|
820
|
+
$[9] = t5$1;
|
|
821
|
+
} else t5$1 = $[9];
|
|
822
|
+
let t6;
|
|
823
|
+
if ($[10] !== error.message) {
|
|
824
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
700
825
|
className: "container",
|
|
701
|
-
children: [
|
|
826
|
+
children: [t5$1, /* @__PURE__ */ jsx("p", {
|
|
702
827
|
className: "text-muted-foreground",
|
|
703
828
|
children: error.message
|
|
704
829
|
})]
|
|
705
830
|
});
|
|
706
|
-
$[
|
|
707
|
-
$[
|
|
708
|
-
} else
|
|
709
|
-
return
|
|
831
|
+
$[10] = error.message;
|
|
832
|
+
$[11] = t6;
|
|
833
|
+
} else t6 = $[11];
|
|
834
|
+
return t6;
|
|
710
835
|
}
|
|
711
|
-
let
|
|
712
|
-
if ($[
|
|
713
|
-
|
|
714
|
-
$[
|
|
715
|
-
$[
|
|
716
|
-
} else
|
|
717
|
-
return
|
|
836
|
+
let t5;
|
|
837
|
+
if ($[12] !== Component) {
|
|
838
|
+
t5 = Component ? /* @__PURE__ */ jsx(Component, {}) : /* @__PURE__ */ jsx(DefaultNotFound, {});
|
|
839
|
+
$[12] = Component;
|
|
840
|
+
$[13] = t5;
|
|
841
|
+
} else t5 = $[13];
|
|
842
|
+
return t5;
|
|
718
843
|
}
|
|
719
844
|
/**
|
|
720
845
|
* AdminRouter Component
|
|
@@ -723,29 +848,37 @@ function LazyPageRenderer(t0) {
|
|
|
723
848
|
* Uses Suspense internally - shows skeleton while config loads.
|
|
724
849
|
*/
|
|
725
850
|
function AdminRouter(props) {
|
|
726
|
-
const $ = c(
|
|
851
|
+
const $ = c(7);
|
|
727
852
|
let t0;
|
|
728
|
-
if ($[0]
|
|
729
|
-
t0 =
|
|
730
|
-
$[0] =
|
|
731
|
-
|
|
853
|
+
if ($[0] !== props.segments) {
|
|
854
|
+
t0 = getFallbackForSegments(props.segments);
|
|
855
|
+
$[0] = props.segments;
|
|
856
|
+
$[1] = t0;
|
|
857
|
+
} else t0 = $[1];
|
|
732
858
|
let t1;
|
|
733
|
-
if ($[
|
|
734
|
-
t1 = /* @__PURE__ */ jsx(
|
|
859
|
+
if ($[2] !== props) {
|
|
860
|
+
t1 = /* @__PURE__ */ jsx(AdminRouterInner, { ...props });
|
|
861
|
+
$[2] = props;
|
|
862
|
+
$[3] = t1;
|
|
863
|
+
} else t1 = $[3];
|
|
864
|
+
let t2;
|
|
865
|
+
if ($[4] !== t0 || $[5] !== t1) {
|
|
866
|
+
t2 = /* @__PURE__ */ jsx(React.Suspense, {
|
|
735
867
|
fallback: t0,
|
|
736
|
-
children:
|
|
868
|
+
children: t1
|
|
737
869
|
});
|
|
738
|
-
$[
|
|
739
|
-
$[
|
|
740
|
-
|
|
741
|
-
|
|
870
|
+
$[4] = t0;
|
|
871
|
+
$[5] = t1;
|
|
872
|
+
$[6] = t2;
|
|
873
|
+
} else t2 = $[6];
|
|
874
|
+
return t2;
|
|
742
875
|
}
|
|
743
876
|
/**
|
|
744
877
|
* Inner router component that uses Suspense for data loading.
|
|
745
878
|
* Guaranteed to have config loaded when rendering.
|
|
746
879
|
*/
|
|
747
880
|
function AdminRouterInner(t0) {
|
|
748
|
-
const $ = c(
|
|
881
|
+
const $ = c(153);
|
|
749
882
|
const { segments, navigate, basePath: t1, searchParams: searchParamsProp, collections: collectionsProp, globals: globalsProp, pages: pagesProp, DashboardComponent: DashboardComponentProp, dashboardConfig: dashboardConfigProp, collectionComponents, globalComponents, registry, NotFoundComponent } = t0;
|
|
750
883
|
const basePath = t1 === void 0 ? "/admin" : t1;
|
|
751
884
|
const resolvedCollectionComponents = collectionComponents ?? EMPTY_COLLECTION_COMPONENTS;
|
|
@@ -796,7 +929,7 @@ function AdminRouterInner(t0) {
|
|
|
796
929
|
$[8] = pagesProp;
|
|
797
930
|
$[9] = t4;
|
|
798
931
|
} else t4 = $[9];
|
|
799
|
-
const { collections, globals, pages, views, dashboardConfig, DashboardComponent } = useRouterConfig(t4);
|
|
932
|
+
const { collections, globals, pages, views, brandingName, dashboardConfig, DashboardComponent } = useRouterConfig(t4);
|
|
800
933
|
let t5;
|
|
801
934
|
if ($[10] !== collections || $[11] !== globals || $[12] !== pages || $[13] !== segments) {
|
|
802
935
|
t5 = matchRoute(segments, collections, globals, pages);
|
|
@@ -829,263 +962,327 @@ function AdminRouterInner(t0) {
|
|
|
829
962
|
$[18] = t9;
|
|
830
963
|
} else t9 = $[18];
|
|
831
964
|
const { data: activeGlobalSchema } = useGlobalSchema(activeGlobalName, t9);
|
|
965
|
+
const { t } = useTranslation();
|
|
966
|
+
const resolveText = useResolveText();
|
|
832
967
|
let t10;
|
|
833
|
-
if ($[19] !==
|
|
834
|
-
t10 =
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
t11 = () => {
|
|
842
|
-
let pageTitle = "Admin";
|
|
843
|
-
bb54: switch (route.type) {
|
|
968
|
+
if ($[19] !== activeCollectionSchema || $[20] !== activeGlobalSchema || $[21] !== brandingName || $[22] !== collections || $[23] !== dashboardConfig?.description || $[24] !== dashboardConfig?.title || $[25] !== globals || $[26] !== resolveText || $[27] !== route.config || $[28] !== route.name || $[29] !== route.type || $[30] !== t) {
|
|
969
|
+
t10 = () => {
|
|
970
|
+
const appTitle = resolveText(brandingName, "Admin");
|
|
971
|
+
let pageTitle = t("dashboard.title");
|
|
972
|
+
let metaDescription = pageTitle;
|
|
973
|
+
const resolveResourceLabel = (config, schemaConfig, fallback) => resolveText(config?.label ?? config?.meta?.label ?? schemaConfig?.label, formatLabel(fallback));
|
|
974
|
+
const resolveResourceDescription = (config_0, schemaConfig_0) => resolveText(config_0?.description ?? config_0?.meta?.description ?? schemaConfig_0?.description).trim();
|
|
975
|
+
bb104: switch (route.type) {
|
|
844
976
|
case "dashboard":
|
|
845
|
-
pageTitle = "
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
case "
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
977
|
+
pageTitle = resolveText(dashboardConfig?.title, t("dashboard.title"));
|
|
978
|
+
metaDescription = resolveText(dashboardConfig?.description).trim() || pageTitle;
|
|
979
|
+
break bb104;
|
|
980
|
+
case "collection-list": {
|
|
981
|
+
const config_4 = collections[route.name];
|
|
982
|
+
const schemaConfig_4 = activeCollectionSchema?.admin?.config;
|
|
983
|
+
const label_2 = resolveResourceLabel(config_4, schemaConfig_4, route.name);
|
|
984
|
+
pageTitle = label_2;
|
|
985
|
+
metaDescription = resolveResourceDescription(config_4, schemaConfig_4) || t("collection.list", { name: label_2 });
|
|
986
|
+
break bb104;
|
|
987
|
+
}
|
|
988
|
+
case "collection-create": {
|
|
989
|
+
const config_3 = collections[route.name];
|
|
990
|
+
const schemaConfig_3 = activeCollectionSchema?.admin?.config;
|
|
991
|
+
const label_1 = resolveResourceLabel(config_3, schemaConfig_3, route.name);
|
|
992
|
+
pageTitle = `${label_1}: ${t("common.create")}`;
|
|
993
|
+
metaDescription = resolveResourceDescription(config_3, schemaConfig_3) || t("collection.create", { name: label_1 });
|
|
994
|
+
break bb104;
|
|
995
|
+
}
|
|
996
|
+
case "collection-edit": {
|
|
997
|
+
const config_2 = collections[route.name];
|
|
998
|
+
const schemaConfig_2 = activeCollectionSchema?.admin?.config;
|
|
999
|
+
const label_0 = resolveResourceLabel(config_2, schemaConfig_2, route.name);
|
|
1000
|
+
pageTitle = `${label_0}: ${t("common.edit")}`;
|
|
1001
|
+
metaDescription = resolveResourceDescription(config_2, schemaConfig_2) || t("collection.edit", { name: label_0 });
|
|
1002
|
+
break bb104;
|
|
1003
|
+
}
|
|
1004
|
+
case "global-edit": {
|
|
1005
|
+
const config_1 = globals[route.name];
|
|
1006
|
+
const schemaConfig_1 = activeGlobalSchema?.admin?.config;
|
|
1007
|
+
const label = resolveResourceLabel(config_1, schemaConfig_1, route.name);
|
|
1008
|
+
pageTitle = label;
|
|
1009
|
+
metaDescription = resolveResourceDescription(config_1, schemaConfig_1) || label;
|
|
1010
|
+
break bb104;
|
|
1011
|
+
}
|
|
1012
|
+
case "page":
|
|
1013
|
+
pageTitle = resolveText(route.config.label, formatLabel(route.name));
|
|
1014
|
+
metaDescription = pageTitle;
|
|
1015
|
+
break bb104;
|
|
1016
|
+
case "not-found":
|
|
1017
|
+
pageTitle = t("error.notFound");
|
|
1018
|
+
metaDescription = pageTitle;
|
|
860
1019
|
}
|
|
861
|
-
document.title = pageTitle;
|
|
862
|
-
|
|
863
|
-
if (main) requestAnimationFrame(() => {
|
|
864
|
-
main.focus({ preventScroll: true });
|
|
865
|
-
});
|
|
1020
|
+
document.title = formatDocumentTitle(pageTitle, appTitle);
|
|
1021
|
+
setDocumentMetaDescription(metaDescription || pageTitle);
|
|
866
1022
|
};
|
|
867
|
-
$[
|
|
868
|
-
$[
|
|
869
|
-
$[
|
|
870
|
-
|
|
1023
|
+
$[19] = activeCollectionSchema;
|
|
1024
|
+
$[20] = activeGlobalSchema;
|
|
1025
|
+
$[21] = brandingName;
|
|
1026
|
+
$[22] = collections;
|
|
1027
|
+
$[23] = dashboardConfig?.description;
|
|
1028
|
+
$[24] = dashboardConfig?.title;
|
|
1029
|
+
$[25] = globals;
|
|
1030
|
+
$[26] = resolveText;
|
|
1031
|
+
$[27] = route.config;
|
|
1032
|
+
$[28] = route.name;
|
|
1033
|
+
$[29] = route.type;
|
|
1034
|
+
$[30] = t;
|
|
1035
|
+
$[31] = t10;
|
|
1036
|
+
} else t10 = $[31];
|
|
1037
|
+
let t11;
|
|
1038
|
+
if ($[32] !== activeCollectionSchema || $[33] !== activeGlobalSchema || $[34] !== brandingName || $[35] !== collections || $[36] !== dashboardConfig || $[37] !== globals || $[38] !== resolveText || $[39] !== route || $[40] !== t) {
|
|
1039
|
+
t11 = [
|
|
1040
|
+
activeCollectionSchema,
|
|
1041
|
+
activeGlobalSchema,
|
|
1042
|
+
brandingName,
|
|
1043
|
+
collections,
|
|
1044
|
+
dashboardConfig,
|
|
1045
|
+
globals,
|
|
1046
|
+
resolveText,
|
|
1047
|
+
route,
|
|
1048
|
+
t
|
|
1049
|
+
];
|
|
1050
|
+
$[32] = activeCollectionSchema;
|
|
1051
|
+
$[33] = activeGlobalSchema;
|
|
1052
|
+
$[34] = brandingName;
|
|
1053
|
+
$[35] = collections;
|
|
1054
|
+
$[36] = dashboardConfig;
|
|
1055
|
+
$[37] = globals;
|
|
1056
|
+
$[38] = resolveText;
|
|
1057
|
+
$[39] = route;
|
|
1058
|
+
$[40] = t;
|
|
1059
|
+
$[41] = t11;
|
|
1060
|
+
} else t11 = $[41];
|
|
1061
|
+
React.useEffect(t10, t11);
|
|
871
1062
|
let t12;
|
|
872
|
-
if ($[
|
|
873
|
-
t12 =
|
|
874
|
-
$[
|
|
875
|
-
$[
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
1063
|
+
if ($[42] !== segments) {
|
|
1064
|
+
t12 = segments.join("/");
|
|
1065
|
+
$[42] = segments;
|
|
1066
|
+
$[43] = t12;
|
|
1067
|
+
} else t12 = $[43];
|
|
1068
|
+
const routeKey = t12;
|
|
1069
|
+
let t13;
|
|
1070
|
+
if ($[44] !== routeKey) {
|
|
1071
|
+
t13 = [routeKey];
|
|
1072
|
+
$[44] = routeKey;
|
|
1073
|
+
$[45] = t13;
|
|
1074
|
+
} else t13 = $[45];
|
|
1075
|
+
React.useEffect(_temp3, t13);
|
|
879
1076
|
if (route.type === "dashboard") {
|
|
880
1077
|
if (DashboardComponent) {
|
|
881
|
-
let
|
|
882
|
-
if ($[
|
|
883
|
-
|
|
884
|
-
$[
|
|
885
|
-
$[
|
|
886
|
-
} else
|
|
887
|
-
return
|
|
1078
|
+
let t14$2;
|
|
1079
|
+
if ($[46] !== DashboardComponent) {
|
|
1080
|
+
t14$2 = /* @__PURE__ */ jsx(DashboardComponent, {});
|
|
1081
|
+
$[46] = DashboardComponent;
|
|
1082
|
+
$[47] = t14$2;
|
|
1083
|
+
} else t14$2 = $[47];
|
|
1084
|
+
return t14$2;
|
|
888
1085
|
}
|
|
889
1086
|
if (dashboardConfig?.items?.length || dashboardConfig?.widgets?.length) {
|
|
890
|
-
let
|
|
891
|
-
if ($[
|
|
892
|
-
|
|
1087
|
+
let t14$2;
|
|
1088
|
+
if ($[48] !== basePath || $[49] !== dashboardConfig || $[50] !== navigate) {
|
|
1089
|
+
t14$2 = /* @__PURE__ */ jsx(DashboardGrid, {
|
|
893
1090
|
config: dashboardConfig,
|
|
894
1091
|
basePath,
|
|
895
1092
|
navigate
|
|
896
1093
|
});
|
|
897
|
-
$[
|
|
898
|
-
$[
|
|
899
|
-
$[
|
|
900
|
-
$[
|
|
901
|
-
} else
|
|
902
|
-
return
|
|
1094
|
+
$[48] = basePath;
|
|
1095
|
+
$[49] = dashboardConfig;
|
|
1096
|
+
$[50] = navigate;
|
|
1097
|
+
$[51] = t14$2;
|
|
1098
|
+
} else t14$2 = $[51];
|
|
1099
|
+
return t14$2;
|
|
903
1100
|
}
|
|
904
|
-
let
|
|
905
|
-
if ($[
|
|
906
|
-
|
|
907
|
-
$[
|
|
908
|
-
} else
|
|
909
|
-
return
|
|
1101
|
+
let t14$1;
|
|
1102
|
+
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1103
|
+
t14$1 = /* @__PURE__ */ jsx(DefaultDashboard, {});
|
|
1104
|
+
$[52] = t14$1;
|
|
1105
|
+
} else t14$1 = $[52];
|
|
1106
|
+
return t14$1;
|
|
910
1107
|
}
|
|
911
1108
|
if (route.type === "collection-list") {
|
|
912
1109
|
const { name } = route;
|
|
913
|
-
const
|
|
914
|
-
if (!
|
|
915
|
-
let
|
|
916
|
-
if ($[
|
|
917
|
-
|
|
1110
|
+
const config_5 = collections[name];
|
|
1111
|
+
if (!config_5) {
|
|
1112
|
+
let t14$2;
|
|
1113
|
+
if ($[53] !== basePath || $[54] !== name || $[55] !== navigate) {
|
|
1114
|
+
t14$2 = /* @__PURE__ */ jsx(RestrictedAccess, {
|
|
918
1115
|
type: "collection",
|
|
919
1116
|
name,
|
|
920
1117
|
navigate,
|
|
921
1118
|
basePath
|
|
922
1119
|
});
|
|
923
|
-
$[
|
|
924
|
-
$[
|
|
925
|
-
$[
|
|
926
|
-
$[
|
|
927
|
-
} else
|
|
928
|
-
return
|
|
1120
|
+
$[53] = basePath;
|
|
1121
|
+
$[54] = name;
|
|
1122
|
+
$[55] = navigate;
|
|
1123
|
+
$[56] = t14$2;
|
|
1124
|
+
} else t14$2 = $[56];
|
|
1125
|
+
return t14$2;
|
|
929
1126
|
}
|
|
930
1127
|
const custom = resolvedCollectionComponents[name];
|
|
931
1128
|
const viewNameFromSchema = activeCollectionSchema?.admin?.list?.view;
|
|
932
|
-
const
|
|
933
|
-
let t14;
|
|
934
|
-
if ($[38] !== t13$1) {
|
|
935
|
-
t14 = getConfiguredViewName(t13$1);
|
|
936
|
-
$[38] = t13$1;
|
|
937
|
-
$[39] = t14;
|
|
938
|
-
} else t14 = $[39];
|
|
939
|
-
const viewNameFromConfig = t14;
|
|
1129
|
+
const t14$1 = config_5?.list;
|
|
940
1130
|
let t15;
|
|
941
|
-
if ($[
|
|
942
|
-
t15 =
|
|
943
|
-
$[
|
|
944
|
-
$[
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
} else t15 = $[43];
|
|
948
|
-
const selectedListView = t15;
|
|
949
|
-
const selectedListViewDefinition = views[selectedListView];
|
|
1131
|
+
if ($[57] !== t14$1) {
|
|
1132
|
+
t15 = getConfiguredViewName(t14$1);
|
|
1133
|
+
$[57] = t14$1;
|
|
1134
|
+
$[58] = t15;
|
|
1135
|
+
} else t15 = $[58];
|
|
1136
|
+
const viewNameFromConfig = t15;
|
|
950
1137
|
let t16;
|
|
951
|
-
if ($[
|
|
952
|
-
t16 =
|
|
953
|
-
$[
|
|
954
|
-
$[
|
|
955
|
-
$[
|
|
956
|
-
$[
|
|
957
|
-
} else t16 = $[
|
|
958
|
-
const
|
|
1138
|
+
if ($[59] !== viewNameFromConfig || $[60] !== viewNameFromSchema || $[61] !== views) {
|
|
1139
|
+
t16 = viewNameFromSchema ?? viewNameFromConfig ?? findDefaultView(views, "list");
|
|
1140
|
+
$[59] = viewNameFromConfig;
|
|
1141
|
+
$[60] = viewNameFromSchema;
|
|
1142
|
+
$[61] = views;
|
|
1143
|
+
$[62] = t16;
|
|
1144
|
+
} else t16 = $[62];
|
|
1145
|
+
const selectedListView = t16;
|
|
1146
|
+
const selectedListViewDefinition = views[selectedListView];
|
|
959
1147
|
let t17;
|
|
960
|
-
if ($[
|
|
961
|
-
t17 =
|
|
962
|
-
$[
|
|
963
|
-
$[
|
|
964
|
-
|
|
965
|
-
|
|
1148
|
+
if ($[63] !== activeCollectionSchema || $[64] !== config_5 || $[65] !== selectedListViewDefinition) {
|
|
1149
|
+
t17 = mergeViewConfig(getViewBaseConfig(selectedListViewDefinition), config_5?.list?.config ?? config_5?.list ?? activeCollectionSchema?.admin?.list);
|
|
1150
|
+
$[63] = activeCollectionSchema;
|
|
1151
|
+
$[64] = config_5;
|
|
1152
|
+
$[65] = selectedListViewDefinition;
|
|
1153
|
+
$[66] = t17;
|
|
1154
|
+
} else t17 = $[66];
|
|
1155
|
+
const selectedListViewConfig = t17;
|
|
1156
|
+
let t18;
|
|
1157
|
+
if ($[67] !== selectedListViewDefinition) {
|
|
1158
|
+
t18 = getViewLoader(selectedListViewDefinition);
|
|
1159
|
+
$[67] = selectedListViewDefinition;
|
|
1160
|
+
$[68] = t18;
|
|
1161
|
+
} else t18 = $[68];
|
|
1162
|
+
const listViewLoader = t18;
|
|
966
1163
|
if (selectedListViewDefinition && selectedListViewDefinition.kind !== "list" && process.env.NODE_ENV !== "production") console.warn(`View "${selectedListView}" kind "${selectedListViewDefinition.kind}" != expected "list"`);
|
|
967
1164
|
if (custom?.List) {
|
|
968
|
-
let
|
|
969
|
-
if ($[
|
|
970
|
-
|
|
971
|
-
$[
|
|
972
|
-
$[
|
|
973
|
-
} else
|
|
974
|
-
return
|
|
1165
|
+
let t19$1;
|
|
1166
|
+
if ($[69] !== custom.List) {
|
|
1167
|
+
t19$1 = /* @__PURE__ */ jsx(custom.List, {});
|
|
1168
|
+
$[69] = custom.List;
|
|
1169
|
+
$[70] = t19$1;
|
|
1170
|
+
} else t19$1 = $[70];
|
|
1171
|
+
return t19$1;
|
|
975
1172
|
}
|
|
976
|
-
let
|
|
977
|
-
if ($[
|
|
978
|
-
|
|
1173
|
+
let t19;
|
|
1174
|
+
if ($[71] !== basePath || $[72] !== config_5 || $[73] !== name || $[74] !== navigate || $[75] !== selectedListViewConfig) {
|
|
1175
|
+
t19 = {
|
|
979
1176
|
collection: name,
|
|
980
|
-
config,
|
|
1177
|
+
config: config_5,
|
|
981
1178
|
viewConfig: selectedListViewConfig,
|
|
982
1179
|
navigate,
|
|
983
1180
|
basePath
|
|
984
1181
|
};
|
|
985
|
-
$[
|
|
986
|
-
$[
|
|
987
|
-
$[
|
|
988
|
-
$[
|
|
989
|
-
$[
|
|
990
|
-
$[
|
|
991
|
-
} else
|
|
992
|
-
const listComponentProps =
|
|
993
|
-
let
|
|
994
|
-
if ($[
|
|
995
|
-
|
|
1182
|
+
$[71] = basePath;
|
|
1183
|
+
$[72] = config_5;
|
|
1184
|
+
$[73] = name;
|
|
1185
|
+
$[74] = navigate;
|
|
1186
|
+
$[75] = selectedListViewConfig;
|
|
1187
|
+
$[76] = t19;
|
|
1188
|
+
} else t19 = $[76];
|
|
1189
|
+
const listComponentProps = t19;
|
|
1190
|
+
let t20;
|
|
1191
|
+
if ($[77] !== listComponentProps || $[78] !== listViewLoader || $[79] !== name || $[80] !== selectedListView) {
|
|
1192
|
+
t20 = /* @__PURE__ */ jsx(RegistryViewRenderer, {
|
|
996
1193
|
loader: listViewLoader,
|
|
997
1194
|
viewKind: "list",
|
|
998
1195
|
viewId: selectedListView,
|
|
999
1196
|
componentProps: listComponentProps
|
|
1000
1197
|
}, name);
|
|
1001
|
-
$[
|
|
1002
|
-
$[
|
|
1003
|
-
$[
|
|
1004
|
-
$[
|
|
1005
|
-
$[
|
|
1006
|
-
} else
|
|
1007
|
-
return
|
|
1198
|
+
$[77] = listComponentProps;
|
|
1199
|
+
$[78] = listViewLoader;
|
|
1200
|
+
$[79] = name;
|
|
1201
|
+
$[80] = selectedListView;
|
|
1202
|
+
$[81] = t20;
|
|
1203
|
+
} else t20 = $[81];
|
|
1204
|
+
return t20;
|
|
1008
1205
|
}
|
|
1009
1206
|
if (route.type === "collection-create" || route.type === "collection-edit") {
|
|
1010
1207
|
const { name: name_0 } = route;
|
|
1011
1208
|
const id = route.type === "collection-edit" ? route.id : void 0;
|
|
1012
|
-
const
|
|
1013
|
-
if (!
|
|
1014
|
-
let
|
|
1015
|
-
if ($[
|
|
1016
|
-
|
|
1209
|
+
const config_6 = collections[name_0];
|
|
1210
|
+
if (!config_6) {
|
|
1211
|
+
let t14$2;
|
|
1212
|
+
if ($[82] !== basePath || $[83] !== name_0 || $[84] !== navigate) {
|
|
1213
|
+
t14$2 = /* @__PURE__ */ jsx(RestrictedAccess, {
|
|
1017
1214
|
type: "collection",
|
|
1018
1215
|
name: name_0,
|
|
1019
1216
|
navigate,
|
|
1020
1217
|
basePath
|
|
1021
1218
|
});
|
|
1022
|
-
$[
|
|
1023
|
-
$[
|
|
1024
|
-
$[
|
|
1025
|
-
$[
|
|
1026
|
-
} else
|
|
1027
|
-
return
|
|
1219
|
+
$[82] = basePath;
|
|
1220
|
+
$[83] = name_0;
|
|
1221
|
+
$[84] = navigate;
|
|
1222
|
+
$[85] = t14$2;
|
|
1223
|
+
} else t14$2 = $[85];
|
|
1224
|
+
return t14$2;
|
|
1028
1225
|
}
|
|
1029
1226
|
const custom_0 = resolvedCollectionComponents[name_0];
|
|
1030
1227
|
const viewNameFromSchema_0 = activeCollectionSchema?.admin?.form?.view;
|
|
1031
|
-
const
|
|
1032
|
-
let t14;
|
|
1033
|
-
if ($[67] !== t13$1) {
|
|
1034
|
-
t14 = getConfiguredViewName(t13$1);
|
|
1035
|
-
$[67] = t13$1;
|
|
1036
|
-
$[68] = t14;
|
|
1037
|
-
} else t14 = $[68];
|
|
1038
|
-
const viewNameFromConfig_0 = t14;
|
|
1228
|
+
const t14$1 = config_6?.form;
|
|
1039
1229
|
let t15;
|
|
1040
|
-
if ($[
|
|
1041
|
-
t15 =
|
|
1042
|
-
$[
|
|
1043
|
-
$[
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
} else t15 = $[72];
|
|
1047
|
-
const selectedFormView = t15;
|
|
1048
|
-
const selectedFormViewDefinition = views[selectedFormView];
|
|
1230
|
+
if ($[86] !== t14$1) {
|
|
1231
|
+
t15 = getConfiguredViewName(t14$1);
|
|
1232
|
+
$[86] = t14$1;
|
|
1233
|
+
$[87] = t15;
|
|
1234
|
+
} else t15 = $[87];
|
|
1235
|
+
const viewNameFromConfig_0 = t15;
|
|
1049
1236
|
let t16;
|
|
1050
|
-
if ($[
|
|
1051
|
-
t16 =
|
|
1052
|
-
$[
|
|
1053
|
-
$[
|
|
1054
|
-
$[
|
|
1055
|
-
$[
|
|
1056
|
-
} else t16 = $[
|
|
1057
|
-
const
|
|
1237
|
+
if ($[88] !== viewNameFromConfig_0 || $[89] !== viewNameFromSchema_0 || $[90] !== views) {
|
|
1238
|
+
t16 = viewNameFromSchema_0 ?? viewNameFromConfig_0 ?? findDefaultView(views, "form");
|
|
1239
|
+
$[88] = viewNameFromConfig_0;
|
|
1240
|
+
$[89] = viewNameFromSchema_0;
|
|
1241
|
+
$[90] = views;
|
|
1242
|
+
$[91] = t16;
|
|
1243
|
+
} else t16 = $[91];
|
|
1244
|
+
const selectedFormView = t16;
|
|
1245
|
+
const selectedFormViewDefinition = views[selectedFormView];
|
|
1058
1246
|
let t17;
|
|
1059
|
-
if ($[
|
|
1060
|
-
t17 =
|
|
1061
|
-
$[
|
|
1062
|
-
$[
|
|
1063
|
-
|
|
1064
|
-
|
|
1247
|
+
if ($[92] !== activeCollectionSchema || $[93] !== config_6 || $[94] !== selectedFormViewDefinition) {
|
|
1248
|
+
t17 = mergeViewConfig(getViewBaseConfig(selectedFormViewDefinition), config_6?.form?.config ?? config_6?.form ?? activeCollectionSchema?.admin?.form);
|
|
1249
|
+
$[92] = activeCollectionSchema;
|
|
1250
|
+
$[93] = config_6;
|
|
1251
|
+
$[94] = selectedFormViewDefinition;
|
|
1252
|
+
$[95] = t17;
|
|
1253
|
+
} else t17 = $[95];
|
|
1254
|
+
const selectedFormViewConfig = t17;
|
|
1255
|
+
let t18;
|
|
1256
|
+
if ($[96] !== selectedFormViewDefinition) {
|
|
1257
|
+
t18 = getViewLoader(selectedFormViewDefinition);
|
|
1258
|
+
$[96] = selectedFormViewDefinition;
|
|
1259
|
+
$[97] = t18;
|
|
1260
|
+
} else t18 = $[97];
|
|
1261
|
+
const formViewLoader = t18;
|
|
1065
1262
|
if (selectedFormViewDefinition && selectedFormViewDefinition.kind !== "form" && process.env.NODE_ENV !== "production") console.warn(`View "${selectedFormView}" kind "${selectedFormViewDefinition.kind}" != expected "form"`);
|
|
1066
1263
|
if (custom_0?.Form) {
|
|
1067
|
-
let
|
|
1068
|
-
if ($[
|
|
1069
|
-
|
|
1070
|
-
$[
|
|
1071
|
-
$[
|
|
1072
|
-
} else
|
|
1073
|
-
return
|
|
1264
|
+
let t19$1;
|
|
1265
|
+
if ($[98] !== custom_0.Form) {
|
|
1266
|
+
t19$1 = /* @__PURE__ */ jsx(custom_0.Form, {});
|
|
1267
|
+
$[98] = custom_0.Form;
|
|
1268
|
+
$[99] = t19$1;
|
|
1269
|
+
} else t19$1 = $[99];
|
|
1270
|
+
return t19$1;
|
|
1074
1271
|
}
|
|
1075
|
-
let t18;
|
|
1076
|
-
if ($[81] !== prefillValues || $[82] !== route.type) {
|
|
1077
|
-
t18 = route.type === "collection-create" && Object.keys(prefillValues).length > 0 ? prefillValues : void 0;
|
|
1078
|
-
$[81] = prefillValues;
|
|
1079
|
-
$[82] = route.type;
|
|
1080
|
-
$[83] = t18;
|
|
1081
|
-
} else t18 = $[83];
|
|
1082
|
-
const defaultValues = t18;
|
|
1083
1272
|
let t19;
|
|
1084
|
-
if ($[
|
|
1085
|
-
t19 =
|
|
1273
|
+
if ($[100] !== prefillValues || $[101] !== route.type) {
|
|
1274
|
+
t19 = route.type === "collection-create" && Object.keys(prefillValues).length > 0 ? prefillValues : void 0;
|
|
1275
|
+
$[100] = prefillValues;
|
|
1276
|
+
$[101] = route.type;
|
|
1277
|
+
$[102] = t19;
|
|
1278
|
+
} else t19 = $[102];
|
|
1279
|
+
const defaultValues = t19;
|
|
1280
|
+
let t20;
|
|
1281
|
+
if ($[103] !== basePath || $[104] !== collections || $[105] !== config_6 || $[106] !== defaultValues || $[107] !== id || $[108] !== name_0 || $[109] !== navigate || $[110] !== registry || $[111] !== selectedFormViewConfig) {
|
|
1282
|
+
t20 = {
|
|
1086
1283
|
collection: name_0,
|
|
1087
1284
|
id,
|
|
1088
|
-
config:
|
|
1285
|
+
config: config_6,
|
|
1089
1286
|
viewConfig: selectedFormViewConfig,
|
|
1090
1287
|
navigate,
|
|
1091
1288
|
basePath,
|
|
@@ -1093,154 +1290,160 @@ function AdminRouterInner(t0) {
|
|
|
1093
1290
|
registry,
|
|
1094
1291
|
allCollectionsConfig: collections
|
|
1095
1292
|
};
|
|
1096
|
-
$[
|
|
1097
|
-
$[
|
|
1098
|
-
$[
|
|
1099
|
-
$[
|
|
1100
|
-
$[
|
|
1101
|
-
$[
|
|
1102
|
-
$[
|
|
1103
|
-
$[
|
|
1104
|
-
$[
|
|
1105
|
-
$[
|
|
1106
|
-
} else
|
|
1107
|
-
const editComponentProps =
|
|
1108
|
-
const
|
|
1109
|
-
let
|
|
1110
|
-
if ($[
|
|
1111
|
-
|
|
1293
|
+
$[103] = basePath;
|
|
1294
|
+
$[104] = collections;
|
|
1295
|
+
$[105] = config_6;
|
|
1296
|
+
$[106] = defaultValues;
|
|
1297
|
+
$[107] = id;
|
|
1298
|
+
$[108] = name_0;
|
|
1299
|
+
$[109] = navigate;
|
|
1300
|
+
$[110] = registry;
|
|
1301
|
+
$[111] = selectedFormViewConfig;
|
|
1302
|
+
$[112] = t20;
|
|
1303
|
+
} else t20 = $[112];
|
|
1304
|
+
const editComponentProps = t20;
|
|
1305
|
+
const t21 = `${name_0}-${id ?? "create"}`;
|
|
1306
|
+
let t22;
|
|
1307
|
+
if ($[113] !== editComponentProps || $[114] !== formViewLoader || $[115] !== selectedFormView || $[116] !== t21) {
|
|
1308
|
+
t22 = /* @__PURE__ */ jsx(RegistryViewRenderer, {
|
|
1112
1309
|
loader: formViewLoader,
|
|
1113
1310
|
viewKind: "form",
|
|
1114
1311
|
viewId: selectedFormView,
|
|
1115
1312
|
componentProps: editComponentProps
|
|
1116
|
-
},
|
|
1117
|
-
$[
|
|
1118
|
-
$[
|
|
1119
|
-
$[
|
|
1120
|
-
$[
|
|
1121
|
-
$[
|
|
1122
|
-
} else
|
|
1123
|
-
return
|
|
1313
|
+
}, t21);
|
|
1314
|
+
$[113] = editComponentProps;
|
|
1315
|
+
$[114] = formViewLoader;
|
|
1316
|
+
$[115] = selectedFormView;
|
|
1317
|
+
$[116] = t21;
|
|
1318
|
+
$[117] = t22;
|
|
1319
|
+
} else t22 = $[117];
|
|
1320
|
+
return t22;
|
|
1124
1321
|
}
|
|
1125
1322
|
if (route.type === "global-edit") {
|
|
1126
1323
|
const { name: name_1 } = route;
|
|
1127
|
-
const
|
|
1128
|
-
if (!
|
|
1129
|
-
let
|
|
1130
|
-
if ($[
|
|
1131
|
-
|
|
1324
|
+
const config_7 = globals[name_1];
|
|
1325
|
+
if (!config_7) {
|
|
1326
|
+
let t14$2;
|
|
1327
|
+
if ($[118] !== basePath || $[119] !== name_1 || $[120] !== navigate) {
|
|
1328
|
+
t14$2 = /* @__PURE__ */ jsx(RestrictedAccess, {
|
|
1132
1329
|
type: "global",
|
|
1133
1330
|
name: name_1,
|
|
1134
1331
|
navigate,
|
|
1135
1332
|
basePath
|
|
1136
1333
|
});
|
|
1137
|
-
$[
|
|
1138
|
-
$[
|
|
1139
|
-
$[
|
|
1140
|
-
$[
|
|
1141
|
-
} else
|
|
1142
|
-
return
|
|
1334
|
+
$[118] = basePath;
|
|
1335
|
+
$[119] = name_1;
|
|
1336
|
+
$[120] = navigate;
|
|
1337
|
+
$[121] = t14$2;
|
|
1338
|
+
} else t14$2 = $[121];
|
|
1339
|
+
return t14$2;
|
|
1143
1340
|
}
|
|
1144
1341
|
const custom_1 = resolvedGlobalComponents[name_1];
|
|
1145
1342
|
const viewNameFromSchema_1 = activeGlobalSchema?.admin?.form?.view;
|
|
1146
|
-
const
|
|
1147
|
-
let t14;
|
|
1148
|
-
if ($[103] !== t13$1) {
|
|
1149
|
-
t14 = getConfiguredViewName(t13$1);
|
|
1150
|
-
$[103] = t13$1;
|
|
1151
|
-
$[104] = t14;
|
|
1152
|
-
} else t14 = $[104];
|
|
1153
|
-
const viewNameFromConfig_1 = t14;
|
|
1343
|
+
const t14$1 = config_7?.form;
|
|
1154
1344
|
let t15;
|
|
1155
|
-
if ($[
|
|
1156
|
-
t15 =
|
|
1157
|
-
$[
|
|
1158
|
-
$[
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
} else t15 = $[108];
|
|
1162
|
-
const selectedFormView_0 = t15;
|
|
1163
|
-
const selectedFormViewDefinition_0 = views[selectedFormView_0];
|
|
1345
|
+
if ($[122] !== t14$1) {
|
|
1346
|
+
t15 = getConfiguredViewName(t14$1);
|
|
1347
|
+
$[122] = t14$1;
|
|
1348
|
+
$[123] = t15;
|
|
1349
|
+
} else t15 = $[123];
|
|
1350
|
+
const viewNameFromConfig_1 = t15;
|
|
1164
1351
|
let t16;
|
|
1165
|
-
if ($[
|
|
1166
|
-
t16 =
|
|
1167
|
-
$[
|
|
1168
|
-
$[
|
|
1169
|
-
$[
|
|
1170
|
-
$[
|
|
1171
|
-
} else t16 = $[
|
|
1172
|
-
const
|
|
1352
|
+
if ($[124] !== viewNameFromConfig_1 || $[125] !== viewNameFromSchema_1 || $[126] !== views) {
|
|
1353
|
+
t16 = viewNameFromSchema_1 ?? viewNameFromConfig_1 ?? findDefaultView(views, "form");
|
|
1354
|
+
$[124] = viewNameFromConfig_1;
|
|
1355
|
+
$[125] = viewNameFromSchema_1;
|
|
1356
|
+
$[126] = views;
|
|
1357
|
+
$[127] = t16;
|
|
1358
|
+
} else t16 = $[127];
|
|
1359
|
+
const selectedFormView_0 = t16;
|
|
1360
|
+
const selectedFormViewDefinition_0 = views[selectedFormView_0];
|
|
1173
1361
|
let t17;
|
|
1174
|
-
if ($[
|
|
1175
|
-
t17 =
|
|
1176
|
-
$[
|
|
1177
|
-
$[
|
|
1178
|
-
|
|
1179
|
-
|
|
1362
|
+
if ($[128] !== activeGlobalSchema || $[129] !== config_7 || $[130] !== selectedFormViewDefinition_0) {
|
|
1363
|
+
t17 = mergeViewConfig(getViewBaseConfig(selectedFormViewDefinition_0), config_7?.form?.config ?? config_7?.form ?? activeGlobalSchema?.admin?.form);
|
|
1364
|
+
$[128] = activeGlobalSchema;
|
|
1365
|
+
$[129] = config_7;
|
|
1366
|
+
$[130] = selectedFormViewDefinition_0;
|
|
1367
|
+
$[131] = t17;
|
|
1368
|
+
} else t17 = $[131];
|
|
1369
|
+
const selectedFormViewConfig_0 = t17;
|
|
1370
|
+
let t18;
|
|
1371
|
+
if ($[132] !== selectedFormViewDefinition_0) {
|
|
1372
|
+
t18 = getViewLoader(selectedFormViewDefinition_0);
|
|
1373
|
+
$[132] = selectedFormViewDefinition_0;
|
|
1374
|
+
$[133] = t18;
|
|
1375
|
+
} else t18 = $[133];
|
|
1376
|
+
const globalViewLoader = t18;
|
|
1180
1377
|
if (selectedFormViewDefinition_0 && selectedFormViewDefinition_0.kind !== "form" && process.env.NODE_ENV !== "production") console.warn(`View "${selectedFormView_0}" kind "${selectedFormViewDefinition_0.kind}" != expected "form"`);
|
|
1181
1378
|
if (custom_1?.Form) {
|
|
1182
|
-
let
|
|
1183
|
-
if ($[
|
|
1184
|
-
|
|
1185
|
-
$[
|
|
1186
|
-
$[
|
|
1187
|
-
} else
|
|
1188
|
-
return
|
|
1379
|
+
let t19$1;
|
|
1380
|
+
if ($[134] !== custom_1.Form) {
|
|
1381
|
+
t19$1 = /* @__PURE__ */ jsx(custom_1.Form, {});
|
|
1382
|
+
$[134] = custom_1.Form;
|
|
1383
|
+
$[135] = t19$1;
|
|
1384
|
+
} else t19$1 = $[135];
|
|
1385
|
+
return t19$1;
|
|
1189
1386
|
}
|
|
1190
|
-
let
|
|
1191
|
-
if ($[
|
|
1192
|
-
|
|
1387
|
+
let t19;
|
|
1388
|
+
if ($[136] !== basePath || $[137] !== config_7 || $[138] !== globals || $[139] !== name_1 || $[140] !== navigate || $[141] !== registry || $[142] !== selectedFormViewConfig_0) {
|
|
1389
|
+
t19 = {
|
|
1193
1390
|
global: name_1,
|
|
1194
|
-
config:
|
|
1391
|
+
config: config_7,
|
|
1195
1392
|
viewConfig: selectedFormViewConfig_0,
|
|
1196
1393
|
navigate,
|
|
1197
1394
|
basePath,
|
|
1198
1395
|
registry,
|
|
1199
1396
|
allGlobalsConfig: globals
|
|
1200
1397
|
};
|
|
1201
|
-
$[
|
|
1202
|
-
$[
|
|
1203
|
-
$[
|
|
1204
|
-
$[
|
|
1205
|
-
$[
|
|
1206
|
-
$[
|
|
1207
|
-
$[
|
|
1208
|
-
$[
|
|
1209
|
-
} else
|
|
1210
|
-
const globalComponentProps =
|
|
1211
|
-
let
|
|
1212
|
-
if ($[
|
|
1213
|
-
|
|
1398
|
+
$[136] = basePath;
|
|
1399
|
+
$[137] = config_7;
|
|
1400
|
+
$[138] = globals;
|
|
1401
|
+
$[139] = name_1;
|
|
1402
|
+
$[140] = navigate;
|
|
1403
|
+
$[141] = registry;
|
|
1404
|
+
$[142] = selectedFormViewConfig_0;
|
|
1405
|
+
$[143] = t19;
|
|
1406
|
+
} else t19 = $[143];
|
|
1407
|
+
const globalComponentProps = t19;
|
|
1408
|
+
let t20;
|
|
1409
|
+
if ($[144] !== globalComponentProps || $[145] !== globalViewLoader || $[146] !== name_1 || $[147] !== selectedFormView_0) {
|
|
1410
|
+
t20 = /* @__PURE__ */ jsx(RegistryViewRenderer, {
|
|
1214
1411
|
loader: globalViewLoader,
|
|
1215
1412
|
viewKind: "form",
|
|
1216
1413
|
viewId: selectedFormView_0,
|
|
1217
1414
|
componentProps: globalComponentProps
|
|
1218
1415
|
}, name_1);
|
|
1219
|
-
$[
|
|
1220
|
-
$[
|
|
1221
|
-
$[
|
|
1222
|
-
$[
|
|
1223
|
-
$[
|
|
1224
|
-
} else
|
|
1225
|
-
return
|
|
1416
|
+
$[144] = globalComponentProps;
|
|
1417
|
+
$[145] = globalViewLoader;
|
|
1418
|
+
$[146] = name_1;
|
|
1419
|
+
$[147] = selectedFormView_0;
|
|
1420
|
+
$[148] = t20;
|
|
1421
|
+
} else t20 = $[148];
|
|
1422
|
+
return t20;
|
|
1226
1423
|
}
|
|
1227
1424
|
if (route.type === "page") {
|
|
1228
|
-
let
|
|
1229
|
-
if ($[
|
|
1230
|
-
|
|
1231
|
-
$[
|
|
1232
|
-
$[
|
|
1233
|
-
} else
|
|
1234
|
-
return
|
|
1425
|
+
let t14$1;
|
|
1426
|
+
if ($[149] !== route.config) {
|
|
1427
|
+
t14$1 = /* @__PURE__ */ jsx(LazyPageRenderer, { config: route.config });
|
|
1428
|
+
$[149] = route.config;
|
|
1429
|
+
$[150] = t14$1;
|
|
1430
|
+
} else t14$1 = $[150];
|
|
1431
|
+
return t14$1;
|
|
1235
1432
|
}
|
|
1236
1433
|
const NotFound = NotFoundComponent || DefaultNotFound;
|
|
1237
|
-
let
|
|
1238
|
-
if ($[
|
|
1239
|
-
|
|
1240
|
-
$[
|
|
1241
|
-
$[
|
|
1242
|
-
} else
|
|
1243
|
-
return
|
|
1434
|
+
let t14;
|
|
1435
|
+
if ($[151] !== NotFound) {
|
|
1436
|
+
t14 = /* @__PURE__ */ jsx(NotFound, {});
|
|
1437
|
+
$[151] = NotFound;
|
|
1438
|
+
$[152] = t14;
|
|
1439
|
+
} else t14 = $[152];
|
|
1440
|
+
return t14;
|
|
1441
|
+
}
|
|
1442
|
+
function _temp3() {
|
|
1443
|
+
const main = document.getElementById("main-content");
|
|
1444
|
+
if (main) requestAnimationFrame(() => {
|
|
1445
|
+
main.focus({ preventScroll: true });
|
|
1446
|
+
});
|
|
1244
1447
|
}
|
|
1245
1448
|
function _temp2(prev) {
|
|
1246
1449
|
return {
|