@elliemae/pui-app-sdk 4.10.0-beta.7 → 4.11.0-beta.1
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 +10 -2
- package/dist/cjs/view/app-root/index.js +13 -9
- package/dist/cjs/view/error-boundary/index.js +2 -1
- 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 +1 -2
- package/dist/cjs/view/micro-app/resources/manifest.js +1 -1
- package/dist/esm/index.js +10 -2
- package/dist/esm/view/app-root/index.js +14 -10
- package/dist/esm/view/error-boundary/index.js +2 -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 +1 -2
- package/dist/esm/view/micro-app/resources/manifest.js +1 -1
- package/dist/types/lib/data/live-message/index.d.ts +2 -2
- package/dist/types/lib/index.d.ts +6 -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/index.js
CHANGED
|
@@ -39,6 +39,8 @@ __export(lib_exports, {
|
|
|
39
39
|
ConnectForm: () => import_connect_form.ConnectForm,
|
|
40
40
|
DateInput: () => import_date_input.DateInput,
|
|
41
41
|
DatePicker: () => import_date_picker.DatePicker,
|
|
42
|
+
DateRangePicker: () => import_date_range_picker.DateRangePicker,
|
|
43
|
+
DateTimePicker: () => import_date_time_picker.DateTimePicker,
|
|
42
44
|
ErrorBoundary: () => import_error_boundary.ErrorBoundary,
|
|
43
45
|
ErrorToast: () => import_error_toast.ErrorToast,
|
|
44
46
|
Form: () => import_form.Form,
|
|
@@ -46,6 +48,7 @@ __export(lib_exports, {
|
|
|
46
48
|
FormLayoutBlockItem: () => import_form_layout_block_item.FormLayoutBlockItem,
|
|
47
49
|
FormSubmitButton: () => import_submit_button.FormSubmitButton,
|
|
48
50
|
InputMask: () => import_input_mask.InputMask,
|
|
51
|
+
InputText: () => import_input_text.InputText,
|
|
49
52
|
LargeTextBox: () => import_large_text_box.LargeTextBox,
|
|
50
53
|
MASK_PIPES: () => import_input_mask.MASK_PIPES,
|
|
51
54
|
MASK_TYPES: () => import_input_mask.MASK_TYPES,
|
|
@@ -62,6 +65,7 @@ __export(lib_exports, {
|
|
|
62
65
|
SessionTimeout: () => import_session_timeout.SessionTimeout,
|
|
63
66
|
TextBox: () => import_text_box.TextBox,
|
|
64
67
|
Themes: () => import_constants2.Themes,
|
|
68
|
+
Toggle: () => import_toggle.Toggle,
|
|
65
69
|
VisuallyHidden: () => import_visually_hidden.VisuallyHidden,
|
|
66
70
|
WaitMessage: () => import_wait_message.WaitMessage,
|
|
67
71
|
ariaLive: () => import_live_message.actions,
|
|
@@ -179,23 +183,27 @@ var import_render_with_state_addons = require("./utils/testing/render-with-state
|
|
|
179
183
|
var import_helpers2 = require("./api/helpers.js");
|
|
180
184
|
var import_users = require("./api/users/index.js");
|
|
181
185
|
var import_decorator = require("./view/storybook/decorator.js");
|
|
182
|
-
var import_autocomplete = require("./view/fields/autocomplete/index.js");
|
|
183
186
|
var import_error_toast = require("./view/error-toast/index.js");
|
|
184
187
|
var import_navigation_prompt = require("./view/modals/navigation-prompt/index.js");
|
|
185
188
|
var import_form = require("./view/form/index.js");
|
|
186
|
-
var import_combo_box_v3 = require("./view/fields/combo-box-v3/index.js");
|
|
187
189
|
var import_connect_form = require("./view/fields/connect-form.js");
|
|
188
190
|
var import_form_item_layout = require("./view/fields/form-item-layout/index.js");
|
|
189
191
|
var import_form_layout_block_item = require("./view/fields/form-layout-block-item/index.js");
|
|
190
192
|
var import_text_box = require("./view/fields/text-box/index.js");
|
|
193
|
+
var import_input_text = require("./view/fields/input-text/index.js");
|
|
191
194
|
var import_large_text_box = require("./view/fields/large-text-box/index.js");
|
|
192
195
|
var import_input_mask = require("./view/fields/input-mask/index.js");
|
|
193
196
|
var import_combo_box = require("./view/fields/combo-box/index.js");
|
|
197
|
+
var import_combo_box_v3 = require("./view/fields/combo-box-v3/index.js");
|
|
194
198
|
var import_check_box = require("./view/fields/check-box/index.js");
|
|
195
199
|
var import_radio = require("./view/fields/radio/index.js");
|
|
196
200
|
var import_radio_group = require("./view/fields/radio-group/index.js");
|
|
197
201
|
var import_date_input = require("./view/fields/date-input/index.js");
|
|
198
202
|
var import_date_picker = require("./view/fields/date-picker/index.js");
|
|
203
|
+
var import_date_time_picker = require("./view/fields/date-time-picker/index.js");
|
|
204
|
+
var import_date_range_picker = require("./view/fields/date-range-picker/index.js");
|
|
205
|
+
var import_autocomplete = require("./view/fields/autocomplete/index.js");
|
|
206
|
+
var import_toggle = require("./view/fields/toggle/index.js");
|
|
199
207
|
var import_submit_button = require("./view/form/submit-button/index.js");
|
|
200
208
|
var import_use_media_query_list = require("./view/breakpoint/use-media-query-list.js");
|
|
201
209
|
var import_visually_hidden = require("./view/visually-hidden/index.js");
|
|
@@ -43,12 +43,16 @@ const AppRoot = ({
|
|
|
43
43
|
manageSession = false,
|
|
44
44
|
WaitMessage,
|
|
45
45
|
errorTemplate,
|
|
46
|
-
children
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
children,
|
|
47
|
+
strictMode = true
|
|
48
|
+
}) => {
|
|
49
|
+
const ParentEle = strictMode ? import_react.StrictMode : import_react.Fragment;
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ParentEle, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_error_boundary.ErrorBoundary, { errorTemplate, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_redux.Provider, { store, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_app_router.AppRouter, { history, basename, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled_components.ThemeProvider, { theme, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
AppToRender,
|
|
52
|
+
{
|
|
53
|
+
manageSession,
|
|
54
|
+
WaitMessage,
|
|
55
|
+
children
|
|
56
|
+
}
|
|
57
|
+
) }) }) }) }) });
|
|
58
|
+
};
|
|
@@ -22,32 +22,40 @@ __export(autocomplete_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(autocomplete_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_react = require("react");
|
|
25
26
|
var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
|
|
26
27
|
var import_react_hook_form = require("react-hook-form");
|
|
27
28
|
const filterOptions = (allOptions, newFilter) => {
|
|
29
|
+
if (!newFilter)
|
|
30
|
+
return allOptions;
|
|
28
31
|
const filtered = allOptions.filter(
|
|
29
|
-
(option) => option.type === "section" || option.label.toLowerCase().includes(newFilter?.toLowerCase())
|
|
32
|
+
(option) => option.type === "section" || option.type !== "separator" && option.label.toLowerCase().includes(newFilter?.toLowerCase())
|
|
30
33
|
);
|
|
31
34
|
return filtered.length === 1 && filtered[0].type === "section" ? [] : filtered;
|
|
32
35
|
};
|
|
33
|
-
const Autocomplete = ({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
36
|
+
const Autocomplete = ({ children, ...rest }) => {
|
|
37
|
+
const { watch, setValue } = (0, import_react_hook_form.useFormContext)();
|
|
38
|
+
const watchedFilter = watch(rest.name);
|
|
39
|
+
const onSelect = (0, import_react.useCallback)(
|
|
40
|
+
(newValue, ...otherArgs) => {
|
|
41
|
+
if (rest.onSelect)
|
|
42
|
+
rest.onSelect(newValue, ...otherArgs);
|
|
43
|
+
else
|
|
44
|
+
setValue(rest.name, newValue, {
|
|
45
|
+
shouldValidate: true,
|
|
46
|
+
shouldDirty: true,
|
|
47
|
+
shouldTouch: true
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
[rest, setValue]
|
|
51
|
+
);
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
+
import_ds_controlled_form.DSAutocomplete,
|
|
54
|
+
{
|
|
55
|
+
filter: watchedFilter ?? "",
|
|
56
|
+
onSelect,
|
|
57
|
+
options: filterOptions(rest.options, watchedFilter),
|
|
58
|
+
children
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
};
|
|
@@ -28,6 +28,7 @@ const ComboBoxV3 = ({
|
|
|
28
28
|
name,
|
|
29
29
|
defaultValue = null,
|
|
30
30
|
rules = {},
|
|
31
|
+
filteredOptions = null,
|
|
31
32
|
...rest
|
|
32
33
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
34
|
import_react_hook_form.Controller,
|
|
@@ -39,9 +40,10 @@ const ComboBoxV3 = ({
|
|
|
39
40
|
import_ds_controlled_form.DSComboBox,
|
|
40
41
|
{
|
|
41
42
|
...props,
|
|
43
|
+
...rest,
|
|
44
|
+
filteredOptions,
|
|
42
45
|
selectedValues: value,
|
|
43
|
-
onChange
|
|
44
|
-
...rest
|
|
46
|
+
onChange
|
|
45
47
|
}
|
|
46
48
|
)
|
|
47
49
|
}
|
|
@@ -21,13 +21,68 @@ __export(date_time_picker_exports, {
|
|
|
21
21
|
DateTimePicker: () => DateTimePicker
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(date_time_picker_exports);
|
|
24
|
-
var import_jsx_runtime =
|
|
24
|
+
var import_jsx_runtime = (
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
require("react/jsx-runtime")
|
|
28
|
+
);
|
|
25
29
|
var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
|
|
26
30
|
var import_react_hook_form = require("react-hook-form");
|
|
31
|
+
const getConfig = (value, onChange) => ({
|
|
32
|
+
"full-date-time": {
|
|
33
|
+
dateTime: value,
|
|
34
|
+
onDateTimeChange: onChange
|
|
35
|
+
},
|
|
36
|
+
"date-time-inputs": {
|
|
37
|
+
dateTime: value,
|
|
38
|
+
onDateTimeChange: onChange
|
|
39
|
+
},
|
|
40
|
+
"date-time-picker": {
|
|
41
|
+
dateTime: value,
|
|
42
|
+
onDateTimeChange: onChange
|
|
43
|
+
},
|
|
44
|
+
"date-time-picker-controller-only": {
|
|
45
|
+
dateTime: value,
|
|
46
|
+
onDateTimeChange: onChange
|
|
47
|
+
},
|
|
48
|
+
"date-inputs": {
|
|
49
|
+
date: value,
|
|
50
|
+
onDateChange: onChange
|
|
51
|
+
},
|
|
52
|
+
"date-picker": {
|
|
53
|
+
date: value,
|
|
54
|
+
onDateChange: onChange
|
|
55
|
+
},
|
|
56
|
+
"date-picker-controller-only": {
|
|
57
|
+
date: value,
|
|
58
|
+
onDateChange: onChange
|
|
59
|
+
},
|
|
60
|
+
"full-date": {
|
|
61
|
+
date: value,
|
|
62
|
+
onDateChange: onChange
|
|
63
|
+
},
|
|
64
|
+
"full-time": {
|
|
65
|
+
time: value,
|
|
66
|
+
onTimeChange: onChange
|
|
67
|
+
},
|
|
68
|
+
"time-inputs": {
|
|
69
|
+
time: value,
|
|
70
|
+
onTimeChange: onChange
|
|
71
|
+
},
|
|
72
|
+
"time-picker-controller-only": {
|
|
73
|
+
time: value,
|
|
74
|
+
onTimeChange: onChange
|
|
75
|
+
},
|
|
76
|
+
"time-picker": {
|
|
77
|
+
time: value,
|
|
78
|
+
onTimeChange: onChange
|
|
79
|
+
}
|
|
80
|
+
});
|
|
27
81
|
const DateTimePicker = ({
|
|
28
82
|
name,
|
|
29
83
|
defaultValue = "",
|
|
30
84
|
rules = {},
|
|
85
|
+
type = "full-date-time",
|
|
31
86
|
...rest
|
|
32
87
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
88
|
import_react_hook_form.Controller,
|
|
@@ -39,8 +94,8 @@ const DateTimePicker = ({
|
|
|
39
94
|
import_ds_controlled_form.DSControlledDateTimePicker,
|
|
40
95
|
{
|
|
41
96
|
...restProps,
|
|
42
|
-
|
|
43
|
-
|
|
97
|
+
type,
|
|
98
|
+
...getConfig(value, onChange)[type],
|
|
44
99
|
...rest
|
|
45
100
|
}
|
|
46
101
|
)
|
|
@@ -35,6 +35,6 @@ const InputText = ({
|
|
|
35
35
|
name,
|
|
36
36
|
defaultValue,
|
|
37
37
|
rules,
|
|
38
|
-
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_controlled_form.DSInputText, { ...field, ...rest })
|
|
38
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_controlled_form.DSInputText, { hasError: !!error, ...field, ...rest })
|
|
39
39
|
}
|
|
40
40
|
);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var masked_input_text_exports = {};
|
|
30
|
+
__export(masked_input_text_exports, {
|
|
31
|
+
MaskedInputText: () => MaskedInputText
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(masked_input_text_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
|
|
37
|
+
var import_react_hook_form = require("react-hook-form");
|
|
38
|
+
const MaskedInputText = ({
|
|
39
|
+
name,
|
|
40
|
+
defaultValue = "",
|
|
41
|
+
rules = {},
|
|
42
|
+
useMask,
|
|
43
|
+
maskOpts,
|
|
44
|
+
...rest
|
|
45
|
+
}) => {
|
|
46
|
+
const [, setVal] = import_react.default.useState(defaultValue);
|
|
47
|
+
const { setValue } = (0, import_react_hook_form.useFormContext)();
|
|
48
|
+
const opts = import_react.default.useMemo(
|
|
49
|
+
() => ({
|
|
50
|
+
...maskOpts,
|
|
51
|
+
onChange: (_, maskedValue) => setValue(name, maskedValue, {
|
|
52
|
+
shouldValidate: true,
|
|
53
|
+
shouldDirty: true,
|
|
54
|
+
shouldTouch: true
|
|
55
|
+
}),
|
|
56
|
+
valueSetter: setVal
|
|
57
|
+
}),
|
|
58
|
+
[maskOpts, name, setValue]
|
|
59
|
+
);
|
|
60
|
+
const inputProps = useMask(opts);
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
|
+
import_react_hook_form.Controller,
|
|
63
|
+
{
|
|
64
|
+
name,
|
|
65
|
+
defaultValue,
|
|
66
|
+
rules,
|
|
67
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_controlled_form.DSInputText, { hasError: !!error, ...rest, ...field, ...inputProps })
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
};
|
|
@@ -23,6 +23,7 @@ __export(toggle_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(toggle_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
|
|
26
|
+
var import_ds_form_toggle = require("@elliemae/ds-form-toggle");
|
|
26
27
|
var import_react_hook_form = require("react-hook-form");
|
|
27
28
|
const Toggle = ({
|
|
28
29
|
name,
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var personal_info_section_exports = {};
|
|
30
20
|
__export(personal_info_section_exports, {
|
|
@@ -35,13 +25,12 @@ __export(personal_info_section_exports, {
|
|
|
35
25
|
});
|
|
36
26
|
module.exports = __toCommonJS(personal_info_section_exports);
|
|
37
27
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var import_date_input = require("../fields/date-input/index.js");
|
|
28
|
+
var import_input_text = require("../fields/input-text/index.js");
|
|
29
|
+
var import_combo_box_v3 = require("../fields/combo-box-v3/index.js");
|
|
30
|
+
var import_date_time_picker = require("../fields/date-time-picker/index.js");
|
|
42
31
|
var import_form_layout_block_item = require("../fields/form-layout-block-item/index.js");
|
|
43
32
|
const FirstName = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, { label: "First Name", inputID: "firstname", required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44
|
-
|
|
33
|
+
import_input_text.InputText,
|
|
45
34
|
{
|
|
46
35
|
id: "firstname",
|
|
47
36
|
name: "firstname",
|
|
@@ -53,39 +42,43 @@ const FirstName = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_
|
|
|
53
42
|
}
|
|
54
43
|
) });
|
|
55
44
|
const DOB = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, { label: "Date of Birth", inputID: "dob", required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
-
|
|
45
|
+
import_date_time_picker.DateTimePicker,
|
|
57
46
|
{
|
|
58
47
|
id: "dob",
|
|
59
48
|
name: "dob",
|
|
49
|
+
type: "date-inputs",
|
|
60
50
|
rules: {
|
|
61
51
|
required: { value: true, message: "Date of Birth is required" },
|
|
62
|
-
validate: (value) =>
|
|
52
|
+
validate: (value) => value !== "12/25/1990" || "Date of Birth can not be 12/25/1990"
|
|
63
53
|
}
|
|
64
54
|
}
|
|
65
55
|
) });
|
|
66
56
|
const State = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, { label: "State", inputID: "state", required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
-
|
|
57
|
+
import_combo_box_v3.ComboBoxV3,
|
|
68
58
|
{
|
|
69
59
|
id: "state",
|
|
70
60
|
name: "state",
|
|
71
61
|
rules: { required: { value: true, message: "State is required" } },
|
|
72
|
-
|
|
73
|
-
{ value: "
|
|
74
|
-
{ value: "
|
|
62
|
+
allOptions: [
|
|
63
|
+
{ dsId: "1", type: "option", value: "--select--", label: "--Select--" },
|
|
64
|
+
{ dsId: "2", type: "option", value: "ca", label: "California" },
|
|
65
|
+
{ dsId: "3", type: "option", value: "nj", label: "New Jersey" }
|
|
75
66
|
]
|
|
76
67
|
}
|
|
77
68
|
) });
|
|
78
69
|
const MaritalStatus = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, { label: "Marital Status", inputID: "marital_status", required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
|
-
|
|
70
|
+
import_combo_box_v3.ComboBoxV3,
|
|
80
71
|
{
|
|
81
72
|
id: "marital_status",
|
|
82
73
|
name: "marital_status",
|
|
83
74
|
rules: {
|
|
84
75
|
required: { value: true, message: "Marital Status is required" }
|
|
85
76
|
},
|
|
86
|
-
|
|
87
|
-
{ value: "
|
|
88
|
-
{ value: "
|
|
77
|
+
allOptions: [
|
|
78
|
+
{ dsId: "1", type: "option", value: "--select--", label: "--Select--" },
|
|
79
|
+
{ dsId: "2", type: "option", value: "married", label: "Married" },
|
|
80
|
+
{ dsId: "3", type: "option", value: "unmarried", label: "Unmarried" },
|
|
81
|
+
{ dsId: "4", type: "option", value: "separated", label: "Separated" }
|
|
89
82
|
]
|
|
90
83
|
}
|
|
91
84
|
) });
|
|
@@ -26,7 +26,6 @@ var import_react_aria_live = require("react-aria-live");
|
|
|
26
26
|
var import_react = require("../../data/react.js");
|
|
27
27
|
const LiveMessage = () => {
|
|
28
28
|
const message = (0, import_react.useAppSelector)((state) => state.liveMessage?.message);
|
|
29
|
-
const id = (0, import_react.useAppSelector)((state) => state.liveMessage?.id);
|
|
30
29
|
const ariaLive = (0, import_react.useAppSelector)((state) => state.liveMessage?.ariaLive);
|
|
31
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_aria_live.LiveMessage, { message, "aria-live": ariaLive
|
|
30
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_aria_live.LiveMessage, { message, "aria-live": ariaLive });
|
|
32
31
|
};
|
|
@@ -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) {
|
package/dist/esm/index.js
CHANGED
|
@@ -79,15 +79,14 @@ import { RenderWithStateAddOns } from "./utils/testing/render-with-state-addons.
|
|
|
79
79
|
import { getApiActionCreator, getSelectField } from "./api/helpers.js";
|
|
80
80
|
import { getUser } from "./api/users/index.js";
|
|
81
81
|
import { withAppDecorator } from "./view/storybook/decorator.js";
|
|
82
|
-
import { Autocomplete } from "./view/fields/autocomplete/index.js";
|
|
83
82
|
import { ErrorToast } from "./view/error-toast/index.js";
|
|
84
83
|
import { NavigationPrompt } from "./view/modals/navigation-prompt/index.js";
|
|
85
84
|
import { Form } from "./view/form/index.js";
|
|
86
|
-
import { ComboBoxV3 } from "./view/fields/combo-box-v3/index.js";
|
|
87
85
|
import { ConnectForm } from "./view/fields/connect-form.js";
|
|
88
86
|
import { FormItemLayout } from "./view/fields/form-item-layout/index.js";
|
|
89
87
|
import { FormLayoutBlockItem } from "./view/fields/form-layout-block-item/index.js";
|
|
90
88
|
import { TextBox } from "./view/fields/text-box/index.js";
|
|
89
|
+
import { InputText } from "./view/fields/input-text/index.js";
|
|
91
90
|
import { LargeTextBox } from "./view/fields/large-text-box/index.js";
|
|
92
91
|
import {
|
|
93
92
|
InputMask,
|
|
@@ -95,11 +94,16 @@ import {
|
|
|
95
94
|
MASK_PIPES
|
|
96
95
|
} from "./view/fields/input-mask/index.js";
|
|
97
96
|
import { ComboBox } from "./view/fields/combo-box/index.js";
|
|
97
|
+
import { ComboBoxV3 } from "./view/fields/combo-box-v3/index.js";
|
|
98
98
|
import { CheckBox } from "./view/fields/check-box/index.js";
|
|
99
99
|
import { Radio } from "./view/fields/radio/index.js";
|
|
100
100
|
import { RadioGroup } from "./view/fields/radio-group/index.js";
|
|
101
101
|
import { DateInput } from "./view/fields/date-input/index.js";
|
|
102
102
|
import { DatePicker } from "./view/fields/date-picker/index.js";
|
|
103
|
+
import { DateTimePicker } from "./view/fields/date-time-picker/index.js";
|
|
104
|
+
import { DateRangePicker } from "./view/fields/date-range-picker/index.js";
|
|
105
|
+
import { Autocomplete } from "./view/fields/autocomplete/index.js";
|
|
106
|
+
import { Toggle } from "./view/fields/toggle/index.js";
|
|
103
107
|
import { FormSubmitButton } from "./view/form/submit-button/index.js";
|
|
104
108
|
import { useMediaQueryList } from "./view/breakpoint/use-media-query-list.js";
|
|
105
109
|
import { VisuallyHidden } from "./view/visually-hidden/index.js";
|
|
@@ -126,6 +130,8 @@ export {
|
|
|
126
130
|
ConnectForm,
|
|
127
131
|
DateInput,
|
|
128
132
|
DatePicker,
|
|
133
|
+
DateRangePicker,
|
|
134
|
+
DateTimePicker,
|
|
129
135
|
ErrorBoundary,
|
|
130
136
|
ErrorToast,
|
|
131
137
|
Form,
|
|
@@ -133,6 +139,7 @@ export {
|
|
|
133
139
|
FormLayoutBlockItem,
|
|
134
140
|
FormSubmitButton,
|
|
135
141
|
InputMask,
|
|
142
|
+
InputText,
|
|
136
143
|
LargeTextBox,
|
|
137
144
|
MASK_PIPES,
|
|
138
145
|
MASK_TYPES,
|
|
@@ -149,6 +156,7 @@ export {
|
|
|
149
156
|
SessionTimeout,
|
|
150
157
|
TextBox,
|
|
151
158
|
Themes,
|
|
159
|
+
Toggle,
|
|
152
160
|
VisuallyHidden,
|
|
153
161
|
WaitMessage,
|
|
154
162
|
actions as ariaLive,
|
|
@@ -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,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
|
}
|