@widergy/energy-ui 1.105.1 → 1.106.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +1 -1
- package/dist/components/UTCheckList/index.js +5 -4
- package/dist/components/UTCheckbox/index.js +1 -3
- package/dist/components/UTMenu/index.js +38 -18
- package/dist/components/UTMenu/theme.js +47 -8
- package/dist/components/UTTable/components/ActionIcons/index.js +5 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [1.106.3](https://github.com/widergy/energy-ui/compare/v1.106.2...v1.106.3) (2022-01-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* adding empty dependencies array ([18d714a](https://github.com/widergy/energy-ui/commit/18d714a341247d5dc6fdfa1409c6063a2ec17445))
|
|
7
|
+
|
|
8
|
+
## [1.106.2](https://github.com/widergy/energy-ui/compare/v1.106.1...v1.106.2) (2021-12-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* UTChecklist fixed ([#251](https://github.com/widergy/energy-ui/issues/251)) ([f2dee13](https://github.com/widergy/energy-ui/commit/f2dee134e8723348278d43ba256ff62ea7c13b15))
|
|
14
|
+
|
|
15
|
+
## [1.106.1](https://github.com/widergy/energy-ui/compare/v1.106.0...v1.106.1) (2021-12-23)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* checked ([#252](https://github.com/widergy/energy-ui/issues/252)) ([74ed6db](https://github.com/widergy/energy-ui/commit/74ed6dba93c720c2b41354eb75a66d904addf0ae))
|
|
21
|
+
|
|
22
|
+
# [1.106.0](https://github.com/widergy/energy-ui/compare/v1.105.1...v1.106.0) (2021-12-15)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* UTMenu themes ([#241](https://github.com/widergy/energy-ui/issues/241)) ([e781eaa](https://github.com/widergy/energy-ui/commit/e781eaa5332c4e457b592da2b4edd47ca4996701))
|
|
28
|
+
|
|
1
29
|
## [1.105.1](https://github.com/widergy/energy-ui/compare/v1.105.0...v1.105.1) (2021-12-14)
|
|
2
30
|
|
|
3
31
|
|
|
@@ -56,7 +56,7 @@ var useDynamicMargins = function useDynamicMargins(center, options) {
|
|
|
56
56
|
setMarginRight(Math.ceil((_marginRightRef$curre = marginRightRef.current) === null || _marginRightRef$curre === void 0 ? void 0 : _marginRightRef$curre.getBoundingClientRect().width) || lateralMargin || LATERAL_DEFAULT_MARGIN);
|
|
57
57
|
setMarginBottom(Math.ceil((_marginBottomRef$curr = marginBottomRef.current) === null || _marginBottomRef$curr === void 0 ? void 0 : _marginBottomRef$curr.getBoundingClientRect().height) || verticalMargin || VERTICAL_DEFAULT_MARGIN);
|
|
58
58
|
setMarginTop(Math.ceil((_marginTopRef$current = marginTopRef.current) === null || _marginTopRef$current === void 0 ? void 0 : _marginTopRef$current.getBoundingClientRect().height) || verticalMargin || VERTICAL_DEFAULT_MARGIN);
|
|
59
|
-
});
|
|
59
|
+
}, []);
|
|
60
60
|
return {
|
|
61
61
|
marginLeftRef: marginLeftRef,
|
|
62
62
|
marginRightRef: marginRightRef,
|
|
@@ -121,7 +121,7 @@ var UTCheckList = function UTCheckList(_ref) {
|
|
|
121
121
|
}), /*#__PURE__*/_react.default.createElement(_UTCheckbox.default, {
|
|
122
122
|
disabled: disabled,
|
|
123
123
|
onChange: handleCheckAll,
|
|
124
|
-
|
|
124
|
+
value: list.length === input.value.length,
|
|
125
125
|
label: header ? headerLabel : additionalInfo && additionalInfo.header || _constants.defaultAdditionalInfoHeader,
|
|
126
126
|
classes: {
|
|
127
127
|
root: !header && classes.selectAllRowRoot,
|
|
@@ -141,10 +141,11 @@ var UTCheckList = function UTCheckList(_ref) {
|
|
|
141
141
|
disabled: disabled || item.disabled,
|
|
142
142
|
item: item,
|
|
143
143
|
key: item[valueKey],
|
|
144
|
-
value: item[valueKey],
|
|
144
|
+
value: input.value.indexOf(item[valueKey]) !== -1,
|
|
145
145
|
label: withCheckRow ? '' : item[labelKey],
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
onChange: function onChange() {
|
|
147
|
+
return handleChange(item[valueKey]);
|
|
148
|
+
},
|
|
148
149
|
customRowLabel: CustomRowLabel,
|
|
149
150
|
classes: {
|
|
150
151
|
root: !withCheckRow && classes.customRowRoot,
|
|
@@ -60,7 +60,6 @@ Checked.defaultProps = {
|
|
|
60
60
|
|
|
61
61
|
var UTCheckbox = function UTCheckbox(_ref) {
|
|
62
62
|
var value = _ref.value,
|
|
63
|
-
checked = _ref.checked,
|
|
64
63
|
disabled = _ref.disabled,
|
|
65
64
|
item = _ref.item,
|
|
66
65
|
CustomRowLabel = _ref.customRowLabel,
|
|
@@ -86,7 +85,7 @@ var UTCheckbox = function UTCheckbox(_ref) {
|
|
|
86
85
|
input = _ref.input,
|
|
87
86
|
onChange = _ref.onChange;
|
|
88
87
|
|
|
89
|
-
var _useMutableState = (0, _energyHooks.useMutableState)(
|
|
88
|
+
var _useMutableState = (0, _energyHooks.useMutableState)(value),
|
|
90
89
|
_useMutableState2 = _slicedToArray(_useMutableState, 2),
|
|
91
90
|
checkedRef = _useMutableState2[0],
|
|
92
91
|
setChecked = _useMutableState2[1];
|
|
@@ -141,7 +140,6 @@ UTCheckbox.propTypes = {
|
|
|
141
140
|
value: _propTypes.string,
|
|
142
141
|
CustomCheckedIcon: _propTypes.node,
|
|
143
142
|
CustomUncheckedIcon: _propTypes.node,
|
|
144
|
-
checked: _propTypes.bool,
|
|
145
143
|
// eslint-disable-next-line react/forbid-prop-types
|
|
146
144
|
item: (0, _propTypes.shape)(_propTypes.any),
|
|
147
145
|
color: _propTypes.string,
|
|
@@ -29,6 +29,8 @@ require("react-perfect-scrollbar/dist/css/styles.css");
|
|
|
29
29
|
|
|
30
30
|
var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
|
|
31
31
|
|
|
32
|
+
var _classesUtils = require("../../utils/classesUtils");
|
|
33
|
+
|
|
32
34
|
var _UTLabel = _interopRequireDefault(require("../UTLabel"));
|
|
33
35
|
|
|
34
36
|
var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
@@ -78,7 +80,8 @@ var UTMenu = function UTMenu(_ref) {
|
|
|
78
80
|
menuListProps = _ref.menuListProps,
|
|
79
81
|
elevation = _ref.elevation,
|
|
80
82
|
menuPlacement = _ref.menuPlacement,
|
|
81
|
-
|
|
83
|
+
themeClasses = _ref.classes,
|
|
84
|
+
classNames = _ref.classNames,
|
|
82
85
|
withArrow = _ref.withArrow,
|
|
83
86
|
onClickItem = _ref.onClickItem,
|
|
84
87
|
lockScreenEnabled = _ref.lockScreenEnabled,
|
|
@@ -86,8 +89,12 @@ var UTMenu = function UTMenu(_ref) {
|
|
|
86
89
|
itemIconProps = _ref.itemIconProps,
|
|
87
90
|
iconBefore = _ref.iconBefore,
|
|
88
91
|
animation = _ref.animation,
|
|
89
|
-
withMenuItem = _ref.withMenuItem
|
|
92
|
+
withMenuItem = _ref.withMenuItem,
|
|
93
|
+
withDivider = _ref.withDivider;
|
|
90
94
|
var blockerRef = (0, _react.useRef)(null);
|
|
95
|
+
var classes = (0, _react.useMemo)(function () {
|
|
96
|
+
return (0, _classesUtils.mergeClasses)(themeClasses, classNames);
|
|
97
|
+
}, [classNames]);
|
|
91
98
|
(0, _react.useEffect)(function () {
|
|
92
99
|
if (lockScreenEnabled && anchor) (0, _utils.lockScreen)(blockerRef, true);
|
|
93
100
|
return function () {
|
|
@@ -125,6 +132,7 @@ var UTMenu = function UTMenu(_ref) {
|
|
|
125
132
|
}, 350);
|
|
126
133
|
};
|
|
127
134
|
|
|
135
|
+
var lastItem = items.length - 1;
|
|
128
136
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_Popper.default, _extends({
|
|
129
137
|
anchorEl: anchor,
|
|
130
138
|
open: open,
|
|
@@ -146,19 +154,16 @@ var UTMenu = function UTMenu(_ref) {
|
|
|
146
154
|
ref: setArrowRef
|
|
147
155
|
}, arrowProps)), /*#__PURE__*/_react.default.createElement(_Paper.default, _extends({
|
|
148
156
|
elevation: elevation,
|
|
149
|
-
|
|
150
|
-
paper: classes.paper
|
|
151
|
-
}
|
|
157
|
+
className: classes.paper
|
|
152
158
|
}, paperProps), /*#__PURE__*/_react.default.createElement(_ClickAwayListener.default, _extends({
|
|
153
159
|
onClickAway: onClose
|
|
154
160
|
}, clickAwayListenerProps), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_MenuList.default, _extends({
|
|
155
161
|
autoFocusItem: open,
|
|
156
|
-
|
|
157
|
-
root: classes.menuList
|
|
158
|
-
}
|
|
162
|
+
className: classes.menuList
|
|
159
163
|
}, menuListProps), /*#__PURE__*/_react.default.createElement(_reactPerfectScrollbar.default, _extends({
|
|
160
|
-
onSync: handleScrollbarSync
|
|
161
|
-
|
|
164
|
+
onSync: handleScrollbarSync,
|
|
165
|
+
className: classes.scrollBar
|
|
166
|
+
}, scrollBarProps), items === null || items === void 0 ? void 0 : items.map(function (item, index) {
|
|
162
167
|
var handleClick = function handleClick(event) {
|
|
163
168
|
if (item.onClick) item.onClick(event, contextData);else if (onClickItem) onClickItem(event, contextData);
|
|
164
169
|
if (contextData.clickCallback) contextData.clickCallback();
|
|
@@ -166,13 +171,25 @@ var UTMenu = function UTMenu(_ref) {
|
|
|
166
171
|
|
|
167
172
|
return ItemComponent ? withMenuItem ? /*#__PURE__*/_react.default.createElement(_MenuItem.default, _extends({
|
|
168
173
|
key: item.key,
|
|
169
|
-
onClick: handleClick
|
|
170
|
-
|
|
174
|
+
onClick: handleClick,
|
|
175
|
+
className: "".concat(classes.menuItemContainer, " ").concat(item.menuItemClassName),
|
|
176
|
+
divider: withDivider && index < lastItem
|
|
177
|
+
}, menuItemProps), /*#__PURE__*/_react.default.createElement(ItemComponent, _extends({
|
|
178
|
+
className: classes.menuItem
|
|
179
|
+
}, itemProps, item))) : /*#__PURE__*/_react.default.createElement(ItemComponent, _extends({
|
|
180
|
+
className: classes.menuItem
|
|
181
|
+
}, itemProps, item)) : /*#__PURE__*/_react.default.createElement(_MenuItem.default, _extends({
|
|
171
182
|
key: item.key,
|
|
172
|
-
onClick: handleClick
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
},
|
|
183
|
+
onClick: handleClick,
|
|
184
|
+
className: "".concat(classes.menuItemContainer, " ").concat(item.menuItemClassName),
|
|
185
|
+
divider: withDivider && index < lastItem
|
|
186
|
+
}, menuItemProps), iconBefore && item.Icon && /*#__PURE__*/_react.default.createElement(item.Icon, _extends({
|
|
187
|
+
className: classes.menuItemIcon
|
|
188
|
+
}, itemIconProps)), /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
189
|
+
className: classes.menuItem
|
|
190
|
+
}, itemProps), item.label), !iconBefore && item.Icon && /*#__PURE__*/_react.default.createElement(item.Icon, _extends({
|
|
191
|
+
className: classes.menuItemIcon
|
|
192
|
+
}, itemIconProps)));
|
|
176
193
|
}))), LastItem && /*#__PURE__*/_react.default.createElement(LastItem, null))))));
|
|
177
194
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
178
195
|
ref: blockerRef,
|
|
@@ -219,15 +236,18 @@ UTMenu.propTypes = {
|
|
|
219
236
|
elevation: _propTypes.number,
|
|
220
237
|
menuPlacement: _propTypes.string,
|
|
221
238
|
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
239
|
+
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
240
|
+
themeClasses: (0, _propTypes.objectOf)(_propTypes.string),
|
|
222
241
|
withArrow: _propTypes.bool,
|
|
223
242
|
lockScreenEnabled: _propTypes.bool,
|
|
224
243
|
modifiers: (0, _propTypes.objectOf)(_propTypes.string),
|
|
225
244
|
onClickItem: _propTypes.func,
|
|
226
245
|
iconBefore: _propTypes.bool,
|
|
227
246
|
withMenuItem: _propTypes.bool,
|
|
228
|
-
animation: _propTypes.string
|
|
247
|
+
animation: _propTypes.string,
|
|
248
|
+
withDivider: _propTypes.bool
|
|
229
249
|
};
|
|
230
250
|
|
|
231
|
-
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTMenu);
|
|
251
|
+
var _default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.retrieveMuiTheme)(UTMenu);
|
|
232
252
|
|
|
233
253
|
exports.default = _default;
|
|
@@ -3,26 +3,65 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.retrieveStyle = void 0;
|
|
6
|
+
exports.retrieveStyle = exports.retrieveMuiTheme = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _styles = require("@material-ui/core/styles");
|
|
9
9
|
|
|
10
10
|
var retrieveStyle = function retrieveStyle(theme) {
|
|
11
|
+
var _theme$UTMenu, _theme$UTMenu$paper, _theme$UTMenu2, _theme$UTMenu2$paper, _theme$UTMenu3, _theme$UTMenu3$menuLi, _theme$UTMenu4, _theme$UTMenu4$menuLi, _theme$UTMenu5, _theme$UTMenu5$menuLi, _theme$UTMenu6, _theme$UTMenu6$menuLi, _theme$UTMenu7, _theme$UTMenu7$menuIt, _theme$UTMenu8, _theme$UTMenu8$menuIt, _theme$UTMenu9, _theme$UTMenu9$menuIt, _theme$UTMenu10, _theme$UTMenu10$poppe, _theme$UTMenu11, _theme$UTMenu11$menuI, _theme$UTMenu12, _theme$UTMenu12$menuI, _theme$UTMenu13, _theme$UTMenu13$menuI, _theme$UTMenu14, _theme$UTMenu14$menuI, _theme$UTMenu15, _theme$UTMenu15$menuI, _theme$UTMenu16, _theme$UTMenu16$menuI, _theme$UTMenu17, _theme$UTMenu17$menuI, _theme$UTMenu18, _theme$UTMenu18$scrol;
|
|
12
|
+
|
|
11
13
|
return {
|
|
12
14
|
paper: {
|
|
13
|
-
padding:
|
|
15
|
+
padding: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu = theme.UTMenu) === null || _theme$UTMenu === void 0 ? void 0 : (_theme$UTMenu$paper = _theme$UTMenu.paper) === null || _theme$UTMenu$paper === void 0 ? void 0 : _theme$UTMenu$paper.padding,
|
|
16
|
+
borderRadius: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu2 = theme.UTMenu) === null || _theme$UTMenu2 === void 0 ? void 0 : (_theme$UTMenu2$paper = _theme$UTMenu2.paper) === null || _theme$UTMenu2$paper === void 0 ? void 0 : _theme$UTMenu2$paper.borderRadius
|
|
14
17
|
},
|
|
15
18
|
menuList: {
|
|
16
|
-
borderRadius:
|
|
17
|
-
padding:
|
|
19
|
+
borderRadius: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu3 = theme.UTMenu) === null || _theme$UTMenu3 === void 0 ? void 0 : (_theme$UTMenu3$menuLi = _theme$UTMenu3.menuList) === null || _theme$UTMenu3$menuLi === void 0 ? void 0 : _theme$UTMenu3$menuLi.borderRadius,
|
|
20
|
+
padding: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu4 = theme.UTMenu) === null || _theme$UTMenu4 === void 0 ? void 0 : (_theme$UTMenu4$menuLi = _theme$UTMenu4.menuList) === null || _theme$UTMenu4$menuLi === void 0 ? void 0 : _theme$UTMenu4$menuLi.padding,
|
|
21
|
+
outline: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu5 = theme.UTMenu) === null || _theme$UTMenu5 === void 0 ? void 0 : (_theme$UTMenu5$menuLi = _theme$UTMenu5.menuList) === null || _theme$UTMenu5$menuLi === void 0 ? void 0 : _theme$UTMenu5$menuLi.outline,
|
|
22
|
+
width: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu6 = theme.UTMenu) === null || _theme$UTMenu6 === void 0 ? void 0 : (_theme$UTMenu6$menuLi = _theme$UTMenu6.menuList) === null || _theme$UTMenu6$menuLi === void 0 ? void 0 : _theme$UTMenu6$menuLi.width
|
|
18
23
|
},
|
|
19
24
|
menuItem: {
|
|
20
|
-
fontSize:
|
|
25
|
+
fontSize: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu7 = theme.UTMenu) === null || _theme$UTMenu7 === void 0 ? void 0 : (_theme$UTMenu7$menuIt = _theme$UTMenu7.menuItem) === null || _theme$UTMenu7$menuIt === void 0 ? void 0 : _theme$UTMenu7$menuIt.fontSize,
|
|
26
|
+
color: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu8 = theme.UTMenu) === null || _theme$UTMenu8 === void 0 ? void 0 : (_theme$UTMenu8$menuIt = _theme$UTMenu8.menuItem) === null || _theme$UTMenu8$menuIt === void 0 ? void 0 : _theme$UTMenu8$menuIt.color,
|
|
27
|
+
backgroundColor: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu9 = theme.UTMenu) === null || _theme$UTMenu9 === void 0 ? void 0 : (_theme$UTMenu9$menuIt = _theme$UTMenu9.menuItem) === null || _theme$UTMenu9$menuIt === void 0 ? void 0 : _theme$UTMenu9$menuIt.backgroundColor
|
|
21
28
|
},
|
|
22
29
|
popper: {
|
|
23
|
-
zIndex: 9999
|
|
30
|
+
zIndex: 9999,
|
|
31
|
+
margin: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu10 = theme.UTMenu) === null || _theme$UTMenu10 === void 0 ? void 0 : (_theme$UTMenu10$poppe = _theme$UTMenu10.popper) === null || _theme$UTMenu10$poppe === void 0 ? void 0 : _theme$UTMenu10$poppe.margin
|
|
32
|
+
},
|
|
33
|
+
menuItemIcon: {
|
|
34
|
+
height: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu11 = theme.UTMenu) === null || _theme$UTMenu11 === void 0 ? void 0 : (_theme$UTMenu11$menuI = _theme$UTMenu11.menuItemIcon) === null || _theme$UTMenu11$menuI === void 0 ? void 0 : _theme$UTMenu11$menuI.height,
|
|
35
|
+
color: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu12 = theme.UTMenu) === null || _theme$UTMenu12 === void 0 ? void 0 : (_theme$UTMenu12$menuI = _theme$UTMenu12.menuItemIcon) === null || _theme$UTMenu12$menuI === void 0 ? void 0 : _theme$UTMenu12$menuI.color,
|
|
36
|
+
fontSize: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu13 = theme.UTMenu) === null || _theme$UTMenu13 === void 0 ? void 0 : (_theme$UTMenu13$menuI = _theme$UTMenu13.menuItemIcon) === null || _theme$UTMenu13$menuI === void 0 ? void 0 : _theme$UTMenu13$menuI.fontSize,
|
|
37
|
+
margin: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu14 = theme.UTMenu) === null || _theme$UTMenu14 === void 0 ? void 0 : (_theme$UTMenu14$menuI = _theme$UTMenu14.menuItemIcon) === null || _theme$UTMenu14$menuI === void 0 ? void 0 : _theme$UTMenu14$menuI.margin,
|
|
38
|
+
width: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu15 = theme.UTMenu) === null || _theme$UTMenu15 === void 0 ? void 0 : (_theme$UTMenu15$menuI = _theme$UTMenu15.menuItemIcon) === null || _theme$UTMenu15$menuI === void 0 ? void 0 : _theme$UTMenu15$menuI.width
|
|
39
|
+
},
|
|
40
|
+
menuItemContainer: {
|
|
41
|
+
padding: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu16 = theme.UTMenu) === null || _theme$UTMenu16 === void 0 ? void 0 : (_theme$UTMenu16$menuI = _theme$UTMenu16.menuItemContainer) === null || _theme$UTMenu16$menuI === void 0 ? void 0 : _theme$UTMenu16$menuI.padding,
|
|
42
|
+
position: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu17 = theme.UTMenu) === null || _theme$UTMenu17 === void 0 ? void 0 : (_theme$UTMenu17$menuI = _theme$UTMenu17.menuItemContainer) === null || _theme$UTMenu17$menuI === void 0 ? void 0 : _theme$UTMenu17$menuI.position
|
|
43
|
+
},
|
|
44
|
+
scrollBar: {
|
|
45
|
+
maxHeight: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu18 = theme.UTMenu) === null || _theme$UTMenu18 === void 0 ? void 0 : (_theme$UTMenu18$scrol = _theme$UTMenu18.scrollBar) === null || _theme$UTMenu18$scrol === void 0 ? void 0 : _theme$UTMenu18$scrol.maxHeight
|
|
24
46
|
}
|
|
25
47
|
};
|
|
26
48
|
};
|
|
27
49
|
|
|
28
|
-
exports.retrieveStyle = retrieveStyle;
|
|
50
|
+
exports.retrieveStyle = retrieveStyle;
|
|
51
|
+
|
|
52
|
+
var retrieveMuiTheme = function retrieveMuiTheme(theme) {
|
|
53
|
+
var _theme$UTMenu19, _theme$UTMenu19$divid, _theme$UTMenu20, _theme$UTMenu20$divid;
|
|
54
|
+
|
|
55
|
+
return (0, _styles.createMuiTheme)({
|
|
56
|
+
overrides: {
|
|
57
|
+
MuiListItem: {
|
|
58
|
+
divider: {
|
|
59
|
+
borderBottomColor: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu19 = theme.UTMenu) === null || _theme$UTMenu19 === void 0 ? void 0 : (_theme$UTMenu19$divid = _theme$UTMenu19.divider) === null || _theme$UTMenu19$divid === void 0 ? void 0 : _theme$UTMenu19$divid.color,
|
|
60
|
+
borderBottomWidth: theme === null || theme === void 0 ? void 0 : (_theme$UTMenu20 = theme.UTMenu) === null || _theme$UTMenu20 === void 0 ? void 0 : (_theme$UTMenu20$divid = _theme$UTMenu20.divider) === null || _theme$UTMenu20$divid === void 0 ? void 0 : _theme$UTMenu20$divid.width
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
exports.retrieveMuiTheme = retrieveMuiTheme;
|
|
@@ -60,9 +60,6 @@ var ActionIcons = function ActionIcons(_ref) {
|
|
|
60
60
|
iconClassName = _ref2.iconClassName,
|
|
61
61
|
disabledIconClassName = _ref2.disabledIconClassName,
|
|
62
62
|
loadingClassName = _ref2.loadingClassName,
|
|
63
|
-
userMenuItemClassName = _ref2.userMenuItemClassName,
|
|
64
|
-
userMenuItemIconClassName = _ref2.userMenuItemIconClassName,
|
|
65
|
-
userMenuItemContainer = _ref2.userMenuItemContainer,
|
|
66
63
|
_ref2$isVisible = _ref2.isVisible,
|
|
67
64
|
isVisible = _ref2$isVisible === void 0 ? function () {
|
|
68
65
|
return true;
|
|
@@ -78,7 +75,8 @@ var ActionIcons = function ActionIcons(_ref) {
|
|
|
78
75
|
return false;
|
|
79
76
|
} : _ref2$isLoading,
|
|
80
77
|
_ref2$menuItems = _ref2.menuItems,
|
|
81
|
-
menuItems = _ref2$menuItems === void 0 ? [] : _ref2$menuItems
|
|
78
|
+
menuItems = _ref2$menuItems === void 0 ? [] : _ref2$menuItems,
|
|
79
|
+
withMenuDivider = _ref2.withMenuDivider;
|
|
82
80
|
|
|
83
81
|
var _useState = (0, _react.useState)(),
|
|
84
82
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -145,15 +143,7 @@ var ActionIcons = function ActionIcons(_ref) {
|
|
|
145
143
|
items: visibleMenuItems,
|
|
146
144
|
iconBefore: true,
|
|
147
145
|
withMenuItem: true,
|
|
148
|
-
|
|
149
|
-
className: userMenuItemIconClassName
|
|
150
|
-
},
|
|
151
|
-
itemProps: {
|
|
152
|
-
className: userMenuItemClassName
|
|
153
|
-
},
|
|
154
|
-
menuItemProps: {
|
|
155
|
-
className: userMenuItemContainer
|
|
156
|
-
}
|
|
146
|
+
withDivider: withMenuDivider
|
|
157
147
|
})));
|
|
158
148
|
});
|
|
159
149
|
};
|
|
@@ -165,7 +155,8 @@ ActionIcons.propTypes = {
|
|
|
165
155
|
rowData: (0, _propTypes.shape)(_propTypes.any),
|
|
166
156
|
// eslint-disable-next-line react/forbid-prop-types
|
|
167
157
|
tooltipProps: (0, _propTypes.shape)(_propTypes.any),
|
|
168
|
-
isVisible: _propTypes.func
|
|
158
|
+
isVisible: _propTypes.func,
|
|
159
|
+
withMenuDivider: _propTypes.bool
|
|
169
160
|
};
|
|
170
161
|
|
|
171
162
|
var _default = /*#__PURE__*/(0, _react.memo)(ActionIcons);
|