@plumile/backoffice-react 0.1.167 → 0.1.169

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