@data-driven-forms/ant-component-mapper 4.1.2 → 4.1.7
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/CHANGELOG.md +10 -0
- package/README.md +1 -10
- package/checkbox/checkbox.js +19 -39
- package/checkbox/index.js +1 -7
- package/component-mapper/component-mapper.js +3 -25
- package/component-mapper/index.js +1 -7
- package/date-picker/date-picker.js +15 -29
- package/date-picker/index.js +1 -7
- package/dual-list-select/dual-list-select.js +19 -34
- package/dual-list-select/index.js +1 -7
- package/esm/checkbox/checkbox.js +17 -24
- package/esm/component-mapper/component-mapper.js +1 -3
- package/esm/date-picker/date-picker.js +14 -18
- package/esm/dual-list-select/dual-list-select.js +18 -24
- package/esm/field-array/field-array.js +83 -105
- package/esm/form-group/form-group.js +9 -11
- package/esm/form-template/form-template.js +21 -37
- package/esm/is-required/is-required.js +0 -2
- package/esm/multiple-choice-list/multiple-choice-list.js +10 -15
- package/esm/plain-text/plain-text.js +3 -6
- package/esm/radio/radio.js +25 -34
- package/esm/select/select.js +17 -22
- package/esm/slider/slider.js +20 -23
- package/esm/sub-form/sub-form.js +15 -19
- package/esm/switch/switch.js +20 -24
- package/esm/tabs/tabs.js +5 -9
- package/esm/text-field/text-field.js +12 -15
- package/esm/textarea/textarea.js +12 -15
- package/esm/time-picker/time-picker.js +13 -16
- package/esm/validation-error/validation-error.js +0 -1
- package/esm/wizard/step-buttons.js +19 -22
- package/esm/wizard/wizard-step.js +4 -7
- package/esm/wizard/wizard.js +23 -32
- package/field-array/field-array.js +86 -134
- package/field-array/index.js +1 -7
- package/form-group/form-group.js +10 -18
- package/form-group/index.js +1 -7
- package/form-template/form-template.js +22 -43
- package/form-template/index.js +1 -7
- package/index.js +1 -23
- package/is-required/index.js +1 -7
- package/is-required/is-required.js +1 -7
- package/multiple-choice-list/index.js +1 -7
- package/multiple-choice-list/multiple-choice-list.js +11 -24
- package/package.json +5 -6
- package/plain-text/index.js +1 -7
- package/plain-text/plain-text.js +4 -13
- package/radio/index.js +1 -7
- package/radio/radio.js +26 -43
- package/select/index.js +1 -7
- package/select/select.js +18 -32
- package/slider/index.js +1 -7
- package/slider/slider.js +22 -38
- package/sub-form/index.js +1 -7
- package/sub-form/sub-form.js +16 -30
- package/switch/index.js +1 -7
- package/switch/switch.js +22 -38
- package/tabs/index.js +1 -7
- package/tabs/tabs.js +6 -16
- package/text-field/index.js +1 -7
- package/text-field/text-field.js +13 -25
- package/textarea/index.js +1 -7
- package/textarea/textarea.js +13 -25
- package/time-picker/index.js +1 -7
- package/time-picker/time-picker.js +14 -27
- package/validation-error/index.js +1 -7
- package/validation-error/validation-error.js +2 -7
- package/wizard/index.js +1 -7
- package/wizard/step-buttons.js +20 -29
- package/wizard/wizard-step.js +6 -21
- package/wizard/wizard.js +25 -49
package/esm/radio/radio.js
CHANGED
|
@@ -2,54 +2,46 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["label", "value"],
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
-
|
|
5
|
+
_excluded2 = ["name", "component"],
|
|
6
|
+
_excluded3 = ["options", "isDisabled", "label", "isRequired", "helperText", "description", "isReadOnly", "meta", "validateOnMount", "FormItemProps", "input"];
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
9
|
import React from 'react';
|
|
13
10
|
import AntRadio from "antd/es/radio/index.js";
|
|
14
11
|
import FormGroup from '../form-group';
|
|
15
12
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
16
|
-
|
|
17
13
|
var RadioOption = function RadioOption(_ref) {
|
|
18
14
|
var name = _ref.name,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
_ref$option = _ref.option,
|
|
16
|
+
label = _ref$option.label,
|
|
17
|
+
value = _ref$option.value,
|
|
18
|
+
rest = _objectWithoutProperties(_ref$option, _excluded);
|
|
24
19
|
return /*#__PURE__*/React.createElement(AntRadio, _extends({
|
|
25
20
|
key: "".concat(name, "-").concat(value),
|
|
26
21
|
id: "".concat(name, "-").concat(value),
|
|
27
22
|
value: value
|
|
28
23
|
}, rest), label);
|
|
29
24
|
};
|
|
30
|
-
|
|
31
25
|
var Radio = function Radio(_ref2) {
|
|
32
26
|
var name = _ref2.name,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
component = _ref2.component,
|
|
28
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
36
29
|
var _useFieldApi = useFieldApi(_objectSpread(_objectSpread({}, props), {}, {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
30
|
+
name: name
|
|
31
|
+
})),
|
|
32
|
+
_useFieldApi$options = _useFieldApi.options,
|
|
33
|
+
options = _useFieldApi$options === void 0 ? [] : _useFieldApi$options,
|
|
34
|
+
isDisabled = _useFieldApi.isDisabled,
|
|
35
|
+
label = _useFieldApi.label,
|
|
36
|
+
isRequired = _useFieldApi.isRequired,
|
|
37
|
+
helperText = _useFieldApi.helperText,
|
|
38
|
+
description = _useFieldApi.description,
|
|
39
|
+
isReadOnly = _useFieldApi.isReadOnly,
|
|
40
|
+
meta = _useFieldApi.meta,
|
|
41
|
+
validateOnMount = _useFieldApi.validateOnMount,
|
|
42
|
+
FormItemProps = _useFieldApi.FormItemProps,
|
|
43
|
+
input = _useFieldApi.input,
|
|
44
|
+
rest = _objectWithoutProperties(_useFieldApi, _excluded3);
|
|
53
45
|
return /*#__PURE__*/React.createElement(FormGroup, {
|
|
54
46
|
label: label,
|
|
55
47
|
meta: meta,
|
|
@@ -69,5 +61,4 @@ var Radio = function Radio(_ref2) {
|
|
|
69
61
|
});
|
|
70
62
|
})));
|
|
71
63
|
};
|
|
72
|
-
|
|
73
64
|
export default Radio;
|
package/esm/select/select.js
CHANGED
|
@@ -5,7 +5,6 @@ import React from 'react';
|
|
|
5
5
|
import FormGroup from '../form-group';
|
|
6
6
|
import AntSelect from "antd/es/select/index.js";
|
|
7
7
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
8
|
-
|
|
9
8
|
var selectValue = function selectValue(option) {
|
|
10
9
|
return option.sort(function (a, b) {
|
|
11
10
|
return a.label.localeCompare(b.label, 'en', {
|
|
@@ -15,28 +14,25 @@ var selectValue = function selectValue(option) {
|
|
|
15
14
|
return item.value;
|
|
16
15
|
});
|
|
17
16
|
};
|
|
18
|
-
|
|
19
17
|
var Option = AntSelect.Option;
|
|
20
|
-
|
|
21
18
|
var Select = function Select(props) {
|
|
22
19
|
var _useFieldApi = useFieldApi(props),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
input = _useFieldApi.input,
|
|
21
|
+
isReadOnly = _useFieldApi.isReadOnly,
|
|
22
|
+
isDisabled = _useFieldApi.isDisabled,
|
|
23
|
+
isClearable = _useFieldApi.isClearable,
|
|
24
|
+
placeholder = _useFieldApi.placeholder,
|
|
25
|
+
isRequired = _useFieldApi.isRequired,
|
|
26
|
+
label = _useFieldApi.label,
|
|
27
|
+
helperText = _useFieldApi.helperText,
|
|
28
|
+
validateOnMount = _useFieldApi.validateOnMount,
|
|
29
|
+
meta = _useFieldApi.meta,
|
|
30
|
+
options = _useFieldApi.options,
|
|
31
|
+
isSearchable = _useFieldApi.isSearchable,
|
|
32
|
+
description = _useFieldApi.description,
|
|
33
|
+
FormItemProps = _useFieldApi.FormItemProps,
|
|
34
|
+
isMulti = _useFieldApi.isMulti,
|
|
35
|
+
rest = _objectWithoutProperties(_useFieldApi, _excluded);
|
|
40
36
|
return /*#__PURE__*/React.createElement(FormGroup, {
|
|
41
37
|
label: label,
|
|
42
38
|
meta: meta,
|
|
@@ -68,7 +64,7 @@ var Select = function Select(props) {
|
|
|
68
64
|
return Object.prototype.hasOwnProperty.call(option, 'value') && option.value !== null;
|
|
69
65
|
}).map(function (_ref) {
|
|
70
66
|
var value = _ref.value,
|
|
71
|
-
|
|
67
|
+
label = _ref.label;
|
|
72
68
|
return /*#__PURE__*/React.createElement(Option, {
|
|
73
69
|
key: value,
|
|
74
70
|
value: value,
|
|
@@ -76,5 +72,4 @@ var Select = function Select(props) {
|
|
|
76
72
|
}, label);
|
|
77
73
|
})));
|
|
78
74
|
};
|
|
79
|
-
|
|
80
75
|
export default Select;
|
package/esm/slider/slider.js
CHANGED
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["value", "onChange"],
|
|
4
|
-
|
|
4
|
+
_excluded2 = ["input", "meta", "label", "validateOnMount", "helperText", "description", "FormItemProps", "isRequired", "range", "min", "max", "isDisabled", "isReadOnly"];
|
|
5
5
|
import React, { useEffect } from 'react';
|
|
6
6
|
import AntSlider from "antd/es/slider/index.js";
|
|
7
7
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
8
8
|
import FormGroup from '../form-group';
|
|
9
|
-
|
|
10
9
|
var Slider = function Slider(props) {
|
|
11
10
|
var _useFieldApi = useFieldApi(props),
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
_useFieldApi$input = _useFieldApi.input,
|
|
12
|
+
value = _useFieldApi$input.value,
|
|
13
|
+
onChange = _useFieldApi$input.onChange,
|
|
14
|
+
input = _objectWithoutProperties(_useFieldApi$input, _excluded),
|
|
15
|
+
meta = _useFieldApi.meta,
|
|
16
|
+
label = _useFieldApi.label,
|
|
17
|
+
validateOnMount = _useFieldApi.validateOnMount,
|
|
18
|
+
helperText = _useFieldApi.helperText,
|
|
19
|
+
description = _useFieldApi.description,
|
|
20
|
+
FormItemProps = _useFieldApi.FormItemProps,
|
|
21
|
+
isRequired = _useFieldApi.isRequired,
|
|
22
|
+
range = _useFieldApi.range,
|
|
23
|
+
_useFieldApi$min = _useFieldApi.min,
|
|
24
|
+
min = _useFieldApi$min === void 0 ? 0 : _useFieldApi$min,
|
|
25
|
+
_useFieldApi$max = _useFieldApi.max,
|
|
26
|
+
max = _useFieldApi$max === void 0 ? 100 : _useFieldApi$max,
|
|
27
|
+
isDisabled = _useFieldApi.isDisabled,
|
|
28
|
+
isReadOnly = _useFieldApi.isReadOnly,
|
|
29
|
+
rest = _objectWithoutProperties(_useFieldApi, _excluded2);
|
|
32
30
|
useEffect(function () {
|
|
33
31
|
if (range === true && (!value || !Array.isArray(value))) {
|
|
34
32
|
onChange([min, max]);
|
|
@@ -53,5 +51,4 @@ var Slider = function Slider(props) {
|
|
|
53
51
|
id: input.name
|
|
54
52
|
}, rest)));
|
|
55
53
|
};
|
|
56
|
-
|
|
57
54
|
export default Slider;
|
package/esm/sub-form/sub-form.js
CHANGED
|
@@ -7,27 +7,24 @@ import Row from "antd/es/row/index.js";
|
|
|
7
7
|
import Col from "antd/es/col/index.js";
|
|
8
8
|
import useFormApi from "@data-driven-forms/react-form-renderer/use-form-api";
|
|
9
9
|
var Title = Typography.Title,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Paragraph = Typography.Paragraph;
|
|
12
11
|
var SubForm = function SubForm(_ref) {
|
|
13
12
|
var fields = _ref.fields,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
title = _ref.title,
|
|
14
|
+
description = _ref.description,
|
|
15
|
+
TitleRowProps = _ref.TitleRowProps,
|
|
16
|
+
TitleColProps = _ref.TitleColProps,
|
|
17
|
+
TitleProps = _ref.TitleProps,
|
|
18
|
+
DescriptionColProps = _ref.DescriptionColProps,
|
|
19
|
+
DescriptionProps = _ref.DescriptionProps,
|
|
20
|
+
DescriptionRowProps = _ref.DescriptionRowProps,
|
|
21
|
+
RowProps = _ref.RowProps,
|
|
22
|
+
ColProps = _ref.ColProps,
|
|
23
|
+
component = _ref.component,
|
|
24
|
+
name = _ref.name,
|
|
25
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
26
|
var _useFormApi = useFormApi(),
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
renderForm = _useFormApi.renderForm;
|
|
31
28
|
return /*#__PURE__*/React.createElement("div", rest, title && /*#__PURE__*/React.createElement(Row, TitleRowProps, /*#__PURE__*/React.createElement(Col, _extends({
|
|
32
29
|
span: 24
|
|
33
30
|
}, TitleColProps), /*#__PURE__*/React.createElement(Title, _extends({
|
|
@@ -38,5 +35,4 @@ var SubForm = function SubForm(_ref) {
|
|
|
38
35
|
span: 24
|
|
39
36
|
}, ColProps), renderForm(fields))));
|
|
40
37
|
};
|
|
41
|
-
|
|
42
38
|
export default SubForm;
|
package/esm/switch/switch.js
CHANGED
|
@@ -2,37 +2,33 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["input", "isReadOnly", "isDisabled", "isRequired", "label", "helperText", "description", "validateOnMount", "meta", "onText", "offText", "FormItemProps"];
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
-
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
7
|
import React from 'react';
|
|
11
8
|
import AntSwitch from "antd/es/switch/index.js";
|
|
12
9
|
import FormGroup from '../form-group';
|
|
13
10
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
14
11
|
export var Switch = function Switch(props) {
|
|
15
12
|
var _useFieldApi = useFieldApi(_objectSpread(_objectSpread({}, props), {}, {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
type: 'checkbox'
|
|
14
|
+
})),
|
|
15
|
+
input = _useFieldApi.input,
|
|
16
|
+
isReadOnly = _useFieldApi.isReadOnly,
|
|
17
|
+
isDisabled = _useFieldApi.isDisabled,
|
|
18
|
+
isRequired = _useFieldApi.isRequired,
|
|
19
|
+
label = _useFieldApi.label,
|
|
20
|
+
helperText = _useFieldApi.helperText,
|
|
21
|
+
description = _useFieldApi.description,
|
|
22
|
+
validateOnMount = _useFieldApi.validateOnMount,
|
|
23
|
+
meta = _useFieldApi.meta,
|
|
24
|
+
onText = _useFieldApi.onText,
|
|
25
|
+
offText = _useFieldApi.offText,
|
|
26
|
+
FormItemProps = _useFieldApi.FormItemProps,
|
|
27
|
+
rest = _objectWithoutProperties(_useFieldApi, _excluded);
|
|
32
28
|
var name = input.name,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
checked = input.checked,
|
|
30
|
+
onChange = input.onChange,
|
|
31
|
+
onBlur = input.onBlur;
|
|
36
32
|
return /*#__PURE__*/React.createElement(FormGroup, {
|
|
37
33
|
label: label,
|
|
38
34
|
meta: meta,
|
package/esm/tabs/tabs.js
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["fields"],
|
|
4
|
-
|
|
4
|
+
_excluded2 = ["fields", "title", "name"];
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import useFormApi from "@data-driven-forms/react-form-renderer/use-form-api";
|
|
7
7
|
import Tabs from "antd/es/tabs/index.js";
|
|
8
8
|
var TabPane = Tabs.TabPane;
|
|
9
|
-
|
|
10
9
|
var FormTabs = function FormTabs(_ref) {
|
|
11
10
|
var fields = _ref.fields,
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
14
12
|
var formOptions = useFormApi();
|
|
15
13
|
return /*#__PURE__*/React.createElement(Tabs, rest, fields.map(function (_ref2) {
|
|
16
14
|
var fields = _ref2.fields,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
title = _ref2.title,
|
|
16
|
+
name = _ref2.name,
|
|
17
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
21
18
|
return /*#__PURE__*/React.createElement(TabPane, _extends({
|
|
22
19
|
tab: title,
|
|
23
20
|
key: name
|
|
@@ -26,5 +23,4 @@ var FormTabs = function FormTabs(_ref) {
|
|
|
26
23
|
}), formOptions.renderForm(fields, formOptions));
|
|
27
24
|
}));
|
|
28
25
|
};
|
|
29
|
-
|
|
30
26
|
export default FormTabs;
|
|
@@ -5,22 +5,20 @@ import React from 'react';
|
|
|
5
5
|
import Input from "antd/es/input/index.js";
|
|
6
6
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
7
7
|
import FormGroup from '../form-group';
|
|
8
|
-
|
|
9
8
|
var TextField = function TextField(props) {
|
|
10
9
|
var _useFieldApi = useFieldApi(props),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
input = _useFieldApi.input,
|
|
11
|
+
isReadOnly = _useFieldApi.isReadOnly,
|
|
12
|
+
isDisabled = _useFieldApi.isDisabled,
|
|
13
|
+
placeholder = _useFieldApi.placeholder,
|
|
14
|
+
isRequired = _useFieldApi.isRequired,
|
|
15
|
+
label = _useFieldApi.label,
|
|
16
|
+
helperText = _useFieldApi.helperText,
|
|
17
|
+
description = _useFieldApi.description,
|
|
18
|
+
validateOnMount = _useFieldApi.validateOnMount,
|
|
19
|
+
meta = _useFieldApi.meta,
|
|
20
|
+
FormItemProps = _useFieldApi.FormItemProps,
|
|
21
|
+
rest = _objectWithoutProperties(_useFieldApi, _excluded);
|
|
24
22
|
return /*#__PURE__*/React.createElement(FormGroup, {
|
|
25
23
|
label: label,
|
|
26
24
|
meta: meta,
|
|
@@ -38,5 +36,4 @@ var TextField = function TextField(props) {
|
|
|
38
36
|
id: input.name
|
|
39
37
|
}, rest)));
|
|
40
38
|
};
|
|
41
|
-
|
|
42
39
|
export default TextField;
|
package/esm/textarea/textarea.js
CHANGED
|
@@ -6,22 +6,20 @@ import Input from "antd/es/input/index.js";
|
|
|
6
6
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
7
7
|
import FormGroup from '../form-group';
|
|
8
8
|
var TextArea = Input.TextArea;
|
|
9
|
-
|
|
10
9
|
var Textarea = function Textarea(props) {
|
|
11
10
|
var _useFieldApi = useFieldApi(props),
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
input = _useFieldApi.input,
|
|
12
|
+
isReadOnly = _useFieldApi.isReadOnly,
|
|
13
|
+
isDisabled = _useFieldApi.isDisabled,
|
|
14
|
+
placeholder = _useFieldApi.placeholder,
|
|
15
|
+
isRequired = _useFieldApi.isRequired,
|
|
16
|
+
label = _useFieldApi.label,
|
|
17
|
+
helperText = _useFieldApi.helperText,
|
|
18
|
+
description = _useFieldApi.description,
|
|
19
|
+
validateOnMount = _useFieldApi.validateOnMount,
|
|
20
|
+
meta = _useFieldApi.meta,
|
|
21
|
+
FormItemProps = _useFieldApi.FormItemProps,
|
|
22
|
+
rest = _objectWithoutProperties(_useFieldApi, _excluded);
|
|
25
23
|
return /*#__PURE__*/React.createElement(FormGroup, {
|
|
26
24
|
label: label,
|
|
27
25
|
meta: meta,
|
|
@@ -39,5 +37,4 @@ var Textarea = function Textarea(props) {
|
|
|
39
37
|
id: input.name
|
|
40
38
|
}, rest)));
|
|
41
39
|
};
|
|
42
|
-
|
|
43
40
|
export default Textarea;
|
|
@@ -6,23 +6,21 @@ import AntTimePicker from "antd/es/time-picker/index.js";
|
|
|
6
6
|
import { validationError } from '../validation-error/validation-error';
|
|
7
7
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
8
8
|
import FormGroup from '../form-group';
|
|
9
|
-
|
|
10
9
|
var TimePicker = function TimePicker(props) {
|
|
11
10
|
var _useFieldApi = useFieldApi(props),
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
input = _useFieldApi.input,
|
|
12
|
+
isReadOnly = _useFieldApi.isReadOnly,
|
|
13
|
+
isDisabled = _useFieldApi.isDisabled,
|
|
14
|
+
_useFieldApi$placehol = _useFieldApi.placeholder,
|
|
15
|
+
placeholder = _useFieldApi$placehol === void 0 ? 'Select date' : _useFieldApi$placehol,
|
|
16
|
+
isRequired = _useFieldApi.isRequired,
|
|
17
|
+
label = _useFieldApi.label,
|
|
18
|
+
helperText = _useFieldApi.helperText,
|
|
19
|
+
description = _useFieldApi.description,
|
|
20
|
+
validateOnMount = _useFieldApi.validateOnMount,
|
|
21
|
+
meta = _useFieldApi.meta,
|
|
22
|
+
FormItemProps = _useFieldApi.FormItemProps,
|
|
23
|
+
rest = _objectWithoutProperties(_useFieldApi, _excluded);
|
|
26
24
|
var invalid = validationError(meta, validateOnMount);
|
|
27
25
|
return /*#__PURE__*/React.createElement(FormGroup, {
|
|
28
26
|
label: label,
|
|
@@ -47,5 +45,4 @@ var TimePicker = function TimePicker(props) {
|
|
|
47
45
|
id: input.name
|
|
48
46
|
}, rest)));
|
|
49
47
|
};
|
|
50
|
-
|
|
51
48
|
export default TimePicker;
|
|
@@ -2,17 +2,16 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Button from "antd/es/button/index.js";
|
|
4
4
|
import selectNext from '@data-driven-forms/common/wizard/select-next';
|
|
5
|
-
|
|
6
5
|
var NextButton = function NextButton(_ref) {
|
|
7
6
|
var nextStep = _ref.nextStep,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
handleNext = _ref.handleNext,
|
|
8
|
+
handleSubmit = _ref.handleSubmit,
|
|
9
|
+
buttonLabels = _ref.buttonLabels,
|
|
10
|
+
getState = _ref.getState,
|
|
11
|
+
valid = _ref.valid,
|
|
12
|
+
NextButtonProps = _ref.NextButtonProps,
|
|
13
|
+
SubmitButtonProps = _ref.SubmitButtonProps,
|
|
14
|
+
conditionalSubmitFlag = _ref.conditionalSubmitFlag;
|
|
16
15
|
var nextResult = nextStep ? selectNext(nextStep, getState) : nextStep;
|
|
17
16
|
var progressNext = nextResult !== conditionalSubmitFlag && nextStep;
|
|
18
17
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
@@ -24,20 +23,19 @@ var NextButton = function NextButton(_ref) {
|
|
|
24
23
|
disabled: !valid
|
|
25
24
|
}, progressNext ? NextButtonProps : SubmitButtonProps), progressNext ? buttonLabels.next : buttonLabels.submit);
|
|
26
25
|
};
|
|
27
|
-
|
|
28
26
|
var WizardStepButtons = function WizardStepButtons(_ref2) {
|
|
29
27
|
var disableBack = _ref2.disableBack,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
handlePrev = _ref2.handlePrev,
|
|
29
|
+
nextStep = _ref2.nextStep,
|
|
30
|
+
formOptions = _ref2.formOptions,
|
|
31
|
+
handleNext = _ref2.handleNext,
|
|
32
|
+
buttonLabels = _ref2.buttonLabels,
|
|
33
|
+
ButtonProps = _ref2.ButtonProps,
|
|
34
|
+
NextButtonProps = _ref2.NextButtonProps,
|
|
35
|
+
CancelButtonProps = _ref2.CancelButtonProps,
|
|
36
|
+
BackButtonProps = _ref2.BackButtonProps,
|
|
37
|
+
SubmitButtonProps = _ref2.SubmitButtonProps,
|
|
38
|
+
conditionalSubmitFlag = _ref2.conditionalSubmitFlag;
|
|
41
39
|
return /*#__PURE__*/React.createElement("div", ButtonProps, formOptions.onCancel && /*#__PURE__*/React.createElement(Button, _extends({
|
|
42
40
|
type: "button",
|
|
43
41
|
variant: "contained",
|
|
@@ -56,5 +54,4 @@ var WizardStepButtons = function WizardStepButtons(_ref2) {
|
|
|
56
54
|
conditionalSubmitFlag: conditionalSubmitFlag
|
|
57
55
|
})));
|
|
58
56
|
};
|
|
59
|
-
|
|
60
57
|
export default WizardStepButtons;
|
|
@@ -5,14 +5,12 @@ import React, { Fragment } from 'react';
|
|
|
5
5
|
import FormSpy from '@data-driven-forms/react-form-renderer/form-spy';
|
|
6
6
|
import WizardStepButtons from './step-buttons';
|
|
7
7
|
import './wizard-step.css';
|
|
8
|
-
|
|
9
8
|
var WizardStep = function WizardStep(_ref) {
|
|
10
9
|
var _ref$fields = _ref.fields,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
fields = _ref$fields === void 0 ? [] : _ref$fields,
|
|
11
|
+
formOptions = _ref.formOptions,
|
|
12
|
+
WizardStepProps = _ref.WizardStepProps,
|
|
13
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
16
14
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", _extends({
|
|
17
15
|
className: "ddorg__ant-component-mapper_wizard-step"
|
|
18
16
|
}, WizardStepProps), fields.map(function (item) {
|
|
@@ -23,5 +21,4 @@ var WizardStep = function WizardStep(_ref) {
|
|
|
23
21
|
}, rest));
|
|
24
22
|
}));
|
|
25
23
|
};
|
|
26
|
-
|
|
27
24
|
export default WizardStep;
|