@elliemae/pui-app-sdk 2.16.1 → 3.0.0-beta.1
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 +33 -29
- 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/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 +53 -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 +187 -800
- package/dist/cjs/route/index.js +37 -32
- package/dist/cjs/route/page-view.js +30 -22
- package/dist/cjs/route/private-route/index.js +52 -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/main.js +32 -25
- package/dist/cjs/utils/storybook/manager.js +31 -16
- package/dist/cjs/utils/storybook/middleware.js +3 -7
- package/dist/cjs/utils/storybook/preview.js +57 -48
- package/dist/cjs/utils/storybook/theme.js +30 -14
- package/dist/cjs/utils/storybook/vite.js +6 -0
- package/dist/cjs/utils/storybook/webpack.js +13 -0
- package/dist/cjs/utils/testing/index.js +38 -50
- package/dist/cjs/utils/testing/render-with-redux.js +34 -27
- package/dist/cjs/utils/testing/render-with-router-redux.js +40 -37
- package/dist/cjs/utils/testing/render-with-router.js +34 -28
- package/dist/cjs/utils/testing/render-with-state-addons.js +40 -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 +35 -32
- package/dist/cjs/view/app-root/index.js +57 -62
- package/dist/cjs/view/app-root/stand-alone-app.js +38 -37
- package/dist/cjs/view/app-root/style.js +50 -12
- package/dist/cjs/view/error-boundary/default-error-template.js +10 -15
- package/dist/cjs/view/error-boundary/index.js +41 -43
- package/dist/cjs/view/error-toast/index.js +42 -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 +34 -39
- package/dist/cjs/view/fields/combo-box/index.js +37 -31
- package/dist/cjs/view/fields/connect-form.js +30 -15
- package/dist/cjs/view/fields/date-input/index.js +34 -26
- package/dist/cjs/view/fields/date-picker/index.js +34 -26
- package/dist/cjs/view/fields/form-item-layout/index.js +36 -30
- package/dist/cjs/view/fields/input-mask/index.js +35 -41
- package/dist/cjs/view/fields/large-text-box/index.js +34 -26
- package/dist/cjs/view/fields/radio/index.js +34 -30
- package/dist/cjs/view/fields/radio-group/index.js +32 -27
- package/dist/cjs/view/fields/text-box/index.js +34 -26
- package/dist/cjs/view/fields/watch-value.js +41 -35
- package/dist/cjs/view/form/index.js +41 -34
- package/dist/cjs/view/form/personal-info-section.js +56 -80
- package/dist/cjs/view/form/submit-button/index.js +34 -23
- package/dist/cjs/view/guest-unload-handlers/index.js +33 -22
- package/dist/cjs/view/header/center-region/index.js +61 -38
- package/dist/cjs/view/header/index.js +41 -35
- package/dist/cjs/view/header/logo-region/index.js +31 -23
- package/dist/cjs/view/header/nav-region/index.js +44 -30
- package/dist/cjs/view/header/nav-region/notification/index.js +28 -18
- package/dist/cjs/view/header/nav-region/user/index.js +28 -18
- package/dist/cjs/view/host-binding-events/index.js +10 -11
- package/dist/cjs/view/live-message/index.js +33 -34
- package/dist/cjs/view/loadable/index.js +33 -27
- package/dist/cjs/view/login/index.js +36 -30
- package/dist/cjs/view/media-breakpoint/index.js +43 -34
- package/dist/cjs/view/message-to-host-app/index.js +31 -20
- package/dist/cjs/view/micro-app/app-factory/index.js +98 -134
- package/dist/cjs/view/micro-app/const.js +10 -7
- package/dist/cjs/view/micro-app/index.js +37 -27
- package/dist/cjs/view/micro-app/resources/manifest.js +41 -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 +37 -39
- package/dist/cjs/view/micro-iframe-app/iframe/const.js +10 -7
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +51 -47
- package/dist/cjs/view/micro-iframe-app/index.js +36 -24
- package/dist/cjs/view/micro-iframe-app/types.js +3 -5
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +40 -36
- package/dist/cjs/view/modals/error/index.js +35 -28
- package/dist/cjs/view/modals/navigation-prompt/index.js +38 -37
- package/dist/cjs/view/modals/session-expiry/customHooks.js +40 -35
- package/dist/cjs/view/modals/session-expiry/index.js +45 -50
- package/dist/cjs/view/modals/wait-message/html-wait-message.js +32 -18
- package/dist/cjs/view/modals/wait-message/index.js +50 -53
- package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +33 -21
- package/dist/cjs/view/render-with-delay/index.js +30 -19
- package/dist/cjs/view/render-with-host-data/index.js +35 -30
- package/dist/cjs/view/session-timeout/index.js +44 -35
- package/dist/cjs/view/storybook/decorator.js +32 -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 +41 -21
- package/dist/cjs/view/window-size/index.js +37 -29
- package/dist/es/analytics/appdynamics.js +14 -15
- package/dist/es/analytics/index.js +11 -17
- package/dist/es/analytics/page-view-event.js +11 -20
- package/dist/es/analytics/user-session-event.js +13 -15
- package/dist/es/analytics/user-wait-event.js +10 -6
- package/dist/es/analytics/web-analytics.js +12 -10
- package/dist/es/api/auth/index.js +22 -27
- package/dist/es/api/helpers.js +8 -81
- package/dist/es/api/users/index.js +7 -8
- package/dist/es/communication/http-client/index.js +24 -30
- package/dist/es/communication/http-client/request-interceptor.js +6 -3
- 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 +28 -47
- package/dist/es/data/auth/actions.js +13 -19
- package/dist/es/data/auth/reducer.js +9 -7
- package/dist/es/data/breakpoint/index.js +19 -21
- package/dist/es/data/error/index.js +11 -9
- 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 +10 -7
- package/dist/es/data/saga.js +8 -5
- package/dist/es/data/store.js +27 -44
- package/dist/es/data/wait-message/actions.js +11 -9
- package/dist/es/data/wait-message/reducer.js +10 -10
- package/dist/es/index.js +181 -83
- package/dist/es/route/index.js +16 -19
- package/dist/es/route/page-view.js +9 -9
- package/dist/es/route/private-route/index.js +30 -38
- package/dist/es/sideeffect/auth/index.js +27 -14
- package/dist/es/sideeffect/error-toast/index.js +15 -14
- package/dist/es/sideeffect/wait-message/index.js +18 -14
- 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 +21 -31
- package/dist/es/utils/app-host-integration/react.js +8 -6
- package/dist/es/utils/auth/helper.js +8 -4
- package/dist/es/utils/auth/index.js +59 -83
- 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 +17 -13
- package/dist/es/utils/micro-frontend/guest.js +52 -108
- package/dist/es/utils/micro-frontend/host.js +53 -89
- package/dist/es/utils/micro-frontend/index.js +39 -37
- 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 +14 -11
- package/dist/es/utils/session.js +47 -48
- package/dist/es/utils/storybook/manager.js +8 -5
- package/dist/es/utils/storybook/preview.js +30 -26
- package/dist/es/utils/storybook/theme.js +9 -6
- package/dist/es/utils/testing/index.js +14 -21
- package/dist/es/utils/testing/render-with-redux.js +13 -13
- package/dist/es/utils/testing/render-with-router-redux.js +19 -21
- package/dist/es/utils/testing/render-with-router.js +14 -16
- package/dist/es/utils/testing/render-with-state-addons.js +18 -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 +13 -17
- package/dist/es/view/app-root/index.js +34 -39
- package/dist/es/view/app-root/stand-alone-app.js +17 -19
- package/dist/es/view/app-root/style.js +30 -5
- package/dist/es/view/error-boundary/default-error-template.js +4 -5
- package/dist/es/view/error-boundary/index.js +20 -27
- package/dist/es/view/error-toast/index.js +21 -16
- package/dist/es/view/fetch-host-app-data/index.js +13 -13
- package/dist/es/view/fetch-host-app-data/store.js +10 -7
- package/dist/es/view/fields/check-box/index.js +16 -18
- package/dist/es/view/fields/combo-box/index.js +19 -19
- package/dist/es/view/fields/connect-form.js +8 -6
- package/dist/es/view/fields/date-input/index.js +16 -14
- package/dist/es/view/fields/date-picker/index.js +16 -14
- package/dist/es/view/fields/form-item-layout/index.js +15 -16
- package/dist/es/view/fields/input-mask/index.js +20 -14
- package/dist/es/view/fields/large-text-box/index.js +16 -14
- package/dist/es/view/fields/radio/index.js +16 -18
- package/dist/es/view/fields/radio-group/index.js +14 -15
- package/dist/es/view/fields/text-box/index.js +16 -14
- package/dist/es/view/fields/watch-value.js +19 -24
- package/dist/es/view/form/index.js +22 -22
- package/dist/es/view/form/personal-info-section.js +31 -52
- package/dist/es/view/form/submit-button/index.js +12 -10
- package/dist/es/view/guest-unload-handlers/index.js +11 -10
- package/dist/es/view/header/center-region/index.js +40 -23
- package/dist/es/view/header/index.js +19 -19
- package/dist/es/view/header/logo-region/index.js +8 -9
- package/dist/es/view/header/nav-region/index.js +22 -15
- package/dist/es/view/header/nav-region/notification/index.js +5 -6
- package/dist/es/view/header/nav-region/user/index.js +5 -6
- package/dist/es/view/host-binding-events/index.js +7 -3
- package/dist/es/view/live-message/index.js +13 -23
- package/dist/es/view/loadable/index.js +12 -15
- package/dist/es/view/login/index.js +14 -18
- package/dist/es/view/media-breakpoint/index.js +19 -17
- package/dist/es/view/message-to-host-app/index.js +11 -10
- package/dist/es/view/micro-app/app-factory/index.js +67 -86
- package/dist/es/view/micro-app/const.js +4 -1
- package/dist/es/view/micro-app/index.js +13 -11
- package/dist/es/view/micro-app/resources/manifest.js +19 -19
- package/dist/es/view/micro-app/resources/script.js +36 -36
- package/dist/es/view/micro-app/resources/style.js +23 -22
- package/dist/es/view/micro-app/types.js +0 -1
- package/dist/es/view/micro-app/use-app-will-render.js +32 -28
- package/dist/es/view/micro-app/utils.js +12 -14
- package/dist/es/view/micro-iframe-app/app.js +15 -22
- package/dist/es/view/micro-iframe-app/iframe/const.js +4 -1
- package/dist/es/view/micro-iframe-app/iframe/index.js +27 -32
- package/dist/es/view/micro-iframe-app/index.js +11 -12
- package/dist/es/view/micro-iframe-app/types.js +0 -1
- package/dist/es/view/micro-iframe-app/use-frame-loaded.js +16 -21
- package/dist/es/view/modals/error/index.js +12 -10
- package/dist/es/view/modals/navigation-prompt/index.js +12 -16
- package/dist/es/view/modals/session-expiry/customHooks.js +13 -15
- package/dist/es/view/modals/session-expiry/index.js +16 -24
- package/dist/es/view/modals/wait-message/html-wait-message.js +10 -10
- package/dist/es/view/modals/wait-message/index.js +31 -39
- package/dist/es/view/modals/wait-message/wait-message-launcher.js +9 -8
- package/dist/es/view/render-with-delay/index.js +7 -10
- package/dist/es/view/render-with-host-data/index.js +11 -15
- package/dist/es/view/session-timeout/index.js +21 -12
- package/dist/es/view/storybook/decorator.js +9 -7
- 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 +19 -10
- package/dist/es/view/window-size/index.js +16 -19
- package/dist/types/utils/storybook/main.d.cts +41 -0
- package/dist/types/utils/storybook/{middleware.d.ts → middleware.d.cts} +0 -0
- package/dist/types/utils/storybook/preview.d.ts +2 -2
- package/dist/types/utils/storybook/vite.d.cts +4 -0
- package/dist/types/utils/storybook/webpack.d.cts +8 -0
- package/dist/types/utils/window.d.ts +1 -1
- package/dist/types/view/visually-hidden/index.d.ts +1 -3
- package/package.json +7 -5
- package/dist/cjs/api/users/index.endpoint.js +0 -14
- package/dist/cjs/api/users/users.json +0 -8
- package/dist/cjs/app.config.json +0 -129
- 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/index.pug +0 -15
- 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/header/logo-region/logo.svg +0 -2
- package/dist/cjs/view/header/nav-region/notification/index.svg +0 -5
- package/dist/cjs/view/header/nav-region/user/index.svg +0 -4
- package/dist/cjs/view/intro.stories.mdx +0 -27
- 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/micro-iframe-app/iframe/index.html +0 -74
- 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/api/users/users.json +0 -8
- package/dist/es/app.config.json +0 -129
- 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/index.pug +0 -15
- 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/header/logo-region/logo.svg +0 -2
- package/dist/es/view/header/nav-region/notification/index.svg +0 -5
- package/dist/es/view/header/nav-region/user/index.svg +0 -4
- package/dist/es/view/intro.stories.mdx +0 -27
- 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/micro-iframe-app/iframe/index.html +0 -74
- 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,24 +1,25 @@
|
|
|
1
|
-
import { call, takeLatest } from
|
|
2
|
-
import { actions } from "../../data/error
|
|
3
|
-
import { CMicroAppGuest } from "../../utils/micro-frontend/guest
|
|
4
|
-
import { getLogger } from "../../utils/micro-frontend
|
|
5
|
-
import { logRecords } from "../../utils/log-records
|
|
6
|
-
|
|
1
|
+
import { call, takeLatest } from "redux-saga/effects";
|
|
2
|
+
import { actions } from "../../data/error";
|
|
3
|
+
import { CMicroAppGuest } from "../../utils/micro-frontend/guest";
|
|
4
|
+
import { getLogger } from "../../utils/micro-frontend";
|
|
5
|
+
import { logRecords } from "../../utils/log-records";
|
|
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
|
|
2
|
-
import { ACTIONS } from "../../data/wait-message/actions
|
|
3
|
-
import { CMicroAppGuest } from "../../utils/micro-frontend/guest
|
|
4
|
-
import { getLogger } from "../../utils/micro-frontend
|
|
5
|
-
import { logRecords } from "../../utils/log-records
|
|
6
|
-
|
|
1
|
+
import { call, takeLatest } from "redux-saga/effects";
|
|
2
|
+
import { ACTIONS } from "../../data/wait-message/actions";
|
|
3
|
+
import { CMicroAppGuest } from "../../utils/micro-frontend/guest";
|
|
4
|
+
import { getLogger } from "../../utils/micro-frontend";
|
|
5
|
+
import { logRecords } from "../../utils/log-records";
|
|
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
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "styled-components";
|
|
@@ -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
|
+
};
|
|
@@ -1,36 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getHTTPClient } from "../../communication/http-client
|
|
3
|
-
import { setAppConfig } from "./config
|
|
4
|
-
import { setAppDynamicsUserData } from "../../analytics/appdynamics
|
|
5
|
-
import { updateBAEventParameters } from "../../analytics/web-analytics
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
setAppConfig(_merge(data, activeEnvConfig));
|
|
16
|
-
sessionStorage.setItem('envName', activeEnv);
|
|
17
|
-
setAppDynamicsUserData({
|
|
18
|
-
envName: activeEnv
|
|
19
|
-
});
|
|
20
|
-
updateBAEventParameters({
|
|
21
|
-
envName: activeEnv
|
|
22
|
-
});
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import { getHTTPClient } from "../../communication/http-client";
|
|
3
|
+
import { setAppConfig } from "./config";
|
|
4
|
+
import { setAppDynamicsUserData } from "../../analytics/appdynamics";
|
|
5
|
+
import { updateBAEventParameters } from "../../analytics/web-analytics";
|
|
6
|
+
const parseAppConfig = (data) => {
|
|
7
|
+
const { activeEnv } = data;
|
|
8
|
+
const activeEnvConfig = data.env[activeEnv] || {};
|
|
9
|
+
if (data.env)
|
|
10
|
+
delete data.env;
|
|
11
|
+
setAppConfig(_.merge(data, activeEnvConfig));
|
|
12
|
+
sessionStorage.setItem("envName", activeEnv);
|
|
13
|
+
setAppDynamicsUserData({ envName: activeEnv });
|
|
14
|
+
updateBAEventParameters({ envName: activeEnv });
|
|
23
15
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
getHTTPClient({
|
|
27
|
-
baseURL: hostUrl
|
|
28
|
-
}).get('app.config.json').then(({
|
|
29
|
-
data
|
|
30
|
-
}) => {
|
|
16
|
+
const loadAppConfig = (hostUrl = "./") => new Promise((resolve, reject) => {
|
|
17
|
+
getHTTPClient({ baseURL: hostUrl }).get("app.config.json").then(({ data }) => {
|
|
31
18
|
parseAppConfig(data);
|
|
32
19
|
resolve();
|
|
33
|
-
}).catch(err => {
|
|
20
|
+
}).catch((err) => {
|
|
34
21
|
reject(new Error(`Unable to load application configurtion file. ${err.Message}`));
|
|
35
22
|
});
|
|
36
|
-
});
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
loadAppConfig
|
|
26
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
CMicroAppGuest
|
|
3
|
+
} from "../micro-frontend/guest";
|
|
4
|
+
const enableReactAppForHostIntegration = ({
|
|
3
5
|
onInit,
|
|
4
6
|
onMount
|
|
5
|
-
}) => CMicroAppGuest.getInstance({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
7
|
+
}) => CMicroAppGuest.getInstance({ onInit, onMount });
|
|
8
|
+
export {
|
|
9
|
+
enableReactAppForHostIntegration
|
|
10
|
+
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import enums from "../constants
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import enums from "../constants";
|
|
2
|
+
const getAuthorizationHeader = () => sessionStorage.getItem(enums.AUTHORIZATION) || "";
|
|
3
|
+
const setAuthorizationHeader = (token) => {
|
|
4
4
|
sessionStorage.setItem(enums.AUTHORIZATION, token);
|
|
5
|
-
};
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
getAuthorizationHeader,
|
|
8
|
+
setAuthorizationHeader
|
|
9
|
+
};
|
|
@@ -1,71 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { browserHistory as history } from "../history";
|
|
2
|
+
import {
|
|
3
|
+
getToken,
|
|
4
|
+
revokeToken,
|
|
5
|
+
introspectToken
|
|
6
|
+
} from "../../api/auth";
|
|
7
|
+
import { getUser } from "../../api/users";
|
|
8
|
+
import { loginEvent, logoutEvent } from "../../analytics/user-session-event";
|
|
9
|
+
import { setAppDynamicsUserData } from "../../analytics/appdynamics";
|
|
10
|
+
import { getAuthorizationHeader, setAuthorizationHeader } from "./helper";
|
|
11
|
+
import { getAppConfigValue } from "../app-config/config";
|
|
12
|
+
import { getLogger } from "../micro-frontend";
|
|
13
|
+
import { logRecords } from "../log-records";
|
|
14
|
+
const IDP_ENDPOINT_CONFIG_KEY = "serviceEndpoints.idp";
|
|
15
|
+
const isUserAuthorized = () => !!getAuthorizationHeader();
|
|
16
|
+
const getIDPInfoFromUrl = () => {
|
|
14
17
|
const currentUrl = new URL(window.location.href);
|
|
15
|
-
const idpCode = currentUrl.searchParams.get(
|
|
16
|
-
const idpErrorCode = currentUrl.searchParams.get(
|
|
17
|
-
currentUrl.search =
|
|
18
|
-
return {
|
|
19
|
-
idpCode,
|
|
20
|
-
idpErrorCode,
|
|
21
|
-
redirectUri: currentUrl.href
|
|
22
|
-
};
|
|
18
|
+
const idpCode = currentUrl.searchParams.get("code") || "";
|
|
19
|
+
const idpErrorCode = currentUrl.searchParams.get("error_code") || "";
|
|
20
|
+
currentUrl.search = "";
|
|
21
|
+
return { idpCode, idpErrorCode, redirectUri: currentUrl.href };
|
|
23
22
|
};
|
|
24
|
-
|
|
23
|
+
const navigateToLoginPage = ({
|
|
25
24
|
clientId,
|
|
26
25
|
redirectUri,
|
|
27
26
|
idpErrorCode,
|
|
28
27
|
scope,
|
|
29
|
-
// eslint-disable-next-line camelcase
|
|
30
28
|
responseType
|
|
31
29
|
}) => {
|
|
32
|
-
const idpHost = getAppConfigValue(IDP_ENDPOINT_CONFIG_KEY,
|
|
33
|
-
const idpUrl = new URL(
|
|
30
|
+
const idpHost = getAppConfigValue(IDP_ENDPOINT_CONFIG_KEY, "");
|
|
31
|
+
const idpUrl = new URL("/authorize", idpHost);
|
|
34
32
|
const idpOptions = {
|
|
35
33
|
client_id: clientId,
|
|
36
34
|
redirect_uri: redirectUri,
|
|
37
35
|
response_type: responseType,
|
|
38
36
|
scope
|
|
39
37
|
};
|
|
40
|
-
const searchParams = new URLSearchParams(idpErrorCode ? Object.assign(idpOptions, {
|
|
41
|
-
error_code: idpErrorCode
|
|
42
|
-
}) : idpOptions);
|
|
38
|
+
const searchParams = new URLSearchParams(idpErrorCode ? Object.assign(idpOptions, { error_code: idpErrorCode }) : idpOptions);
|
|
43
39
|
idpUrl.search = searchParams.toString();
|
|
44
40
|
window.location.replace(idpUrl.href);
|
|
45
41
|
};
|
|
46
|
-
|
|
42
|
+
const endSession = async ({
|
|
47
43
|
clientId,
|
|
48
44
|
redirectUri,
|
|
49
45
|
responseType,
|
|
50
46
|
scope,
|
|
51
|
-
code =
|
|
47
|
+
code = "1004"
|
|
52
48
|
}) => {
|
|
53
49
|
try {
|
|
54
50
|
const authorization = getAuthorizationHeader();
|
|
55
51
|
sessionStorage.clear();
|
|
56
|
-
const token = authorization ? authorization.split(
|
|
52
|
+
const token = authorization ? authorization.split(" ")[1] : "";
|
|
57
53
|
await revokeToken({
|
|
58
54
|
clientId,
|
|
59
55
|
token
|
|
60
56
|
});
|
|
61
57
|
logoutEvent();
|
|
62
|
-
setAppDynamicsUserData({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}); // redirect
|
|
66
|
-
|
|
67
|
-
const idpHost = getAppConfigValue(IDP_ENDPOINT_CONFIG_KEY, '');
|
|
68
|
-
const logoutUrl = new URL('/authorize', idpHost);
|
|
58
|
+
setAppDynamicsUserData({ instanceId: "", userId: "" });
|
|
59
|
+
const idpHost = getAppConfigValue(IDP_ENDPOINT_CONFIG_KEY, "");
|
|
60
|
+
const logoutUrl = new URL("/authorize", idpHost);
|
|
69
61
|
const params = {
|
|
70
62
|
client_id: clientId,
|
|
71
63
|
redirect_uri: redirectUri,
|
|
@@ -77,12 +69,13 @@ export const endSession = async ({
|
|
|
77
69
|
logoutUrl.search = searchParams.toString();
|
|
78
70
|
window.location.replace(logoutUrl.href);
|
|
79
71
|
} catch (err) {
|
|
80
|
-
getLogger().error({
|
|
72
|
+
getLogger().error({
|
|
73
|
+
...logRecords.LOGOUT_FAILED,
|
|
81
74
|
exception: err
|
|
82
75
|
});
|
|
83
76
|
}
|
|
84
77
|
};
|
|
85
|
-
|
|
78
|
+
const authorize = async ({
|
|
86
79
|
idpCode,
|
|
87
80
|
redirectUri,
|
|
88
81
|
clientId,
|
|
@@ -90,22 +83,18 @@ export const authorize = async ({
|
|
|
90
83
|
responseType
|
|
91
84
|
}) => {
|
|
92
85
|
try {
|
|
93
|
-
const {
|
|
94
|
-
tokenType,
|
|
95
|
-
accessToken
|
|
96
|
-
} = await getToken({
|
|
86
|
+
const { tokenType, accessToken } = await getToken({
|
|
97
87
|
idpCode,
|
|
98
88
|
redirectUri,
|
|
99
89
|
clientId
|
|
100
90
|
});
|
|
101
91
|
const authorizationToken = `${tokenType} ${accessToken}`;
|
|
102
|
-
setAuthorizationHeader(authorizationToken);
|
|
103
|
-
|
|
92
|
+
setAuthorizationHeader(authorizationToken);
|
|
104
93
|
const introspectResponse = await introspectToken({
|
|
105
94
|
clientId,
|
|
106
95
|
accessToken
|
|
107
96
|
});
|
|
108
|
-
sessionStorage.setItem(
|
|
97
|
+
sessionStorage.setItem("user", JSON.stringify(introspectResponse));
|
|
109
98
|
const {
|
|
110
99
|
encompass_instance_id: instanceId,
|
|
111
100
|
user_name: userName,
|
|
@@ -115,51 +104,31 @@ export const authorize = async ({
|
|
|
115
104
|
bearerToken,
|
|
116
105
|
realm: instanceId,
|
|
117
106
|
userName,
|
|
118
|
-
sessionId: bearerToken.replace(`${instanceId} `,
|
|
107
|
+
sessionId: bearerToken.replace(`${instanceId} `, "")
|
|
119
108
|
};
|
|
120
|
-
sessionStorage.setItem(
|
|
121
|
-
sessionStorage.setItem(
|
|
122
|
-
sessionStorage.setItem(
|
|
123
|
-
loginEvent({
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
setAppDynamicsUserData({
|
|
128
|
-
instanceId,
|
|
129
|
-
userId: userName
|
|
130
|
-
}); // get user info
|
|
131
|
-
|
|
132
|
-
const data = await getUser({
|
|
133
|
-
userName
|
|
134
|
-
});
|
|
135
|
-
sessionStorage.setItem('userSettings', JSON.stringify(data));
|
|
109
|
+
sessionStorage.setItem("cred", JSON.stringify(cred));
|
|
110
|
+
sessionStorage.setItem("instanceId", instanceId);
|
|
111
|
+
sessionStorage.setItem("userId", userName);
|
|
112
|
+
loginEvent({ instanceId, userId: userName });
|
|
113
|
+
setAppDynamicsUserData({ instanceId, userId: userName });
|
|
114
|
+
const data = await getUser({ userName });
|
|
115
|
+
sessionStorage.setItem("userSettings", JSON.stringify(data));
|
|
136
116
|
history.push(new URL(redirectUri).pathname);
|
|
137
117
|
} catch (err) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
clientId,
|
|
143
|
-
redirectUri,
|
|
144
|
-
code,
|
|
145
|
-
scope,
|
|
146
|
-
responseType
|
|
147
|
-
});
|
|
148
|
-
getLogger().error({ ...logRecords.LOGIN_FAILED,
|
|
118
|
+
const code = err?.response?.data?.code;
|
|
119
|
+
await endSession({ clientId, redirectUri, code, scope, responseType });
|
|
120
|
+
getLogger().error({
|
|
121
|
+
...logRecords.LOGIN_FAILED,
|
|
149
122
|
exception: err
|
|
150
123
|
});
|
|
151
124
|
}
|
|
152
125
|
};
|
|
153
|
-
|
|
126
|
+
const login = async ({
|
|
154
127
|
clientId,
|
|
155
128
|
scope,
|
|
156
129
|
responseType
|
|
157
130
|
}) => {
|
|
158
|
-
const {
|
|
159
|
-
idpCode,
|
|
160
|
-
idpErrorCode,
|
|
161
|
-
redirectUri
|
|
162
|
-
} = getIDPInfoFromUrl();
|
|
131
|
+
const { idpCode, idpErrorCode, redirectUri } = getIDPInfoFromUrl();
|
|
163
132
|
const loginInfo = {
|
|
164
133
|
clientId,
|
|
165
134
|
scope,
|
|
@@ -168,10 +137,17 @@ export const login = async ({
|
|
|
168
137
|
idpCode,
|
|
169
138
|
idpErrorCode
|
|
170
139
|
};
|
|
171
|
-
|
|
172
140
|
if (idpCode) {
|
|
173
141
|
await authorize(loginInfo);
|
|
174
142
|
} else {
|
|
175
143
|
navigateToLoginPage(loginInfo);
|
|
176
144
|
}
|
|
177
|
-
};
|
|
145
|
+
};
|
|
146
|
+
export {
|
|
147
|
+
authorize,
|
|
148
|
+
endSession,
|
|
149
|
+
getIDPInfoFromUrl,
|
|
150
|
+
isUserAuthorized,
|
|
151
|
+
login,
|
|
152
|
+
navigateToLoginPage
|
|
153
|
+
};
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
AUTHORIZATION:
|
|
3
|
-
CLIENT_ID:
|
|
1
|
+
var constants_default = {
|
|
2
|
+
AUTHORIZATION: "Authorization",
|
|
3
|
+
CLIENT_ID: "tirykwfo"
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
WARN: 12 * 60 *
|
|
7
|
-
|
|
8
|
-
EXPIRY: 15 * 60 * 1000 // 15 mins
|
|
9
|
-
|
|
5
|
+
const SESSION_TIMEOUT_INTERVAL = {
|
|
6
|
+
WARN: 12 * 60 * 1e3,
|
|
7
|
+
EXPIRY: 15 * 60 * 1e3
|
|
10
8
|
};
|
|
11
|
-
|
|
12
|
-
EM:
|
|
13
|
-
CORP_COOL:
|
|
9
|
+
const Themes = {
|
|
10
|
+
EM: "em",
|
|
11
|
+
CORP_COOL: "corpcool"
|
|
12
|
+
};
|
|
13
|
+
const HOST_WINDOW_RESIZED = "HOST_WINDOW_RESIZED";
|
|
14
|
+
const HOST_WINDOW_BREAKPOINT_CHANGED = "HOST_WINDOW_BREAKPOINT_CHANGED";
|
|
15
|
+
export {
|
|
16
|
+
HOST_WINDOW_BREAKPOINT_CHANGED,
|
|
17
|
+
HOST_WINDOW_RESIZED,
|
|
18
|
+
SESSION_TIMEOUT_INTERVAL,
|
|
19
|
+
Themes,
|
|
20
|
+
constants_default as default
|
|
14
21
|
};
|
|
15
|
-
export const HOST_WINDOW_RESIZED = 'HOST_WINDOW_RESIZED';
|
|
16
|
-
export const HOST_WINDOW_BREAKPOINT_CHANGED = 'HOST_WINDOW_BREAKPOINT_CHANGED';
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
const docFontSize = document && document.documentElement ? getComputedStyle(document.documentElement).fontSize :
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const docFontSize = document && document.documentElement ? getComputedStyle(document.documentElement).fontSize : "16";
|
|
2
|
+
const remToPx = (rem) => rem * parseFloat(docFontSize);
|
|
3
|
+
const pxToRem = (px) => `${px / parseFloat(docFontSize)}rem`;
|
|
4
|
+
export {
|
|
5
|
+
pxToRem,
|
|
6
|
+
remToPx
|
|
7
|
+
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
const {
|
|
3
|
-
emui
|
|
4
|
-
} = window;
|
|
1
|
+
function RegisterService(appId, ServiceName) {
|
|
2
|
+
const { emui } = window;
|
|
5
3
|
const props = emui[appId] || (emui[appId] = {});
|
|
6
|
-
|
|
7
4
|
if (props.service) {
|
|
8
5
|
delete props.service;
|
|
9
6
|
}
|
|
10
|
-
|
|
11
7
|
props.service = new ServiceName();
|
|
12
8
|
return () => {
|
|
13
9
|
delete props.service;
|
|
14
10
|
};
|
|
15
|
-
}
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
RegisterService
|
|
14
|
+
};
|
package/dist/es/utils/helpers.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const PROTOCOL = new RegExp(
|
|
4
|
-
|
|
1
|
+
const isProd = () => false;
|
|
2
|
+
const isCIBuild = () => process.env.CI === "true";
|
|
3
|
+
const PROTOCOL = new RegExp("^(?:[a-z]+:)?//", "i");
|
|
4
|
+
const convertRelativeToAbsoluteUrl = (url) => {
|
|
5
5
|
if (!PROTOCOL.test(url)) {
|
|
6
6
|
return new URL(url, document.location.origin).href;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
8
|
return url;
|
|
10
|
-
};
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
convertRelativeToAbsoluteUrl,
|
|
12
|
+
isCIBuild,
|
|
13
|
+
isProd
|
|
14
|
+
};
|
package/dist/es/utils/history.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { createBrowserHistory, createMemoryHistory } from
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createBrowserHistory, createMemoryHistory } from "history";
|
|
2
|
+
const browserHistory = createBrowserHistory();
|
|
3
|
+
const memoryHistory = createMemoryHistory();
|
|
4
|
+
export {
|
|
5
|
+
browserHistory,
|
|
6
|
+
memoryHistory
|
|
7
|
+
};
|
|
@@ -1,62 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
const logRecords = {
|
|
2
2
|
ERR_TOAST_OPEN_FAILED: {
|
|
3
|
-
code:
|
|
4
|
-
msg:
|
|
3
|
+
code: "appsdk001",
|
|
4
|
+
msg: "Unable to open Error Toast"
|
|
5
5
|
},
|
|
6
6
|
WAIT_MSG_OPEN_FAILED: {
|
|
7
|
-
code:
|
|
8
|
-
msg:
|
|
7
|
+
code: "appsdk02",
|
|
8
|
+
msg: "Unable to open Wait message"
|
|
9
9
|
},
|
|
10
10
|
WAIT_MSG_CLOSE_FAILED: {
|
|
11
|
-
code:
|
|
12
|
-
msg:
|
|
11
|
+
code: "appsdk03",
|
|
12
|
+
msg: "Unable to close Wait message"
|
|
13
13
|
},
|
|
14
14
|
APP_CONFIG_LOAD_FAILED: {
|
|
15
|
-
code:
|
|
16
|
-
msg:
|
|
15
|
+
code: "appsdk04",
|
|
16
|
+
msg: "Unable to load application configuration"
|
|
17
17
|
},
|
|
18
|
-
ASSET_NOT_FOUND_IN_MANIFEST: assetName => ({
|
|
19
|
-
code:
|
|
18
|
+
ASSET_NOT_FOUND_IN_MANIFEST: (assetName) => ({
|
|
19
|
+
code: "appsdk05",
|
|
20
20
|
msg: `Application load failed. unable to locate ${assetName} in the manifest`
|
|
21
21
|
}),
|
|
22
22
|
APP_INIT_FAILED: (appId, errMsg) => ({
|
|
23
|
-
code:
|
|
23
|
+
code: "appsdk06",
|
|
24
24
|
msg: `Application load failed. Unable to load one or more application resources for appId: ${appId}. ${errMsg}`
|
|
25
25
|
}),
|
|
26
|
-
APP_LOADING: appId => ({
|
|
27
|
-
code:
|
|
26
|
+
APP_LOADING: (appId) => ({
|
|
27
|
+
code: "appsdk07",
|
|
28
28
|
msg: `Application ${appId} is loading...`
|
|
29
29
|
}),
|
|
30
|
-
APP_LOADING_COMPLETE: appId => ({
|
|
31
|
-
code:
|
|
30
|
+
APP_LOADING_COMPLETE: (appId) => ({
|
|
31
|
+
code: "appsdk08",
|
|
32
32
|
msg: `Application ${appId} loaded`
|
|
33
33
|
}),
|
|
34
|
-
APP_UNLOADING: appId => ({
|
|
35
|
-
code:
|
|
34
|
+
APP_UNLOADING: (appId) => ({
|
|
35
|
+
code: "appsdk09",
|
|
36
36
|
msg: `Application ${appId} unloading...`
|
|
37
37
|
}),
|
|
38
|
-
APP_UNLOADING_COMPLETE: appId => ({
|
|
39
|
-
code:
|
|
38
|
+
APP_UNLOADING_COMPLETE: (appId) => ({
|
|
39
|
+
code: "appsdk10",
|
|
40
40
|
msg: `Application ${appId} unloaded`
|
|
41
41
|
}),
|
|
42
|
-
SSF_HOST_OBJECT_NOT_FOUND: name => ({
|
|
43
|
-
code:
|
|
42
|
+
SSF_HOST_OBJECT_NOT_FOUND: (name) => ({
|
|
43
|
+
code: "appsdk11",
|
|
44
44
|
msg: `Parent window doesn't expose SSF Object named ${name}`
|
|
45
45
|
}),
|
|
46
46
|
LOGIN_FAILED: {
|
|
47
|
-
code:
|
|
48
|
-
msg:
|
|
47
|
+
code: "appsdk12",
|
|
48
|
+
msg: "Unable to login the user."
|
|
49
49
|
},
|
|
50
50
|
LOGOUT_FAILED: {
|
|
51
|
-
code:
|
|
52
|
-
msg:
|
|
51
|
+
code: "appsdk13",
|
|
52
|
+
msg: "Unable to logout the user."
|
|
53
53
|
},
|
|
54
54
|
SERVICE_WORKER_FAILED: {
|
|
55
|
-
code:
|
|
56
|
-
msg:
|
|
55
|
+
code: "appsdk14",
|
|
56
|
+
msg: "Service Worker Registration Failed"
|
|
57
57
|
},
|
|
58
58
|
UNHANDLED_ERROR: {
|
|
59
|
-
code:
|
|
60
|
-
msg:
|
|
59
|
+
code: "appsdk15",
|
|
60
|
+
msg: "Unhandled error in react component"
|
|
61
61
|
}
|
|
62
|
-
};
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
logRecords
|
|
65
|
+
};
|