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