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