@plumile/backoffice-react 0.1.171 → 0.1.172

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 (52) hide show
  1. package/lib/esm/auth/authRefreshNotice.css.js +0 -1
  2. package/lib/esm/auth/login/loginPage.css.js +1 -0
  3. package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js +9 -9
  4. package/lib/esm/components/backoffice/filters/DeferredFilterSearchInput.js +4 -4
  5. package/lib/esm/components/backoffice/list/RowFlagsCell.css.js +0 -1
  6. package/lib/esm/components/backoffice/refs/BackofficeLazyEntityCount.js +16 -15
  7. package/lib/esm/components/backoffice/refs/BackofficeLazyEntityCount.js.map +1 -1
  8. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js +43 -35
  9. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js.map +1 -1
  10. package/lib/esm/components/backoffice/refs/backofficeEntityIdRef.css.js +1 -0
  11. package/lib/esm/components/backoffice/refs/backofficeRelatedCountLink.css.js +2 -2
  12. package/lib/esm/components/backoffice/refs/backofficeRelatedCountLink.css.js.map +1 -1
  13. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +182 -182
  14. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
  15. package/lib/esm/i18n/locales/en/backofficeReact.js +1 -8
  16. package/lib/esm/i18n/locales/en/backofficeReact.js.map +1 -1
  17. package/lib/esm/i18n/locales/fr/backofficeReact.js +1 -9
  18. package/lib/esm/i18n/locales/fr/backofficeReact.js.map +1 -1
  19. package/lib/esm/index.js +22 -22
  20. package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +138 -85
  21. package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
  22. package/lib/esm/pages/BackofficeEntityDetailPage.js +139 -183
  23. package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
  24. package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js +185 -203
  25. package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js.map +1 -1
  26. package/lib/esm/pages/BackofficeEntityListPage.js +33 -33
  27. package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
  28. package/lib/esm/pages/backofficeEntityDetailPage.css.js +2 -2
  29. package/lib/esm/pages/backofficeEntityDetailPage.css.js.map +1 -1
  30. package/lib/esm/style.css +1 -1
  31. package/lib/types/components/backoffice/refs/BackofficeLazyEntityCount.d.ts +7 -5
  32. package/lib/types/components/backoffice/refs/BackofficeLazyEntityCount.d.ts.map +1 -1
  33. package/lib/types/components/backoffice/refs/BackofficeRelatedCountLink.d.ts.map +1 -1
  34. package/lib/types/components/backoffice/refs/backofficeRelatedCountLink.css.d.ts +1 -0
  35. package/lib/types/components/backoffice/refs/backofficeRelatedCountLink.css.d.ts.map +1 -1
  36. package/lib/types/i18n/resources.d.ts +0 -15
  37. package/lib/types/i18n/resources.d.ts.map +1 -1
  38. package/lib/types/pages/BackofficeEntityDetailLayoutPage.d.ts.map +1 -1
  39. package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
  40. package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts +2 -13
  41. package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts.map +1 -1
  42. package/lib/types/pages/backofficeEntityDetailPage.css.d.ts +1 -0
  43. package/lib/types/pages/backofficeEntityDetailPage.css.d.ts.map +1 -1
  44. package/package.json +6 -6
  45. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js +0 -63
  46. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js.map +0 -1
  47. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js +0 -134
  48. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js.map +0 -1
  49. package/lib/types/components/backoffice/detail/BackofficeDetailRelationLink.d.ts +0 -11
  50. package/lib/types/components/backoffice/detail/BackofficeDetailRelationLink.d.ts.map +0 -1
  51. package/lib/types/components/backoffice/detail/BackofficeDetailRelationListBlock.d.ts +0 -10
  52. package/lib/types/components/backoffice/detail/BackofficeDetailRelationListBlock.d.ts.map +0 -1
@@ -2,9 +2,9 @@ import { useBackofficeReactTranslation as e } from "../../../i18n/useBackofficeR
2
2
  import { EntityIdFilterField as t } from "../filters/EntityIdFilterField.js";
3
3
  import { BackofficeErrorBoundary as n } from "../errors/BackofficeErrorBoundary.js";
4
4
  import { EntityIdPickerDialog as r } from "../pickers/EntityIdPickerDialog.js";
5
- import { EntityFilterValue as i, EntityFilterValueText as a } from "../filters/EntityFilterValue.js";
6
- import { DeferredFilterSearchInput as o } from "../filters/DeferredFilterSearchInput.js";
7
- import { BackofficeListFilterProvider as s } from "./BackofficeListFilterContext.js";
5
+ import { BackofficeListFilterProvider as i } from "./BackofficeListFilterContext.js";
6
+ import { DeferredFilterSearchInput as a } from "../filters/DeferredFilterSearchInput.js";
7
+ import { EntityFilterValue as o, EntityFilterValueText as s } from "../filters/EntityFilterValue.js";
8
8
  import { BACKOFFICE_LIST_BODY_SCROLL_MODE as c } from "./backofficeListScrollMode.js";
9
9
  import { useBackofficeInfiniteScrollSentinel as l } from "../../../hooks/useBackofficeInfiniteScrollSentinel.js";
10
10
  import { isDevEnv as u } from "../../../relay/envHelpers.js";
@@ -15,22 +15,22 @@ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
15
15
  import { useTranslation as oe } from "react-i18next";
16
16
  import { Button as v } from "@plumile/ui/atomic/atoms/button/Button.js";
17
17
  import { SimpleSelect as y } from "@plumile/ui/components/select/SimpleSelect.js";
18
- import { BackofficeEmptyState as se } from "@plumile/ui/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
19
- import { readWhereValue as b, setWhereValue as x } from "@plumile/backoffice-core/filters/where.js";
20
- import { BackofficeTableSkeleton as ce } from "@plumile/ui/backoffice/molecules/backoffice_table_skeleton/BackofficeTableSkeleton.js";
21
- import { BackofficeFilterDrawer as le } from "@plumile/ui/backoffice/molecules/backoffice_filter_drawer/BackofficeFilterDrawer.js";
22
- import { BackofficeFilterField as ue } from "@plumile/ui/backoffice/molecules/backoffice_filter_field/BackofficeFilterField.js";
23
- import { BackofficeListFooter as de } from "@plumile/ui/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.js";
24
- import { BackofficePageHeader as fe } from "@plumile/ui/backoffice/molecules/backoffice_page_header/BackofficePageHeader.js";
25
- import { BackofficeToolbar as pe } from "@plumile/ui/backoffice/molecules/backoffice_toolbar/BackofficeToolbar.js";
26
- import { FilterChipRow as me } from "@plumile/ui/backoffice/molecules/filter_chip_row/FilterChipRow.js";
27
- import { ListPageTemplate as he } from "@plumile/ui/backoffice/templates/list_page_template/ListPageTemplate.js";
28
- import { ResponsiveRecordList as ge } from "@plumile/ui/components/data-table/ResponsiveRecordList.js";
29
- import { VirtualizedConnectionTable as _e } from "@plumile/ui/components/data-table/VirtualizedConnectionTable.js";
30
- import { denseTableClass as S } from "@plumile/ui/shared/backofficeTableDensity.css.js";
18
+ import { BackofficeEmptyState as b } from "@plumile/ui/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
19
+ import { readWhereValue as x, setWhereValue as S } from "@plumile/backoffice-core/filters/where.js";
20
+ import { BackofficeFilterDrawer as se } from "@plumile/ui/backoffice/molecules/backoffice_filter_drawer/BackofficeFilterDrawer.js";
21
+ import { BackofficeFilterField as ce } from "@plumile/ui/backoffice/molecules/backoffice_filter_field/BackofficeFilterField.js";
22
+ import { BackofficeListFooter as le } from "@plumile/ui/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.js";
23
+ import { BackofficePageHeader as ue } from "@plumile/ui/backoffice/molecules/backoffice_page_header/BackofficePageHeader.js";
24
+ import { BackofficeToolbar as de } from "@plumile/ui/backoffice/molecules/backoffice_toolbar/BackofficeToolbar.js";
25
+ import { BackofficeTableSkeleton as fe } from "@plumile/ui/backoffice/molecules/backoffice_table_skeleton/BackofficeTableSkeleton.js";
26
+ import { FilterChipRow as pe } from "@plumile/ui/backoffice/molecules/filter_chip_row/FilterChipRow.js";
27
+ import { ListPageTemplate as me } from "@plumile/ui/backoffice/templates/list_page_template/ListPageTemplate.js";
28
+ import { ResponsiveRecordList as he } from "@plumile/ui/components/data-table/ResponsiveRecordList.js";
29
+ import { VirtualizedConnectionTable as ge } from "@plumile/ui/components/data-table/VirtualizedConnectionTable.js";
30
+ import { denseTableClass as _e } from "@plumile/ui/shared/backofficeTableDensity.css.js";
31
31
  import { resolveBackofficeListRuntimeConfig as ve } from "@plumile/backoffice-core/config/listRuntime.js";
32
32
  //#region src/components/backoffice/scaffolds/BackofficeEntityListScaffold.tsx
33
- var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fromGraphQL(t) : b(t, e.whereKey ?? e.id, e.path), ye = (e, t, n) => {
33
+ var C = (e, t) => e(t), ye = (e, t) => e.fromGraphQL != null && t != null ? e.fromGraphQL(t) : x(t, e.whereKey ?? e.id, e.path), be = (e, t, n) => {
34
34
  if (t == null) return null;
35
35
  if (Array.isArray(t)) {
36
36
  let e = t.map((e) => {
@@ -43,25 +43,25 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
43
43
  if (typeof t == "boolean") return e.kind === "boolean" ? n.booleanLabel(t) : t ? n.fallbackBooleanLabels.yes : n.fallbackBooleanLabels.no;
44
44
  if (typeof t != "string" && typeof t != "number") return null;
45
45
  let r = String(t).trim();
46
- return r === "" ? null : e.kind === "entityId" ? /* @__PURE__ */ g(i, {
46
+ return r === "" ? null : e.kind === "entityId" ? /* @__PURE__ */ g(o, {
47
47
  entityId: e.entity,
48
48
  id: r
49
49
  }) : e.kind === "enum" ? n.enumLabel(r) : r;
50
- }, be = (e) => {
50
+ }, xe = (e) => {
51
51
  let t = new Date(e);
52
52
  if (Number.isNaN(t.getTime())) return e;
53
53
  let n = t.getTimezoneOffset() * 6e4;
54
54
  return new Date(t.getTime() - n).toISOString().slice(0, 16);
55
- }, xe = (e) => {
55
+ }, Se = (e) => {
56
56
  let t = e.trim();
57
57
  if (t === "") return "";
58
58
  let n = new Date(t);
59
59
  return Number.isNaN(n.getTime()) ? t : n.toISOString();
60
- }, T = (i) => {
61
- let { t: b } = oe(), { t: T } = e(), { config: E, state: D, pushState: O, rows: k, getRowId: A, columns: j, gridTemplateColumns: M, hasNextPage: N, isLoadingMore: P, isRefreshing: Se = !1, onLoadMore: F, onRefresh: I, totalCount: L, loadedCountLabel: R, emptyState: z, statusBanner: B, header: Ce, headerActions: we, isLoadingInitial: Te = !1, variant: Ee = "page", showFilters: De = !0 } = i, V = E.list, Oe = E.listDefaults ?? V.defaultState ?? {
60
+ }, w = (o) => {
61
+ let { t: x } = oe(), { t: w } = e(), { config: T, state: E, pushState: D, rows: O, getRowId: k, columns: A, gridTemplateColumns: j, hasNextPage: M, isLoadingMore: N, isRefreshing: Ce = !1, onLoadMore: P, onRefresh: F, totalCount: I, loadedCountLabel: L, emptyState: R, statusBanner: z, header: B, headerActions: we, isLoadingInitial: Te = !1, variant: Ee = "page", showFilters: De = !0 } = o, V = T.list, Oe = T.listDefaults ?? V.defaultState ?? {
62
62
  where: null,
63
63
  sort: null
64
- }, H = p(() => j.some((e) => e.isPrimary === !0) || j.length === 0 ? j : j.map((e, t) => {
64
+ }, H = p(() => A.some((e) => e.isPrimary === !0) || A.length === 0 ? A : A.map((e, t) => {
65
65
  let { header: n } = e;
66
66
  return t === 0 ? {
67
67
  ...e,
@@ -71,32 +71,32 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
71
71
  ...e,
72
72
  header: n
73
73
  };
74
- }), [j]), U = p(() => {
74
+ }), [A]), U = p(() => {
75
75
  let e = [];
76
76
  for (let t of V.filters) {
77
- let n = w(t, D.where), r = ye(t, n, {
77
+ let n = ye(t, E.where), r = be(t, n, {
78
78
  enumLabel: (e) => {
79
79
  if (t.kind !== "enum") return e;
80
80
  let n = t.options.find((t) => t.value === e);
81
- return n == null ? e : C(n.label, b);
81
+ return n == null ? e : C(n.label, x);
82
82
  },
83
83
  booleanLabel: (e) => {
84
84
  if (t.kind === "boolean") {
85
- if (e && t.trueLabel != null) return C(t.trueLabel, b);
86
- if (!e && t.falseLabel != null) return C(t.falseLabel, b);
85
+ if (e && t.trueLabel != null) return C(t.trueLabel, x);
86
+ if (!e && t.falseLabel != null) return C(t.falseLabel, x);
87
87
  }
88
- return T(e ? "filters.boolean.yes" : "filters.boolean.no");
88
+ return w(e ? "filters.boolean.yes" : "filters.boolean.no");
89
89
  },
90
90
  fallbackBooleanLabels: {
91
- yes: T("filters.boolean.yes"),
92
- no: T("filters.boolean.no")
91
+ yes: w("filters.boolean.yes"),
92
+ no: w("filters.boolean.no")
93
93
  }
94
94
  });
95
95
  if (r != null) {
96
96
  let i = String(n);
97
97
  Array.isArray(n) && (i = n.join(","));
98
98
  let a = /* @__PURE__ */ _("span", { children: [
99
- C(t.label, b),
99
+ C(t.label, x),
100
100
  ": ",
101
101
  r
102
102
  ] });
@@ -104,9 +104,9 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
104
104
  id: `${t.id}:${i}`,
105
105
  label: a,
106
106
  onRemove: () => {
107
- let e = t.whereKey ?? t.id, n = x(D.where, e, null, t.path);
108
- O({
109
- ...D,
107
+ let e = t.whereKey ?? t.id, n = S(E.where, e, null, t.path);
108
+ D({
109
+ ...E,
110
110
  where: n
111
111
  });
112
112
  }
@@ -116,24 +116,24 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
116
116
  return e;
117
117
  }, [
118
118
  V.filters,
119
- O,
120
119
  D,
121
- T,
122
- b
120
+ E,
121
+ w,
122
+ x
123
123
  ]), W = f(() => {
124
- O({ ...Oe });
125
- }, [Oe, O]), [ke, Ae] = m(!1), [G, je] = m(""), [K, Me] = m(null), q = f((e) => {
126
- let n = e.whereKey ?? e.id, r = w(e, D.where), i = "";
124
+ D({ ...Oe });
125
+ }, [Oe, D]), [ke, Ae] = m(!1), [G, je] = m(""), [K, Me] = m(null), q = f((e) => {
126
+ let n = e.whereKey ?? e.id, r = ye(e, E.where), i = "";
127
127
  typeof r == "string" && (i = r), typeof r == "number" && Number.isFinite(r) && (i = String(r));
128
- let s = C(e.label, b);
128
+ let o = C(e.label, x);
129
129
  if (e.kind === "text") {
130
- let t = T("filters.placeholders.search", { label: e.placeholderLabel == null ? s : C(e.placeholderLabel, b) });
131
- return e.placeholderText != null && (t = C(e.placeholderText, b)), /* @__PURE__ */ g(o, {
132
- value: be(i),
130
+ let t = w("filters.placeholders.search", { label: e.placeholderLabel == null ? o : C(e.placeholderLabel, x) });
131
+ return e.placeholderText != null && (t = C(e.placeholderText, x)), /* @__PURE__ */ g(a, {
132
+ value: xe(i),
133
133
  onApply: (t) => {
134
- let r = xe(t), i = x(D.where, n, r, e.path);
135
- O({
136
- ...D,
134
+ let r = Se(t), i = S(E.where, n, r, e.path);
135
+ D({
136
+ ...E,
137
137
  where: i
138
138
  });
139
139
  },
@@ -143,13 +143,13 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
143
143
  });
144
144
  }
145
145
  if (e.kind === "datetime") {
146
- let t = T("filters.placeholders.search", { label: e.placeholderLabel == null ? s : C(e.placeholderLabel, b) });
147
- return e.placeholderText != null && (t = C(e.placeholderText, b)), /* @__PURE__ */ g(o, {
146
+ let t = w("filters.placeholders.search", { label: e.placeholderLabel == null ? o : C(e.placeholderLabel, x) });
147
+ return e.placeholderText != null && (t = C(e.placeholderText, x)), /* @__PURE__ */ g(a, {
148
148
  value: i,
149
149
  onApply: (t) => {
150
- let r = x(D.where, n, t, e.path);
151
- O({
152
- ...D,
150
+ let r = S(E.where, n, t, e.path);
151
+ D({
152
+ ...E,
153
153
  where: r
154
154
  });
155
155
  },
@@ -160,13 +160,13 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
160
160
  });
161
161
  }
162
162
  if (e.kind === "number") {
163
- let t = T("filters.placeholders.search", { label: e.placeholderLabel == null ? s : C(e.placeholderLabel, b) });
164
- return e.placeholderText != null && (t = C(e.placeholderText, b)), /* @__PURE__ */ g(o, {
163
+ let t = w("filters.placeholders.search", { label: e.placeholderLabel == null ? o : C(e.placeholderLabel, x) });
164
+ return e.placeholderText != null && (t = C(e.placeholderText, x)), /* @__PURE__ */ g(a, {
165
165
  value: i,
166
166
  onApply: (t) => {
167
- let r = t.trim(), i = r === "" ? null : Number(r), a = x(D.where, n, Number.isFinite(i) ? i : null, e.path);
168
- O({
169
- ...D,
167
+ let r = t.trim(), i = r === "" ? null : Number(r), a = S(E.where, n, Number.isFinite(i) ? i : null, e.path);
168
+ D({
169
+ ...E,
170
170
  where: a
171
171
  });
172
172
  },
@@ -181,19 +181,19 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
181
181
  options: [{
182
182
  id: "any",
183
183
  value: "",
184
- label: T("filters.all", { label: s })
184
+ label: w("filters.all", { label: o })
185
185
  }, ...e.options.map((e) => ({
186
186
  id: e.value,
187
187
  value: e.value,
188
- label: C(e.label, b)
188
+ label: C(e.label, x)
189
189
  }))],
190
190
  value: i,
191
191
  size: "small",
192
- ariaLabel: s,
192
+ ariaLabel: o,
193
193
  onChange: (t) => {
194
- let r = x(D.where, n, t, e.path);
195
- O({
196
- ...D,
194
+ let r = S(E.where, n, t, e.path);
195
+ D({
196
+ ...E,
197
197
  where: r
198
198
  });
199
199
  }
@@ -203,13 +203,13 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
203
203
  typeof r == "boolean" && (t = r);
204
204
  let i = "";
205
205
  t === !0 && (i = "true"), t === !1 && (i = "false");
206
- let a = e.trueLabel == null ? T("filters.boolean.yes") : C(e.trueLabel, b), o = e.falseLabel == null ? T("filters.boolean.no") : C(e.falseLabel, b);
206
+ let a = e.trueLabel == null ? w("filters.boolean.yes") : C(e.trueLabel, x), s = e.falseLabel == null ? w("filters.boolean.no") : C(e.falseLabel, x);
207
207
  return /* @__PURE__ */ g(y, {
208
208
  options: [
209
209
  {
210
210
  id: "any",
211
211
  value: "",
212
- label: T("filters.all", { label: s })
212
+ label: w("filters.all", { label: o })
213
213
  },
214
214
  {
215
215
  id: "true",
@@ -219,66 +219,66 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
219
219
  {
220
220
  id: "false",
221
221
  value: "false",
222
- label: o
222
+ label: s
223
223
  }
224
224
  ],
225
225
  value: i,
226
226
  size: "small",
227
- ariaLabel: s,
227
+ ariaLabel: o,
228
228
  onChange: (t) => {
229
229
  let r = null;
230
230
  t === "true" && (r = !0), t === "false" && (r = !1);
231
- let i = x(D.where, n, r, e.path);
232
- O({
233
- ...D,
231
+ let i = S(E.where, n, r, e.path);
232
+ D({
233
+ ...E,
234
234
  where: i
235
235
  });
236
236
  }
237
237
  });
238
238
  }
239
239
  let c = (() => {
240
- if (e.pickerScope != null) return typeof e.pickerScope == "function" ? e.pickerScope(D.where) : e.pickerScope;
240
+ if (e.pickerScope != null) return typeof e.pickerScope == "function" ? e.pickerScope(E.where) : e.pickerScope;
241
241
  })(), l = null;
242
242
  typeof r == "string" && (l = r);
243
243
  let u = (r = null, i = !1) => {
244
244
  let a = r?.trim() ?? "";
245
245
  return /* @__PURE__ */ g(t, {
246
- label: s,
246
+ label: o,
247
247
  value: l,
248
248
  displayValue: a,
249
249
  isResolving: i,
250
- placeholder: T("filters.placeholders.anyEntity", { label: s }),
250
+ placeholder: w("filters.placeholders.anyEntity", { label: o }),
251
251
  onPick: () => {
252
252
  Me({
253
253
  entity: e.entity,
254
254
  whereKey: n,
255
- label: s,
255
+ label: o,
256
256
  path: e.path,
257
257
  scope: c
258
258
  });
259
259
  },
260
260
  onClear: () => {
261
- let t = x(D.where, n, null, e.path);
262
- O({
263
- ...D,
261
+ let t = S(E.where, n, null, e.path);
262
+ D({
263
+ ...E,
264
264
  where: t
265
265
  });
266
266
  }
267
267
  });
268
268
  };
269
- return l == null || l.trim() === "" ? u() : /* @__PURE__ */ g(a, {
269
+ return l == null || l.trim() === "" ? u() : /* @__PURE__ */ g(s, {
270
270
  entityId: e.entity,
271
271
  id: l,
272
272
  children: (e, t) => {
273
273
  let n = t?.status === "loading";
274
- return u(n ? T("common.loading") : e, n);
274
+ return u(n ? w("common.loading") : e, n);
275
275
  }
276
276
  });
277
277
  }, [
278
- O,
279
278
  D,
280
- T,
281
- b
279
+ E,
280
+ w,
281
+ x
282
282
  ]), Ne = p(() => V.filters.some((e) => e.placement != null), [V.filters]), J = p(() => {
283
283
  if (V.filters.length === 0) return [];
284
284
  let e = V.ui?.toolbar?.maxPromotedFilters ?? 3;
@@ -304,35 +304,35 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
304
304
  options: V.sorts.map((e) => ({
305
305
  id: e.id,
306
306
  value: e.id,
307
- label: C(e.label, b)
307
+ label: C(e.label, x)
308
308
  })),
309
- value: D.sort ?? e.id,
309
+ value: E.sort ?? e.id,
310
310
  size: "small",
311
- ariaLabel: T("list.sort.label"),
311
+ ariaLabel: w("list.sort.label"),
312
312
  onChange: (e) => {
313
- O({
314
- ...D,
313
+ D({
314
+ ...E,
315
315
  sort: e
316
316
  });
317
317
  }
318
318
  });
319
319
  }, [
320
320
  V.sorts,
321
- O,
322
321
  D,
323
- T,
324
- b
325
- ]), Le = p(() => U.length === 0 ? null : /* @__PURE__ */ g(me, {
322
+ E,
323
+ w,
324
+ x
325
+ ]), Le = p(() => U.length === 0 ? null : /* @__PURE__ */ g(pe, {
326
326
  chips: U,
327
327
  onClearAll: W
328
328
  }), [U, W]), Re = p(() => {
329
329
  if (Y.length === 0) return [];
330
330
  let e = G.trim().toLowerCase(), t = [];
331
331
  for (let n of Y) {
332
- let r = C(n.label, b);
332
+ let r = C(n.label, x);
333
333
  (e === "" || r.toLowerCase().includes(e)) && t.push({
334
334
  id: n.id,
335
- node: /* @__PURE__ */ g(ue, {
335
+ node: /* @__PURE__ */ g(ce, {
336
336
  label: r,
337
337
  children: q(n)
338
338
  })
@@ -340,19 +340,19 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
340
340
  }
341
341
  return t.length === 0 ? [] : [{
342
342
  id: "backoffice.filters.sections.default",
343
- title: T("filters.sections.default"),
343
+ title: w("filters.sections.default"),
344
344
  items: t
345
345
  }];
346
346
  }, [
347
347
  Y,
348
348
  G,
349
349
  q,
350
- T,
351
- b
350
+ w,
351
+ x
352
352
  ]), ze = p(() => {
353
353
  if (Y.length === 0) return null;
354
- let e = U.length, t = T("filters.trigger");
355
- return e > 0 && (t = T("filters.triggerWithCount", { count: e })), /* @__PURE__ */ g(v, {
354
+ let e = U.length, t = w("filters.trigger");
355
+ return e > 0 && (t = w("filters.triggerWithCount", { count: e })), /* @__PURE__ */ g(v, {
356
356
  type: "button",
357
357
  variant: "secondary",
358
358
  size: "small",
@@ -364,8 +364,8 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
364
364
  }, [
365
365
  U.length,
366
366
  Y.length,
367
- T
368
- ]), Be = /* @__PURE__ */ g(le, {
367
+ w
368
+ ]), Be = /* @__PURE__ */ g(se, {
369
369
  isOpen: ke,
370
370
  onClose: () => {
371
371
  Ae(!1), je("");
@@ -376,37 +376,37 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
376
376
  je(e);
377
377
  },
378
378
  onReset: W,
379
- emptyLabel: G.trim() === "" ? void 0 : T("filters.drawer.emptySearchResults")
380
- }), Ve = p(() => z ?? (Te ? /* @__PURE__ */ g(ce, {
379
+ emptyLabel: G.trim() === "" ? void 0 : w("filters.drawer.emptySearchResults")
380
+ }), Ve = p(() => R ?? (Te ? /* @__PURE__ */ g(fe, {
381
381
  variant: "embedded",
382
- ariaLabel: T("common.loading")
383
- }) : U.length > 0 ? /* @__PURE__ */ g(se, {
384
- title: T("emptyState.listEmpty.title"),
385
- description: T("emptyState.listEmptyFiltered.description"),
382
+ ariaLabel: w("common.loading")
383
+ }) : U.length > 0 ? /* @__PURE__ */ g(b, {
384
+ title: w("emptyState.listEmpty.title"),
385
+ description: w("emptyState.listEmptyFiltered.description"),
386
386
  actions: /* @__PURE__ */ g(v, {
387
387
  type: "button",
388
388
  variant: "secondary",
389
389
  size: "small",
390
390
  onClick: W,
391
- children: T("emptyState.listEmptyFiltered.actions.reset")
391
+ children: w("emptyState.listEmptyFiltered.actions.reset")
392
392
  })
393
- }) : /* @__PURE__ */ g(se, {
394
- title: T("emptyState.listEmpty.title"),
395
- description: T("emptyState.listEmpty.description")
393
+ }) : /* @__PURE__ */ g(b, {
394
+ title: w("emptyState.listEmpty.title"),
395
+ description: w("emptyState.listEmpty.description")
396
396
  })), [
397
397
  U.length,
398
- z,
398
+ R,
399
399
  W,
400
400
  Te,
401
- T
402
- ]), He = p(() => R ?? (typeof L == "number" ? /* @__PURE__ */ g("span", { children: T("list.showing", {
403
- shown: k.length,
404
- total: L
405
- }) }) : k.length === 0 ? null : /* @__PURE__ */ g("span", { children: T("list.loaded", { count: k.length }) })), [
406
- R,
407
- k.length,
408
- T,
409
- L
401
+ w
402
+ ]), He = p(() => L ?? (typeof I == "number" ? /* @__PURE__ */ g("span", { children: w("list.showing", {
403
+ shown: O.length,
404
+ total: I
405
+ }) }) : O.length === 0 ? null : /* @__PURE__ */ g("span", { children: w("list.loaded", { count: O.length }) })), [
406
+ L,
407
+ O.length,
408
+ w,
409
+ I
410
410
  ]), Z = p(() => {
411
411
  let e = V.ui?.displayMode ?? V.responsive?.mode ?? "auto";
412
412
  return ve({
@@ -418,69 +418,69 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
418
418
  V.kind,
419
419
  V.responsive?.mode,
420
420
  V.ui
421
- ]), Q = typeof L == "number" && k.length < L && !N;
421
+ ]), Q = typeof I == "number" && O.length < I && !M;
422
422
  ie(() => {
423
423
  !Q || !Z.infiniteScroll.showInconsistentPageInfo || !u() || console.warn("Backoffice list received inconsistent pageInfo: loaded rows are lower than totalCount but hasNextPage is false.", {
424
- entityId: E.id,
425
- loadedCount: k.length,
426
- totalCount: L
424
+ entityId: T.id,
425
+ loadedCount: O.length,
426
+ totalCount: I
427
427
  });
428
428
  }, [
429
- E.id,
429
+ T.id,
430
430
  Q,
431
- k.length,
431
+ O.length,
432
432
  Z.infiniteScroll.showInconsistentPageInfo,
433
- L
433
+ I
434
434
  ]);
435
- let Ue = i.virtualize === !0 || Z.virtualization.enabled, { sentinelRef: We } = l({
435
+ let Ue = o.virtualize === !0 || Z.virtualization.enabled, { sentinelRef: We } = l({
436
436
  enabled: !Ue && Z.infiniteScroll.enabled,
437
- hasNextPage: N,
438
- isLoading: P,
439
- onIntersect: F,
437
+ hasNextPage: M,
438
+ isLoading: N,
439
+ onIntersect: P,
440
440
  rootMargin: Z.infiniteScroll.rootMargin,
441
441
  threshold: Z.infiniteScroll.threshold
442
- }), Ge = Ce?.title ?? C(V.title, b), Ke = Ce?.subtitle, qe = H.find((e) => e.mobileRole === "action" || e.id === "actions"), Je = V.ui?.displayMode ?? V.responsive?.mode ?? "auto", Ye = V.ui?.density ?? V.responsive?.density ?? "compact", Xe = /* @__PURE__ */ g(n, {
442
+ }), Ge = B?.title ?? C(V.title, x), Ke = B?.subtitle, qe = H.find((e) => e.mobileRole === "action" || e.id === "actions"), Je = V.ui?.displayMode ?? V.responsive?.mode ?? "auto", Ye = V.ui?.density ?? V.responsive?.density ?? "compact", Xe = /* @__PURE__ */ g(n, {
443
443
  fallback: (e) => {
444
444
  let { reset: t } = e;
445
445
  return /* @__PURE__ */ g(ae, {
446
446
  tone: "danger",
447
- title: T("list.errors.title"),
447
+ title: w("list.errors.title"),
448
448
  actions: /* @__PURE__ */ g(v, {
449
449
  type: "button",
450
450
  variant: "secondary",
451
451
  size: "small",
452
452
  onClick: () => {
453
- t(), I?.();
453
+ t(), F?.();
454
454
  },
455
- children: T("list.actions.retry")
455
+ children: w("list.actions.retry")
456
456
  }),
457
- children: T("list.errors.tableFailed")
457
+ children: w("list.errors.tableFailed")
458
458
  });
459
459
  },
460
- children: Ue ? /* @__PURE__ */ g(_e, {
460
+ children: Ue ? /* @__PURE__ */ g(ge, {
461
461
  columns: H,
462
- rows: k,
463
- getRowId: A,
462
+ rows: O,
463
+ getRowId: k,
464
464
  emptyState: Ve,
465
- className: S,
466
- gridTemplateColumns: M,
465
+ className: _e,
466
+ gridTemplateColumns: j,
467
467
  virtualization: Z.virtualization,
468
468
  infiniteScroll: {
469
469
  enabled: Z.infiniteScroll.enabled,
470
470
  thresholdPx: Z.infiniteScroll.thresholdPx,
471
471
  autoLoad: Z.infiniteScroll.autoLoad
472
472
  },
473
- hasNextPage: N,
474
- isLoadingMore: P,
475
- onLoadMore: F,
473
+ hasNextPage: M,
474
+ isLoadingMore: N,
475
+ onLoadMore: P,
476
476
  bodyScrollMode: c
477
- }) : /* @__PURE__ */ g(ge, {
477
+ }) : /* @__PURE__ */ g(he, {
478
478
  columns: H,
479
- rows: k,
480
- getRowId: A,
479
+ rows: O,
480
+ getRowId: k,
481
481
  emptyState: Ve,
482
- className: S,
483
- gridTemplateColumns: M,
482
+ className: _e,
483
+ gridTemplateColumns: j,
484
484
  mode: Je,
485
485
  density: Ye,
486
486
  bodyScrollMode: c,
@@ -490,21 +490,21 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
490
490
  }) : null,
491
491
  renderAction: (e) => qe?.cell(e) ?? null
492
492
  })
493
- }), Ze = De ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(pe, {
493
+ }), Ze = De ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(de, {
494
494
  search: Fe,
495
495
  primaryFilters: Pe,
496
496
  filterDrawerTrigger: ze,
497
497
  sort: Ie,
498
- utilityActions: I == null ? null : /* @__PURE__ */ g(v, {
498
+ utilityActions: F == null ? null : /* @__PURE__ */ g(v, {
499
499
  type: "button",
500
500
  variant: "secondary",
501
501
  size: "small",
502
- isLoading: Se,
503
- loadingLabel: T("list.actions.refreshing"),
502
+ isLoading: Ce,
503
+ loadingLabel: w("list.actions.refreshing"),
504
504
  onClick: () => {
505
- I();
505
+ F();
506
506
  },
507
- children: T("list.actions.refresh")
507
+ children: w("list.actions.refresh")
508
508
  }),
509
509
  chips: Le,
510
510
  density: "compact"
@@ -512,38 +512,38 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
512
512
  className: re,
513
513
  children: [Xe, /* @__PURE__ */ g(r, {
514
514
  isOpen: K != null,
515
- entity: K?.entity ?? E.id,
516
- title: K?.label ?? T("picker.title"),
515
+ entity: K?.entity ?? T.id,
516
+ title: K?.label ?? w("picker.title"),
517
517
  scope: K?.scope,
518
518
  onClose: () => {
519
519
  Me(null);
520
520
  },
521
521
  onSelectId: (e) => {
522
522
  if (K == null) return;
523
- let t = x(D.where, K.whereKey, e, K.path);
524
- O({
525
- ...D,
523
+ let t = S(E.where, K.whereKey, e, K.path);
524
+ D({
525
+ ...E,
526
526
  where: t
527
527
  });
528
528
  }
529
529
  })]
530
- }), $ = k.length > 0 || P || N ? /* @__PURE__ */ g(h, { children: /* @__PURE__ */ g(de, {
530
+ }), $ = O.length > 0 || N || M ? /* @__PURE__ */ g(h, { children: /* @__PURE__ */ g(le, {
531
531
  mode: "status",
532
- loadedCount: k.length,
533
- totalCount: L,
534
- hasNextPage: N,
535
- isLoading: P,
536
- pageInfoState: Q ? "inconsistent" : P ? "loading" : N ? "ready" : "complete",
532
+ loadedCount: O.length,
533
+ totalCount: I,
534
+ hasNextPage: M,
535
+ isLoading: N,
536
+ pageInfoState: Q ? "inconsistent" : N ? "loading" : M ? "ready" : "complete",
537
537
  labels: {
538
538
  loaded: He,
539
- loading: T("list.loadMore.loading"),
540
- end: T("list.loadMore.end")
539
+ loading: w("list.loadMore.loading"),
540
+ end: w("list.loadMore.end")
541
541
  }
542
542
  }) }) : null;
543
- return Ee === "embedded" ? /* @__PURE__ */ g(s, {
544
- config: E,
545
- state: D,
546
- pushState: O,
543
+ return Ee === "embedded" ? /* @__PURE__ */ g(i, {
544
+ config: T,
545
+ state: E,
546
+ pushState: D,
547
547
  children: /* @__PURE__ */ _("div", {
548
548
  className: te,
549
549
  children: [
@@ -552,23 +552,23 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
552
552
  children: Ge
553
553
  }),
554
554
  Ze,
555
- B,
555
+ z,
556
556
  Qe,
557
557
  $
558
558
  ]
559
559
  })
560
- }) : /* @__PURE__ */ g(s, {
561
- config: E,
562
- state: D,
563
- pushState: O,
564
- children: /* @__PURE__ */ g(he, {
565
- headerNode: /* @__PURE__ */ g(fe, {
560
+ }) : /* @__PURE__ */ g(i, {
561
+ config: T,
562
+ state: E,
563
+ pushState: D,
564
+ children: /* @__PURE__ */ g(me, {
565
+ headerNode: /* @__PURE__ */ g(ue, {
566
566
  title: Ge,
567
567
  subtitle: Ke,
568
568
  actions: we
569
569
  }),
570
570
  toolbarNode: Ze,
571
- statusNode: B,
571
+ statusNode: z,
572
572
  tableNode: Qe,
573
573
  tableFooterNode: $,
574
574
  presentation: "flat",
@@ -577,6 +577,6 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
577
577
  });
578
578
  };
579
579
  //#endregion
580
- export { T as BackofficeEntityListScaffold, T as default };
580
+ export { w as BackofficeEntityListScaffold, w as default };
581
581
 
582
582
  //# sourceMappingURL=BackofficeEntityListScaffold.js.map