@data-driven-forms/mui-component-mapper 4.1.13 → 4.1.14

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 (245) hide show
  1. package/.eslintrc.json +27 -0
  2. package/CHANGELOG.md +11 -3
  3. package/checkbox/checkbox.d.ts +29 -16
  4. package/checkbox/checkbox.js +44 -77
  5. package/checkbox/checkbox.js.map +1 -0
  6. package/checkbox/index.js +22 -24
  7. package/checkbox/index.js.map +1 -0
  8. package/component-mapper/component-mapper.d.ts +35 -40
  9. package/component-mapper/component-mapper.js +55 -40
  10. package/component-mapper/component-mapper.js.map +1 -0
  11. package/component-mapper/index.js +22 -24
  12. package/component-mapper/index.js.map +1 -0
  13. package/date-picker/date-picker.d.ts +10 -10
  14. package/date-picker/date-picker.js +52 -63
  15. package/date-picker/date-picker.js.map +1 -0
  16. package/date-picker/index.js +22 -24
  17. package/date-picker/index.js.map +1 -0
  18. package/dual-list-select/dual-list-select.d.ts +3 -111
  19. package/dual-list-select/dual-list-select.js +93 -412
  20. package/dual-list-select/dual-list-select.js.map +1 -0
  21. package/dual-list-select/index.js +22 -24
  22. package/dual-list-select/index.js.map +1 -0
  23. package/esm/checkbox/checkbox.d.ts +31 -0
  24. package/esm/checkbox/checkbox.js +25 -69
  25. package/esm/checkbox/checkbox.js.map +1 -0
  26. package/esm/checkbox/index.d.ts +2 -0
  27. package/esm/checkbox/index.js +2 -1
  28. package/esm/checkbox/index.js.map +1 -0
  29. package/esm/component-mapper/component-mapper.d.ts +36 -0
  30. package/esm/component-mapper/component-mapper.js +34 -19
  31. package/esm/component-mapper/component-mapper.js.map +1 -0
  32. package/esm/component-mapper/index.d.ts +2 -0
  33. package/esm/component-mapper/index.js +2 -1
  34. package/esm/component-mapper/index.js.map +1 -0
  35. package/esm/date-picker/date-picker.d.ts +12 -0
  36. package/esm/date-picker/date-picker.js +35 -55
  37. package/esm/date-picker/date-picker.js.map +1 -0
  38. package/esm/date-picker/index.d.ts +2 -0
  39. package/esm/date-picker/index.js +2 -1
  40. package/esm/date-picker/index.js.map +1 -0
  41. package/esm/dual-list-select/dual-list-select.d.ts +3 -0
  42. package/esm/dual-list-select/dual-list-select.js +59 -404
  43. package/esm/dual-list-select/dual-list-select.js.map +1 -0
  44. package/esm/dual-list-select/index.d.ts +2 -0
  45. package/esm/dual-list-select/index.js +2 -1
  46. package/esm/dual-list-select/index.js.map +1 -0
  47. package/esm/field-array/field-array.d.ts +56 -0
  48. package/esm/field-array/field-array.js +107 -296
  49. package/esm/field-array/field-array.js.map +1 -0
  50. package/esm/field-array/index.d.ts +2 -0
  51. package/esm/field-array/index.js +2 -1
  52. package/esm/field-array/index.js.map +1 -0
  53. package/esm/form-field-grid/form-field-grid.d.ts +8 -0
  54. package/esm/form-field-grid/form-field-grid.js +26 -22
  55. package/esm/form-field-grid/form-field-grid.js.map +1 -0
  56. package/esm/form-field-grid/index.d.ts +2 -0
  57. package/esm/form-field-grid/index.js +3 -1
  58. package/esm/form-field-grid/index.js.map +1 -0
  59. package/esm/form-template/form-template.d.ts +17 -0
  60. package/esm/form-template/form-template.js +57 -126
  61. package/esm/form-template/form-template.js.map +1 -0
  62. package/esm/form-template/index.d.ts +2 -0
  63. package/esm/form-template/index.js +2 -1
  64. package/esm/form-template/index.js.map +1 -0
  65. package/esm/index.d.ts +21 -0
  66. package/esm/index.js +3 -2
  67. package/esm/index.js.map +1 -0
  68. package/esm/multiple-choice-list/index.d.ts +2 -0
  69. package/esm/multiple-choice-list/index.js +2 -1
  70. package/esm/multiple-choice-list/index.js.map +1 -0
  71. package/esm/multiple-choice-list/multiple-choice-list.d.ts +14 -0
  72. package/esm/multiple-choice-list/multiple-choice-list.js +39 -93
  73. package/esm/multiple-choice-list/multiple-choice-list.js.map +1 -0
  74. package/esm/plain-text/index.d.ts +2 -0
  75. package/esm/plain-text/index.js +2 -1
  76. package/esm/plain-text/index.js.map +1 -0
  77. package/esm/plain-text/plain-text.d.ts +12 -0
  78. package/esm/plain-text/plain-text.js +18 -27
  79. package/esm/plain-text/plain-text.js.map +1 -0
  80. package/esm/radio/index.d.ts +2 -0
  81. package/esm/radio/index.js +2 -1
  82. package/esm/radio/index.js.map +1 -0
  83. package/esm/radio/radio.d.ts +19 -0
  84. package/esm/radio/radio.js +38 -110
  85. package/esm/radio/radio.js.map +1 -0
  86. package/esm/select/index.d.ts +2 -0
  87. package/esm/select/index.js +2 -1
  88. package/esm/select/index.js.map +1 -0
  89. package/esm/select/select.d.ts +44 -0
  90. package/esm/select/select.js +55 -162
  91. package/esm/select/select.js.map +1 -0
  92. package/esm/slider/index.d.ts +2 -0
  93. package/esm/slider/index.js +2 -1
  94. package/esm/slider/index.js.map +1 -0
  95. package/esm/slider/slider.d.ts +24 -0
  96. package/esm/slider/slider.js +22 -63
  97. package/esm/slider/slider.js.map +1 -0
  98. package/esm/sub-form/index.d.ts +2 -0
  99. package/esm/sub-form/index.js +2 -1
  100. package/esm/sub-form/index.js.map +1 -0
  101. package/esm/sub-form/sub-form.d.ts +16 -0
  102. package/esm/sub-form/sub-form.js +29 -52
  103. package/esm/sub-form/sub-form.js.map +1 -0
  104. package/esm/switch/index.d.ts +2 -0
  105. package/esm/switch/index.js +2 -1
  106. package/esm/switch/index.js.map +1 -0
  107. package/esm/switch/switch.d.ts +18 -0
  108. package/esm/switch/switch.js +21 -62
  109. package/esm/switch/switch.js.map +1 -0
  110. package/esm/tabs/index.d.ts +2 -0
  111. package/esm/tabs/index.js +2 -1
  112. package/esm/tabs/index.js.map +1 -0
  113. package/esm/tabs/tabs.d.ts +19 -0
  114. package/esm/tabs/tabs.js +9 -73
  115. package/esm/tabs/tabs.js.map +1 -0
  116. package/esm/text-field/index.d.ts +2 -0
  117. package/esm/text-field/index.js +2 -1
  118. package/esm/text-field/index.js.map +1 -0
  119. package/esm/text-field/text-field.d.ts +10 -0
  120. package/esm/text-field/text-field.js +20 -38
  121. package/esm/text-field/text-field.js.map +1 -0
  122. package/esm/textarea/index.d.ts +2 -0
  123. package/esm/textarea/index.js +2 -1
  124. package/esm/textarea/index.js.map +1 -0
  125. package/esm/textarea/textarea.d.ts +13 -0
  126. package/esm/textarea/textarea.js +20 -42
  127. package/esm/textarea/textarea.js.map +1 -0
  128. package/esm/time-picker/index.d.ts +2 -0
  129. package/esm/time-picker/index.js +2 -1
  130. package/esm/time-picker/index.js.map +1 -0
  131. package/esm/time-picker/time-picker.d.ts +13 -0
  132. package/esm/time-picker/time-picker.js +35 -57
  133. package/esm/time-picker/time-picker.js.map +1 -0
  134. package/esm/validation-error/index.d.ts +2 -0
  135. package/esm/validation-error/index.js +2 -1
  136. package/esm/validation-error/index.js.map +1 -0
  137. package/esm/validation-error/validation-error.d.ts +6 -0
  138. package/esm/validation-error/validation-error.js +7 -6
  139. package/esm/validation-error/validation-error.js.map +1 -0
  140. package/esm/wizard/index.d.ts +2 -0
  141. package/esm/wizard/index.js +2 -1
  142. package/esm/wizard/index.js.map +1 -0
  143. package/esm/wizard/step-buttons.d.ts +33 -0
  144. package/esm/wizard/step-buttons.js +49 -104
  145. package/esm/wizard/step-buttons.js.map +1 -0
  146. package/esm/wizard/wizard-nav.d.ts +15 -0
  147. package/esm/wizard/wizard-nav.js +15 -33
  148. package/esm/wizard/wizard-nav.js.map +1 -0
  149. package/esm/wizard/wizard.d.ts +4 -0
  150. package/esm/wizard/wizard.js +21 -70
  151. package/esm/wizard/wizard.js.map +1 -0
  152. package/field-array/field-array.d.ts +54 -38
  153. package/field-array/field-array.js +138 -306
  154. package/field-array/field-array.js.map +1 -0
  155. package/field-array/index.js +22 -24
  156. package/field-array/index.js.map +1 -0
  157. package/form-field-grid/form-field-grid.d.ts +7 -5
  158. package/form-field-grid/form-field-grid.js +42 -28
  159. package/form-field-grid/form-field-grid.js.map +1 -0
  160. package/form-field-grid/index.js +23 -12
  161. package/form-field-grid/index.js.map +1 -0
  162. package/form-template/form-template.d.ts +17 -5
  163. package/form-template/form-template.js +78 -132
  164. package/form-template/form-template.js.map +1 -0
  165. package/form-template/index.js +22 -24
  166. package/form-template/index.js.map +1 -0
  167. package/index.d.ts +10 -29
  168. package/index.js +45 -146
  169. package/index.js.map +1 -0
  170. package/multiple-choice-list/index.js +22 -24
  171. package/multiple-choice-list/index.js.map +1 -0
  172. package/multiple-choice-list/multiple-choice-list.d.ts +12 -24
  173. package/multiple-choice-list/multiple-choice-list.js +53 -101
  174. package/multiple-choice-list/multiple-choice-list.js.map +1 -0
  175. package/package.json +8 -10
  176. package/plain-text/index.js +22 -24
  177. package/plain-text/index.js.map +1 -0
  178. package/plain-text/plain-text.d.ts +10 -10
  179. package/plain-text/plain-text.js +30 -33
  180. package/plain-text/plain-text.js.map +1 -0
  181. package/radio/index.js +22 -24
  182. package/radio/index.js.map +1 -0
  183. package/radio/radio.d.ts +17 -25
  184. package/radio/radio.js +56 -116
  185. package/radio/radio.js.map +1 -0
  186. package/select/index.js +22 -24
  187. package/select/index.js.map +1 -0
  188. package/select/select.d.ts +42 -27
  189. package/select/select.js +78 -172
  190. package/select/select.js.map +1 -0
  191. package/slider/index.js +22 -24
  192. package/slider/index.js.map +1 -0
  193. package/slider/slider.d.ts +22 -28
  194. package/slider/slider.js +39 -71
  195. package/slider/slider.js.map +1 -0
  196. package/sub-form/index.js +22 -24
  197. package/sub-form/index.js.map +1 -0
  198. package/sub-form/sub-form.d.ts +14 -16
  199. package/sub-form/sub-form.js +42 -56
  200. package/sub-form/sub-form.js.map +1 -0
  201. package/switch/index.js +22 -24
  202. package/switch/index.js.map +1 -0
  203. package/switch/switch.d.ts +16 -26
  204. package/switch/switch.js +43 -70
  205. package/switch/switch.js.map +1 -0
  206. package/tabs/index.js +22 -24
  207. package/tabs/index.js.map +1 -0
  208. package/tabs/tabs.d.ts +18 -14
  209. package/tabs/tabs.js +33 -82
  210. package/tabs/tabs.js.map +1 -0
  211. package/text-field/index.js +22 -24
  212. package/text-field/index.js.map +1 -0
  213. package/text-field/text-field.d.ts +8 -16
  214. package/text-field/text-field.js +37 -46
  215. package/text-field/text-field.js.map +1 -0
  216. package/textarea/index.js +22 -24
  217. package/textarea/index.js.map +1 -0
  218. package/textarea/textarea.d.ts +11 -17
  219. package/textarea/textarea.js +37 -50
  220. package/textarea/textarea.js.map +1 -0
  221. package/time-picker/index.js +22 -24
  222. package/time-picker/index.js.map +1 -0
  223. package/time-picker/time-picker.d.ts +11 -16
  224. package/time-picker/time-picker.js +52 -65
  225. package/time-picker/time-picker.js.map +1 -0
  226. package/tsconfig.cjs.json +8 -0
  227. package/tsconfig.demo.json +31 -0
  228. package/tsconfig.esm.json +8 -0
  229. package/tsconfig.json +17 -9
  230. package/validation-error/index.js +22 -24
  231. package/validation-error/index.js.map +1 -0
  232. package/validation-error/validation-error.d.ts +5 -4
  233. package/validation-error/validation-error.js +10 -11
  234. package/validation-error/validation-error.js.map +1 -0
  235. package/wizard/index.js +22 -24
  236. package/wizard/index.js.map +1 -0
  237. package/wizard/step-buttons.d.ts +33 -0
  238. package/wizard/step-buttons.js +68 -110
  239. package/wizard/step-buttons.js.map +1 -0
  240. package/wizard/wizard-nav.d.ts +15 -0
  241. package/wizard/wizard-nav.js +37 -37
  242. package/wizard/wizard-nav.js.map +1 -0
  243. package/wizard/wizard.d.ts +4 -28
  244. package/wizard/wizard.js +41 -79
  245. package/wizard/wizard.js.map +1 -0
@@ -1,413 +1,68 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- 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; }
4
- 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; }
5
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
2
  import { styled } from '@mui/material/styles';
7
3
  import clsx from 'clsx';
8
- import Grid from "@mui/material/Grid";
9
- import List from "@mui/material/List";
10
- import ListItem from "@mui/material/ListItem";
11
- import ListItemText from "@mui/material/ListItemText";
12
- import ListItemIcon from "@mui/material/ListItemIcon";
13
- import Checkbox from "@mui/material/Checkbox";
14
- import ListItemSecondaryAction from "@mui/material/ListItemSecondaryAction";
15
- import IconButton from "@mui/material/IconButton";
16
- import FormControl from "@mui/material/FormControl";
17
- import FormLabel from "@mui/material/FormLabel";
18
- import FormHelperText from "@mui/material/FormHelperText";
19
- import Toolbar from "@mui/material/Toolbar";
20
- import TextField from "@mui/material/TextField";
21
- import Typography from "@mui/material/Typography";
22
- import Paper from "@mui/material/Paper";
23
- import Button from "@mui/material/Button";
4
+ import { Grid, List, ListItem, ListItemText, ListItemIcon, Checkbox, ListItemSecondaryAction, IconButton, FormControl, FormLabel, FormHelperText, Toolbar, TextField, Typography, Paper, Button, } from '@mui/material';
24
5
  import SortIcon from '@mui/icons-material/ArrowUpward';
25
6
  import DualListSelectCommon from '@data-driven-forms/common/dual-list-select';
26
7
  import FormFieldGrid from '../form-field-grid/form-field-grid';
27
8
  import { validationError } from '../validation-error/validation-error';
28
- var PREFIX = 'DualListSelectWrapper';
29
- var classes = {
30
- allToLeftIcon: "".concat(PREFIX, "-allToLeftIcon"),
31
- upsideDown: "".concat(PREFIX, "-upsideDown"),
32
- list: "".concat(PREFIX, "-list"),
33
- button: "".concat(PREFIX, "-button"),
34
- buttonsGrid: "".concat(PREFIX, "-buttonsGrid"),
35
- filter: "".concat(PREFIX, "-filter"),
36
- toolbar: "".concat(PREFIX, "-toolbar")
9
+ const PREFIX = 'DualListSelectWrapper';
10
+ const classes = {
11
+ allToLeftIcon: `${PREFIX}-allToLeftIcon`,
12
+ upsideDown: `${PREFIX}-upsideDown`,
13
+ list: `${PREFIX}-list`,
14
+ button: `${PREFIX}-button`,
15
+ buttonsGrid: `${PREFIX}-buttonsGrid`,
16
+ filter: `${PREFIX}-filter`,
17
+ toolbar: `${PREFIX}-toolbar`,
37
18
  };
38
- var StyledDualListSelect = styled(FormFieldGrid)(function (_ref) {
39
- var theme = _ref.theme;
40
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "& .".concat(classes.allToLeftIcon), {
41
- transform: 'scaleX(-1)'
42
- }), "& .".concat(classes.upsideDown), {
43
- transform: 'scaleY(-1)'
44
- }), "& .".concat(classes.list), {
45
- height: 300,
46
- overflow: 'auto'
47
- }), "& .".concat(classes.button), {
48
- display: 'flex',
49
- justifyContent: 'center',
50
- margin: theme.spacing(0.5, 0)
51
- }), "& .".concat(classes.buttonsGrid), {
52
- height: '100%',
53
- alignContent: 'center'
54
- }), "& .".concat(classes.filter), {
55
- width: '100%'
56
- }), "& .".concat(classes.toolbar), {
57
- paddingLeft: 16,
58
- paddingRight: 16
59
- });
60
- });
61
- var ListInternal = function ListInternal(_ref3) {
62
- var _ref3$value = _ref3.value,
63
- value = _ref3$value === void 0 ? [] : _ref3$value,
64
- optionClick = _ref3.optionClick,
65
- noOptionsTitle = _ref3.noOptionsTitle,
66
- filterValue = _ref3.filterValue,
67
- filterValueText = _ref3.filterValueText,
68
- selectedValues = _ref3.selectedValues,
69
- _ref3$ListProps = _ref3.ListProps,
70
- ListProps = _ref3$ListProps === void 0 ? {} : _ref3$ListProps,
71
- ListItemProps = _ref3.ListItemProps,
72
- ListItemIconProps = _ref3.ListItemIconProps,
73
- ListItemTextProps = _ref3.ListItemTextProps,
74
- ListItemSecondaryActionProps = _ref3.ListItemSecondaryActionProps,
75
- checkboxVariant = _ref3.checkboxVariant,
76
- PaperProps = _ref3.PaperProps,
77
- LeftPaperProps = _ref3.LeftPaperProps;
78
- return /*#__PURE__*/React.createElement(Paper, _extends({}, PaperProps, LeftPaperProps, {
79
- className: clsx(PaperProps && PaperProps.className, LeftPaperProps && LeftPaperProps.className)
80
- }), /*#__PURE__*/React.createElement(List, _extends({
81
- component: "div",
82
- role: "list",
83
- dense: true
84
- }, ListProps, {
85
- className: clsx(classes.list, ListProps.className)
86
- }), value.length < 1 && /*#__PURE__*/React.createElement(ListItem, _extends({
87
- button: true,
88
- disabled: true
89
- }, ListItemProps), /*#__PURE__*/React.createElement(ListItemText, {
90
- primary: filterValue ? filterValueText : noOptionsTitle
91
- })), value.length > 0 && value.map(function (_ref4) {
92
- var value = _ref4.value,
93
- label = _ref4.label,
94
- icon = _ref4.icon,
95
- isCheckbox = _ref4.isCheckbox,
96
- secondaryActions = _ref4.secondaryActions,
97
- ListItemPropsItem = _ref4.ListItemProps,
98
- ListItemIconPropsItem = _ref4.ListItemIconProps,
99
- ListItemTextPropsItem = _ref4.ListItemTextProps,
100
- ListItemSecondaryActionPropsItem = _ref4.ListItemSecondaryActionProps;
101
- return /*#__PURE__*/React.createElement(ListItem, _extends({
102
- button: true,
103
- key: value,
104
- selected: selectedValues.includes(value),
105
- onClick: function onClick(e) {
106
- return optionClick(isCheckbox || checkboxVariant ? _objectSpread(_objectSpread({}, e), {}, {
107
- ctrlKey: true
108
- }) : e, value);
109
- }
110
- }, ListItemProps, ListItemPropsItem), (icon || isCheckbox || checkboxVariant) && /*#__PURE__*/React.createElement(ListItemIcon, _extends({}, ListItemIconProps, ListItemIconPropsItem), isCheckbox || checkboxVariant ? /*#__PURE__*/React.createElement(Checkbox, {
111
- edge: "start",
112
- checked: selectedValues.includes(value),
113
- tabIndex: -1,
114
- disableRipple: true
115
- }) : icon), /*#__PURE__*/React.createElement(ListItemText, _extends({
116
- primary: label
117
- }, ListItemTextProps, ListItemTextPropsItem)), secondaryActions && /*#__PURE__*/React.createElement(ListItemSecondaryAction, _extends({}, ListItemSecondaryActionProps, ListItemSecondaryActionPropsItem), secondaryActions));
118
- })));
119
- };
120
- var ToolbarInternal = function ToolbarInternal(_ref5) {
121
- var ToolbarProps = _ref5.ToolbarProps,
122
- LeftToolbarProps = _ref5.LeftToolbarProps,
123
- filterOptions = _ref5.filterOptions,
124
- filterOptionsTitle = _ref5.filterOptionsTitle,
125
- FilterFieldProps = _ref5.FilterFieldProps,
126
- sortOptions = _ref5.sortOptions,
127
- SortIconButtonProps = _ref5.SortIconButtonProps,
128
- SortIconProps = _ref5.SortIconProps,
129
- LeftSortIconProps = _ref5.LeftSortIconProps,
130
- LeftFilterFieldProps = _ref5.LeftFilterFieldProps,
131
- LeftSortIconButtonProps = _ref5.LeftSortIconButtonProps,
132
- filter = _ref5.filter,
133
- sortDesc = _ref5.sortDesc,
134
- isValue = _ref5.isValue;
135
- return /*#__PURE__*/React.createElement(Toolbar, _extends({
136
- variant: "dense"
137
- }, ToolbarProps, LeftToolbarProps, {
138
- className: clsx(classes.toolbar, ToolbarProps && ToolbarProps.className, LeftToolbarProps && LeftToolbarProps.className)
139
- }), /*#__PURE__*/React.createElement(TextField, _extends({
140
- edge: "start",
141
- "aria-label": isValue ? 'value-search' : 'options-search',
142
- label: filterOptionsTitle,
143
- onChange: function onChange(_ref6) {
144
- var value = _ref6.target.value;
145
- return filterOptions(value);
19
+ const StyledDualListSelect = styled(FormFieldGrid)(({ theme }) => ({
20
+ [`& .${classes.allToLeftIcon}`]: {
21
+ transform: 'scaleX(-1)',
146
22
  },
147
- value: filter,
148
- type: "search"
149
- }, FilterFieldProps, LeftFilterFieldProps, {
150
- className: clsx(classes.filter, FilterFieldProps && FilterFieldProps.className, LeftFilterFieldProps && LeftFilterFieldProps.className)
151
- })), /*#__PURE__*/React.createElement(IconButton, _extends({
152
- "aria-label": isValue ? 'sort value' : 'sort options',
153
- edge: "end",
154
- onClick: sortOptions,
155
- color: "inherit"
156
- }, SortIconButtonProps, LeftSortIconButtonProps, {
157
- size: "large"
158
- }), /*#__PURE__*/React.createElement(SortIcon, _extends({}, SortIconProps, LeftSortIconProps, {
159
- className: clsx(!sortDesc && classes.upsideDown, SortIconProps && SortIconProps.className, LeftSortIconProps && LeftSortIconProps.className)
160
- }))));
161
- };
162
- var DualListSelect = function DualListSelect(_ref7) {
163
- var handleOptionsClick = _ref7.handleOptionsClick,
164
- rightValues = _ref7.rightValues,
165
- _ref7$noValueTitle = _ref7.noValueTitle,
166
- noValueTitle = _ref7$noValueTitle === void 0 ? 'No selected' : _ref7$noValueTitle,
167
- _ref7$filterValueText = _ref7.filterValueText,
168
- filterValueText = _ref7$filterValueText === void 0 ? 'Remove your filter to see all selected' : _ref7$filterValueText,
169
- leftValues = _ref7.leftValues,
170
- _ref7$noOptionsTitle = _ref7.noOptionsTitle,
171
- noOptionsTitle = _ref7$noOptionsTitle === void 0 ? 'No available options' : _ref7$noOptionsTitle,
172
- state = _ref7.state,
173
- _ref7$filterOptionsTe = _ref7.filterOptionsText,
174
- filterOptionsText = _ref7$filterOptionsTe === void 0 ? 'Remove your filter to see all options' : _ref7$filterOptionsTe,
175
- handleValuesClick = _ref7.handleValuesClick,
176
- handleMoveRight = _ref7.handleMoveRight,
177
- _ref7$moveRightTitle = _ref7.moveRightTitle,
178
- moveRightTitle = _ref7$moveRightTitle === void 0 ? 'Move selected to right' : _ref7$moveRightTitle,
179
- handleClearLeftValues = _ref7.handleClearLeftValues,
180
- _ref7$moveAllRightTit = _ref7.moveAllRightTitle,
181
- moveAllRightTitle = _ref7$moveAllRightTit === void 0 ? 'Move all to right' : _ref7$moveAllRightTit,
182
- handleClearRightValues = _ref7.handleClearRightValues,
183
- _ref7$moveAllLeftTitl = _ref7.moveAllLeftTitle,
184
- moveAllLeftTitle = _ref7$moveAllLeftTitl === void 0 ? 'Move all to left' : _ref7$moveAllLeftTitl,
185
- handleMoveLeft = _ref7.handleMoveLeft,
186
- _ref7$moveLeftTitle = _ref7.moveLeftTitle,
187
- moveLeftTitle = _ref7$moveLeftTitle === void 0 ? 'Move selected to left' : _ref7$moveLeftTitle,
188
- _ref7$allToRight = _ref7.allToRight,
189
- allToRight = _ref7$allToRight === void 0 ? true : _ref7$allToRight,
190
- _ref7$allToLeft = _ref7.allToLeft,
191
- allToLeft = _ref7$allToLeft === void 0 ? true : _ref7$allToLeft,
192
- checkboxVariant = _ref7.checkboxVariant,
193
- isRequired = _ref7.isRequired,
194
- meta = _ref7.meta,
195
- validateOnMount = _ref7.validateOnMount,
196
- label = _ref7.label,
197
- helperText = _ref7.helperText,
198
- description = _ref7.description,
199
- _ref7$filterOptionsTi = _ref7.filterOptionsTitle,
200
- filterOptionsTitle = _ref7$filterOptionsTi === void 0 ? 'Filter options' : _ref7$filterOptionsTi,
201
- _ref7$leftTitle = _ref7.leftTitle,
202
- leftTitle = _ref7$leftTitle === void 0 ? 'Options' : _ref7$leftTitle,
203
- filterOptions = _ref7.filterOptions,
204
- sortOptions = _ref7.sortOptions,
205
- sortValues = _ref7.sortValues,
206
- _ref7$filterValueTitl = _ref7.filterValueTitle,
207
- filterValueTitle = _ref7$filterValueTitl === void 0 ? 'Filter selected value' : _ref7$filterValueTitl,
208
- filterValues = _ref7.filterValues,
209
- _ref7$rightTitle = _ref7.rightTitle,
210
- rightTitle = _ref7$rightTitle === void 0 ? 'Selected' : _ref7$rightTitle,
211
- _ref7$isFilterable = _ref7.isFilterable,
212
- isFilterable = _ref7$isFilterable === void 0 ? true : _ref7$isFilterable,
213
- FormFieldGridProps = _ref7.FormFieldGridProps,
214
- InternalGridProps = _ref7.InternalGridProps,
215
- ListGridProps = _ref7.ListGridProps,
216
- LeftListGridProps = _ref7.LeftListGridProps,
217
- ListProps = _ref7.ListProps,
218
- LeftListProps = _ref7.LeftListProps,
219
- ButtonsGridProps = _ref7.ButtonsGridProps,
220
- ButtonsInternalGridProps = _ref7.ButtonsInternalGridProps,
221
- ButtonGridProps = _ref7.ButtonGridProps,
222
- ToRightGridProps = _ref7.ToRightGridProps,
223
- IconButtonProps = _ref7.IconButtonProps,
224
- ToRightIconButtonProps = _ref7.ToRightIconButtonProps,
225
- AllToRightGridProps = _ref7.AllToRightGridProps,
226
- AllToRightIconButtonProps = _ref7.AllToRightIconButtonProps,
227
- AllToLeftGridProps = _ref7.AllToLeftGridProps,
228
- AllToLeftIconButtonProps = _ref7.AllToLeftIconButtonProps,
229
- ToLeftGridProps = _ref7.ToLeftGridProps,
230
- ToLeftIconButtonProps = _ref7.ToLeftIconButtonProps,
231
- RightListGridProps = _ref7.RightListGridProps,
232
- RightListProps = _ref7.RightListProps,
233
- ListItemProps = _ref7.ListItemProps,
234
- ListItemIconProps = _ref7.ListItemIconProps,
235
- ListItemTextProps = _ref7.ListItemTextProps,
236
- ListItemSecondaryActionProps = _ref7.ListItemSecondaryActionProps,
237
- LeftListItemProps = _ref7.LeftListItemProps,
238
- LeftListItemIconProps = _ref7.LeftListItemIconProps,
239
- LeftItemTextProps = _ref7.LeftItemTextProps,
240
- LeftItemSecondaryActionProps = _ref7.LeftItemSecondaryActionProps,
241
- RightListItemProps = _ref7.RightListItemProps,
242
- RightListItemIconProps = _ref7.RightListItemIconProps,
243
- RightItemTextProps = _ref7.RightItemTextProps,
244
- RightItemSecondaryActionProps = _ref7.RightItemSecondaryActionProps,
245
- FormControlProps = _ref7.FormControlProps,
246
- FormLabelProps = _ref7.FormLabelProps,
247
- FormHelperTextProps = _ref7.FormHelperTextProps,
248
- TitleProps = _ref7.TitleProps,
249
- ToolbarProps = _ref7.ToolbarProps,
250
- FilterFieldProps = _ref7.FilterFieldProps,
251
- SortIconButtonProps = _ref7.SortIconButtonProps,
252
- SortIconProps = _ref7.SortIconProps,
253
- LeftToolbarProps = _ref7.LeftToolbarProps,
254
- LeftFilterFieldProps = _ref7.LeftFilterFieldProps,
255
- LeftSortIconButtonProps = _ref7.LeftSortIconButtonProps,
256
- LeftSortIconProps = _ref7.LeftSortIconProps,
257
- LeftTitleProps = _ref7.LeftTitleProps,
258
- RightToolbarProps = _ref7.RightToolbarProps,
259
- RightFilterFieldProps = _ref7.RightFilterFieldProps,
260
- RightSortIconButtonProps = _ref7.RightSortIconButtonProps,
261
- RightSortIconProps = _ref7.RightSortIconProps,
262
- RightTitleProps = _ref7.RightTitleProps,
263
- PaperProps = _ref7.PaperProps,
264
- LeftPaperProps = _ref7.LeftPaperProps,
265
- RightPaperProps = _ref7.RightPaperProps;
266
- var invalid = validationError(meta, validateOnMount);
267
- var text = invalid || (meta.touched || validateOnMount) && meta.warning || helperText || description;
268
- return /*#__PURE__*/React.createElement(StyledDualListSelect, FormFieldGridProps, /*#__PURE__*/React.createElement(FormControl, _extends({
269
- fullWidth: true,
270
- required: isRequired,
271
- error: !!invalid,
272
- component: "fieldset"
273
- }, FormControlProps), /*#__PURE__*/React.createElement(FormLabel, _extends({
274
- component: "legend"
275
- }, FormLabelProps), label), /*#__PURE__*/React.createElement(Grid, _extends({
276
- container: true
277
- }, InternalGridProps), /*#__PURE__*/React.createElement(Grid, _extends({
278
- item: true,
279
- xs: 12,
280
- md: 5
281
- }, ListGridProps, LeftListGridProps), leftTitle && /*#__PURE__*/React.createElement(Typography, _extends({
282
- variant: "h6",
283
- gutterBottom: true
284
- }, TitleProps, LeftTitleProps), leftTitle), isFilterable && /*#__PURE__*/React.createElement(ToolbarInternal, {
285
- ToolbarProps: ToolbarProps,
286
- LeftToolbarProps: LeftToolbarProps,
287
- filterOptions: filterOptions,
288
- filterOptionsTitle: filterOptionsTitle,
289
- FilterFieldProps: FilterFieldProps,
290
- sortOptions: sortOptions,
291
- SortIconButtonProps: SortIconButtonProps,
292
- SortIconProps: SortIconProps,
293
- LeftSortIconProps: LeftSortIconProps,
294
- LeftFilterFieldProps: LeftFilterFieldProps,
295
- LeftSortIconButtonProps: LeftSortIconButtonProps,
296
- filter: state.filterOptions,
297
- sortDesc: state.sortLeftDesc
298
- }), /*#__PURE__*/React.createElement(ListInternal, {
299
- optionClick: handleOptionsClick,
300
- value: leftValues,
301
- noOptionsTitle: noOptionsTitle,
302
- filterValue: state.filterOptions,
303
- filterValueText: filterOptionsText,
304
- selectedValues: state.selectedLeftValues,
305
- checkboxVariant: checkboxVariant,
306
- ListProps: _objectSpread(_objectSpread({}, ListProps), LeftListProps),
307
- ListItemProps: _objectSpread(_objectSpread({}, ListItemProps), LeftListItemProps),
308
- ListItemIconProps: _objectSpread(_objectSpread({}, ListItemIconProps), LeftListItemIconProps),
309
- ListItemTextProps: _objectSpread(_objectSpread({}, ListItemTextProps), LeftItemTextProps),
310
- ListItemSecondaryActionProps: _objectSpread(_objectSpread({}, ListItemSecondaryActionProps), LeftItemSecondaryActionProps),
311
- PaperProps: PaperProps,
312
- LeftPaperProps: LeftPaperProps
313
- })), /*#__PURE__*/React.createElement(Grid, _extends({
314
- item: true,
315
- xs: 12,
316
- md: 2
317
- }, ButtonsGridProps), /*#__PURE__*/React.createElement(Grid, _extends({
318
- container: true
319
- }, ButtonsInternalGridProps, {
320
- className: clsx(classes.buttonsGrid, ButtonsInternalGridProps && ButtonsInternalGridProps.className)
321
- }), allToRight && /*#__PURE__*/React.createElement(Grid, _extends({
322
- item: true,
323
- md: 12,
324
- sm: 3
325
- }, ButtonGridProps, AllToRightGridProps, {
326
- className: clsx(classes.button, ButtonGridProps && ButtonGridProps.className, AllToRightGridProps && AllToRightGridProps.className)
327
- }), /*#__PURE__*/React.createElement(Button, _extends({
328
- variant: "outlined",
329
- size: "small",
330
- disabled: leftValues.length === 0,
331
- onClick: handleClearLeftValues,
332
- "aria-label": moveAllRightTitle
333
- }, IconButtonProps, AllToRightIconButtonProps), "\u226B")), /*#__PURE__*/React.createElement(Grid, _extends({
334
- item: true,
335
- md: 12,
336
- sm: 3
337
- }, ButtonGridProps, ToRightGridProps, {
338
- className: clsx(classes.button, ButtonGridProps && ButtonGridProps.className, ToRightGridProps && ToRightGridProps.className)
339
- }), /*#__PURE__*/React.createElement(Button, _extends({
340
- variant: "outlined",
341
- size: "small",
342
- disabled: leftValues.length === 0,
343
- onClick: handleMoveRight,
344
- "aria-label": moveRightTitle
345
- }, IconButtonProps, ToRightIconButtonProps), ">")), /*#__PURE__*/React.createElement(Grid, _extends({
346
- item: true,
347
- md: 12,
348
- sm: 3
349
- }, ButtonGridProps, ToLeftGridProps, {
350
- className: clsx(classes.button, ButtonGridProps && ButtonGridProps.className, ToLeftGridProps && ToLeftGridProps.className)
351
- }), /*#__PURE__*/React.createElement(Button, _extends({
352
- variant: "outlined",
353
- size: "small",
354
- disabled: rightValues.length === 0,
355
- onClick: handleMoveLeft,
356
- "aria-label": moveLeftTitle
357
- }, IconButtonProps, ToLeftIconButtonProps), "<")), allToLeft && /*#__PURE__*/React.createElement(Grid, _extends({
358
- item: true,
359
- md: 12,
360
- sm: 3
361
- }, ButtonGridProps, AllToLeftGridProps, {
362
- className: clsx(classes.button, ButtonGridProps && ButtonGridProps.className, AllToLeftGridProps && AllToLeftGridProps.className)
363
- }), /*#__PURE__*/React.createElement(Button, _extends({
364
- variant: "outlined",
365
- size: "small",
366
- disabled: rightValues.length === 0,
367
- onClick: handleClearRightValues,
368
- "aria-label": moveAllLeftTitle
369
- }, IconButtonProps, AllToLeftIconButtonProps), "\u226A")))), /*#__PURE__*/React.createElement(Grid, _extends({
370
- item: true,
371
- xs: 12,
372
- md: 5
373
- }, ListGridProps, RightListGridProps), rightTitle && /*#__PURE__*/React.createElement(Typography, _extends({
374
- variant: "h6",
375
- gutterBottom: true
376
- }, TitleProps, RightTitleProps), rightTitle), isFilterable && /*#__PURE__*/React.createElement(ToolbarInternal, {
377
- ToolbarProps: ToolbarProps,
378
- LeftToolbarProps: RightToolbarProps,
379
- filterOptions: filterValues,
380
- filterOptionsTitle: filterValueTitle,
381
- FilterFieldProps: FilterFieldProps,
382
- sortOptions: sortValues,
383
- SortIconButtonProps: SortIconButtonProps,
384
- SortIconProps: SortIconProps,
385
- LeftSortIconProps: RightSortIconProps,
386
- LeftFilterFieldProps: RightFilterFieldProps,
387
- LeftSortIconButtonProps: RightSortIconButtonProps,
388
- filter: state.filterValue,
389
- sortDesc: state.sortRightDesc,
390
- isValue: true
391
- }), /*#__PURE__*/React.createElement(ListInternal, {
392
- checkboxVariant: checkboxVariant,
393
- optionClick: handleValuesClick,
394
- value: rightValues,
395
- noOptionsTitle: noValueTitle,
396
- filterValue: state.filterValue,
397
- filterValueText: filterValueText,
398
- selectedValues: state.selectedRightValues,
399
- ListProps: _objectSpread(_objectSpread({}, ListProps), RightListProps),
400
- ListItemProps: _objectSpread(_objectSpread({}, ListItemProps), RightListItemProps),
401
- ListItemIconProps: _objectSpread(_objectSpread({}, ListItemIconProps), RightListItemIconProps),
402
- ListItemTextProps: _objectSpread(_objectSpread({}, ListItemTextProps), RightItemTextProps),
403
- ListItemSecondaryActionProps: _objectSpread(_objectSpread({}, ListItemSecondaryActionProps), RightItemSecondaryActionProps),
404
- PaperProps: PaperProps,
405
- LeftPaperProps: RightPaperProps
406
- }))), text && /*#__PURE__*/React.createElement(FormHelperText, FormHelperTextProps, text)));
407
- };
408
- var DualListSelectWrapper = function DualListSelectWrapper(props) {
409
- return /*#__PURE__*/React.createElement(DualListSelectCommon, _extends({}, props, {
410
- DualListSelect: DualListSelect
411
- }));
23
+ [`& .${classes.upsideDown}`]: {
24
+ transform: 'scaleY(-1)',
25
+ },
26
+ [`& .${classes.list}`]: {
27
+ height: 300,
28
+ overflow: 'auto',
29
+ },
30
+ [`& .${classes.button}`]: {
31
+ display: 'flex',
32
+ justifyContent: 'center',
33
+ margin: theme.spacing(0.5, 0),
34
+ },
35
+ [`& .${classes.buttonsGrid}`]: {
36
+ height: '100%',
37
+ alignContent: 'center',
38
+ },
39
+ [`& .${classes.filter}`]: {
40
+ width: '100%',
41
+ },
42
+ [`& .${classes.toolbar}`]: {
43
+ paddingLeft: 16,
44
+ paddingRight: 16,
45
+ },
46
+ }));
47
+ const ListInternal = ({ value = [], optionClick, noOptionsTitle, filterValue, filterValueText, selectedValues, ListProps = {}, ListItemProps, ListItemIconProps, ListItemTextProps, ListItemSecondaryActionProps, checkboxVariant, PaperProps, LeftPaperProps, }) => (_jsx(Paper, Object.assign({}, PaperProps, LeftPaperProps, { className: clsx(PaperProps && PaperProps.className, LeftPaperProps && LeftPaperProps.className), children: _jsxs(List, Object.assign({ component: "div", role: "list", dense: true }, ListProps, { className: clsx(classes.list, ListProps.className), children: [value.length < 1 && (
48
+ // Need to be migrated to ListItemButton
49
+ // @ts-ignore
50
+ _jsx(ListItem, Object.assign({ button: true, disabled: true }, ListItemProps, { children: _jsx(ListItemText, { primary: filterValue ? filterValueText : noOptionsTitle }) }))), value.length > 0 &&
51
+ value.map(({ value, label, icon, isCheckbox, secondaryActions, ListItemProps: ListItemPropsItem, ListItemIconProps: ListItemIconPropsItem, ListItemTextProps: ListItemTextPropsItem, ListItemSecondaryActionProps: ListItemSecondaryActionPropsItem, }) => (_jsxs(ListItem
52
+ // Need to be migrated to ListItemButton
53
+ // @ts-ignore
54
+ , Object.assign({
55
+ // Need to be migrated to ListItemButton
56
+ // @ts-ignore
57
+ button: true, selected: selectedValues.includes(value), onClick: (e) => optionClick(isCheckbox || checkboxVariant ? Object.assign(Object.assign({}, e), { ctrlKey: true }) : e, value), sx: { cursor: 'pointer' } }, ListItemProps, ListItemPropsItem, { children: [(icon || isCheckbox || checkboxVariant) && (_jsx(ListItemIcon, Object.assign({}, ListItemIconProps, ListItemIconPropsItem, { children: isCheckbox || checkboxVariant ? (_jsx(Checkbox, { edge: "start", checked: selectedValues.includes(value), tabIndex: -1, disableRipple: true })) : (icon) }))), _jsx(ListItemText, Object.assign({ primary: label }, ListItemTextProps, ListItemTextPropsItem)), secondaryActions && (_jsx(ListItemSecondaryAction, Object.assign({}, ListItemSecondaryActionProps, ListItemSecondaryActionPropsItem, { children: secondaryActions })))] }), value)))] })) })));
58
+ const ToolbarInternal = ({ ToolbarProps, LeftToolbarProps, filterOptions, filterOptionsTitle, FilterFieldProps, sortOptions, SortIconButtonProps, SortIconProps, LeftSortIconProps, LeftFilterFieldProps, LeftSortIconButtonProps, filter, sortDesc, isValue = false, }) => (_jsxs(Toolbar, Object.assign({ variant: "dense" }, ToolbarProps, LeftToolbarProps, { className: clsx(classes.toolbar, ToolbarProps && ToolbarProps.className, LeftToolbarProps && LeftToolbarProps.className), children: [_jsx(TextField, Object.assign({ "aria-label": isValue ? 'value-search' : 'options-search', label: filterOptionsTitle, onChange: ({ target: { value } }) => filterOptions(value), value: filter, type: "search" }, FilterFieldProps, LeftFilterFieldProps, { className: clsx(classes.filter, FilterFieldProps && FilterFieldProps.className, LeftFilterFieldProps && LeftFilterFieldProps.className) })), _jsx(IconButton, Object.assign({ "aria-label": isValue ? 'sort value' : 'sort options', edge: "end", onClick: sortOptions, color: "inherit" }, SortIconButtonProps, LeftSortIconButtonProps, { size: "large", children: _jsx(SortIcon, Object.assign({}, SortIconProps, LeftSortIconProps, { className: clsx(!sortDesc && classes.upsideDown, SortIconProps && SortIconProps.className, LeftSortIconProps && LeftSortIconProps.className) })) }))] })));
59
+ const DualListSelect = ({ handleOptionsClick, rightValues, noValueTitle = 'No selected', filterValueText = 'Remove your filter to see all selected', leftValues, noOptionsTitle = 'No available options', state, filterOptionsText = 'Remove your filter to see all options', handleValuesClick, handleMoveRight, moveRightTitle = 'Move selected to right', handleClearLeftValues, moveAllRightTitle = 'Move all to right', handleClearRightValues, moveAllLeftTitle = 'Move all to left', handleMoveLeft, moveLeftTitle = 'Move selected to left', allToRight = true, allToLeft = true, checkboxVariant, isRequired, meta, validateOnMount, label, helperText, description, filterOptionsTitle = 'Filter options', leftTitle = 'Options', filterOptions, sortOptions, sortValues, filterValueTitle = 'Filter selected value', filterValues, rightTitle = 'Selected', isFilterable = true,
60
+ // Props
61
+ FormFieldGridProps, InternalGridProps, ListGridProps, LeftListGridProps, ListProps, LeftListProps, ButtonsGridProps, ButtonsInternalGridProps, ButtonGridProps, ToRightGridProps, IconButtonProps, ToRightIconButtonProps, AllToRightGridProps, AllToRightIconButtonProps, AllToLeftGridProps, AllToLeftIconButtonProps, ToLeftGridProps, ToLeftIconButtonProps, RightListGridProps, RightListProps, ListItemProps, ListItemIconProps, ListItemTextProps, ListItemSecondaryActionProps, LeftListItemProps, LeftListItemIconProps, LeftItemTextProps, LeftItemSecondaryActionProps, RightListItemProps, RightListItemIconProps, RightItemTextProps, RightItemSecondaryActionProps, FormControlProps, FormLabelProps, FormHelperTextProps, TitleProps, ToolbarProps, FilterFieldProps, SortIconButtonProps, SortIconProps, LeftToolbarProps, LeftFilterFieldProps, LeftSortIconButtonProps, LeftSortIconProps, LeftTitleProps, RightToolbarProps, RightFilterFieldProps, RightSortIconButtonProps, RightSortIconProps, RightTitleProps, PaperProps, LeftPaperProps, RightPaperProps, }) => {
62
+ const invalid = validationError(meta, validateOnMount);
63
+ const text = invalid || ((meta.touched || validateOnMount) && meta.warning) || helperText || description;
64
+ return (_jsx(StyledDualListSelect, Object.assign({}, FormFieldGridProps, { children: _jsxs(FormControl, Object.assign({ fullWidth: true, required: isRequired, error: !!invalid, component: "fieldset" }, FormControlProps, { children: [_jsx(FormLabel, Object.assign({ component: "legend" }, FormLabelProps, { children: label })), _jsxs(Grid, Object.assign({ container: true }, InternalGridProps, { children: [_jsxs(Grid, Object.assign({ item: true, xs: 12, md: 5 }, ListGridProps, LeftListGridProps, { children: [leftTitle && (_jsx(Typography, Object.assign({ variant: "h6", gutterBottom: true }, TitleProps, LeftTitleProps, { children: leftTitle }))), isFilterable && (_jsx(ToolbarInternal, { ToolbarProps: ToolbarProps, LeftToolbarProps: LeftToolbarProps, filterOptions: filterOptions, filterOptionsTitle: filterOptionsTitle, FilterFieldProps: FilterFieldProps, sortOptions: sortOptions, SortIconButtonProps: SortIconButtonProps, SortIconProps: SortIconProps, LeftSortIconProps: LeftSortIconProps, LeftFilterFieldProps: LeftFilterFieldProps, LeftSortIconButtonProps: LeftSortIconButtonProps, filter: state.filterOptions, sortDesc: state.sortLeftDesc })), _jsx(ListInternal, { optionClick: handleOptionsClick, value: leftValues, noOptionsTitle: noOptionsTitle, filterValue: state.filterOptions, filterValueText: filterOptionsText, selectedValues: state.selectedLeftValues, checkboxVariant: checkboxVariant, ListProps: Object.assign(Object.assign({}, ListProps), LeftListProps), ListItemProps: Object.assign(Object.assign({}, ListItemProps), LeftListItemProps), ListItemIconProps: Object.assign(Object.assign({}, ListItemIconProps), LeftListItemIconProps), ListItemTextProps: Object.assign(Object.assign({}, ListItemTextProps), LeftItemTextProps), ListItemSecondaryActionProps: Object.assign(Object.assign({}, ListItemSecondaryActionProps), LeftItemSecondaryActionProps), PaperProps: PaperProps, LeftPaperProps: LeftPaperProps })] })), _jsx(Grid, Object.assign({ item: true, xs: 12, md: 2 }, ButtonsGridProps, { children: _jsxs(Grid, Object.assign({ container: true }, ButtonsInternalGridProps, { className: clsx(classes.buttonsGrid, ButtonsInternalGridProps && ButtonsInternalGridProps.className), children: [allToRight && (_jsx(Grid, Object.assign({ item: true, md: 12, sm: 3 }, ButtonGridProps, AllToRightGridProps, { className: clsx(classes.button, ButtonGridProps && ButtonGridProps.className, AllToRightGridProps && AllToRightGridProps.className), children: _jsx(Button, Object.assign({ variant: "outlined", size: "small", disabled: leftValues.length === 0, onClick: handleClearLeftValues, "aria-label": moveAllRightTitle }, IconButtonProps, AllToRightIconButtonProps, { children: "\u226B" })) }))), _jsx(Grid, Object.assign({ item: true, md: 12, sm: 3 }, ButtonGridProps, ToRightGridProps, { className: clsx(classes.button, ButtonGridProps && ButtonGridProps.className, ToRightGridProps && ToRightGridProps.className), children: _jsx(Button, Object.assign({ variant: "outlined", size: "small", disabled: leftValues.length === 0, onClick: handleMoveRight, "aria-label": moveRightTitle }, IconButtonProps, ToRightIconButtonProps, { children: ">" })) })), _jsx(Grid, Object.assign({ item: true, md: 12, sm: 3 }, ButtonGridProps, ToLeftGridProps, { className: clsx(classes.button, ButtonGridProps && ButtonGridProps.className, ToLeftGridProps && ToLeftGridProps.className), children: _jsx(Button, Object.assign({ variant: "outlined", size: "small", disabled: rightValues.length === 0, onClick: handleMoveLeft, "aria-label": moveLeftTitle }, IconButtonProps, ToLeftIconButtonProps, { children: "<" })) })), allToLeft && (_jsx(Grid, Object.assign({ item: true, md: 12, sm: 3 }, ButtonGridProps, AllToLeftGridProps, { className: clsx(classes.button, ButtonGridProps && ButtonGridProps.className, AllToLeftGridProps && AllToLeftGridProps.className), children: _jsx(Button, Object.assign({ variant: "outlined", size: "small", disabled: rightValues.length === 0, onClick: handleClearRightValues, "aria-label": moveAllLeftTitle }, IconButtonProps, AllToLeftIconButtonProps, { children: "\u226A" })) })))] })) })), _jsxs(Grid, Object.assign({ item: true, xs: 12, md: 5 }, ListGridProps, RightListGridProps, { children: [rightTitle && (_jsx(Typography, Object.assign({ variant: "h6", gutterBottom: true }, TitleProps, RightTitleProps, { children: rightTitle }))), isFilterable && (_jsx(ToolbarInternal, { ToolbarProps: ToolbarProps, LeftToolbarProps: RightToolbarProps, filterOptions: filterValues, filterOptionsTitle: filterValueTitle, FilterFieldProps: FilterFieldProps, sortOptions: sortValues, SortIconButtonProps: SortIconButtonProps, SortIconProps: SortIconProps, LeftSortIconProps: RightSortIconProps, LeftFilterFieldProps: RightFilterFieldProps, LeftSortIconButtonProps: RightSortIconButtonProps, filter: state.filterValue, sortDesc: state.sortRightDesc, isValue: true })), _jsx(ListInternal, { checkboxVariant: checkboxVariant, optionClick: handleValuesClick, value: rightValues, noOptionsTitle: noValueTitle, filterValue: state.filterValue, filterValueText: filterValueText, selectedValues: state.selectedRightValues, ListProps: Object.assign(Object.assign({}, ListProps), RightListProps), ListItemProps: Object.assign(Object.assign({}, ListItemProps), RightListItemProps), ListItemIconProps: Object.assign(Object.assign({}, ListItemIconProps), RightListItemIconProps), ListItemTextProps: Object.assign(Object.assign({}, ListItemTextProps), RightItemTextProps), ListItemSecondaryActionProps: Object.assign(Object.assign({}, ListItemSecondaryActionProps), RightItemSecondaryActionProps), PaperProps: PaperProps, LeftPaperProps: RightPaperProps })] }))] })), text && _jsx(FormHelperText, Object.assign({}, FormHelperTextProps, { children: text }))] })) })));
412
65
  };
413
- export default DualListSelectWrapper;
66
+ const DualListSelectWrapper = (props) => _jsx(DualListSelectCommon, Object.assign({}, props, { DualListSelect: DualListSelect }));
67
+ export default DualListSelectWrapper;
68
+ //# sourceMappingURL=dual-list-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dual-list-select.js","sourceRoot":"","sources":["../../src/dual-list-select/dual-list-select.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,uBAAuB,EACvB,UAAU,EACV,WAAW,EACX,SAAS,EACT,cAAc,EACd,OAAO,EACP,SAAS,EACT,UAAU,EACV,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AAmBvB,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AAEvD,OAAO,oBAAoB,MAAM,4CAA4C,CAAC;AAE9E,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,MAAM,MAAM,GAAG,uBAAuB,CAAC;AAEvC,MAAM,OAAO,GAAG;IACd,aAAa,EAAE,GAAG,MAAM,gBAAgB;IACxC,UAAU,EAAE,GAAG,MAAM,aAAa;IAClC,IAAI,EAAE,GAAG,MAAM,OAAO;IACtB,MAAM,EAAE,GAAG,MAAM,SAAS;IAC1B,WAAW,EAAE,GAAG,MAAM,cAAc;IACpC,MAAM,EAAE,GAAG,MAAM,SAAS;IAC1B,OAAO,EAAE,GAAG,MAAM,UAAU;CAC7B,CAAC;AAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC,EAAE;QAC/B,SAAS,EAAE,YAAY;KACxB;IAED,CAAC,MAA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9B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,KAAK,CAAC,mBAAmB,EACzC,SAAS,kCAAO,SAAS,GAAK,cAAc,GAC5C,aAAa,kCAAO,aAAa,GAAK,kBAAkB,GACxD,iBAAiB,kCAAO,iBAAiB,GAAK,sBAAsB,GACpE,iBAAiB,kCAAO,iBAAiB,GAAK,kBAAkB,GAChE,4BAA4B,kCAAO,4BAA4B,GAAK,6BAA6B,GACjG,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,eAAe,GAC/B,KACG,KACF,EACN,IAAI,IAAI,KAAC,cAAc,oBAAK,mBAAmB,cAAG,IAAI,IAAkB,KAC7D,IACO,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAkB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,oBAAoB,oBAAK,KAAK,IAAE,cAAc,EAAE,cAAc,IAAI,CAAC;AAE5H,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './dual-list-select';
2
+ export * from './dual-list-select';
@@ -1,2 +1,3 @@
1
1
  export { default } from './dual-list-select';
2
- export * from './dual-list-select';
2
+ export * from './dual-list-select';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dual-list-select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,56 @@
1
+ import React from 'react';
2
+ import type { BaseFieldProps, AnyObject } from '@data-driven-forms/react-form-renderer';
3
+ import type { GridProps, ButtonProps, TypographyProps, FormControlProps, FormHelperTextProps, IconButtonProps } from '@mui/material';
4
+ import type { FormFieldGridProps } from '../form-field-grid/form-field-grid';
5
+ interface ButtonLabels {
6
+ add?: string;
7
+ remove?: string;
8
+ }
9
+ interface HistoryAction {
10
+ action: 'remove';
11
+ value: any;
12
+ }
13
+ interface HistoryState {
14
+ index: number;
15
+ history: HistoryAction[];
16
+ }
17
+ type ReducerAction = {
18
+ type: 'redo';
19
+ } | {
20
+ type: 'undo';
21
+ } | {
22
+ type: 'action';
23
+ action: HistoryAction;
24
+ } | {
25
+ type: 'resetHistory';
26
+ };
27
+ export declare const reducer: (state: HistoryState, actionObj: ReducerAction) => HistoryState;
28
+ export interface DynamicArrayProps extends BaseFieldProps {
29
+ arrayValidator?: (value: any[]) => string | undefined;
30
+ fields: AnyObject[];
31
+ defaultItem?: any;
32
+ minItems?: number;
33
+ maxItems?: number;
34
+ noItemsMessage?: string;
35
+ buttonLabels?: ButtonLabels;
36
+ FormFieldGridProps?: FormFieldGridProps;
37
+ FormControlProps?: FormControlProps;
38
+ GridContainerProps?: GridProps;
39
+ HeaderGridProps?: GridProps;
40
+ HeaderProps?: TypographyProps;
41
+ UndoButtonProps?: IconButtonProps;
42
+ RedoButtonProps?: IconButtonProps;
43
+ AddButtonProps?: ButtonProps;
44
+ DescriptionGridProps?: GridProps;
45
+ DescriptionProps?: TypographyProps;
46
+ BodyGridProps?: GridProps;
47
+ NoItemsProps?: TypographyProps;
48
+ FormHelperTextGridProps?: GridProps;
49
+ FormHelperTextProps?: FormHelperTextProps;
50
+ FieldContainerProps?: GridProps;
51
+ FieldGroupGridProps?: GridProps;
52
+ RemoveButtonGridProps?: GridProps;
53
+ RemoveButtonProps?: ButtonProps;
54
+ }
55
+ declare const DynamicArray: React.FC<DynamicArrayProps>;
56
+ export default DynamicArray;