@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.
- package/dist/cjs/analytics/appdynamics.js +40 -30
- package/dist/cjs/analytics/index.js +33 -26
- package/dist/cjs/analytics/page-view-event.js +35 -34
- package/dist/cjs/analytics/user-session-event.js +35 -27
- package/dist/cjs/analytics/user-wait-event.js +32 -17
- package/dist/cjs/analytics/web-analytics.js +33 -19
- package/dist/cjs/api/auth/index.js +42 -39
- package/dist/cjs/api/helpers.js +34 -99
- package/dist/cjs/api/users/index.js +29 -16
- package/dist/cjs/communication/http-client/index.js +50 -48
- package/dist/cjs/communication/http-client/request-interceptor.js +29 -12
- package/dist/cjs/communication/http-client/response-interceptor.js +47 -38
- package/dist/cjs/communication/http-client/retry-axios.js +74 -122
- package/dist/cjs/communication/http-client/retry.js +43 -36
- package/dist/cjs/communication/http-client/tests/index.test-disable.js +48 -56
- package/dist/cjs/data/auth/actions.js +34 -26
- package/dist/cjs/data/auth/reducer.js +36 -18
- package/dist/cjs/data/breakpoint/index.js +44 -32
- package/dist/cjs/data/error/index.js +34 -18
- package/dist/cjs/data/index.js +35 -0
- package/dist/cjs/data/live-message/index.js +35 -25
- package/dist/cjs/data/logout/actions.js +29 -9
- package/dist/cjs/data/navigation-prompt/actions.js +29 -9
- package/dist/cjs/data/react-redux.js +30 -13
- package/dist/cjs/data/reducers.js +36 -23
- package/dist/cjs/data/saga.js +29 -9
- package/dist/cjs/data/store.js +51 -65
- package/dist/cjs/data/wait-message/actions.js +31 -13
- package/dist/cjs/data/wait-message/reducer.js +38 -24
- package/dist/cjs/index.js +195 -809
- package/dist/cjs/micro-frontend.js +34 -0
- package/dist/cjs/route/index.js +44 -32
- package/dist/cjs/route/page-view.js +36 -22
- package/dist/cjs/route/private-route/index.js +59 -60
- package/dist/cjs/sideeffect/auth/index.js +43 -30
- package/dist/cjs/sideeffect/error-toast/index.js +40 -26
- package/dist/cjs/sideeffect/wait-message/index.js +46 -29
- package/dist/cjs/typings/custom.d.js +0 -0
- package/dist/cjs/typings/elliemae.d.js +0 -0
- package/dist/cjs/typings/styled.d.js +1 -0
- package/dist/cjs/typings/thirdparty.d.js +0 -0
- package/dist/cjs/utils/app-config/config.js +39 -33
- package/dist/cjs/utils/app-config/index.js +48 -44
- package/dist/cjs/utils/app-host-integration/react.js +28 -14
- package/dist/cjs/utils/auth/helper.js +36 -18
- package/dist/cjs/utils/auth/index.js +77 -116
- package/dist/cjs/utils/await.js +20 -0
- package/dist/cjs/utils/constants.js +39 -21
- package/dist/cjs/utils/font-size.js +30 -14
- package/dist/cjs/utils/guest-with-service.js +28 -12
- package/dist/cjs/utils/helpers.js +32 -19
- package/dist/cjs/utils/history.js +30 -12
- package/dist/cjs/utils/log-records.js +55 -35
- package/dist/cjs/utils/micro-frontend/console-logger.js +40 -23
- package/dist/cjs/utils/micro-frontend/guest.js +86 -127
- package/dist/cjs/utils/micro-frontend/host.js +86 -125
- package/dist/cjs/utils/micro-frontend/index.js +66 -61
- package/dist/cjs/utils/micro-frontend/types.js +20 -5
- package/dist/cjs/utils/redact-pii.js +32 -17
- package/dist/cjs/utils/service-worker.js +37 -21
- package/dist/cjs/utils/session.js +66 -71
- 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 +32 -16
- package/dist/cjs/utils/storybook/preview.js +59 -50
- package/dist/cjs/utils/storybook/theme.js +31 -14
- package/dist/cjs/utils/testing/index.js +45 -50
- package/dist/cjs/utils/testing/render-with-redux.js +41 -27
- package/dist/cjs/utils/testing/render-with-router-redux.js +47 -37
- package/dist/cjs/utils/testing/render-with-router.js +41 -28
- package/dist/cjs/utils/testing/render-with-state-addons.js +47 -36
- package/dist/cjs/utils/types.js +20 -0
- package/dist/cjs/utils/url.js +29 -13
- package/dist/cjs/utils/web-storage.js +46 -30
- package/dist/cjs/utils/window.js +37 -28
- package/dist/cjs/view/app-root/hosted-app.js +42 -32
- package/dist/cjs/view/app-root/index.js +64 -62
- package/dist/cjs/view/app-root/stand-alone-app.js +45 -37
- package/dist/cjs/view/app-root/style.js +51 -12
- package/dist/cjs/view/error-boundary/default-error-template.js +33 -15
- package/dist/cjs/view/error-boundary/index.js +47 -43
- package/dist/cjs/view/error-toast/index.js +49 -32
- package/dist/cjs/view/fetch-host-app-data/index.js +40 -26
- package/dist/cjs/view/fetch-host-app-data/store.js +32 -24
- package/dist/cjs/view/fields/check-box/index.js +41 -39
- package/dist/cjs/view/fields/combo-box/index.js +44 -31
- package/dist/cjs/view/fields/connect-form.js +31 -15
- package/dist/cjs/view/fields/date-input/index.js +41 -26
- package/dist/cjs/view/fields/date-picker/index.js +41 -26
- package/dist/cjs/view/fields/form-item-layout/index.js +43 -30
- package/dist/cjs/view/fields/input-mask/index.js +42 -41
- package/dist/cjs/view/fields/large-text-box/index.js +41 -26
- package/dist/cjs/view/fields/radio/index.js +41 -30
- package/dist/cjs/view/fields/radio-group/index.js +39 -27
- package/dist/cjs/view/fields/text-box/index.js +41 -26
- package/dist/cjs/view/fields/watch-value.js +48 -35
- package/dist/cjs/view/form/index.js +48 -34
- package/dist/cjs/view/form/personal-info-section.js +63 -80
- package/dist/cjs/view/form/submit-button/index.js +41 -23
- package/dist/cjs/view/guest-unload-handlers/index.js +34 -22
- package/dist/cjs/view/header/center-region/index.js +68 -38
- package/dist/cjs/view/header/index.js +48 -35
- package/dist/cjs/view/header/logo-region/index.js +38 -23
- package/dist/cjs/view/header/nav-region/index.js +51 -30
- package/dist/cjs/view/header/nav-region/notification/index.js +35 -18
- package/dist/cjs/view/header/nav-region/user/index.js +35 -18
- package/dist/cjs/view/host-binding-events/index.js +27 -11
- package/dist/cjs/view/intro.stories.mdx +1 -1
- package/dist/cjs/view/live-message/index.js +40 -34
- package/dist/cjs/view/loadable/index.js +40 -27
- package/dist/cjs/view/login/index.js +43 -30
- package/dist/cjs/view/media-breakpoint/index.js +50 -34
- package/dist/cjs/view/message-to-host-app/index.js +32 -20
- package/dist/cjs/view/micro-app/app-factory/index.js +101 -135
- package/dist/cjs/view/micro-app/const.js +27 -7
- package/dist/cjs/view/micro-app/index.js +44 -27
- package/dist/cjs/view/micro-app/resources/manifest.js +44 -35
- package/dist/cjs/view/micro-app/resources/script.js +57 -53
- package/dist/cjs/view/micro-app/resources/style.js +45 -38
- package/dist/cjs/view/micro-app/types.js +20 -5
- package/dist/cjs/view/micro-app/use-app-will-render.js +59 -50
- package/dist/cjs/view/micro-app/utils.js +33 -21
- package/dist/cjs/view/micro-iframe-app/app.js +44 -39
- package/dist/cjs/view/micro-iframe-app/iframe/const.js +27 -7
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +58 -47
- package/dist/cjs/view/micro-iframe-app/index.js +43 -24
- package/dist/cjs/view/micro-iframe-app/types.js +20 -5
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +43 -37
- package/dist/cjs/view/modals/error/index.js +42 -28
- package/dist/cjs/view/modals/navigation-prompt/index.js +45 -37
- package/dist/cjs/view/modals/session-expiry/customHooks.js +41 -35
- package/dist/cjs/view/modals/session-expiry/index.js +55 -50
- package/dist/cjs/view/modals/wait-message/html-wait-message.js +39 -18
- package/dist/cjs/view/modals/wait-message/index.js +57 -53
- package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +40 -21
- package/dist/cjs/view/render-with-delay/index.js +37 -19
- package/dist/cjs/view/render-with-host-data/index.js +42 -30
- package/dist/cjs/view/session-timeout/index.js +55 -35
- package/dist/cjs/view/storybook/decorator.js +39 -21
- package/dist/cjs/view/use-previous.js +30 -13
- package/dist/cjs/view/useMediaBreakpoints/index.js +35 -19
- package/dist/cjs/view/visually-hidden/index.js +48 -21
- package/dist/cjs/view/window-size/index.js +41 -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 -25
- 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 +24 -51
- 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/custom.d.js +0 -0
- package/dist/es/typings/elliemae.d.js +0 -0
- package/dist/es/typings/styled.d.js +1 -0
- package/dist/es/typings/thirdparty.d.js +0 -0
- 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 +9 -9
- package/dist/es/view/header/nav-region/index.js +21 -13
- package/dist/es/view/header/nav-region/notification/index.js +6 -6
- package/dist/es/view/header/nav-region/user/index.js +6 -6
- 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 -82
- 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 -16
- 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 -19
- 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 +17 -21
- 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 +24 -10
- 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 +2 -2
- 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/session.d.ts +5 -2
- 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.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.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 +2 -2
- package/dist/types/view/micro-app/index.d.ts +1 -1
- 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 +36 -25
- 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
package/dist/es/index.js
CHANGED
|
@@ -1,84 +1,193 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
import { isUserAuthorized, login, authorize } from "./utils/auth/index.js";
|
|
2
|
+
import { PrivateRoute } from "./route/private-route/index.js";
|
|
3
|
+
import { AppRoute } from "./route/index.js";
|
|
4
|
+
import {
|
|
5
|
+
getHTTPClient,
|
|
6
|
+
getAuthHTTPClient
|
|
7
|
+
} from "./communication/http-client/index.js";
|
|
8
|
+
import { onAuthorizationFailure } from "./communication/http-client/response-interceptor.js";
|
|
9
|
+
import { auth } from "./data/auth/actions.js";
|
|
10
|
+
import { default as default2 } from "./utils/constants.js";
|
|
11
|
+
import { useAppDispatch, useAppSelector } from "./data/react-redux.js";
|
|
12
|
+
import { useInjectReducer, useInjectSaga } from "redux-injectors";
|
|
13
|
+
import { getAuthorizationHeader } from "./utils/auth/helper.js";
|
|
14
|
+
import { getRedirectUrl, removeDoubleSlash } from "./utils/url.js";
|
|
15
|
+
import { createAppStore } from "./data/store.js";
|
|
16
|
+
import { browserHistory, memoryHistory } from "./utils/history.js";
|
|
17
|
+
import { Themes } from "./utils/constants.js";
|
|
18
|
+
import { ACTIONS } from "./data/navigation-prompt/actions.js";
|
|
19
|
+
import { loadable } from "./view/loadable/index.js";
|
|
20
|
+
import { WaitMessage } from "./view/modals/wait-message/index.js";
|
|
21
|
+
import { SessionTimeout } from "./view/session-timeout/index.js";
|
|
22
|
+
import {
|
|
23
|
+
subscribeToSessionExpiryWarning,
|
|
24
|
+
subscribeToSessionExpiry,
|
|
25
|
+
resetUserIdleTime,
|
|
26
|
+
trackActivity
|
|
27
|
+
} from "./utils/session.js";
|
|
28
|
+
import { waitMessage } from "./data/wait-message/actions.js";
|
|
29
|
+
import { initServiceWorker } from "./utils/service-worker.js";
|
|
30
|
+
import { CMicroAppGuest } from "./utils/micro-frontend/guest.js";
|
|
31
|
+
import { CMicroAppHost } from "./utils/micro-frontend/host.js";
|
|
32
|
+
import { enableReactAppForHostIntegration } from "./utils/app-host-integration/react.js";
|
|
33
|
+
import {
|
|
34
|
+
getAppConfigValue,
|
|
35
|
+
setAppConfigValue,
|
|
36
|
+
setAppConfig
|
|
37
|
+
} from "./utils/app-config/config.js";
|
|
38
|
+
import { getMicroFrontEndAppConfig } from "./utils/micro-frontend/index.js";
|
|
39
|
+
import { loadAppConfig } from "./utils/app-config/index.js";
|
|
40
|
+
import { AppRoot } from "./view/app-root/index.js";
|
|
41
|
+
import { ErrorBoundary } from "./view/error-boundary/index.js";
|
|
42
|
+
import { isProd, isCIBuild } from "./utils/helpers.js";
|
|
43
|
+
import {
|
|
44
|
+
listenStorageEvents,
|
|
45
|
+
removeStorageEvents
|
|
46
|
+
} from "./utils/web-storage.js";
|
|
47
|
+
import {
|
|
48
|
+
getHostAppDataByKey,
|
|
49
|
+
setHostAppData
|
|
50
|
+
} from "./view/fetch-host-app-data/store.js";
|
|
51
|
+
import { sendMessageToHost } from "./view/message-to-host-app/index.js";
|
|
52
|
+
import {
|
|
53
|
+
onGuestUnloadStart,
|
|
54
|
+
notifyGuestUnloadComplete
|
|
55
|
+
} from "./view/guest-unload-handlers/index.js";
|
|
56
|
+
import { renderWithHostData } from "./view/render-with-host-data/index.js";
|
|
57
|
+
import { fetchHostAppData } from "./view/fetch-host-app-data/index.js";
|
|
39
58
|
export * from "./utils/testing/index.js";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
59
|
+
import { renderWithRouterRedux } from "./utils/testing/render-with-router-redux.js";
|
|
60
|
+
import { renderWithRedux } from "./utils/testing/render-with-redux.js";
|
|
61
|
+
import { renderWithRouter } from "./utils/testing/render-with-router.js";
|
|
62
|
+
import { RenderWithStateAddOns } from "./utils/testing/render-with-state-addons.js";
|
|
63
|
+
import { getApiActionCreator, getSelectField } from "./api/helpers.js";
|
|
64
|
+
import { getUser } from "./api/users/index.js";
|
|
65
|
+
import { useMediaBreakpoints } from "./view/useMediaBreakpoints/index.js";
|
|
66
|
+
import { withAppDecorator } from "./view/storybook/decorator.js";
|
|
67
|
+
import { Header } from "./view/header/index.js";
|
|
68
|
+
import { ErrorToast } from "./view/error-toast/index.js";
|
|
69
|
+
import { Form } from "./view/form/index.js";
|
|
70
|
+
import { ConnectForm } from "./view/fields/connect-form.js";
|
|
71
|
+
import { FormItemLayout } from "./view/fields/form-item-layout/index.js";
|
|
72
|
+
import { TextBox } from "./view/fields/text-box/index.js";
|
|
73
|
+
import { LargeTextBox } from "./view/fields/large-text-box/index.js";
|
|
74
|
+
import {
|
|
75
|
+
InputMask,
|
|
76
|
+
MASK_TYPES,
|
|
77
|
+
MASK_PIPES
|
|
78
|
+
} from "./view/fields/input-mask/index.js";
|
|
79
|
+
import { ComboBox } from "./view/fields/combo-box/index.js";
|
|
80
|
+
import { CheckBox } from "./view/fields/check-box/index.js";
|
|
81
|
+
import { Radio } from "./view/fields/radio/index.js";
|
|
82
|
+
import { RadioGroup } from "./view/fields/radio-group/index.js";
|
|
83
|
+
import { DateInput } from "./view/fields/date-input/index.js";
|
|
84
|
+
import { DatePicker } from "./view/fields/date-picker/index.js";
|
|
85
|
+
import { FormSubmitButton } from "./view/form/submit-button/index.js";
|
|
86
|
+
import { MediaBreakpoint } from "./view/media-breakpoint/index.js";
|
|
87
|
+
import { VisuallyHidden } from "./view/visually-hidden/index.js";
|
|
88
|
+
import { actions } from "./data/live-message/index.js";
|
|
89
|
+
import { actions as actions2 } from "./data/error/index.js";
|
|
90
|
+
import { actions as actions3 } from "./data/logout/actions.js";
|
|
91
|
+
import { MicroApp } from "./view/micro-app/index.js";
|
|
92
|
+
import { MicroIFrameApp } from "./view/micro-iframe-app/index.js";
|
|
93
|
+
import { getNavigationLinks } from "./view/micro-app/utils.js";
|
|
94
|
+
import { getStore } from "./data/store.js";
|
|
95
|
+
import { RegisterService } from "./utils/guest-with-service.js";
|
|
96
|
+
import { setAppDynamicsUserData } from "./analytics/appdynamics.js";
|
|
97
|
+
import { sendBAEvent } from "./analytics/index.js";
|
|
98
|
+
import { updateBAEventParameters } from "./analytics/web-analytics.js";
|
|
99
|
+
import { redactPii } from "./utils/redact-pii.js";
|
|
100
|
+
export {
|
|
101
|
+
AppRoot,
|
|
102
|
+
CMicroAppGuest,
|
|
103
|
+
CMicroAppHost,
|
|
104
|
+
CheckBox,
|
|
105
|
+
ComboBox,
|
|
106
|
+
ConnectForm,
|
|
107
|
+
DateInput,
|
|
108
|
+
DatePicker,
|
|
109
|
+
ErrorBoundary,
|
|
110
|
+
ErrorToast,
|
|
111
|
+
Form,
|
|
112
|
+
FormItemLayout,
|
|
113
|
+
FormSubmitButton,
|
|
114
|
+
Header,
|
|
115
|
+
InputMask,
|
|
116
|
+
LargeTextBox,
|
|
117
|
+
MASK_PIPES,
|
|
118
|
+
MASK_TYPES,
|
|
119
|
+
MediaBreakpoint,
|
|
120
|
+
MicroApp,
|
|
121
|
+
MicroIFrameApp,
|
|
122
|
+
ACTIONS as NavigationPromptActions,
|
|
123
|
+
PrivateRoute,
|
|
124
|
+
Radio,
|
|
125
|
+
RadioGroup,
|
|
126
|
+
RegisterService,
|
|
127
|
+
RenderWithStateAddOns,
|
|
128
|
+
AppRoute as Route,
|
|
129
|
+
SessionTimeout,
|
|
130
|
+
TextBox,
|
|
131
|
+
Themes,
|
|
132
|
+
VisuallyHidden,
|
|
133
|
+
WaitMessage,
|
|
134
|
+
actions as ariaLive,
|
|
135
|
+
auth,
|
|
136
|
+
authorize,
|
|
137
|
+
createAppStore as configureStore,
|
|
138
|
+
enableReactAppForHostIntegration,
|
|
139
|
+
actions2 as error,
|
|
140
|
+
fetchHostAppData,
|
|
141
|
+
getUser as fetchUserSettings,
|
|
142
|
+
getApiActionCreator,
|
|
143
|
+
getAppConfigValue,
|
|
144
|
+
getAuthHTTPClient,
|
|
145
|
+
getAuthorizationHeader,
|
|
146
|
+
getHTTPClient,
|
|
147
|
+
getHostAppDataByKey,
|
|
148
|
+
getMicroFrontEndAppConfig,
|
|
149
|
+
getNavigationLinks,
|
|
150
|
+
getRedirectUrl,
|
|
151
|
+
getSelectField,
|
|
152
|
+
getStore,
|
|
153
|
+
default2 as globalConstants,
|
|
154
|
+
browserHistory as history,
|
|
155
|
+
initServiceWorker,
|
|
156
|
+
isCIBuild,
|
|
157
|
+
isProd,
|
|
158
|
+
isUserAuthorized,
|
|
159
|
+
listenStorageEvents,
|
|
160
|
+
loadAppConfig,
|
|
161
|
+
loadable,
|
|
162
|
+
login,
|
|
163
|
+
actions3 as logout,
|
|
164
|
+
memoryHistory,
|
|
165
|
+
notifyGuestUnloadComplete,
|
|
166
|
+
onAuthorizationFailure,
|
|
167
|
+
onGuestUnloadStart,
|
|
168
|
+
redactPii,
|
|
169
|
+
removeDoubleSlash,
|
|
170
|
+
removeStorageEvents,
|
|
171
|
+
renderWithHostData,
|
|
172
|
+
renderWithRedux,
|
|
173
|
+
renderWithRouter,
|
|
174
|
+
renderWithRouterRedux,
|
|
175
|
+
resetUserIdleTime,
|
|
176
|
+
sendBAEvent,
|
|
177
|
+
sendMessageToHost,
|
|
178
|
+
setAppConfig,
|
|
179
|
+
setAppConfigValue,
|
|
180
|
+
setAppDynamicsUserData,
|
|
181
|
+
setHostAppData,
|
|
182
|
+
subscribeToSessionExpiry,
|
|
183
|
+
subscribeToSessionExpiryWarning,
|
|
184
|
+
trackActivity,
|
|
185
|
+
updateBAEventParameters,
|
|
186
|
+
useAppDispatch,
|
|
187
|
+
useAppSelector,
|
|
188
|
+
useInjectReducer,
|
|
189
|
+
useInjectSaga,
|
|
190
|
+
useMediaBreakpoints,
|
|
191
|
+
waitMessage as waitMessageAction,
|
|
192
|
+
withAppDecorator
|
|
193
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CMicroAppGuest } from "./utils/micro-frontend/guest.js";
|
|
2
|
+
import { CMicroAppHost } from "./utils/micro-frontend/host.js";
|
|
3
|
+
import { getMicroFrontEndAppConfig } from "./utils/micro-frontend/index.js";
|
|
4
|
+
import { enableReactAppForHostIntegration } from "./utils/app-host-integration/react.js";
|
|
5
|
+
export {
|
|
6
|
+
CMicroAppGuest,
|
|
7
|
+
CMicroAppHost,
|
|
8
|
+
enableReactAppForHostIntegration,
|
|
9
|
+
getMicroFrontEndAppConfig
|
|
10
|
+
};
|
package/dist/es/route/index.js
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Helmet } from
|
|
3
|
-
import { useCallback } from
|
|
4
|
-
import { Route } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Helmet } from "react-helmet";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
import { Route } from "react-router-dom";
|
|
5
5
|
import { onPageView } from "./page-view.js";
|
|
6
|
-
|
|
7
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
export const AppRoute = ({
|
|
6
|
+
const AppRoute = ({
|
|
10
7
|
component: Component,
|
|
11
8
|
render,
|
|
12
9
|
children,
|
|
13
|
-
pageTitle =
|
|
10
|
+
pageTitle = "ICE",
|
|
14
11
|
...rest
|
|
15
12
|
}) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const memoizedRender = useCallback(routeProps => render && typeof render === 'function' ? render(routeProps) : Component && /*#__PURE__*/_jsx(Component, { ...routeProps
|
|
13
|
+
const memoizedRender = useCallback((routeProps) => render && typeof render === "function" ? render(routeProps) : Component && /* @__PURE__ */ React.createElement(Component, {
|
|
14
|
+
...routeProps
|
|
19
15
|
}), [Component, render]);
|
|
20
|
-
return
|
|
21
|
-
|
|
16
|
+
return /* @__PURE__ */ React.createElement(Route, {
|
|
17
|
+
...rest,
|
|
18
|
+
render: (routeProps) => {
|
|
22
19
|
onPageView(pageTitle);
|
|
23
|
-
return
|
|
24
|
-
children: [_Helmet || (_Helmet = /*#__PURE__*/_jsx2(Helmet, {}, void 0, /*#__PURE__*/_jsx2("title", {}, void 0, pageTitle))), children || memoizedRender(routeProps)]
|
|
25
|
-
});
|
|
20
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Helmet, null, /* @__PURE__ */ React.createElement("title", null, pageTitle)), children || memoizedRender(routeProps));
|
|
26
21
|
}
|
|
27
22
|
});
|
|
28
|
-
};
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
AppRoute
|
|
26
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as brum from
|
|
1
|
+
import * as brum from "@elliemae/pui-user-monitoring";
|
|
2
2
|
import { pageViewEvent } from "../analytics/page-view-event.js";
|
|
3
|
-
|
|
3
|
+
const onPageView = (pageTitle) => {
|
|
4
4
|
try {
|
|
5
5
|
if (brum && pageTitle) {
|
|
6
6
|
brum.setCustomVirtualPageName(pageTitle);
|
|
7
7
|
brum.startVirtualPageMonitoringWithAutoEnd(pageTitle);
|
|
8
8
|
}
|
|
9
|
-
} catch {
|
|
9
|
+
} catch {
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
11
|
+
pageViewEvent({ pageTitle });
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
onPageView
|
|
15
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useCallback } from
|
|
3
|
-
import { useInjectReducer, useInjectSaga } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { useInjectReducer, useInjectSaga } from "redux-injectors";
|
|
4
4
|
import enums from "../../utils/constants.js";
|
|
5
5
|
import { RenderWithDelay } from "../../view/render-with-delay/index.js";
|
|
6
6
|
import { authReducer } from "../../data/auth/reducer.js";
|
|
@@ -8,46 +8,39 @@ import { authentication } from "../../sideeffect/auth/index.js";
|
|
|
8
8
|
import { Login } from "../../view/login/index.js";
|
|
9
9
|
import { isUserAuthorized } from "../../utils/auth/index.js";
|
|
10
10
|
import { AppRoute } from "../index.js";
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
export const PrivateRoute = ({
|
|
11
|
+
const key = "auth";
|
|
12
|
+
const PrivateRoute = ({
|
|
14
13
|
component: Component,
|
|
15
14
|
render,
|
|
16
15
|
children,
|
|
17
16
|
clientId = enums.CLIENT_ID,
|
|
18
|
-
scope =
|
|
19
|
-
responseType =
|
|
17
|
+
scope = "loc",
|
|
18
|
+
responseType = "code",
|
|
20
19
|
...rest
|
|
21
20
|
}) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
reducer: authReducer
|
|
27
|
-
});
|
|
28
|
-
useInjectSaga({
|
|
29
|
-
key,
|
|
30
|
-
saga: authentication
|
|
31
|
-
});
|
|
32
|
-
const memoizedRender = useCallback(routeProps => render && typeof render === 'function' ? render(routeProps) : Component && /*#__PURE__*/_jsx(Component, { ...routeProps
|
|
21
|
+
useInjectReducer({ key, reducer: authReducer });
|
|
22
|
+
useInjectSaga({ key, saga: authentication });
|
|
23
|
+
const memoizedRender = useCallback((routeProps) => render && typeof render === "function" ? render(routeProps) : Component && /* @__PURE__ */ React.createElement(Component, {
|
|
24
|
+
...routeProps
|
|
33
25
|
}), [Component, render]);
|
|
34
|
-
return
|
|
35
|
-
|
|
26
|
+
return /* @__PURE__ */ React.createElement(AppRoute, {
|
|
27
|
+
...rest,
|
|
28
|
+
render: (routeProps) => {
|
|
36
29
|
const userAuthorized = isUserAuthorized();
|
|
37
|
-
|
|
38
30
|
if (userAuthorized) {
|
|
39
31
|
return children || memoizedRender(routeProps);
|
|
40
32
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return /*#__PURE__*/_jsx2(RenderWithDelay, {
|
|
33
|
+
const getAuthComp = () => /* @__PURE__ */ React.createElement(Login, {
|
|
34
|
+
clientId,
|
|
35
|
+
scope,
|
|
36
|
+
responseType
|
|
37
|
+
});
|
|
38
|
+
return /* @__PURE__ */ React.createElement(RenderWithDelay, {
|
|
49
39
|
render: getAuthComp
|
|
50
40
|
});
|
|
51
41
|
}
|
|
52
42
|
});
|
|
53
|
-
};
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
PrivateRoute
|
|
46
|
+
};
|
|
@@ -1,34 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
call,
|
|
3
|
+
put,
|
|
4
|
+
takeLatest
|
|
5
|
+
} from "redux-saga/effects";
|
|
6
|
+
import {
|
|
7
|
+
LOGIN,
|
|
8
|
+
LOGOUT,
|
|
9
|
+
LOGIN_SUCCESS
|
|
10
|
+
} from "../../data/auth/actions.js";
|
|
3
11
|
import { authorize, endSession } from "../../utils/auth/index.js";
|
|
4
12
|
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
5
13
|
import { logRecords } from "../../utils/log-records.js";
|
|
6
|
-
|
|
14
|
+
function* login({
|
|
7
15
|
payload
|
|
8
16
|
}) {
|
|
9
17
|
try {
|
|
10
18
|
yield call(authorize, payload);
|
|
11
|
-
yield put({
|
|
12
|
-
type: LOGIN_SUCCESS
|
|
13
|
-
});
|
|
19
|
+
yield put({ type: LOGIN_SUCCESS });
|
|
14
20
|
} catch (err) {
|
|
15
|
-
getLogger().error({
|
|
21
|
+
getLogger().error({
|
|
22
|
+
...logRecords.LOGIN_FAILED,
|
|
16
23
|
exception: err
|
|
17
24
|
});
|
|
18
25
|
}
|
|
19
26
|
}
|
|
20
|
-
|
|
27
|
+
function* logout({
|
|
21
28
|
payload
|
|
22
29
|
}) {
|
|
23
30
|
try {
|
|
24
31
|
yield call(endSession, payload);
|
|
25
32
|
} catch (err) {
|
|
26
|
-
getLogger().error({
|
|
33
|
+
getLogger().error({
|
|
34
|
+
...logRecords.LOGOUT_FAILED,
|
|
27
35
|
exception: err
|
|
28
36
|
});
|
|
29
37
|
}
|
|
30
38
|
}
|
|
31
|
-
|
|
39
|
+
function* authentication() {
|
|
32
40
|
yield takeLatest(LOGIN, login);
|
|
33
41
|
yield takeLatest(LOGOUT, logout);
|
|
34
|
-
}
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
authentication,
|
|
45
|
+
login,
|
|
46
|
+
logout
|
|
47
|
+
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { call, takeLatest } from
|
|
1
|
+
import { call, takeLatest } from "redux-saga/effects";
|
|
2
2
|
import { actions } from "../../data/error/index.js";
|
|
3
3
|
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
4
4
|
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
5
5
|
import { logRecords } from "../../utils/log-records.js";
|
|
6
|
-
|
|
7
6
|
function* openErrorToast(action) {
|
|
8
7
|
try {
|
|
9
|
-
var _action$payload, _action$payload2;
|
|
10
|
-
|
|
11
8
|
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
12
9
|
const host = yield call(microApp.getHost.bind(microApp));
|
|
13
|
-
const message =
|
|
14
|
-
if (host && message)
|
|
10
|
+
const message = action?.payload?.description || action?.payload?.messageText;
|
|
11
|
+
if (host && message)
|
|
12
|
+
yield call(host.openErrorBanner.bind(host), message);
|
|
15
13
|
} catch (ex) {
|
|
16
|
-
getLogger().error({
|
|
14
|
+
getLogger().error({
|
|
15
|
+
...logRecords.ERR_TOAST_OPEN_FAILED,
|
|
17
16
|
exception: ex
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
|
-
|
|
22
|
-
export function* errorToast() {
|
|
20
|
+
function* errorToast() {
|
|
23
21
|
yield takeLatest(actions.set.type, openErrorToast);
|
|
24
|
-
}
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
errorToast
|
|
25
|
+
};
|
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
import { call, takeLatest } from
|
|
1
|
+
import { call, takeLatest } from "redux-saga/effects";
|
|
2
2
|
import { ACTIONS } from "../../data/wait-message/actions.js";
|
|
3
3
|
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
4
4
|
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
5
5
|
import { logRecords } from "../../utils/log-records.js";
|
|
6
|
-
|
|
7
6
|
function* openWaitMessage() {
|
|
8
7
|
try {
|
|
9
8
|
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
10
9
|
const host = yield call(microApp.getHost.bind(microApp));
|
|
11
|
-
if (host)
|
|
10
|
+
if (host)
|
|
11
|
+
yield call(host.openWaitMessage.bind(host));
|
|
12
12
|
} catch (ex) {
|
|
13
|
-
getLogger().error({
|
|
13
|
+
getLogger().error({
|
|
14
|
+
...logRecords.WAIT_MSG_OPEN_FAILED,
|
|
14
15
|
exception: ex
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
|
|
19
19
|
function* closeWaitMessage() {
|
|
20
20
|
try {
|
|
21
21
|
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
22
22
|
const host = yield call(microApp.getHost.bind(microApp));
|
|
23
|
-
if (host)
|
|
23
|
+
if (host)
|
|
24
|
+
yield call(host.closeWaitMessage.bind(host));
|
|
24
25
|
} catch (ex) {
|
|
25
|
-
getLogger().error({
|
|
26
|
+
getLogger().error({
|
|
27
|
+
...logRecords.WAIT_MSG_CLOSE_FAILED,
|
|
26
28
|
exception: ex
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
export function* waitMessage() {
|
|
32
|
+
function* waitMessage() {
|
|
32
33
|
yield takeLatest(ACTIONS.OPEN, openWaitMessage);
|
|
33
34
|
yield takeLatest(ACTIONS.CLOSE, closeWaitMessage);
|
|
34
|
-
}
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
waitMessage
|
|
38
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "styled-components";
|
|
File without changes
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _set from "lodash/set";
|
|
3
|
-
import _get from "lodash/get";
|
|
4
|
-
import _clone from "lodash/clone";
|
|
5
|
-
// eslint-disable-next-line no-undef
|
|
1
|
+
import _ from "lodash";
|
|
6
2
|
let gAppConfig = APP_CONFIG;
|
|
7
|
-
|
|
3
|
+
const setAppConfig = (config) => {
|
|
8
4
|
gAppConfig = config;
|
|
9
5
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
const getAppConfigValue = (key = "", defaultValue = null) => _.clone(_.get(gAppConfig, key, defaultValue));
|
|
7
|
+
const setAppConfigValue = (key = "", value) => _.set(gAppConfig, key, value);
|
|
8
|
+
const hasItem = (key = "") => _.has(gAppConfig, key);
|
|
9
|
+
export {
|
|
10
|
+
getAppConfigValue,
|
|
11
|
+
hasItem,
|
|
12
|
+
setAppConfig,
|
|
13
|
+
setAppConfigValue
|
|
14
|
+
};
|