@elliemae/pui-app-sdk 2.21.1 → 3.0.0-beta.12

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 (398) 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 +65 -70
  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 +53 -51
  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 +51 -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 +22 -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 +13 -20
  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 +20 -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/storybook/cjs/main.d.ts +63 -0
  300. package/dist/types/utils/storybook/{middleware.d.ts → cjs/middleware.d.ts} +0 -0
  301. package/dist/types/utils/storybook/cjs/vite.d.ts +4 -0
  302. package/dist/types/utils/storybook/cjs/webpack.d.ts +16 -0
  303. package/dist/types/utils/storybook/preview.d.ts +9 -3
  304. package/dist/types/utils/testing/render-with-redux.d.ts +20 -20
  305. package/dist/types/utils/testing/render-with-router-redux.d.ts +20 -20
  306. package/dist/types/utils/window.d.ts +1 -1
  307. package/dist/types/view/app-root/index.d.ts +1 -1
  308. package/dist/types/view/fields/check-box/index.stories.d.ts +1 -1
  309. package/dist/types/view/fields/check-box/set-value.stories.d.ts +1 -1
  310. package/dist/types/view/fields/combo-box/index.stories.d.ts +1 -1
  311. package/dist/types/view/fields/date-input/index.stories.d.ts +1 -1
  312. package/dist/types/view/fields/date-picker/index.stories.d.ts +1 -1
  313. package/dist/types/view/fields/form-item-layout/index.stories.d.ts +1 -1
  314. package/dist/types/view/fields/input-mask/index.stories.d.ts +1 -1
  315. package/dist/types/view/fields/large-text-box/index.stories.d.ts +1 -1
  316. package/dist/types/view/fields/radio/index.stories.d.ts +1 -1
  317. package/dist/types/view/fields/radio/set-value.stories.d.ts +1 -1
  318. package/dist/types/view/fields/radio-group/index.stories.d.ts +1 -1
  319. package/dist/types/view/fields/text-box/index.stories.d.ts +1 -1
  320. package/dist/types/view/form/usecases.stories.d.ts +1 -1
  321. package/dist/types/view/header/index.d.ts +1 -1
  322. package/dist/types/view/header/index.stories.d.ts +1 -1
  323. package/dist/types/view/micro-app/app-factory/index.d.ts +2 -2
  324. package/dist/types/view/micro-app/index.d.ts +1 -1
  325. package/dist/types/view/micro-app/resources/script.d.ts +1 -1
  326. package/dist/types/view/micro-app/resources/style.d.ts +1 -1
  327. package/dist/types/view/micro-app/use-app-will-render.d.ts +1 -1
  328. package/dist/types/view/micro-iframe-app/app.d.ts +2 -2
  329. package/dist/types/view/micro-iframe-app/index.d.ts +1 -1
  330. package/dist/types/view/micro-iframe-app/types.d.ts +1 -1
  331. package/dist/types/view/micro-iframe-app/use-frame-loaded.d.ts +1 -1
  332. package/dist/types/view/modals/error/index.stories.d.ts +1 -1
  333. package/dist/types/view/modals/navigation-prompt/index.stories.d.ts +1 -1
  334. package/dist/types/view/modals/session-expiry/index.stories.d.ts +1 -1
  335. package/dist/types/view/modals/wait-message/index.stories.d.ts +1 -1
  336. package/dist/types/view/storybook/decorator.d.ts +1 -1
  337. package/dist/types/view/visually-hidden/index.d.ts +1 -3
  338. package/package.json +36 -25
  339. package/dist/cjs/api/users/index.endpoint.js +0 -14
  340. package/dist/cjs/communication/http-client/tests/hello.endpoint.js +0 -14
  341. package/dist/cjs/communication/http-client/tests/private.endpoint.js +0 -14
  342. package/dist/cjs/utils/storybook/main.js +0 -38
  343. package/dist/cjs/utils/storybook/middleware.js +0 -9
  344. package/dist/cjs/view/error-toast/index.stories.js +0 -128
  345. package/dist/cjs/view/fields/check-box/index.stories.js +0 -64
  346. package/dist/cjs/view/fields/check-box/set-value.stories.js +0 -83
  347. package/dist/cjs/view/fields/combo-box/index.stories.js +0 -65
  348. package/dist/cjs/view/fields/date-input/index.stories.js +0 -53
  349. package/dist/cjs/view/fields/date-input/index1.stories.js +0 -53
  350. package/dist/cjs/view/fields/date-picker/index.stories.js +0 -53
  351. package/dist/cjs/view/fields/form-item-layout/index.stories.js +0 -43
  352. package/dist/cjs/view/fields/input-mask/index.stories.js +0 -52
  353. package/dist/cjs/view/fields/large-text-box/index.stories.js +0 -47
  354. package/dist/cjs/view/fields/radio/index.stories.js +0 -60
  355. package/dist/cjs/view/fields/radio/set-value.stories.js +0 -81
  356. package/dist/cjs/view/fields/radio-group/index.stories.js +0 -85
  357. package/dist/cjs/view/fields/text-box/index.stories.js +0 -48
  358. package/dist/cjs/view/form/index.stories.js +0 -71
  359. package/dist/cjs/view/form/usecases.stories.js +0 -59
  360. package/dist/cjs/view/header/index.stories.js +0 -24
  361. package/dist/cjs/view/live-message/index.stories.js +0 -53
  362. package/dist/cjs/view/media-breakpoint/index.stories.js +0 -24
  363. package/dist/cjs/view/modals/error/index.stories.js +0 -36
  364. package/dist/cjs/view/modals/navigation-prompt/index.stories.js +0 -32
  365. package/dist/cjs/view/modals/session-expiry/index.stories.js +0 -30
  366. package/dist/cjs/view/modals/wait-message/index.stories.js +0 -47
  367. package/dist/cjs/view/session-timeout/index.stories.js +0 -28
  368. package/dist/es/api/users/index.endpoint.js +0 -14
  369. package/dist/es/communication/http-client/tests/hello.endpoint.js +0 -14
  370. package/dist/es/communication/http-client/tests/private.endpoint.js +0 -14
  371. package/dist/es/utils/storybook/main.js +0 -38
  372. package/dist/es/utils/storybook/middleware.js +0 -9
  373. package/dist/es/view/error-toast/index.stories.js +0 -108
  374. package/dist/es/view/fields/check-box/index.stories.js +0 -47
  375. package/dist/es/view/fields/check-box/set-value.stories.js +0 -65
  376. package/dist/es/view/fields/combo-box/index.stories.js +0 -48
  377. package/dist/es/view/fields/date-input/index.stories.js +0 -35
  378. package/dist/es/view/fields/date-input/index1.stories.js +0 -35
  379. package/dist/es/view/fields/date-picker/index.stories.js +0 -35
  380. package/dist/es/view/fields/form-item-layout/index.stories.js +0 -27
  381. package/dist/es/view/fields/input-mask/index.stories.js +0 -35
  382. package/dist/es/view/fields/large-text-box/index.stories.js +0 -30
  383. package/dist/es/view/fields/radio/index.stories.js +0 -43
  384. package/dist/es/view/fields/radio/set-value.stories.js +0 -63
  385. package/dist/es/view/fields/radio-group/index.stories.js +0 -68
  386. package/dist/es/view/fields/text-box/index.stories.js +0 -31
  387. package/dist/es/view/form/index.stories.js +0 -56
  388. package/dist/es/view/form/usecases.stories.js +0 -43
  389. package/dist/es/view/header/index.stories.js +0 -14
  390. package/dist/es/view/live-message/index.stories.js +0 -32
  391. package/dist/es/view/media-breakpoint/index.stories.js +0 -10
  392. package/dist/es/view/modals/error/index.stories.js +0 -21
  393. package/dist/es/view/modals/navigation-prompt/index.stories.js +0 -18
  394. package/dist/es/view/modals/session-expiry/index.stories.js +0 -18
  395. package/dist/es/view/modals/wait-message/index.stories.js +0 -33
  396. package/dist/es/view/session-timeout/index.stories.js +0 -13
  397. package/dist/types/utils/storybook/main.d.ts +0 -30
  398. package/dist/types/view/fields/date-input/index1.stories.d.ts +0 -24
@@ -1,97 +1,96 @@
1
- import _throttle from "lodash/throttle";
1
+ import { throttle } from "lodash";
2
2
  import { getAppConfigValue } from "./app-config/config.js";
3
3
  import { SESSION_TIMEOUT_INTERVAL } from "./constants.js";
4
- const THROTTLING_TIME = 6000;
4
+ const THROTTLING_TIME = 6e3;
5
5
  let lastUserActivityTimeStamp = Date.now();
6
6
  const warnListeners = [];
7
7
  const expiryListeners = [];
8
8
  const resetListeners = [];
9
- const userInteractionEvents = ['click', 'scroll', 'keypress', 'touchstart'];
9
+ const userInteractionEvents = ["click", "scroll", "keypress", "touchstart"];
10
10
  let sessionExpiryWarningNotified = false;
11
11
  let timerHandle;
12
12
  let sessionExpiryWarningNotifiedAt;
13
- export const resetUserIdleTime = (resetWarningModal = false) => {
13
+ const resetUserIdleTime = (resetWarningModal = false) => {
14
14
  sessionExpiryWarningNotified = false;
15
15
  sessionExpiryWarningNotifiedAt = null;
16
16
  lastUserActivityTimeStamp = Date.now();
17
17
  Promise.resolve().then(() => {
18
- resetListeners.forEach(listener => listener(resetWarningModal));
19
- }).catch(() => {});
18
+ resetListeners.forEach((listener) => listener(resetWarningModal));
19
+ }).catch(() => {
20
+ });
20
21
  };
21
-
22
- const throttledResetUserIdleTime = _throttle(resetUserIdleTime, THROTTLING_TIME, {
23
- leading: true
24
- });
25
-
26
- const isPastWarningTime = (warnInterval = getAppConfigValue('sessionTimeoutWarnInterval') || SESSION_TIMEOUT_INTERVAL.WARN) => Date.now() - lastUserActivityTimeStamp > warnInterval;
27
-
28
- const isPastSessionTimeoutTime = (sessionTimeout = getAppConfigValue('sessionTimeoutInterval') || SESSION_TIMEOUT_INTERVAL.EXPIRY) => Date.now() - lastUserActivityTimeStamp > sessionTimeout;
29
-
22
+ const throttledResetUserIdleTime = throttle(resetUserIdleTime, THROTTLING_TIME, { leading: true });
23
+ const isPastWarningTime = (warnInterval = getAppConfigValue("sessionTimeoutWarnInterval") || SESSION_TIMEOUT_INTERVAL.WARN) => Date.now() - lastUserActivityTimeStamp > warnInterval;
24
+ const isPastSessionTimeoutTime = (sessionTimeout = getAppConfigValue("sessionTimeoutInterval") || SESSION_TIMEOUT_INTERVAL.EXPIRY) => Date.now() - lastUserActivityTimeStamp > sessionTimeout;
30
25
  const notifySessionExpiryWarning = () => {
31
26
  sessionExpiryWarningNotified = true;
32
27
  sessionExpiryWarningNotifiedAt = Date.now();
33
28
  Promise.resolve().then(() => {
34
- warnListeners.forEach(listener => listener(sessionExpiryWarningNotifiedAt));
35
- }).catch(() => {});
29
+ warnListeners.forEach((listener) => listener(sessionExpiryWarningNotifiedAt));
30
+ }).catch(() => {
31
+ });
36
32
  };
37
-
38
33
  const notifySessionExpiry = () => Promise.resolve().then(() => {
39
- expiryListeners.forEach(listener => listener());
34
+ expiryListeners.forEach((listener) => listener());
40
35
  });
41
-
42
- export const stopSessionMonitoring = () => {
43
- userInteractionEvents.forEach(eventType => {
36
+ const stopSessionMonitoring = () => {
37
+ userInteractionEvents.forEach((eventType) => {
44
38
  document.removeEventListener(eventType, throttledResetUserIdleTime);
45
39
  });
46
40
  clearInterval(timerHandle);
47
41
  warnListeners.length = 0;
48
42
  expiryListeners.length = 0;
49
43
  };
50
-
51
44
  const monitorSessionEvents = () => {
52
45
  if (isPastSessionTimeoutTime()) {
53
46
  notifySessionExpiry().then(() => {
54
47
  stopSessionMonitoring();
55
- }).catch(() => {});
56
- } else if (!sessionExpiryWarningNotified && isPastWarningTime()) notifySessionExpiryWarning();
48
+ }).catch(() => {
49
+ });
50
+ } else if (!sessionExpiryWarningNotified && isPastWarningTime())
51
+ notifySessionExpiryWarning();
57
52
  };
58
-
59
53
  const removeListeners = (arr, cb) => {
60
- const idx = arr.findIndex(r => r === cb);
61
-
54
+ const idx = arr.findIndex((r) => r === cb);
62
55
  if (idx > -1) {
63
56
  arr.splice(idx, 1);
64
57
  }
65
58
  };
66
-
67
- export const initSessionMonitoring = () => {
68
- userInteractionEvents.forEach(eventType => {
59
+ const initSessionMonitoring = () => {
60
+ userInteractionEvents.forEach((eventType) => {
69
61
  document.addEventListener(eventType, throttledResetUserIdleTime);
70
62
  });
71
- timerHandle = setInterval(monitorSessionEvents, 1000); // 1 min
63
+ timerHandle = setInterval(monitorSessionEvents, 1e3);
72
64
  };
73
- export const subscribeToSessionExpiryWarning = onSessionExpiryWarn => {
65
+ const subscribeToSessionExpiryWarning = (onSessionExpiryWarn) => {
74
66
  warnListeners.push(onSessionExpiryWarn);
75
67
  return removeListeners.bind(null, warnListeners, onSessionExpiryWarn);
76
68
  };
77
- export const subscribeToSessionExpiry = onSessionExpiry => {
69
+ const subscribeToSessionExpiry = (onSessionExpiry) => {
78
70
  expiryListeners.push(onSessionExpiry);
79
71
  return removeListeners.bind(null, expiryListeners, onSessionExpiry);
80
72
  };
81
- export const subscribeToResetSession = onResetListener => {
73
+ const subscribeToResetSession = (onResetListener) => {
82
74
  resetListeners.push(onResetListener);
83
75
  return removeListeners.bind(null, resetListeners, onResetListener);
84
76
  };
85
- export const trackActivity = (element, cb) => {
86
- if (!element) return () => {};
87
-
88
- const thorttledCb = _throttle(cb, THROTTLING_TIME, {
89
- leading: true
90
- });
91
-
92
- userInteractionEvents.forEach(r => element.addEventListener(r, thorttledCb));
77
+ const trackActivity = (element, cb) => {
78
+ if (!element)
79
+ return () => {
80
+ };
81
+ const thorttledCb = throttle(cb, THROTTLING_TIME, { leading: true });
82
+ userInteractionEvents.forEach((r) => element.addEventListener(r, thorttledCb));
93
83
  return () => {
94
- userInteractionEvents.forEach(r => element.removeEventListener(r, cb));
95
- userInteractionEvents.forEach(r => element.removeEventListener(r, thorttledCb));
84
+ userInteractionEvents.forEach((r) => element.removeEventListener(r, cb));
85
+ userInteractionEvents.forEach((r) => element.removeEventListener(r, thorttledCb));
96
86
  };
97
- };
87
+ };
88
+ export {
89
+ initSessionMonitoring,
90
+ resetUserIdleTime,
91
+ stopSessionMonitoring,
92
+ subscribeToResetSession,
93
+ subscribeToSessionExpiry,
94
+ subscribeToSessionExpiryWarning,
95
+ trackActivity
96
+ };
@@ -1,8 +1,11 @@
1
- import { addons } from '@storybook/addons';
1
+ import { addons } from "@storybook/addons";
2
2
  import { createTheme } from "./theme.js";
3
- export const init = theme => {
3
+ const init = (theme) => {
4
4
  addons.setConfig({
5
- panelPosition: 'bottom',
5
+ panelPosition: "bottom",
6
6
  theme: createTheme(theme)
7
7
  });
8
- };
8
+ };
9
+ export {
10
+ init
11
+ };
@@ -1,39 +1,38 @@
1
- import { withConsole } from '@storybook/addon-console';
2
- import { getDefaultTheme } from '@elliemae/pui-theme';
1
+ import { getDefaultTheme } from "@elliemae/pui-theme";
3
2
  import { createAppStore } from "../../data/store.js";
4
3
  import { withAppDecorator } from "../../view/storybook/decorator.js";
5
4
  import { loadAppConfig } from "../app-config/index.js";
6
5
  import { createTheme } from "./theme.js";
7
6
  import { browserHistory } from "../history.js";
8
- import '@elliemae/ds-basic/css/dimsum.css';
9
-
10
- (async () => {
11
- // eslint-disable-next-line no-undef
12
- await loadAppConfig(__webpack_public_path__);
13
- })();
14
-
7
+ import "@elliemae/ds-basic/css/dimsum.css";
8
+ loadAppConfig(__webpack_public_path__).catch(() => {
9
+ });
15
10
  const theme = getDefaultTheme();
16
11
  const store = createAppStore({}, browserHistory);
17
12
  const appDecorator = withAppDecorator.bind(null, theme, store);
18
-
19
- const consoleDecorator = (storyFn, context) => withConsole()(storyFn)(context);
20
-
21
- export const getParameters = storyBookTheme => ({
22
- layout: 'fullscreen',
23
- actions: {
24
- argTypesRegex: '^on.*'
25
- },
26
- controls: {
27
- hideNoControlsWarning: true
28
- },
13
+ const getParameters = (storyBookTheme) => ({
14
+ layout: "fullscreen",
15
+ actions: { argTypesRegex: "^on.*" },
16
+ controls: { hideNoControlsWarning: true },
29
17
  docs: {
30
18
  theme: createTheme(storyBookTheme)
31
19
  },
32
20
  options: {
33
21
  storySort: {
34
- method: 'alphabetical',
35
- order: ['Getting Started', ['Introduction', 'Installation', 'Packages', 'Supported Browsers', 'Releases', 'Theme'], 'Components'],
36
- locales: 'en-US'
22
+ method: "alphabetical",
23
+ order: [
24
+ "Getting Started",
25
+ [
26
+ "Introduction",
27
+ "Installation",
28
+ "Packages",
29
+ "Supported Browsers",
30
+ "Releases",
31
+ "Theme"
32
+ ],
33
+ "Components"
34
+ ],
35
+ locales: ["en-US"]
37
36
  }
38
37
  },
39
38
  dependencies: {
@@ -41,4 +40,8 @@ export const getParameters = storyBookTheme => ({
41
40
  hideEmpty: true
42
41
  }
43
42
  });
44
- export const decorators = [consoleDecorator, appDecorator];
43
+ const decorators = [appDecorator];
44
+ export {
45
+ decorators,
46
+ getParameters
47
+ };
@@ -1,10 +1,13 @@
1
- import { create } from '@storybook/theming/create';
2
- export const createTheme = ({
3
- base = 'light',
4
- brandTitle = 'Platform UI Components',
1
+ import { create } from "@storybook/theming/create";
2
+ const createTheme = ({
3
+ base = "light",
4
+ brandTitle = "Platform UI Components",
5
5
  ...rest
6
6
  }) => create({
7
7
  base,
8
- brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION || ''}`,
8
+ brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION || ""}`,
9
9
  ...rest
10
- });
10
+ });
11
+ export {
12
+ createTheme
13
+ };
@@ -1,28 +1,22 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import { render } from '@testing-library/react';
3
- import { getDefaultTheme } from '@elliemae/pui-theme';
1
+ import * as React from "react";
2
+ import { render } from "@testing-library/react";
3
+ import { getDefaultTheme } from "@elliemae/pui-theme";
4
4
  import { createAppStore } from "../../data/store.js";
5
5
  import { AppRoot } from "../../view/app-root/index.js";
6
6
  import { browserHistory } from "../history.js";
7
7
  const defaultStore = createAppStore({}, browserHistory);
8
8
  const defaultTheme = getDefaultTheme();
9
-
10
9
  const AllTheProviders = ({
11
10
  store = defaultStore,
12
11
  theme = defaultTheme,
13
12
  children
14
- }) => /*#__PURE__*/_jsx(AppRoot, {
15
- store: store,
13
+ }) => /* @__PURE__ */ React.createElement(AppRoot, {
14
+ store,
16
15
  history: browserHistory,
17
- theme: theme
18
- }, void 0, children);
19
-
20
- const customRender = (ui, options) => render(ui, {
21
- wrapper: AllTheProviders,
22
- ...options
23
- }); // re-export everything
24
-
25
-
26
- export * from '@testing-library/react'; // override render method
27
-
28
- export { customRender as render };
16
+ theme
17
+ }, children);
18
+ const customRender = (ui, options) => render(ui, { wrapper: AllTheProviders, ...options });
19
+ export * from "@testing-library/react";
20
+ export {
21
+ customRender as render
22
+ };
@@ -1,16 +1,17 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import { render } from '@testing-library/react';
3
- import { Provider } from 'react-redux';
1
+ import * as React from "react";
2
+ import { render } from "@testing-library/react";
3
+ import { Provider } from "react-redux";
4
4
  import { createAppStore } from "../../data/store.js";
5
5
  import { browserHistory } from "../history.js";
6
- export const renderWithRedux = (ui, {
6
+ const renderWithRedux = (ui, {
7
7
  initialState,
8
8
  store = createAppStore(initialState, browserHistory)
9
- } = {}) => ({ ...render( /*#__PURE__*/_jsx(Provider, {
10
- store: store
11
- }, void 0, ui)),
12
- // adding `store` to the returned utilities to allow us
13
- // to reference it in our tests (just try to avoid using
14
- // this to test implementation details).
9
+ } = {}) => ({
10
+ ...render(/* @__PURE__ */ React.createElement(Provider, {
11
+ store
12
+ }, ui)),
15
13
  store
16
- });
14
+ });
15
+ export {
16
+ renderWithRedux
17
+ };
@@ -1,24 +1,23 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import { render } from '@testing-library/react';
3
- import { Provider } from 'react-redux';
4
- import { Router } from 'react-router-dom';
5
- import { createMemoryHistory } from 'history';
1
+ import * as React from "react";
2
+ import { render } from "@testing-library/react";
3
+ import { Provider } from "react-redux";
4
+ import { Router } from "react-router-dom";
5
+ import { createMemoryHistory } from "history";
6
6
  import { createAppStore } from "../../data/store.js";
7
7
  import { browserHistory } from "../history.js";
8
- export const renderWithRouterRedux = (ui, {
9
- route = '/',
10
- history = createMemoryHistory({
11
- initialEntries: [route]
12
- }),
8
+ const renderWithRouterRedux = (ui, {
9
+ route = "/",
10
+ history = createMemoryHistory({ initialEntries: [route] }),
13
11
  initialState,
14
12
  store = createAppStore(initialState, browserHistory)
15
- } = {}) => ({ ...render( /*#__PURE__*/_jsx(Provider, {
16
- store: store
17
- }, void 0, /*#__PURE__*/_jsx(Router, {
18
- history: history
19
- }, void 0, ui))),
20
- // adding `store` to the returned utilities to allow us
21
- // to reference it in our tests (just try to avoid using
22
- // this to test implementation details).
13
+ } = {}) => ({
14
+ ...render(/* @__PURE__ */ React.createElement(Provider, {
15
+ store
16
+ }, /* @__PURE__ */ React.createElement(Router, {
17
+ history
18
+ }, ui))),
23
19
  store
24
- });
20
+ });
21
+ export {
22
+ renderWithRouterRedux
23
+ };
@@ -1,17 +1,16 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import { render } from '@testing-library/react';
3
- import { Router } from 'react-router-dom';
4
- import { createMemoryHistory } from 'history';
5
- export const renderWithRouter = (ui, {
6
- route = '/',
7
- history = createMemoryHistory({
8
- initialEntries: [route]
9
- })
10
- } = {}) => ({ ...render( /*#__PURE__*/_jsx(Router, {
11
- history: history
12
- }, void 0, ui)),
13
- // adding `history` to the returned utilities to allow us
14
- // to reference it in our tests (just try to avoid using
15
- // this to test implementation details).
1
+ import * as React from "react";
2
+ import { render } from "@testing-library/react";
3
+ import { Router } from "react-router-dom";
4
+ import { createMemoryHistory } from "history";
5
+ const renderWithRouter = (ui, {
6
+ route = "/",
7
+ history = createMemoryHistory({ initialEntries: [route] })
8
+ } = {}) => ({
9
+ ...render(/* @__PURE__ */ React.createElement(Router, {
10
+ history
11
+ }, ui)),
16
12
  history
17
- });
13
+ });
14
+ export {
15
+ renderWithRouter
16
+ };
@@ -1,12 +1,12 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
-
3
- /* eslint-disable react-hooks/rules-of-hooks */
4
- import { useEffect, useState } from 'react';
5
- import { ThemeProvider } from 'styled-components';
6
- import { getDefaultTheme } from '@elliemae/pui-theme';
7
- import { useInjectReducer, useInjectSaga } from 'redux-injectors';
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
- export const RenderWithStateAddOns = ({
1
+ import * as React from "react";
2
+ import { useEffect, useState } from "react";
3
+ import { ThemeProvider } from "styled-components";
4
+ import { getDefaultTheme } from "@elliemae/pui-theme";
5
+ import {
6
+ useInjectReducer,
7
+ useInjectSaga
8
+ } from "redux-injectors";
9
+ const RenderWithStateAddOns = ({
10
10
  Component,
11
11
  reducer,
12
12
  saga,
@@ -14,24 +14,25 @@ export const RenderWithStateAddOns = ({
14
14
  ...rest
15
15
  }) => {
16
16
  const [ready, setReady] = useState(false);
17
-
18
17
  if (Array.isArray(reducer)) {
19
- reducer.forEach(r => useInjectReducer(r));
18
+ reducer.forEach((r) => useInjectReducer(r));
20
19
  } else {
21
20
  useInjectReducer(reducer);
22
21
  }
23
-
24
22
  if (Array.isArray(saga)) {
25
- saga.forEach(s => useInjectSaga(s));
23
+ saga.forEach((s) => useInjectSaga(s));
26
24
  } else if (saga) {
27
25
  useInjectSaga(saga);
28
26
  }
29
-
30
27
  useEffect(() => {
31
28
  setReady(true);
32
29
  }, []);
33
- return ready ? /*#__PURE__*/_jsx2(ThemeProvider, {
34
- theme: theme
35
- }, void 0, /*#__PURE__*/_jsx(Component, { ...rest
30
+ return ready ? /* @__PURE__ */ React.createElement(ThemeProvider, {
31
+ theme
32
+ }, /* @__PURE__ */ React.createElement(Component, {
33
+ ...rest
36
34
  })) : null;
37
- };
35
+ };
36
+ export {
37
+ RenderWithStateAddOns
38
+ };
@@ -1,6 +1,10 @@
1
- export const getRedirectUrl = () => {
1
+ const getRedirectUrl = () => {
2
2
  const url = new URL(window.location.href);
3
- url.search = '';
3
+ url.search = "";
4
4
  return url.href;
5
5
  };
6
- export const removeDoubleSlash = url => url.replace(/([^:]\/)\/+/g, '$1');
6
+ const removeDoubleSlash = (url) => url.replace(/([^:]\/)\/+/g, "$1");
7
+ export {
8
+ getRedirectUrl,
9
+ removeDoubleSlash
10
+ };
@@ -1,34 +1,38 @@
1
- import localforage from 'localforage';
2
- const STORAGE = 'storage';
3
- const GET_SESSION_STORAGE = 'getSessionStorage';
4
- const SESSION_STORAGE = 'sessionStorage';
5
-
1
+ import localforage from "localforage";
2
+ const STORAGE = "storage";
3
+ const GET_SESSION_STORAGE = "getSessionStorage";
4
+ const SESSION_STORAGE = "sessionStorage";
6
5
  const isSessionStorageEmpty = () => sessionStorage.length === 0;
7
-
8
- const onStorageChange = evt => {
6
+ const onStorageChange = (evt) => {
9
7
  if (evt.key === GET_SESSION_STORAGE) {
10
8
  localStorage.setItem(SESSION_STORAGE, JSON.stringify(sessionStorage));
11
9
  localStorage.removeItem(SESSION_STORAGE);
12
10
  } else if (evt.key === SESSION_STORAGE) {
13
11
  if (evt.newValue) {
14
12
  const sessionFromAnotherTab = JSON.parse(evt.newValue);
15
- if (sessionFromAnotherTab) Object.keys(sessionFromAnotherTab).forEach(key => {
16
- sessionStorage.setItem(key, sessionFromAnotherTab[key]);
17
- });
13
+ if (sessionFromAnotherTab)
14
+ Object.keys(sessionFromAnotherTab).forEach((key) => {
15
+ sessionStorage.setItem(key, sessionFromAnotherTab[key]);
16
+ });
18
17
  }
19
18
  }
20
19
  };
21
-
22
- export const persistentStorage = {
23
- get: async key => localforage.getItem(key),
20
+ const persistentStorage = {
21
+ get: async (key) => localforage.getItem(key),
24
22
  set: async (key, value) => {
25
23
  await localforage.setItem(key, value);
26
24
  }
27
25
  };
28
- export const listenStorageEvents = () => {
26
+ const listenStorageEvents = () => {
29
27
  window.addEventListener(STORAGE, onStorageChange);
30
- if (isSessionStorageEmpty()) localStorage.setItem(GET_SESSION_STORAGE, `${Date.now()}`);
28
+ if (isSessionStorageEmpty())
29
+ localStorage.setItem(GET_SESSION_STORAGE, `${Date.now()}`);
31
30
  };
32
- export const removeStorageEvents = () => {
31
+ const removeStorageEvents = () => {
33
32
  window.removeEventListener(STORAGE, onStorageChange);
34
- };
33
+ };
34
+ export {
35
+ listenStorageEvents,
36
+ persistentStorage,
37
+ removeStorageEvents
38
+ };
@@ -1,28 +1,28 @@
1
- import { getDefaultTheme } from '@elliemae/pui-theme';
2
- export const getWindow = () => {
1
+ import { getDefaultTheme } from "@elliemae/pui-theme";
2
+ const getWindow = () => {
3
3
  try {
4
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
5
4
  window.parent.document;
6
5
  return window.parent;
7
6
  } catch (err) {
8
7
  return window;
9
8
  }
10
9
  };
11
- export const getViewportSize = () => ({
10
+ const getViewportSize = () => ({
12
11
  width: Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),
13
12
  height: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0)
14
13
  });
15
-
16
- const convertBreakpointToNumber = breakpoint => Number(breakpoint.replace('px', ''));
17
-
18
- export const getCurrentBreakpoint = () => {
19
- const {
20
- width
21
- } = getViewportSize();
22
- const {
23
- breakpoints
24
- } = getDefaultTheme();
25
- if (width <= convertBreakpointToNumber(breakpoints.small)) return 'small';
26
- if (width <= convertBreakpointToNumber(breakpoints.medium)) return 'medium';
27
- return 'large';
28
- };
14
+ const convertBreakpointToNumber = (breakpoint) => Number(breakpoint.replace("px", ""));
15
+ const getCurrentBreakpoint = () => {
16
+ const { width } = getViewportSize();
17
+ const { breakpoints } = getDefaultTheme();
18
+ if (width <= convertBreakpointToNumber(breakpoints.small))
19
+ return "small";
20
+ if (width <= convertBreakpointToNumber(breakpoints.medium))
21
+ return "medium";
22
+ return "large";
23
+ };
24
+ export {
25
+ getCurrentBreakpoint,
26
+ getViewportSize,
27
+ getWindow
28
+ };
@@ -1,18 +1,15 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import _styled from "styled-components";
3
-
4
- var _GlobalStyle, _MediaBreakpoint, _WindowSize, _HTMLWaitMessage;
5
-
1
+ import * as React from "react";
2
+ import styled from "styled-components";
6
3
  import { MediaBreakpoint } from "../media-breakpoint/index.js";
7
4
  import { WindowSize } from "../window-size/index.js";
8
5
  import { HTMLWaitMessage } from "../modals/wait-message/html-wait-message.js";
9
6
  import GlobalStyle from "./style.js";
10
- export const HostedApp = ({
11
- children
12
- }) => /*#__PURE__*/_jsx(_StyledDiv, {}, void 0, _GlobalStyle || (_GlobalStyle = /*#__PURE__*/_jsx(GlobalStyle, {})), _MediaBreakpoint || (_MediaBreakpoint = /*#__PURE__*/_jsx(MediaBreakpoint, {})), _WindowSize || (_WindowSize = /*#__PURE__*/_jsx(WindowSize, {})), _HTMLWaitMessage || (_HTMLWaitMessage = /*#__PURE__*/_jsx(HTMLWaitMessage, {
7
+ const Div = styled.div`
8
+ height: 100%;
9
+ `;
10
+ const HostedApp = ({ children }) => /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement(GlobalStyle, null), /* @__PURE__ */ React.createElement(MediaBreakpoint, null), /* @__PURE__ */ React.createElement(WindowSize, null), /* @__PURE__ */ React.createElement(HTMLWaitMessage, {
13
11
  close: true
14
- })), children);
15
-
16
- var _StyledDiv = /*#__PURE__*/_styled("div").withConfig({
17
- componentId: "sc-njn2ro-0"
18
- })(["height:100%;"]);
12
+ }), children);
13
+ export {
14
+ HostedApp
15
+ };