pace-table-lib 1.0.71 → 1.0.73
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/dist/components/CommonHelperFunctions.d.ts +1 -0
- package/dist/components/PivotTable/NewPivotTable.d.ts +3 -0
- package/dist/components/PivotTable/NewPivotTable.types.d.ts +49 -0
- package/dist/components/PivotTable/PivotHelperFunctions.d.ts +5 -0
- package/dist/components/PivotTable/PivotTable.utils.d.ts +0 -1
- package/dist/components/PivotTable/PivotTableConsts.d.ts +1 -0
- package/dist/components/StaticTable/StaticTableConst.d.ts +1 -0
- package/dist/pace-table-lib.es.js +17 -30
- package/dist/pace-table-lib.es.js.map +1 -1
- package/dist/pace-table-lib.umd.js +17 -30
- package/dist/pace-table-lib.umd.js.map +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
|
@@ -7937,7 +7937,8 @@
|
|
|
7937
7937
|
NO_FILL: "No Fill",
|
|
7938
7938
|
SINGLE: "Single",
|
|
7939
7939
|
ROW_BAND: "Row Band",
|
|
7940
|
-
COLUMN_BAND: "Column Band"
|
|
7940
|
+
COLUMN_BAND: "Column Band",
|
|
7941
|
+
ALT_ROW: "Alternate Rows"
|
|
7941
7942
|
};
|
|
7942
7943
|
const BACKGROUND_COLOR_KEY_MAP = {
|
|
7943
7944
|
row: {
|
|
@@ -8082,6 +8083,7 @@
|
|
|
8082
8083
|
result.oddColor = obj[map.customKey];
|
|
8083
8084
|
result.evenColor = obj[map.customKey];
|
|
8084
8085
|
break;
|
|
8086
|
+
case COLOR_BAND_TYPE.ALT_ROW:
|
|
8085
8087
|
case map.bandType:
|
|
8086
8088
|
result.oddColor = obj[map.oddKey];
|
|
8087
8089
|
result.evenColor = obj[map.evenKey];
|
|
@@ -8104,12 +8106,12 @@
|
|
|
8104
8106
|
function formatDate(value, formatKey) {
|
|
8105
8107
|
try {
|
|
8106
8108
|
const date = toDateFromExcel(value);
|
|
8107
|
-
const day = pad(date.
|
|
8108
|
-
const month = pad(date.
|
|
8109
|
-
const year = date.
|
|
8109
|
+
const day = pad(date.getUTCDate());
|
|
8110
|
+
const month = pad(date.getUTCMonth() + 1);
|
|
8111
|
+
const year = date.getUTCFullYear();
|
|
8110
8112
|
const shortYear = year.toString().slice(-2);
|
|
8111
|
-
const monthShort = MONTHS_SHORT[date.
|
|
8112
|
-
const monthFull = MONTHS_FULL[date.
|
|
8113
|
+
const monthShort = MONTHS_SHORT[date.getUTCMonth()];
|
|
8114
|
+
const monthFull = MONTHS_FULL[date.getUTCMonth()];
|
|
8113
8115
|
switch (formatKey) {
|
|
8114
8116
|
case DATE_FORMAT_OBJ.DD_MM_YYYY:
|
|
8115
8117
|
return `${day}-${month}-${year}`;
|
|
@@ -8190,8 +8192,8 @@
|
|
|
8190
8192
|
[VALUE_FORMAT_OBJ.CURRENCY_EUR_SHORT]: { currency: "EUR", locale: "en-US" },
|
|
8191
8193
|
[VALUE_FORMAT_OBJ.CURRENCY_CAD]: { currency: "CAD", locale: "en-US" },
|
|
8192
8194
|
[VALUE_FORMAT_OBJ.CURRENCY_CAD_SHORT]: { currency: "CAD", locale: "en-US" },
|
|
8193
|
-
[VALUE_FORMAT_OBJ.CURRENCY_CHF]: { currency: "CHF", locale: "
|
|
8194
|
-
[VALUE_FORMAT_OBJ.CURRENCY_CHF_SHORT]: { currency: "CHF", locale: "
|
|
8195
|
+
[VALUE_FORMAT_OBJ.CURRENCY_CHF]: { currency: "CHF", locale: "en-IN" },
|
|
8196
|
+
[VALUE_FORMAT_OBJ.CURRENCY_CHF_SHORT]: { currency: "CHF", locale: "en-IN" }
|
|
8195
8197
|
};
|
|
8196
8198
|
if (currencyMap[format]) {
|
|
8197
8199
|
const { currency, locale } = currencyMap[format];
|
|
@@ -8262,6 +8264,7 @@
|
|
|
8262
8264
|
const rMix = Math.round(r2(minColor) + (r2(maxColor) - r2(minColor)) * ratio);
|
|
8263
8265
|
const gMix = Math.round(g(minColor) + (g(maxColor) - g(minColor)) * ratio);
|
|
8264
8266
|
const bMix = Math.round(b(minColor) + (b(maxColor) - b(minColor)) * ratio);
|
|
8267
|
+
if (isNaN(rMix) || isNaN(gMix) || isNaN(bMix)) return "rgb(255, 255, 255)";
|
|
8265
8268
|
return `rgb(${rMix},${gMix},${bMix})`;
|
|
8266
8269
|
}
|
|
8267
8270
|
function computeMatrix(rawDataMatrix, mode, transformFn) {
|
|
@@ -18837,7 +18840,6 @@
|
|
|
18837
18840
|
)
|
|
18838
18841
|
] });
|
|
18839
18842
|
}
|
|
18840
|
-
const NO_ENTRY_TOKENS = ["nolegendentryrow", "nocolentry"];
|
|
18841
18843
|
function hexToRgb(hex) {
|
|
18842
18844
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
18843
18845
|
return result ? {
|
|
@@ -18886,7 +18888,6 @@
|
|
|
18886
18888
|
for (let i = segments.length - 1; i >= 0; i--) {
|
|
18887
18889
|
const seg = segments[i];
|
|
18888
18890
|
if (seg && seg !== "!subtotal") {
|
|
18889
|
-
if (NO_ENTRY_TOKENS.includes(seg.toLowerCase())) return measureValue;
|
|
18890
18891
|
if (seg.includes("~$~")) {
|
|
18891
18892
|
return seg.split("~$~")[1]?.trim() ?? seg;
|
|
18892
18893
|
}
|
|
@@ -19054,7 +19055,7 @@
|
|
|
19054
19055
|
const isRowTotalOn = tableStyleProps?.DataField?.RowTotal;
|
|
19055
19056
|
const isRowHeaderVisible = !RowHeader?.HideRowHeader;
|
|
19056
19057
|
const isColHeaderVisible = !ColumnHeader?.HideColumnHeader;
|
|
19057
|
-
|
|
19058
|
+
Table2?.colOrRowHeaderName;
|
|
19058
19059
|
const isConditionalFormatOn = Table2?.ConditionalformattingOnOff;
|
|
19059
19060
|
const conditionalFormatArr = Table2?.Conditionalformatting;
|
|
19060
19061
|
const conditionalFormatsByType = React.useMemo(() => {
|
|
@@ -19104,10 +19105,7 @@
|
|
|
19104
19105
|
}
|
|
19105
19106
|
}
|
|
19106
19107
|
return rh?.map((rowPath, i) => {
|
|
19107
|
-
const
|
|
19108
|
-
(t) => rowPath.toLowerCase().includes(t)
|
|
19109
|
-
);
|
|
19110
|
-
const segments = isNoEntry ? [measureValue] : parseRowPath(rowPath);
|
|
19108
|
+
const segments = parseRowPath(rowPath);
|
|
19111
19109
|
const isSubtotal = segments.includes("!subtotal");
|
|
19112
19110
|
const nonSubSegs = segments?.filter((s) => s !== "!subtotal");
|
|
19113
19111
|
const lastSeg = nonSubSegs[nonSubSegs.length - 1] ?? "";
|
|
@@ -19123,7 +19121,7 @@
|
|
|
19123
19121
|
rowPath,
|
|
19124
19122
|
segments,
|
|
19125
19123
|
depth: 0,
|
|
19126
|
-
name:
|
|
19124
|
+
name: getRowDisplayName(segments),
|
|
19127
19125
|
measureIndex,
|
|
19128
19126
|
measureName,
|
|
19129
19127
|
isSubtotal,
|
|
@@ -19145,10 +19143,7 @@
|
|
|
19145
19143
|
const isSubtotal = parts[parts.length - 1] === "!subtotal";
|
|
19146
19144
|
const cleanedParts = parts?.filter((p) => p !== "!subtotal")?.map((p) => {
|
|
19147
19145
|
if (p.includes("~$~")) return p.split("~$~")[1]?.trim() ?? p;
|
|
19148
|
-
|
|
19149
|
-
(t) => p.toLowerCase().includes(t)
|
|
19150
|
-
);
|
|
19151
|
-
return isNoEntry ? "" : p;
|
|
19146
|
+
return p;
|
|
19152
19147
|
});
|
|
19153
19148
|
const year = cleanedParts[0] ?? `__col_${i}__`;
|
|
19154
19149
|
const measureDisplay = (cleanedParts && cleanedParts[cleanedParts.length - 1]) ?? year;
|
|
@@ -19619,11 +19614,7 @@
|
|
|
19619
19614
|
"column header"
|
|
19620
19615
|
);
|
|
19621
19616
|
let displayLabel = col.isSubtotal ? col.levels[col.levels.length - 1] ?? "" : col.levels?.[col.levels.length - 1] ?? col.measureDisplay;
|
|
19622
|
-
if (
|
|
19623
|
-
(t) => tableData?.rowHeaders?.[0]?.toLowerCase().includes(t)
|
|
19624
|
-
) && measureFormatConfigs?.[0]?.measureName) {
|
|
19625
|
-
displayLabel = measureFormatConfigs[0].measureName;
|
|
19626
|
-
} else if (tableStyleProps?.ColumnDateFormat) {
|
|
19617
|
+
if (tableStyleProps?.ColumnDateFormat) {
|
|
19627
19618
|
const parts = col.path.split("`");
|
|
19628
19619
|
const lastPart = parts[parts.length - 1];
|
|
19629
19620
|
if (tableStyleProps?.ColumnDateFormat?.[0] && (col.path == col.measureDisplay || col.isSubtotal)) {
|
|
@@ -19725,11 +19716,7 @@
|
|
|
19725
19716
|
const shouldWrap = Table2?.RowWrapText;
|
|
19726
19717
|
const rowConFormat = getConditionalFormat(row.name, "row header");
|
|
19727
19718
|
let displayLabel = row.name;
|
|
19728
|
-
if (
|
|
19729
|
-
(t) => tableData?.columnHeaders?.[0]?.toLowerCase().includes(t)
|
|
19730
|
-
) && measureFormatConfigs?.[0]?.measureName) {
|
|
19731
|
-
displayLabel = measureFormatConfigs[0].measureName;
|
|
19732
|
-
} else if (tableStyleProps?.RowDateFormat) {
|
|
19719
|
+
if (tableStyleProps?.RowDateFormat) {
|
|
19733
19720
|
if (tableStyleProps?.RowDateFormat?.[0] && (row.name === row.segments[0] || row.isSubtotal)) {
|
|
19734
19721
|
displayLabel = applyDateFormat(
|
|
19735
19722
|
row.name,
|