@plumile/backoffice-react 0.1.178 → 0.1.181
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/components/backoffice/columns/buildDataTableColumns.js +1 -1
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js.map +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailRelationLink.css.js +1 -0
- package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js +1 -1
- package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js.map +1 -1
- package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js +1 -1
- package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js.map +1 -1
- package/lib/esm/components/backoffice/hub/backofficeHubTemplate.css.js +2 -0
- package/lib/esm/components/backoffice/layout/backofficeSidebarActions.css.js +0 -2
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.js +0 -1
- package/lib/esm/components/backoffice/links/BackofficeInlineLink.js +2 -2
- package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -1
- package/lib/esm/components/backoffice/links/BackofficeLink.js +2 -2
- package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailNotFound.js +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailNotFound.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +241 -228
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/backofficeEntityListScaffold.css.js +2 -2
- package/lib/esm/components/backoffice/scaffolds/backofficeEntityListScaffold.css.js.map +1 -1
- package/lib/esm/hooks/useBackofficeListRefetch.js +18 -16
- package/lib/esm/hooks/useBackofficeListRefetch.js.map +1 -1
- package/lib/esm/hooks/useBackofficeListUrlState.js +23 -21
- package/lib/esm/hooks/useBackofficeListUrlState.js.map +1 -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/index.js +26 -25
- package/lib/esm/pages/BackofficeEntityDetailFramePage.js +45 -0
- package/lib/esm/pages/BackofficeEntityDetailFramePage.js.map +1 -0
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +74 -60
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +3 -3
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListDataPage.js +146 -0
- package/lib/esm/pages/BackofficeEntityListDataPage.js.map +1 -0
- package/lib/esm/pages/BackofficeEntityListPage.js +121 -132
- package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListRouteContext.js +15 -0
- package/lib/esm/pages/BackofficeEntityListRouteContext.js.map +1 -0
- package/lib/esm/pages/detail/buildTabsItems.js +1 -1
- package/lib/esm/pages/detail/buildTabsItems.js.map +1 -1
- package/lib/esm/provider/BackofficeProvider.js +63 -63
- package/lib/esm/provider/BackofficeProvider.js.map +1 -1
- package/lib/esm/relay/RelayProvider.js +2 -13
- package/lib/esm/relay/environment.js +2 -463
- package/lib/esm/relay/shortAccessTokenEnvironment.js +2 -15
- package/lib/esm/relay/useRelayOperationActivity.js +2 -0
- package/lib/esm/router/createBackofficeRoutes.js +169 -119
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts +3 -2
- package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/links/BackofficeLink.d.ts +3 -2
- package/lib/types/components/backoffice/links/BackofficeLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/backofficeEntityListScaffold.css.d.ts +1 -0
- package/lib/types/components/backoffice/scaffolds/backofficeEntityListScaffold.css.d.ts.map +1 -1
- package/lib/types/hooks/useBackofficeListRefetch.d.ts +5 -4
- package/lib/types/hooks/useBackofficeListRefetch.d.ts.map +1 -1
- package/lib/types/hooks/useBackofficeListUrlState.d.ts.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/index.d.ts +3 -2
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailFramePage.d.ts +14 -0
- package/lib/types/pages/BackofficeEntityDetailFramePage.d.ts.map +1 -0
- package/lib/types/pages/BackofficeEntityDetailLayoutPage.d.ts +2 -2
- package/lib/types/pages/BackofficeEntityDetailLayoutPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts +2 -11
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListDataPage.d.ts +8 -0
- package/lib/types/pages/BackofficeEntityListDataPage.d.ts.map +1 -0
- package/lib/types/pages/BackofficeEntityListPage.d.ts +5 -4
- package/lib/types/pages/BackofficeEntityListPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListRouteContext.d.ts +22 -0
- package/lib/types/pages/BackofficeEntityListRouteContext.d.ts.map +1 -0
- package/lib/types/provider/BackofficeProvider.d.ts.map +1 -1
- package/lib/types/relay/RelayProvider.d.ts +1 -6
- package/lib/types/relay/RelayProvider.d.ts.map +1 -1
- package/lib/types/relay/environment.d.ts +1 -119
- package/lib/types/relay/environment.d.ts.map +1 -1
- package/lib/types/relay/shortAccessTokenEnvironment.d.ts +4 -3
- package/lib/types/relay/shortAccessTokenEnvironment.d.ts.map +1 -1
- package/lib/types/relay/useRelayOperationActivity.d.ts +2 -0
- package/lib/types/relay/useRelayOperationActivity.d.ts.map +1 -0
- package/lib/types/router/createBackofficeRoutes.d.ts +2 -0
- package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
- package/package.json +14 -12
- package/lib/esm/relay/RelayProvider.js.map +0 -1
- package/lib/esm/relay/environment.js.map +0 -1
- package/lib/esm/relay/shortAccessTokenEnvironment.js.map +0 -1
|
@@ -8,18 +8,18 @@ import { BACKOFFICE_LIST_DEFAULTS as l } from "@plumile/backoffice-core/constant
|
|
|
8
8
|
import { getResourcePage as u } from "@plumile/router/ResourcePage.js";
|
|
9
9
|
import { r as d } from "@plumile/router/tools.js";
|
|
10
10
|
//#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("BackofficeEntityDetailPage", async () => import("../pages/BackofficeEntityDetailPage.js")),
|
|
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
12
|
let t = i(c);
|
|
13
13
|
return a(() => {
|
|
14
14
|
t?.history.set({ pathname: e });
|
|
15
15
|
}, [e, t]), null;
|
|
16
|
-
},
|
|
16
|
+
}, A = ({ children: e, Component: t, preparedLayout: n, permissionsQuery: r, activeGroupId: i }) => /* @__PURE__ */ o(t, {
|
|
17
17
|
permissionsQuery: r,
|
|
18
18
|
prepared: n?.permissionsQuery ?? null,
|
|
19
19
|
authStatus: null,
|
|
20
20
|
activeGroupId: i,
|
|
21
21
|
children: e
|
|
22
|
-
}),
|
|
22
|
+
}), j = ({ children: e, Component: t, preparedLayout: n, permissionsQuery: r, activeGroupId: i, authStatusQuery: a, authStatusPrepared: s, loginRedirectPath: c }) => {
|
|
23
23
|
let l = p(a, s);
|
|
24
24
|
return l?.isLoggedIn === !0 ? /* @__PURE__ */ o(t, {
|
|
25
25
|
permissionsQuery: r,
|
|
@@ -27,20 +27,20 @@ var { loadQuery: f, usePreloadedQuery: p } = s, m = u("WrapperPage", async () =>
|
|
|
27
27
|
authStatus: l,
|
|
28
28
|
activeGroupId: i,
|
|
29
29
|
children: e
|
|
30
|
-
}) : /* @__PURE__ */ o(
|
|
31
|
-
},
|
|
30
|
+
}) : /* @__PURE__ */ o(k, { pathname: c });
|
|
31
|
+
}, M = (e) => {
|
|
32
32
|
let t = e.trim();
|
|
33
33
|
return t === "" || t === "/" ? "" : t.replace(/^\/+|\/+$/g, "");
|
|
34
|
-
},
|
|
34
|
+
}, N = (e) => {
|
|
35
35
|
let t = e.trim();
|
|
36
36
|
return t === "" ? "/" : `/${t}`.replace(/\/+/g, "/");
|
|
37
|
-
},
|
|
37
|
+
}, P = (e, t) => {
|
|
38
38
|
let n = t.replace(/^\/+|\/+$/g, "");
|
|
39
39
|
return e === "" ? n : n === "" ? e : `${e}/${n}`;
|
|
40
|
-
},
|
|
41
|
-
let n =
|
|
40
|
+
}, F = (e, t) => N(P(e, t)), I = (e) => e.trim().replace(/^\/+|\/+$/g, ""), L = (e, t) => {
|
|
41
|
+
let n = N(e), r = t === "" ? "" : `/${t}`;
|
|
42
42
|
return r !== "" && n.startsWith(r) ? n.slice(r.length).replace(/^\/+/, "") : n.replace(/^\/+/, "");
|
|
43
|
-
},
|
|
43
|
+
}, R = (e, t) => {
|
|
44
44
|
if (e?.routes == null) return null;
|
|
45
45
|
for (let n = e.routes.length - 1; n >= 0; --n) {
|
|
46
46
|
let r = e.routes[n];
|
|
@@ -50,7 +50,7 @@ var { loadQuery: f, usePreloadedQuery: p } = s, m = u("WrapperPage", async () =>
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
return null;
|
|
53
|
-
},
|
|
53
|
+
}, z = (e) => {
|
|
54
54
|
let t = new URLSearchParams();
|
|
55
55
|
return Object.entries(e).forEach(([e, n]) => {
|
|
56
56
|
if (n != null) {
|
|
@@ -63,37 +63,37 @@ var { loadQuery: f, usePreloadedQuery: p } = s, m = u("WrapperPage", async () =>
|
|
|
63
63
|
t.set(e, String(n));
|
|
64
64
|
}
|
|
65
65
|
}), t;
|
|
66
|
-
},
|
|
67
|
-
let n =
|
|
68
|
-
return e.detailPages?.find((e) =>
|
|
69
|
-
},
|
|
70
|
-
function
|
|
71
|
-
let { basePath: a, entityManifest: s, entityRegistry: c, sidebar: u, auth: d, dashboard: p } = i,
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
}, B = (e, t) => {
|
|
67
|
+
let n = I(t);
|
|
68
|
+
return e.detailPages?.find((e) => I(e.pathSegment) === n) ?? null;
|
|
69
|
+
}, 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) => {
|
|
73
|
+
K.set(t, e.groupId);
|
|
74
74
|
});
|
|
75
|
-
let
|
|
75
|
+
let q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Y = u?.permissionsQuery, ie = async ({ context: e }) => {
|
|
76
76
|
let t = await d.session.load();
|
|
77
77
|
return {
|
|
78
|
-
permissionsQuery:
|
|
78
|
+
permissionsQuery: Y == null ? null : f(e.relayEnvironment, Y, {}),
|
|
79
79
|
authStatusQuery: t.authStatusQuery == null ? null : f(e.relayEnvironment, t.authStatusQuery, {}, { fetchPolicy: "network-only" })
|
|
80
80
|
};
|
|
81
81
|
}, X = async () => p == null ? null : {
|
|
82
82
|
dashboardId: "dashboard",
|
|
83
83
|
config: await p.load()
|
|
84
|
-
}, Z = ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e }),
|
|
84
|
+
}, Z = ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e }), Q = H({
|
|
85
85
|
path: "",
|
|
86
|
-
resourcePage:
|
|
86
|
+
resourcePage: S,
|
|
87
87
|
prepare: X,
|
|
88
88
|
render: Z
|
|
89
|
-
}),
|
|
89
|
+
}), ae = H({
|
|
90
90
|
path: "dashboard",
|
|
91
|
-
resourcePage:
|
|
91
|
+
resourcePage: S,
|
|
92
92
|
prepare: X,
|
|
93
93
|
render: Z
|
|
94
|
-
}),
|
|
94
|
+
}), oe = N.map((e) => H({
|
|
95
95
|
path: `dashboard/${e.id}`,
|
|
96
|
-
resourcePage:
|
|
96
|
+
resourcePage: S,
|
|
97
97
|
prepare: async () => {
|
|
98
98
|
let t = await e.module.load();
|
|
99
99
|
return {
|
|
@@ -102,28 +102,28 @@ function B(i) {
|
|
|
102
102
|
};
|
|
103
103
|
},
|
|
104
104
|
render: Z
|
|
105
|
-
})),
|
|
106
|
-
let t =
|
|
107
|
-
path:
|
|
108
|
-
resourcePage:
|
|
105
|
+
})), se = Object.values(s).filter((e) => e.kind === "list-detail"), ce = ne.map((e) => {
|
|
106
|
+
let t = H({
|
|
107
|
+
path: L(e.hub.href, I),
|
|
108
|
+
resourcePage: C,
|
|
109
109
|
prepare: () => ({
|
|
110
110
|
hubId: e.hub.id,
|
|
111
111
|
hub: e.hub
|
|
112
112
|
}),
|
|
113
113
|
render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e })
|
|
114
114
|
});
|
|
115
|
-
return e.groupId != null &&
|
|
116
|
-
}),
|
|
117
|
-
let t = e.routes.list, n =
|
|
115
|
+
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 = [];
|
|
118
118
|
if (e.hasList) {
|
|
119
|
-
let t =
|
|
119
|
+
let t = H({
|
|
120
120
|
path: "",
|
|
121
|
-
resourcePage:
|
|
121
|
+
resourcePage: _,
|
|
122
122
|
prepareSearchBehavior: "path",
|
|
123
123
|
prepare: async ({ context: t, query: n }) => {
|
|
124
124
|
let { config: r } = await c.loadListEntity(e.id), { list: i, listUrlCodec: a, listDefaults: o } = r;
|
|
125
125
|
if (a == null || o == null) throw Error(`Backoffice entity ${e.id} does not expose a list configuration.`);
|
|
126
|
-
let s =
|
|
126
|
+
let s = z(n), u = a.parse(s), { pageSize: d } = l, p = {
|
|
127
127
|
where: u.where,
|
|
128
128
|
sort: u.sort ?? o.sort,
|
|
129
129
|
count: d,
|
|
@@ -136,6 +136,55 @@ function B(i) {
|
|
|
136
136
|
query: h
|
|
137
137
|
};
|
|
138
138
|
},
|
|
139
|
+
render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e })
|
|
140
|
+
});
|
|
141
|
+
q.set(t, e.id);
|
|
142
|
+
let n = H({
|
|
143
|
+
path: "",
|
|
144
|
+
resourcePage: g,
|
|
145
|
+
prepareSearchBehavior: "path",
|
|
146
|
+
prepare: async () => {
|
|
147
|
+
let { config: t } = await c.loadListEntity(e.id), { listUrlCodec: n, listDefaults: r } = t;
|
|
148
|
+
if (n == null || r == null) throw Error(`Backoffice entity ${e.id} does not expose a list configuration.`);
|
|
149
|
+
return {
|
|
150
|
+
entityId: e.id,
|
|
151
|
+
entityManifest: e,
|
|
152
|
+
entityConfig: t
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
render: ({ children: e, prepared: t, Component: n }) => {
|
|
156
|
+
if (n == null) return null;
|
|
157
|
+
let r = t;
|
|
158
|
+
return /* @__PURE__ */ o(n, {
|
|
159
|
+
entityManifest: r.entityManifest,
|
|
160
|
+
config: r.entityConfig,
|
|
161
|
+
prepared: r,
|
|
162
|
+
children: e
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
children: [t]
|
|
166
|
+
});
|
|
167
|
+
q.set(n, e.id), r.push(n);
|
|
168
|
+
}
|
|
169
|
+
let i = (e.detailPages ?? []).map((t) => {
|
|
170
|
+
let n = H({
|
|
171
|
+
path: t.pathSegment,
|
|
172
|
+
resourcePage: v,
|
|
173
|
+
suspenseBoundary: "segment",
|
|
174
|
+
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);
|
|
176
|
+
return {
|
|
177
|
+
entityId: e.id,
|
|
178
|
+
entityManifest: e,
|
|
179
|
+
entityConfig: a.config,
|
|
180
|
+
detailId: o.detailId,
|
|
181
|
+
id: i,
|
|
182
|
+
pageConfig: a.config,
|
|
183
|
+
pageQuery: s,
|
|
184
|
+
pageId: t.id,
|
|
185
|
+
pagePath: t.pathSegment
|
|
186
|
+
};
|
|
187
|
+
},
|
|
139
188
|
render: ({ prepared: e, Component: t }) => {
|
|
140
189
|
if (t == null) return null;
|
|
141
190
|
let n = e;
|
|
@@ -146,11 +195,11 @@ function B(i) {
|
|
|
146
195
|
});
|
|
147
196
|
}
|
|
148
197
|
});
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
198
|
+
return q.set(n, e.id), n;
|
|
199
|
+
}), a = H({
|
|
200
|
+
path: "",
|
|
201
|
+
resourcePage: b,
|
|
202
|
+
suspenseBoundary: "segment",
|
|
154
203
|
prepare: async ({ context: t, variables: n }) => {
|
|
155
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);
|
|
156
205
|
return {
|
|
@@ -172,7 +221,7 @@ function B(i) {
|
|
|
172
221
|
});
|
|
173
222
|
},
|
|
174
223
|
children: [
|
|
175
|
-
|
|
224
|
+
H({
|
|
176
225
|
path: "",
|
|
177
226
|
resourcePage: m,
|
|
178
227
|
prepare: ({ variables: t }) => {
|
|
@@ -181,39 +230,14 @@ function B(i) {
|
|
|
181
230
|
},
|
|
182
231
|
render: ({ prepared: e }) => {
|
|
183
232
|
let t = e.redirectTo ?? null;
|
|
184
|
-
return t == null ? null : /* @__PURE__ */ o(
|
|
233
|
+
return t == null ? null : /* @__PURE__ */ o(k, { pathname: t });
|
|
185
234
|
}
|
|
186
235
|
}),
|
|
187
|
-
...
|
|
188
|
-
|
|
189
|
-
resourcePage: _,
|
|
190
|
-
prepare: async ({ context: n, variables: r }) => {
|
|
191
|
-
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);
|
|
192
|
-
return {
|
|
193
|
-
entityId: e.id,
|
|
194
|
-
entityManifest: e,
|
|
195
|
-
entityConfig: a.config,
|
|
196
|
-
detailId: o.detailId,
|
|
197
|
-
id: i,
|
|
198
|
-
pageConfig: a.config,
|
|
199
|
-
pageQuery: s,
|
|
200
|
-
pageId: t.id,
|
|
201
|
-
pagePath: t.pathSegment
|
|
202
|
-
};
|
|
203
|
-
},
|
|
204
|
-
render: ({ prepared: e, Component: t }) => {
|
|
205
|
-
if (t == null) return null;
|
|
206
|
-
let n = e;
|
|
207
|
-
return /* @__PURE__ */ o(t, {
|
|
208
|
-
entityManifest: n.entityManifest,
|
|
209
|
-
config: n.entityConfig,
|
|
210
|
-
prepared: n
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
})),
|
|
214
|
-
z({
|
|
236
|
+
...i,
|
|
237
|
+
H({
|
|
215
238
|
path: ":pagePath",
|
|
216
|
-
resourcePage:
|
|
239
|
+
resourcePage: x,
|
|
240
|
+
suspenseBoundary: "segment",
|
|
217
241
|
prepare: async ({ variables: t }) => {
|
|
218
242
|
let n = await c.loadDetailLayoutEntity(e.id), r = String(t.id ?? ""), i = String(t.pagePath ?? "");
|
|
219
243
|
return {
|
|
@@ -235,14 +259,39 @@ function B(i) {
|
|
|
235
259
|
})
|
|
236
260
|
]
|
|
237
261
|
});
|
|
238
|
-
|
|
262
|
+
q.set(a, e.id);
|
|
263
|
+
let s = H({
|
|
264
|
+
path: ":id",
|
|
265
|
+
resourcePage: y,
|
|
266
|
+
suspenseBoundary: "segment",
|
|
267
|
+
prepare: ({ variables: t }) => {
|
|
268
|
+
let n = String(t.id ?? "");
|
|
269
|
+
return {
|
|
270
|
+
entityId: e.id,
|
|
271
|
+
entityManifest: e,
|
|
272
|
+
id: n
|
|
273
|
+
};
|
|
274
|
+
},
|
|
275
|
+
render: ({ children: e, prepared: t, Component: n }) => {
|
|
276
|
+
if (n == null) return null;
|
|
277
|
+
let r = t;
|
|
278
|
+
return /* @__PURE__ */ o(n, {
|
|
279
|
+
entityManifest: r.entityManifest,
|
|
280
|
+
prepared: r,
|
|
281
|
+
children: e
|
|
282
|
+
});
|
|
283
|
+
},
|
|
284
|
+
children: [a]
|
|
285
|
+
});
|
|
286
|
+
return q.set(s, e.id), r.push(s), H({
|
|
239
287
|
path: n,
|
|
240
288
|
children: r,
|
|
241
|
-
resourcePage: m
|
|
289
|
+
resourcePage: m,
|
|
290
|
+
suspenseBoundary: "segment"
|
|
242
291
|
});
|
|
243
|
-
}),
|
|
244
|
-
let t =
|
|
245
|
-
path:
|
|
292
|
+
}), ue = Object.values(s).filter((e) => e.kind === "tool").map((e) => {
|
|
293
|
+
let t = H({
|
|
294
|
+
path: L(e.routes.list, I),
|
|
246
295
|
resourcePage: i.toolsOperationPage ?? null,
|
|
247
296
|
prepare: async () => {
|
|
248
297
|
let t = await c.loadToolEntity(e.id);
|
|
@@ -262,25 +311,26 @@ function B(i) {
|
|
|
262
311
|
});
|
|
263
312
|
}
|
|
264
313
|
});
|
|
265
|
-
return
|
|
266
|
-
}),
|
|
267
|
-
path:
|
|
314
|
+
return q.set(t, e.id), t;
|
|
315
|
+
}), de = H({
|
|
316
|
+
path: I,
|
|
268
317
|
resourcePage: h,
|
|
269
318
|
prepareSearchBehavior: "path",
|
|
270
|
-
|
|
319
|
+
suspenseBoundary: "segment",
|
|
320
|
+
prepare: ie,
|
|
271
321
|
render: ({ children: e, prepared: t, route: n, Component: r }) => {
|
|
272
322
|
if (r == null) return null;
|
|
273
|
-
let i = t, a =
|
|
274
|
-
return l != null && i?.authStatusQuery != null ? /* @__PURE__ */ o(
|
|
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, {
|
|
275
325
|
Component: c,
|
|
276
326
|
preparedLayout: i,
|
|
277
327
|
permissionsQuery: u?.permissionsQuery,
|
|
278
328
|
activeGroupId: s,
|
|
279
329
|
authStatusQuery: l,
|
|
280
330
|
authStatusPrepared: i.authStatusQuery,
|
|
281
|
-
loginRedirectPath:
|
|
331
|
+
loginRedirectPath: te,
|
|
282
332
|
children: e
|
|
283
|
-
}) : /* @__PURE__ */ o(
|
|
333
|
+
}) : /* @__PURE__ */ o(A, {
|
|
284
334
|
Component: c,
|
|
285
335
|
preparedLayout: i,
|
|
286
336
|
permissionsQuery: u?.permissionsQuery,
|
|
@@ -289,63 +339,63 @@ function B(i) {
|
|
|
289
339
|
});
|
|
290
340
|
},
|
|
291
341
|
children: [
|
|
292
|
-
|
|
293
|
-
...oe,
|
|
294
|
-
...se,
|
|
342
|
+
Q,
|
|
295
343
|
...ce,
|
|
296
|
-
...
|
|
297
|
-
|
|
344
|
+
...le,
|
|
345
|
+
...ue,
|
|
346
|
+
...oe,
|
|
347
|
+
ae
|
|
298
348
|
]
|
|
299
349
|
}), $ = [
|
|
300
|
-
|
|
301
|
-
path:
|
|
302
|
-
resourcePage:
|
|
350
|
+
H({
|
|
351
|
+
path: B,
|
|
352
|
+
resourcePage: w,
|
|
303
353
|
prepare: async ({ context: e }) => {
|
|
304
354
|
let t = await d.login.load();
|
|
305
355
|
return { query: f(e.relayEnvironment, t.loginQuery, {}) };
|
|
306
356
|
},
|
|
307
357
|
render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e })
|
|
308
358
|
}),
|
|
309
|
-
|
|
310
|
-
path:
|
|
311
|
-
resourcePage:
|
|
359
|
+
H({
|
|
360
|
+
path: V,
|
|
361
|
+
resourcePage: T,
|
|
312
362
|
prepare: async () => (await d.passwordResetRequest.load(), null),
|
|
313
363
|
render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
|
|
314
364
|
}),
|
|
315
|
-
|
|
316
|
-
path:
|
|
317
|
-
resourcePage:
|
|
365
|
+
H({
|
|
366
|
+
path: U,
|
|
367
|
+
resourcePage: E,
|
|
318
368
|
prepare: async () => (await d.passwordResetComplete.load(), null),
|
|
319
369
|
render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
|
|
320
370
|
}),
|
|
321
|
-
|
|
322
|
-
path:
|
|
323
|
-
resourcePage:
|
|
371
|
+
H({
|
|
372
|
+
path: W,
|
|
373
|
+
resourcePage: D,
|
|
324
374
|
prepare: async () => (await d.verifyEmail.load(), null),
|
|
325
375
|
render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
|
|
326
376
|
})
|
|
327
377
|
];
|
|
328
|
-
return (d.hasAcceptInvitation === !0 || d.acceptInvitation != null) && $.push(
|
|
329
|
-
path:
|
|
330
|
-
resourcePage:
|
|
378
|
+
return (d.hasAcceptInvitation === !0 || d.acceptInvitation != null) && $.push(H({
|
|
379
|
+
path: ee,
|
|
380
|
+
resourcePage: O,
|
|
331
381
|
prepare: async () => (await d.acceptInvitation?.load(), null),
|
|
332
382
|
render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
|
|
333
|
-
})), $.push(
|
|
383
|
+
})), $.push(de), $;
|
|
334
384
|
}
|
|
335
|
-
var
|
|
336
|
-
normalizeBaseSegment:
|
|
337
|
-
normalizePath:
|
|
338
|
-
buildScopedPath:
|
|
339
|
-
buildScopedAbsolutePath:
|
|
340
|
-
buildRelativePath:
|
|
341
|
-
resolveActiveEntityIdFromRoute:
|
|
342
|
-
resolveDetailPageIdForPath:
|
|
343
|
-
resolveDetailPageManifestByPath:
|
|
344
|
-
toSearchParams:
|
|
385
|
+
var W = {
|
|
386
|
+
normalizeBaseSegment: M,
|
|
387
|
+
normalizePath: N,
|
|
388
|
+
buildScopedPath: P,
|
|
389
|
+
buildScopedAbsolutePath: F,
|
|
390
|
+
buildRelativePath: L,
|
|
391
|
+
resolveActiveEntityIdFromRoute: R,
|
|
392
|
+
resolveDetailPageIdForPath: V,
|
|
393
|
+
resolveDetailPageManifestByPath: B,
|
|
394
|
+
toSearchParams: z,
|
|
345
395
|
validateBackofficeDashboardRegistrations: r,
|
|
346
|
-
BackofficeLayoutRouteWithAuthStatus:
|
|
396
|
+
BackofficeLayoutRouteWithAuthStatus: j
|
|
347
397
|
};
|
|
348
398
|
//#endregion
|
|
349
|
-
export {
|
|
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 };
|
|
350
400
|
|
|
351
401
|
//# sourceMappingURL=createBackofficeRoutes.js.map
|