@plumile/backoffice-react 0.1.106 → 0.1.108
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/TotpQrCode.js +1 -1
- package/lib/esm/auth/TotpQrCode.js.map +1 -1
- package/lib/esm/auth/login/EmailCapturePanel.js +27 -23
- package/lib/esm/auth/login/EmailCapturePanel.js.map +1 -1
- package/lib/esm/auth/login/MfaChallengeForm.js +38 -36
- package/lib/esm/auth/login/MfaChallengeForm.js.map +1 -1
- package/lib/esm/auth/login/PasskeyLoginForm.js +40 -37
- package/lib/esm/auth/login/PasskeyLoginForm.js.map +1 -1
- package/lib/esm/auth/pages/AcceptInvitationScreen.js +63 -62
- package/lib/esm/auth/pages/AcceptInvitationScreen.js.map +1 -1
- package/lib/esm/auth/pages/PasswordResetCompleteScreen.js +56 -55
- package/lib/esm/auth/pages/PasswordResetCompleteScreen.js.map +1 -1
- package/lib/esm/auth/pages/PasswordResetRequestScreen.js +45 -45
- package/lib/esm/auth/pages/PasswordResetRequestScreen.js.map +1 -1
- package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js +1 -0
- package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js.map +1 -1
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +44 -39
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeCopyButton.js +15 -0
- package/lib/esm/components/backoffice/detail/BackofficeCopyButton.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailActionBar.js +11 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailActionBar.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailBlock.js +7 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailBlock.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailHeader.js +15 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailHeader.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailPage.js +19 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailPage.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js +47 -40
- package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js +83 -90
- package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailTable.js +8 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailTable.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeEmptyValue.js +7 -0
- package/lib/esm/components/backoffice/detail/BackofficeEmptyValue.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeStatusGroup.js +8 -0
- package/lib/esm/components/backoffice/detail/BackofficeStatusGroup.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeTechnicalFacts.js +2 -0
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js +53 -48
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.js +2 -2
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.js +15 -11
- package/lib/esm/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js +50 -23
- package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js.map +1 -1
- package/lib/esm/components/backoffice/layout/buildSidebarSections.js +69 -69
- package/lib/esm/components/backoffice/layout/sidebarUtils.js +16 -16
- package/lib/esm/components/backoffice/layout/sidebarUtils.js.map +1 -1
- package/lib/esm/components/backoffice/links/BackofficeInlineLink.js +29 -0
- package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -0
- package/lib/esm/components/backoffice/links/BackofficeLink.js +21 -0
- package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -0
- package/lib/esm/components/backoffice/links/BackofficeLinkContent.js +26 -0
- package/lib/esm/components/backoffice/links/BackofficeLinkContent.js.map +1 -0
- package/lib/esm/components/backoffice/links/BackofficeLinkLabel.js +19 -0
- package/lib/esm/components/backoffice/links/BackofficeLinkLabel.js.map +1 -0
- package/lib/esm/components/backoffice/links/backofficeLink.css.js +7 -0
- package/lib/esm/components/backoffice/links/backofficeLink.css.js.map +1 -0
- package/lib/esm/components/backoffice/links/resolveBackofficeLink.js +81 -0
- package/lib/esm/components/backoffice/links/resolveBackofficeLink.js.map +1 -0
- package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js +50 -0
- package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js.map +1 -0
- package/lib/esm/components/backoffice/links/types.js +0 -0
- package/lib/esm/components/backoffice/links/useBackofficeLink.js +21 -0
- package/lib/esm/components/backoffice/links/useBackofficeLink.js.map +1 -0
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +1 -0
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeEntityIdRef.js +27 -27
- package/lib/esm/components/backoffice/refs/BackofficeEntityIdRef.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeEntityLink.js +24 -21
- package/lib/esm/components/backoffice/refs/BackofficeEntityLink.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js +45 -44
- package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +269 -223
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
- package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js +25 -30
- package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js.map +1 -1
- package/lib/esm/i18n/locales/en/backofficeReact.js +8 -0
- package/lib/esm/i18n/locales/en/backofficeReact.js.map +1 -1
- package/lib/esm/i18n/locales/fr/backofficeReact.js +8 -0
- package/lib/esm/i18n/locales/fr/backofficeReact.js.map +1 -1
- package/lib/esm/index.js +88 -73
- package/lib/esm/pages/BackofficeDashboardPage.js +1 -5
- package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +231 -222
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js +170 -54
- package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListPage.js +196 -207
- package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
- package/lib/esm/pages/BackofficeHubPage.js +21 -21
- package/lib/esm/pages/BackofficeLayoutPage.js +7 -7
- package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
- package/lib/esm/router/createBackofficeRoutes.js +132 -126
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/esm/style.css +1 -1
- package/lib/types/auth/login/EmailCapturePanel.d.ts.map +1 -1
- package/lib/types/auth/login/MfaChallengeForm.d.ts.map +1 -1
- package/lib/types/auth/login/PasskeyLoginForm.d.ts.map +1 -1
- package/lib/types/auth/pages/AcceptInvitationScreen.d.ts.map +1 -1
- package/lib/types/auth/pages/PasswordResetCompleteScreen.d.ts.map +1 -1
- package/lib/types/auth/pages/PasswordResetRequestScreen.d.ts.map +1 -1
- package/lib/types/components/backoffice/actions/BackofficeEntityActionFormDialog.d.ts.map +1 -1
- package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts +0 -1
- package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeCopyButton.d.ts +8 -0
- package/lib/types/components/backoffice/detail/BackofficeCopyButton.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailActionBar.d.ts +9 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailActionBar.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailBlock.d.ts +7 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailBlock.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailHeader.d.ts +12 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailHeader.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailPage.d.ts +16 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailPage.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailPage.stories.d.ts +11 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailPage.stories.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailRelationLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeDetailRelationListBlock.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeDetailTable.d.ts +6 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailTable.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeEmptyValue.d.ts +7 -0
- package/lib/types/components/backoffice/detail/BackofficeEmptyValue.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeStatusGroup.d.ts +8 -0
- package/lib/types/components/backoffice/detail/BackofficeStatusGroup.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeTechnicalFacts.d.ts +2 -0
- package/lib/types/components/backoffice/detail/BackofficeTechnicalFacts.d.ts.map +1 -0
- package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.d.ts +1 -0
- package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts +10 -8
- package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/types.d.ts +10 -5
- package/lib/types/components/backoffice/layout/breadcrumb/types.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/sidebarUtils.d.ts +6 -2
- package/lib/types/components/backoffice/layout/sidebarUtils.d.ts.map +1 -1
- package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts +18 -0
- package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/BackofficeLink.d.ts +13 -0
- package/lib/types/components/backoffice/links/BackofficeLink.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/BackofficeLinkContent.d.ts +10 -0
- package/lib/types/components/backoffice/links/BackofficeLinkContent.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/BackofficeLinkLabel.d.ts +12 -0
- package/lib/types/components/backoffice/links/BackofficeLinkLabel.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/backofficeLink.css.d.ts +4 -0
- package/lib/types/components/backoffice/links/backofficeLink.css.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts +15 -0
- package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/resolveBackofficeTargetIcon.d.ts +8 -0
- package/lib/types/components/backoffice/links/resolveBackofficeTargetIcon.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/types.d.ts +45 -0
- package/lib/types/components/backoffice/links/types.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/useBackofficeLink.d.ts +7 -0
- package/lib/types/components/backoffice/links/useBackofficeLink.d.ts.map +1 -0
- package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.d.ts.map +1 -1
- package/lib/types/components/backoffice/refs/BackofficeEntityLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/refs/BackofficeRelatedCountLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
- package/lib/types/components/backoffice/shared/BackofficeFilterableCell.d.ts +6 -3
- package/lib/types/components/backoffice/shared/BackofficeFilterableCell.d.ts.map +1 -1
- package/lib/types/i18n/resources.d.ts +16 -0
- package/lib/types/i18n/resources.d.ts.map +1 -1
- package/lib/types/index.d.ts +24 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts +49 -22
- package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListPage.d.ts.map +1 -1
- package/lib/types/provider/types.d.ts +26 -22
- package/lib/types/provider/types.d.ts.map +1 -1
- package/lib/types/router/createBackofficeRoutes.d.ts +36 -1
- package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -7,14 +7,16 @@ import { DeferredFilterSearchInput as o } from "../filters/DeferredFilterSearchI
|
|
|
7
7
|
import { BackofficeListToolbar as s } from "../lists/BackofficeListToolbar.js";
|
|
8
8
|
import { BackofficeListFilterProvider as c } from "./BackofficeListFilterContext.js";
|
|
9
9
|
import { useBackofficeInfiniteScrollSentinel as l } from "../../../hooks/useBackofficeInfiniteScrollSentinel.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
10
|
+
import { isDevEnv as u } from "../../../relay/envHelpers.js";
|
|
11
|
+
import { controlsRow as ee, embeddedContainer as te, embeddedHeader as ne, filterInput as d } from "./backofficeEntityListScaffold.css.js";
|
|
12
|
+
import { useCallback as f, useEffect as re, useMemo as p, useState as m } from "react";
|
|
13
|
+
import { BackofficeEmptyState as ie, BackofficeFilterDrawer as ae, BackofficeFilterField as oe, BackofficeInfiniteListStatus as se, BackofficePageHeader as ce, BackofficeTableSkeleton as le, BackofficeVirtualizedConnectionTable as ue, Button as h, FilterChipRow as de, InlineBanner as fe, ListPageTemplate as pe, ResponsiveRecordList as me, SimpleSelect as g, denseTableClass as he } from "@plumile/ui";
|
|
14
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
15
|
+
import { useTranslation as ge } from "react-i18next";
|
|
16
|
+
import { readWhereValue as b, setWhereValue as x } from "@plumile/backoffice-core/filters/where.js";
|
|
17
|
+
import { resolveBackofficeListRuntimeConfig as _e } from "@plumile/backoffice-core/config/listRuntime.js";
|
|
16
18
|
//#region src/components/backoffice/scaffolds/BackofficeEntityListScaffold.tsx
|
|
17
|
-
var
|
|
19
|
+
var S = (e, t) => e(t), ve = (e, t) => e.fromGraphQL != null && t != null ? e.fromGraphQL(t) : b(t, e.whereKey ?? e.id, e.path), ye = (e, t, n) => {
|
|
18
20
|
if (t == null) return null;
|
|
19
21
|
if (Array.isArray(t)) {
|
|
20
22
|
let e = t.map((e) => {
|
|
@@ -27,25 +29,25 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
|
|
|
27
29
|
if (typeof t == "boolean") return e.kind === "boolean" ? n.booleanLabel(t) : t ? n.fallbackBooleanLabels.yes : n.fallbackBooleanLabels.no;
|
|
28
30
|
if (typeof t != "string" && typeof t != "number") return null;
|
|
29
31
|
let r = String(t).trim();
|
|
30
|
-
return r === "" ? null : e.kind === "entityId" ? /* @__PURE__ */
|
|
32
|
+
return r === "" ? null : e.kind === "entityId" ? /* @__PURE__ */ v(i, {
|
|
31
33
|
entityId: e.entity,
|
|
32
34
|
id: r
|
|
33
35
|
}) : e.kind === "enum" ? n.enumLabel(r) : r;
|
|
34
|
-
},
|
|
36
|
+
}, be = (e) => {
|
|
35
37
|
let t = new Date(e);
|
|
36
38
|
if (Number.isNaN(t.getTime())) return e;
|
|
37
39
|
let n = t.getTimezoneOffset() * 6e4;
|
|
38
40
|
return new Date(t.getTime() - n).toISOString().slice(0, 16);
|
|
39
|
-
},
|
|
41
|
+
}, xe = (e) => {
|
|
40
42
|
let t = e.trim();
|
|
41
43
|
if (t === "") return "";
|
|
42
44
|
let n = new Date(t);
|
|
43
45
|
return Number.isNaN(n.getTime()) ? t : n.toISOString();
|
|
44
|
-
},
|
|
45
|
-
let { t:
|
|
46
|
+
}, C = (i) => {
|
|
47
|
+
let { t: b } = ge(), { t: C } = e(), { config: w, state: T, pushState: E, rows: D, getRowId: O, columns: k, gridTemplateColumns: A, hasNextPage: j, isLoadingMore: M, isRefreshing: Se = !1, onLoadMore: N, onRefresh: P, totalCount: F, emptyState: I, statusBanner: L, header: R, headerActions: Ce, isLoadingInitial: we = !1, variant: Te = "page", showFilters: Ee = !0 } = i, z = w.list, De = w.listDefaults ?? z.defaultState ?? {
|
|
46
48
|
where: null,
|
|
47
49
|
sort: null
|
|
48
|
-
},
|
|
50
|
+
}, B = p(() => k.some((e) => e.isPrimary === !0) || k.length === 0 ? k : k.map((e, t) => {
|
|
49
51
|
let { header: n } = e;
|
|
50
52
|
return t === 0 ? {
|
|
51
53
|
...e,
|
|
@@ -55,32 +57,32 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
|
|
|
55
57
|
...e,
|
|
56
58
|
header: n
|
|
57
59
|
};
|
|
58
|
-
}), [
|
|
60
|
+
}), [k]), V = p(() => {
|
|
59
61
|
let e = [];
|
|
60
62
|
for (let t of z.filters) {
|
|
61
|
-
let n =
|
|
63
|
+
let n = ve(t, T.where), r = ye(t, n, {
|
|
62
64
|
enumLabel: (e) => {
|
|
63
65
|
if (t.kind !== "enum") return e;
|
|
64
66
|
let n = t.options.find((t) => t.value === e);
|
|
65
|
-
return n == null ? e :
|
|
67
|
+
return n == null ? e : S(n.label, b);
|
|
66
68
|
},
|
|
67
69
|
booleanLabel: (e) => {
|
|
68
70
|
if (t.kind === "boolean") {
|
|
69
|
-
if (e && t.trueLabel != null) return
|
|
70
|
-
if (!e && t.falseLabel != null) return
|
|
71
|
+
if (e && t.trueLabel != null) return S(t.trueLabel, b);
|
|
72
|
+
if (!e && t.falseLabel != null) return S(t.falseLabel, b);
|
|
71
73
|
}
|
|
72
|
-
return
|
|
74
|
+
return C(e ? "filters.boolean.yes" : "filters.boolean.no");
|
|
73
75
|
},
|
|
74
76
|
fallbackBooleanLabels: {
|
|
75
|
-
yes:
|
|
76
|
-
no:
|
|
77
|
+
yes: C("filters.boolean.yes"),
|
|
78
|
+
no: C("filters.boolean.no")
|
|
77
79
|
}
|
|
78
80
|
});
|
|
79
81
|
if (r != null) {
|
|
80
82
|
let i = String(n);
|
|
81
83
|
Array.isArray(n) && (i = n.join(","));
|
|
82
|
-
let a = /* @__PURE__ */
|
|
83
|
-
|
|
84
|
+
let a = /* @__PURE__ */ y("span", { children: [
|
|
85
|
+
S(t.label, b),
|
|
84
86
|
": ",
|
|
85
87
|
r
|
|
86
88
|
] });
|
|
@@ -88,9 +90,9 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
|
|
|
88
90
|
id: `${t.id}:${i}`,
|
|
89
91
|
label: a,
|
|
90
92
|
onRemove: () => {
|
|
91
|
-
let e = t.whereKey ?? t.id, n =
|
|
92
|
-
|
|
93
|
-
...
|
|
93
|
+
let e = t.whereKey ?? t.id, n = x(T.where, e, null, t.path);
|
|
94
|
+
E({
|
|
95
|
+
...T,
|
|
94
96
|
where: n
|
|
95
97
|
});
|
|
96
98
|
}
|
|
@@ -100,24 +102,24 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
|
|
|
100
102
|
return e;
|
|
101
103
|
}, [
|
|
102
104
|
z.filters,
|
|
103
|
-
|
|
104
|
-
D,
|
|
105
|
+
E,
|
|
105
106
|
T,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
C,
|
|
108
|
+
b
|
|
109
|
+
]), H = f(() => {
|
|
110
|
+
E({ ...De });
|
|
111
|
+
}, [De, E]), [Oe, ke] = m(!1), [U, Ae] = m(""), [W, je] = m(null), G = f((e) => {
|
|
112
|
+
let n = e.whereKey ?? e.id, r = ve(e, T.where), i = "";
|
|
111
113
|
typeof r == "string" && (i = r), typeof r == "number" && Number.isFinite(r) && (i = String(r));
|
|
112
|
-
let s =
|
|
114
|
+
let s = S(e.label, b);
|
|
113
115
|
if (e.kind === "text") {
|
|
114
|
-
let t =
|
|
115
|
-
return e.placeholderText != null && (t =
|
|
116
|
-
value:
|
|
116
|
+
let t = C("filters.placeholders.search", { label: e.placeholderLabel == null ? s : S(e.placeholderLabel, b) });
|
|
117
|
+
return e.placeholderText != null && (t = S(e.placeholderText, b)), /* @__PURE__ */ v(o, {
|
|
118
|
+
value: be(i),
|
|
117
119
|
onApply: (t) => {
|
|
118
|
-
let r =
|
|
119
|
-
|
|
120
|
-
...
|
|
120
|
+
let r = xe(t), i = x(T.where, n, r, e.path);
|
|
121
|
+
E({
|
|
122
|
+
...T,
|
|
121
123
|
where: i
|
|
122
124
|
});
|
|
123
125
|
},
|
|
@@ -127,13 +129,13 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
|
|
|
127
129
|
});
|
|
128
130
|
}
|
|
129
131
|
if (e.kind === "datetime") {
|
|
130
|
-
let t =
|
|
131
|
-
return e.placeholderText != null && (t =
|
|
132
|
+
let t = C("filters.placeholders.search", { label: e.placeholderLabel == null ? s : S(e.placeholderLabel, b) });
|
|
133
|
+
return e.placeholderText != null && (t = S(e.placeholderText, b)), /* @__PURE__ */ v(o, {
|
|
132
134
|
value: i,
|
|
133
135
|
onApply: (t) => {
|
|
134
|
-
let r =
|
|
135
|
-
|
|
136
|
-
...
|
|
136
|
+
let r = x(T.where, n, t, e.path);
|
|
137
|
+
E({
|
|
138
|
+
...T,
|
|
137
139
|
where: r
|
|
138
140
|
});
|
|
139
141
|
},
|
|
@@ -144,13 +146,13 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
|
|
|
144
146
|
});
|
|
145
147
|
}
|
|
146
148
|
if (e.kind === "number") {
|
|
147
|
-
let t =
|
|
148
|
-
return e.placeholderText != null && (t =
|
|
149
|
+
let t = C("filters.placeholders.search", { label: e.placeholderLabel == null ? s : S(e.placeholderLabel, b) });
|
|
150
|
+
return e.placeholderText != null && (t = S(e.placeholderText, b)), /* @__PURE__ */ v(o, {
|
|
149
151
|
value: i,
|
|
150
152
|
onApply: (t) => {
|
|
151
|
-
let r = t.trim(), i = r === "" ? null : Number(r), a =
|
|
152
|
-
|
|
153
|
-
...
|
|
153
|
+
let r = t.trim(), i = r === "" ? null : Number(r), a = x(T.where, n, Number.isFinite(i) ? i : null, e.path);
|
|
154
|
+
E({
|
|
155
|
+
...T,
|
|
154
156
|
where: a
|
|
155
157
|
});
|
|
156
158
|
},
|
|
@@ -161,23 +163,23 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
|
|
|
161
163
|
type: "number"
|
|
162
164
|
});
|
|
163
165
|
}
|
|
164
|
-
if (e.kind === "enum") return /* @__PURE__ */
|
|
166
|
+
if (e.kind === "enum") return /* @__PURE__ */ v(g, {
|
|
165
167
|
options: [{
|
|
166
168
|
id: "any",
|
|
167
169
|
value: "",
|
|
168
|
-
label:
|
|
170
|
+
label: C("filters.all", { label: s })
|
|
169
171
|
}, ...e.options.map((e) => ({
|
|
170
172
|
id: e.value,
|
|
171
173
|
value: e.value,
|
|
172
|
-
label:
|
|
174
|
+
label: S(e.label, b)
|
|
173
175
|
}))],
|
|
174
176
|
value: i,
|
|
175
177
|
size: "small",
|
|
176
178
|
ariaLabel: s,
|
|
177
179
|
onChange: (t) => {
|
|
178
|
-
let r =
|
|
179
|
-
|
|
180
|
-
...
|
|
180
|
+
let r = x(T.where, n, t, e.path);
|
|
181
|
+
E({
|
|
182
|
+
...T,
|
|
181
183
|
where: r
|
|
182
184
|
});
|
|
183
185
|
}
|
|
@@ -187,13 +189,13 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
|
|
|
187
189
|
typeof r == "boolean" && (t = r);
|
|
188
190
|
let i = "";
|
|
189
191
|
t === !0 && (i = "true"), t === !1 && (i = "false");
|
|
190
|
-
let a = e.trueLabel == null ?
|
|
191
|
-
return /* @__PURE__ */
|
|
192
|
+
let a = e.trueLabel == null ? C("filters.boolean.yes") : S(e.trueLabel, b), o = e.falseLabel == null ? C("filters.boolean.no") : S(e.falseLabel, b);
|
|
193
|
+
return /* @__PURE__ */ v(g, {
|
|
192
194
|
options: [
|
|
193
195
|
{
|
|
194
196
|
id: "any",
|
|
195
197
|
value: "",
|
|
196
|
-
label:
|
|
198
|
+
label: C("filters.all", { label: s })
|
|
197
199
|
},
|
|
198
200
|
{
|
|
199
201
|
id: "true",
|
|
@@ -212,27 +214,27 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
|
|
|
212
214
|
onChange: (t) => {
|
|
213
215
|
let r = null;
|
|
214
216
|
t === "true" && (r = !0), t === "false" && (r = !1);
|
|
215
|
-
let i =
|
|
216
|
-
|
|
217
|
-
...
|
|
217
|
+
let i = x(T.where, n, r, e.path);
|
|
218
|
+
E({
|
|
219
|
+
...T,
|
|
218
220
|
where: i
|
|
219
221
|
});
|
|
220
222
|
}
|
|
221
223
|
});
|
|
222
224
|
}
|
|
223
225
|
let c = (() => {
|
|
224
|
-
if (e.pickerScope != null) return typeof e.pickerScope == "function" ? e.pickerScope(
|
|
226
|
+
if (e.pickerScope != null) return typeof e.pickerScope == "function" ? e.pickerScope(T.where) : e.pickerScope;
|
|
225
227
|
})(), l = null;
|
|
226
228
|
typeof r == "string" && (l = r);
|
|
227
229
|
let u = (r = null) => {
|
|
228
230
|
let i = r?.trim() ?? "";
|
|
229
|
-
return /* @__PURE__ */
|
|
231
|
+
return /* @__PURE__ */ v(t, {
|
|
230
232
|
label: s,
|
|
231
233
|
value: l,
|
|
232
234
|
displayValue: i,
|
|
233
|
-
placeholder:
|
|
235
|
+
placeholder: C("filters.placeholders.anyEntity", { label: s }),
|
|
234
236
|
onPick: () => {
|
|
235
|
-
|
|
237
|
+
je({
|
|
236
238
|
entity: e.entity,
|
|
237
239
|
whereKey: n,
|
|
238
240
|
label: s,
|
|
@@ -241,266 +243,310 @@ var C = (e, t) => e(t), w = (e, t) => e.fromGraphQL != null && t != null ? e.fro
|
|
|
241
243
|
});
|
|
242
244
|
},
|
|
243
245
|
onClear: () => {
|
|
244
|
-
let t =
|
|
245
|
-
|
|
246
|
-
...
|
|
246
|
+
let t = x(T.where, n, null, e.path);
|
|
247
|
+
E({
|
|
248
|
+
...T,
|
|
247
249
|
where: t
|
|
248
250
|
});
|
|
249
251
|
}
|
|
250
252
|
});
|
|
251
253
|
};
|
|
252
|
-
return l == null || l.trim() === "" ? u() : /* @__PURE__ */
|
|
254
|
+
return l == null || l.trim() === "" ? u() : /* @__PURE__ */ v(a, {
|
|
253
255
|
entityId: e.entity,
|
|
254
256
|
id: l,
|
|
255
257
|
children: (e) => u(e)
|
|
256
258
|
});
|
|
257
259
|
}, [
|
|
258
|
-
|
|
259
|
-
D,
|
|
260
|
+
E,
|
|
260
261
|
T,
|
|
261
|
-
|
|
262
|
-
|
|
262
|
+
C,
|
|
263
|
+
b
|
|
264
|
+
]), Me = p(() => z.filters.some((e) => e.placement != null), [z.filters]), K = p(() => {
|
|
263
265
|
if (z.filters.length === 0) return [];
|
|
264
266
|
let e = z.ui?.toolbar?.maxPromotedFilters ?? 3;
|
|
265
|
-
return
|
|
267
|
+
return Me ? z.filters.filter((e) => e.placement === "quick" || e.placement === "both") : z.filters.slice(0, e);
|
|
266
268
|
}, [
|
|
267
269
|
z.filters,
|
|
268
270
|
z.ui?.toolbar,
|
|
269
|
-
|
|
270
|
-
]),
|
|
271
|
-
let e =
|
|
272
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
273
|
-
className:
|
|
274
|
-
children: e.map((e) => /* @__PURE__ */
|
|
271
|
+
Me
|
|
272
|
+
]), q = p(() => z.filters.filter((e) => e.placement == null ? !0 : e.placement === "drawer" || e.placement === "both"), [z.filters]), J = p(() => K.find((e) => e.kind === "text"), [K]), Ne = p(() => {
|
|
273
|
+
let e = K.filter((e) => e !== J);
|
|
274
|
+
return e.length === 0 ? null : /* @__PURE__ */ v("div", {
|
|
275
|
+
className: ee,
|
|
276
|
+
children: e.map((e) => /* @__PURE__ */ v("span", { children: G(e) }, e.id))
|
|
275
277
|
});
|
|
276
278
|
}, [
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
]),
|
|
279
|
+
K,
|
|
280
|
+
G,
|
|
281
|
+
J
|
|
282
|
+
]), Pe = p(() => J == null ? null : G(J), [G, J]), Fe = p(() => {
|
|
281
283
|
if (z.sorts.length === 0) return null;
|
|
282
284
|
let e = z.sorts[0];
|
|
283
|
-
return e == null ? null : /* @__PURE__ */
|
|
285
|
+
return e == null ? null : /* @__PURE__ */ v(g, {
|
|
284
286
|
options: z.sorts.map((e) => ({
|
|
285
287
|
id: e.id,
|
|
286
288
|
value: e.id,
|
|
287
|
-
label:
|
|
289
|
+
label: S(e.label, b)
|
|
288
290
|
})),
|
|
289
|
-
value:
|
|
291
|
+
value: T.sort ?? e.id,
|
|
290
292
|
size: "small",
|
|
291
|
-
ariaLabel:
|
|
293
|
+
ariaLabel: C("list.sort.label"),
|
|
292
294
|
onChange: (e) => {
|
|
293
|
-
|
|
294
|
-
...
|
|
295
|
+
E({
|
|
296
|
+
...T,
|
|
295
297
|
sort: e
|
|
296
298
|
});
|
|
297
299
|
}
|
|
298
300
|
});
|
|
299
301
|
}, [
|
|
300
302
|
z.sorts,
|
|
301
|
-
|
|
302
|
-
D,
|
|
303
|
+
E,
|
|
303
304
|
T,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
305
|
+
C,
|
|
306
|
+
b
|
|
307
|
+
]), Ie = p(() => V.length === 0 ? null : /* @__PURE__ */ v(de, {
|
|
308
|
+
chips: V,
|
|
309
|
+
onClearAll: H
|
|
310
|
+
}), [V, H]), Le = p(() => {
|
|
311
|
+
if (q.length === 0) return [];
|
|
312
|
+
let e = U.trim().toLowerCase(), t = [];
|
|
313
|
+
for (let n of q) {
|
|
314
|
+
let r = S(n.label, b);
|
|
313
315
|
(e === "" || r.toLowerCase().includes(e)) && t.push({
|
|
314
316
|
id: n.id,
|
|
315
|
-
node: /* @__PURE__ */
|
|
317
|
+
node: /* @__PURE__ */ v(oe, {
|
|
316
318
|
label: r,
|
|
317
|
-
children:
|
|
319
|
+
children: G(n)
|
|
318
320
|
})
|
|
319
321
|
});
|
|
320
322
|
}
|
|
321
323
|
return t.length === 0 ? [] : [{
|
|
322
324
|
id: "backoffice.filters.sections.default",
|
|
323
|
-
title:
|
|
325
|
+
title: C("filters.sections.default"),
|
|
324
326
|
items: t
|
|
325
327
|
}];
|
|
326
328
|
}, [
|
|
327
|
-
|
|
329
|
+
q,
|
|
330
|
+
U,
|
|
328
331
|
G,
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
return e > 0 && (t = T("filters.triggerWithCount", { count: e })), /* @__PURE__ */ y(g, {
|
|
332
|
+
C,
|
|
333
|
+
b
|
|
334
|
+
]), Re = p(() => {
|
|
335
|
+
if (q.length === 0) return null;
|
|
336
|
+
let e = V.length, t = C("filters.trigger");
|
|
337
|
+
return e > 0 && (t = C("filters.triggerWithCount", { count: e })), /* @__PURE__ */ v(h, {
|
|
336
338
|
type: "button",
|
|
337
339
|
variant: "secondary",
|
|
338
340
|
size: "small",
|
|
339
341
|
onClick: () => {
|
|
340
|
-
|
|
342
|
+
ke(!0);
|
|
341
343
|
},
|
|
342
344
|
children: t
|
|
343
345
|
});
|
|
344
346
|
}, [
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
]),
|
|
349
|
-
isOpen:
|
|
347
|
+
V.length,
|
|
348
|
+
q.length,
|
|
349
|
+
C
|
|
350
|
+
]), ze = /* @__PURE__ */ v(ae, {
|
|
351
|
+
isOpen: Oe,
|
|
350
352
|
onClose: () => {
|
|
351
|
-
|
|
353
|
+
ke(!1), Ae("");
|
|
352
354
|
},
|
|
353
|
-
sections:
|
|
354
|
-
searchValue:
|
|
355
|
+
sections: Le,
|
|
356
|
+
searchValue: U,
|
|
355
357
|
onSearchChange: (e) => {
|
|
356
|
-
|
|
358
|
+
Ae(e);
|
|
357
359
|
},
|
|
358
|
-
onReset:
|
|
359
|
-
emptyLabel:
|
|
360
|
-
}),
|
|
360
|
+
onReset: H,
|
|
361
|
+
emptyLabel: U.trim() === "" ? void 0 : C("filters.drawer.emptySearchResults")
|
|
362
|
+
}), Be = p(() => I ?? (we ? /* @__PURE__ */ v(le, {
|
|
361
363
|
variant: "embedded",
|
|
362
|
-
ariaLabel:
|
|
363
|
-
}) :
|
|
364
|
-
title:
|
|
365
|
-
description:
|
|
366
|
-
actions: /* @__PURE__ */
|
|
364
|
+
ariaLabel: C("common.loading")
|
|
365
|
+
}) : V.length > 0 ? /* @__PURE__ */ v(ie, {
|
|
366
|
+
title: C("emptyState.listEmpty.title"),
|
|
367
|
+
description: C("emptyState.listEmptyFiltered.description"),
|
|
368
|
+
actions: /* @__PURE__ */ v(h, {
|
|
367
369
|
type: "button",
|
|
368
370
|
variant: "secondary",
|
|
369
371
|
size: "small",
|
|
370
|
-
onClick:
|
|
371
|
-
children:
|
|
372
|
+
onClick: H,
|
|
373
|
+
children: C("emptyState.listEmptyFiltered.actions.reset")
|
|
372
374
|
})
|
|
373
|
-
}) : /* @__PURE__ */
|
|
374
|
-
title:
|
|
375
|
-
description:
|
|
375
|
+
}) : /* @__PURE__ */ v(ie, {
|
|
376
|
+
title: C("emptyState.listEmpty.title"),
|
|
377
|
+
description: C("emptyState.listEmpty.description")
|
|
376
378
|
})), [
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
]),
|
|
383
|
-
shown:
|
|
384
|
-
total:
|
|
385
|
-
}) }) :
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
]),
|
|
390
|
-
|
|
379
|
+
V.length,
|
|
380
|
+
I,
|
|
381
|
+
H,
|
|
382
|
+
we,
|
|
383
|
+
C
|
|
384
|
+
]), Ve = p(() => typeof F == "number" ? /* @__PURE__ */ v("span", { children: C("list.showing", {
|
|
385
|
+
shown: D.length,
|
|
386
|
+
total: F
|
|
387
|
+
}) }) : D.length === 0 ? null : /* @__PURE__ */ v("span", { children: C("list.loaded", { count: D.length }) }), [
|
|
388
|
+
D.length,
|
|
389
|
+
C,
|
|
390
|
+
F
|
|
391
|
+
]), Y = p(() => {
|
|
392
|
+
let e = z.ui?.displayMode ?? z.responsive?.mode ?? "auto";
|
|
393
|
+
return _e({
|
|
394
|
+
kind: z.kind,
|
|
395
|
+
displayMode: e,
|
|
396
|
+
ui: z.ui
|
|
397
|
+
});
|
|
398
|
+
}, [
|
|
399
|
+
z.kind,
|
|
400
|
+
z.responsive?.mode,
|
|
401
|
+
z.ui
|
|
402
|
+
]), X = typeof F == "number" && D.length < F && !j;
|
|
403
|
+
re(() => {
|
|
404
|
+
!X || !Y.infiniteScroll.showInconsistentPageInfo || !u() || console.warn("Backoffice list received inconsistent pageInfo: loaded rows are lower than totalCount but hasNextPage is false.", {
|
|
405
|
+
entityId: w.id,
|
|
406
|
+
loadedCount: D.length,
|
|
407
|
+
totalCount: F
|
|
408
|
+
});
|
|
409
|
+
}, [
|
|
410
|
+
w.id,
|
|
411
|
+
X,
|
|
412
|
+
D.length,
|
|
413
|
+
Y.infiniteScroll.showInconsistentPageInfo,
|
|
414
|
+
F
|
|
415
|
+
]);
|
|
416
|
+
let Z = i.virtualize === !0 || Y.virtualization.enabled, { sentinelRef: He } = l({
|
|
417
|
+
enabled: !Z && Y.infiniteScroll.enabled,
|
|
391
418
|
hasNextPage: j,
|
|
392
419
|
isLoading: M,
|
|
393
|
-
onIntersect:
|
|
394
|
-
|
|
420
|
+
onIntersect: N,
|
|
421
|
+
rootMargin: Y.infiniteScroll.rootMargin,
|
|
422
|
+
threshold: Y.infiniteScroll.threshold
|
|
423
|
+
}), Q = R?.title ?? S(z.title, b), Ue = R?.subtitle, We = B.find((e) => e.mobileRole === "action" || e.id === "actions"), Ge = z.ui?.displayMode ?? z.responsive?.mode ?? "auto", Ke = z.ui?.density ?? z.responsive?.density ?? "compact", qe = /* @__PURE__ */ v(n, {
|
|
395
424
|
fallback: (e) => {
|
|
396
425
|
let { reset: t } = e;
|
|
397
|
-
return /* @__PURE__ */
|
|
426
|
+
return /* @__PURE__ */ v(fe, {
|
|
398
427
|
tone: "danger",
|
|
399
|
-
title:
|
|
400
|
-
actions: /* @__PURE__ */
|
|
428
|
+
title: C("list.errors.title"),
|
|
429
|
+
actions: /* @__PURE__ */ v(h, {
|
|
401
430
|
type: "button",
|
|
402
431
|
variant: "secondary",
|
|
403
432
|
size: "small",
|
|
404
433
|
onClick: () => {
|
|
405
|
-
t(),
|
|
434
|
+
t(), P?.();
|
|
406
435
|
},
|
|
407
|
-
children:
|
|
436
|
+
children: C("list.actions.retry")
|
|
408
437
|
}),
|
|
409
|
-
children:
|
|
438
|
+
children: C("list.errors.tableFailed")
|
|
410
439
|
});
|
|
411
440
|
},
|
|
412
|
-
children: /* @__PURE__ */
|
|
413
|
-
columns:
|
|
414
|
-
rows:
|
|
415
|
-
getRowId:
|
|
416
|
-
emptyState:
|
|
417
|
-
className:
|
|
418
|
-
gridTemplateColumns:
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
441
|
+
children: Z ? /* @__PURE__ */ v(ue, {
|
|
442
|
+
columns: B,
|
|
443
|
+
rows: D,
|
|
444
|
+
getRowId: O,
|
|
445
|
+
emptyState: Be,
|
|
446
|
+
className: he,
|
|
447
|
+
gridTemplateColumns: A,
|
|
448
|
+
virtualization: Y.virtualization,
|
|
449
|
+
infiniteScroll: {
|
|
450
|
+
enabled: Y.infiniteScroll.enabled,
|
|
451
|
+
thresholdPx: Y.infiniteScroll.thresholdPx,
|
|
452
|
+
autoLoad: Y.infiniteScroll.autoLoad
|
|
453
|
+
},
|
|
454
|
+
hasNextPage: j,
|
|
455
|
+
isLoadingMore: M,
|
|
456
|
+
onLoadMore: N
|
|
457
|
+
}) : /* @__PURE__ */ v(me, {
|
|
458
|
+
columns: B,
|
|
459
|
+
rows: D,
|
|
460
|
+
getRowId: O,
|
|
461
|
+
emptyState: Be,
|
|
462
|
+
className: he,
|
|
463
|
+
gridTemplateColumns: A,
|
|
464
|
+
mode: Ge,
|
|
465
|
+
density: Ke,
|
|
466
|
+
renderAction: (e) => We?.cell(e) ?? null
|
|
422
467
|
})
|
|
423
|
-
}),
|
|
424
|
-
primaryFilters:
|
|
425
|
-
filterDrawerTrigger:
|
|
426
|
-
sortControl:
|
|
427
|
-
utilityActions:
|
|
468
|
+
}), Je = Ee ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(s, {
|
|
469
|
+
primaryFilters: Pe != null || Ne != null ? /* @__PURE__ */ y(_, { children: [Pe, Ne] }) : null,
|
|
470
|
+
filterDrawerTrigger: Re,
|
|
471
|
+
sortControl: Fe,
|
|
472
|
+
utilityActions: P == null ? null : /* @__PURE__ */ v(h, {
|
|
428
473
|
type: "button",
|
|
429
474
|
variant: "secondary",
|
|
430
475
|
size: "small",
|
|
431
|
-
isLoading:
|
|
432
|
-
loadingLabel:
|
|
476
|
+
isLoading: Se,
|
|
477
|
+
loadingLabel: C("list.actions.refreshing"),
|
|
433
478
|
onClick: () => {
|
|
434
|
-
|
|
479
|
+
P();
|
|
435
480
|
},
|
|
436
|
-
children:
|
|
481
|
+
children: C("list.actions.refresh")
|
|
437
482
|
}),
|
|
438
|
-
activeFilters:
|
|
483
|
+
activeFilters: Ie,
|
|
439
484
|
density: "compact"
|
|
440
|
-
}),
|
|
441
|
-
isOpen:
|
|
442
|
-
entity:
|
|
443
|
-
title:
|
|
444
|
-
scope:
|
|
485
|
+
}), ze] }) : null, Ye = /* @__PURE__ */ y("div", { children: [qe, /* @__PURE__ */ v(r, {
|
|
486
|
+
isOpen: W != null,
|
|
487
|
+
entity: W?.entity ?? w.id,
|
|
488
|
+
title: W?.label ?? C("picker.title"),
|
|
489
|
+
scope: W?.scope,
|
|
445
490
|
onClose: () => {
|
|
446
|
-
|
|
491
|
+
je(null);
|
|
447
492
|
},
|
|
448
493
|
onSelectId: (e) => {
|
|
449
|
-
if (
|
|
450
|
-
let t =
|
|
451
|
-
|
|
452
|
-
...
|
|
494
|
+
if (W == null) return;
|
|
495
|
+
let t = x(T.where, W.whereKey, e, W.path);
|
|
496
|
+
E({
|
|
497
|
+
...T,
|
|
453
498
|
where: t
|
|
454
499
|
});
|
|
455
500
|
}
|
|
456
|
-
})] }),
|
|
457
|
-
ref:
|
|
501
|
+
})] }), $ = D.length > 0 || M || j ? /* @__PURE__ */ y(_, { children: [!Z && /* @__PURE__ */ v("div", {
|
|
502
|
+
ref: He,
|
|
458
503
|
"aria-hidden": "true"
|
|
459
|
-
}), /* @__PURE__ */
|
|
460
|
-
loadedCount:
|
|
461
|
-
totalCount:
|
|
504
|
+
}), /* @__PURE__ */ v(se, {
|
|
505
|
+
loadedCount: D.length,
|
|
506
|
+
totalCount: F,
|
|
462
507
|
hasNextPage: j,
|
|
463
508
|
isLoading: M,
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
509
|
+
pageInfoState: X ? "inconsistent" : M ? "loading" : j ? "ready" : "complete",
|
|
510
|
+
loadedLabel: Ve,
|
|
511
|
+
loadingLabel: C("list.loadMore.loading"),
|
|
512
|
+
endLabel: C("list.loadMore.end")
|
|
467
513
|
})] }) : null;
|
|
468
|
-
return
|
|
469
|
-
config:
|
|
470
|
-
state:
|
|
471
|
-
pushState:
|
|
472
|
-
children: /* @__PURE__ */
|
|
473
|
-
className:
|
|
514
|
+
return Te === "embedded" ? /* @__PURE__ */ v(c, {
|
|
515
|
+
config: w,
|
|
516
|
+
state: T,
|
|
517
|
+
pushState: E,
|
|
518
|
+
children: /* @__PURE__ */ y("div", {
|
|
519
|
+
className: te,
|
|
474
520
|
children: [
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
className:
|
|
477
|
-
children:
|
|
521
|
+
/* @__PURE__ */ v("div", {
|
|
522
|
+
className: ne,
|
|
523
|
+
children: Q
|
|
478
524
|
}),
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
525
|
+
Je,
|
|
526
|
+
L,
|
|
527
|
+
Ye,
|
|
528
|
+
$
|
|
483
529
|
]
|
|
484
530
|
})
|
|
485
|
-
}) : /* @__PURE__ */
|
|
486
|
-
config:
|
|
487
|
-
state:
|
|
488
|
-
pushState:
|
|
489
|
-
children: /* @__PURE__ */
|
|
490
|
-
headerNode: /* @__PURE__ */
|
|
491
|
-
title:
|
|
492
|
-
subtitle:
|
|
493
|
-
actions:
|
|
531
|
+
}) : /* @__PURE__ */ v(c, {
|
|
532
|
+
config: w,
|
|
533
|
+
state: T,
|
|
534
|
+
pushState: E,
|
|
535
|
+
children: /* @__PURE__ */ v(pe, {
|
|
536
|
+
headerNode: /* @__PURE__ */ v(ce, {
|
|
537
|
+
title: Q,
|
|
538
|
+
subtitle: Ue,
|
|
539
|
+
actions: Ce
|
|
494
540
|
}),
|
|
495
|
-
toolbarNode:
|
|
496
|
-
statusNode:
|
|
497
|
-
tableNode:
|
|
498
|
-
tableFooterNode:
|
|
541
|
+
toolbarNode: Je,
|
|
542
|
+
statusNode: L,
|
|
543
|
+
tableNode: Ye,
|
|
544
|
+
tableFooterNode: $,
|
|
499
545
|
presentation: "flat"
|
|
500
546
|
})
|
|
501
547
|
});
|
|
502
548
|
};
|
|
503
549
|
//#endregion
|
|
504
|
-
export {
|
|
550
|
+
export { C as BackofficeEntityListScaffold, C as default };
|
|
505
551
|
|
|
506
552
|
//# sourceMappingURL=BackofficeEntityListScaffold.js.map
|