autoql-fe-utils 1.0.83 → 1.0.84
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/index.global.js +18 -6
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -16015,6 +16015,9 @@
|
|
|
16015
16015
|
);
|
|
16016
16016
|
};
|
|
16017
16017
|
var getNumberOfGroupables = (columns) => {
|
|
16018
|
+
if (!(columns == null ? void 0 : columns.length)) {
|
|
16019
|
+
return 0;
|
|
16020
|
+
}
|
|
16018
16021
|
if (columns.find((col) => col.groupable && !col.is_visible) || columns.find((col) => !col.groupable)) {
|
|
16019
16022
|
return 0;
|
|
16020
16023
|
}
|
|
@@ -18916,7 +18919,11 @@
|
|
|
18916
18919
|
const column = columns[index];
|
|
18917
18920
|
let label;
|
|
18918
18921
|
if (row) {
|
|
18919
|
-
|
|
18922
|
+
if (column.type === "DATE" /* DATE */ || column.type === "DATE_STRING" /* DATE_STRING */) {
|
|
18923
|
+
label = (_b = (_a = formatChartLabel({ d: row[index], column, dataFormatting })) == null ? void 0 : _a.fullWidthLabel) != null ? _b : row[index];
|
|
18924
|
+
} else {
|
|
18925
|
+
return row[index];
|
|
18926
|
+
}
|
|
18920
18927
|
}
|
|
18921
18928
|
return label;
|
|
18922
18929
|
};
|
|
@@ -18944,7 +18951,7 @@
|
|
|
18944
18951
|
});
|
|
18945
18952
|
};
|
|
18946
18953
|
var aggregateRow = (row, datasetsToAggregate, columns) => {
|
|
18947
|
-
const newRow =
|
|
18954
|
+
const newRow = [...row];
|
|
18948
18955
|
Object.keys(datasetsToAggregate).forEach((index) => {
|
|
18949
18956
|
var _a;
|
|
18950
18957
|
const aggType = columns[index].aggType || DEFAULT_AGG_TYPE;
|
|
@@ -19003,11 +19010,16 @@
|
|
|
19003
19010
|
let prevRow;
|
|
19004
19011
|
let datasetsToAggregate = {};
|
|
19005
19012
|
sortedData.forEach((row, i) => {
|
|
19006
|
-
const currentRow =
|
|
19013
|
+
const currentRow = row;
|
|
19007
19014
|
const isLastRow = i === sortedData.length - 1;
|
|
19008
|
-
const
|
|
19009
|
-
const
|
|
19010
|
-
|
|
19015
|
+
const currentLabelRaw = row == null ? void 0 : row[aggColumn];
|
|
19016
|
+
const prevLabelRaw = prevRow == null ? void 0 : prevRow[aggColumn];
|
|
19017
|
+
let labelChanged = currentLabelRaw && prevLabelRaw && currentLabelRaw !== prevLabelRaw;
|
|
19018
|
+
if (!labelChanged) {
|
|
19019
|
+
const currentLabel = getLabelFromRow({ row: currentRow, index: aggColumn, columns, dataFormatting });
|
|
19020
|
+
const prevLabel = getLabelFromRow({ row: prevRow, index: aggColumn, columns, dataFormatting });
|
|
19021
|
+
labelChanged = currentLabel && prevLabel && currentLabel !== prevLabel;
|
|
19022
|
+
}
|
|
19011
19023
|
if (labelChanged) {
|
|
19012
19024
|
const newRow = aggregateRow(prevRow, datasetsToAggregate, columns);
|
|
19013
19025
|
aggregatedData.push(newRow);
|