@plumile/backoffice-react 0.1.193 → 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.
- package/lib/esm/auth/AuthRefreshNotice.js.map +1 -1
- package/lib/esm/auth/TotpQrCode.js +8 -5
- package/lib/esm/auth/TotpQrCode.js.map +1 -1
- package/lib/esm/auth/login/AuthPanel.js.map +1 -1
- package/lib/esm/auth/login/EmailCapturePanel.js +4 -4
- package/lib/esm/auth/login/EmailCapturePanel.js.map +1 -1
- package/lib/esm/auth/login/LoginFlow.js.map +1 -1
- package/lib/esm/auth/login/MethodChooser.js.map +1 -1
- package/lib/esm/auth/login/MfaChallengeForm.js +4 -4
- package/lib/esm/auth/login/MfaChallengeForm.js.map +1 -1
- package/lib/esm/auth/login/OidcButtons.js.map +1 -1
- package/lib/esm/auth/login/PasskeyLoginForm.js +4 -4
- package/lib/esm/auth/login/PasskeyLoginForm.js.map +1 -1
- package/lib/esm/auth/login/PasswordLoginPanel.js.map +1 -1
- package/lib/esm/auth/pages/AcceptInvitationScreen.js.map +1 -1
- package/lib/esm/auth/pages/PasswordResetCompleteScreen.js.map +1 -1
- package/lib/esm/auth/pages/PasswordResetRequestScreen.js.map +1 -1
- package/lib/esm/auth/pages/VerifyEmailScreen.js.map +1 -1
- package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js +0 -1
- package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js.map +1 -1
- package/lib/esm/components/backoffice/actions/LazyBackofficeEntityActionFormDialog.js.map +1 -1
- package/lib/esm/components/backoffice/billing/BackofficeBillingUsageChart.js.map +1 -1
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +16 -11
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailBadgeRow.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailErrorList.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeEntitySummaryHeader.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeLifecycleTimelineSection.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeTokenUsageBreakdown.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeUsageCostBreakdown.js.map +1 -1
- package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js +2 -2
- package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js.map +1 -1
- package/lib/esm/components/backoffice/filters/DeferredFilterSearchInput.js.map +1 -1
- package/lib/esm/components/backoffice/filters/EntityFilterValue.js.map +1 -1
- package/lib/esm/components/backoffice/filters/EntityIdFilterField.js.map +1 -1
- package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeRightPageLayout.js +4 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeRightPageLayout.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js.map +1 -1
- package/lib/esm/components/backoffice/layout/buildSidebarSections.js.map +1 -1
- package/lib/esm/components/backoffice/layout/sidebarUtils.js.map +1 -1
- package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -1
- package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -1
- package/lib/esm/components/backoffice/links/BackofficeLinkContent.js.map +1 -1
- package/lib/esm/components/backoffice/links/BackofficeLinkLabel.js.map +1 -1
- package/lib/esm/components/backoffice/list/RowFlagsCell.js.map +1 -1
- package/lib/esm/components/backoffice/overview/BackofficeOverviewLayout.js.map +1 -1
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +9 -9
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeEntityIdRef.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeEntityLink.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeLazyEntityCount.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js +4 -4
- package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js.map +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeContentBoundary.js.map +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeContentError.js.map +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeContentFallback.js.map +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeRoutePendingBar.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailNotFound.js +8 -5
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailNotFound.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +306 -297
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeTabbedDetailShell.js.map +1 -1
- package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js.map +1 -1
- package/lib/esm/components/backoffice/shared/BackofficeFormattedCurrency.js.map +1 -1
- package/lib/esm/components/backoffice/shared/BackofficeFormattedNumber.js.map +1 -1
- package/lib/esm/components/backoffice/shared/BackofficeInlineFilterRow.js.map +1 -1
- package/lib/esm/components/backoffice/tools/BackofficeToolsDocPanel.js.map +1 -1
- package/lib/esm/components/backoffice/tools/BackofficeToolsErrorFallback.js.map +1 -1
- package/lib/esm/components/backoffice/tools/BackofficeToolsJsonForm.js.map +1 -1
- package/lib/esm/components/backoffice/tools/BackofficeToolsQueryBoundary.js +11 -11
- package/lib/esm/components/backoffice/tools/BackofficeToolsQueryBoundary.js.map +1 -1
- package/lib/esm/node_modules/relay-test-utils/lib/RelayModernMockEnvironment.js +1 -1
- package/lib/esm/node_modules/relay-test-utils/lib/RelayModernMockEnvironment.js.map +1 -1
- package/lib/esm/pages/BackofficeAcceptInvitationPage.js +8 -8
- package/lib/esm/pages/BackofficeAcceptInvitationPage.js.map +1 -1
- package/lib/esm/pages/BackofficeDashboardPage.js +4 -4
- package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
- package/lib/esm/pages/BackofficeDashboardShellPage.js.map +1 -1
- package/lib/esm/pages/BackofficeDashboardWidgetContent.js +62 -43
- package/lib/esm/pages/BackofficeDashboardWidgetContent.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +4 -4
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +95 -89
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js +2 -2
- package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPageConfigPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListDataPage.js +13 -11
- package/lib/esm/pages/BackofficeEntityListDataPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListPage.js +80 -76
- package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListShellPage.js.map +1 -1
- package/lib/esm/pages/BackofficeHubPage.js.map +1 -1
- package/lib/esm/pages/BackofficeLayoutPage.js +56 -53
- package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
- package/lib/esm/pages/BackofficeLoginPage.js +26 -26
- package/lib/esm/pages/BackofficeLoginPage.js.map +1 -1
- package/lib/esm/pages/BackofficePasswordResetCompletePage.js +36 -36
- package/lib/esm/pages/BackofficePasswordResetCompletePage.js.map +1 -1
- package/lib/esm/pages/BackofficePasswordResetRequestPage.js +3 -3
- package/lib/esm/pages/BackofficePasswordResetRequestPage.js.map +1 -1
- package/lib/esm/pages/BackofficeToolShellPage.js.map +1 -1
- package/lib/esm/pages/BackofficeVerifyEmailPage.js +36 -36
- package/lib/esm/pages/BackofficeVerifyEmailPage.js.map +1 -1
- package/lib/esm/pages/detail/BackofficeEntityDetailManifestFallback.js.map +1 -1
- package/lib/esm/provider/BackofficeProvider.js +3 -2
- package/lib/esm/provider/BackofficeProvider.js.map +1 -1
- package/lib/esm/relay/envHelpers.js.map +1 -1
- package/lib/esm/router/createBackofficeRoutes.js +2 -2
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/esm/storybook/relay/RelayStory.js +4 -1
- package/lib/esm/storybook/relay/RelayStory.js.map +1 -1
- package/lib/esm/subscriptions/useCursorResumableSubscription.js +4 -4
- package/lib/esm/subscriptions/useCursorResumableSubscription.js.map +1 -1
- package/package.json +20 -20
|
@@ -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
|
|
8
|
-
import { BACKOFFICE_LIST_BODY_SCROLL_MODE as
|
|
9
|
-
import { useBackofficeInfiniteScrollSentinel as
|
|
10
|
-
import { isDevEnv as
|
|
11
|
-
import { controlsRow as
|
|
12
|
-
import { useCallback as
|
|
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
|
|
20
|
-
import { Tag as
|
|
21
|
-
import { readWhereValue as
|
|
22
|
-
import { BackofficeFilterDrawer as
|
|
23
|
-
import { BackofficeFilterField as
|
|
24
|
-
import { BackofficeListFooter as
|
|
25
|
-
import { BackofficePageHeader as
|
|
26
|
-
import { BackofficeToolbar as
|
|
27
|
-
import { BackofficeTableSkeleton as
|
|
28
|
-
import { FilterChipRow as
|
|
29
|
-
import { ListPageTemplate as
|
|
30
|
-
import { ResponsiveRecordList as
|
|
31
|
-
import { VirtualizedConnectionTable as
|
|
32
|
-
import { denseTableClass as
|
|
33
|
-
import { resolveBackofficeListRuntimeConfig as
|
|
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
|
|
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) : [],
|
|
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 =
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
66
|
-
let { t:
|
|
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(() =>
|
|
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
|
-
}), [
|
|
83
|
+
}), [j]), B = p(() => {
|
|
80
84
|
let e = [];
|
|
81
85
|
for (let t of R.filters) {
|
|
82
|
-
let 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 :
|
|
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
|
|
91
|
-
if (!e && t.falseLabel != null) return
|
|
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
|
|
97
|
+
return T(e ? "filters.boolean.yes" : "filters.boolean.no");
|
|
94
98
|
},
|
|
95
99
|
fallbackBooleanLabels: {
|
|
96
|
-
yes:
|
|
97
|
-
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
|
-
|
|
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 =
|
|
113
|
-
|
|
114
|
-
...
|
|
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
|
-
|
|
126
|
-
w
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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 =
|
|
139
|
-
let n = e.whereKey ?? e.id, r =
|
|
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
|
|
145
|
+
let c = C(e.label, w);
|
|
142
146
|
if (e.kind === "text") {
|
|
143
|
-
let t = e.placeholderLabel == null ?
|
|
144
|
-
return e.placeholderText != null && (r =
|
|
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 =
|
|
148
|
-
|
|
149
|
-
...
|
|
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:
|
|
159
|
+
className: f
|
|
156
160
|
});
|
|
157
161
|
}
|
|
158
162
|
if (e.kind === "datetime") {
|
|
159
|
-
let t = e.placeholderLabel == null ?
|
|
160
|
-
return e.placeholderText != null && (r =
|
|
161
|
-
value:
|
|
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 =
|
|
164
|
-
|
|
165
|
-
...
|
|
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:
|
|
175
|
+
className: f,
|
|
172
176
|
type: "datetime-local"
|
|
173
177
|
});
|
|
174
178
|
}
|
|
175
179
|
if (e.kind === "number") {
|
|
176
|
-
let t = e.placeholderLabel == null ?
|
|
177
|
-
return e.placeholderText != null && (r =
|
|
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 =
|
|
181
|
-
|
|
182
|
-
...
|
|
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:
|
|
192
|
+
className: f,
|
|
189
193
|
inputMode: e.inputMode ?? "numeric",
|
|
190
194
|
type: "text"
|
|
191
195
|
});
|
|
192
196
|
}
|
|
193
|
-
if (e.kind === "enum")
|
|
194
|
-
|
|
197
|
+
if (e.kind === "enum") {
|
|
198
|
+
let t = [{
|
|
195
199
|
id: "any",
|
|
196
200
|
value: "",
|
|
197
|
-
label:
|
|
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:
|
|
202
|
-
}))]
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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 ?
|
|
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:
|
|
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 =
|
|
245
|
-
|
|
246
|
-
...
|
|
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
|
|
253
|
-
if (e.pickerScope != null) return typeof e.pickerScope == "function" ? 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 =
|
|
257
|
-
let r = i.filter((e) => e !== t), a =
|
|
258
|
-
|
|
259
|
-
...
|
|
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:
|
|
271
|
+
className: ne,
|
|
265
272
|
children: [/* @__PURE__ */ g(t, {
|
|
266
|
-
label:
|
|
273
|
+
label: c,
|
|
267
274
|
value: a === 0 ? null : i.join(","),
|
|
268
|
-
displayValue:
|
|
269
|
-
placeholder:
|
|
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:
|
|
281
|
+
label: c,
|
|
275
282
|
mode: "list",
|
|
276
283
|
currentIds: i,
|
|
277
284
|
path: e.path,
|
|
278
|
-
scope:
|
|
285
|
+
scope: l
|
|
279
286
|
});
|
|
280
287
|
},
|
|
281
288
|
onClear: () => {
|
|
282
|
-
let t =
|
|
283
|
-
|
|
284
|
-
...
|
|
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:
|
|
290
|
-
children: i.map((t) => /* @__PURE__ */ g(
|
|
291
|
-
removeLabel:
|
|
296
|
+
className: re,
|
|
297
|
+
children: i.map((t) => /* @__PURE__ */ g(de, {
|
|
298
|
+
removeLabel: T("filters.actions.removeFilterValue", { label: c }),
|
|
292
299
|
onRemove: () => {
|
|
293
|
-
|
|
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 ?
|
|
305
|
-
return e.placeholderText != null && (r =
|
|
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 =
|
|
309
|
-
|
|
310
|
-
...
|
|
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:
|
|
323
|
+
className: f
|
|
317
324
|
});
|
|
318
325
|
}
|
|
319
|
-
let
|
|
320
|
-
typeof r == "string" && (
|
|
321
|
-
let
|
|
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:
|
|
325
|
-
value:
|
|
331
|
+
label: c,
|
|
332
|
+
value: u,
|
|
326
333
|
displayValue: a,
|
|
327
334
|
isResolving: i,
|
|
328
|
-
placeholder:
|
|
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:
|
|
340
|
+
label: c,
|
|
334
341
|
mode: "single",
|
|
335
342
|
path: e.path,
|
|
336
|
-
scope:
|
|
343
|
+
scope: l
|
|
337
344
|
});
|
|
338
345
|
},
|
|
339
346
|
onClear: () => {
|
|
340
|
-
let t =
|
|
341
|
-
|
|
342
|
-
...
|
|
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
|
|
355
|
+
return u == null || u.trim() === "" ? d() : /* @__PURE__ */ g(s, {
|
|
349
356
|
entityId: e.entity,
|
|
350
|
-
id:
|
|
357
|
+
id: u,
|
|
351
358
|
children: (e, t) => {
|
|
352
359
|
let n = t?.status === "loading";
|
|
353
|
-
return
|
|
360
|
+
return d(n ? T("common.loading") : e, n);
|
|
354
361
|
}
|
|
355
362
|
});
|
|
356
363
|
}, [
|
|
364
|
+
O,
|
|
357
365
|
D,
|
|
358
|
-
|
|
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:
|
|
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
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
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:
|
|
399
|
+
ariaLabel: T("list.sort.label"),
|
|
391
400
|
onChange: (e) => {
|
|
392
|
-
|
|
393
|
-
...
|
|
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
|
-
|
|
402
|
-
w
|
|
403
|
-
|
|
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 =
|
|
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(
|
|
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:
|
|
431
|
+
title: T("filters.sections.default"),
|
|
423
432
|
items: t
|
|
424
433
|
}];
|
|
425
434
|
}, [
|
|
426
435
|
Y,
|
|
427
436
|
U,
|
|
428
437
|
q,
|
|
429
|
-
|
|
430
|
-
|
|
438
|
+
T,
|
|
439
|
+
w
|
|
431
440
|
]), Qe = p(() => {
|
|
432
441
|
if (Y.length === 0) return null;
|
|
433
|
-
let e = B.length, t =
|
|
434
|
-
return e > 0 && (t =
|
|
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
|
-
|
|
448
|
-
]), $e = /* @__PURE__ */ g(
|
|
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:
|
|
460
|
-
}),
|
|
468
|
+
emptyLabel: $e
|
|
469
|
+
}), tt = p(() => Me ?? (L ? /* @__PURE__ */ g(_e, {
|
|
461
470
|
variant: "embedded",
|
|
462
|
-
ariaLabel:
|
|
463
|
-
}) : B.length > 0 ? /* @__PURE__ */ g(
|
|
464
|
-
title:
|
|
465
|
-
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:
|
|
480
|
+
children: T("emptyState.listEmptyFiltered.actions.reset")
|
|
472
481
|
})
|
|
473
|
-
}) : /* @__PURE__ */ g(
|
|
474
|
-
title:
|
|
475
|
-
description:
|
|
482
|
+
}) : /* @__PURE__ */ g(b, {
|
|
483
|
+
title: T("emptyState.listEmpty.title"),
|
|
484
|
+
description: T("emptyState.listEmpty.description")
|
|
476
485
|
})), [
|
|
477
486
|
B.length,
|
|
478
|
-
|
|
487
|
+
Me,
|
|
479
488
|
V,
|
|
480
489
|
L,
|
|
481
|
-
|
|
482
|
-
]),
|
|
483
|
-
shown:
|
|
484
|
-
total:
|
|
485
|
-
}) }) :
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
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
|
|
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
|
|
510
|
+
]), Q = typeof I == "number" && k.length < I && !M;
|
|
502
511
|
se(() => {
|
|
503
|
-
!Q || !Z.infiniteScroll.showInconsistentPageInfo || !
|
|
504
|
-
entityId:
|
|
505
|
-
loadedCount:
|
|
506
|
-
totalCount:
|
|
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
|
-
|
|
518
|
+
E.id,
|
|
510
519
|
Q,
|
|
511
|
-
|
|
520
|
+
k.length,
|
|
512
521
|
Z.infiniteScroll.showInconsistentPageInfo,
|
|
513
|
-
|
|
522
|
+
I
|
|
514
523
|
]);
|
|
515
|
-
let
|
|
516
|
-
enabled: !
|
|
517
|
-
hasNextPage:
|
|
518
|
-
isLoading:
|
|
519
|
-
onIntersect:
|
|
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
|
-
}),
|
|
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:
|
|
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(),
|
|
574
|
+
t(), F?.();
|
|
534
575
|
},
|
|
535
|
-
children:
|
|
576
|
+
children: T("list.actions.retry")
|
|
536
577
|
}),
|
|
537
|
-
children:
|
|
578
|
+
children: T("list.errors.tableFailed")
|
|
538
579
|
});
|
|
539
580
|
},
|
|
540
|
-
children:
|
|
541
|
-
|
|
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:
|
|
587
|
+
utilityActions: F == null ? null : /* @__PURE__ */ g(v, {
|
|
579
588
|
type: "button",
|
|
580
589
|
variant: "secondary",
|
|
581
590
|
size: "small",
|
|
582
|
-
isLoading:
|
|
583
|
-
loadingLabel:
|
|
591
|
+
isLoading: P,
|
|
592
|
+
loadingLabel: T("list.actions.refreshing"),
|
|
584
593
|
onClick: () => {
|
|
585
|
-
|
|
594
|
+
F();
|
|
586
595
|
},
|
|
587
|
-
children:
|
|
596
|
+
children: T("list.actions.refresh")
|
|
588
597
|
}),
|
|
589
598
|
chips: Xe,
|
|
590
599
|
density: "compact"
|
|
591
|
-
}),
|
|
592
|
-
className:
|
|
593
|
-
"aria-busy":
|
|
600
|
+
}), et] }) : null, pt = /* @__PURE__ */ _("div", {
|
|
601
|
+
className: ae,
|
|
602
|
+
"aria-busy": P ? "true" : void 0,
|
|
594
603
|
children: [
|
|
595
|
-
|
|
596
|
-
className:
|
|
604
|
+
P && !L ? /* @__PURE__ */ _("div", {
|
|
605
|
+
className: ie,
|
|
597
606
|
role: "status",
|
|
598
607
|
children: [/* @__PURE__ */ g(ue, {
|
|
599
608
|
size: 14,
|
|
600
|
-
ariaLabel:
|
|
601
|
-
}), /* @__PURE__ */ g("span", { children:
|
|
609
|
+
ariaLabel: T("list.refreshingRows")
|
|
610
|
+
}), /* @__PURE__ */ g("span", { children: T("list.refreshingRows") })]
|
|
602
611
|
}) : null,
|
|
603
|
-
|
|
612
|
+
dt,
|
|
604
613
|
/* @__PURE__ */ g(r, {
|
|
605
614
|
isOpen: G != null,
|
|
606
|
-
entity: G?.entity ??
|
|
607
|
-
title: G?.label ??
|
|
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 =
|
|
616
|
-
W(!0),
|
|
617
|
-
...
|
|
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 =
|
|
623
|
-
W(!0),
|
|
624
|
-
...
|
|
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
|
-
}), $ =
|
|
639
|
+
}), $ = k.length > 0 || N || M ? /* @__PURE__ */ g(h, { children: /* @__PURE__ */ g(me, {
|
|
631
640
|
mode: "status",
|
|
632
|
-
loadedCount:
|
|
633
|
-
totalCount:
|
|
634
|
-
hasNextPage:
|
|
635
|
-
isLoading:
|
|
636
|
-
pageInfoState: Q ? "inconsistent" :
|
|
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:
|
|
639
|
-
loading:
|
|
640
|
-
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:
|
|
645
|
-
state:
|
|
646
|
-
pushState:
|
|
653
|
+
config: E,
|
|
654
|
+
state: D,
|
|
655
|
+
pushState: O,
|
|
647
656
|
children: /* @__PURE__ */ _("div", {
|
|
648
|
-
className:
|
|
657
|
+
className: ee,
|
|
649
658
|
children: [
|
|
650
659
|
/* @__PURE__ */ g("div", {
|
|
651
|
-
className:
|
|
652
|
-
children:
|
|
660
|
+
className: te,
|
|
661
|
+
children: at
|
|
653
662
|
}),
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
663
|
+
ft,
|
|
664
|
+
Ne,
|
|
665
|
+
pt,
|
|
657
666
|
$
|
|
658
667
|
]
|
|
659
668
|
})
|
|
660
669
|
}) : /* @__PURE__ */ g(i, {
|
|
661
|
-
config:
|
|
662
|
-
state:
|
|
663
|
-
pushState:
|
|
664
|
-
children: /* @__PURE__ */ g(
|
|
665
|
-
headerNode: /* @__PURE__ */ g(
|
|
666
|
-
title:
|
|
667
|
-
subtitle:
|
|
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:
|
|
671
|
-
statusNode:
|
|
672
|
-
tableNode:
|
|
679
|
+
toolbarNode: ft,
|
|
680
|
+
statusNode: Ne,
|
|
681
|
+
tableNode: pt,
|
|
673
682
|
tableFooterNode: $,
|
|
674
683
|
presentation: "flat",
|
|
675
|
-
bodyScrollMode:
|
|
684
|
+
bodyScrollMode: c
|
|
676
685
|
})
|
|
677
686
|
});
|
|
678
687
|
};
|
|
679
688
|
//#endregion
|
|
680
|
-
export {
|
|
689
|
+
export { w as BackofficeEntityListScaffold, w as default };
|
|
681
690
|
|
|
682
691
|
//# sourceMappingURL=BackofficeEntityListScaffold.js.map
|