@plumile/backoffice-react 0.1.166 → 0.1.167
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 +1 -0
- package/lib/esm/auth/login/loginPage.css.js +0 -2
- package/lib/esm/components/backoffice/filters/backofficeFilterAction.css.js +0 -1
- package/lib/esm/components/backoffice/filters/deferredFilterSearchInput.css.js +1 -0
- package/lib/esm/components/backoffice/refs/backofficeRelatedCountLink.css.js +1 -0
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +87 -83
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +174 -174
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/relay/environment.js +28 -12
- package/lib/esm/relay/environment.js.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailLayoutPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
- package/lib/types/relay/environment.d.ts +18 -0
- package/lib/types/relay/environment.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -16,175 +16,175 @@ import { useBackofficeFormats as p } from "../i18n/useBackofficeFormats.js";
|
|
|
16
16
|
import { useRelayEnvironment as m } from "../relay/useRelayEnvironment.js";
|
|
17
17
|
import { resolveVisibleDetailPages as h } from "./detail/pageResolution.js";
|
|
18
18
|
import { headerActions as ae } from "./backofficeEntityDetailPage.css.js";
|
|
19
|
-
import { extractMutationPayload as oe, isFormMutationAction as g, isMutationAction as
|
|
20
|
-
import { buildFieldItems as
|
|
21
|
-
import { useBackofficeEntityDetailLayoutContext as
|
|
22
|
-
import { BackofficeRedirect as
|
|
23
|
-
import { useContext as
|
|
24
|
-
import { Fragment as
|
|
25
|
-
import { useTranslation as
|
|
26
|
-
import { Button as
|
|
27
|
-
import { commitMutation as
|
|
28
|
-
import { useToast as
|
|
29
|
-
import
|
|
30
|
-
import { FormattedDate as
|
|
31
|
-
import { BACKOFFICE_DATE_TIME_OPTIONS as
|
|
32
|
-
import
|
|
33
|
-
import { Tag as
|
|
34
|
-
import { buildBackofficeFallbackListHref as
|
|
35
|
-
import { BackofficeDetailSection as
|
|
36
|
-
import { BackofficePayloadViewer as
|
|
37
|
-
import { setWhereValue as
|
|
38
|
-
import { AuditTimeline as
|
|
39
|
-
import { MetricCard as
|
|
40
|
-
import { MetricTileGroup as
|
|
41
|
-
import { DataTable as
|
|
42
|
-
import { BackofficeKeyValueList as
|
|
43
|
-
import { LinkButton as
|
|
44
|
-
import { BackofficeRelationsMenu as
|
|
45
|
-
import { BackofficeScopeStack as
|
|
46
|
-
import { ChatCheckSvg as
|
|
47
|
-
import { KeyOffSvg as
|
|
48
|
-
import { KeySvg as
|
|
49
|
-
import { LockOpenSvg as
|
|
50
|
-
import { LockSvg as
|
|
51
|
-
import { RobotCheckSvg as
|
|
52
|
-
import { RobotXSvg as
|
|
53
|
-
import { RocketOffSvg as
|
|
54
|
-
import { RocketSvg as
|
|
55
|
-
import { SettingsCheckSvg as
|
|
56
|
-
import { SettingsXSvg as
|
|
57
|
-
import { ShieldLockSvg as
|
|
58
|
-
import { ShieldOffSvg as
|
|
59
|
-
import { XBadgeSvg as
|
|
19
|
+
import { extractMutationPayload as oe, isFormMutationAction as g, isMutationAction as _, isRouteAction as se, resolveLabel as v } from "./BackofficeEntityDetailPage.helpers.js";
|
|
20
|
+
import { buildFieldItems as ce, renderBlocks as le } from "./BackofficeEntityDetailPage.view-helpers.js";
|
|
21
|
+
import { useBackofficeEntityDetailLayoutContext as y } from "./detail/BackofficeEntityDetailLayoutContext.js";
|
|
22
|
+
import { BackofficeRedirect as b } from "./BackofficeRedirect.js";
|
|
23
|
+
import { useContext as x, useMemo as S, useState as C } from "react";
|
|
24
|
+
import { Fragment as ue, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
25
|
+
import { useTranslation as E } from "react-i18next";
|
|
26
|
+
import { Button as D } from "@plumile/ui/atomic/atoms/button/Button.js";
|
|
27
|
+
import { commitMutation as de, useFragment as O, usePreloadedQuery as fe } from "react-relay";
|
|
28
|
+
import { useToast as pe } from "@plumile/ui/atomic/molecules/toast/ToastProvider.js";
|
|
29
|
+
import me from "@plumile/router/routing/RoutingContext.js";
|
|
30
|
+
import { FormattedDate as k } from "@plumile/ui/atomic/atoms/formatted-date/FormattedDate.js";
|
|
31
|
+
import { BACKOFFICE_DATE_TIME_OPTIONS as A } from "@plumile/backoffice-core/constants.js";
|
|
32
|
+
import j from "@plumile/router/routing/Link.js";
|
|
33
|
+
import { Tag as M } from "@plumile/ui/backoffice/atoms/tag/Tag.js";
|
|
34
|
+
import { buildBackofficeFallbackListHref as he, buildBackofficeListHref as ge, buildBackofficeListLink as _e } from "@plumile/backoffice-core/state/buildListHref.js";
|
|
35
|
+
import { BackofficeDetailSection as N } from "@plumile/ui/backoffice/molecules/backoffice_detail_section/BackofficeDetailSection.js";
|
|
36
|
+
import { BackofficePayloadViewer as P } from "@plumile/ui/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.js";
|
|
37
|
+
import { setWhereValue as F } from "@plumile/backoffice-core/filters/where.js";
|
|
38
|
+
import { AuditTimeline as I } from "@plumile/ui/backoffice/organisms/audit_timeline/AuditTimeline.js";
|
|
39
|
+
import { MetricCard as ve } from "@plumile/ui/components/dashboard/metric_card/MetricCard.js";
|
|
40
|
+
import { MetricTileGroup as ye } from "@plumile/ui/components/dashboard/metric_tile_group/MetricTileGroup.js";
|
|
41
|
+
import { DataTable as be } from "@plumile/ui/components/data-table/DataTable.js";
|
|
42
|
+
import { BackofficeKeyValueList as L } from "@plumile/ui/backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js";
|
|
43
|
+
import { LinkButton as xe } from "@plumile/ui/atomic/atoms/button/LinkButton.js";
|
|
44
|
+
import { BackofficeRelationsMenu as Se } from "@plumile/ui/backoffice/molecules/backoffice_relations_menu/BackofficeRelationsMenu.js";
|
|
45
|
+
import { BackofficeScopeStack as Ce } from "@plumile/ui/backoffice/molecules/backoffice_scope_stack/BackofficeScopeStack.js";
|
|
46
|
+
import { ChatCheckSvg as R } from "@plumile/ui/icons/ChatCheckSvg.js";
|
|
47
|
+
import { KeyOffSvg as z } from "@plumile/ui/icons/KeyOffSvg.js";
|
|
48
|
+
import { KeySvg as B } from "@plumile/ui/icons/KeySvg.js";
|
|
49
|
+
import { LockOpenSvg as V } from "@plumile/ui/icons/LockOpenSvg.js";
|
|
50
|
+
import { LockSvg as H } from "@plumile/ui/icons/LockSvg.js";
|
|
51
|
+
import { RobotCheckSvg as U } from "@plumile/ui/icons/RobotCheckSvg.js";
|
|
52
|
+
import { RobotXSvg as W } from "@plumile/ui/icons/RobotXSvg.js";
|
|
53
|
+
import { RocketOffSvg as G } from "@plumile/ui/icons/RocketOffSvg.js";
|
|
54
|
+
import { RocketSvg as K } from "@plumile/ui/icons/RocketSvg.js";
|
|
55
|
+
import { SettingsCheckSvg as q } from "@plumile/ui/icons/SettingsCheckSvg.js";
|
|
56
|
+
import { SettingsXSvg as J } from "@plumile/ui/icons/SettingsXSvg.js";
|
|
57
|
+
import { ShieldLockSvg as Y } from "@plumile/ui/icons/ShieldLockSvg.js";
|
|
58
|
+
import { ShieldOffSvg as X } from "@plumile/ui/icons/ShieldOffSvg.js";
|
|
59
|
+
import { XBadgeSvg as Z } from "@plumile/ui/icons/XBadgeSvg.js";
|
|
60
60
|
//#region src/pages/BackofficeEntityDetailPage.tsx
|
|
61
|
-
var
|
|
61
|
+
var we = (e) => {
|
|
62
62
|
switch (e) {
|
|
63
|
-
case "shield-lock": return /* @__PURE__ */
|
|
63
|
+
case "shield-lock": return /* @__PURE__ */ w(Y, {
|
|
64
64
|
width: 14,
|
|
65
65
|
height: 14,
|
|
66
66
|
"aria-hidden": "true"
|
|
67
67
|
});
|
|
68
|
-
case "shield-off": return /* @__PURE__ */
|
|
68
|
+
case "shield-off": return /* @__PURE__ */ w(X, {
|
|
69
69
|
width: 14,
|
|
70
70
|
height: 14,
|
|
71
71
|
"aria-hidden": "true"
|
|
72
72
|
});
|
|
73
|
-
case "settings-check": return /* @__PURE__ */
|
|
73
|
+
case "settings-check": return /* @__PURE__ */ w(q, {
|
|
74
74
|
width: 14,
|
|
75
75
|
height: 14,
|
|
76
76
|
"aria-hidden": "true"
|
|
77
77
|
});
|
|
78
|
-
case "settings-x": return /* @__PURE__ */
|
|
78
|
+
case "settings-x": return /* @__PURE__ */ w(J, {
|
|
79
79
|
width: 14,
|
|
80
80
|
height: 14,
|
|
81
81
|
"aria-hidden": "true"
|
|
82
82
|
});
|
|
83
|
-
case "x-badge": return /* @__PURE__ */
|
|
83
|
+
case "x-badge": return /* @__PURE__ */ w(Z, {
|
|
84
84
|
width: 14,
|
|
85
85
|
height: 14,
|
|
86
86
|
"aria-hidden": "true"
|
|
87
87
|
});
|
|
88
|
-
case "chat-check": return /* @__PURE__ */
|
|
88
|
+
case "chat-check": return /* @__PURE__ */ w(R, {
|
|
89
89
|
width: 14,
|
|
90
90
|
height: 14,
|
|
91
91
|
"aria-hidden": "true"
|
|
92
92
|
});
|
|
93
|
-
case "key": return /* @__PURE__ */
|
|
93
|
+
case "key": return /* @__PURE__ */ w(B, {
|
|
94
94
|
width: 14,
|
|
95
95
|
height: 14,
|
|
96
96
|
"aria-hidden": "true"
|
|
97
97
|
});
|
|
98
|
-
case "key-off": return /* @__PURE__ */
|
|
98
|
+
case "key-off": return /* @__PURE__ */ w(z, {
|
|
99
99
|
width: 14,
|
|
100
100
|
height: 14,
|
|
101
101
|
"aria-hidden": "true"
|
|
102
102
|
});
|
|
103
|
-
case "lock": return /* @__PURE__ */
|
|
103
|
+
case "lock": return /* @__PURE__ */ w(H, {
|
|
104
104
|
width: 14,
|
|
105
105
|
height: 14,
|
|
106
106
|
"aria-hidden": "true"
|
|
107
107
|
});
|
|
108
|
-
case "lock-open": return /* @__PURE__ */
|
|
108
|
+
case "lock-open": return /* @__PURE__ */ w(V, {
|
|
109
109
|
width: 14,
|
|
110
110
|
height: 14,
|
|
111
111
|
"aria-hidden": "true"
|
|
112
112
|
});
|
|
113
|
-
case "robot-check": return /* @__PURE__ */
|
|
113
|
+
case "robot-check": return /* @__PURE__ */ w(U, {
|
|
114
114
|
width: 14,
|
|
115
115
|
height: 14,
|
|
116
116
|
"aria-hidden": "true"
|
|
117
117
|
});
|
|
118
|
-
case "robot-x": return /* @__PURE__ */
|
|
118
|
+
case "robot-x": return /* @__PURE__ */ w(W, {
|
|
119
119
|
width: 14,
|
|
120
120
|
height: 14,
|
|
121
121
|
"aria-hidden": "true"
|
|
122
122
|
});
|
|
123
|
-
case "rocket": return /* @__PURE__ */
|
|
123
|
+
case "rocket": return /* @__PURE__ */ w(K, {
|
|
124
124
|
width: 14,
|
|
125
125
|
height: 14,
|
|
126
126
|
"aria-hidden": "true"
|
|
127
127
|
});
|
|
128
|
-
case "rocket-off": return /* @__PURE__ */
|
|
128
|
+
case "rocket-off": return /* @__PURE__ */ w(G, {
|
|
129
129
|
width: 14,
|
|
130
130
|
height: 14,
|
|
131
131
|
"aria-hidden": "true"
|
|
132
132
|
});
|
|
133
133
|
default: throw Error(`Unsupported flag icon: ${String(e)}`);
|
|
134
134
|
}
|
|
135
|
-
},
|
|
135
|
+
}, Te = (e) => {
|
|
136
136
|
if (e.presentation?.desktop === "secondary" || e.presentation?.group === "scope" || e.presentation?.group === "status") return "secondary";
|
|
137
137
|
let t = e.fields?.map((e) => e.presentation?.group) ?? [];
|
|
138
138
|
return t.length > 0 && t.every((e) => e === "scope" || e === "status") || e.placement === "side" || e.placement === "secondary" ? "secondary" : "primary";
|
|
139
|
-
},
|
|
140
|
-
let { t:
|
|
141
|
-
|
|
139
|
+
}, Q = ({ config: h, prepared: y }) => {
|
|
140
|
+
let { t: b } = E(), { t: R } = e(), { formatNumber: z, formatCurrency: B, formatCurrencyTitle: V, formatPercent: H } = p(), { entities: U, entityRegistry: W } = n(), G = x(me), K = m(), q = pe(), [J, Y] = C({}), [X, Z] = C(null), Q = (e, t) => {
|
|
141
|
+
Y((n) => n[e] === t ? n : {
|
|
142
142
|
...n,
|
|
143
143
|
[e]: t
|
|
144
144
|
});
|
|
145
|
-
}, { page:
|
|
146
|
-
id:
|
|
147
|
-
detailId:
|
|
148
|
-
}),
|
|
149
|
-
let t =
|
|
145
|
+
}, { page: $ } = h, Ee = fe($.query, y.pageQuery), De = $.resolveNode(Ee, {
|
|
146
|
+
id: y.id,
|
|
147
|
+
detailId: y.detailId
|
|
148
|
+
}), Oe = O($.fragment, De), ke = S(() => Object.fromEntries($.content.flatMap((e) => e.kind === "fieldSet" ? e.fields.flatMap((e) => e.type === "relation" ? [e.relation.target] : []) : []).flatMap((e) => {
|
|
149
|
+
let t = U[e];
|
|
150
150
|
return t?.hasList === !0 ? [[e, t.routes.list]] : [];
|
|
151
|
-
})), [
|
|
152
|
-
return
|
|
153
|
-
node:
|
|
151
|
+
})), [U, $.content]);
|
|
152
|
+
return /* @__PURE__ */ w(f, {
|
|
153
|
+
node: Oe,
|
|
154
154
|
render: (e) => {
|
|
155
|
-
let n =
|
|
156
|
-
let n =
|
|
155
|
+
let n = $.toView(e), f = (e, t) => {
|
|
156
|
+
let n = U[e];
|
|
157
157
|
return n == null ? null : n.routes.detail(t);
|
|
158
158
|
}, p = ({ id: e, label: t, relation: n, listRoute: r, value: i, where: a }) => {
|
|
159
|
-
let { target: o, filterId: s, whereKey: c, path: u } = n, d =
|
|
159
|
+
let { target: o, filterId: s, whereKey: c, path: u } = n, d = W.getLoadedListEntity(o);
|
|
160
160
|
return {
|
|
161
161
|
id: e,
|
|
162
162
|
label: t,
|
|
163
|
-
count: /* @__PURE__ */
|
|
163
|
+
count: /* @__PURE__ */ w(l, {
|
|
164
164
|
entity: o,
|
|
165
165
|
where: a
|
|
166
166
|
}),
|
|
167
|
-
href: d == null ?
|
|
167
|
+
href: d == null ? he(r, a, [{
|
|
168
168
|
id: s ?? (u == null ? c : `${c}.${u.join(".")}`),
|
|
169
169
|
value: i
|
|
170
|
-
}]) :
|
|
170
|
+
}]) : ge(d.config, { where: a }),
|
|
171
171
|
onClick: async (e) => {
|
|
172
|
-
if (
|
|
172
|
+
if (G == null || e.defaultPrevented || e.button !== 0 || e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;
|
|
173
173
|
e.preventDefault();
|
|
174
|
-
let t =
|
|
175
|
-
|
|
174
|
+
let t = _e((await W.loadListEntity(o)).config, { where: a });
|
|
175
|
+
G.history.push({
|
|
176
176
|
pathname: t.pathname,
|
|
177
177
|
search: t.search === "" ? "" : `?${t.search}`,
|
|
178
178
|
hash: ""
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
|
-
}, m =
|
|
182
|
+
}, m = $.actions ?? [], h = [];
|
|
183
183
|
if (m.length > 0) {
|
|
184
184
|
let e = m.filter((e) => e.isVisible == null ? !0 : e.isVisible(n));
|
|
185
185
|
e.length > 0 && (h = e.map((e) => {
|
|
186
|
-
let a =
|
|
187
|
-
return
|
|
186
|
+
let a = v(e.label, b), o = e.ariaLabel == null ? a : v(e.ariaLabel, b), s = e.variant ?? "secondary", c = e.size ?? "small", l = J[e.id] ?? !1, u = l || e.isDisabled?.(n) === !0;
|
|
187
|
+
return se(e) ? /* @__PURE__ */ w(xe, {
|
|
188
188
|
to: e.to(n),
|
|
189
189
|
variant: s,
|
|
190
190
|
size: c,
|
|
@@ -192,18 +192,18 @@ var Ee = (e) => {
|
|
|
192
192
|
"aria-label": o,
|
|
193
193
|
preloadOnMouseEnter: !0,
|
|
194
194
|
children: a
|
|
195
|
-
}, e.id) : g(e) ? /* @__PURE__ */
|
|
195
|
+
}, e.id) : g(e) ? /* @__PURE__ */ w(D, {
|
|
196
196
|
type: "button",
|
|
197
197
|
variant: s,
|
|
198
198
|
size: c,
|
|
199
199
|
isLoading: !1,
|
|
200
200
|
disabled: u,
|
|
201
201
|
onClick: () => {
|
|
202
|
-
|
|
202
|
+
Z(e.id);
|
|
203
203
|
},
|
|
204
204
|
"aria-label": o,
|
|
205
205
|
children: a
|
|
206
|
-
}, e.id) :
|
|
206
|
+
}, e.id) : _(e) ? /* @__PURE__ */ w(D, {
|
|
207
207
|
type: "button",
|
|
208
208
|
variant: s,
|
|
209
209
|
size: c,
|
|
@@ -212,47 +212,47 @@ var Ee = (e) => {
|
|
|
212
212
|
onClick: () => {
|
|
213
213
|
if (l) return;
|
|
214
214
|
let a = e.getVariables(n);
|
|
215
|
-
|
|
215
|
+
Q(e.id, !0), de(K, {
|
|
216
216
|
mutation: e.mutation,
|
|
217
217
|
variables: a,
|
|
218
218
|
updater: (t) => {
|
|
219
219
|
e.updater?.(t, n);
|
|
220
220
|
},
|
|
221
221
|
onCompleted: (a) => {
|
|
222
|
-
|
|
222
|
+
Q(e.id, !1);
|
|
223
223
|
let o = oe(a);
|
|
224
224
|
if (o != null) {
|
|
225
|
-
let i =
|
|
226
|
-
e.toasts?.error?.message == null ? e.toasts?.error?.title != null && (i =
|
|
225
|
+
let i = R("actions.form.errors.invalidPayload");
|
|
226
|
+
e.toasts?.error?.message == null ? e.toasts?.error?.title != null && (i = v(e.toasts.error.title, b)) : i = v(e.toasts.error.message, b);
|
|
227
227
|
let a = t(o, {
|
|
228
228
|
defaultErrorMessage: i,
|
|
229
229
|
mapReason: (t) => {
|
|
230
230
|
let r = e.mapErrorReason?.(t, n);
|
|
231
|
-
return r == null ? null : typeof r == "function" ?
|
|
231
|
+
return r == null ? null : typeof r == "function" ? v(r, b) : String(r);
|
|
232
232
|
}
|
|
233
233
|
});
|
|
234
234
|
if (!a.ok) {
|
|
235
235
|
let t = Error(a.message);
|
|
236
236
|
if (e.onError?.(t, n), e.toasts?.error != null) {
|
|
237
|
-
let t = r(e.toasts.error,
|
|
238
|
-
|
|
237
|
+
let t = r(e.toasts.error, b);
|
|
238
|
+
q.error(t.title, t.message);
|
|
239
239
|
}
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
if (e.onCompleted?.(a, n), e.toasts?.success != null) {
|
|
244
|
-
let t = r(e.toasts.success,
|
|
244
|
+
let t = r(e.toasts.success, b), o = i({
|
|
245
245
|
toast: e.toasts.success,
|
|
246
246
|
response: a,
|
|
247
247
|
node: n,
|
|
248
|
-
tApp:
|
|
249
|
-
entities:
|
|
250
|
-
defaultLabel:
|
|
248
|
+
tApp: b,
|
|
249
|
+
entities: U,
|
|
250
|
+
defaultLabel: R("actions.view"),
|
|
251
251
|
navigateTo: (e) => {
|
|
252
|
-
|
|
252
|
+
G?.history.push({ pathname: e });
|
|
253
253
|
}
|
|
254
254
|
});
|
|
255
|
-
|
|
255
|
+
q.push({
|
|
256
256
|
kind: "info",
|
|
257
257
|
title: t.title,
|
|
258
258
|
message: t.message,
|
|
@@ -261,9 +261,9 @@ var Ee = (e) => {
|
|
|
261
261
|
}
|
|
262
262
|
},
|
|
263
263
|
onError: (t) => {
|
|
264
|
-
if (
|
|
265
|
-
let t = r(e.toasts.error,
|
|
266
|
-
|
|
264
|
+
if (Q(e.id, !1), e.onError?.(t, n), e.toasts?.error != null) {
|
|
265
|
+
let t = r(e.toasts.error, b);
|
|
266
|
+
q.error(t.title, t.message);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
});
|
|
@@ -273,51 +273,51 @@ var Ee = (e) => {
|
|
|
273
273
|
}, e.id) : null;
|
|
274
274
|
}));
|
|
275
275
|
}
|
|
276
|
-
let
|
|
277
|
-
|
|
278
|
-
let r =
|
|
276
|
+
let y = m.find((e) => e.id === X), { content: x } = $, S = [], C = [], E = [];
|
|
277
|
+
x.forEach((e, t) => {
|
|
278
|
+
let r = Te(e) === "secondary" ? C : S;
|
|
279
279
|
if (e.kind === "fieldSet") {
|
|
280
|
-
let i =
|
|
281
|
-
tApp:
|
|
282
|
-
t:
|
|
280
|
+
let i = v(e.title, b), a = e.description == null ? void 0 : v(e.description, b), { items: o, relationItems: l, customNodes: d } = ce(e.fields, n, {
|
|
281
|
+
tApp: b,
|
|
282
|
+
t: R,
|
|
283
283
|
resolveEntityHref: f,
|
|
284
|
-
formatNumber:
|
|
285
|
-
formatCurrency:
|
|
286
|
-
formatCurrencyTitle:
|
|
287
|
-
formatPercent:
|
|
288
|
-
relationEntityListRoutes:
|
|
284
|
+
formatNumber: z,
|
|
285
|
+
formatCurrency: B,
|
|
286
|
+
formatCurrencyTitle: V,
|
|
287
|
+
formatPercent: H,
|
|
288
|
+
relationEntityListRoutes: ke,
|
|
289
289
|
resolveRelationItem: p,
|
|
290
|
-
setWhereValue:
|
|
291
|
-
renderTag: (e, t) => /* @__PURE__ */
|
|
290
|
+
setWhereValue: F,
|
|
291
|
+
renderTag: (e, t) => /* @__PURE__ */ w(M, {
|
|
292
292
|
tone: e,
|
|
293
293
|
children: t
|
|
294
294
|
}),
|
|
295
|
-
renderBadgeRow: (e) => /* @__PURE__ */
|
|
296
|
-
renderDate: (e, t) => /* @__PURE__ */
|
|
295
|
+
renderBadgeRow: (e) => /* @__PURE__ */ w(s, { items: e }),
|
|
296
|
+
renderDate: (e, t) => /* @__PURE__ */ w(k, {
|
|
297
297
|
value: e,
|
|
298
|
-
options:
|
|
298
|
+
options: A,
|
|
299
299
|
fallback: t
|
|
300
300
|
}),
|
|
301
|
-
renderFlagTag: (e) => /* @__PURE__ */
|
|
301
|
+
renderFlagTag: (e) => /* @__PURE__ */ w(c, {
|
|
302
302
|
tone: e.tone,
|
|
303
|
-
icon: e.iconName == null ? void 0 :
|
|
303
|
+
icon: e.iconName == null ? void 0 : we(e.iconName),
|
|
304
304
|
label: e.label
|
|
305
305
|
}),
|
|
306
|
-
renderLink: (e, t) => /* @__PURE__ */
|
|
306
|
+
renderLink: (e, t) => /* @__PURE__ */ w(j, {
|
|
307
307
|
to: e,
|
|
308
308
|
preloadOnMouseEnter: !0,
|
|
309
309
|
children: t
|
|
310
310
|
}),
|
|
311
|
-
renderTaggedValue: (e, t) => /* @__PURE__ */
|
|
311
|
+
renderTaggedValue: (e, t) => /* @__PURE__ */ w(u, {
|
|
312
312
|
tag: e,
|
|
313
313
|
value: t
|
|
314
314
|
}),
|
|
315
|
-
wrapCustomNode: (e, t) => /* @__PURE__ */
|
|
315
|
+
wrapCustomNode: (e, t) => /* @__PURE__ */ w("div", { children: t }, e)
|
|
316
316
|
});
|
|
317
317
|
if (l.forEach((e) => {
|
|
318
|
-
|
|
318
|
+
E.some((t) => t.id === e.id) || E.push(e);
|
|
319
319
|
}), !(o.length > 0 || d.length > 0)) return;
|
|
320
|
-
r.push(/* @__PURE__ */
|
|
320
|
+
r.push(/* @__PURE__ */ w(N, {
|
|
321
321
|
title: i,
|
|
322
322
|
description: a,
|
|
323
323
|
items: o.length > 0 ? o : void 0,
|
|
@@ -325,74 +325,74 @@ var Ee = (e) => {
|
|
|
325
325
|
}, `${i}-${t}`));
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
|
-
let i =
|
|
329
|
-
tApp:
|
|
330
|
-
t:
|
|
328
|
+
let i = le([e], n, {
|
|
329
|
+
tApp: b,
|
|
330
|
+
t: R,
|
|
331
331
|
resolveEntityHref: f,
|
|
332
332
|
keyPrefix: String(t),
|
|
333
|
-
renderLink: (e, t) => /* @__PURE__ */
|
|
333
|
+
renderLink: (e, t) => /* @__PURE__ */ w(j, {
|
|
334
334
|
to: e,
|
|
335
335
|
preloadOnMouseEnter: !0,
|
|
336
336
|
children: t
|
|
337
337
|
}),
|
|
338
|
-
renderDate: (e, t) => /* @__PURE__ */
|
|
338
|
+
renderDate: (e, t) => /* @__PURE__ */ w(k, {
|
|
339
339
|
value: e,
|
|
340
|
-
options:
|
|
340
|
+
options: A,
|
|
341
341
|
fallback: t
|
|
342
342
|
}),
|
|
343
|
-
renderTag: (e, t) => /* @__PURE__ */
|
|
343
|
+
renderTag: (e, t) => /* @__PURE__ */ w(M, {
|
|
344
344
|
tone: e,
|
|
345
345
|
children: t
|
|
346
346
|
}),
|
|
347
|
-
renderMetricGroup: ({ key: e, title: t, description: n, density: r, items: i }) => /* @__PURE__ */
|
|
347
|
+
renderMetricGroup: ({ key: e, title: t, description: n, density: r, items: i }) => /* @__PURE__ */ w(N, {
|
|
348
348
|
title: t,
|
|
349
349
|
description: n,
|
|
350
|
-
children: i.length > 0 && /* @__PURE__ */
|
|
350
|
+
children: i.length > 0 && /* @__PURE__ */ w(ye, {
|
|
351
351
|
density: r ?? "comfortable",
|
|
352
352
|
minColumn: "180",
|
|
353
|
-
children: i.map((e) => /* @__PURE__ */
|
|
353
|
+
children: i.map((e) => /* @__PURE__ */ w(ve, {
|
|
354
354
|
label: e.label,
|
|
355
355
|
value: e.value,
|
|
356
356
|
hint: e.hint,
|
|
357
357
|
tone: e.tone ?? "neutral",
|
|
358
358
|
density: r ?? "comfortable",
|
|
359
359
|
copyValue: e.copyValue,
|
|
360
|
-
copyLabel:
|
|
361
|
-
copiedLabel:
|
|
360
|
+
copyLabel: R("common.actions.copy"),
|
|
361
|
+
copiedLabel: R("common.actions.copied")
|
|
362
362
|
}, e.id))
|
|
363
363
|
})
|
|
364
364
|
}, e),
|
|
365
|
-
renderTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */
|
|
365
|
+
renderTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */ w(d, {
|
|
366
366
|
title: t,
|
|
367
367
|
description: n,
|
|
368
368
|
events: r
|
|
369
369
|
}, e),
|
|
370
|
-
renderAuditTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */
|
|
370
|
+
renderAuditTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */ w(N, {
|
|
371
371
|
title: t,
|
|
372
372
|
description: n,
|
|
373
|
-
children: /* @__PURE__ */
|
|
373
|
+
children: /* @__PURE__ */ w(I, { events: r })
|
|
374
374
|
}, e),
|
|
375
|
-
renderRelations: ({ key: e, title: t, items: n }) => /* @__PURE__ */
|
|
375
|
+
renderRelations: ({ key: e, title: t, items: n }) => /* @__PURE__ */ w(ee, {
|
|
376
376
|
title: t,
|
|
377
377
|
items: n
|
|
378
378
|
}, e),
|
|
379
|
-
renderContextStack: ({ key: e, title: t, items: n }) => /* @__PURE__ */
|
|
379
|
+
renderContextStack: ({ key: e, title: t, items: n }) => /* @__PURE__ */ w(Ce, {
|
|
380
380
|
title: t,
|
|
381
381
|
items: n
|
|
382
382
|
}, e),
|
|
383
|
-
renderCustomSection: (e, t, n) => /* @__PURE__ */
|
|
383
|
+
renderCustomSection: (e, t, n) => /* @__PURE__ */ w(N, {
|
|
384
384
|
title: t,
|
|
385
385
|
children: n
|
|
386
386
|
}, e),
|
|
387
|
-
wrapCustomNode: (e, t) => /* @__PURE__ */
|
|
387
|
+
wrapCustomNode: (e, t) => /* @__PURE__ */ w("div", { children: t }, e),
|
|
388
388
|
resolveTableColumns: (e) => o(e, {
|
|
389
|
-
tApp:
|
|
390
|
-
t:
|
|
389
|
+
tApp: b,
|
|
390
|
+
t: R
|
|
391
391
|
}),
|
|
392
|
-
renderTable: ({ key: e, title: t, description: n, columns: r, rows: i }) => /* @__PURE__ */
|
|
392
|
+
renderTable: ({ key: e, title: t, description: n, columns: r, rows: i }) => /* @__PURE__ */ w(N, {
|
|
393
393
|
title: t,
|
|
394
394
|
description: n,
|
|
395
|
-
children: /* @__PURE__ */
|
|
395
|
+
children: /* @__PURE__ */ w(be, {
|
|
396
396
|
columns: r,
|
|
397
397
|
rows: i,
|
|
398
398
|
getRowId: (e, t) => {
|
|
@@ -404,75 +404,75 @@ var Ee = (e) => {
|
|
|
404
404
|
}
|
|
405
405
|
})
|
|
406
406
|
}, e),
|
|
407
|
-
renderPayload: ({ key: e, title: t, description: n, content: r, format: i }) => /* @__PURE__ */
|
|
407
|
+
renderPayload: ({ key: e, title: t, description: n, content: r, format: i }) => /* @__PURE__ */ w(N, {
|
|
408
408
|
title: t,
|
|
409
409
|
description: n,
|
|
410
|
-
children: /* @__PURE__ */
|
|
410
|
+
children: /* @__PURE__ */ w(P, {
|
|
411
411
|
content: r,
|
|
412
412
|
format: i,
|
|
413
|
-
emptyState:
|
|
413
|
+
emptyState: R("common.notAvailable")
|
|
414
414
|
})
|
|
415
415
|
}, e),
|
|
416
|
-
renderKeyValueListSection: ({ key: e, title: t, description: n, items: r }) => /* @__PURE__ */
|
|
416
|
+
renderKeyValueListSection: ({ key: e, title: t, description: n, items: r }) => /* @__PURE__ */ w(N, {
|
|
417
417
|
title: t,
|
|
418
418
|
description: n,
|
|
419
|
-
children: /* @__PURE__ */
|
|
419
|
+
children: /* @__PURE__ */ w(L, { items: r })
|
|
420
420
|
}, e)
|
|
421
421
|
})[0];
|
|
422
422
|
i != null && r.push(i);
|
|
423
423
|
});
|
|
424
|
-
let
|
|
425
|
-
label:
|
|
426
|
-
items:
|
|
424
|
+
let O = E.length > 0 ? /* @__PURE__ */ w(Se, {
|
|
425
|
+
label: R("relations.menu.label"),
|
|
426
|
+
items: E
|
|
427
427
|
}) : null;
|
|
428
|
-
return /* @__PURE__ */
|
|
429
|
-
h.length > 0 ||
|
|
428
|
+
return /* @__PURE__ */ T(ue, { children: [
|
|
429
|
+
h.length > 0 || O != null ? /* @__PURE__ */ T("div", {
|
|
430
430
|
className: ae,
|
|
431
|
-
children: [h.length > 0 && /* @__PURE__ */
|
|
431
|
+
children: [h.length > 0 && /* @__PURE__ */ w("div", {
|
|
432
432
|
className: "txvbqbfpn txvbqbey txvbqblsh txvbqbhdl txvbqbh7g",
|
|
433
433
|
children: h
|
|
434
|
-
}),
|
|
434
|
+
}), O != null && /* @__PURE__ */ w("div", {
|
|
435
435
|
className: "txvbqbfpn txvbqbey txvbqb10mr txvbqbb49 txvbqbbkc txvbqb2sj txvbqb7tt",
|
|
436
|
-
children:
|
|
436
|
+
children: O
|
|
437
437
|
})]
|
|
438
438
|
}) : null,
|
|
439
|
-
|
|
439
|
+
C.length > 0 ? /* @__PURE__ */ T("div", {
|
|
440
440
|
className: te,
|
|
441
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ w("div", {
|
|
442
442
|
className: ne,
|
|
443
|
-
children:
|
|
444
|
-
}), /* @__PURE__ */
|
|
443
|
+
children: S
|
|
444
|
+
}), /* @__PURE__ */ w("aside", {
|
|
445
445
|
className: re,
|
|
446
|
-
children:
|
|
446
|
+
children: C
|
|
447
447
|
})]
|
|
448
|
-
}) : /* @__PURE__ */
|
|
448
|
+
}) : /* @__PURE__ */ w("div", {
|
|
449
449
|
className: ie,
|
|
450
|
-
children:
|
|
450
|
+
children: S
|
|
451
451
|
}),
|
|
452
|
-
|
|
452
|
+
y != null && g(y) && /* @__PURE__ */ w(a, {
|
|
453
453
|
isOpen: !0,
|
|
454
|
-
action:
|
|
454
|
+
action: y,
|
|
455
455
|
node: n,
|
|
456
456
|
onClose: () => {
|
|
457
|
-
|
|
457
|
+
Z(null);
|
|
458
458
|
}
|
|
459
459
|
})
|
|
460
460
|
] });
|
|
461
461
|
}
|
|
462
|
-
})
|
|
463
|
-
},
|
|
464
|
-
let { layoutView: n } =
|
|
462
|
+
});
|
|
463
|
+
}, $ = ({ config: e, prepared: t }) => {
|
|
464
|
+
let { layoutView: n } = y(), r = h({
|
|
465
465
|
mainPage: e.pages.mainPage,
|
|
466
466
|
subPages: e.pages.subPages,
|
|
467
467
|
activePagePath: t.pagePath,
|
|
468
468
|
node: n
|
|
469
469
|
});
|
|
470
|
-
return !r.hasVisiblePages || r.activePage == null ? /* @__PURE__ */
|
|
470
|
+
return !r.hasVisiblePages || r.activePage == null ? /* @__PURE__ */ w(b, { to: e.routes.list }) : r.activePage.id === t.pageId ? /* @__PURE__ */ w(Q, {
|
|
471
471
|
config: t.pageConfig,
|
|
472
472
|
prepared: t
|
|
473
|
-
}) : /* @__PURE__ */
|
|
473
|
+
}) : /* @__PURE__ */ w(b, { to: e.routes.detailPage(t.id, r.activePage.id) });
|
|
474
474
|
};
|
|
475
475
|
//#endregion
|
|
476
|
-
export {
|
|
476
|
+
export { $ as BackofficeEntityDetailPage, $ as default };
|
|
477
477
|
|
|
478
478
|
//# sourceMappingURL=BackofficeEntityDetailPage.js.map
|