@elliemae/pui-app-sdk 3.0.0-beta.24 → 3.0.0-beta.28
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 +16 -2
- package/dist/cjs/analytics/index.js +15 -1
- package/dist/cjs/analytics/web-analytics.js +15 -1
- package/dist/cjs/communication/http-client/index.js +42 -9
- package/dist/cjs/data/reducers.js +17 -4
- package/dist/cjs/data/store.js +2 -0
- package/dist/cjs/data/webpack-hmr.js +42 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/package.json +7 -1
- package/dist/cjs/sideeffect/auth/index.js +21 -6
- package/dist/cjs/sideeffect/error-toast/index.js +19 -3
- package/dist/cjs/sideeffect/wait-message/index.js +21 -6
- package/dist/cjs/utils/auth/index.js +21 -6
- package/dist/cjs/utils/service-worker.js +2 -3
- package/dist/cjs/utils/storybook/preview.js +7 -3
- package/dist/cjs/utils/storybook/theme.js +39 -9
- package/dist/cjs/utils/testing/index.js +15 -1
- package/dist/cjs/utils/testing/render-with-redux.js +20 -4
- package/dist/cjs/utils/testing/render-with-router-redux.js +22 -6
- package/dist/cjs/utils/testing/render-with-router.js +19 -3
- package/dist/cjs/utils/testing/render-with-state-addons.js +39 -10
- package/dist/cjs/view/app-root/index.js +15 -5
- package/dist/cjs/view/app-router.js +33 -4
- package/dist/cjs/view/error-boundary/index.js +19 -3
- package/dist/cjs/view/error-toast/index.js +19 -9
- package/dist/cjs/view/fetch-host-app-data/store.js +15 -1
- package/dist/cjs/view/fields/check-box/index.js +42 -9
- package/dist/cjs/view/fields/combo-box/index.js +54 -18
- package/dist/cjs/view/fields/connect-form.js +15 -3
- package/dist/cjs/view/fields/date-input/index.js +44 -15
- package/dist/cjs/view/fields/date-picker/index.js +44 -15
- package/dist/cjs/view/fields/form-item-layout/index.js +41 -13
- package/dist/cjs/view/fields/form-layout-block-item/index.js +46 -16
- package/dist/cjs/view/fields/input-mask/index.js +43 -15
- package/dist/cjs/view/fields/large-text-box/index.js +44 -15
- package/dist/cjs/view/fields/radio/index.js +53 -17
- package/dist/cjs/view/fields/radio-group/index.js +43 -10
- package/dist/cjs/view/fields/text-box/index.js +44 -15
- package/dist/cjs/view/form/index.js +17 -6
- package/dist/cjs/view/form/submit-button/index.js +33 -4
- package/dist/cjs/view/loadable/index.js +15 -3
- package/dist/cjs/view/micro-app/app-factory/index.js +18 -1
- package/dist/cjs/view/micro-app/use-app-will-render.js +19 -3
- package/dist/cjs/view/micro-iframe-app/app.js +39 -10
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +21 -4
- package/dist/cjs/view/micro-iframe-app/index.js +33 -4
- package/dist/cjs/view/modals/wait-message/index.js +41 -9
- package/dist/cjs/view/visually-hidden/index.js +17 -4
- package/dist/esm/analytics/appdynamics.js +34 -0
- package/dist/esm/analytics/index.js +43 -0
- package/dist/{es → esm}/analytics/page-view-event.js +0 -0
- package/dist/{es → esm}/analytics/user-session-event.js +0 -0
- package/dist/{es → esm}/analytics/user-wait-event.js +0 -0
- package/dist/esm/analytics/web-analytics.js +30 -0
- package/dist/{es → esm}/api/auth/index.js +0 -0
- package/dist/{es → esm}/api/helpers.js +0 -0
- package/dist/{es → esm}/api/users/index.js +0 -0
- package/dist/{es → esm}/api/users/users.json +0 -0
- package/dist/{es → esm}/app.config.json +0 -0
- package/dist/esm/communication/http-client/index.js +70 -0
- package/dist/{es → esm}/communication/http-client/request-interceptor.js +0 -0
- package/dist/{es → esm}/communication/http-client/response-interceptor.js +0 -0
- package/dist/{es → esm}/communication/http-client/retry-axios.js +0 -0
- package/dist/{es → esm}/communication/http-client/retry.js +0 -0
- package/dist/{es → esm}/data/auth/actions.js +0 -0
- package/dist/{es → esm}/data/auth/reducer.js +0 -0
- package/dist/{es → esm}/data/breakpoint/index.js +0 -0
- package/dist/{es → esm}/data/error/index.js +0 -0
- package/dist/{es → esm}/data/index.js +0 -0
- package/dist/{es → esm}/data/live-message/index.js +0 -0
- package/dist/{es → esm}/data/logout/actions.js +0 -0
- package/dist/{es → esm}/data/navigation-prompt/actions.js +0 -0
- package/dist/{es → esm}/data/react-redux.js +0 -0
- package/dist/esm/data/reducers.js +33 -0
- package/dist/{es → esm}/data/saga.js +0 -0
- package/dist/{es → esm}/data/store.js +2 -0
- package/dist/{es → esm}/data/wait-message/actions.js +0 -0
- package/dist/{es → esm}/data/wait-message/reducer.js +0 -0
- package/dist/esm/data/webpack-hmr.js +17 -0
- package/dist/{es → esm}/index.js +5 -1
- package/dist/{es → esm}/index.pug +0 -0
- package/dist/{es → esm}/micro-frontend.js +0 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/sideeffect/auth/index.js +64 -0
- package/dist/esm/sideeffect/error-toast/index.js +43 -0
- package/dist/esm/sideeffect/wait-message/index.js +55 -0
- package/dist/{es → esm}/typings/custom.d.js +0 -0
- package/dist/{es → esm}/typings/elliemae.d.js +0 -0
- package/dist/{es → esm}/typings/styled.d.js +0 -0
- package/dist/{es → esm}/typings/thirdparty.d.js +0 -0
- package/dist/{es → esm}/utils/app-config/config.js +0 -0
- package/dist/{es → esm}/utils/app-config/index.js +0 -0
- package/dist/{es → esm}/utils/app-host-integration/react.js +0 -0
- package/dist/{es → esm}/utils/auth/helper.js +0 -0
- package/dist/{es → esm}/utils/auth/index.js +23 -6
- package/dist/{es → esm}/utils/await.js +0 -0
- package/dist/{es → esm}/utils/constants.js +0 -0
- package/dist/{es → esm}/utils/font-size.js +0 -0
- package/dist/{es → esm}/utils/guest-with-service.js +0 -0
- package/dist/{es → esm}/utils/helpers.js +0 -0
- package/dist/{es → esm}/utils/history.js +0 -0
- package/dist/{es → esm}/utils/log-records.js +0 -0
- package/dist/{es → esm}/utils/micro-frontend/console-logger.js +0 -0
- package/dist/{es → esm}/utils/micro-frontend/guest.js +0 -0
- package/dist/{es → esm}/utils/micro-frontend/host.js +0 -0
- package/dist/{es → esm}/utils/micro-frontend/index.js +0 -0
- package/dist/{es → esm}/utils/micro-frontend/types.js +0 -0
- package/dist/{es → esm}/utils/redact-pii.js +0 -0
- package/dist/{es → esm}/utils/service-worker.js +2 -3
- package/dist/{es → esm}/utils/session.js +0 -0
- package/dist/{es → esm}/utils/storybook/manager.js +0 -0
- package/dist/{es → esm}/utils/storybook/preview.js +7 -3
- package/dist/esm/utils/storybook/theme.js +45 -0
- package/dist/esm/utils/testing/index.js +38 -0
- package/dist/esm/utils/testing/render-with-redux.js +35 -0
- package/dist/esm/utils/testing/render-with-router-redux.js +41 -0
- package/dist/esm/utils/testing/render-with-router.js +37 -0
- package/dist/esm/utils/testing/render-with-state-addons.js +69 -0
- package/dist/{es → esm}/utils/types.js +0 -0
- package/dist/{es → esm}/utils/url.js +0 -0
- package/dist/{es → esm}/utils/web-storage.js +0 -0
- package/dist/{es → esm}/utils/window.js +0 -0
- package/dist/{es → esm}/view/app-root/hosted-app.js +0 -0
- package/dist/{es → esm}/view/app-root/index.js +17 -5
- package/dist/{es → esm}/view/app-root/stand-alone-app.js +0 -0
- package/dist/{es → esm}/view/app-root/style.js +0 -0
- package/dist/esm/view/app-router.js +50 -0
- package/dist/{es → esm}/view/breakpoint/use-breakpoint.js +0 -0
- package/dist/{es → esm}/view/breakpoint/use-media-query-list.js +0 -0
- package/dist/{es → esm}/view/error-boundary/default-error-template.js +0 -0
- package/dist/esm/view/error-boundary/index.js +54 -0
- package/dist/esm/view/error-toast/index.js +42 -0
- package/dist/{es → esm}/view/fetch-host-app-data/index.js +0 -0
- package/dist/esm/view/fetch-host-app-data/store.js +28 -0
- package/dist/esm/view/fields/check-box/index.js +52 -0
- package/dist/esm/view/fields/combo-box/index.js +64 -0
- package/dist/esm/view/fields/connect-form.js +24 -0
- package/dist/esm/view/fields/date-input/index.js +53 -0
- package/dist/esm/view/fields/date-picker/index.js +53 -0
- package/dist/esm/view/fields/form-item-layout/index.js +50 -0
- package/dist/esm/view/fields/form-layout-block-item/index.js +57 -0
- package/dist/esm/view/fields/input-mask/index.js +59 -0
- package/dist/esm/view/fields/large-text-box/index.js +53 -0
- package/dist/esm/view/fields/radio/index.js +62 -0
- package/dist/esm/view/fields/radio-group/index.js +52 -0
- package/dist/esm/view/fields/text-box/index.js +53 -0
- package/dist/{es → esm}/view/fields/watch-value.js +0 -0
- package/dist/esm/view/form/index.js +46 -0
- package/dist/{es → esm}/view/form/personal-info-section.js +0 -0
- package/dist/esm/view/form/submit-button/index.js +48 -0
- package/dist/{es → esm}/view/guest-unload-handlers/index.js +0 -0
- package/dist/{es → esm}/view/host-binding-events/index.js +0 -0
- package/dist/{es → esm}/view/intro.stories.mdx +0 -0
- package/dist/{es → esm}/view/live-message/index.js +0 -0
- package/dist/esm/view/loadable/index.js +28 -0
- package/dist/{es → esm}/view/login/index.js +0 -0
- package/dist/{es → esm}/view/message-to-host-app/index.js +0 -0
- package/dist/{es → esm}/view/micro-app/app-factory/index.js +20 -1
- package/dist/{es → esm}/view/micro-app/const.js +0 -0
- package/dist/{es → esm}/view/micro-app/index.js +0 -0
- package/dist/{es → esm}/view/micro-app/resources/manifest.js +0 -0
- package/dist/{es → esm}/view/micro-app/resources/script.js +0 -0
- package/dist/{es → esm}/view/micro-app/resources/style.js +0 -0
- package/dist/{es → esm}/view/micro-app/types.js +0 -0
- package/dist/{es → esm}/view/micro-app/use-app-will-render.js +21 -3
- package/dist/{es → esm}/view/micro-app/utils.js +0 -0
- package/dist/esm/view/micro-iframe-app/app.js +58 -0
- package/dist/{es → esm}/view/micro-iframe-app/iframe/const.js +0 -0
- package/dist/{es → esm}/view/micro-iframe-app/iframe/index.html +0 -0
- package/dist/esm/view/micro-iframe-app/iframe/index.js +54 -0
- package/dist/esm/view/micro-iframe-app/index.js +57 -0
- package/dist/{es → esm}/view/micro-iframe-app/types.js +0 -0
- package/dist/{es → esm}/view/micro-iframe-app/use-frame-loaded.js +0 -0
- package/dist/{es → esm}/view/modals/error/index.js +0 -0
- package/dist/{es → esm}/view/modals/navigation-prompt/index.js +0 -0
- package/dist/{es → esm}/view/modals/session-expiry/customHooks.js +0 -0
- package/dist/{es → esm}/view/modals/session-expiry/index.js +0 -0
- package/dist/esm/view/modals/wait-message/index.js +69 -0
- package/dist/{es → esm}/view/modals/wait-message/use-html-wait-message.js +0 -0
- package/dist/{es → esm}/view/modals/wait-message/wait-message-launcher.js +0 -0
- package/dist/{es → esm}/view/page.js +0 -0
- package/dist/{es → esm}/view/render-with-delay/index.js +0 -0
- package/dist/{es → esm}/view/render-with-host-data/index.js +0 -0
- package/dist/{es → esm}/view/require-auth.js +0 -0
- package/dist/{es → esm}/view/session-timeout/index.js +0 -0
- package/dist/{es → esm}/view/storybook/decorator.js +0 -0
- package/dist/{es → esm}/view/use-previous.js +0 -0
- package/dist/{es → esm}/view/use-window-size-change.js +0 -0
- package/dist/esm/view/visually-hidden/index.js +37 -0
- package/dist/types/communication/http-client/tests/{index.test-disable.d.ts → index.test.d.ts} +0 -0
- package/dist/types/data/store.d.ts +2 -2
- package/dist/types/data/webpack-hmr.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/storybook/preview.d.ts +1 -0
- package/dist/types/utils/testing/render-with-redux.d.ts +3 -3
- package/dist/types/utils/testing/render-with-router-redux.d.ts +3 -3
- package/dist/types/utils/testing/render-with-router.d.ts +1 -1
- package/dist/types/view/fields/input-mask/index.d.ts +1 -1
- package/package.json +41 -42
- package/dist/cjs/communication/http-client/tests/index.test-disable.js +0 -64
- package/dist/es/analytics/appdynamics.js +0 -18
- package/dist/es/analytics/index.js +0 -27
- package/dist/es/analytics/web-analytics.js +0 -14
- package/dist/es/communication/http-client/index.js +0 -35
- package/dist/es/communication/http-client/tests/index.test-disable.js +0 -46
- package/dist/es/data/reducers.js +0 -18
- package/dist/es/package.json +0 -1
- package/dist/es/sideeffect/auth/index.js +0 -47
- package/dist/es/sideeffect/error-toast/index.js +0 -25
- package/dist/es/sideeffect/wait-message/index.js +0 -38
- package/dist/es/utils/storybook/theme.js +0 -13
- package/dist/es/utils/testing/index.js +0 -22
- package/dist/es/utils/testing/render-with-redux.js +0 -17
- package/dist/es/utils/testing/render-with-router-redux.js +0 -23
- package/dist/es/utils/testing/render-with-router.js +0 -19
- package/dist/es/utils/testing/render-with-state-addons.js +0 -38
- package/dist/es/view/app-router.js +0 -19
- package/dist/es/view/error-boundary/index.js +0 -36
- package/dist/es/view/error-toast/index.js +0 -30
- package/dist/es/view/fetch-host-app-data/store.js +0 -12
- package/dist/es/view/fields/check-box/index.js +0 -17
- package/dist/es/view/fields/combo-box/index.js +0 -26
- package/dist/es/view/fields/connect-form.js +0 -10
- package/dist/es/view/fields/date-input/index.js +0 -22
- package/dist/es/view/fields/date-picker/index.js +0 -22
- package/dist/es/view/fields/form-item-layout/index.js +0 -20
- package/dist/es/view/fields/form-layout-block-item/index.js +0 -25
- package/dist/es/view/fields/input-mask/index.js +0 -29
- package/dist/es/view/fields/large-text-box/index.js +0 -22
- package/dist/es/view/fields/radio/index.js +0 -24
- package/dist/es/view/fields/radio-group/index.js +0 -17
- package/dist/es/view/fields/text-box/index.js +0 -22
- package/dist/es/view/form/index.js +0 -33
- package/dist/es/view/form/submit-button/index.js +0 -17
- package/dist/es/view/loadable/index.js +0 -14
- package/dist/es/view/micro-iframe-app/app.js +0 -27
- package/dist/es/view/micro-iframe-app/iframe/index.js +0 -35
- package/dist/es/view/micro-iframe-app/index.js +0 -26
- package/dist/es/view/modals/wait-message/index.js +0 -35
- package/dist/es/view/visually-hidden/index.js +0 -22
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import { combineReducers } from "@reduxjs/toolkit";
|
|
18
|
+
import { waitMessageReducer } from "./wait-message/reducer.js";
|
|
19
|
+
import { errorReducer } from "./error/index.js";
|
|
20
|
+
import { breakpointReducer } from "./breakpoint/index.js";
|
|
21
|
+
import { liveMessageReducer } from "./live-message/index.js";
|
|
22
|
+
const createReducer = (injectedReducers = {}) => {
|
|
23
|
+
const rootReducer = combineReducers(__spreadValues({
|
|
24
|
+
waitMessage: waitMessageReducer,
|
|
25
|
+
error: errorReducer,
|
|
26
|
+
breakpoint: breakpointReducer,
|
|
27
|
+
liveMessage: liveMessageReducer
|
|
28
|
+
}, injectedReducers));
|
|
29
|
+
return rootReducer;
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
createReducer
|
|
33
|
+
};
|
|
File without changes
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
} from "redux-injectors";
|
|
5
5
|
import createSagaMiddleware from "redux-saga";
|
|
6
6
|
import { createReducer } from "./reducers.js";
|
|
7
|
+
import { enableHotReloading } from "./webpack-hmr.js";
|
|
7
8
|
const rootReducer = createReducer();
|
|
8
9
|
let appStore = null;
|
|
9
10
|
const setStore = (store) => {
|
|
@@ -25,6 +26,7 @@ const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {
|
|
|
25
26
|
preloadedState: initialState,
|
|
26
27
|
enhancers
|
|
27
28
|
});
|
|
29
|
+
enableHotReloading(baseStore);
|
|
28
30
|
return baseStore;
|
|
29
31
|
};
|
|
30
32
|
const createAppStore = (initialState = {}, history, middlewareConfig) => {
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { forceReducerReload } from "redux-injectors";
|
|
2
|
+
const enableHotReloading = (baseStore) => {
|
|
3
|
+
let hotModule = null;
|
|
4
|
+
try {
|
|
5
|
+
hotModule = module?.hot;
|
|
6
|
+
} catch (err) {
|
|
7
|
+
hotModule = import.meta?.webpackHot;
|
|
8
|
+
}
|
|
9
|
+
if (hotModule) {
|
|
10
|
+
hotModule.accept("./reducers", () => {
|
|
11
|
+
forceReducerReload(baseStore);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
enableHotReloading
|
|
17
|
+
};
|
package/dist/{es → esm}/index.js
RENAMED
|
@@ -35,7 +35,10 @@ import {
|
|
|
35
35
|
setAppConfigValue,
|
|
36
36
|
setAppConfig
|
|
37
37
|
} from "./utils/app-config/config.js";
|
|
38
|
-
import {
|
|
38
|
+
import {
|
|
39
|
+
getMicroFrontEndAppConfig,
|
|
40
|
+
getLogger
|
|
41
|
+
} from "./utils/micro-frontend/index.js";
|
|
39
42
|
import { loadAppConfig } from "./utils/app-config/index.js";
|
|
40
43
|
import { AppRoot } from "./view/app-root/index.js";
|
|
41
44
|
import { ErrorBoundary } from "./view/error-boundary/index.js";
|
|
@@ -143,6 +146,7 @@ export {
|
|
|
143
146
|
getAuthorizationHeader,
|
|
144
147
|
getHTTPClient,
|
|
145
148
|
getHostAppDataByKey,
|
|
149
|
+
getLogger,
|
|
146
150
|
getMicroFrontEndAppConfig,
|
|
147
151
|
getNavigationLinks,
|
|
148
152
|
getRedirectUrl,
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import {
|
|
21
|
+
call,
|
|
22
|
+
put,
|
|
23
|
+
takeLatest
|
|
24
|
+
} from "redux-saga/effects";
|
|
25
|
+
import {
|
|
26
|
+
LOGIN,
|
|
27
|
+
LOGOUT,
|
|
28
|
+
LOGIN_SUCCESS
|
|
29
|
+
} from "../../data/auth/actions.js";
|
|
30
|
+
import { authorize, endSession } from "../../utils/auth/index.js";
|
|
31
|
+
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
32
|
+
import { logRecords } from "../../utils/log-records.js";
|
|
33
|
+
function* login({
|
|
34
|
+
payload
|
|
35
|
+
}) {
|
|
36
|
+
try {
|
|
37
|
+
yield call(authorize, payload);
|
|
38
|
+
yield put({ type: LOGIN_SUCCESS });
|
|
39
|
+
} catch (err) {
|
|
40
|
+
getLogger().error(__spreadProps(__spreadValues({}, logRecords.LOGIN_FAILED), {
|
|
41
|
+
exception: err
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function* logout({
|
|
46
|
+
payload
|
|
47
|
+
}) {
|
|
48
|
+
try {
|
|
49
|
+
yield call(endSession, payload);
|
|
50
|
+
} catch (err) {
|
|
51
|
+
getLogger().error(__spreadProps(__spreadValues({}, logRecords.LOGOUT_FAILED), {
|
|
52
|
+
exception: err
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function* authentication() {
|
|
57
|
+
yield takeLatest(LOGIN, login);
|
|
58
|
+
yield takeLatest(LOGOUT, logout);
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
authentication,
|
|
62
|
+
login,
|
|
63
|
+
logout
|
|
64
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { call, takeLatest } from "redux-saga/effects";
|
|
21
|
+
import { actions } from "../../data/error/index.js";
|
|
22
|
+
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
23
|
+
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
24
|
+
import { logRecords } from "../../utils/log-records.js";
|
|
25
|
+
function* openErrorToast(action) {
|
|
26
|
+
try {
|
|
27
|
+
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
28
|
+
const host = yield call(microApp.getHost.bind(microApp));
|
|
29
|
+
const message = action?.payload?.description || action?.payload?.messageText;
|
|
30
|
+
if (host && message)
|
|
31
|
+
yield call(host.openErrorBanner.bind(host), message);
|
|
32
|
+
} catch (ex) {
|
|
33
|
+
getLogger().error(__spreadProps(__spreadValues({}, logRecords.ERR_TOAST_OPEN_FAILED), {
|
|
34
|
+
exception: ex
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function* errorToast() {
|
|
39
|
+
yield takeLatest(actions.set.type, openErrorToast);
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
errorToast
|
|
43
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { call, takeLatest } from "redux-saga/effects";
|
|
21
|
+
import { ACTIONS } from "../../data/wait-message/actions.js";
|
|
22
|
+
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
23
|
+
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
24
|
+
import { logRecords } from "../../utils/log-records.js";
|
|
25
|
+
function* openWaitMessage() {
|
|
26
|
+
try {
|
|
27
|
+
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
28
|
+
const host = yield call(microApp.getHost.bind(microApp));
|
|
29
|
+
if (host)
|
|
30
|
+
yield call(host.openWaitMessage.bind(host));
|
|
31
|
+
} catch (ex) {
|
|
32
|
+
getLogger().error(__spreadProps(__spreadValues({}, logRecords.WAIT_MSG_OPEN_FAILED), {
|
|
33
|
+
exception: ex
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function* closeWaitMessage() {
|
|
38
|
+
try {
|
|
39
|
+
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
40
|
+
const host = yield call(microApp.getHost.bind(microApp));
|
|
41
|
+
if (host)
|
|
42
|
+
yield call(host.closeWaitMessage.bind(host));
|
|
43
|
+
} catch (ex) {
|
|
44
|
+
getLogger().error(__spreadProps(__spreadValues({}, logRecords.WAIT_MSG_CLOSE_FAILED), {
|
|
45
|
+
exception: ex
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function* waitMessage() {
|
|
50
|
+
yield takeLatest(ACTIONS.OPEN, openWaitMessage);
|
|
51
|
+
yield takeLatest(ACTIONS.CLOSE, closeWaitMessage);
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
waitMessage
|
|
55
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
import { browserHistory as history } from "../history.js";
|
|
2
21
|
import {
|
|
3
22
|
getToken,
|
|
@@ -69,10 +88,9 @@ const endSession = async ({
|
|
|
69
88
|
logoutUrl.search = searchParams.toString();
|
|
70
89
|
window.location.replace(logoutUrl.href);
|
|
71
90
|
} catch (err) {
|
|
72
|
-
getLogger().error({
|
|
73
|
-
...logRecords.LOGOUT_FAILED,
|
|
91
|
+
getLogger().error(__spreadProps(__spreadValues({}, logRecords.LOGOUT_FAILED), {
|
|
74
92
|
exception: err
|
|
75
|
-
});
|
|
93
|
+
}));
|
|
76
94
|
}
|
|
77
95
|
};
|
|
78
96
|
const authorize = async ({
|
|
@@ -118,10 +136,9 @@ const authorize = async ({
|
|
|
118
136
|
} catch (err) {
|
|
119
137
|
const code = err?.response?.data?.code;
|
|
120
138
|
await endSession({ clientId, redirectUri, code, scope, responseType });
|
|
121
|
-
getLogger().error({
|
|
122
|
-
...logRecords.LOGIN_FAILED,
|
|
139
|
+
getLogger().error(__spreadProps(__spreadValues({}, logRecords.LOGIN_FAILED), {
|
|
123
140
|
exception: err
|
|
124
|
-
});
|
|
141
|
+
}));
|
|
125
142
|
}
|
|
126
143
|
};
|
|
127
144
|
const login = async ({
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,10 +7,9 @@ const initServiceWorker = (swDest = "") => {
|
|
|
7
7
|
navigator.serviceWorker.register(`${swDest.replace(/\/?$/, "/")}sw.js`).then(() => {
|
|
8
8
|
logger.debug("Service Worker registered");
|
|
9
9
|
}).catch((registrationError) => {
|
|
10
|
-
logger.error({
|
|
11
|
-
...logRecords.SERVICE_WORKER_FAILED,
|
|
10
|
+
logger.error(__spreadProps(__spreadValues({}, logRecords.SERVICE_WORKER_FAILED), {
|
|
12
11
|
exception: registrationError
|
|
13
|
-
});
|
|
12
|
+
}));
|
|
14
13
|
});
|
|
15
14
|
});
|
|
16
15
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -5,8 +5,6 @@ import { loadAppConfig } from "../app-config/index.js";
|
|
|
5
5
|
import { createTheme } from "./theme.js";
|
|
6
6
|
import { browserHistory } from "../history.js";
|
|
7
7
|
import "@elliemae/ds-basic/css/dimsum.css";
|
|
8
|
-
loadAppConfig(__webpack_public_path__).catch(() => {
|
|
9
|
-
});
|
|
10
8
|
const theme = getDefaultTheme();
|
|
11
9
|
const store = createAppStore({}, browserHistory);
|
|
12
10
|
const appDecorator = withAppDecorator.bind(null, theme, store);
|
|
@@ -41,7 +39,13 @@ const getParameters = (storyBookTheme) => ({
|
|
|
41
39
|
}
|
|
42
40
|
});
|
|
43
41
|
const decorators = [appDecorator];
|
|
42
|
+
const loaders = [
|
|
43
|
+
async () => {
|
|
44
|
+
await loadAppConfig(__webpack_public_path__ || "./");
|
|
45
|
+
}
|
|
46
|
+
];
|
|
44
47
|
export {
|
|
45
48
|
decorators,
|
|
46
|
-
getParameters
|
|
49
|
+
getParameters,
|
|
50
|
+
loaders
|
|
47
51
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
import { create } from "@storybook/theming/create";
|
|
30
|
+
const createTheme = (_a) => {
|
|
31
|
+
var _b = _a, {
|
|
32
|
+
base = "light",
|
|
33
|
+
brandTitle = "Platform UI Components"
|
|
34
|
+
} = _b, rest = __objRest(_b, [
|
|
35
|
+
"base",
|
|
36
|
+
"brandTitle"
|
|
37
|
+
]);
|
|
38
|
+
return create(__spreadValues({
|
|
39
|
+
base,
|
|
40
|
+
brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION || ""}`
|
|
41
|
+
}, rest));
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
createTheme
|
|
45
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import { render } from "@testing-library/react";
|
|
19
|
+
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
20
|
+
import { createAppStore } from "../../data/store.js";
|
|
21
|
+
import { AppRoot } from "../../view/app-root/index.js";
|
|
22
|
+
import { browserHistory } from "../history.js";
|
|
23
|
+
const defaultStore = createAppStore({}, browserHistory);
|
|
24
|
+
const defaultTheme = getDefaultTheme();
|
|
25
|
+
const AllTheProviders = ({
|
|
26
|
+
store = defaultStore,
|
|
27
|
+
theme = defaultTheme,
|
|
28
|
+
children
|
|
29
|
+
}) => /* @__PURE__ */ React.createElement(AppRoot, {
|
|
30
|
+
store,
|
|
31
|
+
history: browserHistory,
|
|
32
|
+
theme
|
|
33
|
+
}, children);
|
|
34
|
+
const customRender = (ui, options) => render(ui, __spreadValues({ wrapper: AllTheProviders }, options));
|
|
35
|
+
export * from "@testing-library/react";
|
|
36
|
+
export {
|
|
37
|
+
customRender as render
|
|
38
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import { render } from "@testing-library/react";
|
|
22
|
+
import { Provider } from "react-redux";
|
|
23
|
+
import { createAppStore } from "../../data/store.js";
|
|
24
|
+
import { browserHistory } from "../history.js";
|
|
25
|
+
const renderWithRedux = (ui, {
|
|
26
|
+
initialState,
|
|
27
|
+
store = createAppStore(initialState, browserHistory)
|
|
28
|
+
} = {}) => __spreadProps(__spreadValues({}, render(/* @__PURE__ */ React.createElement(Provider, {
|
|
29
|
+
store
|
|
30
|
+
}, ui))), {
|
|
31
|
+
store
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
renderWithRedux
|
|
35
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import { render } from "@testing-library/react";
|
|
22
|
+
import { Provider } from "react-redux";
|
|
23
|
+
import { createMemoryHistory } from "history";
|
|
24
|
+
import { createAppStore } from "../../data/store.js";
|
|
25
|
+
import { browserHistory } from "../history.js";
|
|
26
|
+
import { AppRouter } from "../../view/app-router.js";
|
|
27
|
+
const renderWithRouterRedux = (ui, {
|
|
28
|
+
route = "/",
|
|
29
|
+
history = createMemoryHistory({ initialEntries: [route] }),
|
|
30
|
+
initialState,
|
|
31
|
+
store = createAppStore(initialState, browserHistory)
|
|
32
|
+
} = {}) => __spreadProps(__spreadValues({}, render(/* @__PURE__ */ React.createElement(Provider, {
|
|
33
|
+
store
|
|
34
|
+
}, /* @__PURE__ */ React.createElement(AppRouter, {
|
|
35
|
+
history
|
|
36
|
+
}, ui)))), {
|
|
37
|
+
store
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
renderWithRouterRedux
|
|
41
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import { render } from "@testing-library/react";
|
|
22
|
+
import { createMemoryHistory } from "history";
|
|
23
|
+
import { AppRouter } from "../../view/app-router.js";
|
|
24
|
+
const renderWithRouter = (ui, {
|
|
25
|
+
route = "/",
|
|
26
|
+
history = createMemoryHistory({ initialEntries: [route] })
|
|
27
|
+
} = {}) => {
|
|
28
|
+
const renderResult = render(/* @__PURE__ */ React.createElement(AppRouter, {
|
|
29
|
+
history
|
|
30
|
+
}, ui));
|
|
31
|
+
return __spreadProps(__spreadValues({}, renderResult), {
|
|
32
|
+
history
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
renderWithRouter
|
|
37
|
+
};
|