@data-driven-forms/ant-component-mapper 3.19.1 → 3.19.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.
@@ -58,7 +58,8 @@ var DatePicker = function DatePicker(props) {
58
58
  error: !!invalid,
59
59
  readOnly: isReadOnly
60
60
  }, input, {
61
- value: input.value || null
61
+ value: input.value || null,
62
+ id: input.name
62
63
  }, rest)));
63
64
  };
64
65
 
@@ -41,7 +41,8 @@ var DatePicker = function DatePicker(props) {
41
41
  error: !!invalid,
42
42
  readOnly: isReadOnly
43
43
  }, input, {
44
- value: input.value || null
44
+ value: input.value || null,
45
+ id: input.name
45
46
  }, rest)));
46
47
  };
47
48
 
@@ -24,7 +24,7 @@ var FormGroup = function FormGroup(_ref) {
24
24
  help: help,
25
25
  label: !hideLabel && label,
26
26
  required: isRequired,
27
- name: input === null || input === void 0 ? void 0 : input.name
27
+ htmlFor: input === null || input === void 0 ? void 0 : input.name
28
28
  }, FormItemProps), children);
29
29
  };
30
30
 
@@ -63,7 +63,8 @@ var Select = function Select(props) {
63
63
  onChange: function onChange(value, option) {
64
64
  return input.onChange(isMulti ? selectValue(option) : option ? option.value : undefined);
65
65
  },
66
- input: input
66
+ input: input,
67
+ id: input.name
67
68
  }, rest), options.filter(function (option) {
68
69
  return Object.prototype.hasOwnProperty.call(option, 'value') && option.value !== null;
69
70
  }).map(function (_ref) {
@@ -49,7 +49,8 @@ var Slider = function Slider(props) {
49
49
  value: range === true && !Array.isArray(value) ? [min, max] : value,
50
50
  range: range,
51
51
  min: min,
52
- max: max
52
+ max: max,
53
+ id: input.name
53
54
  }, rest)));
54
55
  };
55
56
 
@@ -43,7 +43,9 @@ export var Switch = function Switch(props) {
43
43
  FormItemProps: FormItemProps,
44
44
  isRequired: isRequired,
45
45
  input: input
46
- }, /*#__PURE__*/React.createElement(AntSwitch, _extends({}, rest, {
46
+ }, /*#__PURE__*/React.createElement(AntSwitch, _extends({
47
+ id: input.name
48
+ }, rest, {
47
49
  defaultValue: input.checked ? input.checked : undefined,
48
50
  onChange: onChange,
49
51
  checked: checked,
@@ -35,7 +35,8 @@ var TextField = function TextField(props) {
35
35
  defaultValue: input.value ? input.value : undefined,
36
36
  disabled: isDisabled,
37
37
  readOnly: isReadOnly,
38
- placeholder: placeholder
38
+ placeholder: placeholder,
39
+ id: input.name
39
40
  }, rest)));
40
41
  };
41
42
 
@@ -36,7 +36,8 @@ var Textarea = function Textarea(props) {
36
36
  defaultValue: input.value ? input.value : undefined,
37
37
  disabled: isDisabled,
38
38
  readOnly: isReadOnly,
39
- placeholder: placeholder
39
+ placeholder: placeholder,
40
+ id: input.name
40
41
  }, rest)));
41
42
  };
42
43
 
@@ -43,7 +43,8 @@ var TimePicker = function TimePicker(props) {
43
43
  readOnly: isReadOnly,
44
44
  defaultValue: input.value ? input.value : undefined
45
45
  }, input, {
46
- value: input.value || null
46
+ value: input.value || null,
47
+ id: input.name
47
48
  }, rest)));
48
49
  };
49
50
 
@@ -38,7 +38,7 @@ var FormGroup = function FormGroup(_ref) {
38
38
  help: help,
39
39
  label: !hideLabel && label,
40
40
  required: isRequired,
41
- name: input === null || input === void 0 ? void 0 : input.name
41
+ htmlFor: input === null || input === void 0 ? void 0 : input.name
42
42
  }, FormItemProps), children);
43
43
  };
44
44
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-driven-forms/ant-component-mapper",
3
- "version": "3.19.1",
3
+ "version": "3.19.3",
4
4
  "description": "Ant Design React component mapper for Data Driven Forms.",
5
5
  "main": "index.js",
6
6
  "module": "esm/index.js",
@@ -29,13 +29,13 @@
29
29
  "antd": "^4.2.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "@data-driven-forms/react-form-renderer": "^3.19.1",
32
+ "@data-driven-forms/react-form-renderer": "^3.19.3",
33
33
  "antd": "^4.2.0",
34
34
  "react": "^16.13.1 || ^17.0.2 || ^18.0.0",
35
35
  "react-dom": "^16.13.1 || ^17.0.2 || ^18.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@data-driven-forms/common": "^3.19.1",
38
+ "@data-driven-forms/common": "^3.19.3",
39
39
  "lodash": "^4.17.21"
40
40
  }
41
41
  }
package/select/select.js CHANGED
@@ -79,7 +79,8 @@ var Select = function Select(props) {
79
79
  onChange: function onChange(value, option) {
80
80
  return input.onChange(isMulti ? selectValue(option) : option ? option.value : undefined);
81
81
  },
82
- input: input
82
+ input: input,
83
+ id: input.name
83
84
  }, rest), options.filter(function (option) {
84
85
  return Object.prototype.hasOwnProperty.call(option, 'value') && option.value !== null;
85
86
  }).map(function (_ref) {
package/slider/slider.js CHANGED
@@ -70,7 +70,8 @@ var Slider = function Slider(props) {
70
70
  value: range === true && !Array.isArray(value) ? [min, max] : value,
71
71
  range: range,
72
72
  min: min,
73
- max: max
73
+ max: max,
74
+ id: input.name
74
75
  }, rest)));
75
76
  };
76
77
 
package/switch/switch.js CHANGED
@@ -60,7 +60,9 @@ var Switch = function Switch(props) {
60
60
  FormItemProps: FormItemProps,
61
61
  isRequired: isRequired,
62
62
  input: input
63
- }, /*#__PURE__*/_react["default"].createElement(_index["default"], (0, _extends2["default"])({}, rest, {
63
+ }, /*#__PURE__*/_react["default"].createElement(_index["default"], (0, _extends2["default"])({
64
+ id: input.name
65
+ }, rest, {
64
66
  defaultValue: input.checked ? input.checked : undefined,
65
67
  onChange: onChange,
66
68
  checked: checked,
@@ -51,7 +51,8 @@ var TextField = function TextField(props) {
51
51
  defaultValue: input.value ? input.value : undefined,
52
52
  disabled: isDisabled,
53
53
  readOnly: isReadOnly,
54
- placeholder: placeholder
54
+ placeholder: placeholder,
55
+ id: input.name
55
56
  }, rest)));
56
57
  };
57
58
 
@@ -52,7 +52,8 @@ var Textarea = function Textarea(props) {
52
52
  defaultValue: input.value ? input.value : undefined,
53
53
  disabled: isDisabled,
54
54
  readOnly: isReadOnly,
55
- placeholder: placeholder
55
+ placeholder: placeholder,
56
+ id: input.name
56
57
  }, rest)));
57
58
  };
58
59
 
@@ -60,7 +60,8 @@ var TimePicker = function TimePicker(props) {
60
60
  readOnly: isReadOnly,
61
61
  defaultValue: input.value ? input.value : undefined
62
62
  }, input, {
63
- value: input.value || null
63
+ value: input.value || null,
64
+ id: input.name
64
65
  }, rest)));
65
66
  };
66
67