@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.
- package/dist/cjs/analytics/appdynamics.js +34 -30
- package/dist/cjs/analytics/index.js +32 -26
- package/dist/cjs/analytics/page-view-event.js +34 -30
- package/dist/cjs/analytics/user-session-event.js +34 -27
- package/dist/cjs/analytics/user-wait-event.js +31 -17
- package/dist/cjs/analytics/web-analytics.js +16 -19
- package/dist/cjs/api/auth/index.js +41 -39
- package/dist/cjs/api/helpers.js +33 -99
- package/dist/cjs/api/users/index.js +28 -16
- package/dist/cjs/communication/http-client/index.js +44 -48
- package/dist/cjs/communication/http-client/request-interceptor.js +28 -12
- package/dist/cjs/communication/http-client/response-interceptor.js +41 -38
- package/dist/cjs/communication/http-client/retry-axios.js +68 -122
- package/dist/cjs/communication/http-client/retry.js +42 -36
- package/dist/cjs/communication/http-client/tests/index.test-disable.js +48 -56
- package/dist/cjs/data/auth/actions.js +17 -26
- package/dist/cjs/data/auth/reducer.js +30 -18
- package/dist/cjs/data/breakpoint/index.js +38 -32
- package/dist/cjs/data/error/index.js +33 -18
- package/dist/cjs/data/index.js +34 -0
- package/dist/cjs/data/live-message/index.js +34 -25
- package/dist/cjs/data/logout/actions.js +12 -9
- package/dist/cjs/data/navigation-prompt/actions.js +12 -9
- package/dist/cjs/data/react-redux.js +29 -13
- package/dist/cjs/data/reducers.js +35 -23
- package/dist/cjs/data/saga.js +12 -9
- package/dist/cjs/data/store.js +52 -60
- package/dist/cjs/data/wait-message/actions.js +14 -13
- package/dist/cjs/data/wait-message/reducer.js +32 -24
- package/dist/cjs/index.js +189 -809
- package/dist/cjs/micro-frontend.js +33 -0
- package/dist/cjs/route/index.js +38 -32
- package/dist/cjs/route/page-view.js +30 -22
- package/dist/cjs/route/private-route/index.js +53 -60
- package/dist/cjs/sideeffect/auth/index.js +42 -30
- package/dist/cjs/sideeffect/error-toast/index.js +39 -26
- package/dist/cjs/sideeffect/wait-message/index.js +45 -29
- package/dist/cjs/typings/custom.d.js +0 -1
- package/dist/cjs/typings/elliemae.d.js +0 -1
- package/dist/cjs/typings/styled.d.js +19 -3
- package/dist/cjs/utils/app-config/config.js +33 -33
- package/dist/cjs/utils/app-config/index.js +42 -44
- package/dist/cjs/utils/app-host-integration/react.js +27 -14
- package/dist/cjs/utils/auth/helper.js +30 -18
- package/dist/cjs/utils/auth/index.js +76 -116
- package/dist/cjs/utils/await.js +3 -0
- package/dist/cjs/utils/constants.js +22 -21
- package/dist/cjs/utils/font-size.js +13 -14
- package/dist/cjs/utils/guest-with-service.js +11 -12
- package/dist/cjs/utils/helpers.js +15 -19
- package/dist/cjs/utils/history.js +29 -12
- package/dist/cjs/utils/log-records.js +38 -35
- package/dist/cjs/utils/micro-frontend/console-logger.js +39 -23
- package/dist/cjs/utils/micro-frontend/guest.js +80 -128
- package/dist/cjs/utils/micro-frontend/host.js +84 -124
- package/dist/cjs/utils/micro-frontend/index.js +60 -61
- package/dist/cjs/utils/micro-frontend/types.js +3 -5
- package/dist/cjs/utils/redact-pii.js +15 -17
- package/dist/cjs/utils/service-worker.js +36 -21
- package/dist/cjs/utils/session.js +64 -70
- package/dist/cjs/utils/storybook/cjs/main.js +53 -0
- package/dist/cjs/utils/storybook/cjs/middleware.js +5 -0
- package/dist/cjs/utils/storybook/cjs/vite.js +6 -0
- package/dist/cjs/utils/storybook/cjs/webpack.js +21 -0
- package/dist/cjs/utils/storybook/manager.js +31 -16
- package/dist/cjs/utils/storybook/preview.js +58 -50
- package/dist/cjs/utils/storybook/theme.js +30 -14
- package/dist/cjs/utils/testing/index.js +39 -50
- package/dist/cjs/utils/testing/render-with-redux.js +35 -27
- package/dist/cjs/utils/testing/render-with-router-redux.js +41 -37
- package/dist/cjs/utils/testing/render-with-router.js +35 -28
- package/dist/cjs/utils/testing/render-with-state-addons.js +41 -36
- package/dist/cjs/utils/types.js +3 -0
- package/dist/cjs/utils/url.js +12 -13
- package/dist/cjs/utils/web-storage.js +40 -30
- package/dist/cjs/utils/window.js +36 -28
- package/dist/cjs/view/app-root/hosted-app.js +36 -32
- package/dist/cjs/view/app-root/index.js +58 -62
- package/dist/cjs/view/app-root/stand-alone-app.js +39 -37
- package/dist/cjs/view/app-root/style.js +50 -12
- package/dist/cjs/view/error-boundary/default-error-template.js +27 -15
- package/dist/cjs/view/error-boundary/index.js +41 -43
- package/dist/cjs/view/error-toast/index.js +43 -32
- package/dist/cjs/view/fetch-host-app-data/index.js +34 -26
- package/dist/cjs/view/fetch-host-app-data/store.js +31 -24
- package/dist/cjs/view/fields/check-box/index.js +35 -39
- package/dist/cjs/view/fields/combo-box/index.js +38 -31
- package/dist/cjs/view/fields/connect-form.js +30 -15
- package/dist/cjs/view/fields/date-input/index.js +35 -26
- package/dist/cjs/view/fields/date-picker/index.js +35 -26
- package/dist/cjs/view/fields/form-item-layout/index.js +37 -30
- package/dist/cjs/view/fields/input-mask/index.js +36 -41
- package/dist/cjs/view/fields/large-text-box/index.js +35 -26
- package/dist/cjs/view/fields/radio/index.js +35 -30
- package/dist/cjs/view/fields/radio-group/index.js +33 -27
- package/dist/cjs/view/fields/text-box/index.js +35 -26
- package/dist/cjs/view/fields/watch-value.js +42 -35
- package/dist/cjs/view/form/index.js +42 -34
- package/dist/cjs/view/form/personal-info-section.js +57 -80
- package/dist/cjs/view/form/submit-button/index.js +35 -23
- package/dist/cjs/view/guest-unload-handlers/index.js +33 -22
- package/dist/cjs/view/header/center-region/index.js +62 -38
- package/dist/cjs/view/header/index.js +42 -35
- package/dist/cjs/view/header/logo-region/index.js +32 -23
- package/dist/cjs/view/header/nav-region/index.js +45 -30
- package/dist/cjs/view/header/nav-region/notification/index.js +29 -18
- package/dist/cjs/view/header/nav-region/user/index.js +29 -18
- package/dist/cjs/view/host-binding-events/index.js +10 -11
- package/dist/cjs/view/intro.stories.mdx +1 -1
- package/dist/cjs/view/live-message/index.js +34 -34
- package/dist/cjs/view/loadable/index.js +34 -27
- package/dist/cjs/view/login/index.js +37 -30
- package/dist/cjs/view/media-breakpoint/index.js +44 -34
- package/dist/cjs/view/message-to-host-app/index.js +31 -20
- package/dist/cjs/view/micro-app/app-factory/index.js +100 -134
- package/dist/cjs/view/micro-app/const.js +10 -7
- package/dist/cjs/view/micro-app/index.js +38 -27
- package/dist/cjs/view/micro-app/resources/manifest.js +43 -34
- package/dist/cjs/view/micro-app/resources/script.js +56 -53
- package/dist/cjs/view/micro-app/resources/style.js +44 -38
- package/dist/cjs/view/micro-app/types.js +3 -5
- package/dist/cjs/view/micro-app/use-app-will-render.js +58 -50
- package/dist/cjs/view/micro-app/utils.js +32 -21
- package/dist/cjs/view/micro-iframe-app/app.js +38 -39
- package/dist/cjs/view/micro-iframe-app/iframe/const.js +10 -7
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +52 -47
- package/dist/cjs/view/micro-iframe-app/index.js +37 -24
- package/dist/cjs/view/micro-iframe-app/types.js +3 -5
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +42 -36
- package/dist/cjs/view/modals/error/index.js +36 -28
- package/dist/cjs/view/modals/navigation-prompt/index.js +39 -37
- package/dist/cjs/view/modals/session-expiry/customHooks.js +40 -35
- package/dist/cjs/view/modals/session-expiry/index.js +46 -50
- package/dist/cjs/view/modals/wait-message/html-wait-message.js +33 -18
- package/dist/cjs/view/modals/wait-message/index.js +51 -53
- package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +34 -21
- package/dist/cjs/view/render-with-delay/index.js +31 -19
- package/dist/cjs/view/render-with-host-data/index.js +36 -30
- package/dist/cjs/view/session-timeout/index.js +45 -35
- package/dist/cjs/view/storybook/decorator.js +33 -21
- package/dist/cjs/view/use-previous.js +29 -13
- package/dist/cjs/view/useMediaBreakpoints/index.js +34 -19
- package/dist/cjs/view/visually-hidden/index.js +42 -21
- package/dist/cjs/view/window-size/index.js +35 -22
- package/dist/es/analytics/appdynamics.js +14 -15
- package/dist/es/analytics/index.js +8 -14
- package/dist/es/analytics/page-view-event.js +11 -21
- package/dist/es/analytics/user-session-event.js +11 -13
- package/dist/es/analytics/user-wait-event.js +9 -5
- package/dist/es/analytics/web-analytics.js +12 -10
- package/dist/es/api/auth/index.js +21 -26
- package/dist/es/api/helpers.js +8 -81
- package/dist/es/api/users/index.js +6 -7
- package/dist/es/communication/http-client/index.js +19 -25
- package/dist/es/communication/http-client/request-interceptor.js +5 -2
- package/dist/es/communication/http-client/response-interceptor.js +20 -21
- package/dist/es/communication/http-client/retry-axios.js +45 -105
- package/dist/es/communication/http-client/retry.js +22 -25
- package/dist/es/communication/http-client/tests/index.test-disable.js +25 -44
- package/dist/es/data/auth/actions.js +13 -19
- package/dist/es/data/auth/reducer.js +8 -6
- package/dist/es/data/breakpoint/index.js +19 -21
- package/dist/es/data/error/index.js +11 -9
- package/dist/es/data/index.js +11 -0
- package/dist/es/data/live-message/index.js +12 -16
- package/dist/es/data/logout/actions.js +9 -5
- package/dist/es/data/navigation-prompt/actions.js +9 -5
- package/dist/es/data/react-redux.js +7 -3
- package/dist/es/data/reducers.js +6 -3
- package/dist/es/data/saga.js +8 -5
- package/dist/es/data/store.js +25 -43
- package/dist/es/data/wait-message/actions.js +11 -9
- package/dist/es/data/wait-message/reducer.js +9 -9
- package/dist/es/index.js +192 -83
- package/dist/es/micro-frontend.js +10 -0
- package/dist/es/route/index.js +16 -18
- package/dist/es/route/page-view.js +8 -8
- package/dist/es/route/private-route/index.js +24 -31
- package/dist/es/sideeffect/auth/index.js +24 -11
- package/dist/es/sideeffect/error-toast/index.js +11 -10
- package/dist/es/sideeffect/wait-message/index.js +14 -10
- package/dist/es/typings/styled.d.js +1 -1
- package/dist/es/utils/app-config/config.js +11 -9
- package/dist/es/utils/app-config/index.js +17 -27
- package/dist/es/utils/app-host-integration/react.js +8 -6
- package/dist/es/utils/auth/helper.js +7 -3
- package/dist/es/utils/auth/index.js +51 -75
- package/dist/es/utils/constants.js +18 -13
- package/dist/es/utils/font-size.js +7 -3
- package/dist/es/utils/guest-with-service.js +6 -7
- package/dist/es/utils/helpers.js +10 -6
- package/dist/es/utils/history.js +7 -3
- package/dist/es/utils/log-records.js +34 -31
- package/dist/es/utils/micro-frontend/console-logger.js +16 -12
- package/dist/es/utils/micro-frontend/guest.js +44 -100
- package/dist/es/utils/micro-frontend/host.js +41 -77
- package/dist/es/utils/micro-frontend/index.js +35 -33
- package/dist/es/utils/micro-frontend/types.js +0 -1
- package/dist/es/utils/redact-pii.js +10 -11
- package/dist/es/utils/service-worker.js +13 -10
- package/dist/es/utils/session.js +45 -46
- package/dist/es/utils/storybook/manager.js +7 -4
- package/dist/es/utils/storybook/preview.js +27 -24
- package/dist/es/utils/storybook/theme.js +9 -6
- package/dist/es/utils/testing/index.js +12 -18
- package/dist/es/utils/testing/render-with-redux.js +12 -11
- package/dist/es/utils/testing/render-with-router-redux.js +18 -19
- package/dist/es/utils/testing/render-with-router.js +15 -16
- package/dist/es/utils/testing/render-with-state-addons.js +19 -18
- package/dist/es/utils/url.js +7 -3
- package/dist/es/utils/web-storage.js +21 -17
- package/dist/es/utils/window.js +18 -18
- package/dist/es/view/app-root/hosted-app.js +10 -13
- package/dist/es/view/app-root/index.js +29 -33
- package/dist/es/view/app-root/stand-alone-app.js +11 -12
- package/dist/es/view/app-root/style.js +30 -5
- package/dist/es/view/error-boundary/default-error-template.js +5 -5
- package/dist/es/view/error-boundary/index.js +18 -25
- package/dist/es/view/error-toast/index.js +15 -14
- package/dist/es/view/fetch-host-app-data/index.js +14 -11
- package/dist/es/view/fetch-host-app-data/store.js +10 -7
- package/dist/es/view/fields/check-box/index.js +17 -18
- package/dist/es/view/fields/combo-box/index.js +20 -19
- package/dist/es/view/fields/connect-form.js +8 -6
- package/dist/es/view/fields/date-input/index.js +17 -14
- package/dist/es/view/fields/date-picker/index.js +17 -14
- package/dist/es/view/fields/form-item-layout/index.js +15 -15
- package/dist/es/view/fields/input-mask/index.js +21 -14
- package/dist/es/view/fields/large-text-box/index.js +17 -14
- package/dist/es/view/fields/radio/index.js +17 -18
- package/dist/es/view/fields/radio-group/index.js +15 -15
- package/dist/es/view/fields/text-box/index.js +17 -14
- package/dist/es/view/fields/watch-value.js +20 -24
- package/dist/es/view/form/index.js +23 -22
- package/dist/es/view/form/personal-info-section.js +28 -48
- package/dist/es/view/form/submit-button/index.js +13 -10
- package/dist/es/view/guest-unload-handlers/index.js +10 -9
- package/dist/es/view/header/center-region/index.js +41 -23
- package/dist/es/view/header/index.js +16 -15
- package/dist/es/view/header/logo-region/index.js +10 -10
- package/dist/es/view/header/nav-region/index.js +21 -13
- package/dist/es/view/header/nav-region/notification/index.js +7 -7
- package/dist/es/view/header/nav-region/user/index.js +7 -7
- package/dist/es/view/host-binding-events/index.js +7 -3
- package/dist/es/view/intro.stories.mdx +1 -1
- package/dist/es/view/live-message/index.js +13 -22
- package/dist/es/view/loadable/index.js +13 -15
- package/dist/es/view/login/index.js +12 -15
- package/dist/es/view/media-breakpoint/index.js +16 -13
- package/dist/es/view/message-to-host-app/index.js +10 -9
- package/dist/es/view/micro-app/app-factory/index.js +67 -81
- package/dist/es/view/micro-app/const.js +4 -1
- package/dist/es/view/micro-app/index.js +12 -9
- package/dist/es/view/micro-app/resources/manifest.js +17 -15
- package/dist/es/view/micro-app/resources/script.js +35 -35
- package/dist/es/view/micro-app/resources/style.js +22 -21
- package/dist/es/view/micro-app/types.js +0 -1
- package/dist/es/view/micro-app/use-app-will-render.js +35 -26
- package/dist/es/view/micro-app/utils.js +11 -13
- package/dist/es/view/micro-iframe-app/app.js +14 -20
- package/dist/es/view/micro-iframe-app/iframe/const.js +4 -1
- package/dist/es/view/micro-iframe-app/iframe/index.js +27 -31
- package/dist/es/view/micro-iframe-app/index.js +10 -10
- package/dist/es/view/micro-iframe-app/types.js +0 -1
- package/dist/es/view/micro-iframe-app/use-frame-loaded.js +15 -18
- package/dist/es/view/modals/error/index.js +13 -10
- package/dist/es/view/modals/navigation-prompt/index.js +11 -14
- package/dist/es/view/modals/session-expiry/customHooks.js +11 -13
- package/dist/es/view/modals/session-expiry/index.js +13 -20
- package/dist/es/view/modals/wait-message/html-wait-message.js +11 -10
- package/dist/es/view/modals/wait-message/index.js +30 -37
- package/dist/es/view/modals/wait-message/wait-message-launcher.js +8 -6
- package/dist/es/view/render-with-delay/index.js +8 -10
- package/dist/es/view/render-with-host-data/index.js +10 -13
- package/dist/es/view/session-timeout/index.js +19 -9
- package/dist/es/view/storybook/decorator.js +8 -5
- package/dist/es/view/use-previous.js +6 -3
- package/dist/es/view/useMediaBreakpoints/index.js +11 -9
- package/dist/es/view/visually-hidden/index.js +20 -10
- package/dist/es/view/window-size/index.js +12 -10
- package/dist/types/communication/http-client/retry.d.ts +1 -1
- package/dist/types/data/index.d.ts +4 -0
- package/dist/types/data/react-redux.d.ts +11 -11
- package/dist/types/data/reducers.d.ts +6 -6
- package/dist/types/data/store.d.ts +29 -29
- package/dist/types/index.d.ts +79 -79
- package/dist/types/micro-frontend.d.ts +6 -0
- package/dist/types/route/private-route/index.d.ts +1 -1
- package/dist/types/sideeffect/auth/index.d.ts +1 -1
- package/dist/types/utils/app-host-integration/react.d.ts +1 -1
- package/dist/types/utils/micro-frontend/guest.d.ts +3 -3
- package/dist/types/utils/micro-frontend/host.d.ts +1 -1
- package/dist/types/utils/micro-frontend/index.d.ts +2 -2
- package/dist/types/utils/micro-frontend/types.d.ts +1 -1
- package/dist/types/utils/storybook/cjs/main.d.ts +63 -0
- package/dist/types/utils/storybook/{middleware.d.ts → cjs/middleware.d.ts} +0 -0
- package/dist/types/utils/storybook/cjs/vite.d.ts +4 -0
- package/dist/types/utils/storybook/cjs/webpack.d.ts +16 -0
- package/dist/types/utils/storybook/preview.d.ts +9 -3
- package/dist/types/utils/testing/render-with-redux.d.ts +20 -20
- package/dist/types/utils/testing/render-with-router-redux.d.ts +20 -20
- package/dist/types/utils/window.d.ts +1 -1
- package/dist/types/view/app-root/index.d.ts +1 -1
- package/dist/types/view/fields/check-box/index.d.ts +1 -1
- package/dist/types/view/fields/check-box/index.stories.d.ts +1 -1
- package/dist/types/view/fields/check-box/set-value.stories.d.ts +1 -1
- package/dist/types/view/fields/combo-box/index.stories.d.ts +1 -1
- package/dist/types/view/fields/date-input/index.stories.d.ts +1 -1
- package/dist/types/view/fields/date-picker/index.stories.d.ts +1 -1
- package/dist/types/view/fields/form-item-layout/index.stories.d.ts +1 -1
- package/dist/types/view/fields/input-mask/index.d.ts +1 -1
- package/dist/types/view/fields/input-mask/index.stories.d.ts +1 -1
- package/dist/types/view/fields/large-text-box/index.stories.d.ts +1 -1
- package/dist/types/view/fields/radio/index.stories.d.ts +1 -1
- package/dist/types/view/fields/radio/set-value.stories.d.ts +1 -1
- package/dist/types/view/fields/radio-group/index.stories.d.ts +1 -1
- package/dist/types/view/fields/text-box/index.stories.d.ts +1 -1
- package/dist/types/view/form/usecases.stories.d.ts +1 -1
- package/dist/types/view/header/index.d.ts +1 -1
- package/dist/types/view/header/index.stories.d.ts +1 -1
- package/dist/types/view/micro-app/app-factory/index.d.ts +3 -3
- package/dist/types/view/micro-app/index.d.ts +1 -1
- package/dist/types/view/micro-app/resources/manifest.d.ts +2 -2
- package/dist/types/view/micro-app/resources/script.d.ts +1 -1
- package/dist/types/view/micro-app/resources/style.d.ts +1 -1
- package/dist/types/view/micro-app/use-app-will-render.d.ts +1 -1
- package/dist/types/view/micro-iframe-app/app.d.ts +2 -2
- package/dist/types/view/micro-iframe-app/index.d.ts +1 -1
- package/dist/types/view/micro-iframe-app/types.d.ts +1 -1
- package/dist/types/view/micro-iframe-app/use-frame-loaded.d.ts +1 -1
- package/dist/types/view/modals/error/index.stories.d.ts +1 -1
- package/dist/types/view/modals/navigation-prompt/index.stories.d.ts +1 -1
- package/dist/types/view/modals/session-expiry/index.stories.d.ts +1 -1
- package/dist/types/view/modals/wait-message/index.stories.d.ts +1 -1
- package/dist/types/view/storybook/decorator.d.ts +1 -1
- package/dist/types/view/visually-hidden/index.d.ts +1 -3
- package/package.json +34 -15
- package/dist/cjs/api/users/index.endpoint.js +0 -14
- package/dist/cjs/communication/http-client/tests/hello.endpoint.js +0 -14
- package/dist/cjs/communication/http-client/tests/private.endpoint.js +0 -14
- package/dist/cjs/utils/storybook/main.js +0 -38
- package/dist/cjs/utils/storybook/middleware.js +0 -9
- package/dist/cjs/view/error-toast/index.stories.js +0 -128
- package/dist/cjs/view/fields/check-box/index.stories.js +0 -64
- package/dist/cjs/view/fields/check-box/set-value.stories.js +0 -83
- package/dist/cjs/view/fields/combo-box/index.stories.js +0 -65
- package/dist/cjs/view/fields/date-input/index.stories.js +0 -53
- package/dist/cjs/view/fields/date-input/index1.stories.js +0 -53
- package/dist/cjs/view/fields/date-picker/index.stories.js +0 -53
- package/dist/cjs/view/fields/form-item-layout/index.stories.js +0 -43
- package/dist/cjs/view/fields/input-mask/index.stories.js +0 -52
- package/dist/cjs/view/fields/large-text-box/index.stories.js +0 -47
- package/dist/cjs/view/fields/radio/index.stories.js +0 -60
- package/dist/cjs/view/fields/radio/set-value.stories.js +0 -81
- package/dist/cjs/view/fields/radio-group/index.stories.js +0 -85
- package/dist/cjs/view/fields/text-box/index.stories.js +0 -48
- package/dist/cjs/view/form/index.stories.js +0 -71
- package/dist/cjs/view/form/usecases.stories.js +0 -59
- package/dist/cjs/view/header/index.stories.js +0 -24
- package/dist/cjs/view/live-message/index.stories.js +0 -53
- package/dist/cjs/view/media-breakpoint/index.stories.js +0 -24
- package/dist/cjs/view/modals/error/index.stories.js +0 -36
- package/dist/cjs/view/modals/navigation-prompt/index.stories.js +0 -32
- package/dist/cjs/view/modals/session-expiry/index.stories.js +0 -30
- package/dist/cjs/view/modals/wait-message/index.stories.js +0 -47
- package/dist/cjs/view/session-timeout/index.stories.js +0 -28
- package/dist/es/api/users/index.endpoint.js +0 -14
- package/dist/es/communication/http-client/tests/hello.endpoint.js +0 -14
- package/dist/es/communication/http-client/tests/private.endpoint.js +0 -14
- package/dist/es/utils/storybook/main.js +0 -38
- package/dist/es/utils/storybook/middleware.js +0 -9
- package/dist/es/view/error-toast/index.stories.js +0 -108
- package/dist/es/view/fields/check-box/index.stories.js +0 -47
- package/dist/es/view/fields/check-box/set-value.stories.js +0 -65
- package/dist/es/view/fields/combo-box/index.stories.js +0 -48
- package/dist/es/view/fields/date-input/index.stories.js +0 -35
- package/dist/es/view/fields/date-input/index1.stories.js +0 -35
- package/dist/es/view/fields/date-picker/index.stories.js +0 -35
- package/dist/es/view/fields/form-item-layout/index.stories.js +0 -27
- package/dist/es/view/fields/input-mask/index.stories.js +0 -35
- package/dist/es/view/fields/large-text-box/index.stories.js +0 -30
- package/dist/es/view/fields/radio/index.stories.js +0 -43
- package/dist/es/view/fields/radio/set-value.stories.js +0 -63
- package/dist/es/view/fields/radio-group/index.stories.js +0 -68
- package/dist/es/view/fields/text-box/index.stories.js +0 -31
- package/dist/es/view/form/index.stories.js +0 -56
- package/dist/es/view/form/usecases.stories.js +0 -43
- package/dist/es/view/header/index.stories.js +0 -14
- package/dist/es/view/live-message/index.stories.js +0 -32
- package/dist/es/view/media-breakpoint/index.stories.js +0 -10
- package/dist/es/view/modals/error/index.stories.js +0 -21
- package/dist/es/view/modals/navigation-prompt/index.stories.js +0 -18
- package/dist/es/view/modals/session-expiry/index.stories.js +0 -18
- package/dist/es/view/modals/wait-message/index.stories.js +0 -33
- package/dist/es/view/session-timeout/index.stories.js +0 -13
- package/dist/types/utils/storybook/main.d.ts +0 -30
- package/dist/types/view/fields/date-input/index1.stories.d.ts +0 -24
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
var _GlobalStyle, _MediaBreakpoint, _WindowSize, _HTMLWaitMessage;
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
6
3
|
import { MediaBreakpoint } from "../media-breakpoint/index.js";
|
|
7
4
|
import { WindowSize } from "../window-size/index.js";
|
|
8
5
|
import { HTMLWaitMessage } from "../modals/wait-message/html-wait-message.js";
|
|
9
6
|
import GlobalStyle from "./style.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
const Div = styled.div`
|
|
8
|
+
height: 100%;
|
|
9
|
+
`;
|
|
10
|
+
const HostedApp = ({ children }) => /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement(GlobalStyle, null), /* @__PURE__ */ React.createElement(MediaBreakpoint, null), /* @__PURE__ */ React.createElement(WindowSize, null), /* @__PURE__ */ React.createElement(HTMLWaitMessage, {
|
|
13
11
|
close: true
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})(["height:100%;"]);
|
|
12
|
+
}), children);
|
|
13
|
+
export {
|
|
14
|
+
HostedApp
|
|
15
|
+
};
|
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Provider } from
|
|
3
|
-
import { ThemeProvider } from
|
|
4
|
-
import { Router } from
|
|
5
|
-
import { getDefaultTheme } from
|
|
6
|
-
import { useInjectSaga } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Provider } from "react-redux";
|
|
3
|
+
import { ThemeProvider } from "styled-components";
|
|
4
|
+
import { Router } from "react-router-dom";
|
|
5
|
+
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
6
|
+
import { useInjectSaga } from "redux-injectors";
|
|
7
7
|
import { isStandAloneGuest, isHost } from "../../utils/micro-frontend/index.js";
|
|
8
8
|
import { waitMessage } from "../../sideeffect/wait-message/index.js";
|
|
9
9
|
import { errorToast } from "../../sideeffect/error-toast/index.js";
|
|
10
10
|
import { ErrorBoundary } from "../error-boundary/index.js";
|
|
11
11
|
import { StandAloneApp } from "./stand-alone-app.js";
|
|
12
12
|
import { HostedApp } from "./hosted-app.js";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
useInjectSaga({
|
|
17
|
-
key: 'waitMessage',
|
|
18
|
-
saga: waitMessage
|
|
19
|
-
});
|
|
20
|
-
useInjectSaga({
|
|
21
|
-
key: 'errorToast',
|
|
22
|
-
saga: errorToast
|
|
23
|
-
});
|
|
13
|
+
const AppToRender = (props) => {
|
|
14
|
+
useInjectSaga({ key: "waitMessage", saga: waitMessage });
|
|
15
|
+
useInjectSaga({ key: "errorToast", saga: errorToast });
|
|
24
16
|
const isParent = isStandAloneGuest() || isHost();
|
|
25
|
-
return isParent ?
|
|
26
|
-
|
|
17
|
+
return isParent ? /* @__PURE__ */ React.createElement(StandAloneApp, {
|
|
18
|
+
...props
|
|
19
|
+
}) : /* @__PURE__ */ React.createElement(HostedApp, {
|
|
20
|
+
...props
|
|
27
21
|
});
|
|
28
22
|
};
|
|
29
|
-
|
|
30
|
-
export const AppRoot = ({
|
|
23
|
+
const AppRoot = ({
|
|
31
24
|
store,
|
|
32
25
|
history,
|
|
33
26
|
theme = getDefaultTheme(),
|
|
@@ -35,15 +28,18 @@ export const AppRoot = ({
|
|
|
35
28
|
WaitMessage,
|
|
36
29
|
errorTemplate,
|
|
37
30
|
children
|
|
38
|
-
}) =>
|
|
39
|
-
errorTemplate
|
|
40
|
-
},
|
|
41
|
-
store
|
|
42
|
-
},
|
|
43
|
-
history
|
|
44
|
-
},
|
|
45
|
-
theme
|
|
46
|
-
},
|
|
47
|
-
manageSession
|
|
48
|
-
WaitMessage
|
|
49
|
-
},
|
|
31
|
+
}) => /* @__PURE__ */ React.createElement(ErrorBoundary, {
|
|
32
|
+
errorTemplate
|
|
33
|
+
}, /* @__PURE__ */ React.createElement(Provider, {
|
|
34
|
+
store
|
|
35
|
+
}, /* @__PURE__ */ React.createElement(Router, {
|
|
36
|
+
history
|
|
37
|
+
}, /* @__PURE__ */ React.createElement(ThemeProvider, {
|
|
38
|
+
theme
|
|
39
|
+
}, /* @__PURE__ */ React.createElement(AppToRender, {
|
|
40
|
+
manageSession,
|
|
41
|
+
WaitMessage
|
|
42
|
+
}, children)))));
|
|
43
|
+
export {
|
|
44
|
+
AppRoot
|
|
45
|
+
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
var _GlobalStyle, _SessionTimeout, _MediaBreakpoint, _WindowSize, _LiveMessage, _DefaultWaitMessage, _ErrorToast;
|
|
5
|
-
|
|
6
|
-
import { LiveAnnouncer } from 'react-aria-live';
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { LiveAnnouncer } from "react-aria-live";
|
|
7
4
|
import { MediaBreakpoint } from "../media-breakpoint/index.js";
|
|
8
5
|
import { WindowSize } from "../window-size/index.js";
|
|
9
6
|
import { SessionTimeout } from "../session-timeout/index.js";
|
|
@@ -11,12 +8,14 @@ import { LiveMessage } from "../live-message/index.js";
|
|
|
11
8
|
import { ErrorToast } from "../error-toast/index.js";
|
|
12
9
|
import { WaitMessage as DefaultWaitMessage } from "../modals/wait-message/index.js";
|
|
13
10
|
import GlobalStyle from "./style.js";
|
|
14
|
-
|
|
11
|
+
const Div = styled.div`
|
|
12
|
+
height: 100%;
|
|
13
|
+
`;
|
|
14
|
+
const StandAloneApp = ({
|
|
15
15
|
manageSession,
|
|
16
16
|
WaitMessage,
|
|
17
17
|
children
|
|
18
|
-
}) =>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})(["height:100%;"]);
|
|
18
|
+
}) => /* @__PURE__ */ React.createElement(LiveAnnouncer, null, /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement(GlobalStyle, null), manageSession && /* @__PURE__ */ React.createElement(SessionTimeout, null), /* @__PURE__ */ React.createElement(MediaBreakpoint, null), /* @__PURE__ */ React.createElement(WindowSize, null), /* @__PURE__ */ React.createElement(LiveMessage, null), WaitMessage || /* @__PURE__ */ React.createElement(DefaultWaitMessage, null), /* @__PURE__ */ React.createElement(ErrorToast, null), children));
|
|
19
|
+
export {
|
|
20
|
+
StandAloneApp
|
|
21
|
+
};
|
|
@@ -1,6 +1,31 @@
|
|
|
1
|
-
import { createGlobalStyle } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { createGlobalStyle } from "styled-components";
|
|
2
|
+
var style_default = createGlobalStyle`
|
|
3
|
+
:root {
|
|
4
|
+
font-size: 81.25%;
|
|
5
|
+
${({ theme }) => theme.media.small`
|
|
5
6
|
font-size: 100%;
|
|
6
|
-
|
|
7
|
+
`};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
html,
|
|
11
|
+
body {
|
|
12
|
+
height: 100%;
|
|
13
|
+
width: 100%;
|
|
14
|
+
line-height: ${(props) => props.theme.lineHeights.m};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
body {
|
|
18
|
+
font-family: ${(props) => props.theme.fonts.default};
|
|
19
|
+
background-color: ${(props) => props.theme.colors.neutral["000"]};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
#app, #app-container, #root, main {
|
|
23
|
+
height: 100%;
|
|
24
|
+
width: 100%;
|
|
25
|
+
min-height: 100%;
|
|
26
|
+
min-width: 100%;
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
export {
|
|
30
|
+
style_default as default
|
|
31
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const DefaultErrorTemplate = () => /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h2", null, "We are unable to process your request"), /* @__PURE__ */ React.createElement("section", null, "Please close your browser and login again"));
|
|
3
|
+
export {
|
|
4
|
+
DefaultErrorTemplate
|
|
5
|
+
};
|
|
@@ -1,43 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
DefaultErrorTemplate
|
|
4
|
+
} from "./default-error-template.js";
|
|
4
5
|
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
5
6
|
import { logRecords } from "../../utils/log-records.js";
|
|
6
|
-
|
|
7
|
+
class ErrorBoundary extends React.Component {
|
|
7
8
|
constructor(props) {
|
|
8
9
|
super(props);
|
|
9
|
-
this.state = {
|
|
10
|
-
error: null,
|
|
11
|
-
errorInfo: null
|
|
12
|
-
};
|
|
10
|
+
this.state = { error: null, errorInfo: null };
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
componentDidCatch(error, errorInfo) {
|
|
16
|
-
// Catch errors in any components below and re-render with error message
|
|
17
13
|
this.setState({
|
|
18
14
|
error,
|
|
19
15
|
errorInfo
|
|
20
16
|
});
|
|
21
17
|
const logger = getLogger();
|
|
22
|
-
if (logger)
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
if (logger)
|
|
19
|
+
logger.error({
|
|
20
|
+
...logRecords.UNHANDLED_ERROR,
|
|
21
|
+
exception: error
|
|
22
|
+
});
|
|
25
23
|
}
|
|
26
|
-
|
|
27
24
|
render() {
|
|
28
|
-
const {
|
|
29
|
-
children,
|
|
30
|
-
errorTemplate
|
|
31
|
-
} = this.props;
|
|
25
|
+
const { children, errorTemplate } = this.props;
|
|
32
26
|
const ErrorTemplate = errorTemplate || DefaultErrorTemplate;
|
|
33
|
-
const {
|
|
27
|
+
const { error, errorInfo } = this.state;
|
|
28
|
+
return errorInfo ? /* @__PURE__ */ React.createElement(ErrorTemplate, {
|
|
34
29
|
error,
|
|
35
30
|
errorInfo
|
|
36
|
-
} = this.state;
|
|
37
|
-
return errorInfo ? /*#__PURE__*/_jsx(ErrorTemplate, {
|
|
38
|
-
error: error,
|
|
39
|
-
errorInfo: errorInfo
|
|
40
31
|
}) : children;
|
|
41
32
|
}
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
ErrorBoundary
|
|
36
|
+
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useEffect, memo } from "react";
|
|
3
|
+
import { ToastPosition, ToastType, DSToast, toast } from "@elliemae/ds-toast";
|
|
3
4
|
import { useAppSelector, useAppDispatch } from "../../data/react-redux.js";
|
|
4
5
|
import { actions as error } from "../../data/error/index.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const storeError = useAppSelector(state => state === null || state === void 0 ? void 0 : state.error);
|
|
6
|
+
const ErrorToast = memo((props) => {
|
|
7
|
+
const storeError = useAppSelector((state) => state?.error);
|
|
8
8
|
const dispatch = useAppDispatch();
|
|
9
9
|
useEffect(() => {
|
|
10
|
-
|
|
11
|
-
if (storeError && (storeError !== null && storeError !== void 0 && storeError.description || storeError !== null && storeError !== void 0 && storeError.messageText)) {
|
|
10
|
+
if (storeError && (storeError?.description || storeError?.messageText)) {
|
|
12
11
|
const toastProps = {
|
|
13
12
|
position: ToastPosition.TOP_RIGHT,
|
|
14
|
-
messageTitle:
|
|
13
|
+
messageTitle: "Error",
|
|
15
14
|
type: ToastType.ERROR,
|
|
16
15
|
...props,
|
|
17
16
|
...storeError
|
|
18
17
|
};
|
|
19
18
|
const messageText = toastProps.description || toastProps.messageText;
|
|
20
|
-
if (messageText)
|
|
21
|
-
messageText,
|
|
22
|
-
...toastProps
|
|
23
|
-
});
|
|
19
|
+
if (messageText)
|
|
20
|
+
toast({ messageText, ...toastProps });
|
|
24
21
|
dispatch(error.clear());
|
|
25
22
|
}
|
|
26
23
|
}, [storeError, props, dispatch]);
|
|
27
|
-
return
|
|
24
|
+
return /* @__PURE__ */ React.createElement(DSToast, {
|
|
25
|
+
...props
|
|
28
26
|
});
|
|
29
|
-
});
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
ErrorToast
|
|
30
|
+
};
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _ from "lodash";
|
|
2
2
|
import { isHostAppDataExist, setHostAppData } from "./store.js";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
sendMessageToHost,
|
|
5
|
+
getHostAppData
|
|
6
|
+
} from "../message-to-host-app/index.js";
|
|
4
7
|
import { bindEvent } from "../host-binding-events/index.js";
|
|
5
|
-
|
|
8
|
+
const fetchHostAppData = (hostedAppUrl, guestAppId) => {
|
|
6
9
|
const isDataExist = isHostAppDataExist();
|
|
7
|
-
return new Promise(resolve => {
|
|
8
|
-
if (!
|
|
10
|
+
return new Promise((resolve) => {
|
|
11
|
+
if (!_.isEmpty(isDataExist)) {
|
|
9
12
|
resolve();
|
|
10
13
|
} else {
|
|
11
|
-
sendMessageToHost({
|
|
12
|
-
|
|
13
|
-
message: 'ready'
|
|
14
|
-
}, hostedAppUrl);
|
|
15
|
-
bindEvent(window, 'message', getHostAppData(setHostAppData, resolve));
|
|
14
|
+
sendMessageToHost({ guestAppId, message: "ready" }, hostedAppUrl);
|
|
15
|
+
bindEvent(window, "message", getHostAppData(setHostAppData, resolve));
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
};
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
fetchHostAppData
|
|
21
|
+
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { get } from "lodash";
|
|
2
2
|
let hostAppData = {};
|
|
3
|
-
|
|
4
|
-
hostAppData = { ...hostAppData,
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const setHostAppData = (appData) => {
|
|
4
|
+
hostAppData = { ...hostAppData, ...appData };
|
|
5
|
+
};
|
|
6
|
+
const getHostAppDataByKey = (key = "", defaultValue = null) => get(hostAppData, key, defaultValue);
|
|
7
|
+
const isHostAppDataExist = () => hostAppData && Object.keys(hostAppData).length > 0;
|
|
8
|
+
export {
|
|
9
|
+
getHostAppDataByKey,
|
|
10
|
+
isHostAppDataExist,
|
|
11
|
+
setHostAppData
|
|
7
12
|
};
|
|
8
|
-
export const getHostAppDataByKey = (key = '', defaultValue = null) => _get(hostAppData, key, defaultValue);
|
|
9
|
-
export const isHostAppDataExist = () => hostAppData && Object.keys(hostAppData).length > 0;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import DSCheckbox, { CHECKBOX_VARIANT } from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import DSCheckbox, { CHECKBOX_VARIANT } from "@elliemae/ds-form/Checkbox";
|
|
3
|
+
import {
|
|
4
|
+
Controller
|
|
5
|
+
} from "react-hook-form";
|
|
6
|
+
const CheckBox = ({
|
|
6
7
|
name,
|
|
7
8
|
defaultChecked = false,
|
|
8
9
|
rules = {},
|
|
9
10
|
...rest
|
|
10
|
-
}) =>
|
|
11
|
-
name
|
|
12
|
-
rules
|
|
13
|
-
render: ({
|
|
14
|
-
|
|
15
|
-
onChange,
|
|
16
|
-
value,
|
|
17
|
-
...restProps
|
|
18
|
-
}
|
|
19
|
-
}) => /*#__PURE__*/_jsx(DSCheckbox, { ...rest,
|
|
11
|
+
}) => /* @__PURE__ */ React.createElement(Controller, {
|
|
12
|
+
name,
|
|
13
|
+
rules,
|
|
14
|
+
render: ({ field: { onChange, value, ...restProps } }) => /* @__PURE__ */ React.createElement(DSCheckbox, {
|
|
15
|
+
...rest,
|
|
20
16
|
...restProps,
|
|
21
|
-
defaultChecked
|
|
17
|
+
defaultChecked,
|
|
22
18
|
checked: value,
|
|
23
|
-
onChange: e => onChange(((e || {}).target || {}).checked)
|
|
19
|
+
onChange: (e) => onChange(((e || {}).target || {}).checked)
|
|
24
20
|
})
|
|
25
21
|
});
|
|
26
|
-
export {
|
|
22
|
+
export {
|
|
23
|
+
CHECKBOX_VARIANT,
|
|
24
|
+
CheckBox
|
|
25
|
+
};
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import DSComboBox from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import DSComboBox from "@elliemae/ds-form/ComboBox";
|
|
3
|
+
import {
|
|
4
|
+
Controller
|
|
5
|
+
} from "react-hook-form";
|
|
6
|
+
const ComboBox = ({
|
|
6
7
|
name,
|
|
7
|
-
defaultValue =
|
|
8
|
+
defaultValue = "",
|
|
8
9
|
rules = {},
|
|
9
10
|
onChange: changeHandler,
|
|
10
11
|
...rest
|
|
11
|
-
}) =>
|
|
12
|
-
name
|
|
13
|
-
rules
|
|
14
|
-
defaultValue
|
|
15
|
-
render: ({
|
|
16
|
-
|
|
17
|
-
onChange,
|
|
18
|
-
...props
|
|
19
|
-
}
|
|
20
|
-
}) => /*#__PURE__*/_jsx(DSComboBox, { ...rest,
|
|
12
|
+
}) => /* @__PURE__ */ React.createElement(Controller, {
|
|
13
|
+
name,
|
|
14
|
+
rules,
|
|
15
|
+
defaultValue,
|
|
16
|
+
render: ({ field: { onChange, ...props } }) => /* @__PURE__ */ React.createElement(DSComboBox, {
|
|
17
|
+
...rest,
|
|
21
18
|
...props,
|
|
22
|
-
onChange: selected => {
|
|
19
|
+
onChange: (selected) => {
|
|
23
20
|
onChange(selected);
|
|
24
|
-
if (changeHandler)
|
|
21
|
+
if (changeHandler)
|
|
22
|
+
changeHandler(selected);
|
|
25
23
|
}
|
|
26
24
|
})
|
|
27
|
-
});
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
ComboBox
|
|
28
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { useFormContext } from
|
|
2
|
-
|
|
3
|
-
children
|
|
4
|
-
}) => {
|
|
1
|
+
import { useFormContext } from "react-hook-form";
|
|
2
|
+
const ConnectForm = ({ children }) => {
|
|
5
3
|
const methods = useFormContext();
|
|
6
|
-
return children({
|
|
4
|
+
return children({
|
|
5
|
+
...methods
|
|
7
6
|
});
|
|
8
|
-
};
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
ConnectForm
|
|
10
|
+
};
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import DSDateInput from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import DSDateInput from "@elliemae/ds-form/DateInput";
|
|
3
|
+
import {
|
|
4
|
+
Controller
|
|
5
|
+
} from "react-hook-form";
|
|
6
|
+
const DateInput = ({
|
|
6
7
|
name,
|
|
7
|
-
defaultValue =
|
|
8
|
+
defaultValue = "",
|
|
8
9
|
rules = {},
|
|
9
10
|
...rest
|
|
10
|
-
}) =>
|
|
11
|
-
name
|
|
12
|
-
rules
|
|
13
|
-
defaultValue
|
|
14
|
-
render: ({
|
|
15
|
-
|
|
16
|
-
}) => /*#__PURE__*/_jsx(DSDateInput, { ...rest,
|
|
11
|
+
}) => /* @__PURE__ */ React.createElement(Controller, {
|
|
12
|
+
name,
|
|
13
|
+
rules,
|
|
14
|
+
defaultValue,
|
|
15
|
+
render: ({ field }) => /* @__PURE__ */ React.createElement(DSDateInput, {
|
|
16
|
+
...rest,
|
|
17
17
|
...field
|
|
18
18
|
})
|
|
19
|
-
});
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
DateInput
|
|
22
|
+
};
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import DSDatePicker from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import DSDatePicker from "@elliemae/ds-date-picker";
|
|
3
|
+
import {
|
|
4
|
+
Controller
|
|
5
|
+
} from "react-hook-form";
|
|
6
|
+
const DatePicker = ({
|
|
6
7
|
name,
|
|
7
|
-
defaultValue =
|
|
8
|
+
defaultValue = "",
|
|
8
9
|
rules = {},
|
|
9
10
|
...rest
|
|
10
|
-
}) =>
|
|
11
|
-
name
|
|
12
|
-
defaultValue
|
|
13
|
-
rules
|
|
14
|
-
render: ({
|
|
15
|
-
|
|
16
|
-
}) => /*#__PURE__*/_jsx(DSDatePicker, { ...rest,
|
|
11
|
+
}) => /* @__PURE__ */ React.createElement(Controller, {
|
|
12
|
+
name,
|
|
13
|
+
defaultValue,
|
|
14
|
+
rules,
|
|
15
|
+
render: ({ field }) => /* @__PURE__ */ React.createElement(DSDatePicker, {
|
|
16
|
+
...rest,
|
|
17
17
|
...field
|
|
18
18
|
})
|
|
19
|
-
});
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
DatePicker
|
|
22
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import DSFormItemLayout from
|
|
3
|
-
import { get } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import DSFormItemLayout from "@elliemae/ds-form/FormItem";
|
|
3
|
+
import { get } from "react-hook-form";
|
|
4
4
|
import { ConnectForm } from "../connect-form.js";
|
|
5
|
-
|
|
6
|
-
export const FormItemLayout = ({
|
|
5
|
+
const FormItemLayout = ({
|
|
7
6
|
name,
|
|
8
7
|
...rest
|
|
9
|
-
}) =>
|
|
10
|
-
formState: {
|
|
11
|
-
errors
|
|
12
|
-
}
|
|
8
|
+
}) => /* @__PURE__ */ React.createElement(ConnectForm, null, ({
|
|
9
|
+
formState: { errors }
|
|
13
10
|
}) => {
|
|
14
11
|
const errorField = get(errors, name);
|
|
15
12
|
const hasError = !!errorField;
|
|
16
|
-
const validationMessage = errorField
|
|
17
|
-
return
|
|
18
|
-
name
|
|
19
|
-
hasError
|
|
20
|
-
validationMessage
|
|
13
|
+
const validationMessage = errorField?.message;
|
|
14
|
+
return /* @__PURE__ */ React.createElement(DSFormItemLayout, {
|
|
15
|
+
name,
|
|
16
|
+
hasError,
|
|
17
|
+
validationMessage,
|
|
21
18
|
...rest
|
|
22
19
|
});
|
|
23
|
-
});
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
FormItemLayout
|
|
23
|
+
};
|
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import DSInputMask, {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import DSInputMask, {
|
|
3
|
+
MASK_TYPES,
|
|
4
|
+
MASK_PIPES
|
|
5
|
+
} from "@elliemae/ds-form/InputMask";
|
|
6
|
+
import {
|
|
7
|
+
Controller
|
|
8
|
+
} from "react-hook-form";
|
|
9
|
+
const InputMask = ({
|
|
6
10
|
name,
|
|
7
|
-
defaultValue =
|
|
11
|
+
defaultValue = "",
|
|
8
12
|
rules = {},
|
|
9
13
|
mask,
|
|
10
14
|
...rest
|
|
11
|
-
}) =>
|
|
12
|
-
name
|
|
13
|
-
rules
|
|
14
|
-
defaultValue
|
|
15
|
-
render: ({
|
|
16
|
-
|
|
17
|
-
}) => /*#__PURE__*/_jsx(DSInputMask, { ...rest,
|
|
15
|
+
}) => /* @__PURE__ */ React.createElement(Controller, {
|
|
16
|
+
name,
|
|
17
|
+
rules,
|
|
18
|
+
defaultValue,
|
|
19
|
+
render: ({ field }) => /* @__PURE__ */ React.createElement(DSInputMask, {
|
|
20
|
+
...rest,
|
|
18
21
|
...field
|
|
19
22
|
})
|
|
20
23
|
});
|
|
21
|
-
export {
|
|
24
|
+
export {
|
|
25
|
+
InputMask,
|
|
26
|
+
MASK_PIPES,
|
|
27
|
+
MASK_TYPES
|
|
28
|
+
};
|