@elliemae/pui-app-sdk 4.12.0-beta.2 → 4.12.0-next.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/data/index.js +3 -3
- package/dist/cjs/data/{useAppSelector.js → react-redux.js} +5 -3
- package/dist/cjs/data/store.js +2 -6
- package/dist/cjs/index.js +9 -12
- package/dist/cjs/utils/log-records.js +15 -15
- package/dist/cjs/utils/micro-frontend/console-logger.js +1 -2
- package/dist/cjs/view/breakpoint/use-breakpoint.js +2 -2
- package/dist/cjs/view/error-toast/index.js +3 -3
- package/dist/cjs/view/live-message/index.js +3 -3
- package/dist/cjs/view/login/index.js +2 -2
- package/dist/cjs/view/micro-app/app-factory/index.js +1 -1
- package/dist/cjs/view/micro-app/resources/manifest.js +1 -1
- package/dist/cjs/view/modals/navigation-prompt/index.js +2 -2
- package/dist/cjs/view/modals/session-expiry/index.js +2 -2
- package/dist/cjs/view/session-timeout/index.js +2 -2
- package/dist/cjs/view/wait-message/index.js +3 -3
- package/dist/cjs/view/wait-message/wait-message-launcher.js +2 -2
- package/dist/esm/data/index.js +1 -1
- package/dist/esm/data/react-redux.js +7 -0
- package/dist/esm/data/store.js +5 -7
- package/dist/esm/index.js +5 -14
- package/dist/esm/utils/log-records.js +15 -15
- package/dist/esm/utils/micro-frontend/console-logger.js +1 -2
- package/dist/esm/view/breakpoint/use-breakpoint.js +1 -1
- package/dist/esm/view/error-toast/index.js +1 -1
- package/dist/esm/view/live-message/index.js +1 -1
- package/dist/esm/view/login/index.js +1 -1
- package/dist/esm/view/micro-app/app-factory/index.js +1 -1
- package/dist/esm/view/micro-app/resources/manifest.js +1 -1
- package/dist/esm/view/modals/navigation-prompt/index.js +1 -1
- package/dist/esm/view/modals/session-expiry/index.js +1 -1
- package/dist/esm/view/session-timeout/index.js +1 -1
- package/dist/esm/view/wait-message/index.js +1 -1
- package/dist/esm/view/wait-message/wait-message-launcher.js +1 -1
- package/dist/types/lib/communication/http-client/index.d.ts +1 -1
- package/dist/types/lib/data/index.d.ts +1 -1
- package/dist/types/lib/data/{useAppDispatch.d.ts → react-redux.d.ts} +3 -0
- package/dist/types/lib/data/store.d.ts +3 -4
- package/dist/types/lib/index.d.ts +3 -3
- package/dist/types/lib/utils/log-records.d.ts +36 -16
- package/dist/types/lib/utils/testing/render-with-redux.d.ts +2 -2
- package/dist/types/lib/utils/testing/render-with-router-redux.d.ts +2 -2
- package/package.json +6 -6
- package/dist/cjs/communication/http-client/baseQuery.js +0 -42
- package/dist/cjs/data/appMiddleware.js +0 -51
- package/dist/cjs/data/errorMiddleware.js +0 -31
- package/dist/cjs/data/listenerMiddleware.js +0 -58
- package/dist/cjs/data/queryMiddleware.js +0 -50
- package/dist/cjs/data/react.js +0 -32
- package/dist/cjs/data/useAppDispatch.js +0 -25
- package/dist/cjs/data/useAppMiddleware.js +0 -34
- package/dist/cjs/data/useInjectListener.js +0 -34
- package/dist/cjs/data/useInjectQuery.js +0 -33
- package/dist/esm/communication/http-client/baseQuery.js +0 -22
- package/dist/esm/data/appMiddleware.js +0 -31
- package/dist/esm/data/errorMiddleware.js +0 -11
- package/dist/esm/data/listenerMiddleware.js +0 -38
- package/dist/esm/data/queryMiddleware.js +0 -30
- package/dist/esm/data/react.js +0 -12
- package/dist/esm/data/useAppDispatch.js +0 -5
- package/dist/esm/data/useAppMiddleware.js +0 -14
- package/dist/esm/data/useAppSelector.js +0 -5
- package/dist/esm/data/useInjectListener.js +0 -17
- package/dist/esm/data/useInjectQuery.js +0 -15
- package/dist/types/lib/communication/http-client/baseQuery.d.ts +0 -14
- package/dist/types/lib/data/appMiddleware.d.ts +0 -8
- package/dist/types/lib/data/errorMiddleware.d.ts +0 -2
- package/dist/types/lib/data/listenerMiddleware.d.ts +0 -11
- package/dist/types/lib/data/queryMiddleware.d.ts +0 -11
- package/dist/types/lib/data/react.d.ts +0 -5
- package/dist/types/lib/data/useAppMiddleware.d.ts +0 -5
- package/dist/types/lib/data/useAppSelector.d.ts +0 -3
- package/dist/types/lib/data/useInjectListener.d.ts +0 -5
- package/dist/types/lib/data/useInjectQuery.d.ts +0 -7
package/dist/cjs/data/index.js
CHANGED
|
@@ -21,12 +21,12 @@ __export(data_exports, {
|
|
|
21
21
|
configureStore: () => import_store.createAppStore,
|
|
22
22
|
createManager: () => import_redux_injectors.createManager,
|
|
23
23
|
getStore: () => import_store.getStore,
|
|
24
|
-
useAppDispatch: () =>
|
|
25
|
-
useAppSelector: () =>
|
|
24
|
+
useAppDispatch: () => import_react_redux.useAppDispatch,
|
|
25
|
+
useAppSelector: () => import_react_redux.useAppSelector,
|
|
26
26
|
useInjectReducer: () => import_redux_injectors.useInjectReducer,
|
|
27
27
|
useInjectSaga: () => import_redux_injectors.useInjectSaga
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(data_exports);
|
|
30
30
|
var import_redux_injectors = require("redux-injectors");
|
|
31
|
-
var
|
|
31
|
+
var import_react_redux = require("./react-redux.js");
|
|
32
32
|
var import_store = require("./store.js");
|
|
@@ -16,10 +16,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var react_redux_exports = {};
|
|
20
|
+
__export(react_redux_exports, {
|
|
21
|
+
useAppDispatch: () => useAppDispatch,
|
|
21
22
|
useAppSelector: () => useAppSelector
|
|
22
23
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(react_redux_exports);
|
|
24
25
|
var import_react_redux = require("react-redux");
|
|
26
|
+
const useAppDispatch = () => (0, import_react_redux.useDispatch)();
|
|
25
27
|
const useAppSelector = import_react_redux.useSelector;
|
package/dist/cjs/data/store.js
CHANGED
|
@@ -34,20 +34,17 @@ __export(store_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(store_exports);
|
|
36
36
|
var import_toolkit = require("@reduxjs/toolkit");
|
|
37
|
-
var import_react = require("@reduxjs/toolkit/query/react");
|
|
38
37
|
var import_redux_injectors = require("redux-injectors");
|
|
39
38
|
var import_redux_saga = __toESM(require("redux-saga"));
|
|
40
39
|
var import_reducers = require("./reducers.js");
|
|
41
40
|
var import_webpack_hmr = require("./webpack-hmr.js");
|
|
42
|
-
var import_queryMiddleware = require("./queryMiddleware.js");
|
|
43
|
-
var import_listenerMiddleware = require("./listenerMiddleware.js");
|
|
44
41
|
const rootReducer = (0, import_reducers.createReducer)();
|
|
45
42
|
let appStore = null;
|
|
46
43
|
const setStore = (store) => {
|
|
47
44
|
appStore = store;
|
|
48
45
|
};
|
|
49
46
|
const getStore = () => appStore;
|
|
50
|
-
const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {}) => {
|
|
47
|
+
const createStore = (initialState, sagaMiddleware, history, middlewareConfig = { thunk: false }) => {
|
|
51
48
|
const { run: runSaga } = sagaMiddleware;
|
|
52
49
|
const enhancers = [
|
|
53
50
|
(0, import_redux_injectors.createInjectorsEnhancer)({
|
|
@@ -57,12 +54,11 @@ const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {
|
|
|
57
54
|
];
|
|
58
55
|
const baseStore = (0, import_toolkit.configureStore)({
|
|
59
56
|
reducer: rootReducer,
|
|
60
|
-
middleware: (getDefaultMiddleware) => getDefaultMiddleware(middlewareConfig).
|
|
57
|
+
middleware: (getDefaultMiddleware) => getDefaultMiddleware(middlewareConfig).concat(sagaMiddleware),
|
|
61
58
|
devTools: true,
|
|
62
59
|
preloadedState: initialState,
|
|
63
60
|
enhancers
|
|
64
61
|
});
|
|
65
|
-
(0, import_react.setupListeners)(baseStore.dispatch);
|
|
66
62
|
(0, import_webpack_hmr.enableHotReloading)(baseStore);
|
|
67
63
|
return baseStore;
|
|
68
64
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -71,12 +71,13 @@ __export(lib_exports, {
|
|
|
71
71
|
WaitMessage: () => import_wait_message.WaitMessage,
|
|
72
72
|
ariaLive: () => import_live_message.actions,
|
|
73
73
|
auth: () => import_actions.auth,
|
|
74
|
+
authReducer: () => import_reducer.authReducer,
|
|
75
|
+
authSaga: () => import_auth2.authentication,
|
|
74
76
|
authorize: () => import_auth.authorize,
|
|
75
77
|
configureStore: () => import_store.createAppStore,
|
|
76
78
|
createManager: () => import_redux_injectors.createManager,
|
|
77
|
-
enableReactAppForHostIntegration: () =>
|
|
79
|
+
enableReactAppForHostIntegration: () => import_react.enableReactAppForHostIntegration,
|
|
78
80
|
error: () => import_error.actions,
|
|
79
|
-
errorMiddleware: () => import_errorMiddleware.errorMiddleware,
|
|
80
81
|
fetchHostAppData: () => import_fetch_host_app_data.fetchHostAppData,
|
|
81
82
|
fetchUserSettings: () => import_users.getUser,
|
|
82
83
|
getApiActionCreator: () => import_helpers2.getApiActionCreator,
|
|
@@ -114,7 +115,6 @@ __export(lib_exports, {
|
|
|
114
115
|
renderWithRouter: () => import_render_with_router.renderWithRouter,
|
|
115
116
|
renderWithRouterRedux: () => import_render_with_router_redux.renderWithRouterRedux,
|
|
116
117
|
resetUserIdleTime: () => import_session.resetUserIdleTime,
|
|
117
|
-
sdkBaseQuery: () => import_baseQuery.sdkBaseQuery,
|
|
118
118
|
sendBAEvent: () => import_analytics.sendBAEvent,
|
|
119
119
|
sendMessageToHost: () => import_message_to_host_app.sendMessageToHost,
|
|
120
120
|
setAppConfig: () => import_config.setAppConfig,
|
|
@@ -126,11 +126,8 @@ __export(lib_exports, {
|
|
|
126
126
|
subscribeToSessionExpiryWarning: () => import_session.subscribeToSessionExpiryWarning,
|
|
127
127
|
trackActivity: () => import_session.trackActivity,
|
|
128
128
|
updateBAEventParameters: () => import_web_analytics.updateBAEventParameters,
|
|
129
|
-
useAppDispatch: () =>
|
|
130
|
-
|
|
131
|
-
useAppSelector: () => import_react.useAppSelector,
|
|
132
|
-
useInjectListener: () => import_react.useInjectListener,
|
|
133
|
-
useInjectQuery: () => import_react.useInjectQuery,
|
|
129
|
+
useAppDispatch: () => import_react_redux.useAppDispatch,
|
|
130
|
+
useAppSelector: () => import_react_redux.useAppSelector,
|
|
134
131
|
useInjectReducer: () => import_redux_injectors.useInjectReducer,
|
|
135
132
|
useInjectSaga: () => import_redux_injectors.useInjectSaga,
|
|
136
133
|
useMediaQueryList: () => import_use_media_query_list.useMediaQueryList,
|
|
@@ -140,15 +137,15 @@ __export(lib_exports, {
|
|
|
140
137
|
module.exports = __toCommonJS(lib_exports);
|
|
141
138
|
var import_auth = require("./utils/auth/index.js");
|
|
142
139
|
var import_http_client = require("./communication/http-client/index.js");
|
|
143
|
-
var import_baseQuery = require("./communication/http-client/baseQuery.js");
|
|
144
140
|
var import_response_interceptor = require("./communication/http-client/response-interceptor.js");
|
|
145
141
|
var import_actions = require("./data/auth/actions.js");
|
|
146
142
|
var import_require_auth = require("./view/require-auth.js");
|
|
143
|
+
var import_auth2 = require("./sideeffect/auth/index.js");
|
|
144
|
+
var import_reducer = require("./data/auth/reducer.js");
|
|
147
145
|
var import_page = require("./view/page.js");
|
|
148
146
|
var import_constants = __toESM(require("./utils/constants.js"));
|
|
147
|
+
var import_react_redux = require("./data/react-redux.js");
|
|
149
148
|
var import_redux_injectors = require("redux-injectors");
|
|
150
|
-
var import_react = require("./data/react.js");
|
|
151
|
-
var import_errorMiddleware = require("./data/errorMiddleware.js");
|
|
152
149
|
var import_helper = require("./utils/auth/helper.js");
|
|
153
150
|
var import_url = require("./utils/url.js");
|
|
154
151
|
var import_store = require("./data/store.js");
|
|
@@ -163,7 +160,7 @@ var import_actions3 = require("./data/wait-message/actions.js");
|
|
|
163
160
|
var import_service_worker = require("./utils/service-worker.js");
|
|
164
161
|
var import_guest = require("./utils/micro-frontend/guest.js");
|
|
165
162
|
var import_host = require("./utils/micro-frontend/host.js");
|
|
166
|
-
var
|
|
163
|
+
var import_react = require("./utils/app-host-integration/react.js");
|
|
167
164
|
var import_config = require("./utils/app-config/config.js");
|
|
168
165
|
var import_micro_frontend = require("./utils/micro-frontend/index.js");
|
|
169
166
|
var import_app_config = require("./utils/app-config/index.js");
|
|
@@ -24,62 +24,62 @@ module.exports = __toCommonJS(log_records_exports);
|
|
|
24
24
|
const logRecords = {
|
|
25
25
|
ERR_TOAST_OPEN_FAILED: {
|
|
26
26
|
code: "appsdk001",
|
|
27
|
-
|
|
27
|
+
message: "Unable to open Error Toast"
|
|
28
28
|
},
|
|
29
29
|
WAIT_MSG_OPEN_FAILED: {
|
|
30
30
|
code: "appsdk02",
|
|
31
|
-
|
|
31
|
+
message: "Unable to open Wait message"
|
|
32
32
|
},
|
|
33
33
|
WAIT_MSG_CLOSE_FAILED: {
|
|
34
34
|
code: "appsdk03",
|
|
35
|
-
|
|
35
|
+
message: "Unable to close Wait message"
|
|
36
36
|
},
|
|
37
37
|
APP_CONFIG_LOAD_FAILED: {
|
|
38
38
|
code: "appsdk04",
|
|
39
|
-
|
|
39
|
+
message: "Unable to load application configuration"
|
|
40
40
|
},
|
|
41
41
|
ASSET_NOT_FOUND_IN_MANIFEST: (assetName) => ({
|
|
42
42
|
code: "appsdk05",
|
|
43
|
-
|
|
43
|
+
message: `Application load failed. unable to locate ${assetName} in the manifest`
|
|
44
44
|
}),
|
|
45
45
|
APP_INIT_FAILED: (appId, errMsg) => ({
|
|
46
46
|
code: "appsdk06",
|
|
47
|
-
|
|
47
|
+
message: `Application load failed. Unable to load one or more application resources for appId: ${appId}. ${errMsg}`
|
|
48
48
|
}),
|
|
49
49
|
APP_LOADING: (appId) => ({
|
|
50
50
|
code: "appsdk07",
|
|
51
|
-
|
|
51
|
+
message: `Application ${appId} is loading...`
|
|
52
52
|
}),
|
|
53
53
|
APP_LOADING_COMPLETE: (appId) => ({
|
|
54
54
|
code: "appsdk08",
|
|
55
|
-
|
|
55
|
+
message: `Application ${appId} loaded`
|
|
56
56
|
}),
|
|
57
57
|
APP_UNLOADING: (appId) => ({
|
|
58
58
|
code: "appsdk09",
|
|
59
|
-
|
|
59
|
+
message: `Application ${appId} unloading...`
|
|
60
60
|
}),
|
|
61
61
|
APP_UNLOADING_COMPLETE: (appId) => ({
|
|
62
62
|
code: "appsdk10",
|
|
63
|
-
|
|
63
|
+
message: `Application ${appId} unloaded`
|
|
64
64
|
}),
|
|
65
65
|
SSF_HOST_OBJECT_NOT_FOUND: (name) => ({
|
|
66
66
|
code: "appsdk11",
|
|
67
|
-
|
|
67
|
+
message: `Parent window doesn't expose SSF Object named ${name}`
|
|
68
68
|
}),
|
|
69
69
|
LOGIN_FAILED: {
|
|
70
70
|
code: "appsdk12",
|
|
71
|
-
|
|
71
|
+
message: "Unable to login the user."
|
|
72
72
|
},
|
|
73
73
|
LOGOUT_FAILED: {
|
|
74
74
|
code: "appsdk13",
|
|
75
|
-
|
|
75
|
+
message: "Unable to logout the user."
|
|
76
76
|
},
|
|
77
77
|
SERVICE_WORKER_FAILED: {
|
|
78
78
|
code: "appsdk14",
|
|
79
|
-
|
|
79
|
+
message: "Service Worker Registration Failed"
|
|
80
80
|
},
|
|
81
81
|
UNHANDLED_ERROR: {
|
|
82
82
|
code: "appsdk15",
|
|
83
|
-
|
|
83
|
+
message: "Unhandled error in react component"
|
|
84
84
|
}
|
|
85
85
|
};
|
|
@@ -30,11 +30,10 @@ const logger = (() => {
|
|
|
30
30
|
transport: (0, import_pui_diagnostics.Console)(),
|
|
31
31
|
index: "app",
|
|
32
32
|
environment: (0, import_config.getAppConfigValue)("activeEnv"),
|
|
33
|
-
logger: "icemt.app.logger",
|
|
34
33
|
team: "app team",
|
|
35
34
|
appName: "ICEMT App",
|
|
36
35
|
appVersion: "latest",
|
|
37
|
-
|
|
36
|
+
instanceId: "",
|
|
38
37
|
userId: ""
|
|
39
38
|
});
|
|
40
39
|
})();
|
|
@@ -24,7 +24,7 @@ module.exports = __toCommonJS(use_breakpoint_exports);
|
|
|
24
24
|
var import_react = require("react");
|
|
25
25
|
var import_styled_components = require("styled-components");
|
|
26
26
|
var import_pubsub_js = require("pubsub-js");
|
|
27
|
-
var
|
|
27
|
+
var import_react_redux = require("../../data/react-redux.js");
|
|
28
28
|
var import_breakpoint = require("../../data/breakpoint/index.js");
|
|
29
29
|
var import_use_media_query_list = require("./use-media-query-list.js");
|
|
30
30
|
var import_constants = require("../../utils/constants.js");
|
|
@@ -39,7 +39,7 @@ const useBreakpoint = () => {
|
|
|
39
39
|
["small", "medium", "large"],
|
|
40
40
|
"large"
|
|
41
41
|
);
|
|
42
|
-
const dispatch = (0,
|
|
42
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
43
43
|
(0, import_react.useEffect)(() => {
|
|
44
44
|
dispatch({ type: import_breakpoint.breakpoint.change, payload: currentBreakpoint });
|
|
45
45
|
(0, import_pubsub_js.publish)(import_constants.HOST_WINDOW_BREAKPOINT_CHANGED, currentBreakpoint);
|
|
@@ -24,11 +24,11 @@ module.exports = __toCommonJS(error_toast_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = require("react");
|
|
26
26
|
var import_ds_toast = require("@elliemae/ds-toast");
|
|
27
|
-
var
|
|
27
|
+
var import_react_redux = require("../../data/react-redux.js");
|
|
28
28
|
var import_error = require("../../data/error/index.js");
|
|
29
29
|
const ErrorToast = (0, import_react.memo)((props) => {
|
|
30
|
-
const storeError = (0,
|
|
31
|
-
const dispatch = (0,
|
|
30
|
+
const storeError = (0, import_react_redux.useAppSelector)((state) => state?.error);
|
|
31
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
32
32
|
(0, import_react.useEffect)(() => {
|
|
33
33
|
if (storeError && (storeError?.description || storeError?.messageText)) {
|
|
34
34
|
const toastProps = {
|
|
@@ -23,9 +23,9 @@ __export(live_message_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(live_message_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react_aria_live = require("react-aria-live");
|
|
26
|
-
var
|
|
26
|
+
var import_react_redux = require("../../data/react-redux.js");
|
|
27
27
|
const LiveMessage = () => {
|
|
28
|
-
const message = (0,
|
|
29
|
-
const ariaLive = (0,
|
|
28
|
+
const message = (0, import_react_redux.useAppSelector)((state) => state.liveMessage?.message);
|
|
29
|
+
const ariaLive = (0, import_react_redux.useAppSelector)((state) => state.liveMessage?.ariaLive);
|
|
30
30
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_aria_live.LiveMessage, { message, "aria-live": ariaLive });
|
|
31
31
|
};
|
|
@@ -23,7 +23,7 @@ __export(login_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(login_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = require("react");
|
|
26
|
-
var
|
|
26
|
+
var import_react_redux = require("../../data/react-redux.js");
|
|
27
27
|
var import_auth = require("../../utils/auth/index.js");
|
|
28
28
|
var import_actions = require("../../data/auth/actions.js");
|
|
29
29
|
const Login = ({
|
|
@@ -33,7 +33,7 @@ const Login = ({
|
|
|
33
33
|
children
|
|
34
34
|
}) => {
|
|
35
35
|
const [userAuthorized, setUserAuthorized] = (0, import_react.useState)(false);
|
|
36
|
-
const dispatch = (0,
|
|
36
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
37
37
|
(0, import_react.useEffect)(() => {
|
|
38
38
|
(0, import_auth.login)({ clientId, scope, responseType }).then(({ authorized }) => {
|
|
39
39
|
if (authorized)
|
|
@@ -116,7 +116,7 @@ const waitAndInitApplication = (appConfig, requests) => (
|
|
|
116
116
|
Promise.all(requests).then(addAppToActiveAppList.bind(null, appConfig.id)).then(initApplication.bind(null, appConfig)).catch((err) => {
|
|
117
117
|
const logRecord = import_log_records.logRecords.APP_INIT_FAILED(appConfig.id, err.message);
|
|
118
118
|
(0, import_micro_frontend.getLogger)().error({ ...logRecord, exception: err });
|
|
119
|
-
throw new Error(logRecord.
|
|
119
|
+
throw new Error(logRecord.message);
|
|
120
120
|
})
|
|
121
121
|
);
|
|
122
122
|
const removeAssetsFromDOM = (id, documentEle = document) => {
|
|
@@ -61,7 +61,7 @@ const getFullFileNameofAssetsFromManifest = (manifest, assetNames = []) => asset
|
|
|
61
61
|
else {
|
|
62
62
|
const logRecord = import_log_records.logRecords.ASSET_NOT_FOUND_IN_MANIFEST(assetName);
|
|
63
63
|
(0, import_micro_frontend.getLogger)().error(logRecord);
|
|
64
|
-
throw new Error(logRecord.
|
|
64
|
+
throw new Error(logRecord.message);
|
|
65
65
|
}
|
|
66
66
|
return assets;
|
|
67
67
|
}, []);
|
|
@@ -26,11 +26,11 @@ var import_react = require("react");
|
|
|
26
26
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
27
27
|
var import_ds_button = require("@elliemae/ds-button");
|
|
28
28
|
var import_ds_dialog = require("@elliemae/ds-dialog");
|
|
29
|
-
var
|
|
29
|
+
var import_react_redux = require("../../../data/react-redux.js");
|
|
30
30
|
var import_actions = require("../../../data/navigation-prompt/actions.js");
|
|
31
31
|
const NavigationPrompt = (0, import_react.memo)(
|
|
32
32
|
({ open = false }) => {
|
|
33
|
-
const dispatch = (0,
|
|
33
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
34
34
|
const cancelDialog = () => dispatch(import_actions.navigationPrompt.cancel());
|
|
35
35
|
const confirmDialog = () => dispatch(import_actions.navigationPrompt.confirm());
|
|
36
36
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialog, { isOpen: open, onClickOutside: cancelDialog, centered: true, children: [
|
|
@@ -26,7 +26,7 @@ var import_react = require("react");
|
|
|
26
26
|
var import_ds_button = require("@elliemae/ds-button");
|
|
27
27
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
28
28
|
var import_ds_dialog = require("@elliemae/ds-dialog");
|
|
29
|
-
var
|
|
29
|
+
var import_react_redux = require("../../../data/react-redux.js");
|
|
30
30
|
var import_actions = require("../../../data/logout/actions.js");
|
|
31
31
|
var import_session = require("../../../utils/session.js");
|
|
32
32
|
var import_customHooks = require("./customHooks.js");
|
|
@@ -34,7 +34,7 @@ const SessionExpiry = (0, import_react.memo)(
|
|
|
34
34
|
({ open, warningNotifiedAt = 0 }) => {
|
|
35
35
|
const [isOpen, setIsOpen] = (0, import_react.useState)(open);
|
|
36
36
|
const timeLeft = (0, import_customHooks.useTrackSessionExpiry)(warningNotifiedAt);
|
|
37
|
-
const dispatch = (0,
|
|
37
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
38
38
|
(0, import_react.useEffect)(() => {
|
|
39
39
|
setIsOpen(open);
|
|
40
40
|
}, [open]);
|
|
@@ -23,12 +23,12 @@ __export(session_timeout_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(session_timeout_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = require("react");
|
|
26
|
-
var
|
|
26
|
+
var import_react_redux = require("../../data/react-redux.js");
|
|
27
27
|
var import_actions = require("../../data/logout/actions.js");
|
|
28
28
|
var import_session = require("../../utils/session.js");
|
|
29
29
|
var import_session_expiry = require("../modals/session-expiry/index.js");
|
|
30
30
|
const SessionTimeout = () => {
|
|
31
|
-
const dispatch = (0,
|
|
31
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
32
32
|
const [showSessionExpiryWarning, setSessionExpiryWarning] = (0, import_react.useState)(false);
|
|
33
33
|
const [warningNotifiedAt, setwarningNotifiedAt] = (0, import_react.useState)();
|
|
34
34
|
(0, import_react.useEffect)(() => {
|
|
@@ -36,7 +36,7 @@ var import_react = require("react");
|
|
|
36
36
|
var import_styled_components = __toESM(require("styled-components"));
|
|
37
37
|
var import_ds_backdrop = require("@elliemae/ds-backdrop");
|
|
38
38
|
var import_ds_circular_progress_indicator = require("@elliemae/ds-circular-progress-indicator");
|
|
39
|
-
var
|
|
39
|
+
var import_react_redux = require("../../data/react-redux.js");
|
|
40
40
|
var import_use_html_wait_message = require("./use-html-wait-message.js");
|
|
41
41
|
var import_user_wait_event = require("../../analytics/user-wait-event.js");
|
|
42
42
|
const StyledCircularIndicator = (0, import_styled_components.default)(import_ds_circular_progress_indicator.DSCircularIndeterminateIndicator)`
|
|
@@ -54,8 +54,8 @@ const WaitMessage = (0, import_react.memo)(
|
|
|
54
54
|
tooltipStartPlacementPreference = "center",
|
|
55
55
|
...rest
|
|
56
56
|
}) => {
|
|
57
|
-
const isOpen = (0,
|
|
58
|
-
const message = (0,
|
|
57
|
+
const isOpen = (0, import_react_redux.useAppSelector)((state) => state.waitMessage?.isOpen);
|
|
58
|
+
const message = (0, import_react_redux.useAppSelector)((state) => state.waitMessage?.message);
|
|
59
59
|
(0, import_react.useEffect)(() => {
|
|
60
60
|
if (isOpen)
|
|
61
61
|
(0, import_user_wait_event.waitStartEvent)();
|
|
@@ -22,10 +22,10 @@ __export(wait_message_launcher_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(wait_message_launcher_exports);
|
|
24
24
|
var import_react = require("react");
|
|
25
|
-
var
|
|
25
|
+
var import_react_redux = require("../../data/react-redux.js");
|
|
26
26
|
var import_actions = require("../../data/wait-message/actions.js");
|
|
27
27
|
const WaitMessageLauncher = () => {
|
|
28
|
-
const dispatch = (0,
|
|
28
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
29
29
|
(0, import_react.useEffect)(() => {
|
|
30
30
|
dispatch(import_actions.waitMessage.open());
|
|
31
31
|
return () => {
|
package/dist/esm/data/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
useInjectSaga,
|
|
4
4
|
createManager
|
|
5
5
|
} from "redux-injectors";
|
|
6
|
-
import { useAppDispatch, useAppSelector } from "./react.js";
|
|
6
|
+
import { useAppDispatch, useAppSelector } from "./react-redux.js";
|
|
7
7
|
import { createAppStore, getStore } from "./store.js";
|
|
8
8
|
export {
|
|
9
9
|
createAppStore as configureStore,
|
package/dist/esm/data/store.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { configureStore } from "@reduxjs/toolkit";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
createInjectorsEnhancer
|
|
4
|
+
} from "redux-injectors";
|
|
4
5
|
import createSagaMiddleware from "redux-saga";
|
|
5
6
|
import { createReducer } from "./reducers.js";
|
|
6
7
|
import { enableHotReloading } from "./webpack-hmr.js";
|
|
7
|
-
import { queryMiddleware } from "./queryMiddleware.js";
|
|
8
|
-
import { listenerMiddleware } from "./listenerMiddleware.js";
|
|
9
8
|
const rootReducer = createReducer();
|
|
10
9
|
let appStore = null;
|
|
11
10
|
const setStore = (store) => {
|
|
12
11
|
appStore = store;
|
|
13
12
|
};
|
|
14
13
|
const getStore = () => appStore;
|
|
15
|
-
const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {}) => {
|
|
14
|
+
const createStore = (initialState, sagaMiddleware, history, middlewareConfig = { thunk: false }) => {
|
|
16
15
|
const { run: runSaga } = sagaMiddleware;
|
|
17
16
|
const enhancers = [
|
|
18
17
|
createInjectorsEnhancer({
|
|
@@ -22,12 +21,11 @@ const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {
|
|
|
22
21
|
];
|
|
23
22
|
const baseStore = configureStore({
|
|
24
23
|
reducer: rootReducer,
|
|
25
|
-
middleware: (getDefaultMiddleware) => getDefaultMiddleware(middlewareConfig).
|
|
24
|
+
middleware: (getDefaultMiddleware) => getDefaultMiddleware(middlewareConfig).concat(sagaMiddleware),
|
|
26
25
|
devTools: true,
|
|
27
26
|
preloadedState: initialState,
|
|
28
27
|
enhancers
|
|
29
28
|
});
|
|
30
|
-
setupListeners(baseStore.dispatch);
|
|
31
29
|
enableHotReloading(baseStore);
|
|
32
30
|
return baseStore;
|
|
33
31
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -3,25 +3,19 @@ import {
|
|
|
3
3
|
getHTTPClient,
|
|
4
4
|
getAuthHTTPClient
|
|
5
5
|
} from "./communication/http-client/index.js";
|
|
6
|
-
import { sdkBaseQuery } from "./communication/http-client/baseQuery.js";
|
|
7
6
|
import { onAuthorizationFailure } from "./communication/http-client/response-interceptor.js";
|
|
8
7
|
import { auth } from "./data/auth/actions.js";
|
|
9
8
|
import { RequireAuth } from "./view/require-auth.js";
|
|
9
|
+
import { authentication } from "./sideeffect/auth/index.js";
|
|
10
|
+
import { authReducer } from "./data/auth/reducer.js";
|
|
10
11
|
import { Page } from "./view/page.js";
|
|
11
12
|
import { default as default2 } from "./utils/constants.js";
|
|
13
|
+
import { useAppDispatch, useAppSelector } from "./data/react-redux.js";
|
|
12
14
|
import {
|
|
13
15
|
useInjectReducer,
|
|
14
16
|
useInjectSaga,
|
|
15
17
|
createManager
|
|
16
18
|
} from "redux-injectors";
|
|
17
|
-
import {
|
|
18
|
-
useInjectQuery,
|
|
19
|
-
useInjectListener,
|
|
20
|
-
useAppDispatch,
|
|
21
|
-
useAppSelector,
|
|
22
|
-
useAppMiddleware
|
|
23
|
-
} from "./data/react.js";
|
|
24
|
-
import { errorMiddleware } from "./data/errorMiddleware.js";
|
|
25
19
|
import { getAuthorizationHeader } from "./utils/auth/helper.js";
|
|
26
20
|
import { getRedirectUrl, removeDoubleSlash } from "./utils/url.js";
|
|
27
21
|
import { createAppStore } from "./data/store.js";
|
|
@@ -163,12 +157,13 @@ export {
|
|
|
163
157
|
WaitMessage,
|
|
164
158
|
actions as ariaLive,
|
|
165
159
|
auth,
|
|
160
|
+
authReducer,
|
|
161
|
+
authentication as authSaga,
|
|
166
162
|
authorize,
|
|
167
163
|
createAppStore as configureStore,
|
|
168
164
|
createManager,
|
|
169
165
|
enableReactAppForHostIntegration,
|
|
170
166
|
actions2 as error,
|
|
171
|
-
errorMiddleware,
|
|
172
167
|
fetchHostAppData,
|
|
173
168
|
getUser as fetchUserSettings,
|
|
174
169
|
getApiActionCreator,
|
|
@@ -206,7 +201,6 @@ export {
|
|
|
206
201
|
renderWithRouter,
|
|
207
202
|
renderWithRouterRedux,
|
|
208
203
|
resetUserIdleTime,
|
|
209
|
-
sdkBaseQuery,
|
|
210
204
|
sendBAEvent,
|
|
211
205
|
sendMessageToHost,
|
|
212
206
|
setAppConfig,
|
|
@@ -219,10 +213,7 @@ export {
|
|
|
219
213
|
trackActivity,
|
|
220
214
|
updateBAEventParameters,
|
|
221
215
|
useAppDispatch,
|
|
222
|
-
useAppMiddleware,
|
|
223
216
|
useAppSelector,
|
|
224
|
-
useInjectListener,
|
|
225
|
-
useInjectQuery,
|
|
226
217
|
useInjectReducer,
|
|
227
218
|
useInjectSaga,
|
|
228
219
|
useMediaQueryList,
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
const logRecords = {
|
|
2
2
|
ERR_TOAST_OPEN_FAILED: {
|
|
3
3
|
code: "appsdk001",
|
|
4
|
-
|
|
4
|
+
message: "Unable to open Error Toast"
|
|
5
5
|
},
|
|
6
6
|
WAIT_MSG_OPEN_FAILED: {
|
|
7
7
|
code: "appsdk02",
|
|
8
|
-
|
|
8
|
+
message: "Unable to open Wait message"
|
|
9
9
|
},
|
|
10
10
|
WAIT_MSG_CLOSE_FAILED: {
|
|
11
11
|
code: "appsdk03",
|
|
12
|
-
|
|
12
|
+
message: "Unable to close Wait message"
|
|
13
13
|
},
|
|
14
14
|
APP_CONFIG_LOAD_FAILED: {
|
|
15
15
|
code: "appsdk04",
|
|
16
|
-
|
|
16
|
+
message: "Unable to load application configuration"
|
|
17
17
|
},
|
|
18
18
|
ASSET_NOT_FOUND_IN_MANIFEST: (assetName) => ({
|
|
19
19
|
code: "appsdk05",
|
|
20
|
-
|
|
20
|
+
message: `Application load failed. unable to locate ${assetName} in the manifest`
|
|
21
21
|
}),
|
|
22
22
|
APP_INIT_FAILED: (appId, errMsg) => ({
|
|
23
23
|
code: "appsdk06",
|
|
24
|
-
|
|
24
|
+
message: `Application load failed. Unable to load one or more application resources for appId: ${appId}. ${errMsg}`
|
|
25
25
|
}),
|
|
26
26
|
APP_LOADING: (appId) => ({
|
|
27
27
|
code: "appsdk07",
|
|
28
|
-
|
|
28
|
+
message: `Application ${appId} is loading...`
|
|
29
29
|
}),
|
|
30
30
|
APP_LOADING_COMPLETE: (appId) => ({
|
|
31
31
|
code: "appsdk08",
|
|
32
|
-
|
|
32
|
+
message: `Application ${appId} loaded`
|
|
33
33
|
}),
|
|
34
34
|
APP_UNLOADING: (appId) => ({
|
|
35
35
|
code: "appsdk09",
|
|
36
|
-
|
|
36
|
+
message: `Application ${appId} unloading...`
|
|
37
37
|
}),
|
|
38
38
|
APP_UNLOADING_COMPLETE: (appId) => ({
|
|
39
39
|
code: "appsdk10",
|
|
40
|
-
|
|
40
|
+
message: `Application ${appId} unloaded`
|
|
41
41
|
}),
|
|
42
42
|
SSF_HOST_OBJECT_NOT_FOUND: (name) => ({
|
|
43
43
|
code: "appsdk11",
|
|
44
|
-
|
|
44
|
+
message: `Parent window doesn't expose SSF Object named ${name}`
|
|
45
45
|
}),
|
|
46
46
|
LOGIN_FAILED: {
|
|
47
47
|
code: "appsdk12",
|
|
48
|
-
|
|
48
|
+
message: "Unable to login the user."
|
|
49
49
|
},
|
|
50
50
|
LOGOUT_FAILED: {
|
|
51
51
|
code: "appsdk13",
|
|
52
|
-
|
|
52
|
+
message: "Unable to logout the user."
|
|
53
53
|
},
|
|
54
54
|
SERVICE_WORKER_FAILED: {
|
|
55
55
|
code: "appsdk14",
|
|
56
|
-
|
|
56
|
+
message: "Service Worker Registration Failed"
|
|
57
57
|
},
|
|
58
58
|
UNHANDLED_ERROR: {
|
|
59
59
|
code: "appsdk15",
|
|
60
|
-
|
|
60
|
+
message: "Unhandled error in react component"
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
export {
|
|
@@ -7,11 +7,10 @@ const logger = (() => {
|
|
|
7
7
|
transport: Console(),
|
|
8
8
|
index: "app",
|
|
9
9
|
environment: getAppConfigValue("activeEnv"),
|
|
10
|
-
logger: "icemt.app.logger",
|
|
11
10
|
team: "app team",
|
|
12
11
|
appName: "ICEMT App",
|
|
13
12
|
appVersion: "latest",
|
|
14
|
-
|
|
13
|
+
instanceId: "",
|
|
15
14
|
userId: ""
|
|
16
15
|
});
|
|
17
16
|
})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useContext } from "react";
|
|
2
2
|
import { ThemeContext } from "styled-components";
|
|
3
3
|
import { publish } from "pubsub-js";
|
|
4
|
-
import { useAppDispatch } from "../../data/react.js";
|
|
4
|
+
import { useAppDispatch } from "../../data/react-redux.js";
|
|
5
5
|
import { breakpoint } from "../../data/breakpoint/index.js";
|
|
6
6
|
import { useMediaQueryList } from "./use-media-query-list.js";
|
|
7
7
|
import { HOST_WINDOW_BREAKPOINT_CHANGED } from "../../utils/constants.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, memo } from "react";
|
|
3
3
|
import { ToastPosition, ToastType, DSToast, toast } from "@elliemae/ds-toast";
|
|
4
|
-
import { useAppSelector, useAppDispatch } from "../../data/react.js";
|
|
4
|
+
import { useAppSelector, useAppDispatch } from "../../data/react-redux.js";
|
|
5
5
|
import { actions as error } from "../../data/error/index.js";
|
|
6
6
|
const ErrorToast = memo((props) => {
|
|
7
7
|
const storeError = useAppSelector((state) => state?.error);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { LiveMessage as AriaLiveMessage } from "react-aria-live";
|
|
3
|
-
import { useAppSelector } from "../../data/react.js";
|
|
3
|
+
import { useAppSelector } from "../../data/react-redux.js";
|
|
4
4
|
const LiveMessage = () => {
|
|
5
5
|
const message = useAppSelector((state) => state.liveMessage?.message);
|
|
6
6
|
const ariaLive = useAppSelector((state) => state.liveMessage?.ariaLive);
|