@visactor/vtable-calendar 1.11.6-alpha.2 → 1.11.6-alpha.4

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.
@@ -33956,8 +33956,7 @@
33956
33956
  for (let col = 0; col < scene.table.colCount; col++) {
33957
33957
  const distHeight = maxHeight,
33958
33958
  cell = scene.highPerformanceGetCell(col, row);
33959
- if ("empty" === cell.role) return;
33960
- updateCellHeightForRow(scene, cell, col, row, distHeight, distHeight - cell.attribute.height, scene.table.isHeader(col, row));
33959
+ "empty" !== cell.role && updateCellHeightForRow(scene, cell, col, row, distHeight, distHeight - cell.attribute.height, scene.table.isHeader(col, row));
33961
33960
  }
33962
33961
  }
33963
33962
 
@@ -36675,7 +36674,7 @@
36675
36674
  rightBottomCornerGroup: rightBottomCornerGroup
36676
36675
  } = table.scenegraph;
36677
36676
  let distCol, distRow, distColForCompute, distRowForCompute;
36678
- proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || "autoHeight" === table.heightMode) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
36677
+ proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || "autoHeight" === table.heightMode) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
36679
36678
  x: table.getFrozenColsWidth(),
36680
36679
  y: table.getFrozenRowsHeight()
36681
36680
  }), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_d = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : null === (_c = rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.rowNumber) && void 0 !== _d ? _d : proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = null !== (_m = null !== (_k = null !== (_h = null !== (_f = null === (_e = bodyGroup.lastChild) || void 0 === _e ? void 0 : _e.col) && void 0 !== _f ? _f : null === (_g = colHeaderGroup.lastChild) || void 0 === _g ? void 0 : _g.col) && void 0 !== _h ? _h : null === (_j = rowHeaderGroup.lastChild) || void 0 === _j ? void 0 : _j.col) && void 0 !== _k ? _k : null === (_l = cornerHeaderGroup.lastChild) || void 0 === _l ? void 0 : _l.col) && void 0 !== _m ? _m : proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2), proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
@@ -36683,12 +36682,12 @@
36683
36682
 
36684
36683
  function getFirstChild(containerGroup) {
36685
36684
  let child = containerGroup.firstChild;
36686
- for (; "group" !== child.type;) child = child._next;
36685
+ for (; child && "group" !== child.type;) child = child._next;
36687
36686
  return child;
36688
36687
  }
36689
36688
  function getLastChild(containerGroup) {
36690
36689
  let child = containerGroup.lastChild;
36691
- for (; "group" !== child.type;) child = child._prev;
36690
+ for (; child && "group" !== child.type;) child = child._prev;
36692
36691
  return child;
36693
36692
  }
36694
36693
  function getPrevGroup(group) {
@@ -36850,7 +36849,7 @@
36850
36849
  const colGroup = proxy.table.scenegraph.getColGroup(col);
36851
36850
  colGroup && updateColGroupContentAsync(colGroup, proxy);
36852
36851
  }
36853
- proxy.progress();
36852
+ updateColumnContainerWidth(proxy.table.scenegraph.colHeaderGroup), updateColumnContainerWidth(proxy.table.scenegraph.bottomFrozenGroup), updateColumnContainerWidth(proxy.table.scenegraph.bodyGroup), proxy.progress();
36854
36853
  }
36855
36854
  function updateAllColPosition(distStartColY, count, direction, proxy) {
36856
36855
  proxy.table.scenegraph.colHeaderGroup.forEachChildren((colGroup, index) => {
@@ -36861,6 +36860,11 @@
36861
36860
  "group" === colGroup.type && updateColGroupPosition(colGroup, "left" === direction ? colGroup.col + count : colGroup.col - count, 0 === index ? distStartColY : colGroup._prev.attribute.x + proxy.table.getColWidth(colGroup._prev.col));
36862
36861
  });
36863
36862
  }
36863
+ function updateColumnContainerWidth(containerGroup) {
36864
+ var _a;
36865
+ const lastColGroup = getLastChild(containerGroup);
36866
+ lastColGroup && (containerGroup.setAttribute("width", lastColGroup.attribute.x + lastColGroup.attribute.width), null === (_a = containerGroup.border) || void 0 === _a || _a.setAttribute("width", lastColGroup.attribute.x + lastColGroup.attribute.width));
36867
+ }
36864
36868
 
36865
36869
  function updateAutoRow(colStart, colEnd, rowStart, rowEnd, table) {
36866
36870
  let direction = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "up";
@@ -39249,7 +39253,7 @@
39249
39253
  var _a, _b;
39250
39254
  this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach(plugin => {
39251
39255
  plugin.deactivate(this.stage.pluginService);
39252
- }), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(), this.rowHeaderGroup.clear(), this.cornerHeaderGroup.clear(), this.bodyGroup.clear(), this.bottomFrozenGroup.clear(), this.rightFrozenGroup.clear(), this.rightTopCornerGroup.clear(), this.rightBottomCornerGroup.clear(), this.leftBottomCornerGroup.clear(), this.colHeaderGroup.setAttributes({
39256
+ }), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(), delete this.colHeaderGroup.border, this.rowHeaderGroup.clear(), delete this.rowHeaderGroup.border, this.cornerHeaderGroup.clear(), delete this.cornerHeaderGroup.border, this.bodyGroup.clear(), delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border, this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(), delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border, this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, this.colHeaderGroup.setAttributes({
39253
39257
  x: 0,
39254
39258
  y: 0,
39255
39259
  width: 0,
@@ -45576,7 +45580,7 @@
45576
45580
  constructor(container) {
45577
45581
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
45578
45582
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
45579
- if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.2", 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");
45583
+ if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.4", 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");
45580
45584
  const {
45581
45585
  frozenColCount = 0,
45582
45586
  frozenRowCount: frozenRowCount,
@@ -49669,7 +49673,7 @@
49669
49673
  }
49670
49674
  _refreshHierarchyState(col, row) {
49671
49675
  let recalculateColWidths = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
49672
- var _a, _b, _c;
49676
+ var _a;
49673
49677
  let notFillWidth = !1,
49674
49678
  notFillHeight = !1;
49675
49679
  const checkHasChart = this.internalProps.layoutMap.checkHasChart();
@@ -49694,7 +49698,7 @@
49694
49698
  });
49695
49699
  diffPositions.removeCellPositions = [], this.scenegraph.proxy.refreshRowCount();
49696
49700
  }
49697
- null === (_b = this.reactCustomLayout) || void 0 === _b || _b.clearCache(), this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells, recalculateColWidths), null === (_c = this.reactCustomLayout) || void 0 === _c || _c.updateAllCustomCell(), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
49701
+ this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells, recalculateColWidths), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
49698
49702
  }
49699
49703
  _hasHierarchyTreeHeader() {
49700
49704
  var _a, _b;
@@ -50699,21 +50703,19 @@
50699
50703
  disableTriggerEvent: this.table.options.disableInteraction
50700
50704
  }));
50701
50705
  legend.name = "legend", this.legendComponent = legend, !1 === this.visible && (legend.setAttributes({
50702
- maxWidth: 0,
50703
- width: 0,
50704
- maxHeight: 0,
50705
- height: 0,
50706
- clip: !0
50706
+ visible: !1,
50707
+ visibleAll: !1
50707
50708
  }), legend.hideAll()), this.table.scenegraph.stage.defaultLayer.appendChild(legend), this.adjustTableSize(attrs);
50708
50709
  }
50709
50710
  resize() {
50710
- this.legendComponent && (this.legendComponent.setAttributes({
50711
+ this.legendComponent && !1 !== this.visible && (this.legendComponent.setAttributes({
50711
50712
  maxWidth: this.table.tableNoFrameWidth,
50712
50713
  maxHeight: this.table.tableNoFrameHeight
50713
50714
  }), this.adjustTableSize(this.legendComponent.attribute));
50714
50715
  }
50715
50716
  adjustTableSize(attrs) {
50716
50717
  var _a, _b;
50718
+ if (!this.legendComponent || !1 === this.visible) return;
50717
50719
  let width = isFinite(this.legendComponent.AABBBounds.width()) ? this.legendComponent.AABBBounds.width() : 0,
50718
50720
  height = isFinite(this.legendComponent.AABBBounds.height()) ? this.legendComponent.AABBBounds.height() : 0;
50719
50721
  if (width <= 0 || height <= 0) return;
@@ -50948,16 +50950,20 @@
50948
50950
  slidable: !0
50949
50951
  })) : new SizeContinuousLegend(merge({}, attrs, {
50950
50952
  slidable: !0
50951
- })), legend.name = "legend", this.legendComponent = legend, this.table.scenegraph.stage.defaultLayer.appendChild(legend), this.adjustTableSize(attrs);
50953
+ })), legend.name = "legend", this.legendComponent = legend, !1 === this.visible && (legend.setAttributes({
50954
+ visible: !1,
50955
+ visibleAll: !1
50956
+ }), legend.hideAll()), this.table.scenegraph.stage.defaultLayer.appendChild(legend), this.adjustTableSize(attrs);
50952
50957
  }
50953
50958
  resize() {
50954
- this.legendComponent && (this.legendComponent.setAttributes({
50959
+ this.legendComponent && !1 !== this.visible && (this.legendComponent.setAttributes({
50955
50960
  width: this.table.tableNoFrameWidth,
50956
50961
  height: this.table.tableNoFrameHeight
50957
50962
  }), this.adjustTableSize(this.legendComponent.attribute));
50958
50963
  }
50959
50964
  adjustTableSize(attrs) {
50960
50965
  var _a, _b;
50966
+ if (!this.legendComponent || !1 === this.visible) return;
50961
50967
  let width = isFinite(this.legendComponent.AABBBounds.width()) ? this.legendComponent.AABBBounds.width() : 0,
50962
50968
  height = isFinite(this.legendComponent.AABBBounds.height()) ? this.legendComponent.AABBBounds.height() : 0;
50963
50969
  if (width <= 0 || height <= 0) return;