@widergy/energy-ui 1.107.0 → 1.107.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.107.1](https://github.com/widergy/energy-ui/compare/v1.107.0...v1.107.1) (2022-01-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added prop in UTDialog ([#257](https://github.com/widergy/energy-ui/issues/257)) ([e692bcf](https://github.com/widergy/energy-ui/commit/e692bcffd62d8203adc0bc4663237ea346ccb2f3))
|
|
7
|
+
|
|
1
8
|
# [1.107.0](https://github.com/widergy/energy-ui/compare/v1.106.4...v1.107.0) (2022-01-11)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -40,27 +40,28 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
40
40
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
41
41
|
|
|
42
42
|
var UTDialog = function UTDialog(_ref) {
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
var acceptButton = _ref.acceptButton,
|
|
44
|
+
alertConfig = _ref.alertConfig,
|
|
45
|
+
ButtonComponent = _ref.ButtonComponent,
|
|
46
46
|
cancelButton = _ref.cancelButton,
|
|
47
|
-
contentName = _ref.contentName,
|
|
48
|
-
acceptButton = _ref.acceptButton,
|
|
49
47
|
children = _ref.children,
|
|
48
|
+
classes = _ref.classes,
|
|
49
|
+
classNames = _ref.classNames,
|
|
50
|
+
contentName = _ref.contentName,
|
|
51
|
+
dialogProps = _ref.dialogProps,
|
|
52
|
+
disableEnforceFocus = _ref.disableEnforceFocus,
|
|
53
|
+
disableScrollLock = _ref.disableScrollLock,
|
|
54
|
+
disableTypography = _ref.disableTypography,
|
|
55
|
+
elevation = _ref.elevation,
|
|
56
|
+
isOpen = _ref.isOpen,
|
|
57
|
+
onRequestClose = _ref.onRequestClose,
|
|
58
|
+
roundedCloseButton = _ref.roundedCloseButton,
|
|
59
|
+
title = _ref.title,
|
|
60
|
+
TransitionProps = _ref.TransitionProps,
|
|
50
61
|
warningAlert = _ref.warningAlert,
|
|
51
62
|
whiteTitle = _ref.whiteTitle,
|
|
52
63
|
withClickAway = _ref.withClickAway,
|
|
53
|
-
|
|
54
|
-
roundedCloseButton = _ref.roundedCloseButton,
|
|
55
|
-
withCloseButton = _ref.withCloseButton,
|
|
56
|
-
alertConfig = _ref.alertConfig,
|
|
57
|
-
disableEnforceFocus = _ref.disableEnforceFocus,
|
|
58
|
-
disableTypography = _ref.disableTypography,
|
|
59
|
-
disableScrollLock = _ref.disableScrollLock,
|
|
60
|
-
classNames = _ref.classNames,
|
|
61
|
-
classes = _ref.classes,
|
|
62
|
-
ButtonComponent = _ref.ButtonComponent,
|
|
63
|
-
TransitionProps = _ref.TransitionProps;
|
|
64
|
+
withCloseButton = _ref.withCloseButton;
|
|
64
65
|
var CloseIcon = roundedCloseButton ? _CloseRounded.default : _Close.default;
|
|
65
66
|
|
|
66
67
|
var _ref2 = classNames || {},
|
|
@@ -73,7 +74,7 @@ var UTDialog = function UTDialog(_ref) {
|
|
|
73
74
|
warning = _ref2.warning,
|
|
74
75
|
dialogActions = _ref2.dialogActions;
|
|
75
76
|
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement(_Dialog.default, {
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_Dialog.default, _extends({
|
|
77
78
|
open: isOpen,
|
|
78
79
|
onClose: withClickAway && onRequestClose,
|
|
79
80
|
"aria-labelledby": "alert-dialog-title",
|
|
@@ -88,7 +89,7 @@ var UTDialog = function UTDialog(_ref) {
|
|
|
88
89
|
disableEnforceFocus: disableEnforceFocus,
|
|
89
90
|
disableScrollLock: disableScrollLock,
|
|
90
91
|
TransitionProps: TransitionProps
|
|
91
|
-
}, title && /*#__PURE__*/_react.default.createElement(_DialogTitle.default, {
|
|
92
|
+
}, dialogProps), title && /*#__PURE__*/_react.default.createElement(_DialogTitle.default, {
|
|
92
93
|
disableTypography: disableTypography,
|
|
93
94
|
className: "".concat(classes.mainTitle, " ").concat(whiteTitle && classes.whiteTitle, " ").concat(mainTitle),
|
|
94
95
|
id: "alert-dialog-title"
|
|
@@ -103,7 +104,7 @@ var UTDialog = function UTDialog(_ref) {
|
|
|
103
104
|
}, children), warningAlert && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({}, alertConfig, {
|
|
104
105
|
className: "".concat(classes.warning, " ").concat(warning)
|
|
105
106
|
}), warningAlert), (cancelButton || acceptButton) && /*#__PURE__*/_react.default.createElement(_DialogActions.default, {
|
|
106
|
-
className: "".concat(classes.dialogActions, "
|
|
107
|
+
className: "".concat(classes.dialogActions, " ").concat(dialogActions)
|
|
107
108
|
}, cancelButton && /*#__PURE__*/_react.default.createElement(_ActionButton.default, {
|
|
108
109
|
ButtonComponent: ButtonComponent,
|
|
109
110
|
button: cancelButton,
|
|
@@ -118,38 +119,39 @@ var UTDialog = function UTDialog(_ref) {
|
|
|
118
119
|
};
|
|
119
120
|
|
|
120
121
|
UTDialog.defaultProps = {
|
|
121
|
-
withClickAway: true,
|
|
122
|
-
roundedCloseButton: false,
|
|
123
|
-
withCloseButton: false,
|
|
124
122
|
disableEnforceFocus: false,
|
|
123
|
+
disableScrollLock: false,
|
|
125
124
|
disableTypography: false,
|
|
126
|
-
|
|
125
|
+
roundedCloseButton: false,
|
|
126
|
+
withClickAway: true,
|
|
127
|
+
withCloseButton: false
|
|
127
128
|
};
|
|
128
129
|
UTDialog.propTypes = {
|
|
129
|
-
isOpen: _propTypes.bool.isRequired,
|
|
130
|
-
onRequestClose: _propTypes.func.isRequired,
|
|
131
|
-
title: _propTypes.string,
|
|
132
|
-
cancelButton: _types.dialogButtonPropTypes,
|
|
133
130
|
acceptButton: _types.dialogButtonPropTypes,
|
|
134
|
-
warningAlert: _propTypes.string,
|
|
135
|
-
whiteTitle: _propTypes.bool,
|
|
136
|
-
withClickAway: _propTypes.bool,
|
|
137
|
-
contentName: _propTypes.string,
|
|
138
|
-
elevation: _propTypes.number,
|
|
139
|
-
roundedCloseButton: _propTypes.bool,
|
|
140
|
-
withCloseButton: _propTypes.bool,
|
|
141
131
|
alertConfig: _propTypes.any,
|
|
142
132
|
// eslint-disable-line react/forbid-prop-types
|
|
133
|
+
ButtonComponent: _propTypes.elementType,
|
|
134
|
+
// eslint-disable-line react/forbid-prop-types
|
|
135
|
+
cancelButton: _types.dialogButtonPropTypes,
|
|
136
|
+
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
137
|
+
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
138
|
+
contentName: _propTypes.string,
|
|
139
|
+
dialogProps: _propTypes.object,
|
|
140
|
+
// eslint-disable-line react/forbid-prop-types
|
|
143
141
|
disableEnforceFocus: _propTypes.bool,
|
|
144
|
-
disableTypography: _propTypes.bool,
|
|
145
142
|
disableScrollLock: _propTypes.bool,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
disableTypography: _propTypes.bool,
|
|
144
|
+
elevation: _propTypes.number,
|
|
145
|
+
isOpen: _propTypes.bool.isRequired,
|
|
146
|
+
onRequestClose: _propTypes.func.isRequired,
|
|
147
|
+
roundedCloseButton: _propTypes.bool,
|
|
148
|
+
title: _propTypes.string,
|
|
149
|
+
TransitionProps: _propTypes.object,
|
|
150
150
|
// eslint-disable-line react/forbid-prop-types
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
warningAlert: _propTypes.string,
|
|
152
|
+
whiteTitle: _propTypes.bool,
|
|
153
|
+
withClickAway: _propTypes.bool,
|
|
154
|
+
withCloseButton: _propTypes.bool
|
|
153
155
|
};
|
|
154
156
|
|
|
155
157
|
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTDialog);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.dialogButtonPropTypes =
|
|
6
|
+
exports.dialogButtonPropTypes = void 0;
|
|
7
7
|
|
|
8
8
|
var _propTypes = require("prop-types");
|
|
9
9
|
|
|
@@ -15,15 +15,4 @@ var dialogButtonPropTypes = (0, _propTypes.oneOfType)([_propTypes.element, (0, _
|
|
|
15
15
|
config: _propTypes.any // eslint-disable-line react/forbid-prop-types
|
|
16
16
|
|
|
17
17
|
})]);
|
|
18
|
-
exports.dialogButtonPropTypes = dialogButtonPropTypes;
|
|
19
|
-
var classesPropTypes = (0, _propTypes.shape)({
|
|
20
|
-
content: _propTypes.string,
|
|
21
|
-
container: _propTypes.string,
|
|
22
|
-
root: _propTypes.string,
|
|
23
|
-
closeButton: _propTypes.string,
|
|
24
|
-
mainTitle: _propTypes.string,
|
|
25
|
-
closeIcon: _propTypes.string,
|
|
26
|
-
warning: _propTypes.string,
|
|
27
|
-
dialogActions: _propTypes.string
|
|
28
|
-
});
|
|
29
|
-
exports.classesPropTypes = classesPropTypes;
|
|
18
|
+
exports.dialogButtonPropTypes = dialogButtonPropTypes;
|