@widergy/energy-ui 3.110.4 → 3.111.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 +7 -0
- package/dist/components/UTTable/UTTable.stories.js +61 -2
- package/dist/components/UTTable/components/ActionIcons/index.js +1 -0
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +1 -1
- package/dist/components/UTTable/components/TableFooter/index.js +3 -1
- package/dist/components/UTTable/components/TableHeader/versions/V1/index.js +9 -1
- package/dist/components/UTTable/components/TableRow/index.js +1 -1
- package/dist/components/UTTable/index.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [3.111.0](https://github.com/widergy/energy-ui/compare/v3.110.4...v3.111.0) (2025-10-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* [AXCH-680] table changes for account association workflow ([#696](https://github.com/widergy/energy-ui/issues/696)) ([7146b2f](https://github.com/widergy/energy-ui/commit/7146b2f23ec2fc6aeb5d306aca1d01ada01241a6))
|
|
7
|
+
|
|
1
8
|
## [3.110.4](https://github.com/widergy/energy-ui/compare/v3.110.3...v3.110.4) (2025-10-16)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.WithRefresh = exports.WithPagination = exports.WithCustomRenderers = exports.WithActions = exports.TableHeaderV1WithSelection = exports.TableHeaderV1WithRefresh = exports.TableHeaderV1WithAutomaticRefresh = exports.TableHeaderV1WithActions = exports.TableHeaderV1Loading = exports.TableHeaderV1Basic = exports.TableHeaderV0WithReload = exports.TableHeaderV0Basic = exports.StickyHeader = exports.Selectable = exports.Playground = exports.NoPagination = exports.Loading = exports.FitColumnsWidth = exports.ExternalIntegration = exports.ExclusiveSelection = exports.EmptyState = exports.CustomSpacing = exports.CompleteExample = exports.ClickableRows = exports.Basic = void 0;
|
|
6
|
+
exports.default = exports.WithRefresh = exports.WithPagination = exports.WithCustomRenderers = exports.WithActions = exports.TableHeaderV1WithSelection = exports.TableHeaderV1WithRefresh = exports.TableHeaderV1WithAutomaticRefresh = exports.TableHeaderV1WithActions = exports.TableHeaderV1Loading = exports.TableHeaderV1Basic = exports.TableHeaderV0WithReload = exports.TableHeaderV0Basic = exports.StickyHeader = exports.Selectable = exports.Playground = exports.NoPagination = exports.Loading = exports.FitColumnsWidth = exports.ExternalIntegration = exports.ExclusiveSelection = exports.EmptyState = exports.CustomSpacing = exports.CustomNoResults = exports.CompleteExample = exports.ClickableRows = exports.Basic = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _utils = require("stories/utils");
|
|
9
9
|
var _UTLabel = _interopRequireDefault(require("../UTLabel"));
|
|
@@ -343,6 +343,30 @@ var _default = exports.default = {
|
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
},
|
|
346
|
+
hidePageSelector: {
|
|
347
|
+
control: 'boolean',
|
|
348
|
+
description: 'Oculta el selector de página en el pie de tabla.',
|
|
349
|
+
table: {
|
|
350
|
+
defaultValue: {
|
|
351
|
+
summary: 'false'
|
|
352
|
+
},
|
|
353
|
+
type: {
|
|
354
|
+
summary: 'boolean'
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
noResultsComponent: {
|
|
359
|
+
control: 'object',
|
|
360
|
+
description: 'Componente personalizado para mostrar cuando no hay resultados.',
|
|
361
|
+
table: {
|
|
362
|
+
defaultValue: {
|
|
363
|
+
summary: 'undefined'
|
|
364
|
+
},
|
|
365
|
+
type: {
|
|
366
|
+
summary: 'ReactNode'
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
346
370
|
withRefresh: {
|
|
347
371
|
control: 'boolean',
|
|
348
372
|
description: 'Muestra botón de actualizar.',
|
|
@@ -946,6 +970,39 @@ const TableHeaderV1Loading = exports.TableHeaderV1Loading = {
|
|
|
946
970
|
},
|
|
947
971
|
name: 'Header V1 - Estado de Carga'
|
|
948
972
|
};
|
|
973
|
+
const CustomNoResults = exports.CustomNoResults = {
|
|
974
|
+
args: {
|
|
975
|
+
data: [],
|
|
976
|
+
columns: basicColumns,
|
|
977
|
+
tableTitle: 'Tabla con Componente de No Resultados',
|
|
978
|
+
description: 'Tabla con un componente personalizado cuando no hay resultados',
|
|
979
|
+
noResultsComponent: /*#__PURE__*/_react.default.createElement("div", {
|
|
980
|
+
style: {
|
|
981
|
+
backgroundColor: '#f9f9f9',
|
|
982
|
+
borderRadius: '8px',
|
|
983
|
+
textAlign: 'center'
|
|
984
|
+
}
|
|
985
|
+
}, /*#__PURE__*/_react.default.createElement(_UTIcon.default, {
|
|
986
|
+
name: "IconSearchOff",
|
|
987
|
+
size: "24",
|
|
988
|
+
colorTheme: "neutral"
|
|
989
|
+
}), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
990
|
+
weight: "bold",
|
|
991
|
+
style: {
|
|
992
|
+
marginTop: '20px',
|
|
993
|
+
fontSize: '1.5rem',
|
|
994
|
+
color: '#333'
|
|
995
|
+
}
|
|
996
|
+
}, "No se encontraron resultados"), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
997
|
+
style: {
|
|
998
|
+
marginTop: '10px',
|
|
999
|
+
color: '#666',
|
|
1000
|
+
maxWidth: '300px'
|
|
1001
|
+
}
|
|
1002
|
+
}, "Parece que no hay datos que coincidan con tu b\xFAsqueda o filtros actuales."))
|
|
1003
|
+
},
|
|
1004
|
+
name: 'noResults componente custom'
|
|
1005
|
+
};
|
|
949
1006
|
const Playground = exports.Playground = {
|
|
950
1007
|
args: {
|
|
951
1008
|
data: mockData.slice(0, 15),
|
|
@@ -965,7 +1022,9 @@ const Playground = exports.Playground = {
|
|
|
965
1022
|
disableAutoOrder: false,
|
|
966
1023
|
withRefresh: false,
|
|
967
1024
|
withAutomaticRefresh: false,
|
|
968
|
-
headerVersion: 'V0'
|
|
1025
|
+
headerVersion: 'V0',
|
|
1026
|
+
hidePageSelector: true,
|
|
1027
|
+
noResultsComponent: undefined
|
|
969
1028
|
},
|
|
970
1029
|
name: 'Playground'
|
|
971
1030
|
};
|
|
@@ -73,6 +73,7 @@ const ActionIcons = _ref => {
|
|
|
73
73
|
content: tooltipContent,
|
|
74
74
|
key: key,
|
|
75
75
|
stringContentClassName: _stylesModule.default.tooltip,
|
|
76
|
+
stringContentProps: tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.stringContentProps,
|
|
76
77
|
tippyProps: tippyProps
|
|
77
78
|
}, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
78
79
|
className: "".concat(_stylesModule.default.iconButton, " ").concat(classes.actionIconButton, " \n ").concat((isDisabled(rowData) || isLoading(rowData)) && _stylesModule.default.disabled, " ").concat(buttonClassName),
|
|
@@ -77,7 +77,7 @@ const Pagination = _ref => {
|
|
|
77
77
|
const totalPages = rowsPerPage >= totalRows ? 1 : Math.ceil(totalRows / rowsPerPage);
|
|
78
78
|
const pageList = (0, _utils.getPageNumbers)(totalPages, currentPage, isResponsive);
|
|
79
79
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
-
className: _stylesModule.default.pagination
|
|
80
|
+
className: "".concat(_stylesModule.default.pagination, " ").concat(classes.pagination || '')
|
|
81
81
|
}, totalPages > _constants.PAGINATION_LIMIT_DOUBLE_ARROWS && !isResponsive && /*#__PURE__*/_react.default.createElement(_NavigationButton.default, {
|
|
82
82
|
classes: classes,
|
|
83
83
|
className: _stylesModule.default.invertNavigationLabel,
|
|
@@ -21,13 +21,14 @@ const TableFooter = _ref => {
|
|
|
21
21
|
onChangeRowPerPage,
|
|
22
22
|
rowsPerPage,
|
|
23
23
|
rowsPerPageOptions,
|
|
24
|
+
hidePageSelector = false,
|
|
24
25
|
totalRows,
|
|
25
26
|
totalRowsLabel,
|
|
26
27
|
isResponsive
|
|
27
28
|
} = _ref;
|
|
28
29
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
29
30
|
className: _stylesModule.default.tableFooter
|
|
30
|
-
}, /*#__PURE__*/_react.default.createElement(_PageSizeSelector.default, {
|
|
31
|
+
}, !hidePageSelector && /*#__PURE__*/_react.default.createElement(_PageSizeSelector.default, {
|
|
31
32
|
classes: classes,
|
|
32
33
|
options: rowsPerPageOptions,
|
|
33
34
|
rowsPerPage: rowsPerPage,
|
|
@@ -50,6 +51,7 @@ TableFooter.propTypes = {
|
|
|
50
51
|
onChangeRowPerPage: _propTypes.func,
|
|
51
52
|
rowsPerPage: _propTypes.number,
|
|
52
53
|
rowsPerPageOptions: (0, _propTypes.arrayOf)(_propTypes.number),
|
|
54
|
+
hidePageSelector: _propTypes.bool,
|
|
53
55
|
totalRows: _propTypes.number,
|
|
54
56
|
totalRowsLabel: _propTypes.string,
|
|
55
57
|
isResponsive: _propTypes.bool
|
|
@@ -143,7 +143,15 @@ const TableHeader = _ref => {
|
|
|
143
143
|
popperProps: {
|
|
144
144
|
disablePortal: true
|
|
145
145
|
}
|
|
146
|
-
})) : Array.isArray(actions) && actions.map((actionConfig, index) => /*#__PURE__*/_react.default.createElement(
|
|
146
|
+
})) : Array.isArray(actions) && actions.map((actionConfig, index) => actionConfig.tooltip ? /*#__PURE__*/_react.default.createElement(_UTTooltip.default, _extends({
|
|
147
|
+
className: actionConfig.tooltipClassName,
|
|
148
|
+
content: actionConfig.tooltip,
|
|
149
|
+
dataTestId: tableHeaderDataTestId ? "".concat(tableHeaderDataTestId, ".").concat(index) : '',
|
|
150
|
+
tippyProps: {
|
|
151
|
+
arrow: false,
|
|
152
|
+
placement: 'top'
|
|
153
|
+
}
|
|
154
|
+
}, actionConfig.tooltipProps), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_UTButton.default, actionConfig))) : /*#__PURE__*/_react.default.createElement(_UTButton.default, _extends({
|
|
147
155
|
dataTestId: tableHeaderDataTestId ? "".concat(tableHeaderDataTestId, ".").concat(index) : ''
|
|
148
156
|
}, actionConfig)))));
|
|
149
157
|
};
|
|
@@ -82,7 +82,7 @@ const TableRow = _ref => {
|
|
|
82
82
|
width: isResponsive ? 'auto' : columnSizes.leftColumnsSize
|
|
83
83
|
}
|
|
84
84
|
}, selectable && /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
-
className: "\n ".concat(_stylesModule.default.checkBoxCell, "\n ").concat(checkBoxSelected ? cellProps.classes.headerDecoratorSelected : cellProps.classes.headerDecoratorUnselected, "\n ").concat(checkBoxClassName, "\n ").concat(isResponsive && checkBoxSelected && cellProps.classes.selectedResponsiveCell, "\n "),
|
|
85
|
+
className: "\n ".concat(_stylesModule.default.checkBoxCell, "\n ").concat(checkBoxSelected ? cellProps.classes.headerDecoratorSelected : cellProps.classes.headerDecoratorUnselected, "\n ").concat(checkBoxClassName, "\n ").concat(cellProps.classes.checkBoxCell, "\n ").concat(isResponsive && checkBoxSelected && cellProps.classes.selectedResponsiveCell, "\n "),
|
|
86
86
|
style: rowStyles.selectCell
|
|
87
87
|
}, /*#__PURE__*/_react.default.createElement(_UTTooltip.default, {
|
|
88
88
|
content: (disableRowSelection === null || disableRowSelection === void 0 ? void 0 : disableRowSelection(cellProps.rowData, pageRows)) && (disabledRowSelectionTooltip === null || disabledRowSelectionTooltip === void 0 ? void 0 : disabledRowSelectionTooltip(cellProps.rowData, pageRows)),
|
|
@@ -70,12 +70,14 @@ const UTTable = _ref => {
|
|
|
70
70
|
headerPadding = _constants.ROW_PADDING_NAMES.MEDIUM,
|
|
71
71
|
headerSelectionComponentDataTestId,
|
|
72
72
|
headerVersion,
|
|
73
|
+
hidePageSelector,
|
|
73
74
|
initialOrder,
|
|
74
75
|
initialSelectedRows = [],
|
|
75
76
|
integrationType = _UTTable.INTEGRATION_TYPES.INTERNAL,
|
|
76
77
|
loading,
|
|
77
78
|
mobileBreakpoint = _constants.DEFAULT_MOBILE_BREAKPOINT,
|
|
78
79
|
noResultDataTestId,
|
|
80
|
+
noResultsComponent,
|
|
79
81
|
noResultsLabel = _constants.NO_RESULTS_LABEL,
|
|
80
82
|
onOrderChange,
|
|
81
83
|
onPageChange,
|
|
@@ -228,7 +230,7 @@ const UTTable = _ref => {
|
|
|
228
230
|
style: {
|
|
229
231
|
width: tableWidth
|
|
230
232
|
}
|
|
231
|
-
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
233
|
+
}, noResultsComponent || /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
232
234
|
className: classes.noResultsLabel,
|
|
233
235
|
dataTestId: noResultDataTestId
|
|
234
236
|
}, noResultsLabel)) : currentRows.map((row, index) => {
|
|
@@ -356,6 +358,7 @@ const UTTable = _ref => {
|
|
|
356
358
|
handlePageChange: handlePageChange,
|
|
357
359
|
isResponsive: isResponsive,
|
|
358
360
|
onChangeRowPerPage: onChangeRowPerPage,
|
|
361
|
+
hidePageSelector: hidePageSelector,
|
|
359
362
|
page: page,
|
|
360
363
|
rowsPerPage: rowsPerPage,
|
|
361
364
|
rowsPerPageOptions: rowsPerPageOptions,
|
|
@@ -409,6 +412,7 @@ UTTable.propTypes = {
|
|
|
409
412
|
headerPadding: _propTypes.string,
|
|
410
413
|
headerSelectionComponentDataTestId: _propTypes.string,
|
|
411
414
|
headerVersion: _propTypes.string,
|
|
415
|
+
hidePageSelector: _propTypes.bool,
|
|
412
416
|
initialOrder: (0, _propTypes.shape)({
|
|
413
417
|
direction: _propTypes.string,
|
|
414
418
|
key: _propTypes.string
|
|
@@ -418,6 +422,7 @@ UTTable.propTypes = {
|
|
|
418
422
|
loading: _propTypes.bool,
|
|
419
423
|
mobileBreakpoint: _propTypes.number,
|
|
420
424
|
noResultDataTestId: _propTypes.string,
|
|
425
|
+
noResultsComponent: _propTypes.node,
|
|
421
426
|
noResultsLabel: _propTypes.string,
|
|
422
427
|
onOrderChange: _propTypes.func,
|
|
423
428
|
onPageChange: _propTypes.func,
|