@plumile/backoffice-react 0.1.200 → 0.1.201
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/actions/BackofficeEntityActionFormDialog.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js.map +1 -1
- package/lib/esm/components/backoffice/layout/sidebarUtils.js.map +1 -1
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +1 -1
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +1 -1
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.helpers.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +169 -169
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListDataPage.js +1 -1
- package/lib/esm/pages/BackofficeEntityListDataPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListPage.helpers.js.map +1 -1
- package/lib/esm/provider/entityRegistry.js +39 -36
- package/lib/esm/provider/entityRegistry.js.map +1 -1
- package/lib/esm/provider/useBackofficeAuthRouteGate.js +7 -7
- package/lib/esm/provider/useBackofficeAuthRouteGate.js.map +1 -1
- package/lib/esm/relay/createInlineReader.js.map +1 -1
- package/lib/esm/relay/envHelpers.js +30 -22
- package/lib/esm/relay/envHelpers.js.map +1 -1
- package/lib/esm/relay/typedRelayHooks.js +11 -2
- package/lib/esm/relay/typedRelayHooks.js.map +1 -1
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/types/components/backoffice/actions/BackofficeEntityActionFormDialog.d.ts +2 -2
- package/lib/types/components/backoffice/actions/BackofficeEntityActionFormDialog.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/sidebarUtils.d.ts.map +1 -1
- package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.helpers.d.ts +3 -3
- package/lib/types/pages/BackofficeEntityDetailPage.helpers.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListPage.helpers.d.ts +2 -2
- package/lib/types/pages/BackofficeEntityListPage.helpers.d.ts.map +1 -1
- package/lib/types/provider/entityRegistry.d.ts.map +1 -1
- package/lib/types/provider/types.d.ts +1 -1
- package/lib/types/provider/types.d.ts.map +1 -1
- package/lib/types/provider/useBackofficeAuthRouteGate.d.ts.map +1 -1
- package/lib/types/relay/createInlineReader.d.ts +4 -1
- package/lib/types/relay/createInlineReader.d.ts.map +1 -1
- package/lib/types/relay/envHelpers.d.ts.map +1 -1
- package/lib/types/relay/typedRelayHooks.d.ts +15 -5
- package/lib/types/relay/typedRelayHooks.d.ts.map +1 -1
- package/lib/types/router/createBackofficeRoutes.d.ts +1 -1
- package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useBackofficeReactTranslation as e } from "../i18n/useBackofficeReactTranslation.js";
|
|
2
2
|
import { resolveMutationOutcome as t } from "../relay/mutationResult.js";
|
|
3
3
|
import { useBackofficeConfig as n } from "../provider/BackofficeConfigContext.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useBackofficeRuntimeFragment as r } from "../relay/typedRelayHooks.js";
|
|
5
5
|
import { resolveToastSpec as i, resolveToastViewActions as a } from "../components/backoffice/actions/toastViewAction.js";
|
|
6
6
|
import { LazyBackofficeEntityActionFormDialog as o } from "../components/backoffice/actions/LazyBackofficeEntityActionFormDialog.js";
|
|
7
7
|
import { buildDataTableColumns as s } from "../components/backoffice/columns/buildDataTableColumns.js";
|
|
@@ -9,153 +9,153 @@ import { BackofficeDetailBadgeRow as c } from "../components/backoffice/detail/B
|
|
|
9
9
|
import { BackofficeDetailFlagTag as l } from "../components/backoffice/detail/BackofficeDetailFlagTag.js";
|
|
10
10
|
import { BackofficeDetailTaggedValue as u } from "../components/backoffice/detail/BackofficeDetailTaggedValue.js";
|
|
11
11
|
import { BackofficeLifecycleTimelineSection as d } from "../components/backoffice/detail/BackofficeLifecycleTimelineSection.js";
|
|
12
|
-
import { BackofficeRelationsSummaryGrid as
|
|
13
|
-
import { layout as
|
|
14
|
-
import { BackofficeEntityDetailScaffold as
|
|
15
|
-
import { useBackofficeEntityDetailNotFoundState as
|
|
16
|
-
import { useBackofficeFormats as
|
|
17
|
-
import { useRelayEnvironment as
|
|
18
|
-
import { headerActionGroup as
|
|
19
|
-
import { extractMutationPayload as
|
|
20
|
-
import { buildFieldItems as
|
|
21
|
-
import { useContext as
|
|
22
|
-
import { Fragment as
|
|
23
|
-
import { useTranslation as
|
|
24
|
-
import { Button as
|
|
25
|
-
import { commitMutation as
|
|
26
|
-
import { useToast as
|
|
27
|
-
import
|
|
28
|
-
import { FormattedDate as
|
|
29
|
-
import { BACKOFFICE_DATE_TIME_OPTIONS as
|
|
30
|
-
import
|
|
31
|
-
import { Tag as
|
|
32
|
-
import { BackofficeDetailSection as
|
|
33
|
-
import { BackofficePayloadViewer as
|
|
34
|
-
import { AuditTimeline as
|
|
35
|
-
import { MetricCard as
|
|
36
|
-
import { MetricTileGroup as
|
|
37
|
-
import { LinkButton as
|
|
38
|
-
import { DataTable as
|
|
39
|
-
import { BackofficeKeyValueList as
|
|
40
|
-
import { BackofficeScopeStack as
|
|
41
|
-
import { ChatCheckSvg as
|
|
42
|
-
import { KeyOffSvg as
|
|
43
|
-
import { KeySvg as
|
|
44
|
-
import { LockOpenSvg as
|
|
45
|
-
import { LockSvg as
|
|
46
|
-
import { RobotCheckSvg as
|
|
47
|
-
import { RobotXSvg as
|
|
48
|
-
import { RocketOffSvg as
|
|
49
|
-
import { RocketSvg as
|
|
50
|
-
import { SettingsCheckSvg as
|
|
51
|
-
import { SettingsXSvg as
|
|
52
|
-
import { ShieldLockSvg as
|
|
53
|
-
import { ShieldOffSvg as
|
|
54
|
-
import { XBadgeSvg as
|
|
12
|
+
import { BackofficeRelationsSummaryGrid as ee } from "../components/backoffice/detail/BackofficeRelationsSummaryGrid.js";
|
|
13
|
+
import { layout as te, primary as ne, secondary as re, stacked as ie } from "../components/backoffice/detail/backofficeDetailLayout.css.js";
|
|
14
|
+
import { BackofficeEntityDetailScaffold as f } from "../components/backoffice/scaffolds/BackofficeEntityDetailScaffold.js";
|
|
15
|
+
import { useBackofficeEntityDetailNotFoundState as p } from "../components/backoffice/scaffolds/BackofficeEntityDetailNotFound.js";
|
|
16
|
+
import { useBackofficeFormats as m } from "../i18n/useBackofficeFormats.js";
|
|
17
|
+
import { useRelayEnvironment as h } from "../relay/useRelayEnvironment.js";
|
|
18
|
+
import { headerActionGroup as ae, headerActions as oe } from "./backofficeEntityDetailPage.css.js";
|
|
19
|
+
import { extractMutationPayload as se, isFormMutationAction as g, isMutationAction as ce, isRouteAction as le, resolveLabel as _ } from "./BackofficeEntityDetailPage.helpers.js";
|
|
20
|
+
import { buildFieldItems as ue, renderBlocks as de } from "./BackofficeEntityDetailPage.view-helpers.js";
|
|
21
|
+
import { useContext as v, useState as y } from "react";
|
|
22
|
+
import { Fragment as fe, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
23
|
+
import { useTranslation as S } from "react-i18next";
|
|
24
|
+
import { Button as C } from "@plumile/ui/atomic/atoms/button/Button.js";
|
|
25
|
+
import { commitMutation as pe, usePreloadedQuery as w } from "react-relay";
|
|
26
|
+
import { useToast as me } from "@plumile/ui/atomic/molecules/toast/ToastProvider.js";
|
|
27
|
+
import he from "@plumile/router/routing/RoutingContext.js";
|
|
28
|
+
import { FormattedDate as T } from "@plumile/ui/atomic/atoms/formatted-date/FormattedDate.js";
|
|
29
|
+
import { BACKOFFICE_DATE_TIME_OPTIONS as E } from "@plumile/backoffice-core/constants.js";
|
|
30
|
+
import D from "@plumile/router/routing/Link.js";
|
|
31
|
+
import { Tag as O } from "@plumile/ui/backoffice/atoms/tag/Tag.js";
|
|
32
|
+
import { BackofficeDetailSection as k } from "@plumile/ui/backoffice/molecules/backoffice_detail_section/BackofficeDetailSection.js";
|
|
33
|
+
import { BackofficePayloadViewer as ge } from "@plumile/ui/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.js";
|
|
34
|
+
import { AuditTimeline as _e } from "@plumile/ui/backoffice/organisms/audit_timeline/AuditTimeline.js";
|
|
35
|
+
import { MetricCard as ve } from "@plumile/ui/components/dashboard/metric_card/MetricCard.js";
|
|
36
|
+
import { MetricTileGroup as ye } from "@plumile/ui/components/dashboard/metric_tile_group/MetricTileGroup.js";
|
|
37
|
+
import { LinkButton as A } from "@plumile/ui/atomic/atoms/button/LinkButton.js";
|
|
38
|
+
import { DataTable as j } from "@plumile/ui/components/data-table/DataTable.js";
|
|
39
|
+
import { BackofficeKeyValueList as M } from "@plumile/ui/backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js";
|
|
40
|
+
import { BackofficeScopeStack as N } from "@plumile/ui/backoffice/molecules/backoffice_scope_stack/BackofficeScopeStack.js";
|
|
41
|
+
import { ChatCheckSvg as P } from "@plumile/ui/icons/ChatCheckSvg.js";
|
|
42
|
+
import { KeyOffSvg as F } from "@plumile/ui/icons/KeyOffSvg.js";
|
|
43
|
+
import { KeySvg as I } from "@plumile/ui/icons/KeySvg.js";
|
|
44
|
+
import { LockOpenSvg as L } from "@plumile/ui/icons/LockOpenSvg.js";
|
|
45
|
+
import { LockSvg as R } from "@plumile/ui/icons/LockSvg.js";
|
|
46
|
+
import { RobotCheckSvg as z } from "@plumile/ui/icons/RobotCheckSvg.js";
|
|
47
|
+
import { RobotXSvg as B } from "@plumile/ui/icons/RobotXSvg.js";
|
|
48
|
+
import { RocketOffSvg as V } from "@plumile/ui/icons/RocketOffSvg.js";
|
|
49
|
+
import { RocketSvg as H } from "@plumile/ui/icons/RocketSvg.js";
|
|
50
|
+
import { SettingsCheckSvg as U } from "@plumile/ui/icons/SettingsCheckSvg.js";
|
|
51
|
+
import { SettingsXSvg as W } from "@plumile/ui/icons/SettingsXSvg.js";
|
|
52
|
+
import { ShieldLockSvg as G } from "@plumile/ui/icons/ShieldLockSvg.js";
|
|
53
|
+
import { ShieldOffSvg as K } from "@plumile/ui/icons/ShieldOffSvg.js";
|
|
54
|
+
import { XBadgeSvg as q } from "@plumile/ui/icons/XBadgeSvg.js";
|
|
55
55
|
//#region src/pages/BackofficeEntityDetailPage.tsx
|
|
56
|
-
var
|
|
56
|
+
var be = (e) => typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "__typename") == "string", xe = (e) => {
|
|
57
57
|
switch (e) {
|
|
58
|
-
case "shield-lock": return /* @__PURE__ */
|
|
58
|
+
case "shield-lock": return /* @__PURE__ */ b(G, {
|
|
59
59
|
width: 14,
|
|
60
60
|
height: 14,
|
|
61
61
|
"aria-hidden": "true"
|
|
62
62
|
});
|
|
63
|
-
case "shield-off": return /* @__PURE__ */
|
|
63
|
+
case "shield-off": return /* @__PURE__ */ b(K, {
|
|
64
64
|
width: 14,
|
|
65
65
|
height: 14,
|
|
66
66
|
"aria-hidden": "true"
|
|
67
67
|
});
|
|
68
|
-
case "settings-check": return /* @__PURE__ */
|
|
68
|
+
case "settings-check": return /* @__PURE__ */ b(U, {
|
|
69
69
|
width: 14,
|
|
70
70
|
height: 14,
|
|
71
71
|
"aria-hidden": "true"
|
|
72
72
|
});
|
|
73
|
-
case "settings-x": return /* @__PURE__ */
|
|
73
|
+
case "settings-x": return /* @__PURE__ */ b(W, {
|
|
74
74
|
width: 14,
|
|
75
75
|
height: 14,
|
|
76
76
|
"aria-hidden": "true"
|
|
77
77
|
});
|
|
78
|
-
case "x-badge": return /* @__PURE__ */
|
|
78
|
+
case "x-badge": return /* @__PURE__ */ b(q, {
|
|
79
79
|
width: 14,
|
|
80
80
|
height: 14,
|
|
81
81
|
"aria-hidden": "true"
|
|
82
82
|
});
|
|
83
|
-
case "chat-check": return /* @__PURE__ */
|
|
83
|
+
case "chat-check": return /* @__PURE__ */ b(P, {
|
|
84
84
|
width: 14,
|
|
85
85
|
height: 14,
|
|
86
86
|
"aria-hidden": "true"
|
|
87
87
|
});
|
|
88
|
-
case "key": return /* @__PURE__ */
|
|
88
|
+
case "key": return /* @__PURE__ */ b(I, {
|
|
89
89
|
width: 14,
|
|
90
90
|
height: 14,
|
|
91
91
|
"aria-hidden": "true"
|
|
92
92
|
});
|
|
93
|
-
case "key-off": return /* @__PURE__ */
|
|
93
|
+
case "key-off": return /* @__PURE__ */ b(F, {
|
|
94
94
|
width: 14,
|
|
95
95
|
height: 14,
|
|
96
96
|
"aria-hidden": "true"
|
|
97
97
|
});
|
|
98
|
-
case "lock": return /* @__PURE__ */
|
|
98
|
+
case "lock": return /* @__PURE__ */ b(R, {
|
|
99
99
|
width: 14,
|
|
100
100
|
height: 14,
|
|
101
101
|
"aria-hidden": "true"
|
|
102
102
|
});
|
|
103
|
-
case "lock-open": return /* @__PURE__ */
|
|
103
|
+
case "lock-open": return /* @__PURE__ */ b(L, {
|
|
104
104
|
width: 14,
|
|
105
105
|
height: 14,
|
|
106
106
|
"aria-hidden": "true"
|
|
107
107
|
});
|
|
108
|
-
case "robot-check": return /* @__PURE__ */
|
|
108
|
+
case "robot-check": return /* @__PURE__ */ b(z, {
|
|
109
109
|
width: 14,
|
|
110
110
|
height: 14,
|
|
111
111
|
"aria-hidden": "true"
|
|
112
112
|
});
|
|
113
|
-
case "robot-x": return /* @__PURE__ */
|
|
113
|
+
case "robot-x": return /* @__PURE__ */ b(B, {
|
|
114
114
|
width: 14,
|
|
115
115
|
height: 14,
|
|
116
116
|
"aria-hidden": "true"
|
|
117
117
|
});
|
|
118
|
-
case "rocket": return /* @__PURE__ */
|
|
118
|
+
case "rocket": return /* @__PURE__ */ b(H, {
|
|
119
119
|
width: 14,
|
|
120
120
|
height: 14,
|
|
121
121
|
"aria-hidden": "true"
|
|
122
122
|
});
|
|
123
|
-
case "rocket-off": return /* @__PURE__ */
|
|
123
|
+
case "rocket-off": return /* @__PURE__ */ b(V, {
|
|
124
124
|
width: 14,
|
|
125
125
|
height: 14,
|
|
126
126
|
"aria-hidden": "true"
|
|
127
127
|
});
|
|
128
128
|
default: throw Error(`Unsupported flag icon: ${String(e)}`);
|
|
129
129
|
}
|
|
130
|
-
},
|
|
130
|
+
}, Se = (e) => {
|
|
131
131
|
if (e.presentation?.desktop === "secondary" || e.presentation?.group === "scope" || e.presentation?.group === "status") return "secondary";
|
|
132
132
|
let t = e.fields?.map((e) => e.presentation?.group) ?? [];
|
|
133
133
|
return t.length > 0 && t.every((e) => e === "scope" || e === "status") || e.placement === "side" || e.placement === "secondary" ? "secondary" : "primary";
|
|
134
|
-
},
|
|
135
|
-
let { t:
|
|
136
|
-
|
|
134
|
+
}, J = ({ config: P, prepared: F }) => {
|
|
135
|
+
let { t: I } = S(), { t: L } = e(), { formatNumber: R, formatCurrency: z, formatCurrencyTitle: B, formatPercent: V } = m(), { entities: H } = n(), U = v(he), W = h(), G = me(), [K, q] = y({}), [J, Y] = y(null), X = (e, t) => {
|
|
136
|
+
q((n) => n[e] === t ? n : {
|
|
137
137
|
...n,
|
|
138
138
|
[e]: t
|
|
139
139
|
});
|
|
140
|
-
}, { page:
|
|
141
|
-
id:
|
|
142
|
-
detailId:
|
|
143
|
-
}),
|
|
144
|
-
return /* @__PURE__ */
|
|
145
|
-
node:
|
|
146
|
-
notFound:
|
|
140
|
+
}, { page: Z } = P, Ce = p({ listHref: P.routes.list }), we = w(Z.query, F.pageQuery), Q = Z.resolveNode(we, {
|
|
141
|
+
id: F.id,
|
|
142
|
+
detailId: F.detailId
|
|
143
|
+
}), $ = r(Z.fragment, Q), Te = be($) ? $ : null;
|
|
144
|
+
return /* @__PURE__ */ b(f, {
|
|
145
|
+
node: Te,
|
|
146
|
+
notFound: Ce,
|
|
147
147
|
render: (e) => {
|
|
148
|
-
let n =
|
|
149
|
-
let n =
|
|
148
|
+
let n = Z.toView(e), r = (e, t) => {
|
|
149
|
+
let n = H[e];
|
|
150
150
|
return n == null ? null : n.routes.detail(t);
|
|
151
|
-
},
|
|
152
|
-
if (
|
|
153
|
-
let e =
|
|
154
|
-
e.length > 0 && (
|
|
155
|
-
let r =
|
|
156
|
-
if (
|
|
151
|
+
}, f = Z.actions ?? [], p = [];
|
|
152
|
+
if (f.length > 0) {
|
|
153
|
+
let e = f.filter((e) => e.isVisible == null || e.isVisible(n));
|
|
154
|
+
e.length > 0 && (p = e.map((e) => {
|
|
155
|
+
let r = _(e.label, I), o = e.ariaLabel == null ? r : _(e.ariaLabel, I), s = e.variant ?? "secondary", c = e.size ?? "small", l = K[e.id] ?? !1, u = l || e.isDisabled?.(n) === !0;
|
|
156
|
+
if (le(e)) {
|
|
157
157
|
let t = e.to(n);
|
|
158
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ b(A, {
|
|
159
159
|
to: t,
|
|
160
160
|
variant: s,
|
|
161
161
|
size: c,
|
|
@@ -165,18 +165,18 @@ var ve = (e) => {
|
|
|
165
165
|
children: r
|
|
166
166
|
}, e.id);
|
|
167
167
|
}
|
|
168
|
-
return
|
|
168
|
+
return g(e) ? /* @__PURE__ */ b(C, {
|
|
169
169
|
type: "button",
|
|
170
170
|
variant: s,
|
|
171
171
|
size: c,
|
|
172
172
|
isLoading: !1,
|
|
173
173
|
disabled: u,
|
|
174
174
|
onClick: () => {
|
|
175
|
-
|
|
175
|
+
Y(e.id);
|
|
176
176
|
},
|
|
177
177
|
"aria-label": o,
|
|
178
178
|
children: r
|
|
179
|
-
}, e.id) :
|
|
179
|
+
}, e.id) : ce(e) ? /* @__PURE__ */ b(C, {
|
|
180
180
|
type: "button",
|
|
181
181
|
variant: s,
|
|
182
182
|
size: c,
|
|
@@ -185,47 +185,47 @@ var ve = (e) => {
|
|
|
185
185
|
onClick: () => {
|
|
186
186
|
if (l) return;
|
|
187
187
|
let r = e.getVariables(n);
|
|
188
|
-
|
|
188
|
+
X(e.id, !0), pe(W, {
|
|
189
189
|
mutation: e.mutation,
|
|
190
190
|
variables: r,
|
|
191
191
|
updater: (t) => {
|
|
192
192
|
e.updater?.(t, n);
|
|
193
193
|
},
|
|
194
194
|
onCompleted: (r) => {
|
|
195
|
-
|
|
196
|
-
let o =
|
|
195
|
+
X(e.id, !1);
|
|
196
|
+
let o = se(r);
|
|
197
197
|
if (o != null) {
|
|
198
|
-
let r =
|
|
199
|
-
e.toasts?.error?.message == null ? e.toasts?.error?.title != null && (r =
|
|
198
|
+
let r = L("actions.form.errors.invalidPayload");
|
|
199
|
+
e.toasts?.error?.message == null ? e.toasts?.error?.title != null && (r = _(e.toasts.error.title, I)) : r = _(e.toasts.error.message, I);
|
|
200
200
|
let a = t(o, {
|
|
201
201
|
defaultErrorMessage: r,
|
|
202
202
|
mapReason: (t) => {
|
|
203
203
|
let r = e.mapErrorReason?.(t, n);
|
|
204
|
-
return r == null ? null : typeof r == "function" ?
|
|
204
|
+
return r == null ? null : typeof r == "function" ? _(r, I) : String(r);
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
if (!a.ok) {
|
|
208
208
|
let t = Error(a.message);
|
|
209
209
|
if (e.onError?.(t, n), e.toasts?.error != null) {
|
|
210
|
-
let t = i(e.toasts.error,
|
|
211
|
-
|
|
210
|
+
let t = i(e.toasts.error, I);
|
|
211
|
+
G.error(t.title, t.message);
|
|
212
212
|
}
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
if (e.onCompleted?.(r, n), e.toasts?.success != null) {
|
|
217
|
-
let t = i(e.toasts.success,
|
|
217
|
+
let t = i(e.toasts.success, I), o = a({
|
|
218
218
|
toast: e.toasts.success,
|
|
219
219
|
response: r,
|
|
220
220
|
node: n,
|
|
221
|
-
tApp:
|
|
222
|
-
entities:
|
|
223
|
-
defaultLabel:
|
|
221
|
+
tApp: I,
|
|
222
|
+
entities: H,
|
|
223
|
+
defaultLabel: L("actions.view"),
|
|
224
224
|
navigateTo: (e) => {
|
|
225
|
-
|
|
225
|
+
U?.history.push({ pathname: e });
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
|
-
|
|
228
|
+
G.push({
|
|
229
229
|
kind: "info",
|
|
230
230
|
title: t.title,
|
|
231
231
|
message: t.message,
|
|
@@ -234,9 +234,9 @@ var ve = (e) => {
|
|
|
234
234
|
}
|
|
235
235
|
},
|
|
236
236
|
onError: (t) => {
|
|
237
|
-
if (
|
|
238
|
-
let t = i(e.toasts.error,
|
|
239
|
-
|
|
237
|
+
if (X(e.id, !1), e.onError?.(t, n), e.toasts?.error != null) {
|
|
238
|
+
let t = i(e.toasts.error, I);
|
|
239
|
+
G.error(t.title, t.message);
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
});
|
|
@@ -246,46 +246,46 @@ var ve = (e) => {
|
|
|
246
246
|
}, e.id) : null;
|
|
247
247
|
}));
|
|
248
248
|
}
|
|
249
|
-
let
|
|
250
|
-
|
|
251
|
-
let i =
|
|
249
|
+
let m = f.find((e) => e.id === J), { content: h } = Z, v = [], y = [];
|
|
250
|
+
h.forEach((e, t) => {
|
|
251
|
+
let i = Se(e) === "secondary" ? y : v;
|
|
252
252
|
if (e.kind === "fieldSet") {
|
|
253
|
-
let a =
|
|
254
|
-
tApp:
|
|
255
|
-
t:
|
|
253
|
+
let a = _(e.title, I), o = e.description == null ? void 0 : _(e.description, I), { items: s, customNodes: d } = ue(e.fields, n, {
|
|
254
|
+
tApp: I,
|
|
255
|
+
t: L,
|
|
256
256
|
resolveEntityHref: r,
|
|
257
|
-
formatNumber:
|
|
258
|
-
formatCurrency:
|
|
259
|
-
formatCurrencyTitle:
|
|
260
|
-
formatPercent:
|
|
261
|
-
renderTag: (e, t) => /* @__PURE__ */
|
|
257
|
+
formatNumber: R,
|
|
258
|
+
formatCurrency: z,
|
|
259
|
+
formatCurrencyTitle: B,
|
|
260
|
+
formatPercent: V,
|
|
261
|
+
renderTag: (e, t) => /* @__PURE__ */ b(O, {
|
|
262
262
|
tone: e,
|
|
263
263
|
children: t
|
|
264
264
|
}),
|
|
265
|
-
renderBadgeRow: (e) => /* @__PURE__ */
|
|
266
|
-
renderDate: (e, t) => /* @__PURE__ */
|
|
265
|
+
renderBadgeRow: (e) => /* @__PURE__ */ b(c, { items: e }),
|
|
266
|
+
renderDate: (e, t) => /* @__PURE__ */ b(T, {
|
|
267
267
|
value: e,
|
|
268
|
-
options:
|
|
268
|
+
options: E,
|
|
269
269
|
fallback: t
|
|
270
270
|
}),
|
|
271
|
-
renderFlagTag: (e) => /* @__PURE__ */
|
|
271
|
+
renderFlagTag: (e) => /* @__PURE__ */ b(l, {
|
|
272
272
|
tone: e.tone,
|
|
273
|
-
icon: e.iconName == null ? void 0 :
|
|
273
|
+
icon: e.iconName == null ? void 0 : xe(e.iconName),
|
|
274
274
|
label: e.label
|
|
275
275
|
}),
|
|
276
|
-
renderLink: (e, t) => /* @__PURE__ */
|
|
276
|
+
renderLink: (e, t) => /* @__PURE__ */ b(D, {
|
|
277
277
|
to: e,
|
|
278
278
|
preloadOnHover: "code-and-data",
|
|
279
279
|
children: t
|
|
280
280
|
}),
|
|
281
|
-
renderTaggedValue: (e, t) => /* @__PURE__ */
|
|
281
|
+
renderTaggedValue: (e, t) => /* @__PURE__ */ b(u, {
|
|
282
282
|
tag: e,
|
|
283
283
|
value: t
|
|
284
284
|
}),
|
|
285
|
-
wrapCustomNode: (e, t) => /* @__PURE__ */
|
|
285
|
+
wrapCustomNode: (e, t) => /* @__PURE__ */ b("div", { children: t }, e)
|
|
286
286
|
});
|
|
287
287
|
if (!(s.length > 0 || d.length > 0)) return;
|
|
288
|
-
i.push(/* @__PURE__ */
|
|
288
|
+
i.push(/* @__PURE__ */ b(k, {
|
|
289
289
|
title: a,
|
|
290
290
|
description: o,
|
|
291
291
|
items: s.length > 0 ? s : void 0,
|
|
@@ -293,74 +293,74 @@ var ve = (e) => {
|
|
|
293
293
|
}, `${a}-${t}`));
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
|
-
let a =
|
|
297
|
-
tApp:
|
|
298
|
-
t:
|
|
296
|
+
let a = de([e], n, {
|
|
297
|
+
tApp: I,
|
|
298
|
+
t: L,
|
|
299
299
|
resolveEntityHref: r,
|
|
300
300
|
keyPrefix: String(t),
|
|
301
|
-
renderLink: (e, t) => /* @__PURE__ */
|
|
301
|
+
renderLink: (e, t) => /* @__PURE__ */ b(D, {
|
|
302
302
|
to: e,
|
|
303
303
|
preloadOnHover: "code-and-data",
|
|
304
304
|
children: t
|
|
305
305
|
}),
|
|
306
|
-
renderDate: (e, t) => /* @__PURE__ */
|
|
306
|
+
renderDate: (e, t) => /* @__PURE__ */ b(T, {
|
|
307
307
|
value: e,
|
|
308
|
-
options:
|
|
308
|
+
options: E,
|
|
309
309
|
fallback: t
|
|
310
310
|
}),
|
|
311
|
-
renderTag: (e, t) => /* @__PURE__ */
|
|
311
|
+
renderTag: (e, t) => /* @__PURE__ */ b(O, {
|
|
312
312
|
tone: e,
|
|
313
313
|
children: t
|
|
314
314
|
}),
|
|
315
|
-
renderMetricGroup: ({ key: e, title: t, description: n, density: r, items: i }) => /* @__PURE__ */
|
|
315
|
+
renderMetricGroup: ({ key: e, title: t, description: n, density: r, items: i }) => /* @__PURE__ */ b(k, {
|
|
316
316
|
title: t,
|
|
317
317
|
description: n,
|
|
318
|
-
children: i.length > 0 && /* @__PURE__ */
|
|
318
|
+
children: i.length > 0 && /* @__PURE__ */ b(ye, {
|
|
319
319
|
density: r ?? "comfortable",
|
|
320
320
|
minColumn: "180",
|
|
321
|
-
children: i.map((e) => /* @__PURE__ */
|
|
321
|
+
children: i.map((e) => /* @__PURE__ */ b(ve, {
|
|
322
322
|
label: e.label,
|
|
323
323
|
value: e.value,
|
|
324
324
|
hint: e.hint,
|
|
325
325
|
tone: e.tone ?? "neutral",
|
|
326
326
|
density: r ?? "comfortable",
|
|
327
327
|
copyValue: e.copyValue,
|
|
328
|
-
copyLabel:
|
|
329
|
-
copiedLabel:
|
|
328
|
+
copyLabel: L("common.actions.copy"),
|
|
329
|
+
copiedLabel: L("common.actions.copied")
|
|
330
330
|
}, e.id))
|
|
331
331
|
})
|
|
332
332
|
}, e),
|
|
333
|
-
renderTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */
|
|
333
|
+
renderTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */ b(d, {
|
|
334
334
|
title: t,
|
|
335
335
|
description: n,
|
|
336
336
|
events: r
|
|
337
337
|
}, e),
|
|
338
|
-
renderAuditTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */
|
|
338
|
+
renderAuditTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */ b(k, {
|
|
339
339
|
title: t,
|
|
340
340
|
description: n,
|
|
341
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ b(_e, { events: r })
|
|
342
342
|
}, e),
|
|
343
|
-
renderRelations: ({ key: e, title: t, items: n }) => /* @__PURE__ */
|
|
343
|
+
renderRelations: ({ key: e, title: t, items: n }) => /* @__PURE__ */ b(ee, {
|
|
344
344
|
title: t,
|
|
345
345
|
items: n
|
|
346
346
|
}, e),
|
|
347
|
-
renderContextStack: ({ key: e, title: t, items: n }) => /* @__PURE__ */
|
|
347
|
+
renderContextStack: ({ key: e, title: t, items: n }) => /* @__PURE__ */ b(N, {
|
|
348
348
|
title: t,
|
|
349
349
|
items: n
|
|
350
350
|
}, e),
|
|
351
|
-
renderCustomSection: (e, t, n) => /* @__PURE__ */
|
|
351
|
+
renderCustomSection: (e, t, n) => /* @__PURE__ */ b(k, {
|
|
352
352
|
title: t,
|
|
353
353
|
children: n
|
|
354
354
|
}, e),
|
|
355
|
-
wrapCustomNode: (e, t) => /* @__PURE__ */
|
|
355
|
+
wrapCustomNode: (e, t) => /* @__PURE__ */ b("div", { children: t }, e),
|
|
356
356
|
resolveTableColumns: (e) => s(e, {
|
|
357
|
-
tApp:
|
|
358
|
-
t:
|
|
357
|
+
tApp: I,
|
|
358
|
+
t: L
|
|
359
359
|
}),
|
|
360
|
-
renderTable: ({ key: e, title: t, description: n, columns: r, rows: i }) => /* @__PURE__ */
|
|
360
|
+
renderTable: ({ key: e, title: t, description: n, columns: r, rows: i }) => /* @__PURE__ */ b(k, {
|
|
361
361
|
title: t,
|
|
362
362
|
description: n,
|
|
363
|
-
children: /* @__PURE__ */
|
|
363
|
+
children: /* @__PURE__ */ b(j, {
|
|
364
364
|
columns: r,
|
|
365
365
|
rows: i,
|
|
366
366
|
getRowId: (e, t) => {
|
|
@@ -372,61 +372,61 @@ var ve = (e) => {
|
|
|
372
372
|
}
|
|
373
373
|
})
|
|
374
374
|
}, e),
|
|
375
|
-
renderPayload: ({ key: e, title: t, description: n, content: r, format: i }) => /* @__PURE__ */
|
|
375
|
+
renderPayload: ({ key: e, title: t, description: n, content: r, format: i }) => /* @__PURE__ */ b(k, {
|
|
376
376
|
title: t,
|
|
377
377
|
description: n,
|
|
378
|
-
children: /* @__PURE__ */
|
|
378
|
+
children: /* @__PURE__ */ b(ge, {
|
|
379
379
|
content: r,
|
|
380
380
|
format: i,
|
|
381
|
-
emptyState:
|
|
381
|
+
emptyState: L("common.notAvailable")
|
|
382
382
|
})
|
|
383
383
|
}, e),
|
|
384
|
-
renderKeyValueListSection: ({ key: e, title: t, description: n, items: r }) => /* @__PURE__ */
|
|
384
|
+
renderKeyValueListSection: ({ key: e, title: t, description: n, items: r }) => /* @__PURE__ */ b(k, {
|
|
385
385
|
title: t,
|
|
386
386
|
description: n,
|
|
387
|
-
children: /* @__PURE__ */
|
|
387
|
+
children: /* @__PURE__ */ b(M, { items: r })
|
|
388
388
|
}, e)
|
|
389
389
|
})[0];
|
|
390
390
|
a != null && i.push(a);
|
|
391
391
|
});
|
|
392
|
-
let
|
|
393
|
-
className:
|
|
394
|
-
children: /* @__PURE__ */
|
|
395
|
-
className:
|
|
396
|
-
children:
|
|
392
|
+
let S = p.length > 0 ? /* @__PURE__ */ b("div", {
|
|
393
|
+
className: oe,
|
|
394
|
+
children: /* @__PURE__ */ b("div", {
|
|
395
|
+
className: ae,
|
|
396
|
+
children: p
|
|
397
397
|
})
|
|
398
|
-
}) : null,
|
|
399
|
-
className:
|
|
400
|
-
children: [/* @__PURE__ */
|
|
401
|
-
className: te,
|
|
402
|
-
children: b
|
|
403
|
-
}), /* @__PURE__ */ S("aside", {
|
|
398
|
+
}) : null, w = y.length > 0 ? /* @__PURE__ */ x("div", {
|
|
399
|
+
className: te,
|
|
400
|
+
children: [/* @__PURE__ */ b("div", {
|
|
404
401
|
className: ne,
|
|
405
|
-
children:
|
|
402
|
+
children: v
|
|
403
|
+
}), /* @__PURE__ */ b("aside", {
|
|
404
|
+
className: re,
|
|
405
|
+
children: y
|
|
406
406
|
})]
|
|
407
|
-
}) : /* @__PURE__ */
|
|
408
|
-
className:
|
|
409
|
-
children:
|
|
407
|
+
}) : /* @__PURE__ */ b("div", {
|
|
408
|
+
className: ie,
|
|
409
|
+
children: v
|
|
410
410
|
});
|
|
411
|
-
return /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ x(fe, { children: [
|
|
412
|
+
S,
|
|
412
413
|
w,
|
|
413
|
-
|
|
414
|
-
h != null && _(h) && /* @__PURE__ */ S(o, {
|
|
414
|
+
m != null && g(m) && /* @__PURE__ */ b(o, {
|
|
415
415
|
isOpen: !0,
|
|
416
|
-
action:
|
|
416
|
+
action: m,
|
|
417
417
|
node: n,
|
|
418
418
|
onClose: () => {
|
|
419
|
-
|
|
419
|
+
Y(null);
|
|
420
420
|
}
|
|
421
421
|
})
|
|
422
422
|
] });
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
|
-
},
|
|
425
|
+
}, Y = ({ prepared: e }) => /* @__PURE__ */ b(J, {
|
|
426
426
|
config: e.pageConfig,
|
|
427
427
|
prepared: e
|
|
428
428
|
});
|
|
429
429
|
//#endregion
|
|
430
|
-
export {
|
|
430
|
+
export { Y as BackofficeEntityDetailPage, Y as default };
|
|
431
431
|
|
|
432
432
|
//# sourceMappingURL=BackofficeEntityDetailPage.js.map
|