@gen-epix/ui-client-common 4.1.0 → 4.3.0

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