@visactor/vtable-calendar 1.15.0 → 1.15.1-alpha.1

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.
@@ -27456,7 +27456,9 @@
27456
27456
  CHANGE_CELL_VALUE: "change_cell_value",
27457
27457
  DRAG_FILL_HANDLE_END: "drag_fill_handle_end",
27458
27458
  MOUSEDOWN_FILL_HANDLE: "mousedown_fill_handle",
27459
- DBLCLICK_FILL_HANDLE: "dblclick_fill_handle"
27459
+ DBLCLICK_FILL_HANDLE: "dblclick_fill_handle",
27460
+ EMPTY_TIP_CLICK: "empty_tip_click",
27461
+ EMPTY_TIP_DBLCLICK: "empty_tip_dblclick"
27460
27462
  };
27461
27463
 
27462
27464
  const judgeType = value => {
@@ -31154,7 +31156,7 @@
31154
31156
  if (super._generateFieldAggragations(), isArray$7(null === (_a = this.dataConfig) || void 0 === _a ? void 0 : _a.groupByRules)) {
31155
31157
  const groupByKeys = this.dataConfig.groupByRules;
31156
31158
  this.groupAggregator = new this.registedAggregators[AggregationType.CUSTOM]({
31157
- dimension: "",
31159
+ field: "",
31158
31160
  aggregationFun: (values, records, field) => {
31159
31161
  const groupMap = new Map(),
31160
31162
  groupResult = [];
@@ -34108,7 +34110,7 @@
34108
34110
  function computeRowsHeight(table, rowStart, rowEnd) {
34109
34111
  let isClearRowRangeHeightsMap = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
34110
34112
  let update = arguments.length > 4 ? arguments[4] : undefined;
34111
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
34113
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
34112
34114
  "undefined" != typeof window && window.performance.now();
34113
34115
  const oldRowHeights = [],
34114
34116
  newHeights = [];
@@ -34199,10 +34201,14 @@
34199
34201
  newRowHeight !== (null !== (_h = oldRowHeights[row]) && void 0 !== _h ? _h : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_j = oldRowHeights[row]) && void 0 !== _j ? _j : table.getRowHeight(row)), !0);
34200
34202
  }
34201
34203
  }
34202
- for (let row = table.scenegraph.proxy.rowStart; row <= table.scenegraph.proxy.rowEnd; row++) {
34204
+ for (let row = 0; row < table.frozenRowCount; row++) {
34203
34205
  const newRowHeight = table.getRowHeight(row);
34204
34206
  newRowHeight !== (null !== (_k = oldRowHeights[row]) && void 0 !== _k ? _k : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_l = oldRowHeights[row]) && void 0 !== _l ? _l : table.getRowHeight(row)), !0);
34205
34207
  }
34208
+ for (let row = table.scenegraph.proxy.rowStart; row <= table.scenegraph.proxy.rowEnd; row++) {
34209
+ const newRowHeight = table.getRowHeight(row);
34210
+ newRowHeight !== (null !== (_m = oldRowHeights[row]) && void 0 !== _m ? _m : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_o = oldRowHeights[row]) && void 0 !== _o ? _o : table.getRowHeight(row)), !0);
34211
+ }
34206
34212
  }
34207
34213
  table.isPivotTable() && (layoutMap.disableUseGetBodyCache(), layoutMap.disableUseHeaderPathCache());
34208
34214
  }
@@ -40489,7 +40495,7 @@
40489
40495
  visible: !0,
40490
40496
  x: this.tableGroup.attribute.width - this.table.getRightFrozenColsWidth(),
40491
40497
  width: this.table.getRightFrozenColsWidth()
40492
- }));
40498
+ })), this.updateDomContainer();
40493
40499
  }
40494
40500
  updateRowHeight(row, detaY, skipTableHeightMap) {
40495
40501
  detaY = Math.round(detaY), updateRowHeight(this, row, detaY, skipTableHeightMap), this.updateContainerHeight(row, detaY);
@@ -40672,7 +40678,7 @@
40672
40678
  }, 0)) : (this._needUpdateContainer = !0, this.updateContainerSync());
40673
40679
  }
40674
40680
  updateContainerSync() {
40675
- this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(), this.updateTableSize(), this.component.updateScrollBar(), this.updateDomContainer(), this.updateNextFrame());
40681
+ this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(), this.updateTableSize(), this.component.updateScrollBar(), this.updateNextFrame());
40676
40682
  }
40677
40683
  updateCellContentWhileResize(col, row) {
40678
40684
  var _a;
@@ -46721,7 +46727,7 @@
46721
46727
  constructor(container) {
46722
46728
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
46723
46729
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
46724
- if (super(), this.showFrozenIcon = !0, this.version = "1.15.0", 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");
46730
+ if (super(), this.showFrozenIcon = !0, this.version = "1.15.1-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");
46725
46731
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
46726
46732
  const {
46727
46733
  frozenColCount = 0,
@@ -53533,10 +53539,23 @@
53533
53539
  _createOrUpdateEmptyTipComponent(attrs) {
53534
53540
  if (this._emptyTipComponent) isEqual(attrs, this._cacheAttrs) || this._emptyTipComponent.setAttributes(attrs);else {
53535
53541
  const emptyTip = new EmptyTip$1(attrs);
53536
- emptyTip.name = "emptyTip", this.table.scenegraph.stage.defaultLayer.appendChild(emptyTip), this._emptyTipComponent = emptyTip;
53542
+ emptyTip.name = "emptyTip", this.table.scenegraph.stage.defaultLayer.appendChild(emptyTip), this._emptyTipComponent = emptyTip, this.bindEvents();
53537
53543
  }
53538
53544
  return this._emptyTipComponent;
53539
53545
  }
53546
+ bindEvents() {
53547
+ this._emptyTipComponent.on("click", e => {
53548
+ const bounds = new AABBBounds();
53549
+ this._emptyTipComponent.forEachChildren(child => {
53550
+ bounds.union(child.globalAABBBounds);
53551
+ }), bounds.contains(e.x, e.y) && this.table.fireListeners("empty_tip_click", e);
53552
+ }), this._emptyTipComponent.on("dblclick", e => {
53553
+ const bounds = new AABBBounds();
53554
+ this._emptyTipComponent.forEachChildren(child => {
53555
+ bounds.union(child.globalAABBBounds);
53556
+ }), bounds.contains(e.x, e.y) && this.table.fireListeners("empty_tip_dblclick", e);
53557
+ });
53558
+ }
53540
53559
  resize() {
53541
53560
  var _a;
53542
53561
  if (!this._emptyTipComponent) return;