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