@plumile/backoffice-react 0.1.201 → 0.1.205
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/README.md +4 -4
- package/lib/esm/auth/login/LoginFlow.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/components/backoffice/detail/BackofficeEntitySummaryHeader.js +28 -28
- package/lib/esm/components/backoffice/detail/BackofficeEntitySummaryHeader.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +183 -183
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
- package/lib/esm/hooks/useAuth.js +56 -56
- package/lib/esm/hooks/useAuth.js.map +1 -1
- package/lib/esm/hooks/useConditionalSubscription.js +18 -18
- package/lib/esm/hooks/useConditionalSubscription.js.map +1 -1
- package/lib/esm/index.js +49 -57
- package/lib/esm/pages/BackofficeEntityDetailPage.js +97 -97
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeLayoutPage.js +19 -19
- package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
- package/lib/esm/provider/BackofficeProvider.js +33 -33
- package/lib/esm/router/createBackofficeRoutes.js +26 -28
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/esm/storybook/relay/RelayStory.js +32 -32
- package/lib/esm/storybook/relay/RelayStory.js.map +1 -1
- package/lib/esm/storybook/relay/mockResolvers.js.map +1 -1
- package/lib/esm/style.css +1 -1
- package/lib/types/components/backoffice/detail/BackofficeEntitySummaryHeader.d.ts +1 -1
- package/lib/types/components/backoffice/detail/BackofficeEntitySummaryHeader.d.ts.map +1 -1
- package/lib/types/hooks/useAuth.d.ts.map +1 -1
- package/lib/types/hooks/useConditionalSubscription.d.ts.map +1 -1
- package/lib/types/i18n/locales/en/backofficeReact.d.ts +5 -0
- package/lib/types/i18n/locales/fr/backofficeReact.d.ts +5 -0
- package/lib/types/index.d.ts +1 -9
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/pages/BackofficeLayoutPage.d.ts.map +1 -1
- package/lib/types/router/createBackofficeRoutes.d.ts +3 -3
- package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
- package/lib/types/storybook/relay/RelayStory.d.ts +1 -1
- package/lib/types/storybook/relay/RelayStory.d.ts.map +1 -1
- package/lib/types/storybook/relay/mockResolvers.d.ts +9 -1
- package/lib/types/storybook/relay/mockResolvers.d.ts.map +1 -1
- package/package.json +12 -15
- package/lib/esm/_virtual/_rolldown/runtime.js +0 -7
- package/lib/esm/components/backoffice/detail/BackofficeDetailFlagTag.js +0 -13
- package/lib/esm/components/backoffice/detail/BackofficeDetailFlagTag.js.map +0 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailTaggedValue.js +0 -12
- package/lib/esm/components/backoffice/detail/BackofficeDetailTaggedValue.js.map +0 -1
- package/lib/esm/components/backoffice/detail/BackofficeEnumLabel.js +0 -16
- package/lib/esm/components/backoffice/detail/BackofficeEnumLabel.js.map +0 -1
- package/lib/esm/components/backoffice/detail/BackofficeReferenceValue.js +0 -17
- package/lib/esm/components/backoffice/detail/BackofficeReferenceValue.js.map +0 -1
- package/lib/esm/components/backoffice/detail/BackofficeStatusGroup.js +0 -8
- package/lib/esm/components/backoffice/detail/BackofficeStatusGroup.js.map +0 -1
- package/lib/esm/components/backoffice/detail/BackofficeStatusMetaBadge.js +0 -16
- package/lib/esm/components/backoffice/detail/BackofficeStatusMetaBadge.js.map +0 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailRelationLink.css.js +0 -6
- package/lib/esm/components/backoffice/detail/backofficeDetailRelationLink.css.js.map +0 -1
- package/lib/esm/components/backoffice/refs/backofficeEntityIdRef.css.js +0 -6
- package/lib/esm/components/backoffice/refs/backofficeEntityIdRef.css.js.map +0 -1
- package/lib/esm/components/backoffice/routing/BackofficeRoutePendingBar.js +0 -12
- package/lib/esm/components/backoffice/routing/BackofficeRoutePendingBar.js.map +0 -1
- package/lib/esm/components/backoffice/routing/backofficeRoutePendingBar.css.js +0 -7
- package/lib/esm/components/backoffice/routing/backofficeRoutePendingBar.css.js.map +0 -1
- package/lib/esm/modules/base64.js +0 -21
- package/lib/esm/modules/base64.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -15
- package/lib/esm/node_modules/@babel/runtime/helpers/arrayLikeToArray.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -15
- package/lib/esm/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/defineProperty.js +0 -20
- package/lib/esm/node_modules/@babel/runtime/helpers/defineProperty.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -13
- package/lib/esm/node_modules/@babel/runtime/helpers/interopRequireDefault.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -13
- package/lib/esm/node_modules/@babel/runtime/helpers/iterableToArray.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -13
- package/lib/esm/node_modules/@babel/runtime/helpers/nonIterableSpread.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -33
- package/lib/esm/node_modules/@babel/runtime/helpers/objectSpread2.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -19
- package/lib/esm/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -18
- package/lib/esm/node_modules/@babel/runtime/helpers/toConsumableArray.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -22
- package/lib/esm/node_modules/@babel/runtime/helpers/toPrimitive.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -17
- package/lib/esm/node_modules/@babel/runtime/helpers/toPropertyKey.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/typeof.js +0 -18
- package/lib/esm/node_modules/@babel/runtime/helpers/typeof.js.map +0 -1
- package/lib/esm/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -19
- package/lib/esm/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +0 -1
- package/lib/esm/node_modules/fbjs/lib/areEqual.js +0 -42
- package/lib/esm/node_modules/fbjs/lib/areEqual.js.map +0 -1
- package/lib/esm/node_modules/invariant/browser.js +0 -30
- package/lib/esm/node_modules/invariant/browser.js.map +0 -1
- package/lib/esm/node_modules/relay-test-utils/index.js +0 -11
- package/lib/esm/node_modules/relay-test-utils/index.js.map +0 -1
- package/lib/esm/node_modules/relay-test-utils/lib/RelayMockPayloadGenerator.js +0 -288
- package/lib/esm/node_modules/relay-test-utils/lib/RelayMockPayloadGenerator.js.map +0 -1
- package/lib/esm/node_modules/relay-test-utils/lib/RelayModernMockEnvironment.js +0 -183
- package/lib/esm/node_modules/relay-test-utils/lib/RelayModernMockEnvironment.js.map +0 -1
- package/lib/esm/node_modules/relay-test-utils/lib/RelayResolverTestUtils.js +0 -19
- package/lib/esm/node_modules/relay-test-utils/lib/RelayResolverTestUtils.js.map +0 -1
- package/lib/esm/node_modules/relay-test-utils/lib/index.js +0 -21
- package/lib/esm/node_modules/relay-test-utils/lib/index.js.map +0 -1
- package/lib/esm/node_modules/relay-test-utils/lib/unwrapContainer.js +0 -16
- package/lib/esm/node_modules/relay-test-utils/lib/unwrapContainer.js.map +0 -1
- package/lib/esm/relay/RelayProvider.js +0 -2
- package/lib/esm/relay/envHelpers.js +0 -63
- package/lib/esm/relay/envHelpers.js.map +0 -1
- package/lib/esm/relay/environment.js +0 -2
- package/lib/esm/relay/shortAccessTokenEnvironment.js +0 -2
- package/lib/esm/relay/useRelayOperationActivity.js +0 -2
- package/lib/esm/storybook/relay/relay-test-utils.d.js +0 -0
- package/lib/types/auth/AuthFlows.stories.d.ts +0 -19
- package/lib/types/auth/AuthFlows.stories.d.ts.map +0 -1
- package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.stories.d.ts +0 -41
- package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.stories.d.ts.map +0 -1
- package/lib/types/components/backoffice/detail/BackofficeDetailFlagTag.d.ts +0 -11
- package/lib/types/components/backoffice/detail/BackofficeDetailFlagTag.d.ts.map +0 -1
- package/lib/types/components/backoffice/detail/BackofficeDetailPrimitives.stories.d.ts +0 -17
- package/lib/types/components/backoffice/detail/BackofficeDetailPrimitives.stories.d.ts.map +0 -1
- package/lib/types/components/backoffice/detail/BackofficeDetailTaggedValue.d.ts +0 -13
- package/lib/types/components/backoffice/detail/BackofficeDetailTaggedValue.d.ts.map +0 -1
- package/lib/types/components/backoffice/detail/BackofficeEnumLabel.d.ts +0 -9
- package/lib/types/components/backoffice/detail/BackofficeEnumLabel.d.ts.map +0 -1
- package/lib/types/components/backoffice/detail/BackofficeReferenceValue.d.ts +0 -10
- package/lib/types/components/backoffice/detail/BackofficeReferenceValue.d.ts.map +0 -1
- package/lib/types/components/backoffice/detail/BackofficeStatusGroup.d.ts +0 -8
- package/lib/types/components/backoffice/detail/BackofficeStatusGroup.d.ts.map +0 -1
- package/lib/types/components/backoffice/detail/BackofficeStatusMetaBadge.d.ts +0 -11
- package/lib/types/components/backoffice/detail/BackofficeStatusMetaBadge.d.ts.map +0 -1
- package/lib/types/components/backoffice/detail/backofficeDetailRelationLink.css.d.ts +0 -6
- package/lib/types/components/backoffice/detail/backofficeDetailRelationLink.css.d.ts.map +0 -1
- package/lib/types/components/backoffice/errors/BackofficeErrorBoundary.stories.d.ts +0 -12
- package/lib/types/components/backoffice/errors/BackofficeErrorBoundary.stories.d.ts.map +0 -1
- package/lib/types/components/backoffice/filters/EntityIdFilterField.stories.d.ts +0 -12
- package/lib/types/components/backoffice/filters/EntityIdFilterField.stories.d.ts.map +0 -1
- package/lib/types/components/backoffice/hub/BackofficeHubTemplate.stories.d.ts +0 -49
- package/lib/types/components/backoffice/hub/BackofficeHubTemplate.stories.d.ts.map +0 -1
- package/lib/types/components/backoffice/overview/BackofficeOverviewLayout.stories.d.ts +0 -11
- package/lib/types/components/backoffice/overview/BackofficeOverviewLayout.stories.d.ts.map +0 -1
- package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.stories.d.ts +0 -12
- package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.stories.d.ts.map +0 -1
- package/lib/types/components/backoffice/refs/backofficeEntityIdRef.css.d.ts +0 -2
- package/lib/types/components/backoffice/refs/backofficeEntityIdRef.css.d.ts.map +0 -1
- package/lib/types/components/backoffice/routing/BackofficeRoutePendingBar.d.ts +0 -4
- package/lib/types/components/backoffice/routing/BackofficeRoutePendingBar.d.ts.map +0 -1
- package/lib/types/components/backoffice/routing/backofficeRoutePendingBar.css.d.ts +0 -3
- package/lib/types/components/backoffice/routing/backofficeRoutePendingBar.css.d.ts.map +0 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.stories.d.ts +0 -11
- package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.stories.d.ts.map +0 -1
- package/lib/types/components/backoffice/tools/BackofficeTools.stories.d.ts +0 -17
- package/lib/types/components/backoffice/tools/BackofficeTools.stories.d.ts.map +0 -1
- package/lib/types/modules/base64.d.ts +0 -3
- package/lib/types/modules/base64.d.ts.map +0 -1
- package/lib/types/pages/BackofficeDashboardPage.stories.d.ts +0 -9
- package/lib/types/pages/BackofficeDashboardPage.stories.d.ts.map +0 -1
- package/lib/types/relay/RelayProvider.d.ts +0 -2
- package/lib/types/relay/RelayProvider.d.ts.map +0 -1
- package/lib/types/relay/envHelpers.d.ts +0 -25
- package/lib/types/relay/envHelpers.d.ts.map +0 -1
- package/lib/types/relay/environment.d.ts +0 -2
- package/lib/types/relay/environment.d.ts.map +0 -1
- package/lib/types/relay/shortAccessTokenEnvironment.d.ts +0 -5
- package/lib/types/relay/shortAccessTokenEnvironment.d.ts.map +0 -1
- package/lib/types/relay/useRelayOperationActivity.d.ts +0 -2
- package/lib/types/relay/useRelayOperationActivity.d.ts.map +0 -1
|
@@ -7,30 +7,30 @@ import { DeferredFilterSearchInput as a } from "../filters/DeferredFilterSearchI
|
|
|
7
7
|
import { EntityFilterValue as o, EntityFilterValueText as s } from "../filters/EntityFilterValue.js";
|
|
8
8
|
import { BACKOFFICE_LIST_BODY_SCROLL_MODE as c } from "./backofficeListScrollMode.js";
|
|
9
9
|
import { useBackofficeInfiniteScrollSentinel as l } from "../../../hooks/useBackofficeInfiniteScrollSentinel.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { Tag as de } from "@plumile/ui/backoffice/atoms/tag/Tag.js";
|
|
10
|
+
import { controlsRow as u, embeddedContainer as d, embeddedHeader as ee, entityIdListFilter as te, entityIdListTags as ne, filterInput as f, refreshingIndicator as re, tableHost as ie } from "./backofficeEntityListScaffold.css.js";
|
|
11
|
+
import { useCallback as p, useEffect as ae, useMemo as m, useState as h } from "react";
|
|
12
|
+
import { InlineBanner as oe } from "@plumile/ui/components/feedback/InlineBanner.js";
|
|
13
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
14
|
+
import { useTranslation as se } from "react-i18next";
|
|
15
|
+
import { Button as y } from "@plumile/ui/atomic/atoms/button/Button.js";
|
|
16
|
+
import { SimpleSelect as b } from "@plumile/ui/components/select/SimpleSelect.js";
|
|
17
|
+
import { Spinner as ce } from "@plumile/ui/backoffice/atoms/spinner/Spinner.js";
|
|
18
|
+
import { BackofficeEmptyState as le } from "@plumile/ui/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
|
|
19
|
+
import { Tag as ue } from "@plumile/ui/backoffice/atoms/tag/Tag.js";
|
|
21
20
|
import { readWhereValue as x, setWhereValue as S } from "@plumile/backoffice-core/filters/where.js";
|
|
22
|
-
import { BackofficeFilterDrawer as
|
|
23
|
-
import { BackofficeFilterField as
|
|
24
|
-
import { BackofficeListFooter as
|
|
25
|
-
import { BackofficePageHeader as
|
|
26
|
-
import { BackofficeToolbar as
|
|
27
|
-
import { BackofficeTableSkeleton as
|
|
28
|
-
import { FilterChipRow as
|
|
29
|
-
import { ListPageTemplate as
|
|
30
|
-
import { ResponsiveRecordList as
|
|
31
|
-
import { VirtualizedConnectionTable as
|
|
32
|
-
import { denseTableClass as
|
|
33
|
-
import { resolveBackofficeListRuntimeConfig as
|
|
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
|
+
import { isDevEnv as Ce } from "@plumile/relay/envHelpers.js";
|
|
34
34
|
//#region src/components/backoffice/scaffolds/BackofficeEntityListScaffold.tsx
|
|
35
35
|
var C = (e, t) => e(t), we = (e, t) => {
|
|
36
36
|
if (e.fromGraphQL != null && t != null) return e.fromGraphQL(t);
|
|
@@ -44,7 +44,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
44
44
|
if (t == null) return null;
|
|
45
45
|
if (Array.isArray(t)) {
|
|
46
46
|
let n = Te(t);
|
|
47
|
-
return n.length === 0 ? null : e.kind === "entityIdList" ? /* @__PURE__ */ g
|
|
47
|
+
return n.length === 0 ? null : e.kind === "entityIdList" ? /* @__PURE__ */ _(g, { children: n.map((t, r) => /* @__PURE__ */ v("span", { children: [/* @__PURE__ */ _(o, {
|
|
48
48
|
entityId: e.entity,
|
|
49
49
|
id: t
|
|
50
50
|
}), r < n.length - 1 ? ", " : null] }, t)) }) : n.join(", ");
|
|
@@ -52,7 +52,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
52
52
|
if (typeof t == "boolean") return e.kind === "boolean" ? n.booleanLabel(t) : t ? n.fallbackBooleanLabels.yes : n.fallbackBooleanLabels.no;
|
|
53
53
|
if (typeof t != "string" && typeof t != "number") return null;
|
|
54
54
|
let r = String(t).trim();
|
|
55
|
-
return r === "" ? null : e.kind === "entityId" ? /* @__PURE__ */
|
|
55
|
+
return r === "" ? null : e.kind === "entityId" ? /* @__PURE__ */ _(o, {
|
|
56
56
|
entityId: e.entity,
|
|
57
57
|
id: r
|
|
58
58
|
}) : e.kind === "enum" ? n.enumLabel(r) : r;
|
|
@@ -67,7 +67,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
67
67
|
let n = new Date(t);
|
|
68
68
|
return Number.isNaN(n.getTime()) ? t : n.toISOString();
|
|
69
69
|
}, w = (x) => {
|
|
70
|
-
let { t: w } =
|
|
70
|
+
let { t: w } = se(), { t: T } = e(), { config: E, state: D, pushState: O, rows: k, getRowId: ke, columns: A, gridTemplateColumns: Ae, hasNextPage: j, isLoadingMore: M, isRefreshing: N = !1, onLoadMore: P, onRefresh: F, totalCount: I, loadedCountLabel: je, emptyState: Me, statusBanner: Ne, header: Pe, headerActions: Fe, isLoadingInitial: L = !1, variant: Ie = "page", showFilters: Le = !0 } = x, R = E.list, { listDefaults: Re } = E, z = m(() => A.some((e) => e.isPrimary === !0) || A.length === 0 ? A : A.map((e, t) => {
|
|
71
71
|
let { header: n } = e;
|
|
72
72
|
return t === 0 ? {
|
|
73
73
|
...e,
|
|
@@ -77,7 +77,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
77
77
|
...e,
|
|
78
78
|
header: n
|
|
79
79
|
};
|
|
80
|
-
}), [
|
|
80
|
+
}), [A]), B = m(() => {
|
|
81
81
|
let e = [];
|
|
82
82
|
for (let t of R.filters) {
|
|
83
83
|
let n = we(t, D.where), r = Ee(t, n, {
|
|
@@ -101,7 +101,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
101
101
|
if (r != null) {
|
|
102
102
|
let i = String(n);
|
|
103
103
|
Array.isArray(n) && (i = n.join(","));
|
|
104
|
-
let a = /* @__PURE__ */
|
|
104
|
+
let a = /* @__PURE__ */ v("span", { children: [
|
|
105
105
|
C(t.label, w),
|
|
106
106
|
": ",
|
|
107
107
|
r
|
|
@@ -126,23 +126,23 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
126
126
|
D,
|
|
127
127
|
T,
|
|
128
128
|
w
|
|
129
|
-
]), V =
|
|
129
|
+
]), V = p(() => {
|
|
130
130
|
O({ ...Re });
|
|
131
|
-
}, [Re, O]), [ze,
|
|
131
|
+
}, [Re, O]), [ze, H] = h(!1), [Be, Ve] = h(""), U = x.filterDrawerState ?? {
|
|
132
132
|
isOpen: ze,
|
|
133
|
-
search:
|
|
134
|
-
setOpen:
|
|
135
|
-
setSearch:
|
|
133
|
+
search: Be,
|
|
134
|
+
setOpen: H,
|
|
135
|
+
setSearch: Ve,
|
|
136
136
|
reset: () => {
|
|
137
|
-
|
|
137
|
+
H(!1), Ve("");
|
|
138
138
|
}
|
|
139
|
-
},
|
|
139
|
+
}, He = U.isOpen, W = U.search, G = U.setOpen, Ue = U.setSearch, We = U.reset, [K, q] = h(null), J = p((e) => {
|
|
140
140
|
let n = e.whereKey ?? e.id, r = we(e, D.where), i = "";
|
|
141
141
|
typeof r == "string" && (i = r), typeof r == "number" && Number.isFinite(r) && (i = String(r));
|
|
142
142
|
let c = C(e.label, w);
|
|
143
143
|
if (e.kind === "text") {
|
|
144
144
|
let t = e.placeholderLabel == null ? c : C(e.placeholderLabel, w), r = T("filters.placeholders.search", { label: t });
|
|
145
|
-
return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */
|
|
145
|
+
return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */ _(a, {
|
|
146
146
|
value: i,
|
|
147
147
|
onApply: (t) => {
|
|
148
148
|
let r = S(D.where, n, t, e.path);
|
|
@@ -158,7 +158,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
158
158
|
}
|
|
159
159
|
if (e.kind === "datetime") {
|
|
160
160
|
let t = e.placeholderLabel == null ? c : C(e.placeholderLabel, w), r = T("filters.placeholders.search", { label: t });
|
|
161
|
-
return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */
|
|
161
|
+
return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */ _(a, {
|
|
162
162
|
value: De(i),
|
|
163
163
|
onApply: (t) => {
|
|
164
164
|
let r = Oe(t), i = S(D.where, n, r, e.path);
|
|
@@ -175,7 +175,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
175
175
|
}
|
|
176
176
|
if (e.kind === "number") {
|
|
177
177
|
let t = e.placeholderLabel == null ? c : C(e.placeholderLabel, w), r = T("filters.placeholders.search", { label: t });
|
|
178
|
-
return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */
|
|
178
|
+
return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */ _(a, {
|
|
179
179
|
value: i,
|
|
180
180
|
onApply: (t) => {
|
|
181
181
|
let r = t.trim(), i = r === "" ? null : Number(r), a = S(D.where, n, Number.isFinite(i) ? i : null, e.path);
|
|
@@ -201,7 +201,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
201
201
|
value: e.value,
|
|
202
202
|
label: C(e.label, w)
|
|
203
203
|
}))];
|
|
204
|
-
return /* @__PURE__ */
|
|
204
|
+
return /* @__PURE__ */ _(b, {
|
|
205
205
|
options: t,
|
|
206
206
|
value: i,
|
|
207
207
|
size: "small",
|
|
@@ -237,7 +237,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
237
237
|
label: o
|
|
238
238
|
}
|
|
239
239
|
];
|
|
240
|
-
return /* @__PURE__ */
|
|
240
|
+
return /* @__PURE__ */ _(b, {
|
|
241
241
|
options: s,
|
|
242
242
|
value: i,
|
|
243
243
|
size: "small",
|
|
@@ -264,15 +264,15 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
264
264
|
where: a
|
|
265
265
|
});
|
|
266
266
|
};
|
|
267
|
-
return /* @__PURE__ */
|
|
268
|
-
className:
|
|
269
|
-
children: [/* @__PURE__ */
|
|
267
|
+
return /* @__PURE__ */ v("div", {
|
|
268
|
+
className: te,
|
|
269
|
+
children: [/* @__PURE__ */ _(t, {
|
|
270
270
|
label: c,
|
|
271
271
|
value: a === 0 ? null : i.join(","),
|
|
272
272
|
displayValue: s,
|
|
273
273
|
placeholder: T("filters.placeholders.anyEntity", { label: c }),
|
|
274
274
|
onPick: () => {
|
|
275
|
-
|
|
275
|
+
q({
|
|
276
276
|
entity: e.entity,
|
|
277
277
|
whereKey: n,
|
|
278
278
|
label: c,
|
|
@@ -289,14 +289,14 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
289
289
|
where: t
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
|
-
}), i.length > 0 ? /* @__PURE__ */
|
|
293
|
-
className:
|
|
294
|
-
children: i.map((t) => /* @__PURE__ */
|
|
292
|
+
}), i.length > 0 ? /* @__PURE__ */ _("div", {
|
|
293
|
+
className: ne,
|
|
294
|
+
children: i.map((t) => /* @__PURE__ */ _(ue, {
|
|
295
295
|
removeLabel: T("filters.actions.removeFilterValue", { label: c }),
|
|
296
296
|
onRemove: () => {
|
|
297
297
|
u(t);
|
|
298
298
|
},
|
|
299
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ _(o, {
|
|
300
300
|
entityId: e.entity,
|
|
301
301
|
id: t
|
|
302
302
|
})
|
|
@@ -306,7 +306,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
306
306
|
}
|
|
307
307
|
if (e.kind === "stringList") {
|
|
308
308
|
let t = e.placeholderLabel == null ? c : C(e.placeholderLabel, w), r = T("filters.placeholders.search", { label: t });
|
|
309
|
-
return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */
|
|
309
|
+
return e.placeholderText != null && (r = C(e.placeholderText, w)), /* @__PURE__ */ _(a, {
|
|
310
310
|
value: i,
|
|
311
311
|
onApply: (t) => {
|
|
312
312
|
let r = t.split(/[\n,]+/u).map((e) => e.trim()).filter((e) => e !== ""), i = S(D.where, n, r, e.path);
|
|
@@ -324,14 +324,14 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
324
324
|
typeof r == "string" && (u = r);
|
|
325
325
|
let d = (r = null, i = !1) => {
|
|
326
326
|
let a = r?.trim() ?? "";
|
|
327
|
-
return /* @__PURE__ */
|
|
327
|
+
return /* @__PURE__ */ _(t, {
|
|
328
328
|
label: c,
|
|
329
329
|
value: u,
|
|
330
330
|
displayValue: a,
|
|
331
331
|
isResolving: i,
|
|
332
332
|
placeholder: T("filters.placeholders.anyEntity", { label: c }),
|
|
333
333
|
onPick: () => {
|
|
334
|
-
|
|
334
|
+
q({
|
|
335
335
|
entity: e.entity,
|
|
336
336
|
whereKey: n,
|
|
337
337
|
label: c,
|
|
@@ -349,7 +349,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
349
349
|
}
|
|
350
350
|
});
|
|
351
351
|
};
|
|
352
|
-
return u == null || u.trim() === "" ? d() : /* @__PURE__ */
|
|
352
|
+
return u == null || u.trim() === "" ? d() : /* @__PURE__ */ _(s, {
|
|
353
353
|
entityId: e.entity,
|
|
354
354
|
id: u,
|
|
355
355
|
children: (e, t) => {
|
|
@@ -362,25 +362,25 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
362
362
|
D,
|
|
363
363
|
T,
|
|
364
364
|
w
|
|
365
|
-
]),
|
|
365
|
+
]), Ge = m(() => R.filters.some((e) => e.placement != null), [R.filters]), Y = m(() => {
|
|
366
366
|
if (R.filters.length === 0) return [];
|
|
367
367
|
let e = R.ui?.toolbar?.maxPromotedFilters ?? 3;
|
|
368
|
-
return
|
|
368
|
+
return Ge ? R.filters.filter((e) => e.placement === "quick" || e.placement === "both") : R.filters.slice(0, e);
|
|
369
369
|
}, [
|
|
370
370
|
R.filters,
|
|
371
371
|
R.ui?.toolbar,
|
|
372
|
-
|
|
373
|
-
]),
|
|
374
|
-
let e =
|
|
375
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
376
|
-
className:
|
|
377
|
-
children: e.map((e) => /* @__PURE__ */
|
|
372
|
+
Ge
|
|
373
|
+
]), X = m(() => R.filters.filter((e) => e.placement == null || e.placement === "drawer" || e.placement === "both"), [R.filters]), Z = m(() => Y.find((e) => e.kind === "text"), [Y]), Ke = m(() => {
|
|
374
|
+
let e = Y.filter((e) => e !== Z);
|
|
375
|
+
return e.length === 0 ? null : /* @__PURE__ */ _("div", {
|
|
376
|
+
className: u,
|
|
377
|
+
children: e.map((e) => /* @__PURE__ */ _("span", { children: J(e) }, e.id))
|
|
378
378
|
});
|
|
379
379
|
}, [
|
|
380
|
+
Y,
|
|
380
381
|
J,
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
]), Je = p(() => X == null ? null : q(X), [q, X]), Ye = p(() => {
|
|
382
|
+
Z
|
|
383
|
+
]), qe = m(() => Z == null ? null : J(Z), [J, Z]), Je = m(() => {
|
|
384
384
|
if (R.sorts.length === 0) return null;
|
|
385
385
|
let e = R.sorts[0];
|
|
386
386
|
if (e == null) return null;
|
|
@@ -389,7 +389,7 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
389
389
|
value: e.id,
|
|
390
390
|
label: C(e.label, w)
|
|
391
391
|
}));
|
|
392
|
-
return /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ _(b, {
|
|
393
393
|
options: t,
|
|
394
394
|
value: D.sort ?? e.id,
|
|
395
395
|
size: "small",
|
|
@@ -407,19 +407,19 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
407
407
|
D,
|
|
408
408
|
T,
|
|
409
409
|
w
|
|
410
|
-
]),
|
|
410
|
+
]), Ye = m(() => B.length === 0 ? null : /* @__PURE__ */ _(_e, {
|
|
411
411
|
chips: B,
|
|
412
412
|
onClearAll: V
|
|
413
|
-
}), [B, V]),
|
|
414
|
-
if (
|
|
415
|
-
let e =
|
|
416
|
-
for (let n of
|
|
413
|
+
}), [B, V]), Xe = m(() => {
|
|
414
|
+
if (X.length === 0) return [];
|
|
415
|
+
let e = W.trim().toLowerCase(), t = [];
|
|
416
|
+
for (let n of X) {
|
|
417
417
|
let r = C(n.label, w);
|
|
418
418
|
(e === "" || r.toLowerCase().includes(e)) && t.push({
|
|
419
419
|
id: n.id,
|
|
420
|
-
node: /* @__PURE__ */
|
|
420
|
+
node: /* @__PURE__ */ _(fe, {
|
|
421
421
|
label: r,
|
|
422
|
-
children:
|
|
422
|
+
children: J(n)
|
|
423
423
|
})
|
|
424
424
|
});
|
|
425
425
|
}
|
|
@@ -429,54 +429,54 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
429
429
|
items: t
|
|
430
430
|
}];
|
|
431
431
|
}, [
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
432
|
+
X,
|
|
433
|
+
W,
|
|
434
|
+
J,
|
|
435
435
|
T,
|
|
436
436
|
w
|
|
437
|
-
]),
|
|
438
|
-
if (
|
|
437
|
+
]), Ze = m(() => {
|
|
438
|
+
if (X.length === 0) return null;
|
|
439
439
|
let e = B.length, t = T("filters.trigger");
|
|
440
|
-
return e > 0 && (t = T("filters.triggerWithCount", { count: e })), /* @__PURE__ */
|
|
440
|
+
return e > 0 && (t = T("filters.triggerWithCount", { count: e })), /* @__PURE__ */ _(y, {
|
|
441
441
|
type: "button",
|
|
442
442
|
variant: "secondary",
|
|
443
443
|
size: "small",
|
|
444
444
|
onClick: () => {
|
|
445
|
-
|
|
445
|
+
G(!0);
|
|
446
446
|
},
|
|
447
447
|
children: t
|
|
448
448
|
});
|
|
449
449
|
}, [
|
|
450
450
|
B.length,
|
|
451
|
-
|
|
452
|
-
|
|
451
|
+
X.length,
|
|
452
|
+
G,
|
|
453
453
|
T
|
|
454
|
-
]),
|
|
455
|
-
isOpen:
|
|
454
|
+
]), Qe = W.trim() === "" ? void 0 : T("filters.drawer.emptySearchResults"), $e = /* @__PURE__ */ _(de, {
|
|
455
|
+
isOpen: He,
|
|
456
456
|
onClose: () => {
|
|
457
|
-
|
|
457
|
+
We();
|
|
458
458
|
},
|
|
459
|
-
sections:
|
|
460
|
-
searchValue:
|
|
459
|
+
sections: Xe,
|
|
460
|
+
searchValue: W,
|
|
461
461
|
onSearchChange: (e) => {
|
|
462
|
-
|
|
462
|
+
Ue(e);
|
|
463
463
|
},
|
|
464
464
|
onReset: V,
|
|
465
|
-
emptyLabel:
|
|
466
|
-
}),
|
|
465
|
+
emptyLabel: Qe
|
|
466
|
+
}), et = m(() => Me ?? (L ? /* @__PURE__ */ _(ge, {
|
|
467
467
|
variant: "embedded",
|
|
468
468
|
ariaLabel: T("common.loading")
|
|
469
|
-
}) : B.length > 0 ? /* @__PURE__ */
|
|
469
|
+
}) : B.length > 0 ? /* @__PURE__ */ _(le, {
|
|
470
470
|
title: T("emptyState.listEmpty.title"),
|
|
471
471
|
description: T("emptyState.listEmptyFiltered.description"),
|
|
472
|
-
actions: /* @__PURE__ */
|
|
472
|
+
actions: /* @__PURE__ */ _(y, {
|
|
473
473
|
type: "button",
|
|
474
474
|
variant: "secondary",
|
|
475
475
|
size: "small",
|
|
476
476
|
onClick: V,
|
|
477
477
|
children: T("emptyState.listEmptyFiltered.actions.reset")
|
|
478
478
|
})
|
|
479
|
-
}) : /* @__PURE__ */
|
|
479
|
+
}) : /* @__PURE__ */ _(le, {
|
|
480
480
|
title: T("emptyState.listEmpty.title"),
|
|
481
481
|
description: T("emptyState.listEmpty.description")
|
|
482
482
|
})), [
|
|
@@ -485,17 +485,17 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
485
485
|
V,
|
|
486
486
|
L,
|
|
487
487
|
T
|
|
488
|
-
]),
|
|
488
|
+
]), tt = m(() => je ?? (typeof I == "number" ? /* @__PURE__ */ _("span", { children: T("list.showing", {
|
|
489
489
|
shown: k.length,
|
|
490
490
|
total: I
|
|
491
|
-
}) }) : k.length === 0 ? null : /* @__PURE__ */
|
|
491
|
+
}) }) : k.length === 0 ? null : /* @__PURE__ */ _("span", { children: T("list.loaded", { count: k.length }) })), [
|
|
492
492
|
je,
|
|
493
493
|
k.length,
|
|
494
494
|
T,
|
|
495
495
|
I
|
|
496
|
-
]),
|
|
496
|
+
]), Q = m(() => {
|
|
497
497
|
let e = R.ui?.displayMode ?? R.responsive?.mode ?? "auto";
|
|
498
|
-
return
|
|
498
|
+
return Se({
|
|
499
499
|
kind: R.kind,
|
|
500
500
|
displayMode: e,
|
|
501
501
|
ui: R.ui
|
|
@@ -504,66 +504,66 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
504
504
|
R.kind,
|
|
505
505
|
R.responsive?.mode,
|
|
506
506
|
R.ui
|
|
507
|
-
]),
|
|
508
|
-
|
|
509
|
-
|
|
507
|
+
]), $ = typeof I == "number" && k.length < I && !j;
|
|
508
|
+
ae(() => {
|
|
509
|
+
!$ || !Q.infiniteScroll.showInconsistentPageInfo || !Ce() || console.warn("Backoffice list received inconsistent pageInfo: loaded rows are lower than totalCount but hasNextPage is false.", {
|
|
510
510
|
entityId: E.id,
|
|
511
511
|
loadedCount: k.length,
|
|
512
512
|
totalCount: I
|
|
513
513
|
});
|
|
514
514
|
}, [
|
|
515
515
|
E.id,
|
|
516
|
-
|
|
516
|
+
$,
|
|
517
517
|
k.length,
|
|
518
|
-
|
|
518
|
+
Q.infiniteScroll.showInconsistentPageInfo,
|
|
519
519
|
I
|
|
520
520
|
]);
|
|
521
|
-
let
|
|
522
|
-
enabled: !
|
|
523
|
-
hasNextPage:
|
|
524
|
-
isLoading:
|
|
525
|
-
onIntersect:
|
|
526
|
-
rootMargin:
|
|
527
|
-
threshold:
|
|
528
|
-
}),
|
|
521
|
+
let nt = x.virtualize === !0 || Q.virtualization.enabled, { sentinelRef: rt } = l({
|
|
522
|
+
enabled: !nt && Q.infiniteScroll.enabled,
|
|
523
|
+
hasNextPage: j,
|
|
524
|
+
isLoading: M,
|
|
525
|
+
onIntersect: P,
|
|
526
|
+
rootMargin: Q.infiniteScroll.rootMargin,
|
|
527
|
+
threshold: Q.infiniteScroll.threshold
|
|
528
|
+
}), it = Pe?.title ?? C(R.title, w), at = Pe?.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 = nt ? /* @__PURE__ */ _(be, {
|
|
529
529
|
columns: z,
|
|
530
530
|
rows: k,
|
|
531
|
-
getRowId:
|
|
532
|
-
emptyState:
|
|
533
|
-
className:
|
|
534
|
-
gridTemplateColumns:
|
|
535
|
-
virtualization:
|
|
531
|
+
getRowId: ke,
|
|
532
|
+
emptyState: et,
|
|
533
|
+
className: xe,
|
|
534
|
+
gridTemplateColumns: Ae,
|
|
535
|
+
virtualization: Q.virtualization,
|
|
536
536
|
infiniteScroll: {
|
|
537
|
-
enabled:
|
|
538
|
-
thresholdPx:
|
|
539
|
-
autoLoad:
|
|
537
|
+
enabled: Q.infiniteScroll.enabled,
|
|
538
|
+
thresholdPx: Q.infiniteScroll.thresholdPx,
|
|
539
|
+
autoLoad: Q.infiniteScroll.autoLoad
|
|
540
540
|
},
|
|
541
|
-
hasNextPage:
|
|
542
|
-
isLoadingMore:
|
|
543
|
-
onLoadMore:
|
|
541
|
+
hasNextPage: j,
|
|
542
|
+
isLoadingMore: M,
|
|
543
|
+
onLoadMore: P,
|
|
544
544
|
bodyScrollMode: c
|
|
545
|
-
}) : /* @__PURE__ */
|
|
545
|
+
}) : /* @__PURE__ */ _(ye, {
|
|
546
546
|
columns: z,
|
|
547
547
|
rows: k,
|
|
548
|
-
getRowId:
|
|
549
|
-
emptyState:
|
|
550
|
-
className:
|
|
551
|
-
gridTemplateColumns:
|
|
552
|
-
mode:
|
|
553
|
-
density:
|
|
548
|
+
getRowId: ke,
|
|
549
|
+
emptyState: et,
|
|
550
|
+
className: xe,
|
|
551
|
+
gridTemplateColumns: Ae,
|
|
552
|
+
mode: st,
|
|
553
|
+
density: ct,
|
|
554
554
|
bodyScrollMode: c,
|
|
555
|
-
bodyFooterNode:
|
|
556
|
-
ref:
|
|
555
|
+
bodyFooterNode: Q.infiniteScroll.enabled ? /* @__PURE__ */ _("div", {
|
|
556
|
+
ref: rt,
|
|
557
557
|
"aria-hidden": "true"
|
|
558
558
|
}) : null,
|
|
559
|
-
renderAction: (e) =>
|
|
560
|
-
}),
|
|
559
|
+
renderAction: (e) => ot?.cell(e) ?? null
|
|
560
|
+
}), ut = /* @__PURE__ */ _(n, {
|
|
561
561
|
fallback: (e) => {
|
|
562
562
|
let { reset: t } = e;
|
|
563
|
-
return /* @__PURE__ */
|
|
563
|
+
return /* @__PURE__ */ _(oe, {
|
|
564
564
|
tone: "danger",
|
|
565
565
|
title: T("list.errors.title"),
|
|
566
|
-
actions: /* @__PURE__ */
|
|
566
|
+
actions: /* @__PURE__ */ _(y, {
|
|
567
567
|
type: "button",
|
|
568
568
|
variant: "secondary",
|
|
569
569
|
size: "small",
|
|
@@ -575,108 +575,108 @@ var C = (e, t) => e(t), we = (e, t) => {
|
|
|
575
575
|
children: T("list.errors.tableFailed")
|
|
576
576
|
});
|
|
577
577
|
},
|
|
578
|
-
children:
|
|
579
|
-
}),
|
|
580
|
-
search:
|
|
581
|
-
primaryFilters:
|
|
582
|
-
filterDrawerTrigger:
|
|
583
|
-
sort:
|
|
584
|
-
utilityActions: F == null ? null : /* @__PURE__ */
|
|
578
|
+
children: lt
|
|
579
|
+
}), dt = Le ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(he, {
|
|
580
|
+
search: qe,
|
|
581
|
+
primaryFilters: Ke,
|
|
582
|
+
filterDrawerTrigger: Ze,
|
|
583
|
+
sort: Je,
|
|
584
|
+
utilityActions: F == null ? null : /* @__PURE__ */ _(y, {
|
|
585
585
|
type: "button",
|
|
586
586
|
variant: "secondary",
|
|
587
587
|
size: "small",
|
|
588
|
-
isLoading:
|
|
588
|
+
isLoading: N,
|
|
589
589
|
loadingLabel: T("list.actions.refreshing"),
|
|
590
590
|
onClick: () => {
|
|
591
591
|
F();
|
|
592
592
|
},
|
|
593
593
|
children: T("list.actions.refresh")
|
|
594
594
|
}),
|
|
595
|
-
chips:
|
|
595
|
+
chips: Ye,
|
|
596
596
|
density: "compact"
|
|
597
|
-
}),
|
|
598
|
-
className:
|
|
599
|
-
"aria-busy":
|
|
597
|
+
}), $e] }) : null, ft = /* @__PURE__ */ v("div", {
|
|
598
|
+
className: ie,
|
|
599
|
+
"aria-busy": N ? "true" : void 0,
|
|
600
600
|
children: [
|
|
601
|
-
|
|
602
|
-
className:
|
|
601
|
+
N && !L ? /* @__PURE__ */ v("div", {
|
|
602
|
+
className: re,
|
|
603
603
|
role: "status",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
604
|
+
children: [/* @__PURE__ */ _(ce, {
|
|
605
605
|
size: 14,
|
|
606
606
|
ariaLabel: T("list.refreshingRows")
|
|
607
|
-
}), /* @__PURE__ */
|
|
607
|
+
}), /* @__PURE__ */ _("span", { children: T("list.refreshingRows") })]
|
|
608
608
|
}) : null,
|
|
609
|
-
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
isOpen:
|
|
612
|
-
entity:
|
|
613
|
-
title:
|
|
614
|
-
scope:
|
|
609
|
+
ut,
|
|
610
|
+
/* @__PURE__ */ _(r, {
|
|
611
|
+
isOpen: K != null,
|
|
612
|
+
entity: K?.entity ?? E.id,
|
|
613
|
+
title: K?.label ?? T("picker.title"),
|
|
614
|
+
scope: K?.scope,
|
|
615
615
|
onClose: () => {
|
|
616
|
-
|
|
616
|
+
q(null);
|
|
617
617
|
},
|
|
618
618
|
onSelectId: (e) => {
|
|
619
|
-
if (
|
|
620
|
-
if (
|
|
621
|
-
let t =
|
|
622
|
-
|
|
619
|
+
if (K == null) return;
|
|
620
|
+
if (K.mode === "list") {
|
|
621
|
+
let t = K.currentIds ?? [], n = t.includes(e) ? t : [...t, e], r = S(D.where, K.whereKey, n, K.path);
|
|
622
|
+
G(!0), O({
|
|
623
623
|
...D,
|
|
624
624
|
where: r
|
|
625
625
|
});
|
|
626
626
|
return;
|
|
627
627
|
}
|
|
628
|
-
let t = S(D.where,
|
|
629
|
-
|
|
628
|
+
let t = S(D.where, K.whereKey, e, K.path);
|
|
629
|
+
G(!0), O({
|
|
630
630
|
...D,
|
|
631
631
|
where: t
|
|
632
632
|
});
|
|
633
633
|
}
|
|
634
634
|
})
|
|
635
635
|
]
|
|
636
|
-
}),
|
|
636
|
+
}), pt = k.length > 0 || M || j ? /* @__PURE__ */ _(g, { children: /* @__PURE__ */ _(pe, {
|
|
637
637
|
mode: "status",
|
|
638
638
|
loadedCount: k.length,
|
|
639
639
|
totalCount: I,
|
|
640
|
-
hasNextPage:
|
|
641
|
-
isLoading:
|
|
642
|
-
pageInfoState:
|
|
640
|
+
hasNextPage: j,
|
|
641
|
+
isLoading: M,
|
|
642
|
+
pageInfoState: $ ? "inconsistent" : M ? "loading" : j ? "ready" : "complete",
|
|
643
643
|
labels: {
|
|
644
|
-
loaded:
|
|
644
|
+
loaded: tt,
|
|
645
645
|
loading: T("list.loadMore.loading"),
|
|
646
646
|
end: T("list.loadMore.end")
|
|
647
647
|
}
|
|
648
648
|
}) }) : null;
|
|
649
|
-
return Ie === "embedded" ? /* @__PURE__ */
|
|
649
|
+
return Ie === "embedded" ? /* @__PURE__ */ _(i, {
|
|
650
650
|
config: E,
|
|
651
651
|
state: D,
|
|
652
652
|
pushState: O,
|
|
653
|
-
children: /* @__PURE__ */
|
|
654
|
-
className:
|
|
653
|
+
children: /* @__PURE__ */ v("div", {
|
|
654
|
+
className: d,
|
|
655
655
|
children: [
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
className:
|
|
658
|
-
children:
|
|
656
|
+
/* @__PURE__ */ _("div", {
|
|
657
|
+
className: ee,
|
|
658
|
+
children: it
|
|
659
659
|
}),
|
|
660
|
-
|
|
660
|
+
dt,
|
|
661
661
|
Ne,
|
|
662
|
-
|
|
663
|
-
|
|
662
|
+
ft,
|
|
663
|
+
pt
|
|
664
664
|
]
|
|
665
665
|
})
|
|
666
|
-
}) : /* @__PURE__ */
|
|
666
|
+
}) : /* @__PURE__ */ _(i, {
|
|
667
667
|
config: E,
|
|
668
668
|
state: D,
|
|
669
669
|
pushState: O,
|
|
670
|
-
children: /* @__PURE__ */
|
|
671
|
-
headerNode: /* @__PURE__ */
|
|
672
|
-
title:
|
|
673
|
-
subtitle:
|
|
670
|
+
children: /* @__PURE__ */ _(ve, {
|
|
671
|
+
headerNode: /* @__PURE__ */ _(me, {
|
|
672
|
+
title: it,
|
|
673
|
+
subtitle: at,
|
|
674
674
|
actions: Fe
|
|
675
675
|
}),
|
|
676
|
-
toolbarNode:
|
|
676
|
+
toolbarNode: dt,
|
|
677
677
|
statusNode: Ne,
|
|
678
|
-
tableNode:
|
|
679
|
-
tableFooterNode:
|
|
678
|
+
tableNode: ft,
|
|
679
|
+
tableFooterNode: pt,
|
|
680
680
|
presentation: "flat",
|
|
681
681
|
bodyScrollMode: c
|
|
682
682
|
})
|