@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.
- package/README.md +5 -4
- package/dist/@types/mui.d.ts +13 -5
- package/dist/@types/ui-client-common.d.ts +1 -0
- package/dist/_chunks/ApplicationFooter.js +44 -44
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +13 -13
- package/dist/_chunks/CrudPage.js +300 -300
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/Notifications.js +51 -51
- package/dist/_chunks/OutageList.js +29 -29
- package/dist/_chunks/OutageUtil.js +1 -2
- package/dist/_chunks/OutageUtil.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +96 -388
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Table.js +518 -512
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js +8 -16
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/TextFilter.js +14 -12
- package/dist/_chunks/TextFilter.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +77 -77
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/UserManagerUtil.js +210 -209
- package/dist/_chunks/UserManagerUtil.js.map +1 -1
- package/dist/_chunks/_baseFlatten.js +8 -8
- package/dist/_chunks/_baseFlatten.js.map +1 -1
- package/dist/_chunks/_baseGet.js +280 -0
- package/dist/_chunks/_baseGet.js.map +1 -0
- package/dist/_chunks/_baseIteratee.js +274 -0
- package/dist/_chunks/_baseIteratee.js.map +1 -0
- package/dist/_chunks/_baseUnset.js +22 -299
- package/dist/_chunks/_baseUnset.js.map +1 -1
- package/dist/_chunks/last.js +13 -0
- package/dist/_chunks/last.js.map +1 -0
- package/dist/_chunks/omit.js +41 -40
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/tableStore.js +190 -183
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/uniq.js +44 -0
- package/dist/_chunks/uniq.js.map +1 -0
- package/dist/_chunks/useMutation.js +22 -22
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +25 -8
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/classes/abstracts/FilterAbstract/index.js +3 -1
- package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
- package/dist/classes/filters/MultiSelectFilter.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/AuthenticationService.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/index.js +15 -15
- package/dist/classes/services/AuthenticationService/index.js.map +1 -1
- package/dist/classes/services/AuthorizationService/index.js +4 -4
- package/dist/classes/services/AuthorizationService/index.js.map +1 -1
- package/dist/classes/services/BackendVersionService/index.js +3 -2
- package/dist/classes/services/BackendVersionService/index.js.map +1 -1
- package/dist/classes/services/BreadcrumbService/index.js +16 -38
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/index.js +9 -8
- package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
- package/dist/classes/services/I18nService/index.js +11 -10
- package/dist/classes/services/I18nService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/index.js +12 -12
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/LogService/index.js +39 -33
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/NotificationService/index.js +8 -8
- package/dist/classes/services/NotificationService/index.js.map +1 -1
- package/dist/classes/services/PageEventBusService/index.js +13 -9
- package/dist/classes/services/PageEventBusService/index.js.map +1 -1
- package/dist/classes/services/RouterService/index.js +3 -6
- package/dist/classes/services/RouterService/index.js.map +1 -1
- package/dist/components/app/App/App.d.ts +1 -1
- package/dist/components/app/App/index.js +34 -38
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +28 -28
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +47 -45
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +35 -35
- package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
- package/dist/components/app/AuthorizationWrapper/index.js +19 -19
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +52 -50
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/index.js +21 -21
- package/dist/components/filters/BooleanFilterField/index.js +5 -5
- package/dist/components/filters/DateFilterField/index.js +3 -3
- package/dist/components/filters/GeoFilterField/index.js +4 -4
- package/dist/components/filters/MultiSelectFilterField/index.js +4 -4
- package/dist/components/filters/NumberRangeFilterField/index.js +3 -3
- package/dist/components/filters/TextFilterField/index.js +3 -3
- package/dist/components/ui/ApplicationBar/index.js +188 -188
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +29 -29
- package/dist/components/ui/LicensesDialog/index.js +38 -38
- package/dist/components/ui/LicensesDialog/index.js.map +1 -1
- package/dist/components/ui/MyPermissionsDialog/index.js +16 -16
- package/dist/components/ui/NavLink/index.js +6 -6
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +21 -21
- package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
- package/dist/components/ui/PageContainer/index.js +24 -24
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/Sidebar/index.js +30 -30
- package/dist/components/ui/UserFeedbackDialog/index.js +12 -12
- package/dist/constants/config.constants.d.ts +0 -2
- package/dist/constants/config.constants.js +2 -2
- package/dist/constants/config.constants.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +12 -12
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +14 -14
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js.map +1 -1
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +12 -12
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +13 -13
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +4 -4
- package/dist/dataHooks/useOrganizationsQuery/index.js +13 -13
- package/dist/dataHooks/useOrganizationsQuery/index.js.map +1 -1
- package/dist/dataHooks/useUsersQuery/index.js +10 -10
- package/dist/dataHooks/useUsersQuery/index.js.map +1 -1
- package/dist/hooks/useConfig/index.js +2 -2
- package/dist/hooks/useConfig/index.js.map +1 -1
- package/dist/hooks/useCreateMutation/index.js +12 -12
- package/dist/hooks/useCreateMutation/index.js.map +1 -1
- package/dist/hooks/useDeleteMutation/index.js +16 -9
- package/dist/hooks/useDeleteMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/index.js +48 -33
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useItemQuery/index.js +4 -4
- package/dist/hooks/useItemQuery/index.js.map +1 -1
- package/dist/locale/en.json +1 -0
- package/dist/locale/nl.json +1 -0
- package/dist/models/config.models.d.ts +1 -5
- package/dist/models/theme.models.d.ts +19 -16
- package/dist/pages/AcceptInvitationPage/index.js +25 -25
- package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
- package/dist/pages/AdminPage/index.js +16 -16
- package/dist/pages/ChooseIdentityProviderPage/index.js +21 -21
- package/dist/pages/IdentifierIssuersAdminPage/index.js +5 -5
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +5 -5
- package/dist/pages/OrganizationContactsAdminPage/index.js +6 -6
- package/dist/pages/OrganizationSitesAdminPage/index.js +9 -9
- package/dist/pages/OrganizationsAdminPage/index.js +13 -13
- package/dist/pages/OutagesAdminPage/index.js +20 -20
- package/dist/pages/PostLoginPage/index.js +6 -6
- package/dist/pages/PostLogoutPage/index.js +8 -8
- package/dist/pages/UsersAdminPage/index.js +39 -39
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/setup/setup.js +11 -4
- package/dist/setup/setup.js.map +1 -1
- package/dist/theme/demoTheme/index.js +17 -15
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/dist/utils/DataHookUtil/index.js +1 -1
- package/dist/utils/DataHookUtil/index.js.map +1 -1
- package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +2 -3
- package/dist/utils/DependencyContainerUtil/index.js +10 -15
- package/dist/utils/DependencyContainerUtil/index.js.map +1 -1
- package/dist/utils/MenuDataUtil/index.js +1 -1
- package/dist/utils/MenuDataUtil/index.js.map +1 -1
- package/dist/utils/StandardConfigUtil/index.js +0 -4
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/dist/utils/TimeUtil/index.js +1 -1
- package/dist/utils/TimeUtil/index.js.map +1 -1
- package/package.json +10 -13
- package/dist/context/ClientCommonConfigContext/ClientCommonConfigContext.d.ts +0 -9
- package/dist/context/ClientCommonConfigContext/ClientCommonConfigContextProvider.d.ts +0 -6
- package/dist/context/ClientCommonConfigContext/index.d.ts +0 -3
- package/dist/context/ClientCommonConfigContext/index.js +0 -34
- package/dist/context/ClientCommonConfigContext/index.js.map +0 -1
- 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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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 =
|
|
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 =
|
|
15
|
+
}, [g]), x = d(() => g?.filter((e) => e.isAvailable) ?? [], [g]), S = u(() => {
|
|
16
16
|
window.location.reload();
|
|
17
|
-
}, []), C =
|
|
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__ */
|
|
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
|
|
29
|
+
x.length === 0 && /* @__PURE__ */ f(o, {
|
|
30
30
|
sx: {
|
|
31
31
|
marginBottom: 4,
|
|
32
32
|
marginTop: 1
|
|
33
33
|
},
|
|
34
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ p(i, {
|
|
35
35
|
severity: "error",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
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
|
|
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__ */
|
|
44
|
+
children: /* @__PURE__ */ p(i, {
|
|
45
45
|
severity: "info",
|
|
46
|
-
children: [/* @__PURE__ */
|
|
46
|
+
children: [/* @__PURE__ */ f(a, { children: _("Some identity providers are currently unavailable.") }), C]
|
|
47
47
|
})
|
|
48
48
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ p(o, {
|
|
50
50
|
sx: { textAlign: "center" },
|
|
51
51
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
68
|
+
return /* @__PURE__ */ p(o, {
|
|
69
69
|
sx: { marginY: 2 },
|
|
70
|
-
children: [e.isAvailable && t, !e.isAvailable && /* @__PURE__ */
|
|
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__ */
|
|
73
|
+
children: /* @__PURE__ */ f("span", { children: t })
|
|
74
74
|
})]
|
|
75
75
|
}, e.provider.name);
|
|
76
76
|
}),
|
|
77
|
-
y && /* @__PURE__ */
|
|
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 {
|
|
6
|
-
import {
|
|
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
|
|
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
|
|
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:
|
|
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 {
|
|
9
|
-
import {
|
|
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
|
|
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
|
|
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:
|
|
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 {
|
|
6
|
-
import {
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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 {
|
|
7
|
-
import {
|
|
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
|
|
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
|
|
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
|
|
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(() =>
|
|
38
|
-
command_name:
|
|
39
|
-
permission_type:
|
|
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:
|
|
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 {
|
|
11
|
-
import {
|
|
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
|
|
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
|
|
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
|
|
30
|
-
return await
|
|
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
|
|
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(() =>
|
|
89
|
-
command_name:
|
|
90
|
-
permission_type:
|
|
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:
|
|
102
|
-
permission_type:
|
|
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:
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
72
|
+
dateFormat: a.DATE_TIME,
|
|
73
73
|
id: "active_from",
|
|
74
74
|
name: _`Active from`
|
|
75
75
|
}),
|
|
76
76
|
e.createDateColumn({
|
|
77
|
-
dateFormat:
|
|
77
|
+
dateFormat: a.DATE_TIME,
|
|
78
78
|
id: "active_to",
|
|
79
79
|
name: _`Active to`
|
|
80
80
|
}),
|
|
81
81
|
e.createDateColumn({
|
|
82
|
-
dateFormat:
|
|
82
|
+
dateFormat: a.DATE_TIME,
|
|
83
83
|
id: "visible_from",
|
|
84
84
|
name: _`Visible from`
|
|
85
85
|
}),
|
|
86
86
|
e.createDateColumn({
|
|
87
|
-
dateFormat:
|
|
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:
|
|
101
|
-
permission_type:
|
|
100
|
+
command_name: o.OutageCrudCommand,
|
|
101
|
+
permission_type: s.CREATE
|
|
102
102
|
}], []), D = l(() => [{
|
|
103
|
-
command_name:
|
|
104
|
-
permission_type:
|
|
103
|
+
command_name: o.OutageCrudCommand,
|
|
104
|
+
permission_type: s.DELETE
|
|
105
105
|
}], []), O = l(() => [{
|
|
106
|
-
command_name:
|
|
107
|
-
permission_type:
|
|
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:
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
|
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__ */
|
|
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__ */
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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 =
|
|
11
|
+
let { t: d } = l(), f = o(async () => {
|
|
12
12
|
await n.resolve(e).router.navigate("/");
|
|
13
13
|
}, []);
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ s(t, {
|
|
15
15
|
singleAction: !0,
|
|
16
16
|
testIdAttributes: u.createAttributes("PostLogoutPage"),
|
|
17
17
|
title: d`Logged out`,
|
|
18
|
-
children: /* @__PURE__ */
|
|
18
|
+
children: /* @__PURE__ */ c(r, {
|
|
19
19
|
sx: { textAlign: "center" },
|
|
20
|
-
children: [/* @__PURE__ */
|
|
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
|
|
23
|
+
}), /* @__PURE__ */ s(i, {
|
|
24
24
|
onClick: f,
|
|
25
25
|
children: d`Log in again`
|
|
26
26
|
})]
|