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.
Files changed (109) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +5 -0
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/core/BaseTable.js +1 -1
  5. package/cjs/core/BaseTable.js.map +1 -1
  6. package/cjs/data/DataSource.js +2 -11
  7. package/cjs/data/DataSource.js.map +1 -1
  8. package/cjs/dataset/dataset.js +20 -18
  9. package/cjs/dataset/dataset.js.map +1 -1
  10. package/cjs/event/helper.js +30 -22
  11. package/cjs/event/helper.js.map +1 -1
  12. package/cjs/index.d.ts +1 -1
  13. package/cjs/index.js +1 -1
  14. package/cjs/index.js.map +1 -1
  15. package/cjs/scenegraph/component/table-component.d.ts +4 -0
  16. package/cjs/scenegraph/component/table-component.js +72 -2
  17. package/cjs/scenegraph/component/table-component.js.map +1 -1
  18. package/cjs/scenegraph/component/util.d.ts +2 -0
  19. package/cjs/scenegraph/component/util.js +11 -1
  20. package/cjs/scenegraph/component/util.js.map +1 -1
  21. package/cjs/scenegraph/graphic/chart.js +7 -2
  22. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  23. package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -0
  24. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +48 -15
  25. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  26. package/cjs/scenegraph/graphic/contributions/index.js +2 -0
  27. package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
  28. package/cjs/scenegraph/group-creater/cell-helper.js +3 -2
  29. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  30. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  31. package/cjs/scenegraph/layout/frozen.js +2 -0
  32. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  33. package/cjs/scenegraph/layout/update-col.js +9 -4
  34. package/cjs/scenegraph/layout/update-col.js.map +1 -1
  35. package/cjs/scenegraph/layout/update-row.js +11 -4
  36. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  37. package/cjs/scenegraph/scenegraph.js +6 -3
  38. package/cjs/scenegraph/scenegraph.js.map +1 -1
  39. package/cjs/scenegraph/select/update-select-border.js +2 -2
  40. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  41. package/cjs/state/cell-move/index.js +13 -4
  42. package/cjs/state/cell-move/index.js.map +1 -1
  43. package/cjs/state/hover/update-position.js +2 -2
  44. package/cjs/state/hover/update-position.js.map +1 -1
  45. package/cjs/state/resize/update-resize-column.js +1 -0
  46. package/cjs/state/resize/update-resize-column.js.map +1 -1
  47. package/cjs/state/state.d.ts +2 -0
  48. package/cjs/state/state.js +4 -0
  49. package/cjs/state/state.js.map +1 -1
  50. package/cjs/tools/util.d.ts +2 -1
  51. package/cjs/tools/util.js +14 -3
  52. package/cjs/tools/util.js.map +1 -1
  53. package/cjs/vrender.js.map +1 -1
  54. package/dist/vtable.js +379 -185
  55. package/dist/vtable.min.js +2 -2
  56. package/es/ListTable.d.ts +1 -0
  57. package/es/ListTable.js +5 -0
  58. package/es/ListTable.js.map +1 -1
  59. package/es/core/BaseTable.js +1 -1
  60. package/es/core/BaseTable.js.map +1 -1
  61. package/es/data/DataSource.js +3 -12
  62. package/es/data/DataSource.js.map +1 -1
  63. package/es/dataset/dataset.js +20 -18
  64. package/es/dataset/dataset.js.map +1 -1
  65. package/es/event/helper.js +30 -22
  66. package/es/event/helper.js.map +1 -1
  67. package/es/index.d.ts +1 -1
  68. package/es/index.js +1 -1
  69. package/es/index.js.map +1 -1
  70. package/es/scenegraph/component/table-component.d.ts +4 -0
  71. package/es/scenegraph/component/table-component.js +73 -3
  72. package/es/scenegraph/component/table-component.js.map +1 -1
  73. package/es/scenegraph/component/util.d.ts +2 -0
  74. package/es/scenegraph/component/util.js +8 -0
  75. package/es/scenegraph/component/util.js.map +1 -1
  76. package/es/scenegraph/graphic/chart.js +8 -1
  77. package/es/scenegraph/graphic/chart.js.map +1 -1
  78. package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -0
  79. package/es/scenegraph/graphic/contributions/group-contribution-render.js +47 -14
  80. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  81. package/es/scenegraph/graphic/contributions/index.js +2 -1
  82. package/es/scenegraph/graphic/contributions/index.js.map +1 -1
  83. package/es/scenegraph/group-creater/cell-helper.js +3 -2
  84. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  85. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  86. package/es/scenegraph/layout/frozen.js +2 -0
  87. package/es/scenegraph/layout/frozen.js.map +1 -1
  88. package/es/scenegraph/layout/update-col.js +8 -3
  89. package/es/scenegraph/layout/update-col.js.map +1 -1
  90. package/es/scenegraph/layout/update-row.js +9 -2
  91. package/es/scenegraph/layout/update-row.js.map +1 -1
  92. package/es/scenegraph/scenegraph.js +6 -3
  93. package/es/scenegraph/scenegraph.js.map +1 -1
  94. package/es/scenegraph/select/update-select-border.js +2 -2
  95. package/es/scenegraph/select/update-select-border.js.map +1 -1
  96. package/es/state/cell-move/index.js +14 -3
  97. package/es/state/cell-move/index.js.map +1 -1
  98. package/es/state/hover/update-position.js +2 -2
  99. package/es/state/hover/update-position.js.map +1 -1
  100. package/es/state/resize/update-resize-column.js +1 -0
  101. package/es/state/resize/update-resize-column.js.map +1 -1
  102. package/es/state/state.d.ts +2 -0
  103. package/es/state/state.js +4 -0
  104. package/es/state/state.js.map +1 -1
  105. package/es/tools/util.d.ts +2 -1
  106. package/es/tools/util.js +13 -0
  107. package/es/tools/util.js.map +1 -1
  108. package/es/vrender.js.map +1 -1
  109. package/package.json +5 -5
@@ -748,32 +748,34 @@ export class Dataset {
748
748
  }
749
749
  }
750
750
  if (null === (_t = null === (_s = this.totals) || void 0 === _s ? void 0 : _s.row) || void 0 === _t ? void 0 : _t.showGrandTotals) {
751
- if ((null === (_v = null === (_u = this.tree[this.rowGrandTotalLabel]) || void 0 === _u ? void 0 : _u[flatColKey]) || void 0 === _v ? void 0 : _v[indicatorIndex]) && addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColKey][indicatorIndex], this.rowGrandTotalLabel, flatColKey),
752
- (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++) {
751
+ if (null === (_v = null === (_u = this.tree[this.rowGrandTotalLabel]) || void 0 === _u ? void 0 : _u[flatColKey]) || void 0 === _v ? void 0 : _v[indicatorIndex]) {
752
+ if (addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColKey][indicatorIndex], this.rowGrandTotalLabel, flatColKey),
753
+ (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++) {
754
+ const colDimension = this.totals.column.subTotalsDimensions[j], colDimensionIndex = this.columns.indexOf(colDimension);
755
+ if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
756
+ const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
757
+ colSubTotalKeyParts.push(this.colSubTotalLabel);
758
+ const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
759
+ (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);
760
+ }
761
+ }
762
+ (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);
763
+ }
764
+ 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++) {
753
765
  const colDimension = this.totals.column.subTotalsDimensions[j], colDimensionIndex = this.columns.indexOf(colDimension);
754
766
  if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
755
767
  const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
756
768
  colSubTotalKeyParts.push(this.colSubTotalLabel);
757
769
  const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
758
- (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);
770
+ (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);
759
771
  }
760
772
  }
761
- (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);
762
- }
763
- 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++) {
764
- const colDimension = this.totals.column.subTotalsDimensions[j], colDimensionIndex = this.columns.indexOf(colDimension);
765
- if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
766
- const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
767
- colSubTotalKeyParts.push(this.colSubTotalLabel);
768
- const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
769
- (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);
770
- }
773
+ (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),
774
+ aggregatorsToReset.forEach((agg => {
775
+ newCellAggregator && subTotalAggregators.has(agg) && agg.push(newCellAggregator),
776
+ agg.recalculate();
777
+ }));
771
778
  }
772
- (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),
773
- aggregatorsToReset.forEach((agg => {
774
- newCellAggregator && subTotalAggregators.has(agg) && agg.push(newCellAggregator),
775
- agg.recalculate();
776
- }));
777
779
  }
778
780
  changeRecordFieldValue(fieldName, oldValue, value) {
779
781
  let isIndicatorName = !1;