@plumile/backoffice-react 0.1.194 → 0.1.195

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 (117) hide show
  1. package/lib/esm/auth/AuthRefreshNotice.js.map +1 -1
  2. package/lib/esm/auth/TotpQrCode.js +8 -5
  3. package/lib/esm/auth/TotpQrCode.js.map +1 -1
  4. package/lib/esm/auth/login/AuthPanel.js.map +1 -1
  5. package/lib/esm/auth/login/EmailCapturePanel.js +4 -4
  6. package/lib/esm/auth/login/EmailCapturePanel.js.map +1 -1
  7. package/lib/esm/auth/login/LoginFlow.js.map +1 -1
  8. package/lib/esm/auth/login/MethodChooser.js.map +1 -1
  9. package/lib/esm/auth/login/MfaChallengeForm.js +4 -4
  10. package/lib/esm/auth/login/MfaChallengeForm.js.map +1 -1
  11. package/lib/esm/auth/login/OidcButtons.js.map +1 -1
  12. package/lib/esm/auth/login/PasskeyLoginForm.js +4 -4
  13. package/lib/esm/auth/login/PasskeyLoginForm.js.map +1 -1
  14. package/lib/esm/auth/login/PasswordLoginPanel.js.map +1 -1
  15. package/lib/esm/auth/pages/AcceptInvitationScreen.js.map +1 -1
  16. package/lib/esm/auth/pages/PasswordResetCompleteScreen.js.map +1 -1
  17. package/lib/esm/auth/pages/PasswordResetRequestScreen.js.map +1 -1
  18. package/lib/esm/auth/pages/VerifyEmailScreen.js.map +1 -1
  19. package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js +0 -1
  20. package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js.map +1 -1
  21. package/lib/esm/components/backoffice/actions/LazyBackofficeEntityActionFormDialog.js.map +1 -1
  22. package/lib/esm/components/backoffice/billing/BackofficeBillingUsageChart.js.map +1 -1
  23. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +16 -11
  24. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
  25. package/lib/esm/components/backoffice/detail/BackofficeDetailBadgeRow.js.map +1 -1
  26. package/lib/esm/components/backoffice/detail/BackofficeDetailErrorList.js.map +1 -1
  27. package/lib/esm/components/backoffice/detail/BackofficeEntitySummaryHeader.js.map +1 -1
  28. package/lib/esm/components/backoffice/detail/BackofficeLifecycleTimelineSection.js.map +1 -1
  29. package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js.map +1 -1
  30. package/lib/esm/components/backoffice/detail/BackofficeTokenUsageBreakdown.js.map +1 -1
  31. package/lib/esm/components/backoffice/detail/BackofficeUsageCostBreakdown.js.map +1 -1
  32. package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js +2 -2
  33. package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js.map +1 -1
  34. package/lib/esm/components/backoffice/filters/DeferredFilterSearchInput.js.map +1 -1
  35. package/lib/esm/components/backoffice/filters/EntityFilterValue.js.map +1 -1
  36. package/lib/esm/components/backoffice/filters/EntityIdFilterField.js.map +1 -1
  37. package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js.map +1 -1
  38. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeRightPageLayout.js +4 -1
  39. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeRightPageLayout.js.map +1 -1
  40. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js.map +1 -1
  41. package/lib/esm/components/backoffice/layout/buildSidebarSections.js.map +1 -1
  42. package/lib/esm/components/backoffice/layout/sidebarUtils.js.map +1 -1
  43. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -1
  44. package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -1
  45. package/lib/esm/components/backoffice/links/BackofficeLinkContent.js.map +1 -1
  46. package/lib/esm/components/backoffice/links/BackofficeLinkLabel.js.map +1 -1
  47. package/lib/esm/components/backoffice/list/RowFlagsCell.js.map +1 -1
  48. package/lib/esm/components/backoffice/overview/BackofficeOverviewLayout.js.map +1 -1
  49. package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +9 -9
  50. package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
  51. package/lib/esm/components/backoffice/refs/BackofficeEntityIdRef.js.map +1 -1
  52. package/lib/esm/components/backoffice/refs/BackofficeEntityLink.js.map +1 -1
  53. package/lib/esm/components/backoffice/refs/BackofficeLazyEntityCount.js.map +1 -1
  54. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js +4 -4
  55. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js.map +1 -1
  56. package/lib/esm/components/backoffice/routing/BackofficeContentBoundary.js.map +1 -1
  57. package/lib/esm/components/backoffice/routing/BackofficeContentError.js.map +1 -1
  58. package/lib/esm/components/backoffice/routing/BackofficeContentFallback.js.map +1 -1
  59. package/lib/esm/components/backoffice/routing/BackofficeRoutePendingBar.js.map +1 -1
  60. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailNotFound.js +8 -5
  61. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailNotFound.js.map +1 -1
  62. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +306 -297
  63. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
  64. package/lib/esm/components/backoffice/scaffolds/BackofficeTabbedDetailShell.js.map +1 -1
  65. package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js.map +1 -1
  66. package/lib/esm/components/backoffice/shared/BackofficeFormattedCurrency.js.map +1 -1
  67. package/lib/esm/components/backoffice/shared/BackofficeFormattedNumber.js.map +1 -1
  68. package/lib/esm/components/backoffice/shared/BackofficeInlineFilterRow.js.map +1 -1
  69. package/lib/esm/components/backoffice/tools/BackofficeToolsDocPanel.js.map +1 -1
  70. package/lib/esm/components/backoffice/tools/BackofficeToolsErrorFallback.js.map +1 -1
  71. package/lib/esm/components/backoffice/tools/BackofficeToolsJsonForm.js.map +1 -1
  72. package/lib/esm/components/backoffice/tools/BackofficeToolsQueryBoundary.js +11 -11
  73. package/lib/esm/components/backoffice/tools/BackofficeToolsQueryBoundary.js.map +1 -1
  74. package/lib/esm/node_modules/relay-test-utils/lib/RelayModernMockEnvironment.js +1 -1
  75. package/lib/esm/node_modules/relay-test-utils/lib/RelayModernMockEnvironment.js.map +1 -1
  76. package/lib/esm/pages/BackofficeAcceptInvitationPage.js +8 -8
  77. package/lib/esm/pages/BackofficeAcceptInvitationPage.js.map +1 -1
  78. package/lib/esm/pages/BackofficeDashboardPage.js +4 -4
  79. package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
  80. package/lib/esm/pages/BackofficeDashboardShellPage.js.map +1 -1
  81. package/lib/esm/pages/BackofficeDashboardWidgetContent.js +62 -43
  82. package/lib/esm/pages/BackofficeDashboardWidgetContent.js.map +1 -1
  83. package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +4 -4
  84. package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
  85. package/lib/esm/pages/BackofficeEntityDetailPage.js +95 -89
  86. package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
  87. package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js +2 -2
  88. package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js.map +1 -1
  89. package/lib/esm/pages/BackofficeEntityDetailPageConfigPage.js.map +1 -1
  90. package/lib/esm/pages/BackofficeEntityListDataPage.js +13 -11
  91. package/lib/esm/pages/BackofficeEntityListDataPage.js.map +1 -1
  92. package/lib/esm/pages/BackofficeEntityListPage.js +80 -76
  93. package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
  94. package/lib/esm/pages/BackofficeEntityListShellPage.js.map +1 -1
  95. package/lib/esm/pages/BackofficeHubPage.js.map +1 -1
  96. package/lib/esm/pages/BackofficeLayoutPage.js +56 -53
  97. package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
  98. package/lib/esm/pages/BackofficeLoginPage.js +26 -26
  99. package/lib/esm/pages/BackofficeLoginPage.js.map +1 -1
  100. package/lib/esm/pages/BackofficePasswordResetCompletePage.js +36 -36
  101. package/lib/esm/pages/BackofficePasswordResetCompletePage.js.map +1 -1
  102. package/lib/esm/pages/BackofficePasswordResetRequestPage.js +3 -3
  103. package/lib/esm/pages/BackofficePasswordResetRequestPage.js.map +1 -1
  104. package/lib/esm/pages/BackofficeToolShellPage.js.map +1 -1
  105. package/lib/esm/pages/BackofficeVerifyEmailPage.js +36 -36
  106. package/lib/esm/pages/BackofficeVerifyEmailPage.js.map +1 -1
  107. package/lib/esm/pages/detail/BackofficeEntityDetailManifestFallback.js.map +1 -1
  108. package/lib/esm/provider/BackofficeProvider.js +3 -2
  109. package/lib/esm/provider/BackofficeProvider.js.map +1 -1
  110. package/lib/esm/relay/envHelpers.js.map +1 -1
  111. package/lib/esm/router/createBackofficeRoutes.js +2 -2
  112. package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
  113. package/lib/esm/storybook/relay/RelayStory.js +4 -1
  114. package/lib/esm/storybook/relay/RelayStory.js.map +1 -1
  115. package/lib/esm/subscriptions/useCursorResumableSubscription.js +4 -4
  116. package/lib/esm/subscriptions/useCursorResumableSubscription.js.map +1 -1
  117. package/package.json +16 -16
@@ -4,42 +4,46 @@ import { BackofficeErrorBoundary as n } from "../errors/BackofficeErrorBoundary.
4
4
  import { EntityIdPickerDialog as r } from "../pickers/EntityIdPickerDialog.js";
5
5
  import { BackofficeListFilterProvider as i } from "./BackofficeListFilterContext.js";
6
6
  import { DeferredFilterSearchInput as a } from "../filters/DeferredFilterSearchInput.js";
7
- import { EntityFilterValue as o, EntityFilterValueText as ee } from "../filters/EntityFilterValue.js";
8
- import { BACKOFFICE_LIST_BODY_SCROLL_MODE as s } from "./backofficeListScrollMode.js";
9
- import { useBackofficeInfiniteScrollSentinel as c } from "../../../hooks/useBackofficeInfiniteScrollSentinel.js";
10
- import { isDevEnv as l } from "../../../relay/envHelpers.js";
11
- import { controlsRow as u, embeddedContainer as te, embeddedHeader as ne, entityIdListFilter as re, entityIdListTags as ie, filterInput as d, refreshingIndicator as ae, tableHost as oe } from "./backofficeEntityListScaffold.css.js";
12
- import { useCallback as f, useEffect as se, useMemo as p, useState as m } from "react";
7
+ import { EntityFilterValue as o, EntityFilterValueText as s } from "../filters/EntityFilterValue.js";
8
+ import { BACKOFFICE_LIST_BODY_SCROLL_MODE as c } from "./backofficeListScrollMode.js";
9
+ import { useBackofficeInfiniteScrollSentinel as l } from "../../../hooks/useBackofficeInfiniteScrollSentinel.js";
10
+ import { isDevEnv as u } from "../../../relay/envHelpers.js";
11
+ import { controlsRow as d, embeddedContainer as ee, embeddedHeader as te, entityIdListFilter as ne, entityIdListTags as re, filterInput as f, refreshingIndicator as ie, tableHost as ae } from "./backofficeEntityListScaffold.css.js";
12
+ import { useCallback as oe, useEffect as se, useMemo as p, useState as m } from "react";
13
13
  import { InlineBanner as ce } from "@plumile/ui/components/feedback/InlineBanner.js";
14
14
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
15
15
  import { useTranslation as le } 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
18
  import { Spinner as ue } from "@plumile/ui/backoffice/atoms/spinner/Spinner.js";
19
- import { BackofficeEmptyState as de } from "@plumile/ui/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
20
- import { Tag as fe } from "@plumile/ui/backoffice/atoms/tag/Tag.js";
21
- import { readWhereValue as b, setWhereValue as x } from "@plumile/backoffice-core/filters/where.js";
22
- import { BackofficeFilterDrawer as pe } from "@plumile/ui/backoffice/molecules/backoffice_filter_drawer/BackofficeFilterDrawer.js";
23
- import { BackofficeFilterField as me } from "@plumile/ui/backoffice/molecules/backoffice_filter_field/BackofficeFilterField.js";
24
- import { BackofficeListFooter as he } from "@plumile/ui/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.js";
25
- import { BackofficePageHeader as ge } from "@plumile/ui/backoffice/molecules/backoffice_page_header/BackofficePageHeader.js";
26
- import { BackofficeToolbar as _e } from "@plumile/ui/backoffice/molecules/backoffice_toolbar/BackofficeToolbar.js";
27
- import { BackofficeTableSkeleton as ve } from "@plumile/ui/backoffice/molecules/backoffice_table_skeleton/BackofficeTableSkeleton.js";
28
- import { FilterChipRow as ye } from "@plumile/ui/backoffice/molecules/filter_chip_row/FilterChipRow.js";
29
- import { ListPageTemplate as be } from "@plumile/ui/backoffice/templates/list_page_template/ListPageTemplate.js";
30
- import { ResponsiveRecordList as xe } from "@plumile/ui/components/data-table/ResponsiveRecordList.js";
31
- import { VirtualizedConnectionTable as Se } from "@plumile/ui/components/data-table/VirtualizedConnectionTable.js";
32
- import { denseTableClass as Ce } from "@plumile/ui/shared/backofficeTableDensity.css.js";
33
- import { resolveBackofficeListRuntimeConfig as we } from "@plumile/backoffice-core/config/listRuntime.js";
19
+ import { BackofficeEmptyState as b } from "@plumile/ui/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
20
+ import { Tag as de } from "@plumile/ui/backoffice/atoms/tag/Tag.js";
21
+ import { readWhereValue as x, setWhereValue as S } from "@plumile/backoffice-core/filters/where.js";
22
+ import { BackofficeFilterDrawer as fe } from "@plumile/ui/backoffice/molecules/backoffice_filter_drawer/BackofficeFilterDrawer.js";
23
+ import { BackofficeFilterField as pe } from "@plumile/ui/backoffice/molecules/backoffice_filter_field/BackofficeFilterField.js";
24
+ import { BackofficeListFooter as me } from "@plumile/ui/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.js";
25
+ import { BackofficePageHeader as he } from "@plumile/ui/backoffice/molecules/backoffice_page_header/BackofficePageHeader.js";
26
+ import { BackofficeToolbar as ge } from "@plumile/ui/backoffice/molecules/backoffice_toolbar/BackofficeToolbar.js";
27
+ import { BackofficeTableSkeleton as _e } from "@plumile/ui/backoffice/molecules/backoffice_table_skeleton/BackofficeTableSkeleton.js";
28
+ import { FilterChipRow as ve } from "@plumile/ui/backoffice/molecules/filter_chip_row/FilterChipRow.js";
29
+ import { ListPageTemplate as ye } from "@plumile/ui/backoffice/templates/list_page_template/ListPageTemplate.js";
30
+ import { ResponsiveRecordList as be } from "@plumile/ui/components/data-table/ResponsiveRecordList.js";
31
+ import { VirtualizedConnectionTable as xe } from "@plumile/ui/components/data-table/VirtualizedConnectionTable.js";
32
+ import { denseTableClass as Se } from "@plumile/ui/shared/backofficeTableDensity.css.js";
33
+ import { resolveBackofficeListRuntimeConfig as Ce } from "@plumile/backoffice-core/config/listRuntime.js";
34
34
  //#region src/components/backoffice/scaffolds/BackofficeEntityListScaffold.tsx
35
- var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fromGraphQL(t) : b(t, e.whereKey ?? e.id, e.path), Ee = (e) => Array.isArray(e) ? e.map((e) => {
35
+ var C = (e, t) => e(t), we = (e, t) => {
36
+ if (e.fromGraphQL != null && t != null) return e.fromGraphQL(t);
37
+ let n = e.whereKey ?? e.id;
38
+ return x(t, n, e.path);
39
+ }, Te = (e) => Array.isArray(e) ? e.map((e) => {
36
40
  if (e == null) return null;
37
41
  let t = String(e).trim();
38
42
  return t === "" ? null : t;
39
- }).filter((e) => e != null) : [], De = (e, t, n) => {
43
+ }).filter((e) => e != null) : [], Ee = (e, t, n) => {
40
44
  if (t == null) return null;
41
45
  if (Array.isArray(t)) {
42
- let n = Ee(t);
46
+ let n = Te(t);
43
47
  return n.length === 0 ? null : e.kind === "entityIdList" ? /* @__PURE__ */ g(h, { children: n.map((t, r) => /* @__PURE__ */ _("span", { children: [/* @__PURE__ */ g(o, {
44
48
  entityId: e.entity,
45
49
  id: t
@@ -52,21 +56,21 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
52
56
  entityId: e.entity,
53
57
  id: r
54
58
  }) : e.kind === "enum" ? n.enumLabel(r) : r;
55
- }, Oe = (e) => {
59
+ }, De = (e) => {
56
60
  let t = new Date(e);
57
61
  if (Number.isNaN(t.getTime())) return e;
58
62
  let n = t.getTimezoneOffset() * 6e4;
59
63
  return new Date(t.getTime() - n).toISOString().slice(0, 16);
60
- }, ke = (e) => {
64
+ }, Oe = (e) => {
61
65
  let t = e.trim();
62
66
  if (t === "") return "";
63
67
  let n = new Date(t);
64
68
  return Number.isNaN(n.getTime()) ? t : n.toISOString();
65
- }, C = (b) => {
66
- let { t: C } = le(), { t: w } = e(), { config: T, state: E, pushState: D, rows: O, getRowId: k, columns: A, gridTemplateColumns: Ae, hasNextPage: j, isLoadingMore: M, isRefreshing: N = !1, onLoadMore: je, onRefresh: P, totalCount: F, loadedCountLabel: Me, emptyState: Ne, statusBanner: Pe, header: I, headerActions: Fe, isLoadingInitial: L = !1, variant: Ie = "page", showFilters: Le = !0 } = b, R = T.list, Re = T.listDefaults ?? R.defaultState ?? {
69
+ }, w = (x) => {
70
+ let { t: w } = le(), { t: T } = e(), { config: E, state: D, pushState: O, rows: k, getRowId: A, columns: j, gridTemplateColumns: ke, hasNextPage: M, isLoadingMore: N, isRefreshing: P = !1, onLoadMore: Ae, onRefresh: F, totalCount: I, loadedCountLabel: je, emptyState: Me, statusBanner: Ne, header: Pe, headerActions: Fe, isLoadingInitial: L = !1, variant: Ie = "page", showFilters: Le = !0 } = x, R = E.list, Re = E.listDefaults ?? R.defaultState ?? {
67
71
  where: null,
68
72
  sort: null
69
- }, z = p(() => A.some((e) => e.isPrimary === !0) || A.length === 0 ? A : A.map((e, t) => {
73
+ }, z = p(() => j.some((e) => e.isPrimary === !0) || j.length === 0 ? j : j.map((e, t) => {
70
74
  let { header: n } = e;
71
75
  return t === 0 ? {
72
76
  ...e,
@@ -76,32 +80,32 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
76
80
  ...e,
77
81
  header: n
78
82
  };
79
- }), [A]), B = p(() => {
83
+ }), [j]), B = p(() => {
80
84
  let e = [];
81
85
  for (let t of R.filters) {
82
- let n = Te(t, E.where), r = De(t, n, {
86
+ let n = we(t, D.where), r = Ee(t, n, {
83
87
  enumLabel: (e) => {
84
88
  if (t.kind !== "enum") return e;
85
89
  let n = t.options.find((t) => t.value === e);
86
- return n == null ? e : S(n.label, C);
90
+ return n == null ? e : C(n.label, w);
87
91
  },
88
92
  booleanLabel: (e) => {
89
93
  if (t.kind === "boolean") {
90
- if (e && t.trueLabel != null) return S(t.trueLabel, C);
91
- if (!e && t.falseLabel != null) return S(t.falseLabel, C);
94
+ if (e && t.trueLabel != null) return C(t.trueLabel, w);
95
+ if (!e && t.falseLabel != null) return C(t.falseLabel, w);
92
96
  }
93
- return w(e ? "filters.boolean.yes" : "filters.boolean.no");
97
+ return T(e ? "filters.boolean.yes" : "filters.boolean.no");
94
98
  },
95
99
  fallbackBooleanLabels: {
96
- yes: w("filters.boolean.yes"),
97
- no: w("filters.boolean.no")
100
+ yes: T("filters.boolean.yes"),
101
+ no: T("filters.boolean.no")
98
102
  }
99
103
  });
100
104
  if (r != null) {
101
105
  let i = String(n);
102
106
  Array.isArray(n) && (i = n.join(","));
103
107
  let a = /* @__PURE__ */ _("span", { children: [
104
- S(t.label, C),
108
+ C(t.label, w),
105
109
  ": ",
106
110
  r
107
111
  ] });
@@ -109,9 +113,9 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
109
113
  id: `${t.id}:${i}`,
110
114
  label: a,
111
115
  onRemove: () => {
112
- let e = t.whereKey ?? t.id, n = x(E.where, e, null, t.path);
113
- D({
114
- ...E,
116
+ let e = t.whereKey ?? t.id, n = S(D.where, e, null, t.path);
117
+ O({
118
+ ...D,
115
119
  where: n
116
120
  });
117
121
  }
@@ -121,13 +125,13 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
121
125
  return e;
122
126
  }, [
123
127
  R.filters,
128
+ O,
124
129
  D,
125
- E,
126
- w,
127
- C
128
- ]), V = f(() => {
129
- D({ ...Re });
130
- }, [Re, D]), [ze, Be] = m(!1), [Ve, He] = m(""), H = b.filterDrawerState ?? {
130
+ T,
131
+ w
132
+ ]), V = oe(() => {
133
+ O({ ...Re });
134
+ }, [Re, O]), [ze, Be] = m(!1), [Ve, He] = m(""), H = x.filterDrawerState ?? {
131
135
  isOpen: ze,
132
136
  search: Ve,
133
137
  setOpen: Be,
@@ -135,162 +139,165 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
135
139
  reset: () => {
136
140
  Be(!1), He("");
137
141
  }
138
- }, Ue = H.isOpen, U = H.search, W = H.setOpen, We = H.setSearch, Ge = H.reset, [G, K] = m(null), q = f((e) => {
139
- let n = e.whereKey ?? e.id, r = Te(e, E.where), i = "";
142
+ }, Ue = H.isOpen, U = H.search, W = H.setOpen, We = H.setSearch, Ge = H.reset, [G, K] = m(null), q = oe((e) => {
143
+ let n = e.whereKey ?? e.id, r = we(e, D.where), i = "";
140
144
  typeof r == "string" && (i = r), typeof r == "number" && Number.isFinite(r) && (i = String(r));
141
- let s = S(e.label, C);
145
+ let c = C(e.label, w);
142
146
  if (e.kind === "text") {
143
- let t = e.placeholderLabel == null ? s : S(e.placeholderLabel, C), r = w("filters.placeholders.search", { label: t });
144
- return e.placeholderText != null && (r = S(e.placeholderText, C)), /* @__PURE__ */ g(a, {
147
+ let t = e.placeholderLabel == null ? c : C(e.placeholderLabel, w), r = T("filters.placeholders.search", { label: t });
148
+ return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */ g(a, {
145
149
  value: i,
146
150
  onApply: (t) => {
147
- let r = x(E.where, n, t, e.path);
148
- D({
149
- ...E,
151
+ let r = S(D.where, n, t, e.path);
152
+ O({
153
+ ...D,
150
154
  where: r
151
155
  });
152
156
  },
153
157
  placeholder: r,
154
158
  ariaLabel: r,
155
- className: d
159
+ className: f
156
160
  });
157
161
  }
158
162
  if (e.kind === "datetime") {
159
- let t = e.placeholderLabel == null ? s : S(e.placeholderLabel, C), r = w("filters.placeholders.search", { label: t });
160
- return e.placeholderText != null && (r = S(e.placeholderText, C)), /* @__PURE__ */ g(a, {
161
- value: Oe(i),
163
+ let t = e.placeholderLabel == null ? c : C(e.placeholderLabel, w), r = T("filters.placeholders.search", { label: t });
164
+ return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */ g(a, {
165
+ value: De(i),
162
166
  onApply: (t) => {
163
- let r = ke(t), i = x(E.where, n, r, e.path);
164
- D({
165
- ...E,
167
+ let r = Oe(t), i = S(D.where, n, r, e.path);
168
+ O({
169
+ ...D,
166
170
  where: i
167
171
  });
168
172
  },
169
173
  placeholder: r,
170
174
  ariaLabel: r,
171
- className: d,
175
+ className: f,
172
176
  type: "datetime-local"
173
177
  });
174
178
  }
175
179
  if (e.kind === "number") {
176
- let t = e.placeholderLabel == null ? s : S(e.placeholderLabel, C), r = w("filters.placeholders.search", { label: t });
177
- return e.placeholderText != null && (r = S(e.placeholderText, C)), /* @__PURE__ */ g(a, {
180
+ let t = e.placeholderLabel == null ? c : C(e.placeholderLabel, w), r = T("filters.placeholders.search", { label: t });
181
+ return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */ g(a, {
178
182
  value: i,
179
183
  onApply: (t) => {
180
- let r = t.trim(), i = r === "" ? null : Number(r), a = x(E.where, n, Number.isFinite(i) ? i : null, e.path);
181
- D({
182
- ...E,
184
+ let r = t.trim(), i = r === "" ? null : Number(r), a = S(D.where, n, Number.isFinite(i) ? i : null, e.path);
185
+ O({
186
+ ...D,
183
187
  where: a
184
188
  });
185
189
  },
186
190
  placeholder: r,
187
191
  ariaLabel: r,
188
- className: d,
192
+ className: f,
189
193
  inputMode: e.inputMode ?? "numeric",
190
194
  type: "text"
191
195
  });
192
196
  }
193
- if (e.kind === "enum") return /* @__PURE__ */ g(y, {
194
- options: [{
197
+ if (e.kind === "enum") {
198
+ let t = [{
195
199
  id: "any",
196
200
  value: "",
197
- label: w("filters.all", { label: s })
201
+ label: T("filters.all", { label: c })
198
202
  }, ...e.options.map((e) => ({
199
203
  id: e.value,
200
204
  value: e.value,
201
- label: S(e.label, C)
202
- }))],
203
- value: i,
204
- size: "small",
205
- ariaLabel: s,
206
- onChange: (t) => {
207
- let r = x(E.where, n, t, e.path);
208
- D({
209
- ...E,
210
- where: r
211
- });
212
- }
213
- });
205
+ label: C(e.label, w)
206
+ }))];
207
+ return /* @__PURE__ */ g(y, {
208
+ options: t,
209
+ value: i,
210
+ size: "small",
211
+ ariaLabel: c,
212
+ onChange: (t) => {
213
+ let r = S(D.where, n, t, e.path);
214
+ O({
215
+ ...D,
216
+ where: r
217
+ });
218
+ }
219
+ });
220
+ }
214
221
  if (e.kind === "boolean") {
215
222
  let t = null;
216
223
  typeof r == "boolean" && (t = r);
217
224
  let i = "";
218
225
  t === !0 && (i = "true"), t === !1 && (i = "false");
219
- let a = e.trueLabel == null ? w("filters.boolean.yes") : S(e.trueLabel, C), o = e.falseLabel == null ? w("filters.boolean.no") : S(e.falseLabel, C);
226
+ let a = e.trueLabel == null ? T("filters.boolean.yes") : C(e.trueLabel, w), o = e.falseLabel == null ? T("filters.boolean.no") : C(e.falseLabel, w), s = [
227
+ {
228
+ id: "any",
229
+ value: "",
230
+ label: T("filters.all", { label: c })
231
+ },
232
+ {
233
+ id: "true",
234
+ value: "true",
235
+ label: a
236
+ },
237
+ {
238
+ id: "false",
239
+ value: "false",
240
+ label: o
241
+ }
242
+ ];
220
243
  return /* @__PURE__ */ g(y, {
221
- options: [
222
- {
223
- id: "any",
224
- value: "",
225
- label: w("filters.all", { label: s })
226
- },
227
- {
228
- id: "true",
229
- value: "true",
230
- label: a
231
- },
232
- {
233
- id: "false",
234
- value: "false",
235
- label: o
236
- }
237
- ],
244
+ options: s,
238
245
  value: i,
239
246
  size: "small",
240
- ariaLabel: s,
247
+ ariaLabel: c,
241
248
  onChange: (t) => {
242
249
  let r = null;
243
250
  t === "true" && (r = !0), t === "false" && (r = !1);
244
- let i = x(E.where, n, r, e.path);
245
- D({
246
- ...E,
251
+ let i = S(D.where, n, r, e.path);
252
+ O({
253
+ ...D,
247
254
  where: i
248
255
  });
249
256
  }
250
257
  });
251
258
  }
252
- let c = (() => {
253
- if (e.pickerScope != null) return typeof e.pickerScope == "function" ? e.pickerScope(E.where) : e.pickerScope;
259
+ let l = (() => {
260
+ if (e.pickerScope != null) return typeof e.pickerScope == "function" ? e.pickerScope(D.where) : e.pickerScope;
254
261
  })();
255
262
  if (e.kind === "entityIdList") {
256
- let i = Ee(r), a = i.length, ee = a === 0 ? null : w("filters.selectedEntities", { count: a }), l = (t) => {
257
- let r = i.filter((e) => e !== t), a = x(E.where, n, r.length === 0 ? null : r, e.path);
258
- D({
259
- ...E,
263
+ let i = Te(r), a = i.length, s = a === 0 ? null : T("filters.selectedEntities", { count: a }), u = (t) => {
264
+ let r = i.filter((e) => e !== t), a = S(D.where, n, r.length === 0 ? null : r, e.path);
265
+ O({
266
+ ...D,
260
267
  where: a
261
268
  });
262
269
  };
263
270
  return /* @__PURE__ */ _("div", {
264
- className: re,
271
+ className: ne,
265
272
  children: [/* @__PURE__ */ g(t, {
266
- label: s,
273
+ label: c,
267
274
  value: a === 0 ? null : i.join(","),
268
- displayValue: ee,
269
- placeholder: w("filters.placeholders.anyEntity", { label: s }),
275
+ displayValue: s,
276
+ placeholder: T("filters.placeholders.anyEntity", { label: c }),
270
277
  onPick: () => {
271
278
  K({
272
279
  entity: e.entity,
273
280
  whereKey: n,
274
- label: s,
281
+ label: c,
275
282
  mode: "list",
276
283
  currentIds: i,
277
284
  path: e.path,
278
- scope: c
285
+ scope: l
279
286
  });
280
287
  },
281
288
  onClear: () => {
282
- let t = x(E.where, n, null, e.path);
283
- D({
284
- ...E,
289
+ let t = S(D.where, n, null, e.path);
290
+ O({
291
+ ...D,
285
292
  where: t
286
293
  });
287
294
  }
288
295
  }), i.length > 0 ? /* @__PURE__ */ g("div", {
289
- className: ie,
290
- children: i.map((t) => /* @__PURE__ */ g(fe, {
291
- removeLabel: w("filters.actions.removeFilterValue", { label: s }),
296
+ className: re,
297
+ children: i.map((t) => /* @__PURE__ */ g(de, {
298
+ removeLabel: T("filters.actions.removeFilterValue", { label: c }),
292
299
  onRemove: () => {
293
- l(t);
300
+ u(t);
294
301
  },
295
302
  children: /* @__PURE__ */ g(o, {
296
303
  entityId: e.entity,
@@ -301,63 +308,63 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
301
308
  });
302
309
  }
303
310
  if (e.kind === "stringList") {
304
- let t = e.placeholderLabel == null ? s : S(e.placeholderLabel, C), r = w("filters.placeholders.search", { label: t });
305
- return e.placeholderText != null && (r = S(e.placeholderText, C)), /* @__PURE__ */ g(a, {
311
+ let t = e.placeholderLabel == null ? c : C(e.placeholderLabel, w), r = T("filters.placeholders.search", { label: t });
312
+ return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */ g(a, {
306
313
  value: i,
307
314
  onApply: (t) => {
308
- let r = t.split(/[\n,]+/u).map((e) => e.trim()).filter((e) => e !== ""), i = x(E.where, n, r, e.path);
309
- D({
310
- ...E,
315
+ let r = t.split(/[\n,]+/u).map((e) => e.trim()).filter((e) => e !== ""), i = S(D.where, n, r, e.path);
316
+ O({
317
+ ...D,
311
318
  where: i
312
319
  });
313
320
  },
314
321
  placeholder: r,
315
322
  ariaLabel: r,
316
- className: d
323
+ className: f
317
324
  });
318
325
  }
319
- let l = null;
320
- typeof r == "string" && (l = r);
321
- let u = (r = null, i = !1) => {
326
+ let u = null;
327
+ typeof r == "string" && (u = r);
328
+ let d = (r = null, i = !1) => {
322
329
  let a = r?.trim() ?? "";
323
330
  return /* @__PURE__ */ g(t, {
324
- label: s,
325
- value: l,
331
+ label: c,
332
+ value: u,
326
333
  displayValue: a,
327
334
  isResolving: i,
328
- placeholder: w("filters.placeholders.anyEntity", { label: s }),
335
+ placeholder: T("filters.placeholders.anyEntity", { label: c }),
329
336
  onPick: () => {
330
337
  K({
331
338
  entity: e.entity,
332
339
  whereKey: n,
333
- label: s,
340
+ label: c,
334
341
  mode: "single",
335
342
  path: e.path,
336
- scope: c
343
+ scope: l
337
344
  });
338
345
  },
339
346
  onClear: () => {
340
- let t = x(E.where, n, null, e.path);
341
- D({
342
- ...E,
347
+ let t = S(D.where, n, null, e.path);
348
+ O({
349
+ ...D,
343
350
  where: t
344
351
  });
345
352
  }
346
353
  });
347
354
  };
348
- return l == null || l.trim() === "" ? u() : /* @__PURE__ */ g(ee, {
355
+ return u == null || u.trim() === "" ? d() : /* @__PURE__ */ g(s, {
349
356
  entityId: e.entity,
350
- id: l,
357
+ id: u,
351
358
  children: (e, t) => {
352
359
  let n = t?.status === "loading";
353
- return u(n ? w("common.loading") : e, n);
360
+ return d(n ? T("common.loading") : e, n);
354
361
  }
355
362
  });
356
363
  }, [
364
+ O,
357
365
  D,
358
- E,
359
- w,
360
- C
366
+ T,
367
+ w
361
368
  ]), Ke = p(() => R.filters.some((e) => e.placement != null), [R.filters]), J = p(() => {
362
369
  if (R.filters.length === 0) return [];
363
370
  let e = R.ui?.toolbar?.maxPromotedFilters ?? 3;
@@ -369,7 +376,7 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
369
376
  ]), Y = p(() => R.filters.filter((e) => e.placement == null || e.placement === "drawer" || e.placement === "both"), [R.filters]), X = p(() => J.find((e) => e.kind === "text"), [J]), qe = p(() => {
370
377
  let e = J.filter((e) => e !== X);
371
378
  return e.length === 0 ? null : /* @__PURE__ */ g("div", {
372
- className: u,
379
+ className: d,
373
380
  children: e.map((e) => /* @__PURE__ */ g("span", { children: q(e) }, e.id))
374
381
  });
375
382
  }, [
@@ -379,39 +386,41 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
379
386
  ]), Je = p(() => X == null ? null : q(X), [q, X]), Ye = p(() => {
380
387
  if (R.sorts.length === 0) return null;
381
388
  let e = R.sorts[0];
382
- return e == null ? null : /* @__PURE__ */ g(y, {
383
- options: R.sorts.map((e) => ({
384
- id: e.id,
385
- value: e.id,
386
- label: S(e.label, C)
387
- })),
388
- value: E.sort ?? e.id,
389
+ if (e == null) return null;
390
+ let t = R.sorts.map((e) => ({
391
+ id: e.id,
392
+ value: e.id,
393
+ label: C(e.label, w)
394
+ }));
395
+ return /* @__PURE__ */ g(y, {
396
+ options: t,
397
+ value: D.sort ?? e.id,
389
398
  size: "small",
390
- ariaLabel: w("list.sort.label"),
399
+ ariaLabel: T("list.sort.label"),
391
400
  onChange: (e) => {
392
- D({
393
- ...E,
401
+ O({
402
+ ...D,
394
403
  sort: e
395
404
  });
396
405
  }
397
406
  });
398
407
  }, [
399
408
  R.sorts,
409
+ O,
400
410
  D,
401
- E,
402
- w,
403
- C
404
- ]), Xe = p(() => B.length === 0 ? null : /* @__PURE__ */ g(ye, {
411
+ T,
412
+ w
413
+ ]), Xe = p(() => B.length === 0 ? null : /* @__PURE__ */ g(ve, {
405
414
  chips: B,
406
415
  onClearAll: V
407
416
  }), [B, V]), Ze = p(() => {
408
417
  if (Y.length === 0) return [];
409
418
  let e = U.trim().toLowerCase(), t = [];
410
419
  for (let n of Y) {
411
- let r = S(n.label, C);
420
+ let r = C(n.label, w);
412
421
  (e === "" || r.toLowerCase().includes(e)) && t.push({
413
422
  id: n.id,
414
- node: /* @__PURE__ */ g(me, {
423
+ node: /* @__PURE__ */ g(pe, {
415
424
  label: r,
416
425
  children: q(n)
417
426
  })
@@ -419,19 +428,19 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
419
428
  }
420
429
  return t.length === 0 ? [] : [{
421
430
  id: "backoffice.filters.sections.default",
422
- title: w("filters.sections.default"),
431
+ title: T("filters.sections.default"),
423
432
  items: t
424
433
  }];
425
434
  }, [
426
435
  Y,
427
436
  U,
428
437
  q,
429
- w,
430
- C
438
+ T,
439
+ w
431
440
  ]), Qe = p(() => {
432
441
  if (Y.length === 0) return null;
433
- let e = B.length, t = w("filters.trigger");
434
- return e > 0 && (t = w("filters.triggerWithCount", { count: e })), /* @__PURE__ */ g(v, {
442
+ let e = B.length, t = T("filters.trigger");
443
+ return e > 0 && (t = T("filters.triggerWithCount", { count: e })), /* @__PURE__ */ g(v, {
435
444
  type: "button",
436
445
  variant: "secondary",
437
446
  size: "small",
@@ -444,8 +453,8 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
444
453
  B.length,
445
454
  Y.length,
446
455
  W,
447
- w
448
- ]), $e = /* @__PURE__ */ g(pe, {
456
+ T
457
+ ]), $e = U.trim() === "" ? void 0 : T("filters.drawer.emptySearchResults"), et = /* @__PURE__ */ g(fe, {
449
458
  isOpen: Ue,
450
459
  onClose: () => {
451
460
  Ge();
@@ -456,40 +465,40 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
456
465
  We(e);
457
466
  },
458
467
  onReset: V,
459
- emptyLabel: U.trim() === "" ? void 0 : w("filters.drawer.emptySearchResults")
460
- }), et = p(() => Ne ?? (L ? /* @__PURE__ */ g(ve, {
468
+ emptyLabel: $e
469
+ }), tt = p(() => Me ?? (L ? /* @__PURE__ */ g(_e, {
461
470
  variant: "embedded",
462
- ariaLabel: w("common.loading")
463
- }) : B.length > 0 ? /* @__PURE__ */ g(de, {
464
- title: w("emptyState.listEmpty.title"),
465
- description: w("emptyState.listEmptyFiltered.description"),
471
+ ariaLabel: T("common.loading")
472
+ }) : B.length > 0 ? /* @__PURE__ */ g(b, {
473
+ title: T("emptyState.listEmpty.title"),
474
+ description: T("emptyState.listEmptyFiltered.description"),
466
475
  actions: /* @__PURE__ */ g(v, {
467
476
  type: "button",
468
477
  variant: "secondary",
469
478
  size: "small",
470
479
  onClick: V,
471
- children: w("emptyState.listEmptyFiltered.actions.reset")
480
+ children: T("emptyState.listEmptyFiltered.actions.reset")
472
481
  })
473
- }) : /* @__PURE__ */ g(de, {
474
- title: w("emptyState.listEmpty.title"),
475
- description: w("emptyState.listEmpty.description")
482
+ }) : /* @__PURE__ */ g(b, {
483
+ title: T("emptyState.listEmpty.title"),
484
+ description: T("emptyState.listEmpty.description")
476
485
  })), [
477
486
  B.length,
478
- Ne,
487
+ Me,
479
488
  V,
480
489
  L,
481
- w
482
- ]), tt = p(() => Me ?? (typeof F == "number" ? /* @__PURE__ */ g("span", { children: w("list.showing", {
483
- shown: O.length,
484
- total: F
485
- }) }) : O.length === 0 ? null : /* @__PURE__ */ g("span", { children: w("list.loaded", { count: O.length }) })), [
486
- Me,
487
- O.length,
488
- w,
489
- F
490
+ T
491
+ ]), nt = p(() => je ?? (typeof I == "number" ? /* @__PURE__ */ g("span", { children: T("list.showing", {
492
+ shown: k.length,
493
+ total: I
494
+ }) }) : k.length === 0 ? null : /* @__PURE__ */ g("span", { children: T("list.loaded", { count: k.length }) })), [
495
+ je,
496
+ k.length,
497
+ T,
498
+ I
490
499
  ]), Z = p(() => {
491
500
  let e = R.ui?.displayMode ?? R.responsive?.mode ?? "auto";
492
- return we({
501
+ return Ce({
493
502
  kind: R.kind,
494
503
  displayMode: e,
495
504
  ui: R.ui
@@ -498,113 +507,113 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
498
507
  R.kind,
499
508
  R.responsive?.mode,
500
509
  R.ui
501
- ]), Q = typeof F == "number" && O.length < F && !j;
510
+ ]), Q = typeof I == "number" && k.length < I && !M;
502
511
  se(() => {
503
- !Q || !Z.infiniteScroll.showInconsistentPageInfo || !l() || console.warn("Backoffice list received inconsistent pageInfo: loaded rows are lower than totalCount but hasNextPage is false.", {
504
- entityId: T.id,
505
- loadedCount: O.length,
506
- totalCount: F
512
+ !Q || !Z.infiniteScroll.showInconsistentPageInfo || !u() || console.warn("Backoffice list received inconsistent pageInfo: loaded rows are lower than totalCount but hasNextPage is false.", {
513
+ entityId: E.id,
514
+ loadedCount: k.length,
515
+ totalCount: I
507
516
  });
508
517
  }, [
509
- T.id,
518
+ E.id,
510
519
  Q,
511
- O.length,
520
+ k.length,
512
521
  Z.infiniteScroll.showInconsistentPageInfo,
513
- F
522
+ I
514
523
  ]);
515
- let nt = b.virtualize === !0 || Z.virtualization.enabled, { sentinelRef: rt } = c({
516
- enabled: !nt && Z.infiniteScroll.enabled,
517
- hasNextPage: j,
518
- isLoading: M,
519
- onIntersect: je,
524
+ let rt = x.virtualize === !0 || Z.virtualization.enabled, { sentinelRef: it } = l({
525
+ enabled: !rt && Z.infiniteScroll.enabled,
526
+ hasNextPage: M,
527
+ isLoading: N,
528
+ onIntersect: Ae,
520
529
  rootMargin: Z.infiniteScroll.rootMargin,
521
530
  threshold: Z.infiniteScroll.threshold
522
- }), it = I?.title ?? S(R.title, C), at = I?.subtitle, ot = z.find((e) => e.mobileRole === "action" || e.id === "actions"), st = R.ui?.displayMode ?? R.responsive?.mode ?? "auto", ct = R.ui?.density ?? R.responsive?.density ?? "compact", lt = /* @__PURE__ */ g(n, {
531
+ }), at = Pe?.title ?? C(R.title, w), ot = Pe?.subtitle, st = z.find((e) => e.mobileRole === "action" || e.id === "actions"), ct = R.ui?.displayMode ?? R.responsive?.mode ?? "auto", lt = R.ui?.density ?? R.responsive?.density ?? "compact", ut = rt ? /* @__PURE__ */ g(xe, {
532
+ columns: z,
533
+ rows: k,
534
+ getRowId: A,
535
+ emptyState: tt,
536
+ className: Se,
537
+ gridTemplateColumns: ke,
538
+ virtualization: Z.virtualization,
539
+ infiniteScroll: {
540
+ enabled: Z.infiniteScroll.enabled,
541
+ thresholdPx: Z.infiniteScroll.thresholdPx,
542
+ autoLoad: Z.infiniteScroll.autoLoad
543
+ },
544
+ hasNextPage: M,
545
+ isLoadingMore: N,
546
+ onLoadMore: Ae,
547
+ bodyScrollMode: c
548
+ }) : /* @__PURE__ */ g(be, {
549
+ columns: z,
550
+ rows: k,
551
+ getRowId: A,
552
+ emptyState: tt,
553
+ className: Se,
554
+ gridTemplateColumns: ke,
555
+ mode: ct,
556
+ density: lt,
557
+ bodyScrollMode: c,
558
+ bodyFooterNode: Z.infiniteScroll.enabled ? /* @__PURE__ */ g("div", {
559
+ ref: it,
560
+ "aria-hidden": "true"
561
+ }) : null,
562
+ renderAction: (e) => st?.cell(e) ?? null
563
+ }), dt = /* @__PURE__ */ g(n, {
523
564
  fallback: (e) => {
524
565
  let { reset: t } = e;
525
566
  return /* @__PURE__ */ g(ce, {
526
567
  tone: "danger",
527
- title: w("list.errors.title"),
568
+ title: T("list.errors.title"),
528
569
  actions: /* @__PURE__ */ g(v, {
529
570
  type: "button",
530
571
  variant: "secondary",
531
572
  size: "small",
532
573
  onClick: () => {
533
- t(), P?.();
574
+ t(), F?.();
534
575
  },
535
- children: w("list.actions.retry")
576
+ children: T("list.actions.retry")
536
577
  }),
537
- children: w("list.errors.tableFailed")
578
+ children: T("list.errors.tableFailed")
538
579
  });
539
580
  },
540
- children: nt ? /* @__PURE__ */ g(Se, {
541
- columns: z,
542
- rows: O,
543
- getRowId: k,
544
- emptyState: et,
545
- className: Ce,
546
- gridTemplateColumns: Ae,
547
- virtualization: Z.virtualization,
548
- infiniteScroll: {
549
- enabled: Z.infiniteScroll.enabled,
550
- thresholdPx: Z.infiniteScroll.thresholdPx,
551
- autoLoad: Z.infiniteScroll.autoLoad
552
- },
553
- hasNextPage: j,
554
- isLoadingMore: M,
555
- onLoadMore: je,
556
- bodyScrollMode: s
557
- }) : /* @__PURE__ */ g(xe, {
558
- columns: z,
559
- rows: O,
560
- getRowId: k,
561
- emptyState: et,
562
- className: Ce,
563
- gridTemplateColumns: Ae,
564
- mode: st,
565
- density: ct,
566
- bodyScrollMode: s,
567
- bodyFooterNode: Z.infiniteScroll.enabled ? /* @__PURE__ */ g("div", {
568
- ref: rt,
569
- "aria-hidden": "true"
570
- }) : null,
571
- renderAction: (e) => ot?.cell(e) ?? null
572
- })
573
- }), ut = Le ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(_e, {
581
+ children: ut
582
+ }), ft = Le ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(ge, {
574
583
  search: Je,
575
584
  primaryFilters: qe,
576
585
  filterDrawerTrigger: Qe,
577
586
  sort: Ye,
578
- utilityActions: P == null ? null : /* @__PURE__ */ g(v, {
587
+ utilityActions: F == null ? null : /* @__PURE__ */ g(v, {
579
588
  type: "button",
580
589
  variant: "secondary",
581
590
  size: "small",
582
- isLoading: N,
583
- loadingLabel: w("list.actions.refreshing"),
591
+ isLoading: P,
592
+ loadingLabel: T("list.actions.refreshing"),
584
593
  onClick: () => {
585
- P();
594
+ F();
586
595
  },
587
- children: w("list.actions.refresh")
596
+ children: T("list.actions.refresh")
588
597
  }),
589
598
  chips: Xe,
590
599
  density: "compact"
591
- }), $e] }) : null, dt = /* @__PURE__ */ _("div", {
592
- className: oe,
593
- "aria-busy": N ? "true" : void 0,
600
+ }), et] }) : null, pt = /* @__PURE__ */ _("div", {
601
+ className: ae,
602
+ "aria-busy": P ? "true" : void 0,
594
603
  children: [
595
- N && !L ? /* @__PURE__ */ _("div", {
596
- className: ae,
604
+ P && !L ? /* @__PURE__ */ _("div", {
605
+ className: ie,
597
606
  role: "status",
598
607
  children: [/* @__PURE__ */ g(ue, {
599
608
  size: 14,
600
- ariaLabel: w("list.refreshingRows")
601
- }), /* @__PURE__ */ g("span", { children: w("list.refreshingRows") })]
609
+ ariaLabel: T("list.refreshingRows")
610
+ }), /* @__PURE__ */ g("span", { children: T("list.refreshingRows") })]
602
611
  }) : null,
603
- lt,
612
+ dt,
604
613
  /* @__PURE__ */ g(r, {
605
614
  isOpen: G != null,
606
- entity: G?.entity ?? T.id,
607
- title: G?.label ?? w("picker.title"),
615
+ entity: G?.entity ?? E.id,
616
+ title: G?.label ?? T("picker.title"),
608
617
  scope: G?.scope,
609
618
  onClose: () => {
610
619
  K(null);
@@ -612,71 +621,71 @@ var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fr
612
621
  onSelectId: (e) => {
613
622
  if (G == null) return;
614
623
  if (G.mode === "list") {
615
- let t = G.currentIds ?? [], n = t.includes(e) ? t : [...t, e], r = x(E.where, G.whereKey, n, G.path);
616
- W(!0), D({
617
- ...E,
624
+ let t = G.currentIds ?? [], n = t.includes(e) ? t : [...t, e], r = S(D.where, G.whereKey, n, G.path);
625
+ W(!0), O({
626
+ ...D,
618
627
  where: r
619
628
  });
620
629
  return;
621
630
  }
622
- let t = x(E.where, G.whereKey, e, G.path);
623
- W(!0), D({
624
- ...E,
631
+ let t = S(D.where, G.whereKey, e, G.path);
632
+ W(!0), O({
633
+ ...D,
625
634
  where: t
626
635
  });
627
636
  }
628
637
  })
629
638
  ]
630
- }), $ = O.length > 0 || M || j ? /* @__PURE__ */ g(h, { children: /* @__PURE__ */ g(he, {
639
+ }), $ = k.length > 0 || N || M ? /* @__PURE__ */ g(h, { children: /* @__PURE__ */ g(me, {
631
640
  mode: "status",
632
- loadedCount: O.length,
633
- totalCount: F,
634
- hasNextPage: j,
635
- isLoading: M,
636
- pageInfoState: Q ? "inconsistent" : M ? "loading" : j ? "ready" : "complete",
641
+ loadedCount: k.length,
642
+ totalCount: I,
643
+ hasNextPage: M,
644
+ isLoading: N,
645
+ pageInfoState: Q ? "inconsistent" : N ? "loading" : M ? "ready" : "complete",
637
646
  labels: {
638
- loaded: tt,
639
- loading: w("list.loadMore.loading"),
640
- end: w("list.loadMore.end")
647
+ loaded: nt,
648
+ loading: T("list.loadMore.loading"),
649
+ end: T("list.loadMore.end")
641
650
  }
642
651
  }) }) : null;
643
652
  return Ie === "embedded" ? /* @__PURE__ */ g(i, {
644
- config: T,
645
- state: E,
646
- pushState: D,
653
+ config: E,
654
+ state: D,
655
+ pushState: O,
647
656
  children: /* @__PURE__ */ _("div", {
648
- className: te,
657
+ className: ee,
649
658
  children: [
650
659
  /* @__PURE__ */ g("div", {
651
- className: ne,
652
- children: it
660
+ className: te,
661
+ children: at
653
662
  }),
654
- ut,
655
- Pe,
656
- dt,
663
+ ft,
664
+ Ne,
665
+ pt,
657
666
  $
658
667
  ]
659
668
  })
660
669
  }) : /* @__PURE__ */ g(i, {
661
- config: T,
662
- state: E,
663
- pushState: D,
664
- children: /* @__PURE__ */ g(be, {
665
- headerNode: /* @__PURE__ */ g(ge, {
666
- title: it,
667
- subtitle: at,
670
+ config: E,
671
+ state: D,
672
+ pushState: O,
673
+ children: /* @__PURE__ */ g(ye, {
674
+ headerNode: /* @__PURE__ */ g(he, {
675
+ title: at,
676
+ subtitle: ot,
668
677
  actions: Fe
669
678
  }),
670
- toolbarNode: ut,
671
- statusNode: Pe,
672
- tableNode: dt,
679
+ toolbarNode: ft,
680
+ statusNode: Ne,
681
+ tableNode: pt,
673
682
  tableFooterNode: $,
674
683
  presentation: "flat",
675
- bodyScrollMode: s
684
+ bodyScrollMode: c
676
685
  })
677
686
  });
678
687
  };
679
688
  //#endregion
680
- export { C as BackofficeEntityListScaffold, C as default };
689
+ export { w as BackofficeEntityListScaffold, w as default };
681
690
 
682
691
  //# sourceMappingURL=BackofficeEntityListScaffold.js.map