@visactor/vtable 1.22.7-alpha.3 → 1.22.7-alpha.5

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 (77) hide show
  1. package/cjs/ListTable.js +2 -3
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/body-helper/body-helper.js +1 -2
  4. package/cjs/body-helper/style.js +2 -1
  5. package/cjs/core/BaseTable.d.ts +2 -2
  6. package/cjs/core/BaseTable.js +7 -9
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/core/TABLE_EVENT_TYPE.d.ts +0 -2
  9. package/cjs/core/TABLE_EVENT_TYPE.js +1 -3
  10. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  11. package/cjs/dataset/dataset-pivot-table.js +2 -1
  12. package/cjs/dataset/flatDataToObject.js +1 -2
  13. package/cjs/header-helper/header-helper.js +1 -1
  14. package/cjs/header-helper/style.js +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 +2 -1
  19. package/cjs/layout/simple-header-layout.js +1 -1
  20. package/cjs/layout/tree-helper.js +1 -1
  21. package/cjs/plugins/interface.js +1 -2
  22. package/cjs/plugins/invert-highlight.js +1 -1
  23. package/cjs/plugins/list-tree-stick-cell.js +1 -1
  24. package/cjs/plugins/plugin-manager.d.ts +0 -2
  25. package/cjs/plugins/plugin-manager.js +7 -14
  26. package/cjs/plugins/plugin-manager.js.map +1 -1
  27. package/cjs/scenegraph/graphic/active-cell-chart-list.js +63 -45
  28. package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  29. package/cjs/scenegraph/graphic/chart.js +10 -3
  30. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  31. package/cjs/ts-types/base-table.d.ts +2 -2
  32. package/cjs/ts-types/base-table.js.map +1 -1
  33. package/cjs/ts-types/events.d.ts +0 -8
  34. package/cjs/ts-types/events.js.map +1 -1
  35. package/cjs/ts-types/table-engine.d.ts +2 -2
  36. package/cjs/ts-types/table-engine.js.map +1 -1
  37. package/cjs/vrender.js.map +1 -1
  38. package/dist/vtable.js +153 -117
  39. package/dist/vtable.min.js +2 -2
  40. package/es/ListTable.js +2 -3
  41. package/es/ListTable.js.map +1 -1
  42. package/es/body-helper/body-helper.js +1 -2
  43. package/es/body-helper/style.js +2 -1
  44. package/es/core/BaseTable.d.ts +2 -2
  45. package/es/core/BaseTable.js +7 -9
  46. package/es/core/BaseTable.js.map +1 -1
  47. package/es/core/TABLE_EVENT_TYPE.d.ts +0 -2
  48. package/es/core/TABLE_EVENT_TYPE.js +1 -3
  49. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  50. package/es/dataset/dataset-pivot-table.js +2 -1
  51. package/es/dataset/flatDataToObject.js +1 -2
  52. package/es/header-helper/header-helper.js +1 -1
  53. package/es/header-helper/style.js +1 -1
  54. package/es/index.d.ts +1 -1
  55. package/es/index.js +1 -1
  56. package/es/index.js.map +1 -1
  57. package/es/layout/index.js +2 -1
  58. package/es/layout/simple-header-layout.js +1 -1
  59. package/es/layout/tree-helper.js +1 -1
  60. package/es/plugins/interface.js +1 -2
  61. package/es/plugins/invert-highlight.js +1 -1
  62. package/es/plugins/list-tree-stick-cell.js +1 -1
  63. package/es/plugins/plugin-manager.d.ts +0 -2
  64. package/es/plugins/plugin-manager.js +7 -14
  65. package/es/plugins/plugin-manager.js.map +1 -1
  66. package/es/scenegraph/graphic/active-cell-chart-list.js +63 -45
  67. package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  68. package/es/scenegraph/graphic/chart.js +10 -3
  69. package/es/scenegraph/graphic/chart.js.map +1 -1
  70. package/es/ts-types/base-table.d.ts +2 -2
  71. package/es/ts-types/base-table.js.map +1 -1
  72. package/es/ts-types/events.d.ts +0 -8
  73. package/es/ts-types/events.js.map +1 -1
  74. package/es/ts-types/table-engine.d.ts +2 -2
  75. package/es/ts-types/table-engine.js.map +1 -1
  76. package/es/vrender.js.map +1 -1
  77. package/package.json +9 -9
@@ -108,5 +108,4 @@ export class BodyHelper {
108
108
  var _a, _b;
109
109
  return this.expandIcon.width + (null !== (_a = this.expandIcon.marginLeft) && void 0 !== _a ? _a : 0) + (null !== (_b = this.expandIcon.marginRight) && void 0 !== _b ? _b : 0);
110
110
  }
111
- }
112
- //# sourceMappingURL=body-helper.js.map
111
+ }
@@ -25,4 +25,5 @@ export function of(columnStyle, bodyStyle, styleArg, StyleClassDef = Style, glob
25
25
  return columnStyle || bodyStyle ? columnStyle instanceof Style ? columnStyle : "function" == typeof columnStyle ? of(columnStyle(styleArg), bodyStyle, styleArg, StyleClassDef, globalAutoWrapText, theme) : (columnStyle || (columnStyle = {}),
26
26
  globalAutoWrapText && !isValid(columnStyle.autoWrapText) && (columnStyle.autoWrapText = !0),
27
27
  StyleClassDef === CheckboxStyle ? new CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : StyleClassDef === RadioStyle ? new RadioStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_b = theme.radioStyle) && void 0 !== _b ? _b : {}) : StyleClassDef === SwitchStyle ? new SwitchStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_c = theme.switchStyle) && void 0 !== _c ? _c : {}) : StyleClassDef === ButtonStyle ? new ButtonStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_d = theme.buttonStyle) && void 0 !== _d ? _d : {}) : new StyleClassDef(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {})) : StyleClassDef.DEFAULT;
28
- }
28
+ }
29
+ //# sourceMappingURL=style.js.map
@@ -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(deltaY?: number): {
241
+ getBodyVisibleRowRange(start_deltaY?: number, end_deltaY?: number): {
242
242
  rowStart: number;
243
243
  rowEnd: number;
244
244
  };
245
- getBodyVisibleColRange(deltaX?: number): {
245
+ getBodyVisibleColRange(start_deltaX?: number, end_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.3", this.id = `VTable${Date.now()}`,
93
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.5", 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,13 +719,11 @@ export class BaseTable extends EventTarget {
719
719
  this.colContentWidthsMap.put(col, width);
720
720
  }
721
721
  getAllRowsHeight() {
722
- var _a;
723
- if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.rowCount) || this.internalProps.rowCount <= 0) return 0;
722
+ if (this.internalProps.rowCount <= 0) return 0;
724
723
  return this.getRowsHeight(0, this.internalProps.rowCount - 1);
725
724
  }
726
725
  getAllColsWidth() {
727
- var _a;
728
- if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.colCount) || this.internalProps.colCount <= 0) return 0;
726
+ if (this.internalProps.colCount <= 0) return 0;
729
727
  return this.getColsWidth(0, this.internalProps.colCount - 1);
730
728
  }
731
729
  getColsWidths() {
@@ -912,15 +910,15 @@ export class BaseTable extends EventTarget {
912
910
  colEnd: colEnd
913
911
  };
914
912
  }
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;
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;
917
915
  return rowEnd < 0 ? null : {
918
916
  rowStart: rowStart,
919
917
  rowEnd: rowEnd
920
918
  };
921
919
  }
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;
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;
924
922
  return colEnd < 0 ? null : {
925
923
  colStart: colStart,
926
924
  colEnd: colEnd