@widergy/energy-ui 1.133.1 → 1.133.2
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.133.2](https://github.com/widergy/energy-ui/compare/v1.133.1...v1.133.2) (2022-12-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fixes ([#331](https://github.com/widergy/energy-ui/issues/331)) ([df5140d](https://github.com/widergy/energy-ui/commit/df5140d0057df3a7267cf0aca5166f720f32f37b))
|
|
7
|
+
|
|
1
8
|
## [1.133.1](https://github.com/widergy/energy-ui/compare/v1.133.0...v1.133.1) (2022-12-01)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -17,10 +17,11 @@ var _form = require("@widergy/web-utils/lib/form");
|
|
|
17
17
|
var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
18
18
|
var _UTTooltip = _interopRequireDefault(require("../UTTooltip"));
|
|
19
19
|
var _formTypes = require("../../types/formTypes");
|
|
20
|
+
var _UTLabel = _interopRequireDefault(require("../UTLabel"));
|
|
20
21
|
var _constants = require("./constants");
|
|
21
22
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
22
23
|
var _theme = require("./theme");
|
|
23
|
-
var _excluded = ["
|
|
24
|
+
var _excluded = ["adornmentInside", "autofocus", "bigInput", "captionLabel", "classes", "containerClassName", "disabled", "field", "id", "input", "inputClassName", "inputObjectKey", "label", "labelRootClassName", "meta", "onChangeText", "PasswordInvisibleIcon", "PasswordVisibleIcon", "placeholder", "preventEnterSubmit", "tippyProps", "tooltip", "type", "variant"],
|
|
24
25
|
_excluded2 = ["base", "selectedOptionsIds", "retrieveStyle", "retrieveMuiTheme", "Component", "muiTheme"];
|
|
25
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
27
|
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); }
|
|
@@ -70,30 +71,30 @@ var UTTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
70
71
|
key: "render",
|
|
71
72
|
value: function render() {
|
|
72
73
|
var _this$props = this.props,
|
|
74
|
+
adornmentInside = _this$props.adornmentInside,
|
|
75
|
+
autofocus = _this$props.autofocus,
|
|
76
|
+
bigInput = _this$props.bigInput,
|
|
77
|
+
captionLabel = _this$props.captionLabel,
|
|
73
78
|
classes = _this$props.classes,
|
|
74
|
-
|
|
75
|
-
placeholder = _this$props.placeholder,
|
|
76
|
-
label = _this$props.label,
|
|
77
|
-
meta = _this$props.meta,
|
|
79
|
+
containerClassName = _this$props.containerClassName,
|
|
78
80
|
disabled = _this$props.disabled,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
field = _this$props.field,
|
|
82
|
+
id = _this$props.id,
|
|
83
|
+
input = _this$props.input,
|
|
81
84
|
inputClassName = _this$props.inputClassName,
|
|
85
|
+
inputObjectKey = _this$props.inputObjectKey,
|
|
86
|
+
label = _this$props.label,
|
|
82
87
|
labelRootClassName = _this$props.labelRootClassName,
|
|
83
|
-
|
|
84
|
-
tooltip = _this$props.tooltip,
|
|
85
|
-
preventEnterSubmit = _this$props.preventEnterSubmit,
|
|
86
|
-
id = _this$props.id,
|
|
87
|
-
autofocus = _this$props.autofocus,
|
|
88
|
+
meta = _this$props.meta,
|
|
88
89
|
onChangeText = _this$props.onChangeText,
|
|
89
|
-
|
|
90
|
+
PasswordInvisibleIcon = _this$props.PasswordInvisibleIcon,
|
|
91
|
+
PasswordVisibleIcon = _this$props.PasswordVisibleIcon,
|
|
92
|
+
placeholder = _this$props.placeholder,
|
|
93
|
+
preventEnterSubmit = _this$props.preventEnterSubmit,
|
|
90
94
|
tippyProps = _this$props.tippyProps,
|
|
95
|
+
tooltip = _this$props.tooltip,
|
|
96
|
+
type = _this$props.type,
|
|
91
97
|
variant = _this$props.variant,
|
|
92
|
-
PasswordVisibleIcon = _this$props.PasswordVisibleIcon,
|
|
93
|
-
PasswordInvisibleIcon = _this$props.PasswordInvisibleIcon,
|
|
94
|
-
adornmentInside = _this$props.adornmentInside,
|
|
95
|
-
captionLabel = _this$props.captionLabel,
|
|
96
|
-
inputObjectKey = _this$props.inputObjectKey,
|
|
97
98
|
others = _objectWithoutProperties(_this$props, _excluded);
|
|
98
99
|
var handleChange = function handleChange(event) {
|
|
99
100
|
return input.onChange(onChangeText(event.target.value));
|
|
@@ -129,7 +130,9 @@ var UTTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
129
130
|
}), /*#__PURE__*/_react.default.createElement("div", null, label)) : label,
|
|
130
131
|
onKeyPress: preventEnterSubmit ? preventDefault : undefined,
|
|
131
132
|
error: (0, _form.shouldShowErrors)(meta),
|
|
132
|
-
helperText:
|
|
133
|
+
helperText: /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
134
|
+
className: _stylesModule.default.error
|
|
135
|
+
}, (0, _form.shouldShowErrors)(meta) && meta.error || captionLabel || ''),
|
|
133
136
|
disabled: disabled,
|
|
134
137
|
onChange: handleChange,
|
|
135
138
|
value: value,
|
|
@@ -170,42 +173,42 @@ var UTTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
170
173
|
return UTTextInput;
|
|
171
174
|
}(_react.PureComponent);
|
|
172
175
|
UTTextInput.propTypes = {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
containerClassName: _propTypes.string,
|
|
176
|
-
input: _formTypes.inputPropTypes.isRequired,
|
|
177
|
-
meta: _formTypes.metaPropTypes,
|
|
178
|
-
disabled: _propTypes.bool,
|
|
179
|
-
tooltip: _propTypes.string,
|
|
176
|
+
adornmentInside: _propTypes.bool,
|
|
177
|
+
autofocus: _propTypes.bool,
|
|
180
178
|
bigInput: _propTypes.bool,
|
|
181
|
-
|
|
182
|
-
inputClassName: _propTypes.string,
|
|
183
|
-
label: _propTypes.string,
|
|
179
|
+
captionLabel: _propTypes.string,
|
|
184
180
|
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
181
|
+
containerClassName: _propTypes.string,
|
|
182
|
+
disabled: _propTypes.bool,
|
|
185
183
|
field: _propTypes.object,
|
|
186
|
-
preventEnterSubmit: _propTypes.bool,
|
|
187
184
|
id: _propTypes.string,
|
|
188
|
-
|
|
185
|
+
input: _formTypes.inputPropTypes.isRequired,
|
|
186
|
+
inputClassName: _propTypes.string,
|
|
187
|
+
inputObjectKey: _propTypes.string,
|
|
188
|
+
label: _propTypes.string,
|
|
189
|
+
labelRootClassName: _propTypes.string,
|
|
190
|
+
meta: _formTypes.metaPropTypes,
|
|
189
191
|
onChangeText: _propTypes.func,
|
|
190
|
-
tippyProps: _propTypes.object,
|
|
191
|
-
variant: _propTypes.string,
|
|
192
|
-
PasswordVisibleIcon: _propTypes.elementType,
|
|
193
192
|
PasswordInvisibleIcon: _propTypes.elementType,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
193
|
+
PasswordVisibleIcon: _propTypes.elementType,
|
|
194
|
+
placeholder: _propTypes.string,
|
|
195
|
+
preventEnterSubmit: _propTypes.bool,
|
|
196
|
+
tippyProps: _propTypes.object,
|
|
197
|
+
tooltip: _propTypes.string,
|
|
198
|
+
type: _propTypes.string,
|
|
199
|
+
variant: _propTypes.string
|
|
197
200
|
};
|
|
198
201
|
UTTextInput.defaultProps = {
|
|
202
|
+
adornmentInside: false,
|
|
203
|
+
autofocus: false,
|
|
199
204
|
classes: {},
|
|
200
205
|
meta: {},
|
|
201
|
-
preventEnterSubmit: false,
|
|
202
|
-
autofocus: false,
|
|
203
206
|
onChangeText: function onChangeText(val) {
|
|
204
207
|
return val;
|
|
205
208
|
},
|
|
206
|
-
PasswordVisibleIcon: _Visibility.default,
|
|
207
209
|
PasswordInvisibleIcon: _VisibilityOff.default,
|
|
208
|
-
|
|
210
|
+
PasswordVisibleIcon: _Visibility.default,
|
|
211
|
+
preventEnterSubmit: false
|
|
209
212
|
};
|
|
210
213
|
var _default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.retrieveMuiTheme)(UTTextInput);
|
|
211
214
|
exports.default = _default;
|