@data-driven-forms/mui-component-mapper 3.22.1 → 3.22.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/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/esm/radio/radio.js
CHANGED
|
@@ -4,7 +4,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
var _excluded = ["inputProps"],
|
|
5
5
|
_excluded2 = ["name", "option", "isDisabled", "isReadOnly", "FormControlLabelProps", "RadioProps"],
|
|
6
6
|
_excluded3 = ["name"],
|
|
7
|
-
_excluded4 = ["options", "isDisabled", "label", "isRequired", "helperText", "description", "isReadOnly", "meta", "validateOnMount", "FormFieldGridProps", "FormControlProps", "FormLabelProps", "FormHelperTextProps"];
|
|
7
|
+
_excluded4 = ["options", "isDisabled", "label", "isRequired", "helperText", "description", "isReadOnly", "meta", "validateOnMount", "FormFieldGridProps", "FormControlProps", "FormLabelProps", "FormHelperTextProps", "FormControlLabelProps", "RadioProps"];
|
|
8
8
|
|
|
9
9
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
10
|
|
|
@@ -88,7 +88,8 @@ var Radio = function Radio(_ref3) {
|
|
|
88
88
|
name: name,
|
|
89
89
|
type: 'radio'
|
|
90
90
|
})),
|
|
91
|
-
options = _useFieldApi2.options,
|
|
91
|
+
_useFieldApi2$options = _useFieldApi2.options,
|
|
92
|
+
options = _useFieldApi2$options === void 0 ? [] : _useFieldApi2$options,
|
|
92
93
|
isDisabled = _useFieldApi2.isDisabled,
|
|
93
94
|
label = _useFieldApi2.label,
|
|
94
95
|
isRequired = _useFieldApi2.isRequired,
|
|
@@ -97,10 +98,18 @@ var Radio = function Radio(_ref3) {
|
|
|
97
98
|
isReadOnly = _useFieldApi2.isReadOnly,
|
|
98
99
|
meta = _useFieldApi2.meta,
|
|
99
100
|
validateOnMount = _useFieldApi2.validateOnMount,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
_useFieldApi2$FormFie = _useFieldApi2.FormFieldGridProps,
|
|
102
|
+
FormFieldGridProps = _useFieldApi2$FormFie === void 0 ? {} : _useFieldApi2$FormFie,
|
|
103
|
+
_useFieldApi2$FormCon = _useFieldApi2.FormControlProps,
|
|
104
|
+
FormControlProps = _useFieldApi2$FormCon === void 0 ? {} : _useFieldApi2$FormCon,
|
|
105
|
+
_useFieldApi2$FormLab = _useFieldApi2.FormLabelProps,
|
|
106
|
+
FormLabelProps = _useFieldApi2$FormLab === void 0 ? {} : _useFieldApi2$FormLab,
|
|
107
|
+
_useFieldApi2$FormHel = _useFieldApi2.FormHelperTextProps,
|
|
108
|
+
FormHelperTextProps = _useFieldApi2$FormHel === void 0 ? {} : _useFieldApi2$FormHel,
|
|
109
|
+
_useFieldApi2$FormCon2 = _useFieldApi2.FormControlLabelProps,
|
|
110
|
+
FormControlLabelProps = _useFieldApi2$FormCon2 === void 0 ? {} : _useFieldApi2$FormCon2,
|
|
111
|
+
_useFieldApi2$RadioPr = _useFieldApi2.RadioProps,
|
|
112
|
+
RadioProps = _useFieldApi2$RadioPr === void 0 ? {} : _useFieldApi2$RadioPr,
|
|
104
113
|
rest = _objectWithoutProperties(_useFieldApi2, _excluded4);
|
|
105
114
|
|
|
106
115
|
var invalid = validationError(meta, validateOnMount);
|
|
@@ -119,7 +128,9 @@ var Radio = function Radio(_ref3) {
|
|
|
119
128
|
name: name,
|
|
120
129
|
option: option,
|
|
121
130
|
isDisabled: isDisabled,
|
|
122
|
-
isReadOnly: isReadOnly
|
|
131
|
+
isReadOnly: isReadOnly,
|
|
132
|
+
FormControlLabelProps: FormControlLabelProps,
|
|
133
|
+
RadioProps: RadioProps
|
|
123
134
|
}, rest));
|
|
124
135
|
}), text && /*#__PURE__*/React.createElement(FormHelperText, FormHelperTextProps, text)));
|
|
125
136
|
};
|
|
@@ -139,13 +150,4 @@ Radio.propTypes = _objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
|
139
150
|
FormLabelProps: PropTypes.object,
|
|
140
151
|
FormHelperTextProps: PropTypes.object
|
|
141
152
|
});
|
|
142
|
-
Radio.defaultProps = {
|
|
143
|
-
options: [],
|
|
144
|
-
FormFieldGridProps: {},
|
|
145
|
-
FormControlProps: {},
|
|
146
|
-
FormControlLabelProps: {},
|
|
147
|
-
RadioProps: {},
|
|
148
|
-
FormLabelProps: {},
|
|
149
|
-
FormHelperTextProps: {}
|
|
150
|
-
};
|
|
151
153
|
export default Radio;
|
package/esm/select/select.js
CHANGED
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
5
5
|
var _excluded = ["inputProps"],
|
|
6
|
-
_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"],
|
|
6
|
+
_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"],
|
|
7
7
|
_excluded3 = ["input", "isRequired", "isDisabled", "isReadOnly", "disabled", "multiple", "isMulti", "isClearable", "disableClearable", "loadingMessage", "loadingText", "noOptionsMessage", "noOptionsText", "closeMenuOnSelect"];
|
|
8
8
|
|
|
9
9
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -84,7 +84,8 @@ var InternalSelect = function InternalSelect(_ref2) {
|
|
|
84
84
|
description = _ref2.description,
|
|
85
85
|
classNamePrefix = _ref2.classNamePrefix,
|
|
86
86
|
isMulti = _ref2.isMulti,
|
|
87
|
-
placeholder = _ref2.placeholder,
|
|
87
|
+
_ref2$placeholder = _ref2.placeholder,
|
|
88
|
+
placeholder = _ref2$placeholder === void 0 ? 'Please choose' : _ref2$placeholder,
|
|
88
89
|
_onInputChange = _ref2.onInputChange,
|
|
89
90
|
isFetching = _ref2.isFetching,
|
|
90
91
|
noOptionsMessage = _ref2.noOptionsMessage,
|
|
@@ -94,13 +95,19 @@ var InternalSelect = function InternalSelect(_ref2) {
|
|
|
94
95
|
_onChange = _ref2.onChange,
|
|
95
96
|
onFocus = _ref2.onFocus,
|
|
96
97
|
onBlur = _ref2.onBlur,
|
|
97
|
-
|
|
98
|
-
_ref2$
|
|
99
|
-
|
|
98
|
+
_ref2$FormFieldGridPr = _ref2.FormFieldGridProps,
|
|
99
|
+
FormFieldGridProps = _ref2$FormFieldGridPr === void 0 ? {} : _ref2$FormFieldGridPr,
|
|
100
|
+
_ref2$TextFieldProps = _ref2.TextFieldProps;
|
|
101
|
+
_ref2$TextFieldProps = _ref2$TextFieldProps === void 0 ? {} : _ref2$TextFieldProps;
|
|
102
|
+
|
|
103
|
+
var textFieldInputProps = _ref2$TextFieldProps.inputProps,
|
|
100
104
|
TextFieldProps = _objectWithoutProperties(_ref2$TextFieldProps, _excluded),
|
|
101
|
-
inputProps = _ref2.inputProps,
|
|
105
|
+
_ref2$inputProps = _ref2.inputProps,
|
|
106
|
+
inputProps = _ref2$inputProps === void 0 ? {} : _ref2$inputProps,
|
|
102
107
|
isClearable = _ref2.isClearable,
|
|
103
108
|
isDisabled = _ref2.isDisabled,
|
|
109
|
+
_ref2$loadingText = _ref2.loadingText,
|
|
110
|
+
loadingText = _ref2$loadingText === void 0 ? 'Loading...' : _ref2$loadingText,
|
|
104
111
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
105
112
|
|
|
106
113
|
var invalid = 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
|
|
@@ -117,7 +124,8 @@ var InternalSelect = function InternalSelect(_ref2) {
|
|
|
117
124
|
size: 20,
|
|
118
125
|
color: "inherit"
|
|
119
126
|
}) : /*#__PURE__*/React.createElement(ArrowDropDownIcon, null),
|
|
120
|
-
fullWidth: true
|
|
127
|
+
fullWidth: true,
|
|
128
|
+
loadingText: loadingText
|
|
121
129
|
}, rest, {
|
|
122
130
|
renderInput: function renderInput(params) {
|
|
123
131
|
return /*#__PURE__*/React.createElement(TextField, _extends({
|
|
@@ -182,14 +190,8 @@ InternalSelect.propTypes = {
|
|
|
182
190
|
onBlur: PropTypes.func,
|
|
183
191
|
TextFieldProps: PropTypes.object,
|
|
184
192
|
inputProps: PropTypes.object,
|
|
185
|
-
isDisabled: PropTypes.bool
|
|
186
|
-
|
|
187
|
-
InternalSelect.defaultProps = {
|
|
188
|
-
placeholder: 'Please choose',
|
|
189
|
-
FormFieldGridProps: {},
|
|
190
|
-
TextFieldProps: {},
|
|
191
|
-
inputProps: {},
|
|
192
|
-
loadingText: 'Loading...'
|
|
193
|
+
isDisabled: PropTypes.bool,
|
|
194
|
+
loadingText: PropTypes.node
|
|
193
195
|
};
|
|
194
196
|
|
|
195
197
|
var Select = function Select(props) {
|
package/esm/switch/switch.js
CHANGED
|
@@ -34,13 +34,20 @@ export var Switch = function Switch(props) {
|
|
|
34
34
|
meta = _useFieldApi.meta,
|
|
35
35
|
onText = _useFieldApi.onText,
|
|
36
36
|
offText = _useFieldApi.offText,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
_useFieldApi$FormFiel = _useFieldApi.FormFieldGridProps,
|
|
38
|
+
FormFieldGridProps = _useFieldApi$FormFiel === void 0 ? {} : _useFieldApi$FormFiel,
|
|
39
|
+
_useFieldApi$FormCont = _useFieldApi.FormControlProps,
|
|
40
|
+
FormControlProps = _useFieldApi$FormCont === void 0 ? {} : _useFieldApi$FormCont,
|
|
41
|
+
_useFieldApi$FormGrou = _useFieldApi.FormGroupProps,
|
|
42
|
+
FormGroupProps = _useFieldApi$FormGrou === void 0 ? {} : _useFieldApi$FormGrou,
|
|
43
|
+
_useFieldApi$FormCont2 = _useFieldApi.FormControlLabelProps,
|
|
44
|
+
FormControlLabelProps = _useFieldApi$FormCont2 === void 0 ? {} : _useFieldApi$FormCont2,
|
|
45
|
+
_useFieldApi$SwitchPr = _useFieldApi.SwitchProps,
|
|
46
|
+
SwitchProps = _useFieldApi$SwitchPr === void 0 ? {} : _useFieldApi$SwitchPr,
|
|
47
|
+
_useFieldApi$FormLabe = _useFieldApi.FormLabelProps,
|
|
48
|
+
FormLabelProps = _useFieldApi$FormLabe === void 0 ? {} : _useFieldApi$FormLabe,
|
|
49
|
+
_useFieldApi$FormHelp = _useFieldApi.FormHelperTextProps,
|
|
50
|
+
FormHelperTextProps = _useFieldApi$FormHelp === void 0 ? {} : _useFieldApi$FormHelp,
|
|
44
51
|
rest = _objectWithoutProperties(_useFieldApi, _excluded);
|
|
45
52
|
|
|
46
53
|
var invalid = validationError(meta, validateOnMount);
|
|
@@ -81,13 +88,4 @@ Switch.propTypes = {
|
|
|
81
88
|
FormLabelProps: PropTypes.object,
|
|
82
89
|
FormHelperTextProps: PropTypes.object
|
|
83
90
|
};
|
|
84
|
-
Switch.defaultProps = {
|
|
85
|
-
FormFieldGridProps: {},
|
|
86
|
-
FormControlProps: {},
|
|
87
|
-
FormGroupProps: {},
|
|
88
|
-
FormControlLabelProps: {},
|
|
89
|
-
SwitchProps: {},
|
|
90
|
-
FormLabelProps: {},
|
|
91
|
-
FormHelperTextProps: {}
|
|
92
|
-
};
|
|
93
91
|
export default Switch;
|
package/esm/tabs/tabs.js
CHANGED
|
@@ -17,11 +17,16 @@ import useFormApi from "@data-driven-forms/react-form-renderer/use-form-api";
|
|
|
17
17
|
|
|
18
18
|
var FormTabs = function FormTabs(_ref) {
|
|
19
19
|
var fields = _ref.fields,
|
|
20
|
-
AppBarProps = _ref.AppBarProps,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
_ref$AppBarProps = _ref.AppBarProps,
|
|
21
|
+
AppBarProps = _ref$AppBarProps === void 0 ? {} : _ref$AppBarProps,
|
|
22
|
+
_ref$TabsProps = _ref.TabsProps,
|
|
23
|
+
TabsProps = _ref$TabsProps === void 0 ? {} : _ref$TabsProps,
|
|
24
|
+
_ref$TabProps = _ref.TabProps,
|
|
25
|
+
TabProps = _ref$TabProps === void 0 ? {} : _ref$TabProps,
|
|
26
|
+
_ref$FormFieldGridPro = _ref.FormFieldGridProps,
|
|
27
|
+
FormFieldGridProps = _ref$FormFieldGridPro === void 0 ? {} : _ref$FormFieldGridPro,
|
|
28
|
+
_ref$GridItemProps = _ref.GridItemProps,
|
|
29
|
+
GridItemProps = _ref$GridItemProps === void 0 ? {} : _ref$GridItemProps;
|
|
25
30
|
var formOptions = useFormApi();
|
|
26
31
|
|
|
27
32
|
var _useState = useState(0),
|
|
@@ -72,13 +77,6 @@ FormTabs.propTypes = {
|
|
|
72
77
|
FormFieldGridProps: PropTypes.object,
|
|
73
78
|
GridItemProps: PropTypes.object
|
|
74
79
|
};
|
|
75
|
-
FormTabs.defaultProps = {
|
|
76
|
-
AppBarProps: {},
|
|
77
|
-
TabsProps: {},
|
|
78
|
-
TabProps: {},
|
|
79
|
-
FormFieldGridProps: {},
|
|
80
|
-
GridItemProps: {}
|
|
81
|
-
};
|
|
82
80
|
export default FormTabs;
|
|
83
81
|
/*
|
|
84
82
|
{fields.map(({ fields }, index) =>
|
package/esm/textarea/textarea.js
CHANGED
|
@@ -27,8 +27,10 @@ var Textarea = function Textarea(props) {
|
|
|
27
27
|
description = _useFieldApi.description,
|
|
28
28
|
validateOnMount = _useFieldApi.validateOnMount,
|
|
29
29
|
meta = _useFieldApi.meta,
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
_useFieldApi$FormFiel = _useFieldApi.FormFieldGridProps,
|
|
31
|
+
FormFieldGridProps = _useFieldApi$FormFiel === void 0 ? {} : _useFieldApi$FormFiel,
|
|
32
|
+
_useFieldApi$inputPro = _useFieldApi.inputProps,
|
|
33
|
+
inputProps = _useFieldApi$inputPro === void 0 ? {} : _useFieldApi$inputPro,
|
|
32
34
|
rest = _objectWithoutProperties(_useFieldApi, _excluded);
|
|
33
35
|
|
|
34
36
|
var invalid = validationError(meta, validateOnMount);
|
|
@@ -62,8 +64,4 @@ Textarea.propTypes = {
|
|
|
62
64
|
FormFieldGridProps: PropTypes.object,
|
|
63
65
|
inputProps: PropTypes.object
|
|
64
66
|
};
|
|
65
|
-
Textarea.defaultProps = {
|
|
66
|
-
FormFieldGridProps: {},
|
|
67
|
-
inputProps: {}
|
|
68
|
-
};
|
|
69
67
|
export default Textarea;
|
|
@@ -23,7 +23,8 @@ var TimePicker = function TimePicker(props) {
|
|
|
23
23
|
validateOnMount = _useFieldApi.validateOnMount,
|
|
24
24
|
meta = _useFieldApi.meta,
|
|
25
25
|
MuiPickersUtilsProviderProps = _useFieldApi.MuiPickersUtilsProviderProps,
|
|
26
|
-
|
|
26
|
+
_useFieldApi$FormFiel = _useFieldApi.FormFieldGridProps,
|
|
27
|
+
FormFieldGridProps = _useFieldApi$FormFiel === void 0 ? {} : _useFieldApi$FormFiel,
|
|
27
28
|
rest = _objectWithoutProperties(_useFieldApi, _excluded);
|
|
28
29
|
|
|
29
30
|
var invalid = validationError(meta, validateOnMount);
|
|
@@ -73,7 +74,4 @@ TimePicker.propTypes = {
|
|
|
73
74
|
description: PropTypes.node,
|
|
74
75
|
FormFieldGridProps: PropTypes.object
|
|
75
76
|
};
|
|
76
|
-
TimePicker.defaultProps = {
|
|
77
|
-
FormFieldGridProps: {}
|
|
78
|
-
};
|
|
79
77
|
export default TimePicker;
|
|
@@ -85,7 +85,8 @@ var WizardStepButtons = function WizardStepButtons(_ref3) {
|
|
|
85
85
|
back = _props$buttonLabels.back,
|
|
86
86
|
next = _props$buttonLabels.next,
|
|
87
87
|
formOptions = props.formOptions,
|
|
88
|
-
|
|
88
|
+
_props$ButtonContaine = props.ButtonContainerProps,
|
|
89
|
+
ButtonContainerProps = _props$ButtonContaine === void 0 ? {} : _props$ButtonContaine,
|
|
89
90
|
conditionalSubmitFlag = props.conditionalSubmitFlag;
|
|
90
91
|
return /*#__PURE__*/React.createElement(StyledGrid, _extends({
|
|
91
92
|
container: true,
|
|
@@ -148,7 +149,4 @@ WizardStepButtons.propTypes = {
|
|
|
148
149
|
onCancel: PropTypes.func.isRequired
|
|
149
150
|
})
|
|
150
151
|
};
|
|
151
|
-
WizardStepButtons.defaultProps = {
|
|
152
|
-
ButtonContainerProps: {}
|
|
153
|
-
};
|
|
154
152
|
export default WizardStepButtons;
|
package/esm/wizard/wizard-nav.js
CHANGED
|
@@ -18,7 +18,8 @@ var StyledStepper = styled(Stepper)(function () {
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
var WizardNav = function WizardNav(_ref2) {
|
|
21
|
-
var StepperProps = _ref2.StepperProps,
|
|
21
|
+
var _ref2$StepperProps = _ref2.StepperProps,
|
|
22
|
+
StepperProps = _ref2$StepperProps === void 0 ? {} : _ref2$StepperProps,
|
|
22
23
|
stepsInfo = _ref2.stepsInfo,
|
|
23
24
|
activeStepIndex = _ref2.activeStepIndex;
|
|
24
25
|
return /*#__PURE__*/React.createElement(StyledStepper, _extends({}, StepperProps, {
|
|
@@ -45,7 +46,4 @@ WizardNav.propTypes = {
|
|
|
45
46
|
})),
|
|
46
47
|
activeStepIndex: PropTypes.number
|
|
47
48
|
};
|
|
48
|
-
WizardNav.defaultProps = {
|
|
49
|
-
StepperProps: {}
|
|
50
|
-
};
|
|
51
49
|
export default WizardNav;
|
package/esm/wizard/wizard.js
CHANGED
|
@@ -30,7 +30,8 @@ var WizardInternal = function WizardInternal(_ref2) {
|
|
|
30
30
|
stepsInfo = _ref2.stepsInfo,
|
|
31
31
|
ButtonContainerProps = _ref2.ButtonContainerProps,
|
|
32
32
|
StepperProps = _ref2.StepperProps,
|
|
33
|
-
WizardBodyProps = _ref2.WizardBodyProps,
|
|
33
|
+
_ref2$WizardBodyProps = _ref2.WizardBodyProps,
|
|
34
|
+
WizardBodyProps = _ref2$WizardBodyProps === void 0 ? {} : _ref2$WizardBodyProps,
|
|
34
35
|
WizardProps = _ref2.WizardProps,
|
|
35
36
|
conditionalSubmitFlag = _ref2.conditionalSubmitFlag;
|
|
36
37
|
|
|
@@ -90,9 +91,6 @@ WizardInternal.propTypes = {
|
|
|
90
91
|
WizardProps: PropTypes.object,
|
|
91
92
|
conditionalSubmitFlag: PropTypes.string.isRequired
|
|
92
93
|
};
|
|
93
|
-
WizardInternal.defaultProps = {
|
|
94
|
-
WizardBodyProps: {}
|
|
95
|
-
};
|
|
96
94
|
|
|
97
95
|
var MuiWizard = function MuiWizard(props) {
|
|
98
96
|
return /*#__PURE__*/React.createElement(Wizard, _extends({
|
|
@@ -99,10 +99,14 @@ var ArrayItem = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
99
99
|
length = _ref.length,
|
|
100
100
|
minItems = _ref.minItems,
|
|
101
101
|
removeLabel = _ref.removeLabel,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
_ref$FieldContainerPr = _ref.FieldContainerProps,
|
|
103
|
+
FieldContainerProps = _ref$FieldContainerPr === void 0 ? {} : _ref$FieldContainerPr,
|
|
104
|
+
_ref$FieldGroupGridPr = _ref.FieldGroupGridProps,
|
|
105
|
+
FieldGroupGridProps = _ref$FieldGroupGridPr === void 0 ? {} : _ref$FieldGroupGridPr,
|
|
106
|
+
_ref$RemoveButtonGrid = _ref.RemoveButtonGridProps,
|
|
107
|
+
RemoveButtonGridProps = _ref$RemoveButtonGrid === void 0 ? {} : _ref$RemoveButtonGrid,
|
|
108
|
+
_ref$RemoveButtonProp = _ref.RemoveButtonProps,
|
|
109
|
+
RemoveButtonProps = _ref$RemoveButtonProp === void 0 ? {} : _ref$RemoveButtonProp;
|
|
106
110
|
|
|
107
111
|
var _useFormApi = (0, _useFormApi2["default"])(),
|
|
108
112
|
renderForm = _useFormApi.renderForm;
|
|
@@ -154,12 +158,6 @@ ArrayItem.propTypes = {
|
|
|
154
158
|
RemoveButtonGridProps: _propTypes["default"].object,
|
|
155
159
|
RemoveButtonProps: _propTypes["default"].object
|
|
156
160
|
};
|
|
157
|
-
ArrayItem.defaultProps = {
|
|
158
|
-
FieldContainerProps: {},
|
|
159
|
-
FieldGroupGridProps: {},
|
|
160
|
-
RemoveButtonGridProps: {},
|
|
161
|
-
RemoveButtonProps: {}
|
|
162
|
-
};
|
|
163
161
|
var defaultButtonLabels = {
|
|
164
162
|
add: 'ADD',
|
|
165
163
|
remove: 'REMOVE'
|
|
@@ -212,28 +210,49 @@ var DynamicArray = function DynamicArray(_ref5) {
|
|
|
212
210
|
formFields = _useFieldApi.fields,
|
|
213
211
|
defaultItem = _useFieldApi.defaultItem,
|
|
214
212
|
meta = _useFieldApi.meta,
|
|
215
|
-
minItems = _useFieldApi.minItems,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
213
|
+
_useFieldApi$minItems = _useFieldApi.minItems,
|
|
214
|
+
minItems = _useFieldApi$minItems === void 0 ? 0 : _useFieldApi$minItems,
|
|
215
|
+
_useFieldApi$maxItems = _useFieldApi.maxItems,
|
|
216
|
+
maxItems = _useFieldApi$maxItems === void 0 ? Infinity : _useFieldApi$maxItems,
|
|
217
|
+
_useFieldApi$noItemsM = _useFieldApi.noItemsMessage,
|
|
218
|
+
noItemsMessage = _useFieldApi$noItemsM === void 0 ? 'No items added' : _useFieldApi$noItemsM,
|
|
219
|
+
_useFieldApi$FormFiel = _useFieldApi.FormFieldGridProps,
|
|
220
|
+
FormFieldGridProps = _useFieldApi$FormFiel === void 0 ? {} : _useFieldApi$FormFiel,
|
|
221
|
+
_useFieldApi$FormCont = _useFieldApi.FormControlProps,
|
|
222
|
+
FormControlProps = _useFieldApi$FormCont === void 0 ? {} : _useFieldApi$FormCont,
|
|
220
223
|
buttonLabels = _useFieldApi.buttonLabels,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
224
|
+
_useFieldApi$GridCont = _useFieldApi.GridContainerProps,
|
|
225
|
+
GridContainerProps = _useFieldApi$GridCont === void 0 ? {} : _useFieldApi$GridCont,
|
|
226
|
+
_useFieldApi$HeaderGr = _useFieldApi.HeaderGridProps,
|
|
227
|
+
HeaderGridProps = _useFieldApi$HeaderGr === void 0 ? {} : _useFieldApi$HeaderGr,
|
|
228
|
+
_useFieldApi$HeaderPr = _useFieldApi.HeaderProps,
|
|
229
|
+
HeaderProps = _useFieldApi$HeaderPr === void 0 ? {} : _useFieldApi$HeaderPr,
|
|
230
|
+
_useFieldApi$UndoButt = _useFieldApi.UndoButtonProps,
|
|
231
|
+
UndoButtonProps = _useFieldApi$UndoButt === void 0 ? {} : _useFieldApi$UndoButt,
|
|
232
|
+
_useFieldApi$RedoButt = _useFieldApi.RedoButtonProps,
|
|
233
|
+
RedoButtonProps = _useFieldApi$RedoButt === void 0 ? {} : _useFieldApi$RedoButt,
|
|
234
|
+
_useFieldApi$AddButto = _useFieldApi.AddButtonProps,
|
|
235
|
+
AddButtonProps = _useFieldApi$AddButto === void 0 ? {} : _useFieldApi$AddButto,
|
|
236
|
+
_useFieldApi$Descript = _useFieldApi.DescriptionGridProps,
|
|
237
|
+
DescriptionGridProps = _useFieldApi$Descript === void 0 ? {} : _useFieldApi$Descript,
|
|
238
|
+
_useFieldApi$Descript2 = _useFieldApi.DescriptionProps,
|
|
239
|
+
DescriptionProps = _useFieldApi$Descript2 === void 0 ? {} : _useFieldApi$Descript2,
|
|
240
|
+
_useFieldApi$BodyGrid = _useFieldApi.BodyGridProps,
|
|
241
|
+
BodyGridProps = _useFieldApi$BodyGrid === void 0 ? {} : _useFieldApi$BodyGrid,
|
|
242
|
+
_useFieldApi$NoItemsP = _useFieldApi.NoItemsProps,
|
|
243
|
+
NoItemsProps = _useFieldApi$NoItemsP === void 0 ? {} : _useFieldApi$NoItemsP,
|
|
244
|
+
_useFieldApi$FormHelp = _useFieldApi.FormHelperTextGridProps,
|
|
245
|
+
FormHelperTextGridProps = _useFieldApi$FormHelp === void 0 ? {} : _useFieldApi$FormHelp,
|
|
246
|
+
_useFieldApi$FormHelp2 = _useFieldApi.FormHelperTextProps,
|
|
247
|
+
FormHelperTextProps = _useFieldApi$FormHelp2 === void 0 ? {} : _useFieldApi$FormHelp2,
|
|
248
|
+
_useFieldApi$FieldCon = _useFieldApi.FieldContainerProps,
|
|
249
|
+
FieldContainerProps = _useFieldApi$FieldCon === void 0 ? {} : _useFieldApi$FieldCon,
|
|
250
|
+
_useFieldApi$FieldGro = _useFieldApi.FieldGroupGridProps,
|
|
251
|
+
FieldGroupGridProps = _useFieldApi$FieldGro === void 0 ? {} : _useFieldApi$FieldGro,
|
|
252
|
+
_useFieldApi$RemoveBu = _useFieldApi.RemoveButtonGridProps,
|
|
253
|
+
RemoveButtonGridProps = _useFieldApi$RemoveBu === void 0 ? {} : _useFieldApi$RemoveBu,
|
|
254
|
+
_useFieldApi$RemoveBu2 = _useFieldApi.RemoveButtonProps,
|
|
255
|
+
RemoveButtonProps = _useFieldApi$RemoveBu2 === void 0 ? {} : _useFieldApi$RemoveBu2,
|
|
237
256
|
rest = (0, _objectWithoutProperties2["default"])(_useFieldApi, _excluded3);
|
|
238
257
|
|
|
239
258
|
var _useReducer = (0, _react.useReducer)(reducer, initialState),
|
|
@@ -391,28 +410,5 @@ DynamicArray.propTypes = {
|
|
|
391
410
|
RemoveButtonGridProps: _propTypes["default"].object,
|
|
392
411
|
RemoveButtonProps: _propTypes["default"].object
|
|
393
412
|
};
|
|
394
|
-
DynamicArray.defaultProps = {
|
|
395
|
-
maxItems: Infinity,
|
|
396
|
-
minItems: 0,
|
|
397
|
-
noItemsMessage: 'No items added',
|
|
398
|
-
FormControlProps: {},
|
|
399
|
-
FormFieldGridProps: {},
|
|
400
|
-
GridContainerProps: {},
|
|
401
|
-
HeaderGridProps: {},
|
|
402
|
-
HeaderProps: {},
|
|
403
|
-
UndoButtonProps: {},
|
|
404
|
-
RedoButtonProps: {},
|
|
405
|
-
AddButtonProps: {},
|
|
406
|
-
DescriptionGridProps: {},
|
|
407
|
-
DescriptionProps: {},
|
|
408
|
-
BodyGridProps: {},
|
|
409
|
-
NoItemsProps: {},
|
|
410
|
-
FormHelperTextGridProps: {},
|
|
411
|
-
FormHelperTextProps: {},
|
|
412
|
-
FieldContainerProps: {},
|
|
413
|
-
FieldGroupGridProps: {},
|
|
414
|
-
RemoveButtonGridProps: {},
|
|
415
|
-
RemoveButtonProps: {}
|
|
416
|
-
};
|
|
417
413
|
var _default = DynamicArray;
|
|
418
414
|
exports["default"] = _default;
|
|
@@ -112,13 +112,20 @@ var Wrapper = function Wrapper(_ref2) {
|
|
|
112
112
|
Wrapper.propTypes = _objectSpread({}, _multipleChoiceList.wrapperProps);
|
|
113
113
|
|
|
114
114
|
var MultipleChoiceList = function MultipleChoiceList(_ref3) {
|
|
115
|
-
var
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
var _ref3$FormControlProp = _ref3.FormControlProps,
|
|
116
|
+
FormControlProps = _ref3$FormControlProp === void 0 ? {} : _ref3$FormControlProp,
|
|
117
|
+
_ref3$FormLabelProps = _ref3.FormLabelProps,
|
|
118
|
+
FormLabelProps = _ref3$FormLabelProps === void 0 ? {} : _ref3$FormLabelProps,
|
|
119
|
+
_ref3$FormGroupProps = _ref3.FormGroupProps,
|
|
120
|
+
FormGroupProps = _ref3$FormGroupProps === void 0 ? {} : _ref3$FormGroupProps,
|
|
121
|
+
_ref3$FormHelperTextP = _ref3.FormHelperTextProps,
|
|
122
|
+
FormHelperTextProps = _ref3$FormHelperTextP === void 0 ? {} : _ref3$FormHelperTextP,
|
|
123
|
+
_ref3$FormFieldGridPr = _ref3.FormFieldGridProps,
|
|
124
|
+
FormFieldGridProps = _ref3$FormFieldGridPr === void 0 ? {} : _ref3$FormFieldGridPr,
|
|
125
|
+
_ref3$FormControlLabe = _ref3.FormControlLabelProps,
|
|
126
|
+
FormControlLabelProps = _ref3$FormControlLabe === void 0 ? {} : _ref3$FormControlLabe,
|
|
127
|
+
_ref3$CheckboxProps = _ref3.CheckboxProps,
|
|
128
|
+
CheckboxProps = _ref3$CheckboxProps === void 0 ? {} : _ref3$CheckboxProps,
|
|
122
129
|
props = (0, _objectWithoutProperties2["default"])(_ref3, _excluded3);
|
|
123
130
|
return /*#__PURE__*/_react["default"].createElement(CheckboxContext.Provider, {
|
|
124
131
|
value: {
|
|
@@ -149,14 +156,5 @@ MultipleChoiceList.propTypes = {
|
|
|
149
156
|
FormLabelProps: _propTypes["default"].object,
|
|
150
157
|
FormHelperTextProps: _propTypes["default"].object
|
|
151
158
|
};
|
|
152
|
-
MultipleChoiceList.defaultProps = {
|
|
153
|
-
FormFieldGridProps: {},
|
|
154
|
-
FormControlProps: {},
|
|
155
|
-
FormGroupProps: {},
|
|
156
|
-
FormControlLabelProps: {},
|
|
157
|
-
CheckboxProps: {},
|
|
158
|
-
FormLabelProps: {},
|
|
159
|
-
FormHelperTextProps: {}
|
|
160
|
-
};
|
|
161
159
|
var _default = MultipleChoiceList;
|
|
162
160
|
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@data-driven-forms/mui-component-mapper",
|
|
3
|
-
"version": "3.22.
|
|
3
|
+
"version": "3.22.3",
|
|
4
4
|
"description": "Component mapper for Material ui component mapper form data-driven-forms.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"react-intl": "^6.4.6"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@data-driven-forms/react-form-renderer": "^3.22.
|
|
34
|
+
"@data-driven-forms/react-form-renderer": "^3.22.3",
|
|
35
35
|
"@mui/icons-material": "^5.10.3",
|
|
36
36
|
"@mui/material": "^5.10.4",
|
|
37
37
|
"@mui/x-date-pickers": "^5.0.1 || ^6.13.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"react-dom": "^17.0.2 || ^18.0.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@data-driven-forms/common": "^3.22.
|
|
43
|
+
"@data-driven-forms/common": "^3.22.3",
|
|
44
44
|
"@emotion/react": "^11.10.4",
|
|
45
45
|
"@emotion/styled": "^11.10.4",
|
|
46
46
|
"@mui/system": "^5.10.4",
|
package/plain-text/plain-text.js
CHANGED
|
@@ -17,17 +17,23 @@ var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
|
17
17
|
|
|
18
18
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["label", "name", "component", "element"];
|
|
20
|
+
var _excluded = ["label", "name", "component", "element", "variant", "gutterBottom"];
|
|
21
21
|
|
|
22
22
|
var PlainText = function PlainText(_ref) {
|
|
23
23
|
var label = _ref.label,
|
|
24
24
|
name = _ref.name,
|
|
25
25
|
component = _ref.component,
|
|
26
26
|
element = _ref.element,
|
|
27
|
+
_ref$variant = _ref.variant,
|
|
28
|
+
variant = _ref$variant === void 0 ? 'body1' : _ref$variant,
|
|
29
|
+
_ref$gutterBottom = _ref.gutterBottom,
|
|
30
|
+
gutterBottom = _ref$gutterBottom === void 0 ? true : _ref$gutterBottom,
|
|
27
31
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
28
32
|
return typeof label === 'string' ? label.split('\n').map(function (paragraph, index) {
|
|
29
33
|
return /*#__PURE__*/_react["default"].createElement(_Typography["default"], (0, _extends2["default"])({
|
|
30
|
-
key: "".concat(index, "-").concat(name)
|
|
34
|
+
key: "".concat(index, "-").concat(name),
|
|
35
|
+
variant: variant,
|
|
36
|
+
gutterBottom: gutterBottom
|
|
31
37
|
}, props, element && {
|
|
32
38
|
component: element
|
|
33
39
|
}), paragraph);
|
|
@@ -40,11 +46,9 @@ PlainText.propTypes = {
|
|
|
40
46
|
label: _propTypes["default"].node.isRequired,
|
|
41
47
|
name: _propTypes["default"].string.isRequired,
|
|
42
48
|
component: _propTypes["default"].any,
|
|
43
|
-
element: _propTypes["default"].elementType
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
variant: 'body1',
|
|
47
|
-
gutterBottom: true
|
|
49
|
+
element: _propTypes["default"].elementType,
|
|
50
|
+
gutterBottom: _propTypes["default"].bool,
|
|
51
|
+
variant: _propTypes["default"].string
|
|
48
52
|
};
|
|
49
53
|
var _default = PlainText;
|
|
50
54
|
exports["default"] = _default;
|
package/radio/radio.js
CHANGED
|
@@ -40,7 +40,7 @@ var _useFieldApi3 = _interopRequireDefault(require("@data-driven-forms/react-for
|
|
|
40
40
|
var _excluded = ["inputProps"],
|
|
41
41
|
_excluded2 = ["name", "option", "isDisabled", "isReadOnly", "FormControlLabelProps", "RadioProps"],
|
|
42
42
|
_excluded3 = ["name"],
|
|
43
|
-
_excluded4 = ["options", "isDisabled", "label", "isRequired", "helperText", "description", "isReadOnly", "meta", "validateOnMount", "FormFieldGridProps", "FormControlProps", "FormLabelProps", "FormHelperTextProps"];
|
|
43
|
+
_excluded4 = ["options", "isDisabled", "label", "isRequired", "helperText", "description", "isReadOnly", "meta", "validateOnMount", "FormFieldGridProps", "FormControlProps", "FormLabelProps", "FormHelperTextProps", "FormControlLabelProps", "RadioProps"];
|
|
44
44
|
|
|
45
45
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
46
46
|
|
|
@@ -112,7 +112,8 @@ var Radio = function Radio(_ref3) {
|
|
|
112
112
|
name: name,
|
|
113
113
|
type: 'radio'
|
|
114
114
|
})),
|
|
115
|
-
options = _useFieldApi2.options,
|
|
115
|
+
_useFieldApi2$options = _useFieldApi2.options,
|
|
116
|
+
options = _useFieldApi2$options === void 0 ? [] : _useFieldApi2$options,
|
|
116
117
|
isDisabled = _useFieldApi2.isDisabled,
|
|
117
118
|
label = _useFieldApi2.label,
|
|
118
119
|
isRequired = _useFieldApi2.isRequired,
|
|
@@ -121,10 +122,18 @@ var Radio = function Radio(_ref3) {
|
|
|
121
122
|
isReadOnly = _useFieldApi2.isReadOnly,
|
|
122
123
|
meta = _useFieldApi2.meta,
|
|
123
124
|
validateOnMount = _useFieldApi2.validateOnMount,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
_useFieldApi2$FormFie = _useFieldApi2.FormFieldGridProps,
|
|
126
|
+
FormFieldGridProps = _useFieldApi2$FormFie === void 0 ? {} : _useFieldApi2$FormFie,
|
|
127
|
+
_useFieldApi2$FormCon = _useFieldApi2.FormControlProps,
|
|
128
|
+
FormControlProps = _useFieldApi2$FormCon === void 0 ? {} : _useFieldApi2$FormCon,
|
|
129
|
+
_useFieldApi2$FormLab = _useFieldApi2.FormLabelProps,
|
|
130
|
+
FormLabelProps = _useFieldApi2$FormLab === void 0 ? {} : _useFieldApi2$FormLab,
|
|
131
|
+
_useFieldApi2$FormHel = _useFieldApi2.FormHelperTextProps,
|
|
132
|
+
FormHelperTextProps = _useFieldApi2$FormHel === void 0 ? {} : _useFieldApi2$FormHel,
|
|
133
|
+
_useFieldApi2$FormCon2 = _useFieldApi2.FormControlLabelProps,
|
|
134
|
+
FormControlLabelProps = _useFieldApi2$FormCon2 === void 0 ? {} : _useFieldApi2$FormCon2,
|
|
135
|
+
_useFieldApi2$RadioPr = _useFieldApi2.RadioProps,
|
|
136
|
+
RadioProps = _useFieldApi2$RadioPr === void 0 ? {} : _useFieldApi2$RadioPr,
|
|
128
137
|
rest = (0, _objectWithoutProperties2["default"])(_useFieldApi2, _excluded4);
|
|
129
138
|
|
|
130
139
|
var invalid = (0, _validationError.validationError)(meta, validateOnMount);
|
|
@@ -143,7 +152,9 @@ var Radio = function Radio(_ref3) {
|
|
|
143
152
|
name: name,
|
|
144
153
|
option: option,
|
|
145
154
|
isDisabled: isDisabled,
|
|
146
|
-
isReadOnly: isReadOnly
|
|
155
|
+
isReadOnly: isReadOnly,
|
|
156
|
+
FormControlLabelProps: FormControlLabelProps,
|
|
157
|
+
RadioProps: RadioProps
|
|
147
158
|
}, rest));
|
|
148
159
|
}), text && /*#__PURE__*/_react["default"].createElement(_FormHelperText["default"], FormHelperTextProps, text)));
|
|
149
160
|
};
|
|
@@ -163,14 +174,5 @@ Radio.propTypes = _objectSpread(_objectSpread({}, _multipleChoiceList.wrapperPro
|
|
|
163
174
|
FormLabelProps: _propTypes["default"].object,
|
|
164
175
|
FormHelperTextProps: _propTypes["default"].object
|
|
165
176
|
});
|
|
166
|
-
Radio.defaultProps = {
|
|
167
|
-
options: [],
|
|
168
|
-
FormFieldGridProps: {},
|
|
169
|
-
FormControlProps: {},
|
|
170
|
-
FormControlLabelProps: {},
|
|
171
|
-
RadioProps: {},
|
|
172
|
-
FormLabelProps: {},
|
|
173
|
-
FormHelperTextProps: {}
|
|
174
|
-
};
|
|
175
177
|
var _default = Radio;
|
|
176
178
|
exports["default"] = _default;
|