@visactor/vtable-calendar 1.17.5-alpha.0 → 1.17.5

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.
@@ -34049,7 +34049,7 @@
34049
34049
  function _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult) {
34050
34050
  let customElementsGroup,
34051
34051
  renderDefault = !0;
34052
- if (customResult) customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;else if (null == range ? void 0 : range.isCustom) ;else {
34052
+ if (customResult) customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;else if ((null == range ? void 0 : range.isCustom) && !table.isCornerHeader(col, row)) ;else {
34053
34053
  let customRender, customLayout;
34054
34054
  if ("body" !== table.getCellLocation(col, row) ? (customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout) : (customRender = (null == define ? void 0 : define.customRender) || table.customRender, customLayout = null == define ? void 0 : define.customLayout), customLayout || customRender) {
34055
34055
  const customResult = dealWithCustom(customLayout, customRender, col, row, cellWidth, cellHeight, !1, table.isAutoRowHeight(row), padding, range, table);
@@ -36576,13 +36576,17 @@
36576
36576
  }
36577
36577
  Chart.temp = 1;
36578
36578
 
36579
- const chartRenderKeys = [];
36580
- const chartRenderQueueList = [];
36581
- let batchRenderChartCount = 5,
36579
+ let chartRenderKeys = [];
36580
+ let chartRenderQueueList = [];
36581
+ let requestAnimationFrameId,
36582
+ batchRenderChartCount = 5,
36582
36583
  isHandlingChartQueue = !1;
36583
36584
  function setBatchRenderChartCount(count) {
36584
36585
  isValid$3(count) && (batchRenderChartCount = count);
36585
36586
  }
36587
+ function clearChartRenderQueue() {
36588
+ chartRenderKeys = [], chartRenderQueueList = [], isHandlingChartQueue = !1, cancelAnimationFrame(requestAnimationFrameId);
36589
+ }
36586
36590
  function IsHandlingChartQueue() {
36587
36591
  return isHandlingChartQueue;
36588
36592
  }
@@ -36676,7 +36680,7 @@
36676
36680
  cacheStageCanvas(chartInstance.getStage(), chart);
36677
36681
  }
36678
36682
  function startRenderChartQueue(table) {
36679
- isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ? requestAnimationFrame(() => {
36683
+ isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ? requestAnimationFrameId = requestAnimationFrame(() => {
36680
36684
  const chartsToRender = chartRenderQueueList.splice(0, batchRenderChartCount);
36681
36685
  chartRenderKeys.splice(0, batchRenderChartCount), chartsToRender.forEach(chart => {
36682
36686
  renderChart(chart), chart.addUpdateBoundTag();
@@ -38820,7 +38824,7 @@
38820
38824
  };
38821
38825
  class SceneProxy {
38822
38826
  constructor(table) {
38823
- this.isRelease = !1, this.mode = "column", this.rowLimit = 200, this.currentRow = 0, this.rowStart = 0, this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0, this.deltaHeight = 0, this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.deltaWidth = 0, this.cellCache = new Map(), this.table = table, this.table.isPivotChart() ? (this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) : this.table.isAutoRowHeight(table.columnHeaderLevelCount) ? this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)) : ("autoWidth" === this.table.widthMode || (this.rowLimit = Math.max(200, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight))), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))), this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"), this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount), this.table.options.maintainedColumnCount && (this.colLimit = this.table.options.maintainedColumnCount);
38827
+ this.isRelease = !1, this.mode = "column", this.rowLimit = 200, this.currentRow = 0, this.rowStart = 0, this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0, this.deltaHeight = 0, this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.deltaWidth = 0, this.cellCache = new Map(), this.table = table, this.table.isPivotChart() ? (this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) : this.table.isAutoRowHeight(table.columnHeaderLevelCount) ? this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)) : ("autoWidth" === this.table.widthMode || (this.rowLimit = Math.max(200, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight))), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))), this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"), this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount), this.table.options.maintainedColumnCount && (this.colLimit = this.table.options.maintainedColumnCount), "adaptive" === this.table.heightMode && (this.rowLimit = this.table.rowCount), "adaptive" === this.table.widthMode && (this.colLimit = this.table.colCount);
38824
38828
  }
38825
38829
  get bodyLeftCol() {
38826
38830
  return this.table.frozenColCount;
@@ -38896,7 +38900,7 @@
38896
38900
  }
38897
38901
  createRowCellGroup(onceCount) {
38898
38902
  const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
38899
- if (computeRowsHeight(this.table, this.currentRow + 1, endRow, !1), this.rowEnd = endRow, this.table.frozenColCount) {
38903
+ if ("adaptive" !== this.table.heightMode && computeRowsHeight(this.table, this.currentRow + 1, endRow, !1), this.rowEnd = endRow, this.table.frozenColCount) {
38900
38904
  let maxHeight = 0;
38901
38905
  for (let col = 0; col < this.table.frozenColCount; col++) {
38902
38906
  const colGroup = this.table.scenegraph.getColGroup(col),
@@ -39158,7 +39162,7 @@
39158
39162
  });
39159
39163
  }
39160
39164
  function updateComponent(selectComp, key, scene) {
39161
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39165
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
39162
39166
  const table = scene.table,
39163
39167
  [startColStr, startRowStr, endColStr, endRowStr] = key.split("-"),
39164
39168
  startCol = parseInt(startColStr, 10),
@@ -39191,21 +39195,32 @@
39191
39195
  }
39192
39196
  const colsWidth = table.getColsWidth(computeRectCellRangeStartCol, computeRectCellRangeEndCol),
39193
39197
  rowsHeight = table.getRowsHeight(computeRectCellRangeStartRow, computeRectCellRangeEndRow),
39194
- firstCellBound = scene.highPerformanceGetCell(computeRectCellRangeStartCol, computeRectCellRangeStartRow).globalAABBBounds,
39195
- lastCellBound = scene.highPerformanceGetCell(computeRectCellRangeEndCol, computeRectCellRangeEndRow).globalAABBBounds;
39196
- selectComp.rect.setAttributes({
39198
+ firstCellBound = scene.highPerformanceGetCell(computeRectCellRangeStartCol, computeRectCellRangeStartRow).globalAABBBounds;
39199
+ if (selectComp.rect.setAttributes({
39197
39200
  x: firstCellBound.x1 - scene.tableGroup.attribute.x,
39198
39201
  y: firstCellBound.y1 - scene.tableGroup.attribute.y,
39199
39202
  width: colsWidth,
39200
39203
  height: rowsHeight,
39201
39204
  visible: !0
39202
- }), selectComp.fillhandle && (null === (_a = selectComp.fillhandle) || void 0 === _a || _a.setAttributes({
39203
- x: lastCellBound.x2 - scene.tableGroup.attribute.x - 3,
39204
- y: lastCellBound.y2 - scene.tableGroup.attribute.y - 3,
39205
- width: 6,
39206
- height: 6,
39207
- visible: !0
39208
- }));
39205
+ }), selectComp.fillhandle) {
39206
+ const fillHandle = null === (_a = scene.table.options.excelOptions) || void 0 === _a ? void 0 : _a.fillHandle;
39207
+ let lastCellBound,
39208
+ visible = !0;
39209
+ "function" == typeof fillHandle && (visible = fillHandle({
39210
+ selectRanges: scene.table.stateManager.select.ranges,
39211
+ table: scene.table
39212
+ })), lastCellBound = computeRectCellRangeEndCol < table.colCount - 1 ? scene.highPerformanceGetCell(computeRectCellRangeEndCol, computeRectCellRangeEndRow).globalAABBBounds : scene.highPerformanceGetCell(computeRectCellRangeStartCol - 1, computeRectCellRangeEndRow).globalAABBBounds;
39213
+ const handlerX = lastCellBound.x2 - scene.tableGroup.attribute.x - 3;
39214
+ lastCellBound = computeRectCellRangeEndRow < table.rowCount - 1 ? scene.highPerformanceGetCell(computeRectCellRangeEndCol, computeRectCellRangeEndRow).globalAABBBounds : scene.highPerformanceGetCell(computeRectCellRangeEndCol, computeRectCellRangeStartRow - 1).globalAABBBounds;
39215
+ const handlerY = lastCellBound.y2 - scene.tableGroup.attribute.y - 3;
39216
+ null === (_b = selectComp.fillhandle) || void 0 === _b || _b.setAttributes({
39217
+ x: handlerX,
39218
+ y: handlerY,
39219
+ width: 6,
39220
+ height: 6,
39221
+ visible: visible
39222
+ });
39223
+ }
39209
39224
  let isNearRowHeader = !!table.frozenColCount && startCol === table.frozenColCount;
39210
39225
  if (!isNearRowHeader && table.frozenColCount && table.scrollLeft > 0 && startCol >= table.frozenColCount) {
39211
39226
  table.getColsWidth(0, startCol - 1) - table.scrollLeft < table.getFrozenColsWidth() && (isNearRowHeader = !0);
@@ -39228,7 +39243,7 @@
39228
39243
  selectComp.rect.setAttributes({
39229
39244
  x: selectComp.rect.attribute.x + (table.getFrozenColsWidth() - selectComp.rect.attribute.x),
39230
39245
  width: width > 0 ? width : 0
39231
- }), null === (_b = selectComp.fillhandle) || void 0 === _b || _b.setAttributes({
39246
+ }), null === (_c = selectComp.fillhandle) || void 0 === _c || _c.setAttributes({
39232
39247
  visible: width > 0
39233
39248
  });
39234
39249
  }
@@ -39237,7 +39252,7 @@
39237
39252
  selectComp.rect.setAttributes({
39238
39253
  x: selectComp.rect.attribute.x,
39239
39254
  width: width > 0 ? width : 0
39240
- }), null === (_c = selectComp.fillhandle) || void 0 === _c || _c.setAttributes({
39255
+ }), null === (_d = selectComp.fillhandle) || void 0 === _d || _d.setAttributes({
39241
39256
  visible: width - colsWidth > 0
39242
39257
  });
39243
39258
  }
@@ -39246,7 +39261,7 @@
39246
39261
  selectComp.rect.setAttributes({
39247
39262
  y: selectComp.rect.attribute.y + (scene.colHeaderGroup.attribute.height - selectComp.rect.attribute.y),
39248
39263
  height: height > 0 ? height : 0
39249
- }), null === (_d = selectComp.fillhandle) || void 0 === _d || _d.setAttributes({
39264
+ }), null === (_e = selectComp.fillhandle) || void 0 === _e || _e.setAttributes({
39250
39265
  visible: height > 0
39251
39266
  });
39252
39267
  }
@@ -39255,20 +39270,20 @@
39255
39270
  selectComp.rect.setAttributes({
39256
39271
  y: selectComp.rect.attribute.y,
39257
39272
  height: height > 0 ? height : 0
39258
- }), null === (_e = selectComp.fillhandle) || void 0 === _e || _e.setAttributes({
39273
+ }), null === (_f = selectComp.fillhandle) || void 0 === _f || _f.setAttributes({
39259
39274
  visible: height - rowsHeight > 0
39260
39275
  });
39261
39276
  }
39262
39277
  } else scene.tableGroup.insertAfter(selectComp.rect, "body" === selectComp.role ? scene.bodyGroup : "columnHeader" === selectComp.role ? scene.colHeaderGroup : "rowHeader" === selectComp.role ? scene.rowHeaderGroup : "cornerHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightTopCorner" === selectComp.role ? scene.rightTopCornerGroup : "rightFrozen" === selectComp.role ? scene.rightFrozenGroup : "leftBottomCorner" === selectComp.role ? scene.leftBottomCornerGroup : "bottomFrozen" === selectComp.role ? scene.bottomFrozenGroup : scene.rightBottomCornerGroup);
39263
39278
  let diffSize = 0;
39264
- "number" == typeof selectComp.rect.attribute.lineWidth && (diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2)), endCol === table.colCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_f = selectComp.rect.attribute.lineWidth[1]) && void 0 !== _f ? _f : 0) / 2)), selectComp.rect.setAttributes({
39279
+ "number" == typeof selectComp.rect.attribute.lineWidth && (diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2)), endCol === table.colCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_g = selectComp.rect.attribute.lineWidth[1]) && void 0 !== _g ? _g : 0) / 2)), selectComp.rect.setAttributes({
39265
39280
  width: selectComp.rect.attribute.width - diffSize
39266
- })), 0 === startCol && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_g = selectComp.rect.attribute.lineWidth[3]) && void 0 !== _g ? _g : 0) / 2)), selectComp.rect.setAttributes({
39281
+ })), 0 === startCol && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_h = selectComp.rect.attribute.lineWidth[3]) && void 0 !== _h ? _h : 0) / 2)), selectComp.rect.setAttributes({
39267
39282
  x: selectComp.rect.attribute.x + diffSize,
39268
39283
  width: selectComp.rect.attribute.width - diffSize
39269
- })), endRow === table.rowCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_h = selectComp.rect.attribute.lineWidth[2]) && void 0 !== _h ? _h : 0) / 2)), selectComp.rect.setAttributes({
39284
+ })), endRow === table.rowCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_j = selectComp.rect.attribute.lineWidth[2]) && void 0 !== _j ? _j : 0) / 2)), selectComp.rect.setAttributes({
39270
39285
  height: selectComp.rect.attribute.height - diffSize
39271
- })), 0 === startRow && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_j = selectComp.rect.attribute.lineWidth[0]) && void 0 !== _j ? _j : 0) / 2)), selectComp.rect.setAttributes({
39286
+ })), 0 === startRow && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_k = selectComp.rect.attribute.lineWidth[0]) && void 0 !== _k ? _k : 0) / 2)), selectComp.rect.setAttributes({
39272
39287
  y: selectComp.rect.attribute.y + diffSize,
39273
39288
  height: selectComp.rect.attribute.height - diffSize
39274
39289
  }));
@@ -42320,6 +42335,10 @@
42320
42335
  }
42321
42336
 
42322
42337
  function setCheckedState(col, row, field, checked, state) {
42338
+ const cellRange = state.table.getCellRange(col, row);
42339
+ if (cellRange.start.col !== cellRange.end.col || cellRange.start.row !== cellRange.end.row) for (let i = cellRange.start.col; i <= cellRange.end.col; i++) for (let j = cellRange.start.row; j <= cellRange.end.row; j++) setSingleCheckedState(i, j, field, checked, state);else setSingleCheckedState(col, row, field, checked, state);
42340
+ }
42341
+ function setSingleCheckedState(col, row, field, checked, state) {
42323
42342
  const recordIndex = state.table.getRecordShowIndexByCell(col, row);
42324
42343
  if (recordIndex >= 0) {
42325
42344
  const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
@@ -45009,19 +45028,27 @@
45009
45028
  return "checkbox" === this.table.getCellType(eventArgs.col, eventArgs.row) && "checkbox" === target.name;
45010
45029
  }
45011
45030
  checkCellFillhandle(eventArgsSet, update) {
45012
- var _a, _b, _c, _d;
45013
- if (null === (_a = this.table.options.excelOptions) || void 0 === _a ? void 0 : _a.fillHandle) {
45031
+ var _a, _b, _c, _d, _e;
45032
+ let isFillHandle = !1;
45033
+ if (isFillHandle = "function" == typeof (null === (_a = this.table.options.excelOptions) || void 0 === _a ? void 0 : _a.fillHandle) ? this.table.options.excelOptions.fillHandle({
45034
+ selectRanges: this.table.stateManager.select.ranges,
45035
+ table: this.table
45036
+ }) : null === (_b = this.table.options.excelOptions) || void 0 === _b ? void 0 : _b.fillHandle, isFillHandle) {
45014
45037
  const {
45015
45038
  eventArgs: eventArgs
45016
45039
  } = eventArgsSet;
45017
- if (eventArgs && (null === (_c = null === (_b = this.table.stateManager.select) || void 0 === _b ? void 0 : _b.ranges) || void 0 === _c ? void 0 : _c.length)) {
45040
+ if (eventArgs && (null === (_d = null === (_c = this.table.stateManager.select) || void 0 === _c ? void 0 : _c.ranges) || void 0 === _d ? void 0 : _d.length)) {
45018
45041
  const lastCol = Math.max(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.col, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.col),
45019
45042
  lastRow = Math.max(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.row, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.row),
45020
- lastCellBound = this.table.scenegraph.highPerformanceGetCell(lastCol, lastRow).globalAABBBounds,
45021
- distanceX = Math.abs(eventArgsSet.abstractPos.x - lastCellBound.x2),
45022
- distanceY = Math.abs(eventArgsSet.abstractPos.y - lastCellBound.y2),
45043
+ startCol = Math.min(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.col, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.col),
45044
+ startRow = Math.min(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.row, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.row);
45045
+ let lastCellBound;
45046
+ lastCellBound = lastCol < this.table.colCount - 1 ? this.table.scenegraph.highPerformanceGetCell(lastCol, lastRow).globalAABBBounds : this.table.scenegraph.highPerformanceGetCell(startCol - 1, lastRow).globalAABBBounds;
45047
+ const distanceX = Math.abs(eventArgsSet.abstractPos.x - lastCellBound.x2);
45048
+ lastCellBound = lastRow < this.table.rowCount - 1 ? this.table.scenegraph.highPerformanceGetCell(lastCol, lastRow).globalAABBBounds : this.table.scenegraph.highPerformanceGetCell(lastCol, startRow - 1).globalAABBBounds;
45049
+ const distanceY = Math.abs(eventArgsSet.abstractPos.y - lastCellBound.y2),
45023
45050
  squareSize = 18;
45024
- if ((null === (_d = this.table.stateManager.fillHandle) || void 0 === _d ? void 0 : _d.isFilling) || distanceX <= squareSize / 2 && distanceY <= squareSize / 2) return update && this.table.stateManager.startFillSelect(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y), !0;
45051
+ if ((null === (_e = this.table.stateManager.fillHandle) || void 0 === _e ? void 0 : _e.isFilling) || distanceX <= squareSize / 2 && distanceY <= squareSize / 2) return update && this.table.stateManager.startFillSelect(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y), !0;
45025
45052
  }
45026
45053
  }
45027
45054
  return !1;
@@ -47676,7 +47703,7 @@
47676
47703
  constructor(container) {
47677
47704
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
47678
47705
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
47679
- if (super(), this.showFrozenIcon = !0, this.version = "1.17.5-alpha.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");
47706
+ if (super(), this.showFrozenIcon = !0, this.version = "1.17.5", 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");
47680
47707
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
47681
47708
  const {
47682
47709
  frozenColCount = 0,
@@ -48074,7 +48101,7 @@
48074
48101
  this.internalProps.modifiedViewBoxTransform = !0, this.scenegraph.stage.window.setViewBoxTransform(a, b, c, d, e, f);
48075
48102
  }
48076
48103
  get rowHierarchyType() {
48077
- return "grid";
48104
+ return this.dataSource.rowHierarchyType;
48078
48105
  }
48079
48106
  getColsWidth(startCol, endCol) {
48080
48107
  var _a;
@@ -48502,7 +48529,7 @@
48502
48529
  const {
48503
48530
  parentElement: parentElement
48504
48531
  } = internalProps.element;
48505
- 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();
48532
+ 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();
48506
48533
  }
48507
48534
  fireListeners(type, event) {
48508
48535
  return super.fireListeners(type, event);
@@ -48551,7 +48578,7 @@
48551
48578
  const internalProps = this.internalProps;
48552
48579
  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 => {
48553
48580
  null == legend || legend.release();
48554
- }), 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) {
48581
+ }), 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) {
48555
48582
  internalProps.legends = [];
48556
48583
  const createLegend = Factory.getFunction("createLegend");
48557
48584
  if (Array.isArray(options.legends)) {
@@ -52849,7 +52876,7 @@
52849
52876
  setRecords(records, option) {
52850
52877
  var _a, _b, _c, _d;
52851
52878
  let sort;
52852
- 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);
52879
+ 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);
52853
52880
  "undefined" != typeof window && window.performance.now();
52854
52881
  const oldHoverState = {
52855
52882
  col: this.stateManager.hover.cellPos.col,
@@ -56879,8 +56906,65 @@
56879
56906
  return image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image), cellGroup;
56880
56907
  }
56881
56908
 
56909
+ function createMark(marked, cellGroup, table) {
56910
+ if ("boolean" == typeof marked) {
56911
+ const mark = createArc({
56912
+ x: cellGroup.attribute.width,
56913
+ y: 0,
56914
+ startAngle: Math.PI / 2,
56915
+ endAngle: Math.PI,
56916
+ outerRadius: 6,
56917
+ fill: "#3073F2",
56918
+ pickable: !1
56919
+ });
56920
+ mark.name = "mark", cellGroup.appendChild(mark);
56921
+ } else {
56922
+ const {
56923
+ bgColor = "#3073F2",
56924
+ shape = "sector",
56925
+ position = "right-top",
56926
+ size = 10,
56927
+ offset = 0
56928
+ } = marked;
56929
+ let x, y, startAngle, endAngle, fill, mark;
56930
+ if ("sector" === shape) "right-top" === position ? (x = cellGroup.attribute.width - offset, y = offset, startAngle = Math.PI / 2, endAngle = Math.PI) : "left-top" === position ? (x = offset, y = offset, startAngle = 0, endAngle = Math.PI / 2) : "right-bottom" === position ? (x = cellGroup.attribute.width - offset, y = cellGroup.attribute.height - offset, startAngle = Math.PI, endAngle = Math.PI / 2 * 3) : "left-bottom" === position && (x = offset, y = cellGroup.attribute.height - offset, startAngle = Math.PI / 2 * 3, endAngle = 2 * Math.PI), fill = bgColor, mark = createArc({
56931
+ x: x,
56932
+ y: y,
56933
+ startAngle: startAngle,
56934
+ endAngle: endAngle,
56935
+ outerRadius: size,
56936
+ fill: fill,
56937
+ pickable: !1
56938
+ });else if ("triangle" === shape) {
56939
+ let x2, y2, x3, y3;
56940
+ "right-top" === position ? (x = cellGroup.attribute.width - offset, y = offset, x2 = x - size, y2 = y, x3 = x, y3 = y + size) : "left-top" === position ? (x = offset, y = offset, x2 = x + size, y2 = y, x3 = x, y3 = y + size) : "right-bottom" === position ? (x = cellGroup.attribute.width - offset, y = cellGroup.attribute.height - offset, x2 = x - size, y2 = y, x3 = x, y3 = y - size) : "left-bottom" === position && (x = offset, y = cellGroup.attribute.height - offset, x2 = x + size, y2 = y, x3 = x, y3 = y - size), fill = bgColor, mark = createPolygon({
56941
+ points: [{
56942
+ x: x,
56943
+ y: y
56944
+ }, {
56945
+ x: x2,
56946
+ y: y2
56947
+ }, {
56948
+ x: x3,
56949
+ y: y3
56950
+ }],
56951
+ fill: fill,
56952
+ pickable: !1
56953
+ });
56954
+ } else "rect" === shape && ("right-top" === position ? (x = cellGroup.attribute.width - size - offset, y = offset) : "left-top" === position ? (x = offset, y = offset) : "right-bottom" === position ? (x = cellGroup.attribute.width - size - offset, y = cellGroup.attribute.height - size - offset) : "left-bottom" === position && (x = offset, y = cellGroup.attribute.height - size - offset), fill = bgColor, mark = createRect({
56955
+ x: x,
56956
+ y: y,
56957
+ width: size,
56958
+ height: size,
56959
+ fill: fill,
56960
+ pickable: !1
56961
+ }));
56962
+ mark.name = "mark", cellGroup.appendChild(mark);
56963
+ }
56964
+ }
56965
+
56882
56966
  function createCellGroup(table, value, columnGroup, xOrigin, yOrigin, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync) {
56883
- 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, _0, _1, _2, _3, _4, _5, _6, _7;
56967
+ 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, _0, _1, _2, _3, _4, _5, _6, _7, _8;
56884
56968
  const headerStyle = table._getCellStyle(col, row),
56885
56969
  functionalPadding = getFunctionalProp("padding", headerStyle, col, row, table);
56886
56970
  isValid$3(functionalPadding) && (padding = functionalPadding), (null === (_a = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _a ? void 0 : _a.textAlign) && (textAlign = null === (_b = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _b ? void 0 : _b.textAlign), (null === (_c = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _c ? void 0 : _c.textBaseline) && (textBaseline = null === (_d = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _d ? void 0 : _d.textBaseline);
@@ -56928,22 +57012,11 @@
56928
57012
  iconRow = row;
56929
57013
  range && (iconCol = range.start.col, iconRow = range.start.row), icons = table.getCellIcons(iconCol, iconRow);
56930
57014
  }
56931
- if (createCellContent(cellGroup, icons, textStr, padding, autoColWidth, autoRowHeight, autoWrapText, "number" == typeof lineClamp ? lineClamp : void 0, cellGroup.attribute.width, cellGroup.attribute.height, textAlign, textBaseline, table, cellTheme, range), null === (_5 = null == cellTheme ? void 0 : cellTheme._vtable) || void 0 === _5 ? void 0 : _5.marked) {
56932
- const mark = createArc({
56933
- x: cellGroup.attribute.width,
56934
- y: 0,
56935
- startAngle: Math.PI / 2,
56936
- endAngle: Math.PI,
56937
- outerRadius: 6,
56938
- fill: "#3073F2",
56939
- pickable: !1
56940
- });
56941
- mark.name = "mark", cellGroup.appendChild(mark);
56942
- }
57015
+ createCellContent(cellGroup, icons, textStr, padding, autoColWidth, autoRowHeight, autoWrapText, "number" == typeof lineClamp ? lineClamp : void 0, cellGroup.attribute.width, cellGroup.attribute.height, textAlign, textBaseline, table, cellTheme, range), (null === (_5 = null == cellTheme ? void 0 : cellTheme._vtable) || void 0 === _5 ? void 0 : _5.marked) && createMark(null === (_6 = null == cellTheme ? void 0 : cellTheme._vtable) || void 0 === _6 ? void 0 : _6.marked, cellGroup);
56943
57016
  }
56944
57017
  return customElementsGroup && cellGroup.setAttributes({
56945
- width: Math.max(cellGroup.attribute.width, null !== (_6 = customElementsGroup.attribute.width) && void 0 !== _6 ? _6 : 0),
56946
- height: Math.max(cellGroup.attribute.height, null !== (_7 = customElementsGroup.attribute.height) && void 0 !== _7 ? _7 : 0)
57018
+ width: Math.max(cellGroup.attribute.width, null !== (_7 = customElementsGroup.attribute.width) && void 0 !== _7 ? _7 : 0),
57019
+ height: Math.max(cellGroup.attribute.height, null !== (_8 = customElementsGroup.attribute.height) && void 0 !== _8 ? _8 : 0)
56947
57020
  }), cellGroup;
56948
57021
  }
56949
57022