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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. package/dist/cjs/analytics/appdynamics.js +34 -30
  2. package/dist/cjs/analytics/index.js +32 -26
  3. package/dist/cjs/analytics/page-view-event.js +34 -30
  4. package/dist/cjs/analytics/user-session-event.js +34 -27
  5. package/dist/cjs/analytics/user-wait-event.js +31 -17
  6. package/dist/cjs/analytics/web-analytics.js +16 -19
  7. package/dist/cjs/api/auth/index.js +41 -39
  8. package/dist/cjs/api/helpers.js +33 -99
  9. package/dist/cjs/api/users/index.js +28 -16
  10. package/dist/cjs/communication/http-client/index.js +44 -48
  11. package/dist/cjs/communication/http-client/request-interceptor.js +28 -12
  12. package/dist/cjs/communication/http-client/response-interceptor.js +41 -38
  13. package/dist/cjs/communication/http-client/retry-axios.js +68 -122
  14. package/dist/cjs/communication/http-client/retry.js +42 -36
  15. package/dist/cjs/communication/http-client/tests/index.test-disable.js +48 -56
  16. package/dist/cjs/data/auth/actions.js +17 -26
  17. package/dist/cjs/data/auth/reducer.js +30 -18
  18. package/dist/cjs/data/breakpoint/index.js +38 -32
  19. package/dist/cjs/data/error/index.js +33 -18
  20. package/dist/cjs/data/index.js +34 -0
  21. package/dist/cjs/data/live-message/index.js +34 -25
  22. package/dist/cjs/data/logout/actions.js +12 -9
  23. package/dist/cjs/data/navigation-prompt/actions.js +12 -9
  24. package/dist/cjs/data/react-redux.js +29 -13
  25. package/dist/cjs/data/reducers.js +35 -23
  26. package/dist/cjs/data/saga.js +12 -9
  27. package/dist/cjs/data/store.js +52 -60
  28. package/dist/cjs/data/wait-message/actions.js +14 -13
  29. package/dist/cjs/data/wait-message/reducer.js +32 -24
  30. package/dist/cjs/index.js +189 -809
  31. package/dist/cjs/micro-frontend.js +33 -0
  32. package/dist/cjs/route/index.js +38 -32
  33. package/dist/cjs/route/page-view.js +30 -22
  34. package/dist/cjs/route/private-route/index.js +53 -60
  35. package/dist/cjs/sideeffect/auth/index.js +42 -30
  36. package/dist/cjs/sideeffect/error-toast/index.js +39 -26
  37. package/dist/cjs/sideeffect/wait-message/index.js +45 -29
  38. package/dist/cjs/typings/custom.d.js +0 -1
  39. package/dist/cjs/typings/elliemae.d.js +0 -1
  40. package/dist/cjs/typings/styled.d.js +19 -3
  41. package/dist/cjs/utils/app-config/config.js +33 -33
  42. package/dist/cjs/utils/app-config/index.js +42 -44
  43. package/dist/cjs/utils/app-host-integration/react.js +27 -14
  44. package/dist/cjs/utils/auth/helper.js +30 -18
  45. package/dist/cjs/utils/auth/index.js +76 -116
  46. package/dist/cjs/utils/await.js +3 -0
  47. package/dist/cjs/utils/constants.js +22 -21
  48. package/dist/cjs/utils/font-size.js +13 -14
  49. package/dist/cjs/utils/guest-with-service.js +11 -12
  50. package/dist/cjs/utils/helpers.js +15 -19
  51. package/dist/cjs/utils/history.js +29 -12
  52. package/dist/cjs/utils/log-records.js +38 -35
  53. package/dist/cjs/utils/micro-frontend/console-logger.js +39 -23
  54. package/dist/cjs/utils/micro-frontend/guest.js +80 -128
  55. package/dist/cjs/utils/micro-frontend/host.js +84 -124
  56. package/dist/cjs/utils/micro-frontend/index.js +60 -61
  57. package/dist/cjs/utils/micro-frontend/types.js +3 -5
  58. package/dist/cjs/utils/redact-pii.js +15 -17
  59. package/dist/cjs/utils/service-worker.js +36 -21
  60. package/dist/cjs/utils/session.js +64 -70
  61. package/dist/cjs/utils/storybook/cjs/main.js +53 -0
  62. package/dist/cjs/utils/storybook/cjs/middleware.js +5 -0
  63. package/dist/cjs/utils/storybook/cjs/vite.js +6 -0
  64. package/dist/cjs/utils/storybook/cjs/webpack.js +21 -0
  65. package/dist/cjs/utils/storybook/manager.js +31 -16
  66. package/dist/cjs/utils/storybook/preview.js +58 -50
  67. package/dist/cjs/utils/storybook/theme.js +30 -14
  68. package/dist/cjs/utils/testing/index.js +39 -50
  69. package/dist/cjs/utils/testing/render-with-redux.js +35 -27
  70. package/dist/cjs/utils/testing/render-with-router-redux.js +41 -37
  71. package/dist/cjs/utils/testing/render-with-router.js +35 -28
  72. package/dist/cjs/utils/testing/render-with-state-addons.js +41 -36
  73. package/dist/cjs/utils/types.js +3 -0
  74. package/dist/cjs/utils/url.js +12 -13
  75. package/dist/cjs/utils/web-storage.js +40 -30
  76. package/dist/cjs/utils/window.js +36 -28
  77. package/dist/cjs/view/app-root/hosted-app.js +36 -32
  78. package/dist/cjs/view/app-root/index.js +58 -62
  79. package/dist/cjs/view/app-root/stand-alone-app.js +39 -37
  80. package/dist/cjs/view/app-root/style.js +50 -12
  81. package/dist/cjs/view/error-boundary/default-error-template.js +27 -15
  82. package/dist/cjs/view/error-boundary/index.js +41 -43
  83. package/dist/cjs/view/error-toast/index.js +43 -32
  84. package/dist/cjs/view/fetch-host-app-data/index.js +34 -26
  85. package/dist/cjs/view/fetch-host-app-data/store.js +31 -24
  86. package/dist/cjs/view/fields/check-box/index.js +35 -39
  87. package/dist/cjs/view/fields/combo-box/index.js +38 -31
  88. package/dist/cjs/view/fields/connect-form.js +30 -15
  89. package/dist/cjs/view/fields/date-input/index.js +35 -26
  90. package/dist/cjs/view/fields/date-picker/index.js +35 -26
  91. package/dist/cjs/view/fields/form-item-layout/index.js +37 -30
  92. package/dist/cjs/view/fields/input-mask/index.js +36 -41
  93. package/dist/cjs/view/fields/large-text-box/index.js +35 -26
  94. package/dist/cjs/view/fields/radio/index.js +35 -30
  95. package/dist/cjs/view/fields/radio-group/index.js +33 -27
  96. package/dist/cjs/view/fields/text-box/index.js +35 -26
  97. package/dist/cjs/view/fields/watch-value.js +42 -35
  98. package/dist/cjs/view/form/index.js +42 -34
  99. package/dist/cjs/view/form/personal-info-section.js +57 -80
  100. package/dist/cjs/view/form/submit-button/index.js +35 -23
  101. package/dist/cjs/view/guest-unload-handlers/index.js +33 -22
  102. package/dist/cjs/view/header/center-region/index.js +62 -38
  103. package/dist/cjs/view/header/index.js +42 -35
  104. package/dist/cjs/view/header/logo-region/index.js +32 -23
  105. package/dist/cjs/view/header/nav-region/index.js +45 -30
  106. package/dist/cjs/view/header/nav-region/notification/index.js +29 -18
  107. package/dist/cjs/view/header/nav-region/user/index.js +29 -18
  108. package/dist/cjs/view/host-binding-events/index.js +10 -11
  109. package/dist/cjs/view/intro.stories.mdx +1 -1
  110. package/dist/cjs/view/live-message/index.js +34 -34
  111. package/dist/cjs/view/loadable/index.js +34 -27
  112. package/dist/cjs/view/login/index.js +37 -30
  113. package/dist/cjs/view/media-breakpoint/index.js +44 -34
  114. package/dist/cjs/view/message-to-host-app/index.js +31 -20
  115. package/dist/cjs/view/micro-app/app-factory/index.js +100 -134
  116. package/dist/cjs/view/micro-app/const.js +10 -7
  117. package/dist/cjs/view/micro-app/index.js +38 -27
  118. package/dist/cjs/view/micro-app/resources/manifest.js +43 -34
  119. package/dist/cjs/view/micro-app/resources/script.js +56 -53
  120. package/dist/cjs/view/micro-app/resources/style.js +44 -38
  121. package/dist/cjs/view/micro-app/types.js +3 -5
  122. package/dist/cjs/view/micro-app/use-app-will-render.js +58 -50
  123. package/dist/cjs/view/micro-app/utils.js +32 -21
  124. package/dist/cjs/view/micro-iframe-app/app.js +38 -39
  125. package/dist/cjs/view/micro-iframe-app/iframe/const.js +10 -7
  126. package/dist/cjs/view/micro-iframe-app/iframe/index.js +52 -47
  127. package/dist/cjs/view/micro-iframe-app/index.js +37 -24
  128. package/dist/cjs/view/micro-iframe-app/types.js +3 -5
  129. package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +42 -36
  130. package/dist/cjs/view/modals/error/index.js +36 -28
  131. package/dist/cjs/view/modals/navigation-prompt/index.js +39 -37
  132. package/dist/cjs/view/modals/session-expiry/customHooks.js +40 -35
  133. package/dist/cjs/view/modals/session-expiry/index.js +46 -50
  134. package/dist/cjs/view/modals/wait-message/html-wait-message.js +33 -18
  135. package/dist/cjs/view/modals/wait-message/index.js +51 -53
  136. package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +34 -21
  137. package/dist/cjs/view/render-with-delay/index.js +31 -19
  138. package/dist/cjs/view/render-with-host-data/index.js +36 -30
  139. package/dist/cjs/view/session-timeout/index.js +45 -35
  140. package/dist/cjs/view/storybook/decorator.js +33 -21
  141. package/dist/cjs/view/use-previous.js +29 -13
  142. package/dist/cjs/view/useMediaBreakpoints/index.js +34 -19
  143. package/dist/cjs/view/visually-hidden/index.js +42 -21
  144. package/dist/cjs/view/window-size/index.js +35 -22
  145. package/dist/es/analytics/appdynamics.js +14 -15
  146. package/dist/es/analytics/index.js +8 -14
  147. package/dist/es/analytics/page-view-event.js +11 -21
  148. package/dist/es/analytics/user-session-event.js +11 -13
  149. package/dist/es/analytics/user-wait-event.js +9 -5
  150. package/dist/es/analytics/web-analytics.js +12 -10
  151. package/dist/es/api/auth/index.js +21 -26
  152. package/dist/es/api/helpers.js +8 -81
  153. package/dist/es/api/users/index.js +6 -7
  154. package/dist/es/communication/http-client/index.js +19 -25
  155. package/dist/es/communication/http-client/request-interceptor.js +5 -2
  156. package/dist/es/communication/http-client/response-interceptor.js +20 -21
  157. package/dist/es/communication/http-client/retry-axios.js +45 -105
  158. package/dist/es/communication/http-client/retry.js +22 -25
  159. package/dist/es/communication/http-client/tests/index.test-disable.js +25 -44
  160. package/dist/es/data/auth/actions.js +13 -19
  161. package/dist/es/data/auth/reducer.js +8 -6
  162. package/dist/es/data/breakpoint/index.js +19 -21
  163. package/dist/es/data/error/index.js +11 -9
  164. package/dist/es/data/index.js +11 -0
  165. package/dist/es/data/live-message/index.js +12 -16
  166. package/dist/es/data/logout/actions.js +9 -5
  167. package/dist/es/data/navigation-prompt/actions.js +9 -5
  168. package/dist/es/data/react-redux.js +7 -3
  169. package/dist/es/data/reducers.js +6 -3
  170. package/dist/es/data/saga.js +8 -5
  171. package/dist/es/data/store.js +25 -43
  172. package/dist/es/data/wait-message/actions.js +11 -9
  173. package/dist/es/data/wait-message/reducer.js +9 -9
  174. package/dist/es/index.js +192 -83
  175. package/dist/es/micro-frontend.js +10 -0
  176. package/dist/es/route/index.js +16 -18
  177. package/dist/es/route/page-view.js +8 -8
  178. package/dist/es/route/private-route/index.js +24 -31
  179. package/dist/es/sideeffect/auth/index.js +24 -11
  180. package/dist/es/sideeffect/error-toast/index.js +11 -10
  181. package/dist/es/sideeffect/wait-message/index.js +14 -10
  182. package/dist/es/typings/styled.d.js +1 -1
  183. package/dist/es/utils/app-config/config.js +11 -9
  184. package/dist/es/utils/app-config/index.js +17 -27
  185. package/dist/es/utils/app-host-integration/react.js +8 -6
  186. package/dist/es/utils/auth/helper.js +7 -3
  187. package/dist/es/utils/auth/index.js +51 -75
  188. package/dist/es/utils/constants.js +18 -13
  189. package/dist/es/utils/font-size.js +7 -3
  190. package/dist/es/utils/guest-with-service.js +6 -7
  191. package/dist/es/utils/helpers.js +10 -6
  192. package/dist/es/utils/history.js +7 -3
  193. package/dist/es/utils/log-records.js +34 -31
  194. package/dist/es/utils/micro-frontend/console-logger.js +16 -12
  195. package/dist/es/utils/micro-frontend/guest.js +44 -100
  196. package/dist/es/utils/micro-frontend/host.js +41 -77
  197. package/dist/es/utils/micro-frontend/index.js +35 -33
  198. package/dist/es/utils/micro-frontend/types.js +0 -1
  199. package/dist/es/utils/redact-pii.js +10 -11
  200. package/dist/es/utils/service-worker.js +13 -10
  201. package/dist/es/utils/session.js +45 -46
  202. package/dist/es/utils/storybook/manager.js +7 -4
  203. package/dist/es/utils/storybook/preview.js +27 -24
  204. package/dist/es/utils/storybook/theme.js +9 -6
  205. package/dist/es/utils/testing/index.js +12 -18
  206. package/dist/es/utils/testing/render-with-redux.js +12 -11
  207. package/dist/es/utils/testing/render-with-router-redux.js +18 -19
  208. package/dist/es/utils/testing/render-with-router.js +15 -16
  209. package/dist/es/utils/testing/render-with-state-addons.js +19 -18
  210. package/dist/es/utils/url.js +7 -3
  211. package/dist/es/utils/web-storage.js +21 -17
  212. package/dist/es/utils/window.js +18 -18
  213. package/dist/es/view/app-root/hosted-app.js +10 -13
  214. package/dist/es/view/app-root/index.js +29 -33
  215. package/dist/es/view/app-root/stand-alone-app.js +11 -12
  216. package/dist/es/view/app-root/style.js +30 -5
  217. package/dist/es/view/error-boundary/default-error-template.js +5 -5
  218. package/dist/es/view/error-boundary/index.js +18 -25
  219. package/dist/es/view/error-toast/index.js +15 -14
  220. package/dist/es/view/fetch-host-app-data/index.js +14 -11
  221. package/dist/es/view/fetch-host-app-data/store.js +10 -7
  222. package/dist/es/view/fields/check-box/index.js +17 -18
  223. package/dist/es/view/fields/combo-box/index.js +20 -19
  224. package/dist/es/view/fields/connect-form.js +8 -6
  225. package/dist/es/view/fields/date-input/index.js +17 -14
  226. package/dist/es/view/fields/date-picker/index.js +17 -14
  227. package/dist/es/view/fields/form-item-layout/index.js +15 -15
  228. package/dist/es/view/fields/input-mask/index.js +21 -14
  229. package/dist/es/view/fields/large-text-box/index.js +17 -14
  230. package/dist/es/view/fields/radio/index.js +17 -18
  231. package/dist/es/view/fields/radio-group/index.js +15 -15
  232. package/dist/es/view/fields/text-box/index.js +17 -14
  233. package/dist/es/view/fields/watch-value.js +20 -24
  234. package/dist/es/view/form/index.js +23 -22
  235. package/dist/es/view/form/personal-info-section.js +28 -48
  236. package/dist/es/view/form/submit-button/index.js +13 -10
  237. package/dist/es/view/guest-unload-handlers/index.js +10 -9
  238. package/dist/es/view/header/center-region/index.js +41 -23
  239. package/dist/es/view/header/index.js +16 -15
  240. package/dist/es/view/header/logo-region/index.js +10 -10
  241. package/dist/es/view/header/nav-region/index.js +21 -13
  242. package/dist/es/view/header/nav-region/notification/index.js +7 -7
  243. package/dist/es/view/header/nav-region/user/index.js +7 -7
  244. package/dist/es/view/host-binding-events/index.js +7 -3
  245. package/dist/es/view/intro.stories.mdx +1 -1
  246. package/dist/es/view/live-message/index.js +13 -22
  247. package/dist/es/view/loadable/index.js +13 -15
  248. package/dist/es/view/login/index.js +12 -15
  249. package/dist/es/view/media-breakpoint/index.js +16 -13
  250. package/dist/es/view/message-to-host-app/index.js +10 -9
  251. package/dist/es/view/micro-app/app-factory/index.js +67 -81
  252. package/dist/es/view/micro-app/const.js +4 -1
  253. package/dist/es/view/micro-app/index.js +12 -9
  254. package/dist/es/view/micro-app/resources/manifest.js +17 -15
  255. package/dist/es/view/micro-app/resources/script.js +35 -35
  256. package/dist/es/view/micro-app/resources/style.js +22 -21
  257. package/dist/es/view/micro-app/types.js +0 -1
  258. package/dist/es/view/micro-app/use-app-will-render.js +35 -26
  259. package/dist/es/view/micro-app/utils.js +11 -13
  260. package/dist/es/view/micro-iframe-app/app.js +14 -20
  261. package/dist/es/view/micro-iframe-app/iframe/const.js +4 -1
  262. package/dist/es/view/micro-iframe-app/iframe/index.js +27 -31
  263. package/dist/es/view/micro-iframe-app/index.js +10 -10
  264. package/dist/es/view/micro-iframe-app/types.js +0 -1
  265. package/dist/es/view/micro-iframe-app/use-frame-loaded.js +15 -18
  266. package/dist/es/view/modals/error/index.js +13 -10
  267. package/dist/es/view/modals/navigation-prompt/index.js +11 -14
  268. package/dist/es/view/modals/session-expiry/customHooks.js +11 -13
  269. package/dist/es/view/modals/session-expiry/index.js +13 -20
  270. package/dist/es/view/modals/wait-message/html-wait-message.js +11 -10
  271. package/dist/es/view/modals/wait-message/index.js +30 -37
  272. package/dist/es/view/modals/wait-message/wait-message-launcher.js +8 -6
  273. package/dist/es/view/render-with-delay/index.js +8 -10
  274. package/dist/es/view/render-with-host-data/index.js +10 -13
  275. package/dist/es/view/session-timeout/index.js +19 -9
  276. package/dist/es/view/storybook/decorator.js +8 -5
  277. package/dist/es/view/use-previous.js +6 -3
  278. package/dist/es/view/useMediaBreakpoints/index.js +11 -9
  279. package/dist/es/view/visually-hidden/index.js +20 -10
  280. package/dist/es/view/window-size/index.js +12 -10
  281. package/dist/types/communication/http-client/retry.d.ts +1 -1
  282. package/dist/types/data/index.d.ts +4 -0
  283. package/dist/types/data/react-redux.d.ts +11 -11
  284. package/dist/types/data/reducers.d.ts +6 -6
  285. package/dist/types/data/store.d.ts +29 -29
  286. package/dist/types/index.d.ts +79 -79
  287. package/dist/types/micro-frontend.d.ts +6 -0
  288. package/dist/types/route/private-route/index.d.ts +1 -1
  289. package/dist/types/sideeffect/auth/index.d.ts +1 -1
  290. package/dist/types/utils/app-host-integration/react.d.ts +1 -1
  291. package/dist/types/utils/micro-frontend/guest.d.ts +3 -3
  292. package/dist/types/utils/micro-frontend/host.d.ts +1 -1
  293. package/dist/types/utils/micro-frontend/index.d.ts +2 -2
  294. package/dist/types/utils/micro-frontend/types.d.ts +1 -1
  295. package/dist/types/utils/storybook/cjs/main.d.ts +63 -0
  296. package/dist/types/utils/storybook/{middleware.d.ts → cjs/middleware.d.ts} +0 -0
  297. package/dist/types/utils/storybook/cjs/vite.d.ts +4 -0
  298. package/dist/types/utils/storybook/cjs/webpack.d.ts +16 -0
  299. package/dist/types/utils/storybook/preview.d.ts +9 -3
  300. package/dist/types/utils/testing/render-with-redux.d.ts +20 -20
  301. package/dist/types/utils/testing/render-with-router-redux.d.ts +20 -20
  302. package/dist/types/utils/window.d.ts +1 -1
  303. package/dist/types/view/app-root/index.d.ts +1 -1
  304. package/dist/types/view/fields/check-box/index.d.ts +1 -1
  305. package/dist/types/view/fields/check-box/index.stories.d.ts +1 -1
  306. package/dist/types/view/fields/check-box/set-value.stories.d.ts +1 -1
  307. package/dist/types/view/fields/combo-box/index.stories.d.ts +1 -1
  308. package/dist/types/view/fields/date-input/index.stories.d.ts +1 -1
  309. package/dist/types/view/fields/date-picker/index.stories.d.ts +1 -1
  310. package/dist/types/view/fields/form-item-layout/index.stories.d.ts +1 -1
  311. package/dist/types/view/fields/input-mask/index.d.ts +1 -1
  312. package/dist/types/view/fields/input-mask/index.stories.d.ts +1 -1
  313. package/dist/types/view/fields/large-text-box/index.stories.d.ts +1 -1
  314. package/dist/types/view/fields/radio/index.stories.d.ts +1 -1
  315. package/dist/types/view/fields/radio/set-value.stories.d.ts +1 -1
  316. package/dist/types/view/fields/radio-group/index.stories.d.ts +1 -1
  317. package/dist/types/view/fields/text-box/index.stories.d.ts +1 -1
  318. package/dist/types/view/form/usecases.stories.d.ts +1 -1
  319. package/dist/types/view/header/index.d.ts +1 -1
  320. package/dist/types/view/header/index.stories.d.ts +1 -1
  321. package/dist/types/view/micro-app/app-factory/index.d.ts +3 -3
  322. package/dist/types/view/micro-app/index.d.ts +1 -1
  323. package/dist/types/view/micro-app/resources/manifest.d.ts +2 -2
  324. package/dist/types/view/micro-app/resources/script.d.ts +1 -1
  325. package/dist/types/view/micro-app/resources/style.d.ts +1 -1
  326. package/dist/types/view/micro-app/use-app-will-render.d.ts +1 -1
  327. package/dist/types/view/micro-iframe-app/app.d.ts +2 -2
  328. package/dist/types/view/micro-iframe-app/index.d.ts +1 -1
  329. package/dist/types/view/micro-iframe-app/types.d.ts +1 -1
  330. package/dist/types/view/micro-iframe-app/use-frame-loaded.d.ts +1 -1
  331. package/dist/types/view/modals/error/index.stories.d.ts +1 -1
  332. package/dist/types/view/modals/navigation-prompt/index.stories.d.ts +1 -1
  333. package/dist/types/view/modals/session-expiry/index.stories.d.ts +1 -1
  334. package/dist/types/view/modals/wait-message/index.stories.d.ts +1 -1
  335. package/dist/types/view/storybook/decorator.d.ts +1 -1
  336. package/dist/types/view/visually-hidden/index.d.ts +1 -3
  337. package/package.json +34 -15
  338. package/dist/cjs/api/users/index.endpoint.js +0 -14
  339. package/dist/cjs/communication/http-client/tests/hello.endpoint.js +0 -14
  340. package/dist/cjs/communication/http-client/tests/private.endpoint.js +0 -14
  341. package/dist/cjs/utils/storybook/main.js +0 -38
  342. package/dist/cjs/utils/storybook/middleware.js +0 -9
  343. package/dist/cjs/view/error-toast/index.stories.js +0 -128
  344. package/dist/cjs/view/fields/check-box/index.stories.js +0 -64
  345. package/dist/cjs/view/fields/check-box/set-value.stories.js +0 -83
  346. package/dist/cjs/view/fields/combo-box/index.stories.js +0 -65
  347. package/dist/cjs/view/fields/date-input/index.stories.js +0 -53
  348. package/dist/cjs/view/fields/date-input/index1.stories.js +0 -53
  349. package/dist/cjs/view/fields/date-picker/index.stories.js +0 -53
  350. package/dist/cjs/view/fields/form-item-layout/index.stories.js +0 -43
  351. package/dist/cjs/view/fields/input-mask/index.stories.js +0 -52
  352. package/dist/cjs/view/fields/large-text-box/index.stories.js +0 -47
  353. package/dist/cjs/view/fields/radio/index.stories.js +0 -60
  354. package/dist/cjs/view/fields/radio/set-value.stories.js +0 -81
  355. package/dist/cjs/view/fields/radio-group/index.stories.js +0 -85
  356. package/dist/cjs/view/fields/text-box/index.stories.js +0 -48
  357. package/dist/cjs/view/form/index.stories.js +0 -71
  358. package/dist/cjs/view/form/usecases.stories.js +0 -59
  359. package/dist/cjs/view/header/index.stories.js +0 -24
  360. package/dist/cjs/view/live-message/index.stories.js +0 -53
  361. package/dist/cjs/view/media-breakpoint/index.stories.js +0 -24
  362. package/dist/cjs/view/modals/error/index.stories.js +0 -36
  363. package/dist/cjs/view/modals/navigation-prompt/index.stories.js +0 -32
  364. package/dist/cjs/view/modals/session-expiry/index.stories.js +0 -30
  365. package/dist/cjs/view/modals/wait-message/index.stories.js +0 -47
  366. package/dist/cjs/view/session-timeout/index.stories.js +0 -28
  367. package/dist/es/api/users/index.endpoint.js +0 -14
  368. package/dist/es/communication/http-client/tests/hello.endpoint.js +0 -14
  369. package/dist/es/communication/http-client/tests/private.endpoint.js +0 -14
  370. package/dist/es/utils/storybook/main.js +0 -38
  371. package/dist/es/utils/storybook/middleware.js +0 -9
  372. package/dist/es/view/error-toast/index.stories.js +0 -108
  373. package/dist/es/view/fields/check-box/index.stories.js +0 -47
  374. package/dist/es/view/fields/check-box/set-value.stories.js +0 -65
  375. package/dist/es/view/fields/combo-box/index.stories.js +0 -48
  376. package/dist/es/view/fields/date-input/index.stories.js +0 -35
  377. package/dist/es/view/fields/date-input/index1.stories.js +0 -35
  378. package/dist/es/view/fields/date-picker/index.stories.js +0 -35
  379. package/dist/es/view/fields/form-item-layout/index.stories.js +0 -27
  380. package/dist/es/view/fields/input-mask/index.stories.js +0 -35
  381. package/dist/es/view/fields/large-text-box/index.stories.js +0 -30
  382. package/dist/es/view/fields/radio/index.stories.js +0 -43
  383. package/dist/es/view/fields/radio/set-value.stories.js +0 -63
  384. package/dist/es/view/fields/radio-group/index.stories.js +0 -68
  385. package/dist/es/view/fields/text-box/index.stories.js +0 -31
  386. package/dist/es/view/form/index.stories.js +0 -56
  387. package/dist/es/view/form/usecases.stories.js +0 -43
  388. package/dist/es/view/header/index.stories.js +0 -14
  389. package/dist/es/view/live-message/index.stories.js +0 -32
  390. package/dist/es/view/media-breakpoint/index.stories.js +0 -10
  391. package/dist/es/view/modals/error/index.stories.js +0 -21
  392. package/dist/es/view/modals/navigation-prompt/index.stories.js +0 -18
  393. package/dist/es/view/modals/session-expiry/index.stories.js +0 -18
  394. package/dist/es/view/modals/wait-message/index.stories.js +0 -33
  395. package/dist/es/view/session-timeout/index.stories.js +0 -13
  396. package/dist/types/utils/storybook/main.d.ts +0 -30
  397. package/dist/types/view/fields/date-input/index1.stories.d.ts +0 -24
@@ -1,47 +0,0 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import { get } from 'react-hook-form';
3
- import { Form } from "../../form/index.js";
4
- import { CheckBox, CHECKBOX_VARIANT } from "./index.js";
5
- import { ConnectForm } from "../connect-form.js";
6
- import { WatchValue } from "../watch-value.js";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
-
9
- const Template = ({
10
- name,
11
- ...rest
12
- }) => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx2(ConnectForm, {}, void 0, ({
13
- formState: {
14
- errors
15
- }
16
- }) => {
17
- const errField = get(errors, name);
18
- const hasError = !!errField; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
19
-
20
- const ctrlVariant = hasError ? CHECKBOX_VARIANT.ERROR : CHECKBOX_VARIANT.DEFAULT;
21
- return /*#__PURE__*/_jsx(CheckBox, {
22
- name: name,
23
- ...rest,
24
- hasError: hasError,
25
- variant: ctrlVariant
26
- });
27
- }), /*#__PURE__*/_jsx(WatchValue, {
28
- name: name,
29
- ...rest
30
- }));
31
-
32
- export default {
33
- title: 'Components/Form/Controls/CheckBox',
34
- component: CheckBox
35
- };
36
- export const Basic = Template.bind({});
37
- Basic.args = {
38
- name: 'acknowledge',
39
- labelText: 'Acknowledge Electronic delivery of documents',
40
- rules: {
41
- required: {
42
- value: true,
43
- message: 'Please acknowledge'
44
- }
45
- },
46
- defaultChecked: false
47
- };
@@ -1,65 +0,0 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import _styled from "styled-components";
3
-
4
- var _ToggleValue;
5
-
6
- import { useFormContext, get } from 'react-hook-form';
7
- import DSButton from '@elliemae/ds-basic/Button';
8
- import { Form } from "../../form/index.js";
9
- import { CheckBox, CHECKBOX_VARIANT } from "./index.js";
10
- import { ConnectForm } from "../connect-form.js";
11
- import { jsx as _jsx2 } from "react/jsx-runtime";
12
- const cbName = 'acknowledge';
13
-
14
- const ToggleValue = () => {
15
- const {
16
- setValue,
17
- watch
18
- } = useFormContext();
19
- const currentValue = watch(cbName);
20
- return /*#__PURE__*/_jsx(_StyledDSButton, {
21
- size: "m",
22
- labelText: "Toggle",
23
- onClick: () => setValue(cbName, !currentValue, {
24
- shouldDirty: true
25
- })
26
- });
27
- };
28
-
29
- const Template = ({
30
- name,
31
- ...rest
32
- }) => /*#__PURE__*/_jsx(Form, {}, void 0, /*#__PURE__*/_jsx(ConnectForm, {}, void 0, ({
33
- formState: {
34
- errors
35
- }
36
- }) => {
37
- const hasError = !!get(errors, name);
38
- const ctrlVariant = get(errors, name) ? CHECKBOX_VARIANT.ERROR : CHECKBOX_VARIANT.DEFAULT;
39
- return /*#__PURE__*/_jsx2(CheckBox, {
40
- name: name,
41
- ...rest,
42
- hasError: hasError,
43
- variant: ctrlVariant
44
- });
45
- }), _ToggleValue || (_ToggleValue = /*#__PURE__*/_jsx(ToggleValue, {})));
46
-
47
- export default {
48
- title: 'Components/Form/Controls/CheckBox'
49
- };
50
- export const SetValue = Template.bind({});
51
- SetValue.args = {
52
- name: cbName,
53
- labelText: 'Acknowledge Electronic delivery of documents',
54
- rules: {
55
- required: {
56
- value: true,
57
- message: 'Please acknowledge'
58
- }
59
- },
60
- defaultChecked: false
61
- };
62
-
63
- var _StyledDSButton = /*#__PURE__*/_styled(DSButton).withConfig({
64
- componentId: "sc-1lqqv9c-0"
65
- })(["margin-top:10px;"]);
@@ -1,48 +0,0 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import { Form } from "../../form/index.js";
3
- import { FormItemLayout } from "../form-item-layout/index.js";
4
- import { ComboBox } from "./index.js";
5
- import { WatchValue } from "../watch-value.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export default {
8
- title: 'Components/Form/Controls/ComboBox',
9
- component: ComboBox
10
- };
11
-
12
- const MaritalStatus = props => /*#__PURE__*/_jsx(FormItemLayout, {
13
- floatingLabel: true,
14
- ...props,
15
- inputComponent: ComboBox,
16
- required: true
17
- });
18
-
19
- const Template = args => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx(MaritalStatus, { ...args
20
- }), /*#__PURE__*/_jsx(WatchValue, { ...args
21
- }));
22
-
23
- export const Basic = Template.bind({});
24
- Basic.args = {
25
- name: 'marital_status',
26
- labelText: 'Marital Status',
27
- defaultValue: '--select--',
28
- options: [{
29
- value: '--select--',
30
- label: '--Select--'
31
- }, {
32
- value: 'married',
33
- label: 'Married'
34
- }, {
35
- value: 'unmarried',
36
- label: 'Unmarried'
37
- }, {
38
- value: 'separated',
39
- label: 'Separated'
40
- }],
41
- rules: {
42
- required: {
43
- value: true,
44
- message: 'Marital Status required'
45
- },
46
- validate: value => value !== '--select--' || 'Please select valid value'
47
- }
48
- };
@@ -1,35 +0,0 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import moment from 'moment';
3
- import { Form } from "../../form/index.js";
4
- import { DateInput } from "./index.js";
5
- import { FormItemLayout } from "../form-item-layout/index.js";
6
- import { WatchValue } from "../watch-value.js";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- export default {
9
- title: 'Components/Form/Controls/DateInput',
10
- component: DateInput
11
- };
12
-
13
- const DOB = props => /*#__PURE__*/_jsx(FormItemLayout, {
14
- inputComponent: DateInput,
15
- ...props
16
- });
17
-
18
- const Template = args => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx(DOB, { ...args
19
- }), /*#__PURE__*/_jsx(WatchValue, { ...args
20
- }));
21
-
22
- export const Basic = Template.bind({});
23
- Basic.args = {
24
- labelText: 'Date of Birth',
25
- name: 'dob',
26
- required: true,
27
- defaultValue: moment('1980-01-01').toString(),
28
- rules: {
29
- required: {
30
- value: true,
31
- message: 'Date of Birth is required'
32
- },
33
- validate: value => moment() > value || 'Date of Birth can not be greater than current date'
34
- }
35
- };
@@ -1,35 +0,0 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import moment from 'moment';
3
- import { Form } from "../../form/index.js";
4
- import { DateInput } from "./index.js";
5
- import { FormItemLayout } from "../form-item-layout/index.js";
6
- import { WatchValue } from "../watch-value.js";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- export default {
9
- title: 'Components/Form/Controls/DateInput',
10
- component: DateInput
11
- };
12
-
13
- const DOB = props => /*#__PURE__*/_jsx(FormItemLayout, {
14
- inputComponent: DateInput,
15
- ...props
16
- });
17
-
18
- const Template = args => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx(DOB, { ...args
19
- }), /*#__PURE__*/_jsx(WatchValue, { ...args
20
- }));
21
-
22
- export const Basic = Template.bind({});
23
- Basic.args = {
24
- labelText: 'Date of Birth',
25
- name: 'dob',
26
- required: true,
27
- defaultValue: moment('1980-01-01'),
28
- rules: {
29
- required: {
30
- value: true,
31
- message: 'Date of Birth is required'
32
- },
33
- validate: value => moment() > value || 'Date of Birth can not be greater than current date'
34
- }
35
- };
@@ -1,35 +0,0 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import moment from 'moment';
3
- import { Form } from "../../form/index.js";
4
- import { DatePicker } from "./index.js";
5
- import { FormItemLayout } from "../form-item-layout/index.js";
6
- import { WatchValue } from "../watch-value.js";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- export default {
9
- title: 'Components/Form/Controls/DatePicker',
10
- component: DatePicker
11
- };
12
-
13
- const DOB = props => /*#__PURE__*/_jsx(FormItemLayout, {
14
- inputComponent: DatePicker,
15
- ...props
16
- });
17
-
18
- const Template = args => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx(DOB, { ...args
19
- }), /*#__PURE__*/_jsx(WatchValue, { ...args
20
- }));
21
-
22
- export const Basic = Template.bind({});
23
- Basic.args = {
24
- labelText: 'Date of Birth',
25
- name: 'dob',
26
- required: true,
27
- defaultValue: moment('1980-01-01').toString(),
28
- rules: {
29
- required: {
30
- value: true,
31
- message: 'Date of Birth is required'
32
- },
33
- validate: value => moment() > value || 'Date of Birth can not be greater than current date'
34
- }
35
- };
@@ -1,27 +0,0 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import { Form } from "../../form/index.js";
3
- import { TextBox } from "../text-box/index.js";
4
- import { FormItemLayout } from "./index.js";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- export default {
7
- title: 'Components/Form/Controls/FormItemLayout',
8
- component: FormItemLayout
9
- };
10
-
11
- const Template = args => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx(FormItemLayout, { ...args
12
- }));
13
-
14
- export const Basic = Template.bind({});
15
- Basic.args = {
16
- floatingLabel: true,
17
- inputComponent: TextBox,
18
- labelText: 'First Name',
19
- name: 'firstname',
20
- required: true,
21
- rules: {
22
- required: {
23
- value: true,
24
- message: 'Please enter firstname'
25
- }
26
- }
27
- };
@@ -1,35 +0,0 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import { Form } from "../../form/index.js";
3
- import { InputMask, MASK_TYPES } from "./index.js";
4
- import { FormItemLayout } from "../form-item-layout/index.js";
5
- import { WatchValue } from "../watch-value.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export default {
8
- title: 'Components/Form/Controls/InputMask',
9
- component: InputMask
10
- };
11
-
12
- const Template = args => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx(FormItemLayout, {
13
- floatingLabel: true,
14
- inputComponent: InputMask,
15
- required: true,
16
- ...args
17
- }), /*#__PURE__*/_jsx(WatchValue, { ...args
18
- }));
19
-
20
- export const Basic = Template.bind({});
21
- Basic.args = {
22
- name: 'otp',
23
- labelText: 'Enter One time passcode',
24
- mask: number => MASK_TYPES.NUMBER({
25
- decimalLimit: 2,
26
- integerLimit: 8,
27
- allowDecimal: true
28
- })(number),
29
- rules: {
30
- required: {
31
- value: true,
32
- message: 'Please enter OTP'
33
- }
34
- }
35
- };
@@ -1,30 +0,0 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import { Form } from "../../form/index.js";
3
- import { LargeTextBox } from "./index.js";
4
- import { FormItemLayout } from "../form-item-layout/index.js";
5
- import { WatchValue } from "../watch-value.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export default {
8
- title: 'Components/Form/Controls/LargeTextBox',
9
- component: LargeTextBox
10
- };
11
-
12
- const Template = args => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx(FormItemLayout, {
13
- floatingLabel: true,
14
- inputComponent: LargeTextBox,
15
- required: true,
16
- ...args
17
- }), /*#__PURE__*/_jsx(WatchValue, { ...args
18
- }));
19
-
20
- export const Basic = Template.bind({});
21
- Basic.args = {
22
- name: 'feedback',
23
- labelText: 'Enter Feedback',
24
- rules: {
25
- required: {
26
- value: true,
27
- message: 'Please enter feedback'
28
- }
29
- }
30
- };
@@ -1,43 +0,0 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import { get } from 'react-hook-form';
3
- import { Form } from "../../form/index.js";
4
- import { Radio } from "./index.js";
5
- import { ConnectForm } from "../connect-form.js";
6
- import { WatchValue } from "../watch-value.js";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
-
9
- const Template = ({
10
- name,
11
- ...rest
12
- }) => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx2(ConnectForm, {}, void 0, ({
13
- formState: {
14
- errors
15
- }
16
- }) => {
17
- const hasError = !!get(errors, name);
18
- return /*#__PURE__*/_jsx(Radio, {
19
- name: name,
20
- ...rest,
21
- hasError: hasError
22
- });
23
- }), /*#__PURE__*/_jsx(WatchValue, {
24
- name: name,
25
- ...rest
26
- }));
27
-
28
- export default {
29
- title: 'Components/Form/Controls/Radio',
30
- component: Radio
31
- };
32
- export const Basic = Template.bind({});
33
- Basic.args = {
34
- name: 'gender',
35
- labelText: 'Male',
36
- rules: {
37
- required: {
38
- value: true,
39
- message: 'Please select a gender'
40
- }
41
- },
42
- defaultChecked: false
43
- };
@@ -1,63 +0,0 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import _styled from "styled-components";
3
-
4
- var _ToggleValue;
5
-
6
- import { useFormContext, get } from 'react-hook-form';
7
- import DSButton from '@elliemae/ds-basic/Button';
8
- import { Form } from "../../form/index.js";
9
- import { Radio } from "./index.js";
10
- import { ConnectForm } from "../connect-form.js";
11
- import { jsx as _jsx2 } from "react/jsx-runtime";
12
- const radioName = 'gender';
13
-
14
- const ToggleValue = () => {
15
- const {
16
- setValue,
17
- watch
18
- } = useFormContext();
19
- const currentValue = watch(radioName);
20
- return /*#__PURE__*/_jsx(_StyledDSButton, {
21
- size: "m",
22
- labelText: "Toggle",
23
- onClick: () => setValue(radioName, !currentValue, {
24
- shouldDirty: true
25
- })
26
- });
27
- };
28
-
29
- const Template = ({
30
- name,
31
- ...rest
32
- }) => /*#__PURE__*/_jsx(Form, {}, void 0, /*#__PURE__*/_jsx(ConnectForm, {}, void 0, ({
33
- formState: {
34
- errors
35
- }
36
- }) => {
37
- const hasError = !!get(errors, name);
38
- return /*#__PURE__*/_jsx2(Radio, {
39
- name: name,
40
- ...rest,
41
- hasError: hasError
42
- });
43
- }), _ToggleValue || (_ToggleValue = /*#__PURE__*/_jsx(ToggleValue, {})));
44
-
45
- export default {
46
- title: 'Components/Form/Controls/Radio'
47
- };
48
- export const SetValue = Template.bind({});
49
- SetValue.args = {
50
- name: radioName,
51
- labelText: 'Male',
52
- rules: {
53
- required: {
54
- value: true,
55
- message: 'Please select a gender'
56
- }
57
- },
58
- defaultChecked: true
59
- };
60
-
61
- var _StyledDSButton = /*#__PURE__*/_styled(DSButton).withConfig({
62
- componentId: "sc-fd8n0e-0"
63
- })(["margin-top:10px;"]);
@@ -1,68 +0,0 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
-
3
- var _DSRadio, _DSRadio2;
4
-
5
- import DSRadio from '@elliemae/ds-basic/form/Radio';
6
- import { get } from 'react-hook-form';
7
- import { RadioGroup } from "./index.js";
8
- import { Form } from "../../form/index.js";
9
- import { ConnectForm } from "../connect-form.js";
10
- import { WatchValue } from "../watch-value.js";
11
- import { jsxs as _jsxs } from "react/jsx-runtime";
12
- import { jsx as _jsx2 } from "react/jsx-runtime";
13
- const radioName = 'gender';
14
-
15
- const Gender = ({
16
- feedbackMessage,
17
- ...rest
18
- }) => /*#__PURE__*/_jsxs(RadioGroup, {
19
- name: radioName,
20
- labelProps: {
21
- labelText: 'Gender',
22
- required: true,
23
- feedbackMessage
24
- },
25
- orientation: "horizontal",
26
- ...rest,
27
- children: [_DSRadio || (_DSRadio = /*#__PURE__*/_jsx(DSRadio, {
28
- name: radioName,
29
- value: "male",
30
- labelText: "Male"
31
- })), _DSRadio2 || (_DSRadio2 = /*#__PURE__*/_jsx(DSRadio, {
32
- name: radioName,
33
- value: "female",
34
- labelText: "Female"
35
- }))]
36
- });
37
-
38
- const Template = ({
39
- props
40
- }) => /*#__PURE__*/_jsx(Form, {}, void 0, /*#__PURE__*/_jsx(ConnectForm, {}, void 0, ({
41
- formState: {
42
- errors
43
- }
44
- }) => {
45
- const errField = get(errors, radioName);
46
- const feedbackMessage = errField === null || errField === void 0 ? void 0 : errField.message;
47
- return /*#__PURE__*/_jsx2(Gender, {
48
- feedbackMessage: feedbackMessage,
49
- ...props
50
- });
51
- }), /*#__PURE__*/_jsx2(WatchValue, {
52
- name: radioName,
53
- ...props
54
- }));
55
-
56
- export default {
57
- title: 'Components/Form/Controls/RadioGroup',
58
- component: RadioGroup
59
- };
60
- export const Basic = Template.bind({});
61
- Basic.args = {
62
- rules: {
63
- required: {
64
- value: true,
65
- message: 'Please select a gender'
66
- }
67
- }
68
- };
@@ -1,31 +0,0 @@
1
- import _jsx2 from "@babel/runtime/helpers/jsx";
2
- import { Form } from "../../form/index.js";
3
- import { TextBox } from "./index.js";
4
- import { FormItemLayout } from "../form-item-layout/index.js";
5
- import { WatchValue } from "../watch-value.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export default {
8
- title: 'Components/Form/Controls/TextBox',
9
- component: TextBox
10
- };
11
-
12
- const Template = args => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx(FormItemLayout, {
13
- floatingLabel: true,
14
- inputComponent: TextBox,
15
- required: true,
16
- ...args
17
- }), /*#__PURE__*/_jsx(WatchValue, { ...args
18
- }));
19
-
20
- export const Basic = Template.bind({});
21
- Basic.args = {
22
- name: 'firstname',
23
- labelText: 'First Name',
24
- defaultValue: 'John',
25
- rules: {
26
- required: {
27
- value: true,
28
- message: 'Please enter firstname'
29
- }
30
- }
31
- };
@@ -1,56 +0,0 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
- import _styled2 from "styled-components";
3
- import _styled from "styled-components";
4
-
5
- var _h, _FirstName, _DOB, _State, _MaritalStatus, _WatchDashBoard;
6
-
7
- import styled from 'styled-components';
8
- import { useFormContext } from 'react-hook-form';
9
- import { FormSubmitButton } from "./submit-button/index.js";
10
- import { Form } from "./index.js";
11
- import { FirstName, DOB, State, MaritalStatus } from "./personal-info-section.js";
12
- import { jsx as _jsx2 } from "react/jsx-runtime";
13
- const btnProps = {
14
- containerProps: {
15
- id: 'submit'
16
- },
17
- labelText: 'Submit Application',
18
- size: 'l'
19
- };
20
- export default {
21
- title: 'Components/Form',
22
- component: Form
23
- };
24
- const StyledButton = /*#__PURE__*/styled(FormSubmitButton).withConfig({
25
- componentId: "sc-1mzmcta-0"
26
- })(["margin-top:", ";"], ({
27
- theme
28
- }) => theme.space.xs);
29
-
30
- const WatchDashBoard = () => {
31
- const {
32
- watch
33
- } = useFormContext();
34
- const watchFirstName = watch('firstname', '');
35
- const watchDOB = watch('dob', '');
36
- const watchState = watch('state', '');
37
- const watchMaritalStatus = watch('marital_status', '');
38
- return /*#__PURE__*/_jsx(_StyledSection, {}, void 0, _h || (_h = /*#__PURE__*/_jsx("h4", {}, void 0, "Form Data:")), /*#__PURE__*/_jsx(_StyledDiv, {}, void 0, /*#__PURE__*/_jsx("div", {}, void 0, "FirstName : ", /*#__PURE__*/_jsx("strong", {}, void 0, watchFirstName)), /*#__PURE__*/_jsx("div", {}, void 0, "DOB : ", /*#__PURE__*/_jsx("strong", {}, void 0, JSON.stringify(watchDOB))), /*#__PURE__*/_jsx("div", {}, void 0, "State : ", /*#__PURE__*/_jsx("strong", {}, void 0, watchState)), /*#__PURE__*/_jsx("div", {}, void 0, "Marital Status : ", /*#__PURE__*/_jsx("strong", {}, void 0, watchMaritalStatus))));
39
- }; // eslint-disable-next-line no-unused-vars
40
-
41
-
42
- const Template = () => /*#__PURE__*/_jsx(Form, {
43
- onSubmit: data => {}
44
- }, void 0, _FirstName || (_FirstName = /*#__PURE__*/_jsx(FirstName, {})), _DOB || (_DOB = /*#__PURE__*/_jsx(DOB, {})), _State || (_State = /*#__PURE__*/_jsx(State, {})), _MaritalStatus || (_MaritalStatus = /*#__PURE__*/_jsx(MaritalStatus, {})), /*#__PURE__*/_jsx2(StyledButton, { ...btnProps
45
- }), _WatchDashBoard || (_WatchDashBoard = /*#__PURE__*/_jsx(WatchDashBoard, {})));
46
-
47
- export const WatchFormControls = Template.bind({});
48
- WatchFormControls.args = {};
49
-
50
- var _StyledSection = /*#__PURE__*/styled("section").withConfig({
51
- componentId: "sc-1mzmcta-1"
52
- })(["margin-top:10px;border-top:2px blue dotted;width:100%;"]);
53
-
54
- var _StyledDiv = /*#__PURE__*/styled("div").withConfig({
55
- componentId: "sc-1mzmcta-2"
56
- })(["display:flex;flex-direction:column;padding-left:10px;align-items:flex-start;"]);
@@ -1,43 +0,0 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
-
3
- var _FirstName, _DOB, _State, _MaritalStatus;
4
-
5
- import styled from 'styled-components';
6
- import { FormSubmitButton } from "./submit-button/index.js";
7
- import { Form } from "./index.js";
8
- import { FirstName, DOB, State, MaritalStatus } from "./personal-info-section.js";
9
- import { jsx as _jsx2 } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
- const btnProps = {
12
- containerProps: {
13
- id: 'submit'
14
- },
15
- labelText: 'Submit Application',
16
- size: 'l'
17
- };
18
- export default {
19
- title: 'Components/Form',
20
- component: FormSubmitButton
21
- };
22
- const StyledButton = /*#__PURE__*/styled(FormSubmitButton).withConfig({
23
- componentId: "sc-1wwguuk-0"
24
- })(["margin-top:", ";"], ({
25
- theme
26
- }) => theme.space.xs);
27
-
28
- const Template = args => /*#__PURE__*/_jsxs(Form, { ...args,
29
- children: [_FirstName || (_FirstName = /*#__PURE__*/_jsx(FirstName, {})), _DOB || (_DOB = /*#__PURE__*/_jsx(DOB, {})), _State || (_State = /*#__PURE__*/_jsx(State, {})), _MaritalStatus || (_MaritalStatus = /*#__PURE__*/_jsx(MaritalStatus, {})), /*#__PURE__*/_jsx2(StyledButton, { ...btnProps
30
- })]
31
- });
32
-
33
- export const FormValidationOnBlur = Template.bind({});
34
- FormValidationOnBlur.args = {
35
- onSubmit: data => {}
36
- };
37
- export const FormValidationOnSubmit = Template.bind({});
38
- FormValidationOnSubmit.args = {
39
- onSubmit: data => {},
40
- reactHookFormProps: {
41
- mode: 'onSubmit'
42
- }
43
- };