@plumile/backoffice-react 0.1.205 → 0.2.2
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 +12 -2
- package/lib/esm/auth/authRefreshNotice.css.js +1 -1
- package/lib/esm/auth/authStoryFixtures.js +29 -0
- package/lib/esm/auth/authStoryFixtures.js.map +1 -0
- package/lib/esm/auth/login/loginPage.css.js +1 -1
- package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js +1 -1
- package/lib/esm/components/backoffice/actions/backofficeEntityActionFormDialog.css.js +1 -1
- package/lib/esm/components/backoffice/billing/BackofficeBillingUsageChart.js +1 -1
- package/lib/esm/components/backoffice/billing/backofficeBillingUsageChart.css.js +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeEntitySummaryHeader.js +6 -6
- package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeUsageCostBreakdown.js +13 -13
- package/lib/esm/components/backoffice/detail/BackofficeUsageCostBreakdown.js.map +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailBadgeRow.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailErrorList.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailLayout.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailRelationList.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeEntitySummaryHeader.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeRelationsSummaryGrid.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeUsageCostBreakdown.css.js +1 -1
- package/lib/esm/components/backoffice/errors/BackofficeErrorBoundary.js +2 -16
- package/lib/esm/components/backoffice/errors/BackofficeErrorBoundary.js.map +1 -1
- package/lib/esm/components/backoffice/filters/EntityIdFilterField.js +1 -1
- package/lib/esm/components/backoffice/filters/backofficeFilterAction.css.js +1 -1
- package/lib/esm/components/backoffice/filters/deferredFilterSearchInput.css.js +1 -1
- package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js +1 -1
- package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js +5 -5
- package/lib/esm/components/backoffice/hub/backofficeHubTemplate.css.js +1 -1
- package/lib/esm/components/backoffice/layout/backofficeSidebarActions.css.js +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js +2 -2
- package/lib/esm/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.js +1 -1
- package/lib/esm/components/backoffice/links/BackofficeLinkContent.js +1 -1
- package/lib/esm/components/backoffice/links/backofficeLink.css.js +1 -1
- package/lib/esm/components/backoffice/list/RowFlagsCell.css.js +1 -1
- package/lib/esm/components/backoffice/overview/backofficeOverviewLayout.css.js +1 -1
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +123 -70
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
- package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js +1 -1
- package/lib/esm/components/backoffice/refs/backofficeRelatedCountLink.css.js +1 -1
- package/lib/esm/components/backoffice/routing/backofficeContentBoundary.css.js +1 -1
- package/lib/esm/components/backoffice/routing/backofficeContentError.css.js +1 -1
- package/lib/esm/components/backoffice/routing/backofficeContentFallback.css.js +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailScaffold.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +291 -329
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeTabbedDetailShell.js +6 -11
- package/lib/esm/components/backoffice/scaffolds/BackofficeTabbedDetailShell.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/backofficeEntityListScaffold.css.js +1 -1
- package/lib/esm/components/backoffice/scaffolds/backofficeTabbedDetailShell.css.js +1 -1
- package/lib/esm/components/backoffice/shared/backofficeFilterableCell.css.js +5 -5
- package/lib/esm/components/backoffice/shared/backofficeInlineFilterRow.css.js +1 -1
- package/lib/esm/components/backoffice/technical/TechnicalIdentifierValue.js +2 -26
- package/lib/esm/components/backoffice/tools/BackofficeToolsDocPanel.js +1 -1
- package/lib/esm/components/backoffice/tools/backofficeToolsDocPanel.css.js +1 -1
- package/lib/esm/components/backoffice/tools/backofficeToolsForm.css.js +1 -1
- package/lib/esm/components/backoffice/tools/backofficeToolsJsonForm.css.js +1 -1
- package/lib/esm/hooks/useInfiniteConnection.js +40 -38
- package/lib/esm/hooks/useInfiniteConnection.js.map +1 -1
- package/lib/esm/i18n/locales/en/backofficeReact.js +2 -5
- package/lib/esm/i18n/locales/en/backofficeReact.js.map +1 -1
- package/lib/esm/i18n/locales/fr/backofficeReact.js +2 -6
- package/lib/esm/i18n/locales/fr/backofficeReact.js.map +1 -1
- package/lib/esm/index.js +42 -42
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +1 -1
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +158 -158
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListDataPage.js +77 -71
- package/lib/esm/pages/BackofficeEntityListDataPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListPage.js +89 -91
- package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListRouteContext.js.map +1 -1
- package/lib/esm/pages/backofficeDashboardPage.css.js +1 -1
- package/lib/esm/pages/backofficeEntityDetailPage.css.js +1 -1
- package/lib/esm/pages/backofficeEntityListPage.css.js +1 -1
- package/lib/esm/pages/detail/BackofficeEntityDetailLayoutContext.js.map +1 -1
- package/lib/esm/pages/detail/BackofficeEntityDetailManifestFallback.js +1 -1
- package/lib/esm/pages/detail/BackofficeEntityDetailManifestFallback.js.map +1 -1
- package/lib/esm/pages/detail/buildTabsItems.js.map +1 -1
- package/lib/esm/provider/BackofficeProvider.js +79 -80
- package/lib/esm/provider/BackofficeProvider.js.map +1 -1
- package/lib/esm/relay/typedRelayHooks.js.map +1 -1
- package/lib/esm/storybook/relay/RelayStory.css.js +1 -1
- package/lib/esm/style.css +1 -1
- package/lib/types/auth/authStoryFixtures.d.ts +3 -0
- package/lib/types/auth/authStoryFixtures.d.ts.map +1 -0
- package/lib/types/components/backoffice/errors/BackofficeErrorBoundary.d.ts +3 -17
- package/lib/types/components/backoffice/errors/BackofficeErrorBoundary.d.ts.map +1 -1
- package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityDetailScaffold.d.ts +2 -6
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityDetailScaffold.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts +2 -2
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.d.ts +2 -2
- package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.d.ts.map +1 -1
- package/lib/types/components/backoffice/technical/TechnicalIdentifierValue.d.ts +1 -11
- package/lib/types/components/backoffice/technical/TechnicalIdentifierValue.d.ts.map +1 -1
- package/lib/types/hooks/useInfiniteConnection.d.ts +3 -2
- package/lib/types/hooks/useInfiniteConnection.d.ts.map +1 -1
- package/lib/types/i18n/resources.d.ts +2 -13
- package/lib/types/i18n/resources.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailLayoutPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListDataPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListRouteContext.d.ts +0 -2
- package/lib/types/pages/BackofficeEntityListRouteContext.d.ts.map +1 -1
- package/lib/types/pages/detail/BackofficeEntityDetailLayoutContext.d.ts +2 -2
- package/lib/types/pages/detail/BackofficeEntityDetailLayoutContext.d.ts.map +1 -1
- package/lib/types/pages/detail/buildTabsItems.d.ts +2 -2
- package/lib/types/pages/detail/buildTabsItems.d.ts.map +1 -1
- package/lib/types/provider/BackofficeProvider.d.ts.map +1 -1
- package/lib/types/relay/typedRelayHooks.d.ts +3 -5
- package/lib/types/relay/typedRelayHooks.d.ts.map +1 -1
- package/package.json +17 -17
- package/lib/esm/components/backoffice/technical/TechnicalIdentifierValue.js.map +0 -1
- package/lib/esm/hooks/useBackofficeLoadMore.js +0 -18
- package/lib/esm/hooks/useBackofficeLoadMore.js.map +0 -1
- package/lib/esm/provider/BackofficeListUiStateContext.js +0 -88
- package/lib/esm/provider/BackofficeListUiStateContext.js.map +0 -1
- package/lib/types/hooks/useBackofficeLoadMore.d.ts +0 -9
- package/lib/types/hooks/useBackofficeLoadMore.d.ts.map +0 -1
- package/lib/types/provider/BackofficeListUiStateContext.d.ts +0 -21
- package/lib/types/provider/BackofficeListUiStateContext.d.ts.map +0 -1
|
@@ -8,154 +8,154 @@ import { buildDataTableColumns as s } from "../components/backoffice/columns/bui
|
|
|
8
8
|
import { BackofficeDetailBadgeRow as c } from "../components/backoffice/detail/BackofficeDetailBadgeRow.js";
|
|
9
9
|
import { BackofficeLifecycleTimelineSection as l } from "../components/backoffice/detail/BackofficeLifecycleTimelineSection.js";
|
|
10
10
|
import { BackofficeRelationsSummaryGrid as u } from "../components/backoffice/detail/BackofficeRelationsSummaryGrid.js";
|
|
11
|
-
import { layout as ee, primary as
|
|
11
|
+
import { layout as ee, primary as d, secondary as te, stacked as ne } from "../components/backoffice/detail/backofficeDetailLayout.css.js";
|
|
12
12
|
import { BackofficeEntityDetailScaffold as f } from "../components/backoffice/scaffolds/BackofficeEntityDetailScaffold.js";
|
|
13
13
|
import { useBackofficeEntityDetailNotFoundState as p } from "../components/backoffice/scaffolds/BackofficeEntityDetailNotFound.js";
|
|
14
14
|
import { useBackofficeFormats as m } from "../i18n/useBackofficeFormats.js";
|
|
15
15
|
import { useRelayEnvironment as h } from "../relay/useRelayEnvironment.js";
|
|
16
|
-
import { headerActionGroup as
|
|
17
|
-
import { extractMutationPayload as
|
|
18
|
-
import { buildFieldItems as
|
|
19
|
-
import { useContext as
|
|
20
|
-
import { Fragment as
|
|
21
|
-
import { useTranslation as
|
|
22
|
-
import { Button as
|
|
23
|
-
import { commitMutation as
|
|
24
|
-
import { useToast as
|
|
25
|
-
import
|
|
26
|
-
import { FormattedDate as
|
|
27
|
-
import { BACKOFFICE_DATE_TIME_OPTIONS as
|
|
28
|
-
import
|
|
29
|
-
import { Tag as
|
|
30
|
-
import { BackofficeDetailSection as
|
|
31
|
-
import { BackofficePayloadViewer as
|
|
32
|
-
import { AuditTimeline as
|
|
33
|
-
import { MetricCard as
|
|
34
|
-
import { MetricTileGroup as
|
|
35
|
-
import { LinkButton as
|
|
36
|
-
import { DataTable as
|
|
37
|
-
import { BackofficeKeyValueList as
|
|
38
|
-
import { BackofficeScopeStack as
|
|
39
|
-
import { ChatCheckSvg as
|
|
40
|
-
import { KeyOffSvg as
|
|
41
|
-
import { KeySvg as
|
|
42
|
-
import { LockOpenSvg as
|
|
43
|
-
import { LockSvg as
|
|
44
|
-
import { RobotCheckSvg as
|
|
45
|
-
import { RobotXSvg as
|
|
46
|
-
import { RocketOffSvg as
|
|
47
|
-
import { RocketSvg as
|
|
48
|
-
import { SettingsCheckSvg as
|
|
49
|
-
import { SettingsXSvg as
|
|
50
|
-
import { ShieldLockSvg as
|
|
51
|
-
import { ShieldOffSvg as
|
|
52
|
-
import { XBadgeSvg as
|
|
53
|
-
import { BackofficeDetailFlagTag as
|
|
54
|
-
import { BackofficeDetailTaggedValue as
|
|
16
|
+
import { headerActionGroup as g, headerActions as _ } from "./backofficeEntityDetailPage.css.js";
|
|
17
|
+
import { extractMutationPayload as re, isFormMutationAction as v, isMutationAction as ie, isRouteAction as ae, resolveLabel as y } from "./BackofficeEntityDetailPage.helpers.js";
|
|
18
|
+
import { buildFieldItems as oe, renderBlocks as se } from "./BackofficeEntityDetailPage.view-helpers.js";
|
|
19
|
+
import { useContext as b, useState as x } from "react";
|
|
20
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
21
|
+
import { useTranslation as T } from "react-i18next";
|
|
22
|
+
import { Button as E } from "@plumile/ui/atomic/atoms/button/Button.js";
|
|
23
|
+
import { commitMutation as ce, usePreloadedQuery as D } from "react-relay";
|
|
24
|
+
import { useToast as le } from "@plumile/ui/atomic/molecules/toast/ToastProvider.js";
|
|
25
|
+
import ue from "@plumile/router/routing/RoutingContext.js";
|
|
26
|
+
import { FormattedDate as O } from "@plumile/ui/atomic/atoms/formatted-date/FormattedDate.js";
|
|
27
|
+
import { BACKOFFICE_DATE_TIME_OPTIONS as k } from "@plumile/backoffice-core/constants.js";
|
|
28
|
+
import A from "@plumile/router/routing/Link.js";
|
|
29
|
+
import { Tag as j } from "@plumile/ui/backoffice/atoms/tag/Tag.js";
|
|
30
|
+
import { BackofficeDetailSection as M } from "@plumile/ui/backoffice/molecules/backoffice_detail_section/BackofficeDetailSection.js";
|
|
31
|
+
import { BackofficePayloadViewer as de } from "@plumile/ui/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.js";
|
|
32
|
+
import { AuditTimeline as fe } from "@plumile/ui/backoffice/organisms/audit_timeline/AuditTimeline.js";
|
|
33
|
+
import { MetricCard as pe } from "@plumile/ui/components/dashboard/metric_card/MetricCard.js";
|
|
34
|
+
import { MetricTileGroup as me } from "@plumile/ui/components/dashboard/metric_tile_group/MetricTileGroup.js";
|
|
35
|
+
import { LinkButton as he } from "@plumile/ui/atomic/atoms/button/LinkButton.js";
|
|
36
|
+
import { DataTable as N } from "@plumile/ui/components/data-table/DataTable.js";
|
|
37
|
+
import { BackofficeKeyValueList as P } from "@plumile/ui/backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js";
|
|
38
|
+
import { BackofficeScopeStack as F } from "@plumile/ui/backoffice/molecules/backoffice_scope_stack/BackofficeScopeStack.js";
|
|
39
|
+
import { ChatCheckSvg as I } from "@plumile/ui/icons/ChatCheckSvg.js";
|
|
40
|
+
import { KeyOffSvg as L } from "@plumile/ui/icons/KeyOffSvg.js";
|
|
41
|
+
import { KeySvg as R } from "@plumile/ui/icons/KeySvg.js";
|
|
42
|
+
import { LockOpenSvg as z } from "@plumile/ui/icons/LockOpenSvg.js";
|
|
43
|
+
import { LockSvg as B } from "@plumile/ui/icons/LockSvg.js";
|
|
44
|
+
import { RobotCheckSvg as V } from "@plumile/ui/icons/RobotCheckSvg.js";
|
|
45
|
+
import { RobotXSvg as H } from "@plumile/ui/icons/RobotXSvg.js";
|
|
46
|
+
import { RocketOffSvg as U } from "@plumile/ui/icons/RocketOffSvg.js";
|
|
47
|
+
import { RocketSvg as W } from "@plumile/ui/icons/RocketSvg.js";
|
|
48
|
+
import { SettingsCheckSvg as G } from "@plumile/ui/icons/SettingsCheckSvg.js";
|
|
49
|
+
import { SettingsXSvg as K } from "@plumile/ui/icons/SettingsXSvg.js";
|
|
50
|
+
import { ShieldLockSvg as q } from "@plumile/ui/icons/ShieldLockSvg.js";
|
|
51
|
+
import { ShieldOffSvg as J } from "@plumile/ui/icons/ShieldOffSvg.js";
|
|
52
|
+
import { XBadgeSvg as Y } from "@plumile/ui/icons/XBadgeSvg.js";
|
|
53
|
+
import { BackofficeDetailFlagTag as ge } from "@plumile/ui/backoffice/molecules/backoffice_detail_flag_tag/BackofficeDetailFlagTag.js";
|
|
54
|
+
import { BackofficeDetailTaggedValue as _e } from "@plumile/ui/backoffice/molecules/backoffice_detail_tagged_value/BackofficeDetailTaggedValue.js";
|
|
55
55
|
//#region src/pages/BackofficeEntityDetailPage.tsx
|
|
56
|
-
var
|
|
56
|
+
var ve = (e) => {
|
|
57
57
|
switch (e) {
|
|
58
|
-
case "shield-lock": return /* @__PURE__ */
|
|
58
|
+
case "shield-lock": return /* @__PURE__ */ C(q, {
|
|
59
59
|
width: 14,
|
|
60
60
|
height: 14,
|
|
61
61
|
"aria-hidden": "true"
|
|
62
62
|
});
|
|
63
|
-
case "shield-off": return /* @__PURE__ */
|
|
63
|
+
case "shield-off": return /* @__PURE__ */ C(J, {
|
|
64
64
|
width: 14,
|
|
65
65
|
height: 14,
|
|
66
66
|
"aria-hidden": "true"
|
|
67
67
|
});
|
|
68
|
-
case "settings-check": return /* @__PURE__ */
|
|
68
|
+
case "settings-check": return /* @__PURE__ */ C(G, {
|
|
69
69
|
width: 14,
|
|
70
70
|
height: 14,
|
|
71
71
|
"aria-hidden": "true"
|
|
72
72
|
});
|
|
73
|
-
case "settings-x": return /* @__PURE__ */
|
|
73
|
+
case "settings-x": return /* @__PURE__ */ C(K, {
|
|
74
74
|
width: 14,
|
|
75
75
|
height: 14,
|
|
76
76
|
"aria-hidden": "true"
|
|
77
77
|
});
|
|
78
|
-
case "x-badge": return /* @__PURE__ */
|
|
78
|
+
case "x-badge": return /* @__PURE__ */ C(Y, {
|
|
79
79
|
width: 14,
|
|
80
80
|
height: 14,
|
|
81
81
|
"aria-hidden": "true"
|
|
82
82
|
});
|
|
83
|
-
case "chat-check": return /* @__PURE__ */
|
|
83
|
+
case "chat-check": return /* @__PURE__ */ C(I, {
|
|
84
84
|
width: 14,
|
|
85
85
|
height: 14,
|
|
86
86
|
"aria-hidden": "true"
|
|
87
87
|
});
|
|
88
|
-
case "key": return /* @__PURE__ */
|
|
88
|
+
case "key": return /* @__PURE__ */ C(R, {
|
|
89
89
|
width: 14,
|
|
90
90
|
height: 14,
|
|
91
91
|
"aria-hidden": "true"
|
|
92
92
|
});
|
|
93
|
-
case "key-off": return /* @__PURE__ */
|
|
93
|
+
case "key-off": return /* @__PURE__ */ C(L, {
|
|
94
94
|
width: 14,
|
|
95
95
|
height: 14,
|
|
96
96
|
"aria-hidden": "true"
|
|
97
97
|
});
|
|
98
|
-
case "lock": return /* @__PURE__ */
|
|
98
|
+
case "lock": return /* @__PURE__ */ C(B, {
|
|
99
99
|
width: 14,
|
|
100
100
|
height: 14,
|
|
101
101
|
"aria-hidden": "true"
|
|
102
102
|
});
|
|
103
|
-
case "lock-open": return /* @__PURE__ */
|
|
103
|
+
case "lock-open": return /* @__PURE__ */ C(z, {
|
|
104
104
|
width: 14,
|
|
105
105
|
height: 14,
|
|
106
106
|
"aria-hidden": "true"
|
|
107
107
|
});
|
|
108
|
-
case "robot-check": return /* @__PURE__ */
|
|
108
|
+
case "robot-check": return /* @__PURE__ */ C(V, {
|
|
109
109
|
width: 14,
|
|
110
110
|
height: 14,
|
|
111
111
|
"aria-hidden": "true"
|
|
112
112
|
});
|
|
113
|
-
case "robot-x": return /* @__PURE__ */
|
|
113
|
+
case "robot-x": return /* @__PURE__ */ C(H, {
|
|
114
114
|
width: 14,
|
|
115
115
|
height: 14,
|
|
116
116
|
"aria-hidden": "true"
|
|
117
117
|
});
|
|
118
|
-
case "rocket": return /* @__PURE__ */
|
|
118
|
+
case "rocket": return /* @__PURE__ */ C(W, {
|
|
119
119
|
width: 14,
|
|
120
120
|
height: 14,
|
|
121
121
|
"aria-hidden": "true"
|
|
122
122
|
});
|
|
123
|
-
case "rocket-off": return /* @__PURE__ */
|
|
123
|
+
case "rocket-off": return /* @__PURE__ */ C(U, {
|
|
124
124
|
width: 14,
|
|
125
125
|
height: 14,
|
|
126
126
|
"aria-hidden": "true"
|
|
127
127
|
});
|
|
128
128
|
default: throw Error(`Unsupported flag icon: ${String(e)}`);
|
|
129
129
|
}
|
|
130
|
-
},
|
|
130
|
+
}, ye = (e) => {
|
|
131
131
|
if (e.presentation?.desktop === "secondary" || e.presentation?.group === "scope" || e.presentation?.group === "status") return "secondary";
|
|
132
132
|
let t = e.fields?.map((e) => e.presentation?.group) ?? [];
|
|
133
133
|
return t.length > 0 && t.every((e) => e === "scope" || e === "status") || e.placement === "side" || e.placement === "secondary" ? "secondary" : "primary";
|
|
134
|
-
},
|
|
135
|
-
let { t:
|
|
136
|
-
|
|
134
|
+
}, X = ({ config: I, prepared: L }) => {
|
|
135
|
+
let { t: R } = T(), { t: z } = e(), { formatNumber: B, formatCurrency: V, formatCurrencyTitle: H, formatPercent: U } = m(), { entities: W } = n(), G = b(ue), K = h(), q = le(), [J, Y] = x({}), [X, Z] = x(null), Q = (e, t) => {
|
|
136
|
+
Y((n) => n[e] === t ? n : {
|
|
137
137
|
...n,
|
|
138
138
|
[e]: t
|
|
139
139
|
});
|
|
140
|
-
}, { page:
|
|
141
|
-
id:
|
|
142
|
-
detailId:
|
|
143
|
-
}),
|
|
144
|
-
return /* @__PURE__ */
|
|
145
|
-
node:
|
|
146
|
-
notFound:
|
|
140
|
+
}, { page: $ } = I, be = p({ listHref: I.routes.list }), xe = D($.query, L.pageQuery), Se = $.resolveNode(xe, {
|
|
141
|
+
id: L.id,
|
|
142
|
+
detailId: L.detailId
|
|
143
|
+
}), Ce = r($.fragment, Se);
|
|
144
|
+
return /* @__PURE__ */ C(f, {
|
|
145
|
+
node: Ce,
|
|
146
|
+
notFound: be,
|
|
147
147
|
render: (e) => {
|
|
148
|
-
let n =
|
|
149
|
-
let n =
|
|
148
|
+
let n = $.toView(e), r = (e, t) => {
|
|
149
|
+
let n = W[e];
|
|
150
150
|
return n == null ? null : n.routes.detail(t);
|
|
151
|
-
}, f =
|
|
151
|
+
}, f = $.actions ?? [], p = [];
|
|
152
152
|
if (f.length > 0) {
|
|
153
153
|
let e = f.filter((e) => e.isVisible == null || e.isVisible(n));
|
|
154
154
|
e.length > 0 && (p = e.map((e) => {
|
|
155
|
-
let r =
|
|
156
|
-
if (
|
|
155
|
+
let r = y(e.label, R), o = e.ariaLabel == null ? r : y(e.ariaLabel, R), s = e.variant ?? "secondary", c = e.size ?? "small", l = J[e.id] ?? !1, u = l || e.isDisabled?.(n) === !0;
|
|
156
|
+
if (ae(e)) {
|
|
157
157
|
let t = e.to(n);
|
|
158
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ C(he, {
|
|
159
159
|
to: t,
|
|
160
160
|
variant: s,
|
|
161
161
|
size: c,
|
|
@@ -165,18 +165,18 @@ var be = (e) => typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "__typen
|
|
|
165
165
|
children: r
|
|
166
166
|
}, e.id);
|
|
167
167
|
}
|
|
168
|
-
return
|
|
168
|
+
return v(e) ? /* @__PURE__ */ C(E, {
|
|
169
169
|
type: "button",
|
|
170
170
|
variant: s,
|
|
171
171
|
size: c,
|
|
172
172
|
isLoading: !1,
|
|
173
173
|
disabled: u,
|
|
174
174
|
onClick: () => {
|
|
175
|
-
|
|
175
|
+
Z(e.id);
|
|
176
176
|
},
|
|
177
177
|
"aria-label": o,
|
|
178
178
|
children: r
|
|
179
|
-
}, e.id) :
|
|
179
|
+
}, e.id) : ie(e) ? /* @__PURE__ */ C(E, {
|
|
180
180
|
type: "button",
|
|
181
181
|
variant: s,
|
|
182
182
|
size: c,
|
|
@@ -185,47 +185,47 @@ var be = (e) => typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "__typen
|
|
|
185
185
|
onClick: () => {
|
|
186
186
|
if (l) return;
|
|
187
187
|
let r = e.getVariables(n);
|
|
188
|
-
|
|
188
|
+
Q(e.id, !0), ce(K, {
|
|
189
189
|
mutation: e.mutation,
|
|
190
190
|
variables: r,
|
|
191
191
|
updater: (t) => {
|
|
192
192
|
e.updater?.(t, n);
|
|
193
193
|
},
|
|
194
194
|
onCompleted: (r) => {
|
|
195
|
-
|
|
196
|
-
let o =
|
|
195
|
+
Q(e.id, !1);
|
|
196
|
+
let o = re(r);
|
|
197
197
|
if (o != null) {
|
|
198
|
-
let r =
|
|
199
|
-
e.toasts?.error?.message == null ? e.toasts?.error?.title != null && (r =
|
|
198
|
+
let r = z("actions.form.errors.invalidPayload");
|
|
199
|
+
e.toasts?.error?.message == null ? e.toasts?.error?.title != null && (r = y(e.toasts.error.title, R)) : r = y(e.toasts.error.message, R);
|
|
200
200
|
let a = t(o, {
|
|
201
201
|
defaultErrorMessage: r,
|
|
202
202
|
mapReason: (t) => {
|
|
203
203
|
let r = e.mapErrorReason?.(t, n);
|
|
204
|
-
return r == null ? null : typeof r == "function" ?
|
|
204
|
+
return r == null ? null : typeof r == "function" ? y(r, R) : String(r);
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
if (!a.ok) {
|
|
208
208
|
let t = Error(a.message);
|
|
209
209
|
if (e.onError?.(t, n), e.toasts?.error != null) {
|
|
210
|
-
let t = i(e.toasts.error,
|
|
211
|
-
|
|
210
|
+
let t = i(e.toasts.error, R);
|
|
211
|
+
q.error(t.title, t.message);
|
|
212
212
|
}
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
if (e.onCompleted?.(r, n), e.toasts?.success != null) {
|
|
217
|
-
let t = i(e.toasts.success,
|
|
217
|
+
let t = i(e.toasts.success, R), o = a({
|
|
218
218
|
toast: e.toasts.success,
|
|
219
219
|
response: r,
|
|
220
220
|
node: n,
|
|
221
|
-
tApp:
|
|
222
|
-
entities:
|
|
223
|
-
defaultLabel:
|
|
221
|
+
tApp: R,
|
|
222
|
+
entities: W,
|
|
223
|
+
defaultLabel: z("actions.view"),
|
|
224
224
|
navigateTo: (e) => {
|
|
225
|
-
|
|
225
|
+
G?.history.push({ pathname: e });
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
|
-
|
|
228
|
+
q.push({
|
|
229
229
|
kind: "info",
|
|
230
230
|
title: t.title,
|
|
231
231
|
message: t.message,
|
|
@@ -234,9 +234,9 @@ var be = (e) => typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "__typen
|
|
|
234
234
|
}
|
|
235
235
|
},
|
|
236
236
|
onError: (t) => {
|
|
237
|
-
if (
|
|
238
|
-
let t = i(e.toasts.error,
|
|
239
|
-
|
|
237
|
+
if (Q(e.id, !1), e.onError?.(t, n), e.toasts?.error != null) {
|
|
238
|
+
let t = i(e.toasts.error, R);
|
|
239
|
+
q.error(t.title, t.message);
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
});
|
|
@@ -246,46 +246,46 @@ var be = (e) => typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "__typen
|
|
|
246
246
|
}, e.id) : null;
|
|
247
247
|
}));
|
|
248
248
|
}
|
|
249
|
-
let m = f.find((e) => e.id ===
|
|
249
|
+
let m = f.find((e) => e.id === X), { content: h } = $, b = [], x = [];
|
|
250
250
|
h.forEach((e, t) => {
|
|
251
|
-
let i =
|
|
251
|
+
let i = ye(e) === "secondary" ? x : b;
|
|
252
252
|
if (e.kind === "fieldSet") {
|
|
253
|
-
let a =
|
|
254
|
-
tApp:
|
|
255
|
-
t:
|
|
253
|
+
let a = y(e.title, R), o = e.description == null ? void 0 : y(e.description, R), { items: s, customNodes: l } = oe(e.fields, n, {
|
|
254
|
+
tApp: R,
|
|
255
|
+
t: z,
|
|
256
256
|
resolveEntityHref: r,
|
|
257
|
-
formatNumber:
|
|
258
|
-
formatCurrency:
|
|
259
|
-
formatCurrencyTitle:
|
|
260
|
-
formatPercent:
|
|
261
|
-
renderTag: (e, t) => /* @__PURE__ */
|
|
257
|
+
formatNumber: B,
|
|
258
|
+
formatCurrency: V,
|
|
259
|
+
formatCurrencyTitle: H,
|
|
260
|
+
formatPercent: U,
|
|
261
|
+
renderTag: (e, t) => /* @__PURE__ */ C(j, {
|
|
262
262
|
tone: e,
|
|
263
263
|
children: t
|
|
264
264
|
}),
|
|
265
|
-
renderBadgeRow: (e) => /* @__PURE__ */
|
|
266
|
-
renderDate: (e, t) => /* @__PURE__ */
|
|
265
|
+
renderBadgeRow: (e) => /* @__PURE__ */ C(c, { items: e }),
|
|
266
|
+
renderDate: (e, t) => /* @__PURE__ */ C(O, {
|
|
267
267
|
value: e,
|
|
268
|
-
options:
|
|
268
|
+
options: k,
|
|
269
269
|
fallback: t
|
|
270
270
|
}),
|
|
271
|
-
renderFlagTag: (e) => /* @__PURE__ */
|
|
271
|
+
renderFlagTag: (e) => /* @__PURE__ */ C(ge, {
|
|
272
272
|
tone: e.tone,
|
|
273
|
-
icon: e.iconName == null ? void 0 :
|
|
273
|
+
icon: e.iconName == null ? void 0 : ve(e.iconName),
|
|
274
274
|
label: e.label
|
|
275
275
|
}),
|
|
276
|
-
renderLink: (e, t) => /* @__PURE__ */
|
|
276
|
+
renderLink: (e, t) => /* @__PURE__ */ C(A, {
|
|
277
277
|
to: e,
|
|
278
278
|
preloadOnHover: "code-and-data",
|
|
279
279
|
children: t
|
|
280
280
|
}),
|
|
281
|
-
renderTaggedValue: (e, t) => /* @__PURE__ */
|
|
281
|
+
renderTaggedValue: (e, t) => /* @__PURE__ */ C(_e, {
|
|
282
282
|
tag: e,
|
|
283
283
|
value: t
|
|
284
284
|
}),
|
|
285
|
-
wrapCustomNode: (e, t) => /* @__PURE__ */
|
|
285
|
+
wrapCustomNode: (e, t) => /* @__PURE__ */ C("div", { children: t }, e)
|
|
286
286
|
});
|
|
287
287
|
if (!(s.length > 0 || l.length > 0)) return;
|
|
288
|
-
i.push(/* @__PURE__ */
|
|
288
|
+
i.push(/* @__PURE__ */ C(M, {
|
|
289
289
|
title: a,
|
|
290
290
|
description: o,
|
|
291
291
|
items: s.length > 0 ? s : void 0,
|
|
@@ -293,74 +293,74 @@ var be = (e) => typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "__typen
|
|
|
293
293
|
}, `${a}-${t}`));
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
|
-
let a =
|
|
297
|
-
tApp:
|
|
298
|
-
t:
|
|
296
|
+
let a = se([e], n, {
|
|
297
|
+
tApp: R,
|
|
298
|
+
t: z,
|
|
299
299
|
resolveEntityHref: r,
|
|
300
300
|
keyPrefix: String(t),
|
|
301
|
-
renderLink: (e, t) => /* @__PURE__ */
|
|
301
|
+
renderLink: (e, t) => /* @__PURE__ */ C(A, {
|
|
302
302
|
to: e,
|
|
303
303
|
preloadOnHover: "code-and-data",
|
|
304
304
|
children: t
|
|
305
305
|
}),
|
|
306
|
-
renderDate: (e, t) => /* @__PURE__ */
|
|
306
|
+
renderDate: (e, t) => /* @__PURE__ */ C(O, {
|
|
307
307
|
value: e,
|
|
308
|
-
options:
|
|
308
|
+
options: k,
|
|
309
309
|
fallback: t
|
|
310
310
|
}),
|
|
311
|
-
renderTag: (e, t) => /* @__PURE__ */
|
|
311
|
+
renderTag: (e, t) => /* @__PURE__ */ C(j, {
|
|
312
312
|
tone: e,
|
|
313
313
|
children: t
|
|
314
314
|
}),
|
|
315
|
-
renderMetricGroup: ({ key: e, title: t, description: n, density: r, items: i }) => /* @__PURE__ */
|
|
315
|
+
renderMetricGroup: ({ key: e, title: t, description: n, density: r, items: i }) => /* @__PURE__ */ C(M, {
|
|
316
316
|
title: t,
|
|
317
317
|
description: n,
|
|
318
|
-
children: i.length > 0 && /* @__PURE__ */
|
|
318
|
+
children: i.length > 0 && /* @__PURE__ */ C(me, {
|
|
319
319
|
density: r ?? "comfortable",
|
|
320
320
|
minColumn: "180",
|
|
321
|
-
children: i.map((e) => /* @__PURE__ */
|
|
321
|
+
children: i.map((e) => /* @__PURE__ */ C(pe, {
|
|
322
322
|
label: e.label,
|
|
323
323
|
value: e.value,
|
|
324
324
|
hint: e.hint,
|
|
325
325
|
tone: e.tone ?? "neutral",
|
|
326
326
|
density: r ?? "comfortable",
|
|
327
327
|
copyValue: e.copyValue,
|
|
328
|
-
copyLabel:
|
|
329
|
-
copiedLabel:
|
|
328
|
+
copyLabel: z("common.actions.copy"),
|
|
329
|
+
copiedLabel: z("common.actions.copied")
|
|
330
330
|
}, e.id))
|
|
331
331
|
})
|
|
332
332
|
}, e),
|
|
333
|
-
renderTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */
|
|
333
|
+
renderTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */ C(l, {
|
|
334
334
|
title: t,
|
|
335
335
|
description: n,
|
|
336
336
|
events: r
|
|
337
337
|
}, e),
|
|
338
|
-
renderAuditTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */
|
|
338
|
+
renderAuditTimeline: ({ key: e, title: t, description: n, events: r }) => /* @__PURE__ */ C(M, {
|
|
339
339
|
title: t,
|
|
340
340
|
description: n,
|
|
341
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ C(fe, { events: r })
|
|
342
342
|
}, e),
|
|
343
|
-
renderRelations: ({ key: e, title: t, items: n }) => /* @__PURE__ */
|
|
343
|
+
renderRelations: ({ key: e, title: t, items: n }) => /* @__PURE__ */ C(u, {
|
|
344
344
|
title: t,
|
|
345
345
|
items: n
|
|
346
346
|
}, e),
|
|
347
|
-
renderContextStack: ({ key: e, title: t, items: n }) => /* @__PURE__ */
|
|
347
|
+
renderContextStack: ({ key: e, title: t, items: n }) => /* @__PURE__ */ C(F, {
|
|
348
348
|
title: t,
|
|
349
349
|
items: n
|
|
350
350
|
}, e),
|
|
351
|
-
renderCustomSection: (e, t, n) => /* @__PURE__ */
|
|
351
|
+
renderCustomSection: (e, t, n) => /* @__PURE__ */ C(M, {
|
|
352
352
|
title: t,
|
|
353
353
|
children: n
|
|
354
354
|
}, e),
|
|
355
|
-
wrapCustomNode: (e, t) => /* @__PURE__ */
|
|
355
|
+
wrapCustomNode: (e, t) => /* @__PURE__ */ C("div", { children: t }, e),
|
|
356
356
|
resolveTableColumns: (e) => s(e, {
|
|
357
|
-
tApp:
|
|
358
|
-
t:
|
|
357
|
+
tApp: R,
|
|
358
|
+
t: z
|
|
359
359
|
}),
|
|
360
|
-
renderTable: ({ key: e, title: t, description: n, columns: r, rows: i }) => /* @__PURE__ */
|
|
360
|
+
renderTable: ({ key: e, title: t, description: n, columns: r, rows: i }) => /* @__PURE__ */ C(M, {
|
|
361
361
|
title: t,
|
|
362
362
|
description: n,
|
|
363
|
-
children: /* @__PURE__ */
|
|
363
|
+
children: /* @__PURE__ */ C(N, {
|
|
364
364
|
columns: r,
|
|
365
365
|
rows: i,
|
|
366
366
|
getRowId: (e, t) => {
|
|
@@ -372,61 +372,61 @@ var be = (e) => typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "__typen
|
|
|
372
372
|
}
|
|
373
373
|
})
|
|
374
374
|
}, e),
|
|
375
|
-
renderPayload: ({ key: e, title: t, description: n, content: r, format: i }) => /* @__PURE__ */
|
|
375
|
+
renderPayload: ({ key: e, title: t, description: n, content: r, format: i }) => /* @__PURE__ */ C(M, {
|
|
376
376
|
title: t,
|
|
377
377
|
description: n,
|
|
378
|
-
children: /* @__PURE__ */
|
|
378
|
+
children: /* @__PURE__ */ C(de, {
|
|
379
379
|
content: r,
|
|
380
380
|
format: i,
|
|
381
|
-
emptyState:
|
|
381
|
+
emptyState: z("common.notAvailable")
|
|
382
382
|
})
|
|
383
383
|
}, e),
|
|
384
|
-
renderKeyValueListSection: ({ key: e, title: t, description: n, items: r }) => /* @__PURE__ */
|
|
384
|
+
renderKeyValueListSection: ({ key: e, title: t, description: n, items: r }) => /* @__PURE__ */ C(M, {
|
|
385
385
|
title: t,
|
|
386
386
|
description: n,
|
|
387
|
-
children: /* @__PURE__ */
|
|
387
|
+
children: /* @__PURE__ */ C(P, { items: r })
|
|
388
388
|
}, e)
|
|
389
389
|
})[0];
|
|
390
390
|
a != null && i.push(a);
|
|
391
391
|
});
|
|
392
|
-
let
|
|
393
|
-
className:
|
|
394
|
-
children: /* @__PURE__ */
|
|
395
|
-
className:
|
|
392
|
+
let T = p.length > 0 ? /* @__PURE__ */ C("div", {
|
|
393
|
+
className: _,
|
|
394
|
+
children: /* @__PURE__ */ C("div", {
|
|
395
|
+
className: g,
|
|
396
396
|
children: p
|
|
397
397
|
})
|
|
398
|
-
}) : null,
|
|
398
|
+
}) : null, D = x.length > 0 ? /* @__PURE__ */ w("div", {
|
|
399
399
|
className: ee,
|
|
400
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ C("div", {
|
|
401
|
+
className: d,
|
|
402
|
+
children: b
|
|
403
|
+
}), /* @__PURE__ */ C("aside", {
|
|
401
404
|
className: te,
|
|
402
|
-
children:
|
|
403
|
-
}), /* @__PURE__ */ x("aside", {
|
|
404
|
-
className: ne,
|
|
405
|
-
children: y
|
|
405
|
+
children: x
|
|
406
406
|
})]
|
|
407
|
-
}) : /* @__PURE__ */
|
|
408
|
-
className:
|
|
409
|
-
children:
|
|
407
|
+
}) : /* @__PURE__ */ C("div", {
|
|
408
|
+
className: ne,
|
|
409
|
+
children: b
|
|
410
410
|
});
|
|
411
|
-
return /* @__PURE__ */ S
|
|
412
|
-
C,
|
|
411
|
+
return /* @__PURE__ */ w(S, { children: [
|
|
413
412
|
T,
|
|
414
|
-
|
|
413
|
+
D,
|
|
414
|
+
m != null && v(m) && /* @__PURE__ */ C(o, {
|
|
415
415
|
isOpen: !0,
|
|
416
416
|
action: m,
|
|
417
417
|
node: n,
|
|
418
418
|
onClose: () => {
|
|
419
|
-
|
|
419
|
+
Z(null);
|
|
420
420
|
}
|
|
421
421
|
})
|
|
422
422
|
] });
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
|
-
},
|
|
425
|
+
}, Z = ({ prepared: e }) => /* @__PURE__ */ C(X, {
|
|
426
426
|
config: e.pageConfig,
|
|
427
427
|
prepared: e
|
|
428
428
|
});
|
|
429
429
|
//#endregion
|
|
430
|
-
export {
|
|
430
|
+
export { Z as BackofficeEntityDetailPage, Z as default };
|
|
431
431
|
|
|
432
432
|
//# sourceMappingURL=BackofficeEntityDetailPage.js.map
|