@gen-epix/ui-client-common 4.4.2 → 4.5.1
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 +7 -6
- package/dist/@types/mui.d.ts +13 -5
- package/dist/@types/ui-client-common.d.ts +1 -0
- package/dist/_chunks/ApplicationFooter.js +44 -44
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +13 -13
- package/dist/_chunks/Breadcrumbs.js.map +1 -1
- package/dist/_chunks/CrudPage.js +300 -300
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/Notifications.js +51 -51
- package/dist/_chunks/Notifications.js.map +1 -1
- package/dist/_chunks/OutageList.js +29 -29
- package/dist/_chunks/OutageUtil.js +1 -2
- package/dist/_chunks/OutageUtil.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +96 -388
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Table.js +518 -512
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js +8 -16
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/TextFilter.js +14 -12
- package/dist/_chunks/TextFilter.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +77 -77
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/UserManagerUtil.js +210 -209
- package/dist/_chunks/UserManagerUtil.js.map +1 -1
- package/dist/_chunks/_baseFlatten.js +8 -8
- package/dist/_chunks/_baseFlatten.js.map +1 -1
- package/dist/_chunks/_baseGet.js +280 -0
- package/dist/_chunks/_baseGet.js.map +1 -0
- package/dist/_chunks/_baseIteratee.js +274 -0
- package/dist/_chunks/_baseIteratee.js.map +1 -0
- package/dist/_chunks/_baseUnset.js +22 -299
- package/dist/_chunks/_baseUnset.js.map +1 -1
- package/dist/_chunks/last.js +13 -0
- package/dist/_chunks/last.js.map +1 -0
- package/dist/_chunks/omit.js +41 -40
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/tableStore.js +190 -183
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/uniq.js +44 -0
- package/dist/_chunks/uniq.js.map +1 -0
- package/dist/_chunks/useMutation.js +22 -22
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +25 -8
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/classes/abstracts/FilterAbstract/index.js +3 -1
- package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
- package/dist/classes/filters/MultiSelectFilter.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/AuthenticationService.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/index.js +15 -15
- package/dist/classes/services/AuthenticationService/index.js.map +1 -1
- package/dist/classes/services/AuthorizationService/index.js +4 -4
- package/dist/classes/services/AuthorizationService/index.js.map +1 -1
- package/dist/classes/services/BackendVersionService/index.js +3 -2
- package/dist/classes/services/BackendVersionService/index.js.map +1 -1
- package/dist/classes/services/BreadcrumbService/index.js +16 -38
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/index.js +9 -8
- package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
- package/dist/classes/services/I18nService/index.js +11 -10
- package/dist/classes/services/I18nService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/index.js +12 -12
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/LogService/index.js +39 -33
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/NotificationService/index.js +8 -8
- package/dist/classes/services/NotificationService/index.js.map +1 -1
- package/dist/classes/services/PageEventBusService/index.js +13 -9
- package/dist/classes/services/PageEventBusService/index.js.map +1 -1
- package/dist/classes/services/RouterService/index.js +3 -6
- package/dist/classes/services/RouterService/index.js.map +1 -1
- package/dist/components/app/App/App.d.ts +1 -1
- package/dist/components/app/App/index.js +34 -38
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +28 -28
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +47 -45
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +35 -35
- package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
- package/dist/components/app/AuthorizationWrapper/index.js +19 -19
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +52 -50
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/index.js +21 -21
- package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
- package/dist/components/filters/BooleanFilterField/index.js +5 -5
- package/dist/components/filters/DateFilterField/index.js +3 -3
- package/dist/components/filters/GeoFilterField/index.js +4 -4
- package/dist/components/filters/MultiSelectFilterField/index.js +4 -4
- package/dist/components/filters/NumberRangeFilterField/index.js +3 -3
- package/dist/components/filters/TextFilterField/index.js +3 -3
- package/dist/components/ui/ApplicationBar/index.js +188 -188
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +29 -29
- package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
- package/dist/components/ui/LicensesDialog/index.js +38 -38
- package/dist/components/ui/LicensesDialog/index.js.map +1 -1
- package/dist/components/ui/MyPermissionsDialog/index.js +16 -16
- package/dist/components/ui/MyPermissionsDialog/index.js.map +1 -1
- package/dist/components/ui/NavLink/index.js +6 -6
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +21 -21
- package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
- package/dist/components/ui/PageContainer/index.js +24 -24
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/Sidebar/index.js +30 -30
- package/dist/components/ui/UserFeedbackDialog/index.js +12 -12
- package/dist/components/ui/UserFeedbackDialog/index.js.map +1 -1
- package/dist/components/ui/UserInactivityConfirmation/index.js.map +1 -1
- package/dist/constants/config.constants.d.ts +0 -2
- package/dist/constants/config.constants.js +2 -2
- package/dist/constants/config.constants.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +12 -12
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +14 -14
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js.map +1 -1
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +12 -12
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +13 -13
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +4 -4
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationsQuery/index.js +13 -13
- package/dist/dataHooks/useOrganizationsQuery/index.js.map +1 -1
- package/dist/dataHooks/useUsersQuery/index.js +10 -10
- package/dist/dataHooks/useUsersQuery/index.js.map +1 -1
- package/dist/hoc/withPermissions/index.js.map +1 -1
- package/dist/hooks/useConfig/index.js +2 -2
- package/dist/hooks/useConfig/index.js.map +1 -1
- package/dist/hooks/useCreateMutation/index.js +12 -12
- package/dist/hooks/useCreateMutation/index.js.map +1 -1
- package/dist/hooks/useDeleteMutation/index.js +16 -9
- package/dist/hooks/useDeleteMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/index.js +48 -33
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useItemQuery/index.js +4 -4
- package/dist/hooks/useItemQuery/index.js.map +1 -1
- package/dist/hooks/useUpdateBreadcrumb/index.js.map +1 -1
- package/dist/locale/en.json +1 -0
- package/dist/locale/nl.json +1 -0
- package/dist/models/config.models.d.ts +1 -5
- package/dist/models/theme.models.d.ts +19 -16
- package/dist/pages/AcceptInvitationPage/index.js +25 -25
- package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
- package/dist/pages/AdminPage/index.js +16 -16
- package/dist/pages/AdminPage/index.js.map +1 -1
- package/dist/pages/ChooseIdentityProviderPage/index.js +21 -21
- package/dist/pages/ChooseIdentityProviderPage/index.js.map +1 -1
- package/dist/pages/IdentifierIssuersAdminPage/index.js +5 -5
- package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +5 -5
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationContactsAdminPage/index.js +6 -6
- package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationSitesAdminPage/index.js +9 -9
- package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationsAdminPage/index.js +13 -13
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/index.js +20 -20
- package/dist/pages/OutagesAdminPage/index.js.map +1 -1
- package/dist/pages/PostLoginPage/index.js +6 -6
- package/dist/pages/PostLoginPage/index.js.map +1 -1
- package/dist/pages/PostLogoutPage/index.js +8 -8
- package/dist/pages/PostLogoutPage/index.js.map +1 -1
- package/dist/pages/UsersAdminPage/index.js +39 -39
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/setup/setup.d.ts +1 -1
- package/dist/setup/setup.js +11 -4
- package/dist/setup/setup.js.map +1 -1
- package/dist/theme/demoTheme/index.js +17 -15
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/dist/utils/DataHookUtil/index.js +1 -1
- package/dist/utils/DataHookUtil/index.js.map +1 -1
- package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +2 -3
- package/dist/utils/DependencyContainerUtil/index.js +10 -16
- package/dist/utils/DependencyContainerUtil/index.js.map +1 -1
- package/dist/utils/MenuDataUtil/index.js +1 -1
- package/dist/utils/MenuDataUtil/index.js.map +1 -1
- package/dist/utils/StandardConfigUtil/index.js +0 -4
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/dist/utils/TimeUtil/index.js +1 -1
- package/dist/utils/TimeUtil/index.js.map +1 -1
- package/package.json +11 -14
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContext.d.ts +0 -9
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContextProvider.d.ts +0 -6
- package/dist/context/uiClientCommonConfigContext/index.d.ts +0 -3
- package/dist/context/uiClientCommonConfigContext/index.js +0 -34
- package/dist/context/uiClientCommonConfigContext/index.js.map +0 -1
- package/dist/context/uiClientCommonConfigContext/useUiClientCommonConfigContext.d.ts +0 -3
package/dist/_chunks/CrudPage.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { n as e } from "./rolldown-runtime.js";
|
|
2
2
|
import { t } from "./TableUtil.js";
|
|
3
3
|
import { r as n } from "./isArrayLike.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { useCreateMutation as
|
|
15
|
-
import { useDeleteMutation as
|
|
16
|
-
import { useEditMutation as
|
|
17
|
-
import { useInitializeTableStore as
|
|
18
|
-
import { t as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { useTranslation as
|
|
25
|
-
import { TestIdUtil as
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { useForm as
|
|
31
|
-
import { withDialog as
|
|
32
|
-
import
|
|
33
|
-
import { GenericForm as
|
|
34
|
-
import { FormUtil as
|
|
4
|
+
import { LoadableUtil as r } from "../utils/LoadableUtil/index.js";
|
|
5
|
+
import { i, n as a } from "./tableStore.js";
|
|
6
|
+
import { AuthorizationService as o } from "../classes/services/AuthorizationService/index.js";
|
|
7
|
+
import { RouterService as s } from "../classes/services/RouterService/index.js";
|
|
8
|
+
import { useConfig as c } from "../hooks/useConfig/index.js";
|
|
9
|
+
import { PageContainer as l } from "../components/ui/PageContainer/index.js";
|
|
10
|
+
import { ResponseHandler as u } from "../components/ui/ResponseHandler/index.js";
|
|
11
|
+
import { c as ee, h as d, n as f, s as p, t as te } from "./Table.js";
|
|
12
|
+
import { t as m } from "./useQueryMemo.js";
|
|
13
|
+
import { t as ne } from "./QueryClientService.js";
|
|
14
|
+
import { useCreateMutation as re } from "../hooks/useCreateMutation/index.js";
|
|
15
|
+
import { useDeleteMutation as h } from "../hooks/useDeleteMutation/index.js";
|
|
16
|
+
import { useEditMutation as g } from "../hooks/useEditMutation/index.js";
|
|
17
|
+
import { useInitializeTableStore as ie } from "../hooks/useInitializeTableStore/index.js";
|
|
18
|
+
import { t as ae } from "./yup.js";
|
|
19
|
+
import { container as _ } from "tsyringe";
|
|
20
|
+
import { CommonDbPermissionType as v } from "@gen-epix/api-commondb";
|
|
21
|
+
import { Box as y, Button as oe, ListItemIcon as b, ListItemText as x, MenuItem as S, useTheme as se } from "@mui/material";
|
|
22
|
+
import { useCallback as C, useEffect as w, useId as T, useMemo as E, useRef as ce, useState as D } from "react";
|
|
23
|
+
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
24
|
+
import { useTranslation as le } from "react-i18next";
|
|
25
|
+
import { TestIdUtil as A } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
26
|
+
import ue from "@mui/icons-material/Edit";
|
|
27
|
+
import de from "@mui/icons-material/DeleteForever";
|
|
28
|
+
import fe from "@mui/icons-material/ArrowCircleRight";
|
|
29
|
+
import pe from "@mui/icons-material/ContentCopy";
|
|
30
|
+
import { useForm as j } from "react-hook-form";
|
|
31
|
+
import { withDialog as M } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
32
|
+
import N from "@mui/icons-material/Save";
|
|
33
|
+
import { GenericForm as me } from "@gen-epix/ui-core-form/components/helpers/GenericForm";
|
|
34
|
+
import { FormUtil as he } from "@gen-epix/ui-core-form/utils/FormUtil";
|
|
35
35
|
//#region src/pages/CrudPage/CrudPageEditDialog.tsx
|
|
36
|
-
var
|
|
37
|
-
let { t: f } =
|
|
38
|
-
|
|
36
|
+
var ge = /* @__PURE__ */ e(n(), 1), _e = M(({ createItemDialogTitle: e, defaultNewItem: t, formFieldDefinitions: n, getFormValuesFromItem: r, getName: i, onActionsChange: a, onChange: o, onClose: s, onSave: c, onTitleChange: l, openProps: u, schema: ee }) => {
|
|
37
|
+
let { t: f } = le(), p = T(), te = E(() => typeof n == "function" ? n(u.item) : n, [n, u.item]), [m, ne] = D(te);
|
|
38
|
+
w(() => {
|
|
39
39
|
let e = [];
|
|
40
40
|
u.extraActionsFactory && e.push(...u.extraActionsFactory(u.item)), e.push({
|
|
41
|
-
...
|
|
41
|
+
...A.createAttributes("CrudPageEditDialog-saveButton"),
|
|
42
42
|
autoFocus: !0,
|
|
43
43
|
color: "secondary",
|
|
44
|
-
disabled: !u.canSave ||
|
|
44
|
+
disabled: !u.canSave || m.some((e) => e.loading),
|
|
45
45
|
form: p,
|
|
46
46
|
label: f`Save`,
|
|
47
|
-
startIcon: /* @__PURE__ */
|
|
47
|
+
startIcon: /* @__PURE__ */ O(N, {}),
|
|
48
48
|
type: "submit",
|
|
49
49
|
variant: "contained"
|
|
50
50
|
}), a(e);
|
|
@@ -52,22 +52,22 @@ var he = /* @__PURE__ */ e(n(), 1), ge = N(({ createItemDialogTitle: e, defaultN
|
|
|
52
52
|
a,
|
|
53
53
|
p,
|
|
54
54
|
f,
|
|
55
|
-
|
|
55
|
+
m,
|
|
56
56
|
u
|
|
57
57
|
]);
|
|
58
|
-
let
|
|
58
|
+
let re = E(() => ({
|
|
59
59
|
...t,
|
|
60
|
-
...
|
|
60
|
+
...he.createFormValues(m, {
|
|
61
61
|
...t,
|
|
62
62
|
...r ? r(u.item) : u.item ?? {}
|
|
63
63
|
})
|
|
64
64
|
}), [
|
|
65
65
|
t,
|
|
66
|
-
|
|
66
|
+
m,
|
|
67
67
|
r,
|
|
68
68
|
u.item
|
|
69
69
|
]);
|
|
70
|
-
|
|
70
|
+
w(() => {
|
|
71
71
|
u.item?.id ? l(`Edit item: ${i({
|
|
72
72
|
...t,
|
|
73
73
|
...r ? r(u.item) : u.item ?? {}
|
|
@@ -81,71 +81,71 @@ var he = /* @__PURE__ */ e(n(), 1), ge = N(({ createItemDialogTitle: e, defaultN
|
|
|
81
81
|
t,
|
|
82
82
|
r
|
|
83
83
|
]);
|
|
84
|
-
let
|
|
85
|
-
resolver:
|
|
86
|
-
values:
|
|
87
|
-
}), { formState:
|
|
88
|
-
o && o(u.item, e,
|
|
84
|
+
let h = j({
|
|
85
|
+
resolver: ae(ee),
|
|
86
|
+
values: re
|
|
87
|
+
}), { formState: g, handleSubmit: ie, subscribe: _ } = h, v = d((e) => {
|
|
88
|
+
o && o(u.item, e, h), typeof n == "function" && ne(n(u.item, e));
|
|
89
89
|
}, 500, {
|
|
90
90
|
leading: !1,
|
|
91
91
|
trailing: !0
|
|
92
92
|
});
|
|
93
|
-
|
|
94
|
-
let e =
|
|
93
|
+
w(() => {
|
|
94
|
+
let e = _({
|
|
95
95
|
callback: ({ values: e }) => {
|
|
96
|
-
|
|
96
|
+
v(e);
|
|
97
97
|
},
|
|
98
98
|
formState: { values: !0 }
|
|
99
99
|
});
|
|
100
100
|
return () => e();
|
|
101
101
|
}, [
|
|
102
|
-
|
|
102
|
+
v,
|
|
103
103
|
n,
|
|
104
|
-
|
|
105
|
-
]),
|
|
106
|
-
let
|
|
104
|
+
_
|
|
105
|
+
]), g.errors && Object.keys(g.errors).length > 0 && console.table(g.errors);
|
|
106
|
+
let y = C((e) => {
|
|
107
107
|
c(e, u.item), s();
|
|
108
108
|
}, [
|
|
109
109
|
s,
|
|
110
110
|
c,
|
|
111
111
|
u.item
|
|
112
112
|
]);
|
|
113
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ O(me, {
|
|
114
114
|
disableAll: !u.canSave,
|
|
115
|
-
formFieldDefinitions:
|
|
115
|
+
formFieldDefinitions: m,
|
|
116
116
|
formId: p,
|
|
117
|
-
formMethods:
|
|
118
|
-
onSubmit: u.canSave ?
|
|
119
|
-
schema:
|
|
117
|
+
formMethods: h,
|
|
118
|
+
onSubmit: u.canSave ? ie(y) : void 0,
|
|
119
|
+
schema: ee
|
|
120
120
|
});
|
|
121
121
|
}, {
|
|
122
122
|
defaultTitle: "",
|
|
123
123
|
fullWidth: !0,
|
|
124
124
|
maxWidth: "lg",
|
|
125
125
|
testId: "CrudPageEditDialog"
|
|
126
|
-
}),
|
|
127
|
-
let { t: s } =
|
|
126
|
+
}), ve = M(({ createItemDialogTitle: e, getName: t, onActionsChange: n, onClose: r, onConfirm: i, onTitleChange: a, openProps: o }) => {
|
|
127
|
+
let { t: s } = le(), c = C(() => {
|
|
128
128
|
i(o.item), r();
|
|
129
129
|
}, [
|
|
130
130
|
r,
|
|
131
131
|
i,
|
|
132
132
|
o.item
|
|
133
133
|
]);
|
|
134
|
-
return
|
|
134
|
+
return w(() => {
|
|
135
135
|
let e = [];
|
|
136
136
|
e.push({
|
|
137
|
-
...
|
|
137
|
+
...A.createAttributes("CrudPageDeleteDialog-closeButton"),
|
|
138
138
|
autoFocus: !0,
|
|
139
139
|
color: "primary",
|
|
140
140
|
label: s`Cancel`,
|
|
141
141
|
onClick: r,
|
|
142
142
|
variant: "outlined"
|
|
143
143
|
}), e.push({
|
|
144
|
-
...
|
|
144
|
+
...A.createAttributes("CrudPageDeleteDialog-confirmButton"),
|
|
145
145
|
color: "secondary",
|
|
146
146
|
label: s`Confirm`,
|
|
147
147
|
onClick: c,
|
|
148
|
-
startIcon: /* @__PURE__ */
|
|
148
|
+
startIcon: /* @__PURE__ */ O(N, {}),
|
|
149
149
|
variant: "contained"
|
|
150
150
|
}), n(e);
|
|
151
151
|
}, [
|
|
@@ -154,7 +154,7 @@ var he = /* @__PURE__ */ e(n(), 1), ge = N(({ createItemDialogTitle: e, defaultN
|
|
|
154
154
|
o,
|
|
155
155
|
c,
|
|
156
156
|
r
|
|
157
|
-
]),
|
|
157
|
+
]), w(() => {
|
|
158
158
|
a(s("Delete item: {{itemName}}", { itemName: t(o.item) }));
|
|
159
159
|
}, [
|
|
160
160
|
t,
|
|
@@ -162,375 +162,375 @@ var he = /* @__PURE__ */ e(n(), 1), ge = N(({ createItemDialogTitle: e, defaultN
|
|
|
162
162
|
o,
|
|
163
163
|
s,
|
|
164
164
|
e
|
|
165
|
-
]), /* @__PURE__ */
|
|
165
|
+
]), /* @__PURE__ */ O(y, { children: s("Are you sure you want to delete the item \"{{itemName}}\"?", { itemName: t(o.item) }) });
|
|
166
166
|
}, {
|
|
167
167
|
defaultTitle: "",
|
|
168
168
|
fullWidth: !0,
|
|
169
169
|
maxWidth: "lg",
|
|
170
170
|
testId: "CrudPageDeleteDialog"
|
|
171
|
-
}),
|
|
172
|
-
let { t:
|
|
173
|
-
defaultSortByField:
|
|
174
|
-
defaultSortDirection:
|
|
171
|
+
}), ye = ({ associationQueryKeys: e, canEditItem: n, contentActions: d, contentHeader: ae, convertToTableData: T, createItemButtonText: D, createItemDialogTitle: A, createOne: j, crudCommandType: M, customOnRowClick: N, defaultNewItem: me, defaultSortByField: he, defaultSortDirection: ye, deleteOne: be, editDialogExtraActionsFactory: xe, extraActionsFactory: Se, extraCreateOnePermissions: Ce, extraDeleteOnePermissions: we, extraUpdateOnePermissions: Te, fetchAll: Ee, fetchAllSelect: De, formFieldDefinitions: Oe, getFormValuesFromItem: ke, getName: P, getOptimisticUpdateIntermediateItem: Ae, itemName: F, loadables: I, onCreateError: je, onCreateSuccess: Me, onDeleteError: Ne, onDeleteSuccess: Pe, onEditError: Fe, onEditSuccess: Ie, onFormChange: Le, onRowsChange: L, onShowItem: R, resourceQueryKeyBase: z, schema: Re, showIdColumn: ze = !1, subPages: B, tableColumns: Be, tableStoreStorageNamePostFix: Ve, tableStoreStorageVersion: He, testIdAttributes: Ue, title: V, updateOne: We }) => {
|
|
172
|
+
let { t: H } = le(), Ge = se(), Ke = c(), qe = ce(null), U = ce(null), W = E(() => _.resolve(o), []), G = E(() => [z], [z]), Je = E(() => i({
|
|
173
|
+
defaultSortByField: he,
|
|
174
|
+
defaultSortDirection: ye,
|
|
175
175
|
idSelectorCallback: (e) => e.id,
|
|
176
|
-
navigatorFunction:
|
|
177
|
-
storageNamePostFix:
|
|
178
|
-
storageVersion:
|
|
176
|
+
navigatorFunction: _.resolve(s).router.navigate,
|
|
177
|
+
storageNamePostFix: Ve ? `CRUDPage-${z}-${Ve}` : `CRUDPage-${z}`,
|
|
178
|
+
storageVersion: He ?? 1
|
|
179
179
|
}), [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
]),
|
|
186
|
-
enabled: !
|
|
187
|
-
queryFn: async ({ signal: e }) =>
|
|
188
|
-
queryKey:
|
|
189
|
-
select:
|
|
180
|
+
he,
|
|
181
|
+
ye,
|
|
182
|
+
z,
|
|
183
|
+
Ve,
|
|
184
|
+
He
|
|
185
|
+
]), Ye = E(() => (0, ge.default)(I) ? r.isSomeLoading(I) : !1, [I]), { data: K, error: Xe, isLoading: Ze } = m({
|
|
186
|
+
enabled: !Ye,
|
|
187
|
+
queryFn: async ({ signal: e }) => Ee(e),
|
|
188
|
+
queryKey: G,
|
|
189
|
+
select: De
|
|
190
190
|
});
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}, [
|
|
194
|
-
let
|
|
195
|
-
command_name:
|
|
191
|
+
w(() => {
|
|
192
|
+
L && K && L(K);
|
|
193
|
+
}, [L, K]);
|
|
194
|
+
let q = E(() => Ze ? !0 : Ye, [Ze, Ye]), Qe = E(() => Xe || ((0, ge.default)(I) ? I.find((e) => e.error)?.error : null), [Xe, I]), J = C((e) => ({
|
|
195
|
+
command_name: M,
|
|
196
196
|
permission_type: e
|
|
197
|
-
}), [
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
N,
|
|
201
|
-
we,
|
|
202
|
-
Ue
|
|
203
|
-
]), $e = w(() => ye ? G.doesUserHavePermission([...N ? [Y(y.DELETE)] : [], ...Ce ?? []]) : !1, [
|
|
204
|
-
G,
|
|
205
|
-
Y,
|
|
206
|
-
N,
|
|
207
|
-
ye,
|
|
208
|
-
Ce
|
|
209
|
-
]), X = w(() => !M || Ze ? !1 : G.doesUserHavePermission([...N ? [Y(y.CREATE)] : [], ...Se ?? []]), [
|
|
210
|
-
G,
|
|
197
|
+
}), [M]), $e = E(() => We ? W.doesUserHavePermission([...M ? [J(v.UPDATE)] : [], ...Te ?? []]) : !1, [
|
|
198
|
+
W,
|
|
199
|
+
J,
|
|
211
200
|
M,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
201
|
+
Te,
|
|
202
|
+
We
|
|
203
|
+
]), et = E(() => be ? W.doesUserHavePermission([...M ? [J(v.DELETE)] : [], ...we ?? []]) : !1, [
|
|
204
|
+
W,
|
|
205
|
+
J,
|
|
206
|
+
M,
|
|
207
|
+
be,
|
|
208
|
+
we
|
|
209
|
+
]), Y = E(() => !j || Qe ? !1 : W.doesUserHavePermission([...M ? [J(v.CREATE)] : [], ...Ce ?? []]), [
|
|
210
|
+
W,
|
|
211
|
+
j,
|
|
212
|
+
J,
|
|
213
|
+
M,
|
|
214
|
+
Qe,
|
|
215
|
+
Ce
|
|
216
|
+
]), tt = C((e) => {
|
|
217
217
|
let t = [];
|
|
218
|
-
return
|
|
218
|
+
return xe && t.push(...xe(e)), B?.forEach((n) => {
|
|
219
219
|
t.push({
|
|
220
220
|
color: "primary",
|
|
221
221
|
label: n.label,
|
|
222
|
-
onClick: async () => await
|
|
222
|
+
onClick: async () => await _.resolve(s).router.navigate({ pathname: n.getPathName(e) }),
|
|
223
223
|
variant: "outlined"
|
|
224
224
|
});
|
|
225
225
|
}), t;
|
|
226
|
-
}, [
|
|
227
|
-
|
|
228
|
-
canSave:
|
|
229
|
-
extraActionsFactory:
|
|
226
|
+
}, [xe, B]), X = C((e) => {
|
|
227
|
+
U.current.open({
|
|
228
|
+
canSave: $e && (!e || n ? n(e) : !0),
|
|
229
|
+
extraActionsFactory: tt,
|
|
230
230
|
item: e
|
|
231
231
|
});
|
|
232
232
|
}, [
|
|
233
233
|
n,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
]),
|
|
234
|
+
tt,
|
|
235
|
+
$e
|
|
236
|
+
]), Z = C((e) => {
|
|
237
237
|
let t;
|
|
238
238
|
try {
|
|
239
|
-
t =
|
|
239
|
+
t = P(e);
|
|
240
240
|
} catch {
|
|
241
241
|
t = void 0;
|
|
242
242
|
}
|
|
243
243
|
return t;
|
|
244
|
-
}, [
|
|
245
|
-
let t =
|
|
246
|
-
return t ?
|
|
247
|
-
itemName:
|
|
244
|
+
}, [P]), nt = C((e) => {
|
|
245
|
+
let t = Z(e);
|
|
246
|
+
return t ? H("{{itemName}} \"{{name}}\" is being saved...", {
|
|
247
|
+
itemName: F,
|
|
248
248
|
name: t
|
|
249
|
-
}) :
|
|
249
|
+
}) : H("{{itemName}} is being saved...", { itemName: F });
|
|
250
250
|
}, [
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
]),
|
|
255
|
-
let t =
|
|
256
|
-
return t ?
|
|
257
|
-
itemName:
|
|
251
|
+
H,
|
|
252
|
+
Z,
|
|
253
|
+
F
|
|
254
|
+
]), rt = C((e) => {
|
|
255
|
+
let t = Z(e);
|
|
256
|
+
return t ? H("{{itemName}} \"{{name}}\" is being saved...", {
|
|
257
|
+
itemName: F,
|
|
258
258
|
name: t
|
|
259
|
-
}) :
|
|
259
|
+
}) : H("{{itemName}} is being saved...", { itemName: F });
|
|
260
260
|
}, [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
]),
|
|
265
|
-
let t =
|
|
266
|
-
return t ?
|
|
267
|
-
itemName:
|
|
261
|
+
H,
|
|
262
|
+
Z,
|
|
263
|
+
F
|
|
264
|
+
]), it = C((e) => {
|
|
265
|
+
let t = Z(e);
|
|
266
|
+
return t ? H("{{itemName}} \"{{name}}\" is being deleted...", {
|
|
267
|
+
itemName: F,
|
|
268
268
|
name: t
|
|
269
|
-
}) :
|
|
269
|
+
}) : H("{{itemName}} is being deleted...", { itemName: F });
|
|
270
270
|
}, [
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
]),
|
|
275
|
-
let t =
|
|
276
|
-
return t ?
|
|
277
|
-
itemName:
|
|
271
|
+
H,
|
|
272
|
+
Z,
|
|
273
|
+
F
|
|
274
|
+
]), at = C((e) => {
|
|
275
|
+
let t = Z(e);
|
|
276
|
+
return t ? H("{{itemName}} \"{{name}}\" has been saved.", {
|
|
277
|
+
itemName: F,
|
|
278
278
|
name: t
|
|
279
|
-
}) :
|
|
279
|
+
}) : H("{{itemName}} has been saved.", { itemName: F });
|
|
280
280
|
}, [
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
]),
|
|
285
|
-
let t =
|
|
286
|
-
return t ?
|
|
287
|
-
itemName:
|
|
281
|
+
H,
|
|
282
|
+
Z,
|
|
283
|
+
F
|
|
284
|
+
]), ot = C((e) => {
|
|
285
|
+
let t = Z(e);
|
|
286
|
+
return t ? H("{{itemName}} \"{{name}}\" has been created.", {
|
|
287
|
+
itemName: F,
|
|
288
288
|
name: t
|
|
289
|
-
}) :
|
|
289
|
+
}) : H("{{itemName}} has been created.", { itemName: F });
|
|
290
290
|
}, [
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
]),
|
|
295
|
-
let t =
|
|
296
|
-
return t ?
|
|
297
|
-
itemName:
|
|
291
|
+
H,
|
|
292
|
+
Z,
|
|
293
|
+
F
|
|
294
|
+
]), st = C((e) => {
|
|
295
|
+
let t = Z(e);
|
|
296
|
+
return t ? H("{{itemName}} \"{{name}}\" has been deleted.", {
|
|
297
|
+
itemName: F,
|
|
298
298
|
name: t
|
|
299
|
-
}) :
|
|
299
|
+
}) : H("{{itemName}} has been deleted.", { itemName: F });
|
|
300
300
|
}, [
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
]),
|
|
305
|
-
let t =
|
|
306
|
-
return t ?
|
|
307
|
-
itemName:
|
|
301
|
+
H,
|
|
302
|
+
Z,
|
|
303
|
+
F
|
|
304
|
+
]), ct = C((e) => {
|
|
305
|
+
let t = Z(e);
|
|
306
|
+
return t ? H("{{itemName}} \"{{name}}\" could not be saved.", {
|
|
307
|
+
itemName: F,
|
|
308
308
|
name: t
|
|
309
|
-
}) :
|
|
309
|
+
}) : H("{{itemName}} could not be saved.", { itemName: F });
|
|
310
310
|
}, [
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
]),
|
|
315
|
-
let t =
|
|
316
|
-
return t ?
|
|
317
|
-
itemName:
|
|
311
|
+
H,
|
|
312
|
+
Z,
|
|
313
|
+
F
|
|
314
|
+
]), lt = C((e) => {
|
|
315
|
+
let t = Z(e);
|
|
316
|
+
return t ? H("{{itemName}} \"{{name}}\" could not be created.", {
|
|
317
|
+
itemName: F,
|
|
318
318
|
name: t
|
|
319
|
-
}) :
|
|
319
|
+
}) : H("{{itemName}} could not be created.", { itemName: F });
|
|
320
320
|
}, [
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
]),
|
|
325
|
-
let t =
|
|
326
|
-
return t ?
|
|
327
|
-
itemName:
|
|
321
|
+
H,
|
|
322
|
+
Z,
|
|
323
|
+
F
|
|
324
|
+
]), ut = C((e) => {
|
|
325
|
+
let t = Z(e);
|
|
326
|
+
return t ? H("{{itemName}} \"{{name}}\" could not be deleted.", {
|
|
327
|
+
itemName: F,
|
|
328
328
|
name: t
|
|
329
|
-
}) :
|
|
329
|
+
}) : H("{{itemName}} could not be deleted.", { itemName: F });
|
|
330
330
|
}, [
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
]),
|
|
331
|
+
H,
|
|
332
|
+
Z,
|
|
333
|
+
F
|
|
334
|
+
]), Q = E(() => {
|
|
335
335
|
let t = e ?? [];
|
|
336
|
-
return
|
|
336
|
+
return _.resolve(ne).getQueryKeyDependencies([z]).forEach((e) => {
|
|
337
337
|
t.push(e);
|
|
338
338
|
}), t;
|
|
339
|
-
}, [e,
|
|
340
|
-
associationQueryKeys:
|
|
341
|
-
getErrorNotificationMessage: st,
|
|
342
|
-
getIntermediateItem: ke,
|
|
343
|
-
getProgressNotificationMessage: tt,
|
|
344
|
-
getSuccessNotificationMessage: it,
|
|
345
|
-
onError: Pe,
|
|
346
|
-
onSuccess: Fe,
|
|
347
|
-
queryFn: Ue,
|
|
348
|
-
resourceQueryKey: K
|
|
349
|
-
}), { isMutating: $, mutate: pt } = te({
|
|
350
|
-
associationQueryKeys: ut,
|
|
339
|
+
}, [e, z]), { mutate: dt, setPreviousItem: ft } = g({
|
|
340
|
+
associationQueryKeys: Q,
|
|
351
341
|
getErrorNotificationMessage: ct,
|
|
342
|
+
getIntermediateItem: Ae,
|
|
352
343
|
getProgressNotificationMessage: nt,
|
|
353
344
|
getSuccessNotificationMessage: at,
|
|
354
|
-
onError:
|
|
355
|
-
onSuccess:
|
|
356
|
-
queryFn:
|
|
357
|
-
resourceQueryKey:
|
|
358
|
-
}), { mutate:
|
|
359
|
-
associationQueryKeys:
|
|
345
|
+
onError: Fe,
|
|
346
|
+
onSuccess: Ie,
|
|
347
|
+
queryFn: We,
|
|
348
|
+
resourceQueryKey: G
|
|
349
|
+
}), { isMutating: $, mutate: pt } = re({
|
|
350
|
+
associationQueryKeys: Q,
|
|
360
351
|
getErrorNotificationMessage: lt,
|
|
361
352
|
getProgressNotificationMessage: rt,
|
|
362
353
|
getSuccessNotificationMessage: ot,
|
|
363
|
-
onError:
|
|
364
|
-
onSuccess:
|
|
365
|
-
queryFn:
|
|
366
|
-
resourceQueryKey:
|
|
367
|
-
}),
|
|
354
|
+
onError: je,
|
|
355
|
+
onSuccess: Me,
|
|
356
|
+
queryFn: j,
|
|
357
|
+
resourceQueryKey: G
|
|
358
|
+
}), { mutate: mt } = h({
|
|
359
|
+
associationQueryKeys: Q,
|
|
360
|
+
getErrorNotificationMessage: ut,
|
|
361
|
+
getProgressNotificationMessage: it,
|
|
362
|
+
getSuccessNotificationMessage: st,
|
|
363
|
+
onError: Ne,
|
|
364
|
+
onSuccess: Pe,
|
|
365
|
+
queryFn: be,
|
|
366
|
+
resourceQueryKey: G
|
|
367
|
+
}), ht = C((e, t) => {
|
|
368
368
|
t?.id ? (ft(t), dt(e)) : pt(e);
|
|
369
369
|
}, [
|
|
370
370
|
pt,
|
|
371
371
|
dt,
|
|
372
372
|
ft
|
|
373
|
-
]), gt =
|
|
374
|
-
|
|
375
|
-
}, [
|
|
376
|
-
|
|
373
|
+
]), gt = C((e) => {
|
|
374
|
+
X(e.row);
|
|
375
|
+
}, [X]), _t = C((e) => {
|
|
376
|
+
N ? N(e) : R ? R(e) : X(e.row);
|
|
377
377
|
}, [
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
]), vt =
|
|
378
|
+
N,
|
|
379
|
+
R,
|
|
380
|
+
X
|
|
381
|
+
]), vt = C((e) => {
|
|
382
382
|
mt(e);
|
|
383
|
-
}, [mt]), yt =
|
|
384
|
-
let t = [], n =
|
|
385
|
-
return n?.length > 0 && t.push(...n),
|
|
386
|
-
t.push(/* @__PURE__ */
|
|
387
|
-
onClick: async () => await
|
|
388
|
-
children: [/* @__PURE__ */
|
|
383
|
+
}, [mt]), yt = C((e) => {
|
|
384
|
+
let t = [], n = Se ? Se(e) : [];
|
|
385
|
+
return n?.length > 0 && t.push(...n), B?.forEach((n) => {
|
|
386
|
+
t.push(/* @__PURE__ */ k(S, {
|
|
387
|
+
onClick: async () => await _.resolve(s).router.navigate({ pathname: n.getPathName(e.row) }),
|
|
388
|
+
children: [/* @__PURE__ */ O(b, { children: n.icon ? n.icon : /* @__PURE__ */ O(fe, {}) }), /* @__PURE__ */ O(x, { children: n.label })]
|
|
389
389
|
}, n.label));
|
|
390
|
-
}),
|
|
391
|
-
onClick: () =>
|
|
390
|
+
}), Y && t.push(/* @__PURE__ */ k(S, {
|
|
391
|
+
onClick: () => U.current.open({
|
|
392
392
|
canSave: !0,
|
|
393
393
|
item: {
|
|
394
394
|
...e.row,
|
|
395
395
|
id: null
|
|
396
396
|
}
|
|
397
397
|
}),
|
|
398
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(pe, {}) }), /* @__PURE__ */ O(x, { children: H`Clone` })]
|
|
399
399
|
}, "clone")), t;
|
|
400
400
|
}, [
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
]), bt =
|
|
401
|
+
Se,
|
|
402
|
+
B,
|
|
403
|
+
Y,
|
|
404
|
+
H
|
|
405
|
+
]), bt = E(() => {
|
|
406
406
|
let e = [t.createReadableIndexColumn()];
|
|
407
|
-
return
|
|
408
|
-
headerName:
|
|
407
|
+
return ze && e.push({
|
|
408
|
+
headerName: H`Id`,
|
|
409
409
|
id: "id",
|
|
410
410
|
isInitiallyVisible: !0,
|
|
411
411
|
type: "text",
|
|
412
412
|
widthPx: 300
|
|
413
|
-
}), e.push(...
|
|
413
|
+
}), e.push(...Be), e.push(t.createActionsColumn({
|
|
414
414
|
getActions: (e) => {
|
|
415
415
|
let t = [];
|
|
416
|
-
|
|
417
|
-
onClick: () =>
|
|
418
|
-
children: [/* @__PURE__ */
|
|
419
|
-
}, "actions1")), t.push(/* @__PURE__ */
|
|
416
|
+
R && t.push(/* @__PURE__ */ k(S, {
|
|
417
|
+
onClick: () => R(e),
|
|
418
|
+
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(fe, {}) }), /* @__PURE__ */ O(x, { children: H`Show` })]
|
|
419
|
+
}, "actions1")), t.push(/* @__PURE__ */ k(S, {
|
|
420
420
|
onClick: () => gt(e),
|
|
421
|
-
children: [/* @__PURE__ */
|
|
422
|
-
}, "actions2")),
|
|
423
|
-
onClick: () =>
|
|
424
|
-
children: [/* @__PURE__ */
|
|
421
|
+
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(ue, {}) }), /* @__PURE__ */ O(x, { children: H`Edit` })]
|
|
422
|
+
}, "actions2")), et && t.push(/* @__PURE__ */ k(S, {
|
|
423
|
+
onClick: () => qe.current.open({ item: e.row }),
|
|
424
|
+
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(de, {}) }), /* @__PURE__ */ O(x, { children: H`Delete` })]
|
|
425
425
|
}, "actions3"));
|
|
426
426
|
let n = yt(e) ?? [];
|
|
427
427
|
return n?.length > 0 && t.length > 0 && t.push(...n), t;
|
|
428
428
|
},
|
|
429
|
-
t:
|
|
429
|
+
t: H
|
|
430
430
|
})), e;
|
|
431
431
|
}, [
|
|
432
432
|
yt,
|
|
433
433
|
gt,
|
|
434
|
-
|
|
435
|
-
Re,
|
|
436
|
-
U,
|
|
434
|
+
R,
|
|
437
435
|
ze,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
436
|
+
H,
|
|
437
|
+
Be,
|
|
438
|
+
et
|
|
439
|
+
]), xt = E(() => T ? T(K) : K, [T, K]);
|
|
440
|
+
ie({
|
|
441
441
|
columns: bt,
|
|
442
442
|
context: null,
|
|
443
443
|
createFiltersFromColumns: !0,
|
|
444
444
|
rows: xt,
|
|
445
|
-
store:
|
|
445
|
+
store: Je
|
|
446
446
|
});
|
|
447
|
-
let St =
|
|
448
|
-
|
|
449
|
-
}, []), Ct =
|
|
447
|
+
let St = C(() => {
|
|
448
|
+
U.current.open({ canSave: !0 });
|
|
449
|
+
}, []), Ct = E(() => !d && !Y ? /* @__PURE__ */ O(f, {}) : /* @__PURE__ */ k(y, {
|
|
450
450
|
sx: {
|
|
451
451
|
alignItems: "center",
|
|
452
452
|
display: "flex",
|
|
453
|
-
gap:
|
|
453
|
+
gap: Ge.spacing(1)
|
|
454
454
|
},
|
|
455
455
|
children: [
|
|
456
|
-
/* @__PURE__ */
|
|
457
|
-
|
|
456
|
+
/* @__PURE__ */ O(f, {}),
|
|
457
|
+
Y && /* @__PURE__ */ O(oe, {
|
|
458
458
|
color: "secondary",
|
|
459
|
-
disabled:
|
|
460
|
-
loading:
|
|
459
|
+
disabled: q || $,
|
|
460
|
+
loading: q || $,
|
|
461
461
|
onClick: St,
|
|
462
462
|
size: "small",
|
|
463
463
|
variant: "contained",
|
|
464
|
-
children:
|
|
464
|
+
children: D ?? H`Create item`
|
|
465
465
|
}),
|
|
466
|
-
|
|
466
|
+
d
|
|
467
467
|
]
|
|
468
468
|
}), [
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
469
|
+
d,
|
|
470
|
+
Y,
|
|
471
|
+
q,
|
|
472
472
|
$,
|
|
473
473
|
St,
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
]), wt =
|
|
478
|
-
return /* @__PURE__ */
|
|
479
|
-
store:
|
|
480
|
-
children: /* @__PURE__ */
|
|
474
|
+
D,
|
|
475
|
+
H,
|
|
476
|
+
Ge
|
|
477
|
+
]), wt = E(() => (0, ge.default)(V) ? V.join(" -> ") : V, [V]);
|
|
478
|
+
return /* @__PURE__ */ O(a, {
|
|
479
|
+
store: Je,
|
|
480
|
+
children: /* @__PURE__ */ k(l, {
|
|
481
481
|
contentActions: Ct,
|
|
482
|
-
contentHeader: /* @__PURE__ */
|
|
483
|
-
caption:
|
|
482
|
+
contentHeader: /* @__PURE__ */ O(p, {
|
|
483
|
+
caption: ae ?? wt,
|
|
484
484
|
component: "h2",
|
|
485
485
|
variant: "h2"
|
|
486
486
|
}),
|
|
487
487
|
fullWidth: !0,
|
|
488
488
|
showBreadcrumbs: !0,
|
|
489
|
-
testIdAttributes:
|
|
489
|
+
testIdAttributes: Ue,
|
|
490
490
|
title: wt,
|
|
491
491
|
children: [
|
|
492
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ O(y, {
|
|
493
493
|
sx: {
|
|
494
494
|
height: "100%",
|
|
495
495
|
position: "relative"
|
|
496
496
|
},
|
|
497
|
-
children: /* @__PURE__ */
|
|
498
|
-
error:
|
|
499
|
-
isLoading:
|
|
500
|
-
children: [/* @__PURE__ */
|
|
497
|
+
children: /* @__PURE__ */ k(u, {
|
|
498
|
+
error: Qe,
|
|
499
|
+
isLoading: q,
|
|
500
|
+
children: [/* @__PURE__ */ O(te, {}), /* @__PURE__ */ O(y, {
|
|
501
501
|
sx: {
|
|
502
502
|
height: "100%",
|
|
503
|
-
paddingLeft:
|
|
503
|
+
paddingLeft: Ge.spacing(Ke.layout.SIDEBAR_MENU_WIDTH + 1),
|
|
504
504
|
width: "100%"
|
|
505
505
|
},
|
|
506
|
-
children: /* @__PURE__ */
|
|
507
|
-
getRowName:
|
|
506
|
+
children: /* @__PURE__ */ O(ee, {
|
|
507
|
+
getRowName: P,
|
|
508
508
|
onRowClick: _t
|
|
509
509
|
})
|
|
510
510
|
})]
|
|
511
511
|
})
|
|
512
512
|
}),
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
createItemDialogTitle:
|
|
515
|
-
defaultNewItem:
|
|
516
|
-
formFieldDefinitions:
|
|
517
|
-
getFormValuesFromItem:
|
|
518
|
-
getName:
|
|
519
|
-
onChange:
|
|
513
|
+
/* @__PURE__ */ O(_e, {
|
|
514
|
+
createItemDialogTitle: A,
|
|
515
|
+
defaultNewItem: me,
|
|
516
|
+
formFieldDefinitions: Oe,
|
|
517
|
+
getFormValuesFromItem: ke,
|
|
518
|
+
getName: P,
|
|
519
|
+
onChange: Le,
|
|
520
520
|
onSave: ht,
|
|
521
|
-
ref:
|
|
522
|
-
schema:
|
|
521
|
+
ref: U,
|
|
522
|
+
schema: Re
|
|
523
523
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
525
|
-
getName:
|
|
524
|
+
/* @__PURE__ */ O(ve, {
|
|
525
|
+
getName: P,
|
|
526
526
|
onConfirm: vt,
|
|
527
|
-
ref:
|
|
527
|
+
ref: qe
|
|
528
528
|
})
|
|
529
529
|
]
|
|
530
530
|
})
|
|
531
531
|
});
|
|
532
532
|
};
|
|
533
533
|
//#endregion
|
|
534
|
-
export {
|
|
534
|
+
export { ye as t };
|
|
535
535
|
|
|
536
536
|
//# sourceMappingURL=CrudPage.js.map
|