@widergy/energy-ui 3.165.1 → 3.166.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 +18 -2
- package/dist/components/UTIcon/theme.js +20 -9
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +4 -0
- package/dist/components/UTTable/components/TableFooter/index.js +6 -2
- package/dist/components/UTTable/index.js +3 -0
- package/dist/esm/components/UTIcon/theme.js +20 -9
- package/dist/esm/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +4 -0
- package/dist/esm/components/UTTable/components/TableFooter/index.js +6 -2
- package/dist/esm/components/UTTable/index.js +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
## [3.
|
|
1
|
+
## [3.166.1](https://github.com/widergy/energy-ui/compare/v3.166.0...v3.166.1) (2026-06-16)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* [CX-2433] incompatibility dynamic size icon fixes ([#817](https://github.com/widergy/energy-ui/issues/817)) ([7c2bf6c](https://github.com/widergy/energy-ui/commit/7c2bf6cd0e789d56797236702385c7fd657c15d8))
|
|
7
|
+
|
|
8
|
+
# [3.166.0](https://github.com/widergy/energy-ui/compare/v3.165.1...v3.166.0) (2026-06-12)
|
|
9
|
+
|
|
10
|
+
### Novedades y Mejoras
|
|
11
|
+
|
|
12
|
+
* Mejoras internas de la plataforma. [#809](https://github.com/widergy/Energy-UI/pull/809) [AUTO-271](https://widergy.atlassian.net/browse/AUTO-271)
|
|
13
|
+
|
|
14
|
+
## [3.165.1](https://github.com/widergy/energy-ui/compare/v3.165.0...v3.165.1) (2026-06-12)
|
|
15
|
+
|
|
16
|
+
### Novedades y Mejoras
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Correcciones
|
|
21
|
+
|
|
22
|
+
* El componente de notificaciones emergentes ahora permite elegir entre cuatro posiciones en pantalla: inferior izquierda, inferior derecha, superior izquierda y superior derecha. [#818](https://github.com/widergy/Energy-UI/pull/818) [DIS-1106](https://widergy.atlassian.net/browse/DIS-1106)
|
|
7
23
|
|
|
8
24
|
# [3.165.0](https://github.com/widergy/energy-ui/compare/v3.164.0...v3.165.0) (2026-06-10)
|
|
9
25
|
|
|
@@ -20,6 +20,7 @@ const FLAG_CODES = new Set(_countries.default.map(_ref => {
|
|
|
20
20
|
return code;
|
|
21
21
|
}));
|
|
22
22
|
const flagComponentCache = {};
|
|
23
|
+
const isCSSVar = value => typeof value === 'string' && value.startsWith('var(');
|
|
23
24
|
const getFlagComponent = code => {
|
|
24
25
|
if (!(code in flagComponentCache)) {
|
|
25
26
|
const loader = _flagsComponents.default[code];
|
|
@@ -65,25 +66,35 @@ const getIconProps = _ref3 => {
|
|
|
65
66
|
theme,
|
|
66
67
|
shade: fillShade || _constants.DEFAULT_INTERNAL_SHADE
|
|
67
68
|
});
|
|
69
|
+
const sizeIsCSSVar = isCSSVar(size);
|
|
70
|
+
const resolvedSize = sizeIsCSSVar ? undefined : size;
|
|
71
|
+
const sizeStyle = sizeIsCSSVar ? {
|
|
72
|
+
width: size,
|
|
73
|
+
height: size
|
|
74
|
+
} : {};
|
|
75
|
+
const baseStyle = filled ? {
|
|
76
|
+
color: themeColor
|
|
77
|
+
} : style || {};
|
|
68
78
|
const defaultIconProps = {
|
|
69
79
|
color: iconColor,
|
|
70
|
-
size
|
|
80
|
+
size: resolvedSize
|
|
71
81
|
};
|
|
72
82
|
const energyIconProps = {
|
|
73
83
|
stroke: iconColor,
|
|
74
|
-
...(
|
|
75
|
-
width:
|
|
76
|
-
height:
|
|
84
|
+
...(resolvedSize && {
|
|
85
|
+
width: resolvedSize,
|
|
86
|
+
height: resolvedSize
|
|
77
87
|
})
|
|
78
88
|
};
|
|
79
89
|
const flagProps = {
|
|
80
|
-
width:
|
|
81
|
-
height:
|
|
90
|
+
width: resolvedSize || 24,
|
|
91
|
+
height: resolvedSize || 24
|
|
82
92
|
};
|
|
83
93
|
return {
|
|
84
|
-
style:
|
|
85
|
-
|
|
86
|
-
|
|
94
|
+
style: {
|
|
95
|
+
...baseStyle,
|
|
96
|
+
...sizeStyle
|
|
97
|
+
},
|
|
87
98
|
...(internalFill && {
|
|
88
99
|
fill: internalFill
|
|
89
100
|
}),
|
|
@@ -15,6 +15,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
15
15
|
const PageSizeSelector = _ref => {
|
|
16
16
|
let {
|
|
17
17
|
classes,
|
|
18
|
+
dataTestId,
|
|
18
19
|
options,
|
|
19
20
|
rowsPerPage,
|
|
20
21
|
onChangeRowPerPage,
|
|
@@ -27,12 +28,14 @@ const PageSizeSelector = _ref => {
|
|
|
27
28
|
className: _stylesModule.default.selectorContainer
|
|
28
29
|
}, /*#__PURE__*/_react.default.createElement(_UTSelect.default, {
|
|
29
30
|
options: (0, _utils.getPageSizeOptions)(options, totalRows),
|
|
31
|
+
dataTestId: dataTestId,
|
|
30
32
|
labelKey: "label",
|
|
31
33
|
valueKey: "value",
|
|
32
34
|
input: {
|
|
33
35
|
onChange: onChangeRowPerPage,
|
|
34
36
|
value: rowsPerPage
|
|
35
37
|
},
|
|
38
|
+
itemDataTestId: dataTestId ? "".concat(dataTestId, ".option") : undefined,
|
|
36
39
|
disableFirstOption: true,
|
|
37
40
|
variant: "outlined",
|
|
38
41
|
selectProps: {
|
|
@@ -47,6 +50,7 @@ const PageSizeSelector = _ref => {
|
|
|
47
50
|
};
|
|
48
51
|
PageSizeSelector.propTypes = {
|
|
49
52
|
classes: _types.classesType,
|
|
53
|
+
dataTestId: _propTypes.string,
|
|
50
54
|
options: (0, _propTypes.arrayOf)(_propTypes.number),
|
|
51
55
|
rowsPerPage: _propTypes.number,
|
|
52
56
|
onChangeRowPerPage: _propTypes.func,
|
|
@@ -22,19 +22,22 @@ const TableFooter = _ref => {
|
|
|
22
22
|
rowsPerPage,
|
|
23
23
|
rowsPerPageOptions,
|
|
24
24
|
hidePageSelector = false,
|
|
25
|
+
paginatorDataTestId,
|
|
25
26
|
totalRows,
|
|
26
27
|
totalRowsLabel,
|
|
27
28
|
isResponsive
|
|
28
29
|
} = _ref;
|
|
29
30
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
-
className: _stylesModule.default.tableFooter
|
|
31
|
+
className: _stylesModule.default.tableFooter,
|
|
32
|
+
"data-testid": paginatorDataTestId
|
|
31
33
|
}, !hidePageSelector && /*#__PURE__*/_react.default.createElement(_PageSizeSelector.default, {
|
|
32
34
|
classes: classes,
|
|
33
35
|
options: rowsPerPageOptions,
|
|
34
36
|
rowsPerPage: rowsPerPage,
|
|
35
37
|
onChangeRowPerPage: onChangeRowPerPage,
|
|
36
38
|
totalRows: totalRows,
|
|
37
|
-
label: "".concat(_constants.PREPOSITION, " ").concat(totalRows, " ").concat(totalRowsLabel)
|
|
39
|
+
label: "".concat(_constants.PREPOSITION, " ").concat(totalRows, " ").concat(totalRowsLabel),
|
|
40
|
+
dataTestId: paginatorDataTestId ? "".concat(paginatorDataTestId, ".pageSizeSelector") : undefined
|
|
38
41
|
}), /*#__PURE__*/_react.default.createElement(_Pagination.default, {
|
|
39
42
|
classes: classes,
|
|
40
43
|
currentPage: page,
|
|
@@ -52,6 +55,7 @@ TableFooter.propTypes = {
|
|
|
52
55
|
rowsPerPage: _propTypes.number,
|
|
53
56
|
rowsPerPageOptions: (0, _propTypes.arrayOf)(_propTypes.number),
|
|
54
57
|
hidePageSelector: _propTypes.bool,
|
|
58
|
+
paginatorDataTestId: _propTypes.string,
|
|
55
59
|
totalRows: _propTypes.number,
|
|
56
60
|
totalRowsLabel: _propTypes.string,
|
|
57
61
|
isResponsive: _propTypes.bool
|
|
@@ -78,6 +78,7 @@ const UTTable = _ref => {
|
|
|
78
78
|
mobileBreakpoint = _constants.DEFAULT_MOBILE_BREAKPOINT,
|
|
79
79
|
noResultDataTestId,
|
|
80
80
|
noResultsComponent,
|
|
81
|
+
paginatorDataTestId,
|
|
81
82
|
noResultsLabel = _constants.NO_RESULTS_LABEL,
|
|
82
83
|
onOrderChange,
|
|
83
84
|
onPageChange,
|
|
@@ -360,6 +361,7 @@ const UTTable = _ref => {
|
|
|
360
361
|
onChangeRowPerPage: onChangeRowPerPage,
|
|
361
362
|
hidePageSelector: hidePageSelector,
|
|
362
363
|
page: page,
|
|
364
|
+
paginatorDataTestId: paginatorDataTestId,
|
|
363
365
|
rowsPerPage: rowsPerPage,
|
|
364
366
|
rowsPerPageOptions: rowsPerPageOptions,
|
|
365
367
|
totalRows: totalRows || rows.length,
|
|
@@ -426,6 +428,7 @@ UTTable.propTypes = {
|
|
|
426
428
|
mobileBreakpoint: _propTypes.number,
|
|
427
429
|
noResultDataTestId: _propTypes.string,
|
|
428
430
|
noResultsComponent: _propTypes.node,
|
|
431
|
+
paginatorDataTestId: _propTypes.string,
|
|
429
432
|
noResultsLabel: _propTypes.string,
|
|
430
433
|
onOrderChange: _propTypes.func,
|
|
431
434
|
onPageChange: _propTypes.func,
|
|
@@ -12,6 +12,7 @@ const FLAG_CODES = new Set(countries.map(_ref => {
|
|
|
12
12
|
return code;
|
|
13
13
|
}));
|
|
14
14
|
const flagComponentCache = {};
|
|
15
|
+
const isCSSVar = value => typeof value === 'string' && value.startsWith('var(');
|
|
15
16
|
const getFlagComponent = code => {
|
|
16
17
|
if (!(code in flagComponentCache)) {
|
|
17
18
|
const loader = flagComponentMap[code];
|
|
@@ -56,25 +57,35 @@ export const getIconProps = _ref3 => {
|
|
|
56
57
|
theme,
|
|
57
58
|
shade: fillShade || DEFAULT_INTERNAL_SHADE
|
|
58
59
|
});
|
|
60
|
+
const sizeIsCSSVar = isCSSVar(size);
|
|
61
|
+
const resolvedSize = sizeIsCSSVar ? undefined : size;
|
|
62
|
+
const sizeStyle = sizeIsCSSVar ? {
|
|
63
|
+
width: size,
|
|
64
|
+
height: size
|
|
65
|
+
} : {};
|
|
66
|
+
const baseStyle = filled ? {
|
|
67
|
+
color: themeColor
|
|
68
|
+
} : style || {};
|
|
59
69
|
const defaultIconProps = {
|
|
60
70
|
color: iconColor,
|
|
61
|
-
size
|
|
71
|
+
size: resolvedSize
|
|
62
72
|
};
|
|
63
73
|
const energyIconProps = {
|
|
64
74
|
stroke: iconColor,
|
|
65
|
-
...(
|
|
66
|
-
width:
|
|
67
|
-
height:
|
|
75
|
+
...(resolvedSize && {
|
|
76
|
+
width: resolvedSize,
|
|
77
|
+
height: resolvedSize
|
|
68
78
|
})
|
|
69
79
|
};
|
|
70
80
|
const flagProps = {
|
|
71
|
-
width:
|
|
72
|
-
height:
|
|
81
|
+
width: resolvedSize || 24,
|
|
82
|
+
height: resolvedSize || 24
|
|
73
83
|
};
|
|
74
84
|
return {
|
|
75
|
-
style:
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
style: {
|
|
86
|
+
...baseStyle,
|
|
87
|
+
...sizeStyle
|
|
88
|
+
},
|
|
78
89
|
...(internalFill && {
|
|
79
90
|
fill: internalFill
|
|
80
91
|
}),
|
package/dist/esm/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import styles from './styles.module.scss';
|
|
|
8
8
|
const PageSizeSelector = _ref => {
|
|
9
9
|
let {
|
|
10
10
|
classes,
|
|
11
|
+
dataTestId,
|
|
11
12
|
options,
|
|
12
13
|
rowsPerPage,
|
|
13
14
|
onChangeRowPerPage,
|
|
@@ -20,12 +21,14 @@ const PageSizeSelector = _ref => {
|
|
|
20
21
|
className: styles.selectorContainer
|
|
21
22
|
}, /*#__PURE__*/React.createElement(UTSelect, {
|
|
22
23
|
options: getPageSizeOptions(options, totalRows),
|
|
24
|
+
dataTestId: dataTestId,
|
|
23
25
|
labelKey: "label",
|
|
24
26
|
valueKey: "value",
|
|
25
27
|
input: {
|
|
26
28
|
onChange: onChangeRowPerPage,
|
|
27
29
|
value: rowsPerPage
|
|
28
30
|
},
|
|
31
|
+
itemDataTestId: dataTestId ? "".concat(dataTestId, ".option") : undefined,
|
|
29
32
|
disableFirstOption: true,
|
|
30
33
|
variant: "outlined",
|
|
31
34
|
selectProps: {
|
|
@@ -40,6 +43,7 @@ const PageSizeSelector = _ref => {
|
|
|
40
43
|
};
|
|
41
44
|
PageSizeSelector.propTypes = {
|
|
42
45
|
classes: classesType,
|
|
46
|
+
dataTestId: string,
|
|
43
47
|
options: arrayOf(number),
|
|
44
48
|
rowsPerPage: number,
|
|
45
49
|
onChangeRowPerPage: func,
|
|
@@ -14,19 +14,22 @@ const TableFooter = _ref => {
|
|
|
14
14
|
rowsPerPage,
|
|
15
15
|
rowsPerPageOptions,
|
|
16
16
|
hidePageSelector = false,
|
|
17
|
+
paginatorDataTestId,
|
|
17
18
|
totalRows,
|
|
18
19
|
totalRowsLabel,
|
|
19
20
|
isResponsive
|
|
20
21
|
} = _ref;
|
|
21
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className: styles.tableFooter
|
|
23
|
+
className: styles.tableFooter,
|
|
24
|
+
"data-testid": paginatorDataTestId
|
|
23
25
|
}, !hidePageSelector && /*#__PURE__*/React.createElement(PageSizeSelector, {
|
|
24
26
|
classes: classes,
|
|
25
27
|
options: rowsPerPageOptions,
|
|
26
28
|
rowsPerPage: rowsPerPage,
|
|
27
29
|
onChangeRowPerPage: onChangeRowPerPage,
|
|
28
30
|
totalRows: totalRows,
|
|
29
|
-
label: "".concat(PREPOSITION, " ").concat(totalRows, " ").concat(totalRowsLabel)
|
|
31
|
+
label: "".concat(PREPOSITION, " ").concat(totalRows, " ").concat(totalRowsLabel),
|
|
32
|
+
dataTestId: paginatorDataTestId ? "".concat(paginatorDataTestId, ".pageSizeSelector") : undefined
|
|
30
33
|
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
31
34
|
classes: classes,
|
|
32
35
|
currentPage: page,
|
|
@@ -44,6 +47,7 @@ TableFooter.propTypes = {
|
|
|
44
47
|
rowsPerPage: number,
|
|
45
48
|
rowsPerPageOptions: arrayOf(number),
|
|
46
49
|
hidePageSelector: bool,
|
|
50
|
+
paginatorDataTestId: string,
|
|
47
51
|
totalRows: number,
|
|
48
52
|
totalRowsLabel: string,
|
|
49
53
|
isResponsive: bool
|
|
@@ -70,6 +70,7 @@ const UTTable = _ref => {
|
|
|
70
70
|
mobileBreakpoint = DEFAULT_MOBILE_BREAKPOINT,
|
|
71
71
|
noResultDataTestId,
|
|
72
72
|
noResultsComponent,
|
|
73
|
+
paginatorDataTestId,
|
|
73
74
|
noResultsLabel = NO_RESULTS_LABEL,
|
|
74
75
|
onOrderChange,
|
|
75
76
|
onPageChange,
|
|
@@ -352,6 +353,7 @@ const UTTable = _ref => {
|
|
|
352
353
|
onChangeRowPerPage: onChangeRowPerPage,
|
|
353
354
|
hidePageSelector: hidePageSelector,
|
|
354
355
|
page: page,
|
|
356
|
+
paginatorDataTestId: paginatorDataTestId,
|
|
355
357
|
rowsPerPage: rowsPerPage,
|
|
356
358
|
rowsPerPageOptions: rowsPerPageOptions,
|
|
357
359
|
totalRows: totalRows || rows.length,
|
|
@@ -418,6 +420,7 @@ UTTable.propTypes = {
|
|
|
418
420
|
mobileBreakpoint: number,
|
|
419
421
|
noResultDataTestId: string,
|
|
420
422
|
noResultsComponent: node,
|
|
423
|
+
paginatorDataTestId: string,
|
|
421
424
|
noResultsLabel: string,
|
|
422
425
|
onOrderChange: func,
|
|
423
426
|
onPageChange: func,
|