@widergy/energy-ui 3.58.2 → 3.59.0

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
+ # [3.59.0](https://github.com/widergy/energy-ui/compare/v3.58.2...v3.59.0) (2025-02-10)
2
+
3
+
4
+ ### Features
5
+
6
+ * disabled classname added in action icon uttable ([#570](https://github.com/widergy/energy-ui/issues/570)) ([ff19a5c](https://github.com/widergy/energy-ui/commit/ff19a5c3f1fc58bef0db6cdb838d76b1bed6af05))
7
+
1
8
  ## [3.58.2](https://github.com/widergy/energy-ui/compare/v3.58.1...v3.58.2) (2025-02-10)
2
9
 
3
10
 
@@ -31,13 +31,14 @@ const UTGoogleAutocomplete = _ref => {
31
31
  inputProps,
32
32
  minChar = 3,
33
33
  noResultsLabel = 'No se encuentran resultados. Ingresa una dirección valida.',
34
+ onChange,
34
35
  predictionsErrorLabel = 'Hubo un error al intentar recuperar la dirección ingresada',
35
36
  retrieveError = () => {},
36
37
  searchRestrictions = {},
37
- setSelectedPlace = () => {}
38
+ setSelectedPlace = () => {},
39
+ value
38
40
  } = _ref;
39
41
  const [autoCompletePredictions, setAutoCompletePredictions] = (0, _react.useState)([]);
40
- const [searchInputValue, setSearchInputValue] = (0, _react.useState)('');
41
42
  const [predictionsNotFound, setPredictionsNotFound] = (0, _react.useState)(false);
42
43
  const [showPredictions, setShowPredicitions] = (0, _react.useState)(false);
43
44
  const placeDetailRef = (0, _react.useRef)();
@@ -66,16 +67,17 @@ const UTGoogleAutocomplete = _ref => {
66
67
  retrieveError(status);
67
68
  }
68
69
  };
69
- const handleInputChange = value => {
70
- setSearchInputValue(value);
71
- if (value.length >= minChar) {
70
+ const handleInputChange = inputValue => {
71
+ onChange(inputValue);
72
+ if (inputValue.length >= minChar) {
72
73
  googleAutocompleteService.getPlacePredictions({
73
- input: value,
74
+ input: inputValue,
74
75
  sessionToken,
75
76
  ...searchRestrictions
76
77
  }, handlePredictions);
77
78
  } else {
78
79
  setAutoCompletePredictions([]);
80
+ setSelectedPlace(null);
79
81
  }
80
82
  };
81
83
  const handleGetDetails = (place, status) => {
@@ -95,7 +97,7 @@ const UTGoogleAutocomplete = _ref => {
95
97
  dataTestId: dataTestId,
96
98
  helperTextDataTestId: helperTextDataTestId,
97
99
  input: {
98
- value: searchInputValue,
100
+ value,
99
101
  onChange: handleInputChange
100
102
  },
101
103
  inputClassName: classes.inputClassName
@@ -109,7 +111,7 @@ const UTGoogleAutocomplete = _ref => {
109
111
  key: id
110
112
  }, /*#__PURE__*/_react.default.createElement(_UTTouchableWithoutFeedback.default, {
111
113
  onClick: () => {
112
- setSearchInputValue(name);
114
+ onChange(name);
113
115
  const googleGetPlaceService = new google.maps.places.PlacesService(placeDetailRef.current);
114
116
  googleGetPlaceService.getDetails({
115
117
  placeId: id
@@ -121,7 +123,7 @@ const UTGoogleAutocomplete = _ref => {
121
123
  name: "IconMapPin",
122
124
  className: classes.resultIcon
123
125
  }), /*#__PURE__*/_react.default.createElement(_UTLabel.default, null, name)));
124
- }), searchInputValue.length >= minChar && predictionsNotFound && /*#__PURE__*/_react.default.createElement("div", {
126
+ }), value.length >= minChar && predictionsNotFound && /*#__PURE__*/_react.default.createElement("div", {
125
127
  className: classes.noResultsContainer
126
128
  }, /*#__PURE__*/_react.default.createElement(_UTIcon.default, {
127
129
  size: 32,
@@ -87,7 +87,9 @@ const ActionIcons = _ref => {
87
87
  className: "\n ".concat(_stylesModule.default.actionIcon, "\n ").concat(classes.actionIcon, "\n ").concat(iconClassName, "\n ").concat(isDisabled(rowData) && disabledIconClassName)
88
88
  }) : /*#__PURE__*/_react.default.createElement(_UTIcon.default, _extends({
89
89
  name: iconName
90
- }, iconProps))), !!menuAnchor && !(0, _array.isEmpty)(menuItems) && /*#__PURE__*/_react.default.createElement(_UTMenu.default, {
90
+ }, iconProps, {
91
+ className: "".concat(iconClassName, " ").concat(isDisabled(rowData) ? disabledIconClassName : '', " ").concat((iconProps === null || iconProps === void 0 ? void 0 : iconProps.className) || '')
92
+ }))), !!menuAnchor && !(0, _array.isEmpty)(menuItems) && /*#__PURE__*/_react.default.createElement(_UTMenu.default, {
91
93
  anchor: menuAnchor,
92
94
  contextData: menuRowContextData,
93
95
  iconBefore: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.58.2",
3
+ "version": "3.59.0",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",