@elliemae/pui-app-sdk 3.0.0-beta.27 → 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 +15 -1
- 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/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/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 +0 -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/{es → esm}/data/webpack-hmr.js +0 -0
- package/dist/{es → esm}/index.js +0 -0
- 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 +0 -0
- 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/data/store.d.ts +2 -2
- 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 +39 -39
- 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/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
|
@@ -33,12 +33,12 @@ export declare const createAppStore: (initialState: import("redux").CombinedStat
|
|
|
33
33
|
} | import("redux").AnyAction | {
|
|
34
34
|
payload: import("./breakpoint/index.js").Breakpoints;
|
|
35
35
|
type: string;
|
|
36
|
-
}, import("@reduxjs/toolkit").MiddlewareArray<import("redux-saga").SagaMiddleware<object> | import("
|
|
36
|
+
}, import("@reduxjs/toolkit").MiddlewareArray<import("redux-saga").SagaMiddleware<object> | import("redux-thunk").ThunkMiddleware<import("redux").CombinedState<{
|
|
37
37
|
waitMessage: import("./wait-message/reducer.js").WaitMessageState;
|
|
38
38
|
error: import("./error/index.js").ErrorState;
|
|
39
39
|
breakpoint: import("./breakpoint/index.js").BreakpointState;
|
|
40
40
|
liveMessage: import("./live-message/index.js").LiveMessageState;
|
|
41
|
-
}>, import("redux").AnyAction, null> | import("
|
|
41
|
+
}>, import("redux").AnyAction, null> | import("redux-thunk").ThunkMiddleware<import("redux").CombinedState<{
|
|
42
42
|
waitMessage: import("./wait-message/reducer.js").WaitMessageState;
|
|
43
43
|
error: import("./error/index.js").ErrorState;
|
|
44
44
|
breakpoint: import("./breakpoint/index.js").BreakpointState;
|
|
@@ -16,12 +16,12 @@ export declare const renderWithRedux: (ui: React.ReactElement, { initialState, s
|
|
|
16
16
|
} | import("redux").AnyAction | {
|
|
17
17
|
payload: import("../../data/breakpoint/index.js").Breakpoints;
|
|
18
18
|
type: string;
|
|
19
|
-
}, import("@reduxjs/toolkit").MiddlewareArray<import("redux-saga").SagaMiddleware<object> | import("
|
|
19
|
+
}, import("@reduxjs/toolkit").MiddlewareArray<import("redux-saga").SagaMiddleware<object> | import("redux-thunk").ThunkMiddleware<import("redux").CombinedState<{
|
|
20
20
|
waitMessage: import("../../data/wait-message/reducer.js").WaitMessageState;
|
|
21
21
|
error: import("../../data/error/index.js").ErrorState;
|
|
22
22
|
breakpoint: import("../../data/breakpoint/index.js").BreakpointState;
|
|
23
23
|
liveMessage: import("../../data/live-message/index.js").LiveMessageState;
|
|
24
|
-
}>, import("redux").AnyAction, null> | import("
|
|
24
|
+
}>, import("redux").AnyAction, null> | import("redux-thunk").ThunkMiddleware<import("redux").CombinedState<{
|
|
25
25
|
waitMessage: import("../../data/wait-message/reducer.js").WaitMessageState;
|
|
26
26
|
error: import("../../data/error/index.js").ErrorState;
|
|
27
27
|
breakpoint: import("../../data/breakpoint/index.js").BreakpointState;
|
|
@@ -34,7 +34,7 @@ export declare const renderWithRedux: (ui: React.ReactElement, { initialState, s
|
|
|
34
34
|
}>, import("redux").Dispatch<import("redux").AnyAction>>>>;
|
|
35
35
|
container: HTMLElement;
|
|
36
36
|
baseElement: Element;
|
|
37
|
-
debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("
|
|
37
|
+
debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
|
|
38
38
|
rerender: (ui: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => void;
|
|
39
39
|
unmount: () => void;
|
|
40
40
|
asFragment: () => DocumentFragment;
|
|
@@ -19,12 +19,12 @@ export declare const renderWithRouterRedux: (ui: React.ReactElement, { route, hi
|
|
|
19
19
|
} | import("redux").AnyAction | {
|
|
20
20
|
payload: import("../../data/breakpoint/index.js").Breakpoints;
|
|
21
21
|
type: string;
|
|
22
|
-
}, import("@reduxjs/toolkit").MiddlewareArray<import("redux-saga").SagaMiddleware<object> | import("
|
|
22
|
+
}, import("@reduxjs/toolkit").MiddlewareArray<import("redux-saga").SagaMiddleware<object> | import("redux-thunk").ThunkMiddleware<import("redux").CombinedState<{
|
|
23
23
|
waitMessage: import("../../data/wait-message/reducer.js").WaitMessageState;
|
|
24
24
|
error: import("../../data/error/index.js").ErrorState;
|
|
25
25
|
breakpoint: import("../../data/breakpoint/index.js").BreakpointState;
|
|
26
26
|
liveMessage: import("../../data/live-message/index.js").LiveMessageState;
|
|
27
|
-
}>, import("redux").AnyAction, null> | import("
|
|
27
|
+
}>, import("redux").AnyAction, null> | import("redux-thunk").ThunkMiddleware<import("redux").CombinedState<{
|
|
28
28
|
waitMessage: import("../../data/wait-message/reducer.js").WaitMessageState;
|
|
29
29
|
error: import("../../data/error/index.js").ErrorState;
|
|
30
30
|
breakpoint: import("../../data/breakpoint/index.js").BreakpointState;
|
|
@@ -37,7 +37,7 @@ export declare const renderWithRouterRedux: (ui: React.ReactElement, { route, hi
|
|
|
37
37
|
}>, import("redux").Dispatch<import("redux").AnyAction>>>>;
|
|
38
38
|
container: HTMLElement;
|
|
39
39
|
baseElement: Element;
|
|
40
|
-
debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("
|
|
40
|
+
debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
|
|
41
41
|
rerender: (ui: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => void;
|
|
42
42
|
unmount: () => void;
|
|
43
43
|
asFragment: () => DocumentFragment;
|
|
@@ -8,7 +8,7 @@ export declare const renderWithRouter: (ui: React.ReactElement, { route, history
|
|
|
8
8
|
history: History;
|
|
9
9
|
container: HTMLElement;
|
|
10
10
|
baseElement: Element;
|
|
11
|
-
debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("
|
|
11
|
+
debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
|
|
12
12
|
rerender: (ui: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => void;
|
|
13
13
|
unmount: () => void;
|
|
14
14
|
asFragment: () => DocumentFragment;
|
|
@@ -8,5 +8,5 @@ export declare type InputMaskProps<TFieldValues extends FieldValues = FieldValue
|
|
|
8
8
|
mask: <T>(value: T) => T;
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
};
|
|
11
|
-
export declare const InputMask: ({ name, defaultValue, rules,
|
|
11
|
+
export declare const InputMask: ({ name, defaultValue, rules, ...rest }: InputMaskProps) => JSX.Element;
|
|
12
12
|
export { MASK_TYPES, MASK_PIPES };
|
package/package.json
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-app-sdk",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.28",
|
|
4
4
|
"description": "ICE MT UI Platform Application SDK ",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.html"
|
|
8
8
|
],
|
|
9
9
|
"main": "./dist/cjs/index.js",
|
|
10
|
-
"module": "./dist/
|
|
10
|
+
"module": "./dist/esm/index.js",
|
|
11
11
|
"types": "./dist/types/index.d.ts",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/types/index.d.ts",
|
|
15
|
-
"import": "./dist/
|
|
15
|
+
"import": "./dist/esm/index.js",
|
|
16
16
|
"require": "./dist/cjs/index.js"
|
|
17
17
|
},
|
|
18
18
|
"./storybook/*": {
|
|
19
|
-
"import": "./dist/
|
|
19
|
+
"import": "./dist/esm/utils/storybook/*.js",
|
|
20
20
|
"require": "./dist/cjs/utils/storybook/*.js"
|
|
21
21
|
},
|
|
22
22
|
"./auth": {
|
|
23
23
|
"types": "./dist/types/utils/auth/index.d.ts",
|
|
24
|
-
"import": "./dist/
|
|
24
|
+
"import": "./dist/esm/utils/auth/index.js",
|
|
25
25
|
"require": "./dist/cjs/utils/auth/index.js"
|
|
26
26
|
},
|
|
27
27
|
"./app-config": {
|
|
28
28
|
"types": "./dist/types/utils/app-config/index.d.ts",
|
|
29
|
-
"import": "./dist/
|
|
29
|
+
"import": "./dist/esm/utils/app-config/index.js",
|
|
30
30
|
"require": "./dist/cjs/utils/app-config/index.js"
|
|
31
31
|
},
|
|
32
32
|
"./http-client": {
|
|
33
33
|
"types": "./dist/types/communication/http-client/index.d.ts",
|
|
34
|
-
"import": "./dist/
|
|
34
|
+
"import": "./dist/esm/communication/http-client/index.js",
|
|
35
35
|
"require": "./dist/cjs/communication/http-client/index.js"
|
|
36
36
|
},
|
|
37
37
|
"./analytics": {
|
|
38
38
|
"types": "./dist/types/analytics/index.d.ts",
|
|
39
|
-
"import": "./dist/
|
|
39
|
+
"import": "./dist/esm/analytics/index.js",
|
|
40
40
|
"require": "./dist/cjs/analytics/index.js"
|
|
41
41
|
},
|
|
42
42
|
"./data": {
|
|
43
43
|
"types": "./dist/types/data/index.d.ts",
|
|
44
|
-
"import": "./dist/
|
|
44
|
+
"import": "./dist/esm/data/index.js",
|
|
45
45
|
"require": "./dist/cjs/data/index.js"
|
|
46
46
|
},
|
|
47
47
|
"./micro-frontend": {
|
|
48
48
|
"types": "./dist/types/micro-frontend.d.ts",
|
|
49
|
-
"import": "./dist/
|
|
49
|
+
"import": "./dist/esm/micro-frontend.js",
|
|
50
50
|
"require": "./dist/cjs/micro-frontend.js"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"repository": {
|
|
61
61
|
"type": "git",
|
|
62
|
-
"url": "
|
|
62
|
+
"url": "https://git.elliemae.io/platform-ui/pui-app-sdk.git"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"pnpm": ">=6",
|
|
@@ -104,19 +104,19 @@
|
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"@elliemae/app-react-dependencies": "^3.0.0-beta.4",
|
|
107
|
-
"@elliemae/ds-basic": "^
|
|
108
|
-
"@elliemae/ds-button": "^
|
|
109
|
-
"@elliemae/ds-controlled-form": "^
|
|
110
|
-
"@elliemae/ds-date-picker": "^
|
|
111
|
-
"@elliemae/ds-date-range-picker": "^
|
|
112
|
-
"@elliemae/ds-dialog": "^
|
|
113
|
-
"@elliemae/ds-form": "^
|
|
114
|
-
"@elliemae/ds-form-layout-blocks": "^
|
|
115
|
-
"@elliemae/ds-grid": "^
|
|
116
|
-
"@elliemae/ds-loading-indicator": "^
|
|
117
|
-
"@elliemae/ds-modal": "^
|
|
118
|
-
"@elliemae/ds-popperjs": "^
|
|
119
|
-
"@elliemae/ds-toast": "^
|
|
107
|
+
"@elliemae/ds-basic": "^2.2.5",
|
|
108
|
+
"@elliemae/ds-button": "^2.2.5",
|
|
109
|
+
"@elliemae/ds-controlled-form": "^2.2.5",
|
|
110
|
+
"@elliemae/ds-date-picker": "^2.2.5",
|
|
111
|
+
"@elliemae/ds-date-range-picker": "^2.2.5",
|
|
112
|
+
"@elliemae/ds-dialog": "^2.2.5",
|
|
113
|
+
"@elliemae/ds-form": "^2.2.5",
|
|
114
|
+
"@elliemae/ds-form-layout-blocks": "^2.2.5",
|
|
115
|
+
"@elliemae/ds-grid": "^2.2.5",
|
|
116
|
+
"@elliemae/ds-loading-indicator": "^2.2.5",
|
|
117
|
+
"@elliemae/ds-modal": "^2.2.5",
|
|
118
|
+
"@elliemae/ds-popperjs": "^2.2.5",
|
|
119
|
+
"@elliemae/ds-toast": "^2.2.5",
|
|
120
120
|
"@elliemae/em-ssf-guest": "^1.11.1",
|
|
121
121
|
"@elliemae/pui-diagnostics": "^2.7.3",
|
|
122
122
|
"@elliemae/pui-micro-frontend-base": "^1.10.1",
|
|
@@ -125,22 +125,22 @@
|
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
127
|
"@elliemae/app-react-dependencies": "~3.0.0-beta.4",
|
|
128
|
-
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.
|
|
129
|
-
"@elliemae/ds-basic": "
|
|
130
|
-
"@elliemae/ds-button": "
|
|
131
|
-
"@elliemae/ds-controlled-form": "
|
|
132
|
-
"@elliemae/ds-date-picker": "
|
|
133
|
-
"@elliemae/ds-date-range-picker": "
|
|
134
|
-
"@elliemae/ds-dialog": "
|
|
135
|
-
"@elliemae/ds-form": "
|
|
136
|
-
"@elliemae/ds-form-layout-blocks": "
|
|
137
|
-
"@elliemae/ds-grid": "
|
|
138
|
-
"@elliemae/ds-loading-indicator": "
|
|
139
|
-
"@elliemae/ds-modal": "
|
|
140
|
-
"@elliemae/ds-popperjs": "
|
|
141
|
-
"@elliemae/ds-toast": "
|
|
128
|
+
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.3.0",
|
|
129
|
+
"@elliemae/ds-basic": "~2.2.5",
|
|
130
|
+
"@elliemae/ds-button": "~2.2.5",
|
|
131
|
+
"@elliemae/ds-controlled-form": "~2.2.5",
|
|
132
|
+
"@elliemae/ds-date-picker": "~2.2.5",
|
|
133
|
+
"@elliemae/ds-date-range-picker": "~2.2.5",
|
|
134
|
+
"@elliemae/ds-dialog": "~2.2.5",
|
|
135
|
+
"@elliemae/ds-form": "~2.2.5",
|
|
136
|
+
"@elliemae/ds-form-layout-blocks": "~2.2.5",
|
|
137
|
+
"@elliemae/ds-grid": "~2.2.5",
|
|
138
|
+
"@elliemae/ds-loading-indicator": "~2.2.5",
|
|
139
|
+
"@elliemae/ds-modal": "~2.2.5",
|
|
140
|
+
"@elliemae/ds-popperjs": "~2.2.5",
|
|
141
|
+
"@elliemae/ds-toast": "~2.2.5",
|
|
142
142
|
"@elliemae/em-ssf-guest": "~1.11.1",
|
|
143
|
-
"@elliemae/pui-cli": "~6.0.0-beta.
|
|
143
|
+
"@elliemae/pui-cli": "~6.0.0-beta.57",
|
|
144
144
|
"@elliemae/pui-diagnostics": "~2.7.3",
|
|
145
145
|
"@elliemae/pui-e2e-test-sdk": "~6.10.0",
|
|
146
146
|
"@elliemae/pui-micro-frontend-base": "~1.10.1",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as brum from "@elliemae/pui-user-monitoring";
|
|
2
|
-
let userData = {
|
|
3
|
-
envName: "localhost",
|
|
4
|
-
appId: "",
|
|
5
|
-
instanceId: "",
|
|
6
|
-
userId: ""
|
|
7
|
-
};
|
|
8
|
-
const getAppDynamicsUserData = () => userData;
|
|
9
|
-
const setAppDynamicsUserData = (params) => {
|
|
10
|
-
userData = { ...userData, ...params };
|
|
11
|
-
if (brum) {
|
|
12
|
-
brum.setCustomUserData?.(() => ({ userData }));
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
getAppDynamicsUserData,
|
|
17
|
-
setAppDynamicsUserData
|
|
18
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { CMicroAppGuest } from "../utils/micro-frontend/guest.js";
|
|
2
|
-
import { getBAEventParameters } from "./web-analytics.js";
|
|
3
|
-
import { redactPii } from "../utils/redact-pii.js";
|
|
4
|
-
const sendBAEventToSelf = (data) => {
|
|
5
|
-
const redactedData = redactPii(data);
|
|
6
|
-
window.gtmDataLayer = window.gtmDataLayer || [];
|
|
7
|
-
window.gtmDataLayer.push(redactedData);
|
|
8
|
-
};
|
|
9
|
-
const sendBAEvent = ({
|
|
10
|
-
data,
|
|
11
|
-
self = true
|
|
12
|
-
}) => {
|
|
13
|
-
const eventData = { ...getBAEventParameters(), ...data };
|
|
14
|
-
if (!self) {
|
|
15
|
-
const sendEvent = CMicroAppGuest.getInstance()?.getHost()?.sendBAEvent;
|
|
16
|
-
if (sendEvent) {
|
|
17
|
-
sendEvent(eventData);
|
|
18
|
-
} else {
|
|
19
|
-
sendBAEventToSelf(eventData);
|
|
20
|
-
}
|
|
21
|
-
} else {
|
|
22
|
-
sendBAEventToSelf(eventData);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
sendBAEvent
|
|
27
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
let baEventParameters = {
|
|
2
|
-
envName: "localhost",
|
|
3
|
-
appId: "",
|
|
4
|
-
instanceId: "",
|
|
5
|
-
userId: ""
|
|
6
|
-
};
|
|
7
|
-
const getBAEventParameters = () => baEventParameters;
|
|
8
|
-
const updateBAEventParameters = (params) => {
|
|
9
|
-
baEventParameters = { ...baEventParameters, ...params };
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
getBAEventParameters,
|
|
13
|
-
updateBAEventParameters
|
|
14
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
|
-
import { getAppConfigValue } from "../../utils/app-config/config.js";
|
|
3
|
-
import { getAuthorizationHeader } from "../../utils/auth/helper.js";
|
|
4
|
-
import setupRetry from "./retry.js";
|
|
5
|
-
import { requestInterceptor } from "./request-interceptor.js";
|
|
6
|
-
import { handleSuccess, handleFailure } from "./response-interceptor.js";
|
|
7
|
-
const REQUEST_TIMEOUT = 2 * 60 * 1e3;
|
|
8
|
-
const getHTTPClient = ({
|
|
9
|
-
baseURL = getAppConfigValue("serviceEndpoints.api", ""),
|
|
10
|
-
headers = {}
|
|
11
|
-
} = {}) => {
|
|
12
|
-
const client = axios.create({ baseURL, headers });
|
|
13
|
-
if (client?.defaults?.timeout)
|
|
14
|
-
client.defaults.timeout = REQUEST_TIMEOUT;
|
|
15
|
-
setupRetry(client);
|
|
16
|
-
const { request, response } = client?.interceptors || {};
|
|
17
|
-
if (request)
|
|
18
|
-
request.use(requestInterceptor);
|
|
19
|
-
if (response)
|
|
20
|
-
response.use(handleSuccess, handleFailure);
|
|
21
|
-
return client;
|
|
22
|
-
};
|
|
23
|
-
const getAuthHTTPClient = ({
|
|
24
|
-
baseURL,
|
|
25
|
-
headers = {},
|
|
26
|
-
...rest
|
|
27
|
-
} = {}) => getHTTPClient({
|
|
28
|
-
baseURL,
|
|
29
|
-
headers: { ...headers, Authorization: getAuthorizationHeader() },
|
|
30
|
-
...rest
|
|
31
|
-
});
|
|
32
|
-
export {
|
|
33
|
-
getAuthHTTPClient,
|
|
34
|
-
getHTTPClient
|
|
35
|
-
};
|
package/dist/es/data/reducers.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { combineReducers } from "@reduxjs/toolkit";
|
|
2
|
-
import { waitMessageReducer } from "./wait-message/reducer.js";
|
|
3
|
-
import { errorReducer } from "./error/index.js";
|
|
4
|
-
import { breakpointReducer } from "./breakpoint/index.js";
|
|
5
|
-
import { liveMessageReducer } from "./live-message/index.js";
|
|
6
|
-
const createReducer = (injectedReducers = {}) => {
|
|
7
|
-
const rootReducer = combineReducers({
|
|
8
|
-
waitMessage: waitMessageReducer,
|
|
9
|
-
error: errorReducer,
|
|
10
|
-
breakpoint: breakpointReducer,
|
|
11
|
-
liveMessage: liveMessageReducer,
|
|
12
|
-
...injectedReducers
|
|
13
|
-
});
|
|
14
|
-
return rootReducer;
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
createReducer
|
|
18
|
-
};
|
package/dist/es/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"module","sideEffects":["*.css","*.html"]}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
call,
|
|
3
|
-
put,
|
|
4
|
-
takeLatest
|
|
5
|
-
} from "redux-saga/effects";
|
|
6
|
-
import {
|
|
7
|
-
LOGIN,
|
|
8
|
-
LOGOUT,
|
|
9
|
-
LOGIN_SUCCESS
|
|
10
|
-
} from "../../data/auth/actions.js";
|
|
11
|
-
import { authorize, endSession } from "../../utils/auth/index.js";
|
|
12
|
-
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
13
|
-
import { logRecords } from "../../utils/log-records.js";
|
|
14
|
-
function* login({
|
|
15
|
-
payload
|
|
16
|
-
}) {
|
|
17
|
-
try {
|
|
18
|
-
yield call(authorize, payload);
|
|
19
|
-
yield put({ type: LOGIN_SUCCESS });
|
|
20
|
-
} catch (err) {
|
|
21
|
-
getLogger().error({
|
|
22
|
-
...logRecords.LOGIN_FAILED,
|
|
23
|
-
exception: err
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function* logout({
|
|
28
|
-
payload
|
|
29
|
-
}) {
|
|
30
|
-
try {
|
|
31
|
-
yield call(endSession, payload);
|
|
32
|
-
} catch (err) {
|
|
33
|
-
getLogger().error({
|
|
34
|
-
...logRecords.LOGOUT_FAILED,
|
|
35
|
-
exception: err
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function* authentication() {
|
|
40
|
-
yield takeLatest(LOGIN, login);
|
|
41
|
-
yield takeLatest(LOGOUT, logout);
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
authentication,
|
|
45
|
-
login,
|
|
46
|
-
logout
|
|
47
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { call, takeLatest } from "redux-saga/effects";
|
|
2
|
-
import { actions } from "../../data/error/index.js";
|
|
3
|
-
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
4
|
-
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
5
|
-
import { logRecords } from "../../utils/log-records.js";
|
|
6
|
-
function* openErrorToast(action) {
|
|
7
|
-
try {
|
|
8
|
-
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
9
|
-
const host = yield call(microApp.getHost.bind(microApp));
|
|
10
|
-
const message = action?.payload?.description || action?.payload?.messageText;
|
|
11
|
-
if (host && message)
|
|
12
|
-
yield call(host.openErrorBanner.bind(host), message);
|
|
13
|
-
} catch (ex) {
|
|
14
|
-
getLogger().error({
|
|
15
|
-
...logRecords.ERR_TOAST_OPEN_FAILED,
|
|
16
|
-
exception: ex
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function* errorToast() {
|
|
21
|
-
yield takeLatest(actions.set.type, openErrorToast);
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
errorToast
|
|
25
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { call, takeLatest } from "redux-saga/effects";
|
|
2
|
-
import { ACTIONS } from "../../data/wait-message/actions.js";
|
|
3
|
-
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
4
|
-
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
5
|
-
import { logRecords } from "../../utils/log-records.js";
|
|
6
|
-
function* openWaitMessage() {
|
|
7
|
-
try {
|
|
8
|
-
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
9
|
-
const host = yield call(microApp.getHost.bind(microApp));
|
|
10
|
-
if (host)
|
|
11
|
-
yield call(host.openWaitMessage.bind(host));
|
|
12
|
-
} catch (ex) {
|
|
13
|
-
getLogger().error({
|
|
14
|
-
...logRecords.WAIT_MSG_OPEN_FAILED,
|
|
15
|
-
exception: ex
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
function* closeWaitMessage() {
|
|
20
|
-
try {
|
|
21
|
-
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
22
|
-
const host = yield call(microApp.getHost.bind(microApp));
|
|
23
|
-
if (host)
|
|
24
|
-
yield call(host.closeWaitMessage.bind(host));
|
|
25
|
-
} catch (ex) {
|
|
26
|
-
getLogger().error({
|
|
27
|
-
...logRecords.WAIT_MSG_CLOSE_FAILED,
|
|
28
|
-
exception: ex
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function* waitMessage() {
|
|
33
|
-
yield takeLatest(ACTIONS.OPEN, openWaitMessage);
|
|
34
|
-
yield takeLatest(ACTIONS.CLOSE, closeWaitMessage);
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
waitMessage
|
|
38
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { create } from "@storybook/theming/create";
|
|
2
|
-
const createTheme = ({
|
|
3
|
-
base = "light",
|
|
4
|
-
brandTitle = "Platform UI Components",
|
|
5
|
-
...rest
|
|
6
|
-
}) => create({
|
|
7
|
-
base,
|
|
8
|
-
brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION || ""}`,
|
|
9
|
-
...rest
|
|
10
|
-
});
|
|
11
|
-
export {
|
|
12
|
-
createTheme
|
|
13
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { render } from "@testing-library/react";
|
|
3
|
-
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
4
|
-
import { createAppStore } from "../../data/store.js";
|
|
5
|
-
import { AppRoot } from "../../view/app-root/index.js";
|
|
6
|
-
import { browserHistory } from "../history.js";
|
|
7
|
-
const defaultStore = createAppStore({}, browserHistory);
|
|
8
|
-
const defaultTheme = getDefaultTheme();
|
|
9
|
-
const AllTheProviders = ({
|
|
10
|
-
store = defaultStore,
|
|
11
|
-
theme = defaultTheme,
|
|
12
|
-
children
|
|
13
|
-
}) => /* @__PURE__ */ React.createElement(AppRoot, {
|
|
14
|
-
store,
|
|
15
|
-
history: browserHistory,
|
|
16
|
-
theme
|
|
17
|
-
}, children);
|
|
18
|
-
const customRender = (ui, options) => render(ui, { wrapper: AllTheProviders, ...options });
|
|
19
|
-
export * from "@testing-library/react";
|
|
20
|
-
export {
|
|
21
|
-
customRender as render
|
|
22
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { render } from "@testing-library/react";
|
|
3
|
-
import { Provider } from "react-redux";
|
|
4
|
-
import { createAppStore } from "../../data/store.js";
|
|
5
|
-
import { browserHistory } from "../history.js";
|
|
6
|
-
const renderWithRedux = (ui, {
|
|
7
|
-
initialState,
|
|
8
|
-
store = createAppStore(initialState, browserHistory)
|
|
9
|
-
} = {}) => ({
|
|
10
|
-
...render(/* @__PURE__ */ React.createElement(Provider, {
|
|
11
|
-
store
|
|
12
|
-
}, ui)),
|
|
13
|
-
store
|
|
14
|
-
});
|
|
15
|
-
export {
|
|
16
|
-
renderWithRedux
|
|
17
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { render } from "@testing-library/react";
|
|
3
|
-
import { Provider } from "react-redux";
|
|
4
|
-
import { createMemoryHistory } from "history";
|
|
5
|
-
import { createAppStore } from "../../data/store.js";
|
|
6
|
-
import { browserHistory } from "../history.js";
|
|
7
|
-
import { AppRouter } from "../../view/app-router.js";
|
|
8
|
-
const renderWithRouterRedux = (ui, {
|
|
9
|
-
route = "/",
|
|
10
|
-
history = createMemoryHistory({ initialEntries: [route] }),
|
|
11
|
-
initialState,
|
|
12
|
-
store = createAppStore(initialState, browserHistory)
|
|
13
|
-
} = {}) => ({
|
|
14
|
-
...render(/* @__PURE__ */ React.createElement(Provider, {
|
|
15
|
-
store
|
|
16
|
-
}, /* @__PURE__ */ React.createElement(AppRouter, {
|
|
17
|
-
history
|
|
18
|
-
}, ui))),
|
|
19
|
-
store
|
|
20
|
-
});
|
|
21
|
-
export {
|
|
22
|
-
renderWithRouterRedux
|
|
23
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { render } from "@testing-library/react";
|
|
3
|
-
import { createMemoryHistory } from "history";
|
|
4
|
-
import { AppRouter } from "../../view/app-router.js";
|
|
5
|
-
const renderWithRouter = (ui, {
|
|
6
|
-
route = "/",
|
|
7
|
-
history = createMemoryHistory({ initialEntries: [route] })
|
|
8
|
-
} = {}) => {
|
|
9
|
-
const renderResult = render(/* @__PURE__ */ React.createElement(AppRouter, {
|
|
10
|
-
history
|
|
11
|
-
}, ui));
|
|
12
|
-
return {
|
|
13
|
-
...renderResult,
|
|
14
|
-
history
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
renderWithRouter
|
|
19
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
5
|
-
import {
|
|
6
|
-
useInjectReducer,
|
|
7
|
-
useInjectSaga
|
|
8
|
-
} from "redux-injectors";
|
|
9
|
-
const RenderWithStateAddOns = ({
|
|
10
|
-
Component,
|
|
11
|
-
reducer,
|
|
12
|
-
saga,
|
|
13
|
-
theme = getDefaultTheme(),
|
|
14
|
-
...rest
|
|
15
|
-
}) => {
|
|
16
|
-
const [ready, setReady] = useState(false);
|
|
17
|
-
if (Array.isArray(reducer)) {
|
|
18
|
-
reducer.forEach((r) => useInjectReducer(r));
|
|
19
|
-
} else {
|
|
20
|
-
useInjectReducer(reducer);
|
|
21
|
-
}
|
|
22
|
-
if (Array.isArray(saga)) {
|
|
23
|
-
saga.forEach((s) => useInjectSaga(s));
|
|
24
|
-
} else if (saga) {
|
|
25
|
-
useInjectSaga(saga);
|
|
26
|
-
}
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
setReady(true);
|
|
29
|
-
}, []);
|
|
30
|
-
return ready ? /* @__PURE__ */ React.createElement(ThemeProvider, {
|
|
31
|
-
theme
|
|
32
|
-
}, /* @__PURE__ */ React.createElement(Component, {
|
|
33
|
-
...rest
|
|
34
|
-
})) : null;
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
RenderWithStateAddOns
|
|
38
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useState, useLayoutEffect } from "react";
|
|
3
|
-
import { Router } from "react-router-dom";
|
|
4
|
-
const AppRouter = ({ history, ...props }) => {
|
|
5
|
-
const [state, setState] = useState({
|
|
6
|
-
action: history.action,
|
|
7
|
-
location: history.location
|
|
8
|
-
});
|
|
9
|
-
useLayoutEffect(() => history.listen(setState), [history]);
|
|
10
|
-
return /* @__PURE__ */ React.createElement(Router, {
|
|
11
|
-
...props,
|
|
12
|
-
location: state.location,
|
|
13
|
-
navigationType: state.action,
|
|
14
|
-
navigator: history
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
AppRouter
|
|
19
|
-
};
|