@elliemae/pui-app-sdk 3.13.0 → 3.16.0
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 +4 -1
- package/dist/cjs/api/auth/index.js +8 -2
- package/dist/cjs/api/helpers.js +7 -1
- package/dist/cjs/api/users/index.js +3 -1
- package/dist/cjs/communication/http-client/index.js +4 -1
- package/dist/cjs/communication/http-client/response-interceptor.js +4 -1
- package/dist/cjs/communication/http-client/retry-axios.js +4 -1
- package/dist/cjs/data/auth/reducer.js +14 -8
- package/dist/cjs/data/breakpoint/index.js +4 -1
- package/dist/cjs/data/store.js +10 -2
- package/dist/cjs/data/wait-message/reducer.js +4 -1
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/sideeffect/error-toast/index.js +3 -1
- package/dist/cjs/sideeffect/wait-message/index.js +6 -2
- package/dist/cjs/utils/app-config/config.js +4 -1
- package/dist/cjs/utils/app-config/index.js +9 -2
- package/dist/cjs/utils/auth/helper.js +4 -1
- package/dist/cjs/utils/auth/index.js +3 -1
- package/dist/cjs/utils/micro-frontend/guest.js +7 -2
- package/dist/cjs/utils/micro-frontend/host.js +8 -2
- package/dist/cjs/utils/micro-frontend/index.js +27 -10
- package/dist/cjs/utils/micro-frontend/ssfguest-adapter.js +9 -2
- package/dist/cjs/utils/redact-pii.js +8 -2
- package/dist/cjs/utils/session.js +14 -4
- package/dist/cjs/utils/testing/index.js +5 -7
- package/dist/cjs/utils/testing/render-with-redux.js +5 -7
- package/dist/cjs/utils/testing/render-with-router-redux.js +10 -9
- package/dist/cjs/utils/testing/render-with-router.js +5 -7
- package/dist/cjs/utils/testing/render-with-state-addons.js +7 -9
- package/dist/cjs/utils/web-storage.js +4 -1
- package/dist/cjs/utils/window.js +8 -2
- package/dist/cjs/view/app-root/hosted-app.js +13 -3
- package/dist/cjs/view/app-root/index.js +21 -19
- package/dist/cjs/view/app-root/stand-alone-app.js +17 -3
- package/dist/cjs/view/app-router.js +2 -5
- package/dist/cjs/view/breakpoint/use-breakpoint.js +9 -5
- package/dist/cjs/view/breakpoint/use-media-query-list.js +3 -1
- package/dist/cjs/view/error-boundary/default-error-template.js +11 -5
- package/dist/cjs/view/error-boundary/index.js +6 -2
- package/dist/cjs/view/error-toast/index.js +2 -5
- package/dist/cjs/view/fetch-host-app-data/index.js +4 -1
- package/dist/cjs/view/fields/autocomplete/index.js +47 -0
- package/dist/cjs/view/fields/check-box/index.js +3 -6
- package/dist/cjs/view/fields/combo-box/index.js +3 -6
- package/dist/cjs/view/fields/combo-box-v3/index.js +42 -0
- package/dist/cjs/view/fields/date-input/index.js +3 -6
- package/dist/cjs/view/fields/date-picker/index.js +7 -4
- package/dist/cjs/view/fields/date-range-picker/index.js +10 -9
- package/dist/cjs/view/fields/date-time-picker/index.js +3 -6
- package/dist/cjs/view/fields/form-item-layout/index.js +15 -16
- package/dist/cjs/view/fields/form-layout-block-item/index.js +16 -17
- package/dist/cjs/view/fields/input-mask/index.js +3 -6
- package/dist/cjs/view/fields/input-text/index.js +3 -6
- package/dist/cjs/view/fields/large-text-box/index.js +3 -6
- package/dist/cjs/view/fields/radio/index.js +3 -6
- package/dist/cjs/view/fields/radio-group/index.js +3 -6
- package/dist/cjs/view/fields/text-box/index.js +3 -6
- package/dist/cjs/view/fields/toggle/index.js +3 -6
- package/dist/cjs/view/fields/watch-value.js +25 -3
- package/dist/cjs/view/form/index.js +13 -8
- package/dist/cjs/view/form/personal-info-section.js +54 -47
- package/dist/cjs/view/form/submit-button/index.js +2 -5
- package/dist/cjs/view/live-message/index.js +2 -5
- package/dist/cjs/view/loadable/index.js +8 -10
- package/dist/cjs/view/login/index.js +4 -5
- package/dist/cjs/view/micro-app/app-factory/index.js +9 -3
- package/dist/cjs/view/micro-app/index.js +6 -3
- package/dist/cjs/view/micro-app/resources/manifest.js +10 -3
- package/dist/cjs/view/micro-app/use-app-will-render.js +37 -28
- package/dist/cjs/view/micro-iframe-app/app.js +23 -18
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +22 -15
- package/dist/cjs/view/micro-iframe-app/index.js +2 -5
- package/dist/cjs/view/modals/error/index.js +21 -12
- package/dist/cjs/view/modals/navigation-prompt/index.js +46 -27
- package/dist/cjs/view/modals/session-expiry/customHooks.js +6 -2
- package/dist/cjs/view/modals/session-expiry/index.js +57 -35
- package/dist/cjs/view/modals/wait-message/index.js +26 -27
- package/dist/cjs/view/page.js +15 -3
- package/dist/cjs/view/render-with-delay/index.js +4 -5
- package/dist/cjs/view/render-with-host-data/index.js +2 -5
- package/dist/cjs/view/require-auth.js +12 -6
- package/dist/cjs/view/session-timeout/index.js +15 -14
- package/dist/cjs/view/storybook/decorator.js +5 -7
- package/dist/cjs/view/visually-hidden/index.js +11 -6
- package/dist/esm/analytics/appdynamics.js +0 -1
- package/dist/esm/analytics/index.js +0 -1
- package/dist/esm/analytics/page-view-event.js +0 -1
- package/dist/esm/analytics/user-session-event.js +0 -1
- package/dist/esm/analytics/user-wait-event.js +0 -1
- package/dist/esm/analytics/web-analytics.js +0 -1
- package/dist/esm/api/auth/index.js +8 -3
- package/dist/esm/api/helpers.js +7 -2
- package/dist/esm/api/users/index.js +3 -2
- package/dist/esm/communication/http-client/index.js +0 -1
- package/dist/esm/communication/http-client/request-interceptor.js +0 -1
- package/dist/esm/communication/http-client/response-interceptor.js +0 -1
- package/dist/esm/communication/http-client/retry-axios.js +0 -1
- package/dist/esm/communication/http-client/retry.js +0 -1
- package/dist/esm/data/auth/actions.js +0 -1
- package/dist/esm/data/auth/reducer.js +10 -8
- package/dist/esm/data/breakpoint/index.js +0 -1
- package/dist/esm/data/error/index.js +0 -1
- package/dist/esm/data/index.js +0 -1
- package/dist/esm/data/live-message/index.js +0 -1
- package/dist/esm/data/logout/actions.js +0 -1
- package/dist/esm/data/navigation-prompt/actions.js +0 -1
- package/dist/esm/data/react-redux.js +0 -1
- package/dist/esm/data/reducers.js +0 -1
- package/dist/esm/data/saga.js +0 -1
- package/dist/esm/data/store.js +6 -2
- package/dist/esm/data/wait-message/actions.js +0 -1
- package/dist/esm/data/wait-message/reducer.js +0 -1
- package/dist/esm/data/webpack-hmr.js +0 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/micro-frontend.js +0 -1
- package/dist/esm/sideeffect/auth/index.js +0 -1
- package/dist/esm/sideeffect/error-toast/index.js +3 -2
- package/dist/esm/sideeffect/wait-message/index.js +6 -3
- package/dist/esm/utils/app-config/config.js +0 -1
- package/dist/esm/utils/app-config/index.js +5 -2
- package/dist/esm/utils/app-host-integration/react.js +0 -1
- package/dist/esm/utils/auth/helper.js +0 -1
- package/dist/esm/utils/auth/index.js +3 -2
- package/dist/esm/utils/await.js +0 -1
- package/dist/esm/utils/constants.js +0 -1
- package/dist/esm/utils/font-size.js +0 -1
- package/dist/esm/utils/guest-with-service.js +0 -1
- package/dist/esm/utils/helpers.js +0 -1
- package/dist/esm/utils/history.js +0 -1
- package/dist/esm/utils/log-records.js +0 -1
- package/dist/esm/utils/micro-frontend/console-logger.js +0 -1
- package/dist/esm/utils/micro-frontend/guest.js +3 -2
- package/dist/esm/utils/micro-frontend/host.js +8 -3
- package/dist/esm/utils/micro-frontend/index.js +23 -10
- package/dist/esm/utils/micro-frontend/ssfguest-adapter.js +5 -2
- package/dist/esm/utils/micro-frontend/types.js +0 -1
- package/dist/esm/utils/redact-pii.js +8 -3
- package/dist/esm/utils/service-worker.js +0 -1
- package/dist/esm/utils/session.js +14 -5
- package/dist/esm/utils/storybook/manager.js +0 -1
- package/dist/esm/utils/storybook/preview.js +0 -1
- package/dist/esm/utils/storybook/theme.js +0 -1
- package/dist/esm/utils/testing/index.js +5 -5
- package/dist/esm/utils/testing/render-with-redux.js +5 -5
- package/dist/esm/utils/testing/render-with-router-redux.js +10 -7
- package/dist/esm/utils/testing/render-with-router.js +5 -5
- package/dist/esm/utils/testing/render-with-state-addons.js +7 -7
- package/dist/esm/utils/types.js +0 -1
- package/dist/esm/utils/url.js +0 -1
- package/dist/esm/utils/web-storage.js +0 -1
- package/dist/esm/utils/window.js +8 -3
- package/dist/esm/view/app-root/hosted-app.js +9 -3
- package/dist/esm/view/app-root/index.js +21 -17
- package/dist/esm/view/app-root/stand-alone-app.js +13 -3
- package/dist/esm/view/app-root/style.js +0 -1
- package/dist/esm/view/app-router.js +2 -3
- package/dist/esm/view/breakpoint/use-breakpoint.js +9 -6
- package/dist/esm/view/breakpoint/use-media-query-list.js +3 -2
- package/dist/esm/view/error-boundary/default-error-template.js +11 -3
- package/dist/esm/view/error-boundary/index.js +2 -2
- package/dist/esm/view/error-toast/index.js +2 -3
- package/dist/esm/view/fetch-host-app-data/index.js +0 -1
- package/dist/esm/view/fetch-host-app-data/store.js +0 -1
- package/dist/esm/view/fields/autocomplete/index.js +27 -0
- package/dist/esm/view/fields/check-box/index.js +3 -4
- package/dist/esm/view/fields/combo-box/index.js +3 -4
- package/dist/esm/view/fields/combo-box-v3/index.js +24 -0
- package/dist/esm/view/fields/connect-form.js +0 -1
- package/dist/esm/view/fields/date-input/index.js +3 -4
- package/dist/esm/view/fields/date-picker/index.js +3 -4
- package/dist/esm/view/fields/date-range-picker/index.js +10 -7
- package/dist/esm/view/fields/date-time-picker/index.js +3 -4
- package/dist/esm/view/fields/form-item-layout/index.js +15 -14
- package/dist/esm/view/fields/form-layout-block-item/index.js +16 -15
- package/dist/esm/view/fields/input-mask/index.js +3 -4
- package/dist/esm/view/fields/input-text/index.js +3 -4
- package/dist/esm/view/fields/large-text-box/index.js +3 -4
- package/dist/esm/view/fields/radio/index.js +3 -4
- package/dist/esm/view/fields/radio-group/index.js +3 -4
- package/dist/esm/view/fields/text-box/index.js +3 -4
- package/dist/esm/view/fields/toggle/index.js +3 -4
- package/dist/esm/view/fields/watch-value.js +21 -3
- package/dist/esm/view/form/index.js +9 -8
- package/dist/esm/view/form/personal-info-section.js +50 -47
- package/dist/esm/view/form/submit-button/index.js +2 -3
- package/dist/esm/view/guest-unload-handlers/index.js +0 -1
- package/dist/esm/view/host-binding-events/index.js +0 -1
- package/dist/esm/view/live-message/index.js +2 -3
- package/dist/esm/view/loadable/index.js +8 -8
- package/dist/esm/view/login/index.js +4 -3
- package/dist/esm/view/message-to-host-app/index.js +0 -1
- package/dist/esm/view/micro-app/app-factory/index.js +9 -4
- package/dist/esm/view/micro-app/const.js +0 -1
- package/dist/esm/view/micro-app/index.js +2 -3
- package/dist/esm/view/micro-app/resources/manifest.js +10 -4
- package/dist/esm/view/micro-app/resources/script.js +0 -1
- package/dist/esm/view/micro-app/resources/style.js +0 -1
- package/dist/esm/view/micro-app/types.js +0 -1
- package/dist/esm/view/micro-app/use-app-will-render.js +37 -29
- package/dist/esm/view/micro-app/utils.js +0 -1
- package/dist/esm/view/micro-iframe-app/app.js +19 -18
- package/dist/esm/view/micro-iframe-app/iframe/const.js +0 -1
- package/dist/esm/view/micro-iframe-app/iframe/index.js +18 -15
- package/dist/esm/view/micro-iframe-app/index.js +2 -3
- package/dist/esm/view/micro-iframe-app/types.js +0 -1
- package/dist/esm/view/micro-iframe-app/use-frame-loaded.js +0 -1
- package/dist/esm/view/modals/error/index.js +21 -10
- package/dist/esm/view/modals/navigation-prompt/index.js +46 -25
- package/dist/esm/view/modals/session-expiry/customHooks.js +6 -3
- package/dist/esm/view/modals/session-expiry/index.js +57 -33
- package/dist/esm/view/modals/wait-message/index.js +26 -25
- package/dist/esm/view/modals/wait-message/use-html-wait-message.js +0 -1
- package/dist/esm/view/modals/wait-message/wait-message-launcher.js +0 -1
- package/dist/esm/view/page.js +11 -3
- package/dist/esm/view/render-with-delay/index.js +4 -3
- package/dist/esm/view/render-with-host-data/index.js +2 -3
- package/dist/esm/view/require-auth.js +8 -6
- package/dist/esm/view/session-timeout/index.js +15 -12
- package/dist/esm/view/storybook/decorator.js +5 -5
- package/dist/esm/view/use-previous.js +0 -1
- package/dist/esm/view/use-window-size-change.js +0 -1
- package/dist/esm/view/visually-hidden/index.js +7 -6
- package/dist/types/lib/index.d.ts +2 -0
- package/dist/types/lib/view/fields/autocomplete/index.d.ts +13 -0
- package/dist/types/lib/view/fields/autocomplete/index.stories.d.ts +5 -0
- package/dist/types/lib/view/fields/combo-box-v3/index.d.ts +9 -0
- package/dist/types/lib/view/fields/combo-box-v3/index.stories.d.ts +5 -0
- package/package.json +34 -34
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { getHTTPClient } from "../../communication/http-client/index.js";
|
|
3
2
|
const getToken = async ({
|
|
4
3
|
clientId,
|
|
@@ -10,7 +9,10 @@ const getToken = async ({
|
|
|
10
9
|
params.append("client_id", clientId);
|
|
11
10
|
params.append("redirect_uri", redirectUri);
|
|
12
11
|
params.append("code", idpCode);
|
|
13
|
-
const { data } = await getHTTPClient().post(
|
|
12
|
+
const { data } = await getHTTPClient().post(
|
|
13
|
+
"/oauth2/v1/token",
|
|
14
|
+
params
|
|
15
|
+
);
|
|
14
16
|
return { tokenType: data.token_type, accessToken: data.access_token };
|
|
15
17
|
};
|
|
16
18
|
const revokeToken = async ({ clientId, token }) => {
|
|
@@ -26,7 +28,10 @@ const introspectToken = async ({
|
|
|
26
28
|
const params = new URLSearchParams();
|
|
27
29
|
params.append("token", accessToken);
|
|
28
30
|
params.append("client_id", clientId);
|
|
29
|
-
const { data } = await getHTTPClient().post(
|
|
31
|
+
const { data } = await getHTTPClient().post(
|
|
32
|
+
"/oauth2/v1/token/introspection",
|
|
33
|
+
params
|
|
34
|
+
);
|
|
30
35
|
return data;
|
|
31
36
|
};
|
|
32
37
|
export {
|
package/dist/esm/api/helpers.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { createAction } from "@reduxjs/toolkit";
|
|
3
2
|
import { get } from "lodash";
|
|
4
3
|
const getApiActionCreator = (api) => (operation) => ({
|
|
@@ -6,7 +5,13 @@ const getApiActionCreator = (api) => (operation) => ({
|
|
|
6
5
|
[`${operation}Success`]: createAction(`${api}/${operation}Success`),
|
|
7
6
|
[`${operation}Error`]: createAction(`${api}/${operation}Error`)
|
|
8
7
|
});
|
|
9
|
-
const getSelectField = (stateName) => (fieldName = "", defaultValue) => (state = {}, stateValue = get(state, stateName)) => Array.isArray(fieldName) ? fieldName.map(
|
|
8
|
+
const getSelectField = (stateName) => (fieldName = "", defaultValue) => (state = {}, stateValue = get(state, stateName)) => Array.isArray(fieldName) ? fieldName.map(
|
|
9
|
+
(field, i) => get(
|
|
10
|
+
stateValue,
|
|
11
|
+
field,
|
|
12
|
+
Array.isArray(defaultValue) ? defaultValue[i] : defaultValue
|
|
13
|
+
)
|
|
14
|
+
) : get(stateValue, fieldName, defaultValue);
|
|
10
15
|
export {
|
|
11
16
|
getApiActionCreator,
|
|
12
17
|
getSelectField
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { getAuthHTTPClient } from "../../communication/http-client/index.js";
|
|
3
2
|
const getUser = async ({ userName }) => {
|
|
4
|
-
const { data } = await getAuthHTTPClient().get(
|
|
3
|
+
const { data } = await getAuthHTTPClient().get(
|
|
4
|
+
`/encompass/v1/users/${userName}`
|
|
5
|
+
);
|
|
5
6
|
return data;
|
|
6
7
|
};
|
|
7
8
|
export {
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import produce from "immer";
|
|
3
2
|
import { LOGIN_SUCCESS } from "./actions.js";
|
|
4
3
|
const initialState = {
|
|
5
4
|
authenticated: false
|
|
6
5
|
};
|
|
7
|
-
const authReducer = produce(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
6
|
+
const authReducer = produce(
|
|
7
|
+
(draft, action) => {
|
|
8
|
+
switch (action.type) {
|
|
9
|
+
case LOGIN_SUCCESS:
|
|
10
|
+
draft.authenticated = true;
|
|
11
|
+
break;
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
initialState
|
|
15
|
+
);
|
|
14
16
|
export {
|
|
15
17
|
authReducer,
|
|
16
18
|
initialState
|
package/dist/esm/data/index.js
CHANGED
package/dist/esm/data/saga.js
CHANGED
package/dist/esm/data/store.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { configureStore } from "@reduxjs/toolkit";
|
|
3
2
|
import {
|
|
4
3
|
createInjectorsEnhancer
|
|
@@ -32,7 +31,12 @@ const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {
|
|
|
32
31
|
};
|
|
33
32
|
const createAppStore = (initialState = {}, history, middlewareConfig) => {
|
|
34
33
|
const sagaMiddleware = createSagaMiddleware({});
|
|
35
|
-
const store = createStore(
|
|
34
|
+
const store = createStore(
|
|
35
|
+
initialState,
|
|
36
|
+
sagaMiddleware,
|
|
37
|
+
history,
|
|
38
|
+
middlewareConfig
|
|
39
|
+
);
|
|
36
40
|
setStore(store);
|
|
37
41
|
return store;
|
|
38
42
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { isUserAuthorized, login, authorize } from "./utils/auth/index.js";
|
|
3
2
|
import {
|
|
4
3
|
getHTTPClient,
|
|
@@ -68,9 +67,11 @@ import { RenderWithStateAddOns } from "./utils/testing/render-with-state-addons.
|
|
|
68
67
|
import { getApiActionCreator, getSelectField } from "./api/helpers.js";
|
|
69
68
|
import { getUser } from "./api/users/index.js";
|
|
70
69
|
import { withAppDecorator } from "./view/storybook/decorator.js";
|
|
70
|
+
import { Autocomplete } from "./view/fields/autocomplete/index.js";
|
|
71
71
|
import { ErrorToast } from "./view/error-toast/index.js";
|
|
72
72
|
import { NavigationPrompt } from "./view/modals/navigation-prompt/index.js";
|
|
73
73
|
import { Form } from "./view/form/index.js";
|
|
74
|
+
import { ComboBoxV3 } from "./view/fields/combo-box-v3/index.js";
|
|
74
75
|
import { ConnectForm } from "./view/fields/connect-form.js";
|
|
75
76
|
import { FormItemLayout } from "./view/fields/form-item-layout/index.js";
|
|
76
77
|
import { FormLayoutBlockItem } from "./view/fields/form-layout-block-item/index.js";
|
|
@@ -104,10 +105,12 @@ import { updateBAEventParameters } from "./analytics/web-analytics.js";
|
|
|
104
105
|
import { redactPii } from "./utils/redact-pii.js";
|
|
105
106
|
export {
|
|
106
107
|
AppRoot,
|
|
108
|
+
Autocomplete,
|
|
107
109
|
CMicroAppGuest,
|
|
108
110
|
CMicroAppHost,
|
|
109
111
|
CheckBox,
|
|
110
112
|
ComboBox,
|
|
113
|
+
ComboBoxV3,
|
|
111
114
|
ConnectForm,
|
|
112
115
|
DateInput,
|
|
113
116
|
DatePicker,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { call, takeLatest } from "redux-saga/effects";
|
|
3
2
|
import { actions } from "../../data/error/index.js";
|
|
4
3
|
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
@@ -6,7 +5,9 @@ import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
|
6
5
|
import { logRecords } from "../../utils/log-records.js";
|
|
7
6
|
function* openErrorToast(action) {
|
|
8
7
|
try {
|
|
9
|
-
const microApp = yield call(
|
|
8
|
+
const microApp = yield call(
|
|
9
|
+
CMicroAppGuest.getInstance.bind(CMicroAppGuest)
|
|
10
|
+
);
|
|
10
11
|
const host = yield call(microApp.getHost.bind(microApp));
|
|
11
12
|
const message = action?.payload?.description || action?.payload?.messageText;
|
|
12
13
|
if (host && message)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { call, takeLatest } from "redux-saga/effects";
|
|
3
2
|
import { ACTIONS } from "../../data/wait-message/actions.js";
|
|
4
3
|
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
@@ -6,7 +5,9 @@ import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
|
6
5
|
import { logRecords } from "../../utils/log-records.js";
|
|
7
6
|
function* openWaitMessage() {
|
|
8
7
|
try {
|
|
9
|
-
const microApp = yield call(
|
|
8
|
+
const microApp = yield call(
|
|
9
|
+
CMicroAppGuest.getInstance.bind(CMicroAppGuest)
|
|
10
|
+
);
|
|
10
11
|
const host = yield call(microApp.getHost.bind(microApp));
|
|
11
12
|
if (host)
|
|
12
13
|
yield call(host.openWaitMessage.bind(host));
|
|
@@ -19,7 +20,9 @@ function* openWaitMessage() {
|
|
|
19
20
|
}
|
|
20
21
|
function* closeWaitMessage() {
|
|
21
22
|
try {
|
|
22
|
-
const microApp = yield call(
|
|
23
|
+
const microApp = yield call(
|
|
24
|
+
CMicroAppGuest.getInstance.bind(CMicroAppGuest)
|
|
25
|
+
);
|
|
23
26
|
const host = yield call(microApp.getHost.bind(microApp));
|
|
24
27
|
if (host)
|
|
25
28
|
yield call(host.closeWaitMessage.bind(host));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import _ from "lodash";
|
|
3
2
|
import { getHTTPClient } from "../../communication/http-client/index.js";
|
|
4
3
|
import { setAppConfig } from "./config.js";
|
|
@@ -19,7 +18,11 @@ const loadAppConfig = (hostUrl = "./") => new Promise((resolve, reject) => {
|
|
|
19
18
|
parseAppConfig(data);
|
|
20
19
|
resolve();
|
|
21
20
|
}).catch((err) => {
|
|
22
|
-
reject(
|
|
21
|
+
reject(
|
|
22
|
+
new Error(
|
|
23
|
+
`Unable to load application configurtion file. ${err.Message}`
|
|
24
|
+
)
|
|
25
|
+
);
|
|
23
26
|
});
|
|
24
27
|
});
|
|
25
28
|
export {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { browserHistory as history } from "../history.js";
|
|
3
2
|
import {
|
|
4
3
|
getToken,
|
|
@@ -36,7 +35,9 @@ const navigateToLoginPage = ({
|
|
|
36
35
|
response_type: responseType,
|
|
37
36
|
scope
|
|
38
37
|
};
|
|
39
|
-
const searchParams = new URLSearchParams(
|
|
38
|
+
const searchParams = new URLSearchParams(
|
|
39
|
+
idpErrorCode ? Object.assign(idpOptions, { error_code: idpErrorCode }) : idpOptions
|
|
40
|
+
);
|
|
40
41
|
idpUrl.search = searchParams.toString();
|
|
41
42
|
window.location.replace(idpUrl.href);
|
|
42
43
|
};
|
package/dist/esm/utils/await.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import ReactDOM from "react-dom";
|
|
3
2
|
import _ from "lodash";
|
|
4
3
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
@@ -122,7 +121,9 @@ class CMicroAppGuest {
|
|
|
122
121
|
if (appEle)
|
|
123
122
|
ReactDOM.unmountComponentAtNode(appEle);
|
|
124
123
|
removeStorageEvents();
|
|
125
|
-
return Promise.resolve().then(
|
|
124
|
+
return Promise.resolve().then(
|
|
125
|
+
() => this.onUnmount ? this.onUnmount(options) : null
|
|
126
|
+
);
|
|
126
127
|
}
|
|
127
128
|
getRef() {
|
|
128
129
|
return this.onGetRef ? this.onGetRef() : null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { publish, subscribe, unsubscribe } from "pubsub-js";
|
|
3
2
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
4
3
|
import { getStore } from "../../data/store.js";
|
|
@@ -130,10 +129,16 @@ class CMicroAppHost {
|
|
|
130
129
|
return getWindowViewportSize();
|
|
131
130
|
}
|
|
132
131
|
onResizeEvent(eventHandler) {
|
|
133
|
-
return subscribe(
|
|
132
|
+
return subscribe(
|
|
133
|
+
HOST_WINDOW_RESIZED,
|
|
134
|
+
(msg, data) => eventHandler(data)
|
|
135
|
+
);
|
|
134
136
|
}
|
|
135
137
|
onBreakpointChangeEvent(eventHandler) {
|
|
136
|
-
return subscribe(
|
|
138
|
+
return subscribe(
|
|
139
|
+
HOST_WINDOW_BREAKPOINT_CHANGED,
|
|
140
|
+
(msg, data) => eventHandler(data)
|
|
141
|
+
);
|
|
137
142
|
}
|
|
138
143
|
setSystemVersion(version = "latest") {
|
|
139
144
|
window.emui.version = version;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import _ from "lodash";
|
|
3
2
|
import { CMicroAppGuest } from "./guest.js";
|
|
4
3
|
import { CMicroAppHost } from "./host.js";
|
|
@@ -18,24 +17,38 @@ const isProduction = (mode) => {
|
|
|
18
17
|
const getVersionedPath = (path) => {
|
|
19
18
|
const { systemVersion } = CMicroAppHost.getInstance().getProps();
|
|
20
19
|
const majorMinorVersion = systemVersion.match(/^(?:\d+\.\d+)*/g);
|
|
21
|
-
return path.replace(
|
|
20
|
+
return path.replace(
|
|
21
|
+
/{SYSTEM_VERSION}/,
|
|
22
|
+
majorMinorVersion && majorMinorVersion[0] || "latest"
|
|
23
|
+
);
|
|
22
24
|
};
|
|
23
25
|
const getMicroFrontEndAppConfig = (appInfo) => {
|
|
24
|
-
const microFEAppConfig = getAppConfigValue(
|
|
26
|
+
const microFEAppConfig = getAppConfigValue(
|
|
27
|
+
`microFrontendApps.${appInfo.id}`
|
|
28
|
+
);
|
|
25
29
|
if (!microFEAppConfig)
|
|
26
|
-
throw new Error(
|
|
30
|
+
throw new Error(
|
|
31
|
+
`unable to locate application configuraiton for ${appInfo.id} under microFrontendApps section of app.config.json`
|
|
32
|
+
);
|
|
27
33
|
const { mode = "production" } = microFEAppConfig;
|
|
28
34
|
const envConfig = isProduction(mode) ? microFEAppConfig.production : microFEAppConfig.development;
|
|
29
35
|
if (microFEAppConfig.production)
|
|
30
36
|
delete microFEAppConfig.production;
|
|
31
37
|
if (microFEAppConfig.development)
|
|
32
38
|
delete microFEAppConfig.development;
|
|
33
|
-
const microFEConfig = _.merge(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
const microFEConfig = _.merge(
|
|
40
|
+
appInfo,
|
|
41
|
+
{
|
|
42
|
+
mode: "production",
|
|
43
|
+
hostUrl: "./",
|
|
44
|
+
manifestPath: "./{SYSTEM_VERSION}"
|
|
45
|
+
},
|
|
46
|
+
microFEAppConfig,
|
|
47
|
+
envConfig
|
|
48
|
+
);
|
|
49
|
+
microFEConfig.hostUrl = convertRelativeToAbsoluteUrl(
|
|
50
|
+
microFEConfig.hostUrl.replace(/\/?$/, "/")
|
|
51
|
+
);
|
|
39
52
|
microFEConfig.manifestPath = getVersionedPath(microFEConfig.manifestPath);
|
|
40
53
|
return microFEConfig;
|
|
41
54
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import ssfGuest from "@elliemae/em-ssf-guest";
|
|
3
2
|
class SSFGuestAdapter {
|
|
4
3
|
async init() {
|
|
@@ -15,7 +14,11 @@ class SSFGuestAdapter {
|
|
|
15
14
|
func(message, eventData);
|
|
16
15
|
};
|
|
17
16
|
const [objectId, eventName] = message.split(".");
|
|
18
|
-
return ssfGuest.subscribe(
|
|
17
|
+
return ssfGuest.subscribe(
|
|
18
|
+
objectId,
|
|
19
|
+
eventName || "",
|
|
20
|
+
callback
|
|
21
|
+
);
|
|
19
22
|
}
|
|
20
23
|
unsubscribe(token, objectId, eventName) {
|
|
21
24
|
return ssfGuest.unsubscribe(objectId, eventName, token);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
const aptRegex = /(apt|bldg|dept|fl|hngr|lot|pier|rm|ste|slip|trlr|unit|#)\.? *[a-z0-9-]+\b/gi;
|
|
3
2
|
const poBoxRegex = /P\.? ?O\.? *Box +\d+/gi;
|
|
4
3
|
const roadRegex = /(street|st|road|rd|avenue|ave|drive|dr|loop|court|ct|circle|cir|lane|ln|boulevard|blvd|way)\.?\b/gi;
|
|
5
4
|
const piiPatterns = {
|
|
6
5
|
creditCardNumber: /\d{4}[ -]?\d{4}[ -]?\d{4}[ -]?\d{4}|\d{4}[ -]?\d{6}[ -]?\d{4}\d?/g,
|
|
7
|
-
streetAddress: new RegExp(
|
|
6
|
+
streetAddress: new RegExp(
|
|
7
|
+
`(\\d+\\s*(\\w+ ){1,2}${roadRegex.source}(\\s+${aptRegex.source})?)|(${poBoxRegex.source})`,
|
|
8
|
+
"gi"
|
|
9
|
+
),
|
|
8
10
|
zipcode: /\b\d{5}\b(-\d{4})?\b/g,
|
|
9
11
|
phoneNumber: /(\(?\+?[0-9]{1,2}\)?[-. ]?)?(\(?[0-9]{3}\)?|[0-9]{3})[-. ]?([0-9]{3}[-. ]?[0-9]{4}|\b[A-Z0-9]{7}\b)/g,
|
|
10
12
|
ipAddress: /(\d{1,3}(\.\d{1,3}){3}|[0-9A-F]{4}(:[0-9A-F]{4}){5}(::|(:0000)+))/gi,
|
|
@@ -16,7 +18,10 @@ const piiPatterns = {
|
|
|
16
18
|
const replacer = (key, value) => {
|
|
17
19
|
if (!key || typeof value !== "string" || key === "correlationId")
|
|
18
20
|
return value;
|
|
19
|
-
return Object.values(piiPatterns).reduce(
|
|
21
|
+
return Object.values(piiPatterns).reduce(
|
|
22
|
+
(redactedString, piiPattern) => redactedString.replace(piiPattern, "****"),
|
|
23
|
+
value
|
|
24
|
+
);
|
|
20
25
|
};
|
|
21
26
|
const redactPii = (data) => {
|
|
22
27
|
try {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { throttle } from "lodash";
|
|
3
2
|
import { getAppConfigValue } from "./app-config/config.js";
|
|
4
3
|
import { SESSION_TIMEOUT_INTERVAL } from "./constants.js";
|
|
@@ -20,14 +19,20 @@ const resetUserIdleTime = (resetWarningModal = false) => {
|
|
|
20
19
|
}).catch(() => {
|
|
21
20
|
});
|
|
22
21
|
};
|
|
23
|
-
const throttledResetUserIdleTime = throttle(
|
|
22
|
+
const throttledResetUserIdleTime = throttle(
|
|
23
|
+
resetUserIdleTime,
|
|
24
|
+
THROTTLING_TIME,
|
|
25
|
+
{ leading: true }
|
|
26
|
+
);
|
|
24
27
|
const isPastWarningTime = (warnInterval = getAppConfigValue("sessionTimeoutWarnInterval") || SESSION_TIMEOUT_INTERVAL.WARN) => Date.now() - lastUserActivityTimeStamp > warnInterval;
|
|
25
28
|
const isPastSessionTimeoutTime = (sessionTimeout = getAppConfigValue("sessionTimeoutInterval") || SESSION_TIMEOUT_INTERVAL.EXPIRY) => Date.now() - lastUserActivityTimeStamp > sessionTimeout;
|
|
26
29
|
const notifySessionExpiryWarning = () => {
|
|
27
30
|
sessionExpiryWarningNotified = true;
|
|
28
31
|
sessionExpiryWarningNotifiedAt = Date.now();
|
|
29
32
|
Promise.resolve().then(() => {
|
|
30
|
-
warnListeners.forEach(
|
|
33
|
+
warnListeners.forEach(
|
|
34
|
+
(listener) => listener(sessionExpiryWarningNotifiedAt)
|
|
35
|
+
);
|
|
31
36
|
}).catch(() => {
|
|
32
37
|
});
|
|
33
38
|
};
|
|
@@ -80,10 +85,14 @@ const trackActivity = (element, cb) => {
|
|
|
80
85
|
return () => {
|
|
81
86
|
};
|
|
82
87
|
const thorttledCb = throttle(cb, THROTTLING_TIME, { leading: true });
|
|
83
|
-
userInteractionEvents.forEach(
|
|
88
|
+
userInteractionEvents.forEach(
|
|
89
|
+
(r) => element.addEventListener(r, thorttledCb)
|
|
90
|
+
);
|
|
84
91
|
return () => {
|
|
85
92
|
userInteractionEvents.forEach((r) => element.removeEventListener(r, cb));
|
|
86
|
-
userInteractionEvents.forEach(
|
|
93
|
+
userInteractionEvents.forEach(
|
|
94
|
+
(r) => element.removeEventListener(r, thorttledCb)
|
|
95
|
+
);
|
|
87
96
|
};
|
|
88
97
|
};
|
|
89
98
|
export {
|