@data-driven-forms/mui-component-mapper 3.22.2 → 3.22.4
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/checkbox/checkbox.js +14 -16
- package/date-picker/date-picker.js +4 -6
- package/dual-list-select/dual-list-select.js +34 -39
- package/esm/checkbox/checkbox.js +14 -16
- package/esm/date-picker/date-picker.js +4 -6
- package/esm/dual-list-select/dual-list-select.js +34 -39
- package/esm/field-array/field-array.js +50 -54
- package/esm/multiple-chioce-list/multiple-choice-list.js +14 -16
- package/esm/plain-text/plain-text.js +11 -7
- package/esm/radio/radio.js +18 -16
- package/esm/select/select.js +17 -15
- package/esm/switch/switch.js +14 -16
- package/esm/tabs/tabs.js +10 -12
- package/esm/textarea/textarea.js +4 -6
- package/esm/time-picker/time-picker.js +2 -4
- package/esm/wizard/step-buttons.js +2 -4
- package/esm/wizard/wizard-nav.js +2 -4
- package/esm/wizard/wizard.js +2 -4
- package/field-array/field-array.js +50 -54
- package/multiple-chioce-list/multiple-choice-list.js +14 -16
- package/package.json +3 -3
- package/plain-text/plain-text.js +11 -7
- package/radio/radio.js +18 -16
- package/select/select.js +16 -15
- package/switch/switch.js +14 -16
- package/tabs/tabs.js +10 -12
- package/textarea/textarea.js +4 -6
- package/time-picker/time-picker.js +2 -4
- package/wizard/step-buttons.js +2 -4
- package/wizard/wizard-nav.js +2 -4
- package/wizard/wizard.js +2 -4
package/select/select.js
CHANGED
|
@@ -42,7 +42,7 @@ var _ArrowDropDown = _interopRequireDefault(require("@mui/icons-material/ArrowDr
|
|
|
42
42
|
var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete"));
|
|
43
43
|
|
|
44
44
|
var _excluded = ["inputProps"],
|
|
45
|
-
_excluded2 = ["value", "options", "label", "helperText", "validateOnMount", "meta", "isSearchable", "description", "classNamePrefix", "isMulti", "placeholder", "onInputChange", "isFetching", "noOptionsMessage", "hideSelectedOptions", "closeMenuOnSelect", "required", "onChange", "onFocus", "onBlur", "FormFieldGridProps", "TextFieldProps", "inputProps", "isClearable", "isDisabled"],
|
|
45
|
+
_excluded2 = ["value", "options", "label", "helperText", "validateOnMount", "meta", "isSearchable", "description", "classNamePrefix", "isMulti", "placeholder", "onInputChange", "isFetching", "noOptionsMessage", "hideSelectedOptions", "closeMenuOnSelect", "required", "onChange", "onFocus", "onBlur", "FormFieldGridProps", "TextFieldProps", "inputProps", "isClearable", "isDisabled", "loadingText"],
|
|
46
46
|
_excluded3 = ["input", "isRequired", "isDisabled", "isReadOnly", "disabled", "multiple", "isMulti", "isClearable", "disableClearable", "loadingMessage", "loadingText", "noOptionsMessage", "noOptionsText", "closeMenuOnSelect"];
|
|
47
47
|
|
|
48
48
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -117,7 +117,8 @@ var InternalSelect = function InternalSelect(_ref2) {
|
|
|
117
117
|
description = _ref2.description,
|
|
118
118
|
classNamePrefix = _ref2.classNamePrefix,
|
|
119
119
|
isMulti = _ref2.isMulti,
|
|
120
|
-
placeholder = _ref2.placeholder,
|
|
120
|
+
_ref2$placeholder = _ref2.placeholder,
|
|
121
|
+
placeholder = _ref2$placeholder === void 0 ? 'Please choose' : _ref2$placeholder,
|
|
121
122
|
_onInputChange = _ref2.onInputChange,
|
|
122
123
|
isFetching = _ref2.isFetching,
|
|
123
124
|
noOptionsMessage = _ref2.noOptionsMessage,
|
|
@@ -127,13 +128,18 @@ var InternalSelect = function InternalSelect(_ref2) {
|
|
|
127
128
|
_onChange = _ref2.onChange,
|
|
128
129
|
onFocus = _ref2.onFocus,
|
|
129
130
|
onBlur = _ref2.onBlur,
|
|
130
|
-
|
|
131
|
-
_ref2$
|
|
132
|
-
|
|
131
|
+
_ref2$FormFieldGridPr = _ref2.FormFieldGridProps,
|
|
132
|
+
FormFieldGridProps = _ref2$FormFieldGridPr === void 0 ? {} : _ref2$FormFieldGridPr,
|
|
133
|
+
_ref2$TextFieldProps = _ref2.TextFieldProps;
|
|
134
|
+
_ref2$TextFieldProps = _ref2$TextFieldProps === void 0 ? {} : _ref2$TextFieldProps;
|
|
135
|
+
var textFieldInputProps = _ref2$TextFieldProps.inputProps,
|
|
133
136
|
TextFieldProps = (0, _objectWithoutProperties2["default"])(_ref2$TextFieldProps, _excluded),
|
|
134
|
-
inputProps = _ref2.inputProps,
|
|
137
|
+
_ref2$inputProps = _ref2.inputProps,
|
|
138
|
+
inputProps = _ref2$inputProps === void 0 ? {} : _ref2$inputProps,
|
|
135
139
|
isClearable = _ref2.isClearable,
|
|
136
140
|
isDisabled = _ref2.isDisabled,
|
|
141
|
+
_ref2$loadingText = _ref2.loadingText,
|
|
142
|
+
loadingText = _ref2$loadingText === void 0 ? 'Loading...' : _ref2$loadingText,
|
|
137
143
|
rest = (0, _objectWithoutProperties2["default"])(_ref2, _excluded2);
|
|
138
144
|
var invalid = (0, _validationError.validationError)(meta, validateOnMount); // When isMulti is true, the "parseInternalValue" always creates new value array, we need to memoize it to not create new array instance
|
|
139
145
|
// Memo is required to fix https://github.com/data-driven-forms/react-forms/issues/1366
|
|
@@ -149,7 +155,8 @@ var InternalSelect = function InternalSelect(_ref2) {
|
|
|
149
155
|
size: 20,
|
|
150
156
|
color: "inherit"
|
|
151
157
|
}) : /*#__PURE__*/_react["default"].createElement(_ArrowDropDown["default"], null),
|
|
152
|
-
fullWidth: true
|
|
158
|
+
fullWidth: true,
|
|
159
|
+
loadingText: loadingText
|
|
153
160
|
}, rest, {
|
|
154
161
|
renderInput: function renderInput(params) {
|
|
155
162
|
return /*#__PURE__*/_react["default"].createElement(_TextField["default"], (0, _extends2["default"])({
|
|
@@ -214,14 +221,8 @@ InternalSelect.propTypes = {
|
|
|
214
221
|
onBlur: _propTypes["default"].func,
|
|
215
222
|
TextFieldProps: _propTypes["default"].object,
|
|
216
223
|
inputProps: _propTypes["default"].object,
|
|
217
|
-
isDisabled: _propTypes["default"].bool
|
|
218
|
-
|
|
219
|
-
InternalSelect.defaultProps = {
|
|
220
|
-
placeholder: 'Please choose',
|
|
221
|
-
FormFieldGridProps: {},
|
|
222
|
-
TextFieldProps: {},
|
|
223
|
-
inputProps: {},
|
|
224
|
-
loadingText: 'Loading...'
|
|
224
|
+
isDisabled: _propTypes["default"].bool,
|
|
225
|
+
loadingText: _propTypes["default"].node
|
|
225
226
|
};
|
|
226
227
|
|
|
227
228
|
var Select = function Select(props) {
|
package/switch/switch.js
CHANGED
|
@@ -58,13 +58,20 @@ var Switch = function Switch(props) {
|
|
|
58
58
|
meta = _useFieldApi.meta,
|
|
59
59
|
onText = _useFieldApi.onText,
|
|
60
60
|
offText = _useFieldApi.offText,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
_useFieldApi$FormFiel = _useFieldApi.FormFieldGridProps,
|
|
62
|
+
FormFieldGridProps = _useFieldApi$FormFiel === void 0 ? {} : _useFieldApi$FormFiel,
|
|
63
|
+
_useFieldApi$FormCont = _useFieldApi.FormControlProps,
|
|
64
|
+
FormControlProps = _useFieldApi$FormCont === void 0 ? {} : _useFieldApi$FormCont,
|
|
65
|
+
_useFieldApi$FormGrou = _useFieldApi.FormGroupProps,
|
|
66
|
+
FormGroupProps = _useFieldApi$FormGrou === void 0 ? {} : _useFieldApi$FormGrou,
|
|
67
|
+
_useFieldApi$FormCont2 = _useFieldApi.FormControlLabelProps,
|
|
68
|
+
FormControlLabelProps = _useFieldApi$FormCont2 === void 0 ? {} : _useFieldApi$FormCont2,
|
|
69
|
+
_useFieldApi$SwitchPr = _useFieldApi.SwitchProps,
|
|
70
|
+
SwitchProps = _useFieldApi$SwitchPr === void 0 ? {} : _useFieldApi$SwitchPr,
|
|
71
|
+
_useFieldApi$FormLabe = _useFieldApi.FormLabelProps,
|
|
72
|
+
FormLabelProps = _useFieldApi$FormLabe === void 0 ? {} : _useFieldApi$FormLabe,
|
|
73
|
+
_useFieldApi$FormHelp = _useFieldApi.FormHelperTextProps,
|
|
74
|
+
FormHelperTextProps = _useFieldApi$FormHelp === void 0 ? {} : _useFieldApi$FormHelp,
|
|
68
75
|
rest = (0, _objectWithoutProperties2["default"])(_useFieldApi, _excluded);
|
|
69
76
|
|
|
70
77
|
var invalid = (0, _validationError.validationError)(meta, validateOnMount);
|
|
@@ -107,14 +114,5 @@ Switch.propTypes = {
|
|
|
107
114
|
FormLabelProps: _propTypes["default"].object,
|
|
108
115
|
FormHelperTextProps: _propTypes["default"].object
|
|
109
116
|
};
|
|
110
|
-
Switch.defaultProps = {
|
|
111
|
-
FormFieldGridProps: {},
|
|
112
|
-
FormControlProps: {},
|
|
113
|
-
FormGroupProps: {},
|
|
114
|
-
FormControlLabelProps: {},
|
|
115
|
-
SwitchProps: {},
|
|
116
|
-
FormLabelProps: {},
|
|
117
|
-
FormHelperTextProps: {}
|
|
118
|
-
};
|
|
119
117
|
var _default = Switch;
|
|
120
118
|
exports["default"] = _default;
|
package/tabs/tabs.js
CHANGED
|
@@ -41,11 +41,16 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
41
41
|
|
|
42
42
|
var FormTabs = function FormTabs(_ref) {
|
|
43
43
|
var fields = _ref.fields,
|
|
44
|
-
AppBarProps = _ref.AppBarProps,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
_ref$AppBarProps = _ref.AppBarProps,
|
|
45
|
+
AppBarProps = _ref$AppBarProps === void 0 ? {} : _ref$AppBarProps,
|
|
46
|
+
_ref$TabsProps = _ref.TabsProps,
|
|
47
|
+
TabsProps = _ref$TabsProps === void 0 ? {} : _ref$TabsProps,
|
|
48
|
+
_ref$TabProps = _ref.TabProps,
|
|
49
|
+
TabProps = _ref$TabProps === void 0 ? {} : _ref$TabProps,
|
|
50
|
+
_ref$FormFieldGridPro = _ref.FormFieldGridProps,
|
|
51
|
+
FormFieldGridProps = _ref$FormFieldGridPro === void 0 ? {} : _ref$FormFieldGridPro,
|
|
52
|
+
_ref$GridItemProps = _ref.GridItemProps,
|
|
53
|
+
GridItemProps = _ref$GridItemProps === void 0 ? {} : _ref$GridItemProps;
|
|
49
54
|
var formOptions = (0, _useFormApi["default"])();
|
|
50
55
|
|
|
51
56
|
var _useState = (0, _react.useState)(0),
|
|
@@ -96,13 +101,6 @@ FormTabs.propTypes = {
|
|
|
96
101
|
FormFieldGridProps: _propTypes["default"].object,
|
|
97
102
|
GridItemProps: _propTypes["default"].object
|
|
98
103
|
};
|
|
99
|
-
FormTabs.defaultProps = {
|
|
100
|
-
AppBarProps: {},
|
|
101
|
-
TabsProps: {},
|
|
102
|
-
TabProps: {},
|
|
103
|
-
FormFieldGridProps: {},
|
|
104
|
-
GridItemProps: {}
|
|
105
|
-
};
|
|
106
104
|
var _default = FormTabs;
|
|
107
105
|
/*
|
|
108
106
|
{fields.map(({ fields }, index) =>
|
package/textarea/textarea.js
CHANGED
|
@@ -45,8 +45,10 @@ var Textarea = function Textarea(props) {
|
|
|
45
45
|
description = _useFieldApi.description,
|
|
46
46
|
validateOnMount = _useFieldApi.validateOnMount,
|
|
47
47
|
meta = _useFieldApi.meta,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
_useFieldApi$FormFiel = _useFieldApi.FormFieldGridProps,
|
|
49
|
+
FormFieldGridProps = _useFieldApi$FormFiel === void 0 ? {} : _useFieldApi$FormFiel,
|
|
50
|
+
_useFieldApi$inputPro = _useFieldApi.inputProps,
|
|
51
|
+
inputProps = _useFieldApi$inputPro === void 0 ? {} : _useFieldApi$inputPro,
|
|
50
52
|
rest = (0, _objectWithoutProperties2["default"])(_useFieldApi, _excluded);
|
|
51
53
|
|
|
52
54
|
var invalid = (0, _validationError.validationError)(meta, validateOnMount);
|
|
@@ -80,9 +82,5 @@ Textarea.propTypes = {
|
|
|
80
82
|
FormFieldGridProps: _propTypes["default"].object,
|
|
81
83
|
inputProps: _propTypes["default"].object
|
|
82
84
|
};
|
|
83
|
-
Textarea.defaultProps = {
|
|
84
|
-
FormFieldGridProps: {},
|
|
85
|
-
inputProps: {}
|
|
86
|
-
};
|
|
87
85
|
var _default = Textarea;
|
|
88
86
|
exports["default"] = _default;
|
|
@@ -42,7 +42,8 @@ var TimePicker = function TimePicker(props) {
|
|
|
42
42
|
validateOnMount = _useFieldApi.validateOnMount,
|
|
43
43
|
meta = _useFieldApi.meta,
|
|
44
44
|
MuiPickersUtilsProviderProps = _useFieldApi.MuiPickersUtilsProviderProps,
|
|
45
|
-
|
|
45
|
+
_useFieldApi$FormFiel = _useFieldApi.FormFieldGridProps,
|
|
46
|
+
FormFieldGridProps = _useFieldApi$FormFiel === void 0 ? {} : _useFieldApi$FormFiel,
|
|
46
47
|
rest = (0, _objectWithoutProperties2["default"])(_useFieldApi, _excluded);
|
|
47
48
|
|
|
48
49
|
var invalid = (0, _validationError.validationError)(meta, validateOnMount);
|
|
@@ -92,8 +93,5 @@ TimePicker.propTypes = {
|
|
|
92
93
|
description: _propTypes["default"].node,
|
|
93
94
|
FormFieldGridProps: _propTypes["default"].object
|
|
94
95
|
};
|
|
95
|
-
TimePicker.defaultProps = {
|
|
96
|
-
FormFieldGridProps: {}
|
|
97
|
-
};
|
|
98
96
|
var _default = TimePicker;
|
|
99
97
|
exports["default"] = _default;
|
package/wizard/step-buttons.js
CHANGED
|
@@ -105,7 +105,8 @@ var WizardStepButtons = function WizardStepButtons(_ref3) {
|
|
|
105
105
|
back = _props$buttonLabels.back,
|
|
106
106
|
next = _props$buttonLabels.next,
|
|
107
107
|
formOptions = props.formOptions,
|
|
108
|
-
|
|
108
|
+
_props$ButtonContaine = props.ButtonContainerProps,
|
|
109
|
+
ButtonContainerProps = _props$ButtonContaine === void 0 ? {} : _props$ButtonContaine,
|
|
109
110
|
conditionalSubmitFlag = props.conditionalSubmitFlag;
|
|
110
111
|
return /*#__PURE__*/_react["default"].createElement(StyledGrid, (0, _extends2["default"])({
|
|
111
112
|
container: true,
|
|
@@ -168,8 +169,5 @@ WizardStepButtons.propTypes = {
|
|
|
168
169
|
onCancel: _propTypes["default"].func.isRequired
|
|
169
170
|
})
|
|
170
171
|
};
|
|
171
|
-
WizardStepButtons.defaultProps = {
|
|
172
|
-
ButtonContainerProps: {}
|
|
173
|
-
};
|
|
174
172
|
var _default = WizardStepButtons;
|
|
175
173
|
exports["default"] = _default;
|
package/wizard/wizard-nav.js
CHANGED
|
@@ -36,7 +36,8 @@ var StyledStepper = (0, _styles.styled)(_Stepper["default"])(function () {
|
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
var WizardNav = function WizardNav(_ref2) {
|
|
39
|
-
var StepperProps = _ref2.StepperProps,
|
|
39
|
+
var _ref2$StepperProps = _ref2.StepperProps,
|
|
40
|
+
StepperProps = _ref2$StepperProps === void 0 ? {} : _ref2$StepperProps,
|
|
40
41
|
stepsInfo = _ref2.stepsInfo,
|
|
41
42
|
activeStepIndex = _ref2.activeStepIndex;
|
|
42
43
|
return /*#__PURE__*/_react["default"].createElement(StyledStepper, (0, _extends2["default"])({}, StepperProps, {
|
|
@@ -63,8 +64,5 @@ WizardNav.propTypes = {
|
|
|
63
64
|
})),
|
|
64
65
|
activeStepIndex: _propTypes["default"].number
|
|
65
66
|
};
|
|
66
|
-
WizardNav.defaultProps = {
|
|
67
|
-
StepperProps: {}
|
|
68
|
-
};
|
|
69
67
|
var _default = WizardNav;
|
|
70
68
|
exports["default"] = _default;
|
package/wizard/wizard.js
CHANGED
|
@@ -55,7 +55,8 @@ var WizardInternal = function WizardInternal(_ref2) {
|
|
|
55
55
|
stepsInfo = _ref2.stepsInfo,
|
|
56
56
|
ButtonContainerProps = _ref2.ButtonContainerProps,
|
|
57
57
|
StepperProps = _ref2.StepperProps,
|
|
58
|
-
WizardBodyProps = _ref2.WizardBodyProps,
|
|
58
|
+
_ref2$WizardBodyProps = _ref2.WizardBodyProps,
|
|
59
|
+
WizardBodyProps = _ref2$WizardBodyProps === void 0 ? {} : _ref2$WizardBodyProps,
|
|
59
60
|
WizardProps = _ref2.WizardProps,
|
|
60
61
|
conditionalSubmitFlag = _ref2.conditionalSubmitFlag;
|
|
61
62
|
|
|
@@ -115,9 +116,6 @@ WizardInternal.propTypes = {
|
|
|
115
116
|
WizardProps: _propTypes["default"].object,
|
|
116
117
|
conditionalSubmitFlag: _propTypes["default"].string.isRequired
|
|
117
118
|
};
|
|
118
|
-
WizardInternal.defaultProps = {
|
|
119
|
-
WizardBodyProps: {}
|
|
120
|
-
};
|
|
121
119
|
|
|
122
120
|
var MuiWizard = function MuiWizard(props) {
|
|
123
121
|
return /*#__PURE__*/_react["default"].createElement(_wizard["default"], (0, _extends2["default"])({
|