@plumile/backoffice-react 0.1.107 → 0.1.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/auth/TotpQrCode.js +1 -1
- package/lib/esm/auth/TotpQrCode.js.map +1 -1
- package/lib/esm/auth/login/EmailCapturePanel.js +27 -23
- package/lib/esm/auth/login/EmailCapturePanel.js.map +1 -1
- package/lib/esm/auth/login/MfaChallengeForm.js +38 -36
- package/lib/esm/auth/login/MfaChallengeForm.js.map +1 -1
- package/lib/esm/auth/login/PasskeyLoginForm.js +40 -37
- package/lib/esm/auth/login/PasskeyLoginForm.js.map +1 -1
- package/lib/esm/auth/pages/AcceptInvitationScreen.js +63 -62
- package/lib/esm/auth/pages/AcceptInvitationScreen.js.map +1 -1
- package/lib/esm/auth/pages/PasswordResetCompleteScreen.js +56 -55
- package/lib/esm/auth/pages/PasswordResetCompleteScreen.js.map +1 -1
- package/lib/esm/auth/pages/PasswordResetRequestScreen.js +45 -45
- package/lib/esm/auth/pages/PasswordResetRequestScreen.js.map +1 -1
- package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js +1 -0
- package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js.map +1 -1
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +44 -39
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeCopyButton.js +15 -0
- package/lib/esm/components/backoffice/detail/BackofficeCopyButton.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailActionBar.js +11 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailActionBar.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailBlock.js +7 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailBlock.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailHeader.js +15 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailHeader.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailPage.js +19 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailPage.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js +47 -40
- package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js +83 -90
- package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailTable.js +8 -0
- package/lib/esm/components/backoffice/detail/BackofficeDetailTable.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeEmptyValue.js +7 -0
- package/lib/esm/components/backoffice/detail/BackofficeEmptyValue.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeStatusGroup.js +8 -0
- package/lib/esm/components/backoffice/detail/BackofficeStatusGroup.js.map +1 -0
- package/lib/esm/components/backoffice/detail/BackofficeTechnicalFacts.js +2 -0
- package/lib/esm/components/backoffice/filters/EntityFilterValue.js +16 -8
- package/lib/esm/components/backoffice/filters/EntityFilterValue.js.map +1 -1
- package/lib/esm/components/backoffice/filters/EntityIdFilterField.js +85 -53
- package/lib/esm/components/backoffice/filters/EntityIdFilterField.js.map +1 -1
- package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js +2 -2
- package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js +53 -48
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.js +2 -2
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.js +15 -11
- package/lib/esm/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js +50 -23
- package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js.map +1 -1
- package/lib/esm/components/backoffice/layout/buildSidebarSections.js +69 -69
- package/lib/esm/components/backoffice/layout/sidebarUtils.js +16 -16
- package/lib/esm/components/backoffice/layout/sidebarUtils.js.map +1 -1
- package/lib/esm/components/backoffice/links/BackofficeInlineLink.js +29 -0
- package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -0
- package/lib/esm/components/backoffice/links/BackofficeLink.js +21 -0
- package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -0
- package/lib/esm/components/backoffice/links/BackofficeLinkContent.js +26 -0
- package/lib/esm/components/backoffice/links/BackofficeLinkContent.js.map +1 -0
- package/lib/esm/components/backoffice/links/BackofficeLinkLabel.js +19 -0
- package/lib/esm/components/backoffice/links/BackofficeLinkLabel.js.map +1 -0
- package/lib/esm/components/backoffice/links/backofficeLink.css.js +7 -0
- package/lib/esm/components/backoffice/links/backofficeLink.css.js.map +1 -0
- package/lib/esm/components/backoffice/links/resolveBackofficeLink.js +81 -0
- package/lib/esm/components/backoffice/links/resolveBackofficeLink.js.map +1 -0
- package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js +50 -0
- package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js.map +1 -0
- package/lib/esm/components/backoffice/links/types.js +0 -0
- package/lib/esm/components/backoffice/links/useBackofficeLink.js +21 -0
- package/lib/esm/components/backoffice/links/useBackofficeLink.js.map +1 -0
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +1 -0
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
- package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js +2 -2
- package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js.map +1 -1
- package/lib/esm/components/backoffice/pickers/shared/EntityPickerList.js +27 -21
- package/lib/esm/components/backoffice/pickers/shared/EntityPickerList.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeEntityIdRef.js +27 -27
- package/lib/esm/components/backoffice/refs/BackofficeEntityIdRef.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeEntityLink.js +24 -21
- package/lib/esm/components/backoffice/refs/BackofficeEntityLink.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js +45 -44
- package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +277 -227
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
- package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js +25 -30
- package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js.map +1 -1
- package/lib/esm/i18n/locales/en/backofficeReact.js +8 -0
- package/lib/esm/i18n/locales/en/backofficeReact.js.map +1 -1
- package/lib/esm/i18n/locales/fr/backofficeReact.js +8 -0
- package/lib/esm/i18n/locales/fr/backofficeReact.js.map +1 -1
- package/lib/esm/index.js +88 -73
- package/lib/esm/pages/BackofficeDashboardPage.js +1 -5
- package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +231 -222
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js +170 -54
- package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListPage.js +196 -207
- package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
- package/lib/esm/pages/BackofficeHubPage.js +21 -21
- package/lib/esm/pages/BackofficeLayoutPage.js +7 -7
- package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
- package/lib/esm/router/createBackofficeRoutes.js +132 -126
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/esm/style.css +1 -1
- package/lib/types/auth/login/EmailCapturePanel.d.ts.map +1 -1
- package/lib/types/auth/login/MfaChallengeForm.d.ts.map +1 -1
- package/lib/types/auth/login/PasskeyLoginForm.d.ts.map +1 -1
- package/lib/types/auth/pages/AcceptInvitationScreen.d.ts.map +1 -1
- package/lib/types/auth/pages/PasswordResetCompleteScreen.d.ts.map +1 -1
- package/lib/types/auth/pages/PasswordResetRequestScreen.d.ts.map +1 -1
- package/lib/types/components/backoffice/actions/BackofficeEntityActionFormDialog.d.ts.map +1 -1
- package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts +0 -1
- package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeCopyButton.d.ts +8 -0
- package/lib/types/components/backoffice/detail/BackofficeCopyButton.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailActionBar.d.ts +9 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailActionBar.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailBlock.d.ts +7 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailBlock.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailHeader.d.ts +12 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailHeader.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailPage.d.ts +16 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailPage.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailPage.stories.d.ts +11 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailPage.stories.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailRelationLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeDetailRelationListBlock.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeDetailTable.d.ts +6 -0
- package/lib/types/components/backoffice/detail/BackofficeDetailTable.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeEmptyValue.d.ts +7 -0
- package/lib/types/components/backoffice/detail/BackofficeEmptyValue.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeStatusGroup.d.ts +8 -0
- package/lib/types/components/backoffice/detail/BackofficeStatusGroup.d.ts.map +1 -0
- package/lib/types/components/backoffice/detail/BackofficeTechnicalFacts.d.ts +2 -0
- package/lib/types/components/backoffice/detail/BackofficeTechnicalFacts.d.ts.map +1 -0
- package/lib/types/components/backoffice/filters/EntityFilterValue.d.ts +5 -1
- package/lib/types/components/backoffice/filters/EntityFilterValue.d.ts.map +1 -1
- package/lib/types/components/backoffice/filters/EntityIdFilterField.d.ts +1 -0
- package/lib/types/components/backoffice/filters/EntityIdFilterField.d.ts.map +1 -1
- package/lib/types/components/backoffice/filters/entityIdFilterField.css.d.ts +5 -2
- package/lib/types/components/backoffice/filters/entityIdFilterField.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.d.ts +1 -0
- package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts +10 -8
- package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/types.d.ts +10 -5
- package/lib/types/components/backoffice/layout/breadcrumb/types.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/sidebarUtils.d.ts +6 -2
- package/lib/types/components/backoffice/layout/sidebarUtils.d.ts.map +1 -1
- package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts +18 -0
- package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/BackofficeLink.d.ts +13 -0
- package/lib/types/components/backoffice/links/BackofficeLink.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/BackofficeLinkContent.d.ts +10 -0
- package/lib/types/components/backoffice/links/BackofficeLinkContent.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/BackofficeLinkLabel.d.ts +12 -0
- package/lib/types/components/backoffice/links/BackofficeLinkLabel.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/backofficeLink.css.d.ts +4 -0
- package/lib/types/components/backoffice/links/backofficeLink.css.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts +15 -0
- package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/resolveBackofficeTargetIcon.d.ts +8 -0
- package/lib/types/components/backoffice/links/resolveBackofficeTargetIcon.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/types.d.ts +45 -0
- package/lib/types/components/backoffice/links/types.d.ts.map +1 -0
- package/lib/types/components/backoffice/links/useBackofficeLink.d.ts +7 -0
- package/lib/types/components/backoffice/links/useBackofficeLink.d.ts.map +1 -0
- package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.d.ts.map +1 -1
- package/lib/types/components/backoffice/pickers/entityIdPickerDialog.css.d.ts +2 -0
- package/lib/types/components/backoffice/pickers/entityIdPickerDialog.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/pickers/shared/EntityPickerList.d.ts.map +1 -1
- package/lib/types/components/backoffice/refs/BackofficeEntityLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/refs/BackofficeRelatedCountLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
- package/lib/types/components/backoffice/shared/BackofficeFilterableCell.d.ts +6 -3
- package/lib/types/components/backoffice/shared/BackofficeFilterableCell.d.ts.map +1 -1
- package/lib/types/i18n/resources.d.ts +16 -0
- package/lib/types/i18n/resources.d.ts.map +1 -1
- package/lib/types/index.d.ts +24 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts +49 -22
- package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListPage.d.ts.map +1 -1
- package/lib/types/provider/types.d.ts +26 -22
- package/lib/types/provider/types.d.ts.map +1 -1
- package/lib/types/router/createBackofficeRoutes.d.ts +36 -1
- package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
import { useBackofficeReactTranslation as e } from "../i18n/useBackofficeReactTranslation.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { buildActionsColumn as f, computeActionsColumnWidthPx as p, computeRowFlagsColumnWidthPx as m, isConnectionListConfig as h, isFormMutationAction as g, isRecordListConfig as _, isRouteAction as ee, resolveActionVariant as te, resolveLabel as v, resolveTrackBySize as y } from "./BackofficeEntityListPage.helpers.js";
|
|
2
|
+
import { LazyBackofficeEntityActionFormDialog as t } from "../components/backoffice/actions/LazyBackofficeEntityActionFormDialog.js";
|
|
3
|
+
import { buildDataTableColumns as n } from "../components/backoffice/columns/buildDataTableColumns.js";
|
|
4
|
+
import { useBackofficeLoadMore as r } from "../hooks/useBackofficeLoadMore.js";
|
|
5
|
+
import { useBackofficeListRefetch as i } from "../hooks/useBackofficeListRefetch.js";
|
|
6
|
+
import { BackofficeEntityListScaffold as a } from "../components/backoffice/scaffolds/BackofficeEntityListScaffold.js";
|
|
7
|
+
import { BackofficeRightPageLayout as o } from "../components/backoffice/layout/breadcrumb/BackofficeRightPageLayout.js";
|
|
8
|
+
import { buildEntityListBreadcrumb as s } from "../components/backoffice/layout/breadcrumb/buildBreadcrumbs.js";
|
|
9
|
+
import { rowFlagsColumnCell as c } from "../components/backoffice/list/RowFlagsCell.css.js";
|
|
10
|
+
import { RowFlagsCell as l } from "../components/backoffice/list/RowFlagsCell.js";
|
|
11
|
+
import { useBackofficeListUrlState as u } from "../hooks/useBackofficeListUrlState.js";
|
|
12
|
+
import { buildActionsColumn as d, computeActionsColumnWidthPx as f, computeRowFlagsColumnWidthPx as p, isConnectionListConfig as m, isFormMutationAction as h, isRecordListConfig as g, isRouteAction as ee, resolveActionVariant as te, resolveLabel as _, resolveTrackBySize as v } from "./BackofficeEntityListPage.helpers.js";
|
|
14
13
|
import { actionTrigger as ne, actionsColumnCell as re, headerActions as ie } from "./backofficeEntityListPage.css.js";
|
|
15
|
-
import { useCallback as
|
|
16
|
-
import { Button as
|
|
17
|
-
import { Fragment as
|
|
14
|
+
import { useCallback as y, useEffect as b, useMemo as x, useRef as S, useState as C } from "react";
|
|
15
|
+
import { Button as w, EyeSvg as ae, InlineBanner as oe, LinkButton as T, TableCell as se } from "@plumile/ui";
|
|
16
|
+
import { Fragment as E, jsx as D, jsxs as ce } from "react/jsx-runtime";
|
|
18
17
|
import { useTranslation as O } from "react-i18next";
|
|
19
18
|
import { fetchQuery as k } from "relay-runtime";
|
|
20
|
-
import { useFragment as
|
|
21
|
-
import { BACKOFFICE_LIST_DEFAULTS as
|
|
19
|
+
import { useFragment as le, usePaginationFragment as A, usePreloadedQuery as ue, useRelayEnvironment as j } from "react-relay";
|
|
20
|
+
import { BACKOFFICE_LIST_DEFAULTS as de, BACKOFFICE_LIST_REFETCH_POLICY as M } from "@plumile/backoffice-core/constants.js";
|
|
22
21
|
import { stableListVariablesKey as N } from "@plumile/backoffice-core/state/stableKey.js";
|
|
23
22
|
//#region src/pages/BackofficeEntityListPage.tsx
|
|
24
|
-
var
|
|
23
|
+
var fe = "store-or-network", pe = (e, t, n, r) => {
|
|
25
24
|
let i = t != null && t.length > 0, a = e;
|
|
26
25
|
if (i) {
|
|
27
26
|
let n = [{
|
|
28
27
|
id: "__rowFlags",
|
|
29
28
|
header: "",
|
|
30
|
-
className:
|
|
29
|
+
className: c,
|
|
31
30
|
mobileRole: "badge",
|
|
32
|
-
cell: (e) => /* @__PURE__ */ D(
|
|
31
|
+
cell: (e) => /* @__PURE__ */ D(l, {
|
|
33
32
|
row: e,
|
|
34
33
|
flags: t,
|
|
35
34
|
tApp: r
|
|
@@ -42,38 +41,34 @@ var pe = "store-or-network", me = (e, t, n, r) => {
|
|
|
42
41
|
}
|
|
43
42
|
let o = 0;
|
|
44
43
|
i && (o = t.length);
|
|
45
|
-
let s =
|
|
44
|
+
let s = p(o), u = f(n), d = 0;
|
|
46
45
|
i && (d = 1);
|
|
47
|
-
let
|
|
48
|
-
return g = i ? `${s}px ${h} ${
|
|
46
|
+
let m = a.length - d - 1, h = a.slice(d, d + Math.max(0, m)).map((e) => v(e, "1fr")).join(" "), g = "";
|
|
47
|
+
return g = i ? `${s}px ${h} ${u}px` : `${h} ${u}px`, {
|
|
49
48
|
columns: a,
|
|
50
49
|
gridTemplateColumns: g
|
|
51
50
|
};
|
|
52
|
-
}, P = ({ config:
|
|
53
|
-
let { t:
|
|
51
|
+
}, P = ({ config: i, prepared: o }) => {
|
|
52
|
+
let { t: s } = O(), { t: c } = e(), [l, f] = C(null), p = j(), m = i.list, g = i.listDefaults ?? m.defaultState ?? {
|
|
54
53
|
where: null,
|
|
55
54
|
sort: null
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, [
|
|
60
|
-
let { columns:
|
|
61
|
-
let e =
|
|
62
|
-
tApp:
|
|
63
|
-
t:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
}), t = f({
|
|
69
|
-
ariaLabel: l("actions.view"),
|
|
70
|
-
fallback: l("common.notAvailable"),
|
|
55
|
+
}, v = ue(m.query, o.query), A = le(m.fragment, v), M = x(() => m.getRows(A).map((e) => m.toRow(e)), [A, m]), P = x(() => m.getNextCursor?.(v) ?? null, [m, v]), [F, I] = C(M), [L, R] = C(P), [z, B] = C(!1), [V, H] = C(!1), [me, U] = C(!1);
|
|
56
|
+
b(() => {
|
|
57
|
+
I(M), R(P);
|
|
58
|
+
}, [P, M]);
|
|
59
|
+
let { columns: W, gridTemplateColumns: he } = x(() => {
|
|
60
|
+
let e = n(m.columns, {
|
|
61
|
+
tApp: s,
|
|
62
|
+
t: c
|
|
63
|
+
}), t = d({
|
|
64
|
+
ariaLabel: c("actions.view"),
|
|
65
|
+
fallback: c("common.notAvailable"),
|
|
71
66
|
className: re,
|
|
72
|
-
resolveDetailHref: (e) =>
|
|
67
|
+
resolveDetailHref: (e) => i.routes.detail(e),
|
|
73
68
|
renderAction: ({ href: e, ariaLabel: t }) => /* @__PURE__ */ D(se.Actions, { children: /* @__PURE__ */ D("span", {
|
|
74
69
|
className: ne,
|
|
75
70
|
title: t,
|
|
76
|
-
children: /* @__PURE__ */ D(
|
|
71
|
+
children: /* @__PURE__ */ D(T, {
|
|
77
72
|
to: e,
|
|
78
73
|
variant: "icon",
|
|
79
74
|
size: "small",
|
|
@@ -85,178 +80,173 @@ var pe = "store-or-network", me = (e, t, n, r) => {
|
|
|
85
80
|
})
|
|
86
81
|
}) })
|
|
87
82
|
});
|
|
88
|
-
return
|
|
83
|
+
return pe([...e, t], m.rowFlags, 1, s);
|
|
89
84
|
}, [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
X.current = t, e.mode === "append" ? V(!0) : U(!0), W(!1);
|
|
85
|
+
i.routes,
|
|
86
|
+
m.columns,
|
|
87
|
+
m.rowFlags,
|
|
88
|
+
c,
|
|
89
|
+
s
|
|
90
|
+
]), G = y((e) => m.getRowId(e), [m]), { state: K, pushState: ge } = u(i), q = K.sort ?? g.sort, { pageSize: J } = de, _e = y((e) => m.buildQueryVariables(e), [m]), Y = S(0), ve = S(N({
|
|
91
|
+
where: g.where,
|
|
92
|
+
sort: g.sort,
|
|
93
|
+
count: J
|
|
94
|
+
})), X = y(async (e) => {
|
|
95
|
+
let t = Y.current + 1;
|
|
96
|
+
Y.current = t, e.mode === "append" ? B(!0) : H(!0), U(!1);
|
|
103
97
|
try {
|
|
104
|
-
let n =
|
|
98
|
+
let n = _e({
|
|
105
99
|
where: e.where,
|
|
106
100
|
sort: e.sort,
|
|
107
101
|
count: e.count,
|
|
108
102
|
cursor: e.cursor
|
|
109
|
-
}), r = await k(
|
|
110
|
-
if (r == null ||
|
|
111
|
-
let i =
|
|
112
|
-
|
|
103
|
+
}), r = await k(p, m.query, n, { fetchPolicy: fe }).toPromise();
|
|
104
|
+
if (r == null || Y.current !== t) return;
|
|
105
|
+
let i = m.getRows(r).map((e) => m.toRow(e));
|
|
106
|
+
I((t) => e.mode === "append" ? [...t, ...i] : i), R(m.getNextCursor?.(r) ?? null);
|
|
113
107
|
} catch {
|
|
114
|
-
|
|
108
|
+
Y.current === t && U(!0);
|
|
115
109
|
} finally {
|
|
116
|
-
e.mode === "append" ?
|
|
110
|
+
e.mode === "append" ? B(!1) : H(!1);
|
|
117
111
|
}
|
|
118
112
|
}, [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
113
|
+
_e,
|
|
114
|
+
p,
|
|
115
|
+
m
|
|
122
116
|
]);
|
|
123
|
-
|
|
117
|
+
b(() => {
|
|
124
118
|
let e = N({
|
|
125
|
-
where:
|
|
126
|
-
sort:
|
|
127
|
-
count:
|
|
119
|
+
where: K.where,
|
|
120
|
+
sort: q,
|
|
121
|
+
count: J
|
|
128
122
|
});
|
|
129
|
-
|
|
130
|
-
where:
|
|
131
|
-
sort:
|
|
132
|
-
count:
|
|
123
|
+
ve.current !== e && (ve.current = e, X({
|
|
124
|
+
where: K.where,
|
|
125
|
+
sort: q,
|
|
126
|
+
count: J,
|
|
133
127
|
cursor: null,
|
|
134
128
|
mode: "reset"
|
|
135
129
|
}).catch(() => {
|
|
136
|
-
|
|
130
|
+
U(!0);
|
|
137
131
|
}));
|
|
138
132
|
}, [
|
|
139
|
-
Y,
|
|
140
133
|
J,
|
|
141
|
-
|
|
142
|
-
|
|
134
|
+
q,
|
|
135
|
+
X,
|
|
136
|
+
K.where
|
|
143
137
|
]);
|
|
144
|
-
let
|
|
145
|
-
|
|
146
|
-
where:
|
|
147
|
-
sort:
|
|
148
|
-
count:
|
|
138
|
+
let Z = y(() => {
|
|
139
|
+
V || X({
|
|
140
|
+
where: K.where,
|
|
141
|
+
sort: q,
|
|
142
|
+
count: J,
|
|
149
143
|
cursor: null,
|
|
150
144
|
mode: "reset"
|
|
151
145
|
}).catch(() => {
|
|
152
|
-
|
|
146
|
+
U(!0);
|
|
153
147
|
});
|
|
154
148
|
}, [
|
|
155
|
-
|
|
156
|
-
Y,
|
|
149
|
+
V,
|
|
157
150
|
J,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
151
|
+
q,
|
|
152
|
+
X,
|
|
153
|
+
K.where
|
|
154
|
+
]), ye = r({
|
|
155
|
+
hasNext: L != null,
|
|
156
|
+
isLoadingNext: z,
|
|
163
157
|
loadNext: (e) => {
|
|
164
|
-
|
|
165
|
-
where:
|
|
166
|
-
sort:
|
|
158
|
+
L != null && X({
|
|
159
|
+
where: K.where,
|
|
160
|
+
sort: q,
|
|
167
161
|
count: e,
|
|
168
|
-
cursor:
|
|
162
|
+
cursor: L,
|
|
169
163
|
mode: "append"
|
|
170
164
|
}).catch(() => {
|
|
171
|
-
|
|
165
|
+
U(!0);
|
|
172
166
|
});
|
|
173
167
|
},
|
|
174
|
-
count:
|
|
175
|
-
}),
|
|
176
|
-
if (
|
|
168
|
+
count: J
|
|
169
|
+
}), Q = x(() => i.listActions ?? [], [i.listActions]), be = x(() => Q.filter((e) => e.isVisible == null ? !0 : e.isVisible(null)), [Q]), xe = x(() => {
|
|
170
|
+
if (be.length !== 0) return /* @__PURE__ */ D("div", {
|
|
177
171
|
className: ie,
|
|
178
|
-
children:
|
|
179
|
-
let { variant: n } = e, r =
|
|
180
|
-
e.ariaLabel != null && (i =
|
|
181
|
-
let a = te(n, t), o = e.size ?? "small",
|
|
182
|
-
return ee(e) ? /* @__PURE__ */ D(
|
|
172
|
+
children: be.map((e, t) => {
|
|
173
|
+
let { variant: n } = e, r = _(e.label, s), i = r;
|
|
174
|
+
e.ariaLabel != null && (i = _(e.ariaLabel, s));
|
|
175
|
+
let a = te(n, t), o = e.size ?? "small", c = e.isDisabled?.(null) === !0;
|
|
176
|
+
return ee(e) ? /* @__PURE__ */ D(T, {
|
|
183
177
|
to: e.to(null),
|
|
184
178
|
variant: a,
|
|
185
179
|
size: o,
|
|
186
|
-
isDisabled:
|
|
180
|
+
isDisabled: c,
|
|
187
181
|
"aria-label": i,
|
|
188
182
|
children: r
|
|
189
|
-
}, e.id) :
|
|
183
|
+
}, e.id) : h(e) ? /* @__PURE__ */ D(w, {
|
|
190
184
|
type: "button",
|
|
191
185
|
variant: a,
|
|
192
186
|
size: o,
|
|
193
|
-
disabled:
|
|
187
|
+
disabled: c,
|
|
194
188
|
onClick: () => {
|
|
195
|
-
|
|
189
|
+
f(e.id);
|
|
196
190
|
},
|
|
197
191
|
"aria-label": i,
|
|
198
192
|
children: r
|
|
199
193
|
}, e.id) : null;
|
|
200
194
|
})
|
|
201
195
|
});
|
|
202
|
-
}, [
|
|
203
|
-
return
|
|
196
|
+
}, [s, be]), $ = Q.find((e) => e.id === l), Se = null;
|
|
197
|
+
return me && (Se = /* @__PURE__ */ D(oe, {
|
|
204
198
|
tone: "danger",
|
|
205
|
-
title:
|
|
206
|
-
actions: /* @__PURE__ */ D(
|
|
199
|
+
title: c("list.errors.title"),
|
|
200
|
+
actions: /* @__PURE__ */ D(w, {
|
|
207
201
|
type: "button",
|
|
208
202
|
variant: "secondary",
|
|
209
203
|
size: "small",
|
|
210
|
-
onClick:
|
|
211
|
-
children:
|
|
204
|
+
onClick: Z,
|
|
205
|
+
children: c("list.actions.retry")
|
|
212
206
|
}),
|
|
213
207
|
onDismiss: () => {
|
|
214
|
-
|
|
208
|
+
U(!1);
|
|
215
209
|
},
|
|
216
|
-
children:
|
|
217
|
-
})), /* @__PURE__ */
|
|
218
|
-
config:
|
|
219
|
-
state:
|
|
220
|
-
pushState:
|
|
221
|
-
headerActions:
|
|
222
|
-
rows:
|
|
223
|
-
columns:
|
|
224
|
-
gridTemplateColumns:
|
|
225
|
-
getRowId:
|
|
226
|
-
hasNextPage:
|
|
227
|
-
isLoadingMore:
|
|
228
|
-
isRefreshing:
|
|
229
|
-
onLoadMore:
|
|
230
|
-
onRefresh:
|
|
210
|
+
children: c("list.errors.fetchFailed")
|
|
211
|
+
})), /* @__PURE__ */ ce(E, { children: [/* @__PURE__ */ D(a, {
|
|
212
|
+
config: i,
|
|
213
|
+
state: K,
|
|
214
|
+
pushState: ge,
|
|
215
|
+
headerActions: xe,
|
|
216
|
+
rows: F,
|
|
217
|
+
columns: W,
|
|
218
|
+
gridTemplateColumns: he,
|
|
219
|
+
getRowId: G,
|
|
220
|
+
hasNextPage: L != null,
|
|
221
|
+
isLoadingMore: z,
|
|
222
|
+
isRefreshing: V,
|
|
223
|
+
onLoadMore: ye,
|
|
224
|
+
onRefresh: Z,
|
|
231
225
|
totalCount: null,
|
|
232
|
-
statusBanner:
|
|
233
|
-
}),
|
|
226
|
+
statusBanner: Se
|
|
227
|
+
}), $ != null && h($) && /* @__PURE__ */ D(t, {
|
|
234
228
|
isOpen: !0,
|
|
235
|
-
action:
|
|
229
|
+
action: $,
|
|
236
230
|
node: null,
|
|
237
231
|
onClose: () => {
|
|
238
|
-
|
|
232
|
+
f(null);
|
|
239
233
|
},
|
|
240
|
-
onSuccess:
|
|
234
|
+
onSuccess: Z
|
|
241
235
|
})] });
|
|
242
|
-
}, F = ({ config:
|
|
243
|
-
let
|
|
244
|
-
let e =
|
|
245
|
-
tApp:
|
|
246
|
-
t:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
}), t = f({
|
|
252
|
-
ariaLabel: h("actions.view"),
|
|
253
|
-
fallback: h("common.notAvailable"),
|
|
236
|
+
}, F = ({ config: s, prepared: c, breadcrumb: l }) => {
|
|
237
|
+
let f = s.list, { t: p } = O(), { t: m } = e(), [g, v] = C(null), b = ue(f.query, c.query), { data: S, loadNext: oe, hasNext: E, isLoadingNext: k, refetch: le } = A(f.fragment, b), j = f.getConnection(S), N = x(() => j.edges.map((e) => f.toRow(e.node)), [j.edges, f]), { columns: fe, gridTemplateColumns: P } = x(() => {
|
|
238
|
+
let e = n(f.columns, {
|
|
239
|
+
tApp: p,
|
|
240
|
+
t: m
|
|
241
|
+
}), t = d({
|
|
242
|
+
ariaLabel: m("actions.view"),
|
|
243
|
+
fallback: m("common.notAvailable"),
|
|
254
244
|
className: re,
|
|
255
|
-
resolveDetailHref: (e) =>
|
|
245
|
+
resolveDetailHref: (e) => s.routes.detail(e),
|
|
256
246
|
renderAction: ({ href: e, ariaLabel: t }) => /* @__PURE__ */ D(se.Actions, { children: /* @__PURE__ */ D("span", {
|
|
257
247
|
className: ne,
|
|
258
248
|
title: t,
|
|
259
|
-
children: /* @__PURE__ */ D(
|
|
249
|
+
children: /* @__PURE__ */ D(T, {
|
|
260
250
|
to: e,
|
|
261
251
|
variant: "icon",
|
|
262
252
|
size: "small",
|
|
@@ -268,107 +258,106 @@ var pe = "store-or-network", me = (e, t, n, r) => {
|
|
|
268
258
|
})
|
|
269
259
|
}) })
|
|
270
260
|
});
|
|
271
|
-
return
|
|
261
|
+
return pe([...e, t], f.rowFlags, 1, p);
|
|
272
262
|
}, [
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
]), I = b((e) => p.getRowId(e), [p]), { state: L, pushState: R } = d(c), z = c.listDefaults ?? p.defaultState ?? {
|
|
263
|
+
s.routes,
|
|
264
|
+
f.columns,
|
|
265
|
+
f.rowFlags,
|
|
266
|
+
m,
|
|
267
|
+
p
|
|
268
|
+
]), F = y((e) => f.getRowId(e), [f]), { state: I, pushState: L } = u(s), R = s.listDefaults ?? f.defaultState ?? {
|
|
280
269
|
where: null,
|
|
281
270
|
sort: null
|
|
282
|
-
},
|
|
283
|
-
refetch:
|
|
284
|
-
variables:
|
|
285
|
-
where:
|
|
286
|
-
sort:
|
|
287
|
-
count:
|
|
271
|
+
}, z = I.sort ?? R.sort, { pageSize: B } = de, { isRefreshing: V, onRefresh: H } = i({
|
|
272
|
+
refetch: le,
|
|
273
|
+
variables: x(() => ({
|
|
274
|
+
where: I.where,
|
|
275
|
+
sort: z,
|
|
276
|
+
count: B,
|
|
288
277
|
cursor: null
|
|
289
278
|
}), [
|
|
290
|
-
V,
|
|
291
279
|
B,
|
|
292
|
-
|
|
280
|
+
z,
|
|
281
|
+
I.where
|
|
293
282
|
]),
|
|
294
283
|
defaults: {
|
|
295
|
-
where:
|
|
296
|
-
sort:
|
|
297
|
-
count:
|
|
284
|
+
where: R.where,
|
|
285
|
+
sort: R.sort,
|
|
286
|
+
count: B,
|
|
298
287
|
cursor: null
|
|
299
288
|
},
|
|
300
289
|
fetchPolicy: M,
|
|
301
|
-
buildQueryVariables:
|
|
302
|
-
}),
|
|
303
|
-
hasNext:
|
|
304
|
-
isLoadingNext:
|
|
305
|
-
loadNext:
|
|
306
|
-
count:
|
|
307
|
-
}),
|
|
308
|
-
if (
|
|
290
|
+
buildQueryVariables: f.buildQueryVariables
|
|
291
|
+
}), me = r({
|
|
292
|
+
hasNext: E,
|
|
293
|
+
isLoadingNext: k,
|
|
294
|
+
loadNext: oe,
|
|
295
|
+
count: B
|
|
296
|
+
}), U = x(() => s.listActions ?? [], [s.listActions]), W = x(() => U.filter((e) => e.isVisible == null ? !0 : e.isVisible(null)), [U]), he = x(() => {
|
|
297
|
+
if (W.length !== 0) return /* @__PURE__ */ D("div", {
|
|
309
298
|
className: ie,
|
|
310
|
-
children:
|
|
311
|
-
let { variant: n } = e, r =
|
|
312
|
-
e.ariaLabel != null && (i =
|
|
299
|
+
children: W.map((e, t) => {
|
|
300
|
+
let { variant: n } = e, r = _(e.label, p), i = r;
|
|
301
|
+
e.ariaLabel != null && (i = _(e.ariaLabel, p));
|
|
313
302
|
let a = te(n, t), o = e.size ?? "small", s = e.isDisabled?.(null) === !0;
|
|
314
|
-
return ee(e) ? /* @__PURE__ */ D(
|
|
303
|
+
return ee(e) ? /* @__PURE__ */ D(T, {
|
|
315
304
|
to: e.to(null),
|
|
316
305
|
variant: a,
|
|
317
306
|
size: o,
|
|
318
307
|
isDisabled: s,
|
|
319
308
|
"aria-label": i,
|
|
320
309
|
children: r
|
|
321
|
-
}, e.id) :
|
|
310
|
+
}, e.id) : h(e) ? /* @__PURE__ */ D(w, {
|
|
322
311
|
type: "button",
|
|
323
312
|
variant: a,
|
|
324
313
|
size: o,
|
|
325
314
|
disabled: s,
|
|
326
315
|
onClick: () => {
|
|
327
|
-
|
|
316
|
+
v(e.id);
|
|
328
317
|
},
|
|
329
318
|
"aria-label": i,
|
|
330
319
|
children: r
|
|
331
320
|
}, e.id) : null;
|
|
332
321
|
})
|
|
333
322
|
});
|
|
334
|
-
}, [
|
|
335
|
-
return /* @__PURE__ */
|
|
336
|
-
breadcrumb:
|
|
337
|
-
children: [/* @__PURE__ */ D(
|
|
338
|
-
config:
|
|
339
|
-
state:
|
|
340
|
-
pushState:
|
|
341
|
-
headerActions:
|
|
342
|
-
rows:
|
|
343
|
-
columns:
|
|
344
|
-
gridTemplateColumns:
|
|
345
|
-
getRowId:
|
|
346
|
-
hasNextPage:
|
|
347
|
-
isLoadingMore:
|
|
348
|
-
isRefreshing:
|
|
349
|
-
onLoadMore:
|
|
350
|
-
onRefresh:
|
|
351
|
-
totalCount:
|
|
352
|
-
}),
|
|
323
|
+
}, [p, W]), G = U.find((e) => e.id === g);
|
|
324
|
+
return /* @__PURE__ */ ce(o, {
|
|
325
|
+
breadcrumb: l,
|
|
326
|
+
children: [/* @__PURE__ */ D(a, {
|
|
327
|
+
config: s,
|
|
328
|
+
state: I,
|
|
329
|
+
pushState: L,
|
|
330
|
+
headerActions: he,
|
|
331
|
+
rows: N,
|
|
332
|
+
columns: fe,
|
|
333
|
+
gridTemplateColumns: P,
|
|
334
|
+
getRowId: F,
|
|
335
|
+
hasNextPage: E,
|
|
336
|
+
isLoadingMore: k,
|
|
337
|
+
isRefreshing: V,
|
|
338
|
+
onLoadMore: me,
|
|
339
|
+
onRefresh: H,
|
|
340
|
+
totalCount: j.totalCount ?? null
|
|
341
|
+
}), G != null && h(G) && /* @__PURE__ */ D(t, {
|
|
353
342
|
isOpen: !0,
|
|
354
|
-
action:
|
|
343
|
+
action: G,
|
|
355
344
|
node: null,
|
|
356
345
|
onClose: () => {
|
|
357
|
-
|
|
346
|
+
v(null);
|
|
358
347
|
},
|
|
359
|
-
onSuccess:
|
|
348
|
+
onSuccess: H
|
|
360
349
|
})]
|
|
361
350
|
});
|
|
362
351
|
}, I = ({ entityManifest: e, config: t, prepared: n }) => {
|
|
363
|
-
let { t: r } = O(), i =
|
|
364
|
-
return
|
|
352
|
+
let { t: r } = O(), i = s(t, r);
|
|
353
|
+
return g(t) ? /* @__PURE__ */ D(o, {
|
|
365
354
|
breadcrumb: i,
|
|
366
355
|
children: /* @__PURE__ */ D(P, {
|
|
367
356
|
entityManifest: e,
|
|
368
357
|
config: t,
|
|
369
358
|
prepared: n
|
|
370
359
|
})
|
|
371
|
-
}) :
|
|
360
|
+
}) : m(t) ? /* @__PURE__ */ D(F, {
|
|
372
361
|
entityManifest: e,
|
|
373
362
|
config: t,
|
|
374
363
|
prepared: n,
|