@plumile/backoffice-react 0.1.151 → 0.1.152
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/detail/backofficeDetailRelationLink.css.js +0 -1
- package/lib/esm/components/backoffice/filters/backofficeFilterAction.css.js +1 -0
- package/lib/esm/pages/BackofficeDashboardPage.js +73 -244
- package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
- package/lib/esm/pages/BackofficeDashboardWidgetContent.js +193 -0
- package/lib/esm/pages/BackofficeDashboardWidgetContent.js.map +1 -0
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +8 -10
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +130 -133
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailUnknownPageRedirect.js +10 -9
- package/lib/esm/pages/BackofficeEntityDetailUnknownPageRedirect.js.map +1 -1
- package/lib/esm/pages/BackofficeRedirect.js +13 -0
- package/lib/esm/pages/BackofficeRedirect.js.map +1 -0
- package/lib/esm/router/createBackofficeRoutes.js +100 -97
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/types/pages/BackofficeDashboardPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardWidgetContent.d.ts +9 -0
- package/lib/types/pages/BackofficeDashboardWidgetContent.d.ts.map +1 -0
- package/lib/types/pages/BackofficeEntityDetailLayoutPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailUnknownPageRedirect.d.ts.map +1 -1
- package/lib/types/pages/BackofficeRedirect.d.ts +7 -0
- package/lib/types/pages/BackofficeRedirect.d.ts.map +1 -0
- package/lib/types/router/createBackofficeRoutes.d.ts +3 -1
- package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -11,28 +11,29 @@ import { BackofficeLifecycleTimelineSection as u } from "../components/backoffic
|
|
|
11
11
|
import { BackofficeRelationsSummaryGrid as d } from "../components/backoffice/detail/BackofficeRelationsSummaryGrid.js";
|
|
12
12
|
import { BackofficeRightPageLayout as ee } from "../components/backoffice/layout/breadcrumb/BackofficeRightPageLayout.js";
|
|
13
13
|
import { buildEntityDetailBreadcrumb as te } from "../components/backoffice/layout/breadcrumb/buildBreadcrumbs.js";
|
|
14
|
-
import { BackofficeEntityDetailScaffold as
|
|
15
|
-
import { useBackofficeFormats as
|
|
16
|
-
import { useRelayEnvironment as
|
|
17
|
-
import { resolveVisibleDetailPages as
|
|
18
|
-
import { useBackofficeEntityDetailLayoutContext as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import D from "@plumile/
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import A from "@plumile/
|
|
33
|
-
import
|
|
14
|
+
import { BackofficeEntityDetailScaffold as ne } from "../components/backoffice/scaffolds/BackofficeEntityDetailScaffold.js";
|
|
15
|
+
import { useBackofficeFormats as f } from "../i18n/useBackofficeFormats.js";
|
|
16
|
+
import { useRelayEnvironment as re } from "../relay/useRelayEnvironment.js";
|
|
17
|
+
import { resolveVisibleDetailPages as p } from "./detail/pageResolution.js";
|
|
18
|
+
import { useBackofficeEntityDetailLayoutContext as m } from "./detail/BackofficeEntityDetailLayoutContext.js";
|
|
19
|
+
import { BackofficeRedirect as h } from "./BackofficeRedirect.js";
|
|
20
|
+
import { extractMutationPayload as ie, isFormMutationAction as g, isMutationAction as ae, isRouteAction as oe, resolveLabel as _ } from "./BackofficeEntityDetailPage.helpers.js";
|
|
21
|
+
import { headerActions as se, headerBlock as ce, headerMeta as le, headerMetaList as ue } from "./backofficeEntityDetailPage.css.js";
|
|
22
|
+
import { buildTabsItems as de } from "./detail/buildTabsItems.js";
|
|
23
|
+
import { buildFieldItems as fe, renderBlocks as pe, resolveHeaderItems as me } from "./BackofficeEntityDetailPage.view-helpers.js";
|
|
24
|
+
import { useContext as v, useMemo as y, useState as b } from "react";
|
|
25
|
+
import { Fragment as he, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
26
|
+
import { useTranslation as C } from "react-i18next";
|
|
27
|
+
import { Button as w } from "@plumile/ui/atomic/atoms/button/Button.js";
|
|
28
|
+
import { commitMutation as ge, useFragment as T, usePreloadedQuery as E } from "react-relay";
|
|
29
|
+
import { useToast as D } from "@plumile/ui/atomic/molecules/toast/ToastProvider.js";
|
|
30
|
+
import O from "@plumile/router/routing/RoutingContext.js";
|
|
31
|
+
import { FormattedDate as k } from "@plumile/ui/atomic/atoms/formatted-date/FormattedDate.js";
|
|
32
|
+
import { BACKOFFICE_DATE_TIME_OPTIONS as A } from "@plumile/backoffice-core/constants.js";
|
|
33
|
+
import j from "@plumile/router/routing/Link.js";
|
|
34
|
+
import { Tag as M } from "@plumile/ui/backoffice/atoms/tag/Tag.js";
|
|
34
35
|
import { buildBackofficeFallbackListHref as _e, buildBackofficeListHref as ve, buildBackofficeListLink as ye } from "@plumile/backoffice-core/state/buildListHref.js";
|
|
35
|
-
import { BackofficeDetailSection as
|
|
36
|
+
import { BackofficeDetailSection as N } from "@plumile/ui/backoffice/molecules/backoffice_detail_section/BackofficeDetailSection.js";
|
|
36
37
|
import { BackofficePayloadViewer as be } from "@plumile/ui/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.js";
|
|
37
38
|
import { setWhereValue as xe } from "@plumile/backoffice-core/filters/where.js";
|
|
38
39
|
import { BackofficePageHeader as Se } from "@plumile/ui/backoffice/molecules/backoffice_page_header/BackofficePageHeader.js";
|
|
@@ -41,7 +42,6 @@ import { MetricCard as we } from "@plumile/ui/components/dashboard/metric_card/M
|
|
|
41
42
|
import { MetricTileGroup as Te } from "@plumile/ui/components/dashboard/metric_tile_group/MetricTileGroup.js";
|
|
42
43
|
import { Tabs as Ee } from "@plumile/ui/atomic/molecules/tabs/Tabs.js";
|
|
43
44
|
import { DetailPageTemplate as De } from "@plumile/ui/backoffice/templates/detail_page_template/DetailPageTemplate.js";
|
|
44
|
-
import N from "@plumile/router/errors/HttpRedirect.js";
|
|
45
45
|
import { DataTable as Oe } from "@plumile/ui/components/data-table/DataTable.js";
|
|
46
46
|
import { LinkButton as ke } from "@plumile/ui/atomic/atoms/button/LinkButton.js";
|
|
47
47
|
import { BackofficeKeyValueList as P } from "@plumile/ui/backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js";
|
|
@@ -64,72 +64,72 @@ import { XBadgeSvg as q } from "@plumile/ui/icons/XBadgeSvg.js";
|
|
|
64
64
|
//#region src/pages/BackofficeEntityDetailPage.tsx
|
|
65
65
|
var Ne = (e) => {
|
|
66
66
|
switch (e) {
|
|
67
|
-
case "shield-lock": return /* @__PURE__ */
|
|
67
|
+
case "shield-lock": return /* @__PURE__ */ x(K, {
|
|
68
68
|
width: 14,
|
|
69
69
|
height: 14,
|
|
70
70
|
"aria-hidden": "true"
|
|
71
71
|
});
|
|
72
|
-
case "shield-off": return /* @__PURE__ */
|
|
72
|
+
case "shield-off": return /* @__PURE__ */ x(Me, {
|
|
73
73
|
width: 14,
|
|
74
74
|
height: 14,
|
|
75
75
|
"aria-hidden": "true"
|
|
76
76
|
});
|
|
77
|
-
case "settings-check": return /* @__PURE__ */
|
|
77
|
+
case "settings-check": return /* @__PURE__ */ x(W, {
|
|
78
78
|
width: 14,
|
|
79
79
|
height: 14,
|
|
80
80
|
"aria-hidden": "true"
|
|
81
81
|
});
|
|
82
|
-
case "settings-x": return /* @__PURE__ */
|
|
82
|
+
case "settings-x": return /* @__PURE__ */ x(G, {
|
|
83
83
|
width: 14,
|
|
84
84
|
height: 14,
|
|
85
85
|
"aria-hidden": "true"
|
|
86
86
|
});
|
|
87
|
-
case "x-badge": return /* @__PURE__ */
|
|
87
|
+
case "x-badge": return /* @__PURE__ */ x(q, {
|
|
88
88
|
width: 14,
|
|
89
89
|
height: 14,
|
|
90
90
|
"aria-hidden": "true"
|
|
91
91
|
});
|
|
92
|
-
case "chat-check": return /* @__PURE__ */
|
|
92
|
+
case "chat-check": return /* @__PURE__ */ x(F, {
|
|
93
93
|
width: 14,
|
|
94
94
|
height: 14,
|
|
95
95
|
"aria-hidden": "true"
|
|
96
96
|
});
|
|
97
|
-
case "key": return /* @__PURE__ */
|
|
97
|
+
case "key": return /* @__PURE__ */ x(L, {
|
|
98
98
|
width: 14,
|
|
99
99
|
height: 14,
|
|
100
100
|
"aria-hidden": "true"
|
|
101
101
|
});
|
|
102
|
-
case "key-off": return /* @__PURE__ */
|
|
102
|
+
case "key-off": return /* @__PURE__ */ x(I, {
|
|
103
103
|
width: 14,
|
|
104
104
|
height: 14,
|
|
105
105
|
"aria-hidden": "true"
|
|
106
106
|
});
|
|
107
|
-
case "lock": return /* @__PURE__ */
|
|
107
|
+
case "lock": return /* @__PURE__ */ x(z, {
|
|
108
108
|
width: 14,
|
|
109
109
|
height: 14,
|
|
110
110
|
"aria-hidden": "true"
|
|
111
111
|
});
|
|
112
|
-
case "lock-open": return /* @__PURE__ */
|
|
112
|
+
case "lock-open": return /* @__PURE__ */ x(R, {
|
|
113
113
|
width: 14,
|
|
114
114
|
height: 14,
|
|
115
115
|
"aria-hidden": "true"
|
|
116
116
|
});
|
|
117
|
-
case "robot-check": return /* @__PURE__ */
|
|
117
|
+
case "robot-check": return /* @__PURE__ */ x(B, {
|
|
118
118
|
width: 14,
|
|
119
119
|
height: 14,
|
|
120
120
|
"aria-hidden": "true"
|
|
121
121
|
});
|
|
122
|
-
case "robot-x": return /* @__PURE__ */
|
|
122
|
+
case "robot-x": return /* @__PURE__ */ x(V, {
|
|
123
123
|
width: 14,
|
|
124
124
|
height: 14,
|
|
125
125
|
"aria-hidden": "true"
|
|
126
126
|
});
|
|
127
|
-
case "rocket": return /* @__PURE__ */
|
|
127
|
+
case "rocket": return /* @__PURE__ */ x(U, {
|
|
128
128
|
width: 14,
|
|
129
129
|
height: 14,
|
|
130
130
|
"aria-hidden": "true"
|
|
131
131
|
});
|
|
132
|
-
case "rocket-off": return /* @__PURE__ */
|
|
132
|
+
case "rocket-off": return /* @__PURE__ */ x(H, {
|
|
133
133
|
width: 14,
|
|
134
134
|
height: 14,
|
|
135
135
|
"aria-hidden": "true"
|
|
@@ -141,7 +141,7 @@ var Ne = (e) => {
|
|
|
141
141
|
let t = e.fields?.map((e) => e.presentation?.group) ?? [];
|
|
142
142
|
return t.length > 0 && t.every((e) => e === "scope" || e === "status") || e.placement === "side" || e.placement === "secondary" ? "secondary" : "primary";
|
|
143
143
|
}, Fe = ({ config: F, prepared: I }) => {
|
|
144
|
-
let { t: L } =
|
|
144
|
+
let { t: L } = C(), { t: R } = e(), { formatNumber: z, formatCurrency: B, formatCurrencyTitle: V, formatPercent: H } = f(), { entities: U, entityRegistry: W } = n(), { layoutView: G } = m(), K = v(O), Me = re(), q = D(), [Fe, J] = b({}), [Ie, Le] = b(null), Y = p({
|
|
145
145
|
mainPage: F.pages.mainPage,
|
|
146
146
|
subPages: F.pages.subPages,
|
|
147
147
|
activePagePath: I.pagePath,
|
|
@@ -151,26 +151,25 @@ var Ne = (e) => {
|
|
|
151
151
|
...n,
|
|
152
152
|
[e]: t
|
|
153
153
|
});
|
|
154
|
-
}, { page: Q } = F, ze =
|
|
154
|
+
}, { page: Q } = F, ze = E(Q.query, I.pageQuery), $ = Q.resolveNode(ze, {
|
|
155
155
|
id: I.id,
|
|
156
156
|
detailId: I.detailId
|
|
157
|
-
}), Be = $ != null, Ve =
|
|
157
|
+
}), Be = $ != null, Ve = T(Q.fragment, $), He = y(() => Object.fromEntries(Q.content.flatMap((e) => e.kind === "fieldSet" ? e.fields.flatMap((e) => e.type === "relation" ? [e.relation.target] : []) : []).flatMap((e) => {
|
|
158
158
|
let t = U[e];
|
|
159
159
|
return t?.hasList === !0 ? [[e, t.routes.list]] : [];
|
|
160
160
|
})), [U, Q.content]);
|
|
161
|
-
|
|
162
|
-
return /* @__PURE__ */ S(f, {
|
|
161
|
+
return Be ? /* @__PURE__ */ x(ne, {
|
|
163
162
|
node: Ve,
|
|
164
163
|
render: (e) => {
|
|
165
|
-
let n = Q.toView(e),
|
|
164
|
+
let n = Q.toView(e), ne = de({
|
|
166
165
|
pages: Re,
|
|
167
166
|
id: I.id,
|
|
168
167
|
tApp: L,
|
|
169
168
|
detailPageHref: F.routes.detailPage
|
|
170
|
-
}),
|
|
169
|
+
}), f = (e, t) => {
|
|
171
170
|
let n = U[e];
|
|
172
171
|
return n == null ? null : n.routes.detail(t);
|
|
173
|
-
},
|
|
172
|
+
}, re = ({ id: e, label: t, count: n, relation: r, listRoute: i, value: a, where: o }) => {
|
|
174
173
|
let { target: s, filterId: c, whereKey: l, path: u } = r, d = W.getLoadedListEntity(s);
|
|
175
174
|
return {
|
|
176
175
|
id: e,
|
|
@@ -191,44 +190,44 @@ var Ne = (e) => {
|
|
|
191
190
|
});
|
|
192
191
|
}
|
|
193
192
|
};
|
|
194
|
-
},
|
|
193
|
+
}, p = me(F.header, G, {
|
|
195
194
|
tApp: L,
|
|
196
195
|
t: R,
|
|
197
|
-
resolveEntityHref:
|
|
198
|
-
renderLink: (e, t) => /* @__PURE__ */
|
|
196
|
+
resolveEntityHref: f,
|
|
197
|
+
renderLink: (e, t) => /* @__PURE__ */ x(j, {
|
|
199
198
|
to: e,
|
|
200
199
|
children: t
|
|
201
200
|
}),
|
|
202
|
-
renderDate: (e, t) => /* @__PURE__ */
|
|
201
|
+
renderDate: (e, t) => /* @__PURE__ */ x(k, {
|
|
203
202
|
value: e,
|
|
204
|
-
options:
|
|
203
|
+
options: A,
|
|
205
204
|
fallback: t
|
|
206
205
|
}),
|
|
207
|
-
renderTag: (e, t) => /* @__PURE__ */
|
|
206
|
+
renderTag: (e, t) => /* @__PURE__ */ x(M, {
|
|
208
207
|
tone: e,
|
|
209
208
|
children: t
|
|
210
209
|
}),
|
|
211
|
-
renderBadgeRow: (e) => /* @__PURE__ */
|
|
212
|
-
}),
|
|
210
|
+
renderBadgeRow: (e) => /* @__PURE__ */ x(s, { items: e })
|
|
211
|
+
}), m = te({
|
|
213
212
|
config: F,
|
|
214
213
|
tApp: L,
|
|
215
214
|
entityId: I.id,
|
|
216
215
|
layoutView: G,
|
|
217
216
|
pageLabel: X.label(L),
|
|
218
217
|
pageId: X.id
|
|
219
|
-
}),
|
|
220
|
-
if (
|
|
221
|
-
let e =
|
|
222
|
-
e.length > 0 && (
|
|
223
|
-
let a =
|
|
224
|
-
return
|
|
218
|
+
}), h = Q.actions ?? [], v = [];
|
|
219
|
+
if (h.length > 0) {
|
|
220
|
+
let e = h.filter((e) => e.isVisible == null ? !0 : e.isVisible(n));
|
|
221
|
+
e.length > 0 && (v = e.map((e) => {
|
|
222
|
+
let a = _(e.label, L), o = e.ariaLabel == null ? a : _(e.ariaLabel, L), s = e.variant ?? "secondary", c = e.size ?? "small", l = Fe[e.id] ?? !1, u = l || e.isDisabled?.(n) === !0;
|
|
223
|
+
return oe(e) ? /* @__PURE__ */ x(ke, {
|
|
225
224
|
to: e.to(n),
|
|
226
225
|
variant: s,
|
|
227
226
|
size: c,
|
|
228
227
|
isDisabled: u,
|
|
229
228
|
"aria-label": o,
|
|
230
229
|
children: a
|
|
231
|
-
}, e.id) :
|
|
230
|
+
}, e.id) : g(e) ? /* @__PURE__ */ x(w, {
|
|
232
231
|
type: "button",
|
|
233
232
|
variant: s,
|
|
234
233
|
size: c,
|
|
@@ -239,7 +238,7 @@ var Ne = (e) => {
|
|
|
239
238
|
},
|
|
240
239
|
"aria-label": o,
|
|
241
240
|
children: a
|
|
242
|
-
}, e.id) :
|
|
241
|
+
}, e.id) : ae(e) ? /* @__PURE__ */ x(w, {
|
|
243
242
|
type: "button",
|
|
244
243
|
variant: s,
|
|
245
244
|
size: c,
|
|
@@ -256,15 +255,15 @@ var Ne = (e) => {
|
|
|
256
255
|
},
|
|
257
256
|
onCompleted: (a) => {
|
|
258
257
|
Z(e.id, !1);
|
|
259
|
-
let o =
|
|
258
|
+
let o = ie(a);
|
|
260
259
|
if (o != null) {
|
|
261
260
|
let i = R("actions.form.errors.invalidPayload");
|
|
262
|
-
e.toasts?.error?.message == null ? e.toasts?.error?.title != null && (i =
|
|
261
|
+
e.toasts?.error?.message == null ? e.toasts?.error?.title != null && (i = _(e.toasts.error.title, L)) : i = _(e.toasts.error.message, L);
|
|
263
262
|
let a = t(o, {
|
|
264
263
|
defaultErrorMessage: i,
|
|
265
264
|
mapReason: (t) => {
|
|
266
265
|
let r = e.mapErrorReason?.(t, n);
|
|
267
|
-
return r == null ? null : typeof r == "function" ?
|
|
266
|
+
return r == null ? null : typeof r == "function" ? _(r, L) : String(r);
|
|
268
267
|
}
|
|
269
268
|
});
|
|
270
269
|
if (!a.ok) {
|
|
@@ -309,50 +308,50 @@ var Ne = (e) => {
|
|
|
309
308
|
}, e.id) : null;
|
|
310
309
|
}));
|
|
311
310
|
}
|
|
312
|
-
let
|
|
313
|
-
|
|
314
|
-
let r = Pe(e) === "secondary" ? T :
|
|
311
|
+
let y = h.find((e) => e.id === Ie), { content: b } = Q, C = [], T = [], E = [];
|
|
312
|
+
b.forEach((e, t) => {
|
|
313
|
+
let r = Pe(e) === "secondary" ? T : C;
|
|
315
314
|
if (e.kind === "fieldSet") {
|
|
316
|
-
let i =
|
|
315
|
+
let i = _(e.title, L), a = e.description == null ? void 0 : _(e.description, L), { items: o, relationItems: u, customNodes: d } = fe(e.fields, n, {
|
|
317
316
|
tApp: L,
|
|
318
317
|
t: R,
|
|
319
|
-
resolveEntityHref:
|
|
318
|
+
resolveEntityHref: f,
|
|
320
319
|
formatNumber: z,
|
|
321
320
|
formatCurrency: B,
|
|
322
321
|
formatCurrencyTitle: V,
|
|
323
322
|
formatPercent: H,
|
|
324
323
|
relationEntityListRoutes: He,
|
|
325
|
-
resolveRelationItem:
|
|
324
|
+
resolveRelationItem: re,
|
|
326
325
|
setWhereValue: xe,
|
|
327
|
-
renderTag: (e, t) => /* @__PURE__ */
|
|
326
|
+
renderTag: (e, t) => /* @__PURE__ */ x(M, {
|
|
328
327
|
tone: e,
|
|
329
328
|
children: t
|
|
330
329
|
}),
|
|
331
|
-
renderBadgeRow: (e) => /* @__PURE__ */
|
|
332
|
-
renderDate: (e, t) => /* @__PURE__ */
|
|
330
|
+
renderBadgeRow: (e) => /* @__PURE__ */ x(s, { items: e }),
|
|
331
|
+
renderDate: (e, t) => /* @__PURE__ */ x(k, {
|
|
333
332
|
value: e,
|
|
334
|
-
options:
|
|
333
|
+
options: A,
|
|
335
334
|
fallback: t
|
|
336
335
|
}),
|
|
337
|
-
renderFlagTag: (e) => /* @__PURE__ */
|
|
336
|
+
renderFlagTag: (e) => /* @__PURE__ */ x(c, {
|
|
338
337
|
tone: e.tone,
|
|
339
338
|
icon: e.iconName == null ? void 0 : Ne(e.iconName),
|
|
340
339
|
label: e.label
|
|
341
340
|
}),
|
|
342
|
-
renderLink: (e, t) => /* @__PURE__ */
|
|
341
|
+
renderLink: (e, t) => /* @__PURE__ */ x(j, {
|
|
343
342
|
to: e,
|
|
344
343
|
children: t
|
|
345
344
|
}),
|
|
346
|
-
renderTaggedValue: (e, t) => /* @__PURE__ */
|
|
345
|
+
renderTaggedValue: (e, t) => /* @__PURE__ */ x(l, {
|
|
347
346
|
tag: e,
|
|
348
347
|
value: t
|
|
349
348
|
}),
|
|
350
|
-
wrapCustomNode: (e, t) => /* @__PURE__ */
|
|
349
|
+
wrapCustomNode: (e, t) => /* @__PURE__ */ x("div", { children: t }, e)
|
|
351
350
|
});
|
|
352
351
|
if (u.forEach((e) => {
|
|
353
352
|
E.some((t) => t.id === e.id) || E.push(e);
|
|
354
353
|
}), !(o.length > 0 || d.length > 0)) return;
|
|
355
|
-
r.push(/* @__PURE__ */
|
|
354
|
+
r.push(/* @__PURE__ */ x(N, {
|
|
356
355
|
title: i,
|
|
357
356
|
description: a,
|
|
358
357
|
items: o.length > 0 ? o : void 0,
|
|
@@ -360,31 +359,31 @@ var Ne = (e) => {
|
|
|
360
359
|
}, `${i}-${t}`));
|
|
361
360
|
return;
|
|
362
361
|
}
|
|
363
|
-
let i =
|
|
362
|
+
let i = pe([e], n, {
|
|
364
363
|
tApp: L,
|
|
365
364
|
t: R,
|
|
366
|
-
resolveEntityHref:
|
|
365
|
+
resolveEntityHref: f,
|
|
367
366
|
keyPrefix: String(t),
|
|
368
|
-
renderLink: (e, t) => /* @__PURE__ */
|
|
367
|
+
renderLink: (e, t) => /* @__PURE__ */ x(j, {
|
|
369
368
|
to: e,
|
|
370
369
|
children: t
|
|
371
370
|
}),
|
|
372
|
-
renderDate: (e, t) => /* @__PURE__ */
|
|
371
|
+
renderDate: (e, t) => /* @__PURE__ */ x(k, {
|
|
373
372
|
value: e,
|
|
374
|
-
options:
|
|
373
|
+
options: A,
|
|
375
374
|
fallback: t
|
|
376
375
|
}),
|
|
377
|
-
renderTag: (e, t) => /* @__PURE__ */
|
|
376
|
+
renderTag: (e, t) => /* @__PURE__ */ x(M, {
|
|
378
377
|
tone: e,
|
|
379
378
|
children: t
|
|
380
379
|
}),
|
|
381
|
-
renderMetricGroup: ({ key: e, title: t, description: n, density: r, items: i }) => /* @__PURE__ */
|
|
380
|
+
renderMetricGroup: ({ key: e, title: t, description: n, density: r, items: i }) => /* @__PURE__ */ x(N, {
|
|
382
381
|
title: t,
|
|
383
382
|
description: n,
|
|
384
|
-
children: i.length > 0 && /* @__PURE__ */
|
|
383
|
+
children: i.length > 0 && /* @__PURE__ */ x(Te, {
|
|
385
384
|
density: r ?? "comfortable",
|
|
386
385
|
minColumn: "180",
|
|
387
|
-
children: i.map((e) => /* @__PURE__ */
|
|
386
|
+
children: i.map((e) => /* @__PURE__ */ x(we, {
|
|
388
387
|
label: e.label,
|
|
389
388
|
value: e.value,
|
|
390
389
|
hint: e.hint,
|
|
@@ -396,37 +395,37 @@ var Ne = (e) => {
|
|
|
396
395
|
}, e.id))
|
|
397
396
|
})
|
|
398
397
|
}, e),
|
|
399
|
-
renderTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */
|
|
398
|
+
renderTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */ x(u, {
|
|
400
399
|
title: t,
|
|
401
400
|
description: n,
|
|
402
401
|
events: r
|
|
403
402
|
}, e),
|
|
404
|
-
renderAuditTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */
|
|
403
|
+
renderAuditTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */ x(N, {
|
|
405
404
|
title: t,
|
|
406
405
|
description: n,
|
|
407
|
-
children: /* @__PURE__ */
|
|
406
|
+
children: /* @__PURE__ */ x(Ce, { events: r })
|
|
408
407
|
}, e),
|
|
409
|
-
renderRelations: ({ key: e, title: t, items: n }) => /* @__PURE__ */
|
|
408
|
+
renderRelations: ({ key: e, title: t, items: n }) => /* @__PURE__ */ x(d, {
|
|
410
409
|
title: t,
|
|
411
410
|
items: n
|
|
412
411
|
}, e),
|
|
413
|
-
renderContextStack: ({ key: e, title: t, items: n }) => /* @__PURE__ */
|
|
412
|
+
renderContextStack: ({ key: e, title: t, items: n }) => /* @__PURE__ */ x(je, {
|
|
414
413
|
title: t,
|
|
415
414
|
items: n
|
|
416
415
|
}, e),
|
|
417
|
-
renderCustomSection: (e, t, n) => /* @__PURE__ */
|
|
416
|
+
renderCustomSection: (e, t, n) => /* @__PURE__ */ x(N, {
|
|
418
417
|
title: t,
|
|
419
418
|
children: n
|
|
420
419
|
}, e),
|
|
421
|
-
wrapCustomNode: (e, t) => /* @__PURE__ */
|
|
420
|
+
wrapCustomNode: (e, t) => /* @__PURE__ */ x("div", { children: t }, e),
|
|
422
421
|
resolveTableColumns: (e) => o(e, {
|
|
423
422
|
tApp: L,
|
|
424
423
|
t: R
|
|
425
424
|
}),
|
|
426
|
-
renderTable: ({ key: e, title: t, description: n, columns: r, rows: i }) => /* @__PURE__ */
|
|
425
|
+
renderTable: ({ key: e, title: t, description: n, columns: r, rows: i }) => /* @__PURE__ */ x(N, {
|
|
427
426
|
title: t,
|
|
428
427
|
description: n,
|
|
429
|
-
children: /* @__PURE__ */
|
|
428
|
+
children: /* @__PURE__ */ x(Oe, {
|
|
430
429
|
columns: r,
|
|
431
430
|
rows: i,
|
|
432
431
|
getRowId: (e, t) => {
|
|
@@ -438,66 +437,66 @@ var Ne = (e) => {
|
|
|
438
437
|
}
|
|
439
438
|
})
|
|
440
439
|
}, e),
|
|
441
|
-
renderPayload: ({ key: e, title: t, description: n, content: r, format: i }) => /* @__PURE__ */
|
|
440
|
+
renderPayload: ({ key: e, title: t, description: n, content: r, format: i }) => /* @__PURE__ */ x(N, {
|
|
442
441
|
title: t,
|
|
443
442
|
description: n,
|
|
444
|
-
children: /* @__PURE__ */
|
|
443
|
+
children: /* @__PURE__ */ x(be, {
|
|
445
444
|
content: r,
|
|
446
445
|
format: i,
|
|
447
446
|
emptyState: R("common.notAvailable")
|
|
448
447
|
})
|
|
449
448
|
}, e),
|
|
450
|
-
renderKeyValueListSection: ({ key: e, title: t, description: n, items: r }) => /* @__PURE__ */
|
|
449
|
+
renderKeyValueListSection: ({ key: e, title: t, description: n, items: r }) => /* @__PURE__ */ x(N, {
|
|
451
450
|
title: t,
|
|
452
451
|
description: n,
|
|
453
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ x(P, { items: r })
|
|
454
453
|
}, e)
|
|
455
454
|
})[0];
|
|
456
455
|
i != null && r.push(i);
|
|
457
456
|
});
|
|
458
|
-
let D = E.length > 0 ? /* @__PURE__ */
|
|
457
|
+
let D = E.length > 0 ? /* @__PURE__ */ x(Ae, {
|
|
459
458
|
label: R("relations.menu.label"),
|
|
460
459
|
items: E
|
|
461
|
-
}) : null,
|
|
462
|
-
className:
|
|
463
|
-
children: [
|
|
460
|
+
}) : null, O = v.length > 0 || D != null ? /* @__PURE__ */ S("div", {
|
|
461
|
+
className: se,
|
|
462
|
+
children: [v.length > 0 && /* @__PURE__ */ x("div", {
|
|
464
463
|
className: "txvbqbfpn txvbqbey txvbqblsh txvbqbhdl txvbqbh7g",
|
|
465
|
-
children:
|
|
466
|
-
}), D != null && /* @__PURE__ */
|
|
464
|
+
children: v
|
|
465
|
+
}), D != null && /* @__PURE__ */ x("div", {
|
|
467
466
|
className: "txvbqbfpn txvbqbey txvbqb10mr txvbqbb49 txvbqbbkc txvbqb2sj txvbqb7tt",
|
|
468
467
|
children: D
|
|
469
468
|
})]
|
|
470
|
-
}) : void 0, J =
|
|
471
|
-
className:
|
|
472
|
-
children: [
|
|
473
|
-
}) : void 0, Y =
|
|
474
|
-
className:
|
|
475
|
-
children: /* @__PURE__ */
|
|
469
|
+
}) : void 0, J = p.status != null || p.badges != null ? /* @__PURE__ */ S("div", {
|
|
470
|
+
className: le,
|
|
471
|
+
children: [p.status, p.badges]
|
|
472
|
+
}) : void 0, Y = p.items != null && p.items.length > 0 ? /* @__PURE__ */ x("div", {
|
|
473
|
+
className: ue,
|
|
474
|
+
children: /* @__PURE__ */ x(P, { items: p.items })
|
|
476
475
|
}) : null, ze = T.length > 0, $ = null;
|
|
477
|
-
return Re.length > 1 && ($ = /* @__PURE__ */
|
|
478
|
-
items:
|
|
476
|
+
return Re.length > 1 && ($ = /* @__PURE__ */ x(Ee, {
|
|
477
|
+
items: ne,
|
|
479
478
|
activeId: X.id,
|
|
480
479
|
variant: "underline"
|
|
481
|
-
})), /* @__PURE__ */
|
|
482
|
-
breadcrumb:
|
|
483
|
-
children: [/* @__PURE__ */
|
|
484
|
-
headerNode: /* @__PURE__ */
|
|
485
|
-
className:
|
|
486
|
-
children: [/* @__PURE__ */
|
|
487
|
-
title:
|
|
488
|
-
subtitle:
|
|
489
|
-
actions:
|
|
480
|
+
})), /* @__PURE__ */ S(ee, {
|
|
481
|
+
breadcrumb: m,
|
|
482
|
+
children: [/* @__PURE__ */ x(De, {
|
|
483
|
+
headerNode: /* @__PURE__ */ S("div", {
|
|
484
|
+
className: ce,
|
|
485
|
+
children: [/* @__PURE__ */ x(Se, {
|
|
486
|
+
title: p.title,
|
|
487
|
+
subtitle: p.subtitle,
|
|
488
|
+
actions: O,
|
|
490
489
|
meta: J
|
|
491
490
|
}), Y]
|
|
492
491
|
}),
|
|
493
492
|
tabsNode: $,
|
|
494
|
-
sidePanel: ze ? /* @__PURE__ */
|
|
493
|
+
sidePanel: ze ? /* @__PURE__ */ x(he, { children: T }) : void 0,
|
|
495
494
|
sidePanelVariant: "plain",
|
|
496
495
|
headerDensity: "compact",
|
|
497
|
-
children: /* @__PURE__ */
|
|
498
|
-
}),
|
|
496
|
+
children: /* @__PURE__ */ x(he, { children: C })
|
|
497
|
+
}), y != null && g(y) && /* @__PURE__ */ x(a, {
|
|
499
498
|
isOpen: !0,
|
|
500
|
-
action:
|
|
499
|
+
action: y,
|
|
501
500
|
node: n,
|
|
502
501
|
onClose: () => {
|
|
503
502
|
Le(null);
|
|
@@ -505,20 +504,18 @@ var Ne = (e) => {
|
|
|
505
504
|
})]
|
|
506
505
|
});
|
|
507
506
|
}
|
|
508
|
-
});
|
|
507
|
+
}) : /* @__PURE__ */ x(h, { to: F.routes.list });
|
|
509
508
|
}, J = ({ config: e, prepared: t }) => {
|
|
510
|
-
let { layoutView: n } =
|
|
509
|
+
let { layoutView: n } = m(), r = p({
|
|
511
510
|
mainPage: e.pages.mainPage,
|
|
512
511
|
subPages: e.pages.subPages,
|
|
513
512
|
activePagePath: t.pagePath,
|
|
514
513
|
node: n
|
|
515
514
|
});
|
|
516
|
-
|
|
517
|
-
if (r.activePage.id !== t.pageId) throw new N(e.routes.detailPage(t.id, r.activePage.id));
|
|
518
|
-
return /* @__PURE__ */ S(Fe, {
|
|
515
|
+
return !r.hasVisiblePages || r.activePage == null ? /* @__PURE__ */ x(h, { to: e.routes.list }) : r.activePage.id === t.pageId ? /* @__PURE__ */ x(Fe, {
|
|
519
516
|
config: t.pageConfig,
|
|
520
517
|
prepared: t
|
|
521
|
-
});
|
|
518
|
+
}) : /* @__PURE__ */ x(h, { to: e.routes.detailPage(t.id, r.activePage.id) });
|
|
522
519
|
};
|
|
523
520
|
//#endregion
|
|
524
521
|
export { J as BackofficeEntityDetailPage, J as default };
|