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