@gen-epix/ui-client-common 4.6.1 → 4.8.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.
Files changed (146) hide show
  1. package/README.md +2 -2
  2. package/dist/_chunks/Breadcrumbs.js +4 -4
  3. package/dist/_chunks/CrudPage.js +233 -232
  4. package/dist/_chunks/CrudPage.js.map +1 -1
  5. package/dist/_chunks/GeoFilter.js +1 -0
  6. package/dist/_chunks/GeoFilter.js.map +1 -1
  7. package/dist/_chunks/Notifications.js +16 -16
  8. package/dist/_chunks/QueryClientProvider.js +1 -1
  9. package/dist/_chunks/QueryClientProvider.js.map +1 -1
  10. package/dist/_chunks/QueryClientService.js +73 -72
  11. package/dist/_chunks/QueryClientService.js.map +1 -1
  12. package/dist/_chunks/Table.js +1314 -887
  13. package/dist/_chunks/Table.js.map +1 -1
  14. package/dist/_chunks/TableUtil.js +5126 -178
  15. package/dist/_chunks/TableUtil.js.map +1 -1
  16. package/dist/_chunks/TextFilter.js +10 -6
  17. package/dist/_chunks/TextFilter.js.map +1 -1
  18. package/dist/_chunks/UserInvitationsAdminPage.js +131 -131
  19. package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
  20. package/dist/_chunks/_baseFlatten.js +12 -12
  21. package/dist/_chunks/_baseFlatten.js.map +1 -1
  22. package/dist/_chunks/_baseIteratee.js +78 -78
  23. package/dist/_chunks/_baseIteratee.js.map +1 -1
  24. package/dist/_chunks/decorate.js +1 -1
  25. package/dist/_chunks/decorateParam.js +1 -1
  26. package/dist/_chunks/middleware.js +66 -70
  27. package/dist/_chunks/middleware.js.map +1 -1
  28. package/dist/_chunks/omit.js +98 -98
  29. package/dist/_chunks/omit.js.map +1 -1
  30. package/dist/_chunks/query.js +123 -107
  31. package/dist/_chunks/query.js.map +1 -1
  32. package/dist/_chunks/react.js +1 -1
  33. package/dist/_chunks/react.js.map +1 -1
  34. package/dist/_chunks/tableStore.js +298 -275
  35. package/dist/_chunks/tableStore.js.map +1 -1
  36. package/dist/_chunks/useMutation.js +2 -2
  37. package/dist/_chunks/useMutation.js.map +1 -1
  38. package/dist/_chunks/useQueryMemo.js +15 -16
  39. package/dist/_chunks/useQueryMemo.js.map +1 -1
  40. package/dist/_chunks/vanilla.js +1 -1
  41. package/dist/_chunks/vanilla.js.map +1 -1
  42. package/dist/_chunks/yup.js +2 -2
  43. package/dist/_chunks/yup.js.map +1 -1
  44. package/dist/classes/abstracts/FilterAbstract/FilterAbstract.d.ts +11 -0
  45. package/dist/classes/abstracts/FilterAbstract/index.js +48 -3
  46. package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
  47. package/dist/classes/filters/BooleanFilter.d.ts +1 -0
  48. package/dist/classes/filters/DateFilter.d.ts +1 -1
  49. package/dist/classes/filters/GeoFilter.d.ts +1 -0
  50. package/dist/classes/filters/MultiSelectFilter.d.ts +1 -0
  51. package/dist/classes/filters/NumberRangeFilter.d.ts +1 -0
  52. package/dist/classes/filters/TextFilter.d.ts +1 -0
  53. package/dist/classes/services/AuthenticationService/index.js +8 -8
  54. package/dist/classes/services/AuthenticationService/index.js.map +1 -1
  55. package/dist/classes/services/AuthorizationService/index.js +4 -4
  56. package/dist/classes/services/AuthorizationService/index.js.map +1 -1
  57. package/dist/classes/services/BreadcrumbService/index.js +4 -4
  58. package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
  59. package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
  60. package/dist/classes/services/InactivityService/index.js +30 -30
  61. package/dist/classes/services/InactivityService/index.js.map +1 -1
  62. package/dist/classes/services/LogService/index.js +15 -15
  63. package/dist/classes/services/LogService/index.js.map +1 -1
  64. package/dist/classes/services/PageEventBusService/index.js.map +1 -1
  65. package/dist/components/app/App/index.js +27 -24
  66. package/dist/components/app/App/index.js.map +1 -1
  67. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +18 -18
  68. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
  69. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +18 -18
  70. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
  71. package/dist/components/app/AuthenticationWrapper/index.js +15 -15
  72. package/dist/components/app/AuthorizationWrapper/index.js +16 -16
  73. package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
  74. package/dist/components/app/RouterRoot/index.js +33 -33
  75. package/dist/components/app/RouterRoot/index.js.map +1 -1
  76. package/dist/components/epi/EpiContactDetailsDialog/index.js +4 -4
  77. package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
  78. package/dist/components/ui/ApplicationBar/index.js +234 -234
  79. package/dist/components/ui/ApplicationBar/index.js.map +1 -1
  80. package/dist/components/ui/GenericErrorMessage/index.js +13 -13
  81. package/dist/components/ui/LicensesDialog/index.js +6 -6
  82. package/dist/components/ui/OrganizationSwitcherDialog/index.js +11 -11
  83. package/dist/components/ui/OutagesDialog/index.js +4 -4
  84. package/dist/components/ui/OutagesDialog/index.js.map +1 -1
  85. package/dist/components/ui/PageContainer/index.js +5 -5
  86. package/dist/components/ui/PageContainer/index.js.map +1 -1
  87. package/dist/components/ui/ResponseHandler/index.js +4 -4
  88. package/dist/components/ui/SortableList/SortableList.d.ts +5 -3
  89. package/dist/components/ui/Table/Table.d.ts +5 -2
  90. package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +13 -2
  91. package/dist/components/ui/Table/TableDownloadSidebarItem.d.ts +10 -0
  92. package/dist/components/ui/Table/TableSidebarMenu.d.ts +2 -1
  93. package/dist/components/ui/Table/index.d.ts +2 -0
  94. package/dist/components/ui/Table/index.js +1 -1
  95. package/dist/components/ui/Table/useTableColumnsMenu.d.ts +6 -0
  96. package/dist/components/ui/UserFeedbackDialog/index.js +15 -15
  97. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +12 -12
  98. package/dist/dataHooks/useIdentifierIssuerQuery/index.js +11 -11
  99. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +5 -5
  100. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
  101. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +15 -15
  102. package/dist/dataHooks/useOrganizationsQuery/index.js +7 -7
  103. package/dist/dataHooks/useUsersQuery/index.js +10 -10
  104. package/dist/hooks/useCreateMutation/index.js +14 -14
  105. package/dist/hooks/useCreateMutation/index.js.map +1 -1
  106. package/dist/hooks/useDeleteMutation/index.js +17 -17
  107. package/dist/hooks/useDeleteMutation/index.js.map +1 -1
  108. package/dist/hooks/useEditMutation/index.js +22 -22
  109. package/dist/hooks/useEditMutation/index.js.map +1 -1
  110. package/dist/hooks/useInitializeTableStore/index.js +6 -6
  111. package/dist/hooks/useInitializeTableStore/index.js.map +1 -1
  112. package/dist/locale/en.json +27 -5
  113. package/dist/locale/nl.json +27 -5
  114. package/dist/models/table.models.d.ts +1 -0
  115. package/dist/models/table.models.js.map +1 -1
  116. package/dist/pages/AcceptInvitationPage/index.js +10 -10
  117. package/dist/pages/AdminPage/index.js +19 -19
  118. package/dist/pages/ChooseIdentityProviderPage/index.js +5 -5
  119. package/dist/pages/ErrorPage/index.js +4 -4
  120. package/dist/pages/IdentifierIssuersAdminPage/index.js +7 -7
  121. package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
  122. package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +16 -16
  123. package/dist/pages/OrganizationContactsAdminPage/index.js +10 -10
  124. package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
  125. package/dist/pages/OrganizationSitesAdminPage/index.js +12 -12
  126. package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
  127. package/dist/pages/OrganizationsAdminPage/index.js +20 -20
  128. package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
  129. package/dist/pages/OutagesAdminPage/index.js +11 -11
  130. package/dist/pages/OutagesAdminPage/index.js.map +1 -1
  131. package/dist/pages/RouterErrorPage/index.js +4 -4
  132. package/dist/pages/UsersAdminPage/index.js +34 -34
  133. package/dist/pages/UsersAdminPage/index.js.map +1 -1
  134. package/dist/setup/setup.js +4 -4
  135. package/dist/setup/setup.js.map +1 -1
  136. package/dist/stores/oidcStore/oidcStore.d.ts +1 -1
  137. package/dist/stores/tableStore/tableStore.d.ts +3 -1
  138. package/dist/utils/StandardConfigUtil/index.js +2 -2
  139. package/dist/utils/StandardConfigUtil/index.js.map +1 -1
  140. package/dist/utils/TableUtil/TableUtil.d.ts +5 -0
  141. package/package.json +35 -37
  142. package/dist/_chunks/useColumnsMenu.js +0 -157
  143. package/dist/_chunks/useColumnsMenu.js.map +0 -1
  144. package/dist/hooks/useColumnsMenu/index.d.ts +0 -1
  145. package/dist/hooks/useColumnsMenu/index.js +0 -1
  146. package/dist/hooks/useColumnsMenu/useColumnsMenu.d.ts +0 -6
@@ -1,36 +1,81 @@
1
1
  // src/classes/abstracts/FilterAbstract/FilterAbstract.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
3
  return e.BACKEND = "BACKEND", e.FRONTEND = "FRONTEND", e;
4
- }({}), t = "DEFAULT", n = class {
4
+ }({}), t = "DEFAULT", n = class e {
5
5
  filterDimensionId;
6
6
  filterMode;
7
7
  filterPriority;
8
8
  filterValue;
9
9
  id;
10
+ includeMissingValues = !1;
10
11
  initialFilterValue;
11
12
  label;
12
13
  showInSidebar = !0;
14
+ supportsMissingValuesFilter = !1;
15
+ get includeMissingValuesFormFieldName() {
16
+ return `__includeMissingValues_${encodeURIComponent(this.id).replace(/\./g, "%2E")}`;
17
+ }
13
18
  constructor(e) {
14
19
  this.id = e.id, this.label = e.label, this.filterMode = e.filterMode, this.filterPriority = e.filterPriority, this.filterDimensionId = e.filterDimensionId ?? null;
15
20
  }
21
+ static isMissingValue(e) {
22
+ return e == null || e === "" || Array.isArray(e) && e.length === 0;
23
+ }
24
+ static isFilterURLSearchParameterState(e) {
25
+ return typeof e == "object" && !!e && !Array.isArray(e) && "genEpixFilterState" in e && e.genEpixFilterState === 1 && "genEpixFilterValue" in e && "includeMissingValues" in e && e.includeMissingValues === !0;
26
+ }
16
27
  fromURLSearchParameterValue(e) {
17
28
  try {
18
- return JSON.parse(e);
29
+ return this.parseFilterValueFromURLSearchParameterValue(e);
19
30
  } catch (e) {
20
31
  return console.error("Error parsing search parameter value:", e), null;
21
32
  }
22
33
  }
34
+ isFilterActive(e, t = this.includeMissingValues) {
35
+ return t || !this.isInitialFilterValue(e);
36
+ }
23
37
  isInitialFilterValue(e) {
24
38
  let t = e === void 0 ? this.filterValue : e;
25
39
  return JSON.stringify(t) === JSON.stringify(this.initialFilterValue);
26
40
  }
41
+ matchRowValueIncludingMissingValues(t, n) {
42
+ return this.includeMissingValues ? this.isInitialFilterValue() ? e.isMissingValue(t) : e.isMissingValue(t) ? !0 : n(t) : n(t);
43
+ }
27
44
  setFilterValue(e) {
28
45
  this.filterValue = e;
29
46
  }
47
+ setIncludeMissingValues(e) {
48
+ this.includeMissingValues = e;
49
+ }
50
+ toBackendFilterWithMissingValues(e) {
51
+ if (!this.includeMissingValues) return e;
52
+ let t = {
53
+ invert: !0,
54
+ key: this.id,
55
+ type: "EXISTS"
56
+ };
57
+ return e ? {
58
+ filters: [e, t],
59
+ operator: "OR",
60
+ type: "COMPOSITE"
61
+ } : t;
62
+ }
30
63
  toURLSearchParameterValue() {
31
64
  let e = JSON.stringify(this.filterValue);
32
65
  if (e === void 0) throw TypeError("Filter value cannot be serialized as JSON.");
33
- return e;
66
+ if (!this.includeMissingValues) return e;
67
+ let t = JSON.stringify({
68
+ genEpixFilterState: 1,
69
+ genEpixFilterValue: this.filterValue,
70
+ includeMissingValues: !0
71
+ });
72
+ if (t === void 0) throw TypeError("Filter value cannot be serialized as JSON.");
73
+ return t;
74
+ }
75
+ parseFilterValueFromURLSearchParameterValue(t) {
76
+ this.includeMissingValues = !1;
77
+ let n = JSON.parse(t);
78
+ return e.isFilterURLSearchParameterState(n) ? (this.includeMissingValues = n.includeMissingValues, n.genEpixFilterValue) : n;
34
79
  }
35
80
  };
36
81
  export { t as DEFAULT_FILTER_GROUP, e as FILTER_MODE, n as FilterAbstract };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["FILTER_MODE","\"BACKEND\"","\"FRONTEND\"","DEFAULT_FILTER_GROUP","FilterAbstract","kwArgs","searchParameterValue","error","usedValue","value"],"sources":["../../../../src/classes/abstracts/FilterAbstract/FilterAbstract.ts"],"sourcesContent":["export enum FILTER_MODE {\n BACKEND = 'BACKEND',\n FRONTEND = 'FRONTEND',\n}\n\nexport const DEFAULT_FILTER_GROUP = 'DEFAULT';\n\nexport interface FilterAbstractKwArgs {\n filterDimensionId?: string;\n filterMode: FILTER_MODE;\n filterPriority: string;\n id: string;\n label: string;\n}\n\nexport abstract class FilterAbstract<TFilterValue> {\n public filterDimensionId: string;\n public filterMode: FILTER_MODE;\n public filterPriority: string;\n public filterValue: TFilterValue;\n public id: string;\n public initialFilterValue: TFilterValue;\n public label: string;\n public showInSidebar: boolean = true;\n\n public constructor(kwArgs: FilterAbstractKwArgs) {\n this.id = kwArgs.id;\n this.label = kwArgs.label;\n this.filterMode = kwArgs.filterMode;\n this.filterPriority = kwArgs.filterPriority;\n this.filterDimensionId = kwArgs.filterDimensionId ?? null;\n }\n\n public fromURLSearchParameterValue(searchParameterValue: string): TFilterValue {\n try {\n return JSON.parse(searchParameterValue) as TFilterValue;\n } catch (error) {\n console.error('Error parsing search parameter value:', error);\n return null;\n }\n }\n\n public isInitialFilterValue(value?: unknown): boolean {\n const usedValue = value !== undefined ? value : this.filterValue;\n return JSON.stringify(usedValue) === JSON.stringify(this.initialFilterValue);\n }\n\n public setFilterValue(value: unknown): void {\n this.filterValue = value as TFilterValue;\n }\n\n public toURLSearchParameterValue(): string {\n const searchParameterValue = JSON.stringify(this.filterValue);\n if (searchParameterValue === undefined) {\n throw new TypeError('Filter value cannot be serialized as JSON.');\n }\n return searchParameterValue;\n }\n}\n"],"mappings":";AAAA,IAAYA,IAAL,yBAAA,GAAA;C,OACL,EAAAC,UAAA,WACA,EAAAC,WAAA,Y;AACF,EAAA,CAAA,CAAA,GAEaC,IAAuB,WAUdC,IAAtB,MAAmD;CACjD;CACA;CACA;CACA;CACA;CACA;CACA;CACA,gBAAgC;CAEhC,YAAmB,GAA8B;EAK/C,AAJA,KAAK,KAAKC,EAAO,IACjB,KAAK,QAAQA,EAAO,OACpB,KAAK,aAAaA,EAAO,YACzB,KAAK,iBAAiBA,EAAO,gBAC7B,KAAK,oBAAoBA,EAAO,qBAAqB;CACvD;CAEA,4BAAmC,GAA4C;EAC7E,IAAI;GACF,OAAO,KAAK,MAAMC,CAAoB;EACxC,SAASC,GAAO;GAEd,OADA,QAAQ,MAAM,yCAAyCA,CAAK,GACrD;EACT;CACF;CAEA,qBAA4B,GAA0B;EACpD,IAAMC,IAAYC,MAAU,KAAA,IAAoB,KAAK,cAAbA;EACxC,OAAO,KAAK,UAAUD,CAAS,MAAM,KAAK,UAAU,KAAK,kBAAkB;CAC7E;CAEA,eAAsB,GAAsB;EAC1C,KAAK,cAAcC;CACrB;CAEA,4BAA2C;EACzC,IAAMH,IAAuB,KAAK,UAAU,KAAK,WAAW;EAC5D,IAAIA,MAAyB,KAAA,GAC3B,MAAU,UAAU,4CAA4C;EAElE,OAAOA;CACT;AACF"}
1
+ {"version":3,"file":"index.js","names":["FILTER_MODE","\"BACKEND\"","\"FRONTEND\"","DEFAULT_FILTER_GROUP","FilterAbstract","kwArgs","value","searchParameterValue","error","includeMissingValues","usedValue","rowValue","matchRowValue","valueFilter","missingValuesFilter","serializedFilterValue","parsedValue"],"sources":["../../../../src/classes/abstracts/FilterAbstract/FilterAbstract.ts"],"sourcesContent":["import type {\n CommonDbCompositeFilter,\n CommonDbExistsFilter,\n CommonDbFiltersInner,\n} from '@gen-epix/api-commondb';\n\nexport enum FILTER_MODE {\n BACKEND = 'BACKEND',\n FRONTEND = 'FRONTEND',\n}\n\nexport const DEFAULT_FILTER_GROUP = 'DEFAULT';\n\nexport interface FilterAbstractKwArgs {\n filterDimensionId?: string;\n filterMode: FILTER_MODE;\n filterPriority: string;\n id: string;\n label: string;\n}\n\ninterface FilterURLSearchParameterState {\n genEpixFilterState: 1;\n genEpixFilterValue: unknown;\n includeMissingValues: true;\n}\n\nexport abstract class FilterAbstract<TFilterValue> {\n public filterDimensionId: string;\n public filterMode: FILTER_MODE;\n public filterPriority: string;\n public filterValue: TFilterValue;\n public id: string;\n public includeMissingValues: boolean = false;\n public initialFilterValue: TFilterValue;\n public label: string;\n public showInSidebar: boolean = true;\n public supportsMissingValuesFilter: boolean = false;\n\n public get includeMissingValuesFormFieldName(): string {\n const encodedId = encodeURIComponent(this.id).replace(/\\./g, '%2E');\n return `__includeMissingValues_${encodedId}`;\n }\n\n public constructor(kwArgs: FilterAbstractKwArgs) {\n this.id = kwArgs.id;\n this.label = kwArgs.label;\n this.filterMode = kwArgs.filterMode;\n this.filterPriority = kwArgs.filterPriority;\n this.filterDimensionId = kwArgs.filterDimensionId ?? null;\n }\n\n public static isMissingValue(value: unknown): boolean {\n return value === null\n || value === undefined\n || value === ''\n || (Array.isArray(value) && value.length === 0);\n }\n\n private static isFilterURLSearchParameterState(value: unknown): value is FilterURLSearchParameterState {\n return typeof value === 'object'\n && value !== null\n && !Array.isArray(value)\n && 'genEpixFilterState' in value\n && value.genEpixFilterState === 1\n && 'genEpixFilterValue' in value\n && 'includeMissingValues' in value\n && value.includeMissingValues === true;\n }\n\n public fromURLSearchParameterValue(searchParameterValue: string): TFilterValue {\n try {\n return this.parseFilterValueFromURLSearchParameterValue(searchParameterValue) as TFilterValue;\n } catch (error) {\n console.error('Error parsing search parameter value:', error);\n return null;\n }\n }\n\n public isFilterActive(value?: unknown, includeMissingValues: boolean = this.includeMissingValues): boolean {\n return includeMissingValues || !this.isInitialFilterValue(value);\n }\n\n public isInitialFilterValue(value?: unknown): boolean {\n const usedValue = value !== undefined ? value : this.filterValue;\n return JSON.stringify(usedValue) === JSON.stringify(this.initialFilterValue);\n }\n\n public matchRowValueIncludingMissingValues(\n rowValue: unknown,\n matchRowValue: (value: unknown) => boolean,\n ): boolean {\n if (!this.includeMissingValues) {\n return matchRowValue(rowValue);\n }\n\n if (this.isInitialFilterValue()) {\n return FilterAbstract.isMissingValue(rowValue);\n }\n\n if (FilterAbstract.isMissingValue(rowValue)) {\n return true;\n }\n\n return matchRowValue(rowValue);\n }\n\n public setFilterValue(value: unknown): void {\n this.filterValue = value as TFilterValue;\n }\n\n public setIncludeMissingValues(includeMissingValues: boolean): void {\n this.includeMissingValues = includeMissingValues;\n }\n\n public toBackendFilterWithMissingValues(valueFilter?: CommonDbFiltersInner): CommonDbFiltersInner | undefined {\n if (!this.includeMissingValues) {\n return valueFilter;\n }\n\n const missingValuesFilter: CommonDbExistsFilter = {\n invert: true,\n key: this.id,\n type: 'EXISTS',\n };\n\n if (!valueFilter) {\n return missingValuesFilter;\n }\n\n const compositeFilter: CommonDbCompositeFilter = {\n filters: [valueFilter, missingValuesFilter],\n operator: 'OR',\n type: 'COMPOSITE',\n };\n\n return compositeFilter;\n }\n\n public toURLSearchParameterValue(): string {\n const serializedFilterValue = JSON.stringify(this.filterValue);\n if (serializedFilterValue === undefined) {\n throw new TypeError('Filter value cannot be serialized as JSON.');\n }\n if (!this.includeMissingValues) {\n return serializedFilterValue;\n }\n\n const searchParameterValue = JSON.stringify({\n genEpixFilterState: 1,\n genEpixFilterValue: this.filterValue,\n includeMissingValues: true,\n });\n if (searchParameterValue === undefined) {\n throw new TypeError('Filter value cannot be serialized as JSON.');\n }\n return searchParameterValue;\n }\n\n protected parseFilterValueFromURLSearchParameterValue(searchParameterValue: string): unknown {\n this.includeMissingValues = false;\n const parsedValue: unknown = JSON.parse(searchParameterValue);\n\n if (!FilterAbstract.isFilterURLSearchParameterState(parsedValue)) {\n return parsedValue;\n }\n\n this.includeMissingValues = parsedValue.includeMissingValues;\n return parsedValue.genEpixFilterValue;\n }\n}\n"],"mappings":";AAMA,IAAYA,IAAL,yBAAA,GAAA;C,OACL,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P,EAAe,eAAeO,CAAQ,IACjC,KAGFC,EAAcD,CAAQ,IAXpBC,EAAcD,CAAQ;CAYjC;CAEA,eAAsB,GAAsB;EAC1C,KAAK,cAAcL;CACrB;CAEA,wBAA+B,GAAqC;EAClE,KAAK,uBAAuBG;CAC9B;CAEA,iCAAwC,GAAsE;EAC5G,IAAI,CAAC,KAAK,sBACR,OAAOI;EAGT,IAAMC,IAA4C;GAChD,QAAQ;GACR,KAAK,KAAK;GACV,MAAM;EACR;EAYA,OAVKD,IAUE;GALL,SAAS,CAACA,GAAaC,CAAmB;GAC1C,UAAU;GACV,MAAM;EAGD,IATEA;CAUX;CAEA,4BAA2C;EACzC,IAAMC,IAAwB,KAAK,UAAU,KAAK,WAAW;EAC7D,IAAIA,MAA0B,KAAA,GAC5B,MAAU,UAAU,4CAA4C;EAElE,IAAI,CAAC,KAAK,sBACR,OAAOA;EAGT,IAAMR,IAAuB,KAAK,UAAU;GAC1C,oBAAoB;GACpB,oBAAoB,KAAK;GACzB,sBAAsB;EACxB,CAAC;EACD,IAAIA,MAAyB,KAAA,GAC3B,MAAU,UAAU,4CAA4C;EAElE,OAAOA;CACT;CAEA,4CAAsD,GAAuC;EAC3F,KAAK,uBAAuB;EAC5B,IAAMS,IAAuB,KAAK,MAAMT,CAAoB;EAO5D,OALKH,EAAe,gCAAgCY,CAAW,KAI/D,KAAK,uBAAuBA,EAAY,sBACjCA,EAAY,sBAJVA;CAKX;AACF"}
@@ -5,6 +5,7 @@ import { Filter } from '../../models/filter.models';
5
5
  export declare class BooleanFilter extends FilterAbstract<boolean> implements Filter<boolean, boolean> {
6
6
  filterValue: boolean;
7
7
  initialFilterValue: boolean;
8
+ supportsMissingValuesFilter: boolean;
8
9
  getPresentationValue(value?: unknown, t?: TFunction<'translation', undefined>): string;
9
10
  matchRowValue(rowValue: boolean): boolean;
10
11
  toBackendFilter(): CommonDbFiltersInner;
@@ -17,10 +17,10 @@ export declare class DateFilter extends FilterAbstract<[Date, Date]> implements
17
17
  initialFilterValue: [Date, Date];
18
18
  maxDate: Date;
19
19
  minDate: Date;
20
+ supportsMissingValuesFilter: boolean;
20
21
  constructor(kwArgs: DateFilterKwArgs);
21
22
  fromURLSearchParameterValue(searchParameterValue: string): [Date, Date];
22
23
  getPresentationValue(value?: unknown): string;
23
24
  matchRowValue(rowValue: string): boolean;
24
25
  toBackendFilter(): CommonDbDateRangeFilter | CommonDbPartialDateRangeFilter;
25
- toURLSearchParameterValue(): string;
26
26
  }
@@ -9,6 +9,7 @@ export declare class GeoFilter extends FilterAbstract<string[]> implements Filte
9
9
  filterValue: string[];
10
10
  initialFilterValue: string[];
11
11
  options: AutoCompleteOption[];
12
+ supportsMissingValuesFilter: boolean;
12
13
  private readonly optionsMap;
13
14
  constructor(kwArgs: GeoFilterKwArgs);
14
15
  getPresentationValue(value?: unknown): string;
@@ -11,6 +11,7 @@ export declare class MultiSelectFilter extends FilterAbstract<string[]> implemen
11
11
  initialFilterValue: string[];
12
12
  maxNumOptionsExpanded: number;
13
13
  options: AutoCompleteOption[];
14
+ supportsMissingValuesFilter: boolean;
14
15
  private readonly optionsMap;
15
16
  constructor(kwArgs: MultiSelectFilterKwArgs);
16
17
  getPresentationValue(value?: unknown): string;
@@ -10,6 +10,7 @@ export declare class NumberRangeFilter extends FilterAbstract<[number, number]>
10
10
  initialFilterValue: [number, number];
11
11
  max: number;
12
12
  min: number;
13
+ supportsMissingValuesFilter: boolean;
13
14
  constructor(kwArgs: NumberRangeFilterKwArgs);
14
15
  getPresentationValue(value?: unknown): string;
15
16
  matchRowValue(rowValue: number): boolean;
@@ -4,6 +4,7 @@ import { FilterAbstract } from '../abstracts/FilterAbstract';
4
4
  export declare class TextFilter extends FilterAbstract<string> implements Filter<string, string> {
5
5
  filterValue: string;
6
6
  initialFilterValue: string;
7
+ supportsMissingValuesFilter: boolean;
7
8
  getPresentationValue(value?: unknown): string;
8
9
  matchRowValue(rowValue: string): boolean;
9
10
  toBackendFilter(): CommonDbRegexFilter;
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "../../../_chunks/Reflect.js";
2
- import { AxiosUtil as t } from "../../../utils/AxiosUtil/index.js";
2
+ import { AuthorizationService as t } from "../AuthorizationService/index.js";
3
3
  import { oidcStore as n } from "../../../stores/oidcStore/index.js";
4
- import { t as r } from "../../../_chunks/decorateParam.js";
5
- import { t as i } from "../../../_chunks/decorate.js";
6
- import { AuthorizationService as a } from "../AuthorizationService/index.js";
4
+ import { AxiosUtil as r } from "../../../utils/AxiosUtil/index.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 { WindowService as c } from "@gen-epix/ui-core/classes/services/WindowService";
9
9
  import { Subject as l } from "@gen-epix/ui-core/classes/Subject";
@@ -37,7 +37,7 @@ var d, f = Symbol("createdAt"), p = class extends u {
37
37
  return t && e.headers.set("Authorization", `Bearer ${t}`), e;
38
38
  }
39
39
  onResponseRejected(e) {
40
- if (!this.temporaryToken && t.isAxiosUnauthorizedError(e)) {
40
+ if (!this.temporaryToken && r.isAxiosUnauthorizedError(e)) {
41
41
  let t = this.authContextProps?.user?.state?.redirectCounter ?? 0;
42
42
  if (t > 0 || !this.authorizationService.user) throw e;
43
43
  (async () => {
@@ -53,10 +53,10 @@ var d, f = Symbol("createdAt"), p = class extends u {
53
53
  }
54
54
  }
55
55
  };
56
- p = d = i([
56
+ p = d = a([
57
57
  s(),
58
- r(0, o(a)),
59
- r(1, o(c))
58
+ i(0, o(t)),
59
+ i(1, o(c))
60
60
  ], p);
61
61
  export { p as AuthenticationService, f as createdAtMetaDataKey };
62
62
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_decorate","_decorateParam","require_Reflect","__decorateParam","__decorate","_AuthenticationService","createdAtMetaDataKey","AuthenticationService","SubscribableAbstract","Subject","oidcStore","authorizationService","windowService","key","oidcConfiguration","accessToken","request","AxiosUtil","error","redirectCounter","singleton","inject","AuthorizationService","WindowService"],"sources":["../../../../src/classes/services/AuthenticationService/AuthenticationService.ts"],"sourcesContent":["import 'reflect-metadata';\nimport type { InternalAxiosRequestConfig } from 'axios';\nimport type { AuthContextProps } from 'react-oidc-context';\nimport type { CommonDbIdentityProvider } from '@gen-epix/api-commondb';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport { Subject } from '@gen-epix/ui-core/classes/Subject';\nimport { SubscribableAbstract } from '@gen-epix/ui-core/classes/abstracts/SubscribableAbstract';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport { AuthorizationService } from '../AuthorizationService';\nimport type { AuthState } from '../../../models/auth.models';\nimport { oidcStore } from '../../../stores/oidcStore';\nimport { AxiosUtil } from '../../../utils/AxiosUtil';\n\nexport const createdAtMetaDataKey = Symbol('createdAt');\n\n@singleton()\nexport class AuthenticationService extends SubscribableAbstract<CommonDbIdentityProvider> {\n public static autoLoginSkew = 500;\n\n public authContextProps: AuthContextProps;\n\n public temporaryToken: string;\n private readonly authorizationService: AuthorizationService;\n private readonly windowService: WindowService;\n\n public constructor(\n @inject(AuthorizationService) authorizationService: AuthorizationService,\n @inject(WindowService) windowService: WindowService,\n ) {\n super(new Subject(oidcStore.getState().configuration));\n this.authorizationService = authorizationService;\n this.windowService = windowService;\n }\n\n public static clearStaleState(): void {\n Object.keys(sessionStorage).forEach((key) => {\n if (key.startsWith('oidc')) {\n sessionStorage.removeItem(key);\n }\n });\n }\n\n\n public getUserManagerSettingsCreatedAt(): number | undefined {\n return this.data ? Reflect.getMetadata(createdAtMetaDataKey, this.data) as number : undefined;\n }\n\n public next(oidcConfiguration: CommonDbIdentityProvider) {\n if (oidcConfiguration) {\n Reflect.defineMetadata(createdAtMetaDataKey, new Date().getTime(), oidcConfiguration);\n oidcStore.getState().setConfiguration(oidcConfiguration);\n } else {\n oidcStore.getState().setConfiguration(undefined);\n }\n super.next(oidcConfiguration);\n }\n\n public onRequest(request: InternalAxiosRequestConfig): InternalAxiosRequestConfig {\n const accessToken = this.temporaryToken ?? this.authContextProps?.user?.access_token;\n if (accessToken) {\n request.headers.set('Authorization', `Bearer ${accessToken}`);\n }\n return request;\n }\n\n public onResponseRejected(error: unknown): void {\n if (!this.temporaryToken && AxiosUtil.isAxiosUnauthorizedError(error)) {\n const redirectCounter = (this.authContextProps?.user?.state as AuthState)?.redirectCounter ?? 0;\n\n // If the user is not logged in, or the user is already redirected, throw the error\n\n if (redirectCounter > 0 || !this.authorizationService.user) {\n throw error;\n }\n\n const perform = async () => {\n if (!this.authContextProps) {\n return;\n }\n // Clean the stale state (removes items from the session storage)\n AuthenticationService.clearStaleState();\n // Redirect the user to the IDP sign in page\n await this.authContextProps.signinRedirect({\n state: {\n preLoginLocation: {\n hash: this.windowService.window.location.hash,\n pathname: this.windowService.window.location.pathname,\n search: this.windowService.window.location.search,\n },\n redirectCounter: redirectCounter + 1,\n },\n });\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n perform();\n }\n }\n}\n"],"mappings":";;;;;;;;;;;A,OAiBaM,IAAuB,OAAO,WAAW,GAGzCC,IAAN,cAAoCC,EAA+C;;;;CACxF,OAAc,gBAAgB;CAE9B;CAEA;CACA;CACA;CAEA,YACE,GACA,GACA;EAGA,AAFA,MAAM,IAAIC,EAAQC,EAAU,SAAS,CAAC,CAAC,aAAa,CAAC,GACrD,KAAK,uBAAuBC,GAC5B,KAAK,gBAAgBC;CACvB;CAEA,OAAc,kBAAwB;EACpC,OAAO,KAAK,cAAc,CAAC,CAAC,SAAS,MAAQ;GAC3C,AAAIC,EAAI,WAAW,MAAM,KACvB,eAAe,WAAWA,CAAG;EAEjC,CAAC;CACH;CAGA,kCAA6D;EAC3D,OAAO,KAAK,OAAO,QAAQ,YAAYP,GAAsB,KAAK,IAAI,IAAc,KAAA;CACtF;CAEA,KAAY,GAA6C;EAOvD,AANIQ,KACF,QAAQ,eAAeR,oBAAsB,IAAI,KAAK,EAAA,CAAE,QAAQ,GAAGQ,CAAiB,GACpFJ,EAAU,SAAS,CAAC,CAAC,iBAAiBI,CAAiB,KAEvDJ,EAAU,SAAS,CAAC,CAAC,iBAAiB,KAAA,CAAS,GAEjD,MAAM,KAAKI,CAAiB;CAC9B;CAEA,UAAiB,GAAiE;EAChF,IAAMC,IAAc,KAAK,kBAAkB,KAAK,kBAAkB,MAAM;EAIxE,OAHIA,KACFC,EAAQ,QAAQ,IAAI,iBAAiB,UAAUD,GAAa,GAEvDC;CACT;CAEA,mBAA0B,GAAsB;EAC9C,IAAI,CAAC,KAAK,kBAAkBC,EAAU,yBAAyBC,CAAK,GAAG;GACrE,IAAMC,IAAmB,KAAK,kBAAkB,MAAM,OAAqB,mBAAmB;GAI9F,IAAIA,IAAkB,KAAK,CAAC,KAAK,qBAAqB,MACpD,MAAMD;GAsBR,aAnB4B;IAC1B,AAAK,KAAK,qBAIVb,EAAsB,gBAAgB,GAEtC,MAAM,KAAK,iBAAiB,eAAe,EACzC,OAAO;KACL,kBAAkB;MAChB,MAAM,KAAK,cAAc,OAAO,SAAS;MACzC,UAAU,KAAK,cAAc,OAAO,SAAS;MAC7C,QAAQ,KAAK,cAAc,OAAO,SAAS;KAC7C;KACA,iBAAiBc,IAAkB;IACrC,EACF,CAAC;GACH,EAEA,CAAQ;EACV;CACF;AACF;;CAlFCC,EAAU;CAWNnB,EAAA,GAAAoB,EAAOC,CAAoB,CAAA;CAC3BrB,EAAA,GAAAoB,EAAOE,CAAa,CAAA"}
1
+ {"version":3,"file":"index.js","names":["_decorateParam","require_Reflect","__decorateParam","__decorate","_AuthenticationService","createdAtMetaDataKey","AuthenticationService","SubscribableAbstract","Subject","oidcStore","authorizationService","windowService","key","oidcConfiguration","accessToken","request","AxiosUtil","error","redirectCounter","singleton","inject","AuthorizationService","WindowService"],"sources":["../../../../src/classes/services/AuthenticationService/AuthenticationService.ts"],"sourcesContent":["import 'reflect-metadata';\nimport type { InternalAxiosRequestConfig } from 'axios';\nimport type { AuthContextProps } from 'react-oidc-context';\nimport type { CommonDbIdentityProvider } from '@gen-epix/api-commondb';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport { Subject } from '@gen-epix/ui-core/classes/Subject';\nimport { SubscribableAbstract } from '@gen-epix/ui-core/classes/abstracts/SubscribableAbstract';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport { AuthorizationService } from '../AuthorizationService';\nimport type { AuthState } from '../../../models/auth.models';\nimport { oidcStore } from '../../../stores/oidcStore';\nimport { AxiosUtil } from '../../../utils/AxiosUtil';\n\nexport const createdAtMetaDataKey = Symbol('createdAt');\n\n@singleton()\nexport class AuthenticationService extends SubscribableAbstract<CommonDbIdentityProvider> {\n public static autoLoginSkew = 500;\n\n public authContextProps: AuthContextProps;\n\n public temporaryToken: string;\n private readonly authorizationService: AuthorizationService;\n private readonly windowService: WindowService;\n\n public constructor(\n @inject(AuthorizationService) authorizationService: AuthorizationService,\n @inject(WindowService) windowService: WindowService,\n ) {\n super(new Subject(oidcStore.getState().configuration));\n this.authorizationService = authorizationService;\n this.windowService = windowService;\n }\n\n public static clearStaleState(): void {\n Object.keys(sessionStorage).forEach((key) => {\n if (key.startsWith('oidc')) {\n sessionStorage.removeItem(key);\n }\n });\n }\n\n\n public getUserManagerSettingsCreatedAt(): number | undefined {\n return this.data ? Reflect.getMetadata(createdAtMetaDataKey, this.data) as number : undefined;\n }\n\n public next(oidcConfiguration: CommonDbIdentityProvider) {\n if (oidcConfiguration) {\n Reflect.defineMetadata(createdAtMetaDataKey, new Date().getTime(), oidcConfiguration);\n oidcStore.getState().setConfiguration(oidcConfiguration);\n } else {\n oidcStore.getState().setConfiguration(undefined);\n }\n super.next(oidcConfiguration);\n }\n\n public onRequest(request: InternalAxiosRequestConfig): InternalAxiosRequestConfig {\n const accessToken = this.temporaryToken ?? this.authContextProps?.user?.access_token;\n if (accessToken) {\n request.headers.set('Authorization', `Bearer ${accessToken}`);\n }\n return request;\n }\n\n public onResponseRejected(error: unknown): void {\n if (!this.temporaryToken && AxiosUtil.isAxiosUnauthorizedError(error)) {\n const redirectCounter = (this.authContextProps?.user?.state as AuthState)?.redirectCounter ?? 0;\n\n // If the user is not logged in, or the user is already redirected, throw the error\n\n if (redirectCounter > 0 || !this.authorizationService.user) {\n throw error;\n }\n\n const perform = async () => {\n if (!this.authContextProps) {\n return;\n }\n // Clean the stale state (removes items from the session storage)\n AuthenticationService.clearStaleState();\n // Redirect the user to the IDP sign in page\n await this.authContextProps.signinRedirect({\n state: {\n preLoginLocation: {\n hash: this.windowService.window.location.hash,\n pathname: this.windowService.window.location.pathname,\n search: this.windowService.window.location.search,\n },\n redirectCounter: redirectCounter + 1,\n },\n });\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n perform();\n }\n }\n}\n"],"mappings":";;;;;;;;;;;A,OAiBaK,IAAuB,OAAO,WAAW,GAGzCC,IAAN,cAAoCC,EAA+C;;;;CACxF,OAAc,gBAAgB;CAE9B;CAEA;CACA;CACA;CAEA,YACE,GACA,GACA;EAGA,AAFA,MAAM,IAAIC,EAAQC,EAAU,SAAS,CAAC,CAAC,aAAa,CAAC,GACrD,KAAK,uBAAuBC,GAC5B,KAAK,gBAAgBC;CACvB;CAEA,OAAc,kBAAwB;EACpC,OAAO,KAAK,cAAc,CAAC,CAAC,SAAS,MAAQ;GAC3C,AAAIC,EAAI,WAAW,MAAM,KACvB,eAAe,WAAWA,CAAG;EAEjC,CAAC;CACH;CAGA,kCAA6D;EAC3D,OAAO,KAAK,OAAO,QAAQ,YAAYP,GAAsB,KAAK,IAAI,IAAc,KAAA;CACtF;CAEA,KAAY,GAA6C;EAOvD,AANIQ,KACF,QAAQ,eAAeR,oBAAsB,IAAI,KAAK,EAAA,CAAE,QAAQ,GAAGQ,CAAiB,GACpFJ,EAAU,SAAS,CAAC,CAAC,iBAAiBI,CAAiB,KAEvDJ,EAAU,SAAS,CAAC,CAAC,iBAAiB,KAAA,CAAS,GAEjD,MAAM,KAAKI,CAAiB;CAC9B;CAEA,UAAiB,GAAiE;EAChF,IAAMC,IAAc,KAAK,kBAAkB,KAAK,kBAAkB,MAAM;EAIxE,OAHIA,KACFC,EAAQ,QAAQ,IAAI,iBAAiB,UAAUD,GAAa,GAEvDC;CACT;CAEA,mBAA0B,GAAsB;EAC9C,IAAI,CAAC,KAAK,kBAAkBC,EAAU,yBAAyBC,CAAK,GAAG;GACrE,IAAMC,IAAmB,KAAK,kBAAkB,MAAM,OAAqB,mBAAmB;GAI9F,IAAIA,IAAkB,KAAK,CAAC,KAAK,qBAAqB,MACpD,MAAMD;GAsBR,aAnB4B;IAC1B,AAAK,KAAK,qBAIVb,EAAsB,gBAAgB,GAEtC,MAAM,KAAK,iBAAiB,eAAe,EACzC,OAAO;KACL,kBAAkB;MAChB,MAAM,KAAK,cAAc,OAAO,SAAS;MACzC,UAAU,KAAK,cAAc,OAAO,SAAS;MAC7C,QAAQ,KAAK,cAAc,OAAO,SAAS;KAC7C;KACA,iBAAiBc,IAAkB;IACrC,EACF,CAAC;GACH,EAEA,CAAQ;EACV;CACF;AACF;;CAlFCC,EAAU;CAWNnB,EAAA,GAAAoB,EAAOC,CAAoB,CAAA;CAC3BrB,EAAA,GAAAoB,EAAOE,CAAa,CAAA"}
@@ -1,6 +1,6 @@
1
- import { t as e } from "../../../_chunks/decorateParam.js";
2
- import { t } from "../../../_chunks/decorate.js";
3
- import { PageEventBusService as n } from "../PageEventBusService/index.js";
1
+ import { PageEventBusService as e } from "../PageEventBusService/index.js";
2
+ import { t } from "../../../_chunks/decorateParam.js";
3
+ import { t as n } from "../../../_chunks/decorate.js";
4
4
  import { inject as r, singleton as i } from "tsyringe";
5
5
  // src/classes/services/AuthorizationService/AuthorizationService.ts
6
6
  var a = class {
@@ -31,7 +31,7 @@ var a = class {
31
31
  return !!(!e.handle.requiredPermissions?.length && !t || this.doesUserHavePermission(t ? t.handle.requiredPermissions : e.handle.requiredPermissions));
32
32
  }
33
33
  };
34
- a = t([i(), e(0, r(n))], a);
34
+ a = n([i(), t(0, r(e))], a);
35
35
  export { a as AuthorizationService };
36
36
 
37
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorateParam","AuthorizationService","permissions","user","pageEventBusService","command_name","permission","permission_type","route","r","childRoute","indexRoute","__decorate","singleton","inject","PageEventBusService"],"sources":["../../../../src/classes/services/AuthorizationService/AuthorizationService.ts"],"sourcesContent":["import type {\n CommonDbApiPermission,\n CommonDbUser,\n} from '@gen-epix/api-commondb';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport type { MyNonIndexRouteObject } from '../../../models/react-router.models';\nimport { PageEventBusService } from '../PageEventBusService';\n\n@singleton()\nexport class AuthorizationService {\n public set apiPermissions(permissions: CommonDbApiPermission[]) {\n this.__apiPermissions = permissions;\n }\n\n public get apiPermissions(): CommonDbApiPermission[] {\n return this.__apiPermissions;\n }\n\n public set user(user: CommonDbUser) {\n this.pageEventBusService.emit('changeUser', user);\n this.__user = user;\n }\n\n public get user(): CommonDbUser {\n return this.__user;\n }\n\n private __apiPermissions: CommonDbApiPermission[] = [];\n\n private __user: CommonDbUser;\n\n private readonly pageEventBusService: PageEventBusService;\n\n public constructor(@inject(PageEventBusService) pageEventBusService: PageEventBusService) {\n this.pageEventBusService = pageEventBusService;\n }\n\n\n public doesUserHavePermission<TApiPermission = CommonDbApiPermission>(permissions: NoInfer<TApiPermission>[]): boolean {\n if (!permissions?.length) {\n return true;\n }\n if (!this.apiPermissions?.length) {\n return false;\n }\n return permissions.every(permission => {\n return !!(this.apiPermissions).find(({ command_name, permission_type }) => {\n return command_name === (permission as CommonDbApiPermission).command_name && permission_type === (permission as CommonDbApiPermission).permission_type;\n });\n });\n }\n\n public doesUserHavePermissionForRoute(route: MyNonIndexRouteObject): boolean {\n if (route.handle.requirePermissionForChildRoute) {\n return route.children?.filter(r => !r.index)?.some((childRoute) => this.doesUserHavePermissionForRoute(childRoute as MyNonIndexRouteObject)) ?? false;\n }\n const indexRoute = route.children?.find((childRoute) => childRoute.index);\n if (!route.handle.requiredPermissions?.length && !indexRoute) {\n return true;\n }\n const hasPermissionForRoute = this.doesUserHavePermission(indexRoute ? indexRoute.handle.requiredPermissions : route.handle.requiredPermissions);\n if (hasPermissionForRoute) {\n return true;\n }\n return false;\n }\n}\n"],"mappings":";;;;;AAaO,IAAMG,IAAN,MAA2B;CAChC,IAAW,eAAe,GAAsC;EAC9D,KAAK,mBAAmBC;CAC1B;CAEA,IAAW,iBAA0C;EACnD,OAAO,KAAK;CACd;CAEA,IAAW,KAAK,GAAoB;EAElC,AADA,KAAK,oBAAoB,KAAK,cAAcC,CAAI,GAChD,KAAK,SAASA;CAChB;CAEA,IAAW,OAAqB;EAC9B,OAAO,KAAK;CACd;CAEA,mBAAoD,CAAC;CAErD;CAEA;CAEA,YAAmB,GAAuE;EACxF,KAAK,sBAAsBC;CAC7B;CAGA,uBAAsE,GAAiD;EAOrH,OANKF,GAAa,SAGb,KAAK,gBAAgB,SAGnBA,EAAY,OAAM,MAChB,CAAC,CAAE,KAAK,eAAgB,MAAM,EAAE,iBAAc,yBAC5CG,MAAkBC,EAAqC,gBAAgBC,MAAqBD,EAAqC,eACzI,CACF,IANQ,KAHA;CAUX;CAEA,+BAAsC,GAAuC;EAC3E,IAAIE,EAAM,OAAO,gCACf,OAAOA,EAAM,UAAU,QAAO,MAAK,CAACC,EAAE,KAAK,CAAC,EAAE,MAAM,MAAe,KAAK,+BAA+BC,CAAmC,CAAC,KAAK;EAElJ,IAAMC,IAAaH,EAAM,UAAU,MAAM,MAAeE,EAAW,KAAK;EAQxE,OAHA,GAJI,CAACF,EAAM,OAAO,qBAAqB,UAAU,CAACG,KAGpB,KAAK,uBAAuBA,IAAaA,EAAW,OAAO,sBAAsBH,EAAM,OAAO,mBACxH;CAIN;AACF;AA1DC,IAAAV,EAAA,CAAAe,EAAU,GAAAd,EAAA,GAyBWe,EAAOC,CAAmB,CAAA,CAAA,GAAAd,CAAA"}
1
+ {"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","AuthorizationService","permissions","user","pageEventBusService","command_name","permission","permission_type","route","r","childRoute","indexRoute","singleton","__decorateParam","inject","PageEventBusService"],"sources":["../../../../src/classes/services/AuthorizationService/AuthorizationService.ts"],"sourcesContent":["import type {\n CommonDbApiPermission,\n CommonDbUser,\n} from '@gen-epix/api-commondb';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport type { MyNonIndexRouteObject } from '../../../models/react-router.models';\nimport { PageEventBusService } from '../PageEventBusService';\n\n@singleton()\nexport class AuthorizationService {\n public set apiPermissions(permissions: CommonDbApiPermission[]) {\n this.__apiPermissions = permissions;\n }\n\n public get apiPermissions(): CommonDbApiPermission[] {\n return this.__apiPermissions;\n }\n\n public set user(user: CommonDbUser) {\n this.pageEventBusService.emit('changeUser', user);\n this.__user = user;\n }\n\n public get user(): CommonDbUser {\n return this.__user;\n }\n\n private __apiPermissions: CommonDbApiPermission[] = [];\n\n private __user: CommonDbUser;\n\n private readonly pageEventBusService: PageEventBusService;\n\n public constructor(@inject(PageEventBusService) pageEventBusService: PageEventBusService) {\n this.pageEventBusService = pageEventBusService;\n }\n\n\n public doesUserHavePermission<TApiPermission = CommonDbApiPermission>(permissions: NoInfer<TApiPermission>[]): boolean {\n if (!permissions?.length) {\n return true;\n }\n if (!this.apiPermissions?.length) {\n return false;\n }\n return permissions.every(permission => {\n return !!(this.apiPermissions).find(({ command_name, permission_type }) => {\n return command_name === (permission as CommonDbApiPermission).command_name && permission_type === (permission as CommonDbApiPermission).permission_type;\n });\n });\n }\n\n public doesUserHavePermissionForRoute(route: MyNonIndexRouteObject): boolean {\n if (route.handle.requirePermissionForChildRoute) {\n return route.children?.filter(r => !r.index)?.some((childRoute) => this.doesUserHavePermissionForRoute(childRoute as MyNonIndexRouteObject)) ?? false;\n }\n const indexRoute = route.children?.find((childRoute) => childRoute.index);\n if (!route.handle.requiredPermissions?.length && !indexRoute) {\n return true;\n }\n const hasPermissionForRoute = this.doesUserHavePermission(indexRoute ? indexRoute.handle.requiredPermissions : route.handle.requiredPermissions);\n if (hasPermissionForRoute) {\n return true;\n }\n return false;\n }\n}\n"],"mappings":";;;;;AAaO,IAAMG,IAAN,MAA2B;CAChC,IAAW,eAAe,GAAsC;EAC9D,KAAK,mBAAmBC;CAC1B;CAEA,IAAW,iBAA0C;EACnD,OAAO,KAAK;CACd;CAEA,IAAW,KAAK,GAAoB;EAElC,AADA,KAAK,oBAAoB,KAAK,cAAcC,CAAI,GAChD,KAAK,SAASA;CAChB;CAEA,IAAW,OAAqB;EAC9B,OAAO,KAAK;CACd;CAEA,mBAAoD,CAAC;CAErD;CAEA;CAEA,YAAmB,GAAuE;EACxF,KAAK,sBAAsBC;CAC7B;CAGA,uBAAsE,GAAiD;EAOrH,OANKF,GAAa,SAGb,KAAK,gBAAgB,SAGnBA,EAAY,OAAM,MAChB,CAAC,CAAE,KAAK,eAAgB,MAAM,EAAE,iBAAc,yBAC5CG,MAAkBC,EAAqC,gBAAgBC,MAAqBD,EAAqC,eACzI,CACF,IANQ,KAHA;CAUX;CAEA,+BAAsC,GAAuC;EAC3E,IAAIE,EAAM,OAAO,gCACf,OAAOA,EAAM,UAAU,QAAO,MAAK,CAACC,EAAE,KAAK,CAAC,EAAE,MAAM,MAAe,KAAK,+BAA+BC,CAAmC,CAAC,KAAK;EAElJ,IAAMC,IAAaH,EAAM,UAAU,MAAM,MAAeE,EAAW,KAAK;EAQxE,OAHA,GAJI,CAACF,EAAM,OAAO,qBAAqB,UAAU,CAACG,KAGpB,KAAK,uBAAuBA,IAAaA,EAAW,OAAO,sBAAsBH,EAAM,OAAO,mBACxH;CAIN;AACF;AA1DC,IAAAV,EAAA,CAAAc,EAAU,GAAAb,EAAA,GAyBWe,EAAOC,CAAmB,CAAA,CAAA,GAAAd,CAAA"}
@@ -1,11 +1,11 @@
1
1
  import { n as e } from "../../../_chunks/rolldown-runtime.js";
2
- import { t } from "../../../_chunks/decorate.js";
3
- import { t as n } from "../../../_chunks/omit.js";
2
+ import { t } from "../../../_chunks/omit.js";
3
+ import { t as n } from "../../../_chunks/decorate.js";
4
4
  import { singleton as r } from "tsyringe";
5
5
  import { Subject as i } from "@gen-epix/ui-core/classes/Subject";
6
6
  import { SubscribableAbstract as a } from "@gen-epix/ui-core/classes/abstracts/SubscribableAbstract";
7
7
  // src/classes/services/BreadcrumbService/BreadcrumbService.ts
8
- var o = /* @__PURE__ */ e(n(), 1), s = class extends a {
8
+ var o = /* @__PURE__ */ e(t(), 1), s = class extends a {
9
9
  constructor() {
10
10
  super(new i({}));
11
11
  }
@@ -19,7 +19,7 @@ var o = /* @__PURE__ */ e(n(), 1), s = class extends a {
19
19
  });
20
20
  }
21
21
  };
22
- s = t([r()], s);
22
+ s = n([r()], s);
23
23
  export { s as BreadcrumbService };
24
24
 
25
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["omit","_decorate","__toESM","require_omit","import_omit","BreadcrumbService","SubscribableAbstract","Subject","position","title","__decorate","singleton"],"sources":["../../../../src/classes/services/BreadcrumbService/BreadcrumbService.ts"],"sourcesContent":["import omit from 'lodash/omit';\nimport { Subject } from '@gen-epix/ui-core/classes/Subject';\nimport { SubscribableAbstract } from '@gen-epix/ui-core/classes/abstracts/SubscribableAbstract';\nimport { singleton } from 'tsyringe';\n\n\ntype SubjectData = Record<string, string>;\n\n@singleton()\nexport class BreadcrumbService extends SubscribableAbstract<SubjectData> {\n\n public constructor() {\n super(new Subject<SubjectData>({}));\n }\n\n public remove(position: string): void {\n this.subject.next({ ...omit(this.subject.data, position) });\n }\n\n public update(position: string, title: string): void {\n this.subject.next({ ...this.subject.data, [position]: title });\n }\n}\n"],"mappings":";;;;;;;A,mCASaK,IAAN,cAAgCC,EAAkC;CAEvE,cAAqB;EACnB,MAAM,IAAIC,EAAqB,CAAC,CAAC,CAAC;CACpC;CAEA,OAAc,GAAwB;EACpC,KAAK,QAAQ,KAAK,EAAE,IAAA,GAAGP,EAAAA,QAAAA,CAAK,KAAK,QAAQ,MAAMQ,CAAQ,EAAE,CAAC;CAC5D;CAEA,OAAc,GAAkB,GAAqB;EACnD,KAAK,QAAQ,KAAK;GAAE,GAAG,KAAK,QAAQ;IAAOA,IAAWC;EAAM,CAAC;CAC/D;AACF;AAdC,IAAAR,EAAA,CAAAU,EAAU,CAAA,GAAAN,CAAA"}
1
+ {"version":3,"file":"index.js","names":["omit","_decorate","__toESM","__decorate","import_omit","require_omit","BreadcrumbService","SubscribableAbstract","Subject","position","title","singleton"],"sources":["../../../../src/classes/services/BreadcrumbService/BreadcrumbService.ts"],"sourcesContent":["import omit from 'lodash/omit';\nimport { Subject } from '@gen-epix/ui-core/classes/Subject';\nimport { SubscribableAbstract } from '@gen-epix/ui-core/classes/abstracts/SubscribableAbstract';\nimport { singleton } from 'tsyringe';\n\n\ntype SubjectData = Record<string, string>;\n\n@singleton()\nexport class BreadcrumbService extends SubscribableAbstract<SubjectData> {\n\n public constructor() {\n super(new Subject<SubjectData>({}));\n }\n\n public remove(position: string): void {\n this.subject.next({ ...omit(this.subject.data, position) });\n }\n\n public update(position: string, title: string): void {\n this.subject.next({ ...this.subject.data, [position]: title });\n }\n}\n"],"mappings":";;;;;;;A,mCASaM,IAAN,cAAgCC,EAAkC;CAEvE,cAAqB;EACnB,MAAM,IAAIC,EAAqB,CAAC,CAAC,CAAC;CACpC;CAEA,OAAc,GAAwB;EACpC,KAAK,QAAQ,KAAK,EAAE,IAAA,GAAGR,EAAAA,QAAAA,CAAK,KAAK,QAAQ,MAAMS,CAAQ,EAAE,CAAC;CAC5D;CAEA,OAAc,GAAkB,GAAqB;EACnD,KAAK,QAAQ,KAAK;GAAE,GAAG,KAAK,QAAQ;IAAOA,IAAWC;EAAM,CAAC;CAC/D;AACF;AAdC,IAAAT,EAAA,CAAAU,EAAU,CAAA,GAAAL,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","createCache","EmotionCacheService","windowService","config","singleton","__decorateParam","inject","CONFIG_TOKEN","WindowService"],"sources":["../../../../src/classes/services/EmotionCacheService/EmotionCacheService.ts"],"sourcesContent":["import type { EmotionCache } from '@emotion/cache';\nimport createCache from '@emotion/cache';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\n\n@singleton()\nexport class EmotionCacheService {\n public readonly emotionCache: EmotionCache;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(WindowService) windowService: WindowService,\n ) {\n this.emotionCache = createCache({\n container: windowService.document.head,\n key: 'genepix',\n nonce: config.nonce,\n prepend: !!config.nonce,\n stylisPlugins: [],\n });\n }\n}\n"],"mappings":";;;;;;;AAaO,IAAMI,IAAN,MAA0B;CAC/B;CAEA,YACE,GACA,GACA;EACA,KAAK,eAAeD,EAAY;GAC9B,WAAWE,EAAc,SAAS;GAClC,KAAK;GACL,OAAOC,EAAO;GACd,SAAS,CAAC,CAACA,EAAO;GAClB,eAAe,CAAC;EAClB,CAAC;CACH;AACF;;CAhBCC,EAAU;CAKNN,EAAA,GAAAQ,EAAOC,CAAY,CAAA;CACnBT,EAAA,GAAAQ,EAAOE,CAAa,CAAA"}
1
+ {"version":3,"file":"index.js","names":["_decorateParam","__decorate","createCache","EmotionCacheService","windowService","config","singleton","__decorateParam","inject","CONFIG_TOKEN","WindowService"],"sources":["../../../../src/classes/services/EmotionCacheService/EmotionCacheService.ts"],"sourcesContent":["import type { EmotionCache } from '@emotion/cache';\nimport createCache from '@emotion/cache';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\n\n@singleton()\nexport class EmotionCacheService {\n public readonly emotionCache: EmotionCache;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(WindowService) windowService: WindowService,\n ) {\n this.emotionCache = createCache({\n container: windowService.document.head,\n key: 'genepix',\n nonce: config.nonce,\n prepend: !!config.nonce,\n stylisPlugins: [],\n });\n }\n}\n"],"mappings":";;;;;;;AAaO,IAAMG,IAAN,MAA0B;CAC/B;CAEA,YACE,GACA,GACA;EACA,KAAK,eAAeD,EAAY;GAC9B,WAAWE,EAAc,SAAS;GAClC,KAAK;GACL,OAAOC,EAAO;GACd,SAAS,CAAC,CAACA,EAAO;GAClB,eAAe,CAAC;EAClB,CAAC;CACH;AACF;;CAhBCC,EAAU;CAKNN,EAAA,GAAAQ,EAAOC,CAAY,CAAA;CACnBT,EAAA,GAAAQ,EAAOE,CAAa,CAAA"}
@@ -1,21 +1,21 @@
1
1
  import { n as e, t } from "../../../_chunks/rolldown-runtime.js";
2
- import { TimeUtil as n } from "../../../utils/TimeUtil/index.js";
3
- import { a as r, t as i } from "../../../_chunks/isObject.js";
4
- import { t as a } from "../../../_chunks/isSymbol.js";
5
- import { CONFIG_TOKEN as o } from "../../../constants/config.constants.js";
6
- import { t as s } from "../../../_chunks/decorateParam.js";
7
- import { t as c } from "../../../_chunks/decorate.js";
8
- import { AuthenticationService as l } from "../AuthenticationService/index.js";
9
- import { LogService as u } from "../LogService/index.js";
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 n = r();
16
+ var r = n();
17
17
  t.exports = function() {
18
- return n.Date.now();
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(), r = i(), o = a(), s = NaN, c = /^[-+]0x[0-9a-f]+$/i, l = /^0b[01]+$/i, u = /^0o[0-7]+$/i, d = parseInt;
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 (r(e)) {
38
+ if (a(e)) {
39
39
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
40
- e = r(t) ? t + "" : t;
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 i = l.test(e);
45
- return i || u.test(e) ? d(e.slice(2), i ? 2 : 8) : c.test(e) ? s : +e;
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 = i(), r = g(), a = y(), o = "Expected a function", s = Math.max, c = Math.min;
50
- function l(e, t, i) {
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(i) && (g = !!i.leading, _ = "maxWait" in i, d = _ ? s(a(i.maxWait) || 0, t) : d, v = "trailing" in i ? !!i.trailing : v);
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 = r();
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(r());
81
+ return p === void 0 ? f : w(i());
82
82
  }
83
83
  function D() {
84
- var e = r(), n = S(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(), r = i(), a = "Expected a function";
96
- function o(e, t, i) {
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(i) && (o = "leading" in i ? !!i.leading : o, s = "trailing" in i ? !!i.trailing : s), n(e, t, {
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: n.getReadableTimeRemaining(this.idleDiff),
161
- readableNotificationDiff: n.getReadableTimeRemaining(this.notificationDiff)
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 = c([
168
+ S = u([
169
169
  f(),
170
- s(0, d(o)),
171
- s(1, d(u)),
172
- s(2, d(l))
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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AK,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,M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