@plumile/backoffice-react 0.1.68 → 0.1.70
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/columns/buildDataTableColumns.js +7 -8
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailBadgeRow.js +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailBadgeRow.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailField.js +4 -4
- package/lib/esm/components/backoffice/detail/BackofficeDetailField.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailFlagTag.js +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailFlagTag.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js +26 -26
- package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailTaggedValue.js +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailTaggedValue.js.map +1 -1
- package/lib/esm/components/backoffice/layout/buildSidebarSections.js.map +1 -1
- package/lib/esm/components/backoffice/layout/mapViewerToSidebarProfileView.js.map +1 -1
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +17 -18
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
- package/lib/esm/components/backoffice/pickers/shared/EntityPickerList.js +7 -8
- package/lib/esm/components/backoffice/pickers/shared/EntityPickerList.js.map +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeContentError.js +1 -2
- package/lib/esm/components/backoffice/routing/BackofficeContentError.js.map +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeContentFallback.js +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeContentFallback.js.map +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeRouteFallback.js +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeRouteFallback.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +4 -11
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeTabbedDetailShell.js +3 -4
- package/lib/esm/components/backoffice/scaffolds/BackofficeTabbedDetailShell.js.map +1 -1
- package/lib/esm/components/backoffice/tools/BackofficeToolsQueryBoundary.js +4 -4
- package/lib/esm/components/backoffice/tools/BackofficeToolsQueryBoundary.js.map +1 -1
- package/lib/esm/pages/BackofficeDashboardPage.js +31 -32
- package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +167 -172
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeLayoutPage.js +30 -34
- package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
- package/lib/esm/pages/BackofficeToolsOperationPage.js +26 -27
- package/lib/esm/pages/BackofficeToolsOperationPage.js.map +1 -1
- package/lib/esm/pages/detail/buildTabsItems.js.map +1 -1
- package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeDetailFlagTag.d.ts +1 -1
- package/lib/types/components/backoffice/detail/BackofficeDetailFlagTag.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/buildSidebarSections.d.ts +2 -2
- package/lib/types/components/backoffice/layout/buildSidebarSections.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/mapViewerToSidebarProfileView.d.ts +1 -1
- package/lib/types/components/backoffice/layout/mapViewerToSidebarProfileView.d.ts.map +1 -1
- package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.d.ts.map +1 -1
- package/lib/types/components/backoffice/pickers/shared/EntityPickerList.d.ts.map +1 -1
- package/lib/types/components/backoffice/routing/BackofficeContentError.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.d.ts +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeLayoutPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeToolsOperationPage.d.ts.map +1 -1
- package/lib/types/pages/detail/buildTabsItems.d.ts +1 -1
- package/lib/types/pages/detail/buildTabsItems.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -22,36 +22,31 @@ import { headerActions as ee, headerBlock as te, headerMeta as ne, headerMetaLis
|
|
|
22
22
|
import { buildTabsItems as ie } from "./detail/buildTabsItems.js";
|
|
23
23
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
24
24
|
import { useTranslation as w } from "react-i18next";
|
|
25
|
-
import { BackofficeKeyValueList as
|
|
26
|
-
import { useContext as
|
|
27
|
-
import { commitMutation as
|
|
28
|
-
import { HighlightCode as P } from "@plumile/ui/atomic/molecules/highlight/HighlightCode.js";
|
|
25
|
+
import { BackofficeKeyValueList as ae, BackofficePageHeader as oe, BackofficeRelationsMenu as se, BackofficeTabs as ce, Button as le, DataTable as T, DetailPageTemplate as ue, FormattedDate as E, HighlightCode as D, LazyBackofficeJsonViewer as O, LinkButton as de, Tag as k, useToast as A } from "@plumile/ui";
|
|
26
|
+
import { useContext as j, useMemo as fe, useState as M } from "react";
|
|
27
|
+
import { commitMutation as pe, useFragment as N, usePreloadedQuery as P } from "react-relay";
|
|
29
28
|
import { HttpRedirect as F, Link as I, RoutingContext as L } from "@plumile/router";
|
|
30
29
|
import { BACKOFFICE_DATE_TIME_OPTIONS as R } from "@plumile/backoffice-core/constants.js";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import { SettingsXSvg as _e } from "@plumile/ui/icons/SettingsXSvg.js";
|
|
48
|
-
import { ShieldLockSvg as ve } from "@plumile/ui/icons/ShieldLockSvg.js";
|
|
49
|
-
import { ShieldOffSvg as ye } from "@plumile/ui/icons/ShieldOffSvg.js";
|
|
50
|
-
import { XBadgeSvg as be } from "@plumile/ui/icons/XBadgeSvg.js";
|
|
30
|
+
import { buildBackofficeFallbackListHref as me, buildBackofficeListHref as he, buildBackofficeListLink as ge } from "@plumile/backoffice-core/state/buildListHref.js";
|
|
31
|
+
import { setWhereValue as z } from "@plumile/backoffice-core/filters/where.js";
|
|
32
|
+
import { ChatCheckSvg as B } from "@plumile/ui/icons/ChatCheckSvg.js";
|
|
33
|
+
import { KeyOffSvg as V } from "@plumile/ui/icons/KeyOffSvg.js";
|
|
34
|
+
import { KeySvg as H } from "@plumile/ui/icons/KeySvg.js";
|
|
35
|
+
import { LockOpenSvg as U } from "@plumile/ui/icons/LockOpenSvg.js";
|
|
36
|
+
import { LockSvg as W } from "@plumile/ui/icons/LockSvg.js";
|
|
37
|
+
import { RobotCheckSvg as G } from "@plumile/ui/icons/RobotCheckSvg.js";
|
|
38
|
+
import { RobotXSvg as K } from "@plumile/ui/icons/RobotXSvg.js";
|
|
39
|
+
import { RocketOffSvg as q } from "@plumile/ui/icons/RocketOffSvg.js";
|
|
40
|
+
import { RocketSvg as J } from "@plumile/ui/icons/RocketSvg.js";
|
|
41
|
+
import { SettingsCheckSvg as _e } from "@plumile/ui/icons/SettingsCheckSvg.js";
|
|
42
|
+
import { SettingsXSvg as ve } from "@plumile/ui/icons/SettingsXSvg.js";
|
|
43
|
+
import { ShieldLockSvg as ye } from "@plumile/ui/icons/ShieldLockSvg.js";
|
|
44
|
+
import { ShieldOffSvg as be } from "@plumile/ui/icons/ShieldOffSvg.js";
|
|
45
|
+
import { XBadgeSvg as xe } from "@plumile/ui/icons/XBadgeSvg.js";
|
|
51
46
|
//#region src/pages/BackofficeEntityDetailPage.tsx
|
|
52
|
-
var
|
|
47
|
+
var Y = (e, t) => e(t), Se = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ce = (e) => {
|
|
53
48
|
throw Error(`Unexpected value: ${String(e)}`);
|
|
54
|
-
},
|
|
49
|
+
}, we = (e, t, n) => {
|
|
55
50
|
switch (e) {
|
|
56
51
|
case "yesNo": return t ? {
|
|
57
52
|
tone: "success",
|
|
@@ -63,7 +58,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
63
58
|
case "capability": return t ? {
|
|
64
59
|
tone: "success",
|
|
65
60
|
label: n("flags.capability.allowed"),
|
|
66
|
-
icon: /* @__PURE__ */ S(
|
|
61
|
+
icon: /* @__PURE__ */ S(ye, {
|
|
67
62
|
width: 14,
|
|
68
63
|
height: 14,
|
|
69
64
|
"aria-hidden": "true"
|
|
@@ -71,7 +66,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
71
66
|
} : {
|
|
72
67
|
tone: "neutral",
|
|
73
68
|
label: n("flags.capability.denied"),
|
|
74
|
-
icon: /* @__PURE__ */ S(
|
|
69
|
+
icon: /* @__PURE__ */ S(be, {
|
|
75
70
|
width: 14,
|
|
76
71
|
height: 14,
|
|
77
72
|
"aria-hidden": "true"
|
|
@@ -80,7 +75,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
80
75
|
case "enabled": return t ? {
|
|
81
76
|
tone: "success",
|
|
82
77
|
label: n("flags.enabled.enabled"),
|
|
83
|
-
icon: /* @__PURE__ */ S(
|
|
78
|
+
icon: /* @__PURE__ */ S(_e, {
|
|
84
79
|
width: 14,
|
|
85
80
|
height: 14,
|
|
86
81
|
"aria-hidden": "true"
|
|
@@ -88,7 +83,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
88
83
|
} : {
|
|
89
84
|
tone: "neutral",
|
|
90
85
|
label: n("flags.enabled.disabled"),
|
|
91
|
-
icon: /* @__PURE__ */ S(
|
|
86
|
+
icon: /* @__PURE__ */ S(ve, {
|
|
92
87
|
width: 14,
|
|
93
88
|
height: 14,
|
|
94
89
|
"aria-hidden": "true"
|
|
@@ -97,7 +92,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
97
92
|
case "failure": return t ? {
|
|
98
93
|
tone: "danger",
|
|
99
94
|
label: n("flags.failure.failed"),
|
|
100
|
-
icon: /* @__PURE__ */ S(
|
|
95
|
+
icon: /* @__PURE__ */ S(xe, {
|
|
101
96
|
width: 14,
|
|
102
97
|
height: 14,
|
|
103
98
|
"aria-hidden": "true"
|
|
@@ -105,7 +100,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
105
100
|
} : {
|
|
106
101
|
tone: "success",
|
|
107
102
|
label: n("flags.failure.ok"),
|
|
108
|
-
icon: /* @__PURE__ */ S(
|
|
103
|
+
icon: /* @__PURE__ */ S(B, {
|
|
109
104
|
width: 14,
|
|
110
105
|
height: 14,
|
|
111
106
|
"aria-hidden": "true"
|
|
@@ -114,7 +109,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
114
109
|
case "encrypted": return t ? {
|
|
115
110
|
tone: "info",
|
|
116
111
|
label: n("flags.encrypted.encrypted"),
|
|
117
|
-
icon: /* @__PURE__ */ S(
|
|
112
|
+
icon: /* @__PURE__ */ S(H, {
|
|
118
113
|
width: 14,
|
|
119
114
|
height: 14,
|
|
120
115
|
"aria-hidden": "true"
|
|
@@ -122,7 +117,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
122
117
|
} : {
|
|
123
118
|
tone: "neutral",
|
|
124
119
|
label: n("flags.encrypted.notEncrypted"),
|
|
125
|
-
icon: /* @__PURE__ */ S(
|
|
120
|
+
icon: /* @__PURE__ */ S(V, {
|
|
126
121
|
width: 14,
|
|
127
122
|
height: 14,
|
|
128
123
|
"aria-hidden": "true"
|
|
@@ -131,7 +126,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
131
126
|
case "locked": return t ? {
|
|
132
127
|
tone: "warning",
|
|
133
128
|
label: n("flags.locked.locked"),
|
|
134
|
-
icon: /* @__PURE__ */ S(
|
|
129
|
+
icon: /* @__PURE__ */ S(W, {
|
|
135
130
|
width: 14,
|
|
136
131
|
height: 14,
|
|
137
132
|
"aria-hidden": "true"
|
|
@@ -139,7 +134,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
139
134
|
} : {
|
|
140
135
|
tone: "success",
|
|
141
136
|
label: n("flags.locked.unlocked"),
|
|
142
|
-
icon: /* @__PURE__ */ S(
|
|
137
|
+
icon: /* @__PURE__ */ S(U, {
|
|
143
138
|
width: 14,
|
|
144
139
|
height: 14,
|
|
145
140
|
"aria-hidden": "true"
|
|
@@ -155,7 +150,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
155
150
|
case "agentManaged": return t ? {
|
|
156
151
|
tone: "info",
|
|
157
152
|
label: n("flags.agentManaged.agentManaged"),
|
|
158
|
-
icon: /* @__PURE__ */ S(
|
|
153
|
+
icon: /* @__PURE__ */ S(G, {
|
|
159
154
|
width: 14,
|
|
160
155
|
height: 14,
|
|
161
156
|
"aria-hidden": "true"
|
|
@@ -163,7 +158,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
163
158
|
} : {
|
|
164
159
|
tone: "neutral",
|
|
165
160
|
label: n("flags.agentManaged.userManaged"),
|
|
166
|
-
icon: /* @__PURE__ */ S(
|
|
161
|
+
icon: /* @__PURE__ */ S(K, {
|
|
167
162
|
width: 14,
|
|
168
163
|
height: 14,
|
|
169
164
|
"aria-hidden": "true"
|
|
@@ -172,7 +167,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
172
167
|
case "deployedProduction": return t ? {
|
|
173
168
|
tone: "success",
|
|
174
169
|
label: n("flags.deployedProduction.deployed"),
|
|
175
|
-
icon: /* @__PURE__ */ S(
|
|
170
|
+
icon: /* @__PURE__ */ S(J, {
|
|
176
171
|
width: 14,
|
|
177
172
|
height: 14,
|
|
178
173
|
"aria-hidden": "true"
|
|
@@ -180,7 +175,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
180
175
|
} : {
|
|
181
176
|
tone: "neutral",
|
|
182
177
|
label: n("flags.deployedProduction.notDeployed"),
|
|
183
|
-
icon: /* @__PURE__ */ S(
|
|
178
|
+
icon: /* @__PURE__ */ S(q, {
|
|
184
179
|
width: 14,
|
|
185
180
|
height: 14,
|
|
186
181
|
"aria-hidden": "true"
|
|
@@ -193,26 +188,26 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
193
188
|
tone: "neutral",
|
|
194
189
|
label: n("flags.forced.normal")
|
|
195
190
|
};
|
|
196
|
-
default: return
|
|
191
|
+
default: return Ce(e);
|
|
197
192
|
}
|
|
198
|
-
},
|
|
199
|
-
if (!
|
|
200
|
-
for (let t of Object.values(e)) if (
|
|
193
|
+
}, Te = (e) => {
|
|
194
|
+
if (!Se(e)) return null;
|
|
195
|
+
for (let t of Object.values(e)) if (Se(t) && ("status" in t || "result" in t)) return t;
|
|
201
196
|
return null;
|
|
202
|
-
},
|
|
197
|
+
}, Ee = (e) => e.kind === "route", De = (e) => e.kind === "mutation", Oe = (e) => e.kind === "formMutation", X = (e, t) => typeof e == "function" ? e(t) : e ?? null, ke = (e) => {
|
|
203
198
|
if (e == null) return null;
|
|
204
199
|
let t = e.trim();
|
|
205
200
|
return t === "" ? null : t;
|
|
206
|
-
},
|
|
201
|
+
}, Z = (e) => e == null ? !0 : typeof e == "string" ? e.trim() === "" : !1, Q = (e, t) => typeof e == "function" ? e(t) : e, Ae = (e, t) => {
|
|
207
202
|
let { tApp: n, t: r, resolveEntityHref: i } = t, a = r("common.notAvailable");
|
|
208
203
|
if (e.type === "text") {
|
|
209
|
-
let t =
|
|
210
|
-
return
|
|
204
|
+
let t = X(e.value, n);
|
|
205
|
+
return Z(t) ? a : t;
|
|
211
206
|
}
|
|
212
207
|
if (e.type === "entityRef") {
|
|
213
208
|
let { id: t } = e;
|
|
214
209
|
if (t == null || t.trim() === "") return a;
|
|
215
|
-
let r =
|
|
210
|
+
let r = X(e.label, n), o = r != null && String(r).trim() !== "" ? r : null;
|
|
216
211
|
if (o == null) return a;
|
|
217
212
|
let s = i?.(e.entity, t) ?? null;
|
|
218
213
|
return s == null ? o : /* @__PURE__ */ S(I, {
|
|
@@ -222,21 +217,21 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
222
217
|
}
|
|
223
218
|
let { href: o } = e;
|
|
224
219
|
if (o == null || o.trim() === "") return a;
|
|
225
|
-
let s =
|
|
226
|
-
return
|
|
220
|
+
let s = X(e.label, n);
|
|
221
|
+
return Z(s) ? a : /* @__PURE__ */ S(I, {
|
|
227
222
|
to: o,
|
|
228
223
|
children: s
|
|
229
224
|
});
|
|
230
|
-
},
|
|
225
|
+
}, je = (e, t, n) => {
|
|
231
226
|
let { tApp: r, t: i, resolveEntityHref: a, formatNumber: o, formatCurrency: c, formatPercent: l, relationEntityListRoutes: d, resolveRelationItem: f } = n, m = [], h = [], g = [], _ = i("common.notAvailable");
|
|
232
227
|
return e.forEach((e, n) => {
|
|
233
228
|
let v = `${e.type}-${n}`;
|
|
234
229
|
switch (e.type) {
|
|
235
230
|
case "text": {
|
|
236
|
-
let n =
|
|
231
|
+
let n = X(e.value(t), r);
|
|
237
232
|
m.push({
|
|
238
233
|
id: v,
|
|
239
|
-
label:
|
|
234
|
+
label: Y(e.label, r),
|
|
240
235
|
size: e.size,
|
|
241
236
|
value: n,
|
|
242
237
|
copyValue: e.copyValue?.(t) ?? void 0,
|
|
@@ -245,13 +240,13 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
245
240
|
break;
|
|
246
241
|
}
|
|
247
242
|
case "badge": {
|
|
248
|
-
let n =
|
|
243
|
+
let n = X(e.value(t), r), i = n == null ? "" : String(n), a = Q(e.tone, t), o = i.trim() === "" ? null : /* @__PURE__ */ S(k, {
|
|
249
244
|
tone: a,
|
|
250
245
|
children: i
|
|
251
246
|
});
|
|
252
247
|
m.push({
|
|
253
248
|
id: v,
|
|
254
|
-
label:
|
|
249
|
+
label: Y(e.label, r),
|
|
255
250
|
size: e.size,
|
|
256
251
|
value: o
|
|
257
252
|
});
|
|
@@ -259,7 +254,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
259
254
|
}
|
|
260
255
|
case "badgeRow": {
|
|
261
256
|
let n = e.items(t).map((e) => {
|
|
262
|
-
let t =
|
|
257
|
+
let t = X(e.label, r), n = t == null ? "" : String(t);
|
|
263
258
|
return {
|
|
264
259
|
...e,
|
|
265
260
|
label: n
|
|
@@ -267,7 +262,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
267
262
|
}), i = n.length > 0 ? /* @__PURE__ */ S(s, { items: n }) : null;
|
|
268
263
|
m.push({
|
|
269
264
|
id: v,
|
|
270
|
-
label:
|
|
265
|
+
label: Y(e.label, r),
|
|
271
266
|
size: e.size,
|
|
272
267
|
value: i,
|
|
273
268
|
fullWidth: e.fullWidth
|
|
@@ -278,9 +273,9 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
278
273
|
let n = e.value(t);
|
|
279
274
|
m.push({
|
|
280
275
|
id: v,
|
|
281
|
-
label:
|
|
276
|
+
label: Y(e.label, r),
|
|
282
277
|
size: e.size,
|
|
283
|
-
value: /* @__PURE__ */ S(
|
|
278
|
+
value: /* @__PURE__ */ S(E, {
|
|
284
279
|
value: n,
|
|
285
280
|
options: R,
|
|
286
281
|
fallback: i("common.notAvailable")
|
|
@@ -292,7 +287,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
292
287
|
let n = e.value(t), i = null;
|
|
293
288
|
n != null && (i = e.format === "currency" ? c(n) : e.format === "percent" ? l(n) : o(n)), m.push({
|
|
294
289
|
id: v,
|
|
295
|
-
label:
|
|
290
|
+
label: Y(e.label, r),
|
|
296
291
|
size: e.size,
|
|
297
292
|
value: i
|
|
298
293
|
});
|
|
@@ -301,7 +296,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
301
296
|
case "flag": {
|
|
302
297
|
let n = e.value(t), a = null;
|
|
303
298
|
if (n != null) {
|
|
304
|
-
let t =
|
|
299
|
+
let t = we(e.variant, n, i);
|
|
305
300
|
a = /* @__PURE__ */ S(u, {
|
|
306
301
|
tone: t.tone,
|
|
307
302
|
icon: t.icon,
|
|
@@ -310,7 +305,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
310
305
|
}
|
|
311
306
|
m.push({
|
|
312
307
|
id: v,
|
|
313
|
-
label:
|
|
308
|
+
label: Y(e.label, r),
|
|
314
309
|
size: e.size,
|
|
315
310
|
value: a
|
|
316
311
|
});
|
|
@@ -327,34 +322,34 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
327
322
|
}
|
|
328
323
|
m.push({
|
|
329
324
|
id: v,
|
|
330
|
-
label:
|
|
325
|
+
label: Y(e.label, r),
|
|
331
326
|
size: e.size,
|
|
332
327
|
value: i ?? _
|
|
333
328
|
});
|
|
334
329
|
break;
|
|
335
330
|
}
|
|
336
331
|
case "link": {
|
|
337
|
-
let n = e.href(t), i = e.value(t), a = n != null && n.trim() !== "" && !
|
|
332
|
+
let n = e.href(t), i = e.value(t), a = n != null && n.trim() !== "" && !Z(i) ? /* @__PURE__ */ S(I, {
|
|
338
333
|
to: n,
|
|
339
334
|
children: i
|
|
340
335
|
}) : null;
|
|
341
336
|
m.push({
|
|
342
337
|
id: v,
|
|
343
|
-
label:
|
|
338
|
+
label: Y(e.label, r),
|
|
344
339
|
size: e.size,
|
|
345
340
|
value: a
|
|
346
341
|
});
|
|
347
342
|
break;
|
|
348
343
|
}
|
|
349
344
|
case "taggedValue": {
|
|
350
|
-
let n = e.tag(t), o =
|
|
345
|
+
let n = e.tag(t), o = Ae(e.value(t), {
|
|
351
346
|
tApp: r,
|
|
352
347
|
t: i,
|
|
353
348
|
resolveEntityHref: a
|
|
354
349
|
}), s = n == null ? null : {
|
|
355
350
|
...n,
|
|
356
351
|
label: (() => {
|
|
357
|
-
let e =
|
|
352
|
+
let e = X(n.label, r);
|
|
358
353
|
return e == null ? "" : String(e);
|
|
359
354
|
})()
|
|
360
355
|
}, c = s != null || o != null ? /* @__PURE__ */ S(p, {
|
|
@@ -363,7 +358,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
363
358
|
}) : null;
|
|
364
359
|
m.push({
|
|
365
360
|
id: v,
|
|
366
|
-
label:
|
|
361
|
+
label: Y(e.label, r),
|
|
367
362
|
size: e.size,
|
|
368
363
|
value: c,
|
|
369
364
|
fullWidth: e.fullWidth
|
|
@@ -371,11 +366,11 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
371
366
|
break;
|
|
372
367
|
}
|
|
373
368
|
case "relation": {
|
|
374
|
-
let n =
|
|
369
|
+
let n = ke(e.value(t));
|
|
375
370
|
if (n == null) break;
|
|
376
371
|
let i = d[e.entity];
|
|
377
372
|
if (i == null) break;
|
|
378
|
-
let a =
|
|
373
|
+
let a = Y(e.label, r), o = e.count?.(t) ?? null, s = z(null, e.whereKey, n, e.path);
|
|
379
374
|
if (s == null) break;
|
|
380
375
|
h.push(f({
|
|
381
376
|
id: v,
|
|
@@ -397,7 +392,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
397
392
|
if (e.label != null) {
|
|
398
393
|
m.push({
|
|
399
394
|
id: v,
|
|
400
|
-
label:
|
|
395
|
+
label: Y(e.label, r),
|
|
401
396
|
size: e.size,
|
|
402
397
|
value: n,
|
|
403
398
|
fullWidth: e.fullWidth
|
|
@@ -414,9 +409,9 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
414
409
|
relationItems: h,
|
|
415
410
|
customNodes: g
|
|
416
411
|
};
|
|
417
|
-
},
|
|
412
|
+
}, Me = (e, t, n) => {
|
|
418
413
|
let { tApp: r, t: i, resolveEntityHref: a } = n, o = i("common.notAvailable");
|
|
419
|
-
if (e.type === "dateTime") return /* @__PURE__ */ S(
|
|
414
|
+
if (e.type === "dateTime") return /* @__PURE__ */ S(E, {
|
|
420
415
|
value: e.value(t),
|
|
421
416
|
options: R,
|
|
422
417
|
fallback: o
|
|
@@ -424,7 +419,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
424
419
|
if (e.type === "entityRef") {
|
|
425
420
|
let n = e.id(t);
|
|
426
421
|
if (n == null || n.trim() === "") return o;
|
|
427
|
-
let i =
|
|
422
|
+
let i = X(e.value?.(t), r), s = i != null && String(i).trim() !== "" ? i : null;
|
|
428
423
|
if (s == null) return o;
|
|
429
424
|
let c = a?.(e.entity, n) ?? null;
|
|
430
425
|
return c == null ? s : /* @__PURE__ */ S(I, {
|
|
@@ -433,18 +428,18 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
433
428
|
});
|
|
434
429
|
}
|
|
435
430
|
if (e.type === "link") {
|
|
436
|
-
let n = e.href(t), i =
|
|
437
|
-
return n == null || n.trim() === "" ||
|
|
431
|
+
let n = e.href(t), i = X(e.value(t), r);
|
|
432
|
+
return n == null || n.trim() === "" || Z(i) ? o : /* @__PURE__ */ S(I, {
|
|
438
433
|
to: n,
|
|
439
434
|
children: i
|
|
440
435
|
});
|
|
441
436
|
}
|
|
442
|
-
let s =
|
|
443
|
-
return
|
|
444
|
-
},
|
|
437
|
+
let s = X(e.value(t), r);
|
|
438
|
+
return Z(s) ? o : s;
|
|
439
|
+
}, Ne = (e, t, n) => {
|
|
445
440
|
if (e.type === "badgeRow") {
|
|
446
441
|
let r = e.items(t).map((e) => {
|
|
447
|
-
let t =
|
|
442
|
+
let t = X(e.label, n), r = t == null ? "" : String(t);
|
|
448
443
|
return {
|
|
449
444
|
...e,
|
|
450
445
|
label: r
|
|
@@ -452,41 +447,41 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
452
447
|
});
|
|
453
448
|
return r.length === 0 ? void 0 : /* @__PURE__ */ S(s, { items: r });
|
|
454
449
|
}
|
|
455
|
-
let r =
|
|
456
|
-
if (i.trim() !== "") return /* @__PURE__ */ S(
|
|
457
|
-
tone:
|
|
450
|
+
let r = X(e.value(t), n), i = r == null ? "" : String(r);
|
|
451
|
+
if (i.trim() !== "") return /* @__PURE__ */ S(k, {
|
|
452
|
+
tone: Q(e.tone, t),
|
|
458
453
|
children: i
|
|
459
454
|
});
|
|
460
|
-
},
|
|
461
|
-
let { tApp: r, t: i, resolveEntityHref: a } = n, o = e.titleValue?.(t, r) ??
|
|
455
|
+
}, Pe = (e, t, n) => {
|
|
456
|
+
let { tApp: r, t: i, resolveEntityHref: a } = n, o = e.titleValue?.(t, r) ?? Y(e.title, r), s = o.trim() === "" ? Y(e.title, r) : o, c;
|
|
462
457
|
if (e.subtitleItems != null && e.subtitleItems.length > 0) {
|
|
463
458
|
let n = e.subtitleSeparator ?? " / ", o = [], { subtitleItems: s } = e;
|
|
464
459
|
s.forEach((e, c) => {
|
|
465
460
|
let l = e.value(t);
|
|
466
|
-
o.push(/* @__PURE__ */ S("span", { children:
|
|
461
|
+
o.push(/* @__PURE__ */ S("span", { children: Ae(l, {
|
|
467
462
|
tApp: r,
|
|
468
463
|
t: i,
|
|
469
464
|
resolveEntityHref: a
|
|
470
465
|
}) }, e.id)), c < s.length - 1 && o.push(/* @__PURE__ */ S("span", { children: n }, `${e.id}-sep`));
|
|
471
466
|
}), c = /* @__PURE__ */ S("span", { children: o });
|
|
472
467
|
} else {
|
|
473
|
-
let n = e.subtitleValue?.(t, r) ?? (e.subtitle == null ? null :
|
|
468
|
+
let n = e.subtitleValue?.(t, r) ?? (e.subtitle == null ? null : Y(e.subtitle, r));
|
|
474
469
|
c = n != null && n.trim() !== "" ? n : void 0;
|
|
475
470
|
}
|
|
476
471
|
let l = [];
|
|
477
472
|
e.badges != null && e.badges.forEach((e, n) => {
|
|
478
|
-
let i =
|
|
473
|
+
let i = Y(e.label, r), a = X(e.value(t), r), o = a == null ? "" : String(a);
|
|
479
474
|
if (o.trim() === "") return;
|
|
480
|
-
let s =
|
|
481
|
-
l.push(/* @__PURE__ */ S(
|
|
475
|
+
let s = Q(e.tone, t);
|
|
476
|
+
l.push(/* @__PURE__ */ S(k, {
|
|
482
477
|
tone: s,
|
|
483
478
|
children: `${i}: ${o}`
|
|
484
479
|
}, `${i}-${n}`));
|
|
485
480
|
});
|
|
486
481
|
let u;
|
|
487
|
-
e.status != null && (u =
|
|
482
|
+
e.status != null && (u = Ne(e.status, t, r));
|
|
488
483
|
let d = e.meta?.map((e, n) => {
|
|
489
|
-
let o =
|
|
484
|
+
let o = Y(e.label, r), s = Me(e, t, {
|
|
490
485
|
tApp: r,
|
|
491
486
|
t: i,
|
|
492
487
|
resolveEntityHref: a
|
|
@@ -504,18 +499,18 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
504
499
|
status: u,
|
|
505
500
|
items: d
|
|
506
501
|
};
|
|
507
|
-
},
|
|
502
|
+
}, Fe = (e, t, n) => {
|
|
508
503
|
let { tApp: r, t: i, resolveEntityHref: a } = n;
|
|
509
504
|
return e == null || e.length === 0 ? [] : e.map((e, s) => {
|
|
510
505
|
let u = n.keyPrefix == null ? `${e.kind}-${s}` : `${n.keyPrefix}-${e.kind}-${s}`;
|
|
511
506
|
if (e.kind === "custom") {
|
|
512
507
|
let n = e.render(t);
|
|
513
508
|
return n == null ? null : e.label == null ? /* @__PURE__ */ S("div", { children: n }, u) : /* @__PURE__ */ S(c, {
|
|
514
|
-
title:
|
|
509
|
+
title: Y(e.label, r),
|
|
515
510
|
children: n
|
|
516
511
|
}, u);
|
|
517
512
|
}
|
|
518
|
-
let p =
|
|
513
|
+
let p = Y(e.label, r), m = e.description == null ? void 0 : Y(e.description, r);
|
|
519
514
|
if (e.kind === "relationList") {
|
|
520
515
|
let n = e.value(t);
|
|
521
516
|
return /* @__PURE__ */ S(f, {
|
|
@@ -531,7 +526,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
531
526
|
return /* @__PURE__ */ S(c, {
|
|
532
527
|
title: p,
|
|
533
528
|
description: m,
|
|
534
|
-
children: /* @__PURE__ */ S(
|
|
529
|
+
children: /* @__PURE__ */ S(T, {
|
|
535
530
|
columns: o(e.columns, {
|
|
536
531
|
tApp: r,
|
|
537
532
|
t: i,
|
|
@@ -551,7 +546,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
551
546
|
if (e.kind === "json") return /* @__PURE__ */ S(c, {
|
|
552
547
|
title: p,
|
|
553
548
|
description: m,
|
|
554
|
-
children: /* @__PURE__ */ S(
|
|
549
|
+
children: /* @__PURE__ */ S(O, {
|
|
555
550
|
value: e.value(t),
|
|
556
551
|
title: p
|
|
557
552
|
})
|
|
@@ -561,7 +556,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
561
556
|
return /* @__PURE__ */ S(c, {
|
|
562
557
|
title: p,
|
|
563
558
|
description: m,
|
|
564
|
-
children: /* @__PURE__ */ S(
|
|
559
|
+
children: /* @__PURE__ */ S(D, {
|
|
565
560
|
badgeLabel: i("tools.output"),
|
|
566
561
|
copyCode: n,
|
|
567
562
|
fallbackCodeText: n
|
|
@@ -580,8 +575,8 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
580
575
|
}, u) : /* @__PURE__ */ S(c, {
|
|
581
576
|
title: p,
|
|
582
577
|
description: m,
|
|
583
|
-
children: /* @__PURE__ */ S(
|
|
584
|
-
let a =
|
|
578
|
+
children: /* @__PURE__ */ S(ae, { items: e.items.map((e, n) => {
|
|
579
|
+
let a = Y(e.label, r), o = X(e.value(t), r);
|
|
585
580
|
return {
|
|
586
581
|
id: `${a}-${n}`,
|
|
587
582
|
label: a,
|
|
@@ -590,59 +585,59 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
590
585
|
}) })
|
|
591
586
|
}, u);
|
|
592
587
|
});
|
|
593
|
-
},
|
|
594
|
-
let { t: l } = w(), { t: u } = t(), { formatNumber: d, formatCurrency: f, formatPercent: p } = v(), { entities:
|
|
588
|
+
}, Ie = ({ config: o, prepared: s }) => {
|
|
589
|
+
let { t: l } = w(), { t: u } = t(), { formatNumber: d, formatCurrency: f, formatPercent: p } = v(), { entities: T, entityRegistry: E } = n(), { layoutView: D } = b(), O = j(L), k = _(), I = A(), [R, z] = M({}), [B, V] = M(null), H = y({
|
|
595
590
|
mainPage: o.pages.mainPage,
|
|
596
591
|
subPages: o.pages.subPages,
|
|
597
592
|
activePagePath: s.pagePath,
|
|
598
|
-
node:
|
|
599
|
-
}),
|
|
600
|
-
|
|
593
|
+
node: D
|
|
594
|
+
}), U = H.activePage ?? o.pages.mainPage, W = H.pages.length > 0 ? H.pages : [o.pages.mainPage], G = (e, t) => {
|
|
595
|
+
z((n) => n[e] === t ? n : {
|
|
601
596
|
...n,
|
|
602
597
|
[e]: t
|
|
603
598
|
});
|
|
604
|
-
}, { page:
|
|
599
|
+
}, { page: K } = o, q = P(K.query, s.pageQuery), J = K.resolveNode(q, {
|
|
605
600
|
id: s.id,
|
|
606
601
|
detailId: s.detailId
|
|
607
602
|
});
|
|
608
|
-
if (
|
|
609
|
-
let
|
|
610
|
-
let t =
|
|
603
|
+
if (J == null) throw new F(o.routes.list);
|
|
604
|
+
let _e = N(K.fragment, J), ve = fe(() => Object.fromEntries(K.content.flatMap((e) => e.kind === "section" ? e.fields.flatMap((e) => e.type === "relation" ? [e.entity] : []) : []).flatMap((e) => {
|
|
605
|
+
let t = T[e];
|
|
611
606
|
return t?.hasList === !0 ? [[e, t.routes.list]] : [];
|
|
612
|
-
})), [
|
|
607
|
+
})), [T, K.content]);
|
|
613
608
|
return /* @__PURE__ */ S(g, {
|
|
614
|
-
node:
|
|
609
|
+
node: _e,
|
|
615
610
|
render: (t) => {
|
|
616
|
-
let n =
|
|
617
|
-
pages:
|
|
611
|
+
let n = K.toView(t), g = ie({
|
|
612
|
+
pages: W,
|
|
618
613
|
id: s.id,
|
|
619
614
|
tApp: l,
|
|
620
615
|
detailPageHref: o.routes.detailPage
|
|
621
616
|
}), _ = (e, t) => {
|
|
622
|
-
let n =
|
|
617
|
+
let n = T[e];
|
|
623
618
|
return n == null ? null : n.routes.detail(t);
|
|
624
619
|
}, v = ({ id: e, label: t, count: n, entityId: r, filterId: i, listRoute: a, path: o, value: s, where: c, whereKey: l }) => {
|
|
625
|
-
let u =
|
|
620
|
+
let u = E.getLoadedListEntity(r);
|
|
626
621
|
return {
|
|
627
622
|
id: e,
|
|
628
623
|
label: t,
|
|
629
624
|
count: n,
|
|
630
|
-
href: u == null ?
|
|
625
|
+
href: u == null ? me(a, c, [{
|
|
631
626
|
id: i ?? (o == null ? l : `${l}.${o.join(".")}`),
|
|
632
627
|
value: s
|
|
633
|
-
}]) :
|
|
628
|
+
}]) : he(u.config, { where: c }),
|
|
634
629
|
onClick: async (e) => {
|
|
635
|
-
if (
|
|
630
|
+
if (O == null || e.defaultPrevented || e.button !== 0 || e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;
|
|
636
631
|
e.preventDefault();
|
|
637
|
-
let t =
|
|
638
|
-
|
|
632
|
+
let t = ge((await E.loadListEntity(r)).config, { where: c });
|
|
633
|
+
O.history.push({
|
|
639
634
|
pathname: t.pathname,
|
|
640
635
|
search: t.search === "" ? "" : `?${t.search}`,
|
|
641
636
|
hash: ""
|
|
642
637
|
});
|
|
643
638
|
}
|
|
644
639
|
};
|
|
645
|
-
}, y =
|
|
640
|
+
}, y = Pe(o.header, D, {
|
|
646
641
|
tApp: l,
|
|
647
642
|
t: u,
|
|
648
643
|
resolveEntityHref: _
|
|
@@ -650,32 +645,32 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
650
645
|
config: o,
|
|
651
646
|
tApp: l,
|
|
652
647
|
entityId: s.id,
|
|
653
|
-
layoutView:
|
|
654
|
-
pageLabel:
|
|
655
|
-
}), w =
|
|
648
|
+
layoutView: D,
|
|
649
|
+
pageLabel: U.label(l)
|
|
650
|
+
}), w = K.actions ?? [], A = [];
|
|
656
651
|
if (w.length > 0) {
|
|
657
652
|
let t = w.filter((e) => e.isVisible == null ? !0 : e.isVisible(n));
|
|
658
|
-
t.length > 0 && (
|
|
659
|
-
let a =
|
|
660
|
-
return
|
|
653
|
+
t.length > 0 && (A = t.map((t) => {
|
|
654
|
+
let a = Y(t.label, l), o = t.ariaLabel == null ? a : Y(t.ariaLabel, l), s = t.variant ?? "secondary", c = t.size ?? "small", d = R[t.id] ?? !1, f = d || t.isDisabled?.(n) === !0;
|
|
655
|
+
return Ee(t) ? /* @__PURE__ */ S(de, {
|
|
661
656
|
to: t.to(n),
|
|
662
657
|
variant: s,
|
|
663
658
|
size: c,
|
|
664
659
|
isDisabled: f,
|
|
665
660
|
"aria-label": o,
|
|
666
661
|
children: a
|
|
667
|
-
}, t.id) :
|
|
662
|
+
}, t.id) : Oe(t) ? /* @__PURE__ */ S(le, {
|
|
668
663
|
type: "button",
|
|
669
664
|
variant: s,
|
|
670
665
|
size: c,
|
|
671
666
|
isLoading: !1,
|
|
672
667
|
disabled: f,
|
|
673
668
|
onClick: () => {
|
|
674
|
-
|
|
669
|
+
V(t.id);
|
|
675
670
|
},
|
|
676
671
|
"aria-label": o,
|
|
677
672
|
children: a
|
|
678
|
-
}, t.id) :
|
|
673
|
+
}, t.id) : De(t) ? /* @__PURE__ */ S(le, {
|
|
679
674
|
type: "button",
|
|
680
675
|
variant: s,
|
|
681
676
|
size: c,
|
|
@@ -684,30 +679,30 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
684
679
|
onClick: () => {
|
|
685
680
|
if (d) return;
|
|
686
681
|
let a = t.getVariables(n);
|
|
687
|
-
|
|
682
|
+
G(t.id, !0), pe(k, {
|
|
688
683
|
mutation: t.mutation,
|
|
689
684
|
variables: a,
|
|
690
685
|
updater: (e) => {
|
|
691
686
|
t.updater?.(e, n);
|
|
692
687
|
},
|
|
693
688
|
onCompleted: (a) => {
|
|
694
|
-
|
|
695
|
-
let o =
|
|
689
|
+
G(t.id, !1);
|
|
690
|
+
let o = Te(a);
|
|
696
691
|
if (o != null) {
|
|
697
692
|
let i = u("actions.form.errors.invalidPayload");
|
|
698
|
-
t.toasts?.error?.message == null ? t.toasts?.error?.title != null && (i =
|
|
693
|
+
t.toasts?.error?.message == null ? t.toasts?.error?.title != null && (i = Y(t.toasts.error.title, l)) : i = Y(t.toasts.error.message, l);
|
|
699
694
|
let a = e(o, {
|
|
700
695
|
defaultErrorMessage: i,
|
|
701
696
|
mapReason: (e) => {
|
|
702
697
|
let r = t.mapErrorReason?.(e, n);
|
|
703
|
-
return r == null ? null : typeof r == "function" ?
|
|
698
|
+
return r == null ? null : typeof r == "function" ? Y(r, l) : String(r);
|
|
704
699
|
}
|
|
705
700
|
});
|
|
706
701
|
if (!a.ok) {
|
|
707
702
|
let e = Error(a.message);
|
|
708
703
|
if (t.onError?.(e, n), t.toasts?.error != null) {
|
|
709
704
|
let e = r(t.toasts.error, l);
|
|
710
|
-
|
|
705
|
+
I.error(e.title, e.message);
|
|
711
706
|
}
|
|
712
707
|
return;
|
|
713
708
|
}
|
|
@@ -718,13 +713,13 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
718
713
|
response: a,
|
|
719
714
|
node: n,
|
|
720
715
|
tApp: l,
|
|
721
|
-
entities:
|
|
716
|
+
entities: T,
|
|
722
717
|
defaultLabel: u("actions.view"),
|
|
723
718
|
navigateTo: (e) => {
|
|
724
|
-
|
|
719
|
+
O?.history.push({ pathname: e });
|
|
725
720
|
}
|
|
726
721
|
});
|
|
727
|
-
|
|
722
|
+
I.push({
|
|
728
723
|
kind: "info",
|
|
729
724
|
title: e.title,
|
|
730
725
|
message: e.message,
|
|
@@ -733,9 +728,9 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
733
728
|
}
|
|
734
729
|
},
|
|
735
730
|
onError: (e) => {
|
|
736
|
-
if (
|
|
731
|
+
if (G(t.id, !1), t.onError?.(e, n), t.toasts?.error != null) {
|
|
737
732
|
let e = r(t.toasts.error, l);
|
|
738
|
-
|
|
733
|
+
I.error(e.title, e.message);
|
|
739
734
|
}
|
|
740
735
|
}
|
|
741
736
|
});
|
|
@@ -745,22 +740,22 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
745
740
|
}, t.id) : null;
|
|
746
741
|
}));
|
|
747
742
|
}
|
|
748
|
-
let
|
|
749
|
-
|
|
750
|
-
let r = (e.placement ?? "primary") === "secondary" ?
|
|
743
|
+
let j = w.find((e) => e.id === B), { content: fe } = K, M = [], N = [], P = [];
|
|
744
|
+
fe.forEach((e, t) => {
|
|
745
|
+
let r = (e.placement ?? "primary") === "secondary" ? N : M;
|
|
751
746
|
if (e.kind === "section") {
|
|
752
|
-
let i =
|
|
747
|
+
let i = Y(e.title, l), a = e.description == null ? void 0 : Y(e.description, l), { items: o, relationItems: s, customNodes: m } = je(e.fields, n, {
|
|
753
748
|
tApp: l,
|
|
754
749
|
t: u,
|
|
755
750
|
resolveEntityHref: _,
|
|
756
751
|
formatNumber: d,
|
|
757
752
|
formatCurrency: f,
|
|
758
753
|
formatPercent: p,
|
|
759
|
-
relationEntityListRoutes:
|
|
754
|
+
relationEntityListRoutes: ve,
|
|
760
755
|
resolveRelationItem: v
|
|
761
756
|
});
|
|
762
757
|
if (s.forEach((e) => {
|
|
763
|
-
|
|
758
|
+
P.some((t) => t.id === e.id) || P.push(e);
|
|
764
759
|
}), !(o.length > 0 || m.length > 0)) return;
|
|
765
760
|
r.push(/* @__PURE__ */ S(c, {
|
|
766
761
|
title: i,
|
|
@@ -770,7 +765,7 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
770
765
|
}, `${i}-${t}`));
|
|
771
766
|
return;
|
|
772
767
|
}
|
|
773
|
-
let i =
|
|
768
|
+
let i = Fe([e], n, {
|
|
774
769
|
tApp: l,
|
|
775
770
|
t: u,
|
|
776
771
|
resolveEntityHref: _,
|
|
@@ -778,51 +773,51 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
778
773
|
})[0];
|
|
779
774
|
i != null && r.push(i);
|
|
780
775
|
});
|
|
781
|
-
let F =
|
|
776
|
+
let F = P.length > 0 ? /* @__PURE__ */ S(se, {
|
|
782
777
|
label: u("relations.menu.label"),
|
|
783
|
-
items:
|
|
784
|
-
}) : null, L =
|
|
778
|
+
items: P
|
|
779
|
+
}) : null, L = A.length > 0 || F != null ? /* @__PURE__ */ C("div", {
|
|
785
780
|
className: ee,
|
|
786
|
-
children: [
|
|
787
|
-
}) : void 0,
|
|
781
|
+
children: [A, F]
|
|
782
|
+
}) : void 0, z = y.status != null || y.badges != null ? /* @__PURE__ */ C("div", {
|
|
788
783
|
className: ne,
|
|
789
784
|
children: [y.status, y.badges]
|
|
790
|
-
}) : void 0,
|
|
785
|
+
}) : void 0, H = y.items != null && y.items.length > 0 ? /* @__PURE__ */ S("div", {
|
|
791
786
|
className: re,
|
|
792
|
-
children: /* @__PURE__ */ S(
|
|
793
|
-
}) : null,
|
|
794
|
-
return
|
|
787
|
+
children: /* @__PURE__ */ S(ae, { items: y.items })
|
|
788
|
+
}) : null, q = N.length > 0, J = null;
|
|
789
|
+
return W.length > 1 && (J = /* @__PURE__ */ S(ce, {
|
|
795
790
|
items: g,
|
|
796
|
-
activeId:
|
|
791
|
+
activeId: U.id,
|
|
797
792
|
onChange: () => {}
|
|
798
793
|
})), /* @__PURE__ */ C(m, {
|
|
799
794
|
breadcrumb: b,
|
|
800
|
-
children: [/* @__PURE__ */ S(
|
|
795
|
+
children: [/* @__PURE__ */ S(ue, {
|
|
801
796
|
headerNode: /* @__PURE__ */ C("div", {
|
|
802
797
|
className: te,
|
|
803
|
-
children: [/* @__PURE__ */ S(
|
|
798
|
+
children: [/* @__PURE__ */ S(oe, {
|
|
804
799
|
title: y.title,
|
|
805
800
|
subtitle: y.subtitle,
|
|
806
801
|
actions: L,
|
|
807
|
-
meta:
|
|
808
|
-
}),
|
|
802
|
+
meta: z
|
|
803
|
+
}), H]
|
|
809
804
|
}),
|
|
810
|
-
tabsNode:
|
|
811
|
-
sidePanel:
|
|
805
|
+
tabsNode: J,
|
|
806
|
+
sidePanel: q ? /* @__PURE__ */ S(x, { children: N }) : void 0,
|
|
812
807
|
sidePanelVariant: "plain",
|
|
813
|
-
children: /* @__PURE__ */ S(x, { children:
|
|
814
|
-
}),
|
|
808
|
+
children: /* @__PURE__ */ S(x, { children: M })
|
|
809
|
+
}), j != null && Oe(j) && /* @__PURE__ */ S(a, {
|
|
815
810
|
isOpen: !0,
|
|
816
|
-
action:
|
|
811
|
+
action: j,
|
|
817
812
|
node: n,
|
|
818
813
|
onClose: () => {
|
|
819
|
-
|
|
814
|
+
V(null);
|
|
820
815
|
}
|
|
821
816
|
})]
|
|
822
817
|
});
|
|
823
818
|
}
|
|
824
819
|
});
|
|
825
|
-
},
|
|
820
|
+
}, $ = ({ config: e, prepared: t }) => {
|
|
826
821
|
let { layoutView: n } = b(), r = y({
|
|
827
822
|
mainPage: e.pages.mainPage,
|
|
828
823
|
subPages: e.pages.subPages,
|
|
@@ -831,12 +826,12 @@ var X = (e, t) => e(t), xe = (e) => typeof e == "object" && !!e && !Array.isArra
|
|
|
831
826
|
});
|
|
832
827
|
if (!r.hasVisiblePages || r.activePage == null) throw new F(e.routes.list);
|
|
833
828
|
if (r.activePage.id !== t.pageId) throw new F(e.routes.detailPage(t.id, r.activePage.id));
|
|
834
|
-
return /* @__PURE__ */ S(
|
|
829
|
+
return /* @__PURE__ */ S(Ie, {
|
|
835
830
|
config: t.pageConfig,
|
|
836
831
|
prepared: t
|
|
837
832
|
});
|
|
838
833
|
};
|
|
839
834
|
//#endregion
|
|
840
|
-
export {
|
|
835
|
+
export { $ as BackofficeEntityDetailPage, $ as default };
|
|
841
836
|
|
|
842
837
|
//# sourceMappingURL=BackofficeEntityDetailPage.js.map
|