@data-driven-forms/carbon-component-mapper 4.0.0 → 4.1.0
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/LICENSE +201 -0
- package/checkbox/checkbox.js +0 -31
- package/date-picker/date-picker.js +0 -9
- package/dual-list-select/dual-list-select.js +0 -82
- package/esm/checkbox/checkbox.js +0 -30
- package/esm/date-picker/date-picker.js +0 -8
- package/esm/dual-list-select/dual-list-select.js +0 -81
- package/esm/field-array/field-array.js +0 -28
- package/esm/form-template/form-template.js +0 -19
- package/esm/helper-text-block/helper-text-block.js +0 -6
- package/esm/is-required/is-required.js +0 -4
- package/esm/plain-text/plain-text.js +0 -6
- package/esm/radio/radio.js +0 -12
- package/esm/select/select.js +0 -92
- package/esm/slider/slider.js +0 -9
- package/esm/sub-form/sub-form.js +0 -12
- package/esm/switch/switch.js +0 -10
- package/esm/tabs/tabs.js +0 -12
- package/esm/text-field/text-field.js +0 -9
- package/esm/textarea/textarea.js +0 -10
- package/esm/time-picker/time-picker.js +0 -4
- package/esm/time-picker-base/time-picker-base.js +0 -29
- package/esm/time-picker-date/time-picker-date.js +0 -17
- package/esm/time-picker-string/time-picker-string.js +0 -17
- package/esm/with-description/with-description.js +0 -5
- package/esm/wizard/wizard.js +0 -40
- package/field-array/field-array.js +0 -29
- package/form-template/form-template.js +0 -20
- package/helper-text-block/helper-text-block.js +0 -7
- package/is-required/is-required.js +0 -5
- package/package.json +4 -5
- package/plain-text/plain-text.js +0 -7
- package/radio/radio.js +0 -13
- package/select/select.js +0 -93
- package/slider/slider.js +0 -10
- package/sub-form/sub-form.js +0 -13
- package/switch/switch.js +0 -11
- package/tabs/tabs.js +0 -13
- package/text-field/text-field.js +0 -10
- package/textarea/textarea.js +0 -11
- package/time-picker/time-picker.js +0 -5
- package/time-picker-base/time-picker-base.js +0 -30
- package/time-picker-date/time-picker-date.js +0 -18
- package/time-picker-string/time-picker-string.js +0 -18
- package/with-description/with-description.js +0 -6
- package/wizard/wizard.js +0 -41
|
@@ -6,7 +6,6 @@ var _excluded = ["label", "buttonType"],
|
|
|
6
6
|
_excluded4 = ["children"],
|
|
7
7
|
_excluded5 = ["children", "className"];
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import PropTypes from 'prop-types';
|
|
10
9
|
import clsx from 'clsx';
|
|
11
10
|
import { createUseStyles } from "react-jss/dist/react-jss.esm.js";
|
|
12
11
|
import { Form as CarbonForm, Button as CarbonButton, ButtonSet } from 'carbon-components-react';
|
|
@@ -36,10 +35,6 @@ export var Button = function Button(_ref) {
|
|
|
36
35
|
kind: buttonType === 'submit' ? 'primary' : 'secondary'
|
|
37
36
|
}, props), label);
|
|
38
37
|
};
|
|
39
|
-
Button.propTypes = {
|
|
40
|
-
label: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
41
|
-
buttonType: PropTypes.string
|
|
42
|
-
};
|
|
43
38
|
export var ButtonGroup = function ButtonGroup(_ref2) {
|
|
44
39
|
var children = _ref2.children,
|
|
45
40
|
className = _ref2.className,
|
|
@@ -52,28 +47,18 @@ export var ButtonGroup = function ButtonGroup(_ref2) {
|
|
|
52
47
|
className: clsx(butttons, className)
|
|
53
48
|
}), children);
|
|
54
49
|
};
|
|
55
|
-
ButtonGroup.propTypes = {
|
|
56
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
57
|
-
className: PropTypes.string
|
|
58
|
-
};
|
|
59
50
|
export var Title = function Title(_ref3) {
|
|
60
51
|
var children = _ref3.children,
|
|
61
52
|
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
62
53
|
|
|
63
54
|
return /*#__PURE__*/React.createElement("h3", props, children);
|
|
64
55
|
};
|
|
65
|
-
Title.propTypes = {
|
|
66
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
|
67
|
-
};
|
|
68
56
|
export var Description = function Description(_ref4) {
|
|
69
57
|
var children = _ref4.children,
|
|
70
58
|
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
71
59
|
|
|
72
60
|
return /*#__PURE__*/React.createElement("div", props, children);
|
|
73
61
|
};
|
|
74
|
-
Description.propTypes = {
|
|
75
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
|
76
|
-
};
|
|
77
62
|
export var Form = function Form(_ref5) {
|
|
78
63
|
var children = _ref5.children,
|
|
79
64
|
className = _ref5.className,
|
|
@@ -88,10 +73,6 @@ export var Form = function Form(_ref5) {
|
|
|
88
73
|
className: clsx(form, className)
|
|
89
74
|
}), children);
|
|
90
75
|
};
|
|
91
|
-
Form.propTypes = {
|
|
92
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
93
|
-
className: PropTypes.string
|
|
94
|
-
};
|
|
95
76
|
export var Header = function Header(props) {
|
|
96
77
|
var _useStyles3 = useStyles(),
|
|
97
78
|
header = _useStyles3.header;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import { createUseStyles } from "react-jss/dist/react-jss.esm.js";
|
|
4
3
|
var useStyles = createUseStyles({
|
|
5
4
|
helperTextStyle: {
|
|
@@ -38,9 +37,4 @@ var HelperTextBlock = function HelperTextBlock(_ref) {
|
|
|
38
37
|
return null;
|
|
39
38
|
};
|
|
40
39
|
|
|
41
|
-
HelperTextBlock.propTypes = {
|
|
42
|
-
helperText: PropTypes.node,
|
|
43
|
-
errorText: PropTypes.node,
|
|
44
|
-
warnText: PropTypes.node
|
|
45
|
-
};
|
|
46
40
|
export default HelperTextBlock;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { childrenPropTypes } from '@data-driven-forms/common/prop-types-templates';
|
|
3
2
|
import { createUseStyles } from "react-jss/dist/react-jss.esm.js";
|
|
4
3
|
var useStyles = createUseStyles({
|
|
5
4
|
isRequired: {
|
|
@@ -20,7 +19,4 @@ var IsRequired = function IsRequired(_ref) {
|
|
|
20
19
|
}, "*"), children);
|
|
21
20
|
};
|
|
22
21
|
|
|
23
|
-
IsRequired.propTypes = {
|
|
24
|
-
children: childrenPropTypes
|
|
25
|
-
};
|
|
26
22
|
export default IsRequired;
|
|
@@ -7,7 +7,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
7
7
|
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; }
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
10
|
|
|
12
11
|
var PlainText = function PlainText(_ref) {
|
|
13
12
|
var label = _ref.label,
|
|
@@ -23,9 +22,4 @@ var PlainText = function PlainText(_ref) {
|
|
|
23
22
|
});
|
|
24
23
|
};
|
|
25
24
|
|
|
26
|
-
PlainText.propTypes = {
|
|
27
|
-
label: PropTypes.string,
|
|
28
|
-
element: PropTypes.string,
|
|
29
|
-
component: PropTypes.string
|
|
30
|
-
};
|
|
31
25
|
export default PlainText;
|
package/esm/radio/radio.js
CHANGED
|
@@ -3,7 +3,6 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["component"],
|
|
4
4
|
_excluded2 = ["labelText", "disabled", "input", "options", "FormGroupProps", "helperText", "meta", "validateOnMount"];
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
6
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
8
7
|
import { FormGroup, RadioButtonGroup, RadioButton } from 'carbon-components-react';
|
|
9
8
|
import prepareProps from '../prepare-props';
|
|
@@ -45,15 +44,4 @@ var Radio = function Radio(_ref) {
|
|
|
45
44
|
}));
|
|
46
45
|
};
|
|
47
46
|
|
|
48
|
-
Radio.propTypes = {
|
|
49
|
-
component: PropTypes.string,
|
|
50
|
-
FormGroupProps: PropTypes.object,
|
|
51
|
-
isDisabled: PropTypes.bool,
|
|
52
|
-
label: PropTypes.node,
|
|
53
|
-
isRequired: PropTypes.bool,
|
|
54
|
-
options: PropTypes.arrayOf(PropTypes.shape({
|
|
55
|
-
label: PropTypes.node,
|
|
56
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
57
|
-
}))
|
|
58
|
-
};
|
|
59
47
|
export default Radio;
|
package/esm/select/select.js
CHANGED
|
@@ -9,7 +9,6 @@ var _excluded = ["options"],
|
|
|
9
9
|
_excluded5 = ["isSearchable", "isClearable", "isDisabled", "isMulti", "invalidText", "hideSelectedOptions", "noOptionsMessage", "onInputChange", "options", "isFetching", "invalid", "classNamePrefix", "closeMenuOnSelect", "originalOnChange", "placeholder", "labelText", "onChange", "value"],
|
|
10
10
|
_excluded6 = ["isMulti", "isSearchable", "isClearable", "loadOptions", "input", "meta", "validateOnMount", "helperText", "loadingMessage"];
|
|
11
11
|
import React, { useState, useEffect } from 'react';
|
|
12
|
-
import PropTypes from 'prop-types';
|
|
13
12
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
14
13
|
import DataDrivenSelect from '@data-driven-forms/common/select';
|
|
15
14
|
import fnToString from '@data-driven-forms/common/utils/fn-to-string';
|
|
@@ -84,25 +83,6 @@ var ClearedMultiSelectFilterable = function ClearedMultiSelectFilterable(_ref3)
|
|
|
84
83
|
}));
|
|
85
84
|
};
|
|
86
85
|
|
|
87
|
-
ClearedMultiSelectFilterable.propTypes = {
|
|
88
|
-
invalidText: PropTypes.node,
|
|
89
|
-
hideSelectedOptions: PropTypes.any,
|
|
90
|
-
noOptionsMessage: PropTypes.any,
|
|
91
|
-
onInputChange: PropTypes.func,
|
|
92
|
-
options: PropTypes.array,
|
|
93
|
-
isFetching: PropTypes.bool,
|
|
94
|
-
invalid: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
95
|
-
isMulti: PropTypes.bool,
|
|
96
|
-
classNamePrefix: PropTypes.any,
|
|
97
|
-
closeMenuOnSelect: PropTypes.any,
|
|
98
|
-
onChange: PropTypes.func,
|
|
99
|
-
originalOnChange: PropTypes.func,
|
|
100
|
-
carbonLabel: PropTypes.node,
|
|
101
|
-
placeholder: PropTypes.node,
|
|
102
|
-
isRequired: PropTypes.bool,
|
|
103
|
-
isDisabled: PropTypes.bool
|
|
104
|
-
};
|
|
105
|
-
|
|
106
86
|
var ClearedMultiSelect = function ClearedMultiSelect(_ref4) {
|
|
107
87
|
var invalidText = _ref4.invalidText,
|
|
108
88
|
hideSelectedOptions = _ref4.hideSelectedOptions,
|
|
@@ -135,25 +115,6 @@ var ClearedMultiSelect = function ClearedMultiSelect(_ref4) {
|
|
|
135
115
|
}));
|
|
136
116
|
};
|
|
137
117
|
|
|
138
|
-
ClearedMultiSelect.propTypes = {
|
|
139
|
-
invalidText: PropTypes.node,
|
|
140
|
-
hideSelectedOptions: PropTypes.any,
|
|
141
|
-
noOptionsMessage: PropTypes.any,
|
|
142
|
-
onInputChange: PropTypes.func,
|
|
143
|
-
options: PropTypes.array,
|
|
144
|
-
isFetching: PropTypes.bool,
|
|
145
|
-
invalid: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
146
|
-
isMulti: PropTypes.bool,
|
|
147
|
-
classNamePrefix: PropTypes.any,
|
|
148
|
-
closeMenuOnSelect: PropTypes.any,
|
|
149
|
-
onChange: PropTypes.func,
|
|
150
|
-
originalOnChange: PropTypes.func,
|
|
151
|
-
carbonLabel: PropTypes.node,
|
|
152
|
-
placeholder: PropTypes.node,
|
|
153
|
-
isRequired: PropTypes.bool,
|
|
154
|
-
isDisabled: PropTypes.bool
|
|
155
|
-
};
|
|
156
|
-
|
|
157
118
|
var getSelectValue = function getSelectValue(value, isMulti) {
|
|
158
119
|
return isMulti ? value : Array.isArray(value) ? value[0] : value;
|
|
159
120
|
};
|
|
@@ -190,28 +151,6 @@ var ClearedSelect = function ClearedSelect(_ref5) {
|
|
|
190
151
|
}), renderOptions(options));
|
|
191
152
|
};
|
|
192
153
|
|
|
193
|
-
ClearedSelect.propTypes = {
|
|
194
|
-
invalidText: PropTypes.node,
|
|
195
|
-
hideSelectedOptions: PropTypes.any,
|
|
196
|
-
noOptionsMessage: PropTypes.any,
|
|
197
|
-
onInputChange: PropTypes.func,
|
|
198
|
-
options: PropTypes.array,
|
|
199
|
-
isFetching: PropTypes.bool,
|
|
200
|
-
invalid: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
201
|
-
isMulti: PropTypes.bool,
|
|
202
|
-
classNamePrefix: PropTypes.any,
|
|
203
|
-
closeMenuOnSelect: PropTypes.any,
|
|
204
|
-
onChange: PropTypes.func,
|
|
205
|
-
originalOnChange: PropTypes.func,
|
|
206
|
-
carbonLabel: PropTypes.node,
|
|
207
|
-
placeholder: PropTypes.node,
|
|
208
|
-
isDisabled: PropTypes.bool,
|
|
209
|
-
isRequired: PropTypes.bool,
|
|
210
|
-
isSearchable: PropTypes.bool,
|
|
211
|
-
isClearable: PropTypes.bool,
|
|
212
|
-
value: PropTypes.any
|
|
213
|
-
};
|
|
214
|
-
|
|
215
154
|
var getComboInitialValue = function getComboInitialValue(value) {
|
|
216
155
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
217
156
|
var result = Array.isArray(value) ? value[0] : value;
|
|
@@ -261,29 +200,6 @@ var ClearedSelectSearchable = function ClearedSelectSearchable(_ref7) {
|
|
|
261
200
|
}));
|
|
262
201
|
};
|
|
263
202
|
|
|
264
|
-
ClearedSelectSearchable.propTypes = {
|
|
265
|
-
invalidText: PropTypes.node,
|
|
266
|
-
hideSelectedOptions: PropTypes.any,
|
|
267
|
-
noOptionsMessage: PropTypes.any,
|
|
268
|
-
onInputChange: PropTypes.func,
|
|
269
|
-
options: PropTypes.array,
|
|
270
|
-
isFetching: PropTypes.bool,
|
|
271
|
-
invalid: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
272
|
-
isMulti: PropTypes.bool,
|
|
273
|
-
classNamePrefix: PropTypes.any,
|
|
274
|
-
closeMenuOnSelect: PropTypes.any,
|
|
275
|
-
onChange: PropTypes.func,
|
|
276
|
-
originalOnChange: PropTypes.func,
|
|
277
|
-
carbonLabel: PropTypes.node,
|
|
278
|
-
placeholder: PropTypes.node,
|
|
279
|
-
isDisabled: PropTypes.bool,
|
|
280
|
-
isRequired: PropTypes.bool,
|
|
281
|
-
isSearchable: PropTypes.bool,
|
|
282
|
-
isClearable: PropTypes.bool,
|
|
283
|
-
labelText: PropTypes.string,
|
|
284
|
-
value: PropTypes.any
|
|
285
|
-
};
|
|
286
|
-
|
|
287
203
|
var Select = function Select(props) {
|
|
288
204
|
var _useFieldApi = useFieldApi(prepareProps(props)),
|
|
289
205
|
isMulti = _useFieldApi.isMulti,
|
|
@@ -333,12 +249,4 @@ var Select = function Select(props) {
|
|
|
333
249
|
}));
|
|
334
250
|
};
|
|
335
251
|
|
|
336
|
-
Select.propTypes = {
|
|
337
|
-
isDisabled: PropTypes.bool,
|
|
338
|
-
isRequired: PropTypes.bool,
|
|
339
|
-
options: PropTypes.arrayOf(PropTypes.shape({
|
|
340
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
341
|
-
label: PropTypes.node
|
|
342
|
-
}))
|
|
343
|
-
};
|
|
344
252
|
export default Select;
|
package/esm/slider/slider.js
CHANGED
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["input", "meta", "isRequired", "validateOnMount", "helperText", "WrapperProps"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
5
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
7
6
|
import { Slider as CarbonSlider } from 'carbon-components-react';
|
|
8
7
|
import prepareProps from '../prepare-props';
|
|
@@ -35,12 +34,4 @@ var Slider = function Slider(props) {
|
|
|
35
34
|
}));
|
|
36
35
|
};
|
|
37
36
|
|
|
38
|
-
Slider.propTypes = {
|
|
39
|
-
isDisabled: PropTypes.bool,
|
|
40
|
-
isRequired: PropTypes.bool,
|
|
41
|
-
label: PropTypes.node,
|
|
42
|
-
labelText: PropTypes.node,
|
|
43
|
-
description: PropTypes.node,
|
|
44
|
-
WrapperProps: PropTypes.object
|
|
45
|
-
};
|
|
46
37
|
export default Slider;
|
package/esm/sub-form/sub-form.js
CHANGED
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["fields", "component", "title", "description", "TitleElement", "DescriptionElement", "TitleProps", "DescriptionProps", "HeaderProps"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
5
|
import clsx from 'clsx';
|
|
7
6
|
import { createUseStyles } from "react-jss/dist/react-jss.esm.js";
|
|
8
7
|
import useFormApi from "@data-driven-forms/react-form-renderer/use-form-api";
|
|
@@ -38,15 +37,4 @@ var SubForm = function SubForm(_ref) {
|
|
|
38
37
|
}), (title || description) && /*#__PURE__*/React.createElement("div", HeaderProps, title && /*#__PURE__*/React.createElement(TitleElement, TitleProps, title), description && /*#__PURE__*/React.createElement(DescriptionElement, DescriptionProps, description)), formOptions.renderForm(fields, formOptions));
|
|
39
38
|
};
|
|
40
39
|
|
|
41
|
-
SubForm.propTypes = {
|
|
42
|
-
fields: PropTypes.array,
|
|
43
|
-
component: PropTypes.string,
|
|
44
|
-
title: PropTypes.node,
|
|
45
|
-
description: PropTypes.node,
|
|
46
|
-
TitleElement: PropTypes.string,
|
|
47
|
-
DescriptionElement: PropTypes.string,
|
|
48
|
-
TitleProps: PropTypes.object,
|
|
49
|
-
DescriptionProps: PropTypes.object,
|
|
50
|
-
HeaderProps: PropTypes.object
|
|
51
|
-
};
|
|
52
40
|
export default SubForm;
|
package/esm/switch/switch.js
CHANGED
|
@@ -9,7 +9,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
9
9
|
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; }
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import PropTypes from 'prop-types';
|
|
13
12
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
14
13
|
import { Toggle } from 'carbon-components-react';
|
|
15
14
|
import prepareProps from '../prepare-props';
|
|
@@ -47,13 +46,4 @@ var Switch = function Switch(props) {
|
|
|
47
46
|
}));
|
|
48
47
|
};
|
|
49
48
|
|
|
50
|
-
Switch.propTypes = {
|
|
51
|
-
isDisabled: PropTypes.bool,
|
|
52
|
-
isReadOnly: PropTypes.bool,
|
|
53
|
-
isRequired: PropTypes.bool,
|
|
54
|
-
label: PropTypes.node,
|
|
55
|
-
labelText: PropTypes.node,
|
|
56
|
-
description: PropTypes.node,
|
|
57
|
-
WrapperProps: PropTypes.object
|
|
58
|
-
};
|
|
59
49
|
export default Switch;
|
package/esm/tabs/tabs.js
CHANGED
|
@@ -3,7 +3,6 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["fields", "component", "name", "TabWrapperProps"],
|
|
4
4
|
_excluded2 = ["fields", "name", "label", "title"];
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
6
|
import clsx from 'clsx';
|
|
8
7
|
import { createUseStyles } from "react-jss/dist/react-jss.esm.js";
|
|
9
8
|
import { Tabs as CarbonTabs, Tab } from 'carbon-components-react';
|
|
@@ -46,15 +45,4 @@ var Tabs = function Tabs(_ref) {
|
|
|
46
45
|
}));
|
|
47
46
|
};
|
|
48
47
|
|
|
49
|
-
Tabs.propTypes = {
|
|
50
|
-
TabWrapperProps: PropTypes.object,
|
|
51
|
-
component: PropTypes.string,
|
|
52
|
-
name: PropTypes.string,
|
|
53
|
-
fields: PropTypes.arrayOf(PropTypes.shape({
|
|
54
|
-
name: PropTypes.string,
|
|
55
|
-
fields: PropTypes.array,
|
|
56
|
-
title: PropTypes.node,
|
|
57
|
-
label: PropTypes.node
|
|
58
|
-
}))
|
|
59
|
-
};
|
|
60
48
|
export default Tabs;
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["input", "meta", "validateOnMount", "labelText"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
5
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
7
6
|
import { TextInput, NumberInput } from 'carbon-components-react';
|
|
8
7
|
import prepareProps from '../prepare-props';
|
|
@@ -40,12 +39,4 @@ var TextField = function TextField(props) {
|
|
|
40
39
|
}, rest));
|
|
41
40
|
};
|
|
42
41
|
|
|
43
|
-
TextField.propTypes = {
|
|
44
|
-
isDisabled: PropTypes.bool,
|
|
45
|
-
isReadOnly: PropTypes.bool,
|
|
46
|
-
isRequired: PropTypes.bool,
|
|
47
|
-
label: PropTypes.node,
|
|
48
|
-
labelText: PropTypes.node,
|
|
49
|
-
description: PropTypes.node
|
|
50
|
-
};
|
|
51
42
|
export default TextField;
|
package/esm/textarea/textarea.js
CHANGED
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["input", "meta", "validateOnMount", "helperText"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
5
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
7
6
|
import { TextArea } from 'carbon-components-react';
|
|
8
7
|
import prepareProps from '../prepare-props';
|
|
@@ -26,13 +25,4 @@ var Textarea = function Textarea(props) {
|
|
|
26
25
|
}, rest));
|
|
27
26
|
};
|
|
28
27
|
|
|
29
|
-
Textarea.propTypes = {
|
|
30
|
-
isDisabled: PropTypes.bool,
|
|
31
|
-
isReadOnly: PropTypes.bool,
|
|
32
|
-
isRequired: PropTypes.bool,
|
|
33
|
-
label: PropTypes.node,
|
|
34
|
-
labelText: PropTypes.node,
|
|
35
|
-
description: PropTypes.node,
|
|
36
|
-
helperText: PropTypes.node
|
|
37
|
-
};
|
|
38
28
|
export default Textarea;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["useStringFormat"];
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
4
|
import TimePickerString from '../time-picker-string/time-picker-string';
|
|
6
5
|
import TimePickerDate from '../time-picker-date';
|
|
7
6
|
|
|
@@ -12,7 +11,4 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
12
11
|
return useStringFormat ? /*#__PURE__*/React.createElement(TimePickerString, props) : /*#__PURE__*/React.createElement(TimePickerDate, props);
|
|
13
12
|
};
|
|
14
13
|
|
|
15
|
-
TimePicker.propTypes = {
|
|
16
|
-
useStringFormat: PropTypes.bool
|
|
17
|
-
};
|
|
18
14
|
export default TimePicker;
|
|
@@ -3,7 +3,6 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["WrapperProps", "input", "enhnancedOnBlur", "enhancedOnChange", "finalValue", "invalid", "twelveHoursFormat", "timezones", "helperText", "warnText", "selectFormat", "selectTimezone", "format", "timezone"],
|
|
4
4
|
_excluded2 = ["showAs"];
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
6
|
import { TimePicker as CarbonTimePicker, TimePickerSelect, SelectItem } from 'carbon-components-react';
|
|
8
7
|
import HelperTextBlock from '../helper-text-block/helper-text-block';
|
|
9
8
|
|
|
@@ -73,32 +72,4 @@ var TimePickerBase = function TimePickerBase(_ref) {
|
|
|
73
72
|
}));
|
|
74
73
|
};
|
|
75
74
|
|
|
76
|
-
TimePickerBase.propTypes = {
|
|
77
|
-
isDisabled: PropTypes.bool,
|
|
78
|
-
isReadOnly: PropTypes.bool,
|
|
79
|
-
isRequired: PropTypes.bool,
|
|
80
|
-
label: PropTypes.node,
|
|
81
|
-
labelText: PropTypes.node,
|
|
82
|
-
description: PropTypes.node,
|
|
83
|
-
twelveHoursFormat: PropTypes.bool,
|
|
84
|
-
timezones: PropTypes.arrayOf(PropTypes.shape({
|
|
85
|
-
value: PropTypes.string.isRequired,
|
|
86
|
-
label: PropTypes.node.isRequired,
|
|
87
|
-
showAs: PropTypes.string
|
|
88
|
-
})),
|
|
89
|
-
WrapperProps: PropTypes.object,
|
|
90
|
-
input: PropTypes.shape({
|
|
91
|
-
name: PropTypes.string
|
|
92
|
-
}).isRequired,
|
|
93
|
-
enhnancedOnBlur: PropTypes.func,
|
|
94
|
-
enhancedOnChange: PropTypes.func,
|
|
95
|
-
finalValue: PropTypes.any,
|
|
96
|
-
invalid: PropTypes.node,
|
|
97
|
-
helperText: PropTypes.node,
|
|
98
|
-
warnText: PropTypes.node,
|
|
99
|
-
selectFormat: PropTypes.func.isRequired,
|
|
100
|
-
selectTimezone: PropTypes.func.isRequired,
|
|
101
|
-
format: PropTypes.oneOf(['AM', 'PM']),
|
|
102
|
-
timezone: PropTypes.string
|
|
103
|
-
};
|
|
104
75
|
export default TimePickerBase;
|
|
@@ -3,7 +3,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["input", "meta", "twelveHoursFormat", "timezones", "validateOnMount", "helperText", "WrapperProps", "defaultTimezone"];
|
|
5
5
|
import React, { useState, useEffect, useRef } from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
6
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
8
7
|
import prepareProps from '../prepare-props';
|
|
9
8
|
import TimePickerBase from '../time-picker-base';
|
|
@@ -118,20 +117,4 @@ var TimePickerDate = function TimePickerDate(props) {
|
|
|
118
117
|
}, rest));
|
|
119
118
|
};
|
|
120
119
|
|
|
121
|
-
TimePickerDate.propTypes = {
|
|
122
|
-
isDisabled: PropTypes.bool,
|
|
123
|
-
isReadOnly: PropTypes.bool,
|
|
124
|
-
isRequired: PropTypes.bool,
|
|
125
|
-
label: PropTypes.node,
|
|
126
|
-
labelText: PropTypes.node,
|
|
127
|
-
description: PropTypes.node,
|
|
128
|
-
twelveHoursFormat: PropTypes.bool,
|
|
129
|
-
timezones: PropTypes.arrayOf(PropTypes.shape({
|
|
130
|
-
value: PropTypes.string.isRequired,
|
|
131
|
-
label: PropTypes.node.isRequired,
|
|
132
|
-
showAs: PropTypes.string
|
|
133
|
-
})),
|
|
134
|
-
WrapperProps: PropTypes.object,
|
|
135
|
-
defaultTimezone: PropTypes.string
|
|
136
|
-
};
|
|
137
120
|
export default TimePickerDate;
|
|
@@ -3,7 +3,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["input", "meta", "twelveHoursFormat", "timezones", "validateOnMount", "helperText", "WrapperProps", "useStringFormat"];
|
|
5
5
|
import React, { useState, useEffect, useRef } from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
6
|
import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
|
|
8
7
|
import prepareProps from '../prepare-props';
|
|
9
8
|
import TimePickerBase from '../time-picker-base';
|
|
@@ -71,20 +70,4 @@ var TimePickerString = function TimePickerString(props) {
|
|
|
71
70
|
}, rest));
|
|
72
71
|
};
|
|
73
72
|
|
|
74
|
-
TimePickerString.propTypes = {
|
|
75
|
-
isDisabled: PropTypes.bool,
|
|
76
|
-
isReadOnly: PropTypes.bool,
|
|
77
|
-
isRequired: PropTypes.bool,
|
|
78
|
-
label: PropTypes.node,
|
|
79
|
-
labelText: PropTypes.node,
|
|
80
|
-
description: PropTypes.node,
|
|
81
|
-
twelveHoursFormat: PropTypes.bool,
|
|
82
|
-
timezones: PropTypes.arrayOf(PropTypes.shape({
|
|
83
|
-
value: PropTypes.string.isRequired,
|
|
84
|
-
label: PropTypes.node.isRequired,
|
|
85
|
-
showAs: PropTypes.string
|
|
86
|
-
})),
|
|
87
|
-
WrapperProps: PropTypes.object,
|
|
88
|
-
useStringFormat: PropTypes.bool
|
|
89
|
-
};
|
|
90
73
|
export default TimePickerString;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import { Tooltip } from 'carbon-components-react';
|
|
4
3
|
|
|
5
4
|
var WithDescription = function WithDescription(_ref) {
|
|
@@ -10,8 +9,4 @@ var WithDescription = function WithDescription(_ref) {
|
|
|
10
9
|
}, description);
|
|
11
10
|
};
|
|
12
11
|
|
|
13
|
-
WithDescription.propTypes = {
|
|
14
|
-
labelText: PropTypes.node,
|
|
15
|
-
description: PropTypes.node
|
|
16
|
-
};
|
|
17
12
|
export default WithDescription;
|
package/esm/wizard/wizard.js
CHANGED
|
@@ -10,7 +10,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
10
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
11
|
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
|
-
import PropTypes from 'prop-types';
|
|
14
13
|
import clsx from 'clsx';
|
|
15
14
|
import { createUseStyles } from "react-jss/dist/react-jss.esm.js";
|
|
16
15
|
import WizardCommon from '@data-driven-forms/common/wizard/wizard';
|
|
@@ -60,14 +59,6 @@ var WizardNav = function WizardNav(_ref) {
|
|
|
60
59
|
}));
|
|
61
60
|
};
|
|
62
61
|
|
|
63
|
-
WizardNav.propTypes = {
|
|
64
|
-
stepsInfo: PropTypes.arrayOf(PropTypes.shape({
|
|
65
|
-
title: PropTypes.node
|
|
66
|
-
})),
|
|
67
|
-
currentIndex: PropTypes.number,
|
|
68
|
-
jumpToStep: PropTypes.func,
|
|
69
|
-
className: PropTypes.string
|
|
70
|
-
};
|
|
71
62
|
var defaultLabels = {
|
|
72
63
|
submit: 'Submit',
|
|
73
64
|
back: 'Back',
|
|
@@ -87,12 +78,6 @@ var Layout = function Layout(_ref3) {
|
|
|
87
78
|
}), fields));
|
|
88
79
|
};
|
|
89
80
|
|
|
90
|
-
Layout.propTypes = {
|
|
91
|
-
nav: PropTypes.node,
|
|
92
|
-
fields: PropTypes.node,
|
|
93
|
-
WizardBodyProps: PropTypes.object
|
|
94
|
-
};
|
|
95
|
-
|
|
96
81
|
var VerticalLayout = function VerticalLayout(_ref4) {
|
|
97
82
|
var nav = _ref4.nav,
|
|
98
83
|
fields = _ref4.fields,
|
|
@@ -112,12 +97,6 @@ var VerticalLayout = function VerticalLayout(_ref4) {
|
|
|
112
97
|
}), fields)));
|
|
113
98
|
};
|
|
114
99
|
|
|
115
|
-
VerticalLayout.propTypes = {
|
|
116
|
-
nav: PropTypes.node,
|
|
117
|
-
fields: PropTypes.node,
|
|
118
|
-
WizardBodyProps: PropTypes.object
|
|
119
|
-
};
|
|
120
|
-
|
|
121
100
|
var WizardInternal = function WizardInternal(_ref5) {
|
|
122
101
|
var stepsInfo = _ref5.stepsInfo,
|
|
123
102
|
buttonLabels = _ref5.buttonLabels,
|
|
@@ -194,25 +173,6 @@ var WizardInternal = function WizardInternal(_ref5) {
|
|
|
194
173
|
}));
|
|
195
174
|
};
|
|
196
175
|
|
|
197
|
-
WizardInternal.propTypes = {
|
|
198
|
-
stepsInfo: PropTypes.arrayOf(PropTypes.shape({
|
|
199
|
-
title: PropTypes.node
|
|
200
|
-
})),
|
|
201
|
-
buttonLabels: PropTypes.shape({
|
|
202
|
-
submit: PropTypes.node,
|
|
203
|
-
back: PropTypes.node,
|
|
204
|
-
next: PropTypes.node
|
|
205
|
-
}),
|
|
206
|
-
BackButtonProps: PropTypes.object,
|
|
207
|
-
NextButtonProps: PropTypes.object,
|
|
208
|
-
SubmitButtonProps: PropTypes.object,
|
|
209
|
-
ButtonSetProps: PropTypes.object,
|
|
210
|
-
ProgressIndicatorProps: PropTypes.object,
|
|
211
|
-
vertical: PropTypes.bool,
|
|
212
|
-
WizardBodyProps: PropTypes.object,
|
|
213
|
-
conditionalSubmitFlag: PropTypes.string.isRequired
|
|
214
|
-
};
|
|
215
|
-
|
|
216
176
|
var Wizard = function Wizard(props) {
|
|
217
177
|
return /*#__PURE__*/React.createElement(WizardCommon, _extends({
|
|
218
178
|
Wizard: WizardInternal
|
|
@@ -17,8 +17,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
17
17
|
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
19
|
|
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
-
|
|
22
20
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
23
21
|
|
|
24
22
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
@@ -105,15 +103,6 @@ var ArrayItem = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
105
103
|
next = (0, _objectWithoutProperties2["default"])(_ref3, _excluded2);
|
|
106
104
|
return (0, _isEqual["default"])(prev, next);
|
|
107
105
|
});
|
|
108
|
-
ArrayItem.propTypes = {
|
|
109
|
-
remove: _propTypes["default"].func,
|
|
110
|
-
fields: _propTypes["default"].array,
|
|
111
|
-
name: _propTypes["default"].string,
|
|
112
|
-
removeText: _propTypes["default"].node,
|
|
113
|
-
buttonDisabled: _propTypes["default"].bool,
|
|
114
|
-
RemoveButtonProps: _propTypes["default"].object,
|
|
115
|
-
ArrayItemProps: _propTypes["default"].object
|
|
116
|
-
};
|
|
117
106
|
|
|
118
107
|
var FieldArray = function FieldArray(props) {
|
|
119
108
|
var _useFieldApi = (0, _useFieldApi2["default"])((0, _prepareProps["default"])(props)),
|
|
@@ -194,23 +183,5 @@ var FieldArray = function FieldArray(props) {
|
|
|
194
183
|
}));
|
|
195
184
|
};
|
|
196
185
|
|
|
197
|
-
FieldArray.propTypes = {
|
|
198
|
-
noItemsMessage: _propTypes["default"].node,
|
|
199
|
-
maxItems: _propTypes["default"].number,
|
|
200
|
-
minItems: _propTypes["default"].number,
|
|
201
|
-
buttonLabels: _propTypes["default"].shape({
|
|
202
|
-
add: _propTypes["default"].node,
|
|
203
|
-
remove: _propTypes["default"].node
|
|
204
|
-
}),
|
|
205
|
-
AddContainerProps: _propTypes["default"].object,
|
|
206
|
-
AddButtonProps: _propTypes["default"].object,
|
|
207
|
-
FormGroupProps: _propTypes["default"].object,
|
|
208
|
-
WrapperProps: _propTypes["default"].object,
|
|
209
|
-
ArrayItemProps: _propTypes["default"].object,
|
|
210
|
-
RemoveButtonProps: _propTypes["default"].object,
|
|
211
|
-
defaultItem: _propTypes["default"].any,
|
|
212
|
-
isRequired: _propTypes["default"].bool,
|
|
213
|
-
fields: _propTypes["default"].array
|
|
214
|
-
};
|
|
215
186
|
var _default = FieldArray;
|
|
216
187
|
exports["default"] = _default;
|