@visactor/vtable 1.22.9-alpha.2 → 1.22.9-alpha.4

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 (63) hide show
  1. package/cjs/ListTable.js +7 -4
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotTable.js +10 -7
  4. package/cjs/PivotTable.js.map +1 -1
  5. package/cjs/body-helper/style.js +2 -1
  6. package/cjs/core/BaseTable.js +3 -5
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/dataset/dataset.js +8 -2
  9. package/cjs/dataset/dataset.js.map +1 -1
  10. package/cjs/edit/edit-manager.d.ts +3 -2
  11. package/cjs/edit/edit-manager.js +36 -6
  12. package/cjs/edit/edit-manager.js.map +1 -1
  13. package/cjs/event/listener/container-dom.js +15 -7
  14. package/cjs/event/listener/container-dom.js.map +1 -1
  15. package/cjs/index.d.ts +1 -1
  16. package/cjs/index.js +1 -1
  17. package/cjs/index.js.map +1 -1
  18. package/cjs/layout/index.js +1 -2
  19. package/cjs/layout/pivot-header-layout.js +1 -1
  20. package/cjs/layout/row-height-map.js +1 -1
  21. package/cjs/layout/simple-header-layout.js +1 -1
  22. package/cjs/layout/tree-helper.js +1 -1
  23. package/cjs/plugins/custom-cell-style.js +2 -1
  24. package/cjs/plugins/interface.js +1 -1
  25. package/cjs/plugins/invert-highlight.js +1 -1
  26. package/cjs/plugins/list-tree-stick-cell.js +1 -1
  27. package/cjs/plugins/plugin-manager.js +1 -1
  28. package/cjs/scenegraph/component/menu.d.ts +1 -1
  29. package/cjs/scenegraph/utils/text-measure.d.ts +1 -1
  30. package/cjs/vrender.js.map +1 -1
  31. package/dist/vtable.js +2902 -4543
  32. package/dist/vtable.min.js +2 -2
  33. package/es/ListTable.js +7 -4
  34. package/es/ListTable.js.map +1 -1
  35. package/es/PivotTable.js +10 -7
  36. package/es/PivotTable.js.map +1 -1
  37. package/es/body-helper/style.js +2 -1
  38. package/es/core/BaseTable.js +3 -5
  39. package/es/core/BaseTable.js.map +1 -1
  40. package/es/dataset/dataset.js +8 -2
  41. package/es/dataset/dataset.js.map +1 -1
  42. package/es/edit/edit-manager.d.ts +3 -2
  43. package/es/edit/edit-manager.js +36 -6
  44. package/es/edit/edit-manager.js.map +1 -1
  45. package/es/event/listener/container-dom.js +15 -7
  46. package/es/event/listener/container-dom.js.map +1 -1
  47. package/es/index.d.ts +1 -1
  48. package/es/index.js +1 -1
  49. package/es/index.js.map +1 -1
  50. package/es/layout/index.js +1 -2
  51. package/es/layout/pivot-header-layout.js +1 -1
  52. package/es/layout/row-height-map.js +1 -1
  53. package/es/layout/simple-header-layout.js +1 -1
  54. package/es/layout/tree-helper.js +1 -1
  55. package/es/plugins/custom-cell-style.js +2 -1
  56. package/es/plugins/interface.js +1 -1
  57. package/es/plugins/invert-highlight.js +1 -1
  58. package/es/plugins/list-tree-stick-cell.js +1 -1
  59. package/es/plugins/plugin-manager.js +1 -1
  60. package/es/scenegraph/component/menu.d.ts +1 -1
  61. package/es/scenegraph/utils/text-measure.d.ts +1 -1
  62. package/es/vrender.js.map +1 -1
  63. package/package.json +12 -12
@@ -363,8 +363,14 @@ class Dataset {
363
363
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
364
364
  const indicatorIndex = this.indicatorKeys.indexOf(indicator);
365
365
  let rowDimensionKey, colDimensionKey, flatRowKey, flatColKey;
366
- rowDimensionKey = "row" === (null == indicatorPosition ? void 0 : indicatorPosition.position) ? rowKey.length >= 2 ? this.rows[rowKey.length - 2] : void 0 : this.rows[rowKey.length - 1],
367
- colDimensionKey = "col" === (null == indicatorPosition ? void 0 : indicatorPosition.position) ? colKey.length >= 2 ? this.columns[colKey.length - 2] : void 0 : this.columns[colKey.length - 1],
366
+ if ("row" === (null == indicatorPosition ? void 0 : indicatorPosition.position)) rowDimensionKey = rowKey.length >= 2 ? this.rows[rowKey.length - 2] : void 0; else {
367
+ const rowIndex = rowKey.length - 1;
368
+ rowDimensionKey = rowIndex >= 0 && rowIndex < this.rows.length ? this.rows[rowIndex] : void 0;
369
+ }
370
+ if ("col" === (null == indicatorPosition ? void 0 : indicatorPosition.position)) colDimensionKey = colKey.length >= 2 ? this.columns[colKey.length - 2] : void 0; else {
371
+ const colIndex = colKey.length - 1;
372
+ colDimensionKey = colIndex >= 0 && colIndex < this.columns.length ? this.columns[colIndex] : void 0;
373
+ }
368
374
  "string" == typeof rowKey ? flatRowKey = rowKey : (indicatorPosition && "row" !== indicatorPosition.position || rowKey.map(((key, i) => {
369
375
  key !== indicator || (0, vutils_1.isValid)(null == indicatorPosition ? void 0 : indicatorPosition.index) && i !== indicatorPosition.index || rowKey.splice(i, 1);
370
376
  })), rowKey.length < this.rows.length && "grid-tree" === this.rowHierarchyType && (rowKey[0] === this.rowGrandTotalLabel || (null === (_b = null === (_a = this.totals) || void 0 === _a ? void 0 : _a.row) || void 0 === _b ? void 0 : _b.subTotalsDimensions) && (null === (_e = null === (_d = null === (_c = this.totals) || void 0 === _c ? void 0 : _c.row) || void 0 === _d ? void 0 : _d.subTotalsDimensions) || void 0 === _e ? void 0 : _e.length) >= 1 && rowKey[rowKey.length - 1] !== this.rowSubTotalLabel && this.totals.row.subTotalsDimensions.find((dimension => dimension === rowDimensionKey)) && rowKey.push(this.rowSubTotalLabel)),