@gen-epix/ui-client-common 4.5.0 → 4.6.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 (229) hide show
  1. package/README.md +5 -4
  2. package/dist/@types/mui.d.ts +13 -5
  3. package/dist/@types/ui-client-common.d.ts +1 -0
  4. package/dist/_chunks/ApplicationFooter.js +45 -46
  5. package/dist/_chunks/ApplicationFooter.js.map +1 -1
  6. package/dist/_chunks/Breadcrumbs.js +14 -15
  7. package/dist/_chunks/CrudPage.js +301 -302
  8. package/dist/_chunks/CrudPage.js.map +1 -1
  9. package/dist/_chunks/GeoFilter.js +1 -2
  10. package/dist/_chunks/GeoFilter.js.map +1 -1
  11. package/dist/_chunks/Notifications.js +52 -53
  12. package/dist/_chunks/OutageList.js +30 -31
  13. package/dist/_chunks/OutageList.js.map +1 -1
  14. package/dist/_chunks/OutageUtil.js +4 -8
  15. package/dist/_chunks/OutageUtil.js.map +1 -1
  16. package/dist/_chunks/QueryClientProvider.js +1 -2
  17. package/dist/_chunks/QueryClientProvider.js.map +1 -1
  18. package/dist/_chunks/QueryClientService.js +101 -395
  19. package/dist/_chunks/QueryClientService.js.map +1 -1
  20. package/dist/_chunks/Reflect.js +1 -2
  21. package/dist/_chunks/Table.js +523 -522
  22. package/dist/_chunks/Table.js.map +1 -1
  23. package/dist/_chunks/TableUtil.js +10 -20
  24. package/dist/_chunks/TableUtil.js.map +1 -1
  25. package/dist/_chunks/TextFilter.js +18 -20
  26. package/dist/_chunks/TextFilter.js.map +1 -1
  27. package/dist/_chunks/UserInvitationsAdminPage.js +78 -79
  28. package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
  29. package/dist/_chunks/UserManagerUtil.js +212 -213
  30. package/dist/_chunks/UserManagerUtil.js.map +1 -1
  31. package/dist/_chunks/_baseAssignValue.js +1 -2
  32. package/dist/_chunks/_baseFlatten.js +9 -10
  33. package/dist/_chunks/_baseFlatten.js.map +1 -1
  34. package/dist/_chunks/_baseGet.js +279 -0
  35. package/dist/_chunks/_baseGet.js.map +1 -0
  36. package/dist/_chunks/_baseIteratee.js +273 -0
  37. package/dist/_chunks/_baseIteratee.js.map +1 -0
  38. package/dist/_chunks/_baseUnset.js +22 -300
  39. package/dist/_chunks/_baseUnset.js.map +1 -1
  40. package/dist/_chunks/_cacheHas.js +1 -2
  41. package/dist/_chunks/_setToString.js +1 -2
  42. package/dist/_chunks/decorate.js +1 -2
  43. package/dist/_chunks/decorateParam.js +1 -2
  44. package/dist/_chunks/format.js +27 -54
  45. package/dist/_chunks/format.js.map +1 -1
  46. package/dist/_chunks/isArrayLike.js +1 -2
  47. package/dist/_chunks/isObject.js +1 -2
  48. package/dist/_chunks/isSymbol.js +1 -2
  49. package/dist/_chunks/last.js +12 -0
  50. package/dist/_chunks/last.js.map +1 -0
  51. package/dist/_chunks/middleware.js +2 -3
  52. package/dist/_chunks/middleware.js.map +1 -1
  53. package/dist/_chunks/omit.js +42 -42
  54. package/dist/_chunks/omit.js.map +1 -1
  55. package/dist/_chunks/query.js +8 -15
  56. package/dist/_chunks/query.js.map +1 -1
  57. package/dist/_chunks/react.js +2 -3
  58. package/dist/_chunks/react.js.map +1 -1
  59. package/dist/_chunks/rolldown-runtime.js +2 -3
  60. package/dist/_chunks/tableStore.js +231 -224
  61. package/dist/_chunks/tableStore.js.map +1 -1
  62. package/dist/_chunks/toDate.js +8 -14
  63. package/dist/_chunks/toDate.js.map +1 -1
  64. package/dist/_chunks/uniq.js +43 -0
  65. package/dist/_chunks/uniq.js.map +1 -0
  66. package/dist/_chunks/useColumnsMenu.js +3 -6
  67. package/dist/_chunks/useColumnsMenu.js.map +1 -1
  68. package/dist/_chunks/useMutation.js +24 -26
  69. package/dist/_chunks/useMutation.js.map +1 -1
  70. package/dist/_chunks/useQueryMemo.js +33 -22
  71. package/dist/_chunks/useQueryMemo.js.map +1 -1
  72. package/dist/_chunks/vanilla.js +1 -2
  73. package/dist/_chunks/vanilla.js.map +1 -1
  74. package/dist/_chunks/yup.js +2 -4
  75. package/dist/_chunks/yup.js.map +1 -1
  76. package/dist/classes/TableEventBus/index.js +1 -2
  77. package/dist/classes/abstracts/FilterAbstract/index.js +4 -3
  78. package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
  79. package/dist/classes/filters/MultiSelectFilter.d.ts +1 -1
  80. package/dist/classes/services/AuthenticationService/AuthenticationService.d.ts +1 -1
  81. package/dist/classes/services/AuthenticationService/index.js +15 -16
  82. package/dist/classes/services/AuthenticationService/index.js.map +1 -1
  83. package/dist/classes/services/AuthorizationService/index.js +5 -6
  84. package/dist/classes/services/AuthorizationService/index.js.map +1 -1
  85. package/dist/classes/services/BackendVersionService/index.js +4 -4
  86. package/dist/classes/services/BackendVersionService/index.js.map +1 -1
  87. package/dist/classes/services/BreadcrumbService/index.js +16 -39
  88. package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
  89. package/dist/classes/services/EmotionCacheService/index.js +10 -10
  90. package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
  91. package/dist/classes/services/FeatureFlagsService/index.js +1 -2
  92. package/dist/classes/services/I18nService/index.js +12 -12
  93. package/dist/classes/services/I18nService/index.js.map +1 -1
  94. package/dist/classes/services/InactivityService/index.js +13 -14
  95. package/dist/classes/services/InactivityService/index.js.map +1 -1
  96. package/dist/classes/services/LogService/index.js +40 -35
  97. package/dist/classes/services/LogService/index.js.map +1 -1
  98. package/dist/classes/services/NavigationHistoryService/index.js +1 -2
  99. package/dist/classes/services/NotificationService/index.js +9 -10
  100. package/dist/classes/services/NotificationService/index.js.map +1 -1
  101. package/dist/classes/services/PageEventBusService/index.js +14 -11
  102. package/dist/classes/services/PageEventBusService/index.js.map +1 -1
  103. package/dist/classes/services/RouterService/index.js +4 -8
  104. package/dist/classes/services/RouterService/index.js.map +1 -1
  105. package/dist/classes/services/UserSettingsService/index.js +1 -2
  106. package/dist/components/app/App/App.d.ts +1 -1
  107. package/dist/components/app/App/index.js +35 -40
  108. package/dist/components/app/App/index.js.map +1 -1
  109. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +29 -30
  110. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
  111. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +48 -47
  112. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
  113. package/dist/components/app/AuthenticationWrapper/index.js +36 -37
  114. package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
  115. package/dist/components/app/AuthorizationWrapper/index.js +20 -21
  116. package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
  117. package/dist/components/app/RouterRoot/index.js +53 -52
  118. package/dist/components/app/RouterRoot/index.js.map +1 -1
  119. package/dist/components/epi/EpiContactDetailsDialog/index.js +22 -23
  120. package/dist/components/filters/BooleanFilterField/index.js +6 -7
  121. package/dist/components/filters/DateFilterField/index.js +4 -5
  122. package/dist/components/filters/GeoFilterField/index.js +5 -6
  123. package/dist/components/filters/MultiSelectFilterField/index.js +5 -6
  124. package/dist/components/filters/NumberRangeFilterField/index.js +4 -5
  125. package/dist/components/filters/TextFilterField/index.js +4 -5
  126. package/dist/components/ui/ApplicationBar/index.js +189 -190
  127. package/dist/components/ui/ApplicationBar/index.js.map +1 -1
  128. package/dist/components/ui/ConsentDialog/index.js +1 -2
  129. package/dist/components/ui/GenericErrorMessage/index.js +30 -31
  130. package/dist/components/ui/LicensesDialog/index.js +39 -40
  131. package/dist/components/ui/LicensesDialog/index.js.map +1 -1
  132. package/dist/components/ui/MyPermissionsDialog/index.js +17 -18
  133. package/dist/components/ui/NavLink/index.js +7 -8
  134. package/dist/components/ui/OrganizationSwitcherDialog/index.js +22 -23
  135. package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
  136. package/dist/components/ui/OutagesDialog/index.js +1 -2
  137. package/dist/components/ui/PageContainer/index.js +25 -26
  138. package/dist/components/ui/PageContainer/index.js.map +1 -1
  139. package/dist/components/ui/ResponseHandler/index.js +1 -2
  140. package/dist/components/ui/Sidebar/index.js +31 -32
  141. package/dist/components/ui/UserFeedbackDialog/index.js +13 -14
  142. package/dist/components/ui/UserInactivityConfirmation/index.js +1 -2
  143. package/dist/constants/api.constants.js +1 -2
  144. package/dist/constants/config.constants.d.ts +0 -2
  145. package/dist/constants/config.constants.js +3 -4
  146. package/dist/constants/config.constants.js.map +1 -1
  147. package/dist/constants/query.constants.js +1 -2
  148. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +13 -14
  149. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js.map +1 -1
  150. package/dist/dataHooks/useIdentifierIssuerQuery/index.js +15 -16
  151. package/dist/dataHooks/useIdentifierIssuerQuery/index.js.map +1 -1
  152. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +13 -14
  153. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
  154. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +14 -15
  155. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js.map +1 -1
  156. package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +5 -6
  157. package/dist/dataHooks/useOrganizationsQuery/index.js +14 -15
  158. package/dist/dataHooks/useOrganizationsQuery/index.js.map +1 -1
  159. package/dist/dataHooks/useUsersQuery/index.js +11 -12
  160. package/dist/dataHooks/useUsersQuery/index.js.map +1 -1
  161. package/dist/hoc/withPermissions/index.js +1 -2
  162. package/dist/hooks/useConfig/index.js +3 -4
  163. package/dist/hooks/useConfig/index.js.map +1 -1
  164. package/dist/hooks/useCreateMutation/index.js +13 -14
  165. package/dist/hooks/useCreateMutation/index.js.map +1 -1
  166. package/dist/hooks/useDeleteMutation/index.js +17 -11
  167. package/dist/hooks/useDeleteMutation/index.js.map +1 -1
  168. package/dist/hooks/useEditMutation/index.js +49 -35
  169. package/dist/hooks/useEditMutation/index.js.map +1 -1
  170. package/dist/hooks/useInitializeTableStore/index.js +1 -2
  171. package/dist/hooks/useItemQuery/index.js +5 -6
  172. package/dist/hooks/useItemQuery/index.js.map +1 -1
  173. package/dist/hooks/useUpdateBreadcrumb/index.js +1 -2
  174. package/dist/hooks/useUpdateDocumentTitle/index.js +1 -2
  175. package/dist/locale/en.json +1 -0
  176. package/dist/locale/nl.json +1 -0
  177. package/dist/models/admin.models.js +1 -2
  178. package/dist/models/admin.models.js.map +1 -1
  179. package/dist/models/config.models.d.ts +1 -5
  180. package/dist/models/table.models.js +1 -2
  181. package/dist/models/table.models.js.map +1 -1
  182. package/dist/models/theme.models.d.ts +19 -16
  183. package/dist/pages/AcceptInvitationPage/index.js +26 -27
  184. package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
  185. package/dist/pages/AdminPage/index.js +17 -18
  186. package/dist/pages/ChooseIdentityProviderPage/index.js +22 -23
  187. package/dist/pages/ErrorPage/index.js +1 -2
  188. package/dist/pages/IdentifierIssuersAdminPage/index.js +6 -7
  189. package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +6 -7
  190. package/dist/pages/OrganizationContactsAdminPage/index.js +7 -8
  191. package/dist/pages/OrganizationSitesAdminPage/index.js +10 -11
  192. package/dist/pages/OrganizationsAdminPage/index.js +14 -15
  193. package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
  194. package/dist/pages/OutagesAdminPage/index.js +21 -22
  195. package/dist/pages/PostLoginPage/index.js +8 -9
  196. package/dist/pages/PostLoginPage/index.js.map +1 -1
  197. package/dist/pages/PostLogoutPage/index.js +9 -10
  198. package/dist/pages/RouterErrorPage/index.js +1 -2
  199. package/dist/pages/UsersAdminPage/index.js +40 -41
  200. package/dist/pages/UsersAdminPage/index.js.map +1 -1
  201. package/dist/routes/index.js +1 -2
  202. package/dist/setup/setup.js +12 -6
  203. package/dist/setup/setup.js.map +1 -1
  204. package/dist/stores/oidcStore/index.js +1 -2
  205. package/dist/stores/outagesStore/index.js +1 -2
  206. package/dist/theme/demoTheme/index.js +18 -17
  207. package/dist/theme/demoTheme/index.js.map +1 -1
  208. package/dist/utils/AxiosUtil/index.js +1 -2
  209. package/dist/utils/DataHookUtil/index.js +2 -3
  210. package/dist/utils/DataHookUtil/index.js.map +1 -1
  211. package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +2 -3
  212. package/dist/utils/DependencyContainerUtil/index.js +10 -16
  213. package/dist/utils/DependencyContainerUtil/index.js.map +1 -1
  214. package/dist/utils/LoadableUtil/index.js +1 -2
  215. package/dist/utils/MenuDataUtil/index.js +2 -3
  216. package/dist/utils/MenuDataUtil/index.js.map +1 -1
  217. package/dist/utils/NotificationUtil/index.js +1 -2
  218. package/dist/utils/StandardConfigUtil/index.js +1 -6
  219. package/dist/utils/StandardConfigUtil/index.js.map +1 -1
  220. package/dist/utils/TimeUtil/index.js +2 -3
  221. package/dist/utils/TimeUtil/index.js.map +1 -1
  222. package/dist/utils/UserUtil/index.js +1 -2
  223. package/package.json +26 -29
  224. package/dist/context/ClientCommonConfigContext/ClientCommonConfigContext.d.ts +0 -9
  225. package/dist/context/ClientCommonConfigContext/ClientCommonConfigContextProvider.d.ts +0 -6
  226. package/dist/context/ClientCommonConfigContext/index.d.ts +0 -3
  227. package/dist/context/ClientCommonConfigContext/index.js +0 -34
  228. package/dist/context/ClientCommonConfigContext/index.js.map +0 -1
  229. package/dist/context/ClientCommonConfigContext/useClientCommonConfigContext.d.ts +0 -3
@@ -1,11 +1,11 @@
1
- import { t as e } from "../../../_chunks/decorate.js";
2
- import { CONFIG_TOKEN as t } from "../../../constants/config.constants.js";
3
- import { t as n } from "../../../_chunks/decorateParam.js";
4
- import { StringUtil as r } from "@gen-epix/ui-core/utils/StringUtil";
5
- import { inject as i, singleton as a } from "tsyringe";
1
+ import { CONFIG_TOKEN as e } from "../../../constants/config.constants.js";
2
+ import { t } from "../../../_chunks/decorateParam.js";
3
+ import { t as n } from "../../../_chunks/decorate.js";
4
+ import { inject as r, singleton as i } from "tsyringe";
5
+ import { StringUtil as a } from "@gen-epix/ui-core/utils/StringUtil";
6
6
  import { Subject as o } from "@gen-epix/ui-core/classes/Subject";
7
7
  import { SubscribableAbstract as s } from "@gen-epix/ui-core/classes/abstracts/SubscribableAbstract";
8
- //#region src/classes/services/NotificationService/NotificationService.ts
8
+ // src/classes/services/NotificationService/NotificationService.ts
9
9
  var c = class extends s {
10
10
  config;
11
11
  notificationTimeouts;
@@ -41,7 +41,7 @@ var c = class extends s {
41
41
  } : t)), clearTimeout(this.notificationTimeouts[e]), delete this.notificationTimeouts[e];
42
42
  }
43
43
  showNotification(e) {
44
- let t = r.createUuid(), n = e.autoHideAfterMs ?? this.config.notifications.autoHideAfterMs;
44
+ let t = a.createUuid(), n = e.autoHideAfterMs ?? this.config.notifications.autoHideAfterMs;
45
45
  return this.subject.next([{
46
46
  ...e,
47
47
  autoHideAfterMs: n,
@@ -49,15 +49,14 @@ var c = class extends s {
49
49
  timestamp: (/* @__PURE__ */ new Date()).getTime(),
50
50
  visible: !0
51
51
  }, ...this.subject.data]), isFinite(n) && (this.notificationTimeouts[t] = setTimeout(() => {
52
- this.subject.next(this.subject.data.map((e) => e.key === t ? {
52
+ delete this.notificationTimeouts[t], this.subject.next(this.subject.data.map((e) => e.key === t ? {
53
53
  ...e,
54
54
  visible: !1
55
55
  } : e));
56
56
  }, n)), t;
57
57
  }
58
58
  };
59
- c = e([a(), n(0, i(t))], c);
60
- //#endregion
59
+ c = n([i(), t(0, r(e))], c);
61
60
  export { c as NotificationService };
62
61
 
63
62
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","__decorateParam","NotificationService","SubscribableAbstract","Subject","config","x","key","StringUtil","autoHideAfterMs","notification","singleton","inject","CONFIG_TOKEN"],"sources":["../../../../src/classes/services/NotificationService/NotificationService.ts"],"sourcesContent":["import { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport { SubscribableAbstract } from '@gen-epix/ui-core/classes/abstracts/SubscribableAbstract';\nimport { Subject } from '@gen-epix/ui-core/classes/Subject';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport type { Notification } from '../../../models/notification.models';\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\n@singleton()\nexport class NotificationService extends SubscribableAbstract<Notification[]> {\n private readonly config: Pick<ConfigBase, 'notifications'>;\n private readonly notificationTimeouts: Record<string, ReturnType<typeof setTimeout>>;\n\n public constructor(@inject(CONFIG_TOKEN) config: ConfigBase) {\n super(new Subject<Notification[]>([]));\n this.config = config;\n this.notificationTimeouts = {};\n }\n\n\n public clearNotification(key: string): void {\n this.subject.next(this.subject.data.filter(x => x.key !== key));\n if (this.notificationTimeouts[key]) {\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n }\n }\n\n public clearNotifications(): void {\n this.subject.next([]);\n Object.keys(this.notificationTimeouts).forEach(key => {\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n });\n }\n\n public fulfillNotification(key: string, message: Notification['message'], severity: Notification['severity']): void {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n isLoading: false,\n message,\n severity,\n };\n }\n return x;\n }));\n }\n\n public hideAllNotifications(): void {\n this.subject.next(this.subject.data.map(x => ({\n ...x,\n visible: false,\n })));\n }\n\n public hideNotification(key: string): void {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n visible: false,\n };\n }\n return x;\n }));\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n }\n\n public showNotification(notification: Omit<Notification, 'key' | 'timestamp' | 'visible'>): string {\n const key = StringUtil.createUuid();\n const autoHideAfterMs = notification.autoHideAfterMs ?? this.config.notifications.autoHideAfterMs;\n\n this.subject.next([\n {\n ...notification,\n autoHideAfterMs,\n key,\n timestamp: new Date().getTime(),\n visible: true,\n },\n ...this.subject.data,\n ]);\n\n if (isFinite(autoHideAfterMs)) {\n this.notificationTimeouts[key] = setTimeout(() => {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n visible: false,\n };\n }\n return x;\n }));\n }, autoHideAfterMs);\n }\n return key;\n }\n}\n"],"mappings":";;;;;;;;AAaO,IAAMI,IAAN,cAAkCC,EAAqC;CAC5E;CACA;CAEA,YAAmB,GAA0C;EAG3D,AAFA,MAAM,IAAIC,EAAwB,CAAC,CAAC,CAAC,GACrC,KAAK,SAASC,GACd,KAAK,uBAAuB,CAAC;CAC/B;CAGA,kBAAyB,GAAmB;EAE1C,AADA,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,QAAO,MAAKC,EAAE,QAAQC,CAAG,CAAC,GAC1D,KAAK,qBAAqBA,OAC5B,aAAa,KAAK,qBAAqBA,EAAI,GAC3C,OAAO,KAAK,qBAAqBA;CAErC;CAEA,qBAAkC;EAEhC,AADA,KAAK,QAAQ,KAAK,CAAC,CAAC,GACpB,OAAO,KAAK,KAAK,oBAAoB,CAAC,CAAC,SAAQ,MAAO;GAEpD,AADA,aAAa,KAAK,qBAAqBA,EAAI,GAC3C,OAAO,KAAK,qBAAqBA;EACnC,CAAC;CACH;CAEA,oBAA2B,GAAa,GAAkC,GAA0C;EAClH,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,MAClCD,EAAE,QAAQC,IACL;GACL,GAAGD;GACH,WAAW;GACX;GACA;EACF,IAEKA,CACR,CAAC;CACJ;CAEA,uBAAoC;EAClC,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,OAAM;GAC5C,GAAGA;GACH,SAAS;EACX,EAAE,CAAC;CACL;CAEA,iBAAwB,GAAmB;EAWzC,AAVA,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,MAClCA,EAAE,QAAQC,IACL;GACL,GAAGD;GACH,SAAS;EACX,IAEKA,CACR,CAAC,GACF,aAAa,KAAK,qBAAqBC,EAAI,GAC3C,OAAO,KAAK,qBAAqBA;CACnC;CAEA,iBAAwB,GAA2E;EACjG,IAAMA,IAAMC,EAAW,WAAW,GAC5BC,IAAkBC,EAAa,mBAAmB,KAAK,OAAO,cAAc;EA0BlF,OAxBA,KAAK,QAAQ,KAAK,CAChB;GACE,GAAGA;GACH;GACA;GACA,4BAAW,IAAI,KAAK,EAAA,CAAE,QAAQ;GAC9B,SAAS;EACX,GACA,GAAG,KAAK,QAAQ,IAClB,CAAC,GAEG,SAASD,CAAe,MAC1B,KAAK,qBAAqBF,KAAO,iBAAiB;GAChD,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,MAClCD,EAAE,QAAQC,IACL;IACL,GAAGD;IACH,SAAS;GACX,IAEKA,CACR,CAAC;EACJ,GAAGG,CAAe,IAEbF;CACT;AACF;AA7FC,IAAAT,EAAA,CAAAa,EAAU,GAAAZ,EAAA,GAKWa,EAAOC,CAAY,CAAA,CAAA,GAAAX,CAAA"}
1
+ {"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","NotificationService","SubscribableAbstract","Subject","config","x","key","StringUtil","autoHideAfterMs","notification","singleton","__decorateParam","inject","CONFIG_TOKEN"],"sources":["../../../../src/classes/services/NotificationService/NotificationService.ts"],"sourcesContent":["import { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport { SubscribableAbstract } from '@gen-epix/ui-core/classes/abstracts/SubscribableAbstract';\nimport { Subject } from '@gen-epix/ui-core/classes/Subject';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport type { Notification } from '../../../models/notification.models';\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\n@singleton()\nexport class NotificationService extends SubscribableAbstract<Notification[]> {\n private readonly config: Pick<ConfigBase, 'notifications'>;\n private readonly notificationTimeouts: Record<string, ReturnType<typeof setTimeout>>;\n\n public constructor(@inject(CONFIG_TOKEN) config: ConfigBase) {\n super(new Subject<Notification[]>([]));\n this.config = config;\n this.notificationTimeouts = {};\n }\n\n\n public clearNotification(key: string): void {\n this.subject.next(this.subject.data.filter(x => x.key !== key));\n if (this.notificationTimeouts[key]) {\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n }\n }\n\n public clearNotifications(): void {\n this.subject.next([]);\n Object.keys(this.notificationTimeouts).forEach(key => {\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n });\n }\n\n public fulfillNotification(key: string, message: Notification['message'], severity: Notification['severity']): void {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n isLoading: false,\n message,\n severity,\n };\n }\n return x;\n }));\n }\n\n public hideAllNotifications(): void {\n this.subject.next(this.subject.data.map(x => ({\n ...x,\n visible: false,\n })));\n }\n\n public hideNotification(key: string): void {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n visible: false,\n };\n }\n return x;\n }));\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n }\n\n public showNotification(notification: Omit<Notification, 'key' | 'timestamp' | 'visible'>): string {\n const key = StringUtil.createUuid();\n const autoHideAfterMs = notification.autoHideAfterMs ?? this.config.notifications.autoHideAfterMs;\n\n this.subject.next([\n {\n ...notification,\n autoHideAfterMs,\n key,\n timestamp: new Date().getTime(),\n visible: true,\n },\n ...this.subject.data,\n ]);\n\n if (isFinite(autoHideAfterMs)) {\n this.notificationTimeouts[key] = setTimeout(() => {\n delete this.notificationTimeouts[key];\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n visible: false,\n };\n }\n return x;\n }));\n }, autoHideAfterMs);\n }\n return key;\n }\n}\n"],"mappings":";;;;;;;;AAaO,IAAMG,IAAN,cAAkCC,EAAqC;CAC5E;CACA;CAEA,YAAmB,GAA0C;EAG3D,AAFA,MAAM,IAAIC,EAAwB,CAAC,CAAC,CAAC,GACrC,KAAK,SAASC,GACd,KAAK,uBAAuB,CAAC;CAC/B;C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EhD,AADA,OAAO,KAAK,qBAAqBA,IACjC,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,MAClCD,EAAE,QAAQC,IACL;IACL,GAAGD;IACH,SAAS;GACX,IAEKA,CACR,CAAC;EACJ,GAAGG,CAAe,IAEbF;CACT;AACF;AA9FC,IAAAR,EAAA,CAAAY,EAAU,GAAAX,EAAA,GAKWa,EAAOC,CAAY,CAAA,CAAA,GAAAZ,CAAA"}
@@ -1,9 +1,10 @@
1
- import { t as e } from "../../../_chunks/decorate.js";
2
- import { CONFIG_TOKEN as t, WINDOW_SERVICE_TOKEN as n } from "../../../constants/config.constants.js";
3
- import { t as r } from "../../../_chunks/decorateParam.js";
4
- import { inject as i, singleton as a } from "tsyringe";
1
+ import { CONFIG_TOKEN as e } from "../../../constants/config.constants.js";
2
+ import { t } from "../../../_chunks/decorateParam.js";
3
+ import { t as n } from "../../../_chunks/decorate.js";
4
+ import { inject as r, singleton as i } from "tsyringe";
5
+ import { WindowService as a } from "@gen-epix/ui-core/classes/services/WindowService";
5
6
  import { EventBusAbstract as o } from "@gen-epix/ui-core/classes/abstracts/EventBusAbstract";
6
- //#region src/classes/services/PageEventBusService/PageEventBusService.ts
7
+ // src/classes/services/PageEventBusService/PageEventBusService.ts
7
8
  var s = class extends o {
8
9
  lastPageEventPayload = null;
9
10
  windowService;
@@ -54,16 +55,18 @@ var s = class extends o {
54
55
  }
55
56
  traverseDom(e, t) {
56
57
  if (t(e)) return e;
57
- for (let n of Array.from(e.childNodes)) if (this.traverseDom(n, t)) return n;
58
+ for (let n of Array.from(e.childNodes)) {
59
+ let e = this.traverseDom(n, t);
60
+ if (e) return e;
61
+ }
58
62
  return null;
59
63
  }
60
64
  };
61
- s = e([
62
- a(),
63
- r(0, i(t)),
64
- r(1, i(n))
65
+ s = n([
66
+ i(),
67
+ t(0, r(e)),
68
+ t(1, r(a))
65
69
  ], s);
66
- //#endregion
67
70
  export { s as PageEventBusService };
68
71
 
69
72
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","__decorateParam","PageEventBusService","EventBusAbstract","windowService","config","eventName","payload","enablePageEvents","closestButton","event","closestLink","closestElement","context","buttonTitle","childTextNode","el","nodeWithText","predicate","element","child","singleton","inject","CONFIG_TOKEN","WINDOW_SERVICE_TOKEN"],"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 type { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport {\n CONFIG_TOKEN,\n WINDOW_SERVICE_TOKEN,\n} 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(WINDOW_SERVICE_TOKEN) 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 child as HTMLElement;\n }\n }\n return null;\n }\n}\n"],"mappings":";;;;;;AAgCO,IAAMI,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,M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AsBF,CACjD,GACF,OAAOE;EAGX,OAAO;CACT;AACF;;CA5FCC,EAAU;CAMNtB,EAAA,GAAAuB,EAAOC,CAAY,CAAA;CACnBxB,EAAA,GAAAuB,EAAOE,CAAoB,CAAA"}
1
+ {"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","PageEventBusService","EventBusAbstract","windowService","config","eventName","payload","enablePageEvents","closestButton","event","closestLink","closestElement","context","buttonTitle","childTextNode","el","nodeWithText","predicate","element","child","found","singleton","__decorateParam","inject","CONFIG_TOKEN","WindowService"],"sources":["../../../../src/classes/services/PageEventBusService/PageEventBusService.ts"],"sourcesContent":["import type { CommonDbUser } from '@gen-epix/api-commondb';\nimport { EventBusAbstract } from '@gen-epix/ui-core/classes/abstracts/EventBusAbstract';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\ntype EpiEvent = {\n changePage: Page;\n changeUser: CommonDbUser;\n click: {\n context?: string;\n label: string;\n page?: Page;\n type: 'button' | 'link' | 'table-row-index' | 'table-row';\n };\n error: Error;\n};\n\ntype Page = {\n location: Location;\n pageName: string;\n};\n\n@singleton()\nexport class PageEventBusService extends EventBusAbstract<EpiEvent> {\n private lastPageEventPayload: string = null;\n private readonly windowService: WindowService;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(WindowService) windowService: WindowService,\n ) {\n super();\n this.windowService = windowService;\n this.setupClickEventListener(config.enablePageEvents);\n }\n\n\n public emit<TEventName extends keyof EpiEvent>(eventName: TEventName, payload?: EpiEvent[TEventName]): void {\n if (eventName === 'changePage') {\n if (this.lastPageEventPayload === (payload as EpiEvent['changePage']).pageName) {\n return;\n }\n this.lastPageEventPayload = (payload as EpiEvent['changePage']).pageName;\n }\n\n if (eventName === 'click' && !(payload as EpiEvent['click']).page) {\n (payload as EpiEvent['click']).page = this.getPage();\n }\n\n super.emit(eventName, payload);\n }\n\n public getPage(): Page {\n return {\n location: this.windowService.window.location,\n pageName: document.querySelector('[data-page-container]')?.getAttribute('data-testid'),\n };\n }\n\n private setupClickEventListener(enablePageEvents: boolean): void {\n if (!enablePageEvents) {\n return;\n }\n this.windowService.window.addEventListener('click', (event: Event): void => {\n\n const closestButton = (event.target as HTMLElement).closest('button');\n const closestLink = (event.target as HTMLElement).closest('a');\n const closestElement = closestButton || closestLink;\n\n if (closestElement) {\n const context = closestElement?.closest('[data-testid]')?.getAttribute('data-testid') ?? '';\n\n const buttonTitle = closestElement.getAttribute('aria-label') ?? closestElement.getAttribute('title');\n if (buttonTitle) {\n this.emit('click', {\n context,\n label: buttonTitle,\n type: closestButton ? 'button' : 'link',\n });\n } else {\n const childTextNode = this.traverseDom(closestElement, (el) => el.nodeType === Node.TEXT_NODE);\n if (childTextNode?.nodeValue) {\n this.emit('click', {\n context,\n label: childTextNode?.nodeValue,\n type: closestButton ? 'button' : 'link',\n });\n } else {\n const nodeWithText = this.traverseDom(closestElement, (el) => !!el.innerText);\n if (nodeWithText?.innerText) {\n this.emit('click', {\n context,\n label: nodeWithText?.innerText.split('\\n')[0],\n type: closestButton ? 'button' : 'link',\n });\n }\n }\n }\n }\n });\n }\n\n private traverseDom(element: HTMLElement, predicate: (element: HTMLElement) => boolean): HTMLElement {\n if (predicate(element)) {\n return element;\n }\n for (const child of Array.from(element.childNodes)) {\n const found = this.traverseDom(child as HTMLElement, predicate);\n if (found) {\n return found;\n }\n }\n return null;\n }\n}\n"],"mappings":";;;;;;;AA6BO,IAAMG,IAAN,cAAkCC,EAA2B;CAClE,uBAAuC;CACvC;CAEA,YACE,GACA,GACA;EAGA,AAFA,MAAM,GACN,KAAK,gBAAgBC,GACrB,KAAK,wBAAwBC,EAAO,gBAAgB;CACtD;CAGA,KAA+C,GAAuB,GAAsC;EAC1G,IAAIC,MAAc,cAAc;GAC9B,IAAI,KAAK,yBAA0BC,EAAmC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,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,29 +1,26 @@
1
1
  import { t as e } from "../../../_chunks/decorate.js";
2
2
  import { singleton as t } from "tsyringe";
3
3
  import { createBrowserRouter as n } from "react-router-dom";
4
- //#region src/classes/services/RouterService/RouterService.ts
4
+ // src/classes/services/RouterService/RouterService.ts
5
5
  var r = class {
6
6
  get adminRoutes() {
7
- if (!this.__adminRoutesFactory) throw Error("RouterService not initialized");
8
7
  return this.__adminRoutes ??= this.__adminRoutesFactory(), this.__adminRoutes;
9
8
  }
10
9
  get homePageComponent() {
11
- if (!this.__homePageComponent) throw Error("RouterService not initialized");
12
10
  return this.__homePageComponent;
13
11
  }
14
12
  get router() {
15
13
  return this.__router ||= n(this.routes), this.__router;
16
14
  }
17
15
  get routes() {
18
- if (!this.__routesFactory) throw Error("RouterService not initialized");
19
16
  return this.__routes ??= this.__routesFactory(), this.__routes;
20
17
  }
21
18
  __adminRoutes = null;
22
- __adminRoutesFactory = null;
23
- __homePageComponent = null;
19
+ __adminRoutesFactory;
20
+ __homePageComponent;
24
21
  __router = null;
25
22
  __routes = null;
26
- __routesFactory = null;
23
+ __routesFactory;
27
24
  constructor(e) {
28
25
  this.__homePageComponent = e.homePageComponent, this.__adminRoutesFactory = this.createRoutesFactory(e.adminRoutes), this.__routesFactory = this.createRoutesFactory(e.routes);
29
26
  }
@@ -32,7 +29,6 @@ var r = class {
32
29
  }
33
30
  };
34
31
  r = e([t()], r);
35
- //#endregion
36
32
  export { r as RouterService };
37
33
 
38
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_decorate","__decorate","RouterService","createBrowserRouter","kwArgs","routes","singleton"],"sources":["../../../../src/classes/services/RouterService/RouterService.ts"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { createBrowserRouter } from 'react-router-dom';\nimport { singleton } from 'tsyringe';\n\nimport type { MyNonIndexRouteObject } from '../../../models/react-router.models';\n\ntype HomePage = () => ReactElement;\ntype RoutesFactory = () => MyNonIndexRouteObject[];\ntype RoutesInput = MyNonIndexRouteObject[] | RoutesFactory;\n\n@singleton()\nexport class RouterService {\n public get adminRoutes(): MyNonIndexRouteObject[] {\n if (!this.__adminRoutesFactory) {\n throw new Error('RouterService not initialized');\n }\n this.__adminRoutes ??= this.__adminRoutesFactory();\n return this.__adminRoutes;\n }\n public get homePageComponent(): HomePage {\n if (!this.__homePageComponent) {\n throw new Error('RouterService not initialized');\n }\n return this.__homePageComponent;\n }\n public get router(): ReturnType<typeof createBrowserRouter> {\n if (!this.__router) {\n this.__router = createBrowserRouter(this.routes);\n }\n return this.__router;\n }\n public get routes(): MyNonIndexRouteObject[] {\n if (!this.__routesFactory) {\n throw new Error('RouterService not initialized');\n }\n this.__routes ??= this.__routesFactory();\n return this.__routes;\n }\n private __adminRoutes: MyNonIndexRouteObject[] | null = null;\n private readonly __adminRoutesFactory: null | RoutesFactory = null;\n\n private readonly __homePageComponent: HomePage | null = null;\n\n private __router: null | ReturnType<typeof createBrowserRouter> = null;\n\n private __routes: MyNonIndexRouteObject[] | null = null;\n\n private readonly __routesFactory: null | RoutesFactory = null;\n\n public constructor(kwArgs: {\n adminRoutes: RoutesInput;\n homePageComponent: HomePage;\n routes: RoutesInput;\n }) {\n this.__homePageComponent = kwArgs.homePageComponent;\n this.__adminRoutesFactory = this.createRoutesFactory(kwArgs.adminRoutes);\n this.__routesFactory = this.createRoutesFactory(kwArgs.routes);\n }\n\n\n private createRoutesFactory(routes: RoutesInput): RoutesFactory {\n if (typeof routes === 'function') {\n return routes;\n }\n return () => routes;\n }\n}\n"],"mappings":";;;;AAWO,IAAME,IAAN,MAAoB;CACzB,IAAW,cAAuC;EAChD,IAAI,CAAC,KAAK,sBACR,MAAU,MAAM,+BAA+B;EAGjD,OADA,KAAK,kBAAkB,KAAK,qBAAqB,GAC1C,KAAK;CACd;CACA,IAAW,oBAA8B;EACvC,IAAI,CAAC,KAAK,qBACR,MAAU,MAAM,+BAA+B;EAEjD,OAAO,KAAK;CACd;CACA,IAAW,SAAiD;EAI1D,OAHA,AACE,KAAK,aAAWC,EAAoB,KAAK,MAAM,GAE1C,KAAK;CACd;CACA,IAAW,SAAkC;EAC3C,IAAI,CAAC,KAAK,iBACR,MAAU,MAAM,+BAA+B;EAGjD,OADA,KAAK,aAAa,KAAK,gBAAgB,GAChC,KAAK;CACd;CACA,gBAAwD;CACxD,uBAA8D;CAE9D,sBAAwD;CAExD,WAAkE;CAElE,WAAmD;CAEnD,kBAAyD;CAEzD,YAAmB,GAIhB;EAGD,AAFA,KAAK,sBAAsBC,EAAO,mBAClC,KAAK,uBAAuB,KAAK,oBAAoBA,EAAO,WAAW,GACvE,KAAK,kBAAkB,KAAK,oBAAoBA,EAAO,MAAM;CAC/D;CAGA,oBAA4B,GAAoC;EAI9D,OAHI,OAAOC,KAAW,aACbA,UAEIA;CACf;AACF;AAxDC,IAAAL,EAAA,CAAAM,EAAU,CAAA,GAAAJ,CAAA"}
1
+ {"version":3,"file":"index.js","names":["_decorate","__decorate","RouterService","createBrowserRouter","kwArgs","routes","singleton"],"sources":["../../../../src/classes/services/RouterService/RouterService.ts"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { createBrowserRouter } from 'react-router-dom';\nimport { singleton } from 'tsyringe';\n\nimport type { MyNonIndexRouteObject } from '../../../models/react-router.models';\n\ntype HomePage = () => ReactElement;\ntype RoutesFactory = () => MyNonIndexRouteObject[];\ntype RoutesInput = MyNonIndexRouteObject[] | RoutesFactory;\n\n@singleton()\nexport class RouterService {\n public get adminRoutes(): MyNonIndexRouteObject[] {\n this.__adminRoutes ??= this.__adminRoutesFactory();\n return this.__adminRoutes;\n }\n public get homePageComponent(): HomePage {\n return this.__homePageComponent;\n }\n public get router(): ReturnType<typeof createBrowserRouter> {\n if (!this.__router) {\n this.__router = createBrowserRouter(this.routes);\n }\n return this.__router;\n }\n public get routes(): MyNonIndexRouteObject[] {\n this.__routes ??= this.__routesFactory();\n return this.__routes;\n }\n private __adminRoutes: MyNonIndexRouteObject[] | null = null;\n private readonly __adminRoutesFactory: RoutesFactory;\n\n private readonly __homePageComponent: HomePage;\n\n private __router: null | ReturnType<typeof createBrowserRouter> = null;\n\n private __routes: MyNonIndexRouteObject[] | null = null;\n\n private readonly __routesFactory: RoutesFactory;\n\n public constructor(kwArgs: {\n adminRoutes: RoutesInput;\n homePageComponent: HomePage;\n routes: RoutesInput;\n }) {\n this.__homePageComponent = kwArgs.homePageComponent;\n this.__adminRoutesFactory = this.createRoutesFactory(kwArgs.adminRoutes);\n this.__routesFactory = this.createRoutesFactory(kwArgs.routes);\n }\n\n\n private createRoutesFactory(routes: RoutesInput): RoutesFactory {\n if (typeof routes === 'function') {\n return routes;\n }\n return () => routes;\n }\n}\n"],"mappings":";;;;AAWO,IAAME,IAAN,MAAoB;CACzB,IAAW,cAAuC;EAEhD,OADA,KAAK,kBAAkB,KAAK,qBAAqB,GAC1C,KAAK;CACd;CACA,IAAW,oBAA8B;EACvC,OAAO,KAAK;CACd;CACA,IAAW,SAAiD;EAI1D,OAHA,AACE,KAAK,aAAWC,EAAoB,KAAK,MAAM,GAE1C,KAAK;CACd;CACA,IAAW,SAAkC;EAE3C,OADA,KAAK,aAAa,KAAK,gBAAgB,GAChC,KAAK;CACd;CACA,gBAAwD;CACxD;CAEA;CAEA,WAAkE;CAElE,WAAmD;CAEnD;CAEA,YAAmB,GAIhB;EAGD,AAFA,KAAK,sBAAsBC,EAAO,mBAClC,KAAK,uBAAuB,KAAK,oBAAoBA,EAAO,WAAW,GACvE,KAAK,kBAAkB,KAAK,oBAAoBA,EAAO,MAAM;CAC/D;CAGA,oBAA4B,GAAoC;EAI9D,OAHI,OAAOC,KAAW,aACbA,UAEIA;CACf;AACF;AA/CC,IAAAL,EAAA,CAAAM,EAAU,CAAA,GAAAJ,CAAA"}
@@ -1,11 +1,10 @@
1
1
  import { t as e } from "../../../_chunks/decorate.js";
2
2
  import { singleton as t } from "tsyringe";
3
- //#region src/classes/services/UserSettingsService/UserSettingsService.ts
3
+ // src/classes/services/UserSettingsService/UserSettingsService.ts
4
4
  var n = class {
5
5
  showShowUserFeedbackTooltip = !0;
6
6
  };
7
7
  n = e([t()], n);
8
- //#endregion
9
8
  export { n as UserSettingsService };
10
9
 
11
10
  //# sourceMappingURL=index.js.map
@@ -2,4 +2,4 @@ import { DependencyContainer } from 'tsyringe';
2
2
  export type AppProps = {
3
3
  readonly container: DependencyContainer;
4
4
  };
5
- export declare const App: ({ container }: AppProps) => import('react').JSX.Element;
5
+ export declare const App: () => import('react').JSX.Element;
@@ -1,46 +1,41 @@
1
- import { t as e } from "../../../_chunks/QueryClientService.js";
2
- import { t } from "../../../_chunks/QueryClientProvider.js";
3
- import { DependencyContainerUtil as n } from "../../../utils/DependencyContainerUtil/index.js";
4
- import { API_BASE_TOKEN as r } from "../../../constants/api.constants.js";
5
- import { RouterService as i } from "../../../classes/services/RouterService/index.js";
6
- import { ClientCommonConfigContextProvider as a } from "../../../context/ClientCommonConfigContext/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 { ErrorPage as c } from "../../../pages/ErrorPage/index.js";
10
- import { BackendVersionService as l } from "../../../classes/services/BackendVersionService/index.js";
11
- import { ApplicationBootstrapWithoutAuthorization as u } from "../ApplicationBootstrapWithoutAuthorization/index.js";
12
- import { EmotionCacheService as d } from "../../../classes/services/EmotionCacheService/index.js";
13
- import { container as f } from "tsyringe";
14
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
15
- import { CssBaseline as h, ThemeProvider as g } from "@mui/material";
16
- import { RouterProvider as _ } from "react-router-dom";
17
- import { CacheProvider as v } from "@emotion/react";
18
- import { ErrorBoundary as y } from "react-error-boundary";
19
- //#region src/components/app/AppRouterProvider/AppRouterProvider.tsx
20
- var b = () => /* @__PURE__ */ p(_, { router: f.resolve(i).router }), x = ({ container: i }) => {
21
- let f = n.resolveConfig(i), _ = i.resolve(o), x = i.resolve(s), S = f.getTouchIconUrl();
22
- S && document.querySelector("link[rel=\"icon\"]")?.setAttribute("href", S);
23
- let C = i.resolve(r);
24
- C.baseUrl = f.getAPIBaseUrl(), C.defaultRequestTimeout = f.defaultRequestTimeout, C.onRequest = [_.onRequest.bind(_), x.onRequest.bind(x)], C.onResponseFulfilled = [x.onResponseFulfilled.bind(x), i.resolve(l).onResponseFulfilled.bind(i.resolve(l))], C.onResponseRejected = [x.onResponseRejected.bind(x), _.onResponseRejected.bind(_)];
25
- let w = i.resolve(e), T = i.resolve(d).emotionCache;
26
- return /* @__PURE__ */ p(a, {
27
- container: i,
28
- children: /* @__PURE__ */ p(t, {
29
- client: w.queryClient,
30
- children: /* @__PURE__ */ p(v, {
31
- value: T,
32
- children: /* @__PURE__ */ m(g, {
33
- theme: f.theme,
34
- children: [/* @__PURE__ */ p(h, {}), /* @__PURE__ */ p(y, {
35
- FallbackComponent: c,
36
- children: /* @__PURE__ */ p(u, { children: /* @__PURE__ */ p(b, {}) })
37
- })]
38
- })
1
+ import { API_BASE_TOKEN as e } from "../../../constants/api.constants.js";
2
+ import { RouterService as t } from "../../../classes/services/RouterService/index.js";
3
+ import { useConfig as n } from "../../../hooks/useConfig/index.js";
4
+ import { AuthenticationService as r } from "../../../classes/services/AuthenticationService/index.js";
5
+ import { LogService as i } from "../../../classes/services/LogService/index.js";
6
+ import { t as a } from "../../../_chunks/QueryClientProvider.js";
7
+ import { t as o } from "../../../_chunks/QueryClientService.js";
8
+ import { ErrorPage as s } from "../../../pages/ErrorPage/index.js";
9
+ import { BackendVersionService as c } from "../../../classes/services/BackendVersionService/index.js";
10
+ import { ApplicationBootstrapWithoutAuthorization as l } from "../ApplicationBootstrapWithoutAuthorization/index.js";
11
+ import { EmotionCacheService as u } from "../../../classes/services/EmotionCacheService/index.js";
12
+ import { container as d } from "tsyringe";
13
+ import { CssBaseline as f, ThemeProvider as p } from "@mui/material";
14
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
15
+ import { RouterProvider as g } from "react-router-dom";
16
+ import { CacheProvider as _ } from "@emotion/react";
17
+ import { ErrorBoundary as v } from "react-error-boundary";
18
+ // src/components/app/AppRouterProvider/AppRouterProvider.tsx
19
+ var y = () => /* @__PURE__ */ m(g, { router: d.resolve(t).router }), b = () => {
20
+ let t = n(), g = d.resolve(r), b = d.resolve(i), x = t.getTouchIconUrl();
21
+ x && document.querySelector("link[rel=\"icon\"]")?.setAttribute("href", x);
22
+ let S = d.resolve(e);
23
+ S.baseUrl = t.getAPIBaseUrl(), S.defaultRequestTimeout = t.defaultRequestTimeout, S.onRequest = [g.onRequest.bind(g), b.onRequest.bind(b)], S.onResponseFulfilled = [b.onResponseFulfilled.bind(b), d.resolve(c).onResponseFulfilled.bind(d.resolve(c))], S.onResponseRejected = [b.onResponseRejected.bind(b), g.onResponseRejected.bind(g)];
24
+ let C = d.resolve(o), w = d.resolve(u).emotionCache;
25
+ return /* @__PURE__ */ m(a, {
26
+ client: C.queryClient,
27
+ children: /* @__PURE__ */ m(_, {
28
+ value: w,
29
+ children: /* @__PURE__ */ h(p, {
30
+ theme: t.theme,
31
+ children: [/* @__PURE__ */ m(f, {}), /* @__PURE__ */ m(v, {
32
+ FallbackComponent: s,
33
+ children: /* @__PURE__ */ m(l, { children: /* @__PURE__ */ m(y, {}) })
34
+ })]
39
35
  })
40
36
  })
41
37
  });
42
38
  };
43
- //#endregion
44
- export { x as App };
39
+ export { b as App };
45
40
 
46
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["QueryClientService","AppRouterProvider","RouterProvider","container","RouterService","App","config","DependencyContainerUtil","authenticationService","AuthenticationService","logService","LogService","touchIconUrl","api","API_BASE_TOKEN","BackendVersionService","queryClientService","emotionCache","EmotionCacheService","ClientCommonConfigContextProvider","QueryClientProvider","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 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 { ClientCommonConfigContextProvider } from '../../../context/ClientCommonConfigContext';\nimport type { ConfigBase } from '../../../models/config.models';\nimport { DependencyContainerUtil } from '../../../utils/DependencyContainerUtil';\n\nexport type AppProps = {\n readonly container: DependencyContainer;\n};\n\nexport const App = ({ container }: AppProps) => {\n const config = DependencyContainerUtil.resolveConfig<ConfigBase>(container);\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 <ClientCommonConfigContextProvider container={container}>\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 </ClientCommonConfigContextProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAKA,IAAaC,UAA0B,kBAACC,GAAD,EAAgB,QAAQC,EAAU,QAAQC,CAAa,CAAC,CAAC,OAAS,CAAA,GCqB5FC,KAAO,EAAE,mBAA0B;CAC9C,IAAMC,IAASC,EAAwB,cAA0BJ,CAAS,GAEpEK,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,kBAACC,GAAD;EAA8C;EAC5C,UAAA,kBAACC,GAAD;GAAqB,QAAQJ,EAAmB;GAC9C,UAAA,kBAACK,GAAD;IAAe,OAAOJ;IACpB,UAAA,kBAACK,GAAD;KAAe,OAAOhB,EAAO;KAA7B,UAAA,CACE,kBAACiB,GAAD,CAAc,CAAA,GACd,kBAACC,GAAD;MAAe,mBAAmBC;MAChC,UAAA,kBAACC,GAAD,EAAA,UACE,kBAACzB,GAAD,CAAoB,CAAA,EACoB,CAAA;KAC7B,CAAA,CACF;;GACF,CAAA;EACI,CAAA;CACY,CAAA;AAEvC"}
1
+ {"version":3,"file":"index.js","names":["QueryClientProvider","QueryClientService","AppRouterProvider","RouterProvider","container","RouterService","App","config","useConfig","authenticationService","AuthenticationService","logService","LogService","touchIconUrl","api","API_BASE_TOKEN","BackendVersionService","queryClientService","emotionCache","EmotionCacheService","CacheProvider","ThemeProvider","CssBaseline","ErrorBoundary","ErrorPage","ApplicationBootstrapWithoutAuthorization"],"sources":["../../../../src/components/app/AppRouterProvider/AppRouterProvider.tsx","../../../../src/components/app/App/App.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport { RouterProvider } from 'react-router-dom';\n\nimport { RouterService } from '../../../classes/services/RouterService';\n\nexport const AppRouterProvider = () => <RouterProvider router={container.resolve(RouterService).router} />;\n","import { container } from 'tsyringe';\nimport type { DependencyContainer } from 'tsyringe';\nimport { CacheProvider } from '@emotion/react';\nimport {\n CssBaseline,\n ThemeProvider,\n} from '@mui/material';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nimport { API_BASE_TOKEN } from '../../../constants/api.constants';\nimport { BackendVersionService } from '../../../classes/services/BackendVersionService';\nimport { QueryClientService } from '../../../classes/services/QueryClientService';\nimport { ErrorPage } from '../../../pages/ErrorPage';\nimport { EmotionCacheService } from '../../../classes/services/EmotionCacheService';\nimport { AuthenticationService } from '../../../classes/services/AuthenticationService';\nimport { LogService } from '../../../classes/services/LogService';\nimport { ApplicationBootstrapWithoutAuthorization } from '../ApplicationBootstrapWithoutAuthorization';\nimport { AppRouterProvider } from '../AppRouterProvider/AppRouterProvider';\nimport { useConfig } from '../../../hooks/useConfig';\n\nexport type AppProps = {\n readonly container: DependencyContainer;\n};\n\nexport const App = () => {\n const config = useConfig();\n\n const authenticationService = container.resolve(AuthenticationService);\n const logService = container.resolve(LogService);\n const touchIconUrl = config.getTouchIconUrl();\n if (touchIconUrl) {\n document.querySelector('link[rel=\"icon\"]')?.setAttribute('href', touchIconUrl);\n }\n const api = container.resolve(API_BASE_TOKEN);\n api.baseUrl = config.getAPIBaseUrl();\n api.defaultRequestTimeout = config.defaultRequestTimeout;\n api.onRequest = [\n authenticationService.onRequest.bind(authenticationService),\n logService.onRequest.bind(logService),\n ];\n api.onResponseFulfilled = [\n logService.onResponseFulfilled.bind(logService),\n container.resolve(BackendVersionService).onResponseFulfilled.bind(container.resolve(BackendVersionService)),\n ];\n api.onResponseRejected = [\n logService.onResponseRejected.bind(logService),\n authenticationService.onResponseRejected.bind(authenticationService),\n ];\n\n const queryClientService = container.resolve(QueryClientService);\n const emotionCache = container.resolve(EmotionCacheService).emotionCache;\n\n return (\n <QueryClientProvider client={queryClientService.queryClient}>\n <CacheProvider value={emotionCache}>\n <ThemeProvider theme={config.theme}>\n <CssBaseline />\n <ErrorBoundary FallbackComponent={ErrorPage}>\n <ApplicationBootstrapWithoutAuthorization>\n <AppRouterProvider />\n </ApplicationBootstrapWithoutAuthorization>\n </ErrorBoundary>\n </ThemeProvider>\n </CacheProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAKA,IAAaE,UAA0B,kBAACC,GAAD,EAAgB,QAAQC,EAAU,QAAQC,CAAa,CAAC,CAAC,OAAS,CAAA,GCoB5FC,UAAY;CACvB,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,82 +1,81 @@
1
1
  import { t as e } from "../../../_chunks/OutageUtil.js";
2
- import { t } from "../../../_chunks/QueryClientService.js";
3
- import { t as n } from "../../../_chunks/useQueryMemo.js";
4
- import { t as r } from "../../../_chunks/react.js";
5
- import { outagesStore as i } from "../../../stores/outagesStore/index.js";
6
- import { API_SYSTEM_TOKEN as a } from "../../../constants/api.constants.js";
7
- import { PageContainer as o } from "../../ui/PageContainer/index.js";
8
- import { ResponseHandler as s } from "../../ui/ResponseHandler/index.js";
2
+ import { t } from "../../../_chunks/react.js";
3
+ import { outagesStore as n } from "../../../stores/outagesStore/index.js";
4
+ import { API_SYSTEM_TOKEN as r } from "../../../constants/api.constants.js";
5
+ import { PageContainer as i } from "../../ui/PageContainer/index.js";
6
+ import { ResponseHandler as a } from "../../ui/ResponseHandler/index.js";
7
+ import { t as o } from "../../../_chunks/useQueryMemo.js";
8
+ import { t as s } from "../../../_chunks/QueryClientService.js";
9
9
  import { COMMON_QUERY_KEY as c } from "../../../constants/query.constants.js";
10
10
  import { t as l } from "../../../_chunks/OutageList.js";
11
11
  import "../../ui/OutageList/index.js";
12
- import { WindowService as u } from "@gen-epix/ui-core/classes/services/WindowService";
13
- import { container as d } from "tsyringe";
14
- import { useCallback as f, useEffect as p, useMemo as m, useState as h } from "react";
15
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
16
- import { Box as v, Button as y } from "@mui/material";
12
+ import { container as u } from "tsyringe";
13
+ import { WindowService as d } from "@gen-epix/ui-core/classes/services/WindowService";
14
+ import { Box as f, Button as p } from "@mui/material";
15
+ import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
16
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
17
17
  import { useTranslation as b } from "react-i18next";
18
18
  import { TestIdUtil as x } from "@gen-epix/ui-core/utils/TestIdUtil";
19
19
  import { useArray as S } from "@gen-epix/ui-core/hooks/useArray";
20
- //#region src/components/app/ApplicationBootstrapWithAuthentication/ApplicationBootstrapWithAuthentication.tsx
20
+ // src/components/app/ApplicationBootstrapWithAuthentication/ApplicationBootstrapWithAuthentication.tsx
21
21
  var C = ({ children: C }) => {
22
- let { t: w } = b(), T = r(i, (e) => e.setCategorizedOutages), [E, D] = h(!1), [O, k] = h(!1), A = n({
22
+ let { t: w } = b(), T = t(n, (e) => e.setCategorizedOutages), [E, D] = _(!1), [O, k] = _(!1), A = o({
23
23
  gcTime: Infinity,
24
- queryFn: async ({ signal: e }) => (await d.resolve(a).retrieveOutages({ signal: e })).data,
25
- queryKey: d.resolve(t).getGenericKey(c.OUTAGES),
24
+ queryFn: async ({ signal: e }) => (await u.resolve(r).retrieveOutages({ signal: e })).data,
25
+ queryKey: u.resolve(s).getGenericKey(c.OUTAGES),
26
26
  refetchInterval: 3e5,
27
27
  staleTime: Infinity
28
- }), j = S([A]), M = m(() => e.getCategorizedOutages(A.data ?? []), [A.data]), N = f(() => {
29
- u.getInstance().window.location.reload();
30
- }, []), P = f(() => {
28
+ }), j = S([A]), M = g(() => e.getCategorizedOutages(A.data ?? []), [A.data]), N = m(() => {
29
+ u.resolve(d).window.location.reload();
30
+ }, []), P = m(() => {
31
31
  D(!0);
32
32
  }, []);
33
- return p(() => {
33
+ return h(() => {
34
34
  M && T(M);
35
- let e = u.getInstance().window.setTimeout(() => {
35
+ let e = u.resolve(d), t = e.window.setTimeout(() => {
36
36
  k(!0);
37
37
  }, 5e3);
38
38
  return () => {
39
- u.getInstance().window.clearTimeout(e);
39
+ e.window.clearTimeout(t);
40
40
  };
41
- }, [M, T]), !E && !A.isLoading && !A.error && M.activeOutages?.length > 0 ? /* @__PURE__ */ _(o, {
41
+ }, [M, T]), !E && !A.isLoading && !A.error && M.activeOutages?.length > 0 ? /* @__PURE__ */ y(i, {
42
42
  singleAction: !0,
43
43
  testIdAttributes: x.createAttributes("OutagePage"),
44
44
  title: w`Outages`,
45
- children: [/* @__PURE__ */ g(l, {
45
+ children: [/* @__PURE__ */ v(l, {
46
46
  activeOutages: M.activeOutages,
47
47
  soonActiveOutages: M.soonActiveOutages,
48
48
  visibleOutages: M.visibleOutages
49
- }), /* @__PURE__ */ _(v, {
49
+ }), /* @__PURE__ */ y(f, {
50
50
  sx: {
51
51
  display: "flex",
52
52
  gap: 1,
53
53
  justifyContent: "flex-end"
54
54
  },
55
- children: [/* @__PURE__ */ g(y, {
55
+ children: [/* @__PURE__ */ v(p, {
56
56
  disabled: !O,
57
57
  onClick: P,
58
58
  variant: "outlined",
59
59
  children: w`Continue anyway`
60
- }), /* @__PURE__ */ g(y, {
60
+ }), /* @__PURE__ */ v(p, {
61
61
  disabled: !O,
62
62
  onClick: N,
63
63
  variant: "contained",
64
64
  children: w`Retry`
65
65
  })]
66
66
  })]
67
- }) : A.error || A.isLoading ? /* @__PURE__ */ g(o, {
67
+ }) : A.error || A.isLoading ? /* @__PURE__ */ v(i, {
68
68
  ignorePageEvent: !0,
69
69
  singleAction: !0,
70
70
  testIdAttributes: x.createAttributes("OutagesLoadingPage"),
71
71
  title: w`Outages`,
72
- children: /* @__PURE__ */ g(s, {
72
+ children: /* @__PURE__ */ v(a, {
73
73
  loadables: j,
74
74
  loadingMessage: w`Loading`,
75
75
  children: C
76
76
  })
77
77
  }) : C;
78
78
  };
79
- //#endregion
80
79
  export { C as ApplicationBootstrapWithAuthentication };
81
80
 
82
81
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["OutageUtil","useQueryMemo","useStore","OutageList","ApplicationBootstrapWithAuthentication","useTranslation","setCategorizedOutages","outagesStore","state","shouldContinue","setShouldContinue","useState","buttonsEnabled","setButtonsEnabled","outagesQuery","container","API_SYSTEM_TOKEN","QueryClientService","COMMON_QUERY_KEY","outagesLoadables","useArray","categorizedOutages","useMemo","onRetryButtonClick","useCallback","onContinuButtonClick","useEffect","timeout","WindowService","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 { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport { useArray } from '@gen-epix/ui-core/hooks/useArray';\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 WindowService.getInstance().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 timeout = WindowService.getInstance().window.setTimeout(() => {\n setButtonsEnabled(true);\n }, 5000);\n\n return () => {\n WindowService.getInstance().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 </ResponseHandler>\n </PageContainer>\n );\n\n }\n\n return children;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgCA,IAAaI,KAA0C,EAAE,kBAA6C;CACpG,IAAM,EAAE,SAAMC,EAAe,GAEvBC,IAAwBJ,EAASK,IAAe,MAAUC,EA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AgB;GAClB;GALF,UAAA,CAOE,kBAACC,GAAD;IACE,UAAU,CAACpB;IACX,SAASa;IACT,SAAS;IAER,UAAA,CAAC;GACI,CAAA,GACR,kBAACO,GAAD;IACE,UAAU,CAACpB;IACX,SAASW;IACT,SAAS;IAER,UAAA,CAAC;GACI,CAAA,CACL;EACQ,CAAA,CAAA;MAGfT,EAAa,SAASA,EAAa,YAEnC,kBAACe,GAAD;EACE,iBAAA;EACA,cAAA;EACA,kBAAkBC,EAAW,iBAAiB,oBAAoB;EAClE,OAAO,CAAC;EAER,UAAA,kBAACG,GAAD;GACE,WAAWd;GACX,gBAAgB,CAAC;GAEhB;EACc,CAAA;CACJ,CAAA,IAKZe;AACT"}
1
+ {"version":3,"file":"index.js","names":["OutageUtil","useQueryMemo","QueryClientService","OutageList","ApplicationBootstrapWithAuthentication","useTranslation","setCategorizedOutages","useStore","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 </ResponseHandler>\n </PageContainer>\n );\n\n }\n\n return children;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgCA,IAAaI,KAA0C,EAAE,kBAA6C;CACpG,IAAM,EAAE,SAAMC,EAAe,GAEvBC,IAAwBC,EAASC,IAAe,MAAUC,EAAM,qBAAqB,GACrF,CAACC,GAAgBC,KAAqBC,EAAS,EAAK,GACpD,CAACC,GAAgBC,KAAqBF,EAAS,EAAK,GAEpDG,IAAed,EAAa;EAChC,QAAQ;EACR,SAAS,OAAO,EAAE,iBAAc,MAAMe,EAAU,QAAQC,CAAgB,CAAC,CAAC,gBAAgB,EAAE,UAAO,CAAC,EAAA,CAAG;EACvG,UAAUD,EAAU,QAAQd,CAAkB,CAAC,CAAC,cAAcgB,EAAiB,OAAO;EACtF,iBAAiB;EACjB,WAAW;CACb,CAAC,GAEKC,IAAmBC,EAAS,CAACL,CAAY,CAAC,GAE1CM,IAAqBC,QAClBtB,EAAW,sBAAsBe,EAAa,QAAQ,CAAC,CAAC,GAC9D,CAACA,EAAa,IAAI,CAAC,GAEhBQ,IAAqBC,QAAkB;EAC3C,EAAU,QAAQC,CAAa,CAAC,CAA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