dtable-statistic 5.0.42-alpha.4 → 5.0.42-alpha.6
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.
|
@@ -111,6 +111,16 @@ const exportOneDimensionToTable = _ref => {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
// count column
|
|
115
|
+
if (summaryColumn) {
|
|
116
|
+
const countColumn = {
|
|
117
|
+
type: _isDateSummaryColumn ? _dtableUtils.CellType.DATE : _dtableUtils.CellType.NUMBER,
|
|
118
|
+
name: summaryColumn === null || summaryColumn === void 0 ? void 0 : summaryColumn.name,
|
|
119
|
+
data: columnData
|
|
120
|
+
};
|
|
121
|
+
columns.push(totalColumn);
|
|
122
|
+
}
|
|
123
|
+
|
|
114
124
|
// total column
|
|
115
125
|
const totalColumn = {
|
|
116
126
|
type: _isDateSummaryColumn ? _dtableUtils.CellType.DATE : _dtableUtils.CellType.NUMBER,
|
|
@@ -208,11 +218,10 @@ const exportOneDimensionToTable = _ref => {
|
|
|
208
218
|
};
|
|
209
219
|
Array.isArray(pivot_columns) && pivot_columns.forEach(item => {
|
|
210
220
|
const {
|
|
211
|
-
key
|
|
212
|
-
method
|
|
221
|
+
key
|
|
213
222
|
} = item;
|
|
214
223
|
const column = columnMap[key];
|
|
215
|
-
const cellValueKey = key
|
|
224
|
+
const cellValueKey = key;
|
|
216
225
|
const {
|
|
217
226
|
name,
|
|
218
227
|
type,
|
|
@@ -225,9 +234,10 @@ const exportOneDimensionToTable = _ref => {
|
|
|
225
234
|
}
|
|
226
235
|
newRow[name] = cellValue;
|
|
227
236
|
});
|
|
237
|
+
console.log('newRow', newRow);
|
|
228
238
|
rows.push(newRow);
|
|
229
239
|
});
|
|
230
|
-
console.log('
|
|
240
|
+
console.log('rows', rows);
|
|
231
241
|
return {
|
|
232
242
|
columns,
|
|
233
243
|
rows
|
|
@@ -571,7 +581,7 @@ const updatedOneDimensionToTable = _ref5 => {
|
|
|
571
581
|
method
|
|
572
582
|
} = item;
|
|
573
583
|
const column = columnMap[key];
|
|
574
|
-
const cellValueKey = key
|
|
584
|
+
const cellValueKey = key;
|
|
575
585
|
const totalCellValue = getValidValueForColumn(column, total[cellValueKey]);
|
|
576
586
|
if (column && (0, _cellValue.isCellValueChanged)(row[column.key], totalCellValue, column.type)) {
|
|
577
587
|
updateRow[column.key] = totalCellValue;
|