@elliemae/pui-app-sdk 3.0.0-beta.1 → 3.0.0-beta.13
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 +13 -7
- package/dist/cjs/analytics/index.js +13 -12
- package/dist/cjs/analytics/page-view-event.js +23 -13
- package/dist/cjs/analytics/user-session-event.js +14 -13
- package/dist/cjs/analytics/user-wait-event.js +13 -12
- package/dist/cjs/analytics/web-analytics.js +19 -2
- package/dist/cjs/api/auth/index.js +11 -10
- package/dist/cjs/api/helpers.js +12 -11
- package/dist/cjs/api/users/index.js +11 -10
- package/dist/cjs/api/users/users.json +8 -0
- package/dist/cjs/app.config.json +129 -0
- package/dist/cjs/communication/http-client/index.js +18 -12
- package/dist/cjs/communication/http-client/request-interceptor.js +11 -10
- package/dist/cjs/communication/http-client/response-interceptor.js +13 -7
- package/dist/cjs/communication/http-client/retry-axios.js +14 -8
- package/dist/cjs/communication/http-client/retry.js +11 -10
- package/dist/cjs/communication/http-client/tests/index.test-disable.js +7 -7
- package/dist/cjs/data/auth/actions.js +19 -2
- package/dist/cjs/data/auth/reducer.js +14 -8
- package/dist/cjs/data/breakpoint/index.js +13 -7
- package/dist/cjs/data/error/index.js +11 -10
- package/dist/cjs/data/index.js +35 -0
- package/dist/cjs/data/live-message/index.js +11 -10
- package/dist/cjs/data/logout/actions.js +19 -2
- package/dist/cjs/data/navigation-prompt/actions.js +19 -2
- package/dist/cjs/data/react-redux.js +11 -10
- package/dist/cjs/data/reducers.js +15 -14
- package/dist/cjs/data/saga.js +19 -2
- package/dist/cjs/data/store.js +17 -24
- package/dist/cjs/data/wait-message/actions.js +19 -2
- package/dist/cjs/data/wait-message/reducer.js +14 -8
- package/dist/cjs/index.js +88 -82
- package/dist/cjs/index.pug +15 -0
- package/dist/cjs/micro-frontend.js +34 -0
- package/dist/cjs/sideeffect/auth/index.js +15 -14
- package/dist/cjs/sideeffect/error-toast/index.js +15 -14
- package/dist/cjs/sideeffect/wait-message/index.js +15 -14
- package/dist/cjs/typings/styled.d.js +1 -19
- package/dist/cjs/utils/app-config/config.js +14 -8
- package/dist/cjs/utils/app-config/index.js +17 -11
- package/dist/cjs/utils/app-host-integration/react.js +11 -10
- package/dist/cjs/utils/auth/helper.js +13 -7
- package/dist/cjs/utils/auth/index.js +19 -18
- package/dist/cjs/utils/await.js +18 -1
- package/dist/cjs/utils/constants.js +19 -2
- package/dist/cjs/utils/font-size.js +19 -2
- package/dist/cjs/utils/guest-with-service.js +19 -2
- package/dist/cjs/utils/helpers.js +20 -3
- package/dist/cjs/utils/history.js +11 -10
- package/dist/cjs/utils/log-records.js +19 -2
- package/dist/cjs/utils/micro-frontend/console-logger.js +12 -11
- package/dist/cjs/utils/micro-frontend/guest.js +25 -19
- package/dist/cjs/utils/micro-frontend/host.js +30 -29
- package/dist/cjs/utils/micro-frontend/index.js +17 -11
- package/dist/cjs/utils/micro-frontend/types.js +18 -1
- package/dist/cjs/utils/redact-pii.js +19 -2
- package/dist/cjs/utils/service-worker.js +12 -11
- package/dist/cjs/utils/session.js +15 -14
- package/dist/cjs/utils/storybook/{main.js → cjs/main.js} +11 -3
- package/dist/cjs/utils/storybook/{middleware.js → cjs/middleware.js} +0 -0
- package/dist/cjs/utils/storybook/{vite.js → cjs/vite.js} +0 -0
- package/dist/cjs/utils/storybook/{webpack.js → cjs/webpack.js} +9 -1
- package/dist/cjs/utils/storybook/manager.js +12 -11
- package/dist/cjs/utils/storybook/preview.js +19 -19
- package/dist/cjs/utils/storybook/theme.js +11 -10
- package/dist/cjs/utils/testing/index.js +19 -12
- package/dist/cjs/utils/testing/render-with-redux.js +17 -10
- package/dist/cjs/utils/testing/render-with-router-redux.js +20 -13
- package/dist/cjs/utils/testing/render-with-router.js +24 -14
- package/dist/cjs/utils/testing/render-with-state-addons.js +17 -10
- package/dist/cjs/utils/types.js +18 -1
- package/dist/cjs/utils/url.js +19 -2
- package/dist/cjs/utils/web-storage.js +13 -7
- package/dist/cjs/utils/window.js +11 -10
- package/dist/cjs/view/app-root/hosted-app.js +18 -11
- package/dist/cjs/view/app-root/index.js +25 -18
- package/dist/cjs/view/app-root/stand-alone-app.js +22 -15
- package/dist/cjs/view/app-root/style.js +11 -10
- package/dist/cjs/view/app-router.js +48 -0
- package/dist/cjs/view/error-boundary/default-error-template.js +25 -2
- package/dist/cjs/view/error-boundary/index.js +16 -10
- package/dist/cjs/view/error-toast/index.js +21 -14
- package/dist/cjs/view/fetch-host-app-data/index.js +16 -10
- package/dist/cjs/view/fetch-host-app-data/store.js +11 -10
- package/dist/cjs/view/fields/check-box/index.js +16 -9
- package/dist/cjs/view/fields/combo-box/index.js +16 -9
- package/dist/cjs/view/fields/connect-form.js +11 -10
- package/dist/cjs/view/fields/date-input/index.js +16 -9
- package/dist/cjs/view/fields/date-picker/index.js +16 -9
- package/dist/cjs/view/fields/form-item-layout/index.js +17 -10
- package/dist/cjs/view/fields/input-mask/index.js +16 -9
- package/dist/cjs/view/fields/large-text-box/index.js +16 -9
- package/dist/cjs/view/fields/radio/index.js +16 -9
- package/dist/cjs/view/fields/radio-group/index.js +16 -9
- package/dist/cjs/view/fields/text-box/index.js +16 -9
- package/dist/cjs/view/fields/watch-value.js +15 -8
- package/dist/cjs/view/form/index.js +15 -8
- package/dist/cjs/view/form/personal-info-section.js +18 -11
- package/dist/cjs/view/form/submit-button/index.js +16 -9
- package/dist/cjs/view/guest-unload-handlers/index.js +11 -10
- package/dist/cjs/view/host-binding-events/index.js +19 -2
- package/dist/cjs/view/intro.stories.mdx +27 -0
- package/dist/cjs/view/live-message/index.js +15 -8
- package/dist/cjs/view/loadable/index.js +15 -8
- package/dist/cjs/view/login/index.js +15 -14
- package/dist/cjs/view/media-breakpoint/index.js +18 -17
- package/dist/cjs/view/message-to-host-app/index.js +11 -10
- package/dist/cjs/view/micro-app/app-factory/index.js +22 -19
- package/dist/cjs/view/micro-app/const.js +19 -2
- package/dist/cjs/view/micro-app/index.js +17 -10
- package/dist/cjs/view/micro-app/resources/manifest.js +16 -13
- package/dist/cjs/view/micro-app/resources/script.js +12 -11
- package/dist/cjs/view/micro-app/resources/style.js +11 -10
- package/dist/cjs/view/micro-app/types.js +18 -1
- package/dist/cjs/view/micro-app/use-app-will-render.js +21 -18
- package/dist/cjs/view/micro-app/utils.js +11 -10
- package/dist/cjs/view/micro-iframe-app/app.js +18 -11
- package/dist/cjs/view/micro-iframe-app/iframe/const.js +19 -2
- package/dist/cjs/view/micro-iframe-app/iframe/index.html +74 -0
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +16 -9
- package/dist/cjs/view/micro-iframe-app/index.js +16 -9
- package/dist/cjs/view/micro-iframe-app/types.js +18 -1
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +16 -13
- package/dist/cjs/view/modals/error/index.js +16 -9
- package/dist/cjs/view/modals/navigation-prompt/index.js +18 -11
- package/dist/cjs/view/modals/session-expiry/customHooks.js +14 -13
- package/dist/cjs/view/modals/session-expiry/index.js +24 -14
- package/dist/cjs/view/modals/wait-message/html-wait-message.js +12 -11
- package/dist/cjs/view/modals/wait-message/index.js +19 -12
- package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +14 -13
- package/dist/cjs/view/page.js +51 -0
- package/dist/cjs/view/render-with-delay/index.js +15 -8
- package/dist/cjs/view/render-with-host-data/index.js +16 -9
- package/dist/cjs/view/require-auth.js +62 -0
- package/dist/cjs/view/session-timeout/index.js +23 -12
- package/dist/cjs/view/storybook/decorator.js +15 -8
- package/dist/cjs/view/use-previous.js +11 -10
- package/dist/cjs/view/useMediaBreakpoints/index.js +11 -10
- package/dist/cjs/view/visually-hidden/index.js +15 -8
- package/dist/cjs/view/window-size/index.js +23 -18
- package/dist/es/analytics/index.js +3 -3
- package/dist/es/analytics/page-view-event.js +12 -3
- package/dist/es/analytics/user-session-event.js +2 -2
- package/dist/es/analytics/user-wait-event.js +1 -1
- package/dist/es/api/auth/index.js +1 -1
- package/dist/es/api/users/index.js +1 -1
- package/dist/es/api/users/users.json +8 -0
- package/dist/es/app.config.json +129 -0
- package/dist/es/communication/http-client/index.js +5 -5
- package/dist/es/communication/http-client/request-interceptor.js +1 -1
- package/dist/es/communication/http-client/retry-axios.js +1 -1
- package/dist/es/communication/http-client/retry.js +1 -1
- package/dist/es/communication/http-client/tests/index.test-disable.js +3 -3
- package/dist/es/data/auth/reducer.js +1 -1
- package/dist/es/data/index.js +11 -0
- package/dist/es/data/reducers.js +4 -4
- package/dist/es/data/store.js +5 -15
- package/dist/es/data/wait-message/reducer.js +1 -1
- package/dist/es/index.js +85 -75
- package/dist/es/index.pug +15 -0
- package/dist/es/micro-frontend.js +10 -0
- package/dist/es/sideeffect/auth/index.js +4 -4
- package/dist/es/sideeffect/error-toast/index.js +4 -4
- package/dist/es/sideeffect/wait-message/index.js +4 -4
- package/dist/es/utils/app-config/config.js +1 -1
- package/dist/es/utils/app-config/index.js +4 -4
- package/dist/es/utils/app-host-integration/react.js +1 -1
- package/dist/es/utils/auth/helper.js +1 -1
- package/dist/es/utils/auth/index.js +9 -9
- package/dist/es/utils/helpers.js +1 -1
- package/dist/es/utils/micro-frontend/console-logger.js +1 -1
- package/dist/es/utils/micro-frontend/guest.js +9 -9
- package/dist/es/utils/micro-frontend/host.js +19 -18
- package/dist/es/utils/micro-frontend/index.js +4 -4
- package/dist/es/utils/service-worker.js +2 -2
- package/dist/es/utils/session.js +4 -4
- package/dist/es/utils/storybook/manager.js +1 -1
- package/dist/es/utils/storybook/preview.js +7 -8
- package/dist/es/utils/testing/index.js +4 -3
- package/dist/es/utils/testing/render-with-redux.js +3 -2
- package/dist/es/utils/testing/render-with-router-redux.js +5 -4
- package/dist/es/utils/testing/render-with-router.js +10 -6
- package/dist/es/utils/testing/render-with-state-addons.js +1 -0
- package/dist/es/view/app-root/hosted-app.js +5 -4
- package/dist/es/view/app-root/index.js +9 -8
- package/dist/es/view/app-root/stand-alone-app.js +8 -7
- package/dist/es/view/app-router.js +19 -0
- package/dist/es/view/error-boundary/default-error-template.js +1 -0
- package/dist/es/view/error-boundary/index.js +3 -3
- package/dist/es/view/error-toast/index.js +4 -8
- package/dist/es/view/fetch-host-app-data/index.js +6 -3
- package/dist/es/view/fields/check-box/index.js +2 -1
- package/dist/es/view/fields/combo-box/index.js +2 -1
- package/dist/es/view/fields/date-input/index.js +2 -1
- package/dist/es/view/fields/date-picker/index.js +2 -1
- package/dist/es/view/fields/form-item-layout/index.js +3 -2
- package/dist/es/view/fields/input-mask/index.js +4 -2
- package/dist/es/view/fields/large-text-box/index.js +2 -1
- package/dist/es/view/fields/radio/index.js +2 -1
- package/dist/es/view/fields/radio-group/index.js +2 -1
- package/dist/es/view/fields/text-box/index.js +2 -1
- package/dist/es/view/fields/watch-value.js +1 -0
- package/dist/es/view/form/index.js +1 -0
- package/dist/es/view/form/personal-info-section.js +5 -4
- package/dist/es/view/form/submit-button/index.js +2 -1
- package/dist/es/view/guest-unload-handlers/index.js +1 -1
- package/dist/es/view/intro.stories.mdx +27 -0
- package/dist/es/view/live-message/index.js +2 -1
- package/dist/es/view/loadable/index.js +2 -1
- package/dist/es/view/login/index.js +4 -4
- package/dist/es/view/media-breakpoint/index.js +5 -5
- package/dist/es/view/message-to-host-app/index.js +1 -1
- package/dist/es/view/micro-app/app-factory/index.js +15 -10
- package/dist/es/view/micro-app/index.js +3 -2
- package/dist/es/view/micro-app/resources/manifest.js +6 -4
- package/dist/es/view/micro-app/resources/script.js +2 -2
- package/dist/es/view/micro-app/resources/style.js +1 -1
- package/dist/es/view/micro-app/use-app-will-render.js +13 -6
- package/dist/es/view/micro-app/utils.js +1 -1
- package/dist/es/view/micro-iframe-app/app.js +4 -3
- package/dist/es/view/micro-iframe-app/iframe/index.html +74 -0
- package/dist/es/view/micro-iframe-app/iframe/index.js +2 -1
- package/dist/es/view/micro-iframe-app/index.js +3 -2
- package/dist/es/view/micro-iframe-app/use-frame-loaded.js +5 -3
- package/dist/es/view/modals/error/index.js +2 -1
- package/dist/es/view/modals/navigation-prompt/index.js +4 -3
- package/dist/es/view/modals/session-expiry/customHooks.js +2 -2
- package/dist/es/view/modals/session-expiry/index.js +11 -7
- package/dist/es/view/modals/wait-message/html-wait-message.js +1 -1
- package/dist/es/view/modals/wait-message/index.js +5 -4
- package/dist/es/view/modals/wait-message/wait-message-launcher.js +3 -3
- package/dist/es/view/page.js +22 -0
- package/dist/es/view/render-with-delay/index.js +2 -1
- package/dist/es/view/render-with-host-data/index.js +3 -2
- package/dist/es/view/require-auth.js +33 -0
- package/dist/es/view/session-timeout/index.js +10 -5
- package/dist/es/view/storybook/decorator.js +3 -2
- package/dist/es/view/visually-hidden/index.js +1 -0
- package/dist/es/view/window-size/index.js +11 -7
- 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 +15 -15
- package/dist/types/data/reducers.d.ts +6 -6
- package/dist/types/data/store.d.ts +30 -30
- package/dist/types/index.d.ts +78 -78
- package/dist/types/micro-frontend.d.ts +6 -0
- package/dist/types/sideeffect/auth/index.d.ts +1 -1
- package/dist/types/utils/app-config/config.d.ts +1 -1
- package/dist/types/utils/app-host-integration/react.d.ts +1 -1
- package/dist/types/utils/history.d.ts +2 -2
- 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/session.d.ts +5 -2
- package/dist/types/utils/storybook/{main.d.cts → cjs/main.d.ts} +24 -2
- package/dist/types/utils/storybook/{middleware.d.cts → cjs/middleware.d.ts} +0 -0
- package/dist/types/utils/storybook/{vite.d.cts → cjs/vite.d.ts} +0 -0
- package/dist/types/utils/storybook/cjs/webpack.d.ts +16 -0
- package/dist/types/utils/storybook/preview.d.ts +8 -2
- package/dist/types/utils/testing/render-with-redux.d.ts +22 -22
- package/dist/types/utils/testing/render-with-router-redux.d.ts +22 -22
- package/dist/types/utils/testing/render-with-router.d.ts +2 -2
- package/dist/types/view/app-root/index.d.ts +1 -1
- package/dist/types/view/app-router.d.ts +9 -0
- 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/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/types.d.ts +1 -0
- package/dist/types/view/micro-app/use-app-will-render.d.ts +2 -2
- 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/page.d.ts +8 -0
- package/dist/types/view/require-auth.d.ts +8 -0
- package/dist/types/view/storybook/decorator.d.ts +1 -1
- package/package.json +44 -29
- package/dist/cjs/route/index.js +0 -48
- package/dist/cjs/route/page-view.js +0 -38
- package/dist/cjs/route/private-route/index.js +0 -68
- package/dist/cjs/view/header/center-region/index.js +0 -64
- package/dist/cjs/view/header/index.js +0 -43
- package/dist/cjs/view/header/logo-region/index.js +0 -32
- package/dist/cjs/view/header/nav-region/index.js +0 -46
- package/dist/cjs/view/header/nav-region/notification/index.js +0 -31
- package/dist/cjs/view/header/nav-region/user/index.js +0 -31
- package/dist/es/route/index.js +0 -25
- package/dist/es/route/page-view.js +0 -15
- package/dist/es/route/private-route/index.js +0 -45
- package/dist/es/view/header/center-region/index.js +0 -41
- package/dist/es/view/header/index.js +0 -20
- package/dist/es/view/header/logo-region/index.js +0 -9
- package/dist/es/view/header/nav-region/index.js +0 -23
- package/dist/es/view/header/nav-region/notification/index.js +0 -8
- package/dist/es/view/header/nav-region/user/index.js +0 -8
- package/dist/types/route/index.d.ts +0 -8
- package/dist/types/route/page-view.d.ts +0 -1
- package/dist/types/route/private-route/index.d.ts +0 -8
- package/dist/types/utils/storybook/webpack.d.cts +0 -8
- package/dist/types/view/header/center-region/index.d.ts +0 -9
- package/dist/types/view/header/index.d.ts +0 -7
- package/dist/types/view/header/index.stories.d.ts +0 -5
- package/dist/types/view/header/logo-region/index.d.ts +0 -2
- package/dist/types/view/header/nav-region/index.d.ts +0 -2
- package/dist/types/view/header/nav-region/notification/index.d.ts +0 -2
- package/dist/types/view/header/nav-region/user/index.d.ts +0 -2
package/dist/es/index.js
CHANGED
|
@@ -1,91 +1,101 @@
|
|
|
1
|
-
import { isUserAuthorized, login, authorize } from "./utils/auth";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { isUserAuthorized, login, authorize } from "./utils/auth/index.js";
|
|
2
|
+
import {
|
|
3
|
+
getHTTPClient,
|
|
4
|
+
getAuthHTTPClient
|
|
5
|
+
} from "./communication/http-client/index.js";
|
|
6
|
+
import { onAuthorizationFailure } from "./communication/http-client/response-interceptor.js";
|
|
7
|
+
import { auth } from "./data/auth/actions.js";
|
|
8
|
+
import { RequireAuth } from "./view/require-auth.js";
|
|
9
|
+
import { Page } from "./view/page.js";
|
|
10
|
+
import { default as default2 } from "./utils/constants.js";
|
|
11
|
+
import { useAppDispatch, useAppSelector } from "./data/react-redux.js";
|
|
9
12
|
import { useInjectReducer, useInjectSaga } from "redux-injectors";
|
|
10
|
-
import { getAuthorizationHeader } from "./utils/auth/helper";
|
|
11
|
-
import { getRedirectUrl, removeDoubleSlash } from "./utils/url";
|
|
12
|
-
import { createAppStore } from "./data/store";
|
|
13
|
-
import { browserHistory, memoryHistory } from "./utils/history";
|
|
14
|
-
import { Themes } from "./utils/constants";
|
|
15
|
-
import { ACTIONS } from "./data/navigation-prompt/actions";
|
|
16
|
-
import { loadable } from "./view/loadable";
|
|
17
|
-
import { WaitMessage } from "./view/modals/wait-message";
|
|
18
|
-
import { SessionTimeout } from "./view/session-timeout";
|
|
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";
|
|
19
22
|
import {
|
|
20
23
|
subscribeToSessionExpiryWarning,
|
|
21
24
|
subscribeToSessionExpiry,
|
|
22
25
|
resetUserIdleTime,
|
|
23
26
|
trackActivity
|
|
24
|
-
} from "./utils/session";
|
|
25
|
-
import { waitMessage } from "./data/wait-message/actions";
|
|
26
|
-
import { initServiceWorker } from "./utils/service-worker";
|
|
27
|
-
import { CMicroAppGuest } from "./utils/micro-frontend/guest";
|
|
28
|
-
import { CMicroAppHost } from "./utils/micro-frontend/host";
|
|
29
|
-
import { enableReactAppForHostIntegration } from "./utils/app-host-integration/react";
|
|
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";
|
|
30
33
|
import {
|
|
31
34
|
getAppConfigValue,
|
|
32
35
|
setAppConfigValue,
|
|
33
36
|
setAppConfig
|
|
34
|
-
} from "./utils/app-config/config";
|
|
35
|
-
import { getMicroFrontEndAppConfig } from "./utils/micro-frontend";
|
|
36
|
-
import { loadAppConfig } from "./utils/app-config";
|
|
37
|
-
import { AppRoot } from "./view/app-root";
|
|
38
|
-
import { ErrorBoundary } from "./view/error-boundary";
|
|
39
|
-
import { isProd, isCIBuild } from "./utils/helpers";
|
|
40
|
-
import {
|
|
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";
|
|
41
47
|
import {
|
|
42
48
|
getHostAppDataByKey,
|
|
43
49
|
setHostAppData
|
|
44
|
-
} from "./view/fetch-host-app-data/store";
|
|
45
|
-
import { sendMessageToHost } from "./view/message-to-host-app";
|
|
50
|
+
} from "./view/fetch-host-app-data/store.js";
|
|
51
|
+
import { sendMessageToHost } from "./view/message-to-host-app/index.js";
|
|
46
52
|
import {
|
|
47
53
|
onGuestUnloadStart,
|
|
48
54
|
notifyGuestUnloadComplete
|
|
49
|
-
} from "./view/guest-unload-handlers";
|
|
50
|
-
import { renderWithHostData } from "./view/render-with-host-data";
|
|
51
|
-
import { fetchHostAppData } from "./view/fetch-host-app-data";
|
|
52
|
-
export * from "./utils/testing";
|
|
53
|
-
import { renderWithRouterRedux } from "./utils/testing/render-with-router-redux";
|
|
54
|
-
import { renderWithRedux } from "./utils/testing/render-with-redux";
|
|
55
|
-
import { renderWithRouter } from "./utils/testing/render-with-router";
|
|
56
|
-
import { RenderWithStateAddOns } from "./utils/testing/render-with-state-addons";
|
|
57
|
-
import { getApiActionCreator, getSelectField } from "./api/helpers";
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import { ErrorToast } from "./view/error-toast";
|
|
62
|
-
import { Form } from "./view/form";
|
|
63
|
-
import { ConnectForm } from "./view/fields/connect-form";
|
|
64
|
-
import { FormItemLayout } from "./view/fields/form-item-layout";
|
|
65
|
-
import { TextBox } from "./view/fields/text-box";
|
|
66
|
-
import { LargeTextBox } from "./view/fields/large-text-box";
|
|
67
|
-
import {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
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";
|
|
58
|
+
export * from "./utils/testing/index.js";
|
|
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 { ErrorToast } from "./view/error-toast/index.js";
|
|
68
|
+
import { Form } from "./view/form/index.js";
|
|
69
|
+
import { ConnectForm } from "./view/fields/connect-form.js";
|
|
70
|
+
import { FormItemLayout } from "./view/fields/form-item-layout/index.js";
|
|
71
|
+
import { TextBox } from "./view/fields/text-box/index.js";
|
|
72
|
+
import { LargeTextBox } from "./view/fields/large-text-box/index.js";
|
|
73
|
+
import {
|
|
74
|
+
InputMask,
|
|
75
|
+
MASK_TYPES,
|
|
76
|
+
MASK_PIPES
|
|
77
|
+
} from "./view/fields/input-mask/index.js";
|
|
78
|
+
import { ComboBox } from "./view/fields/combo-box/index.js";
|
|
79
|
+
import { CheckBox } from "./view/fields/check-box/index.js";
|
|
80
|
+
import { Radio } from "./view/fields/radio/index.js";
|
|
81
|
+
import { RadioGroup } from "./view/fields/radio-group/index.js";
|
|
82
|
+
import { DateInput } from "./view/fields/date-input/index.js";
|
|
83
|
+
import { DatePicker } from "./view/fields/date-picker/index.js";
|
|
84
|
+
import { FormSubmitButton } from "./view/form/submit-button/index.js";
|
|
85
|
+
import { MediaBreakpoint } from "./view/media-breakpoint/index.js";
|
|
86
|
+
import { VisuallyHidden } from "./view/visually-hidden/index.js";
|
|
87
|
+
import { actions } from "./data/live-message/index.js";
|
|
88
|
+
import { actions as actions2 } from "./data/error/index.js";
|
|
89
|
+
import { actions as actions3 } from "./data/logout/actions.js";
|
|
90
|
+
import { MicroApp } from "./view/micro-app/index.js";
|
|
91
|
+
import { MicroIFrameApp } from "./view/micro-iframe-app/index.js";
|
|
92
|
+
import { getNavigationLinks } from "./view/micro-app/utils.js";
|
|
93
|
+
import { getStore } from "./data/store.js";
|
|
94
|
+
import { RegisterService } from "./utils/guest-with-service.js";
|
|
95
|
+
import { setAppDynamicsUserData } from "./analytics/appdynamics.js";
|
|
96
|
+
import { sendBAEvent } from "./analytics/index.js";
|
|
97
|
+
import { updateBAEventParameters } from "./analytics/web-analytics.js";
|
|
98
|
+
import { redactPii } from "./utils/redact-pii.js";
|
|
89
99
|
export {
|
|
90
100
|
AppRoot,
|
|
91
101
|
CMicroAppGuest,
|
|
@@ -100,7 +110,6 @@ export {
|
|
|
100
110
|
Form,
|
|
101
111
|
FormItemLayout,
|
|
102
112
|
FormSubmitButton,
|
|
103
|
-
Header,
|
|
104
113
|
InputMask,
|
|
105
114
|
LargeTextBox,
|
|
106
115
|
MASK_PIPES,
|
|
@@ -109,12 +118,12 @@ export {
|
|
|
109
118
|
MicroApp,
|
|
110
119
|
MicroIFrameApp,
|
|
111
120
|
ACTIONS as NavigationPromptActions,
|
|
112
|
-
|
|
121
|
+
Page,
|
|
113
122
|
Radio,
|
|
114
123
|
RadioGroup,
|
|
115
124
|
RegisterService,
|
|
116
125
|
RenderWithStateAddOns,
|
|
117
|
-
|
|
126
|
+
RequireAuth,
|
|
118
127
|
SessionTimeout,
|
|
119
128
|
TextBox,
|
|
120
129
|
Themes,
|
|
@@ -127,6 +136,7 @@ export {
|
|
|
127
136
|
enableReactAppForHostIntegration,
|
|
128
137
|
actions2 as error,
|
|
129
138
|
fetchHostAppData,
|
|
139
|
+
getUser as fetchUserSettings,
|
|
130
140
|
getApiActionCreator,
|
|
131
141
|
getAppConfigValue,
|
|
132
142
|
getAuthHTTPClient,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
doctype html
|
|
2
|
+
head
|
|
3
|
+
meta(charset='UTF-8')
|
|
4
|
+
meta(name='viewport' content='width=device-width, initial-scale=1.0')
|
|
5
|
+
meta(http-equiv='X-UA-Compatible' content='ie=edge')
|
|
6
|
+
title #{htmlWebpackPlugin.options.libraryName}
|
|
7
|
+
p This library #{htmlWebpackPlugin.options.libraryName} exposes the following properties
|
|
8
|
+
ul#libraryAttributes
|
|
9
|
+
script(lang='javascript').
|
|
10
|
+
window.onload = () => {
|
|
11
|
+
const attribNode = document.getElementById('libraryAttributes');
|
|
12
|
+
if (attribNode) {
|
|
13
|
+
attribNode.innerHTML = Object.keys(window['#{htmlWebpackPlugin.options.libraryName}'] || {}).reduce((value, attribute) => value += `<li>${attribute}</li>`, '');
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -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
|
+
};
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
LOGIN,
|
|
8
8
|
LOGOUT,
|
|
9
9
|
LOGIN_SUCCESS
|
|
10
|
-
} from "../../data/auth/actions";
|
|
11
|
-
import { authorize, endSession } from "../../utils/auth";
|
|
12
|
-
import { getLogger } from "../../utils/micro-frontend";
|
|
13
|
-
import { logRecords } from "../../utils/log-records";
|
|
10
|
+
} from "../../data/auth/actions.js";
|
|
11
|
+
import { authorize, endSession } from "../../utils/auth/index.js";
|
|
12
|
+
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
13
|
+
import { logRecords } from "../../utils/log-records.js";
|
|
14
14
|
function* login({
|
|
15
15
|
payload
|
|
16
16
|
}) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
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";
|
|
2
|
+
import { actions } from "../../data/error/index.js";
|
|
3
|
+
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
4
|
+
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
5
|
+
import { logRecords } from "../../utils/log-records.js";
|
|
6
6
|
function* openErrorToast(action) {
|
|
7
7
|
try {
|
|
8
8
|
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
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";
|
|
2
|
+
import { ACTIONS } from "../../data/wait-message/actions.js";
|
|
3
|
+
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
4
|
+
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
5
|
+
import { logRecords } from "../../utils/log-records.js";
|
|
6
6
|
function* openWaitMessage() {
|
|
7
7
|
try {
|
|
8
8
|
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
@@ -4,7 +4,7 @@ const setAppConfig = (config) => {
|
|
|
4
4
|
gAppConfig = config;
|
|
5
5
|
};
|
|
6
6
|
const getAppConfigValue = (key = "", defaultValue = null) => _.clone(_.get(gAppConfig, key, defaultValue));
|
|
7
|
-
const setAppConfigValue = (key
|
|
7
|
+
const setAppConfigValue = (key, value) => _.set(gAppConfig, key, value);
|
|
8
8
|
const hasItem = (key = "") => _.has(gAppConfig, key);
|
|
9
9
|
export {
|
|
10
10
|
getAppConfigValue,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
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";
|
|
2
|
+
import { getHTTPClient } from "../../communication/http-client/index.js";
|
|
3
|
+
import { setAppConfig } from "./config.js";
|
|
4
|
+
import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
|
|
5
|
+
import { updateBAEventParameters } from "../../analytics/web-analytics.js";
|
|
6
6
|
const parseAppConfig = (data) => {
|
|
7
7
|
const { activeEnv } = data;
|
|
8
8
|
const activeEnvConfig = data.env[activeEnv] || {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { browserHistory as history } from "../history";
|
|
1
|
+
import { browserHistory as history } from "../history.js";
|
|
2
2
|
import {
|
|
3
3
|
getToken,
|
|
4
4
|
revokeToken,
|
|
5
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";
|
|
6
|
+
} from "../../api/auth/index.js";
|
|
7
|
+
import { getUser } from "../../api/users/index.js";
|
|
8
|
+
import { loginEvent, logoutEvent } from "../../analytics/user-session-event.js";
|
|
9
|
+
import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
|
|
10
|
+
import { getAuthorizationHeader, setAuthorizationHeader } from "./helper.js";
|
|
11
|
+
import { getAppConfigValue } from "../app-config/config.js";
|
|
12
|
+
import { getLogger } from "../micro-frontend/index.js";
|
|
13
|
+
import { logRecords } from "../log-records.js";
|
|
14
14
|
const IDP_ENDPOINT_CONFIG_KEY = "serviceEndpoints.idp";
|
|
15
15
|
const isUserAuthorized = () => !!getAuthorizationHeader();
|
|
16
16
|
const getIDPInfoFromUrl = () => {
|
package/dist/es/utils/helpers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const isProd = () => false;
|
|
2
2
|
const isCIBuild = () => process.env.CI === "true";
|
|
3
|
-
const PROTOCOL =
|
|
3
|
+
const PROTOCOL = /^(?:[a-z]+:)?/;
|
|
4
4
|
const convertRelativeToAbsoluteUrl = (url) => {
|
|
5
5
|
if (!PROTOCOL.test(url)) {
|
|
6
6
|
return new URL(url, document.location.origin).href;
|
|
@@ -2,14 +2,14 @@ import ReactDOM from "react-dom";
|
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import ssfGuest from "@elliemae/em-ssf-guest";
|
|
4
4
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
5
|
-
import { getWindow } from "../window";
|
|
6
|
-
import { loadAppConfig } from "../app-config";
|
|
7
|
-
import { getAppConfigValue } from "../app-config/config";
|
|
8
|
-
import { browserHistory } from "../history";
|
|
9
|
-
import { logger } from "./console-logger";
|
|
10
|
-
import { removeStorageEvents } from "../web-storage";
|
|
11
|
-
import { updateBAEventParameters } from "../../analytics/web-analytics";
|
|
12
|
-
import { setAppDynamicsUserData } from "../../analytics/appdynamics";
|
|
5
|
+
import { getWindow } from "../window.js";
|
|
6
|
+
import { loadAppConfig } from "../app-config/index.js";
|
|
7
|
+
import { getAppConfigValue } from "../app-config/config.js";
|
|
8
|
+
import { browserHistory } from "../history.js";
|
|
9
|
+
import { logger } from "./console-logger.js";
|
|
10
|
+
import { removeStorageEvents } from "../web-storage.js";
|
|
11
|
+
import { updateBAEventParameters } from "../../analytics/web-analytics.js";
|
|
12
|
+
import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
|
|
13
13
|
const isCrossDomain = () => {
|
|
14
14
|
try {
|
|
15
15
|
window.parent.document;
|
|
@@ -82,7 +82,7 @@ class CMicroAppGuest {
|
|
|
82
82
|
if (!isCrossDomain()) {
|
|
83
83
|
host = window.parent?.emui?.MicroAppHost || null;
|
|
84
84
|
} else if (ssfGuest && this.props.hostName) {
|
|
85
|
-
ssfGuest.connect();
|
|
85
|
+
await ssfGuest.connect();
|
|
86
86
|
const timeout = new Promise((resolve) => {
|
|
87
87
|
setTimeout(resolve, 100, null);
|
|
88
88
|
});
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { publish, subscribe, unsubscribe } from "pubsub-js";
|
|
2
2
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
3
|
-
import { getStore } from "../../data/store";
|
|
4
|
-
import { waitMessage } from "../../data/wait-message/actions";
|
|
5
|
-
import { actions as error } from "../../data/error";
|
|
6
|
-
import { logout } from "../../data/logout/actions";
|
|
7
|
-
import { getAppConfigValue } from "../app-config/config";
|
|
8
|
-
import { resetUserIdleTime } from "../session";
|
|
9
|
-
import { loadAppConfig } from "../app-config";
|
|
10
|
-
import { browserHistory } from "../history";
|
|
11
|
-
import { logger } from "./console-logger";
|
|
3
|
+
import { getStore } from "../../data/store.js";
|
|
4
|
+
import { waitMessage } from "../../data/wait-message/actions.js";
|
|
5
|
+
import { actions as error } from "../../data/error/index.js";
|
|
6
|
+
import { logout } from "../../data/logout/actions.js";
|
|
7
|
+
import { getAppConfigValue } from "../app-config/config.js";
|
|
8
|
+
import { resetUserIdleTime } from "../session.js";
|
|
9
|
+
import { loadAppConfig } from "../app-config/index.js";
|
|
10
|
+
import { browserHistory } from "../history.js";
|
|
11
|
+
import { logger } from "./console-logger.js";
|
|
12
12
|
import {
|
|
13
13
|
HOST_WINDOW_RESIZED,
|
|
14
14
|
HOST_WINDOW_BREAKPOINT_CHANGED
|
|
15
|
-
} from "../constants";
|
|
15
|
+
} from "../constants.js";
|
|
16
16
|
import {
|
|
17
|
+
getWindow,
|
|
17
18
|
getCurrentBreakpoint,
|
|
18
19
|
getViewportSize as getWindowViewportSize
|
|
19
|
-
} from "../window";
|
|
20
|
-
import { sendBAEvent } from "../../analytics";
|
|
21
|
-
import { setAppDynamicsUserData } from "../../analytics/appdynamics";
|
|
22
|
-
import { updateBAEventParameters } from "../../analytics/web-analytics";
|
|
20
|
+
} from "../window.js";
|
|
21
|
+
import { sendBAEvent } from "../../analytics/index.js";
|
|
22
|
+
import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
|
|
23
|
+
import { updateBAEventParameters } from "../../analytics/web-analytics.js";
|
|
23
24
|
class CMicroAppHost {
|
|
24
25
|
constructor(params) {
|
|
25
26
|
this.appId = getAppConfigValue("appId");
|
|
@@ -64,10 +65,10 @@ class CMicroAppHost {
|
|
|
64
65
|
return this.logger;
|
|
65
66
|
}
|
|
66
67
|
getItem(key) {
|
|
67
|
-
return
|
|
68
|
+
return getWindow().sessionStorage.getItem(key);
|
|
68
69
|
}
|
|
69
70
|
setItem(key, value) {
|
|
70
|
-
|
|
71
|
+
getWindow().sessionStorage.setItem(key, value);
|
|
71
72
|
}
|
|
72
73
|
getGuests() {
|
|
73
74
|
return this.activeGuests;
|
|
@@ -104,10 +105,10 @@ class CMicroAppHost {
|
|
|
104
105
|
store.dispatch(error.set({ description: message }));
|
|
105
106
|
}
|
|
106
107
|
getAuthToken() {
|
|
107
|
-
return
|
|
108
|
+
return getWindow().sessionStorage.getItem("Authorization");
|
|
108
109
|
}
|
|
109
110
|
renewAuthToken() {
|
|
110
|
-
return
|
|
111
|
+
return getWindow().sessionStorage.getItem("Authorization");
|
|
111
112
|
}
|
|
112
113
|
logout() {
|
|
113
114
|
const store = getStore();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _ from "lodash";
|
|
2
|
-
import { CMicroAppGuest } from "./guest";
|
|
3
|
-
import { CMicroAppHost } from "./host";
|
|
4
|
-
import { getAppConfigValue } from "../app-config/config";
|
|
5
|
-
import { convertRelativeToAbsoluteUrl, isCIBuild } from "../helpers";
|
|
2
|
+
import { CMicroAppGuest } from "./guest.js";
|
|
3
|
+
import { CMicroAppHost } from "./host.js";
|
|
4
|
+
import { getAppConfigValue } from "../app-config/config.js";
|
|
5
|
+
import { convertRelativeToAbsoluteUrl, isCIBuild } from "../helpers.js";
|
|
6
6
|
const isHost = () => CMicroAppHost.isInitialized();
|
|
7
7
|
const isGuest = () => CMicroAppGuest.isInitialized();
|
|
8
8
|
const isStandAloneGuest = () => isGuest() && window.top === window.self;
|
package/dist/es/utils/session.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { throttle } from "lodash";
|
|
2
|
-
import { getAppConfigValue } from "./app-config/config";
|
|
3
|
-
import { SESSION_TIMEOUT_INTERVAL } from "./constants";
|
|
2
|
+
import { getAppConfigValue } from "./app-config/config.js";
|
|
3
|
+
import { SESSION_TIMEOUT_INTERVAL } from "./constants.js";
|
|
4
4
|
const THROTTLING_TIME = 6e3;
|
|
5
5
|
let lastUserActivityTimeStamp = Date.now();
|
|
6
6
|
const warnListeners = [];
|
|
@@ -10,12 +10,12 @@ const userInteractionEvents = ["click", "scroll", "keypress", "touchstart"];
|
|
|
10
10
|
let sessionExpiryWarningNotified = false;
|
|
11
11
|
let timerHandle;
|
|
12
12
|
let sessionExpiryWarningNotifiedAt;
|
|
13
|
-
const resetUserIdleTime = () => {
|
|
13
|
+
const resetUserIdleTime = (resetWarningModal = false) => {
|
|
14
14
|
sessionExpiryWarningNotified = false;
|
|
15
15
|
sessionExpiryWarningNotifiedAt = null;
|
|
16
16
|
lastUserActivityTimeStamp = Date.now();
|
|
17
17
|
Promise.resolve().then(() => {
|
|
18
|
-
resetListeners.forEach((listener) => listener());
|
|
18
|
+
resetListeners.forEach((listener) => listener(resetWarningModal));
|
|
19
19
|
}).catch(() => {
|
|
20
20
|
});
|
|
21
21
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
2
|
-
import { createAppStore } from "../../data/store";
|
|
3
|
-
import { withAppDecorator } from "../../view/storybook/decorator";
|
|
4
|
-
import { loadAppConfig } from "../app-config";
|
|
5
|
-
import { createTheme } from "./theme";
|
|
6
|
-
import { browserHistory } from "../history";
|
|
2
|
+
import { createAppStore } from "../../data/store.js";
|
|
3
|
+
import { withAppDecorator } from "../../view/storybook/decorator.js";
|
|
4
|
+
import { loadAppConfig } from "../app-config/index.js";
|
|
5
|
+
import { createTheme } from "./theme.js";
|
|
6
|
+
import { browserHistory } from "../history.js";
|
|
7
7
|
import "@elliemae/ds-basic/css/dimsum.css";
|
|
8
|
-
(
|
|
9
|
-
|
|
10
|
-
})();
|
|
8
|
+
loadAppConfig(__webpack_public_path__).catch(() => {
|
|
9
|
+
});
|
|
11
10
|
const theme = getDefaultTheme();
|
|
12
11
|
const store = createAppStore({}, browserHistory);
|
|
13
12
|
const appDecorator = withAppDecorator.bind(null, theme, store);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { render } from "@testing-library/react";
|
|
2
3
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
3
|
-
import { createAppStore } from "../../data/store";
|
|
4
|
-
import { AppRoot } from "../../view/app-root";
|
|
5
|
-
import { browserHistory } from "../history";
|
|
4
|
+
import { createAppStore } from "../../data/store.js";
|
|
5
|
+
import { AppRoot } from "../../view/app-root/index.js";
|
|
6
|
+
import { browserHistory } from "../history.js";
|
|
6
7
|
const defaultStore = createAppStore({}, browserHistory);
|
|
7
8
|
const defaultTheme = getDefaultTheme();
|
|
8
9
|
const AllTheProviders = ({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { render } from "@testing-library/react";
|
|
2
3
|
import { Provider } from "react-redux";
|
|
3
|
-
import { createAppStore } from "../../data/store";
|
|
4
|
-
import { browserHistory } from "../history";
|
|
4
|
+
import { createAppStore } from "../../data/store.js";
|
|
5
|
+
import { browserHistory } from "../history.js";
|
|
5
6
|
const renderWithRedux = (ui, {
|
|
6
7
|
initialState,
|
|
7
8
|
store = createAppStore(initialState, browserHistory)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { render } from "@testing-library/react";
|
|
2
3
|
import { Provider } from "react-redux";
|
|
3
|
-
import { Router } from "react-router-dom";
|
|
4
4
|
import { createMemoryHistory } from "history";
|
|
5
|
-
import { createAppStore } from "../../data/store";
|
|
6
|
-
import { browserHistory } from "../history";
|
|
5
|
+
import { createAppStore } from "../../data/store.js";
|
|
6
|
+
import { browserHistory } from "../history.js";
|
|
7
|
+
import { AppRouter } from "../../view/app-router.js";
|
|
7
8
|
const renderWithRouterRedux = (ui, {
|
|
8
9
|
route = "/",
|
|
9
10
|
history = createMemoryHistory({ initialEntries: [route] }),
|
|
@@ -12,7 +13,7 @@ const renderWithRouterRedux = (ui, {
|
|
|
12
13
|
} = {}) => ({
|
|
13
14
|
...render(/* @__PURE__ */ React.createElement(Provider, {
|
|
14
15
|
store
|
|
15
|
-
}, /* @__PURE__ */ React.createElement(
|
|
16
|
+
}, /* @__PURE__ */ React.createElement(AppRouter, {
|
|
16
17
|
history
|
|
17
18
|
}, ui))),
|
|
18
19
|
store
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { render } from "@testing-library/react";
|
|
2
|
-
import { Router } from "react-router-dom";
|
|
3
3
|
import { createMemoryHistory } from "history";
|
|
4
|
+
import { AppRouter } from "../../view/app-router.js";
|
|
4
5
|
const renderWithRouter = (ui, {
|
|
5
6
|
route = "/",
|
|
6
7
|
history = createMemoryHistory({ initialEntries: [route] })
|
|
7
|
-
} = {}) =>
|
|
8
|
-
|
|
8
|
+
} = {}) => {
|
|
9
|
+
const renderResult = render(/* @__PURE__ */ React.createElement(AppRouter, {
|
|
9
10
|
history
|
|
10
|
-
}, ui))
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
}, ui));
|
|
12
|
+
return {
|
|
13
|
+
...renderResult,
|
|
14
|
+
history
|
|
15
|
+
};
|
|
16
|
+
};
|
|
13
17
|
export {
|
|
14
18
|
renderWithRouter
|
|
15
19
|
};
|