@visactor/vtable-calendar 1.19.7 → 1.19.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.
@@ -43689,7 +43689,7 @@
43689
43689
  textAlign,
43690
43690
  textBaseline,
43691
43691
  y = 0;
43692
- columnGroup.lastChild && columnGroup.lastChild.row === rowStart - 1 ? y = columnGroup.lastChild.attribute.y + columnGroup.lastChild.attribute.height : columnGroup.colHeight && (y = columnGroup.colHeight);
43692
+ columnGroup.lastChild && columnGroup.lastChild.row === rowStart - 1 ? y = columnGroup.lastChild.attribute.y + columnGroup.lastChild.attribute.height : columnGroup.colHeight ? y = columnGroup.colHeight : rowStart >= table.columnHeaderLevelCount && rowStart < table.rowCount - table.bottomFrozenRowCount && (y = table.getRowsHeight(table.columnHeaderLevelCount, rowStart - 1));
43693
43693
  for (let j = rowStart; j <= rowEnd; j++) {
43694
43694
  const row = j;
43695
43695
  let range,
@@ -49827,25 +49827,40 @@
49827
49827
  col: col,
49828
49828
  row: row
49829
49829
  } = eventArgsSet.eventArgs;
49830
- if (table.hasListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL)) {
49831
- const cellInfo = table.getCellInfo(col, row);
49832
- let icon, position;
49833
- if (null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) {
49834
- const iconInfo = getIconAndPositionFromTarget(null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target);
49835
- iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
49830
+ if (col >= 0 && row >= 0) {
49831
+ const ranges = table.getSelectedCellRanges();
49832
+ let cellInRange = !1;
49833
+ if (ranges.length > 0) for (let i = 0; i < ranges.length; i++) {
49834
+ const range = ranges[i],
49835
+ startCol = range.start.col,
49836
+ endCol = range.end.col,
49837
+ startRow = range.start.row,
49838
+ endRow = range.end.row;
49839
+ if (col >= startCol && col <= endCol && row >= startRow && row <= endRow || col >= endCol && col <= startCol && row >= endRow && row <= startRow || col >= startCol && col <= endCol && row >= endRow && row <= startRow || col >= endCol && col <= startCol && row >= startRow && row <= endRow) {
49840
+ cellInRange = !0;
49841
+ break;
49842
+ }
49843
+ }
49844
+ if (cellInRange || table.selectCell(col, row), table.hasListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL)) {
49845
+ const cellInfo = table.getCellInfo(col, row);
49846
+ let icon, position;
49847
+ if (null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) {
49848
+ const iconInfo = getIconAndPositionFromTarget(null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target);
49849
+ iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
49850
+ }
49851
+ const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
49852
+ event: e.nativeEvent,
49853
+ cells: [],
49854
+ targetIcon: icon ? {
49855
+ name: icon.name,
49856
+ position: position,
49857
+ funcType: icon.attribute.funcType
49858
+ } : void 0,
49859
+ target: null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target,
49860
+ mergeCellInfo: null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.mergeInfo
49861
+ });
49862
+ (null === (_f = null === (_e = table.options.eventOptions) || void 0 === _e ? void 0 : _e.contextmenuReturnAllSelectedCells) || void 0 === _f || _f) && (cellInRanges(table.stateManager.select.ranges, col, row) ? cellsEvent.cells = table.getSelectedCellInfos() : cellsEvent.cells = [[cellInfo]]), table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
49836
49863
  }
49837
- const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
49838
- event: e.nativeEvent,
49839
- cells: [],
49840
- targetIcon: icon ? {
49841
- name: icon.name,
49842
- position: position,
49843
- funcType: icon.attribute.funcType
49844
- } : void 0,
49845
- target: null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target,
49846
- mergeCellInfo: null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.mergeInfo
49847
- });
49848
- (null === (_f = null === (_e = table.options.eventOptions) || void 0 === _e ? void 0 : _e.contextmenuReturnAllSelectedCells) || void 0 === _f || _f) && (cellInRanges(table.stateManager.select.ranges, col, row) ? cellsEvent.cells = table.getSelectedCellInfos() : cellsEvent.cells = [[cellInfo]]), table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
49849
49864
  }
49850
49865
  }
49851
49866
  }), table.scenegraph.tableGroup.addEventListener("pointertap", e => {
@@ -50919,29 +50934,6 @@
50919
50934
  });
50920
50935
  }
50921
50936
 
50922
- function rightButtonClickEvent(table) {
50923
- table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, e => {
50924
- const {
50925
- col: col,
50926
- row: row
50927
- } = e,
50928
- ranges = table.getSelectedCellRanges();
50929
- let cellInRange = !1;
50930
- if (ranges.length > 0) for (let i = 0; i < ranges.length; i++) {
50931
- const range = ranges[i],
50932
- startCol = range.start.col,
50933
- endCol = range.end.col,
50934
- startRow = range.start.row,
50935
- endRow = range.end.row;
50936
- if (col >= startCol && col <= endCol && row >= startRow && row <= endRow || col >= endCol && col <= startCol && row >= endRow && row <= startRow || col >= startCol && col <= endCol && row >= endRow && row <= startRow || col >= endCol && col <= startCol && row >= startRow && row <= endRow) {
50937
- cellInRange = !0;
50938
- break;
50939
- }
50940
- }
50941
- cellInRange || table.selectCell(col, row);
50942
- });
50943
- }
50944
-
50945
50937
  class EventManager {
50946
50938
  constructor(table) {
50947
50939
  this.isDown = !1, this.isDraging = !1, this.globalEventListeners = [], this._enableTableScroll = !0, this.table = table, this.handleTextStickBindId = [], this.inertiaScroll = new InertiaScroll(table.stateManager), "node" === Env.mode || table.options.disableInteraction || (this.bindOuterEvent(), setTimeout(() => {
@@ -50966,7 +50958,7 @@
50966
50958
  }, 0);
50967
50959
  }
50968
50960
  bindSelfEvent() {
50969
- this.table.isReleased || (bindIconClickEvent(this.table), bindDropdownMenuEvent(this.table), this.updateEventBinder(), bindMediaClick(this.table), bindDBClickAutoColumnWidthEvent(this.table), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table), bindGroupCheckboxTreeChange(this.table), bindHeaderCheckboxChange(this.table), bindButtonClickEvent(this.table), rightButtonClickEvent(this.table));
50961
+ this.table.isReleased || (bindIconClickEvent(this.table), bindDropdownMenuEvent(this.table), this.updateEventBinder(), bindMediaClick(this.table), bindDBClickAutoColumnWidthEvent(this.table), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table), bindGroupCheckboxTreeChange(this.table), bindHeaderCheckboxChange(this.table), bindButtonClickEvent(this.table));
50970
50962
  }
50971
50963
  dealTableHover(eventArgsSet) {
50972
50964
  if (!eventArgsSet) return void this.table.stateManager.updateHoverPos(-1, -1);
@@ -53790,7 +53782,7 @@
53790
53782
  }
53791
53783
  constructor(container, options = {}) {
53792
53784
  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;
53793
- if (super(), this.showFrozenIcon = !0, this.version = "1.19.7", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.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");
53785
+ if (super(), this.showFrozenIcon = !0, this.version = "1.19.8", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.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");
53794
53786
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
53795
53787
  options: options,
53796
53788
  container: container