@elliemae/pui-app-sdk 2.21.0 → 3.0.0-beta.11

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 (399) hide show
  1. package/dist/cjs/analytics/appdynamics.js +40 -30
  2. package/dist/cjs/analytics/index.js +33 -26
  3. package/dist/cjs/analytics/page-view-event.js +35 -34
  4. package/dist/cjs/analytics/user-session-event.js +35 -27
  5. package/dist/cjs/analytics/user-wait-event.js +32 -17
  6. package/dist/cjs/analytics/web-analytics.js +33 -19
  7. package/dist/cjs/api/auth/index.js +42 -39
  8. package/dist/cjs/api/helpers.js +34 -99
  9. package/dist/cjs/api/users/index.js +29 -16
  10. package/dist/cjs/communication/http-client/index.js +50 -48
  11. package/dist/cjs/communication/http-client/request-interceptor.js +29 -12
  12. package/dist/cjs/communication/http-client/response-interceptor.js +47 -38
  13. package/dist/cjs/communication/http-client/retry-axios.js +74 -122
  14. package/dist/cjs/communication/http-client/retry.js +43 -36
  15. package/dist/cjs/communication/http-client/tests/index.test-disable.js +48 -56
  16. package/dist/cjs/data/auth/actions.js +34 -26
  17. package/dist/cjs/data/auth/reducer.js +36 -18
  18. package/dist/cjs/data/breakpoint/index.js +44 -32
  19. package/dist/cjs/data/error/index.js +34 -18
  20. package/dist/cjs/data/index.js +35 -0
  21. package/dist/cjs/data/live-message/index.js +35 -25
  22. package/dist/cjs/data/logout/actions.js +29 -9
  23. package/dist/cjs/data/navigation-prompt/actions.js +29 -9
  24. package/dist/cjs/data/react-redux.js +30 -13
  25. package/dist/cjs/data/reducers.js +36 -23
  26. package/dist/cjs/data/saga.js +29 -9
  27. package/dist/cjs/data/store.js +51 -65
  28. package/dist/cjs/data/wait-message/actions.js +31 -13
  29. package/dist/cjs/data/wait-message/reducer.js +38 -24
  30. package/dist/cjs/index.js +195 -809
  31. package/dist/cjs/micro-frontend.js +34 -0
  32. package/dist/cjs/route/index.js +44 -32
  33. package/dist/cjs/route/page-view.js +36 -22
  34. package/dist/cjs/route/private-route/index.js +59 -60
  35. package/dist/cjs/sideeffect/auth/index.js +43 -30
  36. package/dist/cjs/sideeffect/error-toast/index.js +40 -26
  37. package/dist/cjs/sideeffect/wait-message/index.js +46 -29
  38. package/dist/cjs/typings/custom.d.js +0 -0
  39. package/dist/cjs/typings/elliemae.d.js +0 -0
  40. package/dist/cjs/typings/styled.d.js +1 -0
  41. package/dist/cjs/typings/thirdparty.d.js +0 -0
  42. package/dist/cjs/utils/app-config/config.js +39 -33
  43. package/dist/cjs/utils/app-config/index.js +48 -44
  44. package/dist/cjs/utils/app-host-integration/react.js +28 -14
  45. package/dist/cjs/utils/auth/helper.js +36 -18
  46. package/dist/cjs/utils/auth/index.js +77 -116
  47. package/dist/cjs/utils/await.js +20 -0
  48. package/dist/cjs/utils/constants.js +39 -21
  49. package/dist/cjs/utils/font-size.js +30 -14
  50. package/dist/cjs/utils/guest-with-service.js +28 -12
  51. package/dist/cjs/utils/helpers.js +32 -19
  52. package/dist/cjs/utils/history.js +30 -12
  53. package/dist/cjs/utils/log-records.js +55 -35
  54. package/dist/cjs/utils/micro-frontend/console-logger.js +40 -23
  55. package/dist/cjs/utils/micro-frontend/guest.js +86 -127
  56. package/dist/cjs/utils/micro-frontend/host.js +86 -125
  57. package/dist/cjs/utils/micro-frontend/index.js +66 -61
  58. package/dist/cjs/utils/micro-frontend/types.js +20 -5
  59. package/dist/cjs/utils/redact-pii.js +32 -17
  60. package/dist/cjs/utils/service-worker.js +37 -21
  61. package/dist/cjs/utils/session.js +66 -71
  62. package/dist/cjs/utils/storybook/cjs/main.js +53 -0
  63. package/dist/cjs/utils/storybook/cjs/middleware.js +5 -0
  64. package/dist/cjs/utils/storybook/cjs/vite.js +6 -0
  65. package/dist/cjs/utils/storybook/cjs/webpack.js +21 -0
  66. package/dist/cjs/utils/storybook/manager.js +32 -16
  67. package/dist/cjs/utils/storybook/preview.js +59 -50
  68. package/dist/cjs/utils/storybook/theme.js +31 -14
  69. package/dist/cjs/utils/testing/index.js +45 -50
  70. package/dist/cjs/utils/testing/render-with-redux.js +41 -27
  71. package/dist/cjs/utils/testing/render-with-router-redux.js +47 -37
  72. package/dist/cjs/utils/testing/render-with-router.js +41 -28
  73. package/dist/cjs/utils/testing/render-with-state-addons.js +47 -36
  74. package/dist/cjs/utils/types.js +20 -0
  75. package/dist/cjs/utils/url.js +29 -13
  76. package/dist/cjs/utils/web-storage.js +46 -30
  77. package/dist/cjs/utils/window.js +37 -28
  78. package/dist/cjs/view/app-root/hosted-app.js +42 -32
  79. package/dist/cjs/view/app-root/index.js +64 -62
  80. package/dist/cjs/view/app-root/stand-alone-app.js +45 -37
  81. package/dist/cjs/view/app-root/style.js +51 -12
  82. package/dist/cjs/view/error-boundary/default-error-template.js +33 -15
  83. package/dist/cjs/view/error-boundary/index.js +47 -43
  84. package/dist/cjs/view/error-toast/index.js +49 -32
  85. package/dist/cjs/view/fetch-host-app-data/index.js +40 -26
  86. package/dist/cjs/view/fetch-host-app-data/store.js +32 -24
  87. package/dist/cjs/view/fields/check-box/index.js +41 -39
  88. package/dist/cjs/view/fields/combo-box/index.js +44 -31
  89. package/dist/cjs/view/fields/connect-form.js +31 -15
  90. package/dist/cjs/view/fields/date-input/index.js +41 -26
  91. package/dist/cjs/view/fields/date-picker/index.js +41 -26
  92. package/dist/cjs/view/fields/form-item-layout/index.js +43 -30
  93. package/dist/cjs/view/fields/input-mask/index.js +42 -41
  94. package/dist/cjs/view/fields/large-text-box/index.js +41 -26
  95. package/dist/cjs/view/fields/radio/index.js +41 -30
  96. package/dist/cjs/view/fields/radio-group/index.js +39 -27
  97. package/dist/cjs/view/fields/text-box/index.js +41 -26
  98. package/dist/cjs/view/fields/watch-value.js +48 -35
  99. package/dist/cjs/view/form/index.js +48 -34
  100. package/dist/cjs/view/form/personal-info-section.js +63 -80
  101. package/dist/cjs/view/form/submit-button/index.js +41 -23
  102. package/dist/cjs/view/guest-unload-handlers/index.js +34 -22
  103. package/dist/cjs/view/header/center-region/index.js +68 -38
  104. package/dist/cjs/view/header/index.js +48 -35
  105. package/dist/cjs/view/header/logo-region/index.js +38 -23
  106. package/dist/cjs/view/header/nav-region/index.js +51 -30
  107. package/dist/cjs/view/header/nav-region/notification/index.js +35 -18
  108. package/dist/cjs/view/header/nav-region/user/index.js +35 -18
  109. package/dist/cjs/view/host-binding-events/index.js +27 -11
  110. package/dist/cjs/view/intro.stories.mdx +1 -1
  111. package/dist/cjs/view/live-message/index.js +40 -34
  112. package/dist/cjs/view/loadable/index.js +40 -27
  113. package/dist/cjs/view/login/index.js +43 -30
  114. package/dist/cjs/view/media-breakpoint/index.js +50 -34
  115. package/dist/cjs/view/message-to-host-app/index.js +32 -20
  116. package/dist/cjs/view/micro-app/app-factory/index.js +101 -135
  117. package/dist/cjs/view/micro-app/const.js +27 -7
  118. package/dist/cjs/view/micro-app/index.js +44 -27
  119. package/dist/cjs/view/micro-app/resources/manifest.js +44 -35
  120. package/dist/cjs/view/micro-app/resources/script.js +57 -53
  121. package/dist/cjs/view/micro-app/resources/style.js +45 -38
  122. package/dist/cjs/view/micro-app/types.js +20 -5
  123. package/dist/cjs/view/micro-app/use-app-will-render.js +59 -50
  124. package/dist/cjs/view/micro-app/utils.js +33 -21
  125. package/dist/cjs/view/micro-iframe-app/app.js +44 -39
  126. package/dist/cjs/view/micro-iframe-app/iframe/const.js +27 -7
  127. package/dist/cjs/view/micro-iframe-app/iframe/index.js +58 -47
  128. package/dist/cjs/view/micro-iframe-app/index.js +43 -24
  129. package/dist/cjs/view/micro-iframe-app/types.js +20 -5
  130. package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +43 -37
  131. package/dist/cjs/view/modals/error/index.js +42 -28
  132. package/dist/cjs/view/modals/navigation-prompt/index.js +45 -37
  133. package/dist/cjs/view/modals/session-expiry/customHooks.js +41 -35
  134. package/dist/cjs/view/modals/session-expiry/index.js +55 -50
  135. package/dist/cjs/view/modals/wait-message/html-wait-message.js +39 -18
  136. package/dist/cjs/view/modals/wait-message/index.js +57 -53
  137. package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +40 -21
  138. package/dist/cjs/view/render-with-delay/index.js +37 -19
  139. package/dist/cjs/view/render-with-host-data/index.js +42 -30
  140. package/dist/cjs/view/session-timeout/index.js +55 -35
  141. package/dist/cjs/view/storybook/decorator.js +39 -21
  142. package/dist/cjs/view/use-previous.js +30 -13
  143. package/dist/cjs/view/useMediaBreakpoints/index.js +35 -19
  144. package/dist/cjs/view/visually-hidden/index.js +48 -21
  145. package/dist/cjs/view/window-size/index.js +41 -22
  146. package/dist/es/analytics/appdynamics.js +14 -15
  147. package/dist/es/analytics/index.js +8 -14
  148. package/dist/es/analytics/page-view-event.js +11 -25
  149. package/dist/es/analytics/user-session-event.js +11 -13
  150. package/dist/es/analytics/user-wait-event.js +9 -5
  151. package/dist/es/analytics/web-analytics.js +12 -10
  152. package/dist/es/api/auth/index.js +21 -26
  153. package/dist/es/api/helpers.js +8 -81
  154. package/dist/es/api/users/index.js +6 -7
  155. package/dist/es/communication/http-client/index.js +19 -25
  156. package/dist/es/communication/http-client/request-interceptor.js +5 -2
  157. package/dist/es/communication/http-client/response-interceptor.js +20 -21
  158. package/dist/es/communication/http-client/retry-axios.js +45 -105
  159. package/dist/es/communication/http-client/retry.js +22 -25
  160. package/dist/es/communication/http-client/tests/index.test-disable.js +25 -44
  161. package/dist/es/data/auth/actions.js +13 -19
  162. package/dist/es/data/auth/reducer.js +8 -6
  163. package/dist/es/data/breakpoint/index.js +19 -21
  164. package/dist/es/data/error/index.js +11 -9
  165. package/dist/es/data/index.js +11 -0
  166. package/dist/es/data/live-message/index.js +12 -16
  167. package/dist/es/data/logout/actions.js +9 -5
  168. package/dist/es/data/navigation-prompt/actions.js +9 -5
  169. package/dist/es/data/react-redux.js +7 -3
  170. package/dist/es/data/reducers.js +6 -3
  171. package/dist/es/data/saga.js +8 -5
  172. package/dist/es/data/store.js +24 -51
  173. package/dist/es/data/wait-message/actions.js +11 -9
  174. package/dist/es/data/wait-message/reducer.js +9 -9
  175. package/dist/es/index.js +192 -83
  176. package/dist/es/micro-frontend.js +10 -0
  177. package/dist/es/route/index.js +16 -18
  178. package/dist/es/route/page-view.js +8 -8
  179. package/dist/es/route/private-route/index.js +24 -31
  180. package/dist/es/sideeffect/auth/index.js +24 -11
  181. package/dist/es/sideeffect/error-toast/index.js +11 -10
  182. package/dist/es/sideeffect/wait-message/index.js +14 -10
  183. package/dist/es/typings/custom.d.js +0 -0
  184. package/dist/es/typings/elliemae.d.js +0 -0
  185. package/dist/es/typings/styled.d.js +1 -0
  186. package/dist/es/typings/thirdparty.d.js +0 -0
  187. package/dist/es/utils/app-config/config.js +11 -9
  188. package/dist/es/utils/app-config/index.js +17 -27
  189. package/dist/es/utils/app-host-integration/react.js +8 -6
  190. package/dist/es/utils/auth/helper.js +7 -3
  191. package/dist/es/utils/auth/index.js +51 -75
  192. package/dist/es/utils/constants.js +18 -13
  193. package/dist/es/utils/font-size.js +7 -3
  194. package/dist/es/utils/guest-with-service.js +6 -7
  195. package/dist/es/utils/helpers.js +10 -6
  196. package/dist/es/utils/history.js +7 -3
  197. package/dist/es/utils/log-records.js +34 -31
  198. package/dist/es/utils/micro-frontend/console-logger.js +16 -12
  199. package/dist/es/utils/micro-frontend/guest.js +44 -100
  200. package/dist/es/utils/micro-frontend/host.js +41 -77
  201. package/dist/es/utils/micro-frontend/index.js +35 -33
  202. package/dist/es/utils/micro-frontend/types.js +0 -1
  203. package/dist/es/utils/redact-pii.js +10 -11
  204. package/dist/es/utils/service-worker.js +13 -10
  205. package/dist/es/utils/session.js +45 -46
  206. package/dist/es/utils/storybook/manager.js +7 -4
  207. package/dist/es/utils/storybook/preview.js +27 -24
  208. package/dist/es/utils/storybook/theme.js +9 -6
  209. package/dist/es/utils/testing/index.js +12 -18
  210. package/dist/es/utils/testing/render-with-redux.js +12 -11
  211. package/dist/es/utils/testing/render-with-router-redux.js +18 -19
  212. package/dist/es/utils/testing/render-with-router.js +15 -16
  213. package/dist/es/utils/testing/render-with-state-addons.js +19 -18
  214. package/dist/es/utils/url.js +7 -3
  215. package/dist/es/utils/web-storage.js +21 -17
  216. package/dist/es/utils/window.js +18 -18
  217. package/dist/es/view/app-root/hosted-app.js +10 -13
  218. package/dist/es/view/app-root/index.js +29 -33
  219. package/dist/es/view/app-root/stand-alone-app.js +11 -12
  220. package/dist/es/view/app-root/style.js +30 -5
  221. package/dist/es/view/error-boundary/default-error-template.js +5 -5
  222. package/dist/es/view/error-boundary/index.js +18 -25
  223. package/dist/es/view/error-toast/index.js +15 -14
  224. package/dist/es/view/fetch-host-app-data/index.js +14 -11
  225. package/dist/es/view/fetch-host-app-data/store.js +10 -7
  226. package/dist/es/view/fields/check-box/index.js +17 -18
  227. package/dist/es/view/fields/combo-box/index.js +20 -19
  228. package/dist/es/view/fields/connect-form.js +8 -6
  229. package/dist/es/view/fields/date-input/index.js +17 -14
  230. package/dist/es/view/fields/date-picker/index.js +17 -14
  231. package/dist/es/view/fields/form-item-layout/index.js +15 -15
  232. package/dist/es/view/fields/input-mask/index.js +21 -14
  233. package/dist/es/view/fields/large-text-box/index.js +17 -14
  234. package/dist/es/view/fields/radio/index.js +17 -18
  235. package/dist/es/view/fields/radio-group/index.js +15 -15
  236. package/dist/es/view/fields/text-box/index.js +17 -14
  237. package/dist/es/view/fields/watch-value.js +20 -24
  238. package/dist/es/view/form/index.js +23 -22
  239. package/dist/es/view/form/personal-info-section.js +28 -48
  240. package/dist/es/view/form/submit-button/index.js +13 -10
  241. package/dist/es/view/guest-unload-handlers/index.js +10 -9
  242. package/dist/es/view/header/center-region/index.js +41 -23
  243. package/dist/es/view/header/index.js +16 -15
  244. package/dist/es/view/header/logo-region/index.js +9 -9
  245. package/dist/es/view/header/nav-region/index.js +21 -13
  246. package/dist/es/view/header/nav-region/notification/index.js +6 -6
  247. package/dist/es/view/header/nav-region/user/index.js +6 -6
  248. package/dist/es/view/host-binding-events/index.js +7 -3
  249. package/dist/es/view/intro.stories.mdx +1 -1
  250. package/dist/es/view/live-message/index.js +13 -22
  251. package/dist/es/view/loadable/index.js +13 -15
  252. package/dist/es/view/login/index.js +12 -15
  253. package/dist/es/view/media-breakpoint/index.js +16 -13
  254. package/dist/es/view/message-to-host-app/index.js +10 -9
  255. package/dist/es/view/micro-app/app-factory/index.js +67 -82
  256. package/dist/es/view/micro-app/const.js +4 -1
  257. package/dist/es/view/micro-app/index.js +12 -9
  258. package/dist/es/view/micro-app/resources/manifest.js +17 -16
  259. package/dist/es/view/micro-app/resources/script.js +35 -35
  260. package/dist/es/view/micro-app/resources/style.js +22 -21
  261. package/dist/es/view/micro-app/types.js +0 -1
  262. package/dist/es/view/micro-app/use-app-will-render.js +35 -26
  263. package/dist/es/view/micro-app/utils.js +11 -13
  264. package/dist/es/view/micro-iframe-app/app.js +14 -20
  265. package/dist/es/view/micro-iframe-app/iframe/const.js +4 -1
  266. package/dist/es/view/micro-iframe-app/iframe/index.js +27 -31
  267. package/dist/es/view/micro-iframe-app/index.js +10 -10
  268. package/dist/es/view/micro-iframe-app/types.js +0 -1
  269. package/dist/es/view/micro-iframe-app/use-frame-loaded.js +15 -19
  270. package/dist/es/view/modals/error/index.js +13 -10
  271. package/dist/es/view/modals/navigation-prompt/index.js +11 -14
  272. package/dist/es/view/modals/session-expiry/customHooks.js +11 -13
  273. package/dist/es/view/modals/session-expiry/index.js +17 -21
  274. package/dist/es/view/modals/wait-message/html-wait-message.js +11 -10
  275. package/dist/es/view/modals/wait-message/index.js +30 -37
  276. package/dist/es/view/modals/wait-message/wait-message-launcher.js +8 -6
  277. package/dist/es/view/render-with-delay/index.js +8 -10
  278. package/dist/es/view/render-with-host-data/index.js +10 -13
  279. package/dist/es/view/session-timeout/index.js +24 -10
  280. package/dist/es/view/storybook/decorator.js +8 -5
  281. package/dist/es/view/use-previous.js +6 -3
  282. package/dist/es/view/useMediaBreakpoints/index.js +11 -9
  283. package/dist/es/view/visually-hidden/index.js +20 -10
  284. package/dist/es/view/window-size/index.js +12 -10
  285. package/dist/types/communication/http-client/retry.d.ts +1 -1
  286. package/dist/types/data/index.d.ts +4 -0
  287. package/dist/types/data/react-redux.d.ts +11 -11
  288. package/dist/types/data/reducers.d.ts +6 -6
  289. package/dist/types/data/store.d.ts +29 -29
  290. package/dist/types/index.d.ts +79 -79
  291. package/dist/types/micro-frontend.d.ts +6 -0
  292. package/dist/types/route/private-route/index.d.ts +1 -1
  293. package/dist/types/sideeffect/auth/index.d.ts +1 -1
  294. package/dist/types/utils/app-host-integration/react.d.ts +1 -1
  295. package/dist/types/utils/micro-frontend/guest.d.ts +2 -2
  296. package/dist/types/utils/micro-frontend/host.d.ts +1 -1
  297. package/dist/types/utils/micro-frontend/index.d.ts +2 -2
  298. package/dist/types/utils/micro-frontend/types.d.ts +1 -1
  299. package/dist/types/utils/session.d.ts +5 -2
  300. package/dist/types/utils/storybook/cjs/main.d.ts +63 -0
  301. package/dist/types/utils/storybook/{middleware.d.ts → cjs/middleware.d.ts} +0 -0
  302. package/dist/types/utils/storybook/cjs/vite.d.ts +4 -0
  303. package/dist/types/utils/storybook/cjs/webpack.d.ts +16 -0
  304. package/dist/types/utils/storybook/preview.d.ts +9 -3
  305. package/dist/types/utils/testing/render-with-redux.d.ts +20 -20
  306. package/dist/types/utils/testing/render-with-router-redux.d.ts +20 -20
  307. package/dist/types/utils/window.d.ts +1 -1
  308. package/dist/types/view/app-root/index.d.ts +1 -1
  309. package/dist/types/view/fields/check-box/index.stories.d.ts +1 -1
  310. package/dist/types/view/fields/check-box/set-value.stories.d.ts +1 -1
  311. package/dist/types/view/fields/combo-box/index.stories.d.ts +1 -1
  312. package/dist/types/view/fields/date-input/index.stories.d.ts +1 -1
  313. package/dist/types/view/fields/date-picker/index.stories.d.ts +1 -1
  314. package/dist/types/view/fields/form-item-layout/index.stories.d.ts +1 -1
  315. package/dist/types/view/fields/input-mask/index.stories.d.ts +1 -1
  316. package/dist/types/view/fields/large-text-box/index.stories.d.ts +1 -1
  317. package/dist/types/view/fields/radio/index.stories.d.ts +1 -1
  318. package/dist/types/view/fields/radio/set-value.stories.d.ts +1 -1
  319. package/dist/types/view/fields/radio-group/index.stories.d.ts +1 -1
  320. package/dist/types/view/fields/text-box/index.stories.d.ts +1 -1
  321. package/dist/types/view/form/usecases.stories.d.ts +1 -1
  322. package/dist/types/view/header/index.d.ts +1 -1
  323. package/dist/types/view/header/index.stories.d.ts +1 -1
  324. package/dist/types/view/micro-app/app-factory/index.d.ts +2 -2
  325. package/dist/types/view/micro-app/index.d.ts +1 -1
  326. package/dist/types/view/micro-app/resources/script.d.ts +1 -1
  327. package/dist/types/view/micro-app/resources/style.d.ts +1 -1
  328. package/dist/types/view/micro-app/use-app-will-render.d.ts +1 -1
  329. package/dist/types/view/micro-iframe-app/app.d.ts +2 -2
  330. package/dist/types/view/micro-iframe-app/index.d.ts +1 -1
  331. package/dist/types/view/micro-iframe-app/types.d.ts +1 -1
  332. package/dist/types/view/micro-iframe-app/use-frame-loaded.d.ts +1 -1
  333. package/dist/types/view/modals/error/index.stories.d.ts +1 -1
  334. package/dist/types/view/modals/navigation-prompt/index.stories.d.ts +1 -1
  335. package/dist/types/view/modals/session-expiry/index.stories.d.ts +1 -1
  336. package/dist/types/view/modals/wait-message/index.stories.d.ts +1 -1
  337. package/dist/types/view/storybook/decorator.d.ts +1 -1
  338. package/dist/types/view/visually-hidden/index.d.ts +1 -3
  339. package/package.json +36 -25
  340. package/dist/cjs/api/users/index.endpoint.js +0 -14
  341. package/dist/cjs/communication/http-client/tests/hello.endpoint.js +0 -14
  342. package/dist/cjs/communication/http-client/tests/private.endpoint.js +0 -14
  343. package/dist/cjs/utils/storybook/main.js +0 -38
  344. package/dist/cjs/utils/storybook/middleware.js +0 -9
  345. package/dist/cjs/view/error-toast/index.stories.js +0 -128
  346. package/dist/cjs/view/fields/check-box/index.stories.js +0 -64
  347. package/dist/cjs/view/fields/check-box/set-value.stories.js +0 -83
  348. package/dist/cjs/view/fields/combo-box/index.stories.js +0 -65
  349. package/dist/cjs/view/fields/date-input/index.stories.js +0 -53
  350. package/dist/cjs/view/fields/date-input/index1.stories.js +0 -53
  351. package/dist/cjs/view/fields/date-picker/index.stories.js +0 -53
  352. package/dist/cjs/view/fields/form-item-layout/index.stories.js +0 -43
  353. package/dist/cjs/view/fields/input-mask/index.stories.js +0 -52
  354. package/dist/cjs/view/fields/large-text-box/index.stories.js +0 -47
  355. package/dist/cjs/view/fields/radio/index.stories.js +0 -60
  356. package/dist/cjs/view/fields/radio/set-value.stories.js +0 -81
  357. package/dist/cjs/view/fields/radio-group/index.stories.js +0 -85
  358. package/dist/cjs/view/fields/text-box/index.stories.js +0 -48
  359. package/dist/cjs/view/form/index.stories.js +0 -71
  360. package/dist/cjs/view/form/usecases.stories.js +0 -59
  361. package/dist/cjs/view/header/index.stories.js +0 -24
  362. package/dist/cjs/view/live-message/index.stories.js +0 -53
  363. package/dist/cjs/view/media-breakpoint/index.stories.js +0 -24
  364. package/dist/cjs/view/modals/error/index.stories.js +0 -36
  365. package/dist/cjs/view/modals/navigation-prompt/index.stories.js +0 -32
  366. package/dist/cjs/view/modals/session-expiry/index.stories.js +0 -30
  367. package/dist/cjs/view/modals/wait-message/index.stories.js +0 -47
  368. package/dist/cjs/view/session-timeout/index.stories.js +0 -28
  369. package/dist/es/api/users/index.endpoint.js +0 -14
  370. package/dist/es/communication/http-client/tests/hello.endpoint.js +0 -14
  371. package/dist/es/communication/http-client/tests/private.endpoint.js +0 -14
  372. package/dist/es/utils/storybook/main.js +0 -38
  373. package/dist/es/utils/storybook/middleware.js +0 -9
  374. package/dist/es/view/error-toast/index.stories.js +0 -108
  375. package/dist/es/view/fields/check-box/index.stories.js +0 -47
  376. package/dist/es/view/fields/check-box/set-value.stories.js +0 -65
  377. package/dist/es/view/fields/combo-box/index.stories.js +0 -48
  378. package/dist/es/view/fields/date-input/index.stories.js +0 -35
  379. package/dist/es/view/fields/date-input/index1.stories.js +0 -35
  380. package/dist/es/view/fields/date-picker/index.stories.js +0 -35
  381. package/dist/es/view/fields/form-item-layout/index.stories.js +0 -27
  382. package/dist/es/view/fields/input-mask/index.stories.js +0 -35
  383. package/dist/es/view/fields/large-text-box/index.stories.js +0 -30
  384. package/dist/es/view/fields/radio/index.stories.js +0 -43
  385. package/dist/es/view/fields/radio/set-value.stories.js +0 -63
  386. package/dist/es/view/fields/radio-group/index.stories.js +0 -68
  387. package/dist/es/view/fields/text-box/index.stories.js +0 -31
  388. package/dist/es/view/form/index.stories.js +0 -56
  389. package/dist/es/view/form/usecases.stories.js +0 -43
  390. package/dist/es/view/header/index.stories.js +0 -14
  391. package/dist/es/view/live-message/index.stories.js +0 -32
  392. package/dist/es/view/media-breakpoint/index.stories.js +0 -10
  393. package/dist/es/view/modals/error/index.stories.js +0 -21
  394. package/dist/es/view/modals/navigation-prompt/index.stories.js +0 -18
  395. package/dist/es/view/modals/session-expiry/index.stories.js +0 -18
  396. package/dist/es/view/modals/wait-message/index.stories.js +0 -33
  397. package/dist/es/view/session-timeout/index.stories.js +0 -13
  398. package/dist/types/utils/storybook/main.d.ts +0 -30
  399. package/dist/types/view/fields/date-input/index1.stories.d.ts +0 -24
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = exports.Basic = void 0;
9
-
10
- var _jsx2 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
11
-
12
- var _index = require("./index.js");
13
-
14
- var _MediaBreakpoint;
15
-
16
- var _default = {
17
- title: 'Components/MediaBreakpoint',
18
- component: _index.MediaBreakpoint
19
- };
20
- exports.default = _default;
21
-
22
- const Basic = () => _MediaBreakpoint || (_MediaBreakpoint = /*#__PURE__*/(0, _jsx2.default)(_index.MediaBreakpoint, {}));
23
-
24
- exports.Basic = Basic;
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = exports.CloseModal = exports.Basic = void 0;
9
-
10
- var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
11
-
12
- var _index = require("./index.js");
13
-
14
- var _jsxRuntime = require("react/jsx-runtime");
15
-
16
- var _default = {
17
- title: 'Modals/Error',
18
- component: _index.Error
19
- };
20
- exports.default = _default;
21
-
22
- const Template = args => /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Error, { ...args
23
- });
24
-
25
- const Basic = Template.bind({});
26
- exports.Basic = Basic;
27
- Basic.args = {
28
- name: 'Loan',
29
- open: true,
30
- children: /*#__PURE__*/(0, _jsx3.default)("h2", {}, void 0, "This is an error message")
31
- };
32
- const CloseModal = Template.bind({});
33
- exports.CloseModal = CloseModal;
34
- CloseModal.args = { ...Basic.args,
35
- open: false
36
- };
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Close = exports.Basic = void 0;
7
-
8
- var _index = require("./index.js");
9
-
10
- var _jsxRuntime = require("react/jsx-runtime");
11
-
12
- var _default = {
13
- title: 'Modals/NavigationPrompt',
14
- component: _index.NavigationPrompt
15
- };
16
- exports.default = _default;
17
-
18
- const Template = args => /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.NavigationPrompt, { ...args
19
- });
20
-
21
- const Basic = Template.bind({});
22
- exports.Basic = Basic;
23
- Basic.args = {
24
- open: true
25
- };
26
-
27
- const Close = () => Template.bind({});
28
-
29
- exports.Close = Close;
30
- Close.args = {
31
- open: false
32
- };
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Close = exports.Basic = void 0;
7
-
8
- var _index = require("./index.js");
9
-
10
- var _jsxRuntime = require("react/jsx-runtime");
11
-
12
- var _default = {
13
- title: 'Modals/SessionExpiry',
14
- component: _index.SessionExpiry
15
- };
16
- exports.default = _default;
17
-
18
- const Template = args => /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.SessionExpiry, { ...args
19
- });
20
-
21
- const Basic = Template.bind({});
22
- exports.Basic = Basic;
23
- Basic.args = {
24
- open: true
25
- };
26
- const Close = Template.bind({});
27
- exports.Close = Close;
28
- Close.args = {
29
- open: false
30
- };
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Close = exports.Basic = void 0;
7
-
8
- var _react = require("react");
9
-
10
- var _reactRedux = require("../../../data/react-redux.js");
11
-
12
- var _actions = require("../../../data/wait-message/actions.js");
13
-
14
- var _index = require("./index.js");
15
-
16
- var _jsxRuntime = require("react/jsx-runtime");
17
-
18
- const Template = ({
19
- isOpen,
20
- ...rest
21
- }) => {
22
- const dispatch = (0, _reactRedux.useAppDispatch)();
23
- (0, _react.useEffect)(() => {
24
- if (!dispatch) return;
25
- if (isOpen) dispatch(_actions.waitMessage.open());else dispatch(_actions.waitMessage.close());
26
- }, [isOpen, dispatch]);
27
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.WaitMessage, { ...rest
28
- });
29
- };
30
-
31
- var _default = {
32
- title: 'Modals/WaitMessage',
33
- component: _index.WaitMessage
34
- };
35
- exports.default = _default;
36
- const Basic = Template.bind({});
37
- exports.Basic = Basic;
38
- Basic.args = {
39
- size: 'm',
40
- isOpen: true
41
- };
42
- const Close = Template.bind({});
43
- exports.Close = Close;
44
- Close.args = {
45
- size: 'm',
46
- isOpen: false
47
- };
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = exports.Basic = void 0;
9
-
10
- var _jsx2 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
11
-
12
- var _storybookReactRouter = _interopRequireDefault(require("storybook-react-router"));
13
-
14
- var _index = require("./index.js");
15
-
16
- var _SessionTimeout;
17
-
18
- var _default = {
19
- title: 'Components/SessionTimeout',
20
- component: _index.SessionTimeout
21
- };
22
- exports.default = _default;
23
-
24
- const Basic = () => _SessionTimeout || (_SessionTimeout = /*#__PURE__*/(0, _jsx2.default)(_index.SessionTimeout, {})); // eslint-disable-next-line @typescript-eslint/no-unsafe-call
25
-
26
-
27
- exports.Basic = Basic;
28
- Basic.decorators = [(0, _storybookReactRouter.default)()];
@@ -1,14 +0,0 @@
1
- const express = require('express');
2
-
3
- const router = express.Router();
4
-
5
- const users = require("./users.json"); // define the route
6
-
7
-
8
- router.get('/', (req, res) => {
9
- res.json(users);
10
- });
11
-
12
- module.exports = app => {
13
- app.use('/sdk/users', router);
14
- };
@@ -1,14 +0,0 @@
1
- /* Important: This file should use CommonJS import exports rather ES6 import and export */
2
- const express = require('express');
3
-
4
- const router = express.Router(); // define the route
5
-
6
- router.get('/', (req, res) => {
7
- res.json({
8
- name: 'pui-app-sdk'
9
- });
10
- });
11
-
12
- module.exports = app => {
13
- app.use('/hello', router);
14
- };
@@ -1,14 +0,0 @@
1
- /* Important: This file should use CommonJS import exports rather ES6 import and export */
2
- const express = require('express');
3
-
4
- const router = express.Router(); // define the route
5
-
6
- router.get('/', (req, res) => {
7
- if (req.headers.authorization !== 'pui') res.status(401).send('unauthorized');else res.send({
8
- message: 'you are viewing a private message'
9
- });
10
- });
11
-
12
- module.exports = app => {
13
- app.use('/private', router);
14
- };
@@ -1,38 +0,0 @@
1
- const {
2
- webpackFinal,
3
- managerWebpack
4
- } = require('@elliemae/pui-cli/lib/webpack/webpack.storybook');
5
-
6
- module.exports = {
7
- stories: ['../@(lib|app)/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
8
- addons: ['@storybook/addon-storysource', {
9
- name: '@storybook/addon-docs',
10
- options: {
11
- sourceLoaderOptions: {
12
- parser: 'typescript',
13
- injectStoryParameters: false
14
- }
15
- }
16
- }, '@storybook/addon-knobs', '@storybook/addon-controls', '@storybook/addon-a11y', '@storybook/addon-actions', '@storybook/addon-backgrounds', '@storybook/addon-viewport', '@storybook/addon-toolbars', '@storybook/addon-links', '@storybook/addon-events'],
17
- managerWebpack,
18
- webpackFinal,
19
- core: {
20
- builder: 'webpack5'
21
- },
22
- reactOptions: {
23
- fastRefresh: false
24
- },
25
- typescript: {
26
- check: true,
27
- checkOptions: {},
28
- reactDocgen: 'react-docgen-typescript',
29
- reactDocgenTypescriptOptions: {
30
- shouldExtractLiteralValuesFromEnum: true,
31
- propFilter: prop => prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
32
- compilerOptions: {
33
- allowSyntheticDefaultImports: false,
34
- esModuleInterop: false
35
- }
36
- }
37
- }
38
- };
@@ -1,9 +0,0 @@
1
- const {
2
- loadRoutes
3
- } = require('@elliemae/pui-cli');
4
-
5
- const expressMiddleWare = router => {
6
- loadRoutes(router);
7
- };
8
-
9
- module.exports = expressMiddleWare;
@@ -1,108 +0,0 @@
1
- import _jsx from "@babel/runtime/helpers/jsx";
2
-
3
- var _ErrorToast, _Renderer, _Renderer2;
4
-
5
- import { useEffect, useState } from 'react';
6
- import { ToastType } from '@elliemae/ds-toast';
7
- import DSButton from '@elliemae/ds-button';
8
- import { useAppDispatch } from "../../data/react-redux.js";
9
- import { error } from "../../index.js";
10
- import { ErrorToast } from "./index.js";
11
- import { Fragment as _Fragment } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
- import { jsx as _jsx2 } from "react/jsx-runtime";
14
- export default {
15
- title: 'Components/ErrorToast',
16
- Component: ErrorToast
17
- };
18
-
19
- const Renderer = ({
20
- Comp
21
- }) => {
22
- const [show, setShow] = useState(false);
23
- useEffect(() => {
24
- setShow(true);
25
- }, []);
26
- return /*#__PURE__*/_jsxs(_Fragment, {
27
- children: [_ErrorToast || (_ErrorToast = /*#__PURE__*/_jsx(ErrorToast, {})), show ? /*#__PURE__*/_jsx(Comp, {}) : null]
28
- });
29
- };
30
-
31
- const Basic = () => {
32
- const dispatch = useAppDispatch();
33
- useEffect(() => {
34
- dispatch(error.set({
35
- description: 'This is Error Toast'
36
- }));
37
- }, [dispatch]);
38
- return /*#__PURE__*/_jsx2(_Fragment, {});
39
- };
40
-
41
- export const BasicError = () => _Renderer || (_Renderer = /*#__PURE__*/_jsx(Renderer, {
42
- Comp: Basic
43
- })); // Action wrappers for readability
44
-
45
- const showToast = ({
46
- messageText = 'Toast Message',
47
- type = ToastType.DEFAULT,
48
- ...props
49
- }) => error.set({
50
- type,
51
- messageText,
52
- messageTitle: type,
53
- containerId: 'app-toast',
54
- ...props
55
- });
56
-
57
- const successToast = props => showToast({ ...props,
58
- type: ToastType.SUCCESS
59
- });
60
-
61
- const infoToast = props => showToast({ ...props,
62
- type: ToastType.INFO
63
- });
64
-
65
- const warningToast = props => showToast({ ...props,
66
- type: ToastType.WARNING
67
- });
68
-
69
- const errorToast = props => showToast({ ...props,
70
- type: ToastType.ERROR
71
- });
72
-
73
- const ToastButton = ({
74
- labelText,
75
- onClick
76
- }) => /*#__PURE__*/_jsx(DSButton, {
77
- buttonType: "text",
78
- labelText: labelText,
79
- onClick: onClick
80
- });
81
-
82
- const ToastMultipleTypes = () => {
83
- const dispatch = useAppDispatch();
84
-
85
- const openToast = toastAction => () => dispatch(toastAction({
86
- description: 'This is Error Toast'
87
- }));
88
-
89
- return /*#__PURE__*/_jsxs(_Fragment, {
90
- children: [/*#__PURE__*/_jsx(ToastButton, {
91
- labelText: "Success",
92
- onClick: openToast(successToast)
93
- }), /*#__PURE__*/_jsx(ToastButton, {
94
- labelText: "Info",
95
- onClick: openToast(infoToast)
96
- }), /*#__PURE__*/_jsx(ToastButton, {
97
- labelText: "Warning",
98
- onClick: openToast(warningToast)
99
- }), /*#__PURE__*/_jsx(ToastButton, {
100
- labelText: "Error",
101
- onClick: openToast(errorToast)
102
- })]
103
- });
104
- };
105
-
106
- export const ToastDifferentTypes = () => _Renderer2 || (_Renderer2 = /*#__PURE__*/_jsx(Renderer, {
107
- Comp: ToastMultipleTypes
108
- }));
@@ -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-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
- };