@gen-epix/ui-client-common 4.4.2 → 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 +7 -6
- 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/Breadcrumbs.js.map +1 -1
- 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/Notifications.js.map +1 -1
- 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/epi/EpiContactDetailsDialog/index.js.map +1 -1
- 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/GenericErrorMessage/index.js.map +1 -1
- 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/MyPermissionsDialog/index.js.map +1 -1
- 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/components/ui/UserFeedbackDialog/index.js.map +1 -1
- package/dist/components/ui/UserInactivityConfirmation/index.js.map +1 -1
- 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/useOrganizationIdentifierIssuerLinksQuery/index.js.map +1 -1
- 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/hoc/withPermissions/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/hooks/useUpdateBreadcrumb/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/AdminPage/index.js.map +1 -1
- package/dist/pages/ChooseIdentityProviderPage/index.js +21 -21
- package/dist/pages/ChooseIdentityProviderPage/index.js.map +1 -1
- package/dist/pages/IdentifierIssuersAdminPage/index.js +5 -5
- package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +5 -5
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationContactsAdminPage/index.js +6 -6
- package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationSitesAdminPage/index.js +9 -9
- package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationsAdminPage/index.js +13 -13
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/index.js +20 -20
- package/dist/pages/OutagesAdminPage/index.js.map +1 -1
- package/dist/pages/PostLoginPage/index.js +6 -6
- package/dist/pages/PostLoginPage/index.js.map +1 -1
- package/dist/pages/PostLogoutPage/index.js +8 -8
- package/dist/pages/PostLogoutPage/index.js.map +1 -1
- package/dist/pages/UsersAdminPage/index.js +39 -39
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/setup/setup.d.ts +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 -16
- 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 +11 -14
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContext.d.ts +0 -9
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContextProvider.d.ts +0 -6
- package/dist/context/uiClientCommonConfigContext/index.d.ts +0 -3
- package/dist/context/uiClientCommonConfigContext/index.js +0 -34
- package/dist/context/uiClientCommonConfigContext/index.js.map +0 -1
- package/dist/context/uiClientCommonConfigContext/useUiClientCommonConfigContext.d.ts +0 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as i } from "../../../_chunks/
|
|
1
|
+
import { CONFIG_TOKEN as e } from "../../../constants/config.constants.js";
|
|
2
|
+
import { AxiosUtil as t } from "../../../utils/AxiosUtil/index.js";
|
|
3
|
+
import { API_SYSTEM_TOKEN as n } from "../../../constants/api.constants.js";
|
|
4
|
+
import { t as r } from "../../../_chunks/decorateParam.js";
|
|
5
|
+
import { t as i } from "../../../_chunks/decorate.js";
|
|
6
6
|
import { AuthenticationService as a } from "../AuthenticationService/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { inject as o, singleton as s } from "tsyringe";
|
|
8
|
+
import { StringUtil as c } from "@gen-epix/ui-core/utils/StringUtil";
|
|
9
|
+
import { CommonDbLogLevel as l } from "@gen-epix/api-commondb";
|
|
10
10
|
import { isAxiosError as u } from "axios";
|
|
11
11
|
//#region src/classes/services/LogService/LogService.ts
|
|
12
12
|
var d = class {
|
|
@@ -26,8 +26,8 @@ var d = class {
|
|
|
26
26
|
log(e) {
|
|
27
27
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = this.config.getSoftwareVersion();
|
|
28
28
|
this.logItems.push(...e.map((e) => ({
|
|
29
|
-
command_id:
|
|
30
|
-
detail: e.detail ? JSON.stringify(e.detail)
|
|
29
|
+
command_id: c.createUuid(),
|
|
30
|
+
detail: e.detail === void 0 || e.detail === null ? null : JSON.stringify(e.detail),
|
|
31
31
|
duration: e.duration ?? null,
|
|
32
32
|
level: e.level,
|
|
33
33
|
software_version: n,
|
|
@@ -37,61 +37,67 @@ var d = class {
|
|
|
37
37
|
}
|
|
38
38
|
onRequest(e) {
|
|
39
39
|
if (e.headers.has("X-IGNORE-LOG")) return e;
|
|
40
|
-
let t =
|
|
40
|
+
let t = c.createUuid();
|
|
41
41
|
return e.headers.set("X-REQUEST-ID", t), this.requestMap.set(t, (/* @__PURE__ */ new Date()).getTime()), this.log([{
|
|
42
42
|
detail: {
|
|
43
43
|
requestData: e.data,
|
|
44
44
|
requestParams: e.params,
|
|
45
45
|
url: e.url
|
|
46
46
|
},
|
|
47
|
-
level:
|
|
47
|
+
level: l.TRACE,
|
|
48
48
|
topic: "REQUEST"
|
|
49
49
|
}]), e;
|
|
50
50
|
}
|
|
51
51
|
onResponseFulfilled(e) {
|
|
52
52
|
if (e.config.headers.has("X-IGNORE-LOG")) return e;
|
|
53
|
-
let t = e
|
|
54
|
-
return this.log([{
|
|
53
|
+
let t = e.config.headers.get("X-REQUEST-ID"), n = typeof t == "string" ? this.requestMap.get(t) : void 0, r = n === void 0 ? void 0 : Date.now() - n;
|
|
54
|
+
return typeof t == "string" && this.requestMap.delete(t), this.log([{
|
|
55
55
|
detail: {
|
|
56
56
|
requestData: e.config.data,
|
|
57
57
|
requestParams: e.config.params,
|
|
58
58
|
url: e.config.url
|
|
59
59
|
},
|
|
60
|
-
duration:
|
|
61
|
-
level: e.status >= 200 && e.status < 300 ?
|
|
60
|
+
duration: r,
|
|
61
|
+
level: e.status >= 200 && e.status < 300 ? l.TRACE : l.ERROR,
|
|
62
62
|
topic: "RESPONSE"
|
|
63
63
|
}]), e;
|
|
64
64
|
}
|
|
65
65
|
onResponseRejected(e) {
|
|
66
66
|
if (u(e)) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
let n = e.config?.headers.get("X-REQUEST-ID");
|
|
68
|
+
if (t.isAxiosCanceledError(e)) {
|
|
69
|
+
typeof n == "string" && this.requestMap.delete(n);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let r = typeof n == "string" ? this.requestMap.get(n) : void 0, i = r === void 0 ? void 0 : Date.now() - r;
|
|
73
|
+
typeof n == "string" && this.requestMap.delete(n), this.log([{
|
|
70
74
|
detail: {
|
|
71
|
-
requestParams: e.config
|
|
72
|
-
responseData: e.response
|
|
73
|
-
status: e.response
|
|
74
|
-
url: e.config
|
|
75
|
+
requestParams: e.config?.params,
|
|
76
|
+
responseData: e.response?.data,
|
|
77
|
+
status: e.response?.status,
|
|
78
|
+
url: e.config?.url
|
|
75
79
|
},
|
|
76
|
-
duration:
|
|
77
|
-
level:
|
|
80
|
+
duration: i,
|
|
81
|
+
level: l.ERROR,
|
|
78
82
|
topic: "RESPONSE_ERROR"
|
|
79
83
|
}]);
|
|
80
84
|
} else this.log([{
|
|
81
|
-
detail: { error: e },
|
|
82
|
-
level:
|
|
85
|
+
detail: { error: e instanceof Error ? e.message : e },
|
|
86
|
+
level: l.ERROR,
|
|
83
87
|
topic: "RESPONSE_ERROR"
|
|
84
88
|
}]);
|
|
85
89
|
}
|
|
86
90
|
sendLog() {
|
|
87
|
-
this.logItems.length && this.authenticationService?.authContextProps?.isAuthenticated && (document.location.href.includes("accept-invitation") || (this.systemApi.log({ log_items: this.logItems }, { headers: { "X-IGNORE-LOG": "1" } }).catch(() =>
|
|
91
|
+
this.logItems.length && this.authenticationService?.authContextProps?.isAuthenticated && (document.location.href.includes("accept-invitation") || (this.systemApi.log({ log_items: this.logItems }, { headers: { "X-IGNORE-LOG": "1" } }).catch((e) => {
|
|
92
|
+
console.error("Failed to send logs", e);
|
|
93
|
+
}), this.logItems = []));
|
|
88
94
|
}
|
|
89
95
|
};
|
|
90
|
-
d =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
d = i([
|
|
97
|
+
s(),
|
|
98
|
+
r(0, o(e)),
|
|
99
|
+
r(1, o(a)),
|
|
100
|
+
r(2, o(n))
|
|
95
101
|
], d);
|
|
96
102
|
//#endregion
|
|
97
103
|
export { d as LogService };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_decorate","_decorateParam","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorateParam","__decorate","LogService","config","authenticationService","systemApi","timestamp","software_version","items","StringUtil","item","request","requestId","CommonDbLogLevel","response","requestStartedAt","duration","isAxiosError","error","AxiosUtil","singleton","inject","CONFIG_TOKEN","AuthenticationService","API_SYSTEM_TOKEN"],"sources":["../../../../src/classes/services/LogService/LogService.ts"],"sourcesContent":["import { isAxiosError } from 'axios';\nimport type {\n AxiosResponse,\n InternalAxiosRequestConfig,\n} from 'axios';\nimport type {\n CommonDbExternalLogItem,\n CommonDbSystemApi,\n} from '@gen-epix/api-commondb';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport { API_SYSTEM_TOKEN } from '../../../constants/api.constants';\nimport { AuthenticationService } from '../AuthenticationService';\nimport { AxiosUtil } from '../../../utils/AxiosUtil';\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\ntype LogServiceItem = {\n detail?: unknown;\n duration?: number;\n level: CommonDbLogLevel;\n topic: string;\n};\n\n@singleton()\nexport class LogService {\n protected readonly requestMap: Map<string, number>;\n\n private readonly authenticationService: AuthenticationService;\n private readonly config: Pick<ConfigBase, 'getSoftwareVersion' | 'log'>;\n private logItems: CommonDbExternalLogItem[] = [];\n private readonly systemApi: CommonDbSystemApi;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(AuthenticationService) authenticationService: AuthenticationService,\n @inject(API_SYSTEM_TOKEN) systemApi: CommonDbSystemApi,\n ) {\n this.requestMap = new Map<string, number>();\n this.config = config;\n this.authenticationService = authenticationService;\n this.systemApi = systemApi;\n setInterval(() => {\n this.sendLog();\n }, config.log.LOG_INTERVAL_MS);\n }\n\n\n public flushLog(): void {\n this.sendLog();\n }\n\n public log(items: LogServiceItem[]): void {\n const timestamp = new Date().toISOString();\n const software_version = this.config.getSoftwareVersion();\n this.logItems.push(...items.map<CommonDbExternalLogItem>(item => {\n return {\n command_id: StringUtil.createUuid(),\n detail: item.detail === undefined || item.detail === null ? null : JSON.stringify(item.detail),\n duration: item.duration ?? null,\n level: item.level,\n software_version,\n timestamp,\n topic: item.topic ?? null,\n };\n }));\n }\n\n public onRequest(request: InternalAxiosRequestConfig): InternalAxiosRequestConfig {\n if (request.headers.has('X-IGNORE-LOG')) {\n return request;\n }\n const requestId = StringUtil.createUuid();\n request.headers.set('X-REQUEST-ID', requestId);\n this.requestMap.set(requestId, new Date().getTime());\n\n this.log([{\n detail: {\n requestData: request.data as unknown,\n requestParams: request.params as unknown,\n url: request.url,\n },\n level: CommonDbLogLevel.TRACE,\n topic: 'REQUEST',\n }]);\n\n return request;\n }\n\n public onResponseFulfilled(response: AxiosResponse): AxiosResponse {\n if (response.config.headers.has('X-IGNORE-LOG')) {\n return response;\n }\n\n const requestId = response.config.headers.get('X-REQUEST-ID');\n const requestStartedAt = typeof requestId === 'string' ? this.requestMap.get(requestId) : undefined;\n const duration = requestStartedAt === undefined ? undefined : Date.now() - requestStartedAt;\n if (typeof requestId === 'string') {\n this.requestMap.delete(requestId);\n }\n\n this.log([{\n detail: {\n requestData: response.config.data as unknown,\n requestParams: response.config.params as unknown,\n url: response.config.url,\n },\n duration,\n level: response.status >= 200 && response.status < 300 ? CommonDbLogLevel.TRACE : CommonDbLogLevel.ERROR,\n topic: 'RESPONSE',\n }]);\n\n return response;\n }\n\n public onResponseRejected(error: unknown): void {\n if (isAxiosError(error)) {\n const requestId = error.config?.headers.get('X-REQUEST-ID');\n if (AxiosUtil.isAxiosCanceledError(error)) {\n if (typeof requestId === 'string') {\n this.requestMap.delete(requestId);\n }\n return;\n }\n const requestStartedAt = typeof requestId === 'string' ? this.requestMap.get(requestId) : undefined;\n const duration = requestStartedAt === undefined ? undefined : Date.now() - requestStartedAt;\n if (typeof requestId === 'string') {\n this.requestMap.delete(requestId);\n }\n this.log([{\n detail: {\n requestParams: error.config?.params as unknown,\n responseData: error.response?.data as unknown,\n status: error.response?.status,\n url: error.config?.url,\n },\n duration,\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n } else {\n this.log([{\n detail: {\n error: error instanceof Error ? error.message : error,\n },\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n }\n }\n\n private sendLog(): void {\n if (!this.logItems.length || !this.authenticationService?.authContextProps?.isAuthenticated) {\n return;\n }\n if (document.location.href.includes('accept-invitation')) {\n return;\n }\n this.systemApi.log({\n log_items: this.logItems,\n }, {\n headers: {\n 'X-IGNORE-LOG': '1',\n },\n }).catch((error: unknown) => {\n console.error('Failed to send logs', error);\n });\n this.logItems = [];\n }\n}\n"],"mappings":";;;;;;;;;;;AA8BO,IAAMI,IAAN,MAAiB;CACtB;CAEA;CACA;CACA,WAA8C,CAAC;CAC/C;CAEA,YACE,GACA,GACA,GACA;EAKA,AAJA,KAAK,6BAAa,IAAI,IAAoB,GAC1C,KAAK,SAASC,GACd,KAAK,wBAAwBC,GAC7B,KAAK,YAAYC,GACjB,kBAAkB;GAChB,KAAK,QAAQ;EACf,GAAGF,EAAO,IAAI,eAAe;CAC/B;CAG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,EAAOC,CAAY,CAAA;CACnBvB,EAAA,GAAAsB,EAAOE,CAAqB,CAAA;CAC5BxB,EAAA,GAAAsB,EAAOG,CAAgB,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as n } from "../../../_chunks/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { CONFIG_TOKEN as e } from "../../../constants/config.constants.js";
|
|
2
|
+
import { t } from "../../../_chunks/decorateParam.js";
|
|
3
|
+
import { t as n } from "../../../_chunks/decorate.js";
|
|
4
|
+
import { inject as r, singleton as i } from "tsyringe";
|
|
5
|
+
import { StringUtil as a } from "@gen-epix/ui-core/utils/StringUtil";
|
|
6
6
|
import { Subject as o } from "@gen-epix/ui-core/classes/Subject";
|
|
7
7
|
import { SubscribableAbstract as s } from "@gen-epix/ui-core/classes/abstracts/SubscribableAbstract";
|
|
8
8
|
//#region src/classes/services/NotificationService/NotificationService.ts
|
|
@@ -41,7 +41,7 @@ var c = class extends s {
|
|
|
41
41
|
} : t)), clearTimeout(this.notificationTimeouts[e]), delete this.notificationTimeouts[e];
|
|
42
42
|
}
|
|
43
43
|
showNotification(e) {
|
|
44
|
-
let t =
|
|
44
|
+
let t = a.createUuid(), n = e.autoHideAfterMs ?? this.config.notifications.autoHideAfterMs;
|
|
45
45
|
return this.subject.next([{
|
|
46
46
|
...e,
|
|
47
47
|
autoHideAfterMs: n,
|
|
@@ -49,14 +49,14 @@ var c = class extends s {
|
|
|
49
49
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
50
50
|
visible: !0
|
|
51
51
|
}, ...this.subject.data]), isFinite(n) && (this.notificationTimeouts[t] = setTimeout(() => {
|
|
52
|
-
this.subject.next(this.subject.data.map((e) => e.key === t ? {
|
|
52
|
+
delete this.notificationTimeouts[t], this.subject.next(this.subject.data.map((e) => e.key === t ? {
|
|
53
53
|
...e,
|
|
54
54
|
visible: !1
|
|
55
55
|
} : e));
|
|
56
56
|
}, n)), t;
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
c =
|
|
59
|
+
c = n([i(), t(0, r(e))], c);
|
|
60
60
|
//#endregion
|
|
61
61
|
export { c as NotificationService };
|
|
62
62
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","NotificationService","SubscribableAbstract","Subject","config","x","key","StringUtil","autoHideAfterMs","notification","singleton","__decorateParam","inject","CONFIG_TOKEN"],"sources":["../../../../src/classes/services/NotificationService/NotificationService.ts"],"sourcesContent":["import { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport { SubscribableAbstract } from '@gen-epix/ui-core/classes/abstracts/SubscribableAbstract';\nimport { Subject } from '@gen-epix/ui-core/classes/Subject';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport type { Notification } from '../../../models/notification.models';\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\n@singleton()\nexport class NotificationService extends SubscribableAbstract<Notification[]> {\n private readonly config: Pick<ConfigBase, 'notifications'>;\n private readonly notificationTimeouts: Record<string, ReturnType<typeof setTimeout>>;\n\n public constructor(@inject(CONFIG_TOKEN) config: ConfigBase) {\n super(new Subject<Notification[]>([]));\n this.config = config;\n this.notificationTimeouts = {};\n }\n\n\n public clearNotification(key: string): void {\n this.subject.next(this.subject.data.filter(x => x.key !== key));\n if (this.notificationTimeouts[key]) {\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n }\n }\n\n public clearNotifications(): void {\n this.subject.next([]);\n Object.keys(this.notificationTimeouts).forEach(key => {\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n });\n }\n\n public fulfillNotification(key: string, message: Notification['message'], severity: Notification['severity']): void {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n isLoading: false,\n message,\n severity,\n };\n }\n return x;\n }));\n }\n\n public hideAllNotifications(): void {\n this.subject.next(this.subject.data.map(x => ({\n ...x,\n visible: false,\n })));\n }\n\n public hideNotification(key: string): void {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n visible: false,\n };\n }\n return x;\n }));\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n }\n\n public showNotification(notification: Omit<Notification, 'key' | 'timestamp' | 'visible'>): string {\n const key = StringUtil.createUuid();\n const autoHideAfterMs = notification.autoHideAfterMs ?? this.config.notifications.autoHideAfterMs;\n\n this.subject.next([\n {\n ...notification,\n autoHideAfterMs,\n key,\n timestamp: new Date().getTime(),\n visible: true,\n },\n ...this.subject.data,\n ]);\n\n if (isFinite(autoHideAfterMs)) {\n this.notificationTimeouts[key] = setTimeout(() => {\n delete this.notificationTimeouts[key];\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n visible: false,\n };\n }\n return x;\n }));\n }, autoHideAfterMs);\n }\n return key;\n }\n}\n"],"mappings":";;;;;;;;AAaO,IAAMG,IAAN,cAAkCC,EAAqC;CAC5E;CACA;CAEA,YAAmB,GAA0C;EAG3D,AAFA,MAAM,IAAIC,EAAwB,CAAC,CAAC,CAAC,GACrC,KAAK,SAASC,GACd,KAAK,uBAAuB,CAAC;CAC/B;CAGA,kBAAyB,GAAmB;EAE1C,AADA,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,QAAO,MAAKC,EAAE,QAAQC,CAAG,CAAC,GAC1D,KAAK,qBAAqBA,OAC5B,aAAa,KAAK,qBAAqBA,EAAI,GAC3C,OAAO,KAAK,qBAAqBA;CAErC;CAEA,qBAAkC;EAEhC,AADA,KAAK,QAAQ,KAAK,CAAC,CAAC,GACpB,OAAO,KAAK,KAAK,oBAAoB,CAAC,CAAC,SAAQ,MAAO;GAEpD,AADA,aAAa,KAAK,qBAAqB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
|
-
import { t as
|
|
4
|
-
import { inject as
|
|
1
|
+
import { CONFIG_TOKEN as e } from "../../../constants/config.constants.js";
|
|
2
|
+
import { t } from "../../../_chunks/decorateParam.js";
|
|
3
|
+
import { t as n } from "../../../_chunks/decorate.js";
|
|
4
|
+
import { inject as r, singleton as i } from "tsyringe";
|
|
5
|
+
import { WindowService as a } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
5
6
|
import { EventBusAbstract as o } from "@gen-epix/ui-core/classes/abstracts/EventBusAbstract";
|
|
6
7
|
//#region src/classes/services/PageEventBusService/PageEventBusService.ts
|
|
7
8
|
var s = class extends o {
|
|
@@ -54,14 +55,17 @@ var s = class extends o {
|
|
|
54
55
|
}
|
|
55
56
|
traverseDom(e, t) {
|
|
56
57
|
if (t(e)) return e;
|
|
57
|
-
for (let n of Array.from(e.childNodes))
|
|
58
|
+
for (let n of Array.from(e.childNodes)) {
|
|
59
|
+
let e = this.traverseDom(n, t);
|
|
60
|
+
if (e) return e;
|
|
61
|
+
}
|
|
58
62
|
return null;
|
|
59
63
|
}
|
|
60
64
|
};
|
|
61
|
-
s =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
s = n([
|
|
66
|
+
i(),
|
|
67
|
+
t(0, r(e)),
|
|
68
|
+
t(1, r(a))
|
|
65
69
|
], s);
|
|
66
70
|
//#endregion
|
|
67
71
|
export { s as PageEventBusService };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","PageEventBusService","EventBusAbstract","windowService","config","eventName","payload","enablePageEvents","closestButton","event","closestLink","closestElement","context","buttonTitle","childTextNode","el","nodeWithText","predicate","element","child","found","singleton","__decorateParam","inject","CONFIG_TOKEN","WindowService"],"sources":["../../../../src/classes/services/PageEventBusService/PageEventBusService.ts"],"sourcesContent":["import type { CommonDbUser } from '@gen-epix/api-commondb';\nimport { EventBusAbstract } from '@gen-epix/ui-core/classes/abstracts/EventBusAbstract';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\ntype EpiEvent = {\n changePage: Page;\n changeUser: CommonDbUser;\n click: {\n context?: string;\n label: string;\n page?: Page;\n type: 'button' | 'link' | 'table-row-index' | 'table-row';\n };\n error: Error;\n};\n\ntype Page = {\n location: Location;\n pageName: string;\n};\n\n@singleton()\nexport class PageEventBusService extends EventBusAbstract<EpiEvent> {\n private lastPageEventPayload: string = null;\n private readonly windowService: WindowService;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(WindowService) windowService: WindowService,\n ) {\n super();\n this.windowService = windowService;\n this.setupClickEventListener(config.enablePageEvents);\n }\n\n\n public emit<TEventName extends keyof EpiEvent>(eventName: TEventName, payload?: EpiEvent[TEventName]): void {\n if (eventName === 'changePage') {\n if (this.lastPageEventPayload === (payload as EpiEvent['changePage']).pageName) {\n return;\n }\n this.lastPageEventPayload = (payload as EpiEvent['changePage']).pageName;\n }\n\n if (eventName === 'click' && !(payload as EpiEvent['click']).page) {\n (payload as EpiEvent['click']).page = this.getPage();\n }\n\n super.emit(eventName, payload);\n }\n\n public getPage(): Page {\n return {\n location: this.windowService.window.location,\n pageName: document.querySelector('[data-page-container]')?.getAttribute('data-testid'),\n };\n }\n\n private setupClickEventListener(enablePageEvents: boolean): void {\n if (!enablePageEvents) {\n return;\n }\n this.windowService.window.addEventListener('click', (event: Event): void => {\n\n const closestButton = (event.target as HTMLElement).closest('button');\n const closestLink = (event.target as HTMLElement).closest('a');\n const closestElement = closestButton || closestLink;\n\n if (closestElement) {\n const context = closestElement?.closest('[data-testid]')?.getAttribute('data-testid') ?? '';\n\n const buttonTitle = closestElement.getAttribute('aria-label') ?? closestElement.getAttribute('title');\n if (buttonTitle) {\n this.emit('click', {\n context,\n label: buttonTitle,\n type: closestButton ? 'button' : 'link',\n });\n } else {\n const childTextNode = this.traverseDom(closestElement, (el) => el.nodeType === Node.TEXT_NODE);\n if (childTextNode?.nodeValue) {\n this.emit('click', {\n context,\n label: childTextNode?.nodeValue,\n type: closestButton ? 'button' : 'link',\n });\n } else {\n const nodeWithText = this.traverseDom(closestElement, (el) => !!el.innerText);\n if (nodeWithText?.innerText) {\n this.emit('click', {\n context,\n label: nodeWithText?.innerText.split('\\n')[0],\n type: closestButton ? 'button' : 'link',\n });\n }\n }\n }\n }\n });\n }\n\n private traverseDom(element: HTMLElement, predicate: (element: HTMLElement) => boolean): HTMLElement {\n if (predicate(element)) {\n return element;\n }\n for (const child of Array.from(element.childNodes)) {\n const found = this.traverseDom(child as HTMLElement, predicate);\n if (found) {\n return found;\n }\n }\n return null;\n }\n}\n"],"mappings":";;;;;;;AA6BO,IAAMG,IAAN,cAAkCC,EAA2B;CAClE,uBAAuC;CACvC;CAEA,YACE,GACA,GACA;EAGA,AAFA,MAAM,GACN,KAAK,gBAAgBC,GACrB,KAAK,wBAAwBC,EAAO,gBAAgB;CACtD;CAGA,KAA+C,GAAuB,GAAsC;EAC1G,IAAIC,MAAc,cAAc;GAC9B,IAAI,KAAK,yBAA0BC,EAAmC,UACpE;GAEF,KAAK,uBAAwBA,EAAmC;EAClE;EAMA,AAJID,MAAc,WAAW,CAAEC,EAA8B,SAC3D,EAA+B,OAAO,KAAK,QAAQ,IAGrD,MAAM,KAAKD,GAAWC,CAAO;CAC/B;CAEA,UAAuB;EACrB,OAAO;GACL,UAAU,KAAK,cAAc,OAAO;GACpC,UAAU,SAAS,cAAc,uBAAuB,CAAC,EAAE,aAAa,aAAa;EACvF;CACF;CAEA,wBAAgC,GAAiC;EAC/D,AAAKC,KAGL,KAAK,cAAc,OAAO,iBAAiB,UAAU,MAAuB;GAE1E,IAAMC,IAAiBC,EAAM,OAAuB,QAAQ,QAAQ,GAC9DC,IAAeD,EAAM,OAAuB,QAAQ,GAAG,GACvDE,IAAiBH,KAAiBE;GAExC,IAAIC,GAAgB;IAClB,IAAMC,IAAUD,GAAgB,QAAQ,eAAe,CAAC,EAAE,aAAa,aAAa,KAAK,IAEnFE,IAAcF,EAAe,aAAa,YAAY,KAAKA,EAAe,aAAa,OAAO;IACpG,IAAIE,GACF,KAAK,KAAK,SAAS;KACjB;KACA,OAAOA;KACP,MAAML,IAAgB,WAAW;IACnC,CAAC;SACI;KACL,IAAMM,IAAgB,KAAK,YAAYH,IAAiB,MAAOI,EAAG,aAAa,KAAK,SAAS;KAC7F,IAAID,GAAe,WACjB,KAAK,KAAK,SAAS;MACjB;MACA,OAAOA,GAAe;MACtB,MAAMN,IAAgB,WAAW;KACnC,CAAC;UACI;MACL,IAAMQ,IAAe,KAAK,YAAYL,IAAiB,MAAO,CAAC,CAACI,EAAG,SAAS;MAC5E,AAAIC,GAAc,aAChB,KAAK,KAAK,SAAS;OACjB;OACA,OAAOA,GAAc,UAAU,MAAM,IAAI,CAAC,CAAC;OAC3C,MAAMR,IAAgB,WAAW;MACnC,CAAC;KAEL;IACF;GACF;EACF,CAAC;CACH;CAEA,YAAoB,GAAsB,GAA2D;EACnG,IAAIS,EAAUC,CAAO,GACnB,OAAOA;EAET,KAAK,IAAMC,KAAS,MAAM,KAAKD,EAAQ,UAAU,GAAG;GAClD,IAAME,IAAQ,KAAK,YAAYD,GAAsBF,CAAS;GAC9D,IAAIG,GACF,OAAOA;EAEX;EACA,OAAO;CACT;AACF;;CA5FCC,EAAU;CAMNtB,EAAA,GAAAwB,EAAOC,CAAY,CAAA;CACnBzB,EAAA,GAAAwB,EAAOE,CAAa,CAAA"}
|
|
@@ -4,26 +4,23 @@ import { createBrowserRouter as n } from "react-router-dom";
|
|
|
4
4
|
//#region src/classes/services/RouterService/RouterService.ts
|
|
5
5
|
var r = class {
|
|
6
6
|
get adminRoutes() {
|
|
7
|
-
if (!this.__adminRoutesFactory) throw Error("RouterService not initialized");
|
|
8
7
|
return this.__adminRoutes ??= this.__adminRoutesFactory(), this.__adminRoutes;
|
|
9
8
|
}
|
|
10
9
|
get homePageComponent() {
|
|
11
|
-
if (!this.__homePageComponent) throw Error("RouterService not initialized");
|
|
12
10
|
return this.__homePageComponent;
|
|
13
11
|
}
|
|
14
12
|
get router() {
|
|
15
13
|
return this.__router ||= n(this.routes), this.__router;
|
|
16
14
|
}
|
|
17
15
|
get routes() {
|
|
18
|
-
if (!this.__routesFactory) throw Error("RouterService not initialized");
|
|
19
16
|
return this.__routes ??= this.__routesFactory(), this.__routes;
|
|
20
17
|
}
|
|
21
18
|
__adminRoutes = null;
|
|
22
|
-
__adminRoutesFactory
|
|
23
|
-
__homePageComponent
|
|
19
|
+
__adminRoutesFactory;
|
|
20
|
+
__homePageComponent;
|
|
24
21
|
__router = null;
|
|
25
22
|
__routes = null;
|
|
26
|
-
__routesFactory
|
|
23
|
+
__routesFactory;
|
|
27
24
|
constructor(e) {
|
|
28
25
|
this.__homePageComponent = e.homePageComponent, this.__adminRoutesFactory = this.createRoutesFactory(e.adminRoutes), this.__routesFactory = this.createRoutesFactory(e.routes);
|
|
29
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_decorate","__decorate","RouterService","createBrowserRouter","kwArgs","routes","singleton"],"sources":["../../../../src/classes/services/RouterService/RouterService.ts"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { createBrowserRouter } from 'react-router-dom';\nimport { singleton } from 'tsyringe';\n\nimport type { MyNonIndexRouteObject } from '../../../models/react-router.models';\n\ntype HomePage = () => ReactElement;\ntype RoutesFactory = () => MyNonIndexRouteObject[];\ntype RoutesInput = MyNonIndexRouteObject[] | RoutesFactory;\n\n@singleton()\nexport class RouterService {\n public get adminRoutes(): MyNonIndexRouteObject[] {\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["_decorate","__decorate","RouterService","createBrowserRouter","kwArgs","routes","singleton"],"sources":["../../../../src/classes/services/RouterService/RouterService.ts"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { createBrowserRouter } from 'react-router-dom';\nimport { singleton } from 'tsyringe';\n\nimport type { MyNonIndexRouteObject } from '../../../models/react-router.models';\n\ntype HomePage = () => ReactElement;\ntype RoutesFactory = () => MyNonIndexRouteObject[];\ntype RoutesInput = MyNonIndexRouteObject[] | RoutesFactory;\n\n@singleton()\nexport class RouterService {\n public get adminRoutes(): MyNonIndexRouteObject[] {\n this.__adminRoutes ??= this.__adminRoutesFactory();\n return this.__adminRoutes;\n }\n public get homePageComponent(): HomePage {\n return this.__homePageComponent;\n }\n public get router(): ReturnType<typeof createBrowserRouter> {\n if (!this.__router) {\n this.__router = createBrowserRouter(this.routes);\n }\n return this.__router;\n }\n public get routes(): MyNonIndexRouteObject[] {\n this.__routes ??= this.__routesFactory();\n return this.__routes;\n }\n private __adminRoutes: MyNonIndexRouteObject[] | null = null;\n private readonly __adminRoutesFactory: RoutesFactory;\n\n private readonly __homePageComponent: HomePage;\n\n private __router: null | ReturnType<typeof createBrowserRouter> = null;\n\n private __routes: MyNonIndexRouteObject[] | null = null;\n\n private readonly __routesFactory: RoutesFactory;\n\n public constructor(kwArgs: {\n adminRoutes: RoutesInput;\n homePageComponent: HomePage;\n routes: RoutesInput;\n }) {\n this.__homePageComponent = kwArgs.homePageComponent;\n this.__adminRoutesFactory = this.createRoutesFactory(kwArgs.adminRoutes);\n this.__routesFactory = this.createRoutesFactory(kwArgs.routes);\n }\n\n\n private createRoutesFactory(routes: RoutesInput): RoutesFactory {\n if (typeof routes === 'function') {\n return routes;\n }\n return () => routes;\n }\n}\n"],"mappings":";;;;AAWO,IAAME,IAAN,MAAoB;CACzB,IAAW,cAAuC;EAEhD,OADA,KAAK,kBAAkB,KAAK,qBAAqB,GAC1C,KAAK;CACd;CACA,IAAW,oBAA8B;EACvC,OAAO,KAAK;CACd;CACA,IAAW,SAAiD;EAI1D,OAHA,AACE,KAAK,aAAWC,EAAoB,KAAK,MAAM,GAE1C,KAAK;CACd;CACA,IAAW,SAAkC;EAE3C,OADA,KAAK,aAAa,KAAK,gBAAgB,GAChC,KAAK;CACd;CACA,gBAAwD;CACxD;CAEA;CAEA,WAAkE;CAElE,WAAmD;CAEnD;CAEA,YAAmB,GAIhB;EAGD,AAFA,KAAK,sBAAsBC,EAAO,mBAClC,KAAK,uBAAuB,KAAK,oBAAoBA,EAAO,WAAW,GACvE,KAAK,kBAAkB,KAAK,oBAAoBA,EAAO,MAAM;CAC/D;CAGA,oBAA4B,GAAoC;EAI9D,OAHI,OAAOC,KAAW,aACbA,UAEIA;CACf;AACF;AA/CC,IAAAL,EAAA,CAAAM,EAAU,CAAA,GAAAJ,CAAA"}
|
|
@@ -1,46 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../../../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { jsx as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { ErrorBoundary as y } from "react-error-boundary";
|
|
1
|
+
import { API_BASE_TOKEN as e } from "../../../constants/api.constants.js";
|
|
2
|
+
import { RouterService as t } from "../../../classes/services/RouterService/index.js";
|
|
3
|
+
import { useConfig as n } from "../../../hooks/useConfig/index.js";
|
|
4
|
+
import { AuthenticationService as r } from "../../../classes/services/AuthenticationService/index.js";
|
|
5
|
+
import { LogService as i } from "../../../classes/services/LogService/index.js";
|
|
6
|
+
import { t as a } from "../../../_chunks/QueryClientProvider.js";
|
|
7
|
+
import { t as o } from "../../../_chunks/QueryClientService.js";
|
|
8
|
+
import { ErrorPage as s } from "../../../pages/ErrorPage/index.js";
|
|
9
|
+
import { BackendVersionService as c } from "../../../classes/services/BackendVersionService/index.js";
|
|
10
|
+
import { ApplicationBootstrapWithoutAuthorization as l } from "../ApplicationBootstrapWithoutAuthorization/index.js";
|
|
11
|
+
import { EmotionCacheService as u } from "../../../classes/services/EmotionCacheService/index.js";
|
|
12
|
+
import { container as d } from "tsyringe";
|
|
13
|
+
import { CssBaseline as f, ThemeProvider as p } from "@mui/material";
|
|
14
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
15
|
+
import { RouterProvider as g } from "react-router-dom";
|
|
16
|
+
import { CacheProvider as _ } from "@emotion/react";
|
|
17
|
+
import { ErrorBoundary as v } from "react-error-boundary";
|
|
19
18
|
//#region src/components/app/AppRouterProvider/AppRouterProvider.tsx
|
|
20
|
-
var
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
let
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
children: /* @__PURE__ */ p
|
|
31
|
-
|
|
32
|
-
children: /* @__PURE__ */ m(
|
|
33
|
-
|
|
34
|
-
children:
|
|
35
|
-
|
|
36
|
-
children: /* @__PURE__ */ p(u, { children: /* @__PURE__ */ p(b, {}) })
|
|
37
|
-
})]
|
|
38
|
-
})
|
|
19
|
+
var y = () => /* @__PURE__ */ m(g, { router: d.resolve(t).router }), b = () => {
|
|
20
|
+
let t = n(), g = d.resolve(r), b = d.resolve(i), x = t.getTouchIconUrl();
|
|
21
|
+
x && document.querySelector("link[rel=\"icon\"]")?.setAttribute("href", x);
|
|
22
|
+
let S = d.resolve(e);
|
|
23
|
+
S.baseUrl = t.getAPIBaseUrl(), S.defaultRequestTimeout = t.defaultRequestTimeout, S.onRequest = [g.onRequest.bind(g), b.onRequest.bind(b)], S.onResponseFulfilled = [b.onResponseFulfilled.bind(b), d.resolve(c).onResponseFulfilled.bind(d.resolve(c))], S.onResponseRejected = [b.onResponseRejected.bind(b), g.onResponseRejected.bind(g)];
|
|
24
|
+
let C = d.resolve(o), w = d.resolve(u).emotionCache;
|
|
25
|
+
return /* @__PURE__ */ m(a, {
|
|
26
|
+
client: C.queryClient,
|
|
27
|
+
children: /* @__PURE__ */ m(_, {
|
|
28
|
+
value: w,
|
|
29
|
+
children: /* @__PURE__ */ h(p, {
|
|
30
|
+
theme: t.theme,
|
|
31
|
+
children: [/* @__PURE__ */ m(f, {}), /* @__PURE__ */ m(v, {
|
|
32
|
+
FallbackComponent: s,
|
|
33
|
+
children: /* @__PURE__ */ m(l, { children: /* @__PURE__ */ m(y, {}) })
|
|
34
|
+
})]
|
|
39
35
|
})
|
|
40
36
|
})
|
|
41
37
|
});
|
|
42
38
|
};
|
|
43
39
|
//#endregion
|
|
44
|
-
export {
|
|
40
|
+
export { b as App };
|
|
45
41
|
|
|
46
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["QueryClientProvider","QueryClientService","AppRouterProvider","RouterProvider","container","RouterService","App","config","useConfig","authenticationService","AuthenticationService","logService","LogService","touchIconUrl","api","API_BASE_TOKEN","BackendVersionService","queryClientService","emotionCache","EmotionCacheService","CacheProvider","ThemeProvider","CssBaseline","ErrorBoundary","ErrorPage","ApplicationBootstrapWithoutAuthorization"],"sources":["../../../../src/components/app/AppRouterProvider/AppRouterProvider.tsx","../../../../src/components/app/App/App.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport { RouterProvider } from 'react-router-dom';\n\nimport { RouterService } from '../../../classes/services/RouterService';\n\nexport const AppRouterProvider = () => <RouterProvider router={container.resolve(RouterService).router} />;\n","import { container } from 'tsyringe';\nimport type { DependencyContainer } from 'tsyringe';\nimport { CacheProvider } from '@emotion/react';\nimport {\n CssBaseline,\n ThemeProvider,\n} from '@mui/material';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nimport { API_BASE_TOKEN } from '../../../constants/api.constants';\nimport { BackendVersionService } from '../../../classes/services/BackendVersionService';\nimport { QueryClientService } from '../../../classes/services/QueryClientService';\nimport { ErrorPage } from '../../../pages/ErrorPage';\nimport { EmotionCacheService } from '../../../classes/services/EmotionCacheService';\nimport { AuthenticationService } from '../../../classes/services/AuthenticationService';\nimport { LogService } from '../../../classes/services/LogService';\nimport { ApplicationBootstrapWithoutAuthorization } from '../ApplicationBootstrapWithoutAuthorization';\nimport { AppRouterProvider } from '../AppRouterProvider/AppRouterProvider';\nimport { useConfig } from '../../../hooks/useConfig';\n\nexport type AppProps = {\n readonly container: DependencyContainer;\n};\n\nexport const App = () => {\n const config = useConfig();\n\n const authenticationService = container.resolve(AuthenticationService);\n const logService = container.resolve(LogService);\n const touchIconUrl = config.getTouchIconUrl();\n if (touchIconUrl) {\n document.querySelector('link[rel=\"icon\"]')?.setAttribute('href', touchIconUrl);\n }\n const api = container.resolve(API_BASE_TOKEN);\n api.baseUrl = config.getAPIBaseUrl();\n api.defaultRequestTimeout = config.defaultRequestTimeout;\n api.onRequest = [\n authenticationService.onRequest.bind(authenticationService),\n logService.onRequest.bind(logService),\n ];\n api.onResponseFulfilled = [\n logService.onResponseFulfilled.bind(logService),\n container.resolve(BackendVersionService).onResponseFulfilled.bind(container.resolve(BackendVersionService)),\n ];\n api.onResponseRejected = [\n logService.onResponseRejected.bind(logService),\n authenticationService.onResponseRejected.bind(authenticationService),\n ];\n\n const queryClientService = container.resolve(QueryClientService);\n const emotionCache = container.resolve(EmotionCacheService).emotionCache;\n\n return (\n <QueryClientProvider client={queryClientService.queryClient}>\n <CacheProvider value={emotionCache}>\n <ThemeProvider theme={config.theme}>\n <CssBaseline />\n <ErrorBoundary FallbackComponent={ErrorPage}>\n <ApplicationBootstrapWithoutAuthorization>\n <AppRouterProvider />\n </ApplicationBootstrapWithoutAuthorization>\n </ErrorBoundary>\n </ThemeProvider>\n </CacheProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAKA,IAAaE,UAA0B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2
|
-
import { t } from "../../../_chunks/
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { t } from "../../../_chunks/react.js";
|
|
3
|
+
import { outagesStore as n } from "../../../stores/outagesStore/index.js";
|
|
4
|
+
import { API_SYSTEM_TOKEN as r } from "../../../constants/api.constants.js";
|
|
5
|
+
import { PageContainer as i } from "../../ui/PageContainer/index.js";
|
|
6
|
+
import { ResponseHandler as a } from "../../ui/ResponseHandler/index.js";
|
|
7
|
+
import { t as o } from "../../../_chunks/useQueryMemo.js";
|
|
8
|
+
import { t as s } from "../../../_chunks/QueryClientService.js";
|
|
9
9
|
import { COMMON_QUERY_KEY as c } from "../../../constants/query.constants.js";
|
|
10
10
|
import { t as l } from "../../../_chunks/OutageList.js";
|
|
11
11
|
import "../../ui/OutageList/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
12
|
+
import { container as u } from "tsyringe";
|
|
13
|
+
import { WindowService as d } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
14
|
+
import { Box as f, Button as p } from "@mui/material";
|
|
15
|
+
import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
|
|
16
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
17
17
|
import { useTranslation as b } from "react-i18next";
|
|
18
18
|
import { TestIdUtil as x } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
19
19
|
import { useArray as S } from "@gen-epix/ui-core/hooks/useArray";
|
|
20
20
|
//#region src/components/app/ApplicationBootstrapWithAuthentication/ApplicationBootstrapWithAuthentication.tsx
|
|
21
21
|
var C = ({ children: C }) => {
|
|
22
|
-
let { t: w } = b(), T =
|
|
22
|
+
let { t: w } = b(), T = t(n, (e) => e.setCategorizedOutages), [E, D] = _(!1), [O, k] = _(!1), A = o({
|
|
23
23
|
gcTime: Infinity,
|
|
24
|
-
queryFn: async ({ signal: e }) => (await
|
|
25
|
-
queryKey:
|
|
24
|
+
queryFn: async ({ signal: e }) => (await u.resolve(r).retrieveOutages({ signal: e })).data,
|
|
25
|
+
queryKey: u.resolve(s).getGenericKey(c.OUTAGES),
|
|
26
26
|
refetchInterval: 3e5,
|
|
27
27
|
staleTime: Infinity
|
|
28
|
-
}), j = S([A]), M =
|
|
29
|
-
u.
|
|
30
|
-
}, []), P =
|
|
28
|
+
}), j = S([A]), M = g(() => e.getCategorizedOutages(A.data ?? []), [A.data]), N = m(() => {
|
|
29
|
+
u.resolve(d).window.location.reload();
|
|
30
|
+
}, []), P = m(() => {
|
|
31
31
|
D(!0);
|
|
32
32
|
}, []);
|
|
33
|
-
return
|
|
33
|
+
return h(() => {
|
|
34
34
|
M && T(M);
|
|
35
|
-
let e = u.
|
|
35
|
+
let e = u.resolve(d), t = e.window.setTimeout(() => {
|
|
36
36
|
k(!0);
|
|
37
37
|
}, 5e3);
|
|
38
38
|
return () => {
|
|
39
|
-
|
|
39
|
+
e.window.clearTimeout(t);
|
|
40
40
|
};
|
|
41
|
-
}, [M, T]), !E && !A.isLoading && !A.error && M.activeOutages?.length > 0 ? /* @__PURE__ */
|
|
41
|
+
}, [M, T]), !E && !A.isLoading && !A.error && M.activeOutages?.length > 0 ? /* @__PURE__ */ y(i, {
|
|
42
42
|
singleAction: !0,
|
|
43
43
|
testIdAttributes: x.createAttributes("OutagePage"),
|
|
44
44
|
title: w`Outages`,
|
|
45
|
-
children: [/* @__PURE__ */
|
|
45
|
+
children: [/* @__PURE__ */ v(l, {
|
|
46
46
|
activeOutages: M.activeOutages,
|
|
47
47
|
soonActiveOutages: M.soonActiveOutages,
|
|
48
48
|
visibleOutages: M.visibleOutages
|
|
49
|
-
}), /* @__PURE__ */
|
|
49
|
+
}), /* @__PURE__ */ y(f, {
|
|
50
50
|
sx: {
|
|
51
51
|
display: "flex",
|
|
52
52
|
gap: 1,
|
|
53
53
|
justifyContent: "flex-end"
|
|
54
54
|
},
|
|
55
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ v(p, {
|
|
56
56
|
disabled: !O,
|
|
57
57
|
onClick: P,
|
|
58
58
|
variant: "outlined",
|
|
59
59
|
children: w`Continue anyway`
|
|
60
|
-
}), /* @__PURE__ */
|
|
60
|
+
}), /* @__PURE__ */ v(p, {
|
|
61
61
|
disabled: !O,
|
|
62
62
|
onClick: N,
|
|
63
63
|
variant: "contained",
|
|
64
64
|
children: w`Retry`
|
|
65
65
|
})]
|
|
66
66
|
})]
|
|
67
|
-
}) : A.error || A.isLoading ? /* @__PURE__ */
|
|
67
|
+
}) : A.error || A.isLoading ? /* @__PURE__ */ v(i, {
|
|
68
68
|
ignorePageEvent: !0,
|
|
69
69
|
singleAction: !0,
|
|
70
70
|
testIdAttributes: x.createAttributes("OutagesLoadingPage"),
|
|
71
71
|
title: w`Outages`,
|
|
72
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ v(a, {
|
|
73
73
|
loadables: j,
|
|
74
74
|
loadingMessage: w`Loading`,
|
|
75
75
|
children: C
|