@questpie/admin 3.0.3 → 3.0.5

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