@uxf/form 11.21.1 → 11.21.3
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/combobox/combobox.js +3 -1
- package/form/form.d.ts +1 -0
- package/form/form.js +2 -1
- package/multi-combobox/multi-combobox.js +3 -1
- package/multi-select/multi-select.js +2 -1
- package/package.json +2 -2
- package/select/select.js +2 -1
package/combobox/combobox.js
CHANGED
|
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Combobox = void 0;
|
|
7
|
+
const is_empty_1 = require("@uxf/core/utils/is-empty");
|
|
8
|
+
const is_nil_1 = require("@uxf/core/utils/is-nil");
|
|
7
9
|
const combobox_1 = require("@uxf/ui/combobox");
|
|
8
10
|
const react_1 = __importDefault(require("react"));
|
|
9
11
|
const react_hook_form_1 = require("react-hook-form");
|
|
@@ -31,7 +33,7 @@ function Combobox(props) {
|
|
|
31
33
|
field.onChange(value);
|
|
32
34
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, value, event);
|
|
33
35
|
};
|
|
34
|
-
return (react_1.default.createElement(combobox_1.Combobox, { className: props.className, dropdownClassName: props.dropdownClassName, dropdownMatchesInputWidth: props.dropdownMatchesInputWidth, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: id, inputRef: field.ref, isClearable: props.isClearable, isDisabled: ((_e = props.options)
|
|
36
|
+
return (react_1.default.createElement(combobox_1.Combobox, { className: props.className, dropdownClassName: props.dropdownClassName, dropdownMatchesInputWidth: props.dropdownMatchesInputWidth, dropdownMaxHeight: props.dropdownMaxHeight, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, form: props.form, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: id, inputArrow: props.inputArrow, inputRef: field.ref, isClearable: props.isClearable, isDisabled: ((0, is_nil_1.isNil)(props.loadOptions) && (0, is_empty_1.isEmpty)((_e = props.options) !== null && _e !== void 0 ? _e : [])) || props.isDisabled, isInvalid: !!fieldState.error, isReadOnly: props.isReadOnly, isRequired: props.isRequired, keyExtractor: props.keyExtractor, label: props.label, leftAddon: props.leftAddon, leftElement: props.leftElement, loadOptions: props.loadOptions, name: field.name, noOptionsMessage: props.noOptionsMessage, noQueryMessage: props.noQueryMessage, notFoundMessage: props.notFoundMessage, onBlur: onBlur, onChange: onChange, onFocus: props.onFocus, options: props.options, placeholder: props.placeholder, renderOption: props.renderOption, rightAddon: props.rightAddon, rightElement: props.rightElement, size: props.size, style: props.style, value: (_f = field.value) !== null && _f !== void 0 ? _f : null, variant: props.variant }));
|
|
35
37
|
}
|
|
36
38
|
exports.Combobox = Combobox;
|
|
37
39
|
Combobox.displayName = "UxfFormCombobox";
|
package/form/form.d.ts
CHANGED
package/form/form.js
CHANGED
|
@@ -9,9 +9,10 @@ const react_1 = __importDefault(require("react"));
|
|
|
9
9
|
const react_hook_form_1 = require("react-hook-form");
|
|
10
10
|
const form_id_context_1 = require("../form-id-context");
|
|
11
11
|
function Form(props) {
|
|
12
|
+
var _a;
|
|
12
13
|
return (react_1.default.createElement(form_id_context_1.FormIdContextProvider, { value: props.id },
|
|
13
14
|
react_1.default.createElement(react_hook_form_1.FormProvider, { ...props.formApi },
|
|
14
|
-
react_1.default.createElement("form", { className: props.className, id: props.id, method: "post", noValidate: true, onSubmit: props.formApi.handleSubmit(props.onSubmit), ref: props.forwardRef },
|
|
15
|
+
react_1.default.createElement("form", { className: props.className, id: props.id, method: (_a = props.method) !== null && _a !== void 0 ? _a : "post", noValidate: true, onSubmit: props.formApi.handleSubmit(props.onSubmit), ref: props.forwardRef },
|
|
15
16
|
props.children,
|
|
16
17
|
!props.omitSubmitInput && react_1.default.createElement("input", { style: sr_only_1.srOnly, type: "submit" })))));
|
|
17
18
|
}
|
|
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.MultiCombobox = void 0;
|
|
7
|
+
const is_empty_1 = require("@uxf/core/utils/is-empty");
|
|
8
|
+
const is_nil_1 = require("@uxf/core/utils/is-nil");
|
|
7
9
|
const multi_combobox_1 = require("@uxf/ui/multi-combobox");
|
|
8
10
|
const react_1 = __importDefault(require("react"));
|
|
9
11
|
const react_hook_form_1 = require("react-hook-form");
|
|
@@ -31,7 +33,7 @@ function MultiCombobox(props) {
|
|
|
31
33
|
field.onChange(value);
|
|
32
34
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, value, event);
|
|
33
35
|
};
|
|
34
|
-
return (react_1.default.createElement(multi_combobox_1.MultiCombobox, { allOptionsSelectedMessage: props.allOptionsSelectedMessage, className: props.className, dropdownClassName: props.dropdownClassName, dropdownMatchesInputWidth: props.dropdownMatchesInputWidth, dropdownMaxHeight: props.dropdownMaxHeight, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, form: props.form, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: id, inputArrow: props.inputArrow, isDisabled: ((_e = props.options)
|
|
36
|
+
return (react_1.default.createElement(multi_combobox_1.MultiCombobox, { allOptionsSelectedMessage: props.allOptionsSelectedMessage, className: props.className, dropdownClassName: props.dropdownClassName, dropdownMatchesInputWidth: props.dropdownMatchesInputWidth, dropdownMaxHeight: props.dropdownMaxHeight, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, form: props.form, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: id, inputArrow: props.inputArrow, isDisabled: ((0, is_nil_1.isNil)(props.loadOptions) && (0, is_empty_1.isEmpty)((_e = props.options) !== null && _e !== void 0 ? _e : [])) || props.isDisabled, isInvalid: !!fieldState.error, isReadOnly: props.isReadOnly, isRequired: props.isRequired, label: props.label, leftAddon: props.leftAddon, leftElement: props.leftElement, loadOptions: props.loadOptions, name: field.name, noOptionsMessage: props.noOptionsMessage, noQueryMessage: props.noQueryMessage, notFoundMessage: props.notFoundMessage, onBlur: onBlur, onChange: onChange, onFocus: props.onFocus, options: props.options, placeholder: props.placeholder, ref: field.ref, renderOption: props.renderOption, rightAddon: props.rightAddon, rightElement: props.rightElement, size: props.size, style: props.style, value: field.value, variant: props.variant, withCheckboxes: props.withCheckboxes }));
|
|
35
37
|
}
|
|
36
38
|
exports.MultiCombobox = MultiCombobox;
|
|
37
39
|
MultiCombobox.displayName = "UxfFormMultiCombobox";
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.MultiSelect = void 0;
|
|
7
|
+
const is_empty_1 = require("@uxf/core/utils/is-empty");
|
|
7
8
|
const multi_select_1 = require("@uxf/ui/multi-select");
|
|
8
9
|
const react_1 = __importDefault(require("react"));
|
|
9
10
|
const react_hook_form_1 = require("react-hook-form");
|
|
@@ -31,7 +32,7 @@ function MultiSelect(props) {
|
|
|
31
32
|
field.onChange(value);
|
|
32
33
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, value, event);
|
|
33
34
|
};
|
|
34
|
-
return (react_1.default.createElement(multi_select_1.MultiSelect, { className: props.className, dropdownClassName: props.dropdownClassName, dropdownMatchesInputWidth: props.dropdownMatchesInputWidth, dropdownMaxHeight: props.dropdownMaxHeight, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: id, inputArrow: props.inputArrow, isDisabled: props.options
|
|
35
|
+
return (react_1.default.createElement(multi_select_1.MultiSelect, { allOptionsSelectedMessage: props.allOptionsSelectedMessage, className: props.className, dropdownClassName: props.dropdownClassName, dropdownMatchesInputWidth: props.dropdownMatchesInputWidth, dropdownMaxHeight: props.dropdownMaxHeight, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, form: props.form, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: id, inputArrow: props.inputArrow, isDisabled: (0, is_empty_1.isEmpty)(props.options) || props.isDisabled, isInvalid: !!fieldState.error, isReadOnly: props.isReadOnly, isRequired: props.isRequired, label: props.label, leftAddon: props.leftAddon, leftElement: props.leftElement, name: field.name, noOptionsMessage: props.noOptionsMessage, onBlur: onBlur, onChange: onChange, onFocus: props.onFocus, options: props.options, placeholder: props.placeholder, ref: field.ref, renderOption: props.renderOption, rightAddon: props.rightAddon, rightElement: props.rightElement, size: props.size, style: props.style, value: field.value, variant: props.variant, withCheckboxes: props.withCheckboxes }));
|
|
35
36
|
}
|
|
36
37
|
exports.MultiSelect = MultiSelect;
|
|
37
38
|
MultiSelect.displayName = "UxfFormMultiSelect";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/form",
|
|
3
|
-
"version": "11.21.
|
|
3
|
+
"version": "11.21.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"author": "UX Fans s.r.o",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@uxf/ui": "11.21.
|
|
15
|
+
"@uxf/ui": "11.21.3",
|
|
16
16
|
"coordinate-parser": "1.0.7",
|
|
17
17
|
"dayjs": "1.11.10",
|
|
18
18
|
"react-hook-form": "7.51.0"
|
package/select/select.js
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Select = void 0;
|
|
7
|
+
const is_empty_1 = require("@uxf/core/utils/is-empty");
|
|
7
8
|
const select_1 = require("@uxf/ui/select");
|
|
8
9
|
const react_1 = __importDefault(require("react"));
|
|
9
10
|
const react_hook_form_1 = require("react-hook-form");
|
|
@@ -31,7 +32,7 @@ function Select(props) {
|
|
|
31
32
|
field.onChange(value);
|
|
32
33
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, value, event);
|
|
33
34
|
};
|
|
34
|
-
return (react_1.default.createElement(select_1.Select, { className: props.className, dropdownClassName: props.dropdownClassName, dropdownMatchesInputWidth: props.dropdownMatchesInputWidth, dropdownMaxHeight: props.dropdownMaxHeight, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: id, inputArrow: props.inputArrow, inputRef: field.ref, isClearable: props.isClearable, isDisabled: props.options
|
|
35
|
+
return (react_1.default.createElement(select_1.Select, { className: props.className, dropdownClassName: props.dropdownClassName, dropdownMatchesInputWidth: props.dropdownMatchesInputWidth, dropdownMaxHeight: props.dropdownMaxHeight, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, form: props.form, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: id, inputArrow: props.inputArrow, inputRef: field.ref, isClearable: props.isClearable, isDisabled: (0, is_empty_1.isEmpty)(props.options) || props.isDisabled, isInvalid: !!fieldState.error, isReadOnly: props.isReadOnly, isRequired: props.isRequired, keyExtractor: props.keyExtractor, label: props.label, leftAddon: props.leftAddon, leftElement: props.leftElement, name: field.name, noOptionsMessage: props.noOptionsMessage, onBlur: onBlur, onChange: onChange, onFocus: props.onFocus, options: props.options, placeholder: props.placeholder, renderOption: props.renderOption, renderSelectedOption: props.renderSelectedOption, rightAddon: props.rightAddon, rightElement: props.rightElement, size: props.size, style: props.style, value: field.value, variant: props.variant }));
|
|
35
36
|
}
|
|
36
37
|
exports.Select = Select;
|
|
37
38
|
Select.displayName = "UxfFormSelect";
|