@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.
Files changed (54) hide show
  1. package/lib/esm/auth/login/loginPage.css.js +2 -0
  2. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +1 -0
  3. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
  4. package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js +1 -0
  5. package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js.map +1 -1
  6. package/lib/esm/components/backoffice/detail/backofficeDetailRelationLink.css.js +0 -1
  7. package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js +1 -0
  8. package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js.map +1 -1
  9. package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js +1 -0
  10. package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js.map +1 -1
  11. package/lib/esm/components/backoffice/hub/backofficeHubTemplate.css.js +0 -2
  12. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js +1 -0
  13. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js.map +1 -1
  14. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js +15 -14
  15. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -1
  16. package/lib/esm/components/backoffice/links/BackofficeLink.js +9 -8
  17. package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -1
  18. package/lib/esm/components/backoffice/refs/backofficeEntityIdRef.css.js +1 -0
  19. package/lib/esm/pages/BackofficeDashboardPage.helpers.js +2 -2
  20. package/lib/esm/pages/BackofficeDashboardPage.helpers.js.map +1 -1
  21. package/lib/esm/pages/BackofficeDashboardPage.js +38 -51
  22. package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
  23. package/lib/esm/pages/BackofficeDashboardWidgetContent.js +97 -100
  24. package/lib/esm/pages/BackofficeDashboardWidgetContent.js.map +1 -1
  25. package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +110 -10
  26. package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
  27. package/lib/esm/pages/BackofficeEntityDetailPage.js +206 -255
  28. package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
  29. package/lib/esm/pages/BackofficeEntityListPage.js +4 -0
  30. package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
  31. package/lib/esm/pages/detail/BackofficeEntityDetailLayoutContext.js.map +1 -1
  32. package/lib/esm/pages/detail/buildTabsItems.js +1 -0
  33. package/lib/esm/pages/detail/buildTabsItems.js.map +1 -1
  34. package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts.map +1 -1
  35. package/lib/types/components/backoffice/detail/BackofficeRelationsSummaryGrid.d.ts.map +1 -1
  36. package/lib/types/components/backoffice/filters/BackofficeFilterAction.d.ts.map +1 -1
  37. package/lib/types/components/backoffice/hub/BackofficeHubTemplate.d.ts.map +1 -1
  38. package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.d.ts.map +1 -1
  39. package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts +2 -1
  40. package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts.map +1 -1
  41. package/lib/types/components/backoffice/links/BackofficeLink.d.ts +2 -1
  42. package/lib/types/components/backoffice/links/BackofficeLink.d.ts.map +1 -1
  43. package/lib/types/pages/BackofficeDashboardPage.d.ts.map +1 -1
  44. package/lib/types/pages/BackofficeDashboardPage.helpers.d.ts +0 -4
  45. package/lib/types/pages/BackofficeDashboardPage.helpers.d.ts.map +1 -1
  46. package/lib/types/pages/BackofficeDashboardWidgetContent.d.ts +1 -2
  47. package/lib/types/pages/BackofficeDashboardWidgetContent.d.ts.map +1 -1
  48. package/lib/types/pages/BackofficeEntityDetailLayoutPage.d.ts.map +1 -1
  49. package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
  50. package/lib/types/pages/BackofficeEntityListPage.d.ts.map +1 -1
  51. package/lib/types/pages/detail/BackofficeEntityDetailLayoutContext.d.ts +7 -0
  52. package/lib/types/pages/detail/BackofficeEntityDetailLayoutContext.d.ts.map +1 -1
  53. package/lib/types/pages/detail/buildTabsItems.d.ts.map +1 -1
  54. 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 { BackofficeRightPageLayout as ee } from "../components/backoffice/layout/breadcrumb/BackofficeRightPageLayout.js";
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 ne } from "../relay/useRelayEnvironment.js";
18
- import { resolveVisibleDetailPages as h } from "./detail/pageResolution.js";
19
- import { useBackofficeEntityDetailLayoutContext as g } from "./detail/BackofficeEntityDetailLayoutContext.js";
20
- import { BackofficeRedirect as _ } from "./BackofficeRedirect.js";
21
- import { extractMutationPayload as re, isFormMutationAction as v, isMutationAction as ie, isRouteAction as ae, resolveLabel as y } from "./BackofficeEntityDetailPage.helpers.js";
22
- import { headerActions as oe, headerBlock as se, headerMeta as ce, headerMetaList as le } from "./backofficeEntityDetailPage.css.js";
23
- import { buildTabsItems as ue } from "./detail/buildTabsItems.js";
24
- import { buildFieldItems as de, renderBlocks as fe, resolveHeaderItems as pe } from "./BackofficeEntityDetailPage.view-helpers.js";
25
- import { Suspense as b, useContext as x, useMemo as S, useState as C } from "react";
26
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
27
- import { useTranslation as D } from "react-i18next";
28
- import { Button as O } from "@plumile/ui/atomic/atoms/button/Button.js";
29
- import { commitMutation as me, useFragment as k, useLazyLoadQuery as A, usePreloadedQuery as j } from "react-relay";
30
- import { useToast as M } from "@plumile/ui/atomic/molecules/toast/ToastProvider.js";
31
- import N from "@plumile/router/routing/RoutingContext.js";
32
- import { FormattedDate as P } from "@plumile/ui/atomic/atoms/formatted-date/FormattedDate.js";
33
- import { BACKOFFICE_DATE_TIME_OPTIONS as F } from "@plumile/backoffice-core/constants.js";
34
- import I from "@plumile/router/routing/Link.js";
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 R } from "@plumile/ui/backoffice/molecules/backoffice_detail_section/BackofficeDetailSection.js";
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 { BackofficePageHeader as be } from "@plumile/ui/backoffice/molecules/backoffice_page_header/BackofficePageHeader.js";
41
- import { AuditTimeline as xe } from "@plumile/ui/backoffice/organisms/audit_timeline/AuditTimeline.js";
42
- import { MetricCard as Se } from "@plumile/ui/components/dashboard/metric_card/MetricCard.js";
43
- import { MetricTileGroup as Ce } from "@plumile/ui/components/dashboard/metric_tile_group/MetricTileGroup.js";
44
- import { Tabs as we } from "@plumile/ui/atomic/molecules/tabs/Tabs.js";
45
- import { DetailPageTemplate as Te } from "@plumile/ui/backoffice/templates/detail_page_template/DetailPageTemplate.js";
46
- import { DataTable as Ee } from "@plumile/ui/components/data-table/DataTable.js";
47
- import { LinkButton as De } from "@plumile/ui/atomic/atoms/button/LinkButton.js";
48
- import { BackofficeKeyValueList as z } from "@plumile/ui/backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js";
49
- import { BackofficeRelationsMenu as Oe } from "@plumile/ui/backoffice/molecules/backoffice_relations_menu/BackofficeRelationsMenu.js";
50
- import { BackofficeScopeStack as ke } from "@plumile/ui/backoffice/molecules/backoffice_scope_stack/BackofficeScopeStack.js";
51
- import { ChatCheckSvg as B } from "@plumile/ui/icons/ChatCheckSvg.js";
52
- import { KeyOffSvg as Ae } from "@plumile/ui/icons/KeyOffSvg.js";
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 Pe } from "@plumile/ui/icons/SettingsCheckSvg.js";
61
- import { SettingsXSvg as G } from "@plumile/ui/icons/SettingsXSvg.js";
62
- import { ShieldLockSvg as Fe } from "@plumile/ui/icons/ShieldLockSvg.js";
63
- import { ShieldOffSvg as K } from "@plumile/ui/icons/ShieldOffSvg.js";
64
- import { XBadgeSvg as Ie } from "@plumile/ui/icons/XBadgeSvg.js";
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 q = "store-or-network", J = ({ count: e, node: t, relationValue: n }) => {
67
- let r = A(e.query, e.getVariables(t, n), { fetchPolicy: q }), i = e.getCount(r);
68
- return i == null ? null : /* @__PURE__ */ T(w, { children: i });
69
- }, Le = ({ count: e, node: t, relationValue: n }) => e == null ? null : /* @__PURE__ */ T(r, {
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__ */ T(b, {
66
+ children: /* @__PURE__ */ E(x, {
72
67
  fallback: null,
73
- children: /* @__PURE__ */ T(J, {
68
+ children: /* @__PURE__ */ E(Z, {
74
69
  count: e,
75
70
  node: t,
76
71
  relationValue: n
77
72
  })
78
73
  })
79
- }), Re = (e) => {
74
+ }), ke = (e) => {
80
75
  switch (e) {
81
- case "shield-lock": return /* @__PURE__ */ T(Fe, {
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__ */ T(K, {
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__ */ T(Pe, {
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__ */ T(G, {
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__ */ T(Ie, {
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__ */ T(B, {
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__ */ T(je, {
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__ */ T(Ae, {
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__ */ T(Ne, {
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__ */ T(Me, {
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__ */ T(V, {
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__ */ T(H, {
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__ */ T(W, {
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__ */ T(U, {
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
- }, ze = (e) => {
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
- }, Y = ({ config: r, prepared: b }) => {
158
- let { t: A } = D(), { t: B } = e(), { formatNumber: Ae, formatCurrency: je, formatCurrencyTitle: Me, formatPercent: Ne } = m(), { entities: V, entityRegistry: H } = n(), { layoutView: U } = g(), W = x(N), Pe = ne(), G = M(), [Fe, K] = C({}), [Ie, q] = C(null), J = h({
159
- mainPage: r.pages.mainPage,
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: Q } = r, Be = j(Q.query, b.pageQuery), $ = Q.resolveNode(Be, {
169
- id: b.id,
170
- detailId: b.detailId
171
- }), Ve = $ != null, He = k(Q.fragment, $), Ue = S(() => Object.fromEntries(Q.content.flatMap((e) => e.kind === "fieldSet" ? e.fields.flatMap((e) => e.type === "relation" ? [e.relation.target] : []) : []).flatMap((e) => {
172
- let t = V[e];
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
- })), [V, Q.content]);
175
- return Ve ? /* @__PURE__ */ T(p, {
176
- node: He,
164
+ })), [z, Y.content]);
165
+ return Q ? /* @__PURE__ */ E(p, {
166
+ node: $,
177
167
  render: (e) => {
178
- let n = Q.toView(e), p = ue({
179
- pages: X,
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
- }, ne = ({ id: e, label: t, count: r, relation: i, listRoute: a, value: o, where: s }) => {
187
- let { target: c, filterId: l, whereKey: u, path: d } = i, f = H.getLoadedListEntity(c);
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: Le({
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 (W == null || e.defaultPrevented || e.button !== 0 || e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;
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 H.loadListEntity(c)).config, { where: s });
204
- W.history.push({
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
- }, h = pe(r.header, U, {
212
- tApp: A,
213
- t: B,
214
- resolveEntityHref: m,
215
- renderLink: (e, t) => /* @__PURE__ */ T(I, {
216
- to: e,
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) : v(e) ? /* @__PURE__ */ T(O, {
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) : ie(e) ? /* @__PURE__ */ T(O, {
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
- Z(e.id, !0), me(Pe, {
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
- Z(e.id, !1);
276
- let o = re(r);
236
+ J(e.id, !1);
237
+ let o = ae(r);
277
238
  if (o != null) {
278
- let r = B("actions.form.errors.invalidPayload");
279
- e.toasts?.error?.message == null ? e.toasts?.error?.title != null && (r = y(e.toasts.error.title, A)) : r = y(e.toasts.error.message, A);
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" ? y(r, A) : String(r);
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, A);
291
- G.error(t.title, t.message);
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, A), o = a({
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: A,
302
- entities: V,
303
- defaultLabel: B("actions.view"),
262
+ tApp: y,
263
+ entities: z,
264
+ defaultLabel: x("actions.view"),
304
265
  navigateTo: (e) => {
305
- W?.history.push({ pathname: e });
266
+ V?.history.push({ pathname: e });
306
267
  }
307
268
  });
308
- G.push({
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 (Z(e.id, !1), e.onError?.(t, n), e.toasts?.error != null) {
318
- let t = i(e.toasts.error, A);
319
- G.error(t.title, t.message);
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 S = _.find((e) => e.id === Ie), { content: C } = Q, D = [], k = [], j = [];
330
- C.forEach((e, t) => {
331
- let r = ze(e) === "secondary" ? k : D;
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 i = y(e.title, A), a = e.description == null ? void 0 : y(e.description, A), { items: o, relationItems: s, customNodes: d } = de(e.fields, n, {
334
- tApp: A,
335
- t: B,
336
- resolveEntityHref: m,
337
- formatNumber: Ae,
338
- formatCurrency: je,
339
- formatCurrencyTitle: Me,
340
- formatPercent: Ne,
341
- relationEntityListRoutes: Ue,
342
- resolveRelationItem: ne,
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__ */ T(L, {
305
+ renderTag: (e, t) => /* @__PURE__ */ E(P, {
345
306
  tone: e,
346
307
  children: t
347
308
  }),
348
- renderBadgeRow: (e) => /* @__PURE__ */ T(c, { items: e }),
349
- renderDate: (e, t) => /* @__PURE__ */ T(P, {
309
+ renderBadgeRow: (e) => /* @__PURE__ */ E(c, { items: e }),
310
+ renderDate: (e, t) => /* @__PURE__ */ E(j, {
350
311
  value: e,
351
- options: F,
312
+ options: M,
352
313
  fallback: t
353
314
  }),
354
- renderFlagTag: (e) => /* @__PURE__ */ T(l, {
315
+ renderFlagTag: (e) => /* @__PURE__ */ E(l, {
355
316
  tone: e.tone,
356
- icon: e.iconName == null ? void 0 : Re(e.iconName),
317
+ icon: e.iconName == null ? void 0 : ke(e.iconName),
357
318
  label: e.label
358
319
  }),
359
- renderLink: (e, t) => /* @__PURE__ */ T(I, {
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__ */ T(u, {
325
+ renderTaggedValue: (e, t) => /* @__PURE__ */ E(u, {
364
326
  tag: e,
365
327
  value: t
366
328
  }),
367
- wrapCustomNode: (e, t) => /* @__PURE__ */ T("div", { children: t }, e)
329
+ wrapCustomNode: (e, t) => /* @__PURE__ */ E("div", { children: t }, e)
368
330
  });
369
- if (s.forEach((e) => {
370
- j.some((t) => t.id === e.id) || j.push(e);
371
- }), !(o.length > 0 || d.length > 0)) return;
372
- r.push(/* @__PURE__ */ T(R, {
373
- title: i,
374
- description: a,
375
- items: o.length > 0 ? o : void 0,
376
- children: d
377
- }, `${i}-${t}`));
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 i = fe([e], n, {
381
- tApp: A,
382
- t: B,
383
- resolveEntityHref: m,
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__ */ T(I, {
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__ */ T(P, {
352
+ renderDate: (e, t) => /* @__PURE__ */ E(j, {
390
353
  value: e,
391
- options: F,
354
+ options: M,
392
355
  fallback: t
393
356
  }),
394
- renderTag: (e, t) => /* @__PURE__ */ T(L, {
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__ */ T(R, {
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__ */ T(Ce, {
364
+ children: i.length > 0 && /* @__PURE__ */ E(Se, {
402
365
  density: r ?? "comfortable",
403
366
  minColumn: "180",
404
- children: i.map((e) => /* @__PURE__ */ T(Se, {
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: B("common.actions.copy"),
412
- copiedLabel: B("common.actions.copied")
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__ */ T(d, {
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__ */ T(R, {
384
+ renderAuditTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */ E(F, {
422
385
  title: t,
423
386
  description: n,
424
- children: /* @__PURE__ */ T(xe, { events: r })
387
+ children: /* @__PURE__ */ E(be, { events: r })
425
388
  }, e),
426
- renderRelations: ({ key: e, title: t, items: n }) => /* @__PURE__ */ T(f, {
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__ */ T(ke, {
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__ */ T(R, {
397
+ renderCustomSection: (e, t, n) => /* @__PURE__ */ E(F, {
435
398
  title: t,
436
399
  children: n
437
400
  }, e),
438
- wrapCustomNode: (e, t) => /* @__PURE__ */ T("div", { children: t }, e),
401
+ wrapCustomNode: (e, t) => /* @__PURE__ */ E("div", { children: t }, e),
439
402
  resolveTableColumns: (e) => s(e, {
440
- tApp: A,
441
- t: B
403
+ tApp: y,
404
+ t: x
442
405
  }),
443
- renderTable: ({ key: e, title: t, description: n, columns: r, rows: i }) => /* @__PURE__ */ T(R, {
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__ */ T(Ee, {
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__ */ T(R, {
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__ */ T(ve, {
424
+ children: /* @__PURE__ */ E(ve, {
462
425
  content: r,
463
426
  format: i,
464
- emptyState: B("common.notAvailable")
427
+ emptyState: x("common.notAvailable")
465
428
  })
466
429
  }, e),
467
- renderKeyValueListSection: ({ key: e, title: t, description: n, items: r }) => /* @__PURE__ */ T(R, {
430
+ renderKeyValueListSection: ({ key: e, title: t, description: n, items: r }) => /* @__PURE__ */ E(F, {
468
431
  title: t,
469
432
  description: n,
470
- children: /* @__PURE__ */ T(z, { items: r })
433
+ children: /* @__PURE__ */ E(we, { items: r })
471
434
  }, e)
472
435
  })[0];
473
- i != null && r.push(i);
436
+ a != null && i.push(a);
474
437
  });
475
- let M = j.length > 0 ? /* @__PURE__ */ T(Oe, {
476
- label: B("relations.menu.label"),
477
- items: j
478
- }) : null, N = x.length > 0 || M != null ? /* @__PURE__ */ E("div", {
479
- className: oe,
480
- children: [x.length > 0 && /* @__PURE__ */ T("div", {
481
- className: "txvbqbfpn txvbqbey txvbqblsh txvbqbhdl txvbqbh7g",
482
- children: x
483
- }), M != null && /* @__PURE__ */ T("div", {
484
- className: "txvbqbfpn txvbqbey txvbqb10mr txvbqbb49 txvbqbbkc txvbqb2sj txvbqb7tt",
485
- children: M
486
- })]
487
- }) : void 0, K = h.status != null || h.badges != null ? /* @__PURE__ */ E("div", {
488
- className: ce,
489
- children: [h.status, h.badges]
490
- }) : void 0, J = h.items != null && h.items.length > 0 ? /* @__PURE__ */ T("div", {
491
- className: le,
492
- children: /* @__PURE__ */ T(z, { items: h.items })
493
- }) : null, Be = k.length > 0, $ = null;
494
- return X.length > 1 && ($ = /* @__PURE__ */ T(we, {
495
- items: p,
496
- activeId: Y.id,
497
- variant: "underline"
498
- })), /* @__PURE__ */ E(ee, {
499
- breadcrumb: g,
500
- children: [/* @__PURE__ */ T(Te, {
501
- headerNode: /* @__PURE__ */ E("div", {
502
- className: se,
503
- children: [/* @__PURE__ */ T(be, {
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: S,
468
+ action: g,
518
469
  node: n,
519
470
  onClose: () => {
520
471
  q(null);
521
472
  }
522
- })]
523
- });
473
+ })
474
+ ] });
524
475
  }
525
- }) : /* @__PURE__ */ T(_, { to: r.routes.list });
526
- }, X = ({ config: e, prepared: t }) => {
527
- let { layoutView: n } = g(), r = h({
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__ */ T(_, { to: e.routes.list }) : r.activePage.id === t.pageId ? /* @__PURE__ */ T(Y, {
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__ */ T(_, { to: e.routes.detailPage(t.id, r.activePage.id) });
487
+ }) : /* @__PURE__ */ E(b, { to: e.routes.detailPage(t.id, r.activePage.id) });
537
488
  };
538
489
  //#endregion
539
- export { X as BackofficeEntityDetailPage, X as default };
490
+ export { $ as BackofficeEntityDetailPage, $ as default };
540
491
 
541
492
  //# sourceMappingURL=BackofficeEntityDetailPage.js.map