@elliemae/pui-app-sdk 3.13.0 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/analytics/appdynamics.js +4 -1
- package/dist/cjs/api/auth/index.js +8 -2
- package/dist/cjs/api/helpers.js +7 -1
- package/dist/cjs/api/users/index.js +3 -1
- package/dist/cjs/communication/http-client/index.js +4 -1
- package/dist/cjs/communication/http-client/response-interceptor.js +4 -1
- package/dist/cjs/communication/http-client/retry-axios.js +4 -1
- package/dist/cjs/data/auth/reducer.js +14 -8
- package/dist/cjs/data/breakpoint/index.js +4 -1
- package/dist/cjs/data/store.js +10 -2
- package/dist/cjs/data/wait-message/reducer.js +4 -1
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/sideeffect/error-toast/index.js +3 -1
- package/dist/cjs/sideeffect/wait-message/index.js +6 -2
- package/dist/cjs/utils/app-config/config.js +4 -1
- package/dist/cjs/utils/app-config/index.js +9 -2
- package/dist/cjs/utils/auth/helper.js +4 -1
- package/dist/cjs/utils/auth/index.js +3 -1
- package/dist/cjs/utils/micro-frontend/guest.js +7 -2
- package/dist/cjs/utils/micro-frontend/host.js +8 -2
- package/dist/cjs/utils/micro-frontend/index.js +27 -10
- package/dist/cjs/utils/micro-frontend/ssfguest-adapter.js +9 -2
- package/dist/cjs/utils/redact-pii.js +8 -2
- package/dist/cjs/utils/session.js +14 -4
- package/dist/cjs/utils/testing/index.js +5 -7
- package/dist/cjs/utils/testing/render-with-redux.js +5 -7
- package/dist/cjs/utils/testing/render-with-router-redux.js +10 -9
- package/dist/cjs/utils/testing/render-with-router.js +5 -7
- package/dist/cjs/utils/testing/render-with-state-addons.js +7 -9
- package/dist/cjs/utils/web-storage.js +4 -1
- package/dist/cjs/utils/window.js +8 -2
- package/dist/cjs/view/app-root/hosted-app.js +13 -3
- package/dist/cjs/view/app-root/index.js +21 -19
- package/dist/cjs/view/app-root/stand-alone-app.js +17 -3
- package/dist/cjs/view/app-router.js +2 -5
- package/dist/cjs/view/breakpoint/use-breakpoint.js +9 -5
- package/dist/cjs/view/breakpoint/use-media-query-list.js +3 -1
- package/dist/cjs/view/error-boundary/default-error-template.js +11 -5
- package/dist/cjs/view/error-boundary/index.js +6 -2
- package/dist/cjs/view/error-toast/index.js +2 -5
- package/dist/cjs/view/fetch-host-app-data/index.js +4 -1
- package/dist/cjs/view/fields/autocomplete/index.js +47 -0
- package/dist/cjs/view/fields/check-box/index.js +3 -6
- package/dist/cjs/view/fields/combo-box/index.js +3 -6
- package/dist/cjs/view/fields/combo-box-v3/index.js +42 -0
- package/dist/cjs/view/fields/date-input/index.js +3 -6
- package/dist/cjs/view/fields/date-picker/index.js +7 -4
- package/dist/cjs/view/fields/date-range-picker/index.js +10 -9
- package/dist/cjs/view/fields/date-time-picker/index.js +3 -6
- package/dist/cjs/view/fields/form-item-layout/index.js +15 -16
- package/dist/cjs/view/fields/form-layout-block-item/index.js +16 -17
- package/dist/cjs/view/fields/input-mask/index.js +3 -6
- package/dist/cjs/view/fields/input-text/index.js +3 -6
- package/dist/cjs/view/fields/large-text-box/index.js +3 -6
- package/dist/cjs/view/fields/radio/index.js +3 -6
- package/dist/cjs/view/fields/radio-group/index.js +3 -6
- package/dist/cjs/view/fields/text-box/index.js +3 -6
- package/dist/cjs/view/fields/toggle/index.js +3 -6
- package/dist/cjs/view/fields/watch-value.js +25 -3
- package/dist/cjs/view/form/index.js +13 -8
- package/dist/cjs/view/form/personal-info-section.js +54 -47
- package/dist/cjs/view/form/submit-button/index.js +2 -5
- package/dist/cjs/view/live-message/index.js +2 -5
- package/dist/cjs/view/loadable/index.js +8 -10
- package/dist/cjs/view/login/index.js +4 -5
- package/dist/cjs/view/micro-app/app-factory/index.js +9 -3
- package/dist/cjs/view/micro-app/index.js +6 -3
- package/dist/cjs/view/micro-app/resources/manifest.js +10 -3
- package/dist/cjs/view/micro-app/use-app-will-render.js +37 -28
- package/dist/cjs/view/micro-iframe-app/app.js +23 -18
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +22 -15
- package/dist/cjs/view/micro-iframe-app/index.js +2 -5
- package/dist/cjs/view/modals/error/index.js +21 -12
- package/dist/cjs/view/modals/navigation-prompt/index.js +46 -27
- package/dist/cjs/view/modals/session-expiry/customHooks.js +6 -2
- package/dist/cjs/view/modals/session-expiry/index.js +57 -35
- package/dist/cjs/view/modals/wait-message/index.js +26 -27
- package/dist/cjs/view/page.js +15 -3
- package/dist/cjs/view/render-with-delay/index.js +4 -5
- package/dist/cjs/view/render-with-host-data/index.js +2 -5
- package/dist/cjs/view/require-auth.js +12 -6
- package/dist/cjs/view/session-timeout/index.js +15 -14
- package/dist/cjs/view/storybook/decorator.js +5 -7
- package/dist/cjs/view/visually-hidden/index.js +11 -6
- package/dist/esm/analytics/appdynamics.js +0 -1
- package/dist/esm/analytics/index.js +0 -1
- package/dist/esm/analytics/page-view-event.js +0 -1
- package/dist/esm/analytics/user-session-event.js +0 -1
- package/dist/esm/analytics/user-wait-event.js +0 -1
- package/dist/esm/analytics/web-analytics.js +0 -1
- package/dist/esm/api/auth/index.js +8 -3
- package/dist/esm/api/helpers.js +7 -2
- package/dist/esm/api/users/index.js +3 -2
- package/dist/esm/communication/http-client/index.js +0 -1
- package/dist/esm/communication/http-client/request-interceptor.js +0 -1
- package/dist/esm/communication/http-client/response-interceptor.js +0 -1
- package/dist/esm/communication/http-client/retry-axios.js +0 -1
- package/dist/esm/communication/http-client/retry.js +0 -1
- package/dist/esm/data/auth/actions.js +0 -1
- package/dist/esm/data/auth/reducer.js +10 -8
- package/dist/esm/data/breakpoint/index.js +0 -1
- package/dist/esm/data/error/index.js +0 -1
- package/dist/esm/data/index.js +0 -1
- package/dist/esm/data/live-message/index.js +0 -1
- package/dist/esm/data/logout/actions.js +0 -1
- package/dist/esm/data/navigation-prompt/actions.js +0 -1
- package/dist/esm/data/react-redux.js +0 -1
- package/dist/esm/data/reducers.js +0 -1
- package/dist/esm/data/saga.js +0 -1
- package/dist/esm/data/store.js +6 -2
- package/dist/esm/data/wait-message/actions.js +0 -1
- package/dist/esm/data/wait-message/reducer.js +0 -1
- package/dist/esm/data/webpack-hmr.js +0 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/micro-frontend.js +0 -1
- package/dist/esm/sideeffect/auth/index.js +0 -1
- package/dist/esm/sideeffect/error-toast/index.js +3 -2
- package/dist/esm/sideeffect/wait-message/index.js +6 -3
- package/dist/esm/utils/app-config/config.js +0 -1
- package/dist/esm/utils/app-config/index.js +5 -2
- package/dist/esm/utils/app-host-integration/react.js +0 -1
- package/dist/esm/utils/auth/helper.js +0 -1
- package/dist/esm/utils/auth/index.js +3 -2
- package/dist/esm/utils/await.js +0 -1
- package/dist/esm/utils/constants.js +0 -1
- package/dist/esm/utils/font-size.js +0 -1
- package/dist/esm/utils/guest-with-service.js +0 -1
- package/dist/esm/utils/helpers.js +0 -1
- package/dist/esm/utils/history.js +0 -1
- package/dist/esm/utils/log-records.js +0 -1
- package/dist/esm/utils/micro-frontend/console-logger.js +0 -1
- package/dist/esm/utils/micro-frontend/guest.js +3 -2
- package/dist/esm/utils/micro-frontend/host.js +8 -3
- package/dist/esm/utils/micro-frontend/index.js +23 -10
- package/dist/esm/utils/micro-frontend/ssfguest-adapter.js +5 -2
- package/dist/esm/utils/micro-frontend/types.js +0 -1
- package/dist/esm/utils/redact-pii.js +8 -3
- package/dist/esm/utils/service-worker.js +0 -1
- package/dist/esm/utils/session.js +14 -5
- package/dist/esm/utils/storybook/manager.js +0 -1
- package/dist/esm/utils/storybook/preview.js +0 -1
- package/dist/esm/utils/storybook/theme.js +0 -1
- package/dist/esm/utils/testing/index.js +5 -5
- package/dist/esm/utils/testing/render-with-redux.js +5 -5
- package/dist/esm/utils/testing/render-with-router-redux.js +10 -7
- package/dist/esm/utils/testing/render-with-router.js +5 -5
- package/dist/esm/utils/testing/render-with-state-addons.js +7 -7
- package/dist/esm/utils/types.js +0 -1
- package/dist/esm/utils/url.js +0 -1
- package/dist/esm/utils/web-storage.js +0 -1
- package/dist/esm/utils/window.js +8 -3
- package/dist/esm/view/app-root/hosted-app.js +9 -3
- package/dist/esm/view/app-root/index.js +21 -17
- package/dist/esm/view/app-root/stand-alone-app.js +13 -3
- package/dist/esm/view/app-root/style.js +0 -1
- package/dist/esm/view/app-router.js +2 -3
- package/dist/esm/view/breakpoint/use-breakpoint.js +9 -6
- package/dist/esm/view/breakpoint/use-media-query-list.js +3 -2
- package/dist/esm/view/error-boundary/default-error-template.js +11 -3
- package/dist/esm/view/error-boundary/index.js +2 -2
- package/dist/esm/view/error-toast/index.js +2 -3
- package/dist/esm/view/fetch-host-app-data/index.js +0 -1
- package/dist/esm/view/fetch-host-app-data/store.js +0 -1
- package/dist/esm/view/fields/autocomplete/index.js +27 -0
- package/dist/esm/view/fields/check-box/index.js +3 -4
- package/dist/esm/view/fields/combo-box/index.js +3 -4
- package/dist/esm/view/fields/combo-box-v3/index.js +24 -0
- package/dist/esm/view/fields/connect-form.js +0 -1
- package/dist/esm/view/fields/date-input/index.js +3 -4
- package/dist/esm/view/fields/date-picker/index.js +3 -4
- package/dist/esm/view/fields/date-range-picker/index.js +10 -7
- package/dist/esm/view/fields/date-time-picker/index.js +3 -4
- package/dist/esm/view/fields/form-item-layout/index.js +15 -14
- package/dist/esm/view/fields/form-layout-block-item/index.js +16 -15
- package/dist/esm/view/fields/input-mask/index.js +3 -4
- package/dist/esm/view/fields/input-text/index.js +3 -4
- package/dist/esm/view/fields/large-text-box/index.js +3 -4
- package/dist/esm/view/fields/radio/index.js +3 -4
- package/dist/esm/view/fields/radio-group/index.js +3 -4
- package/dist/esm/view/fields/text-box/index.js +3 -4
- package/dist/esm/view/fields/toggle/index.js +3 -4
- package/dist/esm/view/fields/watch-value.js +21 -3
- package/dist/esm/view/form/index.js +9 -8
- package/dist/esm/view/form/personal-info-section.js +50 -47
- package/dist/esm/view/form/submit-button/index.js +2 -3
- package/dist/esm/view/guest-unload-handlers/index.js +0 -1
- package/dist/esm/view/host-binding-events/index.js +0 -1
- package/dist/esm/view/live-message/index.js +2 -3
- package/dist/esm/view/loadable/index.js +8 -8
- package/dist/esm/view/login/index.js +4 -3
- package/dist/esm/view/message-to-host-app/index.js +0 -1
- package/dist/esm/view/micro-app/app-factory/index.js +9 -4
- package/dist/esm/view/micro-app/const.js +0 -1
- package/dist/esm/view/micro-app/index.js +2 -3
- package/dist/esm/view/micro-app/resources/manifest.js +10 -4
- package/dist/esm/view/micro-app/resources/script.js +0 -1
- package/dist/esm/view/micro-app/resources/style.js +0 -1
- package/dist/esm/view/micro-app/types.js +0 -1
- package/dist/esm/view/micro-app/use-app-will-render.js +37 -29
- package/dist/esm/view/micro-app/utils.js +0 -1
- package/dist/esm/view/micro-iframe-app/app.js +19 -18
- package/dist/esm/view/micro-iframe-app/iframe/const.js +0 -1
- package/dist/esm/view/micro-iframe-app/iframe/index.js +18 -15
- package/dist/esm/view/micro-iframe-app/index.js +2 -3
- package/dist/esm/view/micro-iframe-app/types.js +0 -1
- package/dist/esm/view/micro-iframe-app/use-frame-loaded.js +0 -1
- package/dist/esm/view/modals/error/index.js +21 -10
- package/dist/esm/view/modals/navigation-prompt/index.js +46 -25
- package/dist/esm/view/modals/session-expiry/customHooks.js +6 -3
- package/dist/esm/view/modals/session-expiry/index.js +57 -33
- package/dist/esm/view/modals/wait-message/index.js +26 -25
- package/dist/esm/view/modals/wait-message/use-html-wait-message.js +0 -1
- package/dist/esm/view/modals/wait-message/wait-message-launcher.js +0 -1
- package/dist/esm/view/page.js +11 -3
- package/dist/esm/view/render-with-delay/index.js +4 -3
- package/dist/esm/view/render-with-host-data/index.js +2 -3
- package/dist/esm/view/require-auth.js +8 -6
- package/dist/esm/view/session-timeout/index.js +15 -12
- package/dist/esm/view/storybook/decorator.js +5 -5
- package/dist/esm/view/use-previous.js +0 -1
- package/dist/esm/view/use-window-size-change.js +0 -1
- package/dist/esm/view/visually-hidden/index.js +7 -6
- package/dist/types/lib/index.d.ts +2 -0
- package/dist/types/lib/view/fields/autocomplete/index.d.ts +13 -0
- package/dist/types/lib/view/fields/autocomplete/index.stories.d.ts +5 -0
- package/dist/types/lib/view/fields/combo-box-v3/index.d.ts +9 -0
- package/dist/types/lib/view/fields/combo-box-v3/index.stories.d.ts +5 -0
- package/package.json +34 -34
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { render } from "@testing-library/react";
|
|
4
3
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
5
4
|
import { createAppStore } from "../../data/store.js";
|
|
@@ -11,11 +10,12 @@ const AllTheProviders = ({
|
|
|
11
10
|
store = defaultStore,
|
|
12
11
|
theme = defaultTheme,
|
|
13
12
|
children
|
|
14
|
-
}) => /* @__PURE__ */
|
|
13
|
+
}) => /* @__PURE__ */ jsx(AppRoot, {
|
|
15
14
|
store,
|
|
16
15
|
history: browserHistory,
|
|
17
|
-
theme
|
|
18
|
-
|
|
16
|
+
theme,
|
|
17
|
+
children
|
|
18
|
+
});
|
|
19
19
|
const customRender = (ui, options) => render(ui, { wrapper: AllTheProviders, ...options });
|
|
20
20
|
export * from "@testing-library/react";
|
|
21
21
|
export {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { render } from "@testing-library/react";
|
|
4
3
|
import { Provider } from "react-redux";
|
|
5
4
|
import { createAppStore } from "../../data/store.js";
|
|
@@ -8,9 +7,10 @@ const renderWithRedux = (ui, {
|
|
|
8
7
|
initialState,
|
|
9
8
|
store = createAppStore(initialState, browserHistory)
|
|
10
9
|
} = {}) => ({
|
|
11
|
-
...render(/* @__PURE__ */
|
|
12
|
-
store
|
|
13
|
-
|
|
10
|
+
...render(/* @__PURE__ */ jsx(Provider, {
|
|
11
|
+
store,
|
|
12
|
+
children: ui
|
|
13
|
+
})),
|
|
14
14
|
store
|
|
15
15
|
});
|
|
16
16
|
export {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { render } from "@testing-library/react";
|
|
4
3
|
import { Provider } from "react-redux";
|
|
5
4
|
import { createMemoryHistory } from "history";
|
|
@@ -12,11 +11,15 @@ const renderWithRouterRedux = (ui, {
|
|
|
12
11
|
initialState,
|
|
13
12
|
store = createAppStore(initialState, browserHistory)
|
|
14
13
|
} = {}) => ({
|
|
15
|
-
...render(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
...render(
|
|
15
|
+
/* @__PURE__ */ jsx(Provider, {
|
|
16
|
+
store,
|
|
17
|
+
children: /* @__PURE__ */ jsx(AppRouter, {
|
|
18
|
+
history,
|
|
19
|
+
children: ui
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
),
|
|
20
23
|
store
|
|
21
24
|
});
|
|
22
25
|
export {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { render } from "@testing-library/react";
|
|
4
3
|
import { createMemoryHistory } from "history";
|
|
5
4
|
import { AppRouter } from "../../view/app-router.js";
|
|
@@ -7,9 +6,10 @@ const renderWithRouter = (ui, {
|
|
|
7
6
|
route = "/",
|
|
8
7
|
history = createMemoryHistory({ initialEntries: [route] })
|
|
9
8
|
} = {}) => {
|
|
10
|
-
const renderResult = render(/* @__PURE__ */
|
|
11
|
-
history
|
|
12
|
-
|
|
9
|
+
const renderResult = render(/* @__PURE__ */ jsx(AppRouter, {
|
|
10
|
+
history,
|
|
11
|
+
children: ui
|
|
12
|
+
}));
|
|
13
13
|
return {
|
|
14
14
|
...renderResult,
|
|
15
15
|
history
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useEffect, useState } from "react";
|
|
4
3
|
import { ThemeProvider } from "styled-components";
|
|
5
4
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
@@ -28,11 +27,12 @@ const RenderWithStateAddOns = ({
|
|
|
28
27
|
useEffect(() => {
|
|
29
28
|
setReady(true);
|
|
30
29
|
}, []);
|
|
31
|
-
return ready ? /* @__PURE__ */
|
|
32
|
-
theme
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
return ready ? /* @__PURE__ */ jsx(ThemeProvider, {
|
|
31
|
+
theme,
|
|
32
|
+
children: /* @__PURE__ */ jsx(Component, {
|
|
33
|
+
...rest
|
|
34
|
+
})
|
|
35
|
+
}) : null;
|
|
36
36
|
};
|
|
37
37
|
export {
|
|
38
38
|
RenderWithStateAddOns
|
package/dist/esm/utils/types.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/esm/utils/url.js
CHANGED
package/dist/esm/utils/window.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
3
2
|
const getWindow = () => {
|
|
4
3
|
try {
|
|
@@ -9,8 +8,14 @@ const getWindow = () => {
|
|
|
9
8
|
}
|
|
10
9
|
};
|
|
11
10
|
const getViewportSize = () => ({
|
|
12
|
-
width: Math.max(
|
|
13
|
-
|
|
11
|
+
width: Math.max(
|
|
12
|
+
document.documentElement.clientWidth || 0,
|
|
13
|
+
window.innerWidth || 0
|
|
14
|
+
),
|
|
15
|
+
height: Math.max(
|
|
16
|
+
document.documentElement.clientHeight || 0,
|
|
17
|
+
window.innerHeight || 0
|
|
18
|
+
)
|
|
14
19
|
});
|
|
15
20
|
const convertBreakpointToNumber = (breakpoint) => Number(breakpoint.replace("px", ""));
|
|
16
21
|
const getCurrentBreakpoint = () => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import styled from "styled-components";
|
|
4
3
|
import { ErrorToast } from "../error-toast/index.js";
|
|
5
4
|
import { WaitMessage as DefaultWaitMessage } from "../modals/wait-message/index.js";
|
|
@@ -14,7 +13,14 @@ const HostedApp = ({ WaitMessage, children }) => {
|
|
|
14
13
|
useBreakpoint();
|
|
15
14
|
useHTMLWaitMessage(true);
|
|
16
15
|
useWindowSizeChange();
|
|
17
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsxs(Div, {
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsx(GlobalStyle, {}),
|
|
19
|
+
WaitMessage || /* @__PURE__ */ jsx(DefaultWaitMessage, {}),
|
|
20
|
+
/* @__PURE__ */ jsx(ErrorToast, {}),
|
|
21
|
+
children
|
|
22
|
+
]
|
|
23
|
+
});
|
|
18
24
|
};
|
|
19
25
|
export {
|
|
20
26
|
HostedApp
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { Provider } from "react-redux";
|
|
4
3
|
import { ThemeProvider } from "styled-components";
|
|
5
4
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
@@ -10,9 +9,9 @@ import { StandAloneApp } from "./stand-alone-app.js";
|
|
|
10
9
|
import { HostedApp } from "./hosted-app.js";
|
|
11
10
|
const AppToRender = (props) => {
|
|
12
11
|
const isParent = isStandAloneGuest() || isHost();
|
|
13
|
-
return isParent ? /* @__PURE__ */
|
|
12
|
+
return isParent ? /* @__PURE__ */ jsx(StandAloneApp, {
|
|
14
13
|
...props
|
|
15
|
-
}) : /* @__PURE__ */
|
|
14
|
+
}) : /* @__PURE__ */ jsx(HostedApp, {
|
|
16
15
|
...props
|
|
17
16
|
});
|
|
18
17
|
};
|
|
@@ -25,19 +24,24 @@ const AppRoot = ({
|
|
|
25
24
|
WaitMessage,
|
|
26
25
|
errorTemplate,
|
|
27
26
|
children
|
|
28
|
-
}) => /* @__PURE__ */
|
|
29
|
-
errorTemplate
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
}) => /* @__PURE__ */ jsx(ErrorBoundary, {
|
|
28
|
+
errorTemplate,
|
|
29
|
+
children: /* @__PURE__ */ jsx(Provider, {
|
|
30
|
+
store,
|
|
31
|
+
children: /* @__PURE__ */ jsx(AppRouter, {
|
|
32
|
+
history,
|
|
33
|
+
basename,
|
|
34
|
+
children: /* @__PURE__ */ jsx(ThemeProvider, {
|
|
35
|
+
theme,
|
|
36
|
+
children: /* @__PURE__ */ jsx(AppToRender, {
|
|
37
|
+
manageSession,
|
|
38
|
+
WaitMessage,
|
|
39
|
+
children
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
});
|
|
41
45
|
export {
|
|
42
46
|
AppRoot
|
|
43
47
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import styled from "styled-components";
|
|
4
3
|
import { LiveAnnouncer } from "react-aria-live";
|
|
5
4
|
import { useBreakpoint } from "../breakpoint/use-breakpoint.js";
|
|
@@ -19,7 +18,18 @@ const StandAloneApp = ({
|
|
|
19
18
|
}) => {
|
|
20
19
|
useBreakpoint();
|
|
21
20
|
useWindowSizeChange();
|
|
22
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ jsx(LiveAnnouncer, {
|
|
22
|
+
children: /* @__PURE__ */ jsxs(Div, {
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsx(GlobalStyle, {}),
|
|
25
|
+
manageSession && /* @__PURE__ */ jsx(SessionTimeout, {}),
|
|
26
|
+
/* @__PURE__ */ jsx(LiveMessage, {}),
|
|
27
|
+
WaitMessage || /* @__PURE__ */ jsx(DefaultWaitMessage, {}),
|
|
28
|
+
/* @__PURE__ */ jsx(ErrorToast, {}),
|
|
29
|
+
children
|
|
30
|
+
]
|
|
31
|
+
})
|
|
32
|
+
});
|
|
23
33
|
};
|
|
24
34
|
export {
|
|
25
35
|
StandAloneApp
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useState, useLayoutEffect } from "react";
|
|
4
3
|
import { Router } from "react-router-dom";
|
|
5
4
|
const AppRouter = ({ history, basename, ...props }) => {
|
|
@@ -22,7 +21,7 @@ const AppRouter = ({ history, basename, ...props }) => {
|
|
|
22
21
|
unlisten();
|
|
23
22
|
};
|
|
24
23
|
}, [history]);
|
|
25
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ jsx(Router, {
|
|
26
25
|
...props,
|
|
27
26
|
basename,
|
|
28
27
|
location: state.location,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { useEffect, useContext } from "react";
|
|
3
2
|
import { ThemeContext } from "styled-components";
|
|
4
3
|
import { publish } from "pubsub-js";
|
|
@@ -8,11 +7,15 @@ import { useMediaQueryList } from "./use-media-query-list.js";
|
|
|
8
7
|
import { HOST_WINDOW_BREAKPOINT_CHANGED } from "../../utils/constants.js";
|
|
9
8
|
const useBreakpoint = () => {
|
|
10
9
|
const theme = useContext(ThemeContext);
|
|
11
|
-
const currentBreakpoint = useMediaQueryList(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
const currentBreakpoint = useMediaQueryList(
|
|
11
|
+
[
|
|
12
|
+
`(max-width: ${theme.breakpoints.small})`,
|
|
13
|
+
`(max-width: ${theme.breakpoints.medium})`,
|
|
14
|
+
`(max-width: ${theme.breakpoints.large})`
|
|
15
|
+
],
|
|
16
|
+
["small", "medium", "large"],
|
|
17
|
+
"large"
|
|
18
|
+
);
|
|
16
19
|
const dispatch = useAppDispatch();
|
|
17
20
|
useEffect(() => {
|
|
18
21
|
dispatch({ type: breakpoint.change, payload: currentBreakpoint });
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { useState, useEffect, useCallback } from "react";
|
|
3
2
|
const useMediaQueryList = (queries, values, defaultValue) => {
|
|
4
3
|
const mediaQueryLists = queries.map((q) => window.matchMedia(q));
|
|
@@ -10,7 +9,9 @@ const useMediaQueryList = (queries, values, defaultValue) => {
|
|
|
10
9
|
useEffect(() => {
|
|
11
10
|
const handler = () => setValue(getValue);
|
|
12
11
|
mediaQueryLists.forEach((mql) => mql.addEventListener("change", handler));
|
|
13
|
-
return () => mediaQueryLists.forEach(
|
|
12
|
+
return () => mediaQueryLists.forEach(
|
|
13
|
+
(mql) => mql.removeEventListener("change", handler)
|
|
14
|
+
);
|
|
14
15
|
}, [getValue, mediaQueryLists]);
|
|
15
16
|
return value;
|
|
16
17
|
};
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
const DefaultErrorTemplate = (props) => /* @__PURE__ */ jsxs("div", {
|
|
3
|
+
children: [
|
|
4
|
+
/* @__PURE__ */ jsx("h2", {
|
|
5
|
+
children: "We are unable to process your request"
|
|
6
|
+
}),
|
|
7
|
+
/* @__PURE__ */ jsx("section", {
|
|
8
|
+
children: "Please close your browser and login again"
|
|
9
|
+
})
|
|
10
|
+
]
|
|
11
|
+
});
|
|
4
12
|
export {
|
|
5
13
|
DefaultErrorTemplate
|
|
6
14
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import {
|
|
4
4
|
DefaultErrorTemplate
|
|
@@ -26,7 +26,7 @@ class ErrorBoundary extends React.Component {
|
|
|
26
26
|
const { children, errorTemplate } = this.props;
|
|
27
27
|
const ErrorTemplate = errorTemplate || DefaultErrorTemplate;
|
|
28
28
|
const { error, errorInfo } = this.state;
|
|
29
|
-
return errorInfo ? /* @__PURE__ */
|
|
29
|
+
return errorInfo ? /* @__PURE__ */ jsx(ErrorTemplate, {
|
|
30
30
|
error,
|
|
31
31
|
errorInfo
|
|
32
32
|
}) : children;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useEffect, memo } from "react";
|
|
4
3
|
import { ToastPosition, ToastType, DSToast, toast } from "@elliemae/ds-toast";
|
|
5
4
|
import { useAppSelector, useAppDispatch } from "../../data/react-redux.js";
|
|
@@ -22,7 +21,7 @@ const ErrorToast = memo((props) => {
|
|
|
22
21
|
dispatch(error.clear());
|
|
23
22
|
}
|
|
24
23
|
}, [storeError, props, dispatch]);
|
|
25
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ jsx(DSToast, {
|
|
26
25
|
...props
|
|
27
26
|
});
|
|
28
27
|
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DSAutocomplete } from "@elliemae/ds-controlled-form";
|
|
3
|
+
import { Controller } from "react-hook-form";
|
|
4
|
+
const filterOptions = (allOptions, newFilter) => {
|
|
5
|
+
const filtered = allOptions.filter(
|
|
6
|
+
(option) => option.type === "section" || option.label.toLowerCase().includes(newFilter?.toLowerCase())
|
|
7
|
+
);
|
|
8
|
+
return filtered.length === 1 && filtered[0].type === "section" ? [] : filtered;
|
|
9
|
+
};
|
|
10
|
+
const Autocomplete = ({
|
|
11
|
+
name,
|
|
12
|
+
children,
|
|
13
|
+
...rest
|
|
14
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
15
|
+
name,
|
|
16
|
+
render: ({ field: { onChange, value, ...props } }) => /* @__PURE__ */ jsx(DSAutocomplete, {
|
|
17
|
+
...rest,
|
|
18
|
+
...props,
|
|
19
|
+
options: filterOptions(rest.options, value),
|
|
20
|
+
filter: value ?? "",
|
|
21
|
+
onSelect: onChange,
|
|
22
|
+
children
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
Autocomplete
|
|
27
|
+
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSControlledCheckbox } from "@elliemae/ds-controlled-form";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
6
5
|
} from "react-hook-form";
|
|
7
|
-
const CheckBox = ({ name, rules = {}, ...rest }) => /* @__PURE__ */
|
|
6
|
+
const CheckBox = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ jsx(Controller, {
|
|
8
7
|
name,
|
|
9
8
|
rules,
|
|
10
|
-
render: ({ field: { value = false, ...restProps } }) => /* @__PURE__ */
|
|
9
|
+
render: ({ field: { value = false, ...restProps } }) => /* @__PURE__ */ jsx(DSControlledCheckbox, {
|
|
11
10
|
...rest,
|
|
12
11
|
...restProps,
|
|
13
12
|
checked: value
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSComboBox } from "@elliemae/ds-form";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
@@ -9,11 +8,11 @@ const ComboBox = ({
|
|
|
9
8
|
defaultValue = "",
|
|
10
9
|
rules = {},
|
|
11
10
|
...rest
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
13
12
|
name,
|
|
14
13
|
rules,
|
|
15
14
|
defaultValue,
|
|
16
|
-
render: ({ field: { onChange, ...props } }) => /* @__PURE__ */
|
|
15
|
+
render: ({ field: { onChange, ...props } }) => /* @__PURE__ */ jsx(DSComboBox, {
|
|
17
16
|
...rest,
|
|
18
17
|
...props,
|
|
19
18
|
onChange: (selected) => {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DSComboBox } from "@elliemae/ds-controlled-form";
|
|
3
|
+
import {
|
|
4
|
+
Controller
|
|
5
|
+
} from "react-hook-form";
|
|
6
|
+
const ComboBoxV3 = ({
|
|
7
|
+
name,
|
|
8
|
+
defaultValue = null,
|
|
9
|
+
rules = {},
|
|
10
|
+
...rest
|
|
11
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
12
|
+
name,
|
|
13
|
+
rules,
|
|
14
|
+
defaultValue,
|
|
15
|
+
render: ({ field: { onChange, value, ...props } }) => /* @__PURE__ */ jsx(DSComboBox, {
|
|
16
|
+
...rest,
|
|
17
|
+
...props,
|
|
18
|
+
selectedValues: value,
|
|
19
|
+
onChange
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
ComboBoxV3
|
|
24
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSDateInput } from "@elliemae/ds-form";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
@@ -9,11 +8,11 @@ const DateInput = ({
|
|
|
9
8
|
defaultValue = "",
|
|
10
9
|
rules = {},
|
|
11
10
|
...rest
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
13
12
|
name,
|
|
14
13
|
rules,
|
|
15
14
|
defaultValue,
|
|
16
|
-
render: ({ field }) => /* @__PURE__ */
|
|
15
|
+
render: ({ field }) => /* @__PURE__ */ jsx(DSDateInput, {
|
|
17
16
|
...rest,
|
|
18
17
|
...field
|
|
19
18
|
})
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import DSDatePicker from "@elliemae/ds-date-picker";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
@@ -9,11 +8,11 @@ const DatePicker = ({
|
|
|
9
8
|
defaultValue = "",
|
|
10
9
|
rules = {},
|
|
11
10
|
...rest
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
13
12
|
name,
|
|
14
13
|
defaultValue,
|
|
15
14
|
rules,
|
|
16
|
-
render: ({ field }) => /* @__PURE__ */
|
|
15
|
+
render: ({ field }) => /* @__PURE__ */ jsx(DSDatePicker, {
|
|
17
16
|
...rest,
|
|
18
17
|
...field
|
|
19
18
|
})
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useState, useEffect } from "react";
|
|
4
3
|
import { DSControlledDateRangePicker } from "@elliemae/ds-controlled-form";
|
|
5
4
|
import {
|
|
@@ -9,12 +8,16 @@ const WrappedDateRangePicker = ({
|
|
|
9
8
|
field: { value, onChange, ...restProps },
|
|
10
9
|
...rest
|
|
11
10
|
}) => {
|
|
12
|
-
const [fromDateString, setFromDateString] = useState(
|
|
13
|
-
|
|
11
|
+
const [fromDateString, setFromDateString] = useState(
|
|
12
|
+
value[0]
|
|
13
|
+
);
|
|
14
|
+
const [toDateString, setToDateString] = useState(
|
|
15
|
+
value[1]
|
|
16
|
+
);
|
|
14
17
|
useEffect(() => {
|
|
15
18
|
onChange([fromDateString, toDateString]);
|
|
16
19
|
}, [fromDateString, toDateString]);
|
|
17
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ jsx(DSControlledDateRangePicker, {
|
|
18
21
|
...rest,
|
|
19
22
|
...restProps,
|
|
20
23
|
fromDate: fromDateString,
|
|
@@ -28,11 +31,11 @@ const DateRangePicker = ({
|
|
|
28
31
|
defaultValue = ["", ""],
|
|
29
32
|
rules = {},
|
|
30
33
|
...rest
|
|
31
|
-
}) => /* @__PURE__ */
|
|
34
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
32
35
|
name,
|
|
33
36
|
defaultValue,
|
|
34
37
|
rules,
|
|
35
|
-
render: ({ field }) => /* @__PURE__ */
|
|
38
|
+
render: ({ field }) => /* @__PURE__ */ jsx(WrappedDateRangePicker, {
|
|
36
39
|
field,
|
|
37
40
|
...rest
|
|
38
41
|
})
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSControlledDateTimePicker } from "@elliemae/ds-controlled-form";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
@@ -9,11 +8,11 @@ const DateTimePicker = ({
|
|
|
9
8
|
defaultValue = "",
|
|
10
9
|
rules = {},
|
|
11
10
|
...rest
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
13
12
|
name,
|
|
14
13
|
defaultValue,
|
|
15
14
|
rules,
|
|
16
|
-
render: ({ field: { value, onChange, ...restProps } }) => /* @__PURE__ */
|
|
15
|
+
render: ({ field: { value, onChange, ...restProps } }) => /* @__PURE__ */ jsx(DSControlledDateTimePicker, {
|
|
17
16
|
...rest,
|
|
18
17
|
...restProps,
|
|
19
18
|
dateTime: value,
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSFormItemLayout } from "@elliemae/ds-form";
|
|
4
3
|
import { get } from "react-hook-form";
|
|
5
4
|
import { ConnectForm } from "../connect-form.js";
|
|
6
|
-
const FormItemLayout = ({ name, ...rest }) => /* @__PURE__ */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
const FormItemLayout = ({ name, ...rest }) => /* @__PURE__ */ jsx(ConnectForm, {
|
|
6
|
+
children: ({
|
|
7
|
+
formState: { errors }
|
|
8
|
+
}) => {
|
|
9
|
+
const errorField = get(errors, name);
|
|
10
|
+
const hasError = !!errorField;
|
|
11
|
+
const validationMessage = errorField?.message;
|
|
12
|
+
return /* @__PURE__ */ jsx(DSFormItemLayout, {
|
|
13
|
+
name,
|
|
14
|
+
hasError,
|
|
15
|
+
validationMessage,
|
|
16
|
+
...rest
|
|
17
|
+
});
|
|
18
|
+
}
|
|
18
19
|
});
|
|
19
20
|
export {
|
|
20
21
|
FormItemLayout
|