@elliemae/pui-app-sdk 2.15.2 → 3.0.0-beta.1

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 (359) 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 +33 -29
  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/live-message/index.js +34 -25
  21. package/dist/cjs/data/logout/actions.js +12 -9
  22. package/dist/cjs/data/navigation-prompt/actions.js +12 -9
  23. package/dist/cjs/data/react-redux.js +29 -13
  24. package/dist/cjs/data/reducers.js +35 -23
  25. package/dist/cjs/data/saga.js +12 -9
  26. package/dist/cjs/data/store.js +53 -60
  27. package/dist/cjs/data/wait-message/actions.js +14 -13
  28. package/dist/cjs/data/wait-message/reducer.js +32 -24
  29. package/dist/cjs/index.js +187 -800
  30. package/dist/cjs/route/index.js +37 -32
  31. package/dist/cjs/route/page-view.js +30 -22
  32. package/dist/cjs/route/private-route/index.js +52 -60
  33. package/dist/cjs/sideeffect/auth/index.js +42 -30
  34. package/dist/cjs/sideeffect/error-toast/index.js +39 -26
  35. package/dist/cjs/sideeffect/wait-message/index.js +45 -29
  36. package/dist/cjs/typings/custom.d.js +0 -1
  37. package/dist/cjs/typings/elliemae.d.js +0 -1
  38. package/dist/cjs/typings/styled.d.js +19 -3
  39. package/dist/cjs/utils/app-config/config.js +33 -33
  40. package/dist/cjs/utils/app-config/index.js +42 -44
  41. package/dist/cjs/utils/app-host-integration/react.js +27 -14
  42. package/dist/cjs/utils/auth/helper.js +30 -18
  43. package/dist/cjs/utils/auth/index.js +76 -116
  44. package/dist/cjs/utils/await.js +3 -0
  45. package/dist/cjs/utils/constants.js +22 -21
  46. package/dist/cjs/utils/font-size.js +13 -14
  47. package/dist/cjs/utils/guest-with-service.js +11 -12
  48. package/dist/cjs/utils/helpers.js +15 -19
  49. package/dist/cjs/utils/history.js +29 -12
  50. package/dist/cjs/utils/log-records.js +38 -35
  51. package/dist/cjs/utils/micro-frontend/console-logger.js +39 -23
  52. package/dist/cjs/utils/micro-frontend/guest.js +80 -128
  53. package/dist/cjs/utils/micro-frontend/host.js +84 -124
  54. package/dist/cjs/utils/micro-frontend/index.js +60 -61
  55. package/dist/cjs/utils/micro-frontend/types.js +3 -5
  56. package/dist/cjs/utils/redact-pii.js +15 -17
  57. package/dist/cjs/utils/service-worker.js +36 -21
  58. package/dist/cjs/utils/session.js +64 -70
  59. package/dist/cjs/utils/storybook/main.js +32 -25
  60. package/dist/cjs/utils/storybook/manager.js +31 -16
  61. package/dist/cjs/utils/storybook/middleware.js +3 -7
  62. package/dist/cjs/utils/storybook/preview.js +57 -48
  63. package/dist/cjs/utils/storybook/theme.js +30 -14
  64. package/dist/cjs/utils/storybook/vite.js +6 -0
  65. package/dist/cjs/utils/storybook/webpack.js +13 -0
  66. package/dist/cjs/utils/testing/index.js +38 -50
  67. package/dist/cjs/utils/testing/render-with-redux.js +34 -27
  68. package/dist/cjs/utils/testing/render-with-router-redux.js +40 -37
  69. package/dist/cjs/utils/testing/render-with-router.js +34 -28
  70. package/dist/cjs/utils/testing/render-with-state-addons.js +40 -36
  71. package/dist/cjs/utils/types.js +3 -0
  72. package/dist/cjs/utils/url.js +12 -13
  73. package/dist/cjs/utils/web-storage.js +40 -30
  74. package/dist/cjs/utils/window.js +36 -28
  75. package/dist/cjs/view/app-root/hosted-app.js +35 -32
  76. package/dist/cjs/view/app-root/index.js +57 -62
  77. package/dist/cjs/view/app-root/stand-alone-app.js +38 -37
  78. package/dist/cjs/view/app-root/style.js +50 -12
  79. package/dist/cjs/view/error-boundary/default-error-template.js +10 -15
  80. package/dist/cjs/view/error-boundary/index.js +41 -43
  81. package/dist/cjs/view/error-toast/index.js +42 -32
  82. package/dist/cjs/view/fetch-host-app-data/index.js +34 -26
  83. package/dist/cjs/view/fetch-host-app-data/store.js +31 -24
  84. package/dist/cjs/view/fields/check-box/index.js +34 -39
  85. package/dist/cjs/view/fields/combo-box/index.js +37 -31
  86. package/dist/cjs/view/fields/connect-form.js +30 -15
  87. package/dist/cjs/view/fields/date-input/index.js +34 -26
  88. package/dist/cjs/view/fields/date-picker/index.js +34 -26
  89. package/dist/cjs/view/fields/form-item-layout/index.js +36 -30
  90. package/dist/cjs/view/fields/input-mask/index.js +35 -41
  91. package/dist/cjs/view/fields/large-text-box/index.js +34 -26
  92. package/dist/cjs/view/fields/radio/index.js +34 -30
  93. package/dist/cjs/view/fields/radio-group/index.js +32 -27
  94. package/dist/cjs/view/fields/text-box/index.js +34 -26
  95. package/dist/cjs/view/fields/watch-value.js +41 -35
  96. package/dist/cjs/view/form/index.js +41 -34
  97. package/dist/cjs/view/form/personal-info-section.js +56 -80
  98. package/dist/cjs/view/form/submit-button/index.js +34 -23
  99. package/dist/cjs/view/guest-unload-handlers/index.js +33 -22
  100. package/dist/cjs/view/header/center-region/index.js +61 -38
  101. package/dist/cjs/view/header/index.js +41 -35
  102. package/dist/cjs/view/header/logo-region/index.js +31 -23
  103. package/dist/cjs/view/header/nav-region/index.js +44 -30
  104. package/dist/cjs/view/header/nav-region/notification/index.js +28 -18
  105. package/dist/cjs/view/header/nav-region/user/index.js +28 -18
  106. package/dist/cjs/view/host-binding-events/index.js +10 -11
  107. package/dist/cjs/view/live-message/index.js +33 -34
  108. package/dist/cjs/view/loadable/index.js +33 -27
  109. package/dist/cjs/view/login/index.js +36 -30
  110. package/dist/cjs/view/media-breakpoint/index.js +43 -34
  111. package/dist/cjs/view/message-to-host-app/index.js +31 -20
  112. package/dist/cjs/view/micro-app/app-factory/index.js +98 -134
  113. package/dist/cjs/view/micro-app/const.js +10 -7
  114. package/dist/cjs/view/micro-app/index.js +37 -27
  115. package/dist/cjs/view/micro-app/resources/manifest.js +41 -34
  116. package/dist/cjs/view/micro-app/resources/script.js +56 -53
  117. package/dist/cjs/view/micro-app/resources/style.js +44 -38
  118. package/dist/cjs/view/micro-app/types.js +3 -5
  119. package/dist/cjs/view/micro-app/use-app-will-render.js +58 -50
  120. package/dist/cjs/view/micro-app/utils.js +32 -21
  121. package/dist/cjs/view/micro-iframe-app/app.js +37 -39
  122. package/dist/cjs/view/micro-iframe-app/iframe/const.js +10 -7
  123. package/dist/cjs/view/micro-iframe-app/iframe/index.js +51 -47
  124. package/dist/cjs/view/micro-iframe-app/index.js +36 -24
  125. package/dist/cjs/view/micro-iframe-app/types.js +3 -5
  126. package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +40 -36
  127. package/dist/cjs/view/modals/error/index.js +35 -28
  128. package/dist/cjs/view/modals/navigation-prompt/index.js +38 -37
  129. package/dist/cjs/view/modals/session-expiry/customHooks.js +40 -35
  130. package/dist/cjs/view/modals/session-expiry/index.js +45 -50
  131. package/dist/cjs/view/modals/wait-message/html-wait-message.js +32 -18
  132. package/dist/cjs/view/modals/wait-message/index.js +50 -53
  133. package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +33 -21
  134. package/dist/cjs/view/render-with-delay/index.js +30 -19
  135. package/dist/cjs/view/render-with-host-data/index.js +35 -30
  136. package/dist/cjs/view/session-timeout/index.js +44 -35
  137. package/dist/cjs/view/storybook/decorator.js +32 -21
  138. package/dist/cjs/view/use-previous.js +29 -13
  139. package/dist/cjs/view/useMediaBreakpoints/index.js +34 -19
  140. package/dist/cjs/view/visually-hidden/index.js +41 -21
  141. package/dist/cjs/view/window-size/index.js +32 -20
  142. package/dist/es/analytics/appdynamics.js +14 -15
  143. package/dist/es/analytics/index.js +11 -17
  144. package/dist/es/analytics/page-view-event.js +11 -20
  145. package/dist/es/analytics/user-session-event.js +13 -15
  146. package/dist/es/analytics/user-wait-event.js +10 -6
  147. package/dist/es/analytics/web-analytics.js +12 -10
  148. package/dist/es/api/auth/index.js +22 -27
  149. package/dist/es/api/helpers.js +8 -81
  150. package/dist/es/api/users/index.js +7 -8
  151. package/dist/es/communication/http-client/index.js +24 -30
  152. package/dist/es/communication/http-client/request-interceptor.js +6 -3
  153. package/dist/es/communication/http-client/response-interceptor.js +20 -21
  154. package/dist/es/communication/http-client/retry-axios.js +45 -105
  155. package/dist/es/communication/http-client/retry.js +22 -25
  156. package/dist/es/communication/http-client/tests/index.test-disable.js +28 -47
  157. package/dist/es/data/auth/actions.js +13 -19
  158. package/dist/es/data/auth/reducer.js +9 -7
  159. package/dist/es/data/breakpoint/index.js +19 -21
  160. package/dist/es/data/error/index.js +11 -9
  161. package/dist/es/data/live-message/index.js +12 -16
  162. package/dist/es/data/logout/actions.js +9 -5
  163. package/dist/es/data/navigation-prompt/actions.js +9 -5
  164. package/dist/es/data/react-redux.js +7 -3
  165. package/dist/es/data/reducers.js +10 -7
  166. package/dist/es/data/saga.js +8 -5
  167. package/dist/es/data/store.js +27 -44
  168. package/dist/es/data/wait-message/actions.js +11 -9
  169. package/dist/es/data/wait-message/reducer.js +10 -10
  170. package/dist/es/index.js +181 -83
  171. package/dist/es/route/index.js +16 -19
  172. package/dist/es/route/page-view.js +9 -9
  173. package/dist/es/route/private-route/index.js +30 -38
  174. package/dist/es/sideeffect/auth/index.js +27 -14
  175. package/dist/es/sideeffect/error-toast/index.js +15 -14
  176. package/dist/es/sideeffect/wait-message/index.js +18 -14
  177. package/dist/es/typings/styled.d.js +1 -2
  178. package/dist/es/utils/app-config/config.js +11 -9
  179. package/dist/es/utils/app-config/index.js +21 -31
  180. package/dist/es/utils/app-host-integration/react.js +8 -6
  181. package/dist/es/utils/auth/helper.js +8 -4
  182. package/dist/es/utils/auth/index.js +59 -83
  183. package/dist/es/utils/constants.js +18 -13
  184. package/dist/es/utils/font-size.js +7 -3
  185. package/dist/es/utils/guest-with-service.js +6 -7
  186. package/dist/es/utils/helpers.js +10 -6
  187. package/dist/es/utils/history.js +7 -3
  188. package/dist/es/utils/log-records.js +34 -31
  189. package/dist/es/utils/micro-frontend/console-logger.js +17 -13
  190. package/dist/es/utils/micro-frontend/guest.js +52 -108
  191. package/dist/es/utils/micro-frontend/host.js +53 -89
  192. package/dist/es/utils/micro-frontend/index.js +39 -37
  193. package/dist/es/utils/micro-frontend/types.js +0 -1
  194. package/dist/es/utils/redact-pii.js +10 -11
  195. package/dist/es/utils/service-worker.js +14 -11
  196. package/dist/es/utils/session.js +47 -48
  197. package/dist/es/utils/storybook/manager.js +8 -5
  198. package/dist/es/utils/storybook/preview.js +30 -26
  199. package/dist/es/utils/storybook/theme.js +9 -6
  200. package/dist/es/utils/testing/index.js +14 -21
  201. package/dist/es/utils/testing/render-with-redux.js +13 -13
  202. package/dist/es/utils/testing/render-with-router-redux.js +19 -21
  203. package/dist/es/utils/testing/render-with-router.js +14 -16
  204. package/dist/es/utils/testing/render-with-state-addons.js +18 -18
  205. package/dist/es/utils/url.js +7 -3
  206. package/dist/es/utils/web-storage.js +21 -17
  207. package/dist/es/utils/window.js +18 -18
  208. package/dist/es/view/app-root/hosted-app.js +13 -17
  209. package/dist/es/view/app-root/index.js +34 -39
  210. package/dist/es/view/app-root/stand-alone-app.js +17 -19
  211. package/dist/es/view/app-root/style.js +30 -5
  212. package/dist/es/view/error-boundary/default-error-template.js +4 -5
  213. package/dist/es/view/error-boundary/index.js +20 -27
  214. package/dist/es/view/error-toast/index.js +21 -16
  215. package/dist/es/view/fetch-host-app-data/index.js +13 -13
  216. package/dist/es/view/fetch-host-app-data/store.js +10 -7
  217. package/dist/es/view/fields/check-box/index.js +16 -18
  218. package/dist/es/view/fields/combo-box/index.js +19 -19
  219. package/dist/es/view/fields/connect-form.js +8 -6
  220. package/dist/es/view/fields/date-input/index.js +16 -14
  221. package/dist/es/view/fields/date-picker/index.js +16 -14
  222. package/dist/es/view/fields/form-item-layout/index.js +15 -16
  223. package/dist/es/view/fields/input-mask/index.js +20 -14
  224. package/dist/es/view/fields/large-text-box/index.js +16 -14
  225. package/dist/es/view/fields/radio/index.js +16 -18
  226. package/dist/es/view/fields/radio-group/index.js +14 -15
  227. package/dist/es/view/fields/text-box/index.js +16 -14
  228. package/dist/es/view/fields/watch-value.js +19 -24
  229. package/dist/es/view/form/index.js +22 -22
  230. package/dist/es/view/form/personal-info-section.js +31 -52
  231. package/dist/es/view/form/submit-button/index.js +12 -10
  232. package/dist/es/view/guest-unload-handlers/index.js +11 -10
  233. package/dist/es/view/header/center-region/index.js +40 -23
  234. package/dist/es/view/header/index.js +19 -19
  235. package/dist/es/view/header/logo-region/index.js +8 -9
  236. package/dist/es/view/header/nav-region/index.js +22 -15
  237. package/dist/es/view/header/nav-region/notification/index.js +5 -6
  238. package/dist/es/view/header/nav-region/user/index.js +5 -6
  239. package/dist/es/view/host-binding-events/index.js +7 -3
  240. package/dist/es/view/live-message/index.js +13 -23
  241. package/dist/es/view/loadable/index.js +12 -15
  242. package/dist/es/view/login/index.js +14 -18
  243. package/dist/es/view/media-breakpoint/index.js +19 -17
  244. package/dist/es/view/message-to-host-app/index.js +11 -10
  245. package/dist/es/view/micro-app/app-factory/index.js +67 -86
  246. package/dist/es/view/micro-app/const.js +4 -1
  247. package/dist/es/view/micro-app/index.js +13 -11
  248. package/dist/es/view/micro-app/resources/manifest.js +19 -19
  249. package/dist/es/view/micro-app/resources/script.js +36 -36
  250. package/dist/es/view/micro-app/resources/style.js +23 -22
  251. package/dist/es/view/micro-app/types.js +0 -1
  252. package/dist/es/view/micro-app/use-app-will-render.js +32 -28
  253. package/dist/es/view/micro-app/utils.js +12 -14
  254. package/dist/es/view/micro-iframe-app/app.js +15 -22
  255. package/dist/es/view/micro-iframe-app/iframe/const.js +4 -1
  256. package/dist/es/view/micro-iframe-app/iframe/index.js +27 -32
  257. package/dist/es/view/micro-iframe-app/index.js +11 -12
  258. package/dist/es/view/micro-iframe-app/types.js +0 -1
  259. package/dist/es/view/micro-iframe-app/use-frame-loaded.js +16 -21
  260. package/dist/es/view/modals/error/index.js +12 -10
  261. package/dist/es/view/modals/navigation-prompt/index.js +12 -16
  262. package/dist/es/view/modals/session-expiry/customHooks.js +13 -15
  263. package/dist/es/view/modals/session-expiry/index.js +16 -24
  264. package/dist/es/view/modals/wait-message/html-wait-message.js +10 -10
  265. package/dist/es/view/modals/wait-message/index.js +31 -39
  266. package/dist/es/view/modals/wait-message/wait-message-launcher.js +9 -8
  267. package/dist/es/view/render-with-delay/index.js +7 -10
  268. package/dist/es/view/render-with-host-data/index.js +11 -15
  269. package/dist/es/view/session-timeout/index.js +21 -12
  270. package/dist/es/view/storybook/decorator.js +9 -7
  271. package/dist/es/view/use-previous.js +6 -3
  272. package/dist/es/view/useMediaBreakpoints/index.js +11 -9
  273. package/dist/es/view/visually-hidden/index.js +19 -10
  274. package/dist/es/view/window-size/index.js +10 -9
  275. package/dist/types/utils/storybook/main.d.cts +41 -0
  276. package/dist/types/utils/storybook/{middleware.d.ts → middleware.d.cts} +0 -0
  277. package/dist/types/utils/storybook/preview.d.ts +2 -2
  278. package/dist/types/utils/storybook/vite.d.cts +4 -0
  279. package/dist/types/utils/storybook/webpack.d.cts +8 -0
  280. package/dist/types/utils/testing/render-with-redux.d.ts +1 -1
  281. package/dist/types/utils/testing/render-with-router-redux.d.ts +1 -1
  282. package/dist/types/utils/testing/render-with-router.d.ts +1 -1
  283. package/dist/types/utils/window.d.ts +1 -1
  284. package/dist/types/view/visually-hidden/index.d.ts +1 -3
  285. package/package.json +19 -17
  286. package/dist/cjs/api/users/index.endpoint.js +0 -14
  287. package/dist/cjs/api/users/users.json +0 -8
  288. package/dist/cjs/app.config.json +0 -129
  289. package/dist/cjs/communication/http-client/tests/hello.endpoint.js +0 -14
  290. package/dist/cjs/communication/http-client/tests/private.endpoint.js +0 -14
  291. package/dist/cjs/index.pug +0 -15
  292. package/dist/cjs/view/error-toast/index.stories.js +0 -128
  293. package/dist/cjs/view/fields/check-box/index.stories.js +0 -64
  294. package/dist/cjs/view/fields/check-box/set-value.stories.js +0 -83
  295. package/dist/cjs/view/fields/combo-box/index.stories.js +0 -65
  296. package/dist/cjs/view/fields/date-input/index.stories.js +0 -53
  297. package/dist/cjs/view/fields/date-input/index1.stories.js +0 -53
  298. package/dist/cjs/view/fields/date-picker/index.stories.js +0 -53
  299. package/dist/cjs/view/fields/form-item-layout/index.stories.js +0 -43
  300. package/dist/cjs/view/fields/input-mask/index.stories.js +0 -52
  301. package/dist/cjs/view/fields/large-text-box/index.stories.js +0 -47
  302. package/dist/cjs/view/fields/radio/index.stories.js +0 -60
  303. package/dist/cjs/view/fields/radio/set-value.stories.js +0 -81
  304. package/dist/cjs/view/fields/radio-group/index.stories.js +0 -85
  305. package/dist/cjs/view/fields/text-box/index.stories.js +0 -48
  306. package/dist/cjs/view/form/index.stories.js +0 -71
  307. package/dist/cjs/view/form/usecases.stories.js +0 -59
  308. package/dist/cjs/view/header/index.stories.js +0 -24
  309. package/dist/cjs/view/header/logo-region/logo.svg +0 -2
  310. package/dist/cjs/view/header/nav-region/notification/index.svg +0 -5
  311. package/dist/cjs/view/header/nav-region/user/index.svg +0 -4
  312. package/dist/cjs/view/intro.stories.mdx +0 -27
  313. package/dist/cjs/view/live-message/index.stories.js +0 -53
  314. package/dist/cjs/view/media-breakpoint/index.stories.js +0 -24
  315. package/dist/cjs/view/micro-iframe-app/iframe/index.html +0 -74
  316. package/dist/cjs/view/modals/error/index.stories.js +0 -36
  317. package/dist/cjs/view/modals/navigation-prompt/index.stories.js +0 -32
  318. package/dist/cjs/view/modals/session-expiry/index.stories.js +0 -30
  319. package/dist/cjs/view/modals/wait-message/index.stories.js +0 -47
  320. package/dist/cjs/view/session-timeout/index.stories.js +0 -28
  321. package/dist/es/api/users/index.endpoint.js +0 -14
  322. package/dist/es/api/users/users.json +0 -8
  323. package/dist/es/app.config.json +0 -129
  324. package/dist/es/communication/http-client/tests/hello.endpoint.js +0 -14
  325. package/dist/es/communication/http-client/tests/private.endpoint.js +0 -14
  326. package/dist/es/index.pug +0 -15
  327. package/dist/es/utils/storybook/main.js +0 -38
  328. package/dist/es/utils/storybook/middleware.js +0 -9
  329. package/dist/es/view/error-toast/index.stories.js +0 -108
  330. package/dist/es/view/fields/check-box/index.stories.js +0 -47
  331. package/dist/es/view/fields/check-box/set-value.stories.js +0 -65
  332. package/dist/es/view/fields/combo-box/index.stories.js +0 -48
  333. package/dist/es/view/fields/date-input/index.stories.js +0 -35
  334. package/dist/es/view/fields/date-input/index1.stories.js +0 -35
  335. package/dist/es/view/fields/date-picker/index.stories.js +0 -35
  336. package/dist/es/view/fields/form-item-layout/index.stories.js +0 -27
  337. package/dist/es/view/fields/input-mask/index.stories.js +0 -35
  338. package/dist/es/view/fields/large-text-box/index.stories.js +0 -30
  339. package/dist/es/view/fields/radio/index.stories.js +0 -43
  340. package/dist/es/view/fields/radio/set-value.stories.js +0 -63
  341. package/dist/es/view/fields/radio-group/index.stories.js +0 -68
  342. package/dist/es/view/fields/text-box/index.stories.js +0 -31
  343. package/dist/es/view/form/index.stories.js +0 -56
  344. package/dist/es/view/form/usecases.stories.js +0 -43
  345. package/dist/es/view/header/index.stories.js +0 -14
  346. package/dist/es/view/header/logo-region/logo.svg +0 -2
  347. package/dist/es/view/header/nav-region/notification/index.svg +0 -5
  348. package/dist/es/view/header/nav-region/user/index.svg +0 -4
  349. package/dist/es/view/intro.stories.mdx +0 -27
  350. package/dist/es/view/live-message/index.stories.js +0 -32
  351. package/dist/es/view/media-breakpoint/index.stories.js +0 -10
  352. package/dist/es/view/micro-iframe-app/iframe/index.html +0 -74
  353. package/dist/es/view/modals/error/index.stories.js +0 -21
  354. package/dist/es/view/modals/navigation-prompt/index.stories.js +0 -18
  355. package/dist/es/view/modals/session-expiry/index.stories.js +0 -18
  356. package/dist/es/view/modals/wait-message/index.stories.js +0 -33
  357. package/dist/es/view/session-timeout/index.stories.js +0 -13
  358. package/dist/types/utils/storybook/main.d.ts +0 -30
  359. package/dist/types/view/fields/date-input/index1.stories.d.ts +0 -24
@@ -1,17 +1,20 @@
1
- import { logRecords } from "./log-records.js";
2
- import { getLogger } from "./micro-frontend/index.js";
3
- export const initServiceWorker = (swDest = '') => {
1
+ import "./log-records";
2
+ import { getLogger } from "./micro-frontend";
3
+ const initServiceWorker = (swDest = "") => {
4
4
  const logger = getLogger() || console;
5
-
6
- if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
7
- window.addEventListener('load', () => {
8
- navigator.serviceWorker.register(`${swDest.replace(/\/?$/, '/')}sw.js`).then(() => {
9
- logger.debug('Service Worker registered');
10
- }).catch(registrationError => {
11
- logger.error({ ...logRecords.SERVICE_WORKER_FAILED,
5
+ if (false) {
6
+ window.addEventListener("load", () => {
7
+ navigator.serviceWorker.register(`${swDest.replace(/\/?$/, "/")}sw.js`).then(() => {
8
+ logger.debug("Service Worker registered");
9
+ }).catch((registrationError) => {
10
+ logger.error({
11
+ ...logRecords.SERVICE_WORKER_FAILED,
12
12
  exception: registrationError
13
13
  });
14
14
  });
15
15
  });
16
16
  }
17
- };
17
+ };
18
+ export {
19
+ initServiceWorker
20
+ };
@@ -1,97 +1,96 @@
1
- import _throttle from "lodash/throttle";
2
- import { getAppConfigValue } from "./app-config/config.js";
3
- import { SESSION_TIMEOUT_INTERVAL } from "./constants.js";
4
- const THROTTLING_TIME = 6000;
1
+ import { throttle } from "lodash";
2
+ import { getAppConfigValue } from "./app-config/config";
3
+ import { SESSION_TIMEOUT_INTERVAL } from "./constants";
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 = () => {
13
+ const resetUserIdleTime = () => {
14
14
  sessionExpiryWarningNotified = false;
15
15
  sessionExpiryWarningNotifiedAt = null;
16
16
  lastUserActivityTimeStamp = Date.now();
17
17
  Promise.resolve().then(() => {
18
- resetListeners.forEach(listener => listener());
19
- }).catch(() => {});
18
+ resetListeners.forEach((listener) => listener());
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';
2
- import { createTheme } from "./theme.js";
3
- export const init = theme => {
1
+ import { addons } from "@storybook/addons";
2
+ import { createTheme } from "./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,39 @@
1
- import { withConsole } from '@storybook/addon-console';
2
- import { getDefaultTheme } from '@elliemae/pui-theme';
3
- import { createAppStore } from "../../data/store.js";
4
- import { withAppDecorator } from "../../view/storybook/decorator.js";
5
- import { loadAppConfig } from "../app-config/index.js";
6
- import { createTheme } from "./theme.js";
7
- import { browserHistory } from "../history.js";
8
- import '@elliemae/ds-basic/css/dimsum.css';
9
-
1
+ import { getDefaultTheme } from "@elliemae/pui-theme";
2
+ import { createAppStore } from "../../data/store";
3
+ import { withAppDecorator } from "../../view/storybook/decorator";
4
+ import { loadAppConfig } from "../app-config";
5
+ import { createTheme } from "./theme";
6
+ import { browserHistory } from "../history";
7
+ import "@elliemae/ds-basic/css/dimsum.css";
10
8
  (async () => {
11
- // eslint-disable-next-line no-undef
12
9
  await loadAppConfig(__webpack_public_path__);
13
10
  })();
14
-
15
11
  const theme = getDefaultTheme();
16
12
  const store = createAppStore({}, browserHistory);
17
13
  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
- },
14
+ const getParameters = (storyBookTheme) => ({
15
+ layout: "fullscreen",
16
+ actions: { argTypesRegex: "^on.*" },
17
+ controls: { hideNoControlsWarning: true },
29
18
  docs: {
30
19
  theme: createTheme(storyBookTheme)
31
20
  },
32
21
  options: {
33
22
  storySort: {
34
- method: 'alphabetical',
35
- order: ['Getting Started', ['Introduction', 'Installation', 'Packages', 'Supported Browsers', 'Releases', 'Theme'], 'Components'],
36
- locales: 'en-US'
23
+ method: "alphabetical",
24
+ order: [
25
+ "Getting Started",
26
+ [
27
+ "Introduction",
28
+ "Installation",
29
+ "Packages",
30
+ "Supported Browsers",
31
+ "Releases",
32
+ "Theme"
33
+ ],
34
+ "Components"
35
+ ],
36
+ locales: ["en-US"]
37
37
  }
38
38
  },
39
39
  dependencies: {
@@ -41,4 +41,8 @@ export const getParameters = storyBookTheme => ({
41
41
  hideEmpty: true
42
42
  }
43
43
  });
44
- export const decorators = [consoleDecorator, appDecorator];
44
+ const decorators = [appDecorator];
45
+ export {
46
+ decorators,
47
+ getParameters
48
+ };
@@ -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,21 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import { render } from '@testing-library/react';
3
- import { getDefaultTheme } from '@elliemae/pui-theme';
4
- import { createAppStore } from "../../data/store.js";
5
- import { AppRoot } from "../../view/app-root/index.js";
6
- import { browserHistory } from "../history.js";
1
+ import { render } from "@testing-library/react";
2
+ import { getDefaultTheme } from "@elliemae/pui-theme";
3
+ import { createAppStore } from "../../data/store";
4
+ import { AppRoot } from "../../view/app-root";
5
+ import { browserHistory } from "../history";
7
6
  const defaultStore = createAppStore({}, browserHistory);
8
7
  const defaultTheme = getDefaultTheme();
9
-
10
8
  const AllTheProviders = ({
11
9
  store = defaultStore,
12
10
  theme = defaultTheme,
13
11
  children
14
- }) => /*#__PURE__*/_jsx(AppRoot, {
15
- store: store,
12
+ }) => /* @__PURE__ */ React.createElement(AppRoot, {
13
+ store,
16
14
  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 };
15
+ theme
16
+ }, children);
17
+ const customRender = (ui, options) => render(ui, { wrapper: AllTheProviders, ...options });
18
+ export * from "@testing-library/react";
19
+ export {
20
+ customRender as render
21
+ };
@@ -1,16 +1,16 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import { render } from '@testing-library/react';
3
- import { Provider } from 'react-redux';
4
- import { createAppStore } from "../../data/store.js";
5
- import { browserHistory } from "../history.js";
6
- export const renderWithRedux = (ui, {
1
+ import { render } from "@testing-library/react";
2
+ import { Provider } from "react-redux";
3
+ import { createAppStore } from "../../data/store";
4
+ import { browserHistory } from "../history";
5
+ const renderWithRedux = (ui, {
7
6
  initialState,
8
7
  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).
8
+ } = {}) => ({
9
+ ...render(/* @__PURE__ */ React.createElement(Provider, {
10
+ store
11
+ }, ui)),
15
12
  store
16
- });
13
+ });
14
+ export {
15
+ renderWithRedux
16
+ };
@@ -1,24 +1,22 @@
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';
6
- import { createAppStore } from "../../data/store.js";
7
- import { browserHistory } from "../history.js";
8
- export const renderWithRouterRedux = (ui, {
9
- route = '/',
10
- history = createMemoryHistory({
11
- initialEntries: [route]
12
- }),
1
+ import { render } from "@testing-library/react";
2
+ import { Provider } from "react-redux";
3
+ import { Router } from "react-router-dom";
4
+ import { createMemoryHistory } from "history";
5
+ import { createAppStore } from "../../data/store";
6
+ import { browserHistory } from "../history";
7
+ const renderWithRouterRedux = (ui, {
8
+ route = "/",
9
+ history = createMemoryHistory({ initialEntries: [route] }),
13
10
  initialState,
14
11
  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).
12
+ } = {}) => ({
13
+ ...render(/* @__PURE__ */ React.createElement(Provider, {
14
+ store
15
+ }, /* @__PURE__ */ React.createElement(Router, {
16
+ history
17
+ }, ui))),
23
18
  store
24
- });
19
+ });
20
+ export {
21
+ renderWithRouterRedux
22
+ };
@@ -1,17 +1,15 @@
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 { render } from "@testing-library/react";
2
+ import { Router } from "react-router-dom";
3
+ import { createMemoryHistory } from "history";
4
+ const renderWithRouter = (ui, {
5
+ route = "/",
6
+ history = createMemoryHistory({ initialEntries: [route] })
7
+ } = {}) => ({
8
+ ...render(/* @__PURE__ */ React.createElement(Router, {
9
+ history
10
+ }, ui)),
16
11
  history
17
- });
12
+ });
13
+ export {
14
+ renderWithRouter
15
+ };
@@ -1,12 +1,11 @@
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 { useEffect, useState } from "react";
2
+ import { ThemeProvider } from "styled-components";
3
+ import { getDefaultTheme } from "@elliemae/pui-theme";
4
+ import {
5
+ useInjectReducer,
6
+ useInjectSaga
7
+ } from "redux-injectors";
8
+ const RenderWithStateAddOns = ({
10
9
  Component,
11
10
  reducer,
12
11
  saga,
@@ -14,24 +13,25 @@ export const RenderWithStateAddOns = ({
14
13
  ...rest
15
14
  }) => {
16
15
  const [ready, setReady] = useState(false);
17
-
18
16
  if (Array.isArray(reducer)) {
19
- reducer.forEach(r => useInjectReducer(r));
17
+ reducer.forEach((r) => useInjectReducer(r));
20
18
  } else {
21
19
  useInjectReducer(reducer);
22
20
  }
23
-
24
21
  if (Array.isArray(saga)) {
25
- saga.forEach(s => useInjectSaga(s));
22
+ saga.forEach((s) => useInjectSaga(s));
26
23
  } else if (saga) {
27
24
  useInjectSaga(saga);
28
25
  }
29
-
30
26
  useEffect(() => {
31
27
  setReady(true);
32
28
  }, []);
33
- return ready ? /*#__PURE__*/_jsx2(ThemeProvider, {
34
- theme: theme
35
- }, void 0, /*#__PURE__*/_jsx(Component, { ...rest
29
+ return ready ? /* @__PURE__ */ React.createElement(ThemeProvider, {
30
+ theme
31
+ }, /* @__PURE__ */ React.createElement(Component, {
32
+ ...rest
36
33
  })) : null;
37
- };
34
+ };
35
+ export {
36
+ RenderWithStateAddOns
37
+ };
@@ -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
+ };