@elliemae/pui-app-sdk 3.0.0-beta.19 → 3.0.0-beta.22
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/index.js +4 -4
- package/dist/cjs/view/app-root/hosted-app.js +9 -6
- package/dist/cjs/view/app-root/stand-alone-app.js +7 -3
- package/dist/cjs/view/{media-breakpoint/index.js → breakpoint/use-breakpoint.js} +7 -8
- package/dist/cjs/view/{useMediaBreakpoints/index.js → breakpoint/use-media-query-list.js} +7 -7
- package/dist/cjs/view/fields/check-box/index.js +4 -12
- package/dist/cjs/view/fields/combo-box/index.js +2 -4
- package/dist/cjs/view/fields/form-layout-block-item/index.js +54 -0
- package/dist/cjs/view/fields/watch-value.js +4 -2
- package/dist/cjs/view/form/personal-info-section.js +29 -25
- package/dist/cjs/view/form/submit-button/index.js +1 -1
- package/dist/cjs/view/modals/error/index.js +17 -14
- package/dist/cjs/view/modals/navigation-prompt/index.js +23 -12
- package/dist/cjs/view/modals/session-expiry/index.js +17 -17
- package/dist/cjs/view/modals/wait-message/index.js +4 -5
- package/dist/cjs/view/modals/wait-message/{html-wait-message.js → use-html-wait-message.js} +6 -7
- package/dist/cjs/view/{window-size/index.js → use-window-size-change.js} +6 -7
- package/dist/es/index.js +4 -4
- package/dist/es/view/app-root/hosted-app.js +9 -6
- package/dist/es/view/app-root/stand-alone-app.js +7 -3
- package/dist/es/view/{media-breakpoint/index.js → breakpoint/use-breakpoint.js} +4 -5
- package/dist/es/view/{useMediaBreakpoints/index.js → breakpoint/use-media-query-list.js} +4 -4
- package/dist/es/view/fields/check-box/index.js +4 -12
- package/dist/es/view/fields/combo-box/index.js +2 -4
- package/dist/es/view/fields/form-layout-block-item/index.js +25 -0
- package/dist/es/view/fields/watch-value.js +4 -2
- package/dist/es/view/form/personal-info-section.js +29 -25
- package/dist/es/view/form/submit-button/index.js +2 -2
- package/dist/es/view/modals/error/index.js +24 -15
- package/dist/es/view/modals/navigation-prompt/index.js +30 -12
- package/dist/es/view/modals/session-expiry/index.js +25 -17
- package/dist/es/view/modals/wait-message/index.js +4 -5
- package/dist/es/view/modals/wait-message/{html-wait-message.js → use-html-wait-message.js} +4 -5
- package/dist/es/view/{window-size/index.js → use-window-size-change.js} +3 -4
- package/dist/types/index.d.ts +2 -2
- package/dist/types/view/{media-breakpoint → breakpoint}/index.stories.d.ts +0 -0
- package/dist/types/view/breakpoint/use-breakpoint.d.ts +1 -0
- package/dist/types/view/breakpoint/use-media-query-list.d.ts +1 -0
- package/dist/types/view/fields/check-box/index.d.ts +2 -4
- package/dist/types/view/fields/check-box/index.stories.d.ts +1 -3
- package/dist/types/view/fields/combo-box/index.d.ts +1 -2
- package/dist/types/view/fields/combo-box/index.stories.d.ts +2 -4
- package/dist/types/view/fields/date-picker/index.d.ts +1 -0
- package/dist/types/view/fields/date-picker/index.stories.d.ts +1 -3
- package/dist/types/view/fields/form-layout-block-item/index.d.ts +8 -0
- package/dist/types/view/fields/form-layout-block-item/index.stories.d.ts +5 -0
- package/dist/types/view/fields/input-mask/index.stories.d.ts +1 -3
- package/dist/types/view/fields/large-text-box/index.stories.d.ts +1 -3
- package/dist/types/view/fields/radio/index.d.ts +1 -1
- package/dist/types/view/fields/radio/index.stories.d.ts +1 -3
- package/dist/types/view/fields/watch-value.d.ts +2 -2
- package/dist/types/view/form/submit-button/index.d.ts +1 -0
- package/dist/types/view/modals/error/index.d.ts +3 -2
- package/dist/types/view/modals/navigation-prompt/index.d.ts +0 -1
- package/dist/types/view/modals/session-expiry/index.d.ts +0 -1
- package/dist/types/view/modals/wait-message/index.stories.d.ts +6 -2
- package/dist/types/view/modals/wait-message/use-html-wait-message.d.ts +1 -0
- package/dist/types/view/session-timeout/index.stories.d.ts +1 -4
- package/dist/types/view/use-window-size-change.d.ts +1 -0
- package/package.json +28 -26
- package/dist/types/view/media-breakpoint/index.d.ts +0 -1
- package/dist/types/view/modals/wait-message/html-wait-message.d.ts +0 -6
- package/dist/types/view/useMediaBreakpoints/index.d.ts +0 -1
- package/dist/types/view/window-size/index.d.ts +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -39,12 +39,12 @@ __export(lib_exports, {
|
|
|
39
39
|
ErrorToast: () => import_error_toast.ErrorToast,
|
|
40
40
|
Form: () => import_form.Form,
|
|
41
41
|
FormItemLayout: () => import_form_item_layout.FormItemLayout,
|
|
42
|
+
FormLayoutBlockItem: () => import_form_layout_block_item.FormLayoutBlockItem,
|
|
42
43
|
FormSubmitButton: () => import_submit_button.FormSubmitButton,
|
|
43
44
|
InputMask: () => import_input_mask.InputMask,
|
|
44
45
|
LargeTextBox: () => import_large_text_box.LargeTextBox,
|
|
45
46
|
MASK_PIPES: () => import_input_mask.MASK_PIPES,
|
|
46
47
|
MASK_TYPES: () => import_input_mask.MASK_TYPES,
|
|
47
|
-
MediaBreakpoint: () => import_media_breakpoint.MediaBreakpoint,
|
|
48
48
|
MicroApp: () => import_micro_app.MicroApp,
|
|
49
49
|
MicroIFrameApp: () => import_micro_iframe_app.MicroIFrameApp,
|
|
50
50
|
NavigationPromptActions: () => import_actions2.ACTIONS,
|
|
@@ -115,7 +115,7 @@ __export(lib_exports, {
|
|
|
115
115
|
useAppSelector: () => import_react_redux.useAppSelector,
|
|
116
116
|
useInjectReducer: () => import_redux_injectors.useInjectReducer,
|
|
117
117
|
useInjectSaga: () => import_redux_injectors.useInjectSaga,
|
|
118
|
-
|
|
118
|
+
useMediaQueryList: () => import_use_media_query_list.useMediaQueryList,
|
|
119
119
|
waitMessageAction: () => import_actions3.waitMessage,
|
|
120
120
|
withAppDecorator: () => import_decorator.withAppDecorator
|
|
121
121
|
});
|
|
@@ -162,12 +162,12 @@ var import_render_with_router = require("./utils/testing/render-with-router.js")
|
|
|
162
162
|
var import_render_with_state_addons = require("./utils/testing/render-with-state-addons.js");
|
|
163
163
|
var import_helpers2 = require("./api/helpers.js");
|
|
164
164
|
var import_users = require("./api/users/index.js");
|
|
165
|
-
var import_useMediaBreakpoints = require("./view/useMediaBreakpoints/index.js");
|
|
166
165
|
var import_decorator = require("./view/storybook/decorator.js");
|
|
167
166
|
var import_error_toast = require("./view/error-toast/index.js");
|
|
168
167
|
var import_form = require("./view/form/index.js");
|
|
169
168
|
var import_connect_form = require("./view/fields/connect-form.js");
|
|
170
169
|
var import_form_item_layout = require("./view/fields/form-item-layout/index.js");
|
|
170
|
+
var import_form_layout_block_item = require("./view/fields/form-layout-block-item/index.js");
|
|
171
171
|
var import_text_box = require("./view/fields/text-box/index.js");
|
|
172
172
|
var import_large_text_box = require("./view/fields/large-text-box/index.js");
|
|
173
173
|
var import_input_mask = require("./view/fields/input-mask/index.js");
|
|
@@ -178,7 +178,7 @@ var import_radio_group = require("./view/fields/radio-group/index.js");
|
|
|
178
178
|
var import_date_input = require("./view/fields/date-input/index.js");
|
|
179
179
|
var import_date_picker = require("./view/fields/date-picker/index.js");
|
|
180
180
|
var import_submit_button = require("./view/form/submit-button/index.js");
|
|
181
|
-
var
|
|
181
|
+
var import_use_media_query_list = require("./view/breakpoint/use-media-query-list.js");
|
|
182
182
|
var import_visually_hidden = require("./view/visually-hidden/index.js");
|
|
183
183
|
var import_live_message = require("./data/live-message/index.js");
|
|
184
184
|
var import_error = require("./data/error/index.js");
|
|
@@ -31,14 +31,17 @@ __export(hosted_app_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_styled_components = __toESM(require("styled-components"));
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
34
|
+
var import_use_breakpoint = require("../breakpoint/use-breakpoint.js");
|
|
35
|
+
var import_use_window_size_change = require("../use-window-size-change.js");
|
|
36
|
+
var import_use_html_wait_message = require("../modals/wait-message/use-html-wait-message.js");
|
|
37
37
|
var import_style = __toESM(require("./style.js"));
|
|
38
38
|
const Div = import_styled_components.default.div`
|
|
39
39
|
height: 100%;
|
|
40
40
|
`;
|
|
41
|
-
const HostedApp = ({ children }) =>
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
const HostedApp = ({ children }) => {
|
|
42
|
+
(0, import_use_breakpoint.useBreakpoint)();
|
|
43
|
+
(0, import_use_html_wait_message.useHTMLWaitMessage)(true);
|
|
44
|
+
(0, import_use_window_size_change.useWindowSizeChange)();
|
|
45
|
+
return /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement(import_style.default, null), children);
|
|
46
|
+
};
|
|
44
47
|
module.exports = __toCommonJS(hosted_app_exports);
|
|
@@ -32,8 +32,8 @@ __export(stand_alone_app_exports, {
|
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_styled_components = __toESM(require("styled-components"));
|
|
34
34
|
var import_react_aria_live = require("react-aria-live");
|
|
35
|
-
var
|
|
36
|
-
var
|
|
35
|
+
var import_use_breakpoint = require("../breakpoint/use-breakpoint.js");
|
|
36
|
+
var import_use_window_size_change = require("../use-window-size-change.js");
|
|
37
37
|
var import_session_timeout = require("../session-timeout/index.js");
|
|
38
38
|
var import_live_message = require("../live-message/index.js");
|
|
39
39
|
var import_error_toast = require("../error-toast/index.js");
|
|
@@ -46,5 +46,9 @@ const StandAloneApp = ({
|
|
|
46
46
|
manageSession,
|
|
47
47
|
WaitMessage,
|
|
48
48
|
children
|
|
49
|
-
}) =>
|
|
49
|
+
}) => {
|
|
50
|
+
(0, import_use_breakpoint.useBreakpoint)();
|
|
51
|
+
(0, import_use_window_size_change.useWindowSizeChange)();
|
|
52
|
+
return /* @__PURE__ */ React.createElement(import_react_aria_live.LiveAnnouncer, null, /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement(import_style.default, null), manageSession && /* @__PURE__ */ React.createElement(import_session_timeout.SessionTimeout, null), /* @__PURE__ */ React.createElement(import_live_message.LiveMessage, null), WaitMessage || /* @__PURE__ */ React.createElement(import_wait_message.WaitMessage, null), /* @__PURE__ */ React.createElement(import_error_toast.ErrorToast, null), children));
|
|
53
|
+
};
|
|
50
54
|
module.exports = __toCommonJS(stand_alone_app_exports);
|
|
@@ -20,20 +20,20 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
-
var
|
|
24
|
-
__export(
|
|
25
|
-
|
|
23
|
+
var use_breakpoint_exports = {};
|
|
24
|
+
__export(use_breakpoint_exports, {
|
|
25
|
+
useBreakpoint: () => useBreakpoint
|
|
26
26
|
});
|
|
27
27
|
var import_react = require("react");
|
|
28
28
|
var import_styled_components = require("styled-components");
|
|
29
29
|
var import_pubsub_js = require("pubsub-js");
|
|
30
30
|
var import_react_redux = require("../../data/react-redux.js");
|
|
31
31
|
var import_breakpoint = require("../../data/breakpoint/index.js");
|
|
32
|
-
var
|
|
32
|
+
var import_use_media_query_list = require("./use-media-query-list.js");
|
|
33
33
|
var import_constants = require("../../utils/constants.js");
|
|
34
|
-
const
|
|
34
|
+
const useBreakpoint = () => {
|
|
35
35
|
const theme = (0, import_react.useContext)(import_styled_components.ThemeContext);
|
|
36
|
-
const currentBreakpoint = (0,
|
|
36
|
+
const currentBreakpoint = (0, import_use_media_query_list.useMediaQueryList)([
|
|
37
37
|
`(max-width: ${theme.breakpoints.small})`,
|
|
38
38
|
`(max-width: ${theme.breakpoints.medium})`,
|
|
39
39
|
`(max-width: ${theme.breakpoints.large})`
|
|
@@ -43,6 +43,5 @@ const MediaBreakpoint = () => {
|
|
|
43
43
|
dispatch({ type: import_breakpoint.breakpoint.change, payload: currentBreakpoint });
|
|
44
44
|
(0, import_pubsub_js.publish)(import_constants.HOST_WINDOW_BREAKPOINT_CHANGED, currentBreakpoint);
|
|
45
45
|
}, [currentBreakpoint, dispatch]);
|
|
46
|
-
return null;
|
|
47
46
|
};
|
|
48
|
-
module.exports = __toCommonJS(
|
|
47
|
+
module.exports = __toCommonJS(use_breakpoint_exports);
|
|
@@ -20,12 +20,12 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
-
var
|
|
24
|
-
__export(
|
|
25
|
-
|
|
23
|
+
var use_media_query_list_exports = {};
|
|
24
|
+
__export(use_media_query_list_exports, {
|
|
25
|
+
useMediaQueryList: () => useMediaQueryList
|
|
26
26
|
});
|
|
27
27
|
var import_react = require("react");
|
|
28
|
-
const
|
|
28
|
+
const useMediaQueryList = (queries, values, defaultValue) => {
|
|
29
29
|
const mediaQueryLists = queries.map((q) => window.matchMedia(q));
|
|
30
30
|
const getValue = (0, import_react.useCallback)(() => {
|
|
31
31
|
const index = mediaQueryLists.findIndex((mql) => mql.matches);
|
|
@@ -34,9 +34,9 @@ const useMediaBreakpoints = (queries, values, defaultValue) => {
|
|
|
34
34
|
const [value, setValue] = (0, import_react.useState)(getValue);
|
|
35
35
|
(0, import_react.useEffect)(() => {
|
|
36
36
|
const handler = () => setValue(getValue);
|
|
37
|
-
mediaQueryLists.forEach((mql) => mql.
|
|
38
|
-
return () => mediaQueryLists.forEach((mql) => mql.
|
|
37
|
+
mediaQueryLists.forEach((mql) => mql.addEventListener("change", handler));
|
|
38
|
+
return () => mediaQueryLists.forEach((mql) => mql.removeEventListener("change", handler));
|
|
39
39
|
}, [getValue, mediaQueryLists]);
|
|
40
40
|
return value;
|
|
41
41
|
};
|
|
42
|
-
module.exports = __toCommonJS(
|
|
42
|
+
module.exports = __toCommonJS(use_media_query_list_exports);
|
|
@@ -27,26 +27,18 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
28
|
var check_box_exports = {};
|
|
29
29
|
__export(check_box_exports, {
|
|
30
|
-
CHECKBOX_VARIANT: () => import_Checkbox.CHECKBOX_VARIANT,
|
|
31
30
|
CheckBox: () => CheckBox
|
|
32
31
|
});
|
|
33
32
|
var React = __toESM(require("react"));
|
|
34
|
-
var
|
|
33
|
+
var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
|
|
35
34
|
var import_react_hook_form = require("react-hook-form");
|
|
36
|
-
const CheckBox = ({
|
|
37
|
-
name,
|
|
38
|
-
defaultChecked = false,
|
|
39
|
-
rules = {},
|
|
40
|
-
...rest
|
|
41
|
-
}) => /* @__PURE__ */ React.createElement(import_react_hook_form.Controller, {
|
|
35
|
+
const CheckBox = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ React.createElement(import_react_hook_form.Controller, {
|
|
42
36
|
name,
|
|
43
37
|
rules,
|
|
44
|
-
render: ({ field: {
|
|
38
|
+
render: ({ field: { value = false, ...restProps } }) => /* @__PURE__ */ React.createElement(import_ds_controlled_form.DSControlledCheckbox, {
|
|
45
39
|
...rest,
|
|
46
40
|
...restProps,
|
|
47
|
-
|
|
48
|
-
checked: value,
|
|
49
|
-
onChange: (e) => onChange(((e || {}).target || {}).checked)
|
|
41
|
+
checked: value
|
|
50
42
|
})
|
|
51
43
|
});
|
|
52
44
|
module.exports = __toCommonJS(check_box_exports);
|
|
@@ -36,7 +36,6 @@ const ComboBox = ({
|
|
|
36
36
|
name,
|
|
37
37
|
defaultValue = "",
|
|
38
38
|
rules = {},
|
|
39
|
-
onChange: changeHandler,
|
|
40
39
|
...rest
|
|
41
40
|
}) => /* @__PURE__ */ React.createElement(import_react_hook_form.Controller, {
|
|
42
41
|
name,
|
|
@@ -46,9 +45,8 @@ const ComboBox = ({
|
|
|
46
45
|
...rest,
|
|
47
46
|
...props,
|
|
48
47
|
onChange: (selected) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
changeHandler(selected);
|
|
48
|
+
const { value = selected } = selected;
|
|
49
|
+
onChange(value);
|
|
52
50
|
}
|
|
53
51
|
})
|
|
54
52
|
});
|
|
@@ -0,0 +1,54 @@
|
|
|
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 form_layout_block_item_exports = {};
|
|
29
|
+
__export(form_layout_block_item_exports, {
|
|
30
|
+
FormLayoutBlockItem: () => FormLayoutBlockItem
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_ds_form_layout_blocks = require("@elliemae/ds-form-layout-blocks");
|
|
34
|
+
var import_react_hook_form = require("react-hook-form");
|
|
35
|
+
var import_connect_form = require("../connect-form.js");
|
|
36
|
+
const FormLayoutBlockItem = ({
|
|
37
|
+
inputID,
|
|
38
|
+
label,
|
|
39
|
+
...rest
|
|
40
|
+
}) => /* @__PURE__ */ React.createElement(import_connect_form.ConnectForm, null, ({
|
|
41
|
+
formState: { errors }
|
|
42
|
+
}) => {
|
|
43
|
+
const errorField = (0, import_react_hook_form.get)(errors, inputID);
|
|
44
|
+
const hasError = !!errorField;
|
|
45
|
+
const validationMessage = errorField?.message;
|
|
46
|
+
return /* @__PURE__ */ React.createElement(import_ds_form_layout_blocks.DSFormLayoutBlockItem, {
|
|
47
|
+
inputID,
|
|
48
|
+
label,
|
|
49
|
+
hasError,
|
|
50
|
+
validationMessage,
|
|
51
|
+
...rest
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(form_layout_block_item_exports);
|
|
@@ -31,8 +31,10 @@ __export(watch_value_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_styled_components = __toESM(require("styled-components"));
|
|
34
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
34
35
|
var import_react_hook_form = require("react-hook-form");
|
|
35
36
|
const Section = import_styled_components.default.section`
|
|
37
|
+
margin-top: 10px;
|
|
36
38
|
border-top: 2px blue dotted;
|
|
37
39
|
width: 100%;
|
|
38
40
|
`;
|
|
@@ -42,9 +44,9 @@ const Div = import_styled_components.default.div`
|
|
|
42
44
|
padding-left: 10px;
|
|
43
45
|
align-items: flex-start;
|
|
44
46
|
`;
|
|
45
|
-
const WatchValue = ({ name,
|
|
47
|
+
const WatchValue = ({ name, label }) => {
|
|
46
48
|
const { watch } = (0, import_react_hook_form.useFormContext)();
|
|
47
49
|
const data = watch(name, false) || "";
|
|
48
|
-
return /* @__PURE__ */ React.createElement(Section, null, /* @__PURE__ */ React.createElement("h4", null, "Form Data:"), /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement("div", null,
|
|
50
|
+
return /* @__PURE__ */ React.createElement(import_ds_grid.Grid, null, /* @__PURE__ */ React.createElement(Section, null, /* @__PURE__ */ React.createElement("h4", null, "Form Data:"), /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement("div", null, label, " : ", /* @__PURE__ */ React.createElement("strong", null, JSON.stringify(data))))));
|
|
49
51
|
};
|
|
50
52
|
module.exports = __toCommonJS(watch_value_exports);
|
|
@@ -37,48 +37,52 @@ var import_moment = __toESM(require("moment"));
|
|
|
37
37
|
var import_text_box = require("../fields/text-box/index.js");
|
|
38
38
|
var import_combo_box = require("../fields/combo-box/index.js");
|
|
39
39
|
var import_date_input = require("../fields/date-input/index.js");
|
|
40
|
-
var
|
|
41
|
-
const FirstName = () => /* @__PURE__ */ React.createElement(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
var import_form_layout_block_item = require("../fields/form-layout-block-item/index.js");
|
|
41
|
+
const FirstName = () => /* @__PURE__ */ React.createElement(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
42
|
+
label: "First Name",
|
|
43
|
+
inputID: "firstname",
|
|
44
|
+
required: true
|
|
45
|
+
}, /* @__PURE__ */ React.createElement(import_text_box.TextBox, {
|
|
46
|
+
id: "firstname",
|
|
45
47
|
name: "firstname",
|
|
46
|
-
required: true,
|
|
47
48
|
rules: {
|
|
48
49
|
required: { value: true, message: "First Name is required" },
|
|
49
50
|
minLength: { value: 2, message: "Minimum 2 characters" },
|
|
50
51
|
maxLength: { value: 50, message: "Maximum 50 characters" }
|
|
51
52
|
}
|
|
52
|
-
});
|
|
53
|
-
const DOB = () => /* @__PURE__ */ React.createElement(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
}));
|
|
54
|
+
const DOB = () => /* @__PURE__ */ React.createElement(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
55
|
+
label: "Date of Birth",
|
|
56
|
+
inputID: "dob",
|
|
57
|
+
required: true
|
|
58
|
+
}, /* @__PURE__ */ React.createElement(import_date_input.DateInput, {
|
|
59
|
+
id: "dob",
|
|
57
60
|
name: "dob",
|
|
58
|
-
required: true,
|
|
59
61
|
rules: {
|
|
60
62
|
required: { value: true, message: "Date of Birth is required" },
|
|
61
63
|
validate: (value) => (0, import_moment.default)() > value || "Date of Birth can not be greater than current date"
|
|
62
64
|
}
|
|
63
|
-
});
|
|
64
|
-
const State = () => /* @__PURE__ */ React.createElement(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
}));
|
|
66
|
+
const State = () => /* @__PURE__ */ React.createElement(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
67
|
+
label: "State",
|
|
68
|
+
inputID: "state",
|
|
69
|
+
required: true
|
|
70
|
+
}, /* @__PURE__ */ React.createElement(import_combo_box.ComboBox, {
|
|
71
|
+
id: "state",
|
|
68
72
|
name: "state",
|
|
69
|
-
required: true,
|
|
70
73
|
rules: { required: { value: true, message: "State is required" } },
|
|
71
74
|
options: [
|
|
72
75
|
{ value: "ca", label: "California" },
|
|
73
76
|
{ value: "nj", label: "New Jersey" }
|
|
74
77
|
]
|
|
75
|
-
});
|
|
76
|
-
const MaritalStatus = () => /* @__PURE__ */ React.createElement(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
}));
|
|
79
|
+
const MaritalStatus = () => /* @__PURE__ */ React.createElement(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
80
|
+
label: "Marital Status",
|
|
81
|
+
inputID: "marital_status",
|
|
82
|
+
required: true
|
|
83
|
+
}, /* @__PURE__ */ React.createElement(import_combo_box.ComboBox, {
|
|
84
|
+
id: "marital_status",
|
|
80
85
|
name: "marital_status",
|
|
81
|
-
required: true,
|
|
82
86
|
rules: {
|
|
83
87
|
required: { value: true, message: "Marital Status is required" }
|
|
84
88
|
},
|
|
@@ -86,5 +90,5 @@ const MaritalStatus = () => /* @__PURE__ */ React.createElement(import_form_item
|
|
|
86
90
|
{ value: "married", label: "Married" },
|
|
87
91
|
{ value: "single", label: "Single" }
|
|
88
92
|
]
|
|
89
|
-
});
|
|
93
|
+
}));
|
|
90
94
|
module.exports = __toCommonJS(personal_info_section_exports);
|
|
@@ -37,7 +37,7 @@ const FormSubmitButton = ({ ...rest }) => {
|
|
|
37
37
|
formState,
|
|
38
38
|
formProps: { mode }
|
|
39
39
|
} = (0, import_react_hook_form.useFormContext)();
|
|
40
|
-
return /* @__PURE__ */ React.createElement(import_ds_button.
|
|
40
|
+
return /* @__PURE__ */ React.createElement(import_ds_button.DSButtonV2, {
|
|
41
41
|
...rest,
|
|
42
42
|
type: "submit",
|
|
43
43
|
disabled: mode !== "onSubmit" && (!formState.isDirty || formState.isDirty && !formState.isValid)
|
|
@@ -31,23 +31,26 @@ __export(error_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_react = require("react");
|
|
34
|
-
var
|
|
34
|
+
var import_ds_dialog = require("@elliemae/ds-dialog");
|
|
35
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
35
36
|
const Error2 = ({
|
|
36
37
|
open,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
children
|
|
38
|
+
primaryMessage,
|
|
39
|
+
secondaryMessage
|
|
40
40
|
}) => {
|
|
41
|
-
const [isOpen,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
const [isOpen, setOpen] = (0, import_react.useState)(open);
|
|
42
|
+
const handleClick = (0, import_react.useCallback)(() => {
|
|
43
|
+
setOpen((prev) => !prev);
|
|
44
|
+
}, []);
|
|
45
|
+
return /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialog, {
|
|
45
46
|
isOpen,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
onClickOutside: handleClick,
|
|
48
|
+
size: "small"
|
|
49
|
+
}, /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogBody, {
|
|
50
|
+
p: "s"
|
|
51
|
+
}, /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogDefaultLayout, null, /* @__PURE__ */ React.createElement(import_ds_icons.ErrorHexegon, {
|
|
52
|
+
size: "xxl",
|
|
53
|
+
color: ["danger", "900"]
|
|
54
|
+
}), /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogPrimaryMessage, null, primaryMessage), secondaryMessage && /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogSecondaryMessage, null, secondaryMessage))));
|
|
52
55
|
};
|
|
53
56
|
module.exports = __toCommonJS(error_exports);
|
|
@@ -31,21 +31,32 @@ __export(navigation_prompt_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_react = require("react");
|
|
34
|
-
var
|
|
34
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
35
|
+
var import_ds_button = require("@elliemae/ds-button");
|
|
36
|
+
var import_ds_dialog = require("@elliemae/ds-dialog");
|
|
35
37
|
var import_react_redux = require("../../../data/react-redux.js");
|
|
36
38
|
var import_actions = require("../../../data/navigation-prompt/actions.js");
|
|
37
|
-
const NavigationPrompt = (0, import_react.memo)(({ open
|
|
39
|
+
const NavigationPrompt = (0, import_react.memo)(({ open }) => {
|
|
38
40
|
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
const cancelDialog = () => dispatch(import_actions.navigationPrompt.cancel());
|
|
42
|
+
const confirmDialog = () => dispatch(import_actions.navigationPrompt.confirm());
|
|
43
|
+
return /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialog, {
|
|
42
44
|
isOpen: open,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
onClickOutside: cancelDialog,
|
|
46
|
+
centered: true
|
|
47
|
+
}, /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogHeader, null, /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogAddon, null, /* @__PURE__ */ React.createElement(import_ds_button.DSButtonV2, {
|
|
48
|
+
buttonType: "icon",
|
|
49
|
+
onClick: cancelDialog
|
|
50
|
+
}, /* @__PURE__ */ React.createElement(import_ds_icons.Close, {
|
|
51
|
+
color: ["neutral", "900"]
|
|
52
|
+
})))), /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogSeparator, null), /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogBody, {
|
|
53
|
+
px: 24,
|
|
54
|
+
mb: 16
|
|
55
|
+
}, "You currently have unsaved changes. Are you sure you want to proceed without saving?"), /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogSeparator, null), /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogFooter, null, /* @__PURE__ */ React.createElement(import_ds_button.DSButtonV2, {
|
|
56
|
+
buttonType: "outline",
|
|
57
|
+
onClick: cancelDialog
|
|
58
|
+
}, "Continue without saving"), /* @__PURE__ */ React.createElement(import_ds_button.DSButtonV2, {
|
|
59
|
+
onClick: confirmDialog
|
|
60
|
+
}, "Save & Continue")));
|
|
50
61
|
});
|
|
51
62
|
module.exports = __toCommonJS(navigation_prompt_exports);
|
|
@@ -31,12 +31,14 @@ __export(session_expiry_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_react = require("react");
|
|
34
|
-
var
|
|
34
|
+
var import_ds_button = require("@elliemae/ds-button");
|
|
35
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
36
|
+
var import_ds_dialog = require("@elliemae/ds-dialog");
|
|
35
37
|
var import_react_redux = require("../../../data/react-redux.js");
|
|
36
38
|
var import_actions = require("../../../data/logout/actions.js");
|
|
37
39
|
var import_session = require("../../../utils/session.js");
|
|
38
40
|
var import_customHooks = require("./customHooks.js");
|
|
39
|
-
const SessionExpiry = (0, import_react.memo)(({ open, warningNotifiedAt = 0
|
|
41
|
+
const SessionExpiry = (0, import_react.memo)(({ open, warningNotifiedAt = 0 }) => {
|
|
40
42
|
const [isOpen, setIsOpen] = (0, import_react.useState)(open);
|
|
41
43
|
const timeLeft = (0, import_customHooks.useTrackSessionExpiry)(warningNotifiedAt);
|
|
42
44
|
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
@@ -52,21 +54,19 @@ const SessionExpiry = (0, import_react.memo)(({ open, warningNotifiedAt = 0, sho
|
|
|
52
54
|
setIsOpen(false);
|
|
53
55
|
dispatch(import_actions.logout.confirm());
|
|
54
56
|
};
|
|
55
|
-
return /* @__PURE__ */ React.createElement(
|
|
56
|
-
centered: true,
|
|
57
|
-
modalType: import_ds_modal.MODAL_TYPE_V2.DECISION,
|
|
57
|
+
return timeLeft ? /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialog, {
|
|
58
58
|
isOpen,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
59
|
+
size: "small"
|
|
60
|
+
}, /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogBody, {
|
|
61
|
+
p: "s"
|
|
62
|
+
}, /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogDefaultLayout, null, /* @__PURE__ */ React.createElement(import_ds_icons.WarningCircle, {
|
|
63
|
+
size: "xl",
|
|
64
|
+
color: ["warning", "900"]
|
|
65
|
+
}), /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogPrimaryMessage, null, `Your session will expire in ${timeLeft}`), /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogSecondaryMessage, null, "Please logout or reset your session"))), /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogSeparator, null), /* @__PURE__ */ React.createElement(import_ds_dialog.DSDialogFooter, null, /* @__PURE__ */ React.createElement(import_ds_button.DSButtonV2, {
|
|
66
|
+
buttonType: "outline",
|
|
67
|
+
onClick: logoutSession
|
|
68
|
+
}, "Logout"), /* @__PURE__ */ React.createElement(import_ds_button.DSButtonV2, {
|
|
69
|
+
onClick: resetSession
|
|
70
|
+
}, "Reset"))) : null;
|
|
71
71
|
});
|
|
72
72
|
module.exports = __toCommonJS(session_expiry_exports);
|
|
@@ -33,7 +33,7 @@ var React = __toESM(require("react"));
|
|
|
33
33
|
var import_react = require("react");
|
|
34
34
|
var import_ds_loading_indicator = require("@elliemae/ds-loading-indicator");
|
|
35
35
|
var import_react_redux = require("../../../data/react-redux.js");
|
|
36
|
-
var
|
|
36
|
+
var import_use_html_wait_message = require("./use-html-wait-message.js");
|
|
37
37
|
var import_user_wait_event = require("../../../analytics/user-wait-event.js");
|
|
38
38
|
const WaitMessage = (0, import_react.memo)(({
|
|
39
39
|
size = "m",
|
|
@@ -48,15 +48,14 @@ const WaitMessage = (0, import_react.memo)(({
|
|
|
48
48
|
else
|
|
49
49
|
(0, import_user_wait_event.waitEndEvent)();
|
|
50
50
|
}, [isOpen]);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}), /* @__PURE__ */ React.createElement(import_ds_loading_indicator.DSLoadingIndicator, {
|
|
51
|
+
(0, import_use_html_wait_message.useHTMLWaitMessage)(isOpen !== null);
|
|
52
|
+
return /* @__PURE__ */ React.createElement(import_ds_loading_indicator.DSLoadingIndicator, {
|
|
54
53
|
id: "em-loading",
|
|
55
54
|
size,
|
|
56
55
|
style,
|
|
57
56
|
...rest,
|
|
58
57
|
loading: isOpen,
|
|
59
58
|
message
|
|
60
|
-
})
|
|
59
|
+
});
|
|
61
60
|
});
|
|
62
61
|
module.exports = __toCommonJS(wait_message_exports);
|
|
@@ -20,17 +20,16 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
-
var
|
|
24
|
-
__export(
|
|
25
|
-
|
|
23
|
+
var use_html_wait_message_exports = {};
|
|
24
|
+
__export(use_html_wait_message_exports, {
|
|
25
|
+
useHTMLWaitMessage: () => useHTMLWaitMessage
|
|
26
26
|
});
|
|
27
27
|
var import_react = require("react");
|
|
28
|
-
const
|
|
28
|
+
const useHTMLWaitMessage = (close) => {
|
|
29
29
|
(0, import_react.useEffect)(() => {
|
|
30
30
|
const htmlWaitMsgElement = document.getElementById("em-wait-message");
|
|
31
31
|
if (htmlWaitMsgElement && close)
|
|
32
32
|
htmlWaitMsgElement.remove();
|
|
33
33
|
}, [close]);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
module.exports = __toCommonJS(html_wait_message_exports);
|
|
34
|
+
};
|
|
35
|
+
module.exports = __toCommonJS(use_html_wait_message_exports);
|
|
@@ -20,14 +20,14 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
-
var
|
|
24
|
-
__export(
|
|
25
|
-
|
|
23
|
+
var use_window_size_change_exports = {};
|
|
24
|
+
__export(use_window_size_change_exports, {
|
|
25
|
+
useWindowSizeChange: () => useWindowSizeChange
|
|
26
26
|
});
|
|
27
27
|
var import_react = require("react");
|
|
28
28
|
var import_pubsub_js = require("pubsub-js");
|
|
29
|
-
var import_constants = require("
|
|
30
|
-
const
|
|
29
|
+
var import_constants = require("../utils/constants.js");
|
|
30
|
+
const useWindowSizeChange = () => {
|
|
31
31
|
(0, import_react.useEffect)(() => {
|
|
32
32
|
if (window.ResizeObserver) {
|
|
33
33
|
const observer = new ResizeObserver((entries) => {
|
|
@@ -41,6 +41,5 @@ const WindowSize = () => {
|
|
|
41
41
|
return () => {
|
|
42
42
|
};
|
|
43
43
|
}, []);
|
|
44
|
-
return null;
|
|
45
44
|
};
|
|
46
|
-
module.exports = __toCommonJS(
|
|
45
|
+
module.exports = __toCommonJS(use_window_size_change_exports);
|