@visactor/vtable 1.26.2 → 1.26.3

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 (71) hide show
  1. package/cjs/PivotTable.js +7 -6
  2. package/cjs/PivotTable.js.map +1 -1
  3. package/cjs/body-helper/style.js +2 -1
  4. package/cjs/core/BaseTable.js +8 -9
  5. package/cjs/core/BaseTable.js.map +1 -1
  6. package/cjs/dataset/DataStatistics.js +1 -2
  7. package/cjs/edit/edit-manager.js +1 -0
  8. package/cjs/event/listener/table-group.js +52 -52
  9. package/cjs/event/listener/table-group.js.map +1 -1
  10. package/cjs/index.d.ts +1 -1
  11. package/cjs/index.js +1 -1
  12. package/cjs/index.js.map +1 -1
  13. package/cjs/layout/pivot-header-layout.d.ts +2 -2
  14. package/cjs/scenegraph/component/custom.js +2 -2
  15. package/cjs/scenegraph/component/custom.js.map +1 -1
  16. package/cjs/scenegraph/component/table-component.js +41 -50
  17. package/cjs/scenegraph/component/table-component.js.map +1 -1
  18. package/cjs/scenegraph/component/util.d.ts +1 -0
  19. package/cjs/scenegraph/component/util.js +9 -1
  20. package/cjs/scenegraph/component/util.js.map +1 -1
  21. package/cjs/scenegraph/layout/compute-col-width.js +1 -1
  22. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  23. package/cjs/scenegraph/layout/compute-row-height.js +1 -1
  24. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  25. package/cjs/scenegraph/layout/frozen.js +7 -3
  26. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  27. package/cjs/scenegraph/scenegraph.js +5 -3
  28. package/cjs/scenegraph/scenegraph.js.map +1 -1
  29. package/cjs/scenegraph/utils/padding.d.ts +5 -2
  30. package/cjs/scenegraph/utils/padding.js +16 -13
  31. package/cjs/scenegraph/utils/padding.js.map +1 -1
  32. package/cjs/state/state.js +15 -15
  33. package/cjs/state/state.js.map +1 -1
  34. package/cjs/vrender.js.map +1 -1
  35. package/dist/vtable.js +169 -115
  36. package/dist/vtable.min.js +1 -1
  37. package/es/PivotTable.js +7 -6
  38. package/es/PivotTable.js.map +1 -1
  39. package/es/body-helper/style.js +2 -1
  40. package/es/core/BaseTable.js +8 -9
  41. package/es/core/BaseTable.js.map +1 -1
  42. package/es/dataset/DataStatistics.js +1 -2
  43. package/es/edit/edit-manager.js +2 -1
  44. package/es/event/listener/table-group.js +52 -52
  45. package/es/event/listener/table-group.js.map +1 -1
  46. package/es/index.d.ts +1 -1
  47. package/es/index.js +1 -1
  48. package/es/index.js.map +1 -1
  49. package/es/layout/pivot-header-layout.d.ts +2 -2
  50. package/es/scenegraph/component/custom.js +2 -2
  51. package/es/scenegraph/component/custom.js.map +1 -1
  52. package/es/scenegraph/component/table-component.js +41 -51
  53. package/es/scenegraph/component/table-component.js.map +1 -1
  54. package/es/scenegraph/component/util.d.ts +1 -0
  55. package/es/scenegraph/component/util.js +6 -0
  56. package/es/scenegraph/component/util.js.map +1 -1
  57. package/es/scenegraph/layout/compute-col-width.js +1 -1
  58. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  59. package/es/scenegraph/layout/compute-row-height.js +1 -1
  60. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  61. package/es/scenegraph/layout/frozen.js +7 -3
  62. package/es/scenegraph/layout/frozen.js.map +1 -1
  63. package/es/scenegraph/scenegraph.js +5 -3
  64. package/es/scenegraph/scenegraph.js.map +1 -1
  65. package/es/scenegraph/utils/padding.d.ts +5 -2
  66. package/es/scenegraph/utils/padding.js +13 -9
  67. package/es/scenegraph/utils/padding.js.map +1 -1
  68. package/es/state/state.js +15 -13
  69. package/es/state/state.js.map +1 -1
  70. package/es/vrender.js.map +1 -1
  71. package/package.json +2 -2
@@ -49,4 +49,5 @@ function of(columnStyle, bodyStyle, styleArg, StyleClassDef = Style_1.Style, glo
49
49
  StyleClassDef === CheckboxStyle_1.CheckboxStyle ? new CheckboxStyle_1.CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : StyleClassDef === RadioStyle_1.RadioStyle ? new RadioStyle_1.RadioStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_b = theme.radioStyle) && void 0 !== _b ? _b : {}) : StyleClassDef === SwitchStyle_1.SwitchStyle ? new SwitchStyle_1.SwitchStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_c = theme.switchStyle) && void 0 !== _c ? _c : {}) : StyleClassDef === ButtonStyle_1.ButtonStyle ? new ButtonStyle_1.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;
50
50
  }
51
51
 
52
- exports.EVENT_TYPE = EVENT_TYPE, exports.of = of;
52
+ exports.EVENT_TYPE = EVENT_TYPE, exports.of = of;
53
+ //# sourceMappingURL=style.js.map
@@ -45,7 +45,7 @@ class BaseTable extends EventTarget_1.EventTarget {
45
45
  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;
46
46
  if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0,
47
47
  this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0,
48
- this.version = "1.26.2", this.id = `VTable${Date.now()}`, this.isReleased = !1,
48
+ this.version = "1.26.3", this.id = `VTable${Date.now()}`, this.isReleased = !1,
49
49
  this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
50
50
  "undefined" != typeof window) {
51
51
  const g = window;
@@ -2192,16 +2192,16 @@ class BaseTable extends EventTarget_1.EventTarget {
2192
2192
  }
2193
2193
  scrollToRow(row, animationOption) {
2194
2194
  var _a;
2195
- const targetRow = Math.min(Math.max(Math.floor(row), 0), this.rowCount - 1);
2195
+ const targetRow = Math.min(Math.max(row, 0), this.rowCount - 1), targetRowInt = Math.floor(targetRow);
2196
2196
  if (this.clearCorrectTimer(), !animationOption) return this.scrollToCell({
2197
- row: targetRow
2198
- }), void this._scheduleScrollToRowCorrect(targetRow);
2197
+ row: targetRowInt
2198
+ }), void this._scheduleScrollToRowCorrect(targetRowInt);
2199
2199
  const duration = (0, vutils_1.isBoolean)(animationOption) ? 3e3 : null !== (_a = null == animationOption ? void 0 : animationOption.duration) && void 0 !== _a ? _a : 3e3;
2200
2200
  this.animationManager.scrollTo({
2201
2201
  row: targetRow
2202
- }, animationOption), this._scrollToRowCorrectTimer = setTimeout((() => {
2203
- this.scrollToRow(targetRow, !1);
2204
- }), duration);
2202
+ }, animationOption), targetRowInt === targetRow && (this._scrollToRowCorrectTimer = setTimeout((() => {
2203
+ this.scrollToRow(targetRowInt, !1);
2204
+ }), duration));
2205
2205
  }
2206
2206
  scrollToCol(col, animationOption) {
2207
2207
  animationOption ? this.animationManager.scrollTo({
@@ -2272,5 +2272,4 @@ class BaseTable extends EventTarget_1.EventTarget {
2272
2272
  }
2273
2273
  }
2274
2274
 
2275
- exports.BaseTable = BaseTable;
2276
- //# sourceMappingURL=BaseTable.js.map
2275
+ exports.BaseTable = BaseTable;