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