@elliemae/pui-app-sdk 3.0.0-beta.12 → 3.0.0-beta.16
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/communication/http-client/retry-axios.js +1 -1
- package/dist/cjs/index.js +4 -6
- package/dist/cjs/utils/app-config/config.js +1 -1
- package/dist/cjs/utils/helpers.js +1 -1
- package/dist/cjs/utils/testing/render-with-router-redux.js +2 -2
- package/dist/cjs/utils/testing/render-with-router.js +9 -6
- package/dist/cjs/view/app-root/index.js +2 -2
- package/dist/cjs/view/{header/nav-region/user/index.js → app-router.js} +19 -9
- package/dist/cjs/view/login/index.js +1 -7
- package/dist/cjs/view/media-breakpoint/index.js +1 -7
- package/dist/cjs/view/micro-app/app-factory/index.js +1 -1
- package/dist/cjs/view/micro-app/resources/script.js +1 -1
- package/dist/cjs/view/modals/wait-message/html-wait-message.js +1 -7
- package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +1 -7
- package/dist/cjs/{route/page-view.js → view/page.js} +10 -3
- package/dist/cjs/view/render-with-delay/index.js +1 -1
- package/dist/cjs/{route/private-route/index.js → view/require-auth.js} +23 -36
- package/dist/cjs/view/window-size/index.js +1 -7
- package/dist/es/communication/http-client/retry-axios.js +1 -1
- package/dist/es/index.js +4 -6
- package/dist/es/utils/app-config/config.js +1 -1
- package/dist/es/utils/helpers.js +1 -1
- package/dist/es/utils/testing/render-with-router-redux.js +2 -2
- package/dist/es/utils/testing/render-with-router.js +9 -6
- package/dist/es/view/app-root/index.js +2 -2
- package/dist/es/view/app-router.js +19 -0
- package/dist/es/view/login/index.js +1 -2
- package/dist/es/view/media-breakpoint/index.js +1 -2
- package/dist/es/view/micro-app/app-factory/index.js +1 -1
- package/dist/es/view/micro-app/resources/script.js +1 -1
- package/dist/es/view/modals/wait-message/html-wait-message.js +1 -2
- package/dist/es/view/modals/wait-message/wait-message-launcher.js +1 -2
- package/dist/es/{route/page-view.js → view/page.js} +7 -0
- package/dist/es/view/render-with-delay/index.js +1 -1
- package/dist/es/view/require-auth.js +33 -0
- package/dist/es/view/window-size/index.js +1 -2
- package/dist/types/data/react-redux.d.ts +2 -2
- package/dist/types/data/store.d.ts +2 -2
- package/dist/types/index.d.ts +2 -3
- package/dist/types/utils/app-config/config.d.ts +1 -1
- package/dist/types/utils/history.d.ts +2 -2
- package/dist/types/utils/micro-frontend/guest.d.ts +2 -2
- package/dist/types/utils/micro-frontend/host.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 +2 -2
- package/dist/types/view/app-router.d.ts +9 -0
- package/dist/types/view/page.d.ts +8 -0
- package/dist/types/view/require-auth.d.ts +8 -0
- package/package.json +24 -26
- package/dist/cjs/route/index.js +0 -55
- package/dist/cjs/view/header/center-region/index.js +0 -71
- package/dist/cjs/view/header/index.js +0 -50
- package/dist/cjs/view/header/logo-region/index.js +0 -39
- package/dist/cjs/view/header/logo-region/logo.svg +0 -2
- package/dist/cjs/view/header/nav-region/index.js +0 -53
- package/dist/cjs/view/header/nav-region/notification/index.js +0 -38
- package/dist/cjs/view/header/nav-region/notification/index.svg +0 -5
- package/dist/cjs/view/header/nav-region/user/index.svg +0 -4
- package/dist/es/route/index.js +0 -26
- package/dist/es/route/private-route/index.js +0 -46
- package/dist/es/view/header/center-region/index.js +0 -42
- package/dist/es/view/header/index.js +0 -21
- package/dist/es/view/header/logo-region/index.js +0 -10
- package/dist/es/view/header/logo-region/logo.svg +0 -2
- package/dist/es/view/header/nav-region/index.js +0 -24
- package/dist/es/view/header/nav-region/notification/index.js +0 -9
- package/dist/es/view/header/nav-region/notification/index.svg +0 -5
- package/dist/es/view/header/nav-region/user/index.js +0 -9
- package/dist/es/view/header/nav-region/user/index.svg +0 -4
- package/dist/types/route/index.d.ts +0 -8
- package/dist/types/route/page-view.d.ts +0 -1
- package/dist/types/route/private-route/index.d.ts +0 -8
- package/dist/types/view/header/center-region/index.d.ts +0 -9
- package/dist/types/view/header/index.d.ts +0 -7
- package/dist/types/view/header/index.stories.d.ts +0 -5
- package/dist/types/view/header/logo-region/index.d.ts +0 -2
- package/dist/types/view/header/nav-region/index.d.ts +0 -2
- package/dist/types/view/header/nav-region/notification/index.d.ts +0 -2
- package/dist/types/view/header/nav-region/user/index.d.ts +0 -2
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { useEffect } from "react";
|
|
3
2
|
import { useAppDispatch } from "../../data/react-redux.js";
|
|
4
3
|
import { login } from "../../utils/auth/index.js";
|
|
@@ -15,7 +14,7 @@ const Login = ({
|
|
|
15
14
|
}).catch(() => {
|
|
16
15
|
});
|
|
17
16
|
}, [dispatch, clientId, scope, responseType]);
|
|
18
|
-
return
|
|
17
|
+
return null;
|
|
19
18
|
};
|
|
20
19
|
export {
|
|
21
20
|
Login
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { useEffect, useContext } from "react";
|
|
3
2
|
import { ThemeContext } from "styled-components";
|
|
4
3
|
import { publish } from "pubsub-js";
|
|
@@ -18,7 +17,7 @@ const MediaBreakpoint = () => {
|
|
|
18
17
|
dispatch({ type: breakpoint.change, payload: currentBreakpoint });
|
|
19
18
|
publish(HOST_WINDOW_BREAKPOINT_CHANGED, currentBreakpoint);
|
|
20
19
|
}, [currentBreakpoint, dispatch]);
|
|
21
|
-
return
|
|
20
|
+
return null;
|
|
22
21
|
};
|
|
23
22
|
export {
|
|
24
23
|
MediaBreakpoint
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getAppManifest,
|
|
21
21
|
getFullFileNameofAssetsFromManifest
|
|
22
22
|
} from "../resources/manifest.js";
|
|
23
|
-
const cssType =
|
|
23
|
+
const cssType = /\.css$/;
|
|
24
24
|
const isCss = (fileName) => cssType.test(fileName);
|
|
25
25
|
const activeApps = {};
|
|
26
26
|
const initApplication = async ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { removeDoubleSlash } from "../../../utils/url.js";
|
|
2
2
|
const APP_SCRIPT_ID_PREFIX = "emui-script-";
|
|
3
|
-
const HEAD_SCRIPTS =
|
|
3
|
+
const HEAD_SCRIPTS = /(?:emuiDiagnostics|global|global-prod|emuiUserMonitoring)(?:..*)?.js/;
|
|
4
4
|
const isHeadScript = (scriptSrc) => HEAD_SCRIPTS.test(scriptSrc);
|
|
5
5
|
const addScriptToDOM = ({ name, hostUrl, documentEle }, fileName, index) => new Promise((resolve, reject) => {
|
|
6
6
|
const ele = documentEle.createElement("script");
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { memo, useEffect } from "react";
|
|
3
2
|
const HTMLWaitMessage = memo(({ close }) => {
|
|
4
3
|
useEffect(() => {
|
|
@@ -6,7 +5,7 @@ const HTMLWaitMessage = memo(({ close }) => {
|
|
|
6
5
|
if (htmlWaitMsgElement && close)
|
|
7
6
|
htmlWaitMsgElement.remove();
|
|
8
7
|
}, [close]);
|
|
9
|
-
return
|
|
8
|
+
return null;
|
|
10
9
|
});
|
|
11
10
|
export {
|
|
12
11
|
HTMLWaitMessage
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { useEffect } from "react";
|
|
3
2
|
import { useAppDispatch } from "../../../data/react-redux.js";
|
|
4
3
|
import { waitMessage } from "../../../data/wait-message/actions.js";
|
|
@@ -10,7 +9,7 @@ const WaitMessageLauncher = () => {
|
|
|
10
9
|
dispatch(waitMessage.close());
|
|
11
10
|
};
|
|
12
11
|
}, [dispatch]);
|
|
13
|
-
return
|
|
12
|
+
return null;
|
|
14
13
|
};
|
|
15
14
|
export {
|
|
16
15
|
WaitMessageLauncher
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Helmet } from "react-helmet";
|
|
1
3
|
import * as brum from "@elliemae/pui-user-monitoring";
|
|
2
4
|
import { pageViewEvent } from "../analytics/page-view-event.js";
|
|
3
5
|
const onPageView = (pageTitle) => {
|
|
@@ -10,6 +12,11 @@ const onPageView = (pageTitle) => {
|
|
|
10
12
|
}
|
|
11
13
|
pageViewEvent({ pageTitle });
|
|
12
14
|
};
|
|
15
|
+
const Page = ({ pageTitle = "ICE", children }) => {
|
|
16
|
+
onPageView(pageTitle);
|
|
17
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Helmet, null, /* @__PURE__ */ React.createElement("title", null, pageTitle)), children);
|
|
18
|
+
};
|
|
13
19
|
export {
|
|
20
|
+
Page,
|
|
14
21
|
onPageView
|
|
15
22
|
};
|
|
@@ -8,7 +8,7 @@ const RenderWithDelay = memo(({ render }) => {
|
|
|
8
8
|
clearTimeout(timeoutId);
|
|
9
9
|
};
|
|
10
10
|
}, []);
|
|
11
|
-
return
|
|
11
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, show ? render() : "");
|
|
12
12
|
});
|
|
13
13
|
export {
|
|
14
14
|
RenderWithDelay
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useInjectReducer, useInjectSaga } from "redux-injectors";
|
|
3
|
+
import enums from "../utils/constants.js";
|
|
4
|
+
import { RenderWithDelay } from "./render-with-delay/index.js";
|
|
5
|
+
import { authReducer } from "../data/auth/reducer.js";
|
|
6
|
+
import { authentication } from "../sideeffect/auth/index.js";
|
|
7
|
+
import { Login } from "./login/index.js";
|
|
8
|
+
import { isUserAuthorized } from "../utils/auth/index.js";
|
|
9
|
+
const key = "auth";
|
|
10
|
+
const RequireAuth = ({
|
|
11
|
+
children,
|
|
12
|
+
clientId = enums.CLIENT_ID,
|
|
13
|
+
scope = "loc",
|
|
14
|
+
responseType = "code"
|
|
15
|
+
}) => {
|
|
16
|
+
useInjectReducer({ key, reducer: authReducer });
|
|
17
|
+
useInjectSaga({ key, saga: authentication });
|
|
18
|
+
const userAuthorized = isUserAuthorized();
|
|
19
|
+
if (userAuthorized) {
|
|
20
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
21
|
+
}
|
|
22
|
+
const renderLogin = () => /* @__PURE__ */ React.createElement(Login, {
|
|
23
|
+
clientId,
|
|
24
|
+
scope,
|
|
25
|
+
responseType
|
|
26
|
+
});
|
|
27
|
+
return /* @__PURE__ */ React.createElement(RenderWithDelay, {
|
|
28
|
+
render: renderLogin
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
RequireAuth
|
|
33
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { useEffect } from "react";
|
|
3
2
|
import { publish } from "pubsub-js";
|
|
4
3
|
import { HOST_WINDOW_RESIZED } from "../../utils/constants.js";
|
|
@@ -16,7 +15,7 @@ const WindowSize = () => {
|
|
|
16
15
|
return () => {
|
|
17
16
|
};
|
|
18
17
|
}, []);
|
|
19
|
-
return
|
|
18
|
+
return null;
|
|
20
19
|
};
|
|
21
20
|
export {
|
|
22
21
|
WindowSize
|
|
@@ -6,12 +6,12 @@ export declare const useAppDispatch: () => import("redux").Dispatch<{
|
|
|
6
6
|
} | import("redux").AnyAction | {
|
|
7
7
|
payload: import("./breakpoint/index.js").Breakpoints;
|
|
8
8
|
type: string;
|
|
9
|
-
}> & import("
|
|
9
|
+
}> & import("..").ThunkDispatch<import("redux").CombinedState<{
|
|
10
10
|
waitMessage: import("./wait-message/reducer.js").WaitMessageState;
|
|
11
11
|
error: import("./error/index.js").ErrorState;
|
|
12
12
|
breakpoint: import("./breakpoint/index.js").BreakpointState;
|
|
13
13
|
liveMessage: import("./live-message/index.js").LiveMessageState;
|
|
14
|
-
}>, null, import("redux").AnyAction> & import("
|
|
14
|
+
}>, null, import("redux").AnyAction> & import("..").ThunkDispatch<import("redux").CombinedState<{
|
|
15
15
|
waitMessage: import("./wait-message/reducer.js").WaitMessageState;
|
|
16
16
|
error: import("./error/index.js").ErrorState;
|
|
17
17
|
breakpoint: import("./breakpoint/index.js").BreakpointState;
|
|
@@ -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("..").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("..").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;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { isUserAuthorized, login, authorize } from './utils/auth/index.js';
|
|
2
|
-
export { PrivateRoute } from './route/private-route/index.js';
|
|
3
|
-
export { AppRoute as Route } from './route/index.js';
|
|
4
2
|
export { getHTTPClient, getAuthHTTPClient, } from './communication/http-client/index.js';
|
|
5
3
|
export { onAuthorizationFailure } from './communication/http-client/response-interceptor.js';
|
|
6
4
|
export { auth } from './data/auth/actions.js';
|
|
5
|
+
export { RequireAuth } from './view/require-auth.js';
|
|
6
|
+
export { Page } from './view/page.js';
|
|
7
7
|
export { default as globalConstants } from './utils/constants.js';
|
|
8
8
|
export { useAppDispatch, useAppSelector } from './data/react-redux.js';
|
|
9
9
|
export { useInjectReducer, useInjectSaga } from 'redux-injectors';
|
|
@@ -43,7 +43,6 @@ export { getApiActionCreator, getSelectField } from './api/helpers.js';
|
|
|
43
43
|
export { getUser as fetchUserSettings } from './api/users/index.js';
|
|
44
44
|
export { useMediaBreakpoints } from './view/useMediaBreakpoints/index.js';
|
|
45
45
|
export { withAppDecorator } from './view/storybook/decorator.js';
|
|
46
|
-
export { Header } from './view/header/index.js';
|
|
47
46
|
export { ErrorToast } from './view/error-toast/index.js';
|
|
48
47
|
export { Form } from './view/form/index.js';
|
|
49
48
|
export { ConnectForm } from './view/fields/connect-form.js';
|
|
@@ -21,6 +21,6 @@ export interface AppConfig {
|
|
|
21
21
|
}
|
|
22
22
|
export declare const setAppConfig: (config: AppConfig) => void;
|
|
23
23
|
export declare const getAppConfigValue: <Type>(key?: string, defaultValue?: unknown) => Type;
|
|
24
|
-
export declare const setAppConfigValue: <Type>(key: string
|
|
24
|
+
export declare const setAppConfigValue: <Type>(key: string, value: Type) => AppConfig;
|
|
25
25
|
export declare const hasItem: (key?: string) => boolean;
|
|
26
26
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const browserHistory: import("history").
|
|
2
|
-
export declare const memoryHistory: import("history").MemoryHistory
|
|
1
|
+
export declare const browserHistory: import("history").BrowserHistory;
|
|
2
|
+
export declare const memoryHistory: import("history").MemoryHistory;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefaultTheme } from 'styled-components';
|
|
2
|
-
import { History,
|
|
2
|
+
import { History, To } from 'history';
|
|
3
3
|
import type { IMicroAppGuest, IMicroAppHost, InitOptions, MountOptions } from '@elliemae/pui-micro-frontend-base';
|
|
4
4
|
import { MicroFrontEndLogger } from './console-logger.js';
|
|
5
5
|
import { JSONValue } from '../types.js';
|
|
@@ -42,6 +42,6 @@ export declare class CMicroAppGuest implements IMicroAppGuest {
|
|
|
42
42
|
mount(this: CMicroAppGuest, options?: MountOptions): Promise<void>;
|
|
43
43
|
unmount(this: CMicroAppGuest, options: MountOptions): Promise<JSONValue>;
|
|
44
44
|
getRef<T>(this: CMicroAppGuest): T | null;
|
|
45
|
-
navigate(this: CMicroAppGuest, url:
|
|
45
|
+
navigate(this: CMicroAppGuest, url: To, state?: any): void;
|
|
46
46
|
}
|
|
47
47
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IMicroAppHost, ResizeEventHandler, BreakpointChangeEventHandler, SubscriptionListener, BAEvent } from '@elliemae/pui-micro-frontend-base';
|
|
2
|
-
import { History,
|
|
2
|
+
import { History, To } from 'history';
|
|
3
3
|
import { DefaultTheme } from 'styled-components';
|
|
4
4
|
import { MicroFrontEndLogger } from './console-logger.js';
|
|
5
5
|
declare type HostOptions = {
|
|
@@ -33,7 +33,7 @@ export declare class CMicroAppHost implements IMicroAppHost {
|
|
|
33
33
|
publish<Type>(message: string | symbol, data?: Type): boolean;
|
|
34
34
|
subscribe<T>(message: string | symbol, func: SubscriptionListener<T>): string;
|
|
35
35
|
unsubscribe(token: string): void;
|
|
36
|
-
navigate(this: CMicroAppHost, url:
|
|
36
|
+
navigate(this: CMicroAppHost, url: To, state?: any): void;
|
|
37
37
|
openWaitMessage(): void;
|
|
38
38
|
closeWaitMessage(): void;
|
|
39
39
|
openErrorBanner(message: string): void;
|
|
@@ -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("../..").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("../..").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("../..").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("../..").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("../..").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("../..").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;
|
|
@@ -5,10 +5,10 @@ interface Args {
|
|
|
5
5
|
history: History;
|
|
6
6
|
}
|
|
7
7
|
export declare const renderWithRouter: (ui: React.ReactElement, { route, history, }?: Args) => {
|
|
8
|
-
history: History
|
|
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("../..").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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { History } from 'history';
|
|
3
|
+
interface AppRouterProps {
|
|
4
|
+
history: History;
|
|
5
|
+
basename?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const AppRouter: ({ history, ...props }: AppRouterProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const onPageView: (pageTitle: string) => void;
|
|
3
|
+
interface PageProps {
|
|
4
|
+
pageTitle: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const Page: ({ pageTitle, children }: PageProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface RequireAuthProps {
|
|
3
|
+
clientId?: string;
|
|
4
|
+
scope?: string;
|
|
5
|
+
responseType?: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const RequireAuth: ({ children, clientId, scope, responseType, }: RequireAuthProps) => JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-app-sdk",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.16",
|
|
4
4
|
"description": "ICE MT UI Platform Application SDK ",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"storybook:docs:build": "pui-cli storybook -b --docs",
|
|
83
83
|
"storybook:build": "pui-cli storybook -b",
|
|
84
84
|
"storybook:prod": "http-server -g -b -p 11000 demo",
|
|
85
|
-
"setup": "rimraf -r node_modules && rimraf
|
|
85
|
+
"setup": "rimraf -r node_modules && rimraf pnpm-lock.yaml && pnpm i",
|
|
86
86
|
"test": "pui-cli test -p",
|
|
87
87
|
"test:fix": "pui-cli test -f",
|
|
88
88
|
"test:watch": "pui-cli test -w",
|
|
@@ -97,40 +97,38 @@
|
|
|
97
97
|
"indent": 4
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@elliemae/app-react-dependencies": "^
|
|
101
|
-
"@elliemae/ds-basic": "^2.3.0-alpha.
|
|
102
|
-
"@elliemae/ds-button": "^2.3.0-alpha.
|
|
103
|
-
"@elliemae/ds-
|
|
104
|
-
"@elliemae/ds-
|
|
105
|
-
"@elliemae/ds-
|
|
106
|
-
"@elliemae/ds-modal": "^2.3.0-alpha.
|
|
107
|
-
"@elliemae/ds-popperjs": "^2.3.0-alpha.
|
|
108
|
-
"@elliemae/ds-toast": "^2.3.0-alpha.
|
|
100
|
+
"@elliemae/app-react-dependencies": "^3.0.0-beta.2",
|
|
101
|
+
"@elliemae/ds-basic": "^2.3.0-alpha.2",
|
|
102
|
+
"@elliemae/ds-button": "^2.3.0-alpha.2",
|
|
103
|
+
"@elliemae/ds-date-picker": "^2.3.0-alpha.2",
|
|
104
|
+
"@elliemae/ds-form": "^2.3.0-alpha.2",
|
|
105
|
+
"@elliemae/ds-loading-indicator": "^2.3.0-alpha.2",
|
|
106
|
+
"@elliemae/ds-modal": "^2.3.0-alpha.2",
|
|
107
|
+
"@elliemae/ds-popperjs": "^2.3.0-alpha.2",
|
|
108
|
+
"@elliemae/ds-toast": "^2.3.0-alpha.2",
|
|
109
109
|
"@elliemae/em-ssf-guest": "^1.11.1",
|
|
110
110
|
"@elliemae/pui-diagnostics": "^2.7.3",
|
|
111
|
-
"@elliemae/pui-micro-frontend-base": "^1.10.
|
|
111
|
+
"@elliemae/pui-micro-frontend-base": "^1.10.1",
|
|
112
112
|
"@elliemae/pui-theme": "^2.3.0",
|
|
113
113
|
"@elliemae/pui-user-monitoring": "^1.12.2"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
|
-
"@elliemae/app-react-dependencies": "~
|
|
116
|
+
"@elliemae/app-react-dependencies": "~3.0.0-beta.2",
|
|
117
117
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.2.1",
|
|
118
|
-
"@elliemae/ds-basic": "~2.3.0-alpha.
|
|
119
|
-
"@elliemae/ds-button": "~2.3.0-alpha.
|
|
120
|
-
"@elliemae/ds-
|
|
121
|
-
"@elliemae/ds-
|
|
122
|
-
"@elliemae/ds-
|
|
123
|
-
"@elliemae/ds-modal": "~2.3.0-alpha.
|
|
124
|
-
"@elliemae/ds-popperjs": "~2.3.0-alpha.
|
|
125
|
-
"@elliemae/ds-toast": "~2.3.0-alpha.
|
|
118
|
+
"@elliemae/ds-basic": "~2.3.0-alpha.2",
|
|
119
|
+
"@elliemae/ds-button": "~2.3.0-alpha.2",
|
|
120
|
+
"@elliemae/ds-date-picker": "~2.3.0-alpha.2",
|
|
121
|
+
"@elliemae/ds-form": "~2.3.0-alpha.2",
|
|
122
|
+
"@elliemae/ds-loading-indicator": "~2.3.0-alpha.2",
|
|
123
|
+
"@elliemae/ds-modal": "~2.3.0-alpha.2",
|
|
124
|
+
"@elliemae/ds-popperjs": "~2.3.0-alpha.2",
|
|
125
|
+
"@elliemae/ds-toast": "~2.3.0-alpha.2",
|
|
126
126
|
"@elliemae/em-ssf-guest": "~1.11.1",
|
|
127
|
-
"@elliemae/pui-cli": "~6.0.0-beta.
|
|
127
|
+
"@elliemae/pui-cli": "~6.0.0-beta.34",
|
|
128
128
|
"@elliemae/pui-diagnostics": "~2.7.3",
|
|
129
129
|
"@elliemae/pui-e2e-test-sdk": "~6.9.0",
|
|
130
|
-
"@elliemae/pui-micro-frontend-base": "~1.10.
|
|
130
|
+
"@elliemae/pui-micro-frontend-base": "~1.10.1",
|
|
131
131
|
"@elliemae/pui-theme": "~2.3.0",
|
|
132
|
-
"@elliemae/pui-user-monitoring": "~1.12.2"
|
|
133
|
-
"react-router": "~5.2.1",
|
|
134
|
-
"react-router-dom": "~5.3.0"
|
|
132
|
+
"@elliemae/pui-user-monitoring": "~1.12.2"
|
|
135
133
|
}
|
|
136
134
|
}
|
package/dist/cjs/route/index.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var route_exports = {};
|
|
29
|
-
__export(route_exports, {
|
|
30
|
-
AppRoute: () => AppRoute
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react_helmet = require("react-helmet");
|
|
34
|
-
var import_react = require("react");
|
|
35
|
-
var import_react_router_dom = require("react-router-dom");
|
|
36
|
-
var import_page_view = require("./page-view.js");
|
|
37
|
-
const AppRoute = ({
|
|
38
|
-
component: Component,
|
|
39
|
-
render,
|
|
40
|
-
children,
|
|
41
|
-
pageTitle = "ICE",
|
|
42
|
-
...rest
|
|
43
|
-
}) => {
|
|
44
|
-
const memoizedRender = (0, import_react.useCallback)((routeProps) => render && typeof render === "function" ? render(routeProps) : Component && /* @__PURE__ */ React.createElement(Component, {
|
|
45
|
-
...routeProps
|
|
46
|
-
}), [Component, render]);
|
|
47
|
-
return /* @__PURE__ */ React.createElement(import_react_router_dom.Route, {
|
|
48
|
-
...rest,
|
|
49
|
-
render: (routeProps) => {
|
|
50
|
-
(0, import_page_view.onPageView)(pageTitle);
|
|
51
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_react_helmet.Helmet, null, /* @__PURE__ */ React.createElement("title", null, pageTitle)), children || memoizedRender(routeProps));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
module.exports = __toCommonJS(route_exports);
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var center_region_exports = {};
|
|
29
|
-
__export(center_region_exports, {
|
|
30
|
-
CenterRegion: () => CenterRegion
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react_router_dom = require("react-router-dom");
|
|
34
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
35
|
-
const NavList = import_styled_components.default.ul`
|
|
36
|
-
display: flex;
|
|
37
|
-
flex: auto;
|
|
38
|
-
align-items: center;
|
|
39
|
-
list-style: none;
|
|
40
|
-
margin: 0px 0px 0px 10px;
|
|
41
|
-
padding: 0;
|
|
42
|
-
height: 100%;
|
|
43
|
-
`;
|
|
44
|
-
const NavListItem = import_styled_components.default.li`
|
|
45
|
-
height: 100%;
|
|
46
|
-
text-align: center;
|
|
47
|
-
`;
|
|
48
|
-
const activeClassName = "nav-item-active";
|
|
49
|
-
const StyledNavLink = (0, import_styled_components.default)(import_react_router_dom.NavLink).attrs({
|
|
50
|
-
activeClassName
|
|
51
|
-
})`
|
|
52
|
-
display: flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
color: ${(props) => props.theme.colors.neutral["000"]};
|
|
55
|
-
text-decoration: none;
|
|
56
|
-
text-transform: uppercase;
|
|
57
|
-
height: 100%;
|
|
58
|
-
padding: 0 ${(props) => props.theme.space.xs} 0
|
|
59
|
-
${(props) => props.theme.space.xs};
|
|
60
|
-
|
|
61
|
-
&.${activeClassName} {
|
|
62
|
-
background-color: #48acff;
|
|
63
|
-
}
|
|
64
|
-
`;
|
|
65
|
-
const publicPath = (process.env.ASSET_PATH || "/").replace(/\/?$/, "");
|
|
66
|
-
const CenterRegion = ({ links = [] }) => /* @__PURE__ */ React.createElement(NavList, null, links.map(({ name = "", path = "" }) => /* @__PURE__ */ React.createElement(NavListItem, {
|
|
67
|
-
key: path
|
|
68
|
-
}, /* @__PURE__ */ React.createElement(StyledNavLink, {
|
|
69
|
-
to: `${publicPath}${path.replace(/^\/?/, "/")}`
|
|
70
|
-
}, name))));
|
|
71
|
-
module.exports = __toCommonJS(center_region_exports);
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var header_exports = {};
|
|
29
|
-
__export(header_exports, {
|
|
30
|
-
Header: () => Header
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
34
|
-
var import_micro_frontend = require("../../utils/micro-frontend/index.js");
|
|
35
|
-
var import_logo_region = require("./logo-region/index.js");
|
|
36
|
-
var import_center_region = require("./center-region/index.js");
|
|
37
|
-
var import_nav_region = require("./nav-region/index.js");
|
|
38
|
-
const HeaderContainer = import_styled_components.default.header`
|
|
39
|
-
display: flex;
|
|
40
|
-
height: 56px;
|
|
41
|
-
background-color: #2080cd;
|
|
42
|
-
padding: 0px ${(props) => props.theme.space.xs} 0px
|
|
43
|
-
${(props) => props.theme.space.xxs};
|
|
44
|
-
`;
|
|
45
|
-
const Header = ({ links = [], show = false }) => (0, import_micro_frontend.isStandAloneGuest)() || (0, import_micro_frontend.isHost)() || show ? /* @__PURE__ */ React.createElement(HeaderContainer, {
|
|
46
|
-
role: "banner"
|
|
47
|
-
}, /* @__PURE__ */ React.createElement(import_logo_region.LogoRegion, null), /* @__PURE__ */ React.createElement(import_center_region.CenterRegion, {
|
|
48
|
-
links
|
|
49
|
-
}), /* @__PURE__ */ React.createElement(import_nav_region.NavRegion, null)) : null;
|
|
50
|
-
module.exports = __toCommonJS(header_exports);
|