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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +5 -4
  2. package/dist/@types/mui.d.ts +13 -5
  3. package/dist/@types/ui-client-common.d.ts +1 -0
  4. package/dist/_chunks/ApplicationFooter.js +44 -44
  5. package/dist/_chunks/ApplicationFooter.js.map +1 -1
  6. package/dist/_chunks/Breadcrumbs.js +13 -13
  7. package/dist/_chunks/CrudPage.js +300 -300
  8. package/dist/_chunks/CrudPage.js.map +1 -1
  9. package/dist/_chunks/Notifications.js +51 -51
  10. package/dist/_chunks/OutageList.js +29 -29
  11. package/dist/_chunks/OutageUtil.js +1 -2
  12. package/dist/_chunks/OutageUtil.js.map +1 -1
  13. package/dist/_chunks/QueryClientService.js +96 -388
  14. package/dist/_chunks/QueryClientService.js.map +1 -1
  15. package/dist/_chunks/Table.js +518 -512
  16. package/dist/_chunks/Table.js.map +1 -1
  17. package/dist/_chunks/TableUtil.js +8 -16
  18. package/dist/_chunks/TableUtil.js.map +1 -1
  19. package/dist/_chunks/TextFilter.js +14 -12
  20. package/dist/_chunks/TextFilter.js.map +1 -1
  21. package/dist/_chunks/UserInvitationsAdminPage.js +77 -77
  22. package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
  23. package/dist/_chunks/UserManagerUtil.js +210 -209
  24. package/dist/_chunks/UserManagerUtil.js.map +1 -1
  25. package/dist/_chunks/_baseFlatten.js +8 -8
  26. package/dist/_chunks/_baseFlatten.js.map +1 -1
  27. package/dist/_chunks/_baseGet.js +280 -0
  28. package/dist/_chunks/_baseGet.js.map +1 -0
  29. package/dist/_chunks/_baseIteratee.js +274 -0
  30. package/dist/_chunks/_baseIteratee.js.map +1 -0
  31. package/dist/_chunks/_baseUnset.js +22 -299
  32. package/dist/_chunks/_baseUnset.js.map +1 -1
  33. package/dist/_chunks/last.js +13 -0
  34. package/dist/_chunks/last.js.map +1 -0
  35. package/dist/_chunks/omit.js +41 -40
  36. package/dist/_chunks/omit.js.map +1 -1
  37. package/dist/_chunks/tableStore.js +190 -183
  38. package/dist/_chunks/tableStore.js.map +1 -1
  39. package/dist/_chunks/uniq.js +44 -0
  40. package/dist/_chunks/uniq.js.map +1 -0
  41. package/dist/_chunks/useMutation.js +22 -22
  42. package/dist/_chunks/useMutation.js.map +1 -1
  43. package/dist/_chunks/useQueryMemo.js +25 -8
  44. package/dist/_chunks/useQueryMemo.js.map +1 -1
  45. package/dist/classes/abstracts/FilterAbstract/index.js +3 -1
  46. package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
  47. package/dist/classes/filters/MultiSelectFilter.d.ts +1 -1
  48. package/dist/classes/services/AuthenticationService/AuthenticationService.d.ts +1 -1
  49. package/dist/classes/services/AuthenticationService/index.js +15 -15
  50. package/dist/classes/services/AuthenticationService/index.js.map +1 -1
  51. package/dist/classes/services/AuthorizationService/index.js +4 -4
  52. package/dist/classes/services/AuthorizationService/index.js.map +1 -1
  53. package/dist/classes/services/BackendVersionService/index.js +3 -2
  54. package/dist/classes/services/BackendVersionService/index.js.map +1 -1
  55. package/dist/classes/services/BreadcrumbService/index.js +16 -38
  56. package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
  57. package/dist/classes/services/EmotionCacheService/index.js +9 -8
  58. package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
  59. package/dist/classes/services/I18nService/index.js +11 -10
  60. package/dist/classes/services/I18nService/index.js.map +1 -1
  61. package/dist/classes/services/InactivityService/index.js +12 -12
  62. package/dist/classes/services/InactivityService/index.js.map +1 -1
  63. package/dist/classes/services/LogService/index.js +39 -33
  64. package/dist/classes/services/LogService/index.js.map +1 -1
  65. package/dist/classes/services/NotificationService/index.js +8 -8
  66. package/dist/classes/services/NotificationService/index.js.map +1 -1
  67. package/dist/classes/services/PageEventBusService/index.js +13 -9
  68. package/dist/classes/services/PageEventBusService/index.js.map +1 -1
  69. package/dist/classes/services/RouterService/index.js +3 -6
  70. package/dist/classes/services/RouterService/index.js.map +1 -1
  71. package/dist/components/app/App/App.d.ts +1 -1
  72. package/dist/components/app/App/index.js +34 -38
  73. package/dist/components/app/App/index.js.map +1 -1
  74. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +28 -28
  75. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
  76. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +47 -45
  77. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
  78. package/dist/components/app/AuthenticationWrapper/index.js +35 -35
  79. package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
  80. package/dist/components/app/AuthorizationWrapper/index.js +19 -19
  81. package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
  82. package/dist/components/app/RouterRoot/index.js +52 -50
  83. package/dist/components/app/RouterRoot/index.js.map +1 -1
  84. package/dist/components/epi/EpiContactDetailsDialog/index.js +21 -21
  85. package/dist/components/filters/BooleanFilterField/index.js +5 -5
  86. package/dist/components/filters/DateFilterField/index.js +3 -3
  87. package/dist/components/filters/GeoFilterField/index.js +4 -4
  88. package/dist/components/filters/MultiSelectFilterField/index.js +4 -4
  89. package/dist/components/filters/NumberRangeFilterField/index.js +3 -3
  90. package/dist/components/filters/TextFilterField/index.js +3 -3
  91. package/dist/components/ui/ApplicationBar/index.js +188 -188
  92. package/dist/components/ui/ApplicationBar/index.js.map +1 -1
  93. package/dist/components/ui/GenericErrorMessage/index.js +29 -29
  94. package/dist/components/ui/LicensesDialog/index.js +38 -38
  95. package/dist/components/ui/LicensesDialog/index.js.map +1 -1
  96. package/dist/components/ui/MyPermissionsDialog/index.js +16 -16
  97. package/dist/components/ui/NavLink/index.js +6 -6
  98. package/dist/components/ui/OrganizationSwitcherDialog/index.js +21 -21
  99. package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
  100. package/dist/components/ui/PageContainer/index.js +24 -24
  101. package/dist/components/ui/PageContainer/index.js.map +1 -1
  102. package/dist/components/ui/Sidebar/index.js +30 -30
  103. package/dist/components/ui/UserFeedbackDialog/index.js +12 -12
  104. package/dist/constants/config.constants.d.ts +0 -2
  105. package/dist/constants/config.constants.js +2 -2
  106. package/dist/constants/config.constants.js.map +1 -1
  107. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +12 -12
  108. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js.map +1 -1
  109. package/dist/dataHooks/useIdentifierIssuerQuery/index.js +14 -14
  110. package/dist/dataHooks/useIdentifierIssuerQuery/index.js.map +1 -1
  111. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +12 -12
  112. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
  113. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +13 -13
  114. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js.map +1 -1
  115. package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +4 -4
  116. package/dist/dataHooks/useOrganizationsQuery/index.js +13 -13
  117. package/dist/dataHooks/useOrganizationsQuery/index.js.map +1 -1
  118. package/dist/dataHooks/useUsersQuery/index.js +10 -10
  119. package/dist/dataHooks/useUsersQuery/index.js.map +1 -1
  120. package/dist/hooks/useConfig/index.js +2 -2
  121. package/dist/hooks/useConfig/index.js.map +1 -1
  122. package/dist/hooks/useCreateMutation/index.js +12 -12
  123. package/dist/hooks/useCreateMutation/index.js.map +1 -1
  124. package/dist/hooks/useDeleteMutation/index.js +16 -9
  125. package/dist/hooks/useDeleteMutation/index.js.map +1 -1
  126. package/dist/hooks/useEditMutation/index.js +48 -33
  127. package/dist/hooks/useEditMutation/index.js.map +1 -1
  128. package/dist/hooks/useItemQuery/index.js +4 -4
  129. package/dist/hooks/useItemQuery/index.js.map +1 -1
  130. package/dist/locale/en.json +1 -0
  131. package/dist/locale/nl.json +1 -0
  132. package/dist/models/config.models.d.ts +1 -5
  133. package/dist/models/theme.models.d.ts +19 -16
  134. package/dist/pages/AcceptInvitationPage/index.js +25 -25
  135. package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
  136. package/dist/pages/AdminPage/index.js +16 -16
  137. package/dist/pages/ChooseIdentityProviderPage/index.js +21 -21
  138. package/dist/pages/IdentifierIssuersAdminPage/index.js +5 -5
  139. package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +5 -5
  140. package/dist/pages/OrganizationContactsAdminPage/index.js +6 -6
  141. package/dist/pages/OrganizationSitesAdminPage/index.js +9 -9
  142. package/dist/pages/OrganizationsAdminPage/index.js +13 -13
  143. package/dist/pages/OutagesAdminPage/index.js +20 -20
  144. package/dist/pages/PostLoginPage/index.js +6 -6
  145. package/dist/pages/PostLogoutPage/index.js +8 -8
  146. package/dist/pages/UsersAdminPage/index.js +39 -39
  147. package/dist/pages/UsersAdminPage/index.js.map +1 -1
  148. package/dist/setup/setup.js +11 -4
  149. package/dist/setup/setup.js.map +1 -1
  150. package/dist/theme/demoTheme/index.js +17 -15
  151. package/dist/theme/demoTheme/index.js.map +1 -1
  152. package/dist/utils/DataHookUtil/index.js +1 -1
  153. package/dist/utils/DataHookUtil/index.js.map +1 -1
  154. package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +2 -3
  155. package/dist/utils/DependencyContainerUtil/index.js +10 -15
  156. package/dist/utils/DependencyContainerUtil/index.js.map +1 -1
  157. package/dist/utils/MenuDataUtil/index.js +1 -1
  158. package/dist/utils/MenuDataUtil/index.js.map +1 -1
  159. package/dist/utils/StandardConfigUtil/index.js +0 -4
  160. package/dist/utils/StandardConfigUtil/index.js.map +1 -1
  161. package/dist/utils/TimeUtil/index.js +1 -1
  162. package/dist/utils/TimeUtil/index.js.map +1 -1
  163. package/package.json +10 -13
  164. package/dist/context/ClientCommonConfigContext/ClientCommonConfigContext.d.ts +0 -9
  165. package/dist/context/ClientCommonConfigContext/ClientCommonConfigContextProvider.d.ts +0 -6
  166. package/dist/context/ClientCommonConfigContext/index.d.ts +0 -3
  167. package/dist/context/ClientCommonConfigContext/index.js +0 -34
  168. package/dist/context/ClientCommonConfigContext/index.js.map +0 -1
  169. package/dist/context/ClientCommonConfigContext/useClientCommonConfigContext.d.ts +0 -3
@@ -2,79 +2,79 @@ import { useConfig as e } from "../../hooks/useConfig/index.js";
2
2
  import { PageContainer as t } from "../../components/ui/PageContainer/index.js";
3
3
  import { AuthenticationService as n } from "../../classes/services/AuthenticationService/index.js";
4
4
  import { container as r } from "tsyringe";
5
- import { useCallback as i, useMemo as a } from "react";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- import { Alert as c, AlertTitle as l, Box as u, Button as d, Tooltip as f, Typography as p } from "@mui/material";
5
+ import { Alert as i, AlertTitle as a, Box as o, Button as s, Tooltip as c, Typography as l } from "@mui/material";
6
+ import { useCallback as u, useMemo as d } from "react";
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
10
  //#region src/pages/ChooseIdentityProviderPage/ChooseIdentityProviderPage.tsx
11
11
  var g = ({ identityProvidersWithAvailability: g }) => {
12
- let { t: _ } = m(), v = e(), y = v.login?.AfterIdentityProviderSelection, b = i((e) => {
12
+ let { t: _ } = m(), v = e(), y = v.login?.AfterIdentityProviderSelection, b = u((e) => {
13
13
  let t = e.target.getAttribute("data-name");
14
14
  r.resolve(n).next(g.find((e) => e.provider.name === t).provider);
15
- }, [g]), x = a(() => g?.filter((e) => e.isAvailable) ?? [], [g]), S = i(() => {
15
+ }, [g]), x = d(() => g?.filter((e) => e.isAvailable) ?? [], [g]), S = u(() => {
16
16
  window.location.reload();
17
- }, []), C = a(() => /* @__PURE__ */ o(d, {
17
+ }, []), C = d(() => /* @__PURE__ */ f(s, {
18
18
  color: "inherit",
19
19
  onClick: S,
20
20
  sx: { marginTop: 2 },
21
21
  variant: "outlined",
22
22
  children: _("Refresh")
23
23
  }), [S, _]);
24
- return /* @__PURE__ */ s(t, {
24
+ return /* @__PURE__ */ p(t, {
25
25
  singleAction: !0,
26
26
  testIdAttributes: h.createAttributes("ChooseIdentityProviderPage"),
27
27
  title: _`Choose identity provider`,
28
28
  children: [
29
- x.length === 0 && /* @__PURE__ */ o(u, {
29
+ x.length === 0 && /* @__PURE__ */ f(o, {
30
30
  sx: {
31
31
  marginBottom: 4,
32
32
  marginTop: 1
33
33
  },
34
- children: /* @__PURE__ */ s(c, {
34
+ children: /* @__PURE__ */ p(i, {
35
35
  severity: "error",
36
- children: [/* @__PURE__ */ o(l, { children: _("No identity providers are currently available. Please try again later.") }), C]
36
+ children: [/* @__PURE__ */ f(a, { children: _("No identity providers are currently available. Please try again later.") }), C]
37
37
  })
38
38
  }),
39
- x.length > 0 && x.length !== g.length && /* @__PURE__ */ o(u, {
39
+ x.length > 0 && x.length !== g.length && /* @__PURE__ */ f(o, {
40
40
  sx: {
41
41
  marginBottom: 4,
42
42
  marginTop: 1
43
43
  },
44
- children: /* @__PURE__ */ s(c, {
44
+ children: /* @__PURE__ */ p(i, {
45
45
  severity: "info",
46
- children: [/* @__PURE__ */ o(l, { children: _("Some identity providers are currently unavailable.") }), C]
46
+ children: [/* @__PURE__ */ f(a, { children: _("Some identity providers are currently unavailable.") }), C]
47
47
  })
48
48
  }),
49
- /* @__PURE__ */ s(u, {
49
+ /* @__PURE__ */ p(o, {
50
50
  sx: { textAlign: "center" },
51
51
  children: [
52
- /* @__PURE__ */ o(p, {
52
+ /* @__PURE__ */ f(l, {
53
53
  sx: { marginBottom: 2 },
54
54
  variant: "h1",
55
55
  children: _("Welcome to {{applicationName}}", { applicationName: v.applicationName })
56
56
  }),
57
- /* @__PURE__ */ o(p, {
57
+ /* @__PURE__ */ f(l, {
58
58
  sx: { marginBottom: 2 },
59
59
  children: _`Please login with one of the following identity providers:`
60
60
  }),
61
61
  g.map((e) => {
62
- let t = /* @__PURE__ */ o(d, {
62
+ let t = /* @__PURE__ */ f(s, {
63
63
  "data-name": e.provider.name,
64
64
  disabled: !e.isAvailable,
65
65
  onClick: b,
66
66
  children: e.provider.label
67
67
  });
68
- return /* @__PURE__ */ s(u, {
68
+ return /* @__PURE__ */ p(o, {
69
69
  sx: { marginY: 2 },
70
- children: [e.isAvailable && t, !e.isAvailable && /* @__PURE__ */ o(f, {
70
+ children: [e.isAvailable && t, !e.isAvailable && /* @__PURE__ */ f(c, {
71
71
  arrow: !0,
72
72
  title: e.isAvailable ? "" : _("This identity provider is currently unavailable. Please try again later."),
73
- children: /* @__PURE__ */ o("span", { children: t })
73
+ children: /* @__PURE__ */ f("span", { children: t })
74
74
  })]
75
75
  }, e.provider.name);
76
76
  }),
77
- y && /* @__PURE__ */ o(y, {})
77
+ y && /* @__PURE__ */ f(y, {})
78
78
  ]
79
79
  })
80
80
  ]
@@ -2,8 +2,8 @@ import { t as e } from "../../_chunks/TableUtil.js";
2
2
  import { API_ORGANIZATION_TOKEN as t } from "../../constants/api.constants.js";
3
3
  import { t as n } from "../../_chunks/CrudPage.js";
4
4
  import { COMMON_QUERY_KEY as r } from "../../constants/query.constants.js";
5
- import { CommonDbCommandName as i } from "@gen-epix/api-commondb";
6
- import { container as a } from "tsyringe";
5
+ import { container as i } from "tsyringe";
6
+ import { CommonDbCommandName as a } from "@gen-epix/api-commondb";
7
7
  import { useCallback as o, useMemo as s } from "react";
8
8
  import { jsx as c } from "react/jsx-runtime";
9
9
  import { useTranslation as l } from "react-i18next";
@@ -13,10 +13,10 @@ import { FORM_FIELD_DEFINITION_TYPE as f } from "@gen-epix/ui-core-form/models/f
13
13
  import { SchemaUtil as p } from "@gen-epix/ui-core-form/utils/SchemaUtil";
14
14
  //#region src/pages/IdentifierIssuersAdminPage/IdentifierIssuersAdminPage.tsx
15
15
  var m = () => {
16
- let { t: m } = l(), h = o(async (e) => (await a.resolve(t).identifierIssuersGetAll(null, null, { signal: e }))?.data, []), g = o(async (e) => await a.resolve(t).identifierIssuersDeleteOne(e.id), []), _ = o(async (e, n) => (await a.resolve(t).identifierIssuersPutOne(n.id, {
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,
18
18
  ...e
19
- })).data, []), v = o(async (e) => (await a.resolve(t).identifierIssuersPostOne(e)).data, []), y = o((e) => e.name, []), b = s(() => u().shape({
19
+ })).data, []), v = o(async (e) => (await i.resolve(t).identifierIssuersPostOne(e)).data, []), y = o((e) => e.name, []), b = s(() => u().shape({
20
20
  code: p.code,
21
21
  description: p.description,
22
22
  name: p.name
@@ -48,7 +48,7 @@ var m = () => {
48
48
  return /* @__PURE__ */ c(n, {
49
49
  createItemDialogTitle: m`Create new identifier issuer`,
50
50
  createOne: v,
51
- crudCommandType: i.IdentifierIssuerCrudCommand,
51
+ crudCommandType: a.IdentifierIssuerCrudCommand,
52
52
  defaultSortByField: "code",
53
53
  defaultSortDirection: "asc",
54
54
  deleteOne: g,
@@ -5,8 +5,8 @@ import { COMMON_QUERY_KEY as r } from "../../constants/query.constants.js";
5
5
  import { useOrganizationOptionsQuery as i } from "../../dataHooks/useOrganizationsQuery/index.js";
6
6
  import { useUserOptionsQuery as a } from "../../dataHooks/useUsersQuery/index.js";
7
7
  import { useOrganizationAdminPolicyNameFactory as o } from "../../dataHooks/useOrganizationAdminPoliciesQuery/index.js";
8
- import { CommonDbCommandName as s } from "@gen-epix/api-commondb";
9
- import { container as c } from "tsyringe";
8
+ import { container as s } from "tsyringe";
9
+ import { CommonDbCommandName as c } from "@gen-epix/api-commondb";
10
10
  import { useCallback as l, useMemo as u } from "react";
11
11
  import { jsx as d } from "react/jsx-runtime";
12
12
  import { useTranslation as f } from "react-i18next";
@@ -20,10 +20,10 @@ var y = () => {
20
20
  b,
21
21
  x,
22
22
  S
23
- ]), w = l(async (e) => (await c.resolve(t).organizationAdminPoliciesGetAll(null, null, { signal: e }))?.data, []), T = l(async (e) => await c.resolve(t).organizationAdminPoliciesDeleteOne(e.id), []), E = l(async (e, n) => (await c.resolve(t).organizationAdminPoliciesPutOne(n.id, {
23
+ ]), w = l(async (e) => (await s.resolve(t).organizationAdminPoliciesGetAll(null, null, { signal: e }))?.data, []), T = l(async (e) => await s.resolve(t).organizationAdminPoliciesDeleteOne(e.id), []), E = l(async (e, n) => (await s.resolve(t).organizationAdminPoliciesPutOne(n.id, {
24
24
  id: n.id,
25
25
  ...e
26
- })).data, []), D = l(async (e) => (await c.resolve(t).organizationAdminPoliciesPostOne(e)).data, []), O = l((e) => S.getName(e) ?? e.id, [S]), k = u(() => m().shape({
26
+ })).data, []), D = l(async (e) => (await s.resolve(t).organizationAdminPoliciesPostOne(e)).data, []), O = l((e) => S.getName(e) ?? e.id, [S]), k = u(() => m().shape({
27
27
  is_active: p(),
28
28
  organization_id: h().required().uuid4(),
29
29
  user_id: h().required().uuid4()
@@ -76,7 +76,7 @@ var y = () => {
76
76
  return /* @__PURE__ */ d(n, {
77
77
  createItemDialogTitle: y`Create new organization admin policy`,
78
78
  createOne: D,
79
- crudCommandType: s.OrganizationAdminPolicyCrudCommand,
79
+ crudCommandType: c.OrganizationAdminPolicyCrudCommand,
80
80
  defaultSortByField: "organization_id",
81
81
  defaultSortDirection: "asc",
82
82
  deleteOne: T,
@@ -2,8 +2,8 @@ import { t as e } from "../../_chunks/TableUtil.js";
2
2
  import { API_ORGANIZATION_TOKEN as t } from "../../constants/api.constants.js";
3
3
  import { t as n } from "../../_chunks/CrudPage.js";
4
4
  import { COMMON_QUERY_KEY as r } from "../../constants/query.constants.js";
5
- import { CommonDbCommandName as i } from "@gen-epix/api-commondb";
6
- import { container as a } from "tsyringe";
5
+ import { container as i } from "tsyringe";
6
+ import { CommonDbCommandName as a } from "@gen-epix/api-commondb";
7
7
  import { useCallback as o, useMemo as s } from "react";
8
8
  import { jsx as c } from "react/jsx-runtime";
9
9
  import { useTranslation as l } from "react-i18next";
@@ -14,14 +14,14 @@ import { SchemaUtil as m } from "@gen-epix/ui-core-form/utils/SchemaUtil";
14
14
  import { useParams as h } from "react-router-dom";
15
15
  //#region src/pages/OrganizationContactsAdminPage/OrganizationContactsAdminPage.tsx
16
16
  var g = () => {
17
- let { siteId: g } = h(), { t: _ } = l(), v = o(async (e) => (await a.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 a.resolve(t).contactsPutOne(n.id, {
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,
19
19
  site_id: g,
20
20
  ...e
21
- })).data, [g]), x = o(async (e) => (await a.resolve(t).contactsPostOne({
21
+ })).data, [g]), x = o(async (e) => (await i.resolve(t).contactsPostOne({
22
22
  site_id: g,
23
23
  ...e
24
- })).data, [g]), S = o(async (e) => await a.resolve(t).contactsDeleteOne(e.id), []), C = o((e) => e.name, []), w = s(() => u().shape({
24
+ })).data, [g]), S = o(async (e) => await i.resolve(t).contactsDeleteOne(e.id), []), C = o((e) => e.name, []), w = s(() => u().shape({
25
25
  email: d().email().max(256),
26
26
  name: m.name,
27
27
  phone: d().extendedAlphaNumeric().max(100)
@@ -63,7 +63,7 @@ var g = () => {
63
63
  return /* @__PURE__ */ c(n, {
64
64
  createItemDialogTitle: _`Create new contact`,
65
65
  createOne: x,
66
- crudCommandType: i.ContactCrudCommand,
66
+ crudCommandType: a.ContactCrudCommand,
67
67
  defaultSortByField: "name",
68
68
  defaultSortDirection: "asc",
69
69
  deleteOne: S,
@@ -3,8 +3,8 @@ import { API_ORGANIZATION_TOKEN as t } from "../../constants/api.constants.js";
3
3
  import { AuthorizationService as n } from "../../classes/services/AuthorizationService/index.js";
4
4
  import { t as r } from "../../_chunks/CrudPage.js";
5
5
  import { COMMON_QUERY_KEY as i } from "../../constants/query.constants.js";
6
- import { CommonDbCommandName as a, CommonDbPermissionType as o } from "@gen-epix/api-commondb";
7
- import { container as s } from "tsyringe";
6
+ import { container as a } from "tsyringe";
7
+ import { CommonDbCommandName as o, CommonDbPermissionType as s } from "@gen-epix/api-commondb";
8
8
  import { useCallback as c, useMemo as l } from "react";
9
9
  import { jsx as u } from "react/jsx-runtime";
10
10
  import { useTranslation as d } from "react-i18next";
@@ -15,14 +15,14 @@ import { SchemaUtil as h } from "@gen-epix/ui-core-form/utils/SchemaUtil";
15
15
  import { useParams as g } from "react-router-dom";
16
16
  //#region src/pages/OrganizationSitesAdminPage/OrganizationSitesAdminPage.tsx
17
17
  var _ = () => {
18
- let { organizationId: _ } = g(), { t: v } = d(), y = c(async (e) => (await s.resolve(t).sitesGetAll(null, null, { signal: e })).data, []), b = c((e) => e.filter((e) => e.organization_id === _), [_]), x = c(async (e, n) => (await s.resolve(t).sitesPutOne(n.id, {
18
+ let { organizationId: _ } = g(), { t: v } = d(), y = c(async (e) => (await a.resolve(t).sitesGetAll(null, null, { signal: e })).data, []), b = c((e) => e.filter((e) => e.organization_id === _), [_]), x = c(async (e, n) => (await a.resolve(t).sitesPutOne(n.id, {
19
19
  id: n.id,
20
20
  name: e.name,
21
21
  organization_id: _
22
- })).data, [_]), S = c(async (e) => (await s.resolve(t).sitesPostOne({
22
+ })).data, [_]), S = c(async (e) => (await a.resolve(t).sitesPostOne({
23
23
  name: e.name,
24
24
  organization_id: _
25
- })).data, [_]), C = c(async (e) => await s.resolve(t).sitesDeleteOne(e.id), []), w = c((e) => e.name, []), T = l(() => f().shape({ name: h.name }), []), E = l(() => [{
25
+ })).data, [_]), C = c(async (e) => await a.resolve(t).sitesDeleteOne(e.id), []), w = c((e) => e.name, []), T = l(() => f().shape({ name: h.name }), []), E = l(() => [{
26
26
  definition: m.TEXTFIELD,
27
27
  label: v`Name`,
28
28
  name: "name"
@@ -34,9 +34,9 @@ var _ = () => {
34
34
  id: t.id,
35
35
  organization_id: t.organization_id,
36
36
  ...e
37
- }), []), k = l(() => s.resolve(n).doesUserHavePermission([{
38
- command_name: a.ContactCrudCommand,
39
- permission_type: o.READ
37
+ }), []), k = l(() => a.resolve(n).doesUserHavePermission([{
38
+ command_name: o.ContactCrudCommand,
39
+ permission_type: s.READ
40
40
  }]) ? [{
41
41
  getPathName: (e) => `/management/organizations/${e.organization_id}/sites/${e.id}/contacts`,
42
42
  label: v`Manage contacts`
@@ -44,7 +44,7 @@ var _ = () => {
44
44
  return /* @__PURE__ */ u(r, {
45
45
  createItemDialogTitle: v`Create new site`,
46
46
  createOne: S,
47
- crudCommandType: a.SiteCrudCommand,
47
+ crudCommandType: o.SiteCrudCommand,
48
48
  defaultSortByField: "name",
49
49
  defaultSortDirection: "asc",
50
50
  deleteOne: C,
@@ -7,8 +7,8 @@ import { t as a } from "../../_chunks/CrudPage.js";
7
7
  import { COMMON_QUERY_KEY as o } from "../../constants/query.constants.js";
8
8
  import { useIdentifierIssuerOptionsQuery as s } from "../../dataHooks/useIdentifierIssuerQuery/index.js";
9
9
  import { useOrganizationIdentifierIssuerLinksQuery as c } from "../../dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js";
10
- import { CommonDbCommandName as l, CommonDbPermissionType as u } from "@gen-epix/api-commondb";
11
- import { container as d } from "tsyringe";
10
+ import { container as l } from "tsyringe";
11
+ import { CommonDbCommandName as u, CommonDbPermissionType as d } from "@gen-epix/api-commondb";
12
12
  import { useCallback as f, useMemo as p } from "react";
13
13
  import { jsx as m } from "react/jsx-runtime";
14
14
  import { useTranslation as h } from "react-i18next";
@@ -19,19 +19,19 @@ import { SchemaUtil as x } from "@gen-epix/ui-core-form/utils/SchemaUtil";
19
19
  import { useArray as S } from "@gen-epix/ui-core/hooks/useArray";
20
20
  //#region src/pages/OrganizationsAdminPage/OrganizationsAdminPage.tsx
21
21
  var C = /* @__PURE__ */ e(i(), 1), w = () => {
22
- let { t: e } = h(), i = s(), w = c(), T = S([i, w]), E = f(async (e) => (await d.resolve(n).organizationsGetAll(null, null, { signal: e }))?.data, []), D = f(async (e, t) => (await d.resolve(n).organizationsPutIdentifierIssuers(t.id, { organization_identifier_issuer_links: e.identifierIssuerIds.map((e) => ({
22
+ let { t: e } = h(), i = s(), w = c(), T = S([i, w]), E = f(async (e) => (await l.resolve(n).organizationsGetAll(null, null, { signal: e }))?.data, []), D = f(async (e, t) => (await l.resolve(n).organizationsPutIdentifierIssuers(t.id, { organization_identifier_issuer_links: e.identifierIssuerIds.map((e) => ({
23
23
  identifier_issuer_id: e,
24
24
  organization_id: t.id
25
- })) }), (await d.resolve(n).organizationsPutOne(t.id, {
25
+ })) }), (await l.resolve(n).organizationsPutOne(t.id, {
26
26
  id: t.id,
27
27
  ...e
28
28
  })).data), []), O = f(async (e) => {
29
- let t = (await d.resolve(n).organizationsPostOne((0, C.default)(e, ["identifierIssuerIds"]))).data;
30
- return await d.resolve(n).organizationsPutIdentifierIssuers(t.id, { organization_identifier_issuer_links: e.identifierIssuerIds.map((e) => ({
29
+ let t = (await l.resolve(n).organizationsPostOne((0, C.default)(e, ["identifierIssuerIds"]))).data;
30
+ return await l.resolve(n).organizationsPutIdentifierIssuers(t.id, { organization_identifier_issuer_links: e.identifierIssuerIds.map((e) => ({
31
31
  identifier_issuer_id: e,
32
32
  organization_id: t.id
33
33
  })) }), t;
34
- }, []), k = f(async (e) => await d.resolve(n).organizationsDeleteOne(e.id), []), A = f((e) => e.name, []), j = p(() => _().shape({
34
+ }, []), k = f(async (e) => await l.resolve(n).organizationsDeleteOne(e.id), []), A = f((e) => e.name, []), j = p(() => _().shape({
35
35
  code: x.code,
36
36
  description: x.description,
37
37
  identifierIssuerIds: g().of(v().uuid4()).min(0).required(),
@@ -85,9 +85,9 @@ var C = /* @__PURE__ */ e(i(), 1), w = () => {
85
85
  valueGetter: (e) => e.row.identifierIssuerIds.length,
86
86
  widthFlex: .5
87
87
  }
88
- ], [i.options.length, e]), P = p(() => d.resolve(r).doesUserHavePermission([{
89
- command_name: l.SiteCrudCommand,
90
- permission_type: u.READ
88
+ ], [i.options.length, e]), P = p(() => l.resolve(r).doesUserHavePermission([{
89
+ command_name: u.SiteCrudCommand,
90
+ permission_type: d.READ
91
91
  }]) ? [{
92
92
  getPathName: (e) => `/management/organizations/${e.id}/sites`,
93
93
  label: e`Manage sites`
@@ -98,15 +98,15 @@ var C = /* @__PURE__ */ e(i(), 1), w = () => {
98
98
  identifierIssuerIds: t
99
99
  };
100
100
  }), [w.data]), I = p(() => [[o.IDENTIFIER_ISSUER_LINKS]], []), L = p(() => [{
101
- command_name: l.OrganizationIdentifierIssuerLinkUpdateAssociationCommand,
102
- permission_type: u.EXECUTE
101
+ command_name: u.OrganizationIdentifierIssuerLinkUpdateAssociationCommand,
102
+ permission_type: d.EXECUTE
103
103
  }], []);
104
104
  return /* @__PURE__ */ m(a, {
105
105
  associationQueryKeys: I,
106
106
  convertToTableData: F,
107
107
  createItemDialogTitle: e`Create new organization`,
108
108
  createOne: O,
109
- crudCommandType: l.OrganizationCrudCommand,
109
+ crudCommandType: u.OrganizationCrudCommand,
110
110
  defaultSortByField: "name",
111
111
  defaultSortDirection: "asc",
112
112
  deleteOne: k,
@@ -2,9 +2,9 @@ import { t as e } from "../../_chunks/TableUtil.js";
2
2
  import { API_SYSTEM_TOKEN as t } from "../../constants/api.constants.js";
3
3
  import { t as n } from "../../_chunks/CrudPage.js";
4
4
  import { COMMON_QUERY_KEY as r } from "../../constants/query.constants.js";
5
- import { DATE_FORMAT as i } from "@gen-epix/ui-core/constants/date.constants";
6
- import { CommonDbCommandName as a, CommonDbPermissionType as o } from "@gen-epix/api-commondb";
7
- import { container as s } from "tsyringe";
5
+ import { container as i } from "tsyringe";
6
+ import { DATE_FORMAT as a } from "@gen-epix/ui-core/constants/date.constants";
7
+ import { CommonDbCommandName as o, CommonDbPermissionType as s } from "@gen-epix/api-commondb";
8
8
  import { useCallback as c, useMemo as l } from "react";
9
9
  import { jsx as u } from "react/jsx-runtime";
10
10
  import { useTranslation as d } from "react-i18next";
@@ -14,10 +14,10 @@ import { FORM_FIELD_DEFINITION_TYPE as h } from "@gen-epix/ui-core-form/models/f
14
14
  import { SchemaUtil as g } from "@gen-epix/ui-core-form/utils/SchemaUtil";
15
15
  //#region src/pages/OutagesAdminPage/OutagesAdminPage.tsx
16
16
  var _ = () => {
17
- let { t: _ } = d(), v = c(async (e) => (await s.resolve(t).outagesGetAll(null, null, { signal: e }))?.data, []), y = c(async (e) => await s.resolve(t).outagesDeleteOne(e.id), []), b = c(async (e, n) => (await s.resolve(t).outagesPutOne(n.id, {
17
+ let { t: _ } = d(), v = c(async (e) => (await i.resolve(t).outagesGetAll(null, null, { signal: e }))?.data, []), y = c(async (e) => await i.resolve(t).outagesDeleteOne(e.id), []), b = c(async (e, n) => (await i.resolve(t).outagesPutOne(n.id, {
18
18
  id: n.id,
19
19
  ...e
20
- })).data, []), x = c(async (e) => (await s.resolve(t).outagesPostOne(e)).data, []), S = c((e) => e.description, []), C = l(() => p().shape({
20
+ })).data, []), x = c(async (e) => (await i.resolve(t).outagesPostOne(e)).data, []), S = c((e) => e.description, []), C = l(() => p().shape({
21
21
  active_from: g.isoString,
22
22
  active_to: g.isoString,
23
23
  description: g.description.required(),
@@ -34,25 +34,25 @@ var _ = () => {
34
34
  rows: 5
35
35
  },
36
36
  {
37
- dateFormat: i.DATE_TIME,
37
+ dateFormat: a.DATE_TIME,
38
38
  definition: h.DATE,
39
39
  label: _`Active from`,
40
40
  name: "active_from"
41
41
  },
42
42
  {
43
- dateFormat: i.DATE_TIME,
43
+ dateFormat: a.DATE_TIME,
44
44
  definition: h.DATE,
45
45
  label: _`Active to`,
46
46
  name: "active_to"
47
47
  },
48
48
  {
49
- dateFormat: i.DATE_TIME,
49
+ dateFormat: a.DATE_TIME,
50
50
  definition: h.DATE,
51
51
  label: _`Visible from`,
52
52
  name: "visible_from"
53
53
  },
54
54
  {
55
- dateFormat: i.DATE_TIME,
55
+ dateFormat: a.DATE_TIME,
56
56
  definition: h.DATE,
57
57
  label: _`Visible to`,
58
58
  name: "visible_to"
@@ -69,22 +69,22 @@ var _ = () => {
69
69
  }
70
70
  ], [_]), T = l(() => [
71
71
  e.createDateColumn({
72
- dateFormat: i.DATE_TIME,
72
+ dateFormat: a.DATE_TIME,
73
73
  id: "active_from",
74
74
  name: _`Active from`
75
75
  }),
76
76
  e.createDateColumn({
77
- dateFormat: i.DATE_TIME,
77
+ dateFormat: a.DATE_TIME,
78
78
  id: "active_to",
79
79
  name: _`Active to`
80
80
  }),
81
81
  e.createDateColumn({
82
- dateFormat: i.DATE_TIME,
82
+ dateFormat: a.DATE_TIME,
83
83
  id: "visible_from",
84
84
  name: _`Visible from`
85
85
  }),
86
86
  e.createDateColumn({
87
- dateFormat: i.DATE_TIME,
87
+ dateFormat: a.DATE_TIME,
88
88
  id: "visible_to",
89
89
  name: _`Visible to`
90
90
  }),
@@ -97,19 +97,19 @@ var _ = () => {
97
97
  name: _`Is visible`
98
98
  })
99
99
  ], [_]), E = l(() => [{
100
- command_name: a.OutageCrudCommand,
101
- permission_type: o.CREATE
100
+ command_name: o.OutageCrudCommand,
101
+ permission_type: s.CREATE
102
102
  }], []), D = l(() => [{
103
- command_name: a.OutageCrudCommand,
104
- permission_type: o.DELETE
103
+ command_name: o.OutageCrudCommand,
104
+ permission_type: s.DELETE
105
105
  }], []), O = l(() => [{
106
- command_name: a.OutageCrudCommand,
107
- permission_type: o.UPDATE
106
+ command_name: o.OutageCrudCommand,
107
+ permission_type: s.UPDATE
108
108
  }], []);
109
109
  return /* @__PURE__ */ u(n, {
110
110
  createItemDialogTitle: _`Create new outage`,
111
111
  createOne: x,
112
- crudCommandType: a.OutageCrudCommand,
112
+ crudCommandType: o.OutageCrudCommand,
113
113
  defaultSortByField: "active_from",
114
114
  defaultSortDirection: "asc",
115
115
  deleteOne: y,
@@ -1,24 +1,24 @@
1
1
  import { RouterService as e } from "../../classes/services/RouterService/index.js";
2
2
  import { PageContainer as t } from "../../components/ui/PageContainer/index.js";
3
3
  import { container as n } from "tsyringe";
4
- import { useEffect as r } from "react";
5
- import { jsx as i } from "react/jsx-runtime";
6
- import { CircularProgress as a } from "@mui/material";
4
+ import { CircularProgress as r } from "@mui/material";
5
+ import { useEffect as i } from "react";
6
+ import { jsx as a } from "react/jsx-runtime";
7
7
  import { useTranslation as o } from "react-i18next";
8
8
  import { TestIdUtil as s } from "@gen-epix/ui-core/utils/TestIdUtil";
9
9
  import { useAuth as c } from "react-oidc-context";
10
10
  //#region src/pages/PostLoginPage/PostLoginPage.tsx
11
11
  var l = () => {
12
12
  let { t: l } = o(), u = c().user.state;
13
- return r(() => {
13
+ return i(() => {
14
14
  let t = u?.preLoginLocation;
15
15
  (!t?.pathname || t.pathname === "/post-login") && (t = { pathname: "/" }), n.resolve(e).router.navigate(t);
16
- }, [u?.preLoginLocation]), /* @__PURE__ */ i(t, {
16
+ }, [u?.preLoginLocation]), /* @__PURE__ */ a(t, {
17
17
  ignorePageEvent: !0,
18
18
  singleAction: !0,
19
19
  testIdAttributes: s.createAttributes("PostLoginPage"),
20
20
  title: l`Logged in`,
21
- children: /* @__PURE__ */ i(a, {})
21
+ children: /* @__PURE__ */ a(r, {})
22
22
  });
23
23
  };
24
24
  //#endregion
@@ -1,26 +1,26 @@
1
1
  import { RouterService as e } from "../../classes/services/RouterService/index.js";
2
2
  import { PageContainer as t } from "../../components/ui/PageContainer/index.js";
3
3
  import { container as n } from "tsyringe";
4
- import { useCallback as r } from "react";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import { Box as o, Button as s, Typography as c } from "@mui/material";
4
+ import { Box as r, Button as i, Typography as a } from "@mui/material";
5
+ import { useCallback as o } from "react";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
7
  import { useTranslation as l } from "react-i18next";
8
8
  import { TestIdUtil as u } from "@gen-epix/ui-core/utils/TestIdUtil";
9
9
  //#region src/pages/PostLogoutPage/PostLogoutPage.tsx
10
10
  var d = () => {
11
- let { t: d } = l(), f = r(async () => {
11
+ let { t: d } = l(), f = o(async () => {
12
12
  await n.resolve(e).router.navigate("/");
13
13
  }, []);
14
- return /* @__PURE__ */ i(t, {
14
+ return /* @__PURE__ */ s(t, {
15
15
  singleAction: !0,
16
16
  testIdAttributes: u.createAttributes("PostLogoutPage"),
17
17
  title: d`Logged out`,
18
- children: /* @__PURE__ */ a(o, {
18
+ children: /* @__PURE__ */ c(r, {
19
19
  sx: { textAlign: "center" },
20
- children: [/* @__PURE__ */ i(c, {
20
+ children: [/* @__PURE__ */ s(a, {
21
21
  sx: { marginBottom: 2 },
22
22
  children: d`You have been logged out. You may close this window or log in again.`
23
- }), /* @__PURE__ */ i(s, {
23
+ }), /* @__PURE__ */ s(i, {
24
24
  onClick: f,
25
25
  children: d`Log in again`
26
26
  })]