@elliemae/pui-app-sdk 2.17.1 → 3.0.0-beta.10

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 (397) hide show
  1. package/dist/cjs/analytics/appdynamics.js +34 -30
  2. package/dist/cjs/analytics/index.js +32 -26
  3. package/dist/cjs/analytics/page-view-event.js +34 -30
  4. package/dist/cjs/analytics/user-session-event.js +34 -27
  5. package/dist/cjs/analytics/user-wait-event.js +31 -17
  6. package/dist/cjs/analytics/web-analytics.js +16 -19
  7. package/dist/cjs/api/auth/index.js +41 -39
  8. package/dist/cjs/api/helpers.js +33 -99
  9. package/dist/cjs/api/users/index.js +28 -16
  10. package/dist/cjs/communication/http-client/index.js +44 -48
  11. package/dist/cjs/communication/http-client/request-interceptor.js +28 -12
  12. package/dist/cjs/communication/http-client/response-interceptor.js +41 -38
  13. package/dist/cjs/communication/http-client/retry-axios.js +68 -122
  14. package/dist/cjs/communication/http-client/retry.js +42 -36
  15. package/dist/cjs/communication/http-client/tests/index.test-disable.js +48 -56
  16. package/dist/cjs/data/auth/actions.js +17 -26
  17. package/dist/cjs/data/auth/reducer.js +30 -18
  18. package/dist/cjs/data/breakpoint/index.js +38 -32
  19. package/dist/cjs/data/error/index.js +33 -18
  20. package/dist/cjs/data/index.js +34 -0
  21. package/dist/cjs/data/live-message/index.js +34 -25
  22. package/dist/cjs/data/logout/actions.js +12 -9
  23. package/dist/cjs/data/navigation-prompt/actions.js +12 -9
  24. package/dist/cjs/data/react-redux.js +29 -13
  25. package/dist/cjs/data/reducers.js +35 -23
  26. package/dist/cjs/data/saga.js +12 -9
  27. package/dist/cjs/data/store.js +52 -60
  28. package/dist/cjs/data/wait-message/actions.js +14 -13
  29. package/dist/cjs/data/wait-message/reducer.js +32 -24
  30. package/dist/cjs/index.js +189 -809
  31. package/dist/cjs/micro-frontend.js +33 -0
  32. package/dist/cjs/route/index.js +38 -32
  33. package/dist/cjs/route/page-view.js +30 -22
  34. package/dist/cjs/route/private-route/index.js +53 -60
  35. package/dist/cjs/sideeffect/auth/index.js +42 -30
  36. package/dist/cjs/sideeffect/error-toast/index.js +39 -26
  37. package/dist/cjs/sideeffect/wait-message/index.js +45 -29
  38. package/dist/cjs/typings/custom.d.js +0 -1
  39. package/dist/cjs/typings/elliemae.d.js +0 -1
  40. package/dist/cjs/typings/styled.d.js +19 -3
  41. package/dist/cjs/utils/app-config/config.js +33 -33
  42. package/dist/cjs/utils/app-config/index.js +42 -44
  43. package/dist/cjs/utils/app-host-integration/react.js +27 -14
  44. package/dist/cjs/utils/auth/helper.js +30 -18
  45. package/dist/cjs/utils/auth/index.js +76 -116
  46. package/dist/cjs/utils/await.js +3 -0
  47. package/dist/cjs/utils/constants.js +22 -21
  48. package/dist/cjs/utils/font-size.js +13 -14
  49. package/dist/cjs/utils/guest-with-service.js +11 -12
  50. package/dist/cjs/utils/helpers.js +15 -19
  51. package/dist/cjs/utils/history.js +29 -12
  52. package/dist/cjs/utils/log-records.js +38 -35
  53. package/dist/cjs/utils/micro-frontend/console-logger.js +39 -23
  54. package/dist/cjs/utils/micro-frontend/guest.js +80 -128
  55. package/dist/cjs/utils/micro-frontend/host.js +84 -124
  56. package/dist/cjs/utils/micro-frontend/index.js +60 -61
  57. package/dist/cjs/utils/micro-frontend/types.js +3 -5
  58. package/dist/cjs/utils/redact-pii.js +15 -17
  59. package/dist/cjs/utils/service-worker.js +36 -21
  60. package/dist/cjs/utils/session.js +64 -70
  61. package/dist/cjs/utils/storybook/cjs/main.js +53 -0
  62. package/dist/cjs/utils/storybook/cjs/middleware.js +5 -0
  63. package/dist/cjs/utils/storybook/cjs/vite.js +6 -0
  64. package/dist/cjs/utils/storybook/cjs/webpack.js +21 -0
  65. package/dist/cjs/utils/storybook/manager.js +31 -16
  66. package/dist/cjs/utils/storybook/preview.js +58 -50
  67. package/dist/cjs/utils/storybook/theme.js +30 -14
  68. package/dist/cjs/utils/testing/index.js +39 -50
  69. package/dist/cjs/utils/testing/render-with-redux.js +35 -27
  70. package/dist/cjs/utils/testing/render-with-router-redux.js +41 -37
  71. package/dist/cjs/utils/testing/render-with-router.js +35 -28
  72. package/dist/cjs/utils/testing/render-with-state-addons.js +41 -36
  73. package/dist/cjs/utils/types.js +3 -0
  74. package/dist/cjs/utils/url.js +12 -13
  75. package/dist/cjs/utils/web-storage.js +40 -30
  76. package/dist/cjs/utils/window.js +36 -28
  77. package/dist/cjs/view/app-root/hosted-app.js +36 -32
  78. package/dist/cjs/view/app-root/index.js +58 -62
  79. package/dist/cjs/view/app-root/stand-alone-app.js +39 -37
  80. package/dist/cjs/view/app-root/style.js +50 -12
  81. package/dist/cjs/view/error-boundary/default-error-template.js +27 -15
  82. package/dist/cjs/view/error-boundary/index.js +41 -43
  83. package/dist/cjs/view/error-toast/index.js +43 -32
  84. package/dist/cjs/view/fetch-host-app-data/index.js +34 -26
  85. package/dist/cjs/view/fetch-host-app-data/store.js +31 -24
  86. package/dist/cjs/view/fields/check-box/index.js +35 -39
  87. package/dist/cjs/view/fields/combo-box/index.js +38 -31
  88. package/dist/cjs/view/fields/connect-form.js +30 -15
  89. package/dist/cjs/view/fields/date-input/index.js +35 -26
  90. package/dist/cjs/view/fields/date-picker/index.js +35 -26
  91. package/dist/cjs/view/fields/form-item-layout/index.js +37 -30
  92. package/dist/cjs/view/fields/input-mask/index.js +36 -41
  93. package/dist/cjs/view/fields/large-text-box/index.js +35 -26
  94. package/dist/cjs/view/fields/radio/index.js +35 -30
  95. package/dist/cjs/view/fields/radio-group/index.js +33 -27
  96. package/dist/cjs/view/fields/text-box/index.js +35 -26
  97. package/dist/cjs/view/fields/watch-value.js +42 -35
  98. package/dist/cjs/view/form/index.js +42 -34
  99. package/dist/cjs/view/form/personal-info-section.js +57 -80
  100. package/dist/cjs/view/form/submit-button/index.js +35 -23
  101. package/dist/cjs/view/guest-unload-handlers/index.js +33 -22
  102. package/dist/cjs/view/header/center-region/index.js +62 -38
  103. package/dist/cjs/view/header/index.js +42 -35
  104. package/dist/cjs/view/header/logo-region/index.js +32 -23
  105. package/dist/cjs/view/header/nav-region/index.js +45 -30
  106. package/dist/cjs/view/header/nav-region/notification/index.js +29 -18
  107. package/dist/cjs/view/header/nav-region/user/index.js +29 -18
  108. package/dist/cjs/view/host-binding-events/index.js +10 -11
  109. package/dist/cjs/view/intro.stories.mdx +1 -1
  110. package/dist/cjs/view/live-message/index.js +34 -34
  111. package/dist/cjs/view/loadable/index.js +34 -27
  112. package/dist/cjs/view/login/index.js +37 -30
  113. package/dist/cjs/view/media-breakpoint/index.js +44 -34
  114. package/dist/cjs/view/message-to-host-app/index.js +31 -20
  115. package/dist/cjs/view/micro-app/app-factory/index.js +100 -134
  116. package/dist/cjs/view/micro-app/const.js +10 -7
  117. package/dist/cjs/view/micro-app/index.js +38 -27
  118. package/dist/cjs/view/micro-app/resources/manifest.js +43 -34
  119. package/dist/cjs/view/micro-app/resources/script.js +56 -53
  120. package/dist/cjs/view/micro-app/resources/style.js +44 -38
  121. package/dist/cjs/view/micro-app/types.js +3 -5
  122. package/dist/cjs/view/micro-app/use-app-will-render.js +58 -50
  123. package/dist/cjs/view/micro-app/utils.js +32 -21
  124. package/dist/cjs/view/micro-iframe-app/app.js +38 -39
  125. package/dist/cjs/view/micro-iframe-app/iframe/const.js +10 -7
  126. package/dist/cjs/view/micro-iframe-app/iframe/index.js +52 -47
  127. package/dist/cjs/view/micro-iframe-app/index.js +37 -24
  128. package/dist/cjs/view/micro-iframe-app/types.js +3 -5
  129. package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +42 -36
  130. package/dist/cjs/view/modals/error/index.js +36 -28
  131. package/dist/cjs/view/modals/navigation-prompt/index.js +39 -37
  132. package/dist/cjs/view/modals/session-expiry/customHooks.js +40 -35
  133. package/dist/cjs/view/modals/session-expiry/index.js +46 -50
  134. package/dist/cjs/view/modals/wait-message/html-wait-message.js +33 -18
  135. package/dist/cjs/view/modals/wait-message/index.js +51 -53
  136. package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +34 -21
  137. package/dist/cjs/view/render-with-delay/index.js +31 -19
  138. package/dist/cjs/view/render-with-host-data/index.js +36 -30
  139. package/dist/cjs/view/session-timeout/index.js +45 -35
  140. package/dist/cjs/view/storybook/decorator.js +33 -21
  141. package/dist/cjs/view/use-previous.js +29 -13
  142. package/dist/cjs/view/useMediaBreakpoints/index.js +34 -19
  143. package/dist/cjs/view/visually-hidden/index.js +42 -21
  144. package/dist/cjs/view/window-size/index.js +35 -22
  145. package/dist/es/analytics/appdynamics.js +14 -15
  146. package/dist/es/analytics/index.js +8 -14
  147. package/dist/es/analytics/page-view-event.js +11 -21
  148. package/dist/es/analytics/user-session-event.js +11 -13
  149. package/dist/es/analytics/user-wait-event.js +9 -5
  150. package/dist/es/analytics/web-analytics.js +12 -10
  151. package/dist/es/api/auth/index.js +21 -26
  152. package/dist/es/api/helpers.js +8 -81
  153. package/dist/es/api/users/index.js +6 -7
  154. package/dist/es/communication/http-client/index.js +19 -25
  155. package/dist/es/communication/http-client/request-interceptor.js +5 -2
  156. package/dist/es/communication/http-client/response-interceptor.js +20 -21
  157. package/dist/es/communication/http-client/retry-axios.js +45 -105
  158. package/dist/es/communication/http-client/retry.js +22 -25
  159. package/dist/es/communication/http-client/tests/index.test-disable.js +25 -44
  160. package/dist/es/data/auth/actions.js +13 -19
  161. package/dist/es/data/auth/reducer.js +8 -6
  162. package/dist/es/data/breakpoint/index.js +19 -21
  163. package/dist/es/data/error/index.js +11 -9
  164. package/dist/es/data/index.js +11 -0
  165. package/dist/es/data/live-message/index.js +12 -16
  166. package/dist/es/data/logout/actions.js +9 -5
  167. package/dist/es/data/navigation-prompt/actions.js +9 -5
  168. package/dist/es/data/react-redux.js +7 -3
  169. package/dist/es/data/reducers.js +6 -3
  170. package/dist/es/data/saga.js +8 -5
  171. package/dist/es/data/store.js +25 -43
  172. package/dist/es/data/wait-message/actions.js +11 -9
  173. package/dist/es/data/wait-message/reducer.js +9 -9
  174. package/dist/es/index.js +192 -83
  175. package/dist/es/micro-frontend.js +10 -0
  176. package/dist/es/route/index.js +16 -18
  177. package/dist/es/route/page-view.js +8 -8
  178. package/dist/es/route/private-route/index.js +24 -31
  179. package/dist/es/sideeffect/auth/index.js +24 -11
  180. package/dist/es/sideeffect/error-toast/index.js +11 -10
  181. package/dist/es/sideeffect/wait-message/index.js +14 -10
  182. package/dist/es/typings/styled.d.js +1 -1
  183. package/dist/es/utils/app-config/config.js +11 -9
  184. package/dist/es/utils/app-config/index.js +17 -27
  185. package/dist/es/utils/app-host-integration/react.js +8 -6
  186. package/dist/es/utils/auth/helper.js +7 -3
  187. package/dist/es/utils/auth/index.js +51 -75
  188. package/dist/es/utils/constants.js +18 -13
  189. package/dist/es/utils/font-size.js +7 -3
  190. package/dist/es/utils/guest-with-service.js +6 -7
  191. package/dist/es/utils/helpers.js +10 -6
  192. package/dist/es/utils/history.js +7 -3
  193. package/dist/es/utils/log-records.js +34 -31
  194. package/dist/es/utils/micro-frontend/console-logger.js +16 -12
  195. package/dist/es/utils/micro-frontend/guest.js +44 -100
  196. package/dist/es/utils/micro-frontend/host.js +41 -77
  197. package/dist/es/utils/micro-frontend/index.js +35 -33
  198. package/dist/es/utils/micro-frontend/types.js +0 -1
  199. package/dist/es/utils/redact-pii.js +10 -11
  200. package/dist/es/utils/service-worker.js +13 -10
  201. package/dist/es/utils/session.js +45 -46
  202. package/dist/es/utils/storybook/manager.js +7 -4
  203. package/dist/es/utils/storybook/preview.js +27 -24
  204. package/dist/es/utils/storybook/theme.js +9 -6
  205. package/dist/es/utils/testing/index.js +12 -18
  206. package/dist/es/utils/testing/render-with-redux.js +12 -11
  207. package/dist/es/utils/testing/render-with-router-redux.js +18 -19
  208. package/dist/es/utils/testing/render-with-router.js +15 -16
  209. package/dist/es/utils/testing/render-with-state-addons.js +19 -18
  210. package/dist/es/utils/url.js +7 -3
  211. package/dist/es/utils/web-storage.js +21 -17
  212. package/dist/es/utils/window.js +18 -18
  213. package/dist/es/view/app-root/hosted-app.js +10 -13
  214. package/dist/es/view/app-root/index.js +29 -33
  215. package/dist/es/view/app-root/stand-alone-app.js +11 -12
  216. package/dist/es/view/app-root/style.js +30 -5
  217. package/dist/es/view/error-boundary/default-error-template.js +5 -5
  218. package/dist/es/view/error-boundary/index.js +18 -25
  219. package/dist/es/view/error-toast/index.js +15 -14
  220. package/dist/es/view/fetch-host-app-data/index.js +14 -11
  221. package/dist/es/view/fetch-host-app-data/store.js +10 -7
  222. package/dist/es/view/fields/check-box/index.js +17 -18
  223. package/dist/es/view/fields/combo-box/index.js +20 -19
  224. package/dist/es/view/fields/connect-form.js +8 -6
  225. package/dist/es/view/fields/date-input/index.js +17 -14
  226. package/dist/es/view/fields/date-picker/index.js +17 -14
  227. package/dist/es/view/fields/form-item-layout/index.js +15 -15
  228. package/dist/es/view/fields/input-mask/index.js +21 -14
  229. package/dist/es/view/fields/large-text-box/index.js +17 -14
  230. package/dist/es/view/fields/radio/index.js +17 -18
  231. package/dist/es/view/fields/radio-group/index.js +15 -15
  232. package/dist/es/view/fields/text-box/index.js +17 -14
  233. package/dist/es/view/fields/watch-value.js +20 -24
  234. package/dist/es/view/form/index.js +23 -22
  235. package/dist/es/view/form/personal-info-section.js +28 -48
  236. package/dist/es/view/form/submit-button/index.js +13 -10
  237. package/dist/es/view/guest-unload-handlers/index.js +10 -9
  238. package/dist/es/view/header/center-region/index.js +41 -23
  239. package/dist/es/view/header/index.js +16 -15
  240. package/dist/es/view/header/logo-region/index.js +10 -10
  241. package/dist/es/view/header/nav-region/index.js +21 -13
  242. package/dist/es/view/header/nav-region/notification/index.js +7 -7
  243. package/dist/es/view/header/nav-region/user/index.js +7 -7
  244. package/dist/es/view/host-binding-events/index.js +7 -3
  245. package/dist/es/view/intro.stories.mdx +1 -1
  246. package/dist/es/view/live-message/index.js +13 -22
  247. package/dist/es/view/loadable/index.js +13 -15
  248. package/dist/es/view/login/index.js +12 -15
  249. package/dist/es/view/media-breakpoint/index.js +16 -13
  250. package/dist/es/view/message-to-host-app/index.js +10 -9
  251. package/dist/es/view/micro-app/app-factory/index.js +67 -81
  252. package/dist/es/view/micro-app/const.js +4 -1
  253. package/dist/es/view/micro-app/index.js +12 -9
  254. package/dist/es/view/micro-app/resources/manifest.js +17 -15
  255. package/dist/es/view/micro-app/resources/script.js +35 -35
  256. package/dist/es/view/micro-app/resources/style.js +22 -21
  257. package/dist/es/view/micro-app/types.js +0 -1
  258. package/dist/es/view/micro-app/use-app-will-render.js +35 -26
  259. package/dist/es/view/micro-app/utils.js +11 -13
  260. package/dist/es/view/micro-iframe-app/app.js +14 -20
  261. package/dist/es/view/micro-iframe-app/iframe/const.js +4 -1
  262. package/dist/es/view/micro-iframe-app/iframe/index.js +27 -31
  263. package/dist/es/view/micro-iframe-app/index.js +10 -10
  264. package/dist/es/view/micro-iframe-app/types.js +0 -1
  265. package/dist/es/view/micro-iframe-app/use-frame-loaded.js +15 -18
  266. package/dist/es/view/modals/error/index.js +13 -10
  267. package/dist/es/view/modals/navigation-prompt/index.js +11 -14
  268. package/dist/es/view/modals/session-expiry/customHooks.js +11 -13
  269. package/dist/es/view/modals/session-expiry/index.js +13 -20
  270. package/dist/es/view/modals/wait-message/html-wait-message.js +11 -10
  271. package/dist/es/view/modals/wait-message/index.js +30 -37
  272. package/dist/es/view/modals/wait-message/wait-message-launcher.js +8 -6
  273. package/dist/es/view/render-with-delay/index.js +8 -10
  274. package/dist/es/view/render-with-host-data/index.js +10 -13
  275. package/dist/es/view/session-timeout/index.js +19 -9
  276. package/dist/es/view/storybook/decorator.js +8 -5
  277. package/dist/es/view/use-previous.js +6 -3
  278. package/dist/es/view/useMediaBreakpoints/index.js +11 -9
  279. package/dist/es/view/visually-hidden/index.js +20 -10
  280. package/dist/es/view/window-size/index.js +12 -10
  281. package/dist/types/communication/http-client/retry.d.ts +1 -1
  282. package/dist/types/data/index.d.ts +4 -0
  283. package/dist/types/data/react-redux.d.ts +11 -11
  284. package/dist/types/data/reducers.d.ts +6 -6
  285. package/dist/types/data/store.d.ts +29 -29
  286. package/dist/types/index.d.ts +79 -79
  287. package/dist/types/micro-frontend.d.ts +6 -0
  288. package/dist/types/route/private-route/index.d.ts +1 -1
  289. package/dist/types/sideeffect/auth/index.d.ts +1 -1
  290. package/dist/types/utils/app-host-integration/react.d.ts +1 -1
  291. package/dist/types/utils/micro-frontend/guest.d.ts +3 -3
  292. package/dist/types/utils/micro-frontend/host.d.ts +1 -1
  293. package/dist/types/utils/micro-frontend/index.d.ts +2 -2
  294. package/dist/types/utils/micro-frontend/types.d.ts +1 -1
  295. package/dist/types/utils/storybook/cjs/main.d.ts +63 -0
  296. package/dist/types/utils/storybook/{middleware.d.ts → cjs/middleware.d.ts} +0 -0
  297. package/dist/types/utils/storybook/cjs/vite.d.ts +4 -0
  298. package/dist/types/utils/storybook/cjs/webpack.d.ts +16 -0
  299. package/dist/types/utils/storybook/preview.d.ts +9 -3
  300. package/dist/types/utils/testing/render-with-redux.d.ts +20 -20
  301. package/dist/types/utils/testing/render-with-router-redux.d.ts +20 -20
  302. package/dist/types/utils/window.d.ts +1 -1
  303. package/dist/types/view/app-root/index.d.ts +1 -1
  304. package/dist/types/view/fields/check-box/index.d.ts +1 -1
  305. package/dist/types/view/fields/check-box/index.stories.d.ts +1 -1
  306. package/dist/types/view/fields/check-box/set-value.stories.d.ts +1 -1
  307. package/dist/types/view/fields/combo-box/index.stories.d.ts +1 -1
  308. package/dist/types/view/fields/date-input/index.stories.d.ts +1 -1
  309. package/dist/types/view/fields/date-picker/index.stories.d.ts +1 -1
  310. package/dist/types/view/fields/form-item-layout/index.stories.d.ts +1 -1
  311. package/dist/types/view/fields/input-mask/index.d.ts +1 -1
  312. package/dist/types/view/fields/input-mask/index.stories.d.ts +1 -1
  313. package/dist/types/view/fields/large-text-box/index.stories.d.ts +1 -1
  314. package/dist/types/view/fields/radio/index.stories.d.ts +1 -1
  315. package/dist/types/view/fields/radio/set-value.stories.d.ts +1 -1
  316. package/dist/types/view/fields/radio-group/index.stories.d.ts +1 -1
  317. package/dist/types/view/fields/text-box/index.stories.d.ts +1 -1
  318. package/dist/types/view/form/usecases.stories.d.ts +1 -1
  319. package/dist/types/view/header/index.d.ts +1 -1
  320. package/dist/types/view/header/index.stories.d.ts +1 -1
  321. package/dist/types/view/micro-app/app-factory/index.d.ts +3 -3
  322. package/dist/types/view/micro-app/index.d.ts +1 -1
  323. package/dist/types/view/micro-app/resources/manifest.d.ts +2 -2
  324. package/dist/types/view/micro-app/resources/script.d.ts +1 -1
  325. package/dist/types/view/micro-app/resources/style.d.ts +1 -1
  326. package/dist/types/view/micro-app/use-app-will-render.d.ts +1 -1
  327. package/dist/types/view/micro-iframe-app/app.d.ts +2 -2
  328. package/dist/types/view/micro-iframe-app/index.d.ts +1 -1
  329. package/dist/types/view/micro-iframe-app/types.d.ts +1 -1
  330. package/dist/types/view/micro-iframe-app/use-frame-loaded.d.ts +1 -1
  331. package/dist/types/view/modals/error/index.stories.d.ts +1 -1
  332. package/dist/types/view/modals/navigation-prompt/index.stories.d.ts +1 -1
  333. package/dist/types/view/modals/session-expiry/index.stories.d.ts +1 -1
  334. package/dist/types/view/modals/wait-message/index.stories.d.ts +1 -1
  335. package/dist/types/view/storybook/decorator.d.ts +1 -1
  336. package/dist/types/view/visually-hidden/index.d.ts +1 -3
  337. package/package.json +34 -15
  338. package/dist/cjs/api/users/index.endpoint.js +0 -14
  339. package/dist/cjs/communication/http-client/tests/hello.endpoint.js +0 -14
  340. package/dist/cjs/communication/http-client/tests/private.endpoint.js +0 -14
  341. package/dist/cjs/utils/storybook/main.js +0 -38
  342. package/dist/cjs/utils/storybook/middleware.js +0 -9
  343. package/dist/cjs/view/error-toast/index.stories.js +0 -128
  344. package/dist/cjs/view/fields/check-box/index.stories.js +0 -64
  345. package/dist/cjs/view/fields/check-box/set-value.stories.js +0 -83
  346. package/dist/cjs/view/fields/combo-box/index.stories.js +0 -65
  347. package/dist/cjs/view/fields/date-input/index.stories.js +0 -53
  348. package/dist/cjs/view/fields/date-input/index1.stories.js +0 -53
  349. package/dist/cjs/view/fields/date-picker/index.stories.js +0 -53
  350. package/dist/cjs/view/fields/form-item-layout/index.stories.js +0 -43
  351. package/dist/cjs/view/fields/input-mask/index.stories.js +0 -52
  352. package/dist/cjs/view/fields/large-text-box/index.stories.js +0 -47
  353. package/dist/cjs/view/fields/radio/index.stories.js +0 -60
  354. package/dist/cjs/view/fields/radio/set-value.stories.js +0 -81
  355. package/dist/cjs/view/fields/radio-group/index.stories.js +0 -85
  356. package/dist/cjs/view/fields/text-box/index.stories.js +0 -48
  357. package/dist/cjs/view/form/index.stories.js +0 -71
  358. package/dist/cjs/view/form/usecases.stories.js +0 -59
  359. package/dist/cjs/view/header/index.stories.js +0 -24
  360. package/dist/cjs/view/live-message/index.stories.js +0 -53
  361. package/dist/cjs/view/media-breakpoint/index.stories.js +0 -24
  362. package/dist/cjs/view/modals/error/index.stories.js +0 -36
  363. package/dist/cjs/view/modals/navigation-prompt/index.stories.js +0 -32
  364. package/dist/cjs/view/modals/session-expiry/index.stories.js +0 -30
  365. package/dist/cjs/view/modals/wait-message/index.stories.js +0 -47
  366. package/dist/cjs/view/session-timeout/index.stories.js +0 -28
  367. package/dist/es/api/users/index.endpoint.js +0 -14
  368. package/dist/es/communication/http-client/tests/hello.endpoint.js +0 -14
  369. package/dist/es/communication/http-client/tests/private.endpoint.js +0 -14
  370. package/dist/es/utils/storybook/main.js +0 -38
  371. package/dist/es/utils/storybook/middleware.js +0 -9
  372. package/dist/es/view/error-toast/index.stories.js +0 -108
  373. package/dist/es/view/fields/check-box/index.stories.js +0 -47
  374. package/dist/es/view/fields/check-box/set-value.stories.js +0 -65
  375. package/dist/es/view/fields/combo-box/index.stories.js +0 -48
  376. package/dist/es/view/fields/date-input/index.stories.js +0 -35
  377. package/dist/es/view/fields/date-input/index1.stories.js +0 -35
  378. package/dist/es/view/fields/date-picker/index.stories.js +0 -35
  379. package/dist/es/view/fields/form-item-layout/index.stories.js +0 -27
  380. package/dist/es/view/fields/input-mask/index.stories.js +0 -35
  381. package/dist/es/view/fields/large-text-box/index.stories.js +0 -30
  382. package/dist/es/view/fields/radio/index.stories.js +0 -43
  383. package/dist/es/view/fields/radio/set-value.stories.js +0 -63
  384. package/dist/es/view/fields/radio-group/index.stories.js +0 -68
  385. package/dist/es/view/fields/text-box/index.stories.js +0 -31
  386. package/dist/es/view/form/index.stories.js +0 -56
  387. package/dist/es/view/form/usecases.stories.js +0 -43
  388. package/dist/es/view/header/index.stories.js +0 -14
  389. package/dist/es/view/live-message/index.stories.js +0 -32
  390. package/dist/es/view/media-breakpoint/index.stories.js +0 -10
  391. package/dist/es/view/modals/error/index.stories.js +0 -21
  392. package/dist/es/view/modals/navigation-prompt/index.stories.js +0 -18
  393. package/dist/es/view/modals/session-expiry/index.stories.js +0 -18
  394. package/dist/es/view/modals/wait-message/index.stories.js +0 -33
  395. package/dist/es/view/session-timeout/index.stories.js +0 -13
  396. package/dist/types/utils/storybook/main.d.ts +0 -30
  397. package/dist/types/view/fields/date-input/index1.stories.d.ts +0 -24
@@ -1,35 +1,36 @@
1
1
  import { removeDoubleSlash } from "../../../utils/url.js";
2
- export const APP_STYLE_ID_PREFIX = 'emui-style-';
3
- export const addStylesToDOM = ({
4
- name,
5
- hostUrl,
6
- documentEle
7
- }, fileName, index) => new Promise((resolve, reject) => {
8
- const ele = documentEle.createElement('link');
9
- if (!ele) reject(new Error('Unable to insert Application styles.'));
2
+ const APP_STYLE_ID_PREFIX = "emui-style-";
3
+ const addStylesToDOM = ({ name, hostUrl, documentEle }, fileName, index) => new Promise((resolve, reject) => {
4
+ const ele = documentEle.createElement("link");
5
+ if (!ele)
6
+ reject(new Error("Unable to insert Application styles."));
10
7
  ele.id = `${APP_STYLE_ID_PREFIX}${name}-${index}`;
11
- ele.rel = 'stylesheet';
8
+ ele.rel = "stylesheet";
12
9
  const url = new URL(fileName, hostUrl);
13
10
  ele.href = removeDoubleSlash(url.href);
14
11
  ele.onload = resolve.bind(null, ele.id);
15
12
  documentEle.head.appendChild(ele);
16
13
  });
17
- export const removeStyleFromDOM = (elementId = '', documentEle = document) => new Promise(resolve => {
18
- const ele = documentEle.getElementById(elementId); // eslint-disable-next-line no-console
19
-
20
- if (!ele) console.warn(new Error(`style with id ${elementId} not found`));
14
+ const removeStyleFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
15
+ const ele = documentEle.getElementById(elementId);
16
+ if (!ele)
17
+ console.warn(new Error(`style with id ${elementId} not found`));
21
18
  ele.remove();
22
19
  resolve();
23
20
  });
24
- export const removeDynamicImportedStyles = (hostUrl, documentEle) => {
25
- const hostPattern = new RegExp(hostUrl, 'i');
21
+ const removeDynamicImportedStyles = (hostUrl, documentEle) => {
22
+ const hostPattern = new RegExp(hostUrl, "i");
26
23
  const prefetchElements = documentEle.querySelectorAll('[rel="stylesheet"]');
27
-
28
24
  for (let index = prefetchElements.length - 1; index >= 0; index -= 1) {
29
25
  const ele = prefetchElements[index];
30
- const {
31
- href
32
- } = ele;
33
- if (hostPattern.test(href)) ele.remove();
26
+ const { href } = ele;
27
+ if (hostPattern.test(href))
28
+ ele.remove();
34
29
  }
35
- };
30
+ };
31
+ export {
32
+ APP_STYLE_ID_PREFIX,
33
+ addStylesToDOM,
34
+ removeDynamicImportedStyles,
35
+ removeStyleFromDOM
36
+ };
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +1,19 @@
1
- import _merge from "lodash/merge";
2
- import { useRef, useLayoutEffect, useCallback } from 'react';
3
- import { useDispatch } from 'react-redux';
1
+ import { useRef, useLayoutEffect, useCallback } from "react";
2
+ import { merge } from "lodash";
3
+ import { useDispatch } from "react-redux";
4
4
  import { waitMessage } from "../../data/wait-message/actions.js";
5
- import { loadApp, unloadApp, mountApp, unmountApp } from "./app-factory/index.js";
6
- import { getLogger, getMicroFrontEndAppConfig } from "../../utils/micro-frontend/index.js";
5
+ import {
6
+ loadApp,
7
+ unloadApp,
8
+ mountApp,
9
+ unmountApp
10
+ } from "./app-factory/index.js";
11
+ import {
12
+ getLogger,
13
+ getMicroFrontEndAppConfig
14
+ } from "../../utils/micro-frontend/index.js";
7
15
  import { logRecords } from "../../utils/log-records.js";
8
- export const useAppWillRender = ({
16
+ const useAppWillRender = ({
9
17
  id,
10
18
  documentEle,
11
19
  history,
@@ -13,8 +21,6 @@ export const useAppWillRender = ({
13
21
  homeRoute,
14
22
  onUnloadComplete
15
23
  }) => {
16
- // ToDo: Since ecc app is using older version of react-redux we need this undefined check. once ECC upgrades to react-redux v6 or later, this check can be removed
17
- // eslint-disable-next-line react-hooks/rules-of-hooks
18
24
  const dispatch = useDispatch ? useDispatch() : null;
19
25
  const ref = useRef(Promise.resolve());
20
26
  const getConfig = useCallback(() => getMicroFrontEndAppConfig({
@@ -23,41 +29,44 @@ export const useAppWillRender = ({
23
29
  const unload = useCallback(async (appConfig, loadFailed = false) => {
24
30
  await unmountApp(appConfig);
25
31
  unloadApp(appConfig);
26
- if (!loadFailed && onUnloadComplete) onUnloadComplete();
27
- }, // eslint-disable-next-line react-hooks/exhaustive-deps
28
- []);
29
- const load = useCallback(async appConfig => {
30
- if (dispatch) dispatch(waitMessage.open());
31
-
32
+ if (!loadFailed && onUnloadComplete)
33
+ onUnloadComplete();
34
+ }, []);
35
+ const load = useCallback(async (appConfig) => {
36
+ if (dispatch)
37
+ dispatch(waitMessage.open());
32
38
  try {
33
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
34
- if (ref.current) await ref.current;
39
+ if (ref.current)
40
+ await ref.current;
35
41
  await loadApp(appConfig);
36
42
  await mountApp(appConfig);
37
43
  } catch (ex) {
38
- getLogger().error({ ...logRecords.APP_CONFIG_LOAD_FAILED,
44
+ getLogger().error({
45
+ ...logRecords.APP_CONFIG_LOAD_FAILED,
39
46
  exception: ex
40
47
  });
41
48
  await unload(appConfig, true);
42
49
  throw ex;
43
50
  }
44
-
45
- if (dispatch) dispatch(waitMessage.close());
51
+ if (dispatch)
52
+ dispatch(waitMessage.close());
46
53
  }, [dispatch, unload]);
47
54
  useLayoutEffect(() => {
48
- if (!documentEle) return () => {};
49
-
50
- const appConfig = _merge(getConfig(), {
55
+ if (!documentEle)
56
+ return () => {
57
+ };
58
+ const appConfig = merge(getConfig(), {
51
59
  documentEle,
52
60
  history,
53
61
  theme,
54
62
  homeRoute
55
- }); // eslint-disable-next-line @typescript-eslint/no-floating-promises
56
-
57
-
63
+ });
58
64
  load(appConfig);
59
65
  return () => {
60
66
  ref.current = unload(appConfig);
61
67
  };
62
68
  }, [documentEle, getConfig, history, theme, homeRoute, load, unload]);
63
- };
69
+ };
70
+ export {
71
+ useAppWillRender
72
+ };
@@ -1,17 +1,15 @@
1
1
  import { getAppConfigValue } from "../../utils/app-config/config.js";
2
- export const getNavigationLinks = () => {
3
- const microApps = getAppConfigValue('microFrontendApps');
4
- if (!microApps) return [];
2
+ const getNavigationLinks = () => {
3
+ const microApps = getAppConfigValue("microFrontendApps");
4
+ if (!microApps)
5
+ return [];
5
6
  return Object.keys(microApps).reduce((value, id) => {
6
- const {
7
- name,
8
- homeRoute
9
- } = microApps[id] || {};
10
- if (name && homeRoute) value.push({
11
- id,
12
- name,
13
- path: homeRoute
14
- });
7
+ const { name, homeRoute } = microApps[id] || {};
8
+ if (name && homeRoute)
9
+ value.push({ id, name, path: homeRoute });
15
10
  return value;
16
11
  }, []);
17
- };
12
+ };
13
+ export {
14
+ getNavigationLinks
15
+ };
@@ -1,33 +1,27 @@
1
- import { memo, useState } from 'react'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
- // @ts-ignore
3
-
4
- import frameHtml from 'file-loader?name=iframe.[contenthash].[ext]!./iframe/index.html';
1
+ import * as React from "react";
2
+ import { memo, useState } from "react";
3
+ import frameHtml from "file-loader?name=iframe.[contenthash].[ext]!./iframe/index.html";
5
4
  import { IFrame } from "./iframe/index.js";
6
5
  import { useFrameLoaded } from "./use-frame-loaded.js";
7
- import { useAppWillRender } from "../micro-app/use-app-will-render.js";
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
- export const App = /*#__PURE__*/memo(({
10
- id,
11
- dispose,
12
- onUnloadComplete,
13
- ...rest
14
- }) => {
6
+ import {
7
+ useAppWillRender
8
+ } from "../micro-app/use-app-will-render.js";
9
+ const App = memo(({ id, dispose, onUnloadComplete, ...rest }) => {
15
10
  const [documentEle, setDocumentEle] = useState(null);
16
- useFrameLoaded({
17
- id,
18
- documentEle,
19
- ...rest
20
- });
11
+ useFrameLoaded({ id, documentEle, ...rest });
21
12
  useAppWillRender({
22
13
  id,
23
14
  documentEle: dispose ? null : documentEle,
24
15
  onUnloadComplete,
25
16
  ...rest
26
17
  });
27
- return /*#__PURE__*/_jsx(IFrame, {
28
- id: id,
18
+ return /* @__PURE__ */ React.createElement(IFrame, {
19
+ id,
29
20
  src: frameHtml,
30
21
  ...rest,
31
22
  onFrameReady: setDocumentEle
32
23
  });
33
- });
24
+ });
25
+ export {
26
+ App
27
+ };
@@ -1 +1,4 @@
1
- export const IFRAME_CONTAINER_ID_PREFIX = 'pui-iframe-container-';
1
+ const IFRAME_CONTAINER_ID_PREFIX = "pui-iframe-container-";
2
+ export {
3
+ IFRAME_CONTAINER_ID_PREFIX
4
+ };
@@ -1,39 +1,35 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import _styled2 from "styled-components";
3
- import _styled from "styled-components";
4
- import { memo, useRef } from 'react';
1
+ import * as React from "react";
2
+ import { memo, useRef } from "react";
3
+ import styled from "styled-components";
5
4
  import { IFRAME_CONTAINER_ID_PREFIX } from "./const.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export const IFrame = /*#__PURE__*/memo(({
8
- id,
9
- name: title,
10
- src,
11
- sandbox,
12
- onFrameReady
13
- }) => {
5
+ const Div = styled.div`
6
+ display: flex;
7
+ width: 100%;
8
+ height: 100%;
9
+ flex-direction: column;
10
+ overflow: hidden;
11
+ `;
12
+ const Iframe = styled.iframe`
13
+ flex-grow: 1;
14
+ border: none;
15
+ margin: 0;
16
+ padding: 0;
17
+ display: block;
18
+ height: 100%;
19
+ `;
20
+ const IFrame = memo(({ id, name: title, src, sandbox, onFrameReady }) => {
14
21
  const frameRef = useRef(null);
15
- const sandboxProps = sandbox ? {
16
- sandbox
17
- } : {};
18
- return /*#__PURE__*/_jsx2(_StyledDiv, {}, void 0, /*#__PURE__*/_jsx(_StyledIframe, {
22
+ const sandboxProps = sandbox ? { sandbox } : {};
23
+ return /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement(Iframe, {
19
24
  id: `${IFRAME_CONTAINER_ID_PREFIX}${id}`,
20
25
  ref: frameRef,
21
- title: title,
22
- src: src,
26
+ title,
27
+ src,
23
28
  scrolling: "no",
24
29
  ...sandboxProps,
25
- onLoad: () => {
26
- var _frameRef$current;
27
-
28
- return (frameRef === null || frameRef === void 0 ? void 0 : (_frameRef$current = frameRef.current) === null || _frameRef$current === void 0 ? void 0 : _frameRef$current.contentDocument) && onFrameReady(frameRef.current.contentDocument);
29
- }
30
+ onLoad: () => frameRef?.current?.contentDocument && onFrameReady(frameRef.current.contentDocument)
30
31
  }));
31
32
  });
32
-
33
- var _StyledDiv = /*#__PURE__*/_styled("div").withConfig({
34
- componentId: "sc-hig7i7-0"
35
- })(["display:flex;width:100%;height:100%;flex-direction:column;overflow:hidden;"]);
36
-
37
- var _StyledIframe = /*#__PURE__*/_styled("iframe").withConfig({
38
- componentId: "sc-hig7i7-1"
39
- })(["flex-grow:1;border:none;margin:0;padding:0;display:block;height:100%;"]);
33
+ export {
34
+ IFrame
35
+ };
@@ -1,21 +1,18 @@
1
- import { useEffect, useState, memo } from 'react';
1
+ import * as React from "react";
2
+ import { useEffect, useState, memo } from "react";
2
3
  import { usePrevious } from "../use-previous.js";
3
4
  import { App } from "./app.js";
4
- import { createElement as _createElement } from "react";
5
- export const MicroIFrameApp = /*#__PURE__*/memo(({
6
- entityId = null,
7
- ...rest
8
- }) => {
5
+ const MicroIFrameApp = memo(({ entityId = null, ...rest }) => {
9
6
  const [disposePrevApp, setDisposePrevApp] = useState(false);
10
7
  const [appKey, setAppKey] = useState(Date.now());
11
8
  const prevEntityId = usePrevious(entityId);
12
9
  useEffect(() => {
13
10
  if (prevEntityId !== entityId && prevEntityId) {
14
11
  setDisposePrevApp(true);
15
- } // eslint-disable-next-line react-hooks/exhaustive-deps
16
-
12
+ }
17
13
  }, [entityId]);
18
- return /*#__PURE__*/_createElement(App, { ...rest,
14
+ return /* @__PURE__ */ React.createElement(App, {
15
+ ...rest,
19
16
  key: appKey,
20
17
  dispose: disposePrevApp,
21
18
  onUnloadComplete: () => {
@@ -23,4 +20,7 @@ export const MicroIFrameApp = /*#__PURE__*/memo(({
23
20
  setDisposePrevApp(false);
24
21
  }
25
22
  });
26
- });
23
+ });
24
+ export {
25
+ MicroIFrameApp
26
+ };
@@ -1 +0,0 @@
1
- export {};
@@ -1,34 +1,28 @@
1
- import { useEffect } from 'react';
1
+ import { useEffect } from "react";
2
2
  import { trackActivity } from "../../utils/session.js";
3
3
  import { CMicroAppHost } from "../../utils/micro-frontend/host.js";
4
4
  import { getMicroFrontEndAppConfig } from "../../utils/micro-frontend/index.js";
5
-
6
5
  const addBaseTag = (id, documentEle) => {
7
- const {
8
- hostUrl,
9
- manifestPath
10
- } = getMicroFrontEndAppConfig({
6
+ const { hostUrl, manifestPath } = getMicroFrontEndAppConfig({
11
7
  id
12
8
  });
13
- const base = documentEle.createElement('base');
9
+ if (!manifestPath)
10
+ return;
11
+ const base = documentEle.createElement("base");
14
12
  base.href = new URL(manifestPath, hostUrl).href;
15
- documentEle.getElementsByTagName('head')[0].appendChild(base);
13
+ documentEle.getElementsByTagName("head")[0].appendChild(base);
16
14
  };
17
-
18
15
  const updateContainerId = (id, documentEle) => {
19
- const ele = documentEle.getElementById('pui-app-container-');
20
-
16
+ const ele = documentEle.getElementById("pui-app-container-");
21
17
  if (ele) {
22
18
  ele.id = `${ele.id}${id}`;
23
19
  }
24
20
  };
25
-
26
- export const useFrameLoaded = ({
27
- id,
28
- documentEle
29
- }) => {
21
+ const useFrameLoaded = ({ id, documentEle }) => {
30
22
  useEffect(() => {
31
- if (!documentEle) return () => {};
23
+ if (!documentEle)
24
+ return () => {
25
+ };
32
26
  const host = CMicroAppHost.getInstance();
33
27
  addBaseTag(id, documentEle);
34
28
  updateContainerId(id, documentEle);
@@ -41,4 +35,7 @@ export const useFrameLoaded = ({
41
35
  }
42
36
  };
43
37
  }, [id, documentEle]);
44
- };
38
+ };
39
+ export {
40
+ useFrameLoaded
41
+ };
@@ -1,21 +1,24 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import { useState } from 'react';
3
- import DSModal, { MODAL_TYPE } from '@elliemae/ds-modal';
4
- export const Error = ({
1
+ import * as React from "react";
2
+ import { useState } from "react";
3
+ import DSModal, { MODAL_TYPE } from "@elliemae/ds-modal";
4
+ const Error = ({
5
5
  open,
6
6
  name,
7
7
  showHeader = false,
8
8
  children
9
9
  }) => {
10
10
  const [isOpen, setIsOpen] = useState(open);
11
- return /*#__PURE__*/_jsx(DSModal, {
11
+ return /* @__PURE__ */ React.createElement(DSModal, {
12
12
  centered: true,
13
13
  modalType: MODAL_TYPE.ERROR,
14
- isOpen: isOpen,
15
- name: name,
16
- showHeader: showHeader,
14
+ isOpen,
15
+ name,
16
+ showHeader,
17
17
  showFooter: false,
18
18
  onClose: () => setIsOpen(false),
19
19
  onConfirm: null
20
- }, void 0, children);
21
- };
20
+ }, children);
21
+ };
22
+ export {
23
+ Error
24
+ };
@@ -1,25 +1,22 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
-
3
- var _p;
4
-
5
- import { memo } from 'react';
6
- import DSModal, { MODAL_TYPE } from '@elliemae/ds-modal';
1
+ import * as React from "react";
2
+ import { memo } from "react";
3
+ import DSModal, { MODAL_TYPE } from "@elliemae/ds-modal";
7
4
  import { useAppDispatch } from "../../../data/react-redux.js";
8
5
  import { navigationPrompt } from "../../../data/navigation-prompt/actions.js";
9
- export const NavigationPrompt = /*#__PURE__*/memo(({
10
- open,
11
- showHeader = false
12
- }) => {
6
+ const NavigationPrompt = memo(({ open, showHeader = false }) => {
13
7
  const dispatch = useAppDispatch();
14
- return /*#__PURE__*/_jsx(DSModal, {
8
+ return /* @__PURE__ */ React.createElement(DSModal, {
15
9
  centered: true,
16
10
  modalType: MODAL_TYPE.CONFIRM,
17
11
  isOpen: open,
18
- showHeader: showHeader,
12
+ showHeader,
19
13
  onClose: () => dispatch(navigationPrompt.cancel()),
20
14
  onConfirm: () => dispatch(navigationPrompt.confirm()),
21
15
  onReject: () => dispatch(navigationPrompt.cancel()),
22
16
  confirmLabel: "Save & Continue",
23
17
  rejectLabel: "Continue Without Saving"
24
- }, void 0, _p || (_p = /*#__PURE__*/_jsx("p", {}, void 0, "You currently have unsaved changes. Are you sure you want to proceed without saving?")));
25
- });
18
+ }, /* @__PURE__ */ React.createElement("p", null, "You currently have unsaved changes. Are you sure you want to proceed without saving?"));
19
+ });
20
+ export {
21
+ NavigationPrompt
22
+ };
@@ -1,14 +1,13 @@
1
- import { useEffect, useState } from 'react';
2
- import differenceInMinutes from "date-fns/differenceInMinutes";
3
- import getSeconds from "date-fns/getSeconds";
1
+ import { useEffect, useState } from "react";
2
+ import { getSeconds, differenceInMinutes } from "date-fns";
4
3
  import { SESSION_TIMEOUT_INTERVAL } from "../../../utils/constants.js";
5
4
  import { getAppConfigValue } from "../../../utils/app-config/config.js";
6
- export const useTrackSessionExpiry = warningNotifiedAt => {
5
+ const useTrackSessionExpiry = (warningNotifiedAt) => {
7
6
  const [timeData, setTimeData] = useState();
8
7
  useEffect(() => {
9
8
  const timeLeftForExpiryAfterWarning = () => {
10
- const userWarnInterval = getAppConfigValue('sessionTimeoutWarnInterval');
11
- const userTimeoutInterval = getAppConfigValue('sessionTimeoutInterval');
9
+ const userWarnInterval = getAppConfigValue("sessionTimeoutWarnInterval");
10
+ const userTimeoutInterval = getAppConfigValue("sessionTimeoutInterval");
12
11
  const warnInterval = userWarnInterval ? parseFloat(userWarnInterval) : SESSION_TIMEOUT_INTERVAL.WARN;
13
12
  const sessionTimeout = userTimeoutInterval ? parseFloat(userTimeoutInterval) : SESSION_TIMEOUT_INTERVAL.EXPIRY;
14
13
  const diffTime = sessionTimeout - warnInterval;
@@ -20,17 +19,16 @@ export const useTrackSessionExpiry = warningNotifiedAt => {
20
19
  minutes: `0${minutes}`.slice(-2)
21
20
  };
22
21
  };
23
-
24
22
  const interval = setInterval(() => {
25
- const {
26
- seconds,
27
- minutes
28
- } = timeLeftForExpiryAfterWarning();
23
+ const { seconds, minutes } = timeLeftForExpiryAfterWarning();
29
24
  setTimeData(`${minutes}:${seconds}`);
30
- }, 1000);
25
+ }, 1e3);
31
26
  return () => {
32
27
  clearInterval(interval);
33
28
  };
34
29
  }, [warningNotifiedAt]);
35
30
  return timeData;
36
- };
31
+ };
32
+ export {
33
+ useTrackSessionExpiry
34
+ };
@@ -1,41 +1,31 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
-
3
- var _p;
4
-
5
- import { memo, useState } from 'react';
6
- import DSModal, { MODAL_SUB_TYPE_V2, MODAL_TYPE_V2 } from '@elliemae/ds-modal';
1
+ import * as React from "react";
2
+ import { memo, useState } from "react";
3
+ import DSModal, { MODAL_SUB_TYPE_V2, MODAL_TYPE_V2 } from "@elliemae/ds-modal";
7
4
  import { useAppDispatch } from "../../../data/react-redux.js";
8
5
  import { logout } from "../../../data/logout/actions.js";
9
6
  import { resetUserIdleTime } from "../../../utils/session.js";
10
7
  import { useTrackSessionExpiry } from "./customHooks.js";
11
- export const SessionExpiry = /*#__PURE__*/memo(({
12
- open,
13
- warningNotifiedAt = 0,
14
- showHeader = false
15
- }) => {
8
+ const SessionExpiry = memo(({ open, warningNotifiedAt = 0, showHeader = false }) => {
16
9
  const [isOpen, setIsOpen] = useState(open);
17
10
  const timeLeft = useTrackSessionExpiry(warningNotifiedAt);
18
11
  const dispatch = useAppDispatch();
19
-
20
12
  const resetSession = () => {
21
13
  setIsOpen(false);
22
14
  resetUserIdleTime();
23
15
  dispatch(logout.cancel());
24
16
  };
25
-
26
17
  const logoutSession = () => {
27
18
  setIsOpen(false);
28
19
  dispatch(logout.confirm());
29
20
  };
30
-
31
- return /*#__PURE__*/_jsx(DSModal, {
21
+ return /* @__PURE__ */ React.createElement(DSModal, {
32
22
  centered: true,
33
23
  modalType: MODAL_TYPE_V2.DECISION,
34
- isOpen: isOpen,
35
- showHeader: showHeader,
24
+ isOpen,
25
+ showHeader,
36
26
  onConfirm: resetSession,
37
27
  onReject: logoutSession,
38
- modalTitle: timeLeft ? `Your session will expire in ${timeLeft}` : '',
28
+ modalTitle: timeLeft ? `Your session will expire in ${timeLeft}` : "",
39
29
  confirmLabel: "Reset",
40
30
  rejectLabel: "Logout",
41
31
  showRejectButton: true,
@@ -43,5 +33,8 @@ export const SessionExpiry = /*#__PURE__*/memo(({
43
33
  version: 2,
44
34
  shouldCloseOnOverlayClick: false,
45
35
  modalSubType: MODAL_SUB_TYPE_V2.WARNING
46
- }, void 0, _p || (_p = /*#__PURE__*/_jsx("p", {}, void 0, "Please logout or reset your session")));
47
- });
36
+ }, /* @__PURE__ */ React.createElement("p", null, "Please logout or reset your session"));
37
+ });
38
+ export {
39
+ SessionExpiry
40
+ };
@@ -1,12 +1,13 @@
1
- import { memo, useEffect } from 'react';
2
- import { Fragment as _Fragment } from "react/jsx-runtime";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- export const HTMLWaitMessage = /*#__PURE__*/memo(({
5
- close
6
- }) => {
1
+ import * as React from "react";
2
+ import { memo, useEffect } from "react";
3
+ const HTMLWaitMessage = memo(({ close }) => {
7
4
  useEffect(() => {
8
- const htmlWaitMsgElement = document.getElementById('em-wait-message');
9
- if (htmlWaitMsgElement && close) htmlWaitMsgElement.remove();
5
+ const htmlWaitMsgElement = document.getElementById("em-wait-message");
6
+ if (htmlWaitMsgElement && close)
7
+ htmlWaitMsgElement.remove();
10
8
  }, [close]);
11
- return /*#__PURE__*/_jsx(_Fragment, {});
12
- });
9
+ return /* @__PURE__ */ React.createElement(React.Fragment, null);
10
+ });
11
+ export {
12
+ HTMLWaitMessage
13
+ };