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