@elliemae/pui-app-sdk 3.0.0-beta.17 → 3.0.0-beta.20
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/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/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/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/session-timeout/index.stories.d.ts +1 -4
- package/package.json +20 -4
|
@@ -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);
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { DSControlledCheckbox } from "@elliemae/ds-controlled-form";
|
|
3
3
|
import {
|
|
4
4
|
Controller
|
|
5
5
|
} from "react-hook-form";
|
|
6
|
-
const CheckBox = ({
|
|
7
|
-
name,
|
|
8
|
-
defaultChecked = false,
|
|
9
|
-
rules = {},
|
|
10
|
-
...rest
|
|
11
|
-
}) => /* @__PURE__ */ React.createElement(Controller, {
|
|
6
|
+
const CheckBox = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ React.createElement(Controller, {
|
|
12
7
|
name,
|
|
13
8
|
rules,
|
|
14
|
-
render: ({ field: {
|
|
9
|
+
render: ({ field: { value = false, ...restProps } }) => /* @__PURE__ */ React.createElement(DSControlledCheckbox, {
|
|
15
10
|
...rest,
|
|
16
11
|
...restProps,
|
|
17
|
-
|
|
18
|
-
checked: value,
|
|
19
|
-
onChange: (e) => onChange(((e || {}).target || {}).checked)
|
|
12
|
+
checked: value
|
|
20
13
|
})
|
|
21
14
|
});
|
|
22
15
|
export {
|
|
23
|
-
CHECKBOX_VARIANT,
|
|
24
16
|
CheckBox
|
|
25
17
|
};
|
|
@@ -7,7 +7,6 @@ const ComboBox = ({
|
|
|
7
7
|
name,
|
|
8
8
|
defaultValue = "",
|
|
9
9
|
rules = {},
|
|
10
|
-
onChange: changeHandler,
|
|
11
10
|
...rest
|
|
12
11
|
}) => /* @__PURE__ */ React.createElement(Controller, {
|
|
13
12
|
name,
|
|
@@ -17,9 +16,8 @@ const ComboBox = ({
|
|
|
17
16
|
...rest,
|
|
18
17
|
...props,
|
|
19
18
|
onChange: (selected) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
changeHandler(selected);
|
|
19
|
+
const { value = selected } = selected;
|
|
20
|
+
onChange(value);
|
|
23
21
|
}
|
|
24
22
|
})
|
|
25
23
|
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DSFormLayoutBlockItem } from "@elliemae/ds-form-layout-blocks";
|
|
3
|
+
import { get } from "react-hook-form";
|
|
4
|
+
import { ConnectForm } from "../connect-form.js";
|
|
5
|
+
const FormLayoutBlockItem = ({
|
|
6
|
+
inputID,
|
|
7
|
+
label,
|
|
8
|
+
...rest
|
|
9
|
+
}) => /* @__PURE__ */ React.createElement(ConnectForm, null, ({
|
|
10
|
+
formState: { errors }
|
|
11
|
+
}) => {
|
|
12
|
+
const errorField = get(errors, inputID);
|
|
13
|
+
const hasError = !!errorField;
|
|
14
|
+
const validationMessage = errorField?.message;
|
|
15
|
+
return /* @__PURE__ */ React.createElement(DSFormLayoutBlockItem, {
|
|
16
|
+
inputID,
|
|
17
|
+
label,
|
|
18
|
+
hasError,
|
|
19
|
+
validationMessage,
|
|
20
|
+
...rest
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
FormLayoutBlockItem
|
|
25
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import styled from "styled-components";
|
|
3
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
3
4
|
import { useFormContext } from "react-hook-form";
|
|
4
5
|
const Section = styled.section`
|
|
6
|
+
margin-top: 10px;
|
|
5
7
|
border-top: 2px blue dotted;
|
|
6
8
|
width: 100%;
|
|
7
9
|
`;
|
|
@@ -11,10 +13,10 @@ const Div = styled.div`
|
|
|
11
13
|
padding-left: 10px;
|
|
12
14
|
align-items: flex-start;
|
|
13
15
|
`;
|
|
14
|
-
const WatchValue = ({ name,
|
|
16
|
+
const WatchValue = ({ name, label }) => {
|
|
15
17
|
const { watch } = useFormContext();
|
|
16
18
|
const data = watch(name, false) || "";
|
|
17
|
-
return /* @__PURE__ */ React.createElement(Section, null, /* @__PURE__ */ React.createElement("h4", null, "Form Data:"), /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement("div", null,
|
|
19
|
+
return /* @__PURE__ */ React.createElement(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))))));
|
|
18
20
|
};
|
|
19
21
|
export {
|
|
20
22
|
WatchValue
|
|
@@ -3,48 +3,52 @@ import moment from "moment";
|
|
|
3
3
|
import { TextBox } from "../fields/text-box/index.js";
|
|
4
4
|
import { ComboBox } from "../fields/combo-box/index.js";
|
|
5
5
|
import { DateInput } from "../fields/date-input/index.js";
|
|
6
|
-
import {
|
|
7
|
-
const FirstName = () => /* @__PURE__ */ React.createElement(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { FormLayoutBlockItem } from "../fields/form-layout-block-item/index.js";
|
|
7
|
+
const FirstName = () => /* @__PURE__ */ React.createElement(FormLayoutBlockItem, {
|
|
8
|
+
label: "First Name",
|
|
9
|
+
inputID: "firstname",
|
|
10
|
+
required: true
|
|
11
|
+
}, /* @__PURE__ */ React.createElement(TextBox, {
|
|
12
|
+
id: "firstname",
|
|
11
13
|
name: "firstname",
|
|
12
|
-
required: true,
|
|
13
14
|
rules: {
|
|
14
15
|
required: { value: true, message: "First Name is required" },
|
|
15
16
|
minLength: { value: 2, message: "Minimum 2 characters" },
|
|
16
17
|
maxLength: { value: 50, message: "Maximum 50 characters" }
|
|
17
18
|
}
|
|
18
|
-
});
|
|
19
|
-
const DOB = () => /* @__PURE__ */ React.createElement(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
}));
|
|
20
|
+
const DOB = () => /* @__PURE__ */ React.createElement(FormLayoutBlockItem, {
|
|
21
|
+
label: "Date of Birth",
|
|
22
|
+
inputID: "dob",
|
|
23
|
+
required: true
|
|
24
|
+
}, /* @__PURE__ */ React.createElement(DateInput, {
|
|
25
|
+
id: "dob",
|
|
23
26
|
name: "dob",
|
|
24
|
-
required: true,
|
|
25
27
|
rules: {
|
|
26
28
|
required: { value: true, message: "Date of Birth is required" },
|
|
27
29
|
validate: (value) => moment() > value || "Date of Birth can not be greater than current date"
|
|
28
30
|
}
|
|
29
|
-
});
|
|
30
|
-
const State = () => /* @__PURE__ */ React.createElement(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
}));
|
|
32
|
+
const State = () => /* @__PURE__ */ React.createElement(FormLayoutBlockItem, {
|
|
33
|
+
label: "State",
|
|
34
|
+
inputID: "state",
|
|
35
|
+
required: true
|
|
36
|
+
}, /* @__PURE__ */ React.createElement(ComboBox, {
|
|
37
|
+
id: "state",
|
|
34
38
|
name: "state",
|
|
35
|
-
required: true,
|
|
36
39
|
rules: { required: { value: true, message: "State is required" } },
|
|
37
40
|
options: [
|
|
38
41
|
{ value: "ca", label: "California" },
|
|
39
42
|
{ value: "nj", label: "New Jersey" }
|
|
40
43
|
]
|
|
41
|
-
});
|
|
42
|
-
const MaritalStatus = () => /* @__PURE__ */ React.createElement(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
}));
|
|
45
|
+
const MaritalStatus = () => /* @__PURE__ */ React.createElement(FormLayoutBlockItem, {
|
|
46
|
+
label: "Marital Status",
|
|
47
|
+
inputID: "marital_status",
|
|
48
|
+
required: true
|
|
49
|
+
}, /* @__PURE__ */ React.createElement(ComboBox, {
|
|
50
|
+
id: "marital_status",
|
|
46
51
|
name: "marital_status",
|
|
47
|
-
required: true,
|
|
48
52
|
rules: {
|
|
49
53
|
required: { value: true, message: "Marital Status is required" }
|
|
50
54
|
},
|
|
@@ -52,7 +56,7 @@ const MaritalStatus = () => /* @__PURE__ */ React.createElement(FormItemLayout,
|
|
|
52
56
|
{ value: "married", label: "Married" },
|
|
53
57
|
{ value: "single", label: "Single" }
|
|
54
58
|
]
|
|
55
|
-
});
|
|
59
|
+
}));
|
|
56
60
|
export {
|
|
57
61
|
DOB,
|
|
58
62
|
FirstName,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useFormContext } from "react-hook-form";
|
|
3
|
-
import {
|
|
3
|
+
import { DSButtonV2 } from "@elliemae/ds-button";
|
|
4
4
|
const FormSubmitButton = ({ ...rest }) => {
|
|
5
5
|
const {
|
|
6
6
|
formState,
|
|
7
7
|
formProps: { mode }
|
|
8
8
|
} = useFormContext();
|
|
9
|
-
return /* @__PURE__ */ React.createElement(
|
|
9
|
+
return /* @__PURE__ */ React.createElement(DSButtonV2, {
|
|
10
10
|
...rest,
|
|
11
11
|
type: "submit",
|
|
12
12
|
disabled: mode !== "onSubmit" && (!formState.isDirty || formState.isDirty && !formState.isValid)
|
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import {
|
|
2
|
+
import { useState, useCallback } from "react";
|
|
3
|
+
import {
|
|
4
|
+
DSDialog,
|
|
5
|
+
DSDialogBody,
|
|
6
|
+
DSDialogDefaultLayout,
|
|
7
|
+
DSDialogPrimaryMessage,
|
|
8
|
+
DSDialogSecondaryMessage
|
|
9
|
+
} from "@elliemae/ds-dialog";
|
|
10
|
+
import { ErrorHexegon } from "@elliemae/ds-icons";
|
|
4
11
|
const Error = ({
|
|
5
12
|
open,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
children
|
|
13
|
+
primaryMessage,
|
|
14
|
+
secondaryMessage
|
|
9
15
|
}) => {
|
|
10
|
-
const [isOpen,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
const [isOpen, setOpen] = useState(open);
|
|
17
|
+
const handleClick = useCallback(() => {
|
|
18
|
+
setOpen((prev) => !prev);
|
|
19
|
+
}, []);
|
|
20
|
+
return /* @__PURE__ */ React.createElement(DSDialog, {
|
|
14
21
|
isOpen,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
onClickOutside: handleClick,
|
|
23
|
+
size: "small"
|
|
24
|
+
}, /* @__PURE__ */ React.createElement(DSDialogBody, {
|
|
25
|
+
p: "s"
|
|
26
|
+
}, /* @__PURE__ */ React.createElement(DSDialogDefaultLayout, null, /* @__PURE__ */ React.createElement(ErrorHexegon, {
|
|
27
|
+
size: "xxl",
|
|
28
|
+
color: ["danger", "900"]
|
|
29
|
+
}), /* @__PURE__ */ React.createElement(DSDialogPrimaryMessage, null, primaryMessage), secondaryMessage && /* @__PURE__ */ React.createElement(DSDialogSecondaryMessage, null, secondaryMessage))));
|
|
21
30
|
};
|
|
22
31
|
export {
|
|
23
32
|
Error
|
|
@@ -1,21 +1,39 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { memo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Close } from "@elliemae/ds-icons";
|
|
4
|
+
import { DSButtonV2 } from "@elliemae/ds-button";
|
|
5
|
+
import {
|
|
6
|
+
DSDialog,
|
|
7
|
+
DSDialogHeader,
|
|
8
|
+
DSDialogBody,
|
|
9
|
+
DSDialogFooter,
|
|
10
|
+
DSDialogSeparator,
|
|
11
|
+
DSDialogAddon
|
|
12
|
+
} from "@elliemae/ds-dialog";
|
|
4
13
|
import { useAppDispatch } from "../../../data/react-redux.js";
|
|
5
14
|
import { navigationPrompt } from "../../../data/navigation-prompt/actions.js";
|
|
6
|
-
const NavigationPrompt = memo(({ open
|
|
15
|
+
const NavigationPrompt = memo(({ open }) => {
|
|
7
16
|
const dispatch = useAppDispatch();
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
17
|
+
const cancelDialog = () => dispatch(navigationPrompt.cancel());
|
|
18
|
+
const confirmDialog = () => dispatch(navigationPrompt.confirm());
|
|
19
|
+
return /* @__PURE__ */ React.createElement(DSDialog, {
|
|
11
20
|
isOpen: open,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
onClickOutside: cancelDialog,
|
|
22
|
+
centered: true
|
|
23
|
+
}, /* @__PURE__ */ React.createElement(DSDialogHeader, null, /* @__PURE__ */ React.createElement(DSDialogAddon, null, /* @__PURE__ */ React.createElement(DSButtonV2, {
|
|
24
|
+
buttonType: "icon",
|
|
25
|
+
onClick: cancelDialog
|
|
26
|
+
}, /* @__PURE__ */ React.createElement(Close, {
|
|
27
|
+
color: ["neutral", "900"]
|
|
28
|
+
})))), /* @__PURE__ */ React.createElement(DSDialogSeparator, null), /* @__PURE__ */ React.createElement(DSDialogBody, {
|
|
29
|
+
px: 24,
|
|
30
|
+
mb: 16
|
|
31
|
+
}, "You currently have unsaved changes. Are you sure you want to proceed without saving?"), /* @__PURE__ */ React.createElement(DSDialogSeparator, null), /* @__PURE__ */ React.createElement(DSDialogFooter, null, /* @__PURE__ */ React.createElement(DSButtonV2, {
|
|
32
|
+
buttonType: "outline",
|
|
33
|
+
onClick: cancelDialog
|
|
34
|
+
}, "Continue without saving"), /* @__PURE__ */ React.createElement(DSButtonV2, {
|
|
35
|
+
onClick: confirmDialog
|
|
36
|
+
}, "Save & Continue")));
|
|
19
37
|
});
|
|
20
38
|
export {
|
|
21
39
|
NavigationPrompt
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { memo, useEffect, useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { DSButtonV2 } from "@elliemae/ds-button";
|
|
4
|
+
import { WarningCircle } from "@elliemae/ds-icons";
|
|
5
|
+
import {
|
|
6
|
+
DSDialog,
|
|
7
|
+
DSDialogDefaultLayout,
|
|
8
|
+
DSDialogPrimaryMessage,
|
|
9
|
+
DSDialogSecondaryMessage,
|
|
10
|
+
DSDialogBody,
|
|
11
|
+
DSDialogFooter,
|
|
12
|
+
DSDialogSeparator
|
|
13
|
+
} from "@elliemae/ds-dialog";
|
|
4
14
|
import { useAppDispatch } from "../../../data/react-redux.js";
|
|
5
15
|
import { logout } from "../../../data/logout/actions.js";
|
|
6
16
|
import { resetUserIdleTime } from "../../../utils/session.js";
|
|
7
17
|
import { useTrackSessionExpiry } from "./customHooks.js";
|
|
8
|
-
const SessionExpiry = memo(({ open, warningNotifiedAt = 0
|
|
18
|
+
const SessionExpiry = memo(({ open, warningNotifiedAt = 0 }) => {
|
|
9
19
|
const [isOpen, setIsOpen] = useState(open);
|
|
10
20
|
const timeLeft = useTrackSessionExpiry(warningNotifiedAt);
|
|
11
21
|
const dispatch = useAppDispatch();
|
|
@@ -21,22 +31,20 @@ const SessionExpiry = memo(({ open, warningNotifiedAt = 0, showHeader = false })
|
|
|
21
31
|
setIsOpen(false);
|
|
22
32
|
dispatch(logout.confirm());
|
|
23
33
|
};
|
|
24
|
-
return /* @__PURE__ */ React.createElement(
|
|
25
|
-
centered: true,
|
|
26
|
-
modalType: MODAL_TYPE_V2.DECISION,
|
|
34
|
+
return timeLeft ? /* @__PURE__ */ React.createElement(DSDialog, {
|
|
27
35
|
isOpen,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
36
|
+
size: "small"
|
|
37
|
+
}, /* @__PURE__ */ React.createElement(DSDialogBody, {
|
|
38
|
+
p: "s"
|
|
39
|
+
}, /* @__PURE__ */ React.createElement(DSDialogDefaultLayout, null, /* @__PURE__ */ React.createElement(WarningCircle, {
|
|
40
|
+
size: "xl",
|
|
41
|
+
color: ["warning", "900"]
|
|
42
|
+
}), /* @__PURE__ */ React.createElement(DSDialogPrimaryMessage, null, `Your session will expire in ${timeLeft}`), /* @__PURE__ */ React.createElement(DSDialogSecondaryMessage, null, "Please logout or reset your session"))), /* @__PURE__ */ React.createElement(DSDialogSeparator, null), /* @__PURE__ */ React.createElement(DSDialogFooter, null, /* @__PURE__ */ React.createElement(DSButtonV2, {
|
|
43
|
+
buttonType: "outline",
|
|
44
|
+
onClick: logoutSession
|
|
45
|
+
}, "Logout"), /* @__PURE__ */ React.createElement(DSButtonV2, {
|
|
46
|
+
onClick: resetSession
|
|
47
|
+
}, "Reset"))) : null;
|
|
40
48
|
});
|
|
41
49
|
export {
|
|
42
50
|
SessionExpiry
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CHECKBOX_VARIANT } from '@elliemae/ds-form/Checkbox';
|
|
3
2
|
import { RegisterOptions, FieldValues, FieldPath } from 'react-hook-form';
|
|
4
3
|
export declare type CheckBoxProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
5
4
|
name: string;
|
|
6
|
-
|
|
5
|
+
label: string;
|
|
7
6
|
rules?: Omit<RegisterOptions<TFieldValues, TName>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs'>;
|
|
8
7
|
[x: string]: any;
|
|
9
8
|
};
|
|
10
|
-
export declare const CheckBox: ({ name,
|
|
11
|
-
export { CHECKBOX_VARIANT };
|
|
9
|
+
export declare const CheckBox: ({ name, rules, ...rest }: CheckBoxProps) => JSX.Element;
|
|
@@ -2,6 +2,4 @@ import { Story, Meta } from '@storybook/react';
|
|
|
2
2
|
import { CheckBoxProps } from './index.js';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Basic: Story<CheckBoxProps<import("react-hook-form").FieldValues, string
|
|
6
|
-
labelText: string;
|
|
7
|
-
}>;
|
|
5
|
+
export declare const Basic: Story<CheckBoxProps<import("react-hook-form").FieldValues, string>>;
|
|
@@ -4,7 +4,6 @@ export declare type ComboBoxProps<TFieldValues extends FieldValues = FieldValues
|
|
|
4
4
|
name: string;
|
|
5
5
|
defaultValue?: string;
|
|
6
6
|
rules?: Omit<RegisterOptions<TFieldValues, TName>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs'>;
|
|
7
|
-
onChange: (e: React.BaseSyntheticEvent) => void;
|
|
8
7
|
[x: string]: any;
|
|
9
8
|
};
|
|
10
|
-
export declare const ComboBox: ({ name, defaultValue, rules,
|
|
9
|
+
export declare const ComboBox: ({ name, defaultValue, rules, ...rest }: ComboBoxProps) => JSX.Element;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Story, Meta } from '@storybook/react';
|
|
2
|
-
import {
|
|
2
|
+
import { ComboBoxProps } from './index.js';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Basic: Story<
|
|
6
|
-
labelText: string;
|
|
7
|
-
}>;
|
|
5
|
+
export declare const Basic: Story<ComboBoxProps<import("react-hook-form").FieldValues, string>>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { RegisterOptions, FieldValues, FieldPath } from 'react-hook-form';
|
|
3
3
|
export declare type DatePickerProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
4
4
|
name: string;
|
|
5
|
+
labelText: string;
|
|
5
6
|
defaultValue?: string;
|
|
6
7
|
rules?: Omit<RegisterOptions<TFieldValues, TName>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs'>;
|
|
7
8
|
[x: string]: any;
|
|
@@ -2,6 +2,4 @@ import { Story, Meta } from '@storybook/react';
|
|
|
2
2
|
import { DatePickerProps } from './index.js';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Basic: Story<DatePickerProps<import("react-hook-form").FieldValues, string
|
|
6
|
-
labelText: string;
|
|
7
|
-
}>;
|
|
5
|
+
export declare const Basic: Story<DatePickerProps<import("react-hook-form").FieldValues, string>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type FormLayoutBlockItemProps = {
|
|
3
|
+
inputID: string;
|
|
4
|
+
label: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
};
|
|
8
|
+
export declare const FormLayoutBlockItem: ({ inputID, label, ...rest }: FormLayoutBlockItemProps) => JSX.Element;
|
|
@@ -2,6 +2,4 @@ import { Story, Meta } from '@storybook/react';
|
|
|
2
2
|
import { InputMaskProps } from './index.js';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Basic: Story<InputMaskProps<import("react-hook-form").FieldValues, string
|
|
6
|
-
labelText: string;
|
|
7
|
-
}>;
|
|
5
|
+
export declare const Basic: Story<InputMaskProps<import("react-hook-form").FieldValues, string>>;
|
|
@@ -2,6 +2,4 @@ import { Story, Meta } from '@storybook/react';
|
|
|
2
2
|
import { LargeTextBoxProps } from './index.js';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Basic: Story<LargeTextBoxProps<import("react-hook-form").FieldValues, string
|
|
6
|
-
labelText: string;
|
|
7
|
-
}>;
|
|
5
|
+
export declare const Basic: Story<LargeTextBoxProps<import("react-hook-form").FieldValues, string>>;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { RegisterOptions, FieldValues, FieldPath } from 'react-hook-form';
|
|
3
3
|
export declare type RadioProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
4
4
|
name: string;
|
|
5
|
+
labelText: string;
|
|
5
6
|
defaultChecked?: boolean;
|
|
6
7
|
rules?: Omit<RegisterOptions<TFieldValues, TName>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs'>;
|
|
7
|
-
mask: <T>(value: T) => T;
|
|
8
8
|
[x: string]: any;
|
|
9
9
|
};
|
|
10
10
|
export declare const Radio: ({ name, defaultChecked, rules, ...rest }: RadioProps) => JSX.Element;
|
|
@@ -2,6 +2,4 @@ import { Story, Meta } from '@storybook/react';
|
|
|
2
2
|
import { RadioProps } from './index.js';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Basic: Story<RadioProps<import("react-hook-form").FieldValues, string
|
|
6
|
-
labelText: string;
|
|
7
|
-
}>;
|
|
5
|
+
export declare const Basic: Story<RadioProps<import("react-hook-form").FieldValues, string>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare type WatchValueProps = {
|
|
3
3
|
name: string;
|
|
4
|
-
|
|
4
|
+
label: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const WatchValue: ({ name,
|
|
6
|
+
export declare const WatchValue: ({ name, label }: WatchValueProps) => JSX.Element;
|
|
@@ -4,6 +4,7 @@ export declare type CustomFormProviderProps = UseFormReturn & {
|
|
|
4
4
|
formProps: UseFormProps;
|
|
5
5
|
};
|
|
6
6
|
export declare type FormSubmitButtonProps = {
|
|
7
|
+
children: React.ReactNode;
|
|
7
8
|
[x: string]: any;
|
|
8
9
|
};
|
|
9
10
|
export declare const FormSubmitButton: ({ ...rest }: FormSubmitButtonProps) => JSX.Element;
|
|
@@ -3,6 +3,7 @@ export interface ErrorProps {
|
|
|
3
3
|
open: boolean;
|
|
4
4
|
name: string;
|
|
5
5
|
showHeader?: boolean;
|
|
6
|
-
|
|
6
|
+
primaryMessage: React.ReactNode;
|
|
7
|
+
secondaryMessage?: React.ReactNode;
|
|
7
8
|
}
|
|
8
|
-
export declare const Error: ({ open,
|
|
9
|
+
export declare const Error: ({ open, primaryMessage, secondaryMessage, }: ErrorProps) => JSX.Element;
|
|
@@ -2,5 +2,9 @@ import { Story, Meta } from '@storybook/react';
|
|
|
2
2
|
import { WaitMessageProps } from './index.js';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Basic: Story<WaitMessageProps
|
|
6
|
-
|
|
5
|
+
export declare const Basic: Story<WaitMessageProps & {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const Close: Story<WaitMessageProps & {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-app-sdk",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.20",
|
|
4
4
|
"description": "ICE MT UI Platform Application SDK ",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -11,35 +11,41 @@
|
|
|
11
11
|
"types": "./dist/types/index.d.ts",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
14
15
|
"import": "./dist/es/index.js",
|
|
15
|
-
"require": "./dist/cjs/index.js"
|
|
16
|
-
"types": "./dist/types/index.d.ts"
|
|
16
|
+
"require": "./dist/cjs/index.js"
|
|
17
17
|
},
|
|
18
18
|
"./storybook/*": {
|
|
19
19
|
"import": "./dist/es/utils/storybook/*.js",
|
|
20
20
|
"require": "./dist/cjs/utils/storybook/*.js"
|
|
21
21
|
},
|
|
22
22
|
"./auth": {
|
|
23
|
+
"types": "./dist/types/utils/auth/index.d.ts",
|
|
23
24
|
"import": "./dist/es/utils/auth/index.js",
|
|
24
25
|
"require": "./dist/cjs/utils/auth/index.js"
|
|
25
26
|
},
|
|
26
27
|
"./app-config": {
|
|
28
|
+
"types": "./dist/types/utils/app-config/index.d.ts",
|
|
27
29
|
"import": "./dist/es/utils/app-config/index.js",
|
|
28
30
|
"require": "./dist/cjs/utils/app-config/index.js"
|
|
29
31
|
},
|
|
30
32
|
"./http-client": {
|
|
33
|
+
"types": "./dist/types/communication/http-client/index.d.ts",
|
|
31
34
|
"import": "./dist/es/communication/http-client/index.js",
|
|
32
35
|
"require": "./dist/cjs/communication/http-client/index.js"
|
|
33
36
|
},
|
|
34
37
|
"./analytics": {
|
|
38
|
+
"types": "./dist/types/analytics/index.d.ts",
|
|
35
39
|
"import": "./dist/es/analytics/index.js",
|
|
36
40
|
"require": "./dist/cjs/analytics/index.js"
|
|
37
41
|
},
|
|
38
42
|
"./data": {
|
|
43
|
+
"types": "./dist/types/data/index.d.ts",
|
|
39
44
|
"import": "./dist/es/data/index.js",
|
|
40
45
|
"require": "./dist/cjs/data/index.js"
|
|
41
46
|
},
|
|
42
47
|
"./micro-frontend": {
|
|
48
|
+
"types": "./dist/types/micro-frontend.d.ts",
|
|
43
49
|
"import": "./dist/es/micro-frontend.js",
|
|
44
50
|
"require": "./dist/cjs/micro-frontend.js"
|
|
45
51
|
}
|
|
@@ -100,8 +106,13 @@
|
|
|
100
106
|
"@elliemae/app-react-dependencies": "^3.0.0-beta.3",
|
|
101
107
|
"@elliemae/ds-basic": "^2.3.0-alpha.2",
|
|
102
108
|
"@elliemae/ds-button": "^2.3.0-alpha.2",
|
|
109
|
+
"@elliemae/ds-controlled-form": "^2.3.0-alpha.2",
|
|
103
110
|
"@elliemae/ds-date-picker": "^2.3.0-alpha.2",
|
|
111
|
+
"@elliemae/ds-date-range-picker": "^2.3.0-alpha.2",
|
|
112
|
+
"@elliemae/ds-dialog": "^2.3.0-alpha.2",
|
|
104
113
|
"@elliemae/ds-form": "^2.3.0-alpha.2",
|
|
114
|
+
"@elliemae/ds-form-layout-blocks": "^2.3.0-alpha.2",
|
|
115
|
+
"@elliemae/ds-grid": "^2.3.0-alpha.2",
|
|
105
116
|
"@elliemae/ds-loading-indicator": "^2.3.0-alpha.2",
|
|
106
117
|
"@elliemae/ds-modal": "^2.3.0-alpha.2",
|
|
107
118
|
"@elliemae/ds-popperjs": "^2.3.0-alpha.2",
|
|
@@ -117,14 +128,19 @@
|
|
|
117
128
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.2.1",
|
|
118
129
|
"@elliemae/ds-basic": "~2.3.0-alpha.2",
|
|
119
130
|
"@elliemae/ds-button": "~2.3.0-alpha.2",
|
|
131
|
+
"@elliemae/ds-controlled-form": "~2.3.0-alpha.2",
|
|
120
132
|
"@elliemae/ds-date-picker": "~2.3.0-alpha.2",
|
|
133
|
+
"@elliemae/ds-date-range-picker": "~2.3.0-alpha.2",
|
|
134
|
+
"@elliemae/ds-dialog": "~2.3.0-alpha.2",
|
|
121
135
|
"@elliemae/ds-form": "~2.3.0-alpha.2",
|
|
136
|
+
"@elliemae/ds-form-layout-blocks": "~2.3.0-alpha.2",
|
|
137
|
+
"@elliemae/ds-grid": "~2.3.0-alpha.2",
|
|
122
138
|
"@elliemae/ds-loading-indicator": "~2.3.0-alpha.2",
|
|
123
139
|
"@elliemae/ds-modal": "~2.3.0-alpha.2",
|
|
124
140
|
"@elliemae/ds-popperjs": "~2.3.0-alpha.2",
|
|
125
141
|
"@elliemae/ds-toast": "~2.3.0-alpha.2",
|
|
126
142
|
"@elliemae/em-ssf-guest": "~1.11.1",
|
|
127
|
-
"@elliemae/pui-cli": "~6.0.0-beta.
|
|
143
|
+
"@elliemae/pui-cli": "~6.0.0-beta.37",
|
|
128
144
|
"@elliemae/pui-diagnostics": "~2.7.3",
|
|
129
145
|
"@elliemae/pui-e2e-test-sdk": "~6.9.0",
|
|
130
146
|
"@elliemae/pui-micro-frontend-base": "~1.10.1",
|