@widergy/energy-ui 3.169.0 → 3.170.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,23 +1,30 @@
1
- # [3.169.0](https://github.com/widergy/energy-ui/compare/v3.168.0...v3.169.0) (2026-06-18)
1
+ # [3.170.0](https://github.com/widergy/energy-ui/compare/v3.169.0...v3.170.0) (2026-06-22)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * custom row component ut select ([#821](https://github.com/widergy/energy-ui/issues/821)) ([1723ad0](https://github.com/widergy/energy-ui/commit/1723ad0527381f7772644a4a46dd6dbf4efdfdaa))
6
+ * [AXCH-1778] test id support for utdotmenu ([#823](https://github.com/widergy/energy-ui/issues/823)) ([76d71f4](https://github.com/widergy/energy-ui/commit/76d71f4befad18fa1da9c43533cc53b95e3c673c))
7
7
 
8
- # [3.168.0](https://github.com/widergy/energy-ui/compare/v3.167.1...v3.168.0) (2026-06-18)
8
+ # [3.169.0](https://github.com/widergy/energy-ui/compare/v3.168.0...v3.169.0) (2026-06-18)
9
9
 
10
+ ### Novedades y Mejoras
10
11
 
11
- ### Features
12
+ * El selector desplegable ahora permite personalizar cómo se ve cada opción de la lista, tanto en modo de selección única como múltiple. [#821](https://github.com/widergy/Energy-UI/pull/821) [AXCH-1774](https://widergy.atlassian.net/browse/AXCH-1774)
13
+
14
+ # [3.168.0](https://github.com/widergy/energy-ui/compare/v3.167.1...v3.168.0) (2026-06-18)
12
15
 
13
- * [CX-2398] new ut loading version ([#815](https://github.com/widergy/energy-ui/issues/815)) ([b115b7e](https://github.com/widergy/energy-ui/commit/b115b7ecabd6e84e4917381f0d7876207602ffae))
16
+ ### Novedades y Mejoras
14
17
 
15
- ## [3.167.1](https://github.com/widergy/energy-ui/compare/v3.167.0...v3.167.1) (2026-06-18)
18
+ * Se incorpora una nueva experiencia visual de carga: un indicador animado moderno que utiliza los colores e identidad propios de cada cliente, con efecto de brillo y logo centrado. La experiencia anterior se mantiene activa por defecto, garantizando que ningún flujo existente se vea afectado. [#815](https://github.com/widergy/Energy-UI/pull/815) [CX-2398](https://widergy.atlassian.net/browse/CX-2398)
19
+ * Durante la carga de secciones de la aplicación, el nuevo indicador visual ya puede mostrarse en pantalla completa o adaptado al contenedor, según el contexto de navegación. [#815](https://github.com/widergy/Energy-UI/pull/815) [CX-2398](https://widergy.atlassian.net/browse/CX-2398)
20
+ * Las vistas principales de la aplicación —resumen de cuentas, perfil de usuario, listado de cuentas, trámites, estado de corte, consumo, historial, atención al cliente y facturas— fueron actualizadas para aprovechar la nueva experiencia de carga cuando está habilitada. [#815](https://github.com/widergy/Energy-UI/pull/815) [CX-2398](https://widergy.atlassian.net/browse/CX-2398)
21
+ * El resumen de factura inteligente incorpora soporte para la nueva experiencia de carga, manteniendo compatibilidad total con la versión anterior. [#815](https://github.com/widergy/Energy-UI/pull/815) [CX-2398](https://widergy.atlassian.net/browse/CX-2398)
16
22
 
23
+ ## [3.167.1](https://github.com/widergy/energy-ui/compare/v3.167.0...v3.167.1) (2026-06-18)
17
24
 
18
- ### Bug Fixes
25
+ ### Correcciones
19
26
 
20
- * multiple fixes ([#822](https://github.com/widergy/energy-ui/issues/822)) ([c6ce17d](https://github.com/widergy/energy-ui/commit/c6ce17d96fc15531bbde7a390960bcf22e709da4))
27
+ * Mejoras internas de la plataforma. [#822](https://github.com/widergy/Energy-UI/pull/822) [`28c89f8`](https://github.com/widergy/Energy-UI/commit/28c89f8) [CX-9999](https://widergy.atlassian.net/browse/CX-9999)
21
28
 
22
29
  # [3.167.0](https://github.com/widergy/energy-ui/compare/v3.166.1...v3.167.0) (2026-06-17)
23
30
 
@@ -20,6 +20,7 @@ const UTDotMenu = _ref => {
20
20
  let {
21
21
  className,
22
22
  classNames = _constants.DEFAULT_PROPS.classNames,
23
+ dataTestId,
23
24
  disabled,
24
25
  Icon = _constants.DEFAULT_PROPS.Icon,
25
26
  menuItemProps,
@@ -29,12 +30,14 @@ const UTDotMenu = _ref => {
29
30
  } = _ref;
30
31
  const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
31
32
  return /*#__PURE__*/_react.default.createElement("div", {
32
- className: className
33
+ className: className,
34
+ "data-testid": dataTestId
33
35
  }, /*#__PURE__*/_react.default.createElement(_UTButton.default, {
34
36
  classNames: {
35
37
  icon: classNames.icon,
36
38
  root: classNames.button
37
39
  },
40
+ dataTestId: dataTestId ? "".concat(dataTestId, ".button") : undefined,
38
41
  disabled: disabled,
39
42
  Icon: Icon,
40
43
  onClick: event => setAnchorEl(event.currentTarget),
@@ -52,15 +55,18 @@ const UTDotMenu = _ref => {
52
55
  },
53
56
  ...(menuProps === null || menuProps === void 0 ? void 0 : menuProps.PaperProps)
54
57
  }
55
- }), options.map(option => {
58
+ }), options.map((option, index) => {
56
59
  const {
57
60
  colorTheme,
61
+ dataTestId: optionTestId,
58
62
  icon,
59
63
  iconProps,
60
64
  name,
61
65
  onPress
62
66
  } = option;
67
+ const itemTestId = optionTestId !== null && optionTestId !== void 0 ? optionTestId : dataTestId ? "".concat(dataTestId, ".").concat(index) : undefined;
63
68
  return /*#__PURE__*/_react.default.createElement(_MenuItem.default, _extends({
69
+ "data-testid": itemTestId,
64
70
  key: name,
65
71
  onClick: onPress
66
72
  }, menuItemProps), icon && /*#__PURE__*/_react.default.createElement(_UTIcon.default, _extends({
@@ -78,12 +84,14 @@ UTDotMenu.propTypes = {
78
84
  button: _propTypes.string,
79
85
  icon: _propTypes.string
80
86
  }),
87
+ dataTestId: _propTypes.string,
81
88
  disabled: _propTypes.bool,
82
89
  Icon: (0, _propTypes.oneOfType)([_propTypes.elementType, _propTypes.string]),
83
90
  menuItemProps: _propTypes.object,
84
91
  menuProps: _propTypes.object,
85
92
  options: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
86
93
  colorTheme: _propTypes.string,
94
+ dataTestId: _propTypes.string,
87
95
  icon: _propTypes.string,
88
96
  iconProps: _propTypes.object,
89
97
  name: _propTypes.string,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.Small = exports.Playground = exports.IconoPersonalizado = exports.Default = exports.ConIconos = exports.ConIconProps = exports.BotonDeshabilitado = exports.AccionDestructiva = void 0;
6
+ exports.default = exports.Small = exports.Playground = exports.IconoPersonalizado = exports.Default = exports.ConTestIds = exports.ConIconos = exports.ConIconProps = exports.BotonDeshabilitado = exports.AccionDestructiva = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _ = _interopRequireDefault(require(".."));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -50,6 +50,18 @@ var _default = exports.default = {
50
50
  }
51
51
  }
52
52
  },
53
+ dataTestId: {
54
+ control: 'text',
55
+ description: 'Test id del contenedor raíz. El botón trigger recibe automáticamente el valor de esta prop con el sufijo `.button`. ' + 'Cada ítem del menú usa su propio `dataTestId` directamente (sin concatenación con el contenedor).',
56
+ table: {
57
+ defaultValue: {
58
+ summary: 'undefined'
59
+ },
60
+ type: {
61
+ summary: 'string'
62
+ }
63
+ }
64
+ },
53
65
  classNames: {
54
66
  control: false,
55
67
  description: 'Clases personalizadas para el botón trigger. Acepta `button` e `icon`.',
@@ -112,13 +124,13 @@ var _default = exports.default = {
112
124
  },
113
125
  options: {
114
126
  control: false,
115
- description: 'Array de opciones del menú. Cada opción puede incluir `icon`, `colorTheme` e `iconProps` para pasar props extra a UTIcon.',
127
+ description: 'Array de opciones del menú. Cada opción puede incluir `icon`, `colorTheme`, `iconProps` para props extra a UTIcon, ' + 'y `dataTestId` para identificar el ítem. El test id del ítem se usa directamente tal como se provee en la opción.',
116
128
  table: {
117
129
  defaultValue: {
118
130
  summary: 'undefined'
119
131
  },
120
132
  type: {
121
- summary: 'arrayOf(shape({ name, onPress, colorTheme?, icon?, iconProps? }))'
133
+ summary: 'arrayOf(shape({ name, onPress, colorTheme?, dataTestId?, icon?, iconProps? }))'
122
134
  }
123
135
  }
124
136
  },
@@ -262,6 +274,33 @@ const ConIconProps = exports.ConIconProps = {
262
274
  }
263
275
  }
264
276
  };
277
+ const ConTestIds = exports.ConTestIds = {
278
+ args: {
279
+ dataTestId: 'section.dotMenu',
280
+ options: [{
281
+ name: 'Editar',
282
+ icon: 'IconPencil',
283
+ dataTestId: 'section.dotMenu.edit'
284
+ }, {
285
+ name: 'Duplicar',
286
+ icon: 'IconCopy',
287
+ dataTestId: 'section.dotMenu.duplicate'
288
+ }, {
289
+ name: 'Eliminar',
290
+ icon: 'IconTrash',
291
+ colorTheme: 'error',
292
+ dataTestId: 'section.dotMenu.delete'
293
+ }]
294
+ },
295
+ name: 'Con test ids',
296
+ parameters: {
297
+ docs: {
298
+ description: {
299
+ story: 'El contenedor recibe `dataTestId="section.dotMenu"` y el botón trigger recibe `"section.dotMenu.button"` automáticamente. ' + 'Cada ítem usa su propio `dataTestId` tal como se provee, sin concatenación con el contenedor.'
300
+ }
301
+ }
302
+ }
303
+ };
265
304
  const BotonDeshabilitado = exports.BotonDeshabilitado = {
266
305
  args: {
267
306
  disabled: true,
@@ -12,6 +12,7 @@ const UTDotMenu = _ref => {
12
12
  let {
13
13
  className,
14
14
  classNames = DEFAULT_PROPS.classNames,
15
+ dataTestId,
15
16
  disabled,
16
17
  Icon = DEFAULT_PROPS.Icon,
17
18
  menuItemProps,
@@ -21,12 +22,14 @@ const UTDotMenu = _ref => {
21
22
  } = _ref;
22
23
  const [anchorEl, setAnchorEl] = useState(null);
23
24
  return /*#__PURE__*/React.createElement("div", {
24
- className: className
25
+ className: className,
26
+ "data-testid": dataTestId
25
27
  }, /*#__PURE__*/React.createElement(UTButton, {
26
28
  classNames: {
27
29
  icon: classNames.icon,
28
30
  root: classNames.button
29
31
  },
32
+ dataTestId: dataTestId ? "".concat(dataTestId, ".button") : undefined,
30
33
  disabled: disabled,
31
34
  Icon: Icon,
32
35
  onClick: event => setAnchorEl(event.currentTarget),
@@ -44,15 +47,18 @@ const UTDotMenu = _ref => {
44
47
  },
45
48
  ...(menuProps === null || menuProps === void 0 ? void 0 : menuProps.PaperProps)
46
49
  }
47
- }), options.map(option => {
50
+ }), options.map((option, index) => {
48
51
  const {
49
52
  colorTheme,
53
+ dataTestId: optionTestId,
50
54
  icon,
51
55
  iconProps,
52
56
  name,
53
57
  onPress
54
58
  } = option;
59
+ const itemTestId = optionTestId !== null && optionTestId !== void 0 ? optionTestId : dataTestId ? "".concat(dataTestId, ".").concat(index) : undefined;
55
60
  return /*#__PURE__*/React.createElement(MenuItem, _extends({
61
+ "data-testid": itemTestId,
56
62
  key: name,
57
63
  onClick: onPress
58
64
  }, menuItemProps), icon && /*#__PURE__*/React.createElement(UTIcon, _extends({
@@ -70,12 +76,14 @@ UTDotMenu.propTypes = {
70
76
  button: string,
71
77
  icon: string
72
78
  }),
79
+ dataTestId: string,
73
80
  disabled: bool,
74
81
  Icon: oneOfType([elementType, string]),
75
82
  menuItemProps: object,
76
83
  menuProps: object,
77
84
  options: arrayOf(shape({
78
85
  colorTheme: string,
86
+ dataTestId: string,
79
87
  icon: string,
80
88
  iconProps: object,
81
89
  name: string,
@@ -42,6 +42,18 @@ export default {
42
42
  }
43
43
  }
44
44
  },
45
+ dataTestId: {
46
+ control: 'text',
47
+ description: 'Test id del contenedor raíz. El botón trigger recibe automáticamente el valor de esta prop con el sufijo `.button`. ' + 'Cada ítem del menú usa su propio `dataTestId` directamente (sin concatenación con el contenedor).',
48
+ table: {
49
+ defaultValue: {
50
+ summary: 'undefined'
51
+ },
52
+ type: {
53
+ summary: 'string'
54
+ }
55
+ }
56
+ },
45
57
  classNames: {
46
58
  control: false,
47
59
  description: 'Clases personalizadas para el botón trigger. Acepta `button` e `icon`.',
@@ -104,13 +116,13 @@ export default {
104
116
  },
105
117
  options: {
106
118
  control: false,
107
- description: 'Array de opciones del menú. Cada opción puede incluir `icon`, `colorTheme` e `iconProps` para pasar props extra a UTIcon.',
119
+ description: 'Array de opciones del menú. Cada opción puede incluir `icon`, `colorTheme`, `iconProps` para props extra a UTIcon, ' + 'y `dataTestId` para identificar el ítem. El test id del ítem se usa directamente tal como se provee en la opción.',
108
120
  table: {
109
121
  defaultValue: {
110
122
  summary: 'undefined'
111
123
  },
112
124
  type: {
113
- summary: 'arrayOf(shape({ name, onPress, colorTheme?, icon?, iconProps? }))'
125
+ summary: 'arrayOf(shape({ name, onPress, colorTheme?, dataTestId?, icon?, iconProps? }))'
114
126
  }
115
127
  }
116
128
  },
@@ -254,6 +266,33 @@ export const ConIconProps = {
254
266
  }
255
267
  }
256
268
  };
269
+ export const ConTestIds = {
270
+ args: {
271
+ dataTestId: 'section.dotMenu',
272
+ options: [{
273
+ name: 'Editar',
274
+ icon: 'IconPencil',
275
+ dataTestId: 'section.dotMenu.edit'
276
+ }, {
277
+ name: 'Duplicar',
278
+ icon: 'IconCopy',
279
+ dataTestId: 'section.dotMenu.duplicate'
280
+ }, {
281
+ name: 'Eliminar',
282
+ icon: 'IconTrash',
283
+ colorTheme: 'error',
284
+ dataTestId: 'section.dotMenu.delete'
285
+ }]
286
+ },
287
+ name: 'Con test ids',
288
+ parameters: {
289
+ docs: {
290
+ description: {
291
+ story: 'El contenedor recibe `dataTestId="section.dotMenu"` y el botón trigger recibe `"section.dotMenu.button"` automáticamente. ' + 'Cada ítem usa su propio `dataTestId` tal como se provee, sin concatenación con el contenedor.'
292
+ }
293
+ }
294
+ }
295
+ };
257
296
  export const BotonDeshabilitado = {
258
297
  args: {
259
298
  disabled: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.169.0",
3
+ "version": "3.170.0",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",