@gen-epix/ui-client-common 4.2.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.
- package/dist/_chunks/Breadcrumbs.js +22 -22
- package/dist/_chunks/QueryClientProvider.js +1 -1
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +3 -3
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Table.js +559 -3173
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/{oidc-client-ts.js → UserManagerUtil.js} +222 -198
- package/dist/_chunks/UserManagerUtil.js.map +1 -0
- package/dist/_chunks/middleware.js +1 -1
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +1 -1
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/query.js +13 -11
- package/dist/_chunks/query.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +2 -2
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useMutation.js +2 -2
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +8 -8
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -1
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -2
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/services/LogService/index.js +1 -1
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/RouterService/RouterService.d.ts +15 -6
- package/dist/classes/services/RouterService/index.js +30 -10
- package/dist/classes/services/RouterService/index.js.map +1 -1
- package/dist/components/app/App/index.js +34 -98
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/AppRouterProvider/AppRouterProvider.d.ts +1 -0
- package/dist/components/app/ApplicationBootstrapWithAuthentication/ApplicationBootstrapWithAuthentication.d.ts +2 -0
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.d.ts +1 -0
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +81 -0
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -0
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/ApplicationBootstrapWithoutAuthorization.d.ts +2 -0
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.d.ts +1 -0
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +63 -0
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -0
- package/dist/components/app/AuthenticationWrapper/index.js +38 -38
- package/dist/components/app/AuthorizationWrapper/index.js +20 -20
- package/dist/components/app/RouterRoot/index.js +58 -59
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/index.js +164 -148
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +34 -34
- package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
- package/dist/components/ui/NavLink/index.js +8 -8
- package/dist/components/ui/PageContainer/index.js +1 -1
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/pages/AcceptInvitationPage/index.js +28 -28
- package/dist/pages/AdminPage/index.js +23 -23
- package/dist/pages/OrganizationContactsAdminPage/index.js +29 -29
- package/dist/pages/OrganizationSitesAdminPage/index.js +25 -25
- package/dist/pages/PostLoginPage/index.js +11 -11
- package/dist/pages/RouterErrorPage/index.js +10 -10
- package/dist/utils/UserManagerUtil/index.js +2 -31
- package/package.json +36 -27
- package/dist/_chunks/chunk-BV7QT456.js +0 -3742
- package/dist/_chunks/chunk-BV7QT456.js.map +0 -1
- package/dist/_chunks/oidc-client-ts.js.map +0 -1
- package/dist/_chunks/react-oidc-context.js +0 -201
- package/dist/_chunks/react-oidc-context.js.map +0 -1
- package/dist/components/app/ApplicationBootstrap/ApplicationBootstrap.d.ts +0 -2
- package/dist/components/app/ApplicationBootstrap/index.d.ts +0 -1
- package/dist/components/app/ApplicationBootstrap/index.js +0 -135
- package/dist/components/app/ApplicationBootstrap/index.js.map +0 -1
- 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 {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as a } from "../../_chunks/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
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 } =
|
|
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
|
|
21
|
-
queryKey:
|
|
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 } =
|
|
24
|
-
|
|
25
|
-
}, []), D =
|
|
23
|
+
}), { t: T } = g(), E = d(() => {
|
|
24
|
+
s.getInstance().window.location.href = "/";
|
|
25
|
+
}, []), D = d(() => {
|
|
26
26
|
x(!0);
|
|
27
27
|
}, []);
|
|
28
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ m(t, {
|
|
29
29
|
singleAction: !0,
|
|
30
|
-
testIdAttributes:
|
|
30
|
+
testIdAttributes: _.createAttributes("AcceptInvitationPage"),
|
|
31
31
|
title: T`Invitation`,
|
|
32
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ h(r, {
|
|
33
33
|
enabled: b,
|
|
34
34
|
error: C,
|
|
35
35
|
isLoading: w,
|
|
36
|
-
children: [!S && /* @__PURE__ */
|
|
36
|
+
children: [!S && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(c, {
|
|
37
37
|
sx: { marginY: 2 },
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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 {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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 } =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
33
|
-
await
|
|
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__ */
|
|
35
|
+
return x?.pathname === "/management" ? /* @__PURE__ */ m(r, {
|
|
36
36
|
showBreadcrumbs: !0,
|
|
37
|
-
testIdAttributes:
|
|
37
|
+
testIdAttributes: _.createAttributes("AdminPage"),
|
|
38
38
|
title: b`Management`,
|
|
39
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
66
|
+
children: /* @__PURE__ */ h(o, {
|
|
67
67
|
onClick: async () => E(e.path),
|
|
68
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
72
|
+
/* @__PURE__ */ m(l, { sx: {
|
|
73
73
|
marginBottom: 2,
|
|
74
74
|
marginTop: 2
|
|
75
75
|
} })
|
|
76
76
|
]
|
|
77
77
|
}, e.name)) })
|
|
78
|
-
}) : /* @__PURE__ */
|
|
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 {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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 } =
|
|
17
|
-
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 =
|
|
20
|
+
})).data, [h]), b = a(async (e) => (await t.getInstance().organizationApi.contactsPostOne({
|
|
21
21
|
site_id: h,
|
|
22
22
|
...e
|
|
23
|
-
})).data, [h]), x =
|
|
24
|
-
email:
|
|
25
|
-
name:
|
|
26
|
-
phone:
|
|
27
|
-
}), []), w =
|
|
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 =
|
|
31
|
+
}), []), T = o(() => [
|
|
32
32
|
{
|
|
33
|
-
definition:
|
|
33
|
+
definition: f.TEXTFIELD,
|
|
34
34
|
label: g`Name`,
|
|
35
35
|
name: "name"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
definition:
|
|
38
|
+
definition: f.TEXTFIELD,
|
|
39
39
|
label: g`Email`,
|
|
40
40
|
name: "email"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
definition:
|
|
43
|
+
definition: f.TEXTFIELD,
|
|
44
44
|
label: g`Phone`,
|
|
45
45
|
name: "phone"
|
|
46
46
|
}
|
|
47
|
-
], [g]), E =
|
|
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__ */
|
|
62
|
+
return /* @__PURE__ */ s(n, {
|
|
63
63
|
createItemDialogTitle: g`Create new contact`,
|
|
64
64
|
createOne: b,
|
|
65
|
-
crudCommandType:
|
|
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:
|
|
75
|
+
resourceQueryKeyBase: r.CONTACTS,
|
|
76
76
|
schema: C,
|
|
77
77
|
tableColumns: E,
|
|
78
|
-
testIdAttributes:
|
|
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 {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
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 } =
|
|
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 =
|
|
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 =
|
|
25
|
-
definition:
|
|
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 =
|
|
28
|
+
}], [_]), E = c(() => [e.createTextColumn({
|
|
29
29
|
advancedSort: !0,
|
|
30
30
|
id: "name",
|
|
31
31
|
name: _`Name`
|
|
32
|
-
})], [_]), D =
|
|
32
|
+
})], [_]), D = s((e, t) => ({
|
|
33
33
|
id: t.id,
|
|
34
34
|
organization_id: t.organization_id,
|
|
35
35
|
...e
|
|
36
|
-
}), []), O =
|
|
37
|
-
command_name:
|
|
38
|
-
permission_type:
|
|
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__ */
|
|
43
|
+
return /* @__PURE__ */ l(r, {
|
|
44
44
|
createItemDialogTitle: _`Create new site`,
|
|
45
45
|
createOne: x,
|
|
46
|
-
crudCommandType:
|
|
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:
|
|
56
|
+
resourceQueryKeyBase: i.SITES,
|
|
57
57
|
schema: w,
|
|
58
58
|
subPages: O,
|
|
59
59
|
tableColumns: E,
|
|
60
|
-
testIdAttributes:
|
|
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 "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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 } =
|
|
12
|
-
return
|
|
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__ */
|
|
15
|
+
}, [l?.preLoginLocation]), /* @__PURE__ */ i(t, {
|
|
16
16
|
ignorePageEvent: !0,
|
|
17
17
|
singleAction: !0,
|
|
18
|
-
testIdAttributes:
|
|
18
|
+
testIdAttributes: o.createAttributes("PostLoginPage"),
|
|
19
19
|
title: c`Logged in`,
|
|
20
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ i(n, {})
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
//#endregion
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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 =
|
|
10
|
-
return /* @__PURE__ */
|
|
9
|
+
let o = a(), { t: s } = r();
|
|
10
|
+
return /* @__PURE__ */ n(e, {
|
|
11
11
|
singleAction: !0,
|
|
12
|
-
testIdAttributes:
|
|
12
|
+
testIdAttributes: i.createAttributes("RouterErrorPage"),
|
|
13
13
|
title: s`Error`,
|
|
14
|
-
children: /* @__PURE__ */
|
|
14
|
+
children: /* @__PURE__ */ n(t, { error: o })
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
@@ -1,31 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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
|
+
"version": "4.3.1",
|
|
4
4
|
"homepage": "https://github.com/RIVM-bioinformatics/gen-epix",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -98,9 +98,13 @@
|
|
|
98
98
|
"types": "./dist/components/app/App/index.d.ts",
|
|
99
99
|
"import": "./dist/components/app/App/index.js"
|
|
100
100
|
},
|
|
101
|
-
"./components/app/
|
|
102
|
-
"types": "./dist/components/app/
|
|
103
|
-
"import": "./dist/components/app/
|
|
101
|
+
"./components/app/ApplicationBootstrapWithAuthentication": {
|
|
102
|
+
"types": "./dist/components/app/ApplicationBootstrapWithAuthentication/index.d.ts",
|
|
103
|
+
"import": "./dist/components/app/ApplicationBootstrapWithAuthentication/index.js"
|
|
104
|
+
},
|
|
105
|
+
"./components/app/ApplicationBootstrapWithoutAuthorization": {
|
|
106
|
+
"types": "./dist/components/app/ApplicationBootstrapWithoutAuthorization/index.d.ts",
|
|
107
|
+
"import": "./dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js"
|
|
104
108
|
},
|
|
105
109
|
"./components/app/AuthenticationWrapper": {
|
|
106
110
|
"types": "./dist/components/app/AuthenticationWrapper/index.d.ts",
|
|
@@ -479,18 +483,13 @@
|
|
|
479
483
|
],
|
|
480
484
|
"dependencies": {
|
|
481
485
|
"@hookform/resolvers": "5.9.1",
|
|
482
|
-
"@tanstack/react-query": "5.
|
|
486
|
+
"@tanstack/react-query": "5.103.1",
|
|
483
487
|
"classnames": "2.5.1",
|
|
484
488
|
"clsx": "2.1.1",
|
|
485
489
|
"date-fns": "4.4.0",
|
|
486
490
|
"immer": "11.1.18",
|
|
487
491
|
"lodash": "4.18.1",
|
|
488
492
|
"oidc-client-ts": "3.5.0",
|
|
489
|
-
"react-error-boundary": "6.1.5",
|
|
490
|
-
"react-oidc-context": "3.3.1",
|
|
491
|
-
"react-router": "8.3.1",
|
|
492
|
-
"react-router-dom": "7.18.3",
|
|
493
|
-
"react-virtuoso": "4.18.13",
|
|
494
493
|
"reflect-metadata": "0.2.2",
|
|
495
494
|
"use-debounce": "10.1.1",
|
|
496
495
|
"uuid": "14.0.2",
|
|
@@ -503,12 +502,12 @@
|
|
|
503
502
|
"@emotion/cache": "11.14.0",
|
|
504
503
|
"@emotion/react": "11.14.0",
|
|
505
504
|
"@emotion/styled": "11.14.1",
|
|
506
|
-
"@gen-epix/api-commondb": "^4.
|
|
505
|
+
"@gen-epix/api-commondb": "^4.3.0",
|
|
507
506
|
"@gen-epix/eslint-config": "0.5.0",
|
|
508
507
|
"@gen-epix/translation-util": "0.2.0",
|
|
509
|
-
"@gen-epix/ui-core": "^3.
|
|
510
|
-
"@gen-epix/ui-core-components": "^4.
|
|
511
|
-
"@gen-epix/ui-core-form": "^4.
|
|
508
|
+
"@gen-epix/ui-core": "^3.3.0",
|
|
509
|
+
"@gen-epix/ui-core-components": "^4.3.0",
|
|
510
|
+
"@gen-epix/ui-core-form": "^4.3.0",
|
|
512
511
|
"@microsoft/api-extractor": "7.59.1",
|
|
513
512
|
"@mui/icons-material": "9.4.0",
|
|
514
513
|
"@mui/material": "9.4.0",
|
|
@@ -519,24 +518,29 @@
|
|
|
519
518
|
"@types/node": "26.4.1",
|
|
520
519
|
"@types/react": "19.3.0",
|
|
521
520
|
"@vitejs/plugin-react": "6.1.1",
|
|
522
|
-
"@vitest/browser-playwright": "5.0.
|
|
523
|
-
"@vitest/coverage-v8": "5.0.
|
|
521
|
+
"@vitest/browser-playwright": "5.0.1",
|
|
522
|
+
"@vitest/coverage-v8": "5.0.1",
|
|
524
523
|
"axios": "1.20.0",
|
|
525
524
|
"eslint": "10.10.0",
|
|
526
525
|
"i18next": "26.4.2",
|
|
527
|
-
"jsdom": "30.0
|
|
526
|
+
"jsdom": "30.1.0",
|
|
528
527
|
"playwright": "1.63.0",
|
|
529
|
-
"react": "19.3.0",
|
|
530
528
|
"react-dom": "19.3.0",
|
|
531
|
-
"react-
|
|
532
|
-
"react-
|
|
529
|
+
"react-error-boundary": "6.1.5",
|
|
530
|
+
"react-hook-form": "7.88.0",
|
|
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",
|
|
533
537
|
"typescript": "6.0.3",
|
|
534
|
-
"vite": "8.
|
|
538
|
+
"vite": "8.3.0",
|
|
535
539
|
"vite-plugin-dts": "5.1.0",
|
|
536
540
|
"vite-plugin-lib-inject-css": "2.2.2",
|
|
537
541
|
"vite-plugin-static-copy": "4.1.1",
|
|
538
542
|
"vite-plugin-svgr": "5.2.0",
|
|
539
|
-
"vitest": "5.0.
|
|
543
|
+
"vitest": "5.0.1",
|
|
540
544
|
"vitest-browser-react": "2.3.0",
|
|
541
545
|
"yup": "1.7.1"
|
|
542
546
|
},
|
|
@@ -547,10 +551,10 @@
|
|
|
547
551
|
"@emotion/cache": "*",
|
|
548
552
|
"@emotion/react": "*",
|
|
549
553
|
"@emotion/styled": "*",
|
|
550
|
-
"@gen-epix/api-commondb": "^4.
|
|
551
|
-
"@gen-epix/ui-core": "^3.
|
|
552
|
-
"@gen-epix/ui-core-components": "^4.
|
|
553
|
-
"@gen-epix/ui-core-form": "^4.
|
|
554
|
+
"@gen-epix/api-commondb": "^4.3.0",
|
|
555
|
+
"@gen-epix/ui-core": "^3.3.0",
|
|
556
|
+
"@gen-epix/ui-core-components": "^4.3.0",
|
|
557
|
+
"@gen-epix/ui-core-form": "^4.3.0",
|
|
554
558
|
"@mui/icons-material": "*",
|
|
555
559
|
"@mui/material": "*",
|
|
556
560
|
"@mui/styled-engine": "*",
|
|
@@ -558,10 +562,15 @@
|
|
|
558
562
|
"@mui/utils": "*",
|
|
559
563
|
"axios": "*",
|
|
560
564
|
"i18next": "*",
|
|
561
|
-
"react": "*",
|
|
562
565
|
"react-dom": "*",
|
|
566
|
+
"react-error-boundary": "*",
|
|
563
567
|
"react-hook-form": "*",
|
|
564
568
|
"react-i18next": "*",
|
|
569
|
+
"react-oidc-context": "*",
|
|
570
|
+
"react-router-dom": "*",
|
|
571
|
+
"react-router": "*",
|
|
572
|
+
"react-virtuoso": "*",
|
|
573
|
+
"react": "*",
|
|
565
574
|
"yup": "*"
|
|
566
575
|
},
|
|
567
576
|
"publishConfig": {
|