k-vtable 1.0.7 → 1.0.9
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/cjs/ListTable.d.ts +1 -0
- package/cjs/ListTable.js +5 -0
- package/cjs/ListTable.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/data/DataSource.js +2 -11
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.js +20 -18
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/helper.js +30 -22
- package/cjs/event/helper.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +4 -0
- package/cjs/scenegraph/component/table-component.js +72 -2
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.d.ts +2 -0
- package/cjs/scenegraph/component/util.js +11 -1
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.js +7 -2
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -0
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +48 -15
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/index.js +2 -0
- package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +3 -2
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +2 -0
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/layout/update-col.js +9 -4
- package/cjs/scenegraph/layout/update-col.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +11 -4
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +6 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +2 -2
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/state/cell-move/index.js +13 -4
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/hover/update-position.js +2 -2
- package/cjs/state/hover/update-position.js.map +1 -1
- package/cjs/state/resize/update-resize-column.js +1 -0
- package/cjs/state/resize/update-resize-column.js.map +1 -1
- package/cjs/state/state.d.ts +2 -0
- package/cjs/state/state.js +4 -0
- package/cjs/state/state.js.map +1 -1
- package/cjs/tools/util.d.ts +2 -1
- package/cjs/tools/util.js +14 -3
- package/cjs/tools/util.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +379 -185
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +5 -0
- package/es/ListTable.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/data/DataSource.js +3 -12
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.js +20 -18
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/helper.js +30 -22
- package/es/event/helper.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/component/table-component.d.ts +4 -0
- package/es/scenegraph/component/table-component.js +73 -3
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.d.ts +2 -0
- package/es/scenegraph/component/util.js +8 -0
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/graphic/chart.js +8 -1
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -0
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +47 -14
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/index.js +2 -1
- package/es/scenegraph/graphic/contributions/index.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +3 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +2 -0
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/layout/update-col.js +8 -3
- package/es/scenegraph/layout/update-col.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +9 -2
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/scenegraph.js +6 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +2 -2
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/state/cell-move/index.js +14 -3
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/hover/update-position.js +2 -2
- package/es/state/hover/update-position.js.map +1 -1
- package/es/state/resize/update-resize-column.js +1 -0
- package/es/state/resize/update-resize-column.js.map +1 -1
- package/es/state/state.d.ts +2 -0
- package/es/state/state.js +4 -0
- package/es/state/state.js.map +1 -1
- package/es/tools/util.d.ts +2 -1
- package/es/tools/util.js +13 -0
- package/es/tools/util.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/cjs/dataset/dataset.js
CHANGED
|
@@ -752,32 +752,34 @@ class Dataset {
|
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
if (null === (_t = null === (_s = this.totals) || void 0 === _s ? void 0 : _s.row) || void 0 === _t ? void 0 : _t.showGrandTotals) {
|
|
755
|
-
if (
|
|
756
|
-
|
|
755
|
+
if (null === (_v = null === (_u = this.tree[this.rowGrandTotalLabel]) || void 0 === _u ? void 0 : _u[flatColKey]) || void 0 === _v ? void 0 : _v[indicatorIndex]) {
|
|
756
|
+
if (addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColKey][indicatorIndex], this.rowGrandTotalLabel, flatColKey),
|
|
757
|
+
(null === (_x = null === (_w = this.totals) || void 0 === _w ? void 0 : _w.column) || void 0 === _x ? void 0 : _x.subTotalsDimensions) && !1 !== this.totals.column.showSubTotals) for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
|
|
758
|
+
const colDimension = this.totals.column.subTotalsDimensions[j], colDimensionIndex = this.columns.indexOf(colDimension);
|
|
759
|
+
if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
|
|
760
|
+
const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
|
|
761
|
+
colSubTotalKeyParts.push(this.colSubTotalLabel);
|
|
762
|
+
const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
|
|
763
|
+
(null === (_z = null === (_y = this.tree[this.rowGrandTotalLabel]) || void 0 === _y ? void 0 : _y[flatColSubTotalKey]) || void 0 === _z ? void 0 : _z[indicatorIndex]) && addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColSubTotalKey][indicatorIndex], this.rowGrandTotalLabel, flatColSubTotalKey);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
(null === (_1 = null === (_0 = this.totals) || void 0 === _0 ? void 0 : _0.column) || void 0 === _1 ? void 0 : _1.showGrandTotals) && (null === (_3 = null === (_2 = this.tree[this.rowGrandTotalLabel]) || void 0 === _2 ? void 0 : _2[this.colGrandTotalLabel]) || void 0 === _3 ? void 0 : _3[indicatorIndex]) && addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][this.colGrandTotalLabel][indicatorIndex], this.rowGrandTotalLabel, this.colGrandTotalLabel);
|
|
767
|
+
}
|
|
768
|
+
if ((null === (_5 = null === (_4 = this.totals) || void 0 === _4 ? void 0 : _4.column) || void 0 === _5 ? void 0 : _5.subTotalsDimensions) && !1 !== this.totals.column.showSubTotals) for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
|
|
757
769
|
const colDimension = this.totals.column.subTotalsDimensions[j], colDimensionIndex = this.columns.indexOf(colDimension);
|
|
758
770
|
if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
|
|
759
771
|
const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
|
|
760
772
|
colSubTotalKeyParts.push(this.colSubTotalLabel);
|
|
761
773
|
const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
|
|
762
|
-
(null === (
|
|
774
|
+
(null === (_7 = null === (_6 = this.tree[flatRowKey]) || void 0 === _6 ? void 0 : _6[flatColSubTotalKey]) || void 0 === _7 ? void 0 : _7[indicatorIndex]) && addAggregatorToResetSet(this.tree[flatRowKey][flatColSubTotalKey][indicatorIndex], flatRowKey, flatColSubTotalKey);
|
|
763
775
|
}
|
|
764
776
|
}
|
|
765
|
-
(null === (
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
|
|
771
|
-
colSubTotalKeyParts.push(this.colSubTotalLabel);
|
|
772
|
-
const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
|
|
773
|
-
(null === (_7 = null === (_6 = this.tree[flatRowKey]) || void 0 === _6 ? void 0 : _6[flatColSubTotalKey]) || void 0 === _7 ? void 0 : _7[indicatorIndex]) && addAggregatorToResetSet(this.tree[flatRowKey][flatColSubTotalKey][indicatorIndex], flatRowKey, flatColSubTotalKey);
|
|
774
|
-
}
|
|
777
|
+
(null === (_9 = null === (_8 = this.totals) || void 0 === _8 ? void 0 : _8.column) || void 0 === _9 ? void 0 : _9.showGrandTotals) && (null === (_11 = null === (_10 = this.tree[flatRowKey]) || void 0 === _10 ? void 0 : _10[this.colGrandTotalLabel]) || void 0 === _11 ? void 0 : _11[indicatorIndex]) && addAggregatorToResetSet(this.tree[flatRowKey][this.colGrandTotalLabel][indicatorIndex], flatRowKey, this.colGrandTotalLabel),
|
|
778
|
+
aggregatorsToReset.forEach((agg => {
|
|
779
|
+
newCellAggregator && subTotalAggregators.has(agg) && agg.push(newCellAggregator),
|
|
780
|
+
agg.recalculate();
|
|
781
|
+
}));
|
|
775
782
|
}
|
|
776
|
-
(null === (_9 = null === (_8 = this.totals) || void 0 === _8 ? void 0 : _8.column) || void 0 === _9 ? void 0 : _9.showGrandTotals) && (null === (_11 = null === (_10 = this.tree[flatRowKey]) || void 0 === _10 ? void 0 : _10[this.colGrandTotalLabel]) || void 0 === _11 ? void 0 : _11[indicatorIndex]) && addAggregatorToResetSet(this.tree[flatRowKey][this.colGrandTotalLabel][indicatorIndex], flatRowKey, this.colGrandTotalLabel),
|
|
777
|
-
aggregatorsToReset.forEach((agg => {
|
|
778
|
-
newCellAggregator && subTotalAggregators.has(agg) && agg.push(newCellAggregator),
|
|
779
|
-
agg.recalculate();
|
|
780
|
-
}));
|
|
781
783
|
}
|
|
782
784
|
changeRecordFieldValue(fieldName, oldValue, value) {
|
|
783
785
|
let isIndicatorName = !1;
|