@plumile/backoffice-react 0.1.156 → 0.1.157

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