@data-driven-forms/mui-component-mapper 3.15.2 → 3.16.0-v5-beta

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.
Files changed (59) hide show
  1. package/README.md +2 -2
  2. package/checkbox/checkbox.d.ts +1 -1
  3. package/checkbox/checkbox.js +6 -6
  4. package/date-picker/date-picker.d.ts +2 -5
  5. package/date-picker/date-picker.js +16 -21
  6. package/dual-list-select/dual-list-select.d.ts +1 -1
  7. package/dual-list-select/dual-list-select.js +189 -185
  8. package/esm/checkbox/checkbox.js +6 -6
  9. package/esm/date-picker/date-picker.js +15 -20
  10. package/esm/dual-list-select/dual-list-select.js +187 -183
  11. package/esm/field-array/field-array.js +42 -36
  12. package/esm/form-field-grid/form-field-grid.js +11 -9
  13. package/esm/form-template/form-template.js +52 -53
  14. package/esm/multiple-chioce-list/multiple-choice-list.js +10 -8
  15. package/esm/plain-text/plain-text.js +1 -1
  16. package/esm/radio/radio.js +30 -29
  17. package/esm/select/select.js +4 -4
  18. package/esm/slider/slider.js +6 -6
  19. package/esm/sub-form/sub-form.js +27 -24
  20. package/esm/switch/switch.js +6 -6
  21. package/esm/tabs/tabs.js +59 -41
  22. package/esm/text-field/text-field.js +1 -1
  23. package/esm/textarea/textarea.js +1 -1
  24. package/esm/time-picker/time-picker.js +20 -24
  25. package/esm/wizard/step-buttons.js +40 -37
  26. package/esm/wizard/wizard-nav.js +23 -21
  27. package/esm/wizard/wizard.js +21 -22
  28. package/field-array/field-array.d.ts +1 -1
  29. package/field-array/field-array.js +43 -37
  30. package/form-field-grid/form-field-grid.d.ts +1 -1
  31. package/form-field-grid/form-field-grid.js +13 -10
  32. package/form-template/form-template.js +54 -54
  33. package/multiple-chioce-list/multiple-choice-list.d.ts +1 -1
  34. package/multiple-chioce-list/multiple-choice-list.js +10 -8
  35. package/package.json +13 -16
  36. package/plain-text/plain-text.d.ts +1 -1
  37. package/plain-text/plain-text.js +1 -1
  38. package/radio/radio.d.ts +1 -1
  39. package/radio/radio.js +32 -31
  40. package/select/select.d.ts +2 -2
  41. package/select/select.js +4 -4
  42. package/slider/slider.d.ts +1 -1
  43. package/slider/slider.js +6 -6
  44. package/sub-form/sub-form.d.ts +1 -1
  45. package/sub-form/sub-form.js +29 -25
  46. package/switch/switch.d.ts +1 -1
  47. package/switch/switch.js +6 -6
  48. package/tabs/tabs.d.ts +3 -1
  49. package/tabs/tabs.js +58 -37
  50. package/text-field/text-field.d.ts +1 -1
  51. package/text-field/text-field.js +1 -1
  52. package/textarea/textarea.d.ts +1 -1
  53. package/textarea/textarea.js +1 -1
  54. package/time-picker/time-picker.d.ts +2 -5
  55. package/time-picker/time-picker.js +21 -25
  56. package/wizard/step-buttons.js +42 -37
  57. package/wizard/wizard-nav.js +25 -22
  58. package/wizard/wizard.d.ts +1 -1
  59. package/wizard/wizard.js +22 -23
@@ -1,12 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { MuiPickersUtilsProvider, DatePicker as MUIDatePicker } from '@material-ui/pickers';
5
- import MomentUtils from '@date-io/moment';
4
+ import MUIDatePicker from "@mui/lab/DatePicker";
6
5
  import FormFieldGrid from '../form-field-grid/form-field-grid';
7
6
  import { validationError } from '../validation-error/validation-error';
8
7
  import { meta, input } from '@data-driven-forms/common/prop-types-templates';
9
8
  import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
9
+ import TextField from "@mui/material/TextField";
10
10
 
11
11
  var DatePicker = function DatePicker(props) {
12
12
  var _useFieldApi = useFieldApi(props),
@@ -20,29 +20,27 @@ var DatePicker = function DatePicker(props) {
20
20
  description = _useFieldApi.description,
21
21
  validateOnMount = _useFieldApi.validateOnMount,
22
22
  meta = _useFieldApi.meta,
23
- _useFieldApi$locale = _useFieldApi.locale,
24
- locale = _useFieldApi$locale === void 0 ? 'en' : _useFieldApi$locale,
25
23
  FormFieldGridProps = _useFieldApi.FormFieldGridProps,
26
- MuiPickersUtilsProviderProps = _useFieldApi.MuiPickersUtilsProviderProps,
27
24
  DatePickerProps = _useFieldApi.DatePickerProps;
28
25
 
29
26
  var invalid = validationError(meta, validateOnMount);
30
- return /*#__PURE__*/React.createElement(FormFieldGrid, FormFieldGridProps, /*#__PURE__*/React.createElement(MuiPickersUtilsProvider, _extends({
31
- locale: locale,
32
- utils: MomentUtils
33
- }, MuiPickersUtilsProviderProps), /*#__PURE__*/React.createElement(MUIDatePicker, _extends({
34
- fullWidth: true,
35
- margin: "normal",
36
- label: label,
37
- helperText: invalid || (meta.touched || validateOnMount) && meta.warning || helperText || description,
27
+ return /*#__PURE__*/React.createElement(FormFieldGrid, FormFieldGridProps, /*#__PURE__*/React.createElement(MUIDatePicker, _extends({
28
+ renderInput: function renderInput(props) {
29
+ return /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
30
+ fullWidth: true,
31
+ margin: "normal",
32
+ label: label,
33
+ helperText: invalid || (meta.touched || validateOnMount) && meta.warning || helperText || description,
34
+ placeholder: placeholder,
35
+ required: isRequired,
36
+ error: !!invalid
37
+ }));
38
+ },
38
39
  disabled: isDisabled || isReadOnly,
39
- placeholder: placeholder,
40
- required: isRequired,
41
- error: !!invalid,
42
40
  readOnly: isReadOnly
43
41
  }, input, {
44
42
  value: input.value || null
45
- }, DatePickerProps))));
43
+ }, DatePickerProps)));
46
44
  };
47
45
 
48
46
  DatePicker.propTypes = {
@@ -55,15 +53,12 @@ DatePicker.propTypes = {
55
53
  label: PropTypes.node,
56
54
  helperText: PropTypes.node,
57
55
  validateOnMount: PropTypes.bool,
58
- locale: PropTypes.string,
59
56
  description: PropTypes.node,
60
57
  FormFieldGridProps: PropTypes.object,
61
- MuiPickersUtilsProviderProps: PropTypes.object,
62
58
  DatePickerProps: PropTypes.object
63
59
  };
64
60
  DatePicker.defaultProps = {
65
61
  FormFieldGridProps: {},
66
- MuiPickersUtilsProviderProps: {},
67
62
  DatePickerProps: {}
68
63
  };
69
64
  export default DatePicker;
@@ -1,81 +1,85 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
 
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
5
5
 
6
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
7
7
 
8
8
  import React from 'react';
9
+ import styled from "@mui/material/styled";
9
10
  import PropTypes from 'prop-types';
10
11
  import clsx from 'clsx';
11
- import Grid from "@material-ui/core/esm/Grid";
12
- import List from "@material-ui/core/esm/List";
13
- import ListItem from "@material-ui/core/esm/ListItem";
14
- import ListItemText from "@material-ui/core/esm/ListItemText";
15
- import ListItemIcon from "@material-ui/core/esm/ListItemIcon";
16
- import Checkbox from "@material-ui/core/esm/Checkbox";
17
- import ListItemSecondaryAction from "@material-ui/core/esm/ListItemSecondaryAction";
18
- import IconButton from "@material-ui/core/esm/IconButton";
19
- import FormControl from "@material-ui/core/esm/FormControl";
20
- import FormLabel from "@material-ui/core/esm/FormLabel";
21
- import FormHelperText from "@material-ui/core/esm/FormHelperText";
22
- import Toolbar from "@material-ui/core/esm/Toolbar";
23
- import TextField from "@material-ui/core/esm/TextField";
24
- import Typography from "@material-ui/core/esm/Typography";
25
- import Paper from "@material-ui/core/esm/Paper";
26
- import Button from "@material-ui/core/esm/Button";
27
- import SortIcon from '@material-ui/icons/ArrowUpward';
28
- import { makeStyles } from '@material-ui/core/styles';
12
+ import Grid from "@mui/material/Grid";
13
+ import List from "@mui/material/List";
14
+ import ListItem from "@mui/material/ListItem";
15
+ import ListItemText from "@mui/material/ListItemText";
16
+ import ListItemIcon from "@mui/material/ListItemIcon";
17
+ import Checkbox from "@mui/material/Checkbox";
18
+ import ListItemSecondaryAction from "@mui/material/ListItemSecondaryAction";
19
+ import IconButton from "@mui/material/IconButton";
20
+ import FormControl from "@mui/material/FormControl";
21
+ import FormLabel from "@mui/material/FormLabel";
22
+ import FormHelperText from "@mui/material/FormHelperText";
23
+ import Toolbar from "@mui/material/Toolbar";
24
+ import TextField from "@mui/material/TextField";
25
+ import Typography from "@mui/material/Typography";
26
+ import Paper from "@mui/material/Paper";
27
+ import Button from "@mui/material/Button";
28
+ import SortIcon from '@mui/icons-material/ArrowUpward';
29
29
  import DualListSelectCommon from '@data-driven-forms/common/dual-list-select';
30
30
  import FormFieldGrid from '../form-field-grid/form-field-grid';
31
31
  import { validationError } from '../validation-error/validation-error';
32
- var useStyles = makeStyles(function (theme) {
33
- return {
34
- allToLeftIcon: {
35
- transform: 'scaleX(-1)'
36
- },
37
- upsideDown: {
38
- transform: 'scaleY(-1)'
39
- },
40
- list: {
41
- height: 300,
42
- overflow: 'auto'
43
- },
44
- button: {
45
- display: 'flex',
46
- justifyContent: 'center',
47
- margin: theme.spacing(0.5, 0)
48
- },
49
- buttonsGrid: {
50
- height: '100%',
51
- alignContent: 'center'
52
- },
53
- filter: {
54
- width: '100%'
55
- },
56
- toolbar: {
57
- paddingLeft: 16,
58
- paddingRight: 16
59
- }
60
- };
32
+ var PREFIX = 'DualListSelectWrapper';
33
+ var classes = {
34
+ allToLeftIcon: "".concat(PREFIX, "-allToLeftIcon"),
35
+ upsideDown: "".concat(PREFIX, "-upsideDown"),
36
+ list: "".concat(PREFIX, "-list"),
37
+ button: "".concat(PREFIX, "-button"),
38
+ buttonsGrid: "".concat(PREFIX, "-buttonsGrid"),
39
+ filter: "".concat(PREFIX, "-filter"),
40
+ toolbar: "".concat(PREFIX, "-toolbar")
41
+ };
42
+ var StyledDualListSelect = styled(FormFieldGrid)(function (_ref) {
43
+ var _ref2;
44
+
45
+ var theme = _ref.theme;
46
+ return _ref2 = {}, _defineProperty(_ref2, "& .".concat(classes.allToLeftIcon), {
47
+ transform: 'scaleX(-1)'
48
+ }), _defineProperty(_ref2, "& .".concat(classes.upsideDown), {
49
+ transform: 'scaleY(-1)'
50
+ }), _defineProperty(_ref2, "& .".concat(classes.list), {
51
+ height: 300,
52
+ overflow: 'auto'
53
+ }), _defineProperty(_ref2, "& .".concat(classes.button), {
54
+ display: 'flex',
55
+ justifyContent: 'center',
56
+ margin: theme.spacing(0.5, 0)
57
+ }), _defineProperty(_ref2, "& .".concat(classes.buttonsGrid), {
58
+ height: '100%',
59
+ alignContent: 'center'
60
+ }), _defineProperty(_ref2, "& .".concat(classes.filter), {
61
+ width: '100%'
62
+ }), _defineProperty(_ref2, "& .".concat(classes.toolbar), {
63
+ paddingLeft: 16,
64
+ paddingRight: 16
65
+ }), _ref2;
61
66
  });
62
67
 
63
- var ListInternal = function ListInternal(_ref) {
64
- var value = _ref.value,
65
- optionClick = _ref.optionClick,
66
- noOptionsTitle = _ref.noOptionsTitle,
67
- filterValue = _ref.filterValue,
68
- filterValueText = _ref.filterValueText,
69
- selectedValues = _ref.selectedValues,
70
- ListProps = _ref.ListProps,
71
- ListItemProps = _ref.ListItemProps,
72
- ListItemIconProps = _ref.ListItemIconProps,
73
- ListItemTextProps = _ref.ListItemTextProps,
74
- ListItemSecondaryActionProps = _ref.ListItemSecondaryActionProps,
75
- checkboxVariant = _ref.checkboxVariant,
76
- PaperProps = _ref.PaperProps,
77
- LeftPaperProps = _ref.LeftPaperProps;
78
- var classes = useStyles();
68
+ var ListInternal = function ListInternal(_ref3) {
69
+ var value = _ref3.value,
70
+ optionClick = _ref3.optionClick,
71
+ noOptionsTitle = _ref3.noOptionsTitle,
72
+ filterValue = _ref3.filterValue,
73
+ filterValueText = _ref3.filterValueText,
74
+ selectedValues = _ref3.selectedValues,
75
+ ListProps = _ref3.ListProps,
76
+ ListItemProps = _ref3.ListItemProps,
77
+ ListItemIconProps = _ref3.ListItemIconProps,
78
+ ListItemTextProps = _ref3.ListItemTextProps,
79
+ ListItemSecondaryActionProps = _ref3.ListItemSecondaryActionProps,
80
+ checkboxVariant = _ref3.checkboxVariant,
81
+ PaperProps = _ref3.PaperProps,
82
+ LeftPaperProps = _ref3.LeftPaperProps;
79
83
  return /*#__PURE__*/React.createElement(Paper, _extends({}, PaperProps, LeftPaperProps, {
80
84
  className: clsx(PaperProps && PaperProps.className, LeftPaperProps && LeftPaperProps.className)
81
85
  }), /*#__PURE__*/React.createElement(List, _extends({
@@ -89,16 +93,16 @@ var ListInternal = function ListInternal(_ref) {
89
93
  disabled: true
90
94
  }, ListItemProps), /*#__PURE__*/React.createElement(ListItemText, {
91
95
  primary: filterValue ? filterValueText : noOptionsTitle
92
- })), value.length > 0 && value.map(function (_ref2) {
93
- var value = _ref2.value,
94
- label = _ref2.label,
95
- icon = _ref2.icon,
96
- isCheckbox = _ref2.isCheckbox,
97
- secondaryActions = _ref2.secondaryActions,
98
- ListItemPropsItem = _ref2.ListItemProps,
99
- ListItemIconPropsItem = _ref2.ListItemIconProps,
100
- ListItemTextPropsItem = _ref2.ListItemTextProps,
101
- ListItemSecondaryActionPropsItem = _ref2.ListItemSecondaryActionProps;
96
+ })), value.length > 0 && value.map(function (_ref4) {
97
+ var value = _ref4.value,
98
+ label = _ref4.label,
99
+ icon = _ref4.icon,
100
+ isCheckbox = _ref4.isCheckbox,
101
+ secondaryActions = _ref4.secondaryActions,
102
+ ListItemPropsItem = _ref4.ListItemProps,
103
+ ListItemIconPropsItem = _ref4.ListItemIconProps,
104
+ ListItemTextPropsItem = _ref4.ListItemTextProps,
105
+ ListItemSecondaryActionPropsItem = _ref4.ListItemSecondaryActionProps;
102
106
  return /*#__PURE__*/React.createElement(ListItem, _extends({
103
107
  button: true,
104
108
  key: value,
@@ -143,21 +147,20 @@ ListInternal.defaultProps = {
143
147
  ListProps: {}
144
148
  };
145
149
 
146
- var ToolbarInternal = function ToolbarInternal(_ref3) {
147
- var ToolbarProps = _ref3.ToolbarProps,
148
- LeftToolbarProps = _ref3.LeftToolbarProps,
149
- filterOptions = _ref3.filterOptions,
150
- filterOptionsTitle = _ref3.filterOptionsTitle,
151
- FilterFieldProps = _ref3.FilterFieldProps,
152
- sortOptions = _ref3.sortOptions,
153
- SortIconButtonProps = _ref3.SortIconButtonProps,
154
- SortIconProps = _ref3.SortIconProps,
155
- LeftSortIconProps = _ref3.LeftSortIconProps,
156
- LeftFilterFieldProps = _ref3.LeftFilterFieldProps,
157
- LeftSortIconButtonProps = _ref3.LeftSortIconButtonProps,
158
- filter = _ref3.filter,
159
- sortDesc = _ref3.sortDesc;
160
- var classes = useStyles();
150
+ var ToolbarInternal = function ToolbarInternal(_ref5) {
151
+ var ToolbarProps = _ref5.ToolbarProps,
152
+ LeftToolbarProps = _ref5.LeftToolbarProps,
153
+ filterOptions = _ref5.filterOptions,
154
+ filterOptionsTitle = _ref5.filterOptionsTitle,
155
+ FilterFieldProps = _ref5.FilterFieldProps,
156
+ sortOptions = _ref5.sortOptions,
157
+ SortIconButtonProps = _ref5.SortIconButtonProps,
158
+ SortIconProps = _ref5.SortIconProps,
159
+ LeftSortIconProps = _ref5.LeftSortIconProps,
160
+ LeftFilterFieldProps = _ref5.LeftFilterFieldProps,
161
+ LeftSortIconButtonProps = _ref5.LeftSortIconButtonProps,
162
+ filter = _ref5.filter,
163
+ sortDesc = _ref5.sortDesc;
161
164
  return /*#__PURE__*/React.createElement(Toolbar, _extends({
162
165
  variant: "dense"
163
166
  }, ToolbarProps, LeftToolbarProps, {
@@ -166,8 +169,8 @@ var ToolbarInternal = function ToolbarInternal(_ref3) {
166
169
  edge: "start",
167
170
  id: "options-search",
168
171
  label: filterOptionsTitle,
169
- onChange: function onChange(_ref4) {
170
- var value = _ref4.target.value;
172
+ onChange: function onChange(_ref6) {
173
+ var value = _ref6.target.value;
171
174
  return filterOptions(value);
172
175
  },
173
176
  value: filter,
@@ -179,7 +182,9 @@ var ToolbarInternal = function ToolbarInternal(_ref3) {
179
182
  edge: "end",
180
183
  onClick: sortOptions,
181
184
  color: "inherit"
182
- }, SortIconButtonProps, LeftSortIconButtonProps), /*#__PURE__*/React.createElement(SortIcon, _extends({}, SortIconProps, LeftSortIconProps, {
185
+ }, SortIconButtonProps, LeftSortIconButtonProps, {
186
+ size: "large"
187
+ }), /*#__PURE__*/React.createElement(SortIcon, _extends({}, SortIconProps, LeftSortIconProps, {
183
188
  className: clsx(!sortDesc && classes.upsideDown, SortIconProps && SortIconProps.className, LeftSortIconProps && LeftSortIconProps.className)
184
189
  }))));
185
190
  };
@@ -201,99 +206,98 @@ ToolbarInternal.propTypes = {
201
206
  sortDesc: PropTypes.bool
202
207
  };
203
208
 
204
- var DualListSelect = function DualListSelect(_ref5) {
205
- var handleOptionsClick = _ref5.handleOptionsClick,
206
- rightValues = _ref5.rightValues,
207
- noValueTitle = _ref5.noValueTitle,
208
- filterValueText = _ref5.filterValueText,
209
- leftValues = _ref5.leftValues,
210
- noOptionsTitle = _ref5.noOptionsTitle,
211
- state = _ref5.state,
212
- filterOptionsText = _ref5.filterOptionsText,
213
- handleValuesClick = _ref5.handleValuesClick,
214
- handleMoveRight = _ref5.handleMoveRight,
215
- moveRightTitle = _ref5.moveRightTitle,
216
- handleClearLeftValues = _ref5.handleClearLeftValues,
217
- moveAllRightTitle = _ref5.moveAllRightTitle,
218
- handleClearRightValues = _ref5.handleClearRightValues,
219
- moveAllLeftTitle = _ref5.moveAllLeftTitle,
220
- handleMoveLeft = _ref5.handleMoveLeft,
221
- moveLeftTitle = _ref5.moveLeftTitle,
222
- allToRight = _ref5.allToRight,
223
- allToLeft = _ref5.allToLeft,
224
- checkboxVariant = _ref5.checkboxVariant,
225
- isRequired = _ref5.isRequired,
226
- meta = _ref5.meta,
227
- validateOnMount = _ref5.validateOnMount,
228
- label = _ref5.label,
229
- helperText = _ref5.helperText,
230
- description = _ref5.description,
231
- filterOptionsTitle = _ref5.filterOptionsTitle,
232
- leftTitle = _ref5.leftTitle,
233
- filterOptions = _ref5.filterOptions,
234
- sortOptions = _ref5.sortOptions,
235
- sortValues = _ref5.sortValues,
236
- filterValueTitle = _ref5.filterValueTitle,
237
- filterValues = _ref5.filterValues,
238
- rightTitle = _ref5.rightTitle,
239
- isFilterable = _ref5.isFilterable,
240
- FormFieldGridProps = _ref5.FormFieldGridProps,
241
- InternalGridProps = _ref5.InternalGridProps,
242
- ListGridProps = _ref5.ListGridProps,
243
- LeftListGridProps = _ref5.LeftListGridProps,
244
- ListProps = _ref5.ListProps,
245
- LeftListProps = _ref5.LeftListProps,
246
- ButtonsGridProps = _ref5.ButtonsGridProps,
247
- ButtonsInternalGridProps = _ref5.ButtonsInternalGridProps,
248
- ButtonGridProps = _ref5.ButtonGridProps,
249
- ToRightGridProps = _ref5.ToRightGridProps,
250
- IconButtonProps = _ref5.IconButtonProps,
251
- ToRightIconButtonProps = _ref5.ToRightIconButtonProps,
252
- AllToRightGridProps = _ref5.AllToRightGridProps,
253
- AllToRightIconButtonProps = _ref5.AllToRightIconButtonProps,
254
- AllToLeftGridProps = _ref5.AllToLeftGridProps,
255
- AllToLeftIconButtonProps = _ref5.AllToLeftIconButtonProps,
256
- ToLeftGridProps = _ref5.ToLeftGridProps,
257
- ToLeftIconButtonProps = _ref5.ToLeftIconButtonProps,
258
- RightListGridProps = _ref5.RightListGridProps,
259
- RightListProps = _ref5.RightListProps,
260
- ListItemProps = _ref5.ListItemProps,
261
- ListItemIconProps = _ref5.ListItemIconProps,
262
- ListItemTextProps = _ref5.ListItemTextProps,
263
- ListItemSecondaryActionProps = _ref5.ListItemSecondaryActionProps,
264
- LeftListItemProps = _ref5.LeftListItemProps,
265
- LeftListItemIconProps = _ref5.LeftListItemIconProps,
266
- LeftItemTextProps = _ref5.LeftItemTextProps,
267
- LeftItemSecondaryActionProps = _ref5.LeftItemSecondaryActionProps,
268
- RightListItemProps = _ref5.RightListItemProps,
269
- RightListItemIconProps = _ref5.RightListItemIconProps,
270
- RightItemTextProps = _ref5.RightItemTextProps,
271
- RightItemSecondaryActionProps = _ref5.RightItemSecondaryActionProps,
272
- FormControlProps = _ref5.FormControlProps,
273
- FormLabelProps = _ref5.FormLabelProps,
274
- FormHelperTextProps = _ref5.FormHelperTextProps,
275
- TitleProps = _ref5.TitleProps,
276
- ToolbarProps = _ref5.ToolbarProps,
277
- FilterFieldProps = _ref5.FilterFieldProps,
278
- SortIconButtonProps = _ref5.SortIconButtonProps,
279
- SortIconProps = _ref5.SortIconProps,
280
- LeftToolbarProps = _ref5.LeftToolbarProps,
281
- LeftFilterFieldProps = _ref5.LeftFilterFieldProps,
282
- LeftSortIconButtonProps = _ref5.LeftSortIconButtonProps,
283
- LeftSortIconProps = _ref5.LeftSortIconProps,
284
- LeftTitleProps = _ref5.LeftTitleProps,
285
- RightToolbarProps = _ref5.RightToolbarProps,
286
- RightFilterFieldProps = _ref5.RightFilterFieldProps,
287
- RightSortIconButtonProps = _ref5.RightSortIconButtonProps,
288
- RightSortIconProps = _ref5.RightSortIconProps,
289
- RightTitleProps = _ref5.RightTitleProps,
290
- PaperProps = _ref5.PaperProps,
291
- LeftPaperProps = _ref5.LeftPaperProps,
292
- RightPaperProps = _ref5.RightPaperProps;
293
- var classes = useStyles();
209
+ var DualListSelect = function DualListSelect(_ref7) {
210
+ var handleOptionsClick = _ref7.handleOptionsClick,
211
+ rightValues = _ref7.rightValues,
212
+ noValueTitle = _ref7.noValueTitle,
213
+ filterValueText = _ref7.filterValueText,
214
+ leftValues = _ref7.leftValues,
215
+ noOptionsTitle = _ref7.noOptionsTitle,
216
+ state = _ref7.state,
217
+ filterOptionsText = _ref7.filterOptionsText,
218
+ handleValuesClick = _ref7.handleValuesClick,
219
+ handleMoveRight = _ref7.handleMoveRight,
220
+ moveRightTitle = _ref7.moveRightTitle,
221
+ handleClearLeftValues = _ref7.handleClearLeftValues,
222
+ moveAllRightTitle = _ref7.moveAllRightTitle,
223
+ handleClearRightValues = _ref7.handleClearRightValues,
224
+ moveAllLeftTitle = _ref7.moveAllLeftTitle,
225
+ handleMoveLeft = _ref7.handleMoveLeft,
226
+ moveLeftTitle = _ref7.moveLeftTitle,
227
+ allToRight = _ref7.allToRight,
228
+ allToLeft = _ref7.allToLeft,
229
+ checkboxVariant = _ref7.checkboxVariant,
230
+ isRequired = _ref7.isRequired,
231
+ meta = _ref7.meta,
232
+ validateOnMount = _ref7.validateOnMount,
233
+ label = _ref7.label,
234
+ helperText = _ref7.helperText,
235
+ description = _ref7.description,
236
+ filterOptionsTitle = _ref7.filterOptionsTitle,
237
+ leftTitle = _ref7.leftTitle,
238
+ filterOptions = _ref7.filterOptions,
239
+ sortOptions = _ref7.sortOptions,
240
+ sortValues = _ref7.sortValues,
241
+ filterValueTitle = _ref7.filterValueTitle,
242
+ filterValues = _ref7.filterValues,
243
+ rightTitle = _ref7.rightTitle,
244
+ isFilterable = _ref7.isFilterable,
245
+ FormFieldGridProps = _ref7.FormFieldGridProps,
246
+ InternalGridProps = _ref7.InternalGridProps,
247
+ ListGridProps = _ref7.ListGridProps,
248
+ LeftListGridProps = _ref7.LeftListGridProps,
249
+ ListProps = _ref7.ListProps,
250
+ LeftListProps = _ref7.LeftListProps,
251
+ ButtonsGridProps = _ref7.ButtonsGridProps,
252
+ ButtonsInternalGridProps = _ref7.ButtonsInternalGridProps,
253
+ ButtonGridProps = _ref7.ButtonGridProps,
254
+ ToRightGridProps = _ref7.ToRightGridProps,
255
+ IconButtonProps = _ref7.IconButtonProps,
256
+ ToRightIconButtonProps = _ref7.ToRightIconButtonProps,
257
+ AllToRightGridProps = _ref7.AllToRightGridProps,
258
+ AllToRightIconButtonProps = _ref7.AllToRightIconButtonProps,
259
+ AllToLeftGridProps = _ref7.AllToLeftGridProps,
260
+ AllToLeftIconButtonProps = _ref7.AllToLeftIconButtonProps,
261
+ ToLeftGridProps = _ref7.ToLeftGridProps,
262
+ ToLeftIconButtonProps = _ref7.ToLeftIconButtonProps,
263
+ RightListGridProps = _ref7.RightListGridProps,
264
+ RightListProps = _ref7.RightListProps,
265
+ ListItemProps = _ref7.ListItemProps,
266
+ ListItemIconProps = _ref7.ListItemIconProps,
267
+ ListItemTextProps = _ref7.ListItemTextProps,
268
+ ListItemSecondaryActionProps = _ref7.ListItemSecondaryActionProps,
269
+ LeftListItemProps = _ref7.LeftListItemProps,
270
+ LeftListItemIconProps = _ref7.LeftListItemIconProps,
271
+ LeftItemTextProps = _ref7.LeftItemTextProps,
272
+ LeftItemSecondaryActionProps = _ref7.LeftItemSecondaryActionProps,
273
+ RightListItemProps = _ref7.RightListItemProps,
274
+ RightListItemIconProps = _ref7.RightListItemIconProps,
275
+ RightItemTextProps = _ref7.RightItemTextProps,
276
+ RightItemSecondaryActionProps = _ref7.RightItemSecondaryActionProps,
277
+ FormControlProps = _ref7.FormControlProps,
278
+ FormLabelProps = _ref7.FormLabelProps,
279
+ FormHelperTextProps = _ref7.FormHelperTextProps,
280
+ TitleProps = _ref7.TitleProps,
281
+ ToolbarProps = _ref7.ToolbarProps,
282
+ FilterFieldProps = _ref7.FilterFieldProps,
283
+ SortIconButtonProps = _ref7.SortIconButtonProps,
284
+ SortIconProps = _ref7.SortIconProps,
285
+ LeftToolbarProps = _ref7.LeftToolbarProps,
286
+ LeftFilterFieldProps = _ref7.LeftFilterFieldProps,
287
+ LeftSortIconButtonProps = _ref7.LeftSortIconButtonProps,
288
+ LeftSortIconProps = _ref7.LeftSortIconProps,
289
+ LeftTitleProps = _ref7.LeftTitleProps,
290
+ RightToolbarProps = _ref7.RightToolbarProps,
291
+ RightFilterFieldProps = _ref7.RightFilterFieldProps,
292
+ RightSortIconButtonProps = _ref7.RightSortIconButtonProps,
293
+ RightSortIconProps = _ref7.RightSortIconProps,
294
+ RightTitleProps = _ref7.RightTitleProps,
295
+ PaperProps = _ref7.PaperProps,
296
+ LeftPaperProps = _ref7.LeftPaperProps,
297
+ RightPaperProps = _ref7.RightPaperProps;
294
298
  var invalid = validationError(meta, validateOnMount);
295
299
  var text = invalid || (meta.touched || validateOnMount) && meta.warning || helperText || description;
296
- return /*#__PURE__*/React.createElement(FormFieldGrid, FormFieldGridProps, /*#__PURE__*/React.createElement(FormControl, _extends({
300
+ return /*#__PURE__*/React.createElement(StyledDualListSelect, FormFieldGridProps, /*#__PURE__*/React.createElement(FormControl, _extends({
297
301
  fullWidth: true,
298
302
  required: isRequired,
299
303
  error: !!invalid,
@@ -7,49 +7,53 @@ var _excluded = ["remove"],
7
7
  _excluded2 = ["remove"],
8
8
  _excluded3 = ["arrayValidator", "label", "description", "fields", "defaultItem", "meta", "minItems", "maxItems", "noItemsMessage", "FormFieldGridProps", "FormControlProps", "buttonLabels", "GridContainerProps", "HeaderGridProps", "HeaderProps", "UndoButtonProps", "RedoButtonProps", "AddButtonProps", "DescriptionGridProps", "DescriptionProps", "BodyGridProps", "NoItemsProps", "FormHelperTextGridProps", "FormHelperTextProps", "FieldContainerProps", "FieldGroupGridProps", "RemoveButtonGridProps", "RemoveButtonProps"];
9
9
 
10
+ var _styled;
11
+
10
12
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
11
13
 
12
14
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
13
15
 
14
16
  import React, { memo, useReducer } from 'react';
17
+ import { styled } from '@mui/material/styles';
15
18
  import PropTypes from 'prop-types';
16
19
  import useFormApi from "@data-driven-forms/react-form-renderer/use-form-api";
17
20
  import FieldArray from "@data-driven-forms/react-form-renderer/field-array";
18
21
  import isEqual from 'lodash/isEqual';
19
- import Grid from "@material-ui/core/esm/Grid";
20
- import Button from "@material-ui/core/esm/Button";
21
- import Typography from "@material-ui/core/esm/Typography";
22
- import FormControl from "@material-ui/core/esm/FormControl";
23
- import FormHelperText from "@material-ui/core/esm/FormHelperText";
24
- import IconButton from "@material-ui/core/esm/IconButton";
25
- import { makeStyles } from '@material-ui/core/styles';
26
- import RedoIcon from '@material-ui/icons/Redo';
27
- import UndoIcon from '@material-ui/icons/Undo';
22
+ import Grid from "@mui/material/Grid";
23
+ import Button from "@mui/material/Button";
24
+ import Typography from "@mui/material/Typography";
25
+ import FormControl from "@mui/material/FormControl";
26
+ import FormHelperText from "@mui/material/FormHelperText";
27
+ import IconButton from "@mui/material/IconButton";
28
+ import RedoIcon from '@mui/icons-material/Redo';
29
+ import UndoIcon from '@mui/icons-material/Undo';
28
30
  import useFieldApi from "@data-driven-forms/react-form-renderer/use-field-api";
29
31
  import FormFieldGrid from '../form-field-grid/form-field-grid';
30
32
  import clsx from 'clsx';
31
- var useFielArrayStyles = makeStyles({
32
- formControl: {
33
- width: '100%'
34
- },
35
- centerText: {
36
- display: 'flex',
37
- justifyContent: 'center'
38
- },
39
- buttonsToEnd: {
40
- display: 'flex',
41
- justifyContent: 'flex-end'
42
- },
43
- header: {
44
- display: 'flex'
45
- },
46
- label: {
47
- flexGrow: 1
48
- },
49
- fieldArrayGroup: {
50
- marginBottom: 32
51
- }
52
- });
33
+ var PREFIX = 'DynamicArray';
34
+ var classes = {
35
+ formControl: "".concat(PREFIX, "-formControl"),
36
+ centerText: "".concat(PREFIX, "-centerText"),
37
+ buttonsToEnd: "".concat(PREFIX, "-buttonsToEnd"),
38
+ header: "".concat(PREFIX, "-header"),
39
+ label: "".concat(PREFIX, "-label"),
40
+ fieldArrayGroup: "".concat(PREFIX, "-fieldArrayGroup")
41
+ };
42
+ var StyledFormFieldGrid = styled(FormFieldGrid)((_styled = {}, _defineProperty(_styled, "& .".concat(classes.formControl), {
43
+ width: '100%'
44
+ }), _defineProperty(_styled, "& .".concat(classes.centerText), {
45
+ display: 'flex',
46
+ justifyContent: 'center'
47
+ }), _defineProperty(_styled, "& .".concat(classes.buttonsToEnd), {
48
+ display: 'flex',
49
+ justifyContent: 'flex-end'
50
+ }), _defineProperty(_styled, "& .".concat(classes.header), {
51
+ display: 'flex'
52
+ }), _defineProperty(_styled, "& .".concat(classes.label), {
53
+ flexGrow: 1
54
+ }), _defineProperty(_styled, "&.".concat(classes.fieldArrayGroup), {
55
+ marginBottom: 32
56
+ }), _styled));
53
57
  var ArrayItem = /*#__PURE__*/memo(function (_ref) {
54
58
  var fields = _ref.fields,
55
59
  fieldIndex = _ref.fieldIndex,
@@ -66,7 +70,6 @@ var ArrayItem = /*#__PURE__*/memo(function (_ref) {
66
70
  var _useFormApi = useFormApi(),
67
71
  renderForm = _useFormApi.renderForm;
68
72
 
69
- var classes = useFielArrayStyles();
70
73
  var editedFields = fields.map(function (field, index) {
71
74
  var computedName = field.name ? "".concat(name, ".").concat(field.name) : name;
72
75
  return _objectSpread(_objectSpread({}, field), {}, {
@@ -202,13 +205,12 @@ var DynamicArray = function DynamicArray(_ref5) {
202
205
 
203
206
  var combinedButtonLabels = _objectSpread(_objectSpread({}, defaultButtonLabels), buttonLabels);
204
207
 
205
- var classes = useFielArrayStyles();
206
208
  var dirty = meta.dirty,
207
209
  submitFailed = meta.submitFailed,
208
210
  error = meta.error,
209
211
  submitError = meta.submitError;
210
212
  var isError = (dirty || submitFailed) && error && typeof error === 'string';
211
- return /*#__PURE__*/React.createElement(FormFieldGrid, _extends({}, FormFieldGridProps, {
213
+ return /*#__PURE__*/React.createElement(StyledFormFieldGrid, _extends({}, FormFieldGridProps, {
212
214
  className: clsx(classes.fieldArrayGroup, FormFieldGridProps.classname)
213
215
  }), /*#__PURE__*/React.createElement(FormControl, _extends({
214
216
  component: "fieldset",
@@ -275,13 +277,17 @@ var DynamicArray = function DynamicArray(_ref5) {
275
277
  component: "span",
276
278
  disabled: state.index === 0,
277
279
  onClick: undo
278
- }, UndoButtonProps), /*#__PURE__*/React.createElement(UndoIcon, null)), /*#__PURE__*/React.createElement(IconButton, _extends({
280
+ }, UndoButtonProps, {
281
+ size: "large"
282
+ }), /*#__PURE__*/React.createElement(UndoIcon, null)), /*#__PURE__*/React.createElement(IconButton, _extends({
279
283
  color: "primary",
280
284
  "aria-label": "redo",
281
285
  component: "span",
282
286
  disabled: state.index === state.history.length,
283
287
  onClick: redo
284
- }, RedoButtonProps), /*#__PURE__*/React.createElement(RedoIcon, null)), /*#__PURE__*/React.createElement(Button, _extends({
288
+ }, RedoButtonProps, {
289
+ size: "large"
290
+ }), /*#__PURE__*/React.createElement(RedoIcon, null)), /*#__PURE__*/React.createElement(Button, _extends({
285
291
  color: "primary",
286
292
  onClick: pushWrapper,
287
293
  disabled: value.length >= maxItems