@plumile/backoffice-react 0.1.116 → 0.1.117

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 (59) hide show
  1. package/lib/esm/components/backoffice/billing/BackofficeBillingUsageChart.js +60 -0
  2. package/lib/esm/components/backoffice/billing/BackofficeBillingUsageChart.js.map +1 -0
  3. package/lib/esm/components/backoffice/billing/backofficeBillingUsageChart.css.js +7 -0
  4. package/lib/esm/components/backoffice/billing/backofficeBillingUsageChart.css.js.map +1 -0
  5. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +6 -6
  6. package/lib/esm/components/backoffice/layout/buildSidebarSections.js +154 -135
  7. package/lib/esm/components/backoffice/layout/buildSidebarSections.js.map +1 -1
  8. package/lib/esm/components/backoffice/layout/sidebarUtils.js +24 -21
  9. package/lib/esm/components/backoffice/layout/sidebarUtils.js.map +1 -1
  10. package/lib/esm/components/backoffice/links/resolveBackofficeLink.js +62 -54
  11. package/lib/esm/components/backoffice/links/resolveBackofficeLink.js.map +1 -1
  12. package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js +1 -1
  13. package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js.map +1 -1
  14. package/lib/esm/index.js +75 -74
  15. package/lib/esm/pages/BackofficeDashboardPage.helpers.js +1 -0
  16. package/lib/esm/pages/BackofficeDashboardPage.helpers.js.map +1 -1
  17. package/lib/esm/pages/BackofficeDashboardPage.js +181 -154
  18. package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
  19. package/lib/esm/pages/BackofficeEntityDetailPage.js +12 -12
  20. package/lib/esm/pages/BackofficeLayoutPage.js +133 -129
  21. package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
  22. package/lib/esm/provider/BackofficeConfigContext.js.map +1 -1
  23. package/lib/esm/provider/BackofficeProvider.js +126 -121
  24. package/lib/esm/provider/BackofficeProvider.js.map +1 -1
  25. package/lib/esm/provider/dashboardRegistrations.js +17 -0
  26. package/lib/esm/provider/dashboardRegistrations.js.map +1 -0
  27. package/lib/esm/router/createBackofficeRoutes.js +148 -131
  28. package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
  29. package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.d.ts +25 -0
  30. package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.d.ts.map +1 -0
  31. package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.stories.d.ts +41 -0
  32. package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.stories.d.ts.map +1 -0
  33. package/lib/types/components/backoffice/billing/backofficeBillingUsageChart.css.d.ts +4 -0
  34. package/lib/types/components/backoffice/billing/backofficeBillingUsageChart.css.d.ts.map +1 -0
  35. package/lib/types/components/backoffice/layout/buildSidebarSections.d.ts +2 -1
  36. package/lib/types/components/backoffice/layout/buildSidebarSections.d.ts.map +1 -1
  37. package/lib/types/components/backoffice/layout/sidebarUtils.d.ts +1 -0
  38. package/lib/types/components/backoffice/layout/sidebarUtils.d.ts.map +1 -1
  39. package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts.map +1 -1
  40. package/lib/types/components/backoffice/links/types.d.ts +1 -0
  41. package/lib/types/components/backoffice/links/types.d.ts.map +1 -1
  42. package/lib/types/index.d.ts +2 -1
  43. package/lib/types/index.d.ts.map +1 -1
  44. package/lib/types/pages/BackofficeDashboardPage.d.ts +5 -1
  45. package/lib/types/pages/BackofficeDashboardPage.d.ts.map +1 -1
  46. package/lib/types/pages/BackofficeDashboardPage.helpers.d.ts.map +1 -1
  47. package/lib/types/pages/BackofficeDashboardPage.stories.d.ts +9 -0
  48. package/lib/types/pages/BackofficeDashboardPage.stories.d.ts.map +1 -0
  49. package/lib/types/pages/BackofficeLayoutPage.d.ts.map +1 -1
  50. package/lib/types/provider/BackofficeConfigContext.d.ts +2 -1
  51. package/lib/types/provider/BackofficeConfigContext.d.ts.map +1 -1
  52. package/lib/types/provider/BackofficeProvider.d.ts.map +1 -1
  53. package/lib/types/provider/dashboardRegistrations.d.ts +4 -0
  54. package/lib/types/provider/dashboardRegistrations.d.ts.map +1 -0
  55. package/lib/types/provider/types.d.ts +8 -1
  56. package/lib/types/provider/types.d.ts.map +1 -1
  57. package/lib/types/router/createBackofficeRoutes.d.ts +8 -2
  58. package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
  59. package/package.json +13 -13
@@ -1,46 +1,47 @@
1
1
  import { buildEntityGroupLookup as e, resolveSidebarGroups as t, resolveSidebarHubEntries as n } from "../components/backoffice/layout/sidebarUtils.js";
2
- import { useContext as r, useEffect as i } from "react";
3
- import { jsx as a } from "react/jsx-runtime";
4
- import * as o from "react-relay";
5
- import s from "@plumile/router/routing/RoutingContext.js";
6
- import { BACKOFFICE_LIST_DEFAULTS as c } from "@plumile/backoffice-core/constants.js";
7
- import l from "@plumile/router/errors/HttpRedirect.js";
8
- import { getResourcePage as u } from "@plumile/router/ResourcePage.js";
9
- import { r as d } from "@plumile/router/tools.js";
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";
8
+ import u from "@plumile/router/errors/HttpRedirect.js";
9
+ import { getResourcePage as d } from "@plumile/router/ResourcePage.js";
10
+ import { r as f } from "@plumile/router/tools.js";
10
11
  //#region src/router/createBackofficeRoutes.tsx
11
- var { loadQuery: f, usePreloadedQuery: p } = o, 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")), v = u("BackofficeEntityDetailLayoutPage", async () => import("../pages/BackofficeEntityDetailLayoutPage.js")), y = u("BackofficeEntityDetailUnknownPageRedirect", async () => import("../pages/BackofficeEntityDetailUnknownPageRedirect.js")), b = u("BackofficeDashboardPage", async () => import("../pages/BackofficeDashboardPage.js")), x = u("BackofficeHubPage", async () => import("../pages/BackofficeHubPage.js")), S = u("BackofficeLoginPage", async () => import("../pages/BackofficeLoginPage.js")), C = u("BackofficePasswordResetRequestPage", async () => import("../pages/BackofficePasswordResetRequestPage.js")), w = u("BackofficePasswordResetCompletePage", async () => import("../pages/BackofficePasswordResetCompletePage.js")), T = u("BackofficeVerifyEmailPage", async () => import("../pages/BackofficeVerifyEmailPage.js")), E = u("BackofficeAcceptInvitationPage", async () => import("../pages/BackofficeAcceptInvitationPage.js")), D = ({ loginRedirectPath: e }) => {
12
- let t = r(s);
13
- return i(() => {
12
+ var { loadQuery: p, usePreloadedQuery: m } = s, h = d("WrapperPage", async () => ({ default: (await import("@plumile/ui/pages/WrapperPage.js")).WrapperPage })), g = d("BackofficeLayoutPage", async () => import("../pages/BackofficeLayoutPage.js")), _ = d("BackofficeEntityListPage", async () => import("../pages/BackofficeEntityListPage.js")), v = d("BackofficeEntityDetailPage", async () => import("../pages/BackofficeEntityDetailPage.js")), y = d("BackofficeEntityDetailLayoutPage", async () => import("../pages/BackofficeEntityDetailLayoutPage.js")), b = d("BackofficeEntityDetailUnknownPageRedirect", async () => import("../pages/BackofficeEntityDetailUnknownPageRedirect.js")), x = d("BackofficeDashboardPage", async () => import("../pages/BackofficeDashboardPage.js")), S = d("BackofficeHubPage", async () => import("../pages/BackofficeHubPage.js")), C = d("BackofficeLoginPage", async () => import("../pages/BackofficeLoginPage.js")), w = d("BackofficePasswordResetRequestPage", async () => import("../pages/BackofficePasswordResetRequestPage.js")), T = d("BackofficePasswordResetCompletePage", async () => import("../pages/BackofficePasswordResetCompletePage.js")), E = d("BackofficeVerifyEmailPage", async () => import("../pages/BackofficeVerifyEmailPage.js")), D = d("BackofficeAcceptInvitationPage", async () => import("../pages/BackofficeAcceptInvitationPage.js")), O = ({ loginRedirectPath: e }) => {
13
+ let t = i(c);
14
+ return a(() => {
14
15
  t?.history.set({ pathname: e });
15
16
  }, [e, t]), null;
16
- }, O = ({ children: e, Component: t, preparedLayout: n, permissionsQuery: r, activeGroupId: i }) => /* @__PURE__ */ a(t, {
17
+ }, k = ({ children: e, Component: t, preparedLayout: n, permissionsQuery: r, activeGroupId: i }) => /* @__PURE__ */ o(t, {
17
18
  permissionsQuery: r,
18
19
  prepared: n?.permissionsQuery ?? null,
19
20
  authStatus: null,
20
21
  activeGroupId: i,
21
22
  children: e
22
- }), k = ({ children: e, Component: t, preparedLayout: n, permissionsQuery: r, activeGroupId: i, authStatusQuery: o, authStatusPrepared: s, loginRedirectPath: c }) => {
23
- let l = p(o, s);
24
- return l?.isLoggedIn === !0 ? /* @__PURE__ */ a(t, {
23
+ }), A = ({ children: e, Component: t, preparedLayout: n, permissionsQuery: r, activeGroupId: i, authStatusQuery: a, authStatusPrepared: s, loginRedirectPath: c }) => {
24
+ let l = m(a, s);
25
+ return l?.isLoggedIn === !0 ? /* @__PURE__ */ o(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__ */ a(D, { loginRedirectPath: c });
31
- }, A = (e) => {
31
+ }) : /* @__PURE__ */ o(O, { loginRedirectPath: c });
32
+ }, j = (e) => {
32
33
  let t = e.trim();
33
34
  return t === "" || t === "/" ? "" : t.replace(/^\/+|\/+$/g, "");
34
- }, j = (e) => {
35
+ }, M = (e) => {
35
36
  let t = e.trim();
36
37
  return t === "" ? "/" : `/${t}`.replace(/\/+/g, "/");
37
- }, M = (e, t) => {
38
+ }, N = (e, t) => {
38
39
  let n = t.replace(/^\/+|\/+$/g, "");
39
40
  return e === "" ? n : n === "" ? e : `${e}/${n}`;
40
- }, N = (e, t) => j(M(e, t)), P = (e, t) => {
41
- let n = j(e), r = t === "" ? "" : `/${t}`;
41
+ }, P = (e, t) => M(N(e, t)), F = (e, t) => {
42
+ let n = M(e), r = t === "" ? "" : `/${t}`;
42
43
  return r !== "" && n.startsWith(r) ? n.slice(r.length).replace(/^\/+/, "") : n.replace(/^\/+/, "");
43
- }, F = (e, t) => {
44
+ }, I = (e, t) => {
44
45
  if (e?.routes == null) return null;
45
46
  for (let n = e.routes.length - 1; n >= 0; --n) {
46
47
  let r = e.routes[n];
@@ -50,7 +51,7 @@ var { loadQuery: f, usePreloadedQuery: p } = o, m = u("WrapperPage", async () =>
50
51
  }
51
52
  }
52
53
  return null;
53
- }, I = (e) => {
54
+ }, L = (e) => {
54
55
  let t = new URLSearchParams();
55
56
  return Object.entries(e).forEach(([e, n]) => {
56
57
  if (n != null) {
@@ -63,55 +64,69 @@ var { loadQuery: f, usePreloadedQuery: p } = o, m = u("WrapperPage", async () =>
63
64
  t.set(e, String(n));
64
65
  }
65
66
  }), t;
66
- }, L = d;
67
- function R(r) {
68
- let { basePath: i, entityManifest: o, entityRegistry: s, sidebar: u, auth: d, dashboard: p } = r, D = A(i), j = M(D, "login"), R = M(D, "login/reset"), z = M(D, "login/reset/complete"), B = M(D, "verify-email"), V = M(D, "accept-invitation"), H = N(D, "login"), U = t(o, u), W = n(U, u), G = e(U, u), K = /* @__PURE__ */ new Map();
69
- G.forEach((e, t) => {
70
- K.set(t, e.groupId);
67
+ }, R = f;
68
+ function z(i) {
69
+ let { basePath: a, entityManifest: s, entityRegistry: c, sidebar: d, auth: f, dashboard: m } = i, O = r(i.dashboards), M = j(a), z = N(M, "login"), B = N(M, "login/reset"), ee = N(M, "login/reset/complete"), V = N(M, "verify-email"), H = N(M, "accept-invitation"), U = P(M, "login"), W = t(s, d), te = n(W, d), ne = e(W, d), G = /* @__PURE__ */ new Map();
70
+ ne.forEach((e, t) => {
71
+ G.set(t, e.groupId);
71
72
  });
72
- let q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Y = u?.permissionsQuery, X = async ({ context: e }) => {
73
- let t = await d.session.load();
73
+ let K = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), J = d?.permissionsQuery, Y = async ({ context: e }) => {
74
+ let t = await f.session.load();
74
75
  return {
75
- permissionsQuery: Y == null ? null : f(e.relayEnvironment, Y, {}),
76
- authStatusQuery: t.authStatusQuery == null ? null : f(e.relayEnvironment, t.authStatusQuery, {}, { fetchPolicy: "network-only" })
76
+ permissionsQuery: J == null ? null : p(e.relayEnvironment, J, {}),
77
+ authStatusQuery: t.authStatusQuery == null ? null : p(e.relayEnvironment, t.authStatusQuery, {}, { fetchPolicy: "network-only" })
77
78
  };
78
- }, Z = L({
79
+ }, X = async () => m == null ? null : {
80
+ dashboardId: "dashboard",
81
+ config: await m.load()
82
+ }, Z = ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e }), re = R({
79
83
  path: "",
80
- resourcePage: b,
81
- prepare: async () => (p == null || await p.load(), null),
82
- render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ a(e, {})
83
- }), Q = L({
84
+ resourcePage: x,
85
+ prepare: X,
86
+ render: Z
87
+ }), ie = R({
84
88
  path: "dashboard",
85
- resourcePage: b,
86
- prepare: async () => (p == null || await p.load(), null),
87
- render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ a(e, {})
88
- }), ee = Object.values(o).filter((e) => e.kind === "list-detail"), te = W.map((e) => {
89
- let t = L({
90
- path: P(e.hub.href, D),
91
- resourcePage: x,
89
+ resourcePage: x,
90
+ prepare: X,
91
+ render: Z
92
+ }), Q = O.map((e) => R({
93
+ path: `dashboard/${e.id}`,
94
+ resourcePage: x,
95
+ prepare: async () => {
96
+ let t = await e.module.load();
97
+ return {
98
+ dashboardId: e.id,
99
+ config: t
100
+ };
101
+ },
102
+ render: Z
103
+ })), ae = Object.values(s).filter((e) => e.kind === "list-detail"), oe = te.map((e) => {
104
+ let t = R({
105
+ path: F(e.hub.href, M),
106
+ resourcePage: S,
92
107
  prepare: () => ({
93
108
  hubId: e.hub.id,
94
109
  hub: e.hub
95
110
  }),
96
- render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ a(t, { prepared: e })
111
+ render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e })
97
112
  });
98
- return e.groupId != null && J.set(t, e.groupId), t;
99
- }), ne = ee.map((e) => {
100
- let t = e.routes.list, n = P(t, D), r = [];
113
+ return e.groupId != null && q.set(t, e.groupId), t;
114
+ }), se = ae.map((e) => {
115
+ let t = e.routes.list, n = F(t, M), r = [];
101
116
  if (e.hasList) {
102
- let t = L({
117
+ let t = R({
103
118
  path: "",
104
- resourcePage: g,
119
+ resourcePage: _,
105
120
  prepareSearchBehavior: "path",
106
121
  prepare: async ({ context: t, query: n }) => {
107
- let { config: r } = await s.loadListEntity(e.id), { list: i, listUrlCodec: a, listDefaults: o } = r;
122
+ let { config: r } = await c.loadListEntity(e.id), { list: i, listUrlCodec: a, listDefaults: o } = r;
108
123
  if (a == null || o == null) throw Error(`Backoffice entity ${e.id} does not expose a list configuration.`);
109
- let l = I(n), u = a.parse(l), { pageSize: d } = c, p = {
124
+ let s = L(n), u = a.parse(s), { pageSize: d } = l, f = {
110
125
  where: u.where,
111
126
  sort: u.sort ?? o.sort,
112
127
  count: d,
113
128
  cursor: null
114
- }, m = i.buildQueryVariables(p), h = f(t.relayEnvironment, i.query, m);
129
+ }, m = i.buildQueryVariables(f), h = p(t.relayEnvironment, i.query, m);
115
130
  return {
116
131
  entityId: e.id,
117
132
  entityManifest: e,
@@ -122,20 +137,20 @@ function R(r) {
122
137
  render: ({ prepared: e, Component: t }) => {
123
138
  if (t == null) return null;
124
139
  let n = e;
125
- return /* @__PURE__ */ a(t, {
140
+ return /* @__PURE__ */ o(t, {
126
141
  entityManifest: n.entityManifest,
127
142
  config: n.entityConfig,
128
143
  prepared: n
129
144
  });
130
145
  }
131
146
  });
132
- q.set(t, e.id), r.push(t);
147
+ K.set(t, e.id), r.push(t);
133
148
  }
134
- let i = L({
149
+ let i = R({
135
150
  path: ":id",
136
- resourcePage: v,
151
+ resourcePage: y,
137
152
  prepare: async ({ context: t, variables: n }) => {
138
- let { config: r } = await s.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);
153
+ 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 = p(t.relayEnvironment, r.layoutPage.query, a.variables);
139
154
  return {
140
155
  entityId: e.id,
141
156
  entityManifest: e,
@@ -147,7 +162,7 @@ function R(r) {
147
162
  render: ({ children: e, prepared: t, Component: n }) => {
148
163
  if (n == null) return null;
149
164
  let r = t;
150
- return /* @__PURE__ */ a(n, {
165
+ return /* @__PURE__ */ o(n, {
151
166
  entityManifest: r.entityManifest,
152
167
  config: r.entityConfig,
153
168
  prepared: r,
@@ -155,9 +170,9 @@ function R(r) {
155
170
  });
156
171
  },
157
172
  children: [
158
- L({
173
+ R({
159
174
  path: "",
160
- resourcePage: m,
175
+ resourcePage: h,
161
176
  prepare: ({ variables: t }) => {
162
177
  let n = String(t.id ?? "").trim();
163
178
  return { redirectTo: n === "" ? null : e.routes.detailPage(n, e.defaultDetailPageId ?? "overview") };
@@ -165,14 +180,14 @@ function R(r) {
165
180
  render: ({ prepared: e }) => {
166
181
  let t = e.redirectTo ?? null;
167
182
  if (t == null) return null;
168
- throw new l(t);
183
+ throw new u(t);
169
184
  }
170
185
  }),
171
- ...(e.detailPages ?? []).map((t) => L({
186
+ ...(e.detailPages ?? []).map((t) => R({
172
187
  path: t.pathSegment,
173
- resourcePage: _,
188
+ resourcePage: v,
174
189
  prepare: async ({ context: n, variables: r }) => {
175
- let i = String(r.id ?? ""), a = await s.loadDetailPageEntity(e.id, t.id), o = a.config.page.buildVariables == null ? { variables: { id: i } } : a.config.page.buildVariables({ id: i }), c = f(n.relayEnvironment, a.config.page.query, o.variables);
190
+ 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 = p(n.relayEnvironment, a.config.page.query, o.variables);
176
191
  return {
177
192
  entityId: e.id,
178
193
  entityManifest: e,
@@ -180,7 +195,7 @@ function R(r) {
180
195
  detailId: o.detailId,
181
196
  id: i,
182
197
  pageConfig: a.config,
183
- pageQuery: c,
198
+ pageQuery: s,
184
199
  pageId: t.id,
185
200
  pagePath: t.pathSegment
186
201
  };
@@ -188,18 +203,18 @@ function R(r) {
188
203
  render: ({ prepared: e, Component: t }) => {
189
204
  if (t == null) return null;
190
205
  let n = e;
191
- return /* @__PURE__ */ a(t, {
206
+ return /* @__PURE__ */ o(t, {
192
207
  entityManifest: n.entityManifest,
193
208
  config: n.entityConfig,
194
209
  prepared: n
195
210
  });
196
211
  }
197
212
  })),
198
- L({
213
+ R({
199
214
  path: ":pagePath",
200
- resourcePage: y,
215
+ resourcePage: b,
201
216
  prepare: async ({ variables: t }) => {
202
- let n = await s.loadDetailLayoutEntity(e.id), r = String(t.id ?? ""), i = String(t.pagePath ?? "");
217
+ let n = await c.loadDetailLayoutEntity(e.id), r = String(t.id ?? ""), i = String(t.pagePath ?? "");
203
218
  return {
204
219
  entityManifest: e,
205
220
  entityConfig: n.config,
@@ -210,7 +225,7 @@ function R(r) {
210
225
  render: ({ prepared: e, Component: t }) => {
211
226
  if (t == null) return null;
212
227
  let n = e;
213
- return /* @__PURE__ */ a(t, {
228
+ return /* @__PURE__ */ o(t, {
214
229
  entityManifest: n.entityManifest,
215
230
  config: n.entityConfig,
216
231
  prepared: n
@@ -219,17 +234,17 @@ function R(r) {
219
234
  })
220
235
  ]
221
236
  });
222
- return q.set(i, e.id), r.push(i), L({
237
+ return K.set(i, e.id), r.push(i), R({
223
238
  path: n,
224
239
  children: r,
225
- resourcePage: m
240
+ resourcePage: h
226
241
  });
227
- }), re = Object.values(o).filter((e) => e.kind === "tool").map((e) => {
228
- let t = L({
229
- path: P(e.routes.list, D),
230
- resourcePage: r.toolsOperationPage ?? null,
242
+ }), ce = Object.values(s).filter((e) => e.kind === "tool").map((e) => {
243
+ let t = R({
244
+ path: F(e.routes.list, M),
245
+ resourcePage: i.toolsOperationPage ?? null,
231
246
  prepare: async () => {
232
- let t = await s.loadToolEntity(e.id);
247
+ let t = await c.loadToolEntity(e.id);
233
248
  return {
234
249
  entityId: e.id,
235
250
  entityManifest: e,
@@ -239,93 +254,95 @@ function R(r) {
239
254
  render: ({ prepared: e, Component: t }) => {
240
255
  if (t == null) return null;
241
256
  let n = e;
242
- return /* @__PURE__ */ a(t, {
257
+ return /* @__PURE__ */ o(t, {
243
258
  entityManifest: n.entityManifest,
244
259
  operation: n.entityConfig.tool.operation,
245
260
  toolId: n.entityConfig.id
246
261
  });
247
262
  }
248
263
  });
249
- return q.set(t, e.id), t;
250
- }), ie = L({
251
- path: D,
252
- resourcePage: h,
264
+ return K.set(t, e.id), t;
265
+ }), le = R({
266
+ path: M,
267
+ resourcePage: g,
253
268
  prepareSearchBehavior: "path",
254
- prepare: X,
269
+ prepare: Y,
255
270
  render: ({ children: e, prepared: t, route: n, Component: r }) => {
256
271
  if (r == null) return null;
257
- let i = t, o = F(n, q), s = o == null ? F(n, J) : K.get(o) ?? null, c = r, l = d.session.get()?.authStatusQuery ?? null;
258
- return l != null && i?.authStatusQuery != null ? /* @__PURE__ */ a(k, {
272
+ let i = t, a = I(n, K), s = a == null ? I(n, q) : G.get(a) ?? null, c = r, l = f.session.get()?.authStatusQuery ?? null;
273
+ return l != null && i?.authStatusQuery != null ? /* @__PURE__ */ o(A, {
259
274
  Component: c,
260
275
  preparedLayout: i,
261
- permissionsQuery: u?.permissionsQuery,
276
+ permissionsQuery: d?.permissionsQuery,
262
277
  activeGroupId: s,
263
278
  authStatusQuery: l,
264
279
  authStatusPrepared: i.authStatusQuery,
265
- loginRedirectPath: H,
280
+ loginRedirectPath: U,
266
281
  children: e
267
- }) : /* @__PURE__ */ a(O, {
282
+ }) : /* @__PURE__ */ o(k, {
268
283
  Component: c,
269
284
  preparedLayout: i,
270
- permissionsQuery: u?.permissionsQuery,
285
+ permissionsQuery: d?.permissionsQuery,
271
286
  activeGroupId: s,
272
287
  children: e
273
288
  });
274
289
  },
275
290
  children: [
276
- Z,
277
- ...te,
278
- ...ne,
279
- ...re,
280
- Q
291
+ re,
292
+ ...oe,
293
+ ...se,
294
+ ...ce,
295
+ ...Q,
296
+ ie
281
297
  ]
282
298
  }), $ = [
283
- L({
284
- path: j,
285
- resourcePage: S,
299
+ R({
300
+ path: z,
301
+ resourcePage: C,
286
302
  prepare: async ({ context: e }) => {
287
- let t = await d.login.load();
288
- return { query: f(e.relayEnvironment, t.loginQuery, {}) };
303
+ let t = await f.login.load();
304
+ return { query: p(e.relayEnvironment, t.loginQuery, {}) };
289
305
  },
290
- render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ a(t, { prepared: e })
291
- }),
292
- L({
293
- path: R,
294
- resourcePage: C,
295
- prepare: async () => (await d.passwordResetRequest.load(), null),
296
- render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ a(e, {})
306
+ render: ({ prepared: e, Component: t }) => t == null ? null : /* @__PURE__ */ o(t, { prepared: e })
297
307
  }),
298
- L({
299
- path: z,
308
+ R({
309
+ path: B,
300
310
  resourcePage: w,
301
- prepare: async () => (await d.passwordResetComplete.load(), null),
302
- render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ a(e, {})
311
+ prepare: async () => (await f.passwordResetRequest.load(), null),
312
+ render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
303
313
  }),
304
- L({
305
- path: B,
314
+ R({
315
+ path: ee,
306
316
  resourcePage: T,
307
- prepare: async () => (await d.verifyEmail.load(), null),
308
- render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ a(e, {})
317
+ prepare: async () => (await f.passwordResetComplete.load(), null),
318
+ render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
319
+ }),
320
+ R({
321
+ path: V,
322
+ resourcePage: E,
323
+ prepare: async () => (await f.verifyEmail.load(), null),
324
+ render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
309
325
  })
310
326
  ];
311
- return (d.hasAcceptInvitation === !0 || d.acceptInvitation != null) && $.push(L({
312
- path: V,
313
- resourcePage: E,
314
- prepare: async () => (await d.acceptInvitation?.load(), null),
315
- render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ a(e, {})
316
- })), $.push(ie), $;
327
+ return (f.hasAcceptInvitation === !0 || f.acceptInvitation != null) && $.push(R({
328
+ path: H,
329
+ resourcePage: D,
330
+ prepare: async () => (await f.acceptInvitation?.load(), null),
331
+ render: ({ Component: e }) => e == null ? null : /* @__PURE__ */ o(e, {})
332
+ })), $.push(le), $;
317
333
  }
318
- var z = {
319
- normalizeBaseSegment: A,
320
- normalizePath: j,
321
- buildScopedPath: M,
322
- buildScopedAbsolutePath: N,
323
- buildRelativePath: P,
324
- resolveActiveEntityIdFromRoute: F,
325
- toSearchParams: I,
326
- BackofficeLayoutRouteWithAuthStatus: k
334
+ var B = {
335
+ normalizeBaseSegment: j,
336
+ normalizePath: M,
337
+ buildScopedPath: N,
338
+ buildScopedAbsolutePath: P,
339
+ buildRelativePath: F,
340
+ resolveActiveEntityIdFromRoute: I,
341
+ toSearchParams: L,
342
+ validateBackofficeDashboardRegistrations: r,
343
+ BackofficeLayoutRouteWithAuthStatus: A
327
344
  };
328
345
  //#endregion
329
- export { E as BackofficeAcceptInvitationPageResource, b as BackofficeDashboardPageResource, v as BackofficeEntityDetailLayoutPageResource, _ as BackofficeEntityDetailPageResource, y as BackofficeEntityDetailUnknownPageRedirectResource, g as BackofficeEntityListPageResource, x as BackofficeHubPageResource, h as BackofficeLayoutPageResource, S as BackofficeLoginPageResource, w as BackofficePasswordResetCompletePageResource, C as BackofficePasswordResetRequestPageResource, T as BackofficeVerifyEmailPageResource, m as WrapperPageResource, z as __test, R as createBackofficeRoutes, R as default };
346
+ export { D as BackofficeAcceptInvitationPageResource, x as BackofficeDashboardPageResource, y as BackofficeEntityDetailLayoutPageResource, v as BackofficeEntityDetailPageResource, b as BackofficeEntityDetailUnknownPageRedirectResource, _ as BackofficeEntityListPageResource, S as BackofficeHubPageResource, g as BackofficeLayoutPageResource, C as BackofficeLoginPageResource, T as BackofficePasswordResetCompletePageResource, w as BackofficePasswordResetRequestPageResource, E as BackofficeVerifyEmailPageResource, h as WrapperPageResource, B as __test, z as createBackofficeRoutes, z as default };
330
347
 
331
348
  //# sourceMappingURL=createBackofficeRoutes.js.map