@visactor/vtable-calendar 1.14.4-alpha.1 → 1.14.4-alpha.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.
@@ -30011,7 +30011,7 @@
30011
30011
  return _getIndex(this.currentPagerIndexedData, index);
30012
30012
  }
30013
30013
  getTableIndex(colOrRow) {
30014
- return Array.isArray(colOrRow) ? this.currentPagerIndexedData.findIndex(value => arrayEqual(value, colOrRow)) : this.currentPagerIndexedData.findIndex(value => value === colOrRow);
30014
+ return Array.isArray(colOrRow) ? "tree" === this.rowHierarchyType ? this.currentPagerIndexedData.findIndex(value => arrayEqual(value, colOrRow)) : this.currentPagerIndexedData.findIndex(value => value === colOrRow[0]) : this.currentPagerIndexedData.findIndex(value => value === colOrRow);
30015
30015
  }
30016
30016
  getField(index, field, col, row, table) {
30017
30017
  return this.getOriginalField(_getIndex(this.currentPagerIndexedData, index), field, col, row, table);
@@ -46622,10 +46622,6 @@
46622
46622
  }
46623
46623
  }
46624
46624
 
46625
- function getCustomMergeCellFunc(customMergeCell) {
46626
- return isFunction$1(customMergeCell) ? customMergeCell : isArray$1(customMergeCell) ? (col, row) => customMergeCell.find(item => item.range.start.col <= col && item.range.end.col >= col && item.range.start.row <= row && item.range.end.row >= row) : void 0;
46627
- }
46628
-
46629
46625
  const {
46630
46626
  toBoxArray: toBoxArray
46631
46627
  } = style,
@@ -46641,7 +46637,7 @@
46641
46637
  constructor(container) {
46642
46638
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
46643
46639
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
46644
- if (super(), this.showFrozenIcon = !0, this.version = "1.14.4-alpha.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
46640
+ if (super(), this.showFrozenIcon = !0, this.version = "1.14.4-alpha.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
46645
46641
  const {
46646
46642
  frozenColCount = 0,
46647
46643
  frozenRowCount: frozenRowCount,
@@ -46725,7 +46721,7 @@
46725
46721
  }
46726
46722
  this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyMergeTitleCache = new Map(), this.bodyBottomStyleCache = new Map(), internalProps.stick = {
46727
46723
  changedCells: new Map()
46728
- }, internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell);
46724
+ }, internalProps.customMergeCell = options.customMergeCell;
46729
46725
  const CustomCellStylePlugin = Factory.getComponent("customCellStylePlugin");
46730
46726
  CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_j = options.customCellStyle) && void 0 !== _j ? _j : [], null !== (_k = options.customCellStyleArrangement) && void 0 !== _k ? _k : []));
46731
46727
  }
@@ -47478,7 +47474,7 @@
47478
47474
  const MenuHandler = Factory.getComponent("menuHandler");
47479
47475
  internalProps.menuHandler = new MenuHandler(this);
47480
47476
  }
47481
- this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (_l = this.customCellStylePlugin) || void 0 === _l || _l.updateCustomCell(null !== (_m = options.customCellStyle) && void 0 !== _m ? _m : [], null !== (_o = options.customCellStyleArrangement) && void 0 !== _o ? _o : []);
47477
+ this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = options.customMergeCell, null === (_l = this.customCellStylePlugin) || void 0 === _l || _l.updateCustomCell(null !== (_m = options.customCellStyle) && void 0 !== _m ? _m : [], null !== (_o = options.customCellStyleArrangement) && void 0 !== _o ? _o : []);
47482
47478
  }
47483
47479
  renderWithRecreateCells() {
47484
47480
  const oldHoverState = {