@visactor/vtable-sheet 1.22.13-alpha.6 → 1.22.13-alpha.8

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.
package/cjs/index.d.ts CHANGED
@@ -2,5 +2,5 @@ import VTableSheet from './components/vtable-sheet';
2
2
  import type { ISheetDefine, IVTableSheetOptions } from './ts-types';
3
3
  import * as TYPES from './ts-types';
4
4
  import * as VTable from './vtable';
5
- export declare const version = "1.22.13-alpha.6";
5
+ export declare const version = "1.22.13-alpha.8";
6
6
  export { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions };
package/cjs/index.js CHANGED
@@ -47,4 +47,4 @@ exports.VTable = VTable;
47
47
 
48
48
  const style_manager_1 = require("./styles/style-manager");
49
49
 
50
- exports.version = "1.22.13-alpha.6", (0, style_manager_1.importStyles)();
50
+ exports.version = "1.22.13-alpha.8", (0, style_manager_1.importStyles)();
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.22.13-alpha.6\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions };\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.22.13-alpha.8\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions };\n"]}
@@ -60255,11 +60255,11 @@
60255
60255
  onUpdate(end, ratio, out) {
60256
60256
  if (this.from.x !== this.to.x) {
60257
60257
  const x = end ? this.to.x : this.from.x + Math.floor((this.to.x - this.from.x) * ratio);
60258
- this.params.table.scrollLeft = x;
60258
+ this.params.table.scrollLeft = x, 1 === ratio && -1 !== this.to.targetCol && this.params.table.scrollToCol(this.to.targetCol, !1);
60259
60259
  }
60260
60260
  if (this.from.y !== this.to.y) {
60261
60261
  const y = end ? this.to.y : this.from.y + Math.floor((this.to.y - this.from.y) * ratio);
60262
- this.params.table.scrollTop = y;
60262
+ this.params.table.scrollTop = y, 1 === ratio && -1 !== this.to.targetRow && this.params.table.scrollToRow(this.to.targetRow, !1);
60263
60263
  }
60264
60264
  }
60265
60265
  }
@@ -60291,7 +60291,9 @@
60291
60291
  colDecimal && (left += colDecimal * cellRect.width), rowDecimal && (top += rowDecimal * cellRect.height);
60292
60292
  const to = {
60293
60293
  x: isNumber$2(col) ? left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
60294
- y: isNumber$2(row) ? top - this.table.getFrozenRowsHeight() : this.table.scrollTop
60294
+ y: isNumber$2(row) ? top - this.table.getFrozenRowsHeight() : this.table.scrollTop,
60295
+ targetCol: null != colInt ? colInt : -1,
60296
+ targetRow: null != rowInt ? rowInt : -1
60295
60297
  },
60296
60298
  duration = isBoolean$2(animationOption) ? animationOption ? 3e3 : 0 : null !== (_a = null == animationOption ? void 0 : animationOption.duration) && void 0 !== _a ? _a : 3e3,
60297
60299
  easing = isBoolean$2(animationOption) ? animationOption ? "linear" : "" : null !== (_b = null == animationOption ? void 0 : animationOption.easing) && void 0 !== _b ? _b : "linear";
@@ -60378,7 +60380,7 @@
60378
60380
  }
60379
60381
  constructor(container, options = {}) {
60380
60382
  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;
60381
- if (super(), this.showFrozenIcon = !0, this.version = "1.22.13-alpha.6", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env$1.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
60383
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.13-alpha.8", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env$1.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
60382
60384
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
60383
60385
  options: options,
60384
60386
  container: container
@@ -62496,7 +62498,7 @@
62496
62498
  }
62497
62499
  if (isValid$2(cellAddr.row) && cellAddr.row >= this.frozenRowCount) {
62498
62500
  const frozenHeight = this.getFrozenRowsHeight(),
62499
- top = this.getRowsHeight(0, cellAddr.row - 1);
62501
+ top = this.internalProps._rowHeightsMap.getSumInRange(0, cellAddr.row - 1);
62500
62502
  this.scrollTop = Math.min(top - frozenHeight, this.getAllRowsHeight() - drawRange.height);
62501
62503
  }
62502
62504
  this.render();
@@ -91475,7 +91477,7 @@
91475
91477
  importStyle();
91476
91478
  }
91477
91479
 
91478
- const version = "1.22.13-alpha.6";
91480
+ const version = "1.22.13-alpha.8";
91479
91481
  importStyles();
91480
91482
 
91481
91483
  exports.TYPES = index;