@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.
- package/lib/esm/auth/authRefreshNotice.css.js +0 -1
- package/lib/esm/auth/login/loginPage.css.js +1 -0
- package/lib/esm/components/backoffice/detail/backofficeDetailRelationLink.css.js +0 -1
- package/lib/esm/components/backoffice/detail/backofficeRelationsSummaryGrid.css.js +1 -0
- package/lib/esm/components/backoffice/filters/backofficeFilterAction.css.js +1 -0
- package/lib/esm/components/backoffice/filters/deferredFilterSearchInput.css.js +0 -1
- package/lib/esm/i18n/locales/en/backofficeReact.js +1 -0
- package/lib/esm/i18n/locales/en/backofficeReact.js.map +1 -1
- package/lib/esm/i18n/locales/fr/backofficeReact.js +1 -0
- package/lib/esm/i18n/locales/fr/backofficeReact.js.map +1 -1
- package/lib/esm/pages/BackofficeDashboardShellPage.js +29 -0
- package/lib/esm/pages/BackofficeDashboardShellPage.js.map +1 -0
- package/lib/esm/pages/BackofficeEntityDetailFramePage.js +11 -38
- package/lib/esm/pages/BackofficeEntityDetailFramePage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +164 -175
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPageConfigPage.js +35 -0
- package/lib/esm/pages/BackofficeEntityDetailPageConfigPage.js.map +1 -0
- package/lib/esm/pages/BackofficeEntityDetailShellPage.js +17 -0
- package/lib/esm/pages/BackofficeEntityDetailShellPage.js.map +1 -0
- package/lib/esm/pages/BackofficeEntityListShellPage.js +32 -0
- package/lib/esm/pages/BackofficeEntityListShellPage.js.map +1 -0
- package/lib/esm/pages/BackofficeToolShellPage.js +32 -0
- package/lib/esm/pages/BackofficeToolShellPage.js.map +1 -0
- package/lib/esm/pages/detail/BackofficeEntityDetailManifestFallback.js +87 -0
- package/lib/esm/pages/detail/BackofficeEntityDetailManifestFallback.js.map +1 -0
- package/lib/esm/router/createBackofficeRoutes.js +244 -116
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/types/i18n/resources.d.ts +2 -0
- package/lib/types/i18n/resources.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardShellPage.d.ts +9 -0
- package/lib/types/pages/BackofficeDashboardShellPage.d.ts.map +1 -0
- package/lib/types/pages/BackofficeEntityDetailFramePage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts +2 -3
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPageConfigPage.d.ts +10 -0
- package/lib/types/pages/BackofficeEntityDetailPageConfigPage.d.ts.map +1 -0
- package/lib/types/pages/BackofficeEntityDetailShellPage.d.ts +10 -0
- package/lib/types/pages/BackofficeEntityDetailShellPage.d.ts.map +1 -0
- package/lib/types/pages/BackofficeEntityListShellPage.d.ts +10 -0
- package/lib/types/pages/BackofficeEntityListShellPage.d.ts.map +1 -0
- package/lib/types/pages/BackofficeToolShellPage.d.ts +10 -0
- package/lib/types/pages/BackofficeToolShellPage.d.ts.map +1 -0
- package/lib/types/pages/detail/BackofficeEntityDetailManifestFallback.d.ts +10 -0
- package/lib/types/pages/detail/BackofficeEntityDetailManifestFallback.d.ts.map +1 -0
- package/lib/types/router/createBackofficeRoutes.d.ts +11 -3
- package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
- 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 {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import c from "
|
|
7
|
-
import
|
|
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 } =
|
|
12
|
-
let t =
|
|
13
|
-
return
|
|
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
|
-
},
|
|
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:
|
|
23
|
-
let l = p(a,
|
|
24
|
-
return l?.isLoggedIn === !0 ? /* @__PURE__ */
|
|
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__ */
|
|
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(
|
|
71
|
-
let { basePath:
|
|
72
|
-
|
|
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,
|
|
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__ */
|
|
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:
|
|
87
|
-
prepare:
|
|
88
|
-
render:
|
|
89
|
-
|
|
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:
|
|
92
|
-
prepare:
|
|
93
|
-
render:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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:
|
|
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__ */
|
|
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
|
-
}),
|
|
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
|
|
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),
|
|
127
|
-
where:
|
|
128
|
-
sort:
|
|
129
|
-
count:
|
|
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
|
-
},
|
|
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:
|
|
173
|
+
query: m
|
|
137
174
|
};
|
|
138
175
|
},
|
|
139
|
-
render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */
|
|
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
|
|
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__ */
|
|
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)
|
|
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
|
|
226
|
+
let o = (e.detailPages ?? []).map((t) => {
|
|
170
227
|
let n = H({
|
|
171
|
-
path:
|
|
172
|
-
resourcePage:
|
|
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
|
|
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
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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(
|
|
199
|
-
}),
|
|
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
|
|
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__ */
|
|
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__ */
|
|
312
|
+
return t == null ? null : /* @__PURE__ */ s(A, { pathname: t });
|
|
234
313
|
}
|
|
235
314
|
}),
|
|
236
|
-
...
|
|
315
|
+
...o,
|
|
237
316
|
H({
|
|
238
317
|
path: ":pagePath",
|
|
239
|
-
resourcePage:
|
|
318
|
+
resourcePage: C,
|
|
240
319
|
suspenseBoundary: "segment",
|
|
320
|
+
fallback: a,
|
|
241
321
|
prepare: async ({ variables: t }) => {
|
|
242
|
-
let n = await
|
|
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__ */
|
|
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(
|
|
263
|
-
let
|
|
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__ */
|
|
387
|
+
return /* @__PURE__ */ s(n, {
|
|
279
388
|
entityManifest: r.entityManifest,
|
|
280
389
|
prepared: r,
|
|
281
390
|
children: e
|
|
282
391
|
});
|
|
283
392
|
},
|
|
284
|
-
children: [
|
|
393
|
+
children: [u]
|
|
285
394
|
});
|
|
286
|
-
return q.set(
|
|
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
|
-
}),
|
|
293
|
-
let t = H({
|
|
294
|
-
path:
|
|
295
|
-
resourcePage:
|
|
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
|
|
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__ */
|
|
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
|
-
|
|
315
|
-
|
|
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:
|
|
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),
|
|
324
|
-
return l != null && i?.authStatusQuery != null ? /* @__PURE__ */
|
|
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:
|
|
456
|
+
activeGroupId: o,
|
|
329
457
|
authStatusQuery: l,
|
|
330
458
|
authStatusPrepared: i.authStatusQuery,
|
|
331
|
-
loginRedirectPath:
|
|
459
|
+
loginRedirectPath: ce,
|
|
332
460
|
children: e
|
|
333
|
-
}) : /* @__PURE__ */
|
|
461
|
+
}) : /* @__PURE__ */ s(ae, {
|
|
334
462
|
Component: c,
|
|
335
463
|
preparedLayout: i,
|
|
336
464
|
permissionsQuery: u?.permissionsQuery,
|
|
337
|
-
activeGroupId:
|
|
465
|
+
activeGroupId: o,
|
|
338
466
|
children: e
|
|
339
467
|
});
|
|
340
468
|
},
|
|
341
469
|
children: [
|
|
342
|
-
|
|
343
|
-
...
|
|
344
|
-
...
|
|
345
|
-
...
|
|
346
|
-
...
|
|
347
|
-
|
|
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:
|
|
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__ */
|
|
485
|
+
render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ s(t, { prepared: e })
|
|
358
486
|
}),
|
|
359
487
|
H({
|
|
360
|
-
path:
|
|
361
|
-
resourcePage:
|
|
488
|
+
path: U,
|
|
489
|
+
resourcePage: ie,
|
|
362
490
|
prepare: async () => (await d.passwordResetRequest.load(), null),
|
|
363
|
-
render: ({ Component: e }) => e == null ? null : /* @__PURE__ */
|
|
491
|
+
render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ s(e, {})
|
|
364
492
|
}),
|
|
365
493
|
H({
|
|
366
|
-
path:
|
|
367
|
-
resourcePage:
|
|
494
|
+
path: W,
|
|
495
|
+
resourcePage: D,
|
|
368
496
|
prepare: async () => (await d.passwordResetComplete.load(), null),
|
|
369
|
-
render: ({ Component: e }) => e == null ? null : /* @__PURE__ */
|
|
497
|
+
render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ s(e, {})
|
|
370
498
|
}),
|
|
371
499
|
H({
|
|
372
|
-
path:
|
|
373
|
-
resourcePage:
|
|
500
|
+
path: oe,
|
|
501
|
+
resourcePage: O,
|
|
374
502
|
prepare: async () => (await d.verifyEmail.load(), null),
|
|
375
|
-
render: ({ Component: e }) => e == null ? null : /* @__PURE__ */
|
|
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:
|
|
380
|
-
resourcePage:
|
|
507
|
+
path: se,
|
|
508
|
+
resourcePage: k,
|
|
381
509
|
prepare: async () => (await d.acceptInvitation?.load(), null),
|
|
382
|
-
render: ({ Component: e }) => e == null ? null : /* @__PURE__ */
|
|
383
|
-
})), $.push(
|
|
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 {
|
|
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
|