@gen-epix/ui-client-common 4.5.1 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/@types/mui.d.ts +13 -11
  2. package/dist/_chunks/ApplicationFooter.js +32 -23
  3. package/dist/_chunks/ApplicationFooter.js.map +1 -1
  4. package/dist/_chunks/Breadcrumbs.js +1 -2
  5. package/dist/_chunks/CrudPage.js +221 -226
  6. package/dist/_chunks/CrudPage.js.map +1 -1
  7. package/dist/_chunks/GeoFilter.js +1 -2
  8. package/dist/_chunks/GeoFilter.js.map +1 -1
  9. package/dist/_chunks/Notifications.js +1 -2
  10. package/dist/_chunks/OutageList.js +1 -2
  11. package/dist/_chunks/OutageList.js.map +1 -1
  12. package/dist/_chunks/OutageUtil.js +3 -6
  13. package/dist/_chunks/OutageUtil.js.map +1 -1
  14. package/dist/_chunks/QueryClientProvider.js +1 -2
  15. package/dist/_chunks/QueryClientProvider.js.map +1 -1
  16. package/dist/_chunks/QueryClientService.js +6 -8
  17. package/dist/_chunks/QueryClientService.js.map +1 -1
  18. package/dist/_chunks/Reflect.js +1 -2
  19. package/dist/_chunks/Table.js +5 -10
  20. package/dist/_chunks/Table.js.map +1 -1
  21. package/dist/_chunks/TableUtil.js +2 -4
  22. package/dist/_chunks/TableUtil.js.map +1 -1
  23. package/dist/_chunks/TextFilter.js +4 -8
  24. package/dist/_chunks/TextFilter.js.map +1 -1
  25. package/dist/_chunks/UserInvitationsAdminPage.js +1 -2
  26. package/dist/_chunks/UserManagerUtil.js +2 -4
  27. package/dist/_chunks/UserManagerUtil.js.map +1 -1
  28. package/dist/_chunks/_baseAssignValue.js +1 -2
  29. package/dist/_chunks/_baseFlatten.js +1 -2
  30. package/dist/_chunks/_baseGet.js +1 -2
  31. package/dist/_chunks/_baseIteratee.js +1 -2
  32. package/dist/_chunks/_baseUnset.js +1 -2
  33. package/dist/_chunks/_cacheHas.js +1 -2
  34. package/dist/_chunks/_setToString.js +1 -2
  35. package/dist/_chunks/decorate.js +1 -2
  36. package/dist/_chunks/decorateParam.js +1 -2
  37. package/dist/_chunks/format.js +27 -54
  38. package/dist/_chunks/format.js.map +1 -1
  39. package/dist/_chunks/isArrayLike.js +1 -2
  40. package/dist/_chunks/isObject.js +1 -2
  41. package/dist/_chunks/isSymbol.js +1 -2
  42. package/dist/_chunks/last.js +1 -2
  43. package/dist/_chunks/middleware.js +2 -3
  44. package/dist/_chunks/middleware.js.map +1 -1
  45. package/dist/_chunks/omit.js +1 -2
  46. package/dist/_chunks/query.js +8 -15
  47. package/dist/_chunks/query.js.map +1 -1
  48. package/dist/_chunks/react.js +2 -3
  49. package/dist/_chunks/react.js.map +1 -1
  50. package/dist/_chunks/rolldown-runtime.js +2 -3
  51. package/dist/_chunks/tableStore.js +171 -171
  52. package/dist/_chunks/tableStore.js.map +1 -1
  53. package/dist/_chunks/toDate.js +8 -14
  54. package/dist/_chunks/toDate.js.map +1 -1
  55. package/dist/_chunks/uniq.js +1 -2
  56. package/dist/_chunks/useColumnsMenu.js +3 -6
  57. package/dist/_chunks/useColumnsMenu.js.map +1 -1
  58. package/dist/_chunks/useMutation.js +2 -4
  59. package/dist/_chunks/useMutation.js.map +1 -1
  60. package/dist/_chunks/useQueryMemo.js +8 -14
  61. package/dist/_chunks/useQueryMemo.js.map +1 -1
  62. package/dist/_chunks/vanilla.js +1 -2
  63. package/dist/_chunks/vanilla.js.map +1 -1
  64. package/dist/_chunks/yup.js +2 -4
  65. package/dist/_chunks/yup.js.map +1 -1
  66. package/dist/classes/TableEventBus/index.js +1 -2
  67. package/dist/classes/abstracts/FilterAbstract/index.js +1 -2
  68. package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
  69. package/dist/classes/services/AuthenticationService/index.js +0 -1
  70. package/dist/classes/services/AuthenticationService/index.js.map +1 -1
  71. package/dist/classes/services/AuthorizationService/index.js +1 -2
  72. package/dist/classes/services/BackendVersionService/index.js +1 -2
  73. package/dist/classes/services/BreadcrumbService/index.js +1 -2
  74. package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
  75. package/dist/classes/services/EmotionCacheService/index.js +1 -2
  76. package/dist/classes/services/FeatureFlagsService/index.js +1 -2
  77. package/dist/classes/services/I18nService/index.js +1 -2
  78. package/dist/classes/services/InactivityService/index.js +1 -2
  79. package/dist/classes/services/InactivityService/index.js.map +1 -1
  80. package/dist/classes/services/LogService/index.js +1 -2
  81. package/dist/classes/services/NavigationHistoryService/index.js +1 -2
  82. package/dist/classes/services/NotificationService/index.js +1 -2
  83. package/dist/classes/services/PageEventBusService/index.js +1 -2
  84. package/dist/classes/services/RouterService/index.js +1 -2
  85. package/dist/classes/services/UserSettingsService/index.js +1 -2
  86. package/dist/components/app/App/index.js +1 -2
  87. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +1 -2
  88. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
  89. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +1 -2
  90. package/dist/components/app/AuthenticationWrapper/index.js +1 -2
  91. package/dist/components/app/AuthorizationWrapper/index.js +1 -2
  92. package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
  93. package/dist/components/app/RouterRoot/index.js +1 -2
  94. package/dist/components/epi/EpiContactDetailsDialog/index.js +1 -2
  95. package/dist/components/filters/BooleanFilterField/index.js +1 -2
  96. package/dist/components/filters/DateFilterField/index.js +1 -2
  97. package/dist/components/filters/GeoFilterField/index.js +1 -2
  98. package/dist/components/filters/MultiSelectFilterField/index.js +1 -2
  99. package/dist/components/filters/NumberRangeFilterField/index.js +1 -2
  100. package/dist/components/filters/TextFilterField/index.js +1 -2
  101. package/dist/components/ui/ApplicationBar/ApplicationBar.d.ts +4 -0
  102. package/dist/components/ui/ApplicationBar/ApplicationBarActions.d.ts +5 -0
  103. package/dist/components/ui/ApplicationBar/ApplicationBarNavigationMenu.d.ts +6 -0
  104. package/dist/components/ui/ApplicationBar/index.js +109 -95
  105. package/dist/components/ui/ApplicationBar/index.js.map +1 -1
  106. package/dist/components/ui/ApplicationFooter/ApplicationFooter.d.ts +3 -0
  107. package/dist/components/ui/ApplicationFooter/ApplicationFooterLink.d.ts +3 -0
  108. package/dist/components/ui/ApplicationFooter/ApplicationFooterLinkSection.d.ts +4 -0
  109. package/dist/components/ui/ConsentDialog/index.js +1 -2
  110. package/dist/components/ui/GenericErrorMessage/index.js +1 -2
  111. package/dist/components/ui/LicensesDialog/index.js +1 -2
  112. package/dist/components/ui/MyPermissionsDialog/index.js +1 -2
  113. package/dist/components/ui/NavLink/index.js +1 -2
  114. package/dist/components/ui/OrganizationSwitcherDialog/index.js +1 -2
  115. package/dist/components/ui/OutagesDialog/index.js +1 -2
  116. package/dist/components/ui/PageContainer/index.js +1 -2
  117. package/dist/components/ui/ResponseHandler/index.js +1 -2
  118. package/dist/components/ui/Sidebar/index.js +1 -2
  119. package/dist/components/ui/UserFeedbackDialog/index.js +1 -2
  120. package/dist/components/ui/UserInactivityConfirmation/index.js +1 -2
  121. package/dist/constants/api.constants.js +1 -2
  122. package/dist/constants/config.constants.js +1 -2
  123. package/dist/constants/query.constants.js +1 -2
  124. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +1 -2
  125. package/dist/dataHooks/useIdentifierIssuerQuery/index.js +1 -2
  126. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +1 -2
  127. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +1 -2
  128. package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +1 -2
  129. package/dist/dataHooks/useOrganizationsQuery/index.js +1 -2
  130. package/dist/dataHooks/useUsersQuery/index.js +1 -2
  131. package/dist/hoc/withPermissions/index.js +1 -2
  132. package/dist/hooks/useConfig/index.js +1 -2
  133. package/dist/hooks/useCreateMutation/index.js +1 -2
  134. package/dist/hooks/useDeleteMutation/index.js +1 -2
  135. package/dist/hooks/useEditMutation/index.js +37 -42
  136. package/dist/hooks/useEditMutation/index.js.map +1 -1
  137. package/dist/hooks/useEditMutation/useEditMutation.d.ts +1 -2
  138. package/dist/hooks/useInitializeTableStore/index.js +1 -2
  139. package/dist/hooks/useItemQuery/index.js +1 -2
  140. package/dist/hooks/useUpdateBreadcrumb/index.js +1 -2
  141. package/dist/hooks/useUpdateDocumentTitle/index.js +1 -2
  142. package/dist/models/admin.models.js +1 -2
  143. package/dist/models/admin.models.js.map +1 -1
  144. package/dist/models/table.models.js +1 -2
  145. package/dist/models/table.models.js.map +1 -1
  146. package/dist/pages/AcceptInvitationPage/index.js +1 -2
  147. package/dist/pages/AdminPage/index.js +1 -2
  148. package/dist/pages/ChooseIdentityProviderPage/index.js +1 -2
  149. package/dist/pages/ErrorPage/index.js +1 -2
  150. package/dist/pages/IdentifierIssuersAdminPage/index.js +1 -2
  151. package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +1 -2
  152. package/dist/pages/OrganizationContactsAdminPage/index.js +1 -2
  153. package/dist/pages/OrganizationSitesAdminPage/index.js +1 -2
  154. package/dist/pages/OrganizationsAdminPage/index.js +1 -2
  155. package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
  156. package/dist/pages/OutagesAdminPage/index.js +1 -2
  157. package/dist/pages/PostLoginPage/index.js +2 -3
  158. package/dist/pages/PostLoginPage/index.js.map +1 -1
  159. package/dist/pages/PostLogoutPage/index.js +1 -2
  160. package/dist/pages/RouterErrorPage/index.js +1 -2
  161. package/dist/pages/UsersAdminPage/index.js +1 -2
  162. package/dist/routes/index.js +1 -2
  163. package/dist/setup/setup.js +1 -2
  164. package/dist/stores/oidcStore/index.js +1 -2
  165. package/dist/stores/outagesStore/index.js +1 -2
  166. package/dist/theme/demoTheme/index.js +16 -9
  167. package/dist/theme/demoTheme/index.js.map +1 -1
  168. package/dist/utils/AxiosUtil/index.js +1 -2
  169. package/dist/utils/DataHookUtil/index.js +1 -2
  170. package/dist/utils/DependencyContainerUtil/index.js +0 -1
  171. package/dist/utils/LoadableUtil/index.js +1 -2
  172. package/dist/utils/MenuDataUtil/index.js +1 -2
  173. package/dist/utils/NotificationUtil/index.js +1 -2
  174. package/dist/utils/StandardConfigUtil/index.js +1 -2
  175. package/dist/utils/TimeUtil/index.js +1 -2
  176. package/dist/utils/UserUtil/index.js +1 -2
  177. package/package.json +25 -29
  178. package/dist/models/theme.models.d.ts +0 -20
  179. package/dist/models/theme.models.js +0 -0
@@ -5,7 +5,7 @@ import { t as r } from "../../_chunks/QueryClientService.js";
5
5
  import { COMMON_QUERY_KEY as i } from "../../constants/query.constants.js";
6
6
  import { container as a } from "tsyringe";
7
7
  import { useMemo as o } from "react";
8
- //#region src/dataHooks/useIdentifierIssuerQuery/useIdentifierIssuerQuery.ts
8
+ // src/dataHooks/useIdentifierIssuerQuery/useIdentifierIssuerQuery.ts
9
9
  var s = (e) => n({
10
10
  queryFn: async ({ signal: e }) => (await a.resolve(t).identifierIssuersGetAll(null, null, { signal: e })).data,
11
11
  queryKey: a.resolve(r).getGenericKey(i.IDENTIFIER_ISSUERS),
@@ -17,7 +17,6 @@ var s = (e) => n({
17
17
  let n = s(t);
18
18
  return o(() => e.createUseOptionsDataHook(n, (e) => e.id, (e) => e.name), [n]);
19
19
  };
20
- //#endregion
21
20
  export { c as useIdentifierIssuerMapQuery, l as useIdentifierIssuerOptionsQuery, s as useIdentifierIssuersQuery };
22
21
 
23
22
  //# sourceMappingURL=index.js.map
@@ -5,7 +5,7 @@ import { t as r } from "../../_chunks/QueryClientService.js";
5
5
  import { COMMON_QUERY_KEY as i } from "../../constants/query.constants.js";
6
6
  import { container as a } from "tsyringe";
7
7
  import { CommonDbCommandName as o, CommonDbPermissionType as s } from "@gen-epix/api-commondb";
8
- //#region src/dataHooks/useInviteUserConstraintsQuery/useInviteUserConstraintsQuery.ts
8
+ // src/dataHooks/useInviteUserConstraintsQuery/useInviteUserConstraintsQuery.ts
9
9
  var c = () => n({
10
10
  queryFn: async ({ signal: n }) => a.resolve(t).doesUserHavePermission([{
11
11
  command_name: o.RetrieveInviteUserConstraintsCommand,
@@ -16,7 +16,6 @@ var c = () => n({
16
16
  },
17
17
  queryKey: a.resolve(r).getGenericKey(i.INVITE_USER_CONSTRAINTS)
18
18
  });
19
- //#endregion
20
19
  export { c as useInviteUserConstraintsQuery };
21
20
 
22
21
  //# sourceMappingURL=index.js.map
@@ -9,7 +9,7 @@ import { useUsersMapQuery as s } from "../useUsersQuery/index.js";
9
9
  import { container as c } from "tsyringe";
10
10
  import { useMemo as l } from "react";
11
11
  import { useTranslation as u } from "react-i18next";
12
- //#region src/dataHooks/useOrganizationAdminPoliciesQuery/useOrganizationAdminPoliciesQuery.ts
12
+ // src/dataHooks/useOrganizationAdminPoliciesQuery/useOrganizationAdminPoliciesQuery.ts
13
13
  var d = () => r({
14
14
  queryFn: async ({ signal: e }) => (await c.resolve(n).organizationAdminPoliciesGetAll(null, null, { signal: e })).data,
15
15
  queryKey: c.resolve(i).getGenericKey(a.ORGANIZATION_ADMIN_POLICIES)
@@ -27,7 +27,6 @@ var d = () => r({
27
27
  let e = d(), n = p();
28
28
  return l(() => t.createUseOptionsDataHook(e, (e) => e.id, n.getName, [n]), [n, e]);
29
29
  };
30
- //#endregion
31
30
  export { d as useOrganizationAdminPoliciesQuery, f as useOrganizationAdminPolicyMapQuery, p as useOrganizationAdminPolicyNameFactory, m as useOrganizationAdminPolicyOptionsQuery };
32
31
 
33
32
  //# sourceMappingURL=index.js.map
@@ -3,12 +3,11 @@ import { t } from "../../_chunks/useQueryMemo.js";
3
3
  import { t as n } from "../../_chunks/QueryClientService.js";
4
4
  import { COMMON_QUERY_KEY as r } from "../../constants/query.constants.js";
5
5
  import { container as i } from "tsyringe";
6
- //#region src/dataHooks/useOrganizationIdentifierIssuerLinksQuery/useOrganizationIdentifierIssuerLinksQuery.ts
6
+ // src/dataHooks/useOrganizationIdentifierIssuerLinksQuery/useOrganizationIdentifierIssuerLinksQuery.ts
7
7
  var a = () => t({
8
8
  queryFn: async ({ signal: t }) => (await i.resolve(e).organizationIdentifierIssuerLinksGetAll(null, null, { signal: t })).data,
9
9
  queryKey: i.resolve(n).getGenericKey(r.IDENTIFIER_ISSUER_LINKS)
10
10
  });
11
- //#endregion
12
11
  export { a as useOrganizationIdentifierIssuerLinksQuery };
13
12
 
14
13
  //# sourceMappingURL=index.js.map
@@ -6,7 +6,7 @@ import { COMMON_QUERY_KEY as i } from "../../constants/query.constants.js";
6
6
  import { container as a } from "tsyringe";
7
7
  import { StringUtil as o } from "@gen-epix/ui-core/utils/StringUtil";
8
8
  import { useMemo as s } from "react";
9
- //#region src/dataHooks/useOrganizationsQuery/useOrganizationsQuery.ts
9
+ // src/dataHooks/useOrganizationsQuery/useOrganizationsQuery.ts
10
10
  var c = () => n({
11
11
  queryFn: async ({ signal: e }) => (await a.resolve(t).organizationsGetAll(null, null, { signal: e })).data,
12
12
  queryKey: a.resolve(r).getGenericKey(i.ORGANIZATIONS)
@@ -17,7 +17,6 @@ var c = () => n({
17
17
  let t = c();
18
18
  return s(() => e.createUseOptionsDataHook(t, (e) => e.id, (e) => e.name, [], (e, t) => o.advancedSortComperator(e.name, t.name)), [t]);
19
19
  };
20
- //#endregion
21
20
  export { l as useOrganizationMapQuery, u as useOrganizationOptionsQuery, c as useOrganizationsQuery };
22
21
 
23
22
  //# sourceMappingURL=index.js.map
@@ -7,7 +7,7 @@ import { COMMON_QUERY_KEY as a } from "../../constants/query.constants.js";
7
7
  import { container as o } from "tsyringe";
8
8
  import { useMemo as s } from "react";
9
9
  import { useTranslation as c } from "react-i18next";
10
- //#region src/dataHooks/useUsersQuery/useUsersQuery.ts
10
+ // src/dataHooks/useUsersQuery/useUsersQuery.ts
11
11
  var l = () => r({
12
12
  queryFn: async ({ signal: e }) => (await o.resolve(n).usersGetAll(null, null, { signal: e })).data,
13
13
  queryKey: o.resolve(i).getGenericKey(a.USERS)
@@ -18,7 +18,6 @@ var l = () => r({
18
18
  let n = l(), { t: r } = c();
19
19
  return s(() => t.createUseOptionsDataHook(n, (e) => e.id, (t) => e.getUserDisplayValue(t, r)), [r, n]);
20
20
  };
21
- //#endregion
22
21
  export { d as useUserOptionsQuery, u as useUsersMapQuery, l as useUsersQuery };
23
22
 
24
23
  //# sourceMappingURL=index.js.map
@@ -2,7 +2,7 @@ import { AuthorizationService as e } from "../../classes/services/AuthorizationS
2
2
  import { container as t } from "tsyringe";
3
3
  import { useMemo as n } from "react";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
- //#region src/hoc/withPermissions/withPermissions.tsx
5
+ // src/hoc/withPermissions/withPermissions.tsx
6
6
  var i = (i, a) => {
7
7
  let o = (o) => {
8
8
  if (!n(() => t.resolve(e), []).doesUserHavePermission(a.requiredPermissions)) {
@@ -16,7 +16,6 @@ var i = (i, a) => {
16
16
  };
17
17
  return o.displayName = `withPermissions(${i.displayName || i.name})`, o;
18
18
  };
19
- //#endregion
20
19
  export { i as withPermissions };
21
20
 
22
21
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,6 @@
1
1
  import { DependencyContainerUtil as e } from "../../utils/DependencyContainerUtil/index.js";
2
- //#region src/hooks/useConfig/useConfig.ts
2
+ // src/hooks/useConfig/useConfig.ts
3
3
  var t = () => e.resolveConfig();
4
- //#endregion
5
4
  export { t as useConfig };
6
5
 
7
6
  //# sourceMappingURL=index.js.map
@@ -6,7 +6,7 @@ import { container as i } from "tsyringe";
6
6
  import { StringUtil as a } from "@gen-epix/ui-core/utils/StringUtil";
7
7
  import { useMemo as o } from "react";
8
8
  import { ObjectUtil as s } from "@gen-epix/ui-core/utils/ObjectUtil";
9
- //#region src/hooks/useCreateMutation/useCreateMutation.ts
9
+ // src/hooks/useCreateMutation/useCreateMutation.ts
10
10
  var c = ({ associationQueryKeys: c, getErrorNotificationMessage: l, getProgressNotificationMessage: u, getSuccessNotificationMessage: d, onError: f, onSuccess: p, queryFn: m, resourceQueryKey: h }) => {
11
11
  let g = i.resolve(t).queryClient, _ = n({
12
12
  mutationFn: async (e) => m(s.deepNullifyEmptyStrings(e)),
@@ -45,7 +45,6 @@ var c = ({ associationQueryKeys: c, getErrorNotificationMessage: l, getProgressN
45
45
  mutate: v
46
46
  }), [y, v]);
47
47
  };
48
- //#endregion
49
48
  export { c as useCreateMutation };
50
49
 
51
50
  //# sourceMappingURL=index.js.map
@@ -4,7 +4,7 @@ import { t as n } from "../../_chunks/useMutation.js";
4
4
  import { NotificationService as r } from "../../classes/services/NotificationService/index.js";
5
5
  import { container as i } from "tsyringe";
6
6
  import { useMemo as a } from "react";
7
- //#region src/hooks/useDeleteMutation/useDeleteMutation.ts
7
+ // src/hooks/useDeleteMutation/useDeleteMutation.ts
8
8
  var o = ({ associationQueryKeys: o, getErrorNotificationMessage: s, getProgressNotificationMessage: c, getSuccessNotificationMessage: l, onError: u, onSuccess: d, queryFn: f, resourceQueryKey: p }) => {
9
9
  let m = i.resolve(t).queryClient, h = n({
10
10
  mutationFn: async (e) => {
@@ -43,7 +43,6 @@ var o = ({ associationQueryKeys: o, getErrorNotificationMessage: s, getProgressN
43
43
  mutate: g
44
44
  }), [_, g]);
45
45
  };
46
- //#endregion
47
46
  export { o as useDeleteMutation };
48
47
 
49
48
  //# sourceMappingURL=index.js.map
@@ -3,71 +3,66 @@ import { t } from "../../_chunks/QueryClientService.js";
3
3
  import { t as n } from "../../_chunks/useMutation.js";
4
4
  import { NotificationService as r } from "../../classes/services/NotificationService/index.js";
5
5
  import { container as i } from "tsyringe";
6
- import { useCallback as a, useMemo as o, useRef as s } from "react";
7
- import { ObjectUtil as c } from "@gen-epix/ui-core/utils/ObjectUtil";
8
- //#region src/hooks/useEditMutation/useEditMutation.ts
9
- var l = (e) => !Array.isArray(e), u = ({ associationQueryKeys: u, getErrorNotificationMessage: d, getIntermediateItem: f, getProgressNotificationMessage: p, getSuccessNotificationMessage: m, onError: h, onSuccess: g, queryFn: _, resourceQueryKey: v }) => {
10
- let y = i.resolve(t).queryClient, b = s(void 0), x = a((e) => {
11
- b.current = e;
12
- }, []), S = a(async (e) => {
13
- if (!_) throw Error("Edit mutation queryFn is required");
14
- return _(c.deepNullifyEmptyStrings(e), b.current);
15
- }, [b, _]), C = n({
16
- mutationFn: S,
6
+ import { useCallback as a, useMemo as o } from "react";
7
+ import { ObjectUtil as s } from "@gen-epix/ui-core/utils/ObjectUtil";
8
+ // src/hooks/useEditMutation/useEditMutation.ts
9
+ var c = (e) => !Array.isArray(e), l = ({ associationQueryKeys: l, getErrorNotificationMessage: u, getIntermediateItem: d, getProgressNotificationMessage: f, getSuccessNotificationMessage: p, onError: m, onSuccess: h, queryFn: g, resourceQueryKey: _ }) => {
10
+ let v = i.resolve(t).queryClient, y = a(async ({ previousItem: e, variables: t }) => {
11
+ if (!g) throw Error("Edit mutation queryFn is required");
12
+ return g(s.deepNullifyEmptyStrings(t), e);
13
+ }, [g]), b = n({
14
+ mutationFn: y,
17
15
  onError: async (n, a, o) => {
18
- b.current = void 0;
19
16
  let s = o ?? {};
20
- v && Array.isArray(s.previousData) && y.setQueryData(v, s.previousData), await i.resolve(t).invalidateQueryKeys(u), h && await h(n, a, s);
21
- let c = s.item ? d(s.item, a, n) : String(n);
17
+ _ && Array.isArray(s.previousData) && v.setQueryData(_, s.previousData), await i.resolve(t).invalidateQueryKeys(l), m && await m(n, a.variables, s);
18
+ let c = s.item ? u(s.item, a.variables, n) : String(n);
22
19
  s.notificationKey && i.resolve(r).fulfillNotification(s.notificationKey, e.wrapErrorNotificationMessage(c, n), "error");
23
20
  },
24
- onMutate: async (e) => {
25
- let t = b.current;
26
- if (!t) throw Error("previousItem is not set");
21
+ onMutate: async ({ previousItem: e, variables: t }) => {
22
+ if (!e) throw Error("previousItem is not set");
27
23
  let n = i.resolve(r).showNotification({
28
24
  isLoading: !0,
29
- message: p(t, e),
25
+ message: f(e, t),
30
26
  severity: "info"
31
27
  });
32
- if (v) {
33
- await y.cancelQueries({ queryKey: v });
34
- let r = y.getQueryData(v);
35
- if (Array.isArray(r) && !Array.isArray(e)) {
36
- let i = f ? f(e, t) : {
37
- ...e,
38
- id: t.id
28
+ if (_) {
29
+ await v.cancelQueries({ queryKey: _ });
30
+ let r = v.getQueryData(_);
31
+ if (Array.isArray(r) && !Array.isArray(t)) {
32
+ let i = d ? d(t, e) : {
33
+ ...t,
34
+ id: e.id
39
35
  };
40
- return y.setQueryData(v, (e) => e.map((e) => e.id === t.id ? i : e)), {
41
- item: t,
36
+ return v.setQueryData(_, (t) => t.map((t) => t.id === e.id ? i : t)), {
37
+ item: e,
42
38
  notificationKey: n,
43
39
  previousData: r
44
40
  };
45
41
  }
46
42
  }
47
43
  return {
48
- item: t,
44
+ item: e,
49
45
  notificationKey: n
50
46
  };
51
47
  },
52
48
  onSuccess: async (e, n, a) => {
53
- if (b.current = void 0, v && Array.isArray(a?.previousData) && l(e)) {
49
+ if (_ && Array.isArray(a?.previousData) && c(e)) {
54
50
  let t = a.item?.id;
55
- y.setQueryData(v, (n) => Array.isArray(n) ? n.map((n) => n.id === t ? e : n) : n);
51
+ v.setQueryData(_, (n) => Array.isArray(n) ? n.map((n) => n.id === t ? e : n) : n);
56
52
  }
57
- await i.resolve(t).invalidateQueryKeys(u), g && await g(e, n, a), i.resolve(r).fulfillNotification(a.notificationKey, m(e, a), "success");
53
+ await i.resolve(t).invalidateQueryKeys(l), h && await h(e, n.variables, a), i.resolve(r).fulfillNotification(a.notificationKey, p(e, a), "success");
58
54
  }
59
- }), w = o(() => C.mutate, [C.mutate]), T = o(() => C.isPending, [C.isPending]);
55
+ }), x = b.mutate, S = o(() => (e, t) => {
56
+ x({
57
+ previousItem: t,
58
+ variables: e
59
+ });
60
+ }, [x]), C = o(() => b.isPending, [b.isPending]);
60
61
  return o(() => ({
61
- isMutating: T,
62
- mutate: w,
63
- setPreviousItem: x
64
- }), [
65
- T,
66
- w,
67
- x
68
- ]);
62
+ isMutating: C,
63
+ mutate: S
64
+ }), [C, S]);
69
65
  };
70
- //#endregion
71
- export { u as useEditMutation };
66
+ export { l as useEditMutation };
72
67
 
73
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["useMutation","isSingleGenericData","item","useEditMutation","queryClient","container","QueryClientService","previousItemRef","useRef","setPreviousItem","useCallback","mutationFn","queryFn","ObjectUtil","variables","editMutation","safeContext","context","resourceQueryKey","associationQueryKeys","onError","error","errorMessage","getErrorNotificationMessage","NotificationService","NotificationUtil","previousItem","notificationKey","getProgressNotificationMessage","previousData","intermediateItem","getIntermediateItem","oldItems","x","previousItemId","oldItem","onSuccess","getSuccessNotificationMessage","mutate","useMemo","isMutating"],"sources":["../../../src/hooks/useEditMutation/useEditMutation.ts"],"sourcesContent":["import { container } from 'tsyringe';\nimport { useMutation } from '@tanstack/react-query';\nimport type { ReactElement } from 'react';\nimport {\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport { ObjectUtil } from '@gen-epix/ui-core/utils/ObjectUtil';\n\nimport { NotificationService } from '../../classes/services/NotificationService';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\nimport type { GenericData } from '../../models/data.models';\nimport { NotificationUtil } from '../../utils/NotificationUtil';\n\nexport type MutationContextEdit<TData> = { item?: TData; notificationKey?: string; previousData?: TData[] };\n\nexport type UseEditMutationProps<TData, TVariables = TData> = {\n readonly associationQueryKeys?: string[][];\n readonly getErrorNotificationMessage: (data: TData, variables: TVariables, error: unknown) => ReactElement | string;\n // Optional function to get an intermediate item to be set in the query cache before the mutation is completed.\n // This is useful for optimistic updates where you want to show a temporary state before the mutation is confirmed.\n // The function receives the variables and the previous item, and should return the intermediate item.\n // Only needed if the variables are different from the previous item.\n readonly getIntermediateItem?: (variables: TVariables, previousItem: TData) => TData;\n readonly getProgressNotificationMessage: (data: TData, variables: TVariables) => ReactElement | string;\n readonly getSuccessNotificationMessage: (data: TData, context: MutationContextEdit<TData>) => ReactElement | string;\n readonly onError?: (error: unknown, variables: TVariables, context: MutationContextEdit<TData>) => Promise<void> | void;\n readonly onSuccess?: (item: TData, variables: TVariables, context: MutationContextEdit<TData>) => Promise<void> | void;\n readonly queryFn?: (variables: TVariables, previousData: TData) => Promise<TData>;\n readonly resourceQueryKey?: string[];\n};\n\nconst isSingleGenericData = (item: GenericData | GenericData[]): item is GenericData => !Array.isArray(item);\n\nexport const useEditMutation = <TData extends GenericData | GenericData[], TVariables = TData>({\n associationQueryKeys,\n getErrorNotificationMessage,\n getIntermediateItem,\n getProgressNotificationMessage,\n getSuccessNotificationMessage,\n onError,\n onSuccess,\n queryFn,\n resourceQueryKey,\n}: UseEditMutationProps<TData, TVariables>) => {\n const queryClient = container.resolve(QueryClientService).queryClient;\n const previousItemRef = useRef<TData>(undefined);\n\n const setPreviousItem = useCallback((item: TData) => {\n previousItemRef.current = item;\n }, []);\n\n const mutationFn = useCallback(async (variables: TVariables) => {\n if (!queryFn) {\n throw new Error('Edit mutation queryFn is required');\n }\n return queryFn(ObjectUtil.deepNullifyEmptyStrings(variables), previousItemRef.current);\n }, [previousItemRef, queryFn]);\n\n const editMutation = useMutation<TData, Error, TVariables, MutationContextEdit<TData>>({\n mutationFn,\n onError: async (error, variables, context) => {\n previousItemRef.current = undefined;\n const safeContext: MutationContextEdit<TData> = context ?? {};\n if (resourceQueryKey && Array.isArray(safeContext.previousData)) {\n queryClient.setQueryData<TData[]>(resourceQueryKey, safeContext.previousData);\n }\n await container.resolve(QueryClientService).invalidateQueryKeys(associationQueryKeys);\n if (onError) {\n await onError(error, variables, safeContext);\n }\n const errorMessage = safeContext.item\n ? getErrorNotificationMessage(safeContext.item, variables, error)\n : String(error);\n if (safeContext.notificationKey) {\n container.resolve(NotificationService).fulfillNotification(safeContext.notificationKey, NotificationUtil.wrapErrorNotificationMessage(errorMessage, error), 'error');\n }\n },\n onMutate: async (variables) => {\n const previousItem = previousItemRef.current;\n if (!previousItem) {\n throw new Error('previousItem is not set');\n }\n const notificationKey = container.resolve(NotificationService).showNotification({\n isLoading: true,\n message: getProgressNotificationMessage(previousItem, variables),\n severity: 'info',\n });\n if (resourceQueryKey) {\n await queryClient.cancelQueries({ queryKey: resourceQueryKey });\n const previousData = queryClient.getQueryData<TData[]>(resourceQueryKey);\n\n if (Array.isArray(previousData) && !Array.isArray(variables)) {\n const intermediateItem = getIntermediateItem ? getIntermediateItem(variables, previousItem) : {\n ...variables,\n id: (previousItem as GenericData).id,\n } as GenericData;\n queryClient.setQueryData<GenericData[]>(resourceQueryKey, (oldItems) => {\n return oldItems.map(x => x.id === (previousItem as GenericData).id ? intermediateItem : x) as GenericData[];\n });\n return { item: previousItem, notificationKey, previousData };\n }\n }\n return { item: previousItem, notificationKey };\n },\n onSuccess: async (item, variables, context) => {\n previousItemRef.current = undefined;\n if (resourceQueryKey && Array.isArray(context?.previousData) && isSingleGenericData(item)) {\n const previousItemId = (context.item as GenericData)?.id;\n queryClient.setQueryData<GenericData[]>(resourceQueryKey, (oldItems) => {\n if (!Array.isArray(oldItems)) {\n return oldItems;\n }\n return oldItems.map(oldItem => oldItem.id === previousItemId ? item : oldItem);\n });\n }\n await container.resolve(QueryClientService).invalidateQueryKeys(associationQueryKeys);\n if (onSuccess) {\n await onSuccess(item, variables, context);\n }\n container.resolve(NotificationService).fulfillNotification(context.notificationKey, getSuccessNotificationMessage(item, context), 'success');\n },\n });\n\n // Note: must be done in useMemo to avoid render loops (useMutation returns a new object every time)\n const mutate = useMemo(() => editMutation.mutate, [editMutation.mutate]);\n const isMutating = useMemo(() => editMutation.isPending, [editMutation.isPending]);\n return useMemo(() => ({ isMutating, mutate, setPreviousItem }), [isMutating, mutate, setPreviousItem]);\n};\n"],"mappings":";;;;;;;;AAiCA,IAAMC,KAAuB,MAA2D,CAAC,MAAM,QAAQC,CAAI,GAE9FC,KAAkF,EAC7F,yBACA,gCACA,wBACA,mCACA,kCACA,YACA,cACA,YACA,0BAC6C;CAC7C,IAAMC,IAAcC,EAAU,QAAQC,CAAkB,CAAC,CAAC,aACpDC,IAAkBC,EAAc,KAAA,CAAS,GAEzCC,IAAkBC,GAAa,MAAgB;EACnD,EAAgB,UAAUR;CAC5B,GAAG,CAAC,CAAC,GAECS,IAAaD,EAAY,OAAO,MAA0B;EAC9D,IAAI,CAACE,GACH,MAAU,MAAM,mCAAmC;EAErD,OAAOA,EAAQC,EAAW,wBAAwBC,CAAS,GAAGP,EAAgB,OAAO;CACvF,GAAG,CAACA,GAAiBK,CAAO,CAAC,GAEvBG,IAAef,EAAkE;EACrF;EACA,SAAS,OAAO,GAAO,GAAW,MAAY;GAC5C,EAAgB,UAAU,KAAA;GAC1B,IAAMgB,IAA0CC,KAAW,CAAC;GAK5D,AAJIC,KAAoB,MAAM,QAAQF,EAAY,YAAY,KAC5DZ,EAAY,aAAsBc,GAAkBF,EAAY,YAAY,GAE9E,MAAMX,EAAU,QAAQC,CAAkB,CAAC,CAAC,oBAAoBa,CAAoB,GAChFC,KACF,MAAMA,EAAQC,GAAOP,GAAWE,CAAW;GAE7C,IAAMM,IAAeN,EAAY,OAC7BO,EAA4BP,EAAY,MAAMF,GAAWO,CAAK,IAC9D,OAAOA,CAAK;GAChB,AAAIL,EAAY,mBACdX,EAAU,QAAQmB,CAAmB,CAAC,CAAC,oBAAoBR,EAAY,iBAAiBS,EAAiB,6BAA6BH,GAAcD,CAAK,GAAG,OAAO;EAEvK;EACA,UAAU,OAAO,MAAc;GAC7B,IAAMK,IAAenB,EAAgB;GACrC,IAAI,CAACmB,GACH,MAAU,MAAM,yBAAyB;GAE3C,IAAMC,IAAkBtB,EAAU,QAAQmB,CAAmB,CAAC,CAAC,iBAAiB;IAC9E,WAAW;IACX,SAASI,EAA+BF,GAAcZ,CAAS;IAC/D,UAAU;GACZ,CAAC;GACD,IAAII,GAAkB;IACpB,MAAMd,EAAY,cAAc,EAAE,UAAUc,EAAiB,CAAC;IAC9D,IAAMW,IAAezB,EAAY,aAAsBc,CAAgB;IAEvE,IAAI,MAAM,QAAQW,CAAY,KAAK,CAAC,MAAM,QAAQf,CAAS,GAAG;KAC5D,IAAMgB,IAAmBC,IAAsBA,EAAoBjB,GAAWY,CAAY,IAAI;MAC5F,GAAGZ;MACH,IAAKY,EAA6B;KACpC;KAIA,OAHAtB,EAAY,aAA4Bc,IAAmB,MAClDc,EAAS,KAAI,MAAKC,EAAE,OAAQP,EAA6B,KAAKI,IAAmBG,CAAC,CAC1F,GACM;MAAE,MAAMP;MAAc;MAAiB;KAAa;IAC7D;GACF;GACA,OAAO;IAAE,MAAMA;IAAc;GAAgB;EAC/C;EACA,WAAW,OAAO,GAAM,GAAW,MAAY;GAE7C,IADA,EAAgB,UAAU,KAAA,GACtBR,KAAoB,MAAM,QAAQD,GAAS,YAAY,KAAKhB,EAAoBC,CAAI,GAAG;IACzF,IAAMgC,IAAkBjB,EAAQ,MAAsB;IACtD,EAAY,aAA4BC,IAAmB,MACpD,MAAM,QAAQc,CAAQ,IAGpBA,EAAS,KAAI,MAAWG,EAAQ,OAAOD,IAAiBhC,IAAOiC,CAAO,IAFpEH,CAGV;GACH;GAKA,AAJA,MAAM3B,EAAU,QAAQC,CAAkB,CAAC,CAAC,oBAAoBa,CAAoB,GAChFiB,KACF,MAAMA,EAAUlC,GAAMY,GAAWG,CAAO,GAE1CZ,EAAU,QAAQmB,CAAmB,CAAC,CAAC,oBAAoBP,EAAQ,iBAAiBoB,EAA8BnC,GAAMe,CAAO,GAAG,SAAS;EAC7I;CACF,CAAC,GAGKqB,IAASC,QAAcxB,EAAa,QAAQ,CAACA,EAAa,MAAM,CAAC,GACjEyB,IAAaD,QAAcxB,EAAa,WAAW,CAACA,EAAa,SAAS,CAAC;CACjF,OAAOwB,SAAe;EAAE;EAAY;EAAQ;CAAgB,IAAI;EAACC;EAAYF;EAAQ7B;CAAe,CAAC;AACvG"}
1
+ {"version":3,"file":"index.js","names":["useMutation","isSingleGenericData","item","useEditMutation","queryClient","container","QueryClientService","mutationFn","useCallback","queryFn","ObjectUtil","variables","previousItem","editMutation","safeContext","context","resourceQueryKey","associationQueryKeys","onError","error","mutationVariables","errorMessage","getErrorNotificationMessage","NotificationService","NotificationUtil","notificationKey","getProgressNotificationMessage","previousData","intermediateItem","getIntermediateItem","oldItems","x","previousItemId","oldItem","onSuccess","getSuccessNotificationMessage","editMutate","mutate","useMemo","isMutating"],"sources":["../../../src/hooks/useEditMutation/useEditMutation.ts"],"sourcesContent":["import { container } from 'tsyringe';\nimport { useMutation } from '@tanstack/react-query';\nimport type { ReactElement } from 'react';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { ObjectUtil } from '@gen-epix/ui-core/utils/ObjectUtil';\n\nimport { NotificationService } from '../../classes/services/NotificationService';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\nimport type { GenericData } from '../../models/data.models';\nimport { NotificationUtil } from '../../utils/NotificationUtil';\n\nexport type MutationContextEdit<TData> = { item?: TData; notificationKey?: string; previousData?: TData[] };\n\nexport type UseEditMutationProps<TData, TVariables = TData> = {\n readonly associationQueryKeys?: string[][];\n readonly getErrorNotificationMessage: (data: TData, variables: TVariables, error: unknown) => ReactElement | string;\n // Optional function to get an intermediate item to be set in the query cache before the mutation is completed.\n // This is useful for optimistic updates where you want to show a temporary state before the mutation is confirmed.\n // The function receives the variables and the previous item, and should return the intermediate item.\n // Only needed if the variables are different from the previous item.\n readonly getIntermediateItem?: (variables: TVariables, previousItem: TData) => TData;\n readonly getProgressNotificationMessage: (data: TData, variables: TVariables) => ReactElement | string;\n readonly getSuccessNotificationMessage: (data: TData, context: MutationContextEdit<TData>) => ReactElement | string;\n readonly onError?: (error: unknown, variables: TVariables, context: MutationContextEdit<TData>) => Promise<void> | void;\n readonly onSuccess?: (item: TData, variables: TVariables, context: MutationContextEdit<TData>) => Promise<void> | void;\n readonly queryFn?: (variables: TVariables, previousData: TData) => Promise<TData>;\n readonly resourceQueryKey?: string[];\n};\n\ntype EditMutationVariables<TData, TVariables> = {\n readonly previousItem: TData;\n readonly variables: TVariables;\n};\n\nconst isSingleGenericData = (item: GenericData | GenericData[]): item is GenericData => !Array.isArray(item);\n\nexport const useEditMutation = <TData extends GenericData | GenericData[], TVariables = TData>({\n associationQueryKeys,\n getErrorNotificationMessage,\n getIntermediateItem,\n getProgressNotificationMessage,\n getSuccessNotificationMessage,\n onError,\n onSuccess,\n queryFn,\n resourceQueryKey,\n}: UseEditMutationProps<TData, TVariables>) => {\n const queryClient = container.resolve(QueryClientService).queryClient;\n\n const mutationFn = useCallback(async ({ previousItem, variables }: EditMutationVariables<TData, TVariables>) => {\n if (!queryFn) {\n throw new Error('Edit mutation queryFn is required');\n }\n return queryFn(ObjectUtil.deepNullifyEmptyStrings(variables), previousItem);\n }, [queryFn]);\n\n const editMutation = useMutation<TData, Error, EditMutationVariables<TData, TVariables>, MutationContextEdit<TData>>({\n mutationFn,\n onError: async (error, mutationVariables, context) => {\n const safeContext: MutationContextEdit<TData> = context ?? {};\n if (resourceQueryKey && Array.isArray(safeContext.previousData)) {\n queryClient.setQueryData<TData[]>(resourceQueryKey, safeContext.previousData);\n }\n await container.resolve(QueryClientService).invalidateQueryKeys(associationQueryKeys);\n if (onError) {\n await onError(error, mutationVariables.variables, safeContext);\n }\n const errorMessage = safeContext.item\n ? getErrorNotificationMessage(safeContext.item, mutationVariables.variables, error)\n : String(error);\n if (safeContext.notificationKey) {\n container.resolve(NotificationService).fulfillNotification(safeContext.notificationKey, NotificationUtil.wrapErrorNotificationMessage(errorMessage, error), 'error');\n }\n },\n onMutate: async ({ previousItem, variables }) => {\n if (!previousItem) {\n throw new Error('previousItem is not set');\n }\n const notificationKey = container.resolve(NotificationService).showNotification({\n isLoading: true,\n message: getProgressNotificationMessage(previousItem, variables),\n severity: 'info',\n });\n if (resourceQueryKey) {\n await queryClient.cancelQueries({ queryKey: resourceQueryKey });\n const previousData = queryClient.getQueryData<TData[]>(resourceQueryKey);\n\n if (Array.isArray(previousData) && !Array.isArray(variables)) {\n const intermediateItem = getIntermediateItem ? getIntermediateItem(variables, previousItem) : {\n ...variables,\n id: (previousItem as GenericData).id,\n } as GenericData;\n queryClient.setQueryData<GenericData[]>(resourceQueryKey, (oldItems) => {\n return oldItems.map(x => x.id === (previousItem as GenericData).id ? intermediateItem : x) as GenericData[];\n });\n return { item: previousItem, notificationKey, previousData };\n }\n }\n return { item: previousItem, notificationKey };\n },\n onSuccess: async (item, mutationVariables, context) => {\n if (resourceQueryKey && Array.isArray(context?.previousData) && isSingleGenericData(item)) {\n const previousItemId = (context.item as GenericData)?.id;\n queryClient.setQueryData<GenericData[]>(resourceQueryKey, (oldItems) => {\n if (!Array.isArray(oldItems)) {\n return oldItems;\n }\n return oldItems.map(oldItem => oldItem.id === previousItemId ? item : oldItem);\n });\n }\n await container.resolve(QueryClientService).invalidateQueryKeys(associationQueryKeys);\n if (onSuccess) {\n await onSuccess(item, mutationVariables.variables, context);\n }\n container.resolve(NotificationService).fulfillNotification(context.notificationKey, getSuccessNotificationMessage(item, context), 'success');\n },\n });\n\n // Note: must be done in useMemo to avoid render loops (useMutation returns a new object every time)\n const editMutate = editMutation.mutate;\n const mutate = useMemo(() => (variables: TVariables, previousItem: TData) => {\n editMutate({ previousItem, variables });\n }, [editMutate]);\n const isMutating = useMemo(() => editMutation.isPending, [editMutation.isPending]);\n return useMemo(() => ({ isMutating, mutate }), [isMutating, mutate]);\n};\n"],"mappings":";;;;;;;;AAqCA,IAAMC,KAAuB,MAA2D,CAAC,MAAM,QAAQC,CAAI,GAE9FC,KAAkF,EAC7F,yBACA,gCACA,wBACA,mCACA,kCACA,YACA,cACA,YACA,0BAC6C;CAC7C,IAAMC,IAAcC,EAAU,QAAQC,CAAkB,CAAC,CAAC,aAEpDC,IAAaC,EAAY,OAAO,EAAE,iBAAc,mBAA0D;EAC9G,IAAI,CAACC,GACH,MAAU,MAAM,mCAAmC;EAErD,OAAOA,EAAQC,EAAW,wBAAwBC,CAAS,GAAGC,CAAY;CAC5E,GAAG,CAACH,CAAO,CAAC,GAENI,IAAeb,EAAgG;EACnH;EACA,SAAS,OAAO,GAAO,GAAmB,MAAY;GACpD,IAAMc,IAA0CC,KAAW,CAAC;GAK5D,AAJIC,KAAoB,MAAM,QAAQF,EAAY,YAAY,KAC5DV,EAAY,aAAsBY,GAAkBF,EAAY,YAAY,GAE9E,MAAMT,EAAU,QAAQC,CAAkB,CAAC,CAAC,oBAAoBW,CAAoB,GAChFC,KACF,MAAMA,EAAQC,GAAOC,EAAkB,WAAWN,CAAW;GAE/D,IAAMO,IAAeP,EAAY,OAC7BQ,EAA4BR,EAAY,MAAMM,EAAkB,WAAWD,CAAK,IAChF,OAAOA,CAAK;GAChB,AAAIL,EAAY,mBACdT,EAAU,QAAQkB,CAAmB,CAAC,CAAC,oBAAoBT,EAAY,iBAAiBU,EAAiB,6BAA6BH,GAAcF,CAAK,GAAG,OAAO;EAEvK;EACA,UAAU,OAAO,EAAE,iBAAc,mBAAgB;GAC/C,IAAI,CAACP,GACH,MAAU,MAAM,yBAAyB;GAE3C,IAAMa,IAAkBpB,EAAU,QAAQkB,CAAmB,CAAC,CAAC,iBAAiB;IAC9E,WAAW;IACX,SAASG,EAA+Bd,GAAcD,CAAS;IAC/D,UAAU;GACZ,CAAC;GACD,IAAIK,GAAkB;IACpB,MAAMZ,EAAY,cAAc,EAAE,UAAUY,EAAiB,CAAC;IAC9D,IAAMW,IAAevB,EAAY,aAAsBY,CAAgB;IAEvE,IAAI,MAAM,QAAQW,CAAY,KAAK,CAAC,MAAM,QAAQhB,CAAS,GAAG;KAC5D,IAAMiB,IAAmBC,IAAsBA,EAAoBlB,GAAWC,CAAY,IAAI;MAC5F,GAAGD;MACH,IAAKC,EAA6B;KACpC;KAIA,OAHAR,EAAY,aAA4BY,IAAmB,MAClDc,EAAS,KAAI,MAAKC,EAAE,OAAQnB,EAA6B,KAAKgB,IAAmBG,CAAC,CAC1F,GACM;MAAE,MAAMnB;MAAc;MAAiB;KAAa;IAC7D;GACF;GACA,OAAO;IAAE,MAAMA;IAAc;GAAgB;EAC/C;EACA,WAAW,OAAO,GAAM,GAAmB,MAAY;GACrD,IAAII,KAAoB,MAAM,QAAQD,GAAS,YAAY,KAAKd,EAAoBC,CAAI,GAAG;IACzF,IAAM8B,IAAkBjB,EAAQ,MAAsB;IACtD,EAAY,aAA4BC,IAAmB,MACpD,MAAM,QAAQc,CAAQ,IAGpBA,EAAS,KAAI,MAAWG,EAAQ,OAAOD,IAAiB9B,IAAO+B,CAAO,IAFpEH,CAGV;GACH;GAKA,AAJA,MAAMzB,EAAU,QAAQC,CAAkB,CAAC,CAAC,oBAAoBW,CAAoB,GAChFiB,KACF,MAAMA,EAAUhC,GAAMkB,EAAkB,WAAWL,CAAO,GAE5DV,EAAU,QAAQkB,CAAmB,CAAC,CAAC,oBAAoBR,EAAQ,iBAAiBoB,EAA8BjC,GAAMa,CAAO,GAAG,SAAS;EAC7I;CACF,CAAC,GAGKqB,IAAavB,EAAa,QAC1BwB,IAASC,SAAe,GAAuB,MAAwB;EAC3E,EAAW;GAAE;GAAc;EAAU,CAAC;CACxC,GAAG,CAACF,CAAU,CAAC,GACTG,IAAaD,QAAczB,EAAa,WAAW,CAACA,EAAa,SAAS,CAAC;CACjF,OAAOyB,SAAe;EAAE;EAAY;CAAO,IAAI,CAACC,GAAYF,CAAM,CAAC;AACrE"}
@@ -18,6 +18,5 @@ export type UseEditMutationProps<TData, TVariables = TData> = {
18
18
  };
19
19
  export declare const useEditMutation: <TData extends GenericData | GenericData[], TVariables = TData>({ associationQueryKeys, getErrorNotificationMessage, getIntermediateItem, getProgressNotificationMessage, getSuccessNotificationMessage, onError, onSuccess, queryFn, resourceQueryKey, }: UseEditMutationProps<TData, TVariables>) => {
20
20
  isMutating: boolean;
21
- mutate: import('@tanstack/react-query').UseMutateFunction<TData, Error, TVariables, MutationContextEdit<TData>>;
22
- setPreviousItem: (item: TData) => void;
21
+ mutate: (variables: TVariables, previousItem: TData) => void;
23
22
  };
@@ -2,7 +2,7 @@ import { t as e } from "../../_chunks/TableUtil.js";
2
2
  import { DEFAULT_FILTER_GROUP as t } from "../../classes/abstracts/FilterAbstract/index.js";
3
3
  import { t as n } from "../../_chunks/react.js";
4
4
  import { useEffect as r } from "react";
5
- //#region src/hooks/useInitializeTableStore/useInitializeTableStore.ts
5
+ // src/hooks/useInitializeTableStore/useInitializeTableStore.ts
6
6
  var i = ({ columns: i, context: a, createFiltersFromColumns: o, rows: s, store: c }) => {
7
7
  let l = n(c, (e) => e.setColumns), u = n(c, (e) => e.setBaseData), d = n(c, (e) => e.setFilters), f = n(c, (e) => e.initialize);
8
8
  r(() => {
@@ -22,7 +22,6 @@ var i = ({ columns: i, context: a, createFiltersFromColumns: o, rows: s, store:
22
22
  a
23
23
  ]);
24
24
  };
25
- //#endregion
26
25
  export { i as useInitializeTableStore };
27
26
 
28
27
  //# sourceMappingURL=index.js.map
@@ -2,7 +2,7 @@ import { t as e } from "../../_chunks/useQueryMemo.js";
2
2
  import { t } from "../../_chunks/QueryClientService.js";
3
3
  import { container as n } from "tsyringe";
4
4
  import { useEffect as r, useMemo as i, useState as a } from "react";
5
- //#region src/hooks/useItemQuery/useItemQuery.ts
5
+ // src/hooks/useItemQuery/useItemQuery.ts
6
6
  var o = [
7
7
  "added",
8
8
  "removed",
@@ -56,7 +56,6 @@ var o = [
56
56
  p.error
57
57
  ]);
58
58
  };
59
- //#endregion
60
59
  export { s as useItemQuery };
61
60
 
62
61
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  import { BreadcrumbService as e } from "../../classes/services/BreadcrumbService/index.js";
2
2
  import { container as t } from "tsyringe";
3
3
  import { useCallback as n, useEffect as r } from "react";
4
- //#region src/hooks/useUpdateBreadcrumb/useUpdateBreadcrumb.ts
4
+ // src/hooks/useUpdateBreadcrumb/useUpdateBreadcrumb.ts
5
5
  var i = (i) => {
6
6
  let a = n((n) => {
7
7
  t.resolve(e).update(i, n);
@@ -10,7 +10,6 @@ var i = (i) => {
10
10
  t.resolve(e).remove(i);
11
11
  }, [i]), a;
12
12
  };
13
- //#endregion
14
13
  export { i as useUpdateBreadcrumb };
15
14
 
16
15
  //# sourceMappingURL=index.js.map
@@ -1,13 +1,12 @@
1
1
  import { useConfig as e } from "../useConfig/index.js";
2
2
  import { useEffect as t } from "react";
3
- //#region src/hooks/useUpdateDocumentTitle/useUpdateDocumentTitle.ts
3
+ // src/hooks/useUpdateDocumentTitle/useUpdateDocumentTitle.ts
4
4
  var n = (n) => {
5
5
  let r = e();
6
6
  t(() => {
7
7
  document.title = `${r.applicationName} - ${n}`;
8
8
  }, [r.applicationName, n]);
9
9
  };
10
- //#endregion
11
10
  export { n as useUpdateDocumentTitle };
12
11
 
13
12
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,7 @@
1
- //#region src/models/admin.models.ts
1
+ // src/models/admin.models.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
3
  return e.ACCESS_RIGHTS = "ACCESS_RIGHTS", e.HELPERS = "HELPERS", e.REFERENCE_DATA = "REFERENCE_DATA", e.SYSTEM = "SYSTEM", e.USERS_AND_ORGANIZATIONS = "USERS_AND_ORGANIZATIONS", e;
4
4
  }({});
5
- //#endregion
6
5
  export { e as ADMIN_PAGE_CATEGORY };
7
6
 
8
7
  //# sourceMappingURL=admin.models.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin.models.js","names":["ADMIN_PAGE_CATEGORY","\"ACCESS_RIGHTS\"","\"HELPERS\"","\"REFERENCE_DATA\"","\"SYSTEM\"","\"USERS_AND_ORGANIZATIONS\""],"sources":["../../src/models/admin.models.ts"],"sourcesContent":["export enum ADMIN_PAGE_CATEGORY {\n ACCESS_RIGHTS = 'ACCESS_RIGHTS',\n HELPERS = 'HELPERS',\n REFERENCE_DATA = 'REFERENCE_DATA',\n SYSTEM = 'SYSTEM',\n USERS_AND_ORGANIZATIONS = 'USERS_AND_ORGANIZATIONS',\n}\n"],"mappings":";AAAA,IAAYA,IAAL,yBAAA,GAAA;QACL,EAAAC,gBAAA,iBACA,EAAAC,UAAA,WACA,EAAAC,iBAAA,kBACA,EAAAC,SAAA,UACA,EAAAC,0BAAA;AACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"admin.models.js","names":["ADMIN_PAGE_CATEGORY","\"ACCESS_RIGHTS\"","\"HELPERS\"","\"REFERENCE_DATA\"","\"SYSTEM\"","\"USERS_AND_ORGANIZATIONS\""],"sources":["../../src/models/admin.models.ts"],"sourcesContent":["export enum ADMIN_PAGE_CATEGORY {\n ACCESS_RIGHTS = 'ACCESS_RIGHTS',\n HELPERS = 'HELPERS',\n REFERENCE_DATA = 'REFERENCE_DATA',\n SYSTEM = 'SYSTEM',\n USERS_AND_ORGANIZATIONS = 'USERS_AND_ORGANIZATIONS',\n}\n"],"mappings":";AAAA,IAAYA,IAAL,yBAAA,GAAA;C,OACL,EAAAC,gBAAA,iBACA,EAAAC,UAAA,WACA,EAAAC,iBAAA,kBACA,EAAAC,SAAA,UACA,EAAAC,0BAAA,2B;AACF,EAAA,CAAA,CAAA"}
@@ -1,10 +1,9 @@
1
- //#region src/models/table.models.ts
1
+ // src/models/table.models.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
3
  return e.ACTIONS = "ACTIONS", e.READABLE_INDEX = "READABLE_INDEX", e.ROW_SELECT = "ROW_SELECT", e;
4
4
  }({}), t = /* @__PURE__ */ function(e) {
5
5
  return e.LEFT = "left", e.RIGHT = "right", e;
6
6
  }({});
7
- //#endregion
8
7
  export { e as FIXED_COLUMN_ID, t as TABLE_COLUMN_FROZEN };
9
8
 
10
9
  //# sourceMappingURL=table.models.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.models.js","names":["FIXED_COLUMN_ID","\"ACTIONS\"","\"READABLE_INDEX\"","\"ROW_SELECT\"","TABLE_COLUMN_FROZEN","\"LEFT\"","\"RIGHT\""],"sources":["../../src/models/table.models.ts"],"sourcesContent":["import type {\n SxProps,\n Theme,\n} from '@mui/material';\nimport type { ReactElement } from 'react';\nimport type { TFunction } from 'i18next';\nimport type { DATE_FORMAT } from '@gen-epix/ui-core/constants/date.constants';\nimport type { OptionBase } from '@gen-epix/ui-core-form/models/form.models';\n\nexport enum FIXED_COLUMN_ID {\n ACTIONS = 'ACTIONS',\n READABLE_INDEX = 'READABLE_INDEX',\n ROW_SELECT = 'ROW_SELECT',\n}\n\nexport enum TABLE_COLUMN_FROZEN {\n LEFT = 'left',\n RIGHT = 'right',\n}\n\nexport interface GetTableCellRowComparatorProps<TColumn, TDataContext = null> {\n readonly column: TColumn;\n readonly dataContext: TDataContext;\n readonly direction: TableSortDirection;\n}\n\nexport interface GetTableCellValueProps<TRowData, TColumn, TDataContext = null> {\n readonly column: TColumn;\n readonly dataContext: TDataContext;\n readonly row: TRowData;\n readonly rowIndex: number;\n readonly t?: TFunction<'translation', undefined>;\n}\n\nexport type HasCellDataFn<TRowData, TDataContext = null> = (row: TRowData, column: TableColumn<TRowData, TDataContext>, rowIndex: number, dataContext: TDataContext) => boolean;\n\nexport type TableCellRowComparatorArgument<TRowData> = {\n row: TRowData;\n rowIndex: number;\n};\n\nexport type TableColumn<TRowData, TDataContext = null, TColumnContext = null> =\n TableColumnActions<TRowData, TDataContext, TColumnContext> |\n TableColumnBoolean<TRowData, TDataContext, TColumnContext> |\n TableColumnDate<TRowData, TDataContext, TColumnContext> |\n TableColumnNumber<TRowData, TDataContext, TColumnContext> |\n TableColumnOptions<TRowData, TDataContext, TColumnContext> |\n TableColumnReadableIndex<TRowData, TDataContext, TColumnContext> |\n TableColumnSelectable<TRowData, TDataContext, TColumnContext> |\n TableColumnText<TRowData, TDataContext, TColumnContext>;\n\nexport interface TableColumnActions<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnActions<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n frozen: TABLE_COLUMN_FROZEN.RIGHT;\n getActions: (params: TableRowParams<TRowData, TDataContext>) => ReactElement[];\n id: FIXED_COLUMN_ID.ACTIONS;\n isInitiallyVisible: true;\n resizable: false;\n type: 'actions';\n}\n\nexport interface TableColumnBoolean<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, boolean, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnBoolean<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n type: 'boolean';\n}\n\nexport interface TableColumnDate<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnDate<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n dateFormat: typeof DATE_FORMAT[keyof typeof DATE_FORMAT];\n type: 'date';\n}\n\nexport type TableColumnDimension = {\n columnIds: string[];\n id: string;\n label: string;\n};\n\nexport interface TableColumnNumber<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, number, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnNumber<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n type: 'number';\n}\n\nexport interface TableColumnOptions<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string | string[], TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnOptions<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n maxNumOptionsExpanded?: number;\n options: OptionBase<string>[];\n shouldFilterOptions?: boolean;\n type: 'options';\n}\n\nexport interface TableColumnParams<TRowData, TDataContext = null> {\n column: TableColumn<TRowData, TDataContext>;\n dataContext: TDataContext;\n}\n\nexport interface TableColumnReadableIndex<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, never, TDataContext, TColumnContext> {\n comparatorFactory?: never;\n disableEllipsis: true;\n frozen: TABLE_COLUMN_FROZEN.LEFT;\n getAriaLabel: (params: TableRowParams<TRowData, TDataContext>) => string;\n id: FIXED_COLUMN_ID.READABLE_INDEX;\n resizable: false;\n type: 'readableIndex';\n}\n\nexport interface TableColumnSelectable<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, never, TDataContext, TColumnContext> {\n comparatorFactory?: never;\n disableEllipsis: true;\n frozen: TABLE_COLUMN_FROZEN.LEFT;\n id: FIXED_COLUMN_ID.ROW_SELECT;\n isDisabled?: (params: TableRowParams<TRowData, TDataContext>) => boolean;\n resizable: false;\n type: 'selectable';\n}\n\nexport interface TableColumnText<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnText<TRowData, TDataContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n type: 'text';\n}\n\nexport type TableColumnVisualSettings = {\n calculatedWidth?: number;\n hasResized?: boolean;\n id: string;\n isVisible: boolean;\n offsetX?: number;\n widthFlex: number;\n widthPx: number;\n};\n\n\nexport type TableDragEvent = {\n clientX: number;\n clientY: number;\n deltaX: number;\n deltaY: number;\n elementOffsetX: number;\n elementWidth: number;\n target: HTMLDivElement;\n type: 'end' | 'move' | 'start';\n};\n\nexport type TableRowAndColumnParams<TRowData, TDataContext = null> = TableColumnParams<TRowData, TDataContext> & TableRowParams<TRowData, TDataContext>;\n\nexport interface TableRowParams<TRowData, TDataContext = null> {\n dataContext: TDataContext;\n id: string;\n row: TRowData;\n rowIndex: number;\n}\n\nexport type TableSortDirection = 'asc' | 'desc';\n\ninterface TableColumnBase<TRowData, TValue, TDataContext = null, TColumnContext = null> {\n cellColorGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => string;\n cellTitleGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => string;\n columnContext?: TColumnContext;\n customHeaderIcon?: {\n iconElement: ReactElement;\n label: string;\n onClick: (params: TableColumnParams<TRowData, TDataContext>) => void;\n };\n disableEllipsis?: boolean;\n displayValueGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => string;\n filterLabel?: string;\n frozen?: TABLE_COLUMN_FROZEN;\n headerName?: string;\n headerTooltipContent?: string;\n hideInFilter?: boolean;\n id?: string;\n isInitiallyVisible: boolean;\n renderCell?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => ReactElement;\n renderHeader?: (params: TableColumnParams<TRowData, TDataContext>) => ReactElement;\n renderHeaderContent?: (params: TableColumnParams<TRowData, TDataContext>) => ReactElement;\n resizable?: boolean;\n sx?: SxProps<Theme>;\n textAlign?: 'left' | 'right';\n valueGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => TValue;\n widthFlex?: number;\n widthPx?: number;\n widthPxFn?: (dataLength: number) => number;\n}\n"],"mappings":";AASA,IAAYA,IAAL,yBAAA,GAAA;QACL,EAAAC,UAAA,WACA,EAAAC,iBAAA,kBACA,EAAAC,aAAA;AACF,EAAA,CAAA,CAAA,GAEYC,IAAL,yBAAA,GAAA;QACL,EAAAC,OAAA,QACA,EAAAC,QAAA;AACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"table.models.js","names":["FIXED_COLUMN_ID","\"ACTIONS\"","\"READABLE_INDEX\"","\"ROW_SELECT\"","TABLE_COLUMN_FROZEN","\"LEFT\"","\"RIGHT\""],"sources":["../../src/models/table.models.ts"],"sourcesContent":["import type {\n SxProps,\n Theme,\n} from '@mui/material';\nimport type { ReactElement } from 'react';\nimport type { TFunction } from 'i18next';\nimport type { DATE_FORMAT } from '@gen-epix/ui-core/constants/date.constants';\nimport type { OptionBase } from '@gen-epix/ui-core-form/models/form.models';\n\nexport enum FIXED_COLUMN_ID {\n ACTIONS = 'ACTIONS',\n READABLE_INDEX = 'READABLE_INDEX',\n ROW_SELECT = 'ROW_SELECT',\n}\n\nexport enum TABLE_COLUMN_FROZEN {\n LEFT = 'left',\n RIGHT = 'right',\n}\n\nexport interface GetTableCellRowComparatorProps<TColumn, TDataContext = null> {\n readonly column: TColumn;\n readonly dataContext: TDataContext;\n readonly direction: TableSortDirection;\n}\n\nexport interface GetTableCellValueProps<TRowData, TColumn, TDataContext = null> {\n readonly column: TColumn;\n readonly dataContext: TDataContext;\n readonly row: TRowData;\n readonly rowIndex: number;\n readonly t?: TFunction<'translation', undefined>;\n}\n\nexport type HasCellDataFn<TRowData, TDataContext = null> = (row: TRowData, column: TableColumn<TRowData, TDataContext>, rowIndex: number, dataContext: TDataContext) => boolean;\n\nexport type TableCellRowComparatorArgument<TRowData> = {\n row: TRowData;\n rowIndex: number;\n};\n\nexport type TableColumn<TRowData, TDataContext = null, TColumnContext = null> =\n TableColumnActions<TRowData, TDataContext, TColumnContext> |\n TableColumnBoolean<TRowData, TDataContext, TColumnContext> |\n TableColumnDate<TRowData, TDataContext, TColumnContext> |\n TableColumnNumber<TRowData, TDataContext, TColumnContext> |\n TableColumnOptions<TRowData, TDataContext, TColumnContext> |\n TableColumnReadableIndex<TRowData, TDataContext, TColumnContext> |\n TableColumnSelectable<TRowData, TDataContext, TColumnContext> |\n TableColumnText<TRowData, TDataContext, TColumnContext>;\n\nexport interface TableColumnActions<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnActions<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n frozen: TABLE_COLUMN_FROZEN.RIGHT;\n getActions: (params: TableRowParams<TRowData, TDataContext>) => ReactElement[];\n id: FIXED_COLUMN_ID.ACTIONS;\n isInitiallyVisible: true;\n resizable: false;\n type: 'actions';\n}\n\nexport interface TableColumnBoolean<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, boolean, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnBoolean<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n type: 'boolean';\n}\n\nexport interface TableColumnDate<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnDate<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n dateFormat: typeof DATE_FORMAT[keyof typeof DATE_FORMAT];\n type: 'date';\n}\n\nexport type TableColumnDimension = {\n columnIds: string[];\n id: string;\n label: string;\n};\n\nexport interface TableColumnNumber<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, number, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnNumber<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n type: 'number';\n}\n\nexport interface TableColumnOptions<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string | string[], TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnOptions<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n maxNumOptionsExpanded?: number;\n options: OptionBase<string>[];\n shouldFilterOptions?: boolean;\n type: 'options';\n}\n\nexport interface TableColumnParams<TRowData, TDataContext = null> {\n column: TableColumn<TRowData, TDataContext>;\n dataContext: TDataContext;\n}\n\nexport interface TableColumnReadableIndex<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, never, TDataContext, TColumnContext> {\n comparatorFactory?: never;\n disableEllipsis: true;\n frozen: TABLE_COLUMN_FROZEN.LEFT;\n getAriaLabel: (params: TableRowParams<TRowData, TDataContext>) => string;\n id: FIXED_COLUMN_ID.READABLE_INDEX;\n resizable: false;\n type: 'readableIndex';\n}\n\nexport interface TableColumnSelectable<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, never, TDataContext, TColumnContext> {\n comparatorFactory?: never;\n disableEllipsis: true;\n frozen: TABLE_COLUMN_FROZEN.LEFT;\n id: FIXED_COLUMN_ID.ROW_SELECT;\n isDisabled?: (params: TableRowParams<TRowData, TDataContext>) => boolean;\n resizable: false;\n type: 'selectable';\n}\n\nexport interface TableColumnText<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnText<TRowData, TDataContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n type: 'text';\n}\n\nexport type TableColumnVisualSettings = {\n calculatedWidth?: number;\n hasResized?: boolean;\n id: string;\n isVisible: boolean;\n offsetX?: number;\n widthFlex: number;\n widthPx: number;\n};\n\n\nexport type TableDragEvent = {\n clientX: number;\n clientY: number;\n deltaX: number;\n deltaY: number;\n elementOffsetX: number;\n elementWidth: number;\n target: HTMLDivElement;\n type: 'end' | 'move' | 'start';\n};\n\nexport type TableRowAndColumnParams<TRowData, TDataContext = null> = TableColumnParams<TRowData, TDataContext> & TableRowParams<TRowData, TDataContext>;\n\nexport interface TableRowParams<TRowData, TDataContext = null> {\n dataContext: TDataContext;\n id: string;\n row: TRowData;\n rowIndex: number;\n}\n\nexport type TableSortDirection = 'asc' | 'desc';\n\ninterface TableColumnBase<TRowData, TValue, TDataContext = null, TColumnContext = null> {\n cellColorGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => string;\n cellTitleGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => string;\n columnContext?: TColumnContext;\n customHeaderIcon?: {\n iconElement: ReactElement;\n label: string;\n onClick: (params: TableColumnParams<TRowData, TDataContext>) => void;\n };\n disableEllipsis?: boolean;\n displayValueGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => string;\n filterLabel?: string;\n frozen?: TABLE_COLUMN_FROZEN;\n headerName?: string;\n headerTooltipContent?: string;\n hideInFilter?: boolean;\n id?: string;\n isInitiallyVisible: boolean;\n renderCell?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => ReactElement;\n renderHeader?: (params: TableColumnParams<TRowData, TDataContext>) => ReactElement;\n renderHeaderContent?: (params: TableColumnParams<TRowData, TDataContext>) => ReactElement;\n resizable?: boolean;\n sx?: SxProps<Theme>;\n textAlign?: 'left' | 'right';\n valueGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => TValue;\n widthFlex?: number;\n widthPx?: number;\n widthPxFn?: (dataLength: number) => number;\n}\n"],"mappings":";AASA,IAAYA,IAAL,yBAAA,GAAA;C,OACL,EAAAC,UAAA,WACA,EAAAC,iBAAA,kBACA,EAAAC,aAAA,c;AACF,EAAA,CAAA,CAAA,GAEYC,IAAL,yBAAA,GAAA;C,OACL,EAAAC,OAAA,QACA,EAAAC,QAAA,S;AACF,EAAA,CAAA,CAAA"}
@@ -13,7 +13,7 @@ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
13
13
  import { useTranslation as _ } from "react-i18next";
14
14
  import { TestIdUtil as v } from "@gen-epix/ui-core/utils/TestIdUtil";
15
15
  import { useParams as y } from "react-router-dom";
16
- //#region src/pages/AcceptInvitationPage/AcceptInvitationPage.tsx
16
+ // src/pages/AcceptInvitationPage/AcceptInvitationPage.tsx
17
17
  var b = () => {
18
18
  let { token: b } = y(), x = t(), [S, C] = p(!1), { data: w, error: T, isLoading: E } = i({
19
19
  enabled: S,
@@ -56,7 +56,6 @@ var b = () => {
56
56
  })
57
57
  });
58
58
  };
59
- //#endregion
60
59
  export { b as AcceptInvitationPage };
61
60
 
62
61
  //# sourceMappingURL=index.js.map
@@ -9,7 +9,7 @@ import { jsx as h, jsxs as g } from "react/jsx-runtime";
9
9
  import { useTranslation as _ } from "react-i18next";
10
10
  import { TestIdUtil as v } from "@gen-epix/ui-core/utils/TestIdUtil";
11
11
  import { Outlet as y, useLocation as b } from "react-router-dom";
12
- //#region src/pages/AdminPage/AdminPage.tsx
12
+ // src/pages/AdminPage/AdminPage.tsx
13
13
  var x = () => {
14
14
  let { t: x } = _(), S = b(), C = f(), w = m(() => i.resolve(n).adminRoutes.map((e) => e.children?.length ? e.children.find((e) => e.index) : e).filter((e) => {
15
15
  let n = i.resolve(t).doesUserHavePermission(e.handle.requiredPermissions);
@@ -78,7 +78,6 @@ var x = () => {
78
78
  }, e.name)) })
79
79
  }) : /* @__PURE__ */ h(y, {});
80
80
  };
81
- //#endregion
82
81
  export { x as AdminPage };
83
82
 
84
83
  //# sourceMappingURL=index.js.map
@@ -7,7 +7,7 @@ import { useCallback as u, useMemo as d } from "react";
7
7
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
8
  import { useTranslation as m } from "react-i18next";
9
9
  import { TestIdUtil as h } from "@gen-epix/ui-core/utils/TestIdUtil";
10
- //#region src/pages/ChooseIdentityProviderPage/ChooseIdentityProviderPage.tsx
10
+ // src/pages/ChooseIdentityProviderPage/ChooseIdentityProviderPage.tsx
11
11
  var g = ({ identityProvidersWithAvailability: g }) => {
12
12
  let { t: _ } = m(), v = e(), y = v.login?.AfterIdentityProviderSelection, b = u((e) => {
13
13
  let t = e.target.getAttribute("data-name");
@@ -80,7 +80,6 @@ var g = ({ identityProvidersWithAvailability: g }) => {
80
80
  ]
81
81
  });
82
82
  };
83
- //#endregion
84
83
  export { g as ChooseIdentityProviderPage };
85
84
 
86
85
  //# sourceMappingURL=index.js.map
@@ -3,7 +3,7 @@ import { GenericErrorMessage as t } from "../../components/ui/GenericErrorMessag
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  import { useTranslation as r } from "react-i18next";
5
5
  import { TestIdUtil as i } from "@gen-epix/ui-core/utils/TestIdUtil";
6
- //#region src/pages/ErrorPage/ErrorPage.tsx
6
+ // src/pages/ErrorPage/ErrorPage.tsx
7
7
  var a = ({ error: a }) => {
8
8
  let { t: o } = r();
9
9
  return /* @__PURE__ */ n(e, {
@@ -13,7 +13,6 @@ var a = ({ error: a }) => {
13
13
  children: /* @__PURE__ */ n(t, { error: a })
14
14
  });
15
15
  };
16
- //#endregion
17
16
  export { a as ErrorPage };
18
17
 
19
18
  //# sourceMappingURL=index.js.map
@@ -11,7 +11,7 @@ import { object as u } from "yup";
11
11
  import { TestIdUtil as d } from "@gen-epix/ui-core/utils/TestIdUtil";
12
12
  import { FORM_FIELD_DEFINITION_TYPE as f } from "@gen-epix/ui-core-form/models/form.models";
13
13
  import { SchemaUtil as p } from "@gen-epix/ui-core-form/utils/SchemaUtil";
14
- //#region src/pages/IdentifierIssuersAdminPage/IdentifierIssuersAdminPage.tsx
14
+ // src/pages/IdentifierIssuersAdminPage/IdentifierIssuersAdminPage.tsx
15
15
  var m = () => {
16
16
  let { t: m } = l(), h = o(async (e) => (await i.resolve(t).identifierIssuersGetAll(null, null, { signal: e }))?.data, []), g = o(async (e) => await i.resolve(t).identifierIssuersDeleteOne(e.id), []), _ = o(async (e, n) => (await i.resolve(t).identifierIssuersPutOne(n.id, {
17
17
  id: n.id,
@@ -64,7 +64,6 @@ var m = () => {
64
64
  updateOne: _
65
65
  });
66
66
  };
67
- //#endregion
68
67
  export { m as IdentifierIssuersAdminPage };
69
68
 
70
69
  //# sourceMappingURL=index.js.map
@@ -14,7 +14,7 @@ import { boolean as p, object as m, string as h } from "yup";
14
14
  import { TestIdUtil as g } from "@gen-epix/ui-core/utils/TestIdUtil";
15
15
  import { FORM_FIELD_DEFINITION_TYPE as _ } from "@gen-epix/ui-core-form/models/form.models";
16
16
  import { useArray as v } from "@gen-epix/ui-core/hooks/useArray";
17
- //#region src/pages/OrganizationAdminPoliciesAdminPage/OrganizationAdminPoliciesAdminPage.tsx
17
+ // src/pages/OrganizationAdminPoliciesAdminPage/OrganizationAdminPoliciesAdminPage.tsx
18
18
  var y = () => {
19
19
  let { t: y } = f(), b = i(), x = a(), S = o(), C = v([
20
20
  b,
@@ -93,7 +93,6 @@ var y = () => {
93
93
  updateOne: E
94
94
  });
95
95
  };
96
- //#endregion
97
96
  export { y as OrganizationAdminPoliciesAdminPage };
98
97
 
99
98
  //# sourceMappingURL=index.js.map
@@ -12,7 +12,7 @@ import { TestIdUtil as f } from "@gen-epix/ui-core/utils/TestIdUtil";
12
12
  import { FORM_FIELD_DEFINITION_TYPE as p } from "@gen-epix/ui-core-form/models/form.models";
13
13
  import { SchemaUtil as m } from "@gen-epix/ui-core-form/utils/SchemaUtil";
14
14
  import { useParams as h } from "react-router-dom";
15
- //#region src/pages/OrganizationContactsAdminPage/OrganizationContactsAdminPage.tsx
15
+ // src/pages/OrganizationContactsAdminPage/OrganizationContactsAdminPage.tsx
16
16
  var g = () => {
17
17
  let { siteId: g } = h(), { t: _ } = l(), v = o(async (e) => (await i.resolve(t).contactsGetAll(null, null, { signal: e })).data, []), y = o((e) => e.filter((e) => e.site_id === g), [g]), b = o(async (e, n) => (await i.resolve(t).contactsPutOne(n.id, {
18
18
  id: n.id,
@@ -81,7 +81,6 @@ var g = () => {
81
81
  updateOne: b
82
82
  });
83
83
  };
84
- //#endregion
85
84
  export { g as OrganizationContactsAdminPage };
86
85
 
87
86
  //# sourceMappingURL=index.js.map