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