@gen-epix/ui-client-common 4.3.0 → 4.3.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 (49) hide show
  1. package/dist/_chunks/Breadcrumbs.js +22 -22
  2. package/dist/_chunks/Table.js +559 -3173
  3. package/dist/_chunks/Table.js.map +1 -1
  4. package/dist/_chunks/{oidc-client-ts.js → UserManagerUtil.js} +222 -198
  5. package/dist/_chunks/UserManagerUtil.js.map +1 -0
  6. package/dist/_chunks/middleware.js +1 -1
  7. package/dist/_chunks/middleware.js.map +1 -1
  8. package/dist/_chunks/omit.js +1 -1
  9. package/dist/_chunks/omit.js.map +1 -1
  10. package/dist/_chunks/react.js +1 -1
  11. package/dist/_chunks/react.js.map +1 -1
  12. package/dist/_chunks/useColumnsMenu.js +2 -2
  13. package/dist/_chunks/useColumnsMenu.js.map +1 -1
  14. package/dist/_chunks/useQueryMemo.js +1 -1
  15. package/dist/_chunks/useQueryMemo.js.map +1 -1
  16. package/dist/_chunks/vanilla.js +1 -1
  17. package/dist/_chunks/vanilla.js.map +1 -1
  18. package/dist/_chunks/yup.js +2 -2
  19. package/dist/_chunks/yup.js.map +1 -1
  20. package/dist/classes/services/LogService/index.js +1 -1
  21. package/dist/classes/services/LogService/index.js.map +1 -1
  22. package/dist/classes/services/RouterService/index.js +4 -4
  23. package/dist/components/app/App/index.js +35 -100
  24. package/dist/components/app/App/index.js.map +1 -1
  25. package/dist/components/app/AuthenticationWrapper/index.js +38 -38
  26. package/dist/components/app/AuthorizationWrapper/index.js +20 -20
  27. package/dist/components/app/RouterRoot/index.js +58 -59
  28. package/dist/components/app/RouterRoot/index.js.map +1 -1
  29. package/dist/components/ui/ApplicationBar/index.js +146 -146
  30. package/dist/components/ui/ApplicationBar/index.js.map +1 -1
  31. package/dist/components/ui/GenericErrorMessage/index.js +34 -34
  32. package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
  33. package/dist/components/ui/NavLink/index.js +8 -8
  34. package/dist/components/ui/PageContainer/index.js +1 -1
  35. package/dist/components/ui/PageContainer/index.js.map +1 -1
  36. package/dist/pages/AcceptInvitationPage/index.js +28 -28
  37. package/dist/pages/AdminPage/index.js +23 -23
  38. package/dist/pages/OrganizationContactsAdminPage/index.js +29 -29
  39. package/dist/pages/OrganizationSitesAdminPage/index.js +25 -25
  40. package/dist/pages/PostLoginPage/index.js +11 -11
  41. package/dist/pages/RouterErrorPage/index.js +10 -10
  42. package/dist/utils/UserManagerUtil/index.js +2 -31
  43. package/package.json +13 -8
  44. package/dist/_chunks/chunk-OB3PAWPO.js +0 -3742
  45. package/dist/_chunks/chunk-OB3PAWPO.js.map +0 -1
  46. package/dist/_chunks/oidc-client-ts.js.map +0 -1
  47. package/dist/_chunks/react-oidc-context.js +0 -201
  48. package/dist/_chunks/react-oidc-context.js.map +0 -1
  49. package/dist/utils/UserManagerUtil/index.js.map +0 -1
@@ -1,52 +1,52 @@
1
1
  import { ConfigService as e } from "../../classes/services/ConfigService/index.js";
2
- import { d as t } from "../../_chunks/chunk-OB3PAWPO.js";
3
- import { PageContainer as n } from "../../components/ui/PageContainer/index.js";
4
- import { ApiService as r } from "../../classes/services/ApiService/index.js";
5
- import { ResponseHandler as i } from "../../components/ui/ResponseHandler/index.js";
6
- import { t as a } from "../../_chunks/useQueryMemo.js";
7
- import { t as o } from "../../_chunks/QueryClientService.js";
8
- import { COMMON_QUERY_KEY as s } from "../../constants/query.js";
9
- import { WindowService as c } from "@gen-epix/ui-core/classes/services/WindowService";
10
- import { Box as l, Button as u, Typography as d } from "@mui/material";
11
- import { useCallback as f, useState as p } from "react";
12
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
13
- import { useTranslation as _ } from "react-i18next";
14
- import { TestIdUtil as v } from "@gen-epix/ui-core/utils/TestIdUtil";
2
+ import { PageContainer as t } from "../../components/ui/PageContainer/index.js";
3
+ import { ApiService as n } from "../../classes/services/ApiService/index.js";
4
+ import { ResponseHandler as r } from "../../components/ui/ResponseHandler/index.js";
5
+ import { t as i } from "../../_chunks/useQueryMemo.js";
6
+ import { t as a } from "../../_chunks/QueryClientService.js";
7
+ import { COMMON_QUERY_KEY as o } from "../../constants/query.js";
8
+ import { WindowService as s } from "@gen-epix/ui-core/classes/services/WindowService";
9
+ import { Box as c, Button as l, Typography as u } from "@mui/material";
10
+ import { useCallback as d, useState as f } from "react";
11
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
12
+ import { useTranslation as g } from "react-i18next";
13
+ import { TestIdUtil as _ } from "@gen-epix/ui-core/utils/TestIdUtil";
14
+ import { useParams as v } from "react-router-dom";
15
15
  //#region src/pages/AcceptInvitationPage/AcceptInvitationPage.tsx
16
16
  var y = () => {
17
- let { token: y } = t(), [b, x] = p(!1), { data: S, error: C, isLoading: w } = a({
17
+ let { token: y } = v(), [b, x] = f(!1), { data: S, error: C, isLoading: w } = i({
18
18
  enabled: b,
19
19
  gcTime: 0,
20
- queryFn: async ({ signal: e }) => (await r.getInstance().organizationApi.userRegistrationsPostOne(y, { signal: e })).data,
21
- queryKey: o.getInstance().getGenericKey(s.USER_INVITATIONS, y),
20
+ queryFn: async ({ signal: e }) => (await n.getInstance().organizationApi.userRegistrationsPostOne(y, { signal: e })).data,
21
+ queryKey: a.getInstance().getGenericKey(o.USER_INVITATIONS, y),
22
22
  staleTime: 0
23
- }), { t: T } = _(), E = f(() => {
24
- c.getInstance().window.location.href = "/";
25
- }, []), D = f(() => {
23
+ }), { t: T } = g(), E = d(() => {
24
+ s.getInstance().window.location.href = "/";
25
+ }, []), D = d(() => {
26
26
  x(!0);
27
27
  }, []);
28
- return /* @__PURE__ */ h(n, {
28
+ return /* @__PURE__ */ m(t, {
29
29
  singleAction: !0,
30
- testIdAttributes: v.createAttributes("AcceptInvitationPage"),
30
+ testIdAttributes: _.createAttributes("AcceptInvitationPage"),
31
31
  title: T`Invitation`,
32
- children: /* @__PURE__ */ g(i, {
32
+ children: /* @__PURE__ */ h(r, {
33
33
  enabled: b,
34
34
  error: C,
35
35
  isLoading: w,
36
- children: [!S && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(l, {
36
+ children: [!S && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(c, {
37
37
  sx: { marginY: 2 },
38
- children: /* @__PURE__ */ h(d, { children: T("You have been invited to join {{applicationName}}.", { applicationName: e.getInstance().config.applicationName }) })
39
- }), /* @__PURE__ */ h(l, {
38
+ children: /* @__PURE__ */ m(u, { children: T("You have been invited to join {{applicationName}}.", { applicationName: e.getInstance().config.applicationName }) })
39
+ }), /* @__PURE__ */ m(c, {
40
40
  sx: { marginY: 2 },
41
- children: /* @__PURE__ */ h(u, {
41
+ children: /* @__PURE__ */ m(l, {
42
42
  color: "primary",
43
43
  onClick: D,
44
44
  type: "submit",
45
45
  children: T`Complete registration`
46
46
  })
47
- })] }), S && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(l, { children: /* @__PURE__ */ h(d, { children: T("You have been successfully registered to {{applicationName}}.", { applicationName: e.getInstance().config.applicationName }) }) }), /* @__PURE__ */ h(l, {
47
+ })] }), S && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(c, { children: /* @__PURE__ */ m(u, { children: T("You have been successfully registered to {{applicationName}}.", { applicationName: e.getInstance().config.applicationName }) }) }), /* @__PURE__ */ m(c, {
48
48
  sx: { marginY: 2 },
49
- children: /* @__PURE__ */ h(u, {
49
+ children: /* @__PURE__ */ m(l, {
50
50
  color: "primary",
51
51
  onClick: E,
52
52
  children: T`Click here to visit the home page`
@@ -1,25 +1,25 @@
1
1
  import { ADMIN_PAGE_CATEGORY as e } from "../../models/admin.js";
2
2
  import { AuthorizationService as t } from "../../classes/services/AuthorizationService/index.js";
3
- import { c as n, n as r } from "../../_chunks/chunk-OB3PAWPO.js";
4
- import { RouterService as i } from "../../classes/services/RouterService/index.js";
5
- import { PageContainer as a } from "../../components/ui/PageContainer/index.js";
6
- import { Box as o, Card as s, CardActionArea as c, CardContent as l, CardHeader as u, Divider as d, Typography as f, useTheme as p } from "@mui/material";
7
- import { useCallback as m, useMemo as h } from "react";
8
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
9
- import { useTranslation as v } from "react-i18next";
10
- import { TestIdUtil as y } from "@gen-epix/ui-core/utils/TestIdUtil";
3
+ import { RouterService as n } from "../../classes/services/RouterService/index.js";
4
+ import { PageContainer as r } from "../../components/ui/PageContainer/index.js";
5
+ import { Box as i, Card as a, CardActionArea as o, CardContent as s, CardHeader as c, Divider as l, Typography as u, useTheme as d } from "@mui/material";
6
+ import { useCallback as f, useMemo as p } from "react";
7
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
+ import { useTranslation as g } from "react-i18next";
9
+ import { TestIdUtil as _ } from "@gen-epix/ui-core/utils/TestIdUtil";
10
+ import { Outlet as v, useLocation as y } from "react-router-dom";
11
11
  //#region src/pages/AdminPage/AdminPage.tsx
12
12
  var b = () => {
13
- let { t: b } = v(), x = n(), S = p(), C = h(() => i.getInstance().adminRoutes.map((e) => e.children?.length ? e.children.find((e) => e.index) : e).filter((e) => {
13
+ let { t: b } = g(), x = y(), S = d(), C = p(() => n.getInstance().adminRoutes.map((e) => e.children?.length ? e.children.find((e) => e.index) : e).filter((e) => {
14
14
  let n = t.getInstance().doesUserHavePermission(e.handle.requiredPermissions);
15
15
  return !e.handle?.hidden && n;
16
- }), []), w = h(() => ({
16
+ }), []), w = p(() => ({
17
17
  [e.ACCESS_RIGHTS]: b`Access rights`,
18
18
  [e.HELPERS]: b`Helpers`,
19
19
  [e.REFERENCE_DATA]: b`Reference data`,
20
20
  [e.SYSTEM]: b`System`,
21
21
  [e.USERS_AND_ORGANIZATIONS]: b`Users and organizations`
22
- }), [b]), T = h(() => [
22
+ }), [b]), T = p(() => [
23
23
  e.USERS_AND_ORGANIZATIONS,
24
24
  e.ACCESS_RIGHTS,
25
25
  e.SYSTEM,
@@ -29,26 +29,26 @@ var b = () => {
29
29
  items: C.filter((t) => t.handle.category === e),
30
30
  label: w[e],
31
31
  name: e
32
- })).filter((e) => e.items.length), [w, C]), E = m(async (e) => {
33
- await i.getInstance().router.navigate(e);
32
+ })).filter((e) => e.items.length), [w, C]), E = f(async (e) => {
33
+ await n.getInstance().router.navigate(e);
34
34
  }, []);
35
- return x?.pathname === "/management" ? /* @__PURE__ */ g(a, {
35
+ return x?.pathname === "/management" ? /* @__PURE__ */ m(r, {
36
36
  showBreadcrumbs: !0,
37
- testIdAttributes: y.createAttributes("AdminPage"),
37
+ testIdAttributes: _.createAttributes("AdminPage"),
38
38
  title: b`Management`,
39
- children: /* @__PURE__ */ g(o, { children: T.map((e) => /* @__PURE__ */ _(o, {
39
+ children: /* @__PURE__ */ m(i, { children: T.map((e) => /* @__PURE__ */ h(i, {
40
40
  sx: {
41
41
  marginBottom: 3,
42
42
  marginTop: 1
43
43
  },
44
44
  children: [
45
- /* @__PURE__ */ g(f, {
45
+ /* @__PURE__ */ m(u, {
46
46
  component: "h2",
47
47
  sx: { marginBottom: 1 },
48
48
  variant: "h3",
49
49
  children: e.label
50
50
  }),
51
- /* @__PURE__ */ g(o, {
51
+ /* @__PURE__ */ m(i, {
52
52
  sx: {
53
53
  display: "grid",
54
54
  gap: S.spacing(1),
@@ -57,25 +57,25 @@ var b = () => {
57
57
  [S.breakpoints.up("md")]: { gridTemplateColumns: "repeat(2, 1fr)" },
58
58
  [S.breakpoints.up("xl")]: { gridTemplateColumns: "repeat(4, 1fr)" }
59
59
  },
60
- children: e.items.map((e) => /* @__PURE__ */ g(s, {
60
+ children: e.items.map((e) => /* @__PURE__ */ m(a, {
61
61
  square: !0,
62
62
  sx: {
63
63
  flexDirection: "column",
64
64
  justifyContent: "space-between"
65
65
  },
66
- children: /* @__PURE__ */ _(c, {
66
+ children: /* @__PURE__ */ h(o, {
67
67
  onClick: async () => E(e.path),
68
- children: [/* @__PURE__ */ g(u, { title: e.handle.title }), /* @__PURE__ */ g(l, { children: e.handle.subTitle })]
68
+ children: [/* @__PURE__ */ m(c, { title: e.handle.title }), /* @__PURE__ */ m(s, { children: e.handle.subTitle })]
69
69
  })
70
70
  }, e.path))
71
71
  }),
72
- /* @__PURE__ */ g(d, { sx: {
72
+ /* @__PURE__ */ m(l, { sx: {
73
73
  marginBottom: 2,
74
74
  marginTop: 2
75
75
  } })
76
76
  ]
77
77
  }, e.name)) })
78
- }) : /* @__PURE__ */ g(r, {});
78
+ }) : /* @__PURE__ */ m(v, {});
79
79
  };
80
80
  //#endregion
81
81
  export { b as AdminPage };
@@ -1,50 +1,50 @@
1
1
  import { t as e } from "../../_chunks/TableUtil.js";
2
- import { d as t } from "../../_chunks/chunk-OB3PAWPO.js";
3
- import { ApiService as n } from "../../classes/services/ApiService/index.js";
4
- import { t as r } from "../../_chunks/CrudPage.js";
5
- import { COMMON_QUERY_KEY as i } from "../../constants/query.js";
6
- import { CommonDbCommandName as a } from "@gen-epix/api-commondb";
7
- import { useCallback as o, useMemo as s } from "react";
8
- import { jsx as c } from "react/jsx-runtime";
9
- import { useTranslation as l } from "react-i18next";
10
- import { object as u, string as d } from "yup";
11
- import { TestIdUtil as f } from "@gen-epix/ui-core/utils/TestIdUtil";
12
- import { FORM_FIELD_DEFINITION_TYPE as p } from "@gen-epix/ui-core-form/models/form";
13
- import { SchemaUtil as m } from "@gen-epix/ui-core-form/utils/SchemaUtil";
2
+ import { ApiService as t } from "../../classes/services/ApiService/index.js";
3
+ import { t as n } from "../../_chunks/CrudPage.js";
4
+ import { COMMON_QUERY_KEY as r } from "../../constants/query.js";
5
+ import { CommonDbCommandName as i } from "@gen-epix/api-commondb";
6
+ import { useCallback as a, useMemo as o } from "react";
7
+ import { jsx as s } from "react/jsx-runtime";
8
+ import { useTranslation as c } from "react-i18next";
9
+ import { object as l, string as u } from "yup";
10
+ import { TestIdUtil as d } from "@gen-epix/ui-core/utils/TestIdUtil";
11
+ import { FORM_FIELD_DEFINITION_TYPE as f } from "@gen-epix/ui-core-form/models/form";
12
+ import { SchemaUtil as p } from "@gen-epix/ui-core-form/utils/SchemaUtil";
13
+ import { useParams as m } from "react-router-dom";
14
14
  //#region src/pages/OrganizationContactsAdminPage/OrganizationContactsAdminPage.tsx
15
15
  var h = () => {
16
- let { siteId: h } = t(), { t: g } = l(), _ = o(async (e) => (await n.getInstance().organizationApi.contactsGetAll(null, null, { signal: e })).data, []), v = o((e) => e.filter((e) => e.site_id === h), [h]), y = o(async (e, t) => (await n.getInstance().organizationApi.contactsPutOne(t.id, {
17
- id: t.id,
16
+ let { siteId: h } = m(), { t: g } = c(), _ = a(async (e) => (await t.getInstance().organizationApi.contactsGetAll(null, null, { signal: e })).data, []), v = a((e) => e.filter((e) => e.site_id === h), [h]), y = a(async (e, n) => (await t.getInstance().organizationApi.contactsPutOne(n.id, {
17
+ id: n.id,
18
18
  site_id: h,
19
19
  ...e
20
- })).data, [h]), b = o(async (e) => (await n.getInstance().organizationApi.contactsPostOne({
20
+ })).data, [h]), b = a(async (e) => (await t.getInstance().organizationApi.contactsPostOne({
21
21
  site_id: h,
22
22
  ...e
23
- })).data, [h]), x = o(async (e) => await n.getInstance().organizationApi.contactsDeleteOne(e.id), []), S = o((e) => e.name, []), C = s(() => u().shape({
24
- email: d().email().max(256),
25
- name: m.name,
26
- phone: d().extendedAlphaNumeric().max(100)
27
- }), []), w = o((e, t) => ({
23
+ })).data, [h]), x = a(async (e) => await t.getInstance().organizationApi.contactsDeleteOne(e.id), []), S = a((e) => e.name, []), C = o(() => l().shape({
24
+ email: u().email().max(256),
25
+ name: p.name,
26
+ phone: u().extendedAlphaNumeric().max(100)
27
+ }), []), w = a((e, t) => ({
28
28
  id: t.id,
29
29
  site_id: t.site_id,
30
30
  ...e
31
- }), []), T = s(() => [
31
+ }), []), T = o(() => [
32
32
  {
33
- definition: p.TEXTFIELD,
33
+ definition: f.TEXTFIELD,
34
34
  label: g`Name`,
35
35
  name: "name"
36
36
  },
37
37
  {
38
- definition: p.TEXTFIELD,
38
+ definition: f.TEXTFIELD,
39
39
  label: g`Email`,
40
40
  name: "email"
41
41
  },
42
42
  {
43
- definition: p.TEXTFIELD,
43
+ definition: f.TEXTFIELD,
44
44
  label: g`Phone`,
45
45
  name: "phone"
46
46
  }
47
- ], [g]), E = s(() => [
47
+ ], [g]), E = o(() => [
48
48
  e.createTextColumn({
49
49
  advancedSort: !0,
50
50
  id: "name",
@@ -59,10 +59,10 @@ var h = () => {
59
59
  name: g`Phone`
60
60
  })
61
61
  ], [g]);
62
- return /* @__PURE__ */ c(r, {
62
+ return /* @__PURE__ */ s(n, {
63
63
  createItemDialogTitle: g`Create new contact`,
64
64
  createOne: b,
65
- crudCommandType: a.ContactCrudCommand,
65
+ crudCommandType: i.ContactCrudCommand,
66
66
  defaultSortByField: "name",
67
67
  defaultSortDirection: "asc",
68
68
  deleteOne: x,
@@ -72,10 +72,10 @@ var h = () => {
72
72
  getName: S,
73
73
  getOptimisticUpdateIntermediateItem: w,
74
74
  itemName: g`Site contact`,
75
- resourceQueryKeyBase: i.CONTACTS,
75
+ resourceQueryKeyBase: r.CONTACTS,
76
76
  schema: C,
77
77
  tableColumns: E,
78
- testIdAttributes: f.createAttributes("OrganizationContactsAdminPage"),
78
+ testIdAttributes: d.createAttributes("OrganizationContactsAdminPage"),
79
79
  title: g`Site Contacts`,
80
80
  updateOne: y
81
81
  });
@@ -1,49 +1,49 @@
1
1
  import { t as e } from "../../_chunks/TableUtil.js";
2
2
  import { AuthorizationService as t } from "../../classes/services/AuthorizationService/index.js";
3
- import { d as n } from "../../_chunks/chunk-OB3PAWPO.js";
4
- import { ApiService as r } from "../../classes/services/ApiService/index.js";
5
- import { t as i } from "../../_chunks/CrudPage.js";
6
- import { COMMON_QUERY_KEY as a } from "../../constants/query.js";
7
- import { CommonDbCommandName as o, CommonDbPermissionType as s } from "@gen-epix/api-commondb";
8
- import { useCallback as c, useMemo as l } from "react";
9
- import { jsx as u } from "react/jsx-runtime";
10
- import { useTranslation as d } from "react-i18next";
11
- import { object as f } from "yup";
12
- import { TestIdUtil as p } from "@gen-epix/ui-core/utils/TestIdUtil";
13
- import { FORM_FIELD_DEFINITION_TYPE as m } from "@gen-epix/ui-core-form/models/form";
14
- import { SchemaUtil as h } from "@gen-epix/ui-core-form/utils/SchemaUtil";
3
+ import { ApiService as n } from "../../classes/services/ApiService/index.js";
4
+ import { t as r } from "../../_chunks/CrudPage.js";
5
+ import { COMMON_QUERY_KEY as i } from "../../constants/query.js";
6
+ import { CommonDbCommandName as a, CommonDbPermissionType as o } from "@gen-epix/api-commondb";
7
+ import { useCallback as s, useMemo as c } from "react";
8
+ import { jsx as l } from "react/jsx-runtime";
9
+ import { useTranslation as u } from "react-i18next";
10
+ import { object as d } from "yup";
11
+ import { TestIdUtil as f } from "@gen-epix/ui-core/utils/TestIdUtil";
12
+ import { FORM_FIELD_DEFINITION_TYPE as p } from "@gen-epix/ui-core-form/models/form";
13
+ import { SchemaUtil as m } from "@gen-epix/ui-core-form/utils/SchemaUtil";
14
+ import { useParams as h } from "react-router-dom";
15
15
  //#region src/pages/OrganizationSitesAdminPage/OrganizationSitesAdminPage.tsx
16
16
  var g = () => {
17
- let { organizationId: g } = n(), { t: _ } = d(), v = c(async (e) => (await r.getInstance().organizationApi.sitesGetAll(null, null, { signal: e })).data, []), y = c((e) => e.filter((e) => e.organization_id === g), [g]), b = c(async (e, t) => (await r.getInstance().organizationApi.sitesPutOne(t.id, {
17
+ let { organizationId: g } = h(), { t: _ } = u(), v = s(async (e) => (await n.getInstance().organizationApi.sitesGetAll(null, null, { signal: e })).data, []), y = s((e) => e.filter((e) => e.organization_id === g), [g]), b = s(async (e, t) => (await n.getInstance().organizationApi.sitesPutOne(t.id, {
18
18
  id: t.id,
19
19
  name: e.name,
20
20
  organization_id: g
21
- })).data, [g]), x = c(async (e) => (await r.getInstance().organizationApi.sitesPostOne({
21
+ })).data, [g]), x = s(async (e) => (await n.getInstance().organizationApi.sitesPostOne({
22
22
  name: e.name,
23
23
  organization_id: g
24
- })).data, [g]), S = c(async (e) => await r.getInstance().organizationApi.sitesDeleteOne(e.id), []), C = c((e) => e.name, []), w = l(() => f().shape({ name: h.name }), []), T = l(() => [{
25
- definition: m.TEXTFIELD,
24
+ })).data, [g]), S = s(async (e) => await n.getInstance().organizationApi.sitesDeleteOne(e.id), []), C = s((e) => e.name, []), w = c(() => d().shape({ name: m.name }), []), T = c(() => [{
25
+ definition: p.TEXTFIELD,
26
26
  label: _`Name`,
27
27
  name: "name"
28
- }], [_]), E = l(() => [e.createTextColumn({
28
+ }], [_]), E = c(() => [e.createTextColumn({
29
29
  advancedSort: !0,
30
30
  id: "name",
31
31
  name: _`Name`
32
- })], [_]), D = c((e, t) => ({
32
+ })], [_]), D = s((e, t) => ({
33
33
  id: t.id,
34
34
  organization_id: t.organization_id,
35
35
  ...e
36
- }), []), O = l(() => t.getInstance().doesUserHavePermission([{
37
- command_name: o.ContactCrudCommand,
38
- permission_type: s.READ
36
+ }), []), O = c(() => t.getInstance().doesUserHavePermission([{
37
+ command_name: a.ContactCrudCommand,
38
+ permission_type: o.READ
39
39
  }]) ? [{
40
40
  getPathName: (e) => `/management/organizations/${e.organization_id}/sites/${e.id}/contacts`,
41
41
  label: _`Manage contacts`
42
42
  }] : [], [_]);
43
- return /* @__PURE__ */ u(i, {
43
+ return /* @__PURE__ */ l(r, {
44
44
  createItemDialogTitle: _`Create new site`,
45
45
  createOne: x,
46
- crudCommandType: o.SiteCrudCommand,
46
+ crudCommandType: a.SiteCrudCommand,
47
47
  defaultSortByField: "name",
48
48
  defaultSortDirection: "asc",
49
49
  deleteOne: S,
@@ -53,11 +53,11 @@ var g = () => {
53
53
  getName: C,
54
54
  getOptimisticUpdateIntermediateItem: D,
55
55
  itemName: _`Organization site`,
56
- resourceQueryKeyBase: a.SITES,
56
+ resourceQueryKeyBase: i.SITES,
57
57
  schema: w,
58
58
  subPages: O,
59
59
  tableColumns: E,
60
- testIdAttributes: p.createAttributes("OrganizationSitesAdminPage"),
60
+ testIdAttributes: f.createAttributes("OrganizationSitesAdminPage"),
61
61
  title: _`Organization Sites`,
62
62
  updateOne: b
63
63
  });
@@ -1,23 +1,23 @@
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
- import { n } from "../../_chunks/react-oidc-context.js";
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
- import { useTranslation as o } from "react-i18next";
8
- import { TestIdUtil as s } from "@gen-epix/ui-core/utils/TestIdUtil";
3
+ import { CircularProgress as n } from "@mui/material";
4
+ import { useEffect as r } from "react";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ import { useTranslation as a } from "react-i18next";
7
+ import { TestIdUtil as o } from "@gen-epix/ui-core/utils/TestIdUtil";
8
+ import { useAuth as s } from "react-oidc-context";
9
9
  //#region src/pages/PostLoginPage/PostLoginPage.tsx
10
10
  var c = () => {
11
- let { t: c } = o(), l = n().user.state;
12
- return i(() => {
11
+ let { t: c } = a(), l = s().user.state;
12
+ return r(() => {
13
13
  let t = l?.preLoginLocation;
14
14
  (!t?.pathname || t.pathname === "/post-login") && (t = { pathname: "/" }), e.getInstance().router.navigate(t);
15
- }, [l?.preLoginLocation]), /* @__PURE__ */ a(t, {
15
+ }, [l?.preLoginLocation]), /* @__PURE__ */ i(t, {
16
16
  ignorePageEvent: !0,
17
17
  singleAction: !0,
18
- testIdAttributes: s.createAttributes("PostLoginPage"),
18
+ testIdAttributes: o.createAttributes("PostLoginPage"),
19
19
  title: c`Logged in`,
20
- children: /* @__PURE__ */ a(r, {})
20
+ children: /* @__PURE__ */ i(n, {})
21
21
  });
22
22
  };
23
23
  //#endregion
@@ -1,17 +1,17 @@
1
- import { f as e } from "../../_chunks/chunk-OB3PAWPO.js";
2
- import { PageContainer as t } from "../../components/ui/PageContainer/index.js";
3
- import { GenericErrorMessage as n } from "../../components/ui/GenericErrorMessage/index.js";
4
- import { jsx as r } from "react/jsx-runtime";
5
- import { useTranslation as i } from "react-i18next";
6
- import { TestIdUtil as a } from "@gen-epix/ui-core/utils/TestIdUtil";
1
+ import { PageContainer as e } from "../../components/ui/PageContainer/index.js";
2
+ import { GenericErrorMessage as t } from "../../components/ui/GenericErrorMessage/index.js";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { useTranslation as r } from "react-i18next";
5
+ import { TestIdUtil as i } from "@gen-epix/ui-core/utils/TestIdUtil";
6
+ import { useRouteError as a } from "react-router-dom";
7
7
  //#region src/pages/RouterErrorPage/RouterErrorPage.tsx
8
8
  var o = () => {
9
- let o = e(), { t: s } = i();
10
- return /* @__PURE__ */ r(t, {
9
+ let o = a(), { t: s } = r();
10
+ return /* @__PURE__ */ n(e, {
11
11
  singleAction: !0,
12
- testIdAttributes: a.createAttributes("RouterErrorPage"),
12
+ testIdAttributes: i.createAttributes("RouterErrorPage"),
13
13
  title: s`Error`,
14
- children: /* @__PURE__ */ r(n, { error: o })
14
+ children: /* @__PURE__ */ n(t, { error: o })
15
15
  });
16
16
  };
17
17
  //#endregion
@@ -1,31 +1,2 @@
1
- import { n as e } from "../../_chunks/oidc-client-ts.js";
2
- import { WindowService as t } from "@gen-epix/ui-core/classes/services/WindowService";
3
- //#region src/utils/UserManagerUtil/UserManagerUtil.ts
4
- var n = class {
5
- static userManager;
6
- static getSettings(n) {
7
- let r = new URL(t.getInstance().window.location.href);
8
- r.search = "", r.pathname = "/post-login";
9
- let i = r.toString();
10
- r.pathname = "/post-logout";
11
- let a = r.toString();
12
- return {
13
- authority: n.issuer,
14
- automaticSilentRenew: !0,
15
- client_id: n.client_id,
16
- client_secret: n.client_secret,
17
- metadataUrl: n.discovery_url,
18
- post_logout_redirect_uri: a,
19
- redirect_uri: i,
20
- refreshTokenAllowedScope: "",
21
- response_type: "code",
22
- scope: n.scope,
23
- userStore: new e({ store: sessionStorage }),
24
- validateSubOnSilentRenew: !0
25
- };
26
- }
27
- };
28
- //#endregion
29
- export { n as UserManagerUtil };
30
-
31
- //# sourceMappingURL=index.js.map
1
+ import { t as e } from "../../_chunks/UserManagerUtil.js";
2
+ export { e as UserManagerUtil };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gen-epix/ui-client-common",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "homepage": "https://github.com/RIVM-bioinformatics/gen-epix",
5
5
  "repository": {
6
6
  "type": "git",
@@ -490,11 +490,6 @@
490
490
  "immer": "11.1.18",
491
491
  "lodash": "4.18.1",
492
492
  "oidc-client-ts": "3.5.0",
493
- "react-error-boundary": "6.1.5",
494
- "react-oidc-context": "3.3.1",
495
- "react-router": "8.4.0",
496
- "react-router-dom": "7.18.4",
497
- "react-virtuoso": "4.18.13",
498
493
  "reflect-metadata": "0.2.2",
499
494
  "use-debounce": "10.1.1",
500
495
  "uuid": "14.0.2",
@@ -530,10 +525,15 @@
530
525
  "i18next": "26.4.2",
531
526
  "jsdom": "30.1.0",
532
527
  "playwright": "1.63.0",
533
- "react": "19.3.0",
534
528
  "react-dom": "19.3.0",
529
+ "react-error-boundary": "6.1.5",
535
530
  "react-hook-form": "7.88.0",
536
531
  "react-i18next": "17.0.14",
532
+ "react-oidc-context": "3.3.1",
533
+ "react-router-dom": "7.18.4",
534
+ "react-router": "8.4.0",
535
+ "react-virtuoso": "4.18.13",
536
+ "react": "19.3.0",
537
537
  "typescript": "6.0.3",
538
538
  "vite": "8.3.0",
539
539
  "vite-plugin-dts": "5.1.0",
@@ -562,10 +562,15 @@
562
562
  "@mui/utils": "*",
563
563
  "axios": "*",
564
564
  "i18next": "*",
565
- "react": "*",
566
565
  "react-dom": "*",
566
+ "react-error-boundary": "*",
567
567
  "react-hook-form": "*",
568
568
  "react-i18next": "*",
569
+ "react-oidc-context": "*",
570
+ "react-router-dom": "*",
571
+ "react-router": "*",
572
+ "react-virtuoso": "*",
573
+ "react": "*",
569
574
  "yup": "*"
570
575
  },
571
576
  "publishConfig": {