@widergy/energy-ui 1.131.0 → 1.131.1
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
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.131.1](https://github.com/widergy/energy-ui/compare/v1.131.0...v1.131.1) (2022-09-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* adding tooltip to UTChecklist Checkbox render ([#311](https://github.com/widergy/energy-ui/issues/311)) ([7a52d03](https://github.com/widergy/energy-ui/commit/7a52d03cc3ff4a734aa9f538601a5377413e3acb))
|
|
7
|
+
|
|
1
8
|
# [1.131.0](https://github.com/widergy/energy-ui/compare/v1.130.3...v1.131.0) (2022-09-15)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -56,31 +56,32 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
56
56
|
var UTCheckList = function UTCheckList(_ref) {
|
|
57
57
|
var _field$configuration;
|
|
58
58
|
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
list = _ref.list,
|
|
64
|
-
className = _ref.className,
|
|
65
|
-
shouldShowErrors = _ref.shouldShowErrors,
|
|
66
|
-
meta = _ref.meta,
|
|
67
|
-
disabled = _ref.disabled,
|
|
59
|
+
var additionalInfo = _ref.additionalInfo,
|
|
60
|
+
allChecked = _ref.allChecked,
|
|
61
|
+
CustomCheckedIcon = _ref.CustomCheckedIcon,
|
|
62
|
+
CustomUncheckedIcon = _ref.CustomUncheckedIcon,
|
|
68
63
|
CustomRowLabel = _ref.customRowLabel,
|
|
69
64
|
CustomSelectAllRowLabel = _ref.customSelectAllRowLabel,
|
|
70
65
|
_ref$classes = _ref.classes,
|
|
71
66
|
themeClasses = _ref$classes === void 0 ? {} : _ref$classes,
|
|
67
|
+
className = _ref.className,
|
|
72
68
|
classNames = _ref.classNames,
|
|
69
|
+
disabled = _ref.disabled,
|
|
70
|
+
disabledItemTooltip = _ref.disabledItemTooltip,
|
|
71
|
+
field = _ref.field,
|
|
72
|
+
getSelectAllNewValues = _ref.getSelectAllNewValues,
|
|
73
73
|
header = _ref.header,
|
|
74
74
|
headerLabel = _ref.headerLabel,
|
|
75
|
-
|
|
75
|
+
input = _ref.input,
|
|
76
|
+
labelKey = _ref.labelKey,
|
|
77
|
+
list = _ref.list,
|
|
78
|
+
meta = _ref.meta,
|
|
79
|
+
shouldShowErrors = _ref.shouldShowErrors,
|
|
80
|
+
titleProps = _ref.titleProps,
|
|
76
81
|
useCustomIcons = _ref.useCustomIcons,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
CustomUncheckedIcon = _ref.CustomUncheckedIcon,
|
|
81
|
-
field = _ref.field,
|
|
82
|
-
withUpperTitle = _ref.withUpperTitle,
|
|
83
|
-
titleProps = _ref.titleProps;
|
|
82
|
+
valueKey = _ref.valueKey,
|
|
83
|
+
withCheckRow = _ref.withCheckRow,
|
|
84
|
+
withUpperTitle = _ref.withUpperTitle;
|
|
84
85
|
var shouldShowUpperTitle = (field === null || field === void 0 ? void 0 : (_field$configuration = field.configuration) === null || _field$configuration === void 0 ? void 0 : _field$configuration.ignore_title) && withUpperTitle;
|
|
85
86
|
|
|
86
87
|
var handleChange = function handleChange(id) {
|
|
@@ -168,7 +169,8 @@ var UTCheckList = function UTCheckList(_ref) {
|
|
|
168
169
|
},
|
|
169
170
|
useCustomIcons: useCustomIcons,
|
|
170
171
|
CustomCheckedIcon: CustomCheckedIcon,
|
|
171
|
-
CustomUncheckedIcon: CustomUncheckedIcon
|
|
172
|
+
CustomUncheckedIcon: CustomUncheckedIcon,
|
|
173
|
+
tooltipContent: item.disabled && disabledItemTooltip && disabledItemTooltip(item, list)
|
|
172
174
|
}));
|
|
173
175
|
})), additionalInfo && additionalInfo.footer && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, null, additionalInfo.footer), shouldShowErrors && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, {
|
|
174
176
|
error: true
|
|
@@ -192,6 +194,7 @@ UTCheckList.propTypes = {
|
|
|
192
194
|
customSelectAllRowLabel: _propTypes.element,
|
|
193
195
|
CustomUncheckedIcon: _propTypes.element,
|
|
194
196
|
disabled: _propTypes.bool,
|
|
197
|
+
disabledItemTooltip: _propTypes.func,
|
|
195
198
|
field: _formTypes.fieldType,
|
|
196
199
|
getSelectAllNewValues: _propTypes.func,
|
|
197
200
|
header: (0, _propTypes.shape)({
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.tippyProps = void 0;
|
|
7
|
+
var tippyProps = {
|
|
8
|
+
appendTo: function appendTo() {
|
|
9
|
+
return document.body;
|
|
10
|
+
},
|
|
11
|
+
interactive: false,
|
|
12
|
+
maxWidth: 'none'
|
|
13
|
+
};
|
|
14
|
+
exports.tippyProps = tippyProps;
|
|
@@ -19,6 +19,8 @@ var _form = require("@widergy/web-utils/lib/form");
|
|
|
19
19
|
|
|
20
20
|
var _energyHooks = require("@widergy/energy-hooks");
|
|
21
21
|
|
|
22
|
+
var _UTTooltip = _interopRequireDefault(require("../UTTooltip"));
|
|
23
|
+
|
|
22
24
|
var _formTypes = require("../../types/formTypes");
|
|
23
25
|
|
|
24
26
|
var _UTLabel = _interopRequireDefault(require("../UTLabel"));
|
|
@@ -29,6 +31,10 @@ var _classesUtils = require("../../utils/classesUtils");
|
|
|
29
31
|
|
|
30
32
|
var _theme = require("./theme");
|
|
31
33
|
|
|
34
|
+
var _constants = require("./constants");
|
|
35
|
+
|
|
36
|
+
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
37
|
+
|
|
32
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
39
|
|
|
34
40
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -83,6 +89,7 @@ var UTCheckbox = function UTCheckbox(_ref) {
|
|
|
83
89
|
disableRipple = _ref.disableRipple,
|
|
84
90
|
label = _ref.label,
|
|
85
91
|
input = _ref.input,
|
|
92
|
+
tooltipContent = _ref.tooltipContent,
|
|
86
93
|
onChange = _ref.onChange;
|
|
87
94
|
|
|
88
95
|
var _useMutableState = (0, _energyHooks.useMutableState)(value),
|
|
@@ -101,7 +108,11 @@ var UTCheckbox = function UTCheckbox(_ref) {
|
|
|
101
108
|
var classes = (0, _classesUtils.mergeClasses)(themeClasses, classNames);
|
|
102
109
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_FormControlLabel.default, {
|
|
103
110
|
disabled: disabled,
|
|
104
|
-
control: /*#__PURE__*/_react.default.createElement(
|
|
111
|
+
control: /*#__PURE__*/_react.default.createElement(_UTTooltip.default, {
|
|
112
|
+
content: tooltipContent,
|
|
113
|
+
stringContentClassName: _stylesModule.default.disableSelectionTooltip,
|
|
114
|
+
tippyProps: _constants.tippyProps
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
|
|
105
116
|
classes: {
|
|
106
117
|
colorPrimary: classes.checkboxColorPrimary,
|
|
107
118
|
colorSecondary: classes.checkboxColorSecondary
|
|
@@ -116,8 +127,9 @@ var UTCheckbox = function UTCheckbox(_ref) {
|
|
|
116
127
|
onChange: handleChange,
|
|
117
128
|
value: (input === null || input === void 0 ? void 0 : input.value) || value,
|
|
118
129
|
color: color,
|
|
119
|
-
disableRipple: disableRipple
|
|
120
|
-
|
|
130
|
+
disableRipple: disableRipple,
|
|
131
|
+
disabled: disabled
|
|
132
|
+
}))),
|
|
121
133
|
label: CustomRowLabel ? /*#__PURE__*/_react.default.createElement(CustomRowLabel, {
|
|
122
134
|
item: item
|
|
123
135
|
}) : /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
@@ -152,7 +164,8 @@ UTCheckbox.propTypes = {
|
|
|
152
164
|
meta: _formTypes.metaPropTypes,
|
|
153
165
|
showError: _propTypes.bool,
|
|
154
166
|
input: _formTypes.inputPropTypes,
|
|
155
|
-
disableRipple: _propTypes.bool
|
|
167
|
+
disableRipple: _propTypes.bool,
|
|
168
|
+
tooltipContent: _propTypes.element
|
|
156
169
|
};
|
|
157
170
|
|
|
158
171
|
var _default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.retrieveMuiTheme)(UTCheckbox);
|