@visactor/vtable-calendar 1.17.4-alpha.3 → 1.17.4-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.
@@ -29234,10 +29234,6 @@
29234
29234
  get selectionFillMode() {
29235
29235
  var _a;
29236
29236
  return null !== (_a = null == selectionStyle ? void 0 : selectionStyle.selectionFillMode) && void 0 !== _a ? _a : "overlay";
29237
- },
29238
- get dynamicUpdateSelectionSize() {
29239
- var _a;
29240
- return null !== (_a = null == selectionStyle ? void 0 : selectionStyle.dynamicUpdateSelectionSize) && void 0 !== _a && _a;
29241
29237
  }
29242
29238
  };
29243
29239
  }
@@ -32243,15 +32239,16 @@
32243
32239
  }
32244
32240
  function getCellCornerRadius(col, row, table) {
32245
32241
  const tableCornerRadius = table.theme.frameStyle.cornerRadius;
32246
- if (table.theme.cellInnerBorder) {
32247
- if (Array.isArray(tableCornerRadius)) {
32248
- const radius = [0, 0, 0, 0];
32249
- return 0 === col && 0 === row && (radius[0] = tableCornerRadius[0]), col === table.colCount - 1 && 0 === row && (radius[1] = tableCornerRadius[1]), 0 === col && row === table.rowCount - 1 && (radius[3] = tableCornerRadius[3]), col === table.colCount - 1 && row === table.rowCount - 1 && (radius[2] = tableCornerRadius[2]), radius;
32250
- }
32251
- if (tableCornerRadius) {
32252
- const radius = [0, 0, 0, 0];
32253
- return 0 === col && 0 === row && (radius[0] = tableCornerRadius), col === table.colCount - 1 && 0 === row && (radius[1] = tableCornerRadius), 0 === col && row === table.rowCount - 1 && (radius[3] = tableCornerRadius), col === table.colCount - 1 && row === table.rowCount - 1 && (radius[2] = tableCornerRadius), radius;
32254
- }
32242
+ if (table.theme.cellInnerBorder) if (Array.isArray(tableCornerRadius)) {
32243
+ if (0 === col && 0 === row) return [tableCornerRadius[0], 0, 0, 0];
32244
+ if (col === table.colCount - 1 && 0 === row) return [0, tableCornerRadius[1], 0, 0];
32245
+ if (0 === col && row === table.rowCount - 1) return [0, 0, 0, tableCornerRadius[3]];
32246
+ if (col === table.colCount - 1 && row === table.rowCount - 1) return [0, 0, tableCornerRadius[2], 0];
32247
+ } else if (tableCornerRadius) {
32248
+ if (0 === col && 0 === row) return [tableCornerRadius, 0, 0, 0];
32249
+ if (col === table.colCount - 1 && 0 === row) return [0, tableCornerRadius, 0, 0];
32250
+ if (0 === col && row === table.rowCount - 1) return [0, 0, 0, tableCornerRadius];
32251
+ if (col === table.colCount - 1 && row === table.rowCount - 1) return [0, 0, tableCornerRadius, 0];
32255
32252
  }
32256
32253
  return 0;
32257
32254
  }
@@ -36579,13 +36576,17 @@
36579
36576
  }
36580
36577
  Chart.temp = 1;
36581
36578
 
36582
- const chartRenderKeys = [];
36583
- const chartRenderQueueList = [];
36584
- let batchRenderChartCount = 5,
36579
+ let chartRenderKeys = [];
36580
+ let chartRenderQueueList = [];
36581
+ let requestAnimationFrameId,
36582
+ batchRenderChartCount = 5,
36585
36583
  isHandlingChartQueue = !1;
36586
36584
  function setBatchRenderChartCount(count) {
36587
36585
  isValid$3(count) && (batchRenderChartCount = count);
36588
36586
  }
36587
+ function clearChartRenderQueue() {
36588
+ chartRenderKeys = [], chartRenderQueueList = [], isHandlingChartQueue = !1, cancelAnimationFrame(requestAnimationFrameId);
36589
+ }
36589
36590
  function IsHandlingChartQueue() {
36590
36591
  return isHandlingChartQueue;
36591
36592
  }
@@ -36679,7 +36680,7 @@
36679
36680
  cacheStageCanvas(chartInstance.getStage(), chart);
36680
36681
  }
36681
36682
  function startRenderChartQueue(table) {
36682
- isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ? requestAnimationFrame(() => {
36683
+ isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ? requestAnimationFrameId = requestAnimationFrame(() => {
36683
36684
  const chartsToRender = chartRenderQueueList.splice(0, batchRenderChartCount);
36684
36685
  chartRenderKeys.splice(0, batchRenderChartCount), chartsToRender.forEach(chart => {
36685
36686
  renderChart(chart), chart.addUpdateBoundTag();
@@ -39225,10 +39226,7 @@
39225
39226
  if (!isNearBottomColHeader && table.bottomFrozenRowCount && endRow < table.rowCount - table.bottomFrozenRowCount) {
39226
39227
  table.getRowsHeight(0, endRow) - table.scrollTop > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && (isNearBottomColHeader = !0);
39227
39228
  }
39228
- const {
39229
- dynamicUpdateSelectionSize: dynamicUpdateSelectionSize
39230
- } = table.theme.selectionStyle;
39231
- if (isNearRowHeader && (selectComp.rect.attribute.stroke[3] || dynamicUpdateSelectionSize) || isNearRightRowHeader && (selectComp.rect.attribute.stroke[1] || dynamicUpdateSelectionSize) || isNearColHeader && (selectComp.rect.attribute.stroke[0] || dynamicUpdateSelectionSize) || isNearBottomColHeader && (selectComp.rect.attribute.stroke[2] || dynamicUpdateSelectionSize)) {
39229
+ if (isNearRowHeader && selectComp.rect.attribute.stroke[3] || isNearRightRowHeader && selectComp.rect.attribute.stroke[1] || isNearColHeader && selectComp.rect.attribute.stroke[0] || isNearBottomColHeader && selectComp.rect.attribute.stroke[2]) {
39232
39230
  if (isNearRowHeader && selectComp.rect.attribute.stroke[3] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.cornerHeaderGroup : "bottomFrozen" === selectComp.role ? scene.leftBottomCornerGroup : scene.rowHeaderGroup), isNearBottomColHeader && selectComp.rect.attribute.stroke[2] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.leftBottomCornerGroup : "rightFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.bottomFrozenGroup), isNearColHeader && selectComp.rect.attribute.stroke[0] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightFrozen" === selectComp.role ? scene.rightTopCornerGroup : scene.colHeaderGroup), isNearRightRowHeader && selectComp.rect.attribute.stroke[1] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.rightTopCornerGroup : "bottomFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.rightFrozenGroup), selectComp.rect.attribute.x < table.getFrozenColsWidth() && table.scrollLeft > 0 && ("body" === selectComp.role || "columnHeader" === selectComp.role || "bottomFrozen" === selectComp.role)) {
39233
39231
  const width = selectComp.rect.attribute.width - (table.getFrozenColsWidth() - selectComp.rect.attribute.x);
39234
39232
  selectComp.rect.setAttributes({
@@ -47612,7 +47610,7 @@
47612
47610
  constructor(container) {
47613
47611
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
47614
47612
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
47615
- if (super(), this.showFrozenIcon = !0, this.version = "1.17.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");
47613
+ if (super(), this.showFrozenIcon = !0, this.version = "1.17.4-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");
47616
47614
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
47617
47615
  const {
47618
47616
  frozenColCount = 0,
@@ -48438,7 +48436,7 @@
48438
48436
  const {
48439
48437
  parentElement: parentElement
48440
48438
  } = internalProps.element;
48441
- parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_r = this.reactCustomLayout) || void 0 === _r || _r.clearCache();
48439
+ parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_r = this.reactCustomLayout) || void 0 === _r || _r.clearCache(), clearChartRenderQueue();
48442
48440
  }
48443
48441
  fireListeners(type, event) {
48444
48442
  return super.fireListeners(type, event);
@@ -48487,7 +48485,7 @@
48487
48485
  const internalProps = this.internalProps;
48488
48486
  if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_a = options.columnWidthComputeMode) && void 0 !== _a ? _a : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.columnResizeMode = null !== (_b = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _b ? _b : columnResizeMode, internalProps.rowResizeMode = null !== (_c = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _c ? _c : rowResizeMode, internalProps.dragHeaderMode = null !== (_e = null !== (_d = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _d ? _d : dragHeaderMode) && void 0 !== _e ? _e : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_f = options.theme) && void 0 !== _f ? _f : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_g = options.allowFrozenColCount) && void 0 !== _g ? _g : 0, internalProps.limitMaxAutoWidth = null !== (_h = options.limitMaxAutoWidth) && void 0 !== _h ? _h : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_j = internalProps.legends) || void 0 === _j || _j.forEach(legend => {
48489
48487
  null == legend || legend.release();
48490
- }), null === (_k = internalProps.title) || void 0 === _k || _k.release(), internalProps.title = null, null === (_l = internalProps.emptyTip) || void 0 === _l || _l.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
48488
+ }), null === (_k = internalProps.title) || void 0 === _k || _k.release(), internalProps.title = null, null === (_l = internalProps.emptyTip) || void 0 === _l || _l.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), clearChartRenderQueue(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
48491
48489
  internalProps.legends = [];
48492
48490
  const createLegend = Factory.getFunction("createLegend");
48493
48491
  if (Array.isArray(options.legends)) {
@@ -52761,7 +52759,7 @@
52761
52759
  setRecords(records, option) {
52762
52760
  var _a, _b, _c, _d;
52763
52761
  let sort;
52764
- null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
52762
+ clearChartRenderQueue(), null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
52765
52763
  "undefined" != typeof window && window.performance.now();
52766
52764
  const oldHoverState = {
52767
52765
  col: this.stateManager.hover.cellPos.col,