@plumile/backoffice-react 0.1.182 → 0.1.184

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 (48) hide show
  1. package/lib/esm/auth/authRefreshNotice.css.js +0 -1
  2. package/lib/esm/auth/login/loginPage.css.js +1 -0
  3. package/lib/esm/components/backoffice/detail/backofficeDetailRelationLink.css.js +0 -1
  4. package/lib/esm/components/backoffice/detail/backofficeRelationsSummaryGrid.css.js +1 -0
  5. package/lib/esm/components/backoffice/filters/backofficeFilterAction.css.js +1 -0
  6. package/lib/esm/components/backoffice/filters/deferredFilterSearchInput.css.js +0 -1
  7. package/lib/esm/i18n/locales/en/backofficeReact.js +1 -0
  8. package/lib/esm/i18n/locales/en/backofficeReact.js.map +1 -1
  9. package/lib/esm/i18n/locales/fr/backofficeReact.js +1 -0
  10. package/lib/esm/i18n/locales/fr/backofficeReact.js.map +1 -1
  11. package/lib/esm/pages/BackofficeDashboardShellPage.js +29 -0
  12. package/lib/esm/pages/BackofficeDashboardShellPage.js.map +1 -0
  13. package/lib/esm/pages/BackofficeEntityDetailFramePage.js +11 -38
  14. package/lib/esm/pages/BackofficeEntityDetailFramePage.js.map +1 -1
  15. package/lib/esm/pages/BackofficeEntityDetailPage.js +164 -175
  16. package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
  17. package/lib/esm/pages/BackofficeEntityDetailPageConfigPage.js +35 -0
  18. package/lib/esm/pages/BackofficeEntityDetailPageConfigPage.js.map +1 -0
  19. package/lib/esm/pages/BackofficeEntityDetailShellPage.js +17 -0
  20. package/lib/esm/pages/BackofficeEntityDetailShellPage.js.map +1 -0
  21. package/lib/esm/pages/BackofficeEntityListShellPage.js +32 -0
  22. package/lib/esm/pages/BackofficeEntityListShellPage.js.map +1 -0
  23. package/lib/esm/pages/BackofficeToolShellPage.js +32 -0
  24. package/lib/esm/pages/BackofficeToolShellPage.js.map +1 -0
  25. package/lib/esm/pages/detail/BackofficeEntityDetailManifestFallback.js +87 -0
  26. package/lib/esm/pages/detail/BackofficeEntityDetailManifestFallback.js.map +1 -0
  27. package/lib/esm/router/createBackofficeRoutes.js +244 -116
  28. package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
  29. package/lib/types/i18n/resources.d.ts +2 -0
  30. package/lib/types/i18n/resources.d.ts.map +1 -1
  31. package/lib/types/pages/BackofficeDashboardShellPage.d.ts +9 -0
  32. package/lib/types/pages/BackofficeDashboardShellPage.d.ts.map +1 -0
  33. package/lib/types/pages/BackofficeEntityDetailFramePage.d.ts.map +1 -1
  34. package/lib/types/pages/BackofficeEntityDetailPage.d.ts +2 -3
  35. package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
  36. package/lib/types/pages/BackofficeEntityDetailPageConfigPage.d.ts +10 -0
  37. package/lib/types/pages/BackofficeEntityDetailPageConfigPage.d.ts.map +1 -0
  38. package/lib/types/pages/BackofficeEntityDetailShellPage.d.ts +10 -0
  39. package/lib/types/pages/BackofficeEntityDetailShellPage.d.ts.map +1 -0
  40. package/lib/types/pages/BackofficeEntityListShellPage.d.ts +10 -0
  41. package/lib/types/pages/BackofficeEntityListShellPage.d.ts.map +1 -0
  42. package/lib/types/pages/BackofficeToolShellPage.d.ts +10 -0
  43. package/lib/types/pages/BackofficeToolShellPage.d.ts.map +1 -0
  44. package/lib/types/pages/detail/BackofficeEntityDetailManifestFallback.d.ts +10 -0
  45. package/lib/types/pages/detail/BackofficeEntityDetailManifestFallback.d.ts.map +1 -0
  46. package/lib/types/router/createBackofficeRoutes.d.ts +11 -3
  47. package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
  48. package/package.json +13 -13
@@ -1,33 +1,34 @@
1
1
  import { buildEntityGroupLookup as e, resolveSidebarGroups as t, resolveSidebarHubEntries as n } from "../components/backoffice/layout/sidebarUtils.js";
2
2
  import { validateBackofficeDashboardRegistrations as r } from "../provider/dashboardRegistrations.js";
3
- import { useContext as i, useEffect as a } from "react";
4
- import { jsx as o } from "react/jsx-runtime";
5
- import * as s from "react-relay";
6
- import c from "@plumile/router/routing/RoutingContext.js";
7
- import { BACKOFFICE_LIST_DEFAULTS as l } from "@plumile/backoffice-core/constants.js";
3
+ import { BackofficeEntityDetailManifestFallback as i } from "../pages/detail/BackofficeEntityDetailManifestFallback.js";
4
+ import { useContext as a, useEffect as o } from "react";
5
+ import { jsx as s } from "react/jsx-runtime";
6
+ import * as c from "react-relay";
7
+ import l from "@plumile/router/routing/RoutingContext.js";
8
+ import { BACKOFFICE_LIST_DEFAULTS as ee } from "@plumile/backoffice-core/constants.js";
8
9
  import { getResourcePage as u } from "@plumile/router/ResourcePage.js";
9
10
  import { r as d } from "@plumile/router/tools.js";
10
11
  //#region src/router/createBackofficeRoutes.tsx
11
- var { loadQuery: f, usePreloadedQuery: p } = s, m = u("WrapperPage", async () => ({ default: (await import("@plumile/ui/pages/WrapperPage.js")).WrapperPage })), h = u("BackofficeLayoutPage", async () => import("../pages/BackofficeLayoutPage.js")), g = u("BackofficeEntityListPage", async () => import("../pages/BackofficeEntityListPage.js")), _ = u("BackofficeEntityListDataPage", async () => import("../pages/BackofficeEntityListDataPage.js")), v = u("BackofficeEntityDetailPage", async () => import("../pages/BackofficeEntityDetailPage.js")), y = u("BackofficeEntityDetailFramePage", async () => import("../pages/BackofficeEntityDetailFramePage.js")), b = u("BackofficeEntityDetailLayoutPage", async () => import("../pages/BackofficeEntityDetailLayoutPage.js")), x = u("BackofficeEntityDetailUnknownPageRedirect", async () => import("../pages/BackofficeEntityDetailUnknownPageRedirect.js")), S = u("BackofficeDashboardPage", async () => import("../pages/BackofficeDashboardPage.js")), C = u("BackofficeHubPage", async () => import("../pages/BackofficeHubPage.js")), w = u("BackofficeLoginPage", async () => import("../pages/BackofficeLoginPage.js")), T = u("BackofficePasswordResetRequestPage", async () => import("../pages/BackofficePasswordResetRequestPage.js")), E = u("BackofficePasswordResetCompletePage", async () => import("../pages/BackofficePasswordResetCompletePage.js")), D = u("BackofficeVerifyEmailPage", async () => import("../pages/BackofficeVerifyEmailPage.js")), O = u("BackofficeAcceptInvitationPage", async () => import("../pages/BackofficeAcceptInvitationPage.js")), k = ({ pathname: e }) => {
12
- let t = i(c);
13
- return a(() => {
12
+ var { loadQuery: f, usePreloadedQuery: p } = c, m = u("WrapperPage", async () => ({ default: (await import("@plumile/ui/pages/WrapperPage.js")).WrapperPage })), h = u("BackofficeLayoutPage", async () => import("../pages/BackofficeLayoutPage.js")), g = u("BackofficeEntityListPage", async () => import("../pages/BackofficeEntityListPage.js")), _ = u("BackofficeEntityListShellPage", async () => import("../pages/BackofficeEntityListShellPage.js")), v = u("BackofficeEntityListDataPage", async () => import("../pages/BackofficeEntityListDataPage.js")), te = u("BackofficeEntityDetailPage", async () => import("../pages/BackofficeEntityDetailPage.js")), y = u("BackofficeEntityDetailFramePage", async () => import("../pages/BackofficeEntityDetailFramePage.js")), b = u("BackofficeEntityDetailLayoutPage", async () => import("../pages/BackofficeEntityDetailLayoutPage.js")), x = u("BackofficeEntityDetailPageConfigPage", async () => import("../pages/BackofficeEntityDetailPageConfigPage.js")), S = u("BackofficeEntityDetailShellPage", async () => import("../pages/BackofficeEntityDetailShellPage.js")), C = u("BackofficeEntityDetailUnknownPageRedirect", async () => import("../pages/BackofficeEntityDetailUnknownPageRedirect.js")), w = u("BackofficeDashboardPage", async () => import("../pages/BackofficeDashboardPage.js")), T = u("BackofficeDashboardShellPage", async () => import("../pages/BackofficeDashboardShellPage.js")), E = u("BackofficeToolShellPage", async () => import("../pages/BackofficeToolShellPage.js")), ne = u("BackofficeHubPage", async () => import("../pages/BackofficeHubPage.js")), re = u("BackofficeLoginPage", async () => import("../pages/BackofficeLoginPage.js")), ie = u("BackofficePasswordResetRequestPage", async () => import("../pages/BackofficePasswordResetRequestPage.js")), D = u("BackofficePasswordResetCompletePage", async () => import("../pages/BackofficePasswordResetCompletePage.js")), O = u("BackofficeVerifyEmailPage", async () => import("../pages/BackofficeVerifyEmailPage.js")), k = u("BackofficeAcceptInvitationPage", async () => import("../pages/BackofficeAcceptInvitationPage.js")), A = ({ pathname: e }) => {
13
+ let t = a(l);
14
+ return o(() => {
14
15
  t?.history.set({ pathname: e });
15
16
  }, [e, t]), null;
16
- }, A = ({ children: e, Component: t, preparedLayout: n, permissionsQuery: r, activeGroupId: i }) => /* @__PURE__ */ o(t, {
17
+ }, ae = ({ children: e, Component: t, preparedLayout: n, permissionsQuery: r, activeGroupId: i }) => /* @__PURE__ */ s(t, {
17
18
  permissionsQuery: r,
18
19
  prepared: n?.permissionsQuery ?? null,
19
20
  authStatus: null,
20
21
  activeGroupId: i,
21
22
  children: e
22
- }), j = ({ children: e, Component: t, preparedLayout: n, permissionsQuery: r, activeGroupId: i, authStatusQuery: a, authStatusPrepared: s, loginRedirectPath: c }) => {
23
- let l = p(a, s);
24
- return l?.isLoggedIn === !0 ? /* @__PURE__ */ o(t, {
23
+ }), j = ({ children: e, Component: t, preparedLayout: n, permissionsQuery: r, activeGroupId: i, authStatusQuery: a, authStatusPrepared: o, loginRedirectPath: c }) => {
24
+ let l = p(a, o);
25
+ return l?.isLoggedIn === !0 ? /* @__PURE__ */ s(t, {
25
26
  permissionsQuery: r,
26
27
  prepared: n?.permissionsQuery ?? null,
27
28
  authStatus: l,
28
29
  activeGroupId: i,
29
30
  children: e
30
- }) : /* @__PURE__ */ o(k, { pathname: c });
31
+ }) : /* @__PURE__ */ s(A, { pathname: c });
31
32
  }, M = (e) => {
32
33
  let t = e.trim();
33
34
  return t === "" || t === "/" ? "" : t.replace(/^\/+|\/+$/g, "");
@@ -67,12 +68,12 @@ var { loadQuery: f, usePreloadedQuery: p } = s, m = u("WrapperPage", async () =>
67
68
  let n = I(t);
68
69
  return e.detailPages?.find((e) => I(e.pathSegment) === n) ?? null;
69
70
  }, V = (e, t) => B(e, t)?.id ?? t, H = d;
70
- function U(i) {
71
- let { basePath: a, entityManifest: s, entityRegistry: c, sidebar: u, auth: d, dashboard: p } = i, N = r(i.dashboards), I = M(a), B = P(I, "login"), V = P(I, "login/reset"), U = P(I, "login/reset/complete"), W = P(I, "verify-email"), ee = P(I, "accept-invitation"), te = F(I, "login"), G = t(s, u), ne = n(G, u), re = e(G, u), K = /* @__PURE__ */ new Map();
72
- re.forEach((e, t) => {
71
+ function U(a) {
72
+ let { basePath: o, entityManifest: c, entityRegistry: l, sidebar: u, auth: d, dashboard: p } = a, N = r(a.dashboards), I = M(o), B = P(I, "login"), U = P(I, "login/reset"), W = P(I, "login/reset/complete"), oe = P(I, "verify-email"), se = P(I, "accept-invitation"), ce = F(I, "login"), G = t(c, u), le = n(G, u), ue = e(G, u), K = /* @__PURE__ */ new Map();
73
+ ue.forEach((e, t) => {
73
74
  K.set(t, e.groupId);
74
75
  });
75
- let q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Y = u?.permissionsQuery, ie = async ({ context: e }) => {
76
+ let q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Y = u?.permissionsQuery, de = async ({ context: e }) => {
76
77
  let t = await d.session.load();
77
78
  return {
78
79
  permissionsQuery: Y == null ? null : f(e.relayEnvironment, Y, {}),
@@ -81,62 +82,98 @@ function U(i) {
81
82
  }, X = async () => p == null ? null : {
82
83
  dashboardId: "dashboard",
83
84
  config: await p.load()
84
- }, Z = ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e }), Q = H({
85
+ }, fe = () => p == null ? null : { dashboardId: "dashboard" }, Z = ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ s(t, { prepared: e }), Q = ({ children: e, prepared: t, Component: n }) => n == null ? null : /* @__PURE__ */ s(n, {
86
+ prepared: t,
87
+ children: e
88
+ }), pe = H({
85
89
  path: "",
86
- resourcePage: S,
87
- prepare: X,
88
- render: Z
89
- }), ae = H({
90
+ resourcePage: T,
91
+ prepare: fe,
92
+ render: Q,
93
+ children: [H({
94
+ path: "",
95
+ resourcePage: w,
96
+ prepare: X,
97
+ render: Z
98
+ })]
99
+ }), me = H({
90
100
  path: "dashboard",
91
- resourcePage: S,
92
- prepare: X,
93
- render: Z
94
- }), oe = N.map((e) => H({
95
- path: `dashboard/${e.id}`,
96
- resourcePage: S,
97
- prepare: async () => {
98
- let t = await e.module.load();
99
- return {
101
+ resourcePage: T,
102
+ prepare: fe,
103
+ render: Q,
104
+ children: [H({
105
+ path: "",
106
+ resourcePage: w,
107
+ prepare: X,
108
+ render: Z
109
+ })]
110
+ }), he = N.map((e) => {
111
+ let t = H({
112
+ path: "",
113
+ resourcePage: w,
114
+ prepare: async () => {
115
+ let t = await e.module.load();
116
+ return {
117
+ dashboardId: e.id,
118
+ label: e.label,
119
+ config: t
120
+ };
121
+ },
122
+ render: Z
123
+ });
124
+ return H({
125
+ path: `dashboard/${e.id}`,
126
+ resourcePage: T,
127
+ prepare: () => ({
100
128
  dashboardId: e.id,
101
- config: t
102
- };
103
- },
104
- render: Z
105
- })), se = Object.values(s).filter((e) => e.kind === "list-detail"), ce = ne.map((e) => {
129
+ label: e.label
130
+ }),
131
+ render: Q,
132
+ children: [t]
133
+ });
134
+ }), ge = Object.values(c).filter((e) => e.kind === "list-detail"), _e = le.map((e) => {
106
135
  let t = H({
107
136
  path: L(e.hub.href, I),
108
- resourcePage: C,
137
+ resourcePage: ne,
109
138
  prepare: () => ({
110
139
  hubId: e.hub.id,
111
140
  hub: e.hub
112
141
  }),
113
- render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e })
142
+ render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ s(t, { prepared: e })
114
143
  });
115
144
  return e.groupId != null && J.set(t, e.groupId), t;
116
- }), le = se.map((e) => {
117
- let t = e.routes.list, n = L(t, I), r = [];
145
+ }), ve = ge.map((e) => {
146
+ let t = e.routes.list, n = L(t, I), r = [], a = ({ match: t }) => {
147
+ let n = String(t?.params.id ?? ""), r = typeof t?.params.pagePath == "string" ? t.params.pagePath : null;
148
+ return /* @__PURE__ */ s(i, {
149
+ entityManifest: e,
150
+ id: n,
151
+ pageId: r == null ? e.defaultDetailPageId ?? "overview" : V(e, r),
152
+ pagePath: r
153
+ });
154
+ };
118
155
  if (e.hasList) {
119
156
  let t = H({
120
157
  path: "",
121
- resourcePage: _,
158
+ resourcePage: v,
122
159
  prepareSearchBehavior: "path",
123
160
  prepare: async ({ context: t, query: n }) => {
124
- let { config: r } = await c.loadListEntity(e.id), { list: i, listUrlCodec: a, listDefaults: o } = r;
161
+ let { config: r } = await l.loadListEntity(e.id), { list: i, listUrlCodec: a, listDefaults: o } = r;
125
162
  if (a == null || o == null) throw Error(`Backoffice entity ${e.id} does not expose a list configuration.`);
126
- let s = z(n), u = a.parse(s), { pageSize: d } = l, p = {
127
- where: u.where,
128
- sort: u.sort ?? o.sort,
129
- count: d,
163
+ let s = z(n), c = a.parse(s), { pageSize: u } = ee, d = {
164
+ where: c.where,
165
+ sort: c.sort ?? o.sort,
166
+ count: u,
130
167
  cursor: null
131
- }, m = i.buildQueryVariables(p), h = f(t.relayEnvironment, i.query, m);
168
+ }, p = i.buildQueryVariables(d), m = f(t.relayEnvironment, i.query, p);
132
169
  return {
133
170
  entityId: e.id,
134
171
  entityManifest: e,
135
172
  entityConfig: r,
136
- query: h
173
+ query: m
137
174
  };
138
175
  },
139
- render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e })
176
+ render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ s(t, { prepared: e })
140
177
  });
141
178
  q.set(t, e.id);
142
179
  let n = H({
@@ -144,7 +181,7 @@ function U(i) {
144
181
  resourcePage: g,
145
182
  prepareSearchBehavior: "path",
146
183
  prepare: async () => {
147
- let { config: t } = await c.loadListEntity(e.id), { listUrlCodec: n, listDefaults: r } = t;
184
+ let { config: t } = await l.loadListEntity(e.id), { listUrlCodec: n, listDefaults: r } = t;
148
185
  if (n == null || r == null) throw Error(`Backoffice entity ${e.id} does not expose a list configuration.`);
149
186
  return {
150
187
  entityId: e.id,
@@ -155,7 +192,7 @@ function U(i) {
155
192
  render: ({ children: e, prepared: t, Component: n }) => {
156
193
  if (n == null) return null;
157
194
  let r = t;
158
- return /* @__PURE__ */ o(n, {
195
+ return /* @__PURE__ */ s(n, {
159
196
  entityManifest: r.entityManifest,
160
197
  config: r.entityConfig,
161
198
  prepared: r,
@@ -164,19 +201,39 @@ function U(i) {
164
201
  },
165
202
  children: [t]
166
203
  });
167
- q.set(n, e.id), r.push(n);
204
+ q.set(n, e.id);
205
+ let i = H({
206
+ path: "",
207
+ resourcePage: _,
208
+ prepareSearchBehavior: "path",
209
+ prepare: () => ({
210
+ entityId: e.id,
211
+ entityManifest: e
212
+ }),
213
+ render: ({ children: e, prepared: t, Component: n }) => {
214
+ if (n == null) return null;
215
+ let r = t;
216
+ return /* @__PURE__ */ s(n, {
217
+ entityManifest: r.entityManifest,
218
+ prepared: r,
219
+ children: e
220
+ });
221
+ },
222
+ children: [n]
223
+ });
224
+ q.set(i, e.id), r.push(i);
168
225
  }
169
- let i = (e.detailPages ?? []).map((t) => {
226
+ let o = (e.detailPages ?? []).map((t) => {
170
227
  let n = H({
171
- path: t.pathSegment,
172
- resourcePage: v,
228
+ path: "",
229
+ resourcePage: te,
173
230
  suspenseBoundary: "segment",
231
+ fallback: a,
174
232
  prepare: async ({ context: n, variables: r }) => {
175
- let i = String(r.id ?? ""), a = await c.loadDetailPageEntity(e.id, t.id), o = a.config.page.buildVariables == null ? { variables: { id: i } } : a.config.page.buildVariables({ id: i }), s = f(n.relayEnvironment, a.config.page.query, o.variables);
233
+ let i = String(r.id ?? ""), a = await l.loadDetailPageEntity(e.id, t.id), o = a.config.page.buildVariables == null ? { variables: { id: i } } : a.config.page.buildVariables({ id: i }), s = f(n.relayEnvironment, a.config.page.query, o.variables);
176
234
  return {
177
235
  entityId: e.id,
178
236
  entityManifest: e,
179
- entityConfig: a.config,
180
237
  detailId: o.detailId,
181
238
  id: i,
182
239
  pageConfig: a.config,
@@ -185,23 +242,45 @@ function U(i) {
185
242
  pagePath: t.pathSegment
186
243
  };
187
244
  },
188
- render: ({ prepared: e, Component: t }) => {
189
- if (t == null) return null;
190
- let n = e;
191
- return /* @__PURE__ */ o(t, {
192
- entityManifest: n.entityManifest,
193
- config: n.entityConfig,
194
- prepared: n
245
+ render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ s(t, { prepared: e })
246
+ });
247
+ q.set(n, e.id);
248
+ let r = H({
249
+ path: t.pathSegment,
250
+ resourcePage: x,
251
+ suspenseBoundary: "segment",
252
+ fallback: a,
253
+ prepare: async ({ variables: n }) => {
254
+ let r = String(n.id ?? ""), [i, a] = await Promise.all([l.loadDetailPageEntity(e.id, t.id), l.loadDetailLayoutEntity(e.id)]);
255
+ return {
256
+ entityId: e.id,
257
+ entityManifest: e,
258
+ entityConfig: a.config,
259
+ id: r,
260
+ pageConfig: i.config,
261
+ pageId: t.id,
262
+ pagePath: t.pathSegment
263
+ };
264
+ },
265
+ render: ({ children: e, prepared: t, Component: n }) => {
266
+ if (n == null) return null;
267
+ let r = t;
268
+ return /* @__PURE__ */ s(n, {
269
+ config: r.entityConfig,
270
+ prepared: r,
271
+ children: e
195
272
  });
196
- }
273
+ },
274
+ children: [n]
197
275
  });
198
- return q.set(n, e.id), n;
199
- }), a = H({
276
+ return q.set(r, e.id), r;
277
+ }), c = H({
200
278
  path: "",
201
279
  resourcePage: b,
202
280
  suspenseBoundary: "segment",
281
+ fallback: a,
203
282
  prepare: async ({ context: t, variables: n }) => {
204
- let { config: r } = await c.loadDetailLayoutEntity(e.id), i = String(n.id ?? ""), a = r.layoutPage.buildVariables == null ? { variables: { id: i } } : r.layoutPage.buildVariables({ id: i }), o = f(t.relayEnvironment, r.layoutPage.query, a.variables);
283
+ let { config: r } = await l.loadDetailLayoutEntity(e.id), i = String(n.id ?? ""), a = r.layoutPage.buildVariables == null ? { variables: { id: i } } : r.layoutPage.buildVariables({ id: i }), o = f(t.relayEnvironment, r.layoutPage.query, a.variables);
205
284
  return {
206
285
  entityId: e.id,
207
286
  entityManifest: e,
@@ -213,7 +292,7 @@ function U(i) {
213
292
  render: ({ children: e, prepared: t, Component: n }) => {
214
293
  if (n == null) return null;
215
294
  let r = t;
216
- return /* @__PURE__ */ o(n, {
295
+ return /* @__PURE__ */ s(n, {
217
296
  entityManifest: r.entityManifest,
218
297
  config: r.entityConfig,
219
298
  prepared: r,
@@ -230,17 +309,19 @@ function U(i) {
230
309
  },
231
310
  render: ({ prepared: e }) => {
232
311
  let t = e.redirectTo ?? null;
233
- return t == null ? null : /* @__PURE__ */ o(k, { pathname: t });
312
+ return t == null ? null : /* @__PURE__ */ s(A, { pathname: t });
234
313
  }
235
314
  }),
236
- ...i,
315
+ ...o,
237
316
  H({
238
317
  path: ":pagePath",
239
- resourcePage: x,
318
+ resourcePage: C,
240
319
  suspenseBoundary: "segment",
320
+ fallback: a,
241
321
  prepare: async ({ variables: t }) => {
242
- let n = await c.loadDetailLayoutEntity(e.id), r = String(t.id ?? ""), i = String(t.pagePath ?? "");
322
+ let n = await l.loadDetailLayoutEntity(e.id), r = String(t.id ?? ""), i = String(t.pagePath ?? "");
243
323
  return {
324
+ entityId: e.id,
244
325
  entityManifest: e,
245
326
  entityConfig: n.config,
246
327
  id: r,
@@ -250,7 +331,7 @@ function U(i) {
250
331
  render: ({ prepared: e, Component: t }) => {
251
332
  if (t == null) return null;
252
333
  let n = e;
253
- return /* @__PURE__ */ o(t, {
334
+ return /* @__PURE__ */ s(t, {
254
335
  entityManifest: n.entityManifest,
255
336
  config: n.entityConfig,
256
337
  prepared: n
@@ -259,11 +340,39 @@ function U(i) {
259
340
  })
260
341
  ]
261
342
  });
262
- q.set(a, e.id);
263
- let s = H({
343
+ q.set(c, e.id);
344
+ let u = H({
345
+ path: "",
346
+ resourcePage: S,
347
+ suspenseBoundary: "segment",
348
+ fallback: a,
349
+ prepare: ({ variables: t }) => {
350
+ let n = String(t.id ?? ""), r = typeof t.pagePath == "string" ? t.pagePath : null, i = r == null ? e.defaultDetailPageId ?? "overview" : V(e, r);
351
+ return {
352
+ entityId: e.id,
353
+ entityManifest: e,
354
+ id: n,
355
+ pageId: i,
356
+ pagePath: r
357
+ };
358
+ },
359
+ render: ({ children: e, prepared: t, Component: n }) => {
360
+ if (n == null) return null;
361
+ let r = t;
362
+ return /* @__PURE__ */ s(n, {
363
+ entityManifest: r.entityManifest,
364
+ prepared: r,
365
+ children: e
366
+ });
367
+ },
368
+ children: [c]
369
+ });
370
+ q.set(u, e.id);
371
+ let d = H({
264
372
  path: ":id",
265
373
  resourcePage: y,
266
374
  suspenseBoundary: "segment",
375
+ fallback: a,
267
376
  prepare: ({ variables: t }) => {
268
377
  let n = String(t.id ?? "");
269
378
  return {
@@ -275,26 +384,26 @@ function U(i) {
275
384
  render: ({ children: e, prepared: t, Component: n }) => {
276
385
  if (n == null) return null;
277
386
  let r = t;
278
- return /* @__PURE__ */ o(n, {
387
+ return /* @__PURE__ */ s(n, {
279
388
  entityManifest: r.entityManifest,
280
389
  prepared: r,
281
390
  children: e
282
391
  });
283
392
  },
284
- children: [a]
393
+ children: [u]
285
394
  });
286
- return q.set(s, e.id), r.push(s), H({
395
+ return q.set(d, e.id), r.push(d), H({
287
396
  path: n,
288
397
  children: r,
289
398
  resourcePage: m,
290
399
  suspenseBoundary: "segment"
291
400
  });
292
- }), ue = Object.values(s).filter((e) => e.kind === "tool").map((e) => {
293
- let t = H({
294
- path: L(e.routes.list, I),
295
- resourcePage: i.toolsOperationPage ?? null,
401
+ }), ye = Object.values(c).filter((e) => e.kind === "tool").map((e) => {
402
+ let t = L(e.routes.list, I), n = H({
403
+ path: "",
404
+ resourcePage: a.toolsOperationPage ?? null,
296
405
  prepare: async () => {
297
- let t = await c.loadToolEntity(e.id);
406
+ let t = await l.loadToolEntity(e.id);
298
407
  return {
299
408
  entityId: e.id,
300
409
  entityManifest: e,
@@ -304,83 +413,102 @@ function U(i) {
304
413
  render: ({ prepared: e, Component: t }) => {
305
414
  if (t == null) return null;
306
415
  let n = e;
307
- return /* @__PURE__ */ o(t, {
416
+ return /* @__PURE__ */ s(t, {
308
417
  entityManifest: n.entityManifest,
309
418
  operation: n.entityConfig.tool.operation,
310
419
  toolId: n.entityConfig.id
311
420
  });
312
421
  }
313
422
  });
314
- return q.set(t, e.id), t;
315
- }), de = H({
423
+ q.set(n, e.id);
424
+ let r = H({
425
+ path: t,
426
+ resourcePage: E,
427
+ prepare: () => ({
428
+ entityId: e.id,
429
+ entityManifest: e
430
+ }),
431
+ render: ({ children: e, prepared: t, Component: n }) => {
432
+ if (n == null) return null;
433
+ let r = t;
434
+ return /* @__PURE__ */ s(n, {
435
+ entityManifest: r.entityManifest,
436
+ prepared: r,
437
+ children: e
438
+ });
439
+ },
440
+ children: [n]
441
+ });
442
+ return q.set(r, e.id), r;
443
+ }), be = H({
316
444
  path: I,
317
445
  resourcePage: h,
318
446
  prepareSearchBehavior: "path",
319
447
  suspenseBoundary: "segment",
320
- prepare: ie,
448
+ prepare: de,
321
449
  render: ({ children: e, prepared: t, route: n, Component: r }) => {
322
450
  if (r == null) return null;
323
- let i = t, a = R(n, q), s = a == null ? R(n, J) : K.get(a) ?? null, c = r, l = d.session.get()?.authStatusQuery ?? null;
324
- return l != null && i?.authStatusQuery != null ? /* @__PURE__ */ o(j, {
451
+ let i = t, a = R(n, q), o = a == null ? R(n, J) : K.get(a) ?? null, c = r, l = d.session.get()?.authStatusQuery ?? null;
452
+ return l != null && i?.authStatusQuery != null ? /* @__PURE__ */ s(j, {
325
453
  Component: c,
326
454
  preparedLayout: i,
327
455
  permissionsQuery: u?.permissionsQuery,
328
- activeGroupId: s,
456
+ activeGroupId: o,
329
457
  authStatusQuery: l,
330
458
  authStatusPrepared: i.authStatusQuery,
331
- loginRedirectPath: te,
459
+ loginRedirectPath: ce,
332
460
  children: e
333
- }) : /* @__PURE__ */ o(A, {
461
+ }) : /* @__PURE__ */ s(ae, {
334
462
  Component: c,
335
463
  preparedLayout: i,
336
464
  permissionsQuery: u?.permissionsQuery,
337
- activeGroupId: s,
465
+ activeGroupId: o,
338
466
  children: e
339
467
  });
340
468
  },
341
469
  children: [
342
- Q,
343
- ...ce,
344
- ...le,
345
- ...ue,
346
- ...oe,
347
- ae
470
+ pe,
471
+ ..._e,
472
+ ...ve,
473
+ ...ye,
474
+ ...he,
475
+ me
348
476
  ]
349
477
  }), $ = [
350
478
  H({
351
479
  path: B,
352
- resourcePage: w,
480
+ resourcePage: re,
353
481
  prepare: async ({ context: e }) => {
354
482
  let t = await d.login.load();
355
483
  return { query: f(e.relayEnvironment, t.loginQuery, {}) };
356
484
  },
357
- render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e })
485
+ render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ s(t, { prepared: e })
358
486
  }),
359
487
  H({
360
- path: V,
361
- resourcePage: T,
488
+ path: U,
489
+ resourcePage: ie,
362
490
  prepare: async () => (await d.passwordResetRequest.load(), null),
363
- render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
491
+ render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ s(e, {})
364
492
  }),
365
493
  H({
366
- path: U,
367
- resourcePage: E,
494
+ path: W,
495
+ resourcePage: D,
368
496
  prepare: async () => (await d.passwordResetComplete.load(), null),
369
- render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
497
+ render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ s(e, {})
370
498
  }),
371
499
  H({
372
- path: W,
373
- resourcePage: D,
500
+ path: oe,
501
+ resourcePage: O,
374
502
  prepare: async () => (await d.verifyEmail.load(), null),
375
- render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
503
+ render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ s(e, {})
376
504
  })
377
505
  ];
378
506
  return (d.hasAcceptInvitation === !0 || d.acceptInvitation != null) && $.push(H({
379
- path: ee,
380
- resourcePage: O,
507
+ path: se,
508
+ resourcePage: k,
381
509
  prepare: async () => (await d.acceptInvitation?.load(), null),
382
- render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
383
- })), $.push(de), $;
510
+ render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ s(e, {})
511
+ })), $.push(be), $;
384
512
  }
385
513
  var W = {
386
514
  normalizeBaseSegment: M,
@@ -396,6 +524,6 @@ var W = {
396
524
  BackofficeLayoutRouteWithAuthStatus: j
397
525
  };
398
526
  //#endregion
399
- export { O as BackofficeAcceptInvitationPageResource, S as BackofficeDashboardPageResource, y as BackofficeEntityDetailFramePageResource, b as BackofficeEntityDetailLayoutPageResource, v as BackofficeEntityDetailPageResource, x as BackofficeEntityDetailUnknownPageRedirectResource, _ as BackofficeEntityListDataPageResource, g as BackofficeEntityListPageResource, C as BackofficeHubPageResource, h as BackofficeLayoutPageResource, w as BackofficeLoginPageResource, E as BackofficePasswordResetCompletePageResource, T as BackofficePasswordResetRequestPageResource, D as BackofficeVerifyEmailPageResource, m as WrapperPageResource, W as __test, U as createBackofficeRoutes, U as default };
527
+ export { k as BackofficeAcceptInvitationPageResource, w as BackofficeDashboardPageResource, T as BackofficeDashboardShellPageResource, y as BackofficeEntityDetailFramePageResource, b as BackofficeEntityDetailLayoutPageResource, x as BackofficeEntityDetailPageConfigPageResource, te as BackofficeEntityDetailPageResource, S as BackofficeEntityDetailShellPageResource, C as BackofficeEntityDetailUnknownPageRedirectResource, v as BackofficeEntityListDataPageResource, g as BackofficeEntityListPageResource, _ as BackofficeEntityListShellPageResource, ne as BackofficeHubPageResource, h as BackofficeLayoutPageResource, re as BackofficeLoginPageResource, D as BackofficePasswordResetCompletePageResource, ie as BackofficePasswordResetRequestPageResource, E as BackofficeToolShellPageResource, O as BackofficeVerifyEmailPageResource, m as WrapperPageResource, W as __test, U as createBackofficeRoutes, U as default };
400
528
 
401
529
  //# sourceMappingURL=createBackofficeRoutes.js.map