@plumile/backoffice-react 0.1.171 → 0.1.173
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/components/backoffice/detail/backofficeUsageCostBreakdown.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/layout/breadcrumb/backofficeTopbarBreadcrumb.css.js +1 -0
- 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/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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TechnicalIdentifierValue as e, normalizeTechnicalIdentifier as t } from "../components/backoffice/technical/TechnicalIdentifierValue.js";
|
|
2
|
-
import { isEmptyText as n, resolveBadgeTone as r, resolveLabel as i,
|
|
3
|
-
import { Fragment as
|
|
2
|
+
import { isEmptyText as n, resolveBadgeTone as r, resolveLabel as i, resolveValueLabel as a } from "./BackofficeEntityDetailPage.helpers.js";
|
|
3
|
+
import { Fragment as o, createElement as s } from "react";
|
|
4
4
|
//#region src/pages/BackofficeEntityDetailPage.view-helpers.ts
|
|
5
|
-
var
|
|
5
|
+
var c = (e, t, n) => {
|
|
6
6
|
switch (e) {
|
|
7
7
|
case "yesNo": return t ? {
|
|
8
8
|
tone: "success",
|
|
@@ -90,45 +90,45 @@ var l = (e, t, n) => {
|
|
|
90
90
|
};
|
|
91
91
|
default: throw Error(`Unsupported flag variant: ${String(e)}`);
|
|
92
92
|
}
|
|
93
|
-
},
|
|
94
|
-
let { tApp: r, t: i, resolveEntityHref:
|
|
93
|
+
}, l = (e, t) => {
|
|
94
|
+
let { tApp: r, t: i, resolveEntityHref: o, renderLink: s } = t, c = i("common.notAvailable");
|
|
95
95
|
if (e.type === "text") {
|
|
96
|
-
let t =
|
|
96
|
+
let t = a(e.value, r);
|
|
97
97
|
return n(t) ? c : t;
|
|
98
98
|
}
|
|
99
99
|
if (e.type === "entityRef") {
|
|
100
100
|
let { id: t } = e;
|
|
101
101
|
if (t == null || t.trim() === "") return c;
|
|
102
|
-
let n =
|
|
102
|
+
let n = a(e.label, r), i = n != null && String(n).trim() !== "" ? n : null;
|
|
103
103
|
if (i == null) return c;
|
|
104
|
-
let l =
|
|
104
|
+
let l = o?.(e.entity, t) ?? null;
|
|
105
105
|
return l == null ? i : s(l, i);
|
|
106
106
|
}
|
|
107
107
|
let { href: l } = e;
|
|
108
108
|
if (l == null || l.trim() === "") return c;
|
|
109
|
-
let u =
|
|
109
|
+
let u = a(e.label, r);
|
|
110
110
|
return n(u) ? c : s(l, u);
|
|
111
|
-
},
|
|
112
|
-
let { tApp: i, t:
|
|
111
|
+
}, u = (e, t, r) => {
|
|
112
|
+
let { tApp: i, t: o, resolveEntityHref: s, renderDate: c, renderLink: l } = r, u = o("common.notAvailable");
|
|
113
113
|
if (e.type === "dateTime") return c(e.value(t), u);
|
|
114
114
|
if (e.type === "entityRef") {
|
|
115
115
|
let n = e.id(t);
|
|
116
116
|
if (n == null || n.trim() === "") return u;
|
|
117
|
-
let r =
|
|
118
|
-
if (
|
|
117
|
+
let r = a(e.value?.(t), i), o = r != null && String(r).trim() !== "" ? r : null;
|
|
118
|
+
if (o == null) return u;
|
|
119
119
|
let c = s?.(e.entity, n) ?? null;
|
|
120
|
-
return c == null ?
|
|
120
|
+
return c == null ? o : l(c, o);
|
|
121
121
|
}
|
|
122
122
|
if (e.type === "link") {
|
|
123
|
-
let r = e.href(t),
|
|
124
|
-
return r == null || r.trim() === "" || n(
|
|
123
|
+
let r = e.href(t), o = a(e.value(t), i);
|
|
124
|
+
return r == null || r.trim() === "" || n(o) ? u : l(r, o);
|
|
125
125
|
}
|
|
126
|
-
let d =
|
|
126
|
+
let d = a(e.value(t), i);
|
|
127
127
|
return n(d) ? u : d;
|
|
128
|
-
},
|
|
128
|
+
}, d = (e, t, n, i) => {
|
|
129
129
|
if (e.type === "badgeRow") {
|
|
130
130
|
let r = e.items(t).map((e) => {
|
|
131
|
-
let t =
|
|
131
|
+
let t = a(e.label, n), r = t == null ? "" : String(t);
|
|
132
132
|
return {
|
|
133
133
|
...e,
|
|
134
134
|
label: r
|
|
@@ -136,221 +136,203 @@ var l = (e, t, n) => {
|
|
|
136
136
|
});
|
|
137
137
|
return r.length === 0 ? void 0 : i.renderBadgeRow(r);
|
|
138
138
|
}
|
|
139
|
-
let
|
|
139
|
+
let o = a(e.value(t), n), s = o == null ? "" : String(o);
|
|
140
140
|
if (s.trim() === "") return;
|
|
141
141
|
let c = r(e.tone, t);
|
|
142
142
|
return i.renderTag(c, s);
|
|
143
|
-
},
|
|
144
|
-
let { tApp:
|
|
145
|
-
return t.forEach((t,
|
|
146
|
-
let
|
|
143
|
+
}, f = (t, o, u) => {
|
|
144
|
+
let { tApp: d, t: f, resolveEntityHref: p, formatNumber: m, formatCurrency: h, formatCurrencyTitle: g, formatPercent: _, renderTag: v, renderBadgeRow: y, renderDate: b, renderFlagTag: x, renderLink: S, renderTaggedValue: C, wrapCustomNode: w } = u, T = [], E = [], D = f("common.notAvailable");
|
|
145
|
+
return t.forEach((t, u) => {
|
|
146
|
+
let O = `${t.type}-${u}`;
|
|
147
147
|
switch (t.type) {
|
|
148
148
|
case "text": {
|
|
149
|
-
let e =
|
|
150
|
-
|
|
151
|
-
id:
|
|
152
|
-
label: i(t.label,
|
|
149
|
+
let e = a(t.value(o), d);
|
|
150
|
+
T.push({
|
|
151
|
+
id: O,
|
|
152
|
+
label: i(t.label, d),
|
|
153
153
|
size: t.size,
|
|
154
154
|
value: e,
|
|
155
|
-
copyValue: t.copyValue?.(
|
|
155
|
+
copyValue: t.copyValue?.(o) ?? void 0,
|
|
156
156
|
fullWidth: t.fullWidth
|
|
157
157
|
});
|
|
158
158
|
break;
|
|
159
159
|
}
|
|
160
160
|
case "badge": {
|
|
161
|
-
let e =
|
|
162
|
-
|
|
163
|
-
id:
|
|
164
|
-
label: i(t.label,
|
|
161
|
+
let e = a(t.value(o), d), n = e == null ? "" : String(e), s = r(t.tone, o);
|
|
162
|
+
T.push({
|
|
163
|
+
id: O,
|
|
164
|
+
label: i(t.label, d),
|
|
165
165
|
size: t.size,
|
|
166
|
-
value: n.trim() === "" ? null :
|
|
166
|
+
value: n.trim() === "" ? null : v(s, n)
|
|
167
167
|
});
|
|
168
168
|
break;
|
|
169
169
|
}
|
|
170
170
|
case "badgeRow": {
|
|
171
|
-
let e = t.items(
|
|
172
|
-
let t =
|
|
171
|
+
let e = t.items(o).map((e) => {
|
|
172
|
+
let t = a(e.label, d), n = t == null ? "" : String(t);
|
|
173
173
|
return {
|
|
174
174
|
...e,
|
|
175
175
|
label: n
|
|
176
176
|
};
|
|
177
177
|
});
|
|
178
|
-
|
|
179
|
-
id:
|
|
180
|
-
label: i(t.label,
|
|
178
|
+
T.push({
|
|
179
|
+
id: O,
|
|
180
|
+
label: i(t.label, d),
|
|
181
181
|
size: t.size,
|
|
182
|
-
value: e.length > 0 ?
|
|
182
|
+
value: e.length > 0 ? y(e) : null,
|
|
183
183
|
fullWidth: t.fullWidth
|
|
184
184
|
});
|
|
185
185
|
break;
|
|
186
186
|
}
|
|
187
187
|
case "dateTime":
|
|
188
|
-
|
|
189
|
-
id:
|
|
190
|
-
label: i(t.label,
|
|
188
|
+
T.push({
|
|
189
|
+
id: O,
|
|
190
|
+
label: i(t.label, d),
|
|
191
191
|
size: t.size,
|
|
192
|
-
value:
|
|
192
|
+
value: b(t.value(o), D)
|
|
193
193
|
});
|
|
194
194
|
break;
|
|
195
195
|
case "number": {
|
|
196
|
-
let e = t.value(
|
|
196
|
+
let e = t.value(o), n = null;
|
|
197
197
|
if (e != null) if (t.format === "currency") {
|
|
198
|
-
let t =
|
|
199
|
-
n =
|
|
200
|
-
} else n = t.format === "percent" ?
|
|
201
|
-
|
|
202
|
-
id:
|
|
203
|
-
label: i(t.label,
|
|
198
|
+
let t = h(e);
|
|
199
|
+
n = s("span", { title: g?.(e) ?? void 0 }, t);
|
|
200
|
+
} else n = t.format === "percent" ? _(e) : m(e);
|
|
201
|
+
T.push({
|
|
202
|
+
id: O,
|
|
203
|
+
label: i(t.label, d),
|
|
204
204
|
size: t.size,
|
|
205
205
|
value: n
|
|
206
206
|
});
|
|
207
207
|
break;
|
|
208
208
|
}
|
|
209
209
|
case "flag": {
|
|
210
|
-
let e = t.value(
|
|
211
|
-
|
|
212
|
-
id:
|
|
213
|
-
label: i(t.label,
|
|
210
|
+
let e = t.value(o);
|
|
211
|
+
T.push({
|
|
212
|
+
id: O,
|
|
213
|
+
label: i(t.label, d),
|
|
214
214
|
size: t.size,
|
|
215
|
-
value: e == null ? null :
|
|
215
|
+
value: e == null ? null : x(c(t.variant, e, f))
|
|
216
216
|
});
|
|
217
217
|
break;
|
|
218
218
|
}
|
|
219
219
|
case "entityRef": {
|
|
220
|
-
let e = t.id(
|
|
220
|
+
let e = t.id(o), n = null;
|
|
221
221
|
if (e != null && e.trim() !== "") {
|
|
222
|
-
let r = t.value?.(
|
|
223
|
-
i != null && (n = a == null ? i :
|
|
222
|
+
let r = t.value?.(o), i = r != null && r.trim() !== "" ? r : null, a = p?.(t.entity, e) ?? null;
|
|
223
|
+
i != null && (n = a == null ? i : S(a, i));
|
|
224
224
|
}
|
|
225
|
-
|
|
226
|
-
id:
|
|
227
|
-
label: i(t.label,
|
|
225
|
+
T.push({
|
|
226
|
+
id: O,
|
|
227
|
+
label: i(t.label, d),
|
|
228
228
|
size: t.size,
|
|
229
|
-
value: n ??
|
|
229
|
+
value: n ?? D
|
|
230
230
|
});
|
|
231
231
|
break;
|
|
232
232
|
}
|
|
233
233
|
case "technicalIdentifier": {
|
|
234
|
-
let n = t.value(
|
|
235
|
-
|
|
236
|
-
id:
|
|
237
|
-
label: i(t.label,
|
|
234
|
+
let n = t.value(o);
|
|
235
|
+
T.push({
|
|
236
|
+
id: O,
|
|
237
|
+
label: i(t.label, d),
|
|
238
238
|
size: t.size,
|
|
239
|
-
value: n == null ? null :
|
|
239
|
+
value: n == null ? null : s(e, {
|
|
240
240
|
value: n,
|
|
241
|
-
copyValue: t.copyValue?.(
|
|
241
|
+
copyValue: t.copyValue?.(o) ?? void 0,
|
|
242
242
|
variant: t.variant,
|
|
243
|
-
copyLabel:
|
|
243
|
+
copyLabel: f("common.actions.copy")
|
|
244
244
|
}),
|
|
245
|
-
copyValue: t.copyValue?.(
|
|
245
|
+
copyValue: t.copyValue?.(o) ?? void 0,
|
|
246
246
|
fullWidth: t.fullWidth
|
|
247
247
|
});
|
|
248
248
|
break;
|
|
249
249
|
}
|
|
250
250
|
case "link": {
|
|
251
|
-
let e = t.href(
|
|
252
|
-
|
|
253
|
-
id:
|
|
254
|
-
label: i(t.label,
|
|
251
|
+
let e = t.href(o), r = t.value(o);
|
|
252
|
+
T.push({
|
|
253
|
+
id: O,
|
|
254
|
+
label: i(t.label, d),
|
|
255
255
|
size: t.size,
|
|
256
|
-
value: e != null && e.trim() !== "" && !n(r) ?
|
|
256
|
+
value: e != null && e.trim() !== "" && !n(r) ? S(e, r) : null
|
|
257
257
|
});
|
|
258
258
|
break;
|
|
259
259
|
}
|
|
260
260
|
case "taggedValue": {
|
|
261
|
-
let e = t.tag(
|
|
262
|
-
tApp:
|
|
263
|
-
t:
|
|
264
|
-
resolveEntityHref:
|
|
265
|
-
renderLink:
|
|
261
|
+
let e = t.tag(o), n = l(t.value(o), {
|
|
262
|
+
tApp: d,
|
|
263
|
+
t: f,
|
|
264
|
+
resolveEntityHref: p,
|
|
265
|
+
renderLink: S
|
|
266
266
|
}), r = e == null ? null : {
|
|
267
267
|
...e,
|
|
268
268
|
label: (() => {
|
|
269
|
-
let t =
|
|
269
|
+
let t = a(e.label, d);
|
|
270
270
|
return t == null ? "" : String(t);
|
|
271
271
|
})()
|
|
272
272
|
};
|
|
273
|
-
|
|
274
|
-
id:
|
|
275
|
-
label: i(t.label,
|
|
273
|
+
T.push({
|
|
274
|
+
id: O,
|
|
275
|
+
label: i(t.label, d),
|
|
276
276
|
size: t.size,
|
|
277
|
-
value: r != null || n != null ?
|
|
277
|
+
value: r != null || n != null ? C(r, n) : null,
|
|
278
278
|
fullWidth: t.fullWidth
|
|
279
279
|
});
|
|
280
280
|
break;
|
|
281
281
|
}
|
|
282
|
-
case "relation": {
|
|
283
|
-
let e = a(t.value(s));
|
|
284
|
-
if (e == null) break;
|
|
285
|
-
let n = y[t.relation.target];
|
|
286
|
-
if (n == null) break;
|
|
287
|
-
let r = x(null, t.relation.whereKey, e, t.relation.path);
|
|
288
|
-
if (r == null) break;
|
|
289
|
-
A.push(b({
|
|
290
|
-
id: N,
|
|
291
|
-
label: i(t.label, f),
|
|
292
|
-
relation: t.relation,
|
|
293
|
-
listRoute: n,
|
|
294
|
-
value: e,
|
|
295
|
-
where: r
|
|
296
|
-
}));
|
|
297
|
-
break;
|
|
298
|
-
}
|
|
299
282
|
case "custom": {
|
|
300
|
-
let e = t.render(
|
|
283
|
+
let e = t.render(o);
|
|
301
284
|
if (e == null) break;
|
|
302
285
|
if (t.label != null) {
|
|
303
|
-
|
|
304
|
-
id:
|
|
305
|
-
label: i(t.label,
|
|
286
|
+
T.push({
|
|
287
|
+
id: O,
|
|
288
|
+
label: i(t.label, d),
|
|
306
289
|
size: t.size,
|
|
307
290
|
value: e,
|
|
308
291
|
fullWidth: t.fullWidth
|
|
309
292
|
});
|
|
310
293
|
break;
|
|
311
294
|
}
|
|
312
|
-
|
|
295
|
+
E.push(w(O, e));
|
|
313
296
|
break;
|
|
314
297
|
}
|
|
315
298
|
default: break;
|
|
316
299
|
}
|
|
317
300
|
}), {
|
|
318
|
-
items:
|
|
319
|
-
|
|
320
|
-
customNodes: j
|
|
301
|
+
items: T,
|
|
302
|
+
customNodes: E
|
|
321
303
|
};
|
|
322
|
-
},
|
|
323
|
-
let { tApp:
|
|
304
|
+
}, p = (e, t, n) => {
|
|
305
|
+
let { tApp: c, t: f, resolveEntityHref: p, renderLink: m, renderDate: h, renderTag: g, renderBadgeRow: _ } = n, v = e.titleValue?.(t, c) ?? i(e.title, c), y = typeof t == "object" && t && "id" in t && typeof t.id == "string" ? t.id.trim() : null, b = v.trim() === "" || y != null && v.trim() === y ? i(e.title, c) : v, x;
|
|
324
306
|
if (e.subtitleItems != null && e.subtitleItems.length > 0) {
|
|
325
307
|
let { subtitleItems: n } = e, r = e.subtitleSeparator ?? " / ", i = [];
|
|
326
|
-
n.forEach((e,
|
|
327
|
-
i.push(
|
|
328
|
-
tApp:
|
|
329
|
-
t:
|
|
308
|
+
n.forEach((e, a) => {
|
|
309
|
+
i.push(s("span", { key: e.id }, l(e.value(t), {
|
|
310
|
+
tApp: c,
|
|
311
|
+
t: f,
|
|
330
312
|
resolveEntityHref: p,
|
|
331
313
|
renderLink: m
|
|
332
|
-
}))),
|
|
333
|
-
}), x =
|
|
314
|
+
}))), a < n.length - 1 && i.push(s("span", { key: `${e.id}-sep` }, r));
|
|
315
|
+
}), x = s("span", null, ...i);
|
|
334
316
|
} else {
|
|
335
|
-
let n = e.subtitleValue?.(t,
|
|
317
|
+
let n = e.subtitleValue?.(t, c) ?? (e.subtitle == null ? null : i(e.subtitle, c));
|
|
336
318
|
x = n != null && n.trim() !== "" ? n : void 0;
|
|
337
319
|
}
|
|
338
320
|
let S = [];
|
|
339
321
|
e.badges?.forEach((e, n) => {
|
|
340
|
-
let l = i(e.label,
|
|
341
|
-
d.trim() !== "" && (S.push(g(r(e.tone, t), `${l}: ${d}`)), typeof S[S.length - 1] == "object" && (S[S.length - 1] =
|
|
322
|
+
let l = i(e.label, c), u = a(e.value(t), c), d = u == null ? "" : String(u);
|
|
323
|
+
d.trim() !== "" && (S.push(g(r(e.tone, t), `${l}: ${d}`)), typeof S[S.length - 1] == "object" && (S[S.length - 1] = s(o, { key: `${l}-${n}` }, S[S.length - 1])));
|
|
342
324
|
});
|
|
343
|
-
let C = e.status == null ? void 0 :
|
|
325
|
+
let C = e.status == null ? void 0 : d(e.status, t, c, {
|
|
344
326
|
renderBadgeRow: _,
|
|
345
327
|
renderTag: g
|
|
346
328
|
}), w = e.meta?.map((e, n) => {
|
|
347
|
-
let r = i(e.label,
|
|
329
|
+
let r = i(e.label, c);
|
|
348
330
|
return {
|
|
349
331
|
id: `${r}-${n}`,
|
|
350
332
|
label: r,
|
|
351
|
-
value:
|
|
352
|
-
tApp:
|
|
353
|
-
t:
|
|
333
|
+
value: u(e, t, {
|
|
334
|
+
tApp: c,
|
|
335
|
+
t: f,
|
|
354
336
|
resolveEntityHref: p,
|
|
355
337
|
renderDate: h,
|
|
356
338
|
renderLink: m
|
|
@@ -360,169 +342,169 @@ var l = (e, t, n) => {
|
|
|
360
342
|
return {
|
|
361
343
|
title: b,
|
|
362
344
|
subtitle: x,
|
|
363
|
-
badges: S.length > 0 ?
|
|
345
|
+
badges: S.length > 0 ? s(o, null, ...S) : void 0,
|
|
364
346
|
status: C,
|
|
365
347
|
items: w
|
|
366
348
|
};
|
|
367
|
-
},
|
|
349
|
+
}, m = (e) => {
|
|
368
350
|
if (e != null) {
|
|
369
351
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") return String(e);
|
|
370
352
|
try {
|
|
371
|
-
return
|
|
353
|
+
return s("pre", null, JSON.stringify(e, null, 2));
|
|
372
354
|
} catch {
|
|
373
|
-
return
|
|
355
|
+
return s("pre", null, e instanceof Error ? e.message : "[unserializable payload]");
|
|
374
356
|
}
|
|
375
357
|
}
|
|
376
|
-
},
|
|
377
|
-
let { value: i, href:
|
|
358
|
+
}, h = (e) => e === "id" || e === "hash" || e === "external" ? e : null, g = (r) => {
|
|
359
|
+
let { value: i, href: o, refKind: c, copyValue: l, tApp: u, t: d, renderLink: f } = r, p = a(i, u), m = h(c);
|
|
378
360
|
if (m != null) {
|
|
379
361
|
let n = t(p);
|
|
380
|
-
return n == null ? d("common.notAvailable") :
|
|
362
|
+
return n == null ? d("common.notAvailable") : s(e, {
|
|
381
363
|
value: n,
|
|
382
364
|
copyValue: l ?? n,
|
|
383
365
|
variant: m,
|
|
384
366
|
copyLabel: d("common.actions.copy")
|
|
385
367
|
});
|
|
386
368
|
}
|
|
387
|
-
return
|
|
388
|
-
},
|
|
389
|
-
let { tApp:
|
|
369
|
+
return o != null && o.trim() !== "" && !n(p) ? f(o, p) : p ?? d("common.notAvailable");
|
|
370
|
+
}, _ = (t, r, o) => {
|
|
371
|
+
let { tApp: c, t: l, keyPrefix: u } = o;
|
|
390
372
|
return t == null || t.length === 0 ? [] : t.map((t, d) => {
|
|
391
373
|
let f = u == null ? `${t.kind}-${d}` : `${u}-${t.kind}-${d}`;
|
|
392
374
|
if (t.kind === "custom") {
|
|
393
375
|
let e = t.render(r);
|
|
394
|
-
return e == null ? null : t.label == null ?
|
|
376
|
+
return e == null ? null : t.label == null ? o.wrapCustomNode(f, e) : o.renderCustomSection(f, i(t.label, c), e);
|
|
395
377
|
}
|
|
396
|
-
let p = "title" in t ? i(t.title,
|
|
397
|
-
if (t.kind === "summary") return
|
|
378
|
+
let p = "title" in t ? i(t.title, c) : i(t.label, c), h = t.description == null ? void 0 : i(t.description, c);
|
|
379
|
+
if (t.kind === "summary") return o.renderKeyValueListSection({
|
|
398
380
|
key: f,
|
|
399
381
|
title: p,
|
|
400
|
-
description:
|
|
382
|
+
description: h,
|
|
401
383
|
items: t.items.map((e) => {
|
|
402
|
-
let t =
|
|
403
|
-
return
|
|
384
|
+
let t = a(e.value(r), c), s = e.href?.(r), u = e.tone?.(r), d = t ?? l("common.notAvailable");
|
|
385
|
+
return s != null && s.trim() !== "" && !n(t) ? d = o.renderLink(s, t) : u != null && !n(t) && (d = o.renderTag(u, String(t))), {
|
|
404
386
|
id: e.id,
|
|
405
|
-
label: i(e.label,
|
|
387
|
+
label: i(e.label, c),
|
|
406
388
|
value: d
|
|
407
389
|
};
|
|
408
390
|
})
|
|
409
391
|
});
|
|
410
|
-
if (t.kind === "metrics") return
|
|
392
|
+
if (t.kind === "metrics") return o.renderMetricGroup({
|
|
411
393
|
key: f,
|
|
412
394
|
title: p,
|
|
413
|
-
description:
|
|
395
|
+
description: h,
|
|
414
396
|
density: t.density,
|
|
415
397
|
items: t.items.map((e) => {
|
|
416
|
-
let t = e.formattedValue?.(r), n =
|
|
398
|
+
let t = e.formattedValue?.(r), n = a(e.value(r), c);
|
|
417
399
|
return {
|
|
418
400
|
id: e.id,
|
|
419
|
-
label: i(e.label,
|
|
401
|
+
label: i(e.label, c),
|
|
420
402
|
value: t ?? n ?? l("common.notAvailable"),
|
|
421
|
-
hint:
|
|
403
|
+
hint: a(e.hint?.(r), c),
|
|
422
404
|
tone: e.tone?.(r),
|
|
423
405
|
copyValue: e.copyValue?.(r) ?? void 0
|
|
424
406
|
};
|
|
425
407
|
})
|
|
426
408
|
});
|
|
427
|
-
if (t.kind === "states") return
|
|
409
|
+
if (t.kind === "states") return o.renderKeyValueListSection({
|
|
428
410
|
key: f,
|
|
429
411
|
title: p,
|
|
430
|
-
description:
|
|
412
|
+
description: h,
|
|
431
413
|
items: t.states.map((e) => {
|
|
432
414
|
let t = e.getDisplay(e.value(r), r);
|
|
433
415
|
return {
|
|
434
416
|
id: e.id,
|
|
435
|
-
label: i(e.label,
|
|
436
|
-
value:
|
|
417
|
+
label: i(e.label, c),
|
|
418
|
+
value: o.renderTag(t.tone, String(a(t.label, c) ?? l("common.notAvailable")))
|
|
437
419
|
};
|
|
438
420
|
})
|
|
439
421
|
});
|
|
440
|
-
if (t.kind === "context") return
|
|
422
|
+
if (t.kind === "context") return o.renderContextStack({
|
|
441
423
|
key: f,
|
|
442
424
|
title: p,
|
|
443
425
|
items: t.items.map((e) => {
|
|
444
|
-
let t =
|
|
426
|
+
let t = a(e.value(r), c), s = e.href?.(r);
|
|
445
427
|
return {
|
|
446
428
|
id: e.id,
|
|
447
|
-
label: i(e.label,
|
|
448
|
-
value:
|
|
429
|
+
label: i(e.label, c),
|
|
430
|
+
value: s != null && s.trim() !== "" && !n(t) ? o.renderLink(s, t) : t
|
|
449
431
|
};
|
|
450
432
|
})
|
|
451
433
|
});
|
|
452
|
-
if (t.kind === "
|
|
434
|
+
if (t.kind === "relationSummary") return o.renderRelations({
|
|
453
435
|
key: f,
|
|
454
436
|
title: p,
|
|
455
|
-
description:
|
|
437
|
+
description: h,
|
|
456
438
|
items: t.items.map((e) => ({
|
|
457
439
|
id: e.id,
|
|
458
|
-
label: i(e.label,
|
|
440
|
+
label: i(e.label, c),
|
|
459
441
|
count: e.count?.(r) ?? null,
|
|
460
442
|
href: e.href?.(r) ?? void 0,
|
|
461
|
-
description:
|
|
443
|
+
description: a(e.description?.(r), c),
|
|
462
444
|
tone: e.tone?.(r)
|
|
463
445
|
}))
|
|
464
446
|
});
|
|
465
|
-
if (t.kind === "timeline") return
|
|
447
|
+
if (t.kind === "timeline") return o.renderTimeline({
|
|
466
448
|
key: f,
|
|
467
449
|
title: p,
|
|
468
|
-
description:
|
|
450
|
+
description: h,
|
|
469
451
|
events: t.events.map((e) => {
|
|
470
|
-
let t = e.state?.(r), n = t == null ? null :
|
|
452
|
+
let t = e.state?.(r), n = t == null ? null : a(t.label, c), s = n == null ? null : String(n);
|
|
471
453
|
return {
|
|
472
454
|
id: e.id,
|
|
473
|
-
label:
|
|
474
|
-
timestamp: e.timestamp == null ? void 0 :
|
|
475
|
-
description:
|
|
476
|
-
actor:
|
|
455
|
+
label: s == null || s.trim() === "" ? i(e.label, c) : `${i(e.label, c)}: ${s}`,
|
|
456
|
+
timestamp: e.timestamp == null ? void 0 : o.renderDate(e.timestamp(r), l("common.notAvailable")),
|
|
457
|
+
description: a(e.description?.(r), c),
|
|
458
|
+
actor: a(e.actor?.(r), c),
|
|
477
459
|
tone: t?.tone,
|
|
478
|
-
payload:
|
|
460
|
+
payload: m(e.payload?.(r))
|
|
479
461
|
};
|
|
480
462
|
})
|
|
481
463
|
});
|
|
482
|
-
if (t.kind === "audit") return
|
|
464
|
+
if (t.kind === "audit") return o.renderAuditTimeline({
|
|
483
465
|
key: f,
|
|
484
466
|
title: p,
|
|
485
|
-
description:
|
|
467
|
+
description: h,
|
|
486
468
|
events: t.items.map((e) => {
|
|
487
|
-
let t =
|
|
469
|
+
let t = a(e.actor?.(r), c), s = a(e.source?.(r), c);
|
|
488
470
|
return {
|
|
489
471
|
id: e.id,
|
|
490
|
-
title: i(e.label,
|
|
491
|
-
time:
|
|
472
|
+
title: i(e.label, c),
|
|
473
|
+
time: o.renderDate(e.timestamp?.(r), l("common.notAvailable")),
|
|
492
474
|
actor: n(t) ? void 0 : t,
|
|
493
|
-
source: n(
|
|
475
|
+
source: n(s) ? void 0 : s
|
|
494
476
|
};
|
|
495
477
|
})
|
|
496
478
|
});
|
|
497
|
-
if (t.kind === "references") return
|
|
479
|
+
if (t.kind === "references") return o.renderKeyValueListSection({
|
|
498
480
|
key: f,
|
|
499
481
|
title: p,
|
|
500
|
-
description:
|
|
482
|
+
description: h,
|
|
501
483
|
items: t.references.map((e) => {
|
|
502
484
|
let t = e.href?.(r);
|
|
503
485
|
return {
|
|
504
486
|
id: e.id,
|
|
505
|
-
label: i(e.label,
|
|
506
|
-
value:
|
|
487
|
+
label: i(e.label, c),
|
|
488
|
+
value: g({
|
|
507
489
|
value: e.value(r),
|
|
508
490
|
href: t,
|
|
509
491
|
refKind: e.refKind ?? "text",
|
|
510
492
|
copyValue: e.copyValue?.(r) ?? void 0,
|
|
511
|
-
tApp:
|
|
493
|
+
tApp: c,
|
|
512
494
|
t: l,
|
|
513
|
-
renderLink:
|
|
495
|
+
renderLink: o.renderLink
|
|
514
496
|
})
|
|
515
497
|
};
|
|
516
498
|
})
|
|
517
499
|
});
|
|
518
500
|
if (t.kind === "actionResult") {
|
|
519
|
-
let e = [],
|
|
520
|
-
|
|
501
|
+
let e = [], s = t.status?.(r);
|
|
502
|
+
s != null && e.push({
|
|
521
503
|
id: `${t.id}-status`,
|
|
522
504
|
label: l("detail.actionResult.status"),
|
|
523
|
-
value:
|
|
505
|
+
value: o.renderTag(s.tone, String(a(s.label, c) ?? l("common.notAvailable")))
|
|
524
506
|
});
|
|
525
|
-
let u =
|
|
507
|
+
let u = a(t.message?.(r), c);
|
|
526
508
|
return n(u) || e.push({
|
|
527
509
|
id: `${t.id}-message`,
|
|
528
510
|
label: l("detail.actionResult.message"),
|
|
@@ -530,57 +512,57 @@ var l = (e, t, n) => {
|
|
|
530
512
|
}), t.references?.forEach((t) => {
|
|
531
513
|
e.push({
|
|
532
514
|
id: t.id,
|
|
533
|
-
label: i(t.label,
|
|
534
|
-
value:
|
|
515
|
+
label: i(t.label, c),
|
|
516
|
+
value: g({
|
|
535
517
|
value: t.value(r),
|
|
536
518
|
href: t.href?.(r),
|
|
537
519
|
refKind: t.refKind ?? "text",
|
|
538
520
|
copyValue: t.copyValue?.(r) ?? void 0,
|
|
539
|
-
tApp:
|
|
521
|
+
tApp: c,
|
|
540
522
|
t: l,
|
|
541
|
-
renderLink:
|
|
523
|
+
renderLink: o.renderLink
|
|
542
524
|
})
|
|
543
525
|
});
|
|
544
|
-
}),
|
|
526
|
+
}), o.renderKeyValueListSection({
|
|
545
527
|
key: f,
|
|
546
528
|
title: p,
|
|
547
|
-
description:
|
|
529
|
+
description: h,
|
|
548
530
|
items: e
|
|
549
531
|
});
|
|
550
532
|
}
|
|
551
|
-
return t.kind === "technicalFacts" ?
|
|
533
|
+
return t.kind === "technicalFacts" ? o.renderKeyValueListSection({
|
|
552
534
|
key: f,
|
|
553
535
|
title: p,
|
|
554
|
-
description:
|
|
536
|
+
description: h,
|
|
555
537
|
items: t.facts.map((t) => {
|
|
556
|
-
let u =
|
|
538
|
+
let u = a(t.value(r), c), d = t.href?.(r), f = t.copyValue?.(r) ?? void 0;
|
|
557
539
|
return {
|
|
558
540
|
id: t.id,
|
|
559
|
-
label: i(t.label,
|
|
560
|
-
value: f != null && f.trim() !== "" ?
|
|
541
|
+
label: i(t.label, c),
|
|
542
|
+
value: f != null && f.trim() !== "" ? s(e, {
|
|
561
543
|
value: u ?? f,
|
|
562
544
|
copyValue: f,
|
|
563
545
|
variant: "external",
|
|
564
546
|
copyLabel: l("common.actions.copy")
|
|
565
|
-
}) : d != null && d.trim() !== "" && !n(u) ?
|
|
547
|
+
}) : d != null && d.trim() !== "" && !n(u) ? o.renderLink(d, u) : u ?? l("common.notAvailable")
|
|
566
548
|
};
|
|
567
549
|
})
|
|
568
|
-
}) : t.kind === "table" ?
|
|
550
|
+
}) : t.kind === "table" ? o.renderTable({
|
|
569
551
|
key: f,
|
|
570
552
|
title: p,
|
|
571
|
-
description:
|
|
572
|
-
columns:
|
|
553
|
+
description: h,
|
|
554
|
+
columns: o.resolveTableColumns(t.columns),
|
|
573
555
|
rows: t.rows(r)
|
|
574
|
-
}) :
|
|
556
|
+
}) : o.renderPayload({
|
|
575
557
|
key: f,
|
|
576
558
|
title: p,
|
|
577
|
-
description:
|
|
559
|
+
description: h,
|
|
578
560
|
content: t.value(r),
|
|
579
561
|
format: t.format ?? "json"
|
|
580
562
|
});
|
|
581
563
|
});
|
|
582
564
|
};
|
|
583
565
|
//#endregion
|
|
584
|
-
export {
|
|
566
|
+
export { f as buildFieldItems, _ as renderBlocks, c as resolveFlagTag, p as resolveHeaderItems, u as resolveHeaderMeta, d as resolveHeaderStatus, l as resolveInlineValue };
|
|
585
567
|
|
|
586
568
|
//# sourceMappingURL=BackofficeEntityDetailPage.view-helpers.js.map
|