@elliemae/pui-app-sdk 2.21.0 → 3.0.0-beta.11

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 (399) hide show
  1. package/dist/cjs/analytics/appdynamics.js +40 -30
  2. package/dist/cjs/analytics/index.js +33 -26
  3. package/dist/cjs/analytics/page-view-event.js +35 -34
  4. package/dist/cjs/analytics/user-session-event.js +35 -27
  5. package/dist/cjs/analytics/user-wait-event.js +32 -17
  6. package/dist/cjs/analytics/web-analytics.js +33 -19
  7. package/dist/cjs/api/auth/index.js +42 -39
  8. package/dist/cjs/api/helpers.js +34 -99
  9. package/dist/cjs/api/users/index.js +29 -16
  10. package/dist/cjs/communication/http-client/index.js +50 -48
  11. package/dist/cjs/communication/http-client/request-interceptor.js +29 -12
  12. package/dist/cjs/communication/http-client/response-interceptor.js +47 -38
  13. package/dist/cjs/communication/http-client/retry-axios.js +74 -122
  14. package/dist/cjs/communication/http-client/retry.js +43 -36
  15. package/dist/cjs/communication/http-client/tests/index.test-disable.js +48 -56
  16. package/dist/cjs/data/auth/actions.js +34 -26
  17. package/dist/cjs/data/auth/reducer.js +36 -18
  18. package/dist/cjs/data/breakpoint/index.js +44 -32
  19. package/dist/cjs/data/error/index.js +34 -18
  20. package/dist/cjs/data/index.js +35 -0
  21. package/dist/cjs/data/live-message/index.js +35 -25
  22. package/dist/cjs/data/logout/actions.js +29 -9
  23. package/dist/cjs/data/navigation-prompt/actions.js +29 -9
  24. package/dist/cjs/data/react-redux.js +30 -13
  25. package/dist/cjs/data/reducers.js +36 -23
  26. package/dist/cjs/data/saga.js +29 -9
  27. package/dist/cjs/data/store.js +51 -65
  28. package/dist/cjs/data/wait-message/actions.js +31 -13
  29. package/dist/cjs/data/wait-message/reducer.js +38 -24
  30. package/dist/cjs/index.js +195 -809
  31. package/dist/cjs/micro-frontend.js +34 -0
  32. package/dist/cjs/route/index.js +44 -32
  33. package/dist/cjs/route/page-view.js +36 -22
  34. package/dist/cjs/route/private-route/index.js +59 -60
  35. package/dist/cjs/sideeffect/auth/index.js +43 -30
  36. package/dist/cjs/sideeffect/error-toast/index.js +40 -26
  37. package/dist/cjs/sideeffect/wait-message/index.js +46 -29
  38. package/dist/cjs/typings/custom.d.js +0 -0
  39. package/dist/cjs/typings/elliemae.d.js +0 -0
  40. package/dist/cjs/typings/styled.d.js +1 -0
  41. package/dist/cjs/typings/thirdparty.d.js +0 -0
  42. package/dist/cjs/utils/app-config/config.js +39 -33
  43. package/dist/cjs/utils/app-config/index.js +48 -44
  44. package/dist/cjs/utils/app-host-integration/react.js +28 -14
  45. package/dist/cjs/utils/auth/helper.js +36 -18
  46. package/dist/cjs/utils/auth/index.js +77 -116
  47. package/dist/cjs/utils/await.js +20 -0
  48. package/dist/cjs/utils/constants.js +39 -21
  49. package/dist/cjs/utils/font-size.js +30 -14
  50. package/dist/cjs/utils/guest-with-service.js +28 -12
  51. package/dist/cjs/utils/helpers.js +32 -19
  52. package/dist/cjs/utils/history.js +30 -12
  53. package/dist/cjs/utils/log-records.js +55 -35
  54. package/dist/cjs/utils/micro-frontend/console-logger.js +40 -23
  55. package/dist/cjs/utils/micro-frontend/guest.js +86 -127
  56. package/dist/cjs/utils/micro-frontend/host.js +86 -125
  57. package/dist/cjs/utils/micro-frontend/index.js +66 -61
  58. package/dist/cjs/utils/micro-frontend/types.js +20 -5
  59. package/dist/cjs/utils/redact-pii.js +32 -17
  60. package/dist/cjs/utils/service-worker.js +37 -21
  61. package/dist/cjs/utils/session.js +66 -71
  62. package/dist/cjs/utils/storybook/cjs/main.js +53 -0
  63. package/dist/cjs/utils/storybook/cjs/middleware.js +5 -0
  64. package/dist/cjs/utils/storybook/cjs/vite.js +6 -0
  65. package/dist/cjs/utils/storybook/cjs/webpack.js +21 -0
  66. package/dist/cjs/utils/storybook/manager.js +32 -16
  67. package/dist/cjs/utils/storybook/preview.js +59 -50
  68. package/dist/cjs/utils/storybook/theme.js +31 -14
  69. package/dist/cjs/utils/testing/index.js +45 -50
  70. package/dist/cjs/utils/testing/render-with-redux.js +41 -27
  71. package/dist/cjs/utils/testing/render-with-router-redux.js +47 -37
  72. package/dist/cjs/utils/testing/render-with-router.js +41 -28
  73. package/dist/cjs/utils/testing/render-with-state-addons.js +47 -36
  74. package/dist/cjs/utils/types.js +20 -0
  75. package/dist/cjs/utils/url.js +29 -13
  76. package/dist/cjs/utils/web-storage.js +46 -30
  77. package/dist/cjs/utils/window.js +37 -28
  78. package/dist/cjs/view/app-root/hosted-app.js +42 -32
  79. package/dist/cjs/view/app-root/index.js +64 -62
  80. package/dist/cjs/view/app-root/stand-alone-app.js +45 -37
  81. package/dist/cjs/view/app-root/style.js +51 -12
  82. package/dist/cjs/view/error-boundary/default-error-template.js +33 -15
  83. package/dist/cjs/view/error-boundary/index.js +47 -43
  84. package/dist/cjs/view/error-toast/index.js +49 -32
  85. package/dist/cjs/view/fetch-host-app-data/index.js +40 -26
  86. package/dist/cjs/view/fetch-host-app-data/store.js +32 -24
  87. package/dist/cjs/view/fields/check-box/index.js +41 -39
  88. package/dist/cjs/view/fields/combo-box/index.js +44 -31
  89. package/dist/cjs/view/fields/connect-form.js +31 -15
  90. package/dist/cjs/view/fields/date-input/index.js +41 -26
  91. package/dist/cjs/view/fields/date-picker/index.js +41 -26
  92. package/dist/cjs/view/fields/form-item-layout/index.js +43 -30
  93. package/dist/cjs/view/fields/input-mask/index.js +42 -41
  94. package/dist/cjs/view/fields/large-text-box/index.js +41 -26
  95. package/dist/cjs/view/fields/radio/index.js +41 -30
  96. package/dist/cjs/view/fields/radio-group/index.js +39 -27
  97. package/dist/cjs/view/fields/text-box/index.js +41 -26
  98. package/dist/cjs/view/fields/watch-value.js +48 -35
  99. package/dist/cjs/view/form/index.js +48 -34
  100. package/dist/cjs/view/form/personal-info-section.js +63 -80
  101. package/dist/cjs/view/form/submit-button/index.js +41 -23
  102. package/dist/cjs/view/guest-unload-handlers/index.js +34 -22
  103. package/dist/cjs/view/header/center-region/index.js +68 -38
  104. package/dist/cjs/view/header/index.js +48 -35
  105. package/dist/cjs/view/header/logo-region/index.js +38 -23
  106. package/dist/cjs/view/header/nav-region/index.js +51 -30
  107. package/dist/cjs/view/header/nav-region/notification/index.js +35 -18
  108. package/dist/cjs/view/header/nav-region/user/index.js +35 -18
  109. package/dist/cjs/view/host-binding-events/index.js +27 -11
  110. package/dist/cjs/view/intro.stories.mdx +1 -1
  111. package/dist/cjs/view/live-message/index.js +40 -34
  112. package/dist/cjs/view/loadable/index.js +40 -27
  113. package/dist/cjs/view/login/index.js +43 -30
  114. package/dist/cjs/view/media-breakpoint/index.js +50 -34
  115. package/dist/cjs/view/message-to-host-app/index.js +32 -20
  116. package/dist/cjs/view/micro-app/app-factory/index.js +101 -135
  117. package/dist/cjs/view/micro-app/const.js +27 -7
  118. package/dist/cjs/view/micro-app/index.js +44 -27
  119. package/dist/cjs/view/micro-app/resources/manifest.js +44 -35
  120. package/dist/cjs/view/micro-app/resources/script.js +57 -53
  121. package/dist/cjs/view/micro-app/resources/style.js +45 -38
  122. package/dist/cjs/view/micro-app/types.js +20 -5
  123. package/dist/cjs/view/micro-app/use-app-will-render.js +59 -50
  124. package/dist/cjs/view/micro-app/utils.js +33 -21
  125. package/dist/cjs/view/micro-iframe-app/app.js +44 -39
  126. package/dist/cjs/view/micro-iframe-app/iframe/const.js +27 -7
  127. package/dist/cjs/view/micro-iframe-app/iframe/index.js +58 -47
  128. package/dist/cjs/view/micro-iframe-app/index.js +43 -24
  129. package/dist/cjs/view/micro-iframe-app/types.js +20 -5
  130. package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +43 -37
  131. package/dist/cjs/view/modals/error/index.js +42 -28
  132. package/dist/cjs/view/modals/navigation-prompt/index.js +45 -37
  133. package/dist/cjs/view/modals/session-expiry/customHooks.js +41 -35
  134. package/dist/cjs/view/modals/session-expiry/index.js +55 -50
  135. package/dist/cjs/view/modals/wait-message/html-wait-message.js +39 -18
  136. package/dist/cjs/view/modals/wait-message/index.js +57 -53
  137. package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +40 -21
  138. package/dist/cjs/view/render-with-delay/index.js +37 -19
  139. package/dist/cjs/view/render-with-host-data/index.js +42 -30
  140. package/dist/cjs/view/session-timeout/index.js +55 -35
  141. package/dist/cjs/view/storybook/decorator.js +39 -21
  142. package/dist/cjs/view/use-previous.js +30 -13
  143. package/dist/cjs/view/useMediaBreakpoints/index.js +35 -19
  144. package/dist/cjs/view/visually-hidden/index.js +48 -21
  145. package/dist/cjs/view/window-size/index.js +41 -22
  146. package/dist/es/analytics/appdynamics.js +14 -15
  147. package/dist/es/analytics/index.js +8 -14
  148. package/dist/es/analytics/page-view-event.js +11 -25
  149. package/dist/es/analytics/user-session-event.js +11 -13
  150. package/dist/es/analytics/user-wait-event.js +9 -5
  151. package/dist/es/analytics/web-analytics.js +12 -10
  152. package/dist/es/api/auth/index.js +21 -26
  153. package/dist/es/api/helpers.js +8 -81
  154. package/dist/es/api/users/index.js +6 -7
  155. package/dist/es/communication/http-client/index.js +19 -25
  156. package/dist/es/communication/http-client/request-interceptor.js +5 -2
  157. package/dist/es/communication/http-client/response-interceptor.js +20 -21
  158. package/dist/es/communication/http-client/retry-axios.js +45 -105
  159. package/dist/es/communication/http-client/retry.js +22 -25
  160. package/dist/es/communication/http-client/tests/index.test-disable.js +25 -44
  161. package/dist/es/data/auth/actions.js +13 -19
  162. package/dist/es/data/auth/reducer.js +8 -6
  163. package/dist/es/data/breakpoint/index.js +19 -21
  164. package/dist/es/data/error/index.js +11 -9
  165. package/dist/es/data/index.js +11 -0
  166. package/dist/es/data/live-message/index.js +12 -16
  167. package/dist/es/data/logout/actions.js +9 -5
  168. package/dist/es/data/navigation-prompt/actions.js +9 -5
  169. package/dist/es/data/react-redux.js +7 -3
  170. package/dist/es/data/reducers.js +6 -3
  171. package/dist/es/data/saga.js +8 -5
  172. package/dist/es/data/store.js +24 -51
  173. package/dist/es/data/wait-message/actions.js +11 -9
  174. package/dist/es/data/wait-message/reducer.js +9 -9
  175. package/dist/es/index.js +192 -83
  176. package/dist/es/micro-frontend.js +10 -0
  177. package/dist/es/route/index.js +16 -18
  178. package/dist/es/route/page-view.js +8 -8
  179. package/dist/es/route/private-route/index.js +24 -31
  180. package/dist/es/sideeffect/auth/index.js +24 -11
  181. package/dist/es/sideeffect/error-toast/index.js +11 -10
  182. package/dist/es/sideeffect/wait-message/index.js +14 -10
  183. package/dist/es/typings/custom.d.js +0 -0
  184. package/dist/es/typings/elliemae.d.js +0 -0
  185. package/dist/es/typings/styled.d.js +1 -0
  186. package/dist/es/typings/thirdparty.d.js +0 -0
  187. package/dist/es/utils/app-config/config.js +11 -9
  188. package/dist/es/utils/app-config/index.js +17 -27
  189. package/dist/es/utils/app-host-integration/react.js +8 -6
  190. package/dist/es/utils/auth/helper.js +7 -3
  191. package/dist/es/utils/auth/index.js +51 -75
  192. package/dist/es/utils/constants.js +18 -13
  193. package/dist/es/utils/font-size.js +7 -3
  194. package/dist/es/utils/guest-with-service.js +6 -7
  195. package/dist/es/utils/helpers.js +10 -6
  196. package/dist/es/utils/history.js +7 -3
  197. package/dist/es/utils/log-records.js +34 -31
  198. package/dist/es/utils/micro-frontend/console-logger.js +16 -12
  199. package/dist/es/utils/micro-frontend/guest.js +44 -100
  200. package/dist/es/utils/micro-frontend/host.js +41 -77
  201. package/dist/es/utils/micro-frontend/index.js +35 -33
  202. package/dist/es/utils/micro-frontend/types.js +0 -1
  203. package/dist/es/utils/redact-pii.js +10 -11
  204. package/dist/es/utils/service-worker.js +13 -10
  205. package/dist/es/utils/session.js +45 -46
  206. package/dist/es/utils/storybook/manager.js +7 -4
  207. package/dist/es/utils/storybook/preview.js +27 -24
  208. package/dist/es/utils/storybook/theme.js +9 -6
  209. package/dist/es/utils/testing/index.js +12 -18
  210. package/dist/es/utils/testing/render-with-redux.js +12 -11
  211. package/dist/es/utils/testing/render-with-router-redux.js +18 -19
  212. package/dist/es/utils/testing/render-with-router.js +15 -16
  213. package/dist/es/utils/testing/render-with-state-addons.js +19 -18
  214. package/dist/es/utils/url.js +7 -3
  215. package/dist/es/utils/web-storage.js +21 -17
  216. package/dist/es/utils/window.js +18 -18
  217. package/dist/es/view/app-root/hosted-app.js +10 -13
  218. package/dist/es/view/app-root/index.js +29 -33
  219. package/dist/es/view/app-root/stand-alone-app.js +11 -12
  220. package/dist/es/view/app-root/style.js +30 -5
  221. package/dist/es/view/error-boundary/default-error-template.js +5 -5
  222. package/dist/es/view/error-boundary/index.js +18 -25
  223. package/dist/es/view/error-toast/index.js +15 -14
  224. package/dist/es/view/fetch-host-app-data/index.js +14 -11
  225. package/dist/es/view/fetch-host-app-data/store.js +10 -7
  226. package/dist/es/view/fields/check-box/index.js +17 -18
  227. package/dist/es/view/fields/combo-box/index.js +20 -19
  228. package/dist/es/view/fields/connect-form.js +8 -6
  229. package/dist/es/view/fields/date-input/index.js +17 -14
  230. package/dist/es/view/fields/date-picker/index.js +17 -14
  231. package/dist/es/view/fields/form-item-layout/index.js +15 -15
  232. package/dist/es/view/fields/input-mask/index.js +21 -14
  233. package/dist/es/view/fields/large-text-box/index.js +17 -14
  234. package/dist/es/view/fields/radio/index.js +17 -18
  235. package/dist/es/view/fields/radio-group/index.js +15 -15
  236. package/dist/es/view/fields/text-box/index.js +17 -14
  237. package/dist/es/view/fields/watch-value.js +20 -24
  238. package/dist/es/view/form/index.js +23 -22
  239. package/dist/es/view/form/personal-info-section.js +28 -48
  240. package/dist/es/view/form/submit-button/index.js +13 -10
  241. package/dist/es/view/guest-unload-handlers/index.js +10 -9
  242. package/dist/es/view/header/center-region/index.js +41 -23
  243. package/dist/es/view/header/index.js +16 -15
  244. package/dist/es/view/header/logo-region/index.js +9 -9
  245. package/dist/es/view/header/nav-region/index.js +21 -13
  246. package/dist/es/view/header/nav-region/notification/index.js +6 -6
  247. package/dist/es/view/header/nav-region/user/index.js +6 -6
  248. package/dist/es/view/host-binding-events/index.js +7 -3
  249. package/dist/es/view/intro.stories.mdx +1 -1
  250. package/dist/es/view/live-message/index.js +13 -22
  251. package/dist/es/view/loadable/index.js +13 -15
  252. package/dist/es/view/login/index.js +12 -15
  253. package/dist/es/view/media-breakpoint/index.js +16 -13
  254. package/dist/es/view/message-to-host-app/index.js +10 -9
  255. package/dist/es/view/micro-app/app-factory/index.js +67 -82
  256. package/dist/es/view/micro-app/const.js +4 -1
  257. package/dist/es/view/micro-app/index.js +12 -9
  258. package/dist/es/view/micro-app/resources/manifest.js +17 -16
  259. package/dist/es/view/micro-app/resources/script.js +35 -35
  260. package/dist/es/view/micro-app/resources/style.js +22 -21
  261. package/dist/es/view/micro-app/types.js +0 -1
  262. package/dist/es/view/micro-app/use-app-will-render.js +35 -26
  263. package/dist/es/view/micro-app/utils.js +11 -13
  264. package/dist/es/view/micro-iframe-app/app.js +14 -20
  265. package/dist/es/view/micro-iframe-app/iframe/const.js +4 -1
  266. package/dist/es/view/micro-iframe-app/iframe/index.js +27 -31
  267. package/dist/es/view/micro-iframe-app/index.js +10 -10
  268. package/dist/es/view/micro-iframe-app/types.js +0 -1
  269. package/dist/es/view/micro-iframe-app/use-frame-loaded.js +15 -19
  270. package/dist/es/view/modals/error/index.js +13 -10
  271. package/dist/es/view/modals/navigation-prompt/index.js +11 -14
  272. package/dist/es/view/modals/session-expiry/customHooks.js +11 -13
  273. package/dist/es/view/modals/session-expiry/index.js +17 -21
  274. package/dist/es/view/modals/wait-message/html-wait-message.js +11 -10
  275. package/dist/es/view/modals/wait-message/index.js +30 -37
  276. package/dist/es/view/modals/wait-message/wait-message-launcher.js +8 -6
  277. package/dist/es/view/render-with-delay/index.js +8 -10
  278. package/dist/es/view/render-with-host-data/index.js +10 -13
  279. package/dist/es/view/session-timeout/index.js +24 -10
  280. package/dist/es/view/storybook/decorator.js +8 -5
  281. package/dist/es/view/use-previous.js +6 -3
  282. package/dist/es/view/useMediaBreakpoints/index.js +11 -9
  283. package/dist/es/view/visually-hidden/index.js +20 -10
  284. package/dist/es/view/window-size/index.js +12 -10
  285. package/dist/types/communication/http-client/retry.d.ts +1 -1
  286. package/dist/types/data/index.d.ts +4 -0
  287. package/dist/types/data/react-redux.d.ts +11 -11
  288. package/dist/types/data/reducers.d.ts +6 -6
  289. package/dist/types/data/store.d.ts +29 -29
  290. package/dist/types/index.d.ts +79 -79
  291. package/dist/types/micro-frontend.d.ts +6 -0
  292. package/dist/types/route/private-route/index.d.ts +1 -1
  293. package/dist/types/sideeffect/auth/index.d.ts +1 -1
  294. package/dist/types/utils/app-host-integration/react.d.ts +1 -1
  295. package/dist/types/utils/micro-frontend/guest.d.ts +2 -2
  296. package/dist/types/utils/micro-frontend/host.d.ts +1 -1
  297. package/dist/types/utils/micro-frontend/index.d.ts +2 -2
  298. package/dist/types/utils/micro-frontend/types.d.ts +1 -1
  299. package/dist/types/utils/session.d.ts +5 -2
  300. package/dist/types/utils/storybook/cjs/main.d.ts +63 -0
  301. package/dist/types/utils/storybook/{middleware.d.ts → cjs/middleware.d.ts} +0 -0
  302. package/dist/types/utils/storybook/cjs/vite.d.ts +4 -0
  303. package/dist/types/utils/storybook/cjs/webpack.d.ts +16 -0
  304. package/dist/types/utils/storybook/preview.d.ts +9 -3
  305. package/dist/types/utils/testing/render-with-redux.d.ts +20 -20
  306. package/dist/types/utils/testing/render-with-router-redux.d.ts +20 -20
  307. package/dist/types/utils/window.d.ts +1 -1
  308. package/dist/types/view/app-root/index.d.ts +1 -1
  309. package/dist/types/view/fields/check-box/index.stories.d.ts +1 -1
  310. package/dist/types/view/fields/check-box/set-value.stories.d.ts +1 -1
  311. package/dist/types/view/fields/combo-box/index.stories.d.ts +1 -1
  312. package/dist/types/view/fields/date-input/index.stories.d.ts +1 -1
  313. package/dist/types/view/fields/date-picker/index.stories.d.ts +1 -1
  314. package/dist/types/view/fields/form-item-layout/index.stories.d.ts +1 -1
  315. package/dist/types/view/fields/input-mask/index.stories.d.ts +1 -1
  316. package/dist/types/view/fields/large-text-box/index.stories.d.ts +1 -1
  317. package/dist/types/view/fields/radio/index.stories.d.ts +1 -1
  318. package/dist/types/view/fields/radio/set-value.stories.d.ts +1 -1
  319. package/dist/types/view/fields/radio-group/index.stories.d.ts +1 -1
  320. package/dist/types/view/fields/text-box/index.stories.d.ts +1 -1
  321. package/dist/types/view/form/usecases.stories.d.ts +1 -1
  322. package/dist/types/view/header/index.d.ts +1 -1
  323. package/dist/types/view/header/index.stories.d.ts +1 -1
  324. package/dist/types/view/micro-app/app-factory/index.d.ts +2 -2
  325. package/dist/types/view/micro-app/index.d.ts +1 -1
  326. package/dist/types/view/micro-app/resources/script.d.ts +1 -1
  327. package/dist/types/view/micro-app/resources/style.d.ts +1 -1
  328. package/dist/types/view/micro-app/use-app-will-render.d.ts +1 -1
  329. package/dist/types/view/micro-iframe-app/app.d.ts +2 -2
  330. package/dist/types/view/micro-iframe-app/index.d.ts +1 -1
  331. package/dist/types/view/micro-iframe-app/types.d.ts +1 -1
  332. package/dist/types/view/micro-iframe-app/use-frame-loaded.d.ts +1 -1
  333. package/dist/types/view/modals/error/index.stories.d.ts +1 -1
  334. package/dist/types/view/modals/navigation-prompt/index.stories.d.ts +1 -1
  335. package/dist/types/view/modals/session-expiry/index.stories.d.ts +1 -1
  336. package/dist/types/view/modals/wait-message/index.stories.d.ts +1 -1
  337. package/dist/types/view/storybook/decorator.d.ts +1 -1
  338. package/dist/types/view/visually-hidden/index.d.ts +1 -3
  339. package/package.json +36 -25
  340. package/dist/cjs/api/users/index.endpoint.js +0 -14
  341. package/dist/cjs/communication/http-client/tests/hello.endpoint.js +0 -14
  342. package/dist/cjs/communication/http-client/tests/private.endpoint.js +0 -14
  343. package/dist/cjs/utils/storybook/main.js +0 -38
  344. package/dist/cjs/utils/storybook/middleware.js +0 -9
  345. package/dist/cjs/view/error-toast/index.stories.js +0 -128
  346. package/dist/cjs/view/fields/check-box/index.stories.js +0 -64
  347. package/dist/cjs/view/fields/check-box/set-value.stories.js +0 -83
  348. package/dist/cjs/view/fields/combo-box/index.stories.js +0 -65
  349. package/dist/cjs/view/fields/date-input/index.stories.js +0 -53
  350. package/dist/cjs/view/fields/date-input/index1.stories.js +0 -53
  351. package/dist/cjs/view/fields/date-picker/index.stories.js +0 -53
  352. package/dist/cjs/view/fields/form-item-layout/index.stories.js +0 -43
  353. package/dist/cjs/view/fields/input-mask/index.stories.js +0 -52
  354. package/dist/cjs/view/fields/large-text-box/index.stories.js +0 -47
  355. package/dist/cjs/view/fields/radio/index.stories.js +0 -60
  356. package/dist/cjs/view/fields/radio/set-value.stories.js +0 -81
  357. package/dist/cjs/view/fields/radio-group/index.stories.js +0 -85
  358. package/dist/cjs/view/fields/text-box/index.stories.js +0 -48
  359. package/dist/cjs/view/form/index.stories.js +0 -71
  360. package/dist/cjs/view/form/usecases.stories.js +0 -59
  361. package/dist/cjs/view/header/index.stories.js +0 -24
  362. package/dist/cjs/view/live-message/index.stories.js +0 -53
  363. package/dist/cjs/view/media-breakpoint/index.stories.js +0 -24
  364. package/dist/cjs/view/modals/error/index.stories.js +0 -36
  365. package/dist/cjs/view/modals/navigation-prompt/index.stories.js +0 -32
  366. package/dist/cjs/view/modals/session-expiry/index.stories.js +0 -30
  367. package/dist/cjs/view/modals/wait-message/index.stories.js +0 -47
  368. package/dist/cjs/view/session-timeout/index.stories.js +0 -28
  369. package/dist/es/api/users/index.endpoint.js +0 -14
  370. package/dist/es/communication/http-client/tests/hello.endpoint.js +0 -14
  371. package/dist/es/communication/http-client/tests/private.endpoint.js +0 -14
  372. package/dist/es/utils/storybook/main.js +0 -38
  373. package/dist/es/utils/storybook/middleware.js +0 -9
  374. package/dist/es/view/error-toast/index.stories.js +0 -108
  375. package/dist/es/view/fields/check-box/index.stories.js +0 -47
  376. package/dist/es/view/fields/check-box/set-value.stories.js +0 -65
  377. package/dist/es/view/fields/combo-box/index.stories.js +0 -48
  378. package/dist/es/view/fields/date-input/index.stories.js +0 -35
  379. package/dist/es/view/fields/date-input/index1.stories.js +0 -35
  380. package/dist/es/view/fields/date-picker/index.stories.js +0 -35
  381. package/dist/es/view/fields/form-item-layout/index.stories.js +0 -27
  382. package/dist/es/view/fields/input-mask/index.stories.js +0 -35
  383. package/dist/es/view/fields/large-text-box/index.stories.js +0 -30
  384. package/dist/es/view/fields/radio/index.stories.js +0 -43
  385. package/dist/es/view/fields/radio/set-value.stories.js +0 -63
  386. package/dist/es/view/fields/radio-group/index.stories.js +0 -68
  387. package/dist/es/view/fields/text-box/index.stories.js +0 -31
  388. package/dist/es/view/form/index.stories.js +0 -56
  389. package/dist/es/view/form/usecases.stories.js +0 -43
  390. package/dist/es/view/header/index.stories.js +0 -14
  391. package/dist/es/view/live-message/index.stories.js +0 -32
  392. package/dist/es/view/media-breakpoint/index.stories.js +0 -10
  393. package/dist/es/view/modals/error/index.stories.js +0 -21
  394. package/dist/es/view/modals/navigation-prompt/index.stories.js +0 -18
  395. package/dist/es/view/modals/session-expiry/index.stories.js +0 -18
  396. package/dist/es/view/modals/wait-message/index.stories.js +0 -33
  397. package/dist/es/view/session-timeout/index.stories.js +0 -13
  398. package/dist/types/utils/storybook/main.d.ts +0 -30
  399. package/dist/types/view/fields/date-input/index1.stories.d.ts +0 -24
@@ -1,8 +1,7 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _merge from "lodash/merge";
3
- import ReactDOM from 'react-dom';
4
- import ssfGuest from '@elliemae/em-ssf-guest';
5
- import { getDefaultTheme } from '@elliemae/pui-theme';
1
+ import ReactDOM from "react-dom";
2
+ import _ from "lodash";
3
+ import ssfGuest from "@elliemae/em-ssf-guest";
4
+ import { getDefaultTheme } from "@elliemae/pui-theme";
6
5
  import { getWindow } from "../window.js";
7
6
  import { loadAppConfig } from "../app-config/index.js";
8
7
  import { getAppConfigValue } from "../app-config/config.js";
@@ -11,184 +10,129 @@ import { logger } from "./console-logger.js";
11
10
  import { removeStorageEvents } from "../web-storage.js";
12
11
  import { updateBAEventParameters } from "../../analytics/web-analytics.js";
13
12
  import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
14
-
15
13
  const isCrossDomain = () => {
16
14
  try {
17
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
18
15
  window.parent.document;
19
16
  return false;
20
17
  } catch (ex) {
21
18
  return true;
22
19
  }
23
- }; // singleton class
24
-
25
-
26
- export class CMicroAppGuest {
20
+ };
21
+ class CMicroAppGuest {
27
22
  constructor(params) {
28
- var _window$emui;
29
-
30
- _defineProperty(this, "logger", void 0);
31
-
32
- _defineProperty(this, "appId", void 0);
33
-
34
- _defineProperty(this, "props", void 0);
35
-
36
- _defineProperty(this, "containerId", void 0);
37
-
38
- _defineProperty(this, "onInit", void 0);
39
-
40
- _defineProperty(this, "onMount", void 0);
41
-
42
- _defineProperty(this, "onUnmount", void 0);
43
-
44
- _defineProperty(this, "onGetRef", void 0);
45
-
46
- this.containerId = 'app-container';
47
- this.appId = ((_window$emui = window.emui) === null || _window$emui === void 0 ? void 0 : _window$emui.appId) || getAppConfigValue('appId');
23
+ this.containerId = "app-container";
24
+ this.appId = window.emui?.appId || getAppConfigValue("appId");
48
25
  this.props = {
49
26
  host: null,
50
27
  hostUrl: null,
51
28
  prevState: null,
52
29
  history: browserHistory,
53
30
  theme: getDefaultTheme(),
54
- manifestPath: './latest'
31
+ manifestPath: "./latest"
55
32
  };
56
- this.logger = (params === null || params === void 0 ? void 0 : params.logger) || logger;
57
- this.onInit = params === null || params === void 0 ? void 0 : params.onInit;
58
- this.onMount = params === null || params === void 0 ? void 0 : params.onMount;
59
- this.onUnmount = params === null || params === void 0 ? void 0 : params.onUnmount;
60
- this.onGetRef = params === null || params === void 0 ? void 0 : params.onGetRef;
33
+ this.logger = params?.logger || logger;
34
+ this.onInit = params?.onInit;
35
+ this.onMount = params?.onMount;
36
+ this.onUnmount = params?.onUnmount;
37
+ this.onGetRef = params?.onGetRef;
61
38
  this.getHost = this.getHost.bind(this);
62
39
  this.getLogger = this.getLogger.bind(this);
63
40
  this.getProps = this.getProps.bind(this);
64
41
  const browserWindow = getWindow();
65
-
66
42
  if (browserWindow) {
67
43
  browserWindow.emui = browserWindow.emui || {};
68
- browserWindow.emui[this.appId] = browserWindow.emui[this.appId] || {}; // expose init mount & unmount methods
69
-
44
+ browserWindow.emui[this.appId] = browserWindow.emui[this.appId] || {};
70
45
  browserWindow.emui[this.appId].init = this.init.bind(this);
71
46
  browserWindow.emui[this.appId].mount = this.mount.bind(this);
72
47
  browserWindow.emui[this.appId].unmount = this.unmount.bind(this);
73
48
  browserWindow.emui[this.appId].getRef = this.getRef.bind(this);
74
49
  }
75
50
  }
76
-
77
51
  static getInstance(params) {
78
52
  if (!this.instance) {
79
53
  this.instance = new this(params);
80
54
  }
81
-
82
55
  return this.instance;
83
56
  }
84
-
85
57
  static isInitialized() {
86
58
  return !!this.instance;
87
59
  }
88
-
89
60
  static isHosted() {
90
- var _this$instance, _this$instance$props;
91
-
92
- return !!((_this$instance = this.instance) !== null && _this$instance !== void 0 && (_this$instance$props = _this$instance.props) !== null && _this$instance$props !== void 0 && _this$instance$props.host);
61
+ return !!this.instance?.props?.host;
93
62
  }
94
-
95
63
  getHost() {
96
64
  return this.props.host;
97
65
  }
98
-
99
66
  getLogger() {
100
67
  return this.logger;
101
68
  }
102
-
103
69
  getProps() {
104
70
  return this.props;
105
71
  }
106
-
107
72
  getSessionStorageItem(key) {
108
- var _this$props$host;
109
-
110
73
  let value = sessionStorage.getItem(key);
111
-
112
- if (!value && (_this$props$host = this.props.host) !== null && _this$props$host !== void 0 && _this$props$host.getItem) {
74
+ if (!value && this.props.host?.getItem) {
113
75
  value = this.props.host.getItem(key);
114
76
  }
115
-
116
77
  return value;
117
78
  }
118
-
119
79
  async getSSFHost() {
120
80
  let host = null;
121
-
122
81
  if (window.parent !== window) {
123
- // not a standalone app
124
82
  if (!isCrossDomain()) {
125
- var _window$parent, _window$parent$emui;
126
-
127
- host = ((_window$parent = window.parent) === null || _window$parent === void 0 ? void 0 : (_window$parent$emui = _window$parent.emui) === null || _window$parent$emui === void 0 ? void 0 : _window$parent$emui.MicroAppHost) || null;
83
+ host = window.parent?.emui?.MicroAppHost || null;
128
84
  } else if (ssfGuest && this.props.hostName) {
129
85
  await ssfGuest.connect();
130
- const timeout = new Promise(resolve => {
86
+ const timeout = new Promise((resolve) => {
131
87
  setTimeout(resolve, 100, null);
132
88
  });
133
- host = await Promise.race([ssfGuest.getObject(this.props.hostName), timeout]);
89
+ host = await Promise.race([
90
+ ssfGuest.getObject(this.props.hostName),
91
+ timeout
92
+ ]);
134
93
  }
135
94
  }
136
-
137
95
  return host;
138
96
  }
139
-
140
97
  async init(options) {
141
- this.props = _merge(this.props, options);
142
-
98
+ this.props = _.merge(this.props, options);
143
99
  if (!this.props.host) {
144
100
  const host = await this.getSSFHost();
145
- if (host) this.props.host = host;
101
+ if (host)
102
+ this.props.host = host;
146
103
  }
147
- /* eslint-disable camelcase, no-undef */
148
-
149
-
150
- __webpack_public_path__ = __webpack_public_path__.replace(/\/?$/, '/');
104
+ __webpack_public_path__ = __webpack_public_path__.replace(/\/?$/, "/");
151
105
  return loadAppConfig(__webpack_public_path__).then(() => {
152
- const instanceId = this.getSessionStorageItem('instanceId') || '';
153
- const userId = this.getSessionStorageItem('userId') || '';
154
- updateBAEventParameters({
155
- appId: this.appId,
156
- instanceId,
157
- userId
158
- });
159
- setAppDynamicsUserData({
160
- appId: this.appId,
161
- instanceId,
162
- userId
163
- });
164
- if (this.onInit) this.onInit(this.props);
106
+ const instanceId = this.getSessionStorageItem("instanceId") || "";
107
+ const userId = this.getSessionStorageItem("userId") || "";
108
+ updateBAEventParameters({ appId: this.appId, instanceId, userId });
109
+ setAppDynamicsUserData({ appId: this.appId, instanceId, userId });
110
+ if (this.onInit)
111
+ this.onInit(this.props);
165
112
  });
166
113
  }
167
-
168
- mount(options = {
169
- containerId: 'app-container'
170
- }) {
171
- this.containerId = options === null || options === void 0 ? void 0 : options.containerId;
114
+ mount(options = { containerId: "app-container" }) {
115
+ this.containerId = options?.containerId;
172
116
  return Promise.resolve().then(() => {
173
- if (this.onMount) this.onMount(options);
117
+ if (this.onMount)
118
+ this.onMount(options);
174
119
  });
175
120
  }
176
-
177
121
  unmount(options) {
178
122
  const appEle = document.getElementById(this.containerId);
179
- if (appEle) ReactDOM.unmountComponentAtNode(appEle);
123
+ if (appEle)
124
+ ReactDOM.unmountComponentAtNode(appEle);
180
125
  removeStorageEvents();
181
126
  return Promise.resolve().then(() => this.onUnmount ? this.onUnmount(options) : null);
182
127
  }
183
-
184
128
  getRef() {
185
129
  return this.onGetRef ? this.onGetRef() : null;
186
130
  }
187
-
188
131
  navigate(url, state) {
189
- if (url) this.props.history.push(url, state);
132
+ if (url)
133
+ this.props.history.push(url, state);
190
134
  }
191
-
192
135
  }
193
-
194
- _defineProperty(CMicroAppGuest, "instance", void 0);
136
+ export {
137
+ CMicroAppGuest
138
+ };
@@ -1,8 +1,5 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
-
3
- /* eslint-disable max-lines */
4
- import { publish, subscribe, unsubscribe } from 'pubsub-js';
5
- import { getDefaultTheme } from '@elliemae/pui-theme';
1
+ import { publish, subscribe, unsubscribe } from "pubsub-js";
2
+ import { getDefaultTheme } from "@elliemae/pui-theme";
6
3
  import { getStore } from "../../data/store.js";
7
4
  import { waitMessage } from "../../data/wait-message/actions.js";
8
5
  import { actions as error } from "../../data/error/index.js";
@@ -12,31 +9,26 @@ import { resetUserIdleTime } from "../session.js";
12
9
  import { loadAppConfig } from "../app-config/index.js";
13
10
  import { browserHistory } from "../history.js";
14
11
  import { logger } from "./console-logger.js";
15
- import { HOST_WINDOW_RESIZED, HOST_WINDOW_BREAKPOINT_CHANGED } from "../constants.js";
16
- import { getWindow, getCurrentBreakpoint, getViewportSize as getWindowViewportSize } from "../window.js";
12
+ import {
13
+ HOST_WINDOW_RESIZED,
14
+ HOST_WINDOW_BREAKPOINT_CHANGED
15
+ } from "../constants.js";
16
+ import {
17
+ getWindow,
18
+ getCurrentBreakpoint,
19
+ getViewportSize as getWindowViewportSize
20
+ } from "../window.js";
17
21
  import { sendBAEvent } from "../../analytics/index.js";
18
22
  import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
19
23
  import { updateBAEventParameters } from "../../analytics/web-analytics.js";
20
- export class CMicroAppHost {
24
+ class CMicroAppHost {
21
25
  constructor(params) {
22
- _defineProperty(this, "logger", void 0);
23
-
24
- _defineProperty(this, "appId", void 0);
25
-
26
- _defineProperty(this, "props", void 0);
27
-
28
- _defineProperty(this, "activeGuests", void 0);
29
-
30
- _defineProperty(this, "onInit", void 0);
31
-
32
- _defineProperty(this, "onRenewSessionTimer", void 0);
33
-
34
- this.appId = getAppConfigValue('appId');
35
- this.onInit = params === null || params === void 0 ? void 0 : params.onInit;
36
- this.logger = (params === null || params === void 0 ? void 0 : params.logger) || logger;
37
- this.onRenewSessionTimer = params === null || params === void 0 ? void 0 : params.onRenewSessionTimer;
26
+ this.appId = getAppConfigValue("appId");
27
+ this.onInit = params?.onInit;
28
+ this.logger = params?.logger || logger;
29
+ this.onRenewSessionTimer = params?.onRenewSessionTimer;
38
30
  this.props = {
39
- systemVersion: 'latest',
31
+ systemVersion: "latest",
40
32
  history: browserHistory,
41
33
  theme: getDefaultTheme()
42
34
  };
@@ -47,135 +39,107 @@ export class CMicroAppHost {
47
39
  this.getGuest = this.getGuest.bind(this);
48
40
  this.renewSessionTimer = this.renewSessionTimer.bind(this);
49
41
  this.setSystemVersion = this.setSystemVersion.bind(this);
50
- /* eslint-disable camelcase, no-undef */
51
-
52
42
  loadAppConfig(__webpack_public_path__).then(() => {
53
- if (this.onInit) this.onInit(this.props);
54
- }).catch(() => {});
55
- updateBAEventParameters({
56
- appId: this.appId
43
+ if (this.onInit)
44
+ this.onInit(this.props);
45
+ }).catch(() => {
57
46
  });
47
+ updateBAEventParameters({ appId: this.appId });
58
48
  setAppDynamicsUserData({
59
49
  appId: this.appId
60
50
  });
61
51
  }
62
-
63
52
  static getInstance(params) {
64
53
  if (!this.instance) {
65
54
  this.instance = new this(params);
66
55
  }
67
-
68
56
  return this.instance;
69
57
  }
70
-
71
58
  static isInitialized() {
72
59
  return !!this.instance;
73
60
  }
74
-
75
61
  getProps() {
76
62
  return this.props;
77
63
  }
78
-
79
64
  getLogger() {
80
65
  return this.logger;
81
66
  }
82
-
83
67
  getItem(key) {
84
68
  return getWindow().sessionStorage.getItem(key);
85
69
  }
86
-
87
70
  setItem(key, value) {
88
71
  getWindow().sessionStorage.setItem(key, value);
89
72
  }
90
-
91
73
  getGuests() {
92
74
  return this.activeGuests;
93
75
  }
94
-
95
76
  getGuest(id) {
96
77
  return this.activeGuests[id] ? this.activeGuests[id] : null;
97
78
  }
98
-
99
79
  publish(message, data) {
100
80
  return publish(message, data);
101
- } // eslint-disable-next-line @typescript-eslint/ban-types
102
-
103
-
81
+ }
104
82
  subscribe(message, func) {
105
83
  return subscribe(message, func);
106
84
  }
107
-
108
85
  unsubscribe(token) {
109
86
  unsubscribe(token);
110
87
  }
111
-
112
88
  navigate(url, state) {
113
- if (url) this.props.history.push(url, state);
89
+ if (url)
90
+ this.props.history.push(url, state);
114
91
  }
115
-
116
92
  openWaitMessage() {
117
93
  const store = getStore();
118
- if (store) store.dispatch(waitMessage.open());
94
+ if (store)
95
+ store.dispatch(waitMessage.open());
119
96
  }
120
-
121
97
  closeWaitMessage() {
122
98
  const store = getStore();
123
- if (store) store.dispatch(waitMessage.close());
99
+ if (store)
100
+ store.dispatch(waitMessage.close());
124
101
  }
125
-
126
102
  openErrorBanner(message) {
127
103
  const store = getStore();
128
- if (store) store.dispatch(error.set({
129
- description: message
130
- }));
104
+ if (store)
105
+ store.dispatch(error.set({ description: message }));
131
106
  }
132
-
133
107
  getAuthToken() {
134
- return getWindow().sessionStorage.getItem('Authorization');
108
+ return getWindow().sessionStorage.getItem("Authorization");
135
109
  }
136
-
137
110
  renewAuthToken() {
138
- return getWindow().sessionStorage.getItem('Authorization');
111
+ return getWindow().sessionStorage.getItem("Authorization");
139
112
  }
140
-
141
113
  logout() {
142
114
  const store = getStore();
143
- if (store) store.dispatch(logout.confirm());
115
+ if (store)
116
+ store.dispatch(logout.confirm());
144
117
  }
145
-
146
118
  renewSessionTimer() {
147
119
  resetUserIdleTime();
148
- if (this.onRenewSessionTimer) this.onRenewSessionTimer();
120
+ if (this.onRenewSessionTimer)
121
+ this.onRenewSessionTimer();
149
122
  }
150
-
151
123
  getBreakpoint() {
152
124
  return getCurrentBreakpoint();
153
125
  }
154
-
155
126
  getViewportSize() {
156
127
  return getWindowViewportSize();
157
128
  }
158
-
159
129
  onResizeEvent(eventHandler) {
160
130
  return subscribe(HOST_WINDOW_RESIZED, (msg, data) => eventHandler(data));
161
131
  }
162
-
163
132
  onBreakpointChangeEvent(eventHandler) {
164
133
  return subscribe(HOST_WINDOW_BREAKPOINT_CHANGED, (msg, data) => eventHandler(data));
165
134
  }
166
-
167
- setSystemVersion(version = 'latest') {
135
+ setSystemVersion(version = "latest") {
168
136
  window.emui.version = version;
169
137
  this.props.systemVersion = version;
170
138
  }
171
-
172
139
  sendBAEvent(data) {
173
- sendBAEvent({
174
- data,
175
- self: true
176
- });
140
+ sendBAEvent({ data, self: true });
177
141
  }
178
-
179
142
  }
180
-
181
- _defineProperty(CMicroAppHost, "instance", void 0);
143
+ export {
144
+ CMicroAppHost
145
+ };
@@ -1,45 +1,47 @@
1
- import _merge from "lodash/merge";
1
+ import _ from "lodash";
2
2
  import { CMicroAppGuest } from "./guest.js";
3
3
  import { CMicroAppHost } from "./host.js";
4
4
  import { getAppConfigValue } from "../app-config/config.js";
5
5
  import { convertRelativeToAbsoluteUrl, isCIBuild } from "../helpers.js";
6
- export const isHost = () => CMicroAppHost.isInitialized();
7
- export const isGuest = () => CMicroAppGuest.isInitialized();
8
- export const isStandAloneGuest = () => isGuest() && window.top === window.self;
9
- export const getLogger = () => isHost() ? CMicroAppHost.getInstance().getLogger() : CMicroAppGuest.getInstance().getLogger();
10
-
11
- const isProduction = mode => {
12
- if (isCIBuild()) return true;
13
- if (mode) return mode === 'production';
6
+ const isHost = () => CMicroAppHost.isInitialized();
7
+ const isGuest = () => CMicroAppGuest.isInitialized();
8
+ const isStandAloneGuest = () => isGuest() && window.top === window.self;
9
+ const getLogger = () => isHost() ? CMicroAppHost.getInstance().getLogger() : CMicroAppGuest.getInstance().getLogger();
10
+ const isProduction = (mode) => {
11
+ if (isCIBuild())
12
+ return true;
13
+ if (mode)
14
+ return mode === "production";
14
15
  return true;
15
16
  };
16
-
17
- const getVersionedPath = path => {
18
- const {
19
- systemVersion
20
- } = CMicroAppHost.getInstance().getProps();
17
+ const getVersionedPath = (path) => {
18
+ const { systemVersion } = CMicroAppHost.getInstance().getProps();
21
19
  const majorMinorVersion = systemVersion.match(/^(?:\d+\.\d+)*/g);
22
- return path.replace(/{SYSTEM_VERSION}/, majorMinorVersion && majorMinorVersion[0] || 'latest');
20
+ return path.replace(/{SYSTEM_VERSION}/, majorMinorVersion && majorMinorVersion[0] || "latest");
23
21
  };
24
-
25
- export const getMicroFrontEndAppConfig = appInfo => {
22
+ const getMicroFrontEndAppConfig = (appInfo) => {
26
23
  const microFEAppConfig = getAppConfigValue(`microFrontendApps.${appInfo.id}`);
27
- if (!microFEAppConfig) throw new Error(`unable to locate application configuraiton for ${appInfo.id} under microFrontendApps section of app.config.json`);
28
- const {
29
- mode = 'production'
30
- } = microFEAppConfig;
31
- const envConfig = isProduction(mode) ? microFEAppConfig.production : microFEAppConfig.development; // delete env config
32
-
33
- if (microFEAppConfig.production) delete microFEAppConfig.production;
34
- if (microFEAppConfig.development) delete microFEAppConfig.development;
35
-
36
- const microFEConfig = _merge(appInfo, {
37
- mode: 'production',
38
- hostUrl: './',
39
- manifestPath: './{SYSTEM_VERSION}'
24
+ if (!microFEAppConfig)
25
+ throw new Error(`unable to locate application configuraiton for ${appInfo.id} under microFrontendApps section of app.config.json`);
26
+ const { mode = "production" } = microFEAppConfig;
27
+ const envConfig = isProduction(mode) ? microFEAppConfig.production : microFEAppConfig.development;
28
+ if (microFEAppConfig.production)
29
+ delete microFEAppConfig.production;
30
+ if (microFEAppConfig.development)
31
+ delete microFEAppConfig.development;
32
+ const microFEConfig = _.merge(appInfo, {
33
+ mode: "production",
34
+ hostUrl: "./",
35
+ manifestPath: "./{SYSTEM_VERSION}"
40
36
  }, microFEAppConfig, envConfig);
41
-
42
- microFEConfig.hostUrl = convertRelativeToAbsoluteUrl(microFEConfig.hostUrl.replace(/\/?$/, '/'));
37
+ microFEConfig.hostUrl = convertRelativeToAbsoluteUrl(microFEConfig.hostUrl.replace(/\/?$/, "/"));
43
38
  microFEConfig.manifestPath = getVersionedPath(microFEConfig.manifestPath);
44
39
  return microFEConfig;
45
- };
40
+ };
41
+ export {
42
+ getLogger,
43
+ getMicroFrontEndAppConfig,
44
+ isGuest,
45
+ isHost,
46
+ isStandAloneGuest
47
+ };
@@ -1 +0,0 @@
1
- export {};
@@ -3,29 +3,28 @@ const poBoxRegex = /P\.? ?O\.? *Box +\d+/gi;
3
3
  const roadRegex = /(street|st|road|rd|avenue|ave|drive|dr|loop|court|ct|circle|cir|lane|ln|boulevard|blvd|way)\.?\b/gi;
4
4
  const piiPatterns = {
5
5
  creditCardNumber: /\d{4}[ -]?\d{4}[ -]?\d{4}[ -]?\d{4}|\d{4}[ -]?\d{6}[ -]?\d{4}\d?/g,
6
- streetAddress: new RegExp(`(\\d+\\s*(\\w+ ){1,2}${roadRegex.source}(\\s+${aptRegex.source})?)|(${poBoxRegex.source})`, 'gi'),
6
+ streetAddress: new RegExp(`(\\d+\\s*(\\w+ ){1,2}${roadRegex.source}(\\s+${aptRegex.source})?)|(${poBoxRegex.source})`, "gi"),
7
7
  zipcode: /\b\d{5}\b(-\d{4})?\b/g,
8
8
  phoneNumber: /(\(?\+?[0-9]{1,2}\)?[-. ]?)?(\(?[0-9]{3}\)?|[0-9]{3})[-. ]?([0-9]{3}[-. ]?[0-9]{4}|\b[A-Z0-9]{7}\b)/g,
9
9
  ipAddress: /(\d{1,3}(\.\d{1,3}){3}|[0-9A-F]{4}(:[0-9A-F]{4}){5}(::|(:0000)+))/gi,
10
10
  usSocialSecurityNumber: /\b\d{3}[ -.]\d{2}[ -.]\d{4}\b/g,
11
11
  emailAddress: /([a-z0-9_\-.+]+)@\w+(\.\w+)*/gi,
12
- // username: /(user( ?name)?|login): \S+/gi,
13
12
  password: /(pass(word|phrase)?|secret): \S+/gi,
14
- credentials: /(login( cred(ential)?s| info(rmation)?)?|cred(ential)?s) ?:\s*\S+\s+\/?\s*\S+/gi // digits: /\b\d{4,}\b/g,
15
- // url: /([^\s:/?#]+):\/\/([^/?#\s]*)([^?#\s]*)(\?([^#\s]*))?(#([^\s]*))?/g,
16
-
13
+ credentials: /(login( cred(ential)?s| info(rmation)?)?|cred(ential)?s) ?:\s*\S+\s+\/?\s*\S+/gi
17
14
  };
18
-
19
15
  const replacer = (key, value) => {
20
- if (!key || typeof value !== 'string' || key === 'correlationId') return value;
21
- return Object.values(piiPatterns).reduce((redactedString, piiPattern) => redactedString.replace(piiPattern, '****'), value);
16
+ if (!key || typeof value !== "string" || key === "correlationId")
17
+ return value;
18
+ return Object.values(piiPatterns).reduce((redactedString, piiPattern) => redactedString.replace(piiPattern, "****"), value);
22
19
  };
23
-
24
- export const redactPii = data => {
20
+ const redactPii = (data) => {
25
21
  try {
26
22
  const redactedData = JSON.stringify(data, replacer);
27
23
  return JSON.parse(redactedData);
28
24
  } catch (err) {
29
25
  return data;
30
26
  }
31
- };
27
+ };
28
+ export {
29
+ redactPii
30
+ };
@@ -1,17 +1,20 @@
1
- import { logRecords } from "./log-records.js";
1
+ import "./log-records.js";
2
2
  import { getLogger } from "./micro-frontend/index.js";
3
- export const initServiceWorker = (swDest = '') => {
3
+ const initServiceWorker = (swDest = "") => {
4
4
  const logger = getLogger() || console;
5
-
6
- if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
7
- window.addEventListener('load', () => {
8
- navigator.serviceWorker.register(`${swDest.replace(/\/?$/, '/')}sw.js`).then(() => {
9
- logger.debug('Service Worker registered');
10
- }).catch(registrationError => {
11
- logger.error({ ...logRecords.SERVICE_WORKER_FAILED,
5
+ if (false) {
6
+ window.addEventListener("load", () => {
7
+ navigator.serviceWorker.register(`${swDest.replace(/\/?$/, "/")}sw.js`).then(() => {
8
+ logger.debug("Service Worker registered");
9
+ }).catch((registrationError) => {
10
+ logger.error({
11
+ ...logRecords.SERVICE_WORKER_FAILED,
12
12
  exception: registrationError
13
13
  });
14
14
  });
15
15
  });
16
16
  }
17
- };
17
+ };
18
+ export {
19
+ initServiceWorker
20
+ };