@elliemae/pui-app-sdk 5.7.1 → 6.0.0-next.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 (304) hide show
  1. package/README.md +8 -0
  2. package/dist/cjs/analytics/appdynamics.js +1 -1
  3. package/dist/cjs/analytics/page-view-event.js +1 -1
  4. package/dist/cjs/api/helpers.js +14 -4
  5. package/dist/cjs/api/users/index.endpoint.cjs +12 -0
  6. package/dist/cjs/app.config.json +2 -2
  7. package/dist/cjs/communication/http-client/index.js +2 -2
  8. package/dist/cjs/communication/http-client/response-interceptor.js +2 -2
  9. package/dist/cjs/communication/http-client/retry-axios.js +14 -14
  10. package/dist/cjs/communication/http-client/retry.js +1 -1
  11. package/dist/cjs/communication/http-client/tests/hello.endpoint.cjs +12 -0
  12. package/dist/cjs/communication/http-client/tests/private.endpoint.cjs +13 -0
  13. package/dist/cjs/data/appMiddleware.js +2 -3
  14. package/dist/cjs/{view/fields/large-text-box/index.js → data/auth-state.js} +24 -20
  15. package/dist/cjs/data/breakpoint-state.js +46 -0
  16. package/dist/cjs/data/{error/index.js → error-state.js} +3 -3
  17. package/dist/cjs/data/errorMiddleware.js +2 -2
  18. package/dist/cjs/data/listenerMiddleware.js +5 -3
  19. package/dist/cjs/data/{live-message/index.js → live-message-state.js} +3 -3
  20. package/dist/cjs/data/{logout/actions.js → logout-actions.js} +6 -16
  21. package/dist/cjs/data/{navigation-prompt/actions.js → navigation-prompt-actions.js} +6 -16
  22. package/dist/cjs/data/queryMiddleware.js +3 -1
  23. package/dist/cjs/data/reducers.js +8 -8
  24. package/dist/cjs/data/store.js +12 -8
  25. package/dist/cjs/data/wait-message-state.js +46 -0
  26. package/dist/cjs/index.js +13 -35
  27. package/dist/cjs/sideeffect/auth/index.js +4 -4
  28. package/dist/cjs/sideeffect/error-toast/index.js +3 -3
  29. package/dist/cjs/sideeffect/wait-message/index.js +3 -3
  30. package/dist/cjs/utils/app-config/config.js +2 -2
  31. package/dist/cjs/utils/app-config/index.js +1 -1
  32. package/dist/cjs/utils/auth/helper.js +2 -2
  33. package/dist/cjs/utils/auth/index.js +2 -2
  34. package/dist/cjs/utils/font-size.js +1 -1
  35. package/dist/cjs/utils/micro-frontend/guest.js +9 -8
  36. package/dist/cjs/utils/micro-frontend/host.js +10 -8
  37. package/dist/cjs/utils/micro-frontend/index.js +15 -5
  38. package/dist/cjs/utils/micro-frontend/ssfguest-adapter.js +1 -1
  39. package/dist/cjs/utils/session.js +26 -4
  40. package/dist/cjs/{data/breakpoint/index.js → utils/storybook/main.js} +31 -26
  41. package/dist/cjs/utils/storybook/manager.js +2 -2
  42. package/dist/cjs/{data/wait-message/actions.js → utils/storybook/middleware.js} +7 -18
  43. package/dist/cjs/utils/storybook/preview.js +10 -5
  44. package/dist/cjs/utils/storybook/theme.js +5 -8
  45. package/dist/cjs/utils/storybook/vite.js +33 -0
  46. package/dist/cjs/{view/fields/date-input/index.js → utils/storybook/webpack.js} +22 -20
  47. package/dist/cjs/utils/testing/index.js +1 -1
  48. package/dist/cjs/utils/testing/render-with-redux.js +1 -5
  49. package/dist/cjs/utils/testing/render-with-router-redux.js +1 -2
  50. package/dist/cjs/utils/url.js +2 -0
  51. package/dist/cjs/utils/web-storage.js +1 -1
  52. package/dist/cjs/utils/window.js +1 -1
  53. package/dist/cjs/view/app-root/hosted-app.js +3 -3
  54. package/dist/cjs/view/app-root/index.js +2 -0
  55. package/dist/cjs/view/app-root/stand-alone-app.js +3 -3
  56. package/dist/cjs/view/app-root/style.js +1 -1
  57. package/dist/cjs/{data/auth/actions.js → view/app-root/use-prefetch-resources.js} +15 -31
  58. package/dist/cjs/view/breakpoint/use-breakpoint.js +4 -4
  59. package/dist/cjs/view/error-boundary/index.js +2 -2
  60. package/dist/cjs/view/error-toast/index.js +4 -4
  61. package/dist/cjs/view/fetch-host-app-data/index.js +1 -1
  62. package/dist/cjs/view/fetch-host-app-data/store.js +12 -2
  63. package/dist/cjs/view/fields/autocomplete/index.js +4 -1
  64. package/dist/cjs/view/fields/combo-box-v3/index.js +1 -1
  65. package/dist/cjs/view/fields/masked-input-text/index.js +1 -1
  66. package/dist/cjs/view/fields/watch-value.js +1 -1
  67. package/dist/cjs/view/form/index.js +1 -1
  68. package/dist/cjs/view/form/personal-info-section.js +5 -7
  69. package/dist/cjs/view/login/index.js +2 -2
  70. package/dist/cjs/view/micro-app/app-factory/index.js +17 -7
  71. package/dist/cjs/view/micro-app/index.js +1 -1
  72. package/dist/cjs/view/micro-app/resources/script.js +16 -8
  73. package/dist/cjs/view/micro-app/resources/style.js +14 -1
  74. package/dist/cjs/view/micro-app/use-app-will-render.js +15 -5
  75. package/dist/cjs/view/micro-iframe-app/app.js +1 -1
  76. package/dist/cjs/view/micro-iframe-app/iframe/index.js +1 -2
  77. package/dist/cjs/view/modals/navigation-prompt/index.js +3 -3
  78. package/dist/cjs/view/modals/session-expiry/index.js +3 -3
  79. package/dist/cjs/view/page.js +1 -1
  80. package/dist/cjs/view/require-auth.js +3 -3
  81. package/dist/cjs/view/session-timeout/index.js +2 -2
  82. package/dist/cjs/view/storybook/decorator.js +1 -1
  83. package/dist/cjs/view/use-window-size-change.js +1 -1
  84. package/dist/cjs/view/visually-hidden/index.js +2 -1
  85. package/dist/cjs/view/wait-message/index.js +2 -2
  86. package/dist/cjs/view/wait-message/wait-message-launcher.js +3 -3
  87. package/dist/esm/analytics/page-view-event.js +1 -1
  88. package/dist/esm/api/users/index.endpoint.cjs +12 -0
  89. package/dist/esm/app.config.json +2 -2
  90. package/dist/esm/communication/http-client/response-interceptor.js +1 -1
  91. package/dist/esm/communication/http-client/retry-axios.js +13 -13
  92. package/dist/esm/communication/http-client/retry.js +1 -1
  93. package/dist/esm/communication/http-client/tests/hello.endpoint.cjs +12 -0
  94. package/dist/esm/communication/http-client/tests/private.endpoint.cjs +13 -0
  95. package/dist/esm/data/appMiddleware.js +2 -3
  96. package/dist/esm/data/auth-state.js +24 -0
  97. package/dist/esm/data/breakpoint-state.js +26 -0
  98. package/dist/esm/data/errorMiddleware.js +2 -2
  99. package/dist/esm/data/listenerMiddleware.js +5 -3
  100. package/dist/esm/data/logout-actions.js +8 -0
  101. package/dist/esm/data/navigation-prompt-actions.js +8 -0
  102. package/dist/esm/data/queryMiddleware.js +3 -1
  103. package/dist/esm/data/reducers.js +4 -4
  104. package/dist/esm/data/store.js +12 -8
  105. package/dist/esm/data/wait-message-state.js +26 -0
  106. package/dist/esm/index.js +11 -37
  107. package/dist/esm/sideeffect/auth/index.js +4 -8
  108. package/dist/esm/sideeffect/error-toast/index.js +2 -2
  109. package/dist/esm/sideeffect/wait-message/index.js +3 -3
  110. package/dist/esm/utils/auth/helper.js +1 -1
  111. package/dist/esm/utils/auth/index.js +2 -2
  112. package/dist/esm/utils/font-size.js +1 -1
  113. package/dist/esm/utils/micro-frontend/guest.js +8 -7
  114. package/dist/esm/utils/micro-frontend/host.js +6 -4
  115. package/dist/esm/utils/micro-frontend/index.js +14 -4
  116. package/dist/esm/utils/session.js +13 -1
  117. package/dist/esm/utils/storybook/main.js +33 -0
  118. package/dist/esm/utils/storybook/manager.js +2 -2
  119. package/dist/esm/utils/storybook/middleware.js +7 -0
  120. package/dist/esm/utils/storybook/preview.js +10 -5
  121. package/dist/esm/utils/storybook/theme.js +5 -8
  122. package/dist/esm/utils/storybook/vite.js +13 -0
  123. package/dist/esm/utils/storybook/webpack.js +22 -0
  124. package/dist/esm/utils/testing/index.js +1 -1
  125. package/dist/esm/utils/testing/render-with-redux.js +1 -5
  126. package/dist/esm/utils/testing/render-with-router-redux.js +1 -2
  127. package/dist/esm/utils/url.js +2 -0
  128. package/dist/esm/utils/window.js +1 -1
  129. package/dist/esm/view/app-root/hosted-app.js +1 -1
  130. package/dist/esm/view/app-root/index.js +2 -0
  131. package/dist/esm/view/app-root/stand-alone-app.js +1 -1
  132. package/dist/esm/view/app-root/style.js +1 -1
  133. package/dist/esm/view/app-root/use-prefetch-resources.js +15 -0
  134. package/dist/esm/view/breakpoint/use-breakpoint.js +7 -4
  135. package/dist/esm/view/error-boundary/index.js +1 -1
  136. package/dist/esm/view/error-toast/index.js +3 -3
  137. package/dist/esm/view/fields/autocomplete/index.js +4 -1
  138. package/dist/esm/view/fields/combo-box-v3/index.js +1 -1
  139. package/dist/esm/view/form/personal-info-section.js +5 -7
  140. package/dist/esm/view/login/index.js +2 -2
  141. package/dist/esm/view/micro-app/app-factory/index.js +21 -9
  142. package/dist/esm/view/micro-app/resources/script.js +17 -9
  143. package/dist/esm/view/micro-app/resources/style.js +15 -2
  144. package/dist/esm/view/micro-app/use-app-will-render.js +1 -1
  145. package/dist/esm/view/micro-iframe-app/iframe/index.js +0 -1
  146. package/dist/esm/view/modals/navigation-prompt/index.js +1 -1
  147. package/dist/esm/view/modals/session-expiry/index.js +1 -1
  148. package/dist/esm/view/require-auth.js +1 -1
  149. package/dist/esm/view/session-timeout/index.js +1 -1
  150. package/dist/esm/view/storybook/decorator.js +1 -1
  151. package/dist/esm/view/use-window-size-change.js +1 -1
  152. package/dist/esm/view/visually-hidden/index.js +1 -0
  153. package/dist/esm/view/wait-message/index.js +1 -1
  154. package/dist/esm/view/wait-message/wait-message-launcher.js +1 -1
  155. package/dist/types/docusaurus.config.d.ts +2 -0
  156. package/dist/types/lib/api/helpers.d.ts +1 -1
  157. package/dist/types/lib/communication/http-client/response-interceptor.d.ts +1 -3
  158. package/dist/types/lib/communication/http-client/retry-axios.d.ts +5 -5
  159. package/dist/types/lib/data/appMiddleware.d.ts +2 -2
  160. package/dist/types/lib/data/auth-state.d.ts +28 -0
  161. package/dist/types/lib/data/breakpoint-state.d.ts +15 -0
  162. package/dist/types/lib/data/{error/index.d.ts → error-state.d.ts} +5 -1
  163. package/dist/types/lib/data/listenerMiddleware.d.ts +38 -17
  164. package/dist/types/lib/data/{live-message/index.d.ts → live-message-state.d.ts} +5 -1
  165. package/dist/types/lib/data/logout-actions.d.ts +4 -0
  166. package/dist/types/lib/data/navigation-prompt-actions.d.ts +4 -0
  167. package/dist/types/lib/data/reducers.d.ts +12 -15
  168. package/dist/types/lib/data/saga.d.ts +3 -5
  169. package/dist/types/lib/data/store.d.ts +31 -38
  170. package/dist/types/lib/data/types.d.ts +6 -6
  171. package/dist/types/lib/data/wait-message-state.d.ts +17 -0
  172. package/dist/types/lib/index.d.ts +6 -16
  173. package/dist/types/lib/sideeffect/auth/index.d.ts +1 -1
  174. package/dist/types/lib/utils/app-config/config.d.ts +1 -3
  175. package/dist/types/lib/utils/app-host-integration/react.d.ts +2 -2
  176. package/dist/types/lib/utils/guest-with-service.d.ts +1 -3
  177. package/dist/types/lib/utils/micro-frontend/host.d.ts +4 -4
  178. package/dist/types/lib/utils/micro-frontend/index.d.ts +1 -0
  179. package/dist/types/lib/utils/micro-frontend/types.d.ts +5 -4
  180. package/dist/types/lib/utils/session.d.ts +3 -9
  181. package/dist/types/lib/utils/storybook/main.d.ts +2 -0
  182. package/dist/types/lib/utils/storybook/manager.d.ts +2 -1
  183. package/dist/types/lib/utils/storybook/middleware.d.ts +1 -0
  184. package/dist/types/lib/utils/storybook/preview.d.ts +5 -29
  185. package/dist/types/lib/utils/storybook/theme.d.ts +2 -5
  186. package/dist/types/lib/utils/storybook/vite.d.ts +10 -0
  187. package/dist/types/lib/utils/storybook/webpack.d.ts +17 -0
  188. package/dist/types/lib/utils/testing/render-with-redux.d.ts +15 -19
  189. package/dist/types/lib/utils/testing/render-with-router-redux.d.ts +14 -18
  190. package/dist/types/lib/utils/testing/render-with-router.d.ts +1 -1
  191. package/dist/types/lib/utils/testing/render-with-state-addons.d.ts +2 -2
  192. package/dist/types/lib/utils/url.d.ts +1 -0
  193. package/dist/types/lib/utils/window.d.ts +1 -3
  194. package/dist/types/lib/view/app-root/hosted-app.d.ts +2 -2
  195. package/dist/types/lib/view/app-root/index.d.ts +2 -2
  196. package/dist/types/lib/view/app-root/stand-alone-app.d.ts +2 -2
  197. package/dist/types/lib/view/app-root/use-prefetch-resources.d.ts +1 -0
  198. package/dist/types/lib/view/breakpoint/index.stories.d.ts +6 -3
  199. package/dist/types/lib/view/breakpoint/use-media-query-list.d.ts +1 -1
  200. package/dist/types/lib/view/error-toast/index.d.ts +1 -4
  201. package/dist/types/lib/view/error-toast/index.stories.d.ts +12 -5
  202. package/dist/types/lib/view/fields/autocomplete/advanced-autocomplete.stories.d.ts +6 -5
  203. package/dist/types/lib/view/fields/autocomplete/async-suggestions-autocomplete.stories.d.ts +6 -5
  204. package/dist/types/lib/view/fields/autocomplete/index.stories.d.ts +6 -5
  205. package/dist/types/lib/view/fields/check-box/index.stories.d.ts +8 -5
  206. package/dist/types/lib/view/fields/check-box/set-value.stories.d.ts +8 -5
  207. package/dist/types/lib/view/fields/combo-box-v3/index.stories.d.ts +8 -5
  208. package/dist/types/lib/view/fields/connect-form.d.ts +2 -2
  209. package/dist/types/lib/view/fields/date-range-picker/index.d.ts +2 -2
  210. package/dist/types/lib/view/fields/date-range-picker/index.stories.d.ts +8 -7
  211. package/dist/types/lib/view/fields/date-time-picker/index.stories.d.ts +19 -39
  212. package/dist/types/lib/view/fields/form-layout-block-item/index.stories.d.ts +8 -4
  213. package/dist/types/lib/view/fields/input-text/index.stories.d.ts +8 -10
  214. package/dist/types/lib/view/fields/masked-input-text/index.d.ts +2 -2
  215. package/dist/types/lib/view/fields/masked-input-text/index.stories.d.ts +10 -0
  216. package/dist/types/lib/view/fields/toggle/index.stories.d.ts +6 -10
  217. package/dist/types/lib/view/fields/watch-value.d.ts +2 -2
  218. package/dist/types/lib/view/form/index.d.ts +2 -2
  219. package/dist/types/lib/view/form/index.stories.d.ts +7 -3
  220. package/dist/types/lib/view/form/personal-info-section.d.ts +0 -1
  221. package/dist/types/lib/view/form/submit-button/index.d.ts +2 -2
  222. package/dist/types/lib/view/form/usecases.stories.d.ts +9 -12
  223. package/dist/types/lib/view/live-message/index.stories.d.ts +5 -3
  224. package/dist/types/lib/view/micro-app/app-factory/index.d.ts +1 -0
  225. package/dist/types/lib/view/micro-app/resources/manifest.d.ts +1 -1
  226. package/dist/types/lib/view/micro-app/resources/script.d.ts +4 -0
  227. package/dist/types/lib/view/micro-app/resources/style.d.ts +4 -0
  228. package/dist/types/lib/view/micro-app/types.d.ts +2 -2
  229. package/dist/types/lib/view/micro-app/utils.d.ts +2 -2
  230. package/dist/types/lib/view/micro-iframe-app/iframe/index.d.ts +2 -2
  231. package/dist/types/lib/view/modals/error/index.stories.d.ts +9 -6
  232. package/dist/types/lib/view/modals/navigation-prompt/index.stories.d.ts +9 -10
  233. package/dist/types/lib/view/modals/session-expiry/index.stories.d.ts +10 -6
  234. package/dist/types/lib/view/session-timeout/index.stories.d.ts +8 -4
  235. package/dist/types/lib/view/storybook/decorator.d.ts +1 -1
  236. package/dist/types/lib/view/visually-hidden/index.d.ts +1 -0
  237. package/dist/types/lib/view/wait-message/index.stories.d.ts +8 -8
  238. package/package.json +52 -50
  239. package/dist/cjs/data/auth/reducer.js +0 -49
  240. package/dist/cjs/data/wait-message/reducer.js +0 -51
  241. package/dist/cjs/utils/storybook/cjs/main.js +0 -58
  242. package/dist/cjs/utils/storybook/cjs/middleware.js +0 -6
  243. package/dist/cjs/utils/storybook/cjs/vite.js +0 -8
  244. package/dist/cjs/utils/storybook/cjs/webpack.js +0 -20
  245. package/dist/cjs/view/fields/combo-box/index.js +0 -50
  246. package/dist/cjs/view/fields/date-picker/index.js +0 -50
  247. package/dist/cjs/view/fields/form-item-layout/index.js +0 -43
  248. package/dist/cjs/view/fields/input-mask/index.js +0 -60
  249. package/dist/cjs/view/fields/radio/index.js +0 -48
  250. package/dist/cjs/view/fields/radio-group/index.js +0 -40
  251. package/dist/cjs/view/fields/text-box/index.js +0 -40
  252. package/dist/esm/data/auth/actions.js +0 -31
  253. package/dist/esm/data/auth/reducer.js +0 -19
  254. package/dist/esm/data/breakpoint/index.js +0 -28
  255. package/dist/esm/data/logout/actions.js +0 -18
  256. package/dist/esm/data/navigation-prompt/actions.js +0 -18
  257. package/dist/esm/data/wait-message/actions.js +0 -18
  258. package/dist/esm/data/wait-message/reducer.js +0 -21
  259. package/dist/esm/view/fields/combo-box/index.js +0 -32
  260. package/dist/esm/view/fields/date-input/index.js +0 -22
  261. package/dist/esm/view/fields/date-picker/index.js +0 -22
  262. package/dist/esm/view/fields/form-item-layout/index.js +0 -23
  263. package/dist/esm/view/fields/input-mask/index.js +0 -42
  264. package/dist/esm/view/fields/large-text-box/index.js +0 -22
  265. package/dist/esm/view/fields/radio/index.js +0 -30
  266. package/dist/esm/view/fields/radio-group/index.js +0 -22
  267. package/dist/esm/view/fields/text-box/index.js +0 -22
  268. package/dist/types/lib/data/auth/actions.d.ts +0 -22
  269. package/dist/types/lib/data/auth/reducer.d.ts +0 -6
  270. package/dist/types/lib/data/breakpoint/index.d.ts +0 -13
  271. package/dist/types/lib/data/logout/actions.d.ts +0 -9
  272. package/dist/types/lib/data/navigation-prompt/actions.d.ts +0 -9
  273. package/dist/types/lib/data/wait-message/actions.d.ts +0 -14
  274. package/dist/types/lib/data/wait-message/reducer.d.ts +0 -7
  275. package/dist/types/lib/utils/storybook/cjs/main.d.ts +0 -66
  276. package/dist/types/lib/utils/storybook/cjs/middleware.d.ts +0 -2
  277. package/dist/types/lib/utils/storybook/cjs/vite.d.ts +0 -5
  278. package/dist/types/lib/utils/storybook/cjs/webpack.d.ts +0 -17
  279. package/dist/types/lib/view/fields/combo-box/index.d.ts +0 -8
  280. package/dist/types/lib/view/fields/combo-box/index.stories.d.ts +0 -5
  281. package/dist/types/lib/view/fields/date-input/index.d.ts +0 -8
  282. package/dist/types/lib/view/fields/date-input/index.stories.d.ts +0 -7
  283. package/dist/types/lib/view/fields/date-picker/index.d.ts +0 -9
  284. package/dist/types/lib/view/fields/date-picker/index.stories.d.ts +0 -5
  285. package/dist/types/lib/view/fields/form-item-layout/index.d.ts +0 -9
  286. package/dist/types/lib/view/fields/form-item-layout/index.stories.d.ts +0 -5
  287. package/dist/types/lib/view/fields/input-mask/index.d.ts +0 -15
  288. package/dist/types/lib/view/fields/input-mask/index.stories.d.ts +0 -5
  289. package/dist/types/lib/view/fields/large-text-box/index.d.ts +0 -9
  290. package/dist/types/lib/view/fields/large-text-box/index.stories.d.ts +0 -5
  291. package/dist/types/lib/view/fields/masked-input-text/with-money-mask.stories.d.ts +0 -11
  292. package/dist/types/lib/view/fields/masked-input-text/with-percentage-mask.stories.d.ts +0 -11
  293. package/dist/types/lib/view/fields/radio/index.d.ts +0 -9
  294. package/dist/types/lib/view/fields/radio/index.stories.d.ts +0 -5
  295. package/dist/types/lib/view/fields/radio/set-value.stories.d.ts +0 -5
  296. package/dist/types/lib/view/fields/radio-group/index.d.ts +0 -8
  297. package/dist/types/lib/view/fields/radio-group/index.stories.d.ts +0 -5
  298. package/dist/types/lib/view/fields/text-box/index.d.ts +0 -8
  299. package/dist/types/lib/view/fields/text-box/index.stories.d.ts +0 -7
  300. /package/dist/esm/data/{error/index.js → error-state.js} +0 -0
  301. /package/dist/esm/data/{live-message/index.js → live-message-state.js} +0 -0
  302. /package/dist/types/lib/api/users/{index.endpoint.d.ts → index.endpoint.d.cts} +0 -0
  303. /package/dist/types/lib/communication/http-client/tests/{hello.endpoint.d.ts → hello.endpoint.d.cts} +0 -0
  304. /package/dist/types/lib/communication/http-client/tests/{private.endpoint.d.ts → private.endpoint.d.cts} +0 -0
@@ -5,14 +5,18 @@ import createSagaMiddleware from "redux-saga";
5
5
  import { createReducer } from "./reducers.js";
6
6
  import { enableHotReloading } from "./webpack-hmr.js";
7
7
  import { queryMiddleware } from "./queryMiddleware.js";
8
- import { listenerMiddleware } from "./listenerMiddleware.js";
8
+ import { getListenerMiddleware } from "./listenerMiddleware.js";
9
9
  const rootReducer = createReducer();
10
10
  let appStore = null;
11
11
  const setStore = (store) => {
12
12
  appStore = store;
13
13
  };
14
14
  const getStore = () => appStore;
15
- const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {}) => {
15
+ const createStore = ({
16
+ initialState,
17
+ sagaMiddleware,
18
+ middlewareConfig
19
+ }) => {
16
20
  const { run: runSaga } = sagaMiddleware;
17
21
  const enhancers = [
18
22
  createInjectorsEnhancer({
@@ -22,23 +26,23 @@ const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {
22
26
  ];
23
27
  const baseStore = configureStore({
24
28
  reducer: rootReducer,
25
- middleware: (getDefaultMiddleware) => getDefaultMiddleware(middlewareConfig).prepend(listenerMiddleware.middleware).concat([sagaMiddleware, queryMiddleware]),
29
+ middleware: (getDefaultMiddleware) => getDefaultMiddleware(middlewareConfig).prepend(getListenerMiddleware()).concat([sagaMiddleware, queryMiddleware]),
26
30
  devTools: true,
27
31
  preloadedState: initialState,
28
- enhancers
32
+ enhancers: (getDefaultEnhancers) => getDefaultEnhancers().concat(enhancers)
29
33
  });
30
34
  setupListeners(baseStore.dispatch);
31
35
  enableHotReloading(baseStore);
32
36
  return baseStore;
33
37
  };
34
- const createAppStore = (initialState = {}, history, middlewareConfig) => {
38
+ const createAppStore = (options = {}) => {
39
+ const { initialState = {}, middlewareConfig } = options;
35
40
  const sagaMiddleware = createSagaMiddleware({});
36
- const store = createStore(
41
+ const store = createStore({
37
42
  initialState,
38
43
  sagaMiddleware,
39
- history,
40
44
  middlewareConfig
41
- );
45
+ });
42
46
  setStore(store);
43
47
  return store;
44
48
  };
@@ -0,0 +1,26 @@
1
+ import { createSlice } from "@reduxjs/toolkit";
2
+ const LOADING_MSG = "loading...";
3
+ const initialState = {
4
+ isOpen: null,
5
+ message: LOADING_MSG
6
+ };
7
+ const waitMessageSlice = createSlice({
8
+ name: "waitMessage",
9
+ initialState,
10
+ reducers: {
11
+ open: (state, action) => {
12
+ state.isOpen = true;
13
+ state.message = action.payload ?? LOADING_MSG;
14
+ },
15
+ close: (state) => {
16
+ state.isOpen = false;
17
+ }
18
+ }
19
+ });
20
+ const { actions } = waitMessageSlice;
21
+ const waitMessageReducer = waitMessageSlice.reducer;
22
+ export {
23
+ actions,
24
+ initialState,
25
+ waitMessageReducer
26
+ };
package/dist/esm/index.js CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  } from "./communication/http-client/index.js";
6
6
  import { sdkBaseQuery } from "./communication/http-client/baseQuery.js";
7
7
  import { onAuthorizationFailure } from "./communication/http-client/response-interceptor.js";
8
- import { auth } from "./data/auth/actions.js";
8
+ import { actions } from "./data/auth-state.js";
9
9
  import { RequireAuth } from "./view/require-auth.js";
10
10
  import { authentication } from "./sideeffect/auth/index.js";
11
- import { authReducer } from "./data/auth/reducer.js";
11
+ import { authReducer } from "./data/auth-state.js";
12
12
  import { Page } from "./view/page.js";
13
13
  import { default as default2 } from "./utils/constants.js";
14
14
  import {
@@ -35,7 +35,6 @@ import { getRedirectUrl, removeDoubleSlash } from "./utils/url.js";
35
35
  import { createAppStore } from "./data/store.js";
36
36
  import { browserHistory, memoryHistory } from "./utils/history.js";
37
37
  import { Themes } from "./utils/constants.js";
38
- import { ACTIONS } from "./data/navigation-prompt/actions.js";
39
38
  import { loadable } from "./view/loadable/index.js";
40
39
  import { WaitMessage } from "./view/wait-message/index.js";
41
40
  import { SessionTimeout } from "./view/session-timeout/index.js";
@@ -46,7 +45,7 @@ import {
46
45
  resetUserIdleTime,
47
46
  trackActivity
48
47
  } from "./utils/session.js";
49
- import { waitMessage } from "./data/wait-message/actions.js";
48
+ import { actions as actions2 } from "./data/wait-message-state.js";
50
49
  import { initServiceWorker } from "./utils/service-worker.js";
51
50
  import { CMicroAppGuest } from "./utils/micro-frontend/guest.js";
52
51
  import { CMicroAppHost } from "./utils/micro-frontend/host.js";
@@ -91,24 +90,11 @@ import { ErrorToast } from "./view/error-toast/index.js";
91
90
  import { NavigationPrompt } from "./view/modals/navigation-prompt/index.js";
92
91
  import { Form } from "./view/form/index.js";
93
92
  import { ConnectForm } from "./view/fields/connect-form.js";
94
- import { FormItemLayout } from "./view/fields/form-item-layout/index.js";
95
93
  import { FormLayoutBlockItem } from "./view/fields/form-layout-block-item/index.js";
96
- import { TextBox } from "./view/fields/text-box/index.js";
97
94
  import { InputText } from "./view/fields/input-text/index.js";
98
- import { LargeTextBox } from "./view/fields/large-text-box/index.js";
99
- import {
100
- InputMask,
101
- MASK_TYPES,
102
- MASK_PIPES
103
- } from "./view/fields/input-mask/index.js";
104
95
  import { MaskedInputText } from "./view/fields/masked-input-text/index.js";
105
- import { ComboBox } from "./view/fields/combo-box/index.js";
106
96
  import { ComboBoxV3 } from "./view/fields/combo-box-v3/index.js";
107
97
  import { CheckBox } from "./view/fields/check-box/index.js";
108
- import { Radio } from "./view/fields/radio/index.js";
109
- import { RadioGroup } from "./view/fields/radio-group/index.js";
110
- import { DateInput } from "./view/fields/date-input/index.js";
111
- import { DatePicker } from "./view/fields/date-picker/index.js";
112
98
  import { DateTimePicker } from "./view/fields/date-time-picker/index.js";
113
99
  import { DateRangePicker } from "./view/fields/date-range-picker/index.js";
114
100
  import { Autocomplete } from "./view/fields/autocomplete/index.js";
@@ -116,9 +102,9 @@ import { Toggle } from "./view/fields/toggle/index.js";
116
102
  import { FormSubmitButton } from "./view/form/submit-button/index.js";
117
103
  import { useMediaQueryList } from "./view/breakpoint/use-media-query-list.js";
118
104
  import { VisuallyHidden } from "./view/visually-hidden/index.js";
119
- import { actions } from "./data/live-message/index.js";
120
- import { actions as actions2 } from "./data/error/index.js";
121
- import { actions as actions3 } from "./data/logout/actions.js";
105
+ import { actions as actions3 } from "./data/live-message-state.js";
106
+ import { actions as actions4 } from "./data/error-state.js";
107
+ import { logout } from "./data/logout-actions.js";
122
108
  import { MicroApp } from "./view/micro-app/index.js";
123
109
  import { MicroIFrameApp } from "./view/micro-iframe-app/index.js";
124
110
  import { getNavigationLinks } from "./view/micro-app/utils.js";
@@ -134,43 +120,31 @@ export {
134
120
  CMicroAppGuest,
135
121
  CMicroAppHost,
136
122
  CheckBox,
137
- ComboBox,
138
123
  ComboBoxV3,
139
124
  ConnectForm,
140
- DateInput,
141
- DatePicker,
142
125
  DateRangePicker,
143
126
  DateTimePicker,
144
127
  ErrorBoundary,
145
128
  ErrorToast,
146
129
  Form,
147
- FormItemLayout,
148
130
  FormLayoutBlockItem,
149
131
  FormSubmitButton,
150
- InputMask,
151
132
  InputText,
152
- LargeTextBox,
153
- MASK_PIPES,
154
- MASK_TYPES,
155
133
  MaskedInputText,
156
134
  MicroApp,
157
135
  MicroIFrameApp,
158
136
  NavigationPrompt,
159
- ACTIONS as NavigationPromptActions,
160
137
  Page,
161
- Radio,
162
- RadioGroup,
163
138
  RegisterService,
164
139
  RenderWithStateAddOns,
165
140
  RequireAuth,
166
141
  SessionTimeout,
167
- TextBox,
168
142
  Themes,
169
143
  Toggle,
170
144
  VisuallyHidden,
171
145
  WaitMessage,
172
- actions as ariaLive,
173
- auth,
146
+ actions3 as ariaLive,
147
+ actions as auth,
174
148
  authReducer,
175
149
  authentication as authSaga,
176
150
  authorize,
@@ -179,7 +153,7 @@ export {
179
153
  createManager,
180
154
  createSideEffect,
181
155
  enableReactAppForHostIntegration,
182
- actions2 as error,
156
+ actions4 as error,
183
157
  errorMiddleware,
184
158
  fetchHostAppData,
185
159
  getUser as fetchUserSettings,
@@ -205,7 +179,7 @@ export {
205
179
  loadAppConfig,
206
180
  loadable,
207
181
  login,
208
- actions3 as logout,
182
+ logout,
209
183
  memoryHistory,
210
184
  notifyGuestUnloadComplete,
211
185
  onAuthorizationFailure,
@@ -240,6 +214,6 @@ export {
240
214
  useInjectSaga,
241
215
  useInjectSideEffect,
242
216
  useMediaQueryList,
243
- waitMessage as waitMessageAction,
217
+ actions2 as waitMessageAction,
244
218
  withAppDecorator
245
219
  };
@@ -3,20 +3,16 @@ import {
3
3
  put,
4
4
  takeLatest
5
5
  } from "redux-saga/effects";
6
- import {
7
- LOGIN,
8
- LOGOUT,
9
- LOGIN_SUCCESS
10
- } from "../../data/auth/actions.js";
11
6
  import { authorize, endSession } from "../../utils/auth/index.js";
12
7
  import { getLogger } from "../../utils/micro-frontend/index.js";
13
8
  import { logRecords } from "../../utils/log-records.js";
9
+ import { actions } from "../../data/auth-state.js";
14
10
  function* login({
15
11
  payload
16
12
  }) {
17
13
  try {
18
14
  yield call(authorize, payload);
19
- yield put({ type: LOGIN_SUCCESS });
15
+ yield put({ type: actions.loginSuccess.type });
20
16
  } catch (err) {
21
17
  getLogger().error({
22
18
  ...logRecords.LOGIN_FAILED,
@@ -37,8 +33,8 @@ function* logout({
37
33
  }
38
34
  }
39
35
  function* authentication() {
40
- yield takeLatest(LOGIN, login);
41
- yield takeLatest(LOGOUT, logout);
36
+ yield takeLatest(actions.login.type, login);
37
+ yield takeLatest(actions.logout.type, logout);
42
38
  }
43
39
  export {
44
40
  authentication,
@@ -1,5 +1,5 @@
1
1
  import { call, takeLatest } from "redux-saga/effects";
2
- import { actions } from "../../data/error/index.js";
2
+ import { actions } from "../../data/error-state.js";
3
3
  import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
4
4
  import { getLogger } from "../../utils/micro-frontend/index.js";
5
5
  import { logRecords } from "../../utils/log-records.js";
@@ -9,7 +9,7 @@ function* openErrorToast(action) {
9
9
  CMicroAppGuest.getInstance.bind(CMicroAppGuest)
10
10
  );
11
11
  const host = yield call(microApp.getHost.bind(microApp));
12
- const message = action?.payload?.description || action?.payload?.messageText;
12
+ const message = action?.payload?.description ?? action?.payload?.messageText;
13
13
  if (host && message)
14
14
  yield call(host.openErrorBanner.bind(host), message);
15
15
  } catch (ex) {
@@ -1,5 +1,5 @@
1
1
  import { call, takeLatest } from "redux-saga/effects";
2
- import { ACTIONS } from "../../data/wait-message/actions.js";
2
+ import { actions } from "../../data/wait-message-state.js";
3
3
  import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
4
4
  import { getLogger } from "../../utils/micro-frontend/index.js";
5
5
  import { logRecords } from "../../utils/log-records.js";
@@ -34,8 +34,8 @@ function* closeWaitMessage() {
34
34
  }
35
35
  }
36
36
  function* waitMessage() {
37
- yield takeLatest(ACTIONS.OPEN, openWaitMessage);
38
- yield takeLatest(ACTIONS.CLOSE, closeWaitMessage);
37
+ yield takeLatest(actions.open.type, openWaitMessage);
38
+ yield takeLatest(actions.close.type, closeWaitMessage);
39
39
  }
40
40
  export {
41
41
  waitMessage
@@ -1,5 +1,5 @@
1
1
  import enums from "../constants.js";
2
- const getAuthorizationHeader = () => sessionStorage.getItem(enums.AUTHORIZATION) || "";
2
+ const getAuthorizationHeader = () => sessionStorage.getItem(enums.AUTHORIZATION) ?? "";
3
3
  const setAuthorizationHeader = (token) => {
4
4
  sessionStorage.setItem(enums.AUTHORIZATION, token);
5
5
  };
@@ -15,8 +15,8 @@ const IDP_ENDPOINT_CONFIG_KEY = "serviceEndpoints.idp";
15
15
  const isUserAuthorized = () => !!getAuthorizationHeader();
16
16
  const getIDPInfoFromUrl = () => {
17
17
  const currentUrl = new URL(window.location.href);
18
- const idpCode = currentUrl.searchParams.get("code") || "";
19
- const idpErrorCode = currentUrl.searchParams.get("error_code") || "";
18
+ const idpCode = currentUrl.searchParams.get("code") ?? "";
19
+ const idpErrorCode = currentUrl.searchParams.get("error_code") ?? "";
20
20
  currentUrl.search = "";
21
21
  return { idpCode, idpErrorCode, redirectUri: currentUrl.href };
22
22
  };
@@ -1,4 +1,4 @@
1
- const docFontSize = document && document.documentElement ? getComputedStyle(document.documentElement).fontSize : "16";
1
+ const docFontSize = document?.documentElement ? getComputedStyle(document.documentElement).fontSize : "16";
2
2
  const remToPx = (rem) => rem * parseFloat(docFontSize);
3
3
  const pxToRem = (px) => `${px / parseFloat(docFontSize)}rem`;
4
4
  export {
@@ -29,16 +29,16 @@ class CMicroAppGuest {
29
29
  onGetRef;
30
30
  constructor(params) {
31
31
  this.containerId = "app-container";
32
- this.appId = window.emui?.appId || getAppConfigValue("appId");
32
+ this.appId = window.emui?.appId ?? getAppConfigValue("appId");
33
33
  this.props = {
34
34
  host: null,
35
35
  hostUrl: null,
36
36
  prevState: null,
37
- history: params?.history || browserHistory,
37
+ history: params?.history ?? browserHistory,
38
38
  theme: getDefaultTheme(),
39
39
  manifestPath: "./latest"
40
40
  };
41
- this.logger = params?.logger || logger;
41
+ this.logger = params?.logger ?? logger;
42
42
  this.onInit = params?.onInit;
43
43
  this.onMount = params?.onMount;
44
44
  this.onUnmount = params?.onUnmount;
@@ -88,7 +88,7 @@ class CMicroAppGuest {
88
88
  let host = null;
89
89
  if (window.parent !== window) {
90
90
  if (!isCrossDomain()) {
91
- host = window.parent?.emui?.MicroAppHost || null;
91
+ host = window.parent?.emui?.MicroAppHost ?? null;
92
92
  }
93
93
  if (!host) {
94
94
  const ssfAdapter = new SSFGuestAdapter();
@@ -101,7 +101,7 @@ class CMicroAppGuest {
101
101
  }
102
102
  async init(options) {
103
103
  this.props = _.merge(this.props, options);
104
- this.props.history = options?.history || this.props.history;
104
+ this.props.history = options?.history ?? this.props.history;
105
105
  if (!this.props.host) {
106
106
  const host = await this.getSSFAdapter();
107
107
  if (host)
@@ -109,8 +109,8 @@ class CMicroAppGuest {
109
109
  }
110
110
  __webpack_public_path__ = __webpack_public_path__.replace(/\/?$/, "/");
111
111
  return loadAppConfig().then(() => {
112
- const instanceId = this.getSessionStorageItem("instanceId") || "";
113
- const userId = this.getSessionStorageItem("userId") || "";
112
+ const instanceId = this.getSessionStorageItem("instanceId") ?? "";
113
+ const userId = this.getSessionStorageItem("userId") ?? "";
114
114
  updateBAEventParameters({ appId: this.appId, instanceId, userId });
115
115
  setAppDynamicsUserData({ appId: this.appId, instanceId, userId });
116
116
  if (this.onInit)
@@ -133,6 +133,7 @@ class CMicroAppGuest {
133
133
  getRef() {
134
134
  return this.onGetRef ? this.onGetRef() : null;
135
135
  }
136
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
136
137
  navigate(url, state) {
137
138
  if (url)
138
139
  this.props.history.push(url, state);
@@ -1,9 +1,9 @@
1
1
  import { publish, subscribe, unsubscribe } from "pubsub-js";
2
2
  import { getDefaultTheme } from "@elliemae/pui-theme";
3
3
  import { getStore } from "../../data/store.js";
4
- import { waitMessage } from "../../data/wait-message/actions.js";
5
- import { actions as error } from "../../data/error/index.js";
6
- import { logout } from "../../data/logout/actions.js";
4
+ import { actions as waitMessage } from "../../data/wait-message-state.js";
5
+ import { actions as error } from "../../data/error-state.js";
6
+ import { logout } from "../../data/logout-actions.js";
7
7
  import { getAppConfigValue } from "../app-config/config.js";
8
8
  import { resetUserIdleTime } from "../session.js";
9
9
  import { loadAppConfig } from "../app-config/index.js";
@@ -29,11 +29,12 @@ class CMicroAppHost {
29
29
  activeGuests;
30
30
  onInit;
31
31
  onRenewSessionTimer;
32
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
33
  scriptingObjects;
33
34
  constructor(params) {
34
35
  this.appId = getAppConfigValue("appId");
35
36
  this.onInit = params?.onInit;
36
- this.logger = params?.logger || logger;
37
+ this.logger = params?.logger ?? logger;
37
38
  this.onRenewSessionTimer = params?.onRenewSessionTimer;
38
39
  this.props = {
39
40
  systemVersion: params?.version ?? "latest",
@@ -96,6 +97,7 @@ class CMicroAppHost {
96
97
  unsubscribe(token) {
97
98
  unsubscribe(token);
98
99
  }
100
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
99
101
  navigate(url, state) {
100
102
  if (url)
101
103
  this.props.history.push(url, state);
@@ -17,10 +17,7 @@ const isProduction = (mode) => {
17
17
  const getVersionedPath = (path) => {
18
18
  const { systemVersion } = CMicroAppHost.getInstance().getProps();
19
19
  const majorMinorVersion = systemVersion.match(/^(?:\d+\.\d+)*/g);
20
- return path.replace(
21
- /{SYSTEM_VERSION}/,
22
- majorMinorVersion && majorMinorVersion[0] || "latest"
23
- );
20
+ return path.replace(/{SYSTEM_VERSION}/, majorMinorVersion?.[0] ?? "latest");
24
21
  };
25
22
  const getMicroFrontEndAppConfig = (appInfo) => {
26
23
  const microFEAppConfig = getAppConfigValue(
@@ -52,9 +49,22 @@ const getMicroFrontEndAppConfig = (appInfo) => {
52
49
  microFEConfig.manifestPath = getVersionedPath(microFEConfig.manifestPath);
53
50
  return microFEConfig;
54
51
  };
52
+ const getPrefetchableAppConfig = () => {
53
+ const microFEs = getAppConfigValue("microFrontendApps");
54
+ if (!microFEs)
55
+ return [];
56
+ return Object.keys(microFEs).reduce((acc, microFEId) => {
57
+ const { prefetch = false } = microFEs[microFEId];
58
+ if (prefetch) {
59
+ acc.push(getMicroFrontEndAppConfig({ id: microFEId }));
60
+ }
61
+ return acc;
62
+ }, []);
63
+ };
55
64
  export {
56
65
  getLogger,
57
66
  getMicroFrontEndAppConfig,
67
+ getPrefetchableAppConfig,
58
68
  isGuest,
59
69
  isHost,
60
70
  isStandAloneGuest
@@ -10,6 +10,7 @@ const userInteractionEvents = ["click", "scroll", "keypress", "touchstart"];
10
10
  let sessionExpiryWarningNotified = false;
11
11
  let timerHandle;
12
12
  let sessionExpiryWarningNotifiedAt;
13
+ const pageVisibilityController = new AbortController();
13
14
  const resetUserIdleTime = (resetWarningModal = false) => {
14
15
  sessionExpiryWarningNotified = false;
15
16
  sessionExpiryWarningNotifiedAt = null;
@@ -52,12 +53,14 @@ const stopSessionMonitoring = () => {
52
53
  };
53
54
  const monitorSessionEvents = () => {
54
55
  if (isPastSessionTimeoutTime()) {
56
+ pageVisibilityController.abort();
55
57
  notifySessionExpiry().then(() => {
56
58
  stopSessionMonitoring();
57
59
  }).catch(() => {
58
60
  });
59
- } else if (!sessionExpiryWarningNotified && isPastWarningTime())
61
+ } else if (!sessionExpiryWarningNotified && isPastWarningTime()) {
60
62
  notifySessionExpiryWarning();
63
+ }
61
64
  };
62
65
  const removeListeners = (arr, cb) => {
63
66
  const idx = arr.findIndex((r) => r === cb);
@@ -73,6 +76,15 @@ const addEventListeners = () => {
73
76
  const initSessionMonitoring = () => {
74
77
  addEventListeners();
75
78
  timerHandle = setInterval(monitorSessionEvents, 1e3);
79
+ document.addEventListener(
80
+ "visibilitychange",
81
+ () => {
82
+ if (document.visibilityState === "visible") {
83
+ monitorSessionEvents();
84
+ }
85
+ },
86
+ { signal: pageVisibilityController.signal }
87
+ );
76
88
  };
77
89
  const subscribeToSessionExpiryWarning = (onSessionExpiryWarn) => {
78
90
  warnListeners.push(onSessionExpiryWarn);
@@ -0,0 +1,33 @@
1
+ import mergeWith from "lodash/mergeWith";
2
+ import isArray from "lodash/isArray";
3
+ import { webpackConfig } from "./webpack";
4
+ import { viteConfig } from "./vite";
5
+ const customizer = (objValue, srcValue) => {
6
+ if (isArray(objValue)) {
7
+ return objValue.concat(srcValue);
8
+ }
9
+ };
10
+ const baseConfig = {
11
+ addons: [
12
+ "@storybook/addon-essentials",
13
+ "@storybook/addon-storysource",
14
+ "@storybook/addon-links",
15
+ "@storybook/addon-events",
16
+ "@storybook/addon-interactions",
17
+ "@storybook/addon-a11y"
18
+ ],
19
+ core: {
20
+ disableTelemetry: true
21
+ },
22
+ docs: {
23
+ autodocs: "tag"
24
+ }
25
+ };
26
+ const getConfig = (viteBuilder = false) => {
27
+ const defaultConfig = viteBuilder ? viteConfig : webpackConfig;
28
+ console.log("using", viteBuilder ? "vite" : "webpack", "builder config");
29
+ return mergeWith(baseConfig, defaultConfig, customizer);
30
+ };
31
+ export {
32
+ getConfig
33
+ };
@@ -1,9 +1,9 @@
1
1
  import { addons } from "@storybook/addons";
2
2
  import { createTheme } from "./theme.js";
3
- const initSBManager = (theme) => {
3
+ const initSBManager = ({ base = "light", ...rest }) => {
4
4
  addons.setConfig({
5
5
  panelPosition: "bottom",
6
- theme: createTheme(theme)
6
+ theme: createTheme({ base, ...rest })
7
7
  });
8
8
  };
9
9
  export {
@@ -0,0 +1,7 @@
1
+ import { loadRoutes } from "@elliemae/pui-cli/server/routes";
2
+ const expressMiddleWare = (router) => {
3
+ loadRoutes(router);
4
+ };
5
+ export {
6
+ expressMiddleWare
7
+ };
@@ -3,17 +3,21 @@ import { createAppStore } from "../../data/store.js";
3
3
  import { withAppDecorator } from "../../view/storybook/decorator.js";
4
4
  import { loadAppConfig } from "../app-config/index.js";
5
5
  import { createTheme } from "./theme.js";
6
- import { browserHistory } from "../history.js";
7
6
  import "./preview.css";
8
7
  const theme = getDefaultTheme();
9
- const store = createAppStore({}, browserHistory);
8
+ const store = createAppStore();
10
9
  const appDecorator = withAppDecorator.bind(null, theme, store);
11
10
  const getParameters = (storyBookTheme) => ({
12
11
  layout: "fullscreen",
13
- actions: { argTypesRegex: "^on.*" },
14
- controls: { hideNoControlsWarning: true },
12
+ actions: { argTypesRegex: "^on[A-Z].*" },
13
+ controls: {
14
+ expanded: true,
15
+ matchers: {
16
+ color: /(background|color)$/i,
17
+ date: /Date$/
18
+ }
19
+ },
15
20
  docs: {
16
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
17
21
  theme: createTheme(storyBookTheme)
18
22
  },
19
23
  options: {
@@ -43,6 +47,7 @@ const decorators = [appDecorator];
43
47
  const loaders = [
44
48
  async () => {
45
49
  await loadAppConfig("./");
50
+ return {};
46
51
  }
47
52
  ];
48
53
  export {
@@ -3,14 +3,11 @@ const createTheme = ({
3
3
  base = "light",
4
4
  brandTitle = "Platform UI Components",
5
5
  ...rest
6
- }) => (
7
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
8
- create({
9
- base,
10
- brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION || ""}`,
11
- ...rest
12
- })
13
- );
6
+ }) => create({
7
+ base,
8
+ brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION ?? ""}`,
9
+ ...rest
10
+ });
14
11
  export {
15
12
  createTheme
16
13
  };
@@ -0,0 +1,13 @@
1
+ const viteConfig = {
2
+ stories: ["../@(lib|app)/**/*.stories.@(js|jsx|ts|tsx|mdx)"],
3
+ core: {
4
+ disableTelemetry: true
5
+ },
6
+ framework: {
7
+ name: "@storybook/react-vite",
8
+ options: {}
9
+ }
10
+ };
11
+ export {
12
+ viteConfig
13
+ };
@@ -0,0 +1,22 @@
1
+ import { webpackFinal } from "@elliemae/pui-cli/storybook";
2
+ const webpackConfig = {
3
+ stories: ["../@(lib|app)/**/*.stories.@(js|jsx|ts|tsx|mdx)"],
4
+ addons: [
5
+ {
6
+ name: "storybook-addon-turbo-build",
7
+ options: {
8
+ optimizationLevel: 2,
9
+ esbuildMinifyOptions: { target: "es2020" }
10
+ }
11
+ }
12
+ ],
13
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
14
+ webpackFinal,
15
+ framework: {
16
+ name: "@storybook/react-webpack5",
17
+ options: {}
18
+ }
19
+ };
20
+ export {
21
+ webpackConfig
22
+ };
@@ -4,7 +4,7 @@ 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
- const defaultStore = createAppStore({}, browserHistory);
7
+ const defaultStore = createAppStore();
8
8
  const defaultTheme = getDefaultTheme();
9
9
  const AllTheProviders = ({
10
10
  store = defaultStore,
@@ -2,11 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { render } from "@testing-library/react";
3
3
  import { Provider } from "react-redux";
4
4
  import { createAppStore } from "../../data/store.js";
5
- import { browserHistory } from "../history.js";
6
- const renderWithRedux = (ui, {
7
- initialState,
8
- store = createAppStore(initialState, browserHistory)
9
- } = {}) => ({
5
+ const renderWithRedux = (ui, { initialState, store = createAppStore({ initialState }) } = {}) => ({
10
6
  ...render(/* @__PURE__ */ jsx(Provider, { store, children: ui })),
11
7
  // adding `store` to the returned utilities to allow us
12
8
  // to reference it in our tests (just try to avoid using