@elliemae/pui-app-sdk 4.10.0-beta.7 → 4.10.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/data/index.js +3 -3
- package/dist/cjs/data/{useAppSelector.js → react-redux.js} +5 -3
- package/dist/cjs/data/store.js +2 -6
- package/dist/cjs/index.js +15 -14
- package/dist/cjs/view/app-root/index.js +13 -9
- package/dist/cjs/view/breakpoint/use-breakpoint.js +2 -2
- package/dist/cjs/view/error-boundary/index.js +2 -1
- package/dist/cjs/view/error-toast/index.js +3 -3
- package/dist/cjs/view/fields/autocomplete/index.js +30 -22
- package/dist/cjs/view/fields/combo-box-v3/index.js +4 -2
- package/dist/cjs/view/fields/date-time-picker/index.js +58 -3
- package/dist/cjs/view/fields/input-text/index.js +1 -1
- package/dist/cjs/view/fields/masked-input-text/index.js +70 -0
- package/dist/cjs/view/fields/toggle/index.js +1 -0
- package/dist/cjs/view/form/personal-info-section.js +18 -25
- package/dist/cjs/view/live-message/index.js +4 -5
- package/dist/cjs/view/login/index.js +2 -2
- package/dist/cjs/view/micro-app/resources/manifest.js +1 -1
- package/dist/cjs/view/modals/navigation-prompt/index.js +2 -2
- package/dist/cjs/view/modals/session-expiry/index.js +2 -2
- package/dist/cjs/view/modals/wait-message/index.js +3 -3
- package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +2 -2
- package/dist/cjs/view/session-timeout/index.js +2 -2
- package/dist/esm/data/index.js +1 -1
- package/dist/esm/data/react-redux.js +7 -0
- package/dist/esm/data/store.js +5 -7
- package/dist/esm/index.js +11 -16
- package/dist/esm/view/app-root/index.js +14 -10
- package/dist/esm/view/breakpoint/use-breakpoint.js +1 -1
- package/dist/esm/view/error-boundary/index.js +2 -1
- package/dist/esm/view/error-toast/index.js +1 -1
- package/dist/esm/view/fields/autocomplete/index.js +31 -23
- package/dist/esm/view/fields/combo-box-v3/index.js +4 -2
- package/dist/esm/view/fields/date-time-picker/index.js +63 -8
- package/dist/esm/view/fields/input-text/index.js +1 -1
- package/dist/esm/view/fields/masked-input-text/index.js +43 -0
- package/dist/esm/view/fields/toggle/index.js +1 -0
- package/dist/esm/view/form/personal-info-section.js +18 -15
- package/dist/esm/view/live-message/index.js +2 -3
- package/dist/esm/view/login/index.js +1 -1
- package/dist/esm/view/micro-app/resources/manifest.js +1 -1
- package/dist/esm/view/modals/navigation-prompt/index.js +1 -1
- package/dist/esm/view/modals/session-expiry/index.js +1 -1
- package/dist/esm/view/modals/wait-message/index.js +1 -1
- package/dist/esm/view/modals/wait-message/wait-message-launcher.js +1 -1
- package/dist/esm/view/session-timeout/index.js +1 -1
- package/dist/types/lib/communication/http-client/index.d.ts +1 -1
- package/dist/types/lib/data/index.d.ts +1 -1
- package/dist/types/lib/data/live-message/index.d.ts +2 -2
- package/dist/types/lib/data/{useAppDispatch.d.ts → react-redux.d.ts} +3 -0
- package/dist/types/lib/data/store.d.ts +3 -4
- package/dist/types/lib/index.d.ts +7 -5
- package/dist/types/lib/utils/testing/render-with-redux.d.ts +2 -2
- package/dist/types/lib/utils/testing/render-with-router-redux.d.ts +2 -2
- package/dist/types/lib/view/app-root/index.d.ts +2 -1
- package/dist/types/lib/view/fields/autocomplete/advanced-autocomplete.stories.d.ts +5 -0
- package/dist/types/lib/view/fields/autocomplete/index.d.ts +8 -9
- package/dist/types/lib/view/fields/combo-box-v3/index.d.ts +7 -3
- package/dist/types/lib/view/fields/date-time-picker/index.d.ts +5 -2
- package/dist/types/lib/view/fields/date-time-picker/index.stories.d.ts +34 -1
- package/dist/types/lib/view/fields/input-text/index.d.ts +3 -3
- package/dist/types/lib/view/fields/input-text/index.stories.d.ts +6 -2
- package/dist/types/lib/view/fields/masked-input-text/index.d.ts +16 -0
- package/dist/types/lib/view/fields/masked-input-text/with-money-mask.stories.d.ts +11 -0
- package/dist/types/lib/view/fields/masked-input-text/with-percentage-mask.stories.d.ts +11 -0
- package/dist/types/lib/view/fields/toggle/index.d.ts +5 -1
- package/dist/types/lib/view/fields/toggle/index.stories.d.ts +6 -2
- package/dist/types/lib/view/form/usecases.stories.d.ts +1 -0
- package/package.json +35 -34
- package/dist/cjs/communication/http-client/baseQuery.js +0 -42
- package/dist/cjs/data/appMiddleware.js +0 -51
- package/dist/cjs/data/errorMiddleware.js +0 -31
- package/dist/cjs/data/listenerMiddleware.js +0 -58
- package/dist/cjs/data/queryMiddleware.js +0 -50
- package/dist/cjs/data/react.js +0 -32
- package/dist/cjs/data/useAppDispatch.js +0 -25
- package/dist/cjs/data/useAppMiddleware.js +0 -34
- package/dist/cjs/data/useInjectListener.js +0 -34
- package/dist/cjs/data/useInjectQuery.js +0 -33
- package/dist/esm/communication/http-client/baseQuery.js +0 -22
- package/dist/esm/data/appMiddleware.js +0 -31
- package/dist/esm/data/errorMiddleware.js +0 -11
- package/dist/esm/data/listenerMiddleware.js +0 -38
- package/dist/esm/data/queryMiddleware.js +0 -30
- package/dist/esm/data/react.js +0 -12
- package/dist/esm/data/useAppDispatch.js +0 -5
- package/dist/esm/data/useAppMiddleware.js +0 -14
- package/dist/esm/data/useAppSelector.js +0 -5
- package/dist/esm/data/useInjectListener.js +0 -17
- package/dist/esm/data/useInjectQuery.js +0 -15
- package/dist/types/lib/communication/http-client/baseQuery.d.ts +0 -14
- package/dist/types/lib/data/appMiddleware.d.ts +0 -8
- package/dist/types/lib/data/errorMiddleware.d.ts +0 -2
- package/dist/types/lib/data/listenerMiddleware.d.ts +0 -11
- package/dist/types/lib/data/queryMiddleware.d.ts +0 -11
- package/dist/types/lib/data/react.d.ts +0 -5
- package/dist/types/lib/data/useAppMiddleware.d.ts +0 -5
- package/dist/types/lib/data/useAppSelector.d.ts +0 -3
- package/dist/types/lib/data/useInjectListener.d.ts +0 -5
- package/dist/types/lib/data/useInjectQuery.d.ts +0 -7
|
@@ -43,7 +43,7 @@ const getAppManifest = async ({
|
|
|
43
43
|
(0, import_url.removeDoubleSlash)(url.href)
|
|
44
44
|
);
|
|
45
45
|
const { headers } = response;
|
|
46
|
-
if (headers["content-type"]
|
|
46
|
+
if (headers["content-type"]?.includes?.("application/json"))
|
|
47
47
|
return response.data;
|
|
48
48
|
const unVersionedManifestPath = getUnVersionedManifestPath(manifestPath);
|
|
49
49
|
if (manifestPath !== unVersionedManifestPath) {
|
|
@@ -26,11 +26,11 @@ var import_react = require("react");
|
|
|
26
26
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
27
27
|
var import_ds_button = require("@elliemae/ds-button");
|
|
28
28
|
var import_ds_dialog = require("@elliemae/ds-dialog");
|
|
29
|
-
var
|
|
29
|
+
var import_react_redux = require("../../../data/react-redux.js");
|
|
30
30
|
var import_actions = require("../../../data/navigation-prompt/actions.js");
|
|
31
31
|
const NavigationPrompt = (0, import_react.memo)(
|
|
32
32
|
({ open = false }) => {
|
|
33
|
-
const dispatch = (0,
|
|
33
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
34
34
|
const cancelDialog = () => dispatch(import_actions.navigationPrompt.cancel());
|
|
35
35
|
const confirmDialog = () => dispatch(import_actions.navigationPrompt.confirm());
|
|
36
36
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialog, { isOpen: open, onClickOutside: cancelDialog, centered: true, children: [
|
|
@@ -26,7 +26,7 @@ var import_react = require("react");
|
|
|
26
26
|
var import_ds_button = require("@elliemae/ds-button");
|
|
27
27
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
28
28
|
var import_ds_dialog = require("@elliemae/ds-dialog");
|
|
29
|
-
var
|
|
29
|
+
var import_react_redux = require("../../../data/react-redux.js");
|
|
30
30
|
var import_actions = require("../../../data/logout/actions.js");
|
|
31
31
|
var import_session = require("../../../utils/session.js");
|
|
32
32
|
var import_customHooks = require("./customHooks.js");
|
|
@@ -34,7 +34,7 @@ const SessionExpiry = (0, import_react.memo)(
|
|
|
34
34
|
({ open, warningNotifiedAt = 0 }) => {
|
|
35
35
|
const [isOpen, setIsOpen] = (0, import_react.useState)(open);
|
|
36
36
|
const timeLeft = (0, import_customHooks.useTrackSessionExpiry)(warningNotifiedAt);
|
|
37
|
-
const dispatch = (0,
|
|
37
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
38
38
|
(0, import_react.useEffect)(() => {
|
|
39
39
|
setIsOpen(open);
|
|
40
40
|
}, [open]);
|
|
@@ -24,7 +24,7 @@ module.exports = __toCommonJS(wait_message_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = require("react");
|
|
26
26
|
var import_ds_loading_indicator = require("@elliemae/ds-loading-indicator");
|
|
27
|
-
var
|
|
27
|
+
var import_react_redux = require("../../../data/react-redux.js");
|
|
28
28
|
var import_use_html_wait_message = require("./use-html-wait-message.js");
|
|
29
29
|
var import_user_wait_event = require("../../../analytics/user-wait-event.js");
|
|
30
30
|
const WaitMessage = (0, import_react.memo)(
|
|
@@ -33,8 +33,8 @@ const WaitMessage = (0, import_react.memo)(
|
|
|
33
33
|
style = { color: "white", fontSize: "1.25rem" },
|
|
34
34
|
...rest
|
|
35
35
|
}) => {
|
|
36
|
-
const isOpen = (0,
|
|
37
|
-
const message = (0,
|
|
36
|
+
const isOpen = (0, import_react_redux.useAppSelector)((state) => state.waitMessage?.isOpen);
|
|
37
|
+
const message = (0, import_react_redux.useAppSelector)((state) => state.waitMessage?.message);
|
|
38
38
|
(0, import_react.useEffect)(() => {
|
|
39
39
|
if (isOpen)
|
|
40
40
|
(0, import_user_wait_event.waitStartEvent)();
|
|
@@ -22,10 +22,10 @@ __export(wait_message_launcher_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(wait_message_launcher_exports);
|
|
24
24
|
var import_react = require("react");
|
|
25
|
-
var
|
|
25
|
+
var import_react_redux = require("../../../data/react-redux.js");
|
|
26
26
|
var import_actions = require("../../../data/wait-message/actions.js");
|
|
27
27
|
const WaitMessageLauncher = () => {
|
|
28
|
-
const dispatch = (0,
|
|
28
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
29
29
|
(0, import_react.useEffect)(() => {
|
|
30
30
|
dispatch(import_actions.waitMessage.open());
|
|
31
31
|
return () => {
|
|
@@ -23,12 +23,12 @@ __export(session_timeout_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(session_timeout_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = require("react");
|
|
26
|
-
var
|
|
26
|
+
var import_react_redux = require("../../data/react-redux.js");
|
|
27
27
|
var import_actions = require("../../data/logout/actions.js");
|
|
28
28
|
var import_session = require("../../utils/session.js");
|
|
29
29
|
var import_session_expiry = require("../modals/session-expiry/index.js");
|
|
30
30
|
const SessionTimeout = () => {
|
|
31
|
-
const dispatch = (0,
|
|
31
|
+
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
32
32
|
const [showSessionExpiryWarning, setSessionExpiryWarning] = (0, import_react.useState)(false);
|
|
33
33
|
const [warningNotifiedAt, setwarningNotifiedAt] = (0, import_react.useState)();
|
|
34
34
|
(0, import_react.useEffect)(() => {
|
package/dist/esm/data/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
useInjectSaga,
|
|
4
4
|
createManager
|
|
5
5
|
} from "redux-injectors";
|
|
6
|
-
import { useAppDispatch, useAppSelector } from "./react.js";
|
|
6
|
+
import { useAppDispatch, useAppSelector } from "./react-redux.js";
|
|
7
7
|
import { createAppStore, getStore } from "./store.js";
|
|
8
8
|
export {
|
|
9
9
|
createAppStore as configureStore,
|
package/dist/esm/data/store.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { configureStore } from "@reduxjs/toolkit";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
createInjectorsEnhancer
|
|
4
|
+
} from "redux-injectors";
|
|
4
5
|
import createSagaMiddleware from "redux-saga";
|
|
5
6
|
import { createReducer } from "./reducers.js";
|
|
6
7
|
import { enableHotReloading } from "./webpack-hmr.js";
|
|
7
|
-
import { queryMiddleware } from "./queryMiddleware.js";
|
|
8
|
-
import { listenerMiddleware } from "./listenerMiddleware.js";
|
|
9
8
|
const rootReducer = createReducer();
|
|
10
9
|
let appStore = null;
|
|
11
10
|
const setStore = (store) => {
|
|
12
11
|
appStore = store;
|
|
13
12
|
};
|
|
14
13
|
const getStore = () => appStore;
|
|
15
|
-
const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {}) => {
|
|
14
|
+
const createStore = (initialState, sagaMiddleware, history, middlewareConfig = { thunk: false }) => {
|
|
16
15
|
const { run: runSaga } = sagaMiddleware;
|
|
17
16
|
const enhancers = [
|
|
18
17
|
createInjectorsEnhancer({
|
|
@@ -22,12 +21,11 @@ const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {
|
|
|
22
21
|
];
|
|
23
22
|
const baseStore = configureStore({
|
|
24
23
|
reducer: rootReducer,
|
|
25
|
-
middleware: (getDefaultMiddleware) => getDefaultMiddleware(middlewareConfig).
|
|
24
|
+
middleware: (getDefaultMiddleware) => getDefaultMiddleware(middlewareConfig).concat(sagaMiddleware),
|
|
26
25
|
devTools: true,
|
|
27
26
|
preloadedState: initialState,
|
|
28
27
|
enhancers
|
|
29
28
|
});
|
|
30
|
-
setupListeners(baseStore.dispatch);
|
|
31
29
|
enableHotReloading(baseStore);
|
|
32
30
|
return baseStore;
|
|
33
31
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -3,25 +3,17 @@ import {
|
|
|
3
3
|
getHTTPClient,
|
|
4
4
|
getAuthHTTPClient
|
|
5
5
|
} from "./communication/http-client/index.js";
|
|
6
|
-
import { sdkBaseQuery } from "./communication/http-client/baseQuery.js";
|
|
7
6
|
import { onAuthorizationFailure } from "./communication/http-client/response-interceptor.js";
|
|
8
7
|
import { auth } from "./data/auth/actions.js";
|
|
9
8
|
import { RequireAuth } from "./view/require-auth.js";
|
|
10
9
|
import { Page } from "./view/page.js";
|
|
11
10
|
import { default as default2 } from "./utils/constants.js";
|
|
11
|
+
import { useAppDispatch, useAppSelector } from "./data/react-redux.js";
|
|
12
12
|
import {
|
|
13
13
|
useInjectReducer,
|
|
14
14
|
useInjectSaga,
|
|
15
15
|
createManager
|
|
16
16
|
} from "redux-injectors";
|
|
17
|
-
import {
|
|
18
|
-
useInjectQuery,
|
|
19
|
-
useInjectListener,
|
|
20
|
-
useAppDispatch,
|
|
21
|
-
useAppSelector,
|
|
22
|
-
useAppMiddleware
|
|
23
|
-
} from "./data/react.js";
|
|
24
|
-
import { errorMiddleware } from "./data/errorMiddleware.js";
|
|
25
17
|
import { getAuthorizationHeader } from "./utils/auth/helper.js";
|
|
26
18
|
import { getRedirectUrl, removeDoubleSlash } from "./utils/url.js";
|
|
27
19
|
import { createAppStore } from "./data/store.js";
|
|
@@ -79,15 +71,14 @@ import { RenderWithStateAddOns } from "./utils/testing/render-with-state-addons.
|
|
|
79
71
|
import { getApiActionCreator, getSelectField } from "./api/helpers.js";
|
|
80
72
|
import { getUser } from "./api/users/index.js";
|
|
81
73
|
import { withAppDecorator } from "./view/storybook/decorator.js";
|
|
82
|
-
import { Autocomplete } from "./view/fields/autocomplete/index.js";
|
|
83
74
|
import { ErrorToast } from "./view/error-toast/index.js";
|
|
84
75
|
import { NavigationPrompt } from "./view/modals/navigation-prompt/index.js";
|
|
85
76
|
import { Form } from "./view/form/index.js";
|
|
86
|
-
import { ComboBoxV3 } from "./view/fields/combo-box-v3/index.js";
|
|
87
77
|
import { ConnectForm } from "./view/fields/connect-form.js";
|
|
88
78
|
import { FormItemLayout } from "./view/fields/form-item-layout/index.js";
|
|
89
79
|
import { FormLayoutBlockItem } from "./view/fields/form-layout-block-item/index.js";
|
|
90
80
|
import { TextBox } from "./view/fields/text-box/index.js";
|
|
81
|
+
import { InputText } from "./view/fields/input-text/index.js";
|
|
91
82
|
import { LargeTextBox } from "./view/fields/large-text-box/index.js";
|
|
92
83
|
import {
|
|
93
84
|
InputMask,
|
|
@@ -95,11 +86,16 @@ import {
|
|
|
95
86
|
MASK_PIPES
|
|
96
87
|
} from "./view/fields/input-mask/index.js";
|
|
97
88
|
import { ComboBox } from "./view/fields/combo-box/index.js";
|
|
89
|
+
import { ComboBoxV3 } from "./view/fields/combo-box-v3/index.js";
|
|
98
90
|
import { CheckBox } from "./view/fields/check-box/index.js";
|
|
99
91
|
import { Radio } from "./view/fields/radio/index.js";
|
|
100
92
|
import { RadioGroup } from "./view/fields/radio-group/index.js";
|
|
101
93
|
import { DateInput } from "./view/fields/date-input/index.js";
|
|
102
94
|
import { DatePicker } from "./view/fields/date-picker/index.js";
|
|
95
|
+
import { DateTimePicker } from "./view/fields/date-time-picker/index.js";
|
|
96
|
+
import { DateRangePicker } from "./view/fields/date-range-picker/index.js";
|
|
97
|
+
import { Autocomplete } from "./view/fields/autocomplete/index.js";
|
|
98
|
+
import { Toggle } from "./view/fields/toggle/index.js";
|
|
103
99
|
import { FormSubmitButton } from "./view/form/submit-button/index.js";
|
|
104
100
|
import { useMediaQueryList } from "./view/breakpoint/use-media-query-list.js";
|
|
105
101
|
import { VisuallyHidden } from "./view/visually-hidden/index.js";
|
|
@@ -126,6 +122,8 @@ export {
|
|
|
126
122
|
ConnectForm,
|
|
127
123
|
DateInput,
|
|
128
124
|
DatePicker,
|
|
125
|
+
DateRangePicker,
|
|
126
|
+
DateTimePicker,
|
|
129
127
|
ErrorBoundary,
|
|
130
128
|
ErrorToast,
|
|
131
129
|
Form,
|
|
@@ -133,6 +131,7 @@ export {
|
|
|
133
131
|
FormLayoutBlockItem,
|
|
134
132
|
FormSubmitButton,
|
|
135
133
|
InputMask,
|
|
134
|
+
InputText,
|
|
136
135
|
LargeTextBox,
|
|
137
136
|
MASK_PIPES,
|
|
138
137
|
MASK_TYPES,
|
|
@@ -149,6 +148,7 @@ export {
|
|
|
149
148
|
SessionTimeout,
|
|
150
149
|
TextBox,
|
|
151
150
|
Themes,
|
|
151
|
+
Toggle,
|
|
152
152
|
VisuallyHidden,
|
|
153
153
|
WaitMessage,
|
|
154
154
|
actions as ariaLive,
|
|
@@ -158,7 +158,6 @@ export {
|
|
|
158
158
|
createManager,
|
|
159
159
|
enableReactAppForHostIntegration,
|
|
160
160
|
actions2 as error,
|
|
161
|
-
errorMiddleware,
|
|
162
161
|
fetchHostAppData,
|
|
163
162
|
getUser as fetchUserSettings,
|
|
164
163
|
getApiActionCreator,
|
|
@@ -196,7 +195,6 @@ export {
|
|
|
196
195
|
renderWithRouter,
|
|
197
196
|
renderWithRouterRedux,
|
|
198
197
|
resetUserIdleTime,
|
|
199
|
-
sdkBaseQuery,
|
|
200
198
|
sendBAEvent,
|
|
201
199
|
sendMessageToHost,
|
|
202
200
|
setAppConfig,
|
|
@@ -209,10 +207,7 @@ export {
|
|
|
209
207
|
trackActivity,
|
|
210
208
|
updateBAEventParameters,
|
|
211
209
|
useAppDispatch,
|
|
212
|
-
useAppMiddleware,
|
|
213
210
|
useAppSelector,
|
|
214
|
-
useInjectListener,
|
|
215
|
-
useInjectQuery,
|
|
216
211
|
useInjectReducer,
|
|
217
212
|
useInjectSaga,
|
|
218
213
|
useMediaQueryList,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { StrictMode } from "react";
|
|
2
|
+
import { StrictMode, Fragment } from "react";
|
|
3
3
|
import { Provider } from "react-redux";
|
|
4
4
|
import { ThemeProvider } from "styled-components";
|
|
5
5
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
@@ -20,15 +20,19 @@ const AppRoot = ({
|
|
|
20
20
|
manageSession = false,
|
|
21
21
|
WaitMessage,
|
|
22
22
|
errorTemplate,
|
|
23
|
-
children
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
children,
|
|
24
|
+
strictMode = true
|
|
25
|
+
}) => {
|
|
26
|
+
const ParentEle = strictMode ? StrictMode : Fragment;
|
|
27
|
+
return /* @__PURE__ */ jsx(ParentEle, { children: /* @__PURE__ */ jsx(ErrorBoundary, { errorTemplate, children: /* @__PURE__ */ jsx(Provider, { store, children: /* @__PURE__ */ jsx(AppRouter, { history, basename, children: /* @__PURE__ */ jsx(ThemeProvider, { theme, children: /* @__PURE__ */ jsx(
|
|
28
|
+
AppToRender,
|
|
29
|
+
{
|
|
30
|
+
manageSession,
|
|
31
|
+
WaitMessage,
|
|
32
|
+
children
|
|
33
|
+
}
|
|
34
|
+
) }) }) }) }) });
|
|
35
|
+
};
|
|
32
36
|
export {
|
|
33
37
|
AppRoot
|
|
34
38
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useContext } from "react";
|
|
2
2
|
import { ThemeContext } from "styled-components";
|
|
3
3
|
import { publish } from "pubsub-js";
|
|
4
|
-
import { useAppDispatch } from "../../data/react.js";
|
|
4
|
+
import { useAppDispatch } from "../../data/react-redux.js";
|
|
5
5
|
import { breakpoint } from "../../data/breakpoint/index.js";
|
|
6
6
|
import { useMediaQueryList } from "./use-media-query-list.js";
|
|
7
7
|
import { HOST_WINDOW_BREAKPOINT_CHANGED } from "../../utils/constants.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, memo } from "react";
|
|
3
3
|
import { ToastPosition, ToastType, DSToast, toast } from "@elliemae/ds-toast";
|
|
4
|
-
import { useAppSelector, useAppDispatch } from "../../data/react.js";
|
|
4
|
+
import { useAppSelector, useAppDispatch } from "../../data/react-redux.js";
|
|
5
5
|
import { actions as error } from "../../data/error/index.js";
|
|
6
6
|
const ErrorToast = memo((props) => {
|
|
7
7
|
const storeError = useAppSelector((state) => state?.error);
|
|
@@ -1,33 +1,41 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback } from "react";
|
|
2
3
|
import { DSAutocomplete } from "@elliemae/ds-controlled-form";
|
|
3
|
-
import {
|
|
4
|
+
import { useFormContext } from "react-hook-form";
|
|
4
5
|
const filterOptions = (allOptions, newFilter) => {
|
|
6
|
+
if (!newFilter)
|
|
7
|
+
return allOptions;
|
|
5
8
|
const filtered = allOptions.filter(
|
|
6
|
-
(option) => option.type === "section" || option.label.toLowerCase().includes(newFilter?.toLowerCase())
|
|
9
|
+
(option) => option.type === "section" || option.type !== "separator" && option.label.toLowerCase().includes(newFilter?.toLowerCase())
|
|
7
10
|
);
|
|
8
11
|
return filtered.length === 1 && filtered[0].type === "section" ? [] : filtered;
|
|
9
12
|
};
|
|
10
|
-
const Autocomplete = ({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
const Autocomplete = ({ children, ...rest }) => {
|
|
14
|
+
const { watch, setValue } = useFormContext();
|
|
15
|
+
const watchedFilter = watch(rest.name);
|
|
16
|
+
const onSelect = useCallback(
|
|
17
|
+
(newValue, ...otherArgs) => {
|
|
18
|
+
if (rest.onSelect)
|
|
19
|
+
rest.onSelect(newValue, ...otherArgs);
|
|
20
|
+
else
|
|
21
|
+
setValue(rest.name, newValue, {
|
|
22
|
+
shouldValidate: true,
|
|
23
|
+
shouldDirty: true,
|
|
24
|
+
shouldTouch: true
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
[rest, setValue]
|
|
28
|
+
);
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
|
+
DSAutocomplete,
|
|
31
|
+
{
|
|
32
|
+
filter: watchedFilter ?? "",
|
|
33
|
+
onSelect,
|
|
34
|
+
options: filterOptions(rest.options, watchedFilter),
|
|
35
|
+
children
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
};
|
|
31
39
|
export {
|
|
32
40
|
Autocomplete
|
|
33
41
|
};
|
|
@@ -7,6 +7,7 @@ const ComboBoxV3 = ({
|
|
|
7
7
|
name,
|
|
8
8
|
defaultValue = null,
|
|
9
9
|
rules = {},
|
|
10
|
+
filteredOptions = null,
|
|
10
11
|
...rest
|
|
11
12
|
}) => /* @__PURE__ */ jsx(
|
|
12
13
|
Controller,
|
|
@@ -18,9 +19,10 @@ const ComboBoxV3 = ({
|
|
|
18
19
|
DSComboBox,
|
|
19
20
|
{
|
|
20
21
|
...props,
|
|
22
|
+
...rest,
|
|
23
|
+
filteredOptions,
|
|
21
24
|
selectedValues: value,
|
|
22
|
-
onChange
|
|
23
|
-
...rest
|
|
25
|
+
onChange
|
|
24
26
|
}
|
|
25
27
|
)
|
|
26
28
|
}
|
|
@@ -3,10 +3,61 @@ import { DSControlledDateTimePicker } from "@elliemae/ds-controlled-form";
|
|
|
3
3
|
import {
|
|
4
4
|
Controller
|
|
5
5
|
} from "react-hook-form";
|
|
6
|
+
const getConfig = (value, onChange) => ({
|
|
7
|
+
"full-date-time": {
|
|
8
|
+
dateTime: value,
|
|
9
|
+
onDateTimeChange: onChange
|
|
10
|
+
},
|
|
11
|
+
"date-time-inputs": {
|
|
12
|
+
dateTime: value,
|
|
13
|
+
onDateTimeChange: onChange
|
|
14
|
+
},
|
|
15
|
+
"date-time-picker": {
|
|
16
|
+
dateTime: value,
|
|
17
|
+
onDateTimeChange: onChange
|
|
18
|
+
},
|
|
19
|
+
"date-time-picker-controller-only": {
|
|
20
|
+
dateTime: value,
|
|
21
|
+
onDateTimeChange: onChange
|
|
22
|
+
},
|
|
23
|
+
"date-inputs": {
|
|
24
|
+
date: value,
|
|
25
|
+
onDateChange: onChange
|
|
26
|
+
},
|
|
27
|
+
"date-picker": {
|
|
28
|
+
date: value,
|
|
29
|
+
onDateChange: onChange
|
|
30
|
+
},
|
|
31
|
+
"date-picker-controller-only": {
|
|
32
|
+
date: value,
|
|
33
|
+
onDateChange: onChange
|
|
34
|
+
},
|
|
35
|
+
"full-date": {
|
|
36
|
+
date: value,
|
|
37
|
+
onDateChange: onChange
|
|
38
|
+
},
|
|
39
|
+
"full-time": {
|
|
40
|
+
time: value,
|
|
41
|
+
onTimeChange: onChange
|
|
42
|
+
},
|
|
43
|
+
"time-inputs": {
|
|
44
|
+
time: value,
|
|
45
|
+
onTimeChange: onChange
|
|
46
|
+
},
|
|
47
|
+
"time-picker-controller-only": {
|
|
48
|
+
time: value,
|
|
49
|
+
onTimeChange: onChange
|
|
50
|
+
},
|
|
51
|
+
"time-picker": {
|
|
52
|
+
time: value,
|
|
53
|
+
onTimeChange: onChange
|
|
54
|
+
}
|
|
55
|
+
});
|
|
6
56
|
const DateTimePicker = ({
|
|
7
57
|
name,
|
|
8
58
|
defaultValue = "",
|
|
9
59
|
rules = {},
|
|
60
|
+
type = "full-date-time",
|
|
10
61
|
...rest
|
|
11
62
|
}) => /* @__PURE__ */ jsx(
|
|
12
63
|
Controller,
|
|
@@ -14,14 +65,18 @@ const DateTimePicker = ({
|
|
|
14
65
|
name,
|
|
15
66
|
defaultValue,
|
|
16
67
|
rules,
|
|
17
|
-
render: ({ field: { value, onChange, ...restProps } }) =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
68
|
+
render: ({ field: { value, onChange, ...restProps } }) => (
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
DSControlledDateTimePicker,
|
|
73
|
+
{
|
|
74
|
+
...restProps,
|
|
75
|
+
type,
|
|
76
|
+
...getConfig(value, onChange)[type],
|
|
77
|
+
...rest
|
|
78
|
+
}
|
|
79
|
+
)
|
|
25
80
|
)
|
|
26
81
|
}
|
|
27
82
|
);
|
|
@@ -14,7 +14,7 @@ const InputText = ({
|
|
|
14
14
|
name,
|
|
15
15
|
defaultValue,
|
|
16
16
|
rules,
|
|
17
|
-
render: ({ field }) => /* @__PURE__ */ jsx(DSInputText, { ...field, ...rest })
|
|
17
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(DSInputText, { hasError: !!error, ...field, ...rest })
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
export {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { DSInputText } from "@elliemae/ds-controlled-form";
|
|
4
|
+
import {
|
|
5
|
+
Controller,
|
|
6
|
+
useFormContext
|
|
7
|
+
} from "react-hook-form";
|
|
8
|
+
const MaskedInputText = ({
|
|
9
|
+
name,
|
|
10
|
+
defaultValue = "",
|
|
11
|
+
rules = {},
|
|
12
|
+
useMask,
|
|
13
|
+
maskOpts,
|
|
14
|
+
...rest
|
|
15
|
+
}) => {
|
|
16
|
+
const [, setVal] = React.useState(defaultValue);
|
|
17
|
+
const { setValue } = useFormContext();
|
|
18
|
+
const opts = React.useMemo(
|
|
19
|
+
() => ({
|
|
20
|
+
...maskOpts,
|
|
21
|
+
onChange: (_, maskedValue) => setValue(name, maskedValue, {
|
|
22
|
+
shouldValidate: true,
|
|
23
|
+
shouldDirty: true,
|
|
24
|
+
shouldTouch: true
|
|
25
|
+
}),
|
|
26
|
+
valueSetter: setVal
|
|
27
|
+
}),
|
|
28
|
+
[maskOpts, name, setValue]
|
|
29
|
+
);
|
|
30
|
+
const inputProps = useMask(opts);
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
Controller,
|
|
33
|
+
{
|
|
34
|
+
name,
|
|
35
|
+
defaultValue,
|
|
36
|
+
rules,
|
|
37
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(DSInputText, { hasError: !!error, ...rest, ...field, ...inputProps })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
MaskedInputText
|
|
43
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { DateInput } from "../fields/date-input/index.js";
|
|
2
|
+
import { InputText } from "../fields/input-text/index.js";
|
|
3
|
+
import { ComboBoxV3 } from "../fields/combo-box-v3/index.js";
|
|
4
|
+
import { DateTimePicker } from "../fields/date-time-picker/index.js";
|
|
6
5
|
import { FormLayoutBlockItem } from "../fields/form-layout-block-item/index.js";
|
|
7
6
|
const FirstName = () => /* @__PURE__ */ jsx(FormLayoutBlockItem, { label: "First Name", inputID: "firstname", required: true, children: /* @__PURE__ */ jsx(
|
|
8
|
-
|
|
7
|
+
InputText,
|
|
9
8
|
{
|
|
10
9
|
id: "firstname",
|
|
11
10
|
name: "firstname",
|
|
@@ -17,39 +16,43 @@ const FirstName = () => /* @__PURE__ */ jsx(FormLayoutBlockItem, { label: "First
|
|
|
17
16
|
}
|
|
18
17
|
) });
|
|
19
18
|
const DOB = () => /* @__PURE__ */ jsx(FormLayoutBlockItem, { label: "Date of Birth", inputID: "dob", required: true, children: /* @__PURE__ */ jsx(
|
|
20
|
-
|
|
19
|
+
DateTimePicker,
|
|
21
20
|
{
|
|
22
21
|
id: "dob",
|
|
23
22
|
name: "dob",
|
|
23
|
+
type: "date-inputs",
|
|
24
24
|
rules: {
|
|
25
25
|
required: { value: true, message: "Date of Birth is required" },
|
|
26
|
-
validate: (value) =>
|
|
26
|
+
validate: (value) => value !== "12/25/1990" || "Date of Birth can not be 12/25/1990"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
) });
|
|
30
30
|
const State = () => /* @__PURE__ */ jsx(FormLayoutBlockItem, { label: "State", inputID: "state", required: true, children: /* @__PURE__ */ jsx(
|
|
31
|
-
|
|
31
|
+
ComboBoxV3,
|
|
32
32
|
{
|
|
33
33
|
id: "state",
|
|
34
34
|
name: "state",
|
|
35
35
|
rules: { required: { value: true, message: "State is required" } },
|
|
36
|
-
|
|
37
|
-
{ value: "
|
|
38
|
-
{ value: "
|
|
36
|
+
allOptions: [
|
|
37
|
+
{ dsId: "1", type: "option", value: "--select--", label: "--Select--" },
|
|
38
|
+
{ dsId: "2", type: "option", value: "ca", label: "California" },
|
|
39
|
+
{ dsId: "3", type: "option", value: "nj", label: "New Jersey" }
|
|
39
40
|
]
|
|
40
41
|
}
|
|
41
42
|
) });
|
|
42
43
|
const MaritalStatus = () => /* @__PURE__ */ jsx(FormLayoutBlockItem, { label: "Marital Status", inputID: "marital_status", required: true, children: /* @__PURE__ */ jsx(
|
|
43
|
-
|
|
44
|
+
ComboBoxV3,
|
|
44
45
|
{
|
|
45
46
|
id: "marital_status",
|
|
46
47
|
name: "marital_status",
|
|
47
48
|
rules: {
|
|
48
49
|
required: { value: true, message: "Marital Status is required" }
|
|
49
50
|
},
|
|
50
|
-
|
|
51
|
-
{ value: "
|
|
52
|
-
{ value: "
|
|
51
|
+
allOptions: [
|
|
52
|
+
{ dsId: "1", type: "option", value: "--select--", label: "--Select--" },
|
|
53
|
+
{ dsId: "2", type: "option", value: "married", label: "Married" },
|
|
54
|
+
{ dsId: "3", type: "option", value: "unmarried", label: "Unmarried" },
|
|
55
|
+
{ dsId: "4", type: "option", value: "separated", label: "Separated" }
|
|
53
56
|
]
|
|
54
57
|
}
|
|
55
58
|
) });
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { LiveMessage as AriaLiveMessage } from "react-aria-live";
|
|
3
|
-
import { useAppSelector } from "../../data/react.js";
|
|
3
|
+
import { useAppSelector } from "../../data/react-redux.js";
|
|
4
4
|
const LiveMessage = () => {
|
|
5
5
|
const message = useAppSelector((state) => state.liveMessage?.message);
|
|
6
|
-
const id = useAppSelector((state) => state.liveMessage?.id);
|
|
7
6
|
const ariaLive = useAppSelector((state) => state.liveMessage?.ariaLive);
|
|
8
|
-
return /* @__PURE__ */ jsx(AriaLiveMessage, { message, "aria-live": ariaLive
|
|
7
|
+
return /* @__PURE__ */ jsx(AriaLiveMessage, { message, "aria-live": ariaLive });
|
|
9
8
|
};
|
|
10
9
|
export {
|
|
11
10
|
LiveMessage
|