@visactor/vtable 1.22.7-alpha.4 → 1.22.7-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.
Files changed (57) hide show
  1. package/cjs/ListTable.js +5 -2
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/core/BaseTable.d.ts +2 -2
  4. package/cjs/core/BaseTable.js +9 -7
  5. package/cjs/core/BaseTable.js.map +1 -1
  6. package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
  7. package/cjs/core/TABLE_EVENT_TYPE.js +3 -1
  8. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  9. package/cjs/index.d.ts +1 -1
  10. package/cjs/index.js +1 -1
  11. package/cjs/index.js.map +1 -1
  12. package/cjs/plugins/plugin-manager.d.ts +2 -0
  13. package/cjs/plugins/plugin-manager.js +13 -6
  14. package/cjs/plugins/plugin-manager.js.map +1 -1
  15. package/cjs/scenegraph/graphic/active-cell-chart-list.js +45 -63
  16. package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  17. package/cjs/scenegraph/graphic/chart.js +3 -10
  18. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  19. package/cjs/state/state.js +9 -9
  20. package/cjs/state/state.js.map +1 -1
  21. package/cjs/ts-types/base-table.d.ts +2 -2
  22. package/cjs/ts-types/base-table.js.map +1 -1
  23. package/cjs/ts-types/events.d.ts +8 -0
  24. package/cjs/ts-types/events.js.map +1 -1
  25. package/cjs/ts-types/table-engine.d.ts +2 -2
  26. package/cjs/ts-types/table-engine.js.map +1 -1
  27. package/cjs/vrender.js.map +1 -1
  28. package/dist/vtable.js +132 -162
  29. package/dist/vtable.min.js +2 -2
  30. package/es/ListTable.js +5 -2
  31. package/es/ListTable.js.map +1 -1
  32. package/es/core/BaseTable.d.ts +2 -2
  33. package/es/core/BaseTable.js +9 -7
  34. package/es/core/BaseTable.js.map +1 -1
  35. package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
  36. package/es/core/TABLE_EVENT_TYPE.js +3 -1
  37. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  38. package/es/index.d.ts +1 -1
  39. package/es/index.js +1 -1
  40. package/es/index.js.map +1 -1
  41. package/es/plugins/plugin-manager.d.ts +2 -0
  42. package/es/plugins/plugin-manager.js +13 -6
  43. package/es/plugins/plugin-manager.js.map +1 -1
  44. package/es/scenegraph/graphic/active-cell-chart-list.js +45 -63
  45. package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  46. package/es/scenegraph/graphic/chart.js +3 -10
  47. package/es/scenegraph/graphic/chart.js.map +1 -1
  48. package/es/state/state.js +9 -9
  49. package/es/state/state.js.map +1 -1
  50. package/es/ts-types/base-table.d.ts +2 -2
  51. package/es/ts-types/base-table.js.map +1 -1
  52. package/es/ts-types/events.d.ts +8 -0
  53. package/es/ts-types/events.js.map +1 -1
  54. package/es/ts-types/table-engine.d.ts +2 -2
  55. package/es/ts-types/table-engine.js.map +1 -1
  56. package/es/vrender.js.map +1 -1
  57. package/package.json +7 -7
@@ -238,11 +238,11 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
238
238
  rowEnd: number;
239
239
  colEnd: number;
240
240
  };
241
- getBodyVisibleRowRange(start_deltaY?: number, end_deltaY?: number): {
241
+ getBodyVisibleRowRange(deltaY?: number): {
242
242
  rowStart: number;
243
243
  rowEnd: number;
244
244
  };
245
- getBodyVisibleColRange(start_deltaX?: number, end_deltaX?: number): {
245
+ getBodyVisibleColRange(deltaX?: number): {
246
246
  colStart: number;
247
247
  colEnd: number;
248
248
  };
@@ -90,7 +90,7 @@ export class BaseTable extends EventTarget {
90
90
  }
91
91
  constructor(container, options = {}) {
92
92
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
93
- if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.4", this.id = `VTable${Date.now()}`,
93
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.6", this.id = `VTable${Date.now()}`,
94
94
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
95
95
  "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
96
96
  container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
@@ -719,11 +719,13 @@ export class BaseTable extends EventTarget {
719
719
  this.colContentWidthsMap.put(col, width);
720
720
  }
721
721
  getAllRowsHeight() {
722
- if (this.internalProps.rowCount <= 0) return 0;
722
+ var _a;
723
+ if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.rowCount) || this.internalProps.rowCount <= 0) return 0;
723
724
  return this.getRowsHeight(0, this.internalProps.rowCount - 1);
724
725
  }
725
726
  getAllColsWidth() {
726
- if (this.internalProps.colCount <= 0) return 0;
727
+ var _a;
728
+ if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.colCount) || this.internalProps.colCount <= 0) return 0;
727
729
  return this.getColsWidth(0, this.internalProps.colCount - 1);
728
730
  }
729
731
  getColsWidths() {
@@ -910,15 +912,15 @@ export class BaseTable extends EventTarget {
910
912
  colEnd: colEnd
911
913
  };
912
914
  }
913
- getBodyVisibleRowRange(start_deltaY = 0, end_deltaY = 0) {
914
- const {scrollTop: scrollTop} = this, frozenRowsHeight = this.getFrozenRowsHeight(), bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(), {row: rowStart} = this.getRowAt(scrollTop + frozenRowsHeight + 1 + start_deltaY), rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY).row : this.rowCount - 1;
915
+ getBodyVisibleRowRange(deltaY = 0) {
916
+ const {scrollTop: scrollTop} = this, frozenRowsHeight = this.getFrozenRowsHeight(), bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(), {row: rowStart} = this.getRowAt(scrollTop + frozenRowsHeight + 1), rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + deltaY).row : this.rowCount - 1;
915
917
  return rowEnd < 0 ? null : {
916
918
  rowStart: rowStart,
917
919
  rowEnd: rowEnd
918
920
  };
919
921
  }
920
- getBodyVisibleColRange(start_deltaX = 0, end_deltaX = 0) {
921
- const {scrollLeft: scrollLeft} = this, frozenColsWidth = this.getFrozenColsWidth(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), {col: colStart} = this.getColAt(scrollLeft + frozenColsWidth + 1 + start_deltaX), colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
922
+ getBodyVisibleColRange(deltaX = 0) {
923
+ const {scrollLeft: scrollLeft} = this, frozenColsWidth = this.getFrozenColsWidth(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), {col: colStart} = this.getColAt(scrollLeft + frozenColsWidth + 1), colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + deltaX).col : this.colCount - 1;
922
924
  return colEnd < 0 ? null : {
923
925
  colStart: colStart,
924
926
  colEnd: colEnd