@gen-epix/ui-client-common 4.6.0 → 4.7.0
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 +2 -2
- package/dist/@types/mui.d.ts +13 -11
- package/dist/_chunks/ApplicationFooter.js +31 -21
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +4 -4
- package/dist/_chunks/CrudPage.js +332 -336
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/Notifications.js +16 -16
- package/dist/_chunks/QueryClientProvider.js +1 -1
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +73 -72
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Table.js +853 -744
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js +38 -38
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +131 -131
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/_baseFlatten.js +12 -12
- package/dist/_chunks/_baseFlatten.js.map +1 -1
- package/dist/_chunks/_baseIteratee.js +78 -78
- package/dist/_chunks/_baseIteratee.js.map +1 -1
- package/dist/_chunks/decorate.js +1 -1
- package/dist/_chunks/decorateParam.js +1 -1
- package/dist/_chunks/middleware.js +66 -70
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +98 -98
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/query.js +108 -92
- 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/tableStore.js +61 -58
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +73 -71
- 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 +15 -16
- 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/AuthenticationService/index.js +8 -8
- 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/BreadcrumbService/index.js +4 -4
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/index.js +30 -30
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/LogService/index.js +15 -15
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/PageEventBusService/index.js.map +1 -1
- package/dist/components/app/App/index.js +26 -24
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +18 -18
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +18 -18
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +15 -15
- package/dist/components/app/AuthorizationWrapper/index.js +16 -16
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +33 -33
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/index.js +4 -4
- package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBar.d.ts +4 -0
- package/dist/components/ui/ApplicationBar/ApplicationBarActions.d.ts +5 -0
- package/dist/components/ui/ApplicationBar/ApplicationBarNavigationMenu.d.ts +6 -0
- package/dist/components/ui/ApplicationBar/index.js +281 -266
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/ApplicationFooter/ApplicationFooter.d.ts +3 -0
- package/dist/components/ui/ApplicationFooter/ApplicationFooterLink.d.ts +3 -0
- package/dist/components/ui/ApplicationFooter/ApplicationFooterLinkSection.d.ts +4 -0
- package/dist/components/ui/GenericErrorMessage/index.js +13 -13
- package/dist/components/ui/LicensesDialog/index.js +6 -6
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +11 -11
- package/dist/components/ui/OutagesDialog/index.js +4 -4
- package/dist/components/ui/OutagesDialog/index.js.map +1 -1
- package/dist/components/ui/PageContainer/index.js +5 -5
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/ResponseHandler/index.js +4 -4
- package/dist/components/ui/SortableList/SortableList.d.ts +5 -3
- package/dist/components/ui/Table/Table.d.ts +5 -2
- package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +13 -2
- package/dist/components/ui/Table/index.d.ts +1 -0
- package/dist/components/ui/Table/index.js +1 -1
- package/dist/components/ui/UserFeedbackDialog/index.js +15 -15
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +12 -12
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +11 -11
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +5 -5
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +15 -15
- package/dist/dataHooks/useOrganizationsQuery/index.js +7 -7
- package/dist/dataHooks/useUsersQuery/index.js +10 -10
- package/dist/hooks/useCreateMutation/index.js +14 -14
- package/dist/hooks/useCreateMutation/index.js.map +1 -1
- package/dist/hooks/useDeleteMutation/index.js +17 -17
- package/dist/hooks/useDeleteMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/index.js +47 -51
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/useEditMutation.d.ts +1 -2
- package/dist/hooks/useInitializeTableStore/index.js +6 -6
- package/dist/hooks/useInitializeTableStore/index.js.map +1 -1
- package/dist/locale/en.json +13 -5
- package/dist/locale/nl.json +13 -5
- package/dist/pages/AcceptInvitationPage/index.js +10 -10
- package/dist/pages/AdminPage/index.js +19 -19
- package/dist/pages/ChooseIdentityProviderPage/index.js +5 -5
- package/dist/pages/ErrorPage/index.js +4 -4
- package/dist/pages/IdentifierIssuersAdminPage/index.js +7 -7
- package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +16 -16
- package/dist/pages/OrganizationContactsAdminPage/index.js +10 -10
- package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationSitesAdminPage/index.js +12 -12
- package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationsAdminPage/index.js +20 -20
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/index.js +11 -11
- package/dist/pages/OutagesAdminPage/index.js.map +1 -1
- package/dist/pages/RouterErrorPage/index.js +4 -4
- package/dist/pages/UsersAdminPage/index.js +34 -34
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/setup/setup.js +4 -4
- package/dist/setup/setup.js.map +1 -1
- package/dist/stores/oidcStore/oidcStore.d.ts +1 -1
- package/dist/theme/demoTheme/index.js +15 -7
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/dist/utils/StandardConfigUtil/index.js +2 -2
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/package.json +33 -37
- package/dist/models/theme.models.d.ts +0 -20
- package/dist/models/theme.models.js +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { n as e, t } from "../../../_chunks/rolldown-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { a as n, t as r } from "../../../_chunks/isObject.js";
|
|
3
|
+
import { t as i } from "../../../_chunks/isSymbol.js";
|
|
4
|
+
import { AuthenticationService as a } from "../AuthenticationService/index.js";
|
|
5
|
+
import { LogService as o } from "../LogService/index.js";
|
|
6
|
+
import { TimeUtil as s } from "../../../utils/TimeUtil/index.js";
|
|
7
|
+
import { CONFIG_TOKEN as c } from "../../../constants/config.constants.js";
|
|
8
|
+
import { t as l } from "../../../_chunks/decorateParam.js";
|
|
9
|
+
import { t as u } from "../../../_chunks/decorate.js";
|
|
10
10
|
import { inject as d, singleton as f } from "tsyringe";
|
|
11
11
|
import { CommonDbLogLevel as p } from "@gen-epix/api-commondb";
|
|
12
12
|
import { Subject as m } from "@gen-epix/ui-core/classes/Subject";
|
|
13
13
|
import { SubscribableAbstract as h } from "@gen-epix/ui-core/classes/abstracts/SubscribableAbstract";
|
|
14
14
|
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js
|
|
15
15
|
var g = /* @__PURE__ */ t(((e, t) => {
|
|
16
|
-
var
|
|
16
|
+
var r = n();
|
|
17
17
|
t.exports = function() {
|
|
18
|
-
return
|
|
18
|
+
return r.Date.now();
|
|
19
19
|
};
|
|
20
20
|
})), _ = /* @__PURE__ */ t(((e, t) => {
|
|
21
21
|
var n = /\s/;
|
|
@@ -31,26 +31,26 @@ var g = /* @__PURE__ */ t(((e, t) => {
|
|
|
31
31
|
}
|
|
32
32
|
t.exports = i;
|
|
33
33
|
})), y = /* @__PURE__ */ t(((e, t) => {
|
|
34
|
-
var n = v(),
|
|
34
|
+
var n = v(), a = r(), o = i(), s = NaN, c = /^[-+]0x[0-9a-f]+$/i, l = /^0b[01]+$/i, u = /^0o[0-7]+$/i, d = parseInt;
|
|
35
35
|
function f(e) {
|
|
36
36
|
if (typeof e == "number") return e;
|
|
37
37
|
if (o(e)) return s;
|
|
38
|
-
if (
|
|
38
|
+
if (a(e)) {
|
|
39
39
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
40
|
-
e =
|
|
40
|
+
e = a(t) ? t + "" : t;
|
|
41
41
|
}
|
|
42
42
|
if (typeof e != "string") return e === 0 ? e : +e;
|
|
43
43
|
e = n(e);
|
|
44
|
-
var
|
|
45
|
-
return
|
|
44
|
+
var r = l.test(e);
|
|
45
|
+
return r || u.test(e) ? d(e.slice(2), r ? 2 : 8) : c.test(e) ? s : +e;
|
|
46
46
|
}
|
|
47
47
|
t.exports = f;
|
|
48
48
|
})), b = /* @__PURE__ */ t(((e, t) => {
|
|
49
|
-
var n =
|
|
50
|
-
function l(e, t,
|
|
49
|
+
var n = r(), i = g(), a = y(), o = "Expected a function", s = Math.max, c = Math.min;
|
|
50
|
+
function l(e, t, r) {
|
|
51
51
|
var l, u, d, f, p, m, h = 0, g = !1, _ = !1, v = !0;
|
|
52
52
|
if (typeof e != "function") throw TypeError(o);
|
|
53
|
-
t = a(t) || 0, n(
|
|
53
|
+
t = a(t) || 0, n(r) && (g = !!r.leading, _ = "maxWait" in r, d = _ ? s(a(r.maxWait) || 0, t) : d, v = "trailing" in r ? !!r.trailing : v);
|
|
54
54
|
function y(t) {
|
|
55
55
|
var n = l, r = u;
|
|
56
56
|
return l = u = void 0, h = t, f = e.apply(r, n), f;
|
|
@@ -67,7 +67,7 @@ var g = /* @__PURE__ */ t(((e, t) => {
|
|
|
67
67
|
return m === void 0 || n >= t || n < 0 || _ && r >= d;
|
|
68
68
|
}
|
|
69
69
|
function C() {
|
|
70
|
-
var e =
|
|
70
|
+
var e = i();
|
|
71
71
|
if (S(e)) return w(e);
|
|
72
72
|
p = setTimeout(C, x(e));
|
|
73
73
|
}
|
|
@@ -78,10 +78,10 @@ var g = /* @__PURE__ */ t(((e, t) => {
|
|
|
78
78
|
p !== void 0 && clearTimeout(p), h = 0, l = m = u = p = void 0;
|
|
79
79
|
}
|
|
80
80
|
function E() {
|
|
81
|
-
return p === void 0 ? f : w(
|
|
81
|
+
return p === void 0 ? f : w(i());
|
|
82
82
|
}
|
|
83
83
|
function D() {
|
|
84
|
-
var e =
|
|
84
|
+
var e = i(), n = S(e);
|
|
85
85
|
if (l = arguments, u = this, m = e, n) {
|
|
86
86
|
if (p === void 0) return b(m);
|
|
87
87
|
if (_) return clearTimeout(p), p = setTimeout(C, t), y(m);
|
|
@@ -92,11 +92,11 @@ var g = /* @__PURE__ */ t(((e, t) => {
|
|
|
92
92
|
}
|
|
93
93
|
t.exports = l;
|
|
94
94
|
})), x = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
95
|
-
var n = b(),
|
|
96
|
-
function o(e, t,
|
|
95
|
+
var n = b(), i = r(), a = "Expected a function";
|
|
96
|
+
function o(e, t, r) {
|
|
97
97
|
var o = !0, s = !0;
|
|
98
98
|
if (typeof e != "function") throw TypeError(a);
|
|
99
|
-
return r
|
|
99
|
+
return i(r) && (o = "leading" in r ? !!r.leading : o, s = "trailing" in r ? !!r.trailing : s), n(e, t, {
|
|
100
100
|
leading: o,
|
|
101
101
|
maxWait: t,
|
|
102
102
|
trailing: s
|
|
@@ -157,19 +157,19 @@ var g = /* @__PURE__ */ t(((e, t) => {
|
|
|
157
157
|
idleDiff: this.idleDiff,
|
|
158
158
|
isIdle: this.isIdle,
|
|
159
159
|
notificationDiff: this.notificationDiff,
|
|
160
|
-
readableIdleDiff:
|
|
161
|
-
readableNotificationDiff:
|
|
160
|
+
readableIdleDiff: s.getReadableTimeRemaining(this.idleDiff),
|
|
161
|
+
readableNotificationDiff: s.getReadableTimeRemaining(this.notificationDiff)
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
onActivity() {
|
|
165
165
|
this.isIdle || (this.idleSince = Date.now());
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
|
-
S =
|
|
168
|
+
S = u([
|
|
169
169
|
f(),
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
l(0, d(c)),
|
|
171
|
+
l(1, d(o)),
|
|
172
|
+
l(2, d(a))
|
|
173
173
|
], S);
|
|
174
174
|
export { S as InactivityService };
|
|
175
175
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["throttle","_decorate","_decorateParam","__toESM","require__root","require_isObject","require_isSymbol","__decorateParam","__decorate","require_now","root","require__trimmedEndIndex","reWhitespace","trimmedEndIndex","index","string","require__baseTrim","reTrimStart","baseTrim","require_toNumber","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","require_debounce","now","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","func","wait","options","invokeFunc","args","thisArg","time","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","import_throttle","__commonJSMin","throttle","\"leading\"","\"maxWait\"","\"trailing\"","InactivityService","SubscribableAbstract","Subject","logService","authenticationService","config","event","ALLOWED_IDLE_TIME_MS","notificationEndTime","NOTIFICATION_TIME_MS","CommonDbLogLevel","TimeUtil","singleton","inject","CONFIG_TOKEN","LogService","AuthenticationService"],"sources":["../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js","../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_trimmedEndIndex.js","../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTrim.js","../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toNumber.js","../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js","../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/throttle.js","../../../../src/classes/services/InactivityService/InactivityService.ts"],"sourcesContent":["var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","import throttle from 'lodash/throttle';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\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 { AuthenticationService } from '../AuthenticationService';\nimport { LogService } from '../LogService';\nimport { TimeUtil } from '../../../utils/TimeUtil';\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\nexport type InactivityState = {\n idleDiff: number;\n isIdle: boolean;\n notificationDiff: number;\n readableIdleDiff: string;\n readableNotificationDiff: string;\n};\n\n@singleton()\nexport class InactivityService extends SubscribableAbstract<InactivityState> {\n private readonly authenticationService: AuthenticationService;\n\n private idleDiff: number = 0;\n private idleSince: number = Date.now();\n private isIdle: boolean = false;\n private isPaused: boolean = false;\n private readonly logService: LogService;\n private notificationDiff: number = 0;\n private readonly onActivityDebounced: () => void;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(LogService) logService: LogService,\n @inject(AuthenticationService) authenticationService: AuthenticationService,\n ) {\n super(new Subject<InactivityState>({\n idleDiff: 0,\n isIdle: false,\n notificationDiff: 0,\n readableIdleDiff: '',\n readableNotificationDiff: '',\n }));\n this.logService = logService;\n this.authenticationService = authenticationService;\n\n this.onActivityDebounced = throttle(this.onActivity.bind(this), 1000, {\n leading: true,\n trailing: true,\n });\n\n const { ALLOWED_IDLE_TIME_MS, NOTIFICATION_TIME_MS } = config.userInactivityConfirmation;\n ['mousemove', 'keydown', 'scroll'].forEach((event) => window.addEventListener(event, this.onActivityDebounced));\n\n setInterval(() => {\n if (this.idleSince > 0 && (Date.now() - ALLOWED_IDLE_TIME_MS) > this.idleSince && !this.isPaused) {\n this.idleDiff = Date.now() - this.idleSince;\n this.isIdle = true;\n\n const notificationEndTime = this.idleSince + ALLOWED_IDLE_TIME_MS + NOTIFICATION_TIME_MS;\n this.notificationDiff = notificationEndTime - Date.now();\n\n if (this.notificationDiff < 0) {\n this.logout();\n }\n\n this.doNext();\n }\n }, 500);\n }\n\n\n public logout(): void {\n this.logService.log([{\n detail: this.authenticationService.authContextProps.user,\n level: CommonDbLogLevel.TRACE,\n topic: 'USER_LOGOUT_BY_INACTIVITY',\n }]);\n this.logService.flushLog();\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.authenticationService.authContextProps.signoutRedirect();\n }\n\n public pause(): void {\n this.isPaused = true;\n this.reset();\n }\n\n public reset(): void {\n this.idleSince = Date.now();\n this.isIdle = false;\n this.idleDiff = 0;\n this.notificationDiff = 0;\n this.doNext();\n }\n\n public resume(): void {\n this.isPaused = false;\n this.reset();\n }\n\n private doNext(): void {\n this.next({\n idleDiff: this.idleDiff,\n isIdle: this.isIdle,\n notificationDiff: this.notificationDiff,\n readableIdleDiff: TimeUtil.getReadableTimeRemaining(this.idleDiff),\n readableNotificationDiff: TimeUtil.getReadableTimeRemaining(this.notificationDiff),\n });\n }\n\n private onActivity(): void {\n if (this.isIdle) {\n return;\n }\n this.idleSince = Date.now();\n }\n\n}\n"],"ignoreList":[0,1,2,3,4,5],"mappings":";;;;;;;;;;;;;;;CAAA,IAAIU,IAAAN,EAAA;CAsBJ,EAAO,UAAU,WAJI;EACnB,OAAOM,EAAK,KAAK,IAAI;CACvB;;CCnBA,IAAIE,IAAe;CAUnB,SAASC,EAAgB,GAAQ;EAG/B,KAFA,IAAIC,IAAQC,EAAO,QAEZ,OAAWH,EAAa,KAAKG,EAAO,OAAOD,CAAK,CAAC;EACxD,OAAOA;CACT;CAEA,EAAO,UAAUD;;CClBjB,IAAIA,IAAAF,EAAA,GAGAM,IAAc;CASlB,SAASC,EAAS,GAAQ;EACxB,OAAOH,KACHA,EAAO,MAAM,GAAGF,EAAgBE,CAAM,IAAI,CAAC,CAAC,CAAC,QAAQE,GAAa,EAAE;CAE1E;CAEA,EAAO,UAAUC;;CClBjB,IAAIA,IAAAF,EAAA,GACAI,IAAAf,EAAA,GACAgB,IAAAf,EAAA,GAGAgB,IAAM,KAGNC,IAAa,sBAGbC,IAAa,cAGbC,IAAY,eAGZC,IAAe;CAyBnB,SA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IAAwB,KAAK,aAAa,CAAC,KAAK,UAAU;IAEhG,AADA,KAAK,WAAW,KAAK,IAAI,IAAI,KAAK,WAClC,KAAK,SAAS;IAEd,IAAMC,IAAsB,KAAK,YAAYD,IAAuBE;IAOpE,AANA,KAAK,mBAAmBD,IAAsB,KAAK,IAAI,GAEnD,KAAK,mBAAmB,KAC1B,KAAK,OAAO,GAGd,KAAK,OAAO;GACd;EACF,GAAG,GAAG;CACR;CAGA,SAAsB;EAQpB,AAPA,KAAK,WAAW,IAAI,CAAC;GACnB,QAAQ,KAAK,sBAAsB,iBAAiB;GACpD,OAAOE,EAAiB;GACxB,OAAO;EACT,CAAC,CAAC,GACF,KAAK,WAAW,SAAS,GAEzB,KAAK,sBAAsB,iBAAiB,gBAAgB;CAC9D;CAEA,QAAqB;EAEnB,AADA,KAAK,WAAW,IAChB,KAAK,MAAM;CACb;CAEA,QAAqB;EAKnB,AAJA,KAAK,YAAY,KAAK,IAAI,GAC1B,KAAK,SAAS,IACd,KAAK,WAAW,GAChB,KAAK,mBAAmB,GACxB,KAAK,OAAO;CACd;CAEA,SAAsB;EAEpB,AADA,KAAK,WAAW,IAChB,KAAK,MAAM;CACb;CAEA,SAAuB;EACrB,KAAK,KAAK;GACR,UAAU,KAAK;GACf,QAAQ,KAAK;GACb,kBAAkB,KAAK;GACvB,kBAAkBC,EAAS,yBAAyB,KAAK,QAAQ;GACjE,0BAA0BA,EAAS,yBAAyB,KAAK,gBAAgB;EACnF,CAAC;CACH;CAEA,aAA2B;EACzB,AAAI,KAAK,WAGT,KAAK,YAAY,KAAK,IAAI;CAC5B;AAEF;;CAnGCC,EAAU;CAaNlF,EAAA,GAAAmF,EAAOC,CAAY,CAAA;CACnBpF,EAAA,GAAAmF,EAAOE,CAAU,CAAA;CACjBrF,EAAA,GAAAmF,EAAOG,CAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["throttle","_decorateParam","__toESM","require__root","require_isObject","require_isSymbol","__decorateParam","__decorate","require_now","root","require__trimmedEndIndex","reWhitespace","trimmedEndIndex","index","string","require__baseTrim","reTrimStart","baseTrim","require_toNumber","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","require_debounce","now","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","func","wait","options","invokeFunc","args","thisArg","time","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","import_throttle","__commonJSMin","throttle","\"leading\"","\"maxWait\"","\"trailing\"","InactivityService","SubscribableAbstract","Subject","logService","authenticationService","config","event","ALLOWED_IDLE_TIME_MS","notificationEndTime","NOTIFICATION_TIME_MS","CommonDbLogLevel","TimeUtil","singleton","inject","CONFIG_TOKEN","LogService","AuthenticationService"],"sources":["../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js","../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_trimmedEndIndex.js","../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTrim.js","../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toNumber.js","../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js","../../../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/throttle.js","../../../../src/classes/services/InactivityService/InactivityService.ts"],"sourcesContent":["var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","import throttle from 'lodash/throttle';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\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 { AuthenticationService } from '../AuthenticationService';\nimport { LogService } from '../LogService';\nimport { TimeUtil } from '../../../utils/TimeUtil';\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\nexport type InactivityState = {\n idleDiff: number;\n isIdle: boolean;\n notificationDiff: number;\n readableIdleDiff: string;\n readableNotificationDiff: string;\n};\n\n@singleton()\nexport class InactivityService extends SubscribableAbstract<InactivityState> {\n private readonly authenticationService: AuthenticationService;\n\n private idleDiff: number = 0;\n private idleSince: number = Date.now();\n private isIdle: boolean = false;\n private isPaused: boolean = false;\n private readonly logService: LogService;\n private notificationDiff: number = 0;\n private readonly onActivityDebounced: () => void;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(LogService) logService: LogService,\n @inject(AuthenticationService) authenticationService: AuthenticationService,\n ) {\n super(new Subject<InactivityState>({\n idleDiff: 0,\n isIdle: false,\n notificationDiff: 0,\n readableIdleDiff: '',\n readableNotificationDiff: '',\n }));\n this.logService = logService;\n this.authenticationService = authenticationService;\n\n this.onActivityDebounced = throttle(this.onActivity.bind(this), 1000, {\n leading: true,\n trailing: true,\n });\n\n const { ALLOWED_IDLE_TIME_MS, NOTIFICATION_TIME_MS } = config.userInactivityConfirmation;\n ['mousemove', 'keydown', 'scroll'].forEach((event) => window.addEventListener(event, this.onActivityDebounced));\n\n setInterval(() => {\n if (this.idleSince > 0 && (Date.now() - ALLOWED_IDLE_TIME_MS) > this.idleSince && !this.isPaused) {\n this.idleDiff = Date.now() - this.idleSince;\n this.isIdle = true;\n\n const notificationEndTime = this.idleSince + ALLOWED_IDLE_TIME_MS + NOTIFICATION_TIME_MS;\n this.notificationDiff = notificationEndTime - Date.now();\n\n if (this.notificationDiff < 0) {\n this.logout();\n }\n\n this.doNext();\n }\n }, 500);\n }\n\n\n public logout(): void {\n this.logService.log([{\n detail: this.authenticationService.authContextProps.user,\n level: CommonDbLogLevel.TRACE,\n topic: 'USER_LOGOUT_BY_INACTIVITY',\n }]);\n this.logService.flushLog();\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.authenticationService.authContextProps.signoutRedirect();\n }\n\n public pause(): void {\n this.isPaused = true;\n this.reset();\n }\n\n public reset(): void {\n this.idleSince = Date.now();\n this.isIdle = false;\n this.idleDiff = 0;\n this.notificationDiff = 0;\n this.doNext();\n }\n\n public resume(): void {\n this.isPaused = false;\n this.reset();\n }\n\n private doNext(): void {\n this.next({\n idleDiff: this.idleDiff,\n isIdle: this.isIdle,\n notificationDiff: this.notificationDiff,\n readableIdleDiff: TimeUtil.getReadableTimeRemaining(this.idleDiff),\n readableNotificationDiff: TimeUtil.getReadableTimeRemaining(this.notificationDiff),\n });\n }\n\n private onActivity(): void {\n if (this.isIdle) {\n return;\n }\n this.idleSince = Date.now();\n }\n\n}\n"],"ignoreList":[0,1,2,3,4,5],"mappings":";;;;;;;;;;;;;;;CAAA,IAAIS,IAAAN,EAAA;CAsBJ,EAAO,UAAU,WAJI;EACnB,OAAOM,EAAK,KAAK,IAAI;CACvB;;CCnBA,IAAIE,IAAe;CAUnB,SAASC,EAAgB,GAAQ;EAG/B,KAFA,IAAIC,IAAQC,EAAO,QAEZ,OAAWH,EAAa,KAAKG,EAAO,OAAOD,CAAK,CAAC;EACxD,OAAOA;CACT;CAEA,EAAO,UAAUD;;CClBjB,IAAIA,IAAAF,EAAA,GAGAM,IAAc;CASlB,SAASC,EAAS,GAAQ;EACxB,OAAOH,KACHA,EAAO,MAAM,GAAGF,EAAgBE,CAAM,IAAI,CAAC,CAAC,CAAC,QAAQE,GAAa,EAAE;CAE1E;CAEA,EAAO,UAAUC;;CClBjB,IAAIA,IAAAF,EAAA,GACAI,IAAAf,EAAA,GACAgB,IAAAf,EAAA,GAGAgB,IAAM,KAGNC,IAAa,sBAGbC,IAAa,cAGbC,IAAY,eAGZC,IAAe;CAyBnB,SAASC,EAAS,GAAO;EACvB,IAAI,OAAOC,KAAS,UAClB,OAAOA;EAET,IAAIP,EAASO,CAAK,GAChB,OAAON;EAET,IAAIF,EAASQ,CAAK,GAAG;GACnB,IAAIC,IAAQ,OAAOD,EAAM,WAAW,aAAaA,EAAM,QAAQ,IAAIA;GACnE,IAAQR,EAASS,CAAK,IAAKA,IAAQ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,OAAO,GAGd,KAAK,OAAO;GACd;EACF,GAAG,GAAG;CACR;CAGA,SAAsB;EAQpB,AAPA,KAAK,WAAW,IAAI,CAAC;GACnB,QAAQ,KAAK,sBAAsB,iBAAiB;GACpD,OAAOE,EAAiB;GACxB,OAAO;EACT,CAAC,CAAC,GACF,KAAK,WAAW,SAAS,GAEzB,KAAK,sBAAsB,iBAAiB,gBAAgB;CAC9D;CAEA,QAAqB;EAEnB,AADA,KAAK,WAAW,IAChB,KAAK,MAAM;CACb;CAEA,QAAqB;EAKnB,AAJA,KAAK,YAAY,KAAK,IAAI,GAC1B,KAAK,SAAS,IACd,KAAK,WAAW,GAChB,KAAK,mBAAmB,GACxB,KAAK,OAAO;CACd;CAEA,SAAsB;EAEpB,AADA,KAAK,WAAW,IAChB,KAAK,MAAM;CACb;CAEA,SAAuB;EACrB,KAAK,KAAK;GACR,UAAU,KAAK;GACf,QAAQ,KAAK;GACb,kBAAkB,KAAK;GACvB,kBAAkBC,EAAS,yBAAyB,KAAK,QAAQ;GACjE,0BAA0BA,EAAS,yBAAyB,KAAK,gBAAgB;EACnF,CAAC;CACH;CAEA,aAA2B;EACzB,AAAI,KAAK,WAGT,KAAK,YAAY,KAAK,IAAI;CAC5B;AAEF;;CAnGCC,EAAU;CAaNlF,EAAA,GAAAmF,EAAOC,CAAY,CAAA;CACnBpF,EAAA,GAAAmF,EAAOE,CAAU,CAAA;CACjBrF,EAAA,GAAAmF,EAAOG,CAAqB,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as i } from "../../../_chunks/
|
|
6
|
-
import {
|
|
1
|
+
import { API_SYSTEM_TOKEN as e } from "../../../constants/api.constants.js";
|
|
2
|
+
import { AuthenticationService as t } from "../AuthenticationService/index.js";
|
|
3
|
+
import { AxiosUtil as n } from "../../../utils/AxiosUtil/index.js";
|
|
4
|
+
import { CONFIG_TOKEN as r } from "../../../constants/config.constants.js";
|
|
5
|
+
import { t as i } from "../../../_chunks/decorateParam.js";
|
|
6
|
+
import { t as a } from "../../../_chunks/decorate.js";
|
|
7
7
|
import { inject as o, singleton as s } from "tsyringe";
|
|
8
8
|
import { StringUtil as c } from "@gen-epix/ui-core/utils/StringUtil";
|
|
9
9
|
import { CommonDbLogLevel as l } from "@gen-epix/api-commondb";
|
|
@@ -64,13 +64,13 @@ var d = class {
|
|
|
64
64
|
}
|
|
65
65
|
onResponseRejected(e) {
|
|
66
66
|
if (u(e)) {
|
|
67
|
-
let
|
|
68
|
-
if (
|
|
69
|
-
typeof
|
|
67
|
+
let t = e.config?.headers.get("X-REQUEST-ID");
|
|
68
|
+
if (n.isAxiosCanceledError(e)) {
|
|
69
|
+
typeof t == "string" && this.requestMap.delete(t);
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
|
-
let r = typeof
|
|
73
|
-
typeof
|
|
72
|
+
let r = typeof t == "string" ? this.requestMap.get(t) : void 0, i = r === void 0 ? void 0 : Date.now() - r;
|
|
73
|
+
typeof t == "string" && this.requestMap.delete(t), this.log([{
|
|
74
74
|
detail: {
|
|
75
75
|
requestParams: e.config?.params,
|
|
76
76
|
responseData: e.response?.data,
|
|
@@ -93,11 +93,11 @@ var d = class {
|
|
|
93
93
|
}), this.logItems = []));
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
d =
|
|
96
|
+
d = a([
|
|
97
97
|
s(),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
i(0, o(r)),
|
|
99
|
+
i(1, o(t)),
|
|
100
|
+
i(2, o(e))
|
|
101
101
|
], d);
|
|
102
102
|
export { d as LogService };
|
|
103
103
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_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,IAAMG,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;CAGA,WAAwB;EACtB,KAAK,QAAQ;CACf;CAEA,IAAW,GAA+B;EACxC,IAAMG,qBAAY,IAAI,KAAK,EAAA,CAAE,YAAY,GACnCC,IAAmB,KAAK,OAAO,mBAAmB;EACxD,KAAK,SAAS,KAAK,GAAGC,EAAM,KAA6B,OAChD;GACL,YAAYC,EAAW,WAAW;GAClC,QAAQC,EAAK,WAAW,KAAA,KAAaA,EAAK,WAAW,OAAO,OAAO,KAAK,UAAUA,EAAK,MAAM;GAC7F,UAAUA,EAAK,YAAY;GAC3B,OAAOA,EAAK;GACZ;GACA;GACA,OAAOA,EAAK,SAAS;EACvB,EACD,CAAC;CACJ;CAEA,UAAiB,GAAiE;EAChF,IAAIC,EAAQ,QAAQ,IAAI,cAAc,GACpC,OAAOA;EAET,IAAMC,IAAYH,EAAW,WAAW;EAcxC,OAbAE,EAAQ,QAAQ,IAAI,gBAAgBC,CAAS,GAC7C,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ACR,QAAQ;KACN,eAAeM,EAAM,QAAQ;KAC7B,cAAcA,EAAM,UAAU;KAC9B,QAAQA,EAAM,UAAU;KACxB,KAAKA,EAAM,QAAQ;IACrB;IACA;IACA,OAAOL,EAAiB;IACxB,OAAO;GACT,CAAC,CAAC;EACJ,OACE,KAAK,IAAI,CAAC;GACR,QAAQ,EACN,OAAOK,aAAiB,QAAQA,EAAM,UAAUA,EAClD;GACA,OAAOL,EAAiB;GACxB,OAAO;EACT,CAAC,CAAC;CAEN;CAEA,UAAwB;EACtB,AAAK,KAAK,SAAS,UAAW,KAAK,uBAAuB,kBAAkB,oBAGxE,SAAS,SAAS,KAAK,SAAS,mBAAmB,MAGvD,KAAK,UAAU,IAAI,EACjB,WAAW,KAAK,SAClB,GAAG,EACD,SAAS,EACP,gBAAgB,IAClB,EACF,CAAC,CAAC,CAAC,OAAO,MAAmB;GAC3B,QAAQ,MAAM,uBAAuBK,CAAK;EAC5C,CAAC,GACD,KAAK,WAAW,CAAC;CACnB;AACF;;CAjJCE,EAAU;CAUNrB,EAAA,GAAAsB,EAAOC,CAAY,CAAA;CACnBvB,EAAA,GAAAsB,EAAOE,CAAqB,CAAA;CAC5BxB,EAAA,GAAAsB,EAAOG,CAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_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,IAAME,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"}
|
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { t as e } from "../../../_chunks/QueryClientProvider.js";
|
|
2
|
+
import { API_BASE_TOKEN as t } from "../../../constants/api.constants.js";
|
|
3
|
+
import { BackendVersionService as n } from "../../../classes/services/BackendVersionService/index.js";
|
|
4
|
+
import { t as r } from "../../../_chunks/QueryClientService.js";
|
|
5
|
+
import { ErrorPage as i } from "../../../pages/ErrorPage/index.js";
|
|
6
|
+
import { EmotionCacheService as a } from "../../../classes/services/EmotionCacheService/index.js";
|
|
7
|
+
import { AuthenticationService as o } from "../../../classes/services/AuthenticationService/index.js";
|
|
8
|
+
import { LogService as s } from "../../../classes/services/LogService/index.js";
|
|
9
|
+
import { ApplicationBootstrapWithoutAuthorization as c } from "../ApplicationBootstrapWithoutAuthorization/index.js";
|
|
10
|
+
import { RouterService as l } from "../../../classes/services/RouterService/index.js";
|
|
11
|
+
import { useConfig as u } from "../../../hooks/useConfig/index.js";
|
|
12
12
|
import { container as d } from "tsyringe";
|
|
13
13
|
import { CssBaseline as f, ThemeProvider as p } from "@mui/material";
|
|
14
14
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
15
15
|
import { RouterProvider as g } from "react-router-dom";
|
|
16
16
|
import { CacheProvider as _ } from "@emotion/react";
|
|
17
17
|
import { ErrorBoundary as v } from "react-error-boundary";
|
|
18
|
+
import { useOsxScrollbarAlwaysVisible as y } from "@gen-epix/ui-core/hooks/useOsxScrollbarAlwaysVisible";
|
|
18
19
|
// src/components/app/AppRouterProvider/AppRouterProvider.tsx
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
var b = () => /* @__PURE__ */ m(g, { router: d.resolve(l).router }), x = () => {
|
|
21
|
+
y();
|
|
22
|
+
let l = u(), g = d.resolve(o), x = d.resolve(s), S = l.getTouchIconUrl();
|
|
23
|
+
S && document.querySelector("link[rel=\"icon\"]")?.setAttribute("href", S);
|
|
24
|
+
let C = d.resolve(t);
|
|
25
|
+
C.baseUrl = l.getAPIBaseUrl(), C.defaultRequestTimeout = l.defaultRequestTimeout, C.onRequest = [g.onRequest.bind(g), x.onRequest.bind(x)], C.onResponseFulfilled = [x.onResponseFulfilled.bind(x), d.resolve(n).onResponseFulfilled.bind(d.resolve(n))], C.onResponseRejected = [x.onResponseRejected.bind(x), g.onResponseRejected.bind(g)];
|
|
26
|
+
let w = d.resolve(r), T = d.resolve(a).emotionCache;
|
|
27
|
+
return /* @__PURE__ */ m(e, {
|
|
28
|
+
client: w.queryClient,
|
|
27
29
|
children: /* @__PURE__ */ m(_, {
|
|
28
|
-
value:
|
|
30
|
+
value: T,
|
|
29
31
|
children: /* @__PURE__ */ h(p, {
|
|
30
|
-
theme:
|
|
32
|
+
theme: l.theme,
|
|
31
33
|
children: [/* @__PURE__ */ m(f, {}), /* @__PURE__ */ m(v, {
|
|
32
|
-
FallbackComponent:
|
|
33
|
-
children: /* @__PURE__ */ m(
|
|
34
|
+
FallbackComponent: i,
|
|
35
|
+
children: /* @__PURE__ */ m(c, { children: /* @__PURE__ */ m(b, {}) })
|
|
34
36
|
})]
|
|
35
37
|
})
|
|
36
38
|
})
|
|
37
39
|
});
|
|
38
40
|
};
|
|
39
|
-
export {
|
|
41
|
+
export { x as App };
|
|
40
42
|
|
|
41
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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';\nimport { useOsxScrollbarAlwaysVisible } from '@gen-epix/ui-core/hooks/useOsxScrollbarAlwaysVisible';\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 useOsxScrollbarAlwaysVisible();\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,kBAACC,GAAD,EAAgB,QAAQC,EAAU,QAAQC,CAAa,CAAC,CAAC,OAAS,CAAA,GCqB5FC,UAAY;CACvB,EAA6B;CAC7B,IAAMC,IAASC,EAAU,GAEnBC,IAAwBL,EAAU,QAAQM,CAAqB,GAC/DC,IAAaP,EAAU,QAAQQ,CAAU,GACzCC,IAAeN,EAAO,gBAAgB;CAC5C,AAAIM,KACF,SAAS,cAAc,oBAAkB,CAAC,EAAE,aAAa,QAAQA,CAAY;CAE/E,IAAMC,IAAMV,EAAU,QAAQW,CAAc;CAW5C,AAVA,EAAI,UAAUR,EAAO,cAAc,GACnC,EAAI,wBAAwBA,EAAO,uBACnC,EAAI,YAAY,CACdE,EAAsB,UAAU,KAAKA,CAAqB,GAC1DE,EAAW,UAAU,KAAKA,CAAU,CACtC,GACA,EAAI,sBAAsB,CACxBA,EAAW,oBAAoB,KAAKA,CAAU,GAC9CP,EAAU,QAAQY,CAAqB,CAAC,CAAC,oBAAoB,KAAKZ,EAAU,QAAQY,CAAqB,CAAC,CAC5G,GACA,EAAI,qBAAqB,CACvBL,EAAW,mBAAmB,KAAKA,CAAU,GAC7CF,EAAsB,mBAAmB,KAAKA,CAAqB,CACrE;CAEA,IAAMQ,IAAqBb,EAAU,QAAQH,CAAkB,GACzDiB,IAAed,EAAU,QAAQe,CAAmB,CAAC,CAAC;CAE5D,OACE,kBAACnB,GAAD;EAAqB,QAAQiB,EAAmB;EAC9C,UAAA,kBAACG,GAAD;GAAe,OAAOF;GACpB,UAAA,kBAACG,GAAD;IAAe,OAAOd,EAAO;IAA7B,UAAA,CACE,kBAACe,GAAD,CAAc,CAAA,GACd,kBAACC,GAAD;KAAe,mBAAmBC;KAChC,UAAA,kBAACC,GAAD,EAAA,UACE,kBAACvB,GAAD,CAAoB,CAAA,EACoB,CAAA;IAC7B,CAAA,CACF;;EACF,CAAA;CACI,CAAA;AAEzB"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as e } from "../../../_chunks/
|
|
2
|
-
import { t } from "../../../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as o } from "../../../_chunks/useQueryMemo.js";
|
|
8
|
-
import { t as s } from "../../../_chunks/QueryClientService.js";
|
|
9
|
-
import { COMMON_QUERY_KEY as c } from "../../../constants/query.constants.js";
|
|
10
|
-
import { t as l } from "../../../_chunks/OutageList.js";
|
|
1
|
+
import { t as e } from "../../../_chunks/react.js";
|
|
2
|
+
import { API_SYSTEM_TOKEN as t } from "../../../constants/api.constants.js";
|
|
3
|
+
import { t as n } from "../../../_chunks/useQueryMemo.js";
|
|
4
|
+
import { outagesStore as r } from "../../../stores/outagesStore/index.js";
|
|
5
|
+
import { t as i } from "../../../_chunks/OutageUtil.js";
|
|
6
|
+
import { t as a } from "../../../_chunks/QueryClientService.js";
|
|
11
7
|
import "../../ui/OutageList/index.js";
|
|
8
|
+
import { PageContainer as o } from "../../ui/PageContainer/index.js";
|
|
9
|
+
import { ResponseHandler as s } from "../../ui/ResponseHandler/index.js";
|
|
10
|
+
import { t as c } from "../../../_chunks/OutageList.js";
|
|
11
|
+
import { COMMON_QUERY_KEY as l } from "../../../constants/query.constants.js";
|
|
12
12
|
import { container as u } from "tsyringe";
|
|
13
13
|
import { WindowService as d } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
14
14
|
import { Box as f, Button as p } from "@mui/material";
|
|
@@ -19,13 +19,13 @@ 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
|
// src/components/app/ApplicationBootstrapWithAuthentication/ApplicationBootstrapWithAuthentication.tsx
|
|
21
21
|
var C = ({ children: C }) => {
|
|
22
|
-
let { t: w } = b(), T =
|
|
22
|
+
let { t: w } = b(), T = e(r, (e) => e.setCategorizedOutages), [E, D] = _(!1), [O, k] = _(!1), A = n({
|
|
23
23
|
gcTime: Infinity,
|
|
24
|
-
queryFn: async ({ signal: e }) => (await u.resolve(
|
|
25
|
-
queryKey: u.resolve(
|
|
24
|
+
queryFn: async ({ signal: e }) => (await u.resolve(t).retrieveOutages({ signal: e })).data,
|
|
25
|
+
queryKey: u.resolve(a).getGenericKey(l.OUTAGES),
|
|
26
26
|
refetchInterval: 3e5,
|
|
27
27
|
staleTime: Infinity
|
|
28
|
-
}), j = S([A]), M = g(() =>
|
|
28
|
+
}), j = S([A]), M = g(() => i.getCategorizedOutages(A.data ?? []), [A.data]), N = m(() => {
|
|
29
29
|
u.resolve(d).window.location.reload();
|
|
30
30
|
}, []), P = m(() => {
|
|
31
31
|
D(!0);
|
|
@@ -38,11 +38,11 @@ var C = ({ children: C }) => {
|
|
|
38
38
|
return () => {
|
|
39
39
|
e.window.clearTimeout(t);
|
|
40
40
|
};
|
|
41
|
-
}, [M, T]), !E && !A.isLoading && !A.error && M.activeOutages?.length > 0 ? /* @__PURE__ */ y(
|
|
41
|
+
}, [M, T]), !E && !A.isLoading && !A.error && M.activeOutages?.length > 0 ? /* @__PURE__ */ y(o, {
|
|
42
42
|
singleAction: !0,
|
|
43
43
|
testIdAttributes: x.createAttributes("OutagePage"),
|
|
44
44
|
title: w`Outages`,
|
|
45
|
-
children: [/* @__PURE__ */ v(
|
|
45
|
+
children: [/* @__PURE__ */ v(c, {
|
|
46
46
|
activeOutages: M.activeOutages,
|
|
47
47
|
soonActiveOutages: M.soonActiveOutages,
|
|
48
48
|
visibleOutages: M.visibleOutages
|
|
@@ -64,12 +64,12 @@ var C = ({ children: C }) => {
|
|
|
64
64
|
children: w`Retry`
|
|
65
65
|
})]
|
|
66
66
|
})]
|
|
67
|
-
}) : A.error || A.isLoading ? /* @__PURE__ */ v(
|
|
67
|
+
}) : A.error || A.isLoading ? /* @__PURE__ */ v(o, {
|
|
68
68
|
ignorePageEvent: !0,
|
|
69
69
|
singleAction: !0,
|
|
70
70
|
testIdAttributes: x.createAttributes("OutagesLoadingPage"),
|
|
71
71
|
title: w`Outages`,
|
|
72
|
-
children: /* @__PURE__ */ v(
|
|
72
|
+
children: /* @__PURE__ */ v(s, {
|
|
73
73
|
loadables: j,
|
|
74
74
|
loadingMessage: w`Loading`,
|
|
75
75
|
children: C
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["useStore","useQueryMemo","OutageUtil","QueryClientService","OutageList","ApplicationBootstrapWithAuthentication","useTranslation","setCategorizedOutages","outagesStore","state","shouldContinue","setShouldContinue","useState","buttonsEnabled","setButtonsEnabled","outagesQuery","container","API_SYSTEM_TOKEN","COMMON_QUERY_KEY","outagesLoadables","useArray","categorizedOutages","useMemo","onRetryButtonClick","useCallback","WindowService","onContinuButtonClick","useEffect","windowService","timeout","PageContainer","TestIdUtil","Box","Button","ResponseHandler","children"],"sources":["../../../../src/components/app/ApplicationBootstrapWithAuthentication/ApplicationBootstrapWithAuthentication.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport {\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport type {\n PropsWithChildren,\n ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useStore } from 'zustand';\nimport {\n Box,\n Button,\n} from '@mui/material';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { useArray } from '@gen-epix/ui-core/hooks/useArray';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport { API_SYSTEM_TOKEN } from '../../../constants/api.constants';\nimport { useQueryMemo } from '../../../hooks/useQueryMemo';\nimport { outagesStore } from '../../../stores/outagesStore';\nimport { OutageUtil } from '../../../utils/OutageUtil';\nimport { QueryClientService } from '../../../classes/services/QueryClientService';\nimport { OutageList } from '../../ui/OutageList';\nimport { PageContainer } from '../../ui/PageContainer';\nimport { ResponseHandler } from '../../ui/ResponseHandler';\nimport { COMMON_QUERY_KEY } from '../../../constants/query.constants';\n\n\nexport const ApplicationBootstrapWithAuthentication = ({ children }: PropsWithChildren): ReactNode => {\n const { t } = useTranslation();\n\n const setCategorizedOutages = useStore(outagesStore, (state) => state.setCategorizedOutages);\n const [shouldContinue, setShouldContinue] = useState(false);\n const [buttonsEnabled, setButtonsEnabled] = useState(false);\n\n const outagesQuery = useQueryMemo({\n gcTime: Infinity,\n queryFn: async ({ signal }) => (await container.resolve(API_SYSTEM_TOKEN).retrieveOutages({ signal })).data,\n queryKey: container.resolve(QueryClientService).getGenericKey(COMMON_QUERY_KEY.OUTAGES),\n refetchInterval: 5 * 60 * 1000,\n staleTime: Infinity,\n });\n\n const outagesLoadables = useArray([outagesQuery]);\n\n const categorizedOutages = useMemo(() => {\n return OutageUtil.getCategorizedOutages(outagesQuery.data ?? []);\n }, [outagesQuery.data]);\n\n const onRetryButtonClick = useCallback(() => {\n container.resolve(WindowService).window.location.reload();\n }, []);\n\n const onContinuButtonClick = useCallback(() => {\n setShouldContinue(true);\n }, []);\n\n useEffect(() => {\n if (categorizedOutages) {\n setCategorizedOutages(categorizedOutages);\n }\n\n const windowService = container.resolve(WindowService);\n const timeout = windowService.window.setTimeout(() => {\n setButtonsEnabled(true);\n }, 5000);\n\n return () => {\n windowService.window.clearTimeout(timeout);\n };\n }, [categorizedOutages, setCategorizedOutages]);\n\n const shouldShowOutagePage = !shouldContinue && !outagesQuery.isLoading && !outagesQuery.error && categorizedOutages.activeOutages?.length > 0;\n\n if (shouldShowOutagePage) {\n return (\n <PageContainer\n singleAction\n testIdAttributes={TestIdUtil.createAttributes('OutagePage')}\n title={t`Outages`}\n >\n <OutageList\n activeOutages={categorizedOutages.activeOutages}\n soonActiveOutages={categorizedOutages.soonActiveOutages}\n visibleOutages={categorizedOutages.visibleOutages}\n />\n <Box\n sx={{\n display: 'flex',\n gap: 1,\n justifyContent: 'flex-end',\n }}\n >\n <Button\n disabled={!buttonsEnabled}\n onClick={onContinuButtonClick}\n variant={'outlined'}\n >\n {t`Continue anyway`}\n </Button>\n <Button\n disabled={!buttonsEnabled}\n onClick={onRetryButtonClick}\n variant={'contained'}\n >\n {t`Retry`}\n </Button>\n </Box>\n </PageContainer>\n );\n }\n if (outagesQuery.error || outagesQuery.isLoading) {\n return (\n <PageContainer\n ignorePageEvent\n singleAction\n testIdAttributes={TestIdUtil.createAttributes('OutagesLoadingPage')}\n title={t`Outages`}\n >\n <ResponseHandler\n loadables={outagesLoadables}\n loadingMessage={t`Loading`}\n >\n {children}\n </ResponseH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