test aplicar props de header styles y header classes

This commit is contained in:
dehernandezm 2024-12-23 11:14:42 -06:00
parent f406acc490
commit 21d8b114b6
3 changed files with 19 additions and 9 deletions

View File

@ -92,6 +92,13 @@ function makeRenderer() {
var colKeys = pivotData.getColKeys();
var grandTotalAggregator = pivotData.getAggregator([], []);
var getStylesHeaders = function getStylesHeaders() {
return _this2.props.stylesHeaders;
};
var getHeaderClass = function getHeaderClass() {
return _this2.props.headerClass;
};
var valueCellColors = function valueCellColors() {};
var rowTotalColors = function rowTotalColors() {};
var colTotalColors = function colTotalColors() {};
@ -229,9 +236,10 @@ function makeRenderer() {
return _react2.default.createElement(
'th',
{
className: 'pvtColLabel',
className: 'pvtColLabel ' + getHeaderClass(),
key: 'colKey' + i,
colSpan: x,
style: getStylesHeaders(),
rowSpan: j === colAttrs.length - 1 && rowAttrs.length !== 0 ? 2 : 1
},
colKey[j]
@ -240,10 +248,11 @@ function makeRenderer() {
j === 0 && _react2.default.createElement(
'th',
{
className: 'pvtTotalLabel',
className: 'pvtTotalLabel ' + getHeaderClass(),
style: getStylesHeaders(),
rowSpan: colAttrs.length + (rowAttrs.length === 0 ? 0 : 1)
},
'Totals'
'Total'
)
);
}),
@ -253,14 +262,14 @@ function makeRenderer() {
rowAttrs.map(function (r, i) {
return _react2.default.createElement(
'th',
{ className: 'pvtAxisLabel', key: 'rowAttr' + i },
{ className: 'pvtAxisLabel ' + getHeaderClass(), key: 'rowAttr' + i, style: getStylesHeaders() },
r
);
}),
_react2.default.createElement(
'th',
{ className: 'pvtTotalLabel' },
colAttrs.length === 0 ? 'Totals' : null
{ className: 'pvtTotalLabel ' + getHeaderClass(), style: getStylesHeaders() },
colAttrs.length === 0 ? 'Total' : null
)
)
),
@ -281,7 +290,8 @@ function makeRenderer() {
'th',
{
key: 'rowKeyLabel' + i + '-' + j,
className: 'pvtRowLabel',
className: 'pvtRowLabel ' + getHeaderClass(),
style: getStylesHeaders(),
rowSpan: x,
colSpan: j === rowAttrs.length - 1 && colAttrs.length !== 0 ? 2 : 1
},

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "v-react-pivottable",
"version": "0.11.14",
"version": "0.11.15",
"description": "A React-based pivot table",
"main": "PivotTableUI.js",
"files": [