pace-table-lib 1.0.59 → 1.0.60
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.
|
@@ -19,3 +19,4 @@ export declare function applyTextRelatedCss(headerArr: any[], flag: boolean): an
|
|
|
19
19
|
export declare function applyTextCssForCorners(headerArr: any[], flag: boolean): any[];
|
|
20
20
|
export declare function getIndex(str: string): number;
|
|
21
21
|
export declare function getFontSize(value?: number | string): number;
|
|
22
|
+
export declare function getGroupIndex(measuresBySlice: any[]): number;
|
|
@@ -8371,6 +8371,24 @@ function getFontSize(value) {
|
|
|
8371
8371
|
}
|
|
8372
8372
|
return 10;
|
|
8373
8373
|
}
|
|
8374
|
+
function getGroupIndex(measuresBySlice) {
|
|
8375
|
+
let groupIndex = 1;
|
|
8376
|
+
try {
|
|
8377
|
+
let lastParent = null;
|
|
8378
|
+
for (let i = 0; i <= measuresBySlice.length; i++) {
|
|
8379
|
+
const parent = measuresBySlice[i]?.sliceMark?.[0] ?? "";
|
|
8380
|
+
if (parent !== lastParent) {
|
|
8381
|
+
if (lastParent !== null) {
|
|
8382
|
+
groupIndex++;
|
|
8383
|
+
}
|
|
8384
|
+
lastParent = parent;
|
|
8385
|
+
}
|
|
8386
|
+
}
|
|
8387
|
+
} catch (err) {
|
|
8388
|
+
console.warn(err);
|
|
8389
|
+
}
|
|
8390
|
+
return groupIndex;
|
|
8391
|
+
}
|
|
8374
8392
|
var jquery$1 = { exports: {} };
|
|
8375
8393
|
/*!
|
|
8376
8394
|
* jQuery JavaScript Library v3.7.1
|
|
@@ -18129,7 +18147,7 @@ function StaticTable({
|
|
|
18129
18147
|
width: widthForTheTotal,
|
|
18130
18148
|
height: rowCellHeight,
|
|
18131
18149
|
color: finalStyleForRow.color,
|
|
18132
|
-
background: finalStyleForRow.background ?? getBgColorForCell(
|
|
18150
|
+
background: finalStyleForRow.background ?? getBgColorForCell(getGroupIndex(measuresBySlice), rowColors),
|
|
18133
18151
|
fontWeight: "bold"
|
|
18134
18152
|
});
|
|
18135
18153
|
if (isSparkLineVisible && isSlAtStart && !headerAtStart) {
|
|
@@ -18404,7 +18422,7 @@ function StaticTable({
|
|
|
18404
18422
|
const isSparkLineCol = isSparkLineVisible && !isSlAtStart && columnIndex === columnCount - 1;
|
|
18405
18423
|
const isPercentageMode = DataField.hasOwnProperty("percentageBy") && DataField.percentageBy && DataField.percentageBy?.toLowerCase() !== "absolute";
|
|
18406
18424
|
let rawValue;
|
|
18407
|
-
const bgColorForTotals = getBgColorForCell(
|
|
18425
|
+
const bgColorForTotals = getBgColorForCell(getGroupIndex(measuresBySlice), dataColors);
|
|
18408
18426
|
if (isColTotalOn && isRowTotalOn && !headerAtStart && isLastRow && isLastCol) {
|
|
18409
18427
|
baseStyle.background = bgColorForTotals;
|
|
18410
18428
|
rawValue = grandTotal;
|