k-react-vtable 1.0.19 → 1.0.21

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.
@@ -24618,14 +24618,15 @@
24618
24618
  return delayAfterValue > 0 && (totalDelay += delayAfterValue), totalDelay > 0 && animate.wait(totalDelay), loop && loop > 0 && animate.loop(loop), bounce && animate.bounce(!0), animate;
24619
24619
  }
24620
24620
  _handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
24621
- var _a, _b, _c, _d, _e, _f;
24621
+ var _a, _b, _c, _d, _e, _f, _g, _h;
24622
24622
  if (custom && customType) {
24623
- const customParams = Object.assign({
24624
- width: (null === (_a = graphic.stage) || void 0 === _a ? void 0 : _a.width) || 0,
24625
- height: (null === (_b = graphic.stage) || void 0 === _b ? void 0 : _b.height) || 0,
24626
- group: this._target.parent
24627
- }, this.resolveValue(customParameters, graphic)),
24628
- objOptions = isFunction$9(options) ? options.call(null, null !== (_d = customParams && (null === (_c = customParams.data) || void 0 === _c ? void 0 : _c[0])) && void 0 !== _d ? _d : null === (_f = null === (_e = graphic.context) || void 0 === _e ? void 0 : _e.data) || void 0 === _f ? void 0 : _f[0], graphic, customParams) : options;
24623
+ let customParams = this.resolveValue(customParameters, graphic);
24624
+ "function" == typeof customParams && (customParams = customParams(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {})), customParams = Object.assign({
24625
+ width: (null === (_c = graphic.stage) || void 0 === _c ? void 0 : _c.width) || 0,
24626
+ height: (null === (_d = graphic.stage) || void 0 === _d ? void 0 : _d.height) || 0,
24627
+ group: this._target.parent
24628
+ }, customParams);
24629
+ const objOptions = isFunction$9(options) ? options.call(null, null !== (_f = customParams && (null === (_e = customParams.data) || void 0 === _e ? void 0 : _e[0])) && void 0 !== _f ? _f : null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, customParams) : options;
24629
24630
  customParams.options = objOptions, customParams.controlOptions = controlOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
24630
24631
  } else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
24631
24632
  }
@@ -24723,12 +24724,12 @@
24723
24724
  const parsedParams = this.parseParams(params, isTimeline);
24724
24725
  return animate = isTimeline ? this.executeTimelineItem(parsedParams, graphic, index, count) : this.executeTypeConfigItem(parsedParams, graphic, index, count), animate && this._trackAnimation(animate), animate;
24725
24726
  }
24726
- stop(type) {
24727
+ stop(type, callEnd = !0) {
24727
24728
  for (; this._animates.length > 0;) {
24728
24729
  const animate = this._animates.pop();
24729
- null == animate || animate.stop(type);
24730
+ !1 === callEnd && (animate.status = AnimateStatus.END), null == animate || animate.stop(type);
24730
24731
  }
24731
- this._animates = [], this._activeCount = 0, this._started && (this._started = !1, this.onEnd());
24732
+ this._animates = [], this._activeCount = 0, this._started && (this._started = !1, callEnd && this.onEnd());
24732
24733
  }
24733
24734
  }
24734
24735
  AnimateExecutor.builtInAnimateMap = {};
@@ -24788,7 +24789,7 @@
24788
24789
  executor: new AnimateExecutor(this.graphic)
24789
24790
  });
24790
24791
  }), shouldStopState.forEach(state => {
24791
- state.executor.stop();
24792
+ state.executor.stop(null, !1);
24792
24793
  }), shouldApplyState.length) {
24793
24794
  shouldApplyState[0].executor.execute(shouldApplyState[0].animationConfig);
24794
24795
  for (let i = 0; i < shouldApplyState.length; i++) {
@@ -24839,7 +24840,7 @@
24839
24840
  clearState() {
24840
24841
  var _a;
24841
24842
  null === (_a = this.stateList) || void 0 === _a || _a.forEach(state => {
24842
- state.executor.stop();
24843
+ state.executor.stop(null, !1);
24843
24844
  }), this.stateList = null;
24844
24845
  }
24845
24846
  reApplyState(state) {
@@ -35204,6 +35205,8 @@
35204
35205
  AFTER_RENDER: "after_render",
35205
35206
  INITIALIZED: "initialized",
35206
35207
  UPDATED: "updated",
35208
+ AFTER_UPDATE_CELL_CONTENT_WIDTH: "after_update_cell_content_width",
35209
+ AFTER_UPDATE_SELECT_BORDER_HEIGHT: "after_update_select_border_height",
35207
35210
  CHANGE_CELL_VALUE: "change_cell_value",
35208
35211
  DRAG_FILL_HANDLE_END: "drag_fill_handle_end",
35209
35212
  MOUSEDOWN_FILL_HANDLE: "mousedown_fill_handle",
@@ -35213,7 +35216,12 @@
35213
35216
  BUTTON_CLICK: "button_click",
35214
35217
  BEFORE_CACHE_CHART_IMAGE: "before_cache_chart_image",
35215
35218
  PASTED_DATA: "pasted_data",
35216
- PLUGIN_EVENT: "plugin_event"
35219
+ PLUGIN_EVENT: "plugin_event",
35220
+ ADD_RECORD: "add_record",
35221
+ DELETE_RECORD: "delete_record",
35222
+ UPDATE_RECORD: "update_record",
35223
+ ADD_COLUMN: "add_column",
35224
+ DELETE_COLUMN: "delete_column"
35217
35225
  };
35218
35226
 
35219
35227
  const judgeType = value => {
@@ -35264,7 +35272,7 @@
35264
35272
  maxing = !1,
35265
35273
  leading = !1,
35266
35274
  trailing = !0;
35267
- const useRAF = !wait && 0 !== wait && "function" == typeof requestAnimationFrame;
35275
+ const useRAF = !wait && 0 !== wait && "function" == typeof vglobal.getRequestAnimationFrame();
35268
35276
  if ("function" != typeof func) throw new TypeError("Expected a function");
35269
35277
  function invokeFunc(time) {
35270
35278
  const args = lastArgs,
@@ -35272,7 +35280,7 @@
35272
35280
  return lastThis = void 0, lastArgs = void 0, lastInvokeTime = time, result = func.apply(thisArg, args), result;
35273
35281
  }
35274
35282
  function startTimer(pendingFunc, wait) {
35275
- return useRAF ? requestAnimationFrame(pendingFunc) : setTimeout(pendingFunc, wait);
35283
+ return useRAF ? vglobal.getRequestAnimationFrame()(pendingFunc) : setTimeout(pendingFunc, wait);
35276
35284
  }
35277
35285
  function shouldInvoke(time) {
35278
35286
  const timeSinceLastCall = time - lastCallTime;
@@ -37463,7 +37471,7 @@
37463
37471
  } else if (isEmptyA || isEmptyB) return indexA - indexB;
37464
37472
  return (state.orderFn || ("desc" !== state.order ? (v1, v2) => v1 === v2 ? 0 : v1 > v2 ? 1 : -1 : (v1, v2) => v1 === v2 ? 0 : v1 < v2 ? 1 : -1))(this.getOriginalField(indexA, state.field), this.getOriginalField(indexB, state.field), state.order);
37465
37473
  }, 0);
37466
- }), this.currentIndexedData = sortedIndexArray, this.hierarchyExpandLevel) {
37474
+ }), this.currentIndexedData = sortedIndexArray, this.hierarchyExpandLevel && "tree" === this.rowHierarchyType) {
37467
37475
  let nodeLength = sortedIndexArray.length;
37468
37476
  for (let i = 0; i < nodeLength; i++) {
37469
37477
  const record = this.getOriginalRecord(sortedIndexArray[i]),
@@ -38963,7 +38971,7 @@
38963
38971
  }
38964
38972
  constructor(opt, dataConfig, pagination, columns, rowHierarchyType, hierarchyExpandLevel) {
38965
38973
  let _isGrouped;
38966
- isArray$9(null == dataConfig ? void 0 : dataConfig.groupByRules) && (rowHierarchyType = "tree", _isGrouped = !0), super(opt, dataConfig, pagination, columns, rowHierarchyType, hierarchyExpandLevel), this._isGrouped = _isGrouped, this._recordCache = [], this._fieldCache = {};
38974
+ isArray$9(null == dataConfig ? void 0 : dataConfig.groupByRules) && (_isGrouped = !0), super(opt, dataConfig, pagination, columns, rowHierarchyType, hierarchyExpandLevel), this._isGrouped = _isGrouped, this._recordCache = [], this._fieldCache = {};
38967
38975
  }
38968
38976
  getOriginalRecord(index) {
38969
38977
  return isNumber$6(index) && this._recordCache && this._recordCache[index] ? this._recordCache[index] : super.getOriginalRecord(index);
@@ -39580,9 +39588,13 @@
39580
39588
  })];
39581
39589
  }
39582
39590
  function _setRecords(table, records = []) {
39591
+ const tableWithPlugins = table;
39583
39592
  _dealWithUpdateDataSource(table, () => {
39593
+ var _a;
39584
39594
  table.internalProps.records = records;
39585
- const newDataSource = table.internalProps.dataSource = CachedDataSource.ofArray(records, table.internalProps.dataConfig, table.pagination, table.internalProps.columns, table.internalProps.layoutMap.rowHierarchyType, getHierarchyExpandLevel(table));
39595
+ let rowHierarchyType = table.internalProps.layoutMap.rowHierarchyType;
39596
+ isArray$9(null === (_a = table.internalProps.dataConfig) || void 0 === _a ? void 0 : _a.groupByRules) && (rowHierarchyType = "tree"), tableWithPlugins.pluginManager.getPluginByName("Master Detail Plugin") && (rowHierarchyType = "grid");
39597
+ const newDataSource = table.internalProps.dataSource = CachedDataSource.ofArray(records, table.internalProps.dataConfig, table.pagination, table.internalProps.columns, rowHierarchyType, getHierarchyExpandLevel(table));
39586
39598
  table.addReleaseObj(newDataSource);
39587
39599
  });
39588
39600
  }
@@ -40337,7 +40349,7 @@
40337
40349
  const regIndexReg = /radio-\d+-\d+-(\d+)/;
40338
40350
 
40339
40351
  const CUSTOM_MERGE_PRE_NAME = "_custom_";
40340
- const CUSTOM_CONTAINER_NAME = "custom-container";
40352
+ const CUSTOM_CONTAINER_NAME$1 = "custom-container";
40341
40353
  const CUSTOM_MERGE_CONTAINER_NAME = CUSTOM_MERGE_PRE_NAME + "_0";
40342
40354
  function dealWithCustom(customLayout, customRender, col, row, width, height, autoWidth, autoHeight, padding, range, table) {
40343
40355
  var _a, _b, _c;
@@ -40368,7 +40380,7 @@
40368
40380
  if (!customRenderObj) return {
40369
40381
  renderDefault: !0
40370
40382
  };
40371
- customRenderObj.rootContainer && (customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer, table.animationManager.timeline)), customRenderObj.rootContainer instanceof Group$2 && (elementsGroup = customRenderObj.rootContainer, elementsGroup.name = CUSTOM_CONTAINER_NAME, elementsGroup.col = col, elementsGroup.row = row), renderDefault = customRenderObj.renderDefault, enableCellPadding = customRenderObj.enableCellPadding;
40383
+ customRenderObj.rootContainer && (customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer, table.animationManager.timeline)), customRenderObj.rootContainer instanceof Group$2 && (elementsGroup = customRenderObj.rootContainer, elementsGroup.name = CUSTOM_CONTAINER_NAME$1, elementsGroup.col = col, elementsGroup.row = row), renderDefault = customRenderObj.renderDefault, enableCellPadding = customRenderObj.enableCellPadding;
40372
40384
  } else if ("function" == typeof customRender) {
40373
40385
  const customRenderObj = customRender({
40374
40386
  col: col,
@@ -40410,7 +40422,7 @@
40410
40422
  stroke: !1,
40411
40423
  pickable: !1
40412
40424
  });
40413
- customGroup.name = CUSTOM_CONTAINER_NAME;
40425
+ customGroup.name = CUSTOM_CONTAINER_NAME$1;
40414
40426
  return adjustElementsPos(elements, width, height, value).forEach(element => {
40415
40427
  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;
40416
40428
  switch (element.clickable && (element.pickable = element.clickable), element.type) {
@@ -41050,7 +41062,7 @@
41050
41062
  cellGroup.forEachChildren(child => {
41051
41063
  "icon-left" === child.role ? child.setAttribute("x", child.attribute.x + padding[3]) : "icon-right" === child.role ? child.setAttribute("x", child.attribute.x + width - rightIconWidth + padding[3]) : "icon-absolute-right" === child.role ? child.setAttribute("x", child.attribute.x + width - absoluteRightIconWidth + padding[3] + padding[1]) : "content" !== child.name && "text" !== child.name || ("center" === textAlign && "richtext" !== child.type ? child.setAttribute("x", padding[3] + leftIconWidth + (width - leftIconWidth - rightIconWidth) / 2) : "right" === textAlign && "richtext" !== child.type ? child.setAttribute("x", padding[3] + width - rightIconWidth) : child.setAttribute("x", padding[3] + leftIconWidth));
41052
41064
  }), cellGroup.forEachChildren(child => {
41053
- child.name !== CUSTOM_CONTAINER_NAME && ("middle" === textBaseline ? child.setAttribute("y", padding[0] + (height - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", padding[0] + height - child.AABBBounds.height()) : child.setAttribute("y", padding[0]));
41065
+ child.name !== CUSTOM_CONTAINER_NAME$1 && ("middle" === textBaseline ? child.setAttribute("y", padding[0] + (height - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", padding[0] + height - child.AABBBounds.height()) : child.setAttribute("y", padding[0]));
41054
41066
  }), cellGroup.setAttributes({
41055
41067
  width: width + padding[1] + padding[3],
41056
41068
  height: height + padding[0] + padding[2]
@@ -41095,14 +41107,28 @@
41095
41107
  } else "mark" === child.name && child.setAttribute("x", cellGroup.attribute.width);
41096
41108
  }), autoRowHeight) {
41097
41109
  let newHeight = Math.max(leftIconHeight, contentHeight, rightIconHeight);
41098
- if (isCellHeightUpdate(scene, cellGroup, Math.round(newHeight + padding[0] + padding[2]), oldCellHeight)) return !0;
41110
+ if (isCellHeightUpdate(scene, cellGroup, Math.round(newHeight + padding[0] + padding[2]), oldCellHeight)) return scene.table.hasListeners(TABLE_EVENT_TYPE.AFTER_UPDATE_CELL_CONTENT_WIDTH) && scene.table.fireListeners(TABLE_EVENT_TYPE.AFTER_UPDATE_CELL_CONTENT_WIDTH, {
41111
+ col: cellGroup.col,
41112
+ row: cellGroup.row,
41113
+ cellHeight: cellHeight,
41114
+ cellGroup: cellGroup,
41115
+ padding: padding,
41116
+ textBaseline: textBaseline
41117
+ }), !0;
41099
41118
  newHeight = (null !== (_d = cellGroup.contentHeight) && void 0 !== _d ? _d : cellHeight) - (padding[0] + padding[2]), cellGroup.forEachChildren(child => {
41100
- "rect" !== child.type && "chart" !== child.type && child.name !== CUSTOM_CONTAINER_NAME && ("mark" === child.name ? child.setAttribute("y", 0) : "middle" === textBaseline ? child.setAttribute("y", padding[0] + (newHeight - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", padding[0] + newHeight - child.AABBBounds.height()) : child.setAttribute("y", padding[0]));
41119
+ "rect" !== child.type && "chart" !== child.type && child.name !== CUSTOM_CONTAINER_NAME$1 && ("mark" === child.name ? child.setAttribute("y", 0) : "middle" === textBaseline ? child.setAttribute("y", padding[0] + (newHeight - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", padding[0] + newHeight - child.AABBBounds.height()) : child.setAttribute("y", padding[0]));
41101
41120
  });
41102
41121
  } else "middle" !== textBaseline && "bottom" !== textBaseline || cellGroup.forEachChildren(child => {
41103
- "rect" !== child.type && "chart" !== child.type && child.name !== CUSTOM_CONTAINER_NAME && ("mark" === child.name ? child.setAttribute("y", 0) : "middle" === textBaseline ? child.setAttribute("y", (cellHeight - padding[2] + padding[0] - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", cellHeight - child.AABBBounds.height() - padding[2]) : child.setAttribute("y", padding[0]));
41122
+ "rect" !== child.type && "chart" !== child.type && child.name !== CUSTOM_CONTAINER_NAME$1 && ("mark" === child.name ? child.setAttribute("y", 0) : "middle" === textBaseline ? child.setAttribute("y", (cellHeight - padding[2] + padding[0] - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", cellHeight - child.AABBBounds.height() - padding[2]) : child.setAttribute("y", padding[0]));
41104
41123
  });
41105
- return !1;
41124
+ return scene.table.hasListeners(TABLE_EVENT_TYPE.AFTER_UPDATE_CELL_CONTENT_WIDTH) && scene.table.fireListeners(TABLE_EVENT_TYPE.AFTER_UPDATE_CELL_CONTENT_WIDTH, {
41125
+ col: cellGroup.col,
41126
+ row: cellGroup.row,
41127
+ cellHeight: cellHeight,
41128
+ cellGroup: cellGroup,
41129
+ padding: padding,
41130
+ textBaseline: textBaseline
41131
+ }), !1;
41106
41132
  }
41107
41133
  function updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, textAlign, textBaseline, table) {
41108
41134
  var _a;
@@ -41116,7 +41142,7 @@
41116
41142
  cellGroup.getChildByName("content").updateHeight(newHeight);
41117
41143
  }
41118
41144
  cellGroup.forEachChildren(child => {
41119
- child.setAttribute("dy", 0), "rect" === child.type || "chart" === child.type || child.name === CUSTOM_CONTAINER_NAME || ("mark" === child.name ? child.setAttribute("y", 0) : "middle" === textBaseline ? child.setAttribute("y", padding[0] + (newHeight - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", padding[0] + newHeight - child.AABBBounds.height()) : child.setAttribute("y", padding[0]));
41145
+ child.setAttribute("dy", 0), "rect" === child.type || "chart" === child.type || child.name === CUSTOM_CONTAINER_NAME$1 || ("mark" === child.name ? child.setAttribute("y", 0) : "middle" === textBaseline ? child.setAttribute("y", padding[0] + (newHeight - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", padding[0] + newHeight - child.AABBBounds.height()) : child.setAttribute("y", padding[0]));
41120
41146
  });
41121
41147
  }
41122
41148
  function isCellHeightUpdate(scene, cellGroup, newHeight, oldHeight) {
@@ -41726,7 +41752,7 @@
41726
41752
  var _a, _b;
41727
41753
  if (isPromise(value) && (value = table.getCellValue(col, row)), !addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) return null;
41728
41754
  if (!addNew && oldCellGroup.parent && table.reactCustomLayout) {
41729
- const reactGroup = oldCellGroup.getChildByName("custom-container");
41755
+ const reactGroup = oldCellGroup.getChildByName(CUSTOM_CONTAINER_NAME$1);
41730
41756
  if (reactGroup) {
41731
41757
  const {
41732
41758
  col: col,
@@ -42139,7 +42165,6 @@
42139
42165
  });
42140
42166
  function computeRowsHeight(table, rowStart, rowEnd, isClearRowRangeHeightsMap = !0, update) {
42141
42167
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
42142
- "undefined" != typeof window && window.performance.now();
42143
42168
  const oldRowHeights = [],
42144
42169
  newHeights = [];
42145
42170
  if (update) for (let row = rowStart; row <= rowEnd; row++) oldRowHeights[row] = table.getRowHeight(row);
@@ -42162,7 +42187,7 @@
42162
42187
  const height = computeRowHeight(row, 0, table.colCount - 1, table);
42163
42188
  update ? newHeights[row] = Math.round(height) : table._setRowHeight(row, height);
42164
42189
  }
42165
- if (rowEnd < table.columnHeaderLevelCount || !isAllRowsAuto && !isDefaultRowHeightIsAuto) ;else if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol || table.options.customComputeRowHeight || !checkFixedStyleAndNoWrap(table, rowStart)) {
42190
+ if (rowEnd < table.columnHeaderLevelCount || !isAllRowsAuto && !isDefaultRowHeightIsAuto) ;else if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol || table.options.customComputeRowHeight || table.options.rowHeightConfig || !checkFixedStyleAndNoWrap(table, rowStart)) {
42166
42191
  if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol) for (let row = Math.max(rowStart, table.columnHeaderLevelCount); row <= rowEnd; row++) {
42167
42192
  let height;
42168
42193
  height = checkFixedStyleAndNoWrapForTranspose(table, row) ? computeRowHeight(row, 0, table.rowHeaderLevelCount, table) : computeRowHeight(row, 0, table.colCount - 1, table), update ? newHeights[row] = Math.round(height) : table._setRowHeight(row, height);
@@ -42246,6 +42271,10 @@
42246
42271
  if ("number" == typeof customRowHeight) return customRowHeight;
42247
42272
  if ("auto" !== customRowHeight) return table.getDefaultRowHeight(row);
42248
42273
  }
42274
+ if (table.internalProps.rowHeightConfig) {
42275
+ const rowHeightConfig = table.internalProps.rowHeightConfig.find(item => item.key === row);
42276
+ if (rowHeightConfig) return table.internalProps._heightResizedRowMap.has(row) || (table._setRowHeight(row, rowHeightConfig.height), table.internalProps._heightResizedRowMap.add(row)), rowHeightConfig.height;
42277
+ }
42249
42278
  if (table.isPivotChart() && row >= table.columnHeaderLevelCount && row < table.rowCount - table.bottomFrozenRowCount) {
42250
42279
  let ifNeedComputeRowHeight = table.internalProps.layoutMap.indicatorsAsCol,
42251
42280
  isHeatmap = !1;
@@ -42274,7 +42303,8 @@
42274
42303
  }
42275
42304
  }
42276
42305
  if (table.isPivotChart() && (table.isLeftFrozenColumn(col) && table.isBottomFrozenRow(row) || table.isRightFrozenColumn(col) && table.isBottomFrozenRow(row))) continue;
42277
- const textHeight = computeTextHeight(col, row, table.isHeader(col, row) ? null === (_a = table._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.headerType : table.getBodyColumnType(col, row), table);
42306
+ const cellType = table.isHeader(col, row) ? null === (_a = table._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.headerType : table.getBodyColumnType(col, row),
42307
+ textHeight = computeTextHeight(col, row, cellType, table);
42278
42308
  maxHeight = isValid$5(maxHeight) ? Math.max(textHeight, maxHeight) : textHeight;
42279
42309
  }
42280
42310
  if (isValid$5(maxHeight)) return maxHeight;
@@ -42504,8 +42534,6 @@
42504
42534
  for (let col = 0; col < scene.table.colCount; col++) {
42505
42535
  const cell = scene.getCell(col, row);
42506
42536
  if ("empty" === cell.role) continue;
42507
- const mergeInfo = getCellMergeInfo(scene.table, col, row);
42508
- if (mergeInfo && mergeInfo.start.col !== col) continue;
42509
42537
  updateCellHeightForRow(scene, cell, col, row, cell.attribute.height + detaY, detaY, scene.table.isHeader(col, row)), scene.updateCellContentWhileResize(col, row);
42510
42538
  }
42511
42539
  let rowStart = 0,
@@ -42544,7 +42572,7 @@
42544
42572
  Factory.getFunction("createSparkLineCellGroup")(cell, cell.parent, cell.attribute.x, cell.attribute.y, col, row, cell.attribute.width, cell.attribute.height, padding, scene.table, getStyleTheme(headerStyle, scene.table, col, row, getProp).theme, !1);
42545
42573
  } else if ("image" === type || "video" === type) updateImageCellContentWhileResize(cell, col, row, 0, detaY, scene.table);else if ("axis" === (null === (_d = cell.firstChild) || void 0 === _d ? void 0 : _d.name)) null === (_e = cell.firstChild) || void 0 === _e || _e.originAxis.resize(cell.attribute.width, cell.attribute.height);else {
42546
42574
  let renderDefault = !0;
42547
- const customContainer = cell.getChildByName(CUSTOM_CONTAINER_NAME) || cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
42575
+ const customContainer = cell.getChildByName(CUSTOM_CONTAINER_NAME$1) || cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
42548
42576
  if (customContainer) {
42549
42577
  let customElementsGroup;
42550
42578
  cell.removeChild(customContainer);
@@ -42552,7 +42580,7 @@
42552
42580
  if (customMergeRange) for (let mergeRow = customMergeRange.start.row; mergeRow <= customMergeRange.end.row; mergeRow++) {
42553
42581
  if (mergeRow === row) continue;
42554
42582
  const mergedCell = scene.getCell(col, mergeRow),
42555
- customContainer = mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) || mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
42583
+ customContainer = mergedCell.getChildByName(CUSTOM_CONTAINER_NAME$1) || mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
42556
42584
  customContainer.removeAllChild(), mergedCell.removeChild(customContainer), getCustomCellMergeCustom(col, mergeRow, mergedCell, scene.table);
42557
42585
  } else {
42558
42586
  let customRender, customLayout;
@@ -42753,7 +42781,7 @@
42753
42781
  }
42754
42782
  } else if ("axis" === (null === (_f = cell.firstChild) || void 0 === _f ? void 0 : _f.name)) null === (_g = cell.firstChild) || void 0 === _g || _g.originAxis.resize(cell.attribute.width, cell.attribute.height);else {
42755
42783
  let renderDefault = !0;
42756
- const customContainer = cell.getChildByName(CUSTOM_CONTAINER_NAME) || cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
42784
+ const customContainer = cell.getChildByName(CUSTOM_CONTAINER_NAME$1) || cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
42757
42785
  if (customContainer) {
42758
42786
  let customElementsGroup;
42759
42787
  cell.removeChild(customContainer);
@@ -42761,7 +42789,7 @@
42761
42789
  if (customMergeRange) for (let mergeCol = customMergeRange.start.col; mergeCol <= customMergeRange.end.col; mergeCol++) {
42762
42790
  if (mergeCol === col) continue;
42763
42791
  const mergedCell = scene.getCell(mergeCol, row),
42764
- customContainer = mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) || mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
42792
+ customContainer = mergedCell.getChildByName(CUSTOM_CONTAINER_NAME$1) || mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
42765
42793
  customContainer.removeAllChild(), mergedCell.removeChild(customContainer), getCustomCellMergeCustom(mergeCol, row, mergedCell, scene.table);
42766
42794
  } else {
42767
42795
  let customRender, customLayout;
@@ -43189,14 +43217,15 @@
43189
43217
  symbolX = 0,
43190
43218
  symbolY = 0,
43191
43219
  symbolRotate = Math.PI;
43192
- const linePoints = [];
43193
- return "columnHeader" === cellLocation ? (rectX = this.table.getColsWidth(0, col - 1) - this.table.stateManager.scroll.horizontalBarPos, rectY = this.table.getRowsHeight(0, this.table.frozenRowCount - 1), rectHeight = this.table.tableNoFrameHeight, rectWidth = mergeInfo ? this.table.getColsWidth(mergeInfo.start.col, mergeInfo.end.col) : this.table.getColWidth(col), rectDx = rectX - delta, symbolX = rectX + rectWidth, symbolY = 2, linePoints.push({
43220
+ const linePoints = [],
43221
+ movingColumnOrRow = this.table.stateManager.columnMove.movingColumnOrRow;
43222
+ return "columnHeader" === cellLocation && void 0 === movingColumnOrRow || "column" === movingColumnOrRow ? (rectX = this.table.getColsWidth(0, col - 1) - this.table.stateManager.scroll.horizontalBarPos, rectY = this.table.getRowsHeight(0, this.table.frozenRowCount - 1), rectHeight = this.table.tableNoFrameHeight, rectWidth = mergeInfo ? this.table.getColsWidth(mergeInfo.start.col, mergeInfo.end.col) : this.table.getColWidth(col), rectDx = rectX - delta, symbolX = rectX + rectWidth, symbolY = 2, linePoints.push({
43194
43223
  x: 0,
43195
43224
  y: 0
43196
43225
  }), linePoints.push({
43197
43226
  x: 0,
43198
43227
  y: this.table.tableNoFrameHeight
43199
- })) : ("rowHeader" === cellLocation || this.table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) && (rectY = this.table.getRowsHeight(0, row - 1) - this.table.stateManager.scroll.verticalBarPos, rectX = this.table.getColsWidth(0, this.table.frozenColCount - 1), rectWidth = this.table.tableNoFrameWidth, rectHeight = mergeInfo ? this.table.getRowsHeight(mergeInfo.start.row, mergeInfo.end.row) : this.table.getRowHeight(row), rectDy = rectY - delta, symbolX = 2, symbolY = rectY + rectHeight, symbolRotate = Math.PI / 2, linePoints.push({
43228
+ })) : ("rowHeader" === cellLocation || this.table.internalProps.layoutMap.isSeriesNumberInBody(col, row) || "row" === movingColumnOrRow) && (rectY = this.table.getRowsHeight(0, row - 1) - this.table.stateManager.scroll.verticalBarPos, rectX = this.table.getColsWidth(0, this.table.frozenColCount - 1), rectWidth = this.table.tableNoFrameWidth, rectHeight = mergeInfo ? this.table.getRowsHeight(mergeInfo.start.row, mergeInfo.end.row) : this.table.getRowHeight(row), rectDy = rectY - delta, symbolX = 2, symbolY = rectY + rectHeight, symbolRotate = Math.PI / 2, linePoints.push({
43200
43229
  x: 0,
43201
43230
  y: 0
43202
43231
  }), linePoints.push({
@@ -43259,7 +43288,7 @@
43259
43288
  return row >= table.frozenRowCount && (rowY -= table.scrollTop), rowY;
43260
43289
  }
43261
43290
  function getRowBottomY(table) {
43262
- return table.tableNoFrameHeight - table.getBottomFrozenRowsHeight();
43291
+ return Math.min(table.tableNoFrameHeight, table.getAllRowsHeight()) - table.getBottomFrozenRowsHeight();
43263
43292
  }
43264
43293
  function getRowTopY(table) {
43265
43294
  return table.getFrozenRowsHeight();
@@ -44254,7 +44283,7 @@
44254
44283
  isValid$5(count) && (batchRenderChartCount = count);
44255
44284
  }
44256
44285
  function clearChartRenderQueue() {
44257
- chartRenderKeys = [], chartRenderQueueList = [], isHandlingChartQueue = !1, cancelAnimationFrame(requestAnimationFrameId);
44286
+ chartRenderKeys = [], chartRenderQueueList = [], isHandlingChartQueue = !1, vglobal.getCancelAnimationFrame()(requestAnimationFrameId);
44258
44287
  }
44259
44288
  function IsHandlingChartQueue() {
44260
44289
  return isHandlingChartQueue;
@@ -44333,7 +44362,7 @@
44333
44362
  tickMode: null === (_e = axis.tick) || void 0 === _e ? void 0 : _e.tickMode
44334
44363
  }
44335
44364
  }, !0);
44336
- }), null === (_c = null === (_b = table.internalProps.layoutMap) || void 0 === _b ? void 0 : _b.updateDataStateToActiveChartInstance) || void 0 === _c || _c.call(_b, chartInstance), "string" == typeof dataId) chartInstance.updateDataSync(dataId, null != data ? data : []);else {
44365
+ }), null === (_c = null === (_b = table.internalProps.layoutMap) || void 0 === _b ? void 0 : _b.updateDataStateToActiveChartInstance) || void 0 === _c || _c.call(_b, chartInstance), "string" == typeof dataId) chartInstance.getChart().setLayoutTag(!0), chartInstance.updateDataSync(dataId, null != data ? data : []);else {
44337
44366
  const dataBatch = [];
44338
44367
  for (const dataIdStr in dataId) {
44339
44368
  const dataIdAndField = dataId[dataIdStr],
@@ -44347,7 +44376,7 @@
44347
44376
  fields: null === (_e = null == series ? void 0 : series.data) || void 0 === _e ? void 0 : _e.fields
44348
44377
  }), chartInstance.updateFullDataSync || chartInstance.updateDataSync(dataIdStr, dataIdAndField ? null !== (_f = null == data ? void 0 : data.filter(item => item.hasOwnProperty(dataIdAndField))) && void 0 !== _f ? _f : [] : null != data ? data : []);
44349
44378
  }
44350
- null === (_g = chartInstance.updateFullDataSync) || void 0 === _g || _g.call(chartInstance, dataBatch);
44379
+ chartInstance.getChart().setLayoutTag(!0), null === (_g = chartInstance.updateFullDataSync) || void 0 === _g || _g.call(chartInstance, dataBatch);
44351
44380
  }
44352
44381
  table.fireListeners("before_cache_chart_image", {
44353
44382
  chartInstance: chartInstance
@@ -44355,7 +44384,7 @@
44355
44384
  cacheStageCanvas(chartInstance.getStage(), chart);
44356
44385
  }
44357
44386
  function startRenderChartQueue(table) {
44358
- isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ? requestAnimationFrameId = requestAnimationFrame(() => {
44387
+ isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ? requestAnimationFrameId = vglobal.getRequestAnimationFrame()(() => {
44359
44388
  const chartsToRender = chartRenderQueueList.splice(0, batchRenderChartCount);
44360
44389
  chartRenderKeys.splice(0, batchRenderChartCount), chartsToRender.forEach(chart => {
44361
44390
  renderChart(chart), chart.addUpdateBoundTag();
@@ -44587,10 +44616,11 @@
44587
44616
  !key || colorKey && "cellBgColor" !== key || (colorKey = key);
44588
44617
  }
44589
44618
  } else "cell" === cellGroup.role && (colorKey = isCellSelected(table.stateManager, cellGroup.col, cellGroup.row));
44590
- if (!colorKey) return;
44619
+ if (!colorKey) return table.options.customCellStyleFn ? table.options.customCellStyleFn(cellGroup.col, cellGroup.row, table, "#ffffff") : void 0;
44591
44620
  const layout = table.internalProps.layoutMap;
44592
44621
  layout.isCornerHeader(cellGroup.col, cellGroup.row) ? selectStyle = (null === (_a = table.theme.cornerHeaderStyle) || void 0 === _a ? void 0 : _a.select) || (null === (_b = table.theme.headerStyle) || void 0 === _b ? void 0 : _b.select) : layout.isColumnHeader(cellGroup.col, cellGroup.row) ? selectStyle = null === (_c = table.theme.headerStyle) || void 0 === _c ? void 0 : _c.select : layout.isRowHeader(cellGroup.col, cellGroup.row) ? selectStyle = null === (_d = table.theme.rowHeaderStyle) || void 0 === _d ? void 0 : _d.select : layout.isBottomFrozenRow(cellGroup.col, cellGroup.row) ? selectStyle = (null === (_e = table.theme.bottomFrozenStyle) || void 0 === _e ? void 0 : _e.select) || (table.isListTable() ? null === (_f = table.theme.bodyStyle) || void 0 === _f ? void 0 : _f.select : null === (_g = table.theme.headerStyle) || void 0 === _g ? void 0 : _g.select) : layout.isRightFrozenColumn(cellGroup.col, cellGroup.row) ? selectStyle = (null === (_h = table.theme.rightFrozenStyle) || void 0 === _h ? void 0 : _h.select) || (table.isListTable() ? null === (_j = table.theme.bodyStyle) || void 0 === _j ? void 0 : _j.select : null === (_k = table.theme.rowHeaderStyle) || void 0 === _k ? void 0 : _k.select) : table.isHeader(cellGroup.col, cellGroup.row) || (selectStyle = null === (_l = table.theme.bodyStyle) || void 0 === _l ? void 0 : _l.select);
44593
- return getProp(colorKey, selectStyle, cellGroup.col, cellGroup.row, table);
44622
+ const fillColor = getProp(colorKey, selectStyle, cellGroup.col, cellGroup.row, table);
44623
+ return table.options.customCellStyleFn ? table.options.customCellStyleFn(cellGroup.col, cellGroup.row, table, fillColor) : fillColor;
44594
44624
  }
44595
44625
  function isSelectMultipleRange(range) {
44596
44626
  return range.start.col !== range.end.col || range.start.row !== range.end.row;
@@ -45072,7 +45102,7 @@
45072
45102
  strokeColor = rectAttribute.stroke,
45073
45103
  cornerRadius = rectAttribute.cornerRadius
45074
45104
  } = rect.attribute;
45075
- if (stroke && (Array.isArray(strokeArrayWidth) || 0 !== lineWidth) && (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth))) {
45105
+ if (!(!stroke || !Array.isArray(strokeArrayWidth) && 0 === lineWidth || width <= 0 || height <= 0) && (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth))) {
45076
45106
  const deltaWidth = 0,
45077
45107
  deltaHeight = 0;
45078
45108
  "border-rect" !== rect.name && "table-border-rect" !== rect.name && ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => 1 & width)) && (x = Math.floor(x) + .5, y = Math.floor(y) + .5), 0 === cornerRadius || isArray$9(cornerRadius) && cornerRadius.every(num => 0 === num) ? renderStroke(rect, context, x, y, rectAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, "table-border-rect" !== rect.name ? Math.ceil(width + deltaWidth) : width + deltaWidth, "table-border-rect" !== rect.name ? Math.ceil(height + deltaHeight) : height + deltaHeight) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, !0, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
@@ -45343,10 +45373,12 @@
45343
45373
  actualWidth = 0;
45344
45374
  for (let col = 0; col < table.colCount; col++) {
45345
45375
  const colWidth = update && null !== (_f = newWidths[col]) && void 0 !== _f ? _f : table.getColWidth(col);
45346
- (col < table.rowHeaderLevelCount + table.leftRowSeriesNumberCount || table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount) && (actualHeaderWidth += colWidth), actualWidth += colWidth;
45376
+ "only-body" === table.widthAdaptiveMode && (col < table.rowHeaderLevelCount + table.leftRowSeriesNumberCount || table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount) && (actualHeaderWidth += colWidth), actualWidth += colWidth;
45347
45377
  }
45348
45378
  if (actualWidth < canvasWidth && actualWidth > actualHeaderWidth) {
45349
- getAdaptiveWidth(canvasWidth - actualHeaderWidth, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount, update, newWidths, table);
45379
+ let startCol = 0,
45380
+ endCol = table.colCount;
45381
+ "only-body" === table.widthAdaptiveMode && (startCol = table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount), getAdaptiveWidth(canvasWidth - actualHeaderWidth, startCol, endCol, update, newWidths, table);
45350
45382
  }
45351
45383
  }
45352
45384
  if (update) {
@@ -46822,7 +46854,8 @@
46822
46854
  } else if (this.rowEnd === this.bodyBottomRow) {
46823
46855
  const cellGroup = this.table.scenegraph.highPerformanceGetCell(this.colStart, this.rowEnd, !0);
46824
46856
  if ("cell" === cellGroup.role) {
46825
- const deltaY = cellGroup.attribute.y + cellGroup.attribute.height - (this.table.getAllRowsHeight() - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight());
46857
+ const actualRowHeight = this.table.getRowHeight(this.rowEnd),
46858
+ deltaY = cellGroup.attribute.y + actualRowHeight - (this.table.getAllRowsHeight() - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight());
46826
46859
  this.deltaY = -deltaY;
46827
46860
  }
46828
46861
  } else if (isValid$5(screenTopY) && isValid$5(screenTopRow)) {
@@ -46987,6 +47020,11 @@
46987
47020
  height: rowsHeight,
46988
47021
  visible: !0,
46989
47022
  cornerRadius: other ? 1 === other.size ? 2 : 1 === other.index ? "rightFrozen" === selectComp.role ? [0, 2, 2, 0] : [2, 0, 0, 2] : other.index === other.size ? "rightFrozen" === (null === (_a = other.firstItem) || void 0 === _a ? void 0 : _a.role) ? [2, 0, 0, 2] : [0, 2, 2, 0] : 0 : 0
47023
+ }), table.hasListeners(TABLE_EVENT_TYPE.AFTER_UPDATE_SELECT_BORDER_HEIGHT) && table.fireListeners(TABLE_EVENT_TYPE.AFTER_UPDATE_SELECT_BORDER_HEIGHT, {
47024
+ startRow: computeRectCellRangeStartRow,
47025
+ endRow: computeRectCellRangeEndRow,
47026
+ currentHeight: rowsHeight,
47027
+ selectComp: selectComp
46990
47028
  }), selectComp.fillhandle) {
46991
47029
  const fillHandle = null === (_b = scene.table.options.excelOptions) || void 0 === _b ? void 0 : _b.fillHandle;
46992
47030
  let lastCellBound,
@@ -47585,12 +47623,13 @@
47585
47623
  const {
47586
47624
  internalProps: internalProps
47587
47625
  } = table;
47588
- internalProps.tableBodyDomContainer = document.createElement("div"), internalProps.tableBodyDomContainer.id = "vtable-table-body-dom-container", internalProps.tableBodyDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.tableBodyDomContainer), internalProps.bodyDomContainer = document.createElement("div"), internalProps.bodyDomContainer.id = "vtable-body-dom-container", internalProps.bodyDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.bodyDomContainer), internalProps.headerDomContainer = document.createElement("div"), internalProps.headerDomContainer.id = "vtable-header-dom-container", internalProps.headerDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.headerDomContainer), internalProps.frozenBodyDomContainer = document.createElement("div"), internalProps.frozenBodyDomContainer.id = "vtable-frozen-body-dom-container", internalProps.frozenBodyDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.frozenBodyDomContainer), internalProps.frozenHeaderDomContainer = document.createElement("div"), internalProps.frozenHeaderDomContainer.id = "vtable-frozen-header-dom-container", internalProps.frozenHeaderDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.frozenHeaderDomContainer), internalProps.rightFrozenBodyDomContainer = document.createElement("div"), internalProps.rightFrozenBodyDomContainer.id = "vtable-right-frozen-body-dom-container", internalProps.rightFrozenBodyDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.rightFrozenBodyDomContainer), internalProps.rightFrozenHeaderDomContainer = document.createElement("div"), internalProps.rightFrozenHeaderDomContainer.id = "vtable-right-frozen-header-dom-container", internalProps.rightFrozenHeaderDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.rightFrozenHeaderDomContainer), internalProps.frozenBottomDomContainer = document.createElement("div"), internalProps.frozenBottomDomContainer.id = "vtable-frozen-bottom-dom-container", internalProps.frozenBottomDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.frozenBottomDomContainer), internalProps.bottomDomContainer = document.createElement("div"), internalProps.bottomDomContainer.id = "vtable-bottom-dom-container", internalProps.bottomDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.bottomDomContainer), internalProps.rightFrozenBottomDomContainer = document.createElement("div"), internalProps.rightFrozenBottomDomContainer.id = "vtable-right-frozen-bottom-dom-container", internalProps.rightFrozenBottomDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.rightFrozenBottomDomContainer);
47626
+ internalProps.tableBodyDomContainer = document.createElement("div"), internalProps.tableBodyDomContainer.id = "vtable-table-body-dom-container", internalProps.tableBodyDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.tableBodyDomContainer), internalProps.bodyDomContainer = document.createElement("div"), internalProps.bodyDomContainer.id = "vtable-body-dom-container", internalProps.bodyDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.bodyDomContainer), internalProps.headerDomContainer = document.createElement("div"), internalProps.headerDomContainer.id = "vtable-header-dom-container", internalProps.headerDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.headerDomContainer), internalProps.tableHeaderDomContainer = document.createElement("div"), internalProps.tableHeaderDomContainer.id = "vtable-table-header-dom-container", internalProps.tableHeaderDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.tableHeaderDomContainer), internalProps.frozenBodyDomContainer = document.createElement("div"), internalProps.frozenBodyDomContainer.id = "vtable-frozen-body-dom-container", internalProps.frozenBodyDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.frozenBodyDomContainer), internalProps.frozenHeaderDomContainer = document.createElement("div"), internalProps.frozenHeaderDomContainer.id = "vtable-frozen-header-dom-container", internalProps.frozenHeaderDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.frozenHeaderDomContainer), internalProps.rightFrozenBodyDomContainer = document.createElement("div"), internalProps.rightFrozenBodyDomContainer.id = "vtable-right-frozen-body-dom-container", internalProps.rightFrozenBodyDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.rightFrozenBodyDomContainer), internalProps.rightFrozenHeaderDomContainer = document.createElement("div"), internalProps.rightFrozenHeaderDomContainer.id = "vtable-right-frozen-header-dom-container", internalProps.rightFrozenHeaderDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.rightFrozenHeaderDomContainer), internalProps.frozenBottomDomContainer = document.createElement("div"), internalProps.frozenBottomDomContainer.id = "vtable-frozen-bottom-dom-container", internalProps.frozenBottomDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.frozenBottomDomContainer), internalProps.bottomDomContainer = document.createElement("div"), internalProps.bottomDomContainer.id = "vtable-bottom-dom-container", internalProps.bottomDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.bottomDomContainer), internalProps.rightFrozenBottomDomContainer = document.createElement("div"), internalProps.rightFrozenBottomDomContainer.id = "vtable-right-frozen-bottom-dom-container", internalProps.rightFrozenBottomDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.rightFrozenBottomDomContainer);
47589
47627
  }
47590
47628
  function updateReactContainer(table) {
47591
47629
  const {
47592
47630
  headerDomContainer: headerDomContainer,
47593
47631
  tableBodyDomContainer: tableBodyDomContainer,
47632
+ tableHeaderDomContainer: tableHeaderDomContainer,
47594
47633
  bodyDomContainer: bodyDomContainer,
47595
47634
  frozenBodyDomContainer: frozenBodyDomContainer,
47596
47635
  frozenHeaderDomContainer: frozenHeaderDomContainer,
@@ -47600,7 +47639,7 @@
47600
47639
  frozenBottomDomContainer: frozenBottomDomContainer,
47601
47640
  rightFrozenBottomDomContainer: rightFrozenBottomDomContainer
47602
47641
  } = table.internalProps;
47603
- if (!(headerDomContainer || bodyDomContainer || frozenBodyDomContainer || frozenHeaderDomContainer || rightFrozenBodyDomContainer || rightFrozenHeaderDomContainer || bottomDomContainer || frozenBottomDomContainer || rightFrozenBottomDomContainer || tableBodyDomContainer)) return;
47642
+ if (!(headerDomContainer || bodyDomContainer || frozenBodyDomContainer || frozenHeaderDomContainer || rightFrozenBodyDomContainer || rightFrozenHeaderDomContainer || bottomDomContainer || frozenBottomDomContainer || rightFrozenBottomDomContainer || tableBodyDomContainer || tableHeaderDomContainer)) return;
47604
47643
  const allColsWidth = table.getAllColsWidth(),
47605
47644
  tableNoFrameWidth = Math.min(allColsWidth, table.tableNoFrameWidth),
47606
47645
  frozenColsWidth = table.getFrozenColsWidth(),
@@ -47615,7 +47654,7 @@
47615
47654
  h = table.tableNoFrameHeight - totalFrozenRowsHeight,
47616
47655
  hh = Math.min(allRowsHeight - totalFrozenRowsHeight, tableNoFrameHeight - totalFrozenRowsHeight),
47617
47656
  bodyHeight = hh < h ? h : hh;
47618
- tableBodyDomContainer.style.width = `${tableNoFrameWidth}px`, tableBodyDomContainer.style.height = `${bodyHeight}px`, tableBodyDomContainer.style.top = `${table.tableY + frozenRowsHeight}px`, table.frozenColCount > 0 ? (headerDomContainer.style.left = `${table.tableX + frozenColsWidth}px`, bodyDomContainer.style.left = `${table.tableX + frozenColsWidth}px`, bottomDomContainer.style.left = `${table.tableX + frozenColsWidth}px`) : 0 === table.frozenColCount && (headerDomContainer.style.left = `${table.tableX}px`, bodyDomContainer.style.left = `${table.tableX}px`, bottomDomContainer.style.left = `${table.tableX}px`), frozenBodyDomContainer.style.left = `${table.tableX}px`, frozenHeaderDomContainer.style.left = `${table.tableX}px`, headerDomContainer.style.width = `${bodyWidth}px`, headerDomContainer.style.height = `${frozenRowsHeight}px`, bodyDomContainer.style.top = `${table.tableY}px`, bodyDomContainer.style.width = `${bodyWidth}px`, bodyDomContainer.style.height = `${bodyHeight}px`, bodyDomContainer.style.top = `${table.tableY + frozenRowsHeight}px`, frozenBodyDomContainer.style.width = `${frozenColsWidth}px`, frozenBodyDomContainer.style.height = `${bodyHeight}px`, frozenBodyDomContainer.style.top = `${table.tableY + frozenRowsHeight}px`, frozenHeaderDomContainer.style.width = `${frozenColsWidth}px`, frozenHeaderDomContainer.style.height = `${frozenRowsHeight}px`, frozenHeaderDomContainer.style.top = `${table.tableY}px`, rightFrozenBodyDomContainer.style.width = `${rightFrozenColsWidth}px`, rightFrozenBodyDomContainer.style.height = `${bodyHeight}px`, rightFrozenBodyDomContainer.style.top = `${table.tableY + frozenRowsHeight}px`, rightFrozenBodyDomContainer.style.left = table.tableX + tableNoFrameWidth - rightFrozenColsWidth + "px", rightFrozenHeaderDomContainer.style.width = `${rightFrozenColsWidth}px`, rightFrozenHeaderDomContainer.style.height = `${frozenRowsHeight}px`, rightFrozenHeaderDomContainer.style.top = `${table.tableY}px`, rightFrozenHeaderDomContainer.style.left = table.tableX + tableNoFrameWidth - rightFrozenColsWidth + "px", bottomDomContainer.style.width = `${bodyWidth}px`, bottomDomContainer.style.height = `${bottomFrozenRowsHeight}px`, bottomDomContainer.style.top = table.tableY + tableNoFrameHeight - bottomFrozenRowsHeight + "px", frozenBottomDomContainer.style.width = `${frozenColsWidth}px`, frozenBottomDomContainer.style.height = `${bottomFrozenRowsHeight}px`, frozenBottomDomContainer.style.top = table.tableY + tableNoFrameHeight - bottomFrozenRowsHeight + "px", rightFrozenBottomDomContainer.style.width = `${rightFrozenColsWidth}px`, rightFrozenBottomDomContainer.style.height = `${bottomFrozenRowsHeight}px`, rightFrozenBottomDomContainer.style.top = table.tableY + tableNoFrameHeight - bottomFrozenRowsHeight + "px", rightFrozenBottomDomContainer.style.left = table.tableX + tableNoFrameWidth - rightFrozenColsWidth + "px";
47657
+ tableBodyDomContainer.style.width = `${tableNoFrameWidth}px`, tableBodyDomContainer.style.height = `${bodyHeight}px`, tableBodyDomContainer.style.top = `${table.tableY + frozenRowsHeight}px`, tableHeaderDomContainer.style.width = `${tableNoFrameWidth}px`, tableHeaderDomContainer.style.height = `${frozenRowsHeight}px`, tableHeaderDomContainer.style.top = `${table.tableY + table.stateManager.stickyTop}px`, table.frozenColCount > 0 ? (headerDomContainer.style.left = `${table.tableX + frozenColsWidth}px`, bodyDomContainer.style.left = `${table.tableX + frozenColsWidth}px`, bottomDomContainer.style.left = `${table.tableX + frozenColsWidth}px`) : 0 === table.frozenColCount && (headerDomContainer.style.left = `${table.tableX}px`, bodyDomContainer.style.left = `${table.tableX}px`, bottomDomContainer.style.left = `${table.tableX}px`), frozenBodyDomContainer.style.left = `${table.tableX}px`, frozenHeaderDomContainer.style.left = `${table.tableX}px`, headerDomContainer.style.width = `${bodyWidth}px`, headerDomContainer.style.height = `${frozenRowsHeight}px`, headerDomContainer.style.top = `${table.stateManager.stickyTop}px`, bodyDomContainer.style.top = `${table.tableY}px`, bodyDomContainer.style.width = `${bodyWidth}px`, bodyDomContainer.style.height = `${bodyHeight}px`, bodyDomContainer.style.top = `${table.tableY + frozenRowsHeight}px`, frozenBodyDomContainer.style.width = `${frozenColsWidth}px`, frozenBodyDomContainer.style.height = `${bodyHeight}px`, frozenBodyDomContainer.style.top = `${table.tableY + frozenRowsHeight}px`, frozenHeaderDomContainer.style.width = `${frozenColsWidth}px`, frozenHeaderDomContainer.style.height = `${frozenRowsHeight}px`, frozenHeaderDomContainer.style.top = `${table.tableY + table.stateManager.stickyTop}px`, rightFrozenBodyDomContainer.style.width = `${rightFrozenColsWidth}px`, rightFrozenBodyDomContainer.style.height = `${bodyHeight}px`, rightFrozenBodyDomContainer.style.top = `${table.tableY + frozenRowsHeight}px`, rightFrozenBodyDomContainer.style.left = table.tableX + tableNoFrameWidth - rightFrozenColsWidth + "px", rightFrozenHeaderDomContainer.style.width = `${rightFrozenColsWidth}px`, rightFrozenHeaderDomContainer.style.height = `${frozenRowsHeight}px`, rightFrozenHeaderDomContainer.style.top = `${table.tableY + table.stateManager.stickyTop}px`, rightFrozenHeaderDomContainer.style.left = table.tableX + tableNoFrameWidth - rightFrozenColsWidth + "px", bottomDomContainer.style.width = `${bodyWidth}px`, bottomDomContainer.style.height = `${bottomFrozenRowsHeight}px`, bottomDomContainer.style.top = table.tableY + tableNoFrameHeight - bottomFrozenRowsHeight + "px", frozenBottomDomContainer.style.width = `${frozenColsWidth}px`, frozenBottomDomContainer.style.height = `${bottomFrozenRowsHeight}px`, frozenBottomDomContainer.style.top = table.tableY + tableNoFrameHeight - bottomFrozenRowsHeight + "px", rightFrozenBottomDomContainer.style.width = `${rightFrozenColsWidth}px`, rightFrozenBottomDomContainer.style.height = `${bottomFrozenRowsHeight}px`, rightFrozenBottomDomContainer.style.top = table.tableY + tableNoFrameHeight - bottomFrozenRowsHeight + "px", rightFrozenBottomDomContainer.style.left = table.tableX + tableNoFrameWidth - rightFrozenColsWidth + "px";
47619
47658
  }
47620
47659
  function updateReactComponentContainer(scene) {
47621
47660
  if (!scene.table.reactCustomLayout) return;
@@ -49077,7 +49116,7 @@
49077
49116
  var _a, _b, _c, _d, _e, _f;
49078
49117
  const firstBodyCell = null !== (_b = null === (_a = this.bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.firstChild) && void 0 !== _b ? _b : null === (_c = this.rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.firstChild,
49079
49118
  lastBodyCell = null !== (_e = null === (_d = this.bodyGroup.firstChild) || void 0 === _d ? void 0 : _d.lastChild) && void 0 !== _e ? _e : null === (_f = this.rowHeaderGroup.firstChild) || void 0 === _f ? void 0 : _f.lastChild;
49080
- 0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + lastBodyCell.attribute.height + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - lastBodyCell.attribute.height), this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y), this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y), this.updateNextFrame());
49119
+ 0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + this.table.getRowHeight(lastBodyCell.row) + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - this.table.getRowHeight(lastBodyCell.row)), this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y), this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y), this.updateNextFrame());
49081
49120
  }
49082
49121
  setBodyAndColHeaderX(x) {
49083
49122
  const firstBodyCol = this.bodyGroup.firstChild,
@@ -49110,12 +49149,12 @@
49110
49149
  actualWidth = 0;
49111
49150
  for (let col = 0; col < table.colCount; col++) {
49112
49151
  const colWidth = table.getColWidth(col);
49113
- (col < table.rowHeaderLevelCount || table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount) && (actualHeaderWidth += colWidth), actualWidth += colWidth;
49152
+ "only-body" === table.widthAdaptiveMode && (col < table.rowHeaderLevelCount || table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount) && (actualHeaderWidth += colWidth), actualWidth += colWidth;
49114
49153
  }
49115
49154
  if (actualWidth < canvasWidth && actualWidth > actualHeaderWidth) {
49116
- const startCol = table.rowHeaderLevelCount,
49117
- endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;
49118
- getAdaptiveWidth(canvasWidth - actualHeaderWidth, startCol, endCol, !1, [], table, !0);
49155
+ let startCol = 0,
49156
+ endCol = table.colCount;
49157
+ "only-body" === table.widthAdaptiveMode && (startCol = table.rowHeaderLevelCount, endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount), getAdaptiveWidth(canvasWidth - actualHeaderWidth, startCol, endCol, !1, [], table, !0);
49119
49158
  }
49120
49159
  }
49121
49160
  let bodyWidth = 0;
@@ -49214,7 +49253,7 @@
49214
49253
  colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_a = this.table.frozenColCount) && void 0 !== _a ? _a : 0, this.colHeaderGroup.firstChild.col - 1) : 0) : 0,
49215
49254
  bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild ? updateContainerChildrenX(this.bodyGroup, this.bodyGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_b = this.table.frozenColCount) && void 0 !== _b ? _b : 0, this.bodyGroup.firstChild.col - 1) : 0) : 0,
49216
49255
  rightX = updateContainerChildrenX(this.rightFrozenGroup.childrenCount > 0 ? this.rightFrozenGroup : this.rightTopCornerGroup, 0);
49217
- this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_c = this.table.frozenColCount) && void 0 !== _c ? _c : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0), updateContainerChildrenX(this.leftBottomCornerGroup, 0), updateContainerChildrenX(this.rightTopCornerGroup, 0), updateContainerChildrenX(this.rightBottomCornerGroup, 0), this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width), this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width), this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width), this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width), this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width), this.rightFrozenGroup.setDeltaWidth(rightX - this.rightFrozenGroup.attribute.width), this.rightTopCornerGroup.setDeltaWidth(rightX - this.rightTopCornerGroup.attribute.width), this.rightBottomCornerGroup.setDeltaWidth(rightX - this.rightBottomCornerGroup.attribute.width), this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width), this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()), this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
49256
+ this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_c = this.table.frozenColCount) && void 0 !== _c ? _c : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0), updateContainerChildrenX(this.leftBottomCornerGroup, 0), updateContainerChildrenX(this.rightTopCornerGroup, 0), updateContainerChildrenX(this.rightBottomCornerGroup, 0), this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width), this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width), this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width), this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width), this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width), this.rightFrozenGroup.setDeltaWidth(rightX - this.rightFrozenGroup.attribute.width), this.rightTopCornerGroup.setDeltaWidth(rightX - this.rightTopCornerGroup.attribute.width), this.rightBottomCornerGroup.setDeltaWidth(rightX - this.rightBottomCornerGroup.attribute.width), this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width), this.colHeaderGroup.setAttribute("y", this.table.stateManager.stickyTop), this.cornerHeaderGroup.setAttribute("y", this.table.stateManager.stickyTop), this.rightTopCornerGroup.setAttribute("y", this.table.stateManager.stickyTop), this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()), this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
49218
49257
  }
49219
49258
  updateContainerAttrHeightAndY() {
49220
49259
  var _a, _b, _c;
@@ -50062,9 +50101,9 @@
50062
50101
 
50063
50102
  function adjustMoveHeaderTarget(source, target, table) {
50064
50103
  const sourceCellRange = table.getCellRange(source.col, source.row);
50065
- if (table.isColumnHeader(source.col, source.row)) {
50104
+ if (table.isColumnHeader(source.col, source.row) || "column" === table.stateManager.columnMove.movingColumnOrRow && 0 === source.row) {
50066
50105
  const targetCellRange = table.getCellRange(target.col, sourceCellRange.start.row);
50067
- target.row >= table.columnHeaderLevelCount && (target.row = table.columnHeaderLevelCount - 1), target.col >= source.col ? target.col = targetCellRange.end.col : target.col = targetCellRange.start.col;
50106
+ target.row >= table.columnHeaderLevelCount && (target.row = Math.max(table.columnHeaderLevelCount - 1, 0)), target.col >= source.col ? target.col = targetCellRange.end.col : target.col = targetCellRange.start.col;
50068
50107
  } else if (table.isRowHeader(source.col, source.row)) {
50069
50108
  const layoutMap = table.internalProps.layoutMap,
50070
50109
  targetCellRange = table.getCellRange(sourceCellRange.start.col, target.row);
@@ -50079,25 +50118,73 @@
50079
50118
  }
50080
50119
  return target;
50081
50120
  }
50121
+ function adjustWidthResizedColMap(moveContext, table) {
50122
+ if (table.internalProps._widthResizedColMap.size > 0) {
50123
+ const resizedColIndexs = Array.from(table.internalProps._widthResizedColMap.keys());
50124
+ table.internalProps._widthResizedColMap.clear();
50125
+ for (let i = 0; i < resizedColIndexs.length; i++) {
50126
+ const colIndex = resizedColIndexs[i];
50127
+ let newColIndex;
50128
+ const {
50129
+ sourceIndex: sourceIndex,
50130
+ targetIndex: targetIndex,
50131
+ sourceSize: sourceSize
50132
+ } = moveContext;
50133
+ newColIndex = colIndex >= sourceIndex && colIndex < sourceIndex + sourceSize ? targetIndex + (colIndex - sourceIndex) : sourceIndex < targetIndex ? colIndex >= sourceIndex + sourceSize && colIndex < targetIndex || colIndex >= targetIndex ? colIndex - sourceSize : colIndex : colIndex >= targetIndex && colIndex < sourceIndex ? colIndex + sourceSize : colIndex, table.internalProps._widthResizedColMap.add(newColIndex);
50134
+ }
50135
+ }
50136
+ }
50137
+ function adjustHeightResizedRowMap(moveContext, table) {
50138
+ if (table.internalProps._heightResizedRowMap.size > 0) {
50139
+ const resizedRowIndexs = Array.from(table.internalProps._heightResizedRowMap.keys());
50140
+ table.internalProps._heightResizedRowMap.clear();
50141
+ for (let i = 0; i < resizedRowIndexs.length; i++) {
50142
+ const rowIndex = resizedRowIndexs[i];
50143
+ let newRowIndex;
50144
+ const {
50145
+ sourceIndex: sourceIndex,
50146
+ targetIndex: targetIndex,
50147
+ sourceSize: sourceSize
50148
+ } = moveContext;
50149
+ newRowIndex = rowIndex >= sourceIndex && rowIndex < sourceIndex + sourceSize ? targetIndex + (rowIndex - sourceIndex) : sourceIndex < targetIndex ? rowIndex >= sourceIndex + sourceSize && rowIndex < targetIndex || rowIndex >= targetIndex ? rowIndex - sourceSize : rowIndex : rowIndex >= targetIndex && rowIndex < sourceIndex ? rowIndex + sourceSize : rowIndex, table.internalProps._heightResizedRowMap.add(newRowIndex);
50150
+ }
50151
+ }
50152
+ }
50153
+ function adjustHeightResizedRowMapWithAddRecordIndex(table, recordIndex, records) {
50154
+ const resizedRowIndexs = Array.from(table.internalProps._heightResizedRowMap.keys()),
50155
+ rowIndex = recordIndex + (table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount);
50156
+ for (let i = 0; i < resizedRowIndexs.length; i++) resizedRowIndexs[i] >= rowIndex && (table.internalProps._heightResizedRowMap.delete(resizedRowIndexs[i]), table.internalProps._heightResizedRowMap.add(resizedRowIndexs[i] + records.length));
50157
+ }
50158
+ function adjustHeightResizedRowMapWithDeleteRecordIndex(table, recordIndexs) {
50159
+ const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
50160
+ recordIndexs.sort((a, b) => b - a);
50161
+ for (let i = 0; i < recordIndexs.length; i++) {
50162
+ const rowIndex = recordIndexs[i] + headerCount,
50163
+ resizedRowIndexs = Array.from(table.internalProps._heightResizedRowMap.keys());
50164
+ for (let j = 0; j < resizedRowIndexs.length; j++) resizedRowIndexs[j] === rowIndex ? table.internalProps._heightResizedRowMap.delete(resizedRowIndexs[j]) : resizedRowIndexs[j] > rowIndex && (table.internalProps._heightResizedRowMap.delete(resizedRowIndexs[j]), table.internalProps._heightResizedRowMap.add(resizedRowIndexs[j] - 1));
50165
+ }
50166
+ }
50082
50167
 
50083
- function startMoveCol(col, row, x, y, state, event) {
50168
+ function startMoveCol(col, row, x, y, state, event, dragColumnOrRow) {
50084
50169
  var _a;
50085
50170
  if (!("canMoveHeaderPosition" in state.table.internalProps.layoutMap)) return;
50086
- if (state.columnMove.moving = !0, state.columnMove.colSource = col, state.columnMove.rowSource = row, state.table.isListTable()) {
50171
+ if (state.columnMove.movingColumnOrRow = dragColumnOrRow, state.columnMove.moving = !0, state.columnMove.colSource = col, state.columnMove.rowSource = row, state.table.isListTable()) {
50087
50172
  const nodeIndex = state.table.getRecordIndexByCell(col, row),
50088
50173
  nodeData = state.table.getRecordByCell(col, row),
50089
50174
  hierarchyState = state.table.getRecordHierarchyState(col, row);
50090
50175
  state.columnMove.rowSourceSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;
50091
50176
  }
50092
- state.columnMove.x = x - state.table.tableX, state.columnMove.y = y - state.table.tableY;
50093
- const cellLocation = state.table.getCellLocation(col, row),
50094
- delta = "columnHeader" === cellLocation ? state.columnMove.x : "rowHeader" === cellLocation || state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row) ? state.columnMove.y : 0,
50095
- {
50096
- backX: backX,
50097
- lineX: lineX,
50098
- backY: backY,
50099
- lineY: lineY
50100
- } = state.table.scenegraph.component.showMoveCol(col, row, delta);
50177
+ let delta;
50178
+ if (state.columnMove.x = x - state.table.tableX, state.columnMove.y = y - state.table.tableY, "column" === dragColumnOrRow) delta = state.columnMove.x;else if ("row" === dragColumnOrRow) delta = state.columnMove.y;else {
50179
+ const cellLocation = state.table.getCellLocation(col, row);
50180
+ delta = "columnHeader" === cellLocation ? state.columnMove.x : "rowHeader" === cellLocation || state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row) ? state.columnMove.y : 0;
50181
+ }
50182
+ const {
50183
+ backX: backX,
50184
+ lineX: lineX,
50185
+ backY: backY,
50186
+ lineY: lineY
50187
+ } = state.table.scenegraph.component.showMoveCol(col, row, delta);
50101
50188
  state.table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_START, {
50102
50189
  col: col,
50103
50190
  row: row,
@@ -50107,7 +50194,8 @@
50107
50194
  lineX: lineX,
50108
50195
  backY: backY,
50109
50196
  lineY: lineY,
50110
- event: event
50197
+ event: event,
50198
+ movingColumnOrRow: dragColumnOrRow
50111
50199
  });
50112
50200
  const isHasSelected = !!(null === (_a = state.select.ranges) || void 0 === _a ? void 0 : _a.length);
50113
50201
  state.table.stateManager.updateSelectPos(-1, -1), state.table.stateManager.endSelectCells(!0, isHasSelected), state.table.scenegraph.updateNextFrame();
@@ -50137,7 +50225,7 @@
50137
50225
  let lineX, backX, lineY, backY;
50138
50226
  state.updateCursor("grabbing");
50139
50227
  const cellLocation = state.table.getCellLocation(state.columnMove.colSource, state.columnMove.rowSource);
50140
- "columnHeader" === cellLocation ? (backX = state.columnMove.x, lineX = state.table.isLeftFrozenColumn(col) ? state.columnMove.colTarget >= state.columnMove.colSource ? state.table.getColsWidth(0, state.columnMove.colTarget) : state.table.getColsWidth(0, state.columnMove.colTarget - 1) : state.table.isRightFrozenColumn(col) ? state.table.tableNoFrameWidth - state.table.getColsWidth(targetCell.col + 1, state.table.colCount - 1) : (state.columnMove.colTarget >= state.columnMove.colSource ? state.table.getColsWidth(0, state.columnMove.colTarget) : state.table.getColsWidth(0, state.columnMove.colTarget - 1)) - state.table.stateManager.scroll.horizontalBarPos) : ("rowHeader" === cellLocation || state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) && (backY = state.columnMove.y, lineY = state.table.isFrozenRow(row) ? state.columnMove.rowTarget >= state.columnMove.rowSource ? state.table.getRowsHeight(0, state.columnMove.rowTarget) : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1) : state.table.isBottomFrozenRow(row) ? state.table.tableNoFrameHeight - state.table.getRowsHeight(targetCell.row + 1, state.table.rowCount - 1) : (state.columnMove.rowTarget >= state.columnMove.rowSource ? state.table.getRowsHeight(0, state.columnMove.rowTarget) : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1)) - state.table.stateManager.scroll.verticalBarPos), state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY), state.table.fireListeners(TABLE_EVENT_TYPE.CHANGING_HEADER_POSITION, {
50228
+ "columnHeader" === cellLocation || "column" === state.columnMove.movingColumnOrRow && 0 === state.columnMove.rowSource ? (backX = state.columnMove.x, lineX = state.table.isLeftFrozenColumn(col) ? state.columnMove.colTarget >= state.columnMove.colSource ? state.table.getColsWidth(0, state.columnMove.colTarget) : state.table.getColsWidth(0, state.columnMove.colTarget - 1) : state.table.isRightFrozenColumn(col) ? state.table.tableNoFrameWidth - state.table.getColsWidth(targetCell.col + 1, state.table.colCount - 1) : (state.columnMove.colTarget >= state.columnMove.colSource ? state.table.getColsWidth(0, state.columnMove.colTarget) : state.table.getColsWidth(0, state.columnMove.colTarget - 1)) - state.table.stateManager.scroll.horizontalBarPos) : ("rowHeader" === cellLocation || state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row) || "row" === state.columnMove.movingColumnOrRow) && (backY = state.columnMove.y, lineY = state.table.isFrozenRow(row) ? state.columnMove.rowTarget >= state.columnMove.rowSource ? state.table.getRowsHeight(0, state.columnMove.rowTarget) : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1) : state.table.isBottomFrozenRow(row) ? state.table.tableNoFrameHeight - state.table.getRowsHeight(targetCell.row + 1, state.table.rowCount - 1) : (state.columnMove.rowTarget >= state.columnMove.rowSource ? state.table.getRowsHeight(0, state.columnMove.rowTarget) : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1)) - state.table.stateManager.scroll.verticalBarPos), state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY), state.table.fireListeners(TABLE_EVENT_TYPE.CHANGING_HEADER_POSITION, {
50141
50229
  col: col,
50142
50230
  row: row,
50143
50231
  x: x,
@@ -50146,14 +50234,15 @@
50146
50234
  lineX: lineX,
50147
50235
  backY: backY,
50148
50236
  lineY: lineY,
50149
- event: event
50237
+ event: event,
50238
+ movingColumnOrRow: state.columnMove.movingColumnOrRow
50150
50239
  }), state.table.scenegraph.updateNextFrame();
50151
50240
  } else state.updateCursor("not-allowed"), state.columnMove.colTarget = state.columnMove.colSource, state.columnMove.rowTarget = state.columnMove.rowSource;
50152
50241
  }
50153
50242
  function endMoveCol(state) {
50154
50243
  var _a, _b;
50155
50244
  let moveColResult = !1;
50156
- if ("canMoveHeaderPosition" in state.table.internalProps.layoutMap && state.columnMove.moving && state.columnMove.colSource >= 0 && state.columnMove.rowSource >= 0 && state.columnMove.colTarget >= 0 && state.columnMove.rowTarget >= 0 && !0 !== (null === (_a = state.table.options.customConfig) || void 0 === _a ? void 0 : _a.notUpdateInColumnRowMove)) {
50245
+ if ("canMoveHeaderPosition" in state.table.internalProps.layoutMap && state.columnMove.moving && (state.columnMove.colSource >= 0 || "row" === state.columnMove.movingColumnOrRow) && (state.columnMove.rowSource >= 0 || "column" === state.columnMove.movingColumnOrRow) && (state.columnMove.colTarget >= 0 || "row" === state.columnMove.movingColumnOrRow) && (state.columnMove.rowTarget >= 0 || "column" === state.columnMove.movingColumnOrRow) && !0 !== (null === (_a = state.table.options.customConfig) || void 0 === _a ? void 0 : _a.notUpdateInColumnRowMove)) {
50157
50246
  const oldSourceMergeInfo = state.table.getCellRange(state.columnMove.colSource, state.columnMove.rowSource),
50158
50247
  oldTargetMergeInfo = state.table.getCellRange(state.columnMove.colTarget, state.columnMove.rowTarget),
50159
50248
  moveContext = state.table._moveHeaderPosition({
@@ -50163,7 +50252,9 @@
50163
50252
  col: state.columnMove.colTarget,
50164
50253
  row: state.columnMove.rowTarget
50165
50254
  });
50166
- if (!moveContext || moveContext.targetIndex === moveContext.sourceIndex) return state.updateCursor(), state.columnMove.moving = !1, delete state.columnMove.colSource, delete state.columnMove.rowSource, delete state.columnMove.colTarget, delete state.columnMove.rowTarget, state.table.scenegraph.component.hideMoveCol(), state.table.scenegraph.updateNextFrame(), !1;
50255
+ if (!moveContext || moveContext.targetIndex === moveContext.sourceIndex) return state.updateCursor(), state.columnMove.moving = !1, setTimeout(() => {
50256
+ delete state.columnMove.colSource, delete state.columnMove.rowSource, delete state.columnMove.colTarget, delete state.columnMove.rowTarget, state.columnMove.movingColumnOrRow = void 0;
50257
+ }, 0), state.table.scenegraph.component.hideMoveCol(), state.table.scenegraph.updateNextFrame(), !1;
50167
50258
  {
50168
50259
  state.table.internalProps.useOneRowHeightFillAll = !1, state.table.internalProps.layoutMap.clearCellRangeMap();
50169
50260
  const sourceMergeInfo = state.table.getCellRange(state.columnMove.colSource, state.columnMove.rowSource),
@@ -50172,11 +50263,11 @@
50172
50263
  colMax = Math.max(sourceMergeInfo.end.col, targetMergeInfo.end.col, oldSourceMergeInfo.end.col, oldTargetMergeInfo.end.col),
50173
50264
  rowMin = Math.min(sourceMergeInfo.start.row, targetMergeInfo.start.row, oldSourceMergeInfo.start.row, oldTargetMergeInfo.start.row);
50174
50265
  let rowMax = Math.max(sourceMergeInfo.end.row, targetMergeInfo.end.row, oldSourceMergeInfo.end.row, oldTargetMergeInfo.end.row);
50175
- "row" === moveContext.moveType && "tree" === state.table.internalProps.layoutMap.rowHierarchyType && (rowMax = moveContext.targetIndex > moveContext.sourceIndex ? rowMax + moveContext.targetSize - 1 : rowMax + moveContext.sourceSize - 1), !state.table.transpose && state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource) && (state.table.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex), state.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex)), "column" === moveContext.moveType ? clearWidthsAndHeightsCache(colMin, colMax, 0, -1, state.table) : clearWidthsAndHeightsCache(0, -1, rowMin, rowMax, state.table), state.table.clearCellStyleCache(), state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource) ? state.table.scenegraph.updateHeaderPosition(state.table.scenegraph.proxy.colStart, state.table.scenegraph.proxy.colEnd, state.table.scenegraph.proxy.rowStart, state.table.scenegraph.proxy.rowEnd, moveContext.moveType) : "column" === moveContext.moveType ? state.table.scenegraph.updateHeaderPosition(colMin, colMax, 0, -1, moveContext.moveType) : state.table.scenegraph.updateHeaderPosition(0, -1, rowMin, rowMax, moveContext.moveType), "adjustFrozenCount" === state.table.internalProps.frozenColDragHeaderMode && state.table.isListTable() && (state.table.isLeftFrozenColumn(state.columnMove.colTarget) && !state.table.isLeftFrozenColumn(state.columnMove.colSource) ? state.table.frozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1 : state.table.isLeftFrozenColumn(state.columnMove.colSource) && !state.table.isLeftFrozenColumn(state.columnMove.colTarget) && (state.table.frozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1), state.table.isRightFrozenColumn(state.columnMove.colTarget) && !state.table.isRightFrozenColumn(state.columnMove.colSource) ? state.table.rightFrozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1 : state.table.isRightFrozenColumn(state.columnMove.colSource) && !state.table.isRightFrozenColumn(state.columnMove.colTarget) && (state.table.rightFrozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1)), moveColResult = !0;
50266
+ "row" === moveContext.moveType && "tree" === state.table.internalProps.layoutMap.rowHierarchyType && (rowMax = moveContext.targetIndex > moveContext.sourceIndex ? rowMax + moveContext.targetSize - 1 : rowMax + moveContext.sourceSize - 1), state.table.transpose || !state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource) && "row" !== state.columnMove.movingColumnOrRow || (state.table.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex), state.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex)), "column" === moveContext.moveType ? clearWidthsAndHeightsCache(colMin, colMax, 0, -1, state.table) : clearWidthsAndHeightsCache(0, -1, rowMin, rowMax, state.table), state.table.clearCellStyleCache(), state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource) || "row" === state.columnMove.movingColumnOrRow ? state.table.scenegraph.updateHeaderPosition(state.table.scenegraph.proxy.colStart, state.table.scenegraph.proxy.colEnd, state.table.scenegraph.proxy.rowStart, state.table.scenegraph.proxy.rowEnd, moveContext.moveType) : "column" === moveContext.moveType ? state.table.scenegraph.updateHeaderPosition(colMin, colMax, 0, -1, moveContext.moveType) : state.table.scenegraph.updateHeaderPosition(0, -1, rowMin, rowMax, moveContext.moveType), "adjustFrozenCount" === state.table.internalProps.frozenColDragHeaderMode && state.table.isListTable() && (state.table.isLeftFrozenColumn(state.columnMove.colTarget) && !state.table.isLeftFrozenColumn(state.columnMove.colSource) ? state.table.frozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1 : state.table.isLeftFrozenColumn(state.columnMove.colSource) && !state.table.isLeftFrozenColumn(state.columnMove.colTarget) && (state.table.frozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1), state.table.isRightFrozenColumn(state.columnMove.colTarget) && !state.table.isRightFrozenColumn(state.columnMove.colSource) ? state.table.rightFrozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1 : state.table.isRightFrozenColumn(state.columnMove.colSource) && !state.table.isRightFrozenColumn(state.columnMove.colTarget) && (state.table.rightFrozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1)), moveColResult = !0;
50176
50267
  }
50177
50268
  }
50178
50269
  return state.columnMove.moving = !1, setTimeout(() => {
50179
- delete state.columnMove.colSource, delete state.columnMove.rowSource, delete state.columnMove.colTarget, delete state.columnMove.rowTarget;
50270
+ delete state.columnMove.colSource, delete state.columnMove.rowSource, delete state.columnMove.colTarget, delete state.columnMove.rowTarget, state.columnMove.movingColumnOrRow = void 0;
50180
50271
  }, 0), state.table.scenegraph.component.hideMoveCol(), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? (state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen), state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount)) : state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount) : state.table.options.frozenColCount ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1) : state.table.options.rightFrozenColCount && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount), state.table.scenegraph.component.setBottomFrozenColumnShadow(), state.table.scenegraph.component.setTopFrozenColumnShadow(), state.table.scenegraph.updateNextFrame(), !0 === (null === (_b = state.table.options.customConfig) || void 0 === _b ? void 0 : _b.notUpdateInColumnRowMove) || moveColResult;
50181
50272
  }
50182
50273
  function clearWidthsAndHeightsCache(colMin, colMax, rowMin, rowMax, table) {
@@ -50214,6 +50305,7 @@
50214
50305
  }
50215
50306
 
50216
50307
  function updateResizeColumn(xInTable, yInTable, state) {
50308
+ var _a;
50217
50309
  xInTable = Math.ceil(xInTable), yInTable = Math.ceil(yInTable);
50218
50310
  let detaX = state.columnResize.isRightFrozen ? state.columnResize.x - xInTable : xInTable - state.columnResize.x;
50219
50311
  if (Math.abs(detaX) < 1) return;
@@ -50238,7 +50330,9 @@
50238
50330
  }
50239
50331
  rightColWidth - detaX < state.table.internalProps.limitMinWidth && (detaX = rightColWidth - state.table.internalProps.limitMinWidth);
50240
50332
  }
50241
- detaX = Math.ceil(detaX), state.columnResize.col < state.table.rowHeaderLevelCount || state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount ? updateResizeColForColumn(detaX, state) : "indicator" === state.table.internalProps.columnResizeType ? updateResizeColForIndicator$1(detaX, state) : "indicatorGroup" === state.table.internalProps.columnResizeType ? updateResizeColForIndicatorGroup$1(detaX, state) : "all" === state.table.internalProps.columnResizeType ? updateResizeColForAll$1(detaX, state) : updateResizeColForColumn(detaX, state), state.columnResize.x = xInTable, state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen), state.table._updateSize(), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen) : state.table.options.frozenColCount && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1), (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose || state.table.options.rightFrozenColCount) && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount), state.table.scenegraph.component.setBottomFrozenColumnShadow(), state.table.scenegraph.component.setTopFrozenColumnShadow(), state.table.scenegraph.updateNextFrame();
50333
+ detaX = Math.ceil(detaX), state.columnResize.col < state.table.rowHeaderLevelCount || state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount ? updateResizeColForColumn(detaX, state) : "indicator" === state.table.internalProps.columnResizeType ? updateResizeColForIndicator$1(detaX, state) : "indicatorGroup" === state.table.internalProps.columnResizeType ? updateResizeColForIndicatorGroup$1(detaX, state) : "all" === state.table.internalProps.columnResizeType ? updateResizeColForAll$1(detaX, state) : updateResizeColForColumn(detaX, state), state.columnResize.x = xInTable, state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen), state.table._updateSize(), null === (_a = state.table.internalProps.legends) || void 0 === _a || _a.forEach(legend => {
50334
+ null == legend || legend.resize();
50335
+ }), state.table.internalProps.title && state.table.internalProps.title.resize(), state.table.internalProps.emptyTip && state.table.internalProps.emptyTip.resize(), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen) : state.table.options.frozenColCount && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1), (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose || state.table.options.rightFrozenColCount) && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount), state.table.scenegraph.component.setBottomFrozenColumnShadow(), state.table.scenegraph.component.setTopFrozenColumnShadow(), state.table.scenegraph.updateNextFrame();
50242
50336
  }
50243
50337
  function updateResizeColForColumn(detaX, state) {
50244
50338
  "adaptive" === state.table.widthMode && state.columnResize.col < state.table.colCount - 1 ? (state.table.scenegraph.updateColWidth(state.columnResize.col, detaX), state.table.scenegraph.updateColWidth(state.columnResize.col + 1, -detaX), state.table.internalProps._widthResizedColMap.add(state.columnResize.col), state.table.internalProps._widthResizedColMap.add(state.columnResize.col + 1)) : (state.table.scenegraph.updateColWidth(state.columnResize.col, detaX), state.table.internalProps._widthResizedColMap.add(state.columnResize.col));
@@ -50552,6 +50646,7 @@
50552
50646
  }
50553
50647
 
50554
50648
  function updateResizeRow(xInTable, yInTable, state) {
50649
+ var _a;
50555
50650
  xInTable = Math.ceil(xInTable), yInTable = Math.ceil(yInTable);
50556
50651
  let detaY = state.rowResize.isBottomFrozen ? state.rowResize.y - yInTable : yInTable - state.rowResize.y;
50557
50652
  if (Math.abs(detaY) < 1) return;
@@ -50561,7 +50656,9 @@
50561
50656
  let bottomRowHeight = state.table.getRowHeight(state.rowResize.row + 1);
50562
50657
  bottomRowHeight -= detaY, bottomRowHeight - detaY < state.table.internalProps.limitMinHeight && (detaY = bottomRowHeight - state.table.internalProps.limitMinHeight);
50563
50658
  }
50564
- detaY = Math.ceil(detaY), state.rowResize.row < state.table.columnHeaderLevelCount || state.rowResize.row >= state.table.rowCount - state.table.bottomFrozenRowCount ? updateResizeColForRow(detaY, state) : "indicator" === state.table.internalProps.rowResizeType ? updateResizeColForIndicator(detaY, state) : "indicatorGroup" === state.table.internalProps.rowResizeType ? updateResizeColForIndicatorGroup(detaY, state) : "all" === state.table.internalProps.rowResizeType ? updateResizeColForAll(detaY, state) : updateResizeColForRow(detaY, state), state.rowResize.y = yInTable, state.table.scenegraph.component.updateResizeRow(state.rowResize.row, xInTable, state.rowResize.isBottomFrozen), state.table._updateSize(), state.table.scenegraph.updateNextFrame();
50659
+ detaY = Math.ceil(detaY), state.rowResize.row < state.table.columnHeaderLevelCount || state.rowResize.row >= state.table.rowCount - state.table.bottomFrozenRowCount ? updateResizeColForRow(detaY, state) : "indicator" === state.table.internalProps.rowResizeType ? updateResizeColForIndicator(detaY, state) : "indicatorGroup" === state.table.internalProps.rowResizeType ? updateResizeColForIndicatorGroup(detaY, state) : "all" === state.table.internalProps.rowResizeType ? updateResizeColForAll(detaY, state) : updateResizeColForRow(detaY, state), state.rowResize.y = yInTable, state.table.scenegraph.component.updateResizeRow(state.rowResize.row, xInTable, state.rowResize.isBottomFrozen), state.table._updateSize(), null === (_a = state.table.internalProps.legends) || void 0 === _a || _a.forEach(legend => {
50660
+ null == legend || legend.resize();
50661
+ }), state.table.internalProps.title && state.table.internalProps.title.resize(), state.table.internalProps.emptyTip && state.table.internalProps.emptyTip.resize(), state.table.scenegraph.updateNextFrame();
50565
50662
  }
50566
50663
  function updateResizeColForRow(detaY, state) {
50567
50664
  "adaptive" === state.table.heightMode && state.rowResize.row < state.table.rowCount - 1 ? (state.table.scenegraph.updateRowHeight(state.rowResize.row, detaY), state.table.scenegraph.updateRowHeight(state.rowResize.row + 1, -detaY), state.table.internalProps._heightResizedRowMap.add(state.rowResize.row), state.table.internalProps._heightResizedRowMap.add(state.rowResize.row + 1)) : (state.table.scenegraph.updateRowHeight(state.rowResize.row, detaY), state.table.internalProps._heightResizedRowMap.add(state.rowResize.row));
@@ -50701,7 +50798,7 @@
50701
50798
 
50702
50799
  class StateManager {
50703
50800
  constructor(table) {
50704
- this.fastScrolling = !1, this.checkedState = new Map(), this.headerCheckedState = {}, this._checkboxCellTypeFields = [], this._headerCheckFuncs = {}, this.radioState = {}, this.resetInteractionState = debounce(state => {
50801
+ this.stickyTop = 0, this.fastScrolling = !1, this.checkedState = new Map(), this.headerCheckedState = {}, this._checkboxCellTypeFields = [], this._headerCheckFuncs = {}, this.radioState = {}, this.resetInteractionState = debounce(state => {
50705
50802
  this.updateInteractionState(null != state ? state : InteractionState.default);
50706
50803
  }, 100), this.table = table, this.initState(), this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this), this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this);
50707
50804
  }
@@ -50733,7 +50830,8 @@
50733
50830
  rowTargetSize: 0,
50734
50831
  x: 0,
50735
50832
  y: 0,
50736
- moving: !1
50833
+ moving: !1,
50834
+ movingColumnOrRow: void 0
50737
50835
  }, this.menu = {
50738
50836
  x: -1,
50739
50837
  y: -1,
@@ -50761,7 +50859,7 @@
50761
50859
  };
50762
50860
  }
50763
50861
  _initState() {
50764
- this.interactionState = InteractionState.default, this.select = {
50862
+ this.interactionState = InteractionState.default, this.stickyTop = 0, this.select = {
50765
50863
  highlightScope: HighlightScope.single,
50766
50864
  ranges: [],
50767
50865
  cellPos: {
@@ -50800,7 +50898,8 @@
50800
50898
  rowTargetSize: 0,
50801
50899
  x: 0,
50802
50900
  y: 0,
50803
- moving: !1
50901
+ moving: !1,
50902
+ movingColumnOrRow: void 0
50804
50903
  }, this.menu = {
50805
50904
  x: -1,
50806
50905
  y: -1,
@@ -50830,6 +50929,9 @@
50830
50929
  row: -1
50831
50930
  };
50832
50931
  }
50932
+ setStickyTop(stickyTop) {
50933
+ this.stickyTop !== stickyTop && (this.stickyTop = stickyTop, this.table.scenegraph.updateDomContainer(), this.table.scenegraph.colHeaderGroup.setAttribute("y", stickyTop), this.table.scenegraph.cornerHeaderGroup.setAttribute("y", stickyTop), this.table.scenegraph.rightTopCornerGroup.setAttribute("y", stickyTop), this.table.scenegraph.updateNextFrame());
50934
+ }
50833
50935
  setHoverState() {
50834
50936
  var _a;
50835
50937
  const {
@@ -50967,7 +51069,7 @@
50967
51069
  if (this.select.selecting) {
50968
51070
  if (this.select.selecting = !1, 0 === this.select.ranges.length) return;
50969
51071
  const currentRange = this.select.ranges[this.select.ranges.length - 1];
50970
- this.table.isSeriesNumber(this.select.cellPos.col, this.select.cellPos.row) || this.table.isHeader(this.select.cellPos.col, this.select.cellPos.row) || expendCellRange(currentRange, this.table);
51072
+ this.table.isSeriesNumber(this.select.cellPos.col, this.select.cellPos.row) || this.table.isHeader(this.select.cellPos.col, this.select.cellPos.row) || this.table.isSeriesNumberInBody(currentRange.start.col, currentRange.start.row) || expendCellRange(currentRange, this.table);
50971
51073
  let isSame = !1;
50972
51074
  for (let i = 0; i < this.select.ranges.length - 1; i++) {
50973
51075
  const range = this.select.ranges[i];
@@ -51023,8 +51125,8 @@
51023
51125
  direction: this.fillHandle.direction
51024
51126
  }), this.fillHandle.beforeFillMaxCol = void 0, this.fillHandle.beforeFillMaxRow = void 0, this.fillHandle.beforeFillMinCol = void 0, this.fillHandle.beforeFillMinRow = void 0;
51025
51127
  }
51026
- startMoveCol(col, row, x, y, event) {
51027
- startMoveCol(col, row, x, y, this, event);
51128
+ startMoveCol(col, row, x, y, event, dragColumnOrRow) {
51129
+ startMoveCol(col, row, x, y, this, event, dragColumnOrRow);
51028
51130
  }
51029
51131
  updateMoveCol(col, row, x, y, event) {
51030
51132
  updateMoveCol(col, row, x, y, this, event);
@@ -51036,8 +51138,8 @@
51036
51138
  return endMoveCol(this);
51037
51139
  }
51038
51140
  checkFrozen() {
51039
- var _a;
51040
- let originalFrozenColCount = this.table.options.frozenColCount ? this.table.options.frozenColCount : this.table.isPivotTable() || this.table.isListTable() && this.table.internalProps.transpose ? (null !== (_a = this.table.rowHeaderLevelCount) && void 0 !== _a ? _a : 0) + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount : 0;
51141
+ var _a, _b;
51142
+ let originalFrozenColCount = (null !== (_a = this.table.options.frozenColCount) && void 0 !== _a ? _a : this.table.isPivotTable() || this.table.isListTable() && this.table.internalProps.transpose) ? (null !== (_b = this.table.rowHeaderLevelCount) && void 0 !== _b ? _b : 0) + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount : 0;
51041
51143
  if (originalFrozenColCount) {
51042
51144
  originalFrozenColCount = Math.min(originalFrozenColCount, this.table.colCount);
51043
51145
  const container = this.table.getContainer();
@@ -51653,7 +51755,7 @@
51653
51755
  });
51654
51756
  (optimizedDeltaX || optimizedDeltaY) && state.interactionState !== InteractionState.scrolling && state.updateInteractionState(InteractionState.scrolling);
51655
51757
  const autoHide = "focus" !== (null === (_b = null === (_a = state.table.options.theme) || void 0 === _a ? void 0 : _a.scrollStyle) || void 0 === _b ? void 0 : _b.visible);
51656
- optimizedDeltaX && (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(autoHide)), optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(autoHide)), isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll), (null === (_c = event.nativeEvent) || void 0 === _c ? void 0 : _c.cancelable) && ("none" === state.table.internalProps.overscrollBehavior || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, state)) && event.nativeEvent.preventDefault();
51758
+ optimizedDeltaX && (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(autoHide)), optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(autoHide)), isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll), (null === (_c = event.nativeEvent) || void 0 === _c ? void 0 : _c.cancelable) && ("none" === state.table.internalProps.overscrollBehavior && (deltaY && isVerticalExistScrollBar(state) || deltaX && isHorizontalExistScrollBar(state)) || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, state)) && event.nativeEvent.preventDefault();
51657
51759
  }
51658
51760
  function optimizeScrollXY(x, y, ratio) {
51659
51761
  var _a, _b;
@@ -51668,6 +51770,12 @@
51668
51770
  function isHorizontalScrollable(deltaX, state) {
51669
51771
  return 0 != state.table.getAllColsWidth() - state.table.scenegraph.width && !isScrollToLeft(deltaX, state) && !isScrollToRight(deltaX, state);
51670
51772
  }
51773
+ function isVerticalExistScrollBar(state) {
51774
+ return !(state.table.getAllRowsHeight() - state.table.scenegraph.height <= 0);
51775
+ }
51776
+ function isHorizontalExistScrollBar(state) {
51777
+ return !(state.table.getAllColsWidth() - state.table.scenegraph.width <= 0);
51778
+ }
51671
51779
  function isScrollToTop(deltaY, state) {
51672
51780
  return 0 !== state.table.getAllRowsHeight() - state.table.scenegraph.height && deltaY <= 0 && state.scroll.verticalBarPos < 1;
51673
51781
  }
@@ -51694,7 +51802,7 @@
51694
51802
  this.scrollHandle = scrollHandle;
51695
51803
  }
51696
51804
  startInertia(speedX, speedY, friction) {
51697
- this.lastTime = Date.now(), this.speedX = speedX, this.speedY = speedY, this.friction = friction, this.runingId || (this.runingId = requestAnimationFrame(this.inertia.bind(this)));
51805
+ this.lastTime = Date.now(), this.speedX = speedX, this.speedY = speedY, this.friction = friction, this.runingId || (this.runingId = vglobal.getRequestAnimationFrame()(this.inertia.bind(this)));
51698
51806
  }
51699
51807
  inertia() {
51700
51808
  var _a;
@@ -51706,10 +51814,10 @@
51706
51814
  newSpeedY = f * this.speedY;
51707
51815
  let dx = 0,
51708
51816
  dy = 0;
51709
- Math.abs(newSpeedX) > .05 && (stopped = !1, dx = (this.speedX + newSpeedX) / 2 * dffTime), Math.abs(newSpeedY) > .05 && (stopped = !1, dy = (this.speedY + newSpeedY) / 2 * dffTime), null === (_a = this.scrollHandle) || void 0 === _a || _a.call(this, dx, dy), stopped ? this.runingId = null : (this.lastTime = now, this.speedX = newSpeedX, this.speedY = newSpeedY, this.runingId = requestAnimationFrame(this.inertia.bind(this)));
51817
+ Math.abs(newSpeedX) > .05 && (stopped = !1, dx = (this.speedX + newSpeedX) / 2 * dffTime), Math.abs(newSpeedY) > .05 && (stopped = !1, dy = (this.speedY + newSpeedY) / 2 * dffTime), null === (_a = this.scrollHandle) || void 0 === _a || _a.call(this, dx, dy), stopped ? this.runingId = null : (this.lastTime = now, this.speedX = newSpeedX, this.speedY = newSpeedY, this.runingId = vglobal.getRequestAnimationFrame()(this.inertia.bind(this)));
51710
51818
  }
51711
51819
  endInertia() {
51712
- cancelAnimationFrame(this.runingId), this.runingId = null;
51820
+ vglobal.getCancelAnimationFrame()(this.runingId), this.runingId = null;
51713
51821
  }
51714
51822
  isInertiaScrolling() {
51715
51823
  return !!this.runingId;
@@ -51724,7 +51832,8 @@
51724
51832
  colSource: colSource,
51725
51833
  rowSource: rowSource,
51726
51834
  colTarget: colTarget,
51727
- rowTarget: rowTarget
51835
+ rowTarget: rowTarget,
51836
+ movingColumnOrRow: movingColumnOrRow
51728
51837
  } = table.stateManager.columnMove,
51729
51838
  rowSourceSize = null !== (_e = table.stateManager.columnMove.rowSourceSize) && void 0 !== _e ? _e : 0,
51730
51839
  rowTargetSize = null !== (_f = table.stateManager.columnMove.rowTargetSize) && void 0 !== _f ? _f : 0;
@@ -51737,6 +51846,7 @@
51737
51846
  col: colSource,
51738
51847
  row: rowSource
51739
51848
  },
51849
+ movingColumnOrRow: movingColumnOrRow,
51740
51850
  event: e
51741
51851
  });
51742
51852
  }
@@ -51752,6 +51862,7 @@
51752
51862
  col: table.stateManager.columnMove.colSource,
51753
51863
  row: table.stateManager.columnMove.rowSource
51754
51864
  },
51865
+ movingColumnOrRow: table.stateManager.columnMove.movingColumnOrRow,
51755
51866
  event: e
51756
51867
  });
51757
51868
  }
@@ -51777,7 +51888,7 @@
51777
51888
  event: e.nativeEvent,
51778
51889
  target: null === (_e = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _e ? void 0 : _e.target,
51779
51890
  mergeCellInfo: null === (_f = eventArgsSet.eventArgs) || void 0 === _f ? void 0 : _f.mergeInfo
51780
- }), stateManager.interactionState === InteractionState.grabing) return void (Math.abs(lastX - e.x) + Math.abs(lastY - e.y) >= 1 && (stateManager.isResizeCol() || stateManager.isResizeRow() || (stateManager.isMoveCol() ? eventManager.dealColumnMover(eventArgsSet) : stateManager.isFillHandle() ? eventManager.dealFillSelect(eventArgsSet, !0) : (null === (_g = table.options.select) || void 0 === _g ? void 0 : _g.disableDragSelect) || eventManager.dealTableSelect(eventArgsSet, !0))));
51891
+ }), stateManager.interactionState === InteractionState.grabing) return void (Math.abs(lastX - e.x) + Math.abs(lastY - e.y) >= 1 && (stateManager.isResizeCol() || stateManager.isResizeRow() || stateManager.isMoveCol() || (stateManager.isFillHandle() ? eventManager.dealFillSelect(eventArgsSet, !0) : (null === (_g = table.options.select) || void 0 === _g ? void 0 : _g.disableDragSelect) || eventManager.dealTableSelect(eventArgsSet, !0))));
51781
51892
  !(null === (_h = table.options.select) || void 0 === _h ? void 0 : _h.disableDragSelect) && table.eventManager.isDraging && stateManager.isSelecting() && !(null === (_j = table.editorManager) || void 0 === _j ? void 0 : _j.editingEditor) && eventManager.dealTableSelect(eventArgsSet, !0);
51782
51893
  const cellGoup = e.path.find(node => "cell" === node.role);
51783
51894
  if (table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL) && (-1 === table.stateManager.hover.cellPos.col || -1 === table.stateManager.hover.cellPos.row || (null == cellGoup ? void 0 : cellGoup.col) === table.stateManager.hover.cellPos.col && (null == cellGoup ? void 0 : cellGoup.row) === table.stateManager.hover.cellPos.row || table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
@@ -52092,8 +52203,9 @@
52092
52203
  (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null);
52093
52204
  }
52094
52205
  }), table.scenegraph.stage.addEventListener("pointermove", e => {
52206
+ var _a, _b, _c;
52095
52207
  const eventArgsSet = getCellEventArgsSet(e);
52096
- stateManager.isResizeCol() || eventManager.checkColumnResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("col-resize") : stateManager.isResizeRow() || eventManager.checkRowResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("row-resize") : stateManager.isMoveCol() || stateManager.updateCursor();
52208
+ null !== (_c = null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.isDescendantsOf) || void 0 === _b ? void 0 : _b.call(_a, table.scenegraph.tableGroup)) && void 0 !== _c && _c && (stateManager.isResizeCol() || eventManager.checkColumnResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("col-resize") : stateManager.isResizeRow() || eventManager.checkRowResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("row-resize") : stateManager.isMoveCol() || stateManager.updateCursor());
52097
52209
  }), table.scenegraph.tableGroup.addEventListener("checkbox_state_change", e => {
52098
52210
  var _a, _b;
52099
52211
  const eventArgsSet = getCellEventArgsSet(e),
@@ -52446,7 +52558,7 @@
52446
52558
  !1 !== (null === (_a = table.eventOptions) || void 0 === _a ? void 0 : _a.preventDefaultContextMenu) ? e.preventDefault() : globalPointerupCallback(e);
52447
52559
  }), table.options.canvas || handler.on(table.getContainer(), "resize", e => {
52448
52560
  var _a;
52449
- table.isReleased || 0 === e.width && 0 === e.height || ((table.autoFillWidth || table.autoFillHeight) && (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit()), isValid$5(table.options.pixelRatio) || table.setPixelRatio(getPixelRatio()), e.windowSizeNotChange || table.resize());
52561
+ table.isReleased || 0 === e.width && 0 === e.height || ((table.autoFillWidth || table.autoFillHeight || "adaptive" === table.widthMode || "adaptive" === table.heightMode) && (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit()), isValid$5(table.options.pixelRatio) || table.setPixelRatio(getPixelRatio()), e.windowSizeNotChange || table.resize());
52450
52562
  });
52451
52563
  const globalPointerdownCallback = e => {
52452
52564
  var _a;
@@ -52528,10 +52640,10 @@
52528
52640
  stateManager.interactionState === InteractionState.grabing && (stateManager.isResizeCol() ? (eventManager.dealColumnResize(x, y), table.hasListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN) && table.fireListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN, {
52529
52641
  col: table.stateManager.columnResize.col,
52530
52642
  colWidth: table.getColWidth(table.stateManager.columnResize.col)
52531
- })) : stateManager.isResizeRow() && (eventManager.dealRowResize(x, y), table.hasListeners(TABLE_EVENT_TYPE.RESIZE_ROW) && table.fireListeners(TABLE_EVENT_TYPE.RESIZE_ROW, {
52643
+ })) : stateManager.isResizeRow() ? (eventManager.dealRowResize(x, y), table.hasListeners(TABLE_EVENT_TYPE.RESIZE_ROW) && table.fireListeners(TABLE_EVENT_TYPE.RESIZE_ROW, {
52532
52644
  row: table.stateManager.rowResize.row,
52533
52645
  rowHeight: table.getRowHeight(table.stateManager.rowResize.row)
52534
- })));
52646
+ })) : stateManager.isMoveCol() && eventManager.dealColumnMover(x, y, e));
52535
52647
  const isSelecting = table.stateManager.isSelecting();
52536
52648
  if (eventManager._enableTableScroll && eventManager.isDraging && isSelecting && (null === (_e = table.stateManager.select.ranges) || void 0 === _e ? void 0 : _e.length) > 0) {
52537
52649
  const drawRange = table.getDrawRange(),
@@ -52606,7 +52718,7 @@
52606
52718
  handleWhell({
52607
52719
  deltaX: deltaX,
52608
52720
  deltaY: deltaY
52609
- }, stateManager), e.cancelable && ("none" === table.internalProps.overscrollBehavior || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, stateManager) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, stateManager)) && e.preventDefault();
52721
+ }, stateManager), e.cancelable && ("none" === table.internalProps.overscrollBehavior && (deltaY && isVerticalExistScrollBar(stateManager) || deltaX && isHorizontalExistScrollBar(stateManager)) || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, stateManager) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, stateManager)) && e.preventDefault();
52610
52722
  }
52611
52723
  };
52612
52724
  vglobal.addEventListener("touchmove", globalTouchMoveCallback, {
@@ -52936,7 +53048,7 @@
52936
53048
  if (table.eventManager.checkCellFillhandle(eventArgsSet)) table.fireListeners(TABLE_EVENT_TYPE.DBLCLICK_FILL_HANDLE, {});else if (table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0 && !disableDblclickAutoResizeColWidth) {
52937
53049
  table.scenegraph.updateAutoColWidth(resizeCol.col), table.internalProps._widthResizedColMap.add(resizeCol.col), table.scenegraph.updateChartSizeForResizeColWidth(resizeCol.col);
52938
53050
  const state = table.stateManager;
52939
- state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen);
53051
+ state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen), (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose || state.table.options.rightFrozenColCount) && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
52940
53052
  const colWidths = [];
52941
53053
  for (let col = 0; col < table.colCount; col++) colWidths.push(table.getColWidth(col));
52942
53054
  table.fireListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, {
@@ -53145,12 +53257,10 @@
53145
53257
  } = eventArgsSet;
53146
53258
  return !(!eventArgs || !this.table._canDragHeaderPosition(eventArgs.col, eventArgs.row)) && (this.table.stateManager.startMoveCol(eventArgs.col, eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, null === (_a = null == eventArgs ? void 0 : eventArgs.event) || void 0 === _a ? void 0 : _a.nativeEvent), !0);
53147
53259
  }
53148
- dealColumnMover(eventArgsSet) {
53149
- var _a;
53150
- const {
53151
- eventArgs: eventArgs
53152
- } = eventArgsSet;
53153
- isValid$5(eventArgs.col) && isValid$5(eventArgs.row) && this.table.stateManager.updateMoveCol(eventArgs.col, eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, null === (_a = null == eventArgs ? void 0 : eventArgs.event) || void 0 === _a ? void 0 : _a.nativeEvent);
53260
+ dealColumnMover(x, y, event) {
53261
+ let col = this.table.getColAtRelativePosition(x),
53262
+ row = this.table.getRowAtRelativePosition(y);
53263
+ -1 === col && "row" === this.table.stateManager.columnMove.movingColumnOrRow && (col = 0), -1 === row && "column" === this.table.stateManager.columnMove.movingColumnOrRow && (row = 0), isValid$5(col) && isValid$5(row) && this.table.stateManager.updateMoveCol(col, row, x, y, event);
53154
53264
  }
53155
53265
  startColumnResize(eventArgsSet) {}
53156
53266
  dealIconClick(e, eventArgsSet) {
@@ -53354,7 +53464,7 @@
53354
53464
  });
53355
53465
  } else navigator.clipboard.read().then(clipboardItems => {
53356
53466
  for (const item of clipboardItems) item.types.includes("text/plain") && item.getType("text/plain").then(blob => {
53357
- blob.text().then(this._pasteValue);
53467
+ blob.text().then(data => this._pasteValue(data));
53358
53468
  });
53359
53469
  });
53360
53470
  }));
@@ -54617,12 +54727,12 @@
54617
54727
  clearRange() {
54618
54728
  this.cumulativeSum.clear(), this.difference.clear();
54619
54729
  }
54620
- add(position, value) {
54730
+ _add(position, value) {
54621
54731
  if (!isValid$5(value)) return;
54622
54732
  const defaultValue = this.table.getRowHeight(position);
54623
54733
  this.data.has(position) || (this._keys.push(position), this._sorted = !1), this.data.set(position, value), this.totalSum += value, this.updateDifference(position, value - defaultValue);
54624
54734
  }
54625
- remove(position) {
54735
+ _remove(position) {
54626
54736
  if (this.data.has(position)) {
54627
54737
  const value = this.data.get(position);
54628
54738
  this.data.delete(position);
@@ -54639,7 +54749,7 @@
54639
54749
  this.data.set(position, newValue);
54640
54750
  const difference = newValue - oldValue;
54641
54751
  this.totalSum += difference, this.updateDifference(position, difference);
54642
- } else this.add(position, newValue);
54752
+ } else this._add(position, newValue);
54643
54753
  }
54644
54754
  get(position) {
54645
54755
  return this.data.get(position);
@@ -54706,21 +54816,38 @@
54706
54816
  }
54707
54817
  insert(position, value) {
54708
54818
  for (let i = position; i <= this.getLastIndex(); i++) this.cumulativeSum.delete(i);
54709
- const lastIndex = this.getLastIndex() + 1;
54710
- this.adjustOrder(position, position + 1, lastIndex - position), isValid$5(value) && this.put(position, value);
54819
+ const lastIndex = this.getLastIndex() + 1,
54820
+ values = [];
54821
+ for (let i = position; i <= lastIndex; i++) this.has(i) && (values.push({
54822
+ position: i,
54823
+ value: this.get(i)
54824
+ }), this._remove(i));
54825
+ isValid$5(value) && this.put(position, value);
54826
+ for (const {
54827
+ position: position,
54828
+ value: value
54829
+ } of values) this.put(position + 1, value);
54711
54830
  }
54712
54831
  getLastIndex() {
54713
54832
  return this._sort(), this._keys[this._keys.length - 1];
54714
54833
  }
54715
54834
  delLast() {
54716
54835
  const lastIndex = this.getLastIndex();
54717
- this.remove(lastIndex);
54836
+ this._remove(lastIndex);
54718
54837
  }
54719
54838
  delete(position) {
54720
- if (!this.has(position)) return;
54721
54839
  for (let i = position; i <= this.getLastIndex(); i++) this.cumulativeSum.delete(i);
54722
54840
  const lastIndex = this.getLastIndex();
54723
- this.adjustOrder(position + 1, position, lastIndex - position), this.delLast();
54841
+ this.has(position) && this._remove(position);
54842
+ const values = [];
54843
+ for (let i = position + 1; i <= lastIndex; i++) this.has(i) && values.push({
54844
+ position: i,
54845
+ value: this.get(i)
54846
+ });
54847
+ for (const {
54848
+ position: position,
54849
+ value: value
54850
+ } of values) this._remove(position), this._add(position - 1, value);
54724
54851
  }
54725
54852
  adjustOrder(sourceIndex, targetIndex, moveCount) {
54726
54853
  this.clearRange(), this._sort();
@@ -54748,28 +54875,12 @@
54748
54875
  }
54749
54876
  }
54750
54877
  exchangeOrder(sourceIndex, sourceCount, targetIndex, targetCount, insertIndex) {
54751
- const {
54752
- _keys: keys
54753
- } = this;
54754
- if (this._sorted || (keys.sort((a, b) => a < b ? -1 : a > b ? 1 : 0), this._sorted = !0), sourceIndex > targetIndex) {
54755
- const targetVals = [],
54756
- sourceVals = [];
54757
- for (let i = indexFirst(keys, targetIndex); i < indexFirst(keys, sourceIndex) + sourceCount; i++) {
54758
- const key = keys[i];
54759
- key >= sourceIndex && key < sourceIndex + sourceCount ? sourceVals.push(this.get(key)) : targetVals.push(this.get(key));
54760
- }
54761
- for (let i = 0; i < sourceCount; i++) this.put(insertIndex + i, sourceVals[i]);
54762
- for (let i = 0; i < targetVals.length; i++) this.put(insertIndex + sourceCount + i, targetVals[i]);
54763
- } else {
54764
- const targetVals = [],
54765
- sourceVals = [];
54766
- for (let i = indexFirst(keys, sourceIndex); i < indexFirst(keys, targetIndex) + targetCount; i++) {
54767
- const key = keys[i];
54768
- key >= sourceIndex && key < sourceIndex + sourceCount ? sourceVals.push(this.get(key)) : targetVals.push(this.get(key));
54769
- }
54770
- for (let i = 0; i < sourceCount; i++) this.put(insertIndex + i, sourceVals[i]);
54771
- for (let i = 0; i < targetVals.length; i++) this.put(sourceIndex + i, targetVals[i]);
54772
- }
54878
+ const values = [];
54879
+ for (let i = sourceIndex + sourceCount - 1; i >= sourceIndex; i--) values.push({
54880
+ position: i,
54881
+ value: this.get(i)
54882
+ }), this.delete(i);
54883
+ for (let i = 0; i < sourceCount; i++) this.insert(insertIndex, values[i].value);
54773
54884
  }
54774
54885
  }
54775
54886
  function indexFirst(arr, elm) {
@@ -54780,7 +54891,8 @@
54780
54891
  if (arr[i] === elm) return i;
54781
54892
  arr[i] > elm ? high = i - 1 : low = i + 1;
54782
54893
  }
54783
- return high < 0 ? 0 : high;
54894
+ const tempI = high < 0 ? 0 : high;
54895
+ return arr[tempI] === elm ? tempI : -1;
54784
54896
  }
54785
54897
 
54786
54898
  class RowSeriesNumberHelper {
@@ -55537,6 +55649,34 @@
55537
55649
  row: -1
55538
55650
  };
55539
55651
  }
55652
+ function getColAtRelativePosition(x, _this) {
55653
+ let leftFrozen = !1;
55654
+ (x -= _this.tableX) > 0 && x < _this.getFrozenColsWidth() && (leftFrozen = !0);
55655
+ let rightFrozen = !1;
55656
+ x > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && x < _this.tableNoFrameWidth && x <= _this.getAllColsWidth() && (rightFrozen = !0);
55657
+ const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen || rightFrozen ? x : x + _this.scrollLeft) + _this.tableX, rightFrozen, _this);
55658
+ if (colInfo) {
55659
+ const {
55660
+ col: col
55661
+ } = colInfo;
55662
+ return col;
55663
+ }
55664
+ return -1;
55665
+ }
55666
+ function getRowAtRelativePosition(y, _this) {
55667
+ let topFrozen = !1;
55668
+ (y -= _this.tableY) > 0 && y < _this.getFrozenRowsHeight() && (topFrozen = !0);
55669
+ let bottomFrozen = !1;
55670
+ y > _this.tableNoFrameHeight - _this.getBottomFrozenRowsHeight() && y < _this.tableNoFrameHeight && y <= _this.getAllRowsHeight() && (bottomFrozen = !0);
55671
+ const rowInfo = getTargetRowAtConsiderBottomFrozen((topFrozen || bottomFrozen ? y : y + _this.scrollTop) + _this.tableY, bottomFrozen, _this);
55672
+ if (rowInfo) {
55673
+ const {
55674
+ row: row
55675
+ } = rowInfo;
55676
+ return row;
55677
+ }
55678
+ return -1;
55679
+ }
55540
55680
 
55541
55681
  function isValidAlignDomain(domain) {
55542
55682
  return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
@@ -55771,7 +55911,7 @@
55771
55911
  targetRange: targetRange,
55772
55912
  theme: theme
55773
55913
  } = axisRange;
55774
- isNumber$6(null == axisOption ? void 0 : axisOption.min) && (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)), isNumber$6(null == axisOption ? void 0 : axisOption.max) && (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1));
55914
+ isNumber$6(null == axisOption ? void 0 : axisOption.max) ? (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1)) : "boxPlot" === chartType && (range.max += (range.max - range.min) / 20), isNumber$6(null == axisOption ? void 0 : axisOption.min) ? (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)) : "boxPlot" === chartType && (range.min -= (range.max - range.min) / 20);
55775
55915
  let domain = [];
55776
55916
  if ("heatmap" === chartType) {
55777
55917
  const colDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.rowCount - layout.bottomFrozenRowCount - 1, "xField"),
@@ -55853,7 +55993,7 @@
55853
55993
  targetRange: targetRange,
55854
55994
  theme: theme
55855
55995
  } = axisRange;
55856
- isNumber$6(null == axisOption ? void 0 : axisOption.min) && (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)), isNumber$6(null == axisOption ? void 0 : axisOption.max) && (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1));
55996
+ isNumber$6(null == axisOption ? void 0 : axisOption.max) ? (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1)) : "boxPlot" === chartType && (range.max += (range.max - range.min) / 20), isNumber$6(null == axisOption ? void 0 : axisOption.min) ? (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)) : "boxPlot" === chartType && (range.min -= (range.max - range.min) / 20);
55857
55997
  let domain = [];
55858
55998
  if ("heatmap" === chartType) {
55859
55999
  const rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row, "yField"),
@@ -56176,7 +56316,8 @@
56176
56316
  range: range,
56177
56317
  isZeroAlign: isZeroAlign,
56178
56318
  isTickAlign: isTickAlign,
56179
- axisOption: axisOption
56319
+ axisOption: axisOption,
56320
+ chartType: chartType
56180
56321
  } = getChartAxisRange(col, row, index, position, indicatorKeys, path, layout),
56181
56322
  {
56182
56323
  targetRange: targetRange,
@@ -56202,7 +56343,8 @@
56202
56343
  axisOption: axisOption,
56203
56344
  range: range,
56204
56345
  targetTicks: targetTicks,
56205
- targetRange: targetRange
56346
+ targetRange: targetRange,
56347
+ chartType: chartType
56206
56348
  };
56207
56349
  }
56208
56350
  function getTargetRangeAndTicks(col, row, index, isZeroAlign, isTickAlign, range, indicatorKeys, subAxisPosition, path, layout) {
@@ -56531,7 +56673,7 @@
56531
56673
  }
56532
56674
  constructor(container, options = {}) {
56533
56675
  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;
56534
- if (super(), this.showFrozenIcon = !0, this.version = "1.0.19", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
56676
+ if (super(), this.showFrozenIcon = !0, this.version = "1.0.21", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
56535
56677
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
56536
56678
  options: options,
56537
56679
  container: container
@@ -57111,7 +57253,7 @@
57111
57253
  return this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
57112
57254
  }
57113
57255
  isAutoRowHeight(row) {
57114
- return "autoHeight" === this.heightMode || !!this.options.customComputeRowHeight || (row >= 0 && row < this.columnHeaderLevelCount ? "auto" === this.getDefaultRowHeight(row) : "auto" === this.internalProps.defaultRowHeight);
57256
+ return "autoHeight" === this.heightMode || !!this.options.customComputeRowHeight || !!this.internalProps.rowHeightConfig || (row >= 0 && row < this.columnHeaderLevelCount ? "auto" === this.getDefaultRowHeight(row) : "auto" === this.internalProps.defaultRowHeight);
57115
57257
  }
57116
57258
  getColWidth(col) {
57117
57259
  var _a;
@@ -57283,6 +57425,12 @@
57283
57425
  getCellAtRelativePosition(relativeX, relativeY) {
57284
57426
  return getCellAtRelativePosition(relativeX, relativeY, this);
57285
57427
  }
57428
+ getColAtRelativePosition(relativeX) {
57429
+ return getColAtRelativePosition(relativeX, this);
57430
+ }
57431
+ getRowAtRelativePosition(relativeY) {
57432
+ return getRowAtRelativePosition(relativeY, this);
57433
+ }
57286
57434
  _checkRowCol(col, row) {
57287
57435
  return col >= 0 && col < this.colCount && row >= 0 && row < this.rowCount;
57288
57436
  }
@@ -58666,6 +58814,22 @@
58666
58814
  height: !1
58667
58815
  };
58668
58816
  }
58817
+ isColumnSelected(col) {
58818
+ const selectRange = this.stateManager.select.ranges;
58819
+ for (let i = 0; i <= selectRange.length - 1; i++) {
58820
+ const range = selectRange[i];
58821
+ if (range.start.col <= col && range.end.col >= col && 0 === range.start.row && range.end.row === this.rowCount - 1) return !0;
58822
+ }
58823
+ return !1;
58824
+ }
58825
+ isRowSelected(row) {
58826
+ const selectRange = this.stateManager.select.ranges;
58827
+ for (let i = 0; i <= selectRange.length - 1; i++) {
58828
+ const range = selectRange[i];
58829
+ if (range.start.row <= row && range.end.row >= row && 0 === range.start.col && range.end.col === this.colCount - 1) return !0;
58830
+ }
58831
+ return !1;
58832
+ }
58669
58833
  };
58670
58834
 
58671
58835
  const chartTypes = {};
@@ -60021,9 +60185,10 @@
60021
60185
  range: range,
60022
60186
  targetTicks: targetTicks,
60023
60187
  targetRange: targetRange,
60024
- axisOption: axisOption
60188
+ axisOption: axisOption,
60189
+ chartType: chartType
60025
60190
  } = getAxisRangeAndTicks(col, row, index, 0 === index ? "bottom" : "top", 0 === index ? "top" : "bottom", indicatorKeys, colPath, layout);
60026
- isNumber$6(null == axisOption ? void 0 : axisOption.min) && (range.min = axisOption.min), isNumber$6(null == axisOption ? void 0 : axisOption.max) && (range.max = axisOption.max), hasSameAxis(axisOption, axes) || axes.push(merge$2({
60191
+ isNumber$6(null == axisOption ? void 0 : axisOption.max) ? range.max = axisOption.max : "boxPlot" === chartType && (range.max += (range.max - range.min) / 20), isNumber$6(null == axisOption ? void 0 : axisOption.min) ? range.min = axisOption.min : "boxPlot" === chartType && (range.min -= (range.max - range.min) / 20), hasSameAxis(axisOption, axes) || axes.push(merge$2({
60027
60192
  range: range,
60028
60193
  label: {
60029
60194
  style: {
@@ -60095,15 +60260,15 @@
60095
60260
  indicatorKeys.forEach((key, index) => {
60096
60261
  var _a, _b;
60097
60262
  const {
60098
- range: range,
60099
- targetTicks: targetTicks,
60100
- targetRange: targetRange,
60101
- axisOption: axisOption
60102
- } = getAxisRangeAndTicks(col, row, index, 0 === index ? "left" : "right", 0 === index ? "right" : "left", indicatorKeys, rowPath, layout);
60103
- if (isNumber$6(null == axisOption ? void 0 : axisOption.min) && (range.min = axisOption.min), isNumber$6(null == axisOption ? void 0 : axisOption.max) && (range.max = axisOption.max), hasSameAxis(axisOption, axes)) return;
60104
- const {
60105
- chartType: chartType
60106
- } = getAxisOption(col, row, 0 === index ? "left" : "right", layout);
60263
+ range: range,
60264
+ targetTicks: targetTicks,
60265
+ targetRange: targetRange,
60266
+ axisOption: axisOption
60267
+ } = getAxisRangeAndTicks(col, row, index, 0 === index ? "left" : "right", 0 === index ? "right" : "left", indicatorKeys, rowPath, layout),
60268
+ {
60269
+ chartType: chartType
60270
+ } = getAxisOption(col, row, 0 === index ? "left" : "right", layout);
60271
+ if (isNumber$6(null == axisOption ? void 0 : axisOption.max) ? range.max = axisOption.max : "boxPlot" === chartType && (range.max += (range.max - range.min) / 20), isNumber$6(null == axisOption ? void 0 : axisOption.min) ? range.min = axisOption.min : "boxPlot" === chartType && (range.min -= (range.max - range.min) / 20), hasSameAxis(axisOption, axes)) return;
60107
60272
  let domain = [];
60108
60273
  if ("heatmap" === chartType) {
60109
60274
  const rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row, "yField"),
@@ -60960,16 +61125,17 @@
60960
61125
  }
60961
61126
  }
60962
61127
  canMoveHeaderPosition(source, target) {
61128
+ const dragColumnOrRow = this._table.stateManager.columnMove.movingColumnOrRow;
60963
61129
  if (this.isSeriesNumberInHeader(target.col, target.row) || this.isSeriesNumberInHeader(source.col, source.row)) return !1;
60964
- if (!this.transpose && this.isSeriesNumberInBody(target.col, target.row) && this.isSeriesNumberInBody(source.col, source.row)) {
61130
+ if (!this.transpose && (this.isSeriesNumberInBody(target.col, target.row) && this.isSeriesNumberInBody(source.col, source.row) || "row" === dragColumnOrRow)) {
60965
61131
  const sourceIndex = this.getRecordShowIndexByCell(0, source.row),
60966
61132
  targetIndex = this.getRecordShowIndexByCell(0, target.row);
60967
61133
  return this._table.dataSource.canChangeOrder(sourceIndex, targetIndex);
60968
61134
  }
60969
- if (this.transpose && this.isSeriesNumberInBody(target.col, target.row) && this.isSeriesNumberInBody(source.col, source.row) && (this.getBody(source.col + this.leftRowSeriesNumberColumnCount, source.row).isChildNode && this.getBody(target.col + this.leftRowSeriesNumberColumnCount, target.row).isChildNode ? (source.col = source.col + this.leftRowSeriesNumberColumnCount + this.rowHeaderLevelCount - 1, target.col = target.col + this.leftRowSeriesNumberColumnCount + this.rowHeaderLevelCount - 1) : (source.col = source.col + this.leftRowSeriesNumberColumnCount, target.col = target.col + this.leftRowSeriesNumberColumnCount)), source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) return !1;
61135
+ if (this.transpose && (this.isSeriesNumberInBody(target.col, target.row) && this.isSeriesNumberInBody(source.col, source.row) || "row" === dragColumnOrRow) && (this.getBody(source.col + this.leftRowSeriesNumberColumnCount, source.row).isChildNode && this.getBody(target.col + this.leftRowSeriesNumberColumnCount, target.row).isChildNode ? (source.col = source.col + this.leftRowSeriesNumberColumnCount + this.rowHeaderLevelCount - 1, target.col = target.col + this.leftRowSeriesNumberColumnCount + this.rowHeaderLevelCount - 1) : (source.col = source.col + this.leftRowSeriesNumberColumnCount, target.col = target.col + this.leftRowSeriesNumberColumnCount)), source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) return !1;
60970
61136
  if ("disabled" === this._table.internalProps.frozenColDragHeaderMode && this._table.isFrozenColumn(target.col)) return !1;
60971
61137
  const sourceCellRange = this.getCellRange(source.col, source.row);
60972
- if (this.isColumnHeader(source.col, source.row)) {
61138
+ if (this.isColumnHeader(source.col, source.row) || "column" === this._table.stateManager.columnMove.movingColumnOrRow && 0 === source.row) {
60973
61139
  return this.getParentCellId(source.col, sourceCellRange.start.row) === this.getParentCellId(target.col, sourceCellRange.start.row);
60974
61140
  }
60975
61141
  if (this.isRowHeader(source.col, source.row)) {
@@ -60978,10 +61144,10 @@
60978
61144
  return !1;
60979
61145
  }
60980
61146
  moveHeaderPosition(source, target) {
60981
- var _a, _b;
61147
+ var _a, _b, _c, _d, _e, _f, _g;
60982
61148
  if ((!(null === (_a = this._table.options.dragOrder) || void 0 === _a ? void 0 : _a.validateDragOrderOnEnd) || (null === (_b = this._table.options.dragOrder) || void 0 === _b ? void 0 : _b.validateDragOrderOnEnd(source, target))) && this.canMoveHeaderPosition(source, target)) {
60983
61149
  let sourceCellRange = this.getCellRange(source.col, source.row);
60984
- if (this.isColumnHeader(source.col, source.row)) {
61150
+ if (this.isColumnHeader(source.col, source.row) || "column" === this._table.stateManager.columnMove.movingColumnOrRow && 0 === source.row) {
60985
61151
  const sourceSize = sourceCellRange.end.col - sourceCellRange.start.col + 1;
60986
61152
  let targetIndex;
60987
61153
  const targetCellRange = this.getCellRange(target.col, sourceCellRange.start.row);
@@ -60990,8 +61156,18 @@
60990
61156
  const sourceIds = this._headerCellIds[row].splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
60991
61157
  sourceIds.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
60992
61158
  }
61159
+ if (null === (_c = this._table.options.dragOrder) || void 0 === _c ? void 0 : _c.maintainArrayDataOrder) for (let j = 0; j < (null === (_d = this._table.dataSource.dataSourceObj) || void 0 === _d ? void 0 : _d.records.length); j++) {
61160
+ const rowRecords = null === (_e = this._table.dataSource.dataSourceObj) || void 0 === _e ? void 0 : _e.records[j];
61161
+ if (Array.isArray(rowRecords)) {
61162
+ rowRecords.length - 1 < Math.max(targetIndex, source.col) && rowRecords.push(...Array(Math.max(targetIndex, source.col) - rowRecords.length + 1).fill(void 0));
61163
+ const sourceData = rowRecords.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
61164
+ sourceData.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(rowRecords, sourceData);
61165
+ }
61166
+ }
60993
61167
  const sourceColumns = this._columns.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
60994
- return sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
61168
+ if (sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), null === (_f = this._table.options.dragOrder) || void 0 === _f ? void 0 : _f.maintainArrayDataOrder) for (let i = 0; i < this._columns.length; i++) this._columns[i].field = i;
61169
+ if (this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount), null === (_g = this._table.options.dragOrder) || void 0 === _g ? void 0 : _g.maintainArrayDataOrder) for (let i = 0; i < this.columnTree.tree.children.length; i++) this.columnTree.tree.children[i].field = i;
61170
+ return this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
60995
61171
  sourceIndex: sourceCellRange.start.col,
60996
61172
  targetIndex: targetIndex,
60997
61173
  sourceSize: sourceSize,
@@ -61018,7 +61194,7 @@
61018
61194
  moveType: "row"
61019
61195
  };
61020
61196
  }
61021
- if (this.isSeriesNumberInBody(source.col, source.row)) return {
61197
+ if (this.isSeriesNumberInBody(source.col, source.row) || "row" === this._table.stateManager.columnMove.movingColumnOrRow) return {
61022
61198
  sourceIndex: source.row,
61023
61199
  targetIndex: target.row,
61024
61200
  sourceSize: 1,
@@ -61456,140 +61632,152 @@
61456
61632
  }
61457
61633
  function listTableAddRecord(record, recordIndex, table) {
61458
61634
  var _a, _b, _c, _d;
61459
- if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, [record], recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, [record], recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordForSorted(record), table.stateManager.checkedState.clear(), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
61460
- (void 0 === recordIndex || recordIndex > table.dataSource.sourceLength) && (recordIndex = table.dataSource.sourceLength);
61461
- const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
61462
- table.dataSource.addRecord(record, recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1);
61463
- const oldRowCount = table.rowCount;
61464
- if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(), void table.scenegraph.createSceneGraph();
61465
- const newRowCount = table.transpose ? table.colCount : table.rowCount;
61466
- if (table.pagination) {
61467
- const {
61468
- perPageCount: perPageCount,
61469
- currentPage: currentPage
61470
- } = table.pagination,
61471
- endIndex = perPageCount * (currentPage || 0) + perPageCount;
61472
- if (recordIndex < endIndex) if (recordIndex < endIndex - perPageCount) table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
61473
- const rowNum = recordIndex - (endIndex - perPageCount) + headerCount;
61474
- if (oldRowCount - headerCount === table.pagination.perPageCount) {
61475
- const updateRows = [];
61476
- for (let row = rowNum; row < newRowCount; row++) table.transpose ? updateRows.push({
61477
- col: row,
61478
- row: 0
61479
- }) : updateRows.push({
61480
- col: 0,
61481
- row: row
61482
- });
61483
- table.transpose ? table.scenegraph.updateCol([], [], updateRows) : table.scenegraph.updateRow([], [], updateRows);
61484
- } else {
61485
- const addRows = [];
61486
- for (let row = rowNum; row < Math.min(newRowCount, rowNum + 1); row++) table.transpose ? addRows.push({
61487
- col: row,
61488
- row: 0
61489
- }) : addRows.push({
61490
- col: 0,
61491
- row: row
61492
- });
61493
- table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);
61635
+ try {
61636
+ if (!record) return !1;
61637
+ if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, [record], recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, [record], recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordForSorted(record), table.stateManager.checkedState.clear(), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
61638
+ (void 0 === recordIndex || recordIndex > table.dataSource.sourceLength) && (recordIndex = table.dataSource.sourceLength);
61639
+ const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
61640
+ table.dataSource.addRecord(record, recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1);
61641
+ const oldRowCount = table.rowCount;
61642
+ if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(), !0;
61643
+ const newRowCount = table.transpose ? table.colCount : table.rowCount;
61644
+ if (table.pagination) {
61645
+ const {
61646
+ perPageCount: perPageCount,
61647
+ currentPage: currentPage
61648
+ } = table.pagination,
61649
+ endIndex = perPageCount * (currentPage || 0) + perPageCount;
61650
+ if (recordIndex < endIndex) if (recordIndex < endIndex - perPageCount) table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
61651
+ const rowNum = recordIndex - (endIndex - perPageCount) + headerCount;
61652
+ if (oldRowCount - headerCount === table.pagination.perPageCount) {
61653
+ const updateRows = [];
61654
+ for (let row = rowNum; row < newRowCount; row++) table.transpose ? updateRows.push({
61655
+ col: row,
61656
+ row: 0
61657
+ }) : updateRows.push({
61658
+ col: 0,
61659
+ row: row
61660
+ });
61661
+ table.transpose ? table.scenegraph.updateCol([], [], updateRows) : table.scenegraph.updateRow([], [], updateRows);
61662
+ } else {
61663
+ const addRows = [];
61664
+ for (let row = rowNum; row < Math.min(newRowCount, rowNum + 1); row++) table.transpose ? addRows.push({
61665
+ col: row,
61666
+ row: 0
61667
+ }) : addRows.push({
61668
+ col: 0,
61669
+ row: row
61670
+ });
61671
+ table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);
61672
+ }
61494
61673
  }
61674
+ } else {
61675
+ const addRows = [];
61676
+ for (let row = recordIndex + headerCount; row < recordIndex + headerCount + 1; row++) table.transpose ? addRows.push({
61677
+ col: row,
61678
+ row: 0
61679
+ }) : addRows.push({
61680
+ col: 0,
61681
+ row: row
61682
+ });
61683
+ const updateRows = [],
61684
+ topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount,
61685
+ bottomAggregationCount = table.internalProps.layoutMap.hasAggregationOnBottomCount;
61686
+ for (let row = headerCount; row < headerCount + topAggregationCount; row++) table.transpose ? updateRows.push({
61687
+ col: row,
61688
+ row: 0
61689
+ }) : updateRows.push({
61690
+ col: 0,
61691
+ row: row
61692
+ });
61693
+ for (let row = (table.transpose ? table.colCount : table.rowCount) - bottomAggregationCount; row < (table.transpose ? table.colCount : table.rowCount); row++) table.transpose ? updateRows.push({
61694
+ col: row,
61695
+ row: 0
61696
+ }) : updateRows.push({
61697
+ col: 0,
61698
+ row: row
61699
+ });
61700
+ table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);
61495
61701
  }
61496
- } else {
61497
- const addRows = [];
61498
- for (let row = recordIndex + headerCount; row < recordIndex + headerCount + 1; row++) table.transpose ? addRows.push({
61499
- col: row,
61500
- row: 0
61501
- }) : addRows.push({
61502
- col: 0,
61503
- row: row
61504
- });
61505
- const updateRows = [],
61506
- topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount,
61507
- bottomAggregationCount = table.internalProps.layoutMap.hasAggregationOnBottomCount;
61508
- for (let row = headerCount; row < headerCount + topAggregationCount; row++) table.transpose ? updateRows.push({
61509
- col: row,
61510
- row: 0
61511
- }) : updateRows.push({
61512
- col: 0,
61513
- row: row
61514
- });
61515
- for (let row = (table.transpose ? table.colCount : table.rowCount) - bottomAggregationCount; row < (table.transpose ? table.colCount : table.rowCount); row++) table.transpose ? updateRows.push({
61516
- col: row,
61517
- row: 0
61518
- }) : updateRows.push({
61519
- col: 0,
61520
- row: row
61521
- });
61522
- table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);
61523
61702
  }
61703
+ return !0;
61704
+ } catch (error) {
61705
+ return !1;
61524
61706
  }
61525
61707
  }
61526
61708
  function listTableAddRecords(records, recordIndex, table) {
61527
61709
  var _a, _b, _c, _d;
61528
- if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, records, recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordsForSorted(records), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
61529
- void 0 === recordIndex || recordIndex > table.dataSource.sourceLength ? recordIndex = table.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
61530
- const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
61531
- table.dataSource.addRecords(records, recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length);
61532
- const oldRowCount = table.transpose ? table.colCount : table.rowCount;
61533
- if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(), void table.scenegraph.createSceneGraph();
61534
- const newRowCount = table.transpose ? table.colCount : table.rowCount;
61535
- if (table.pagination) {
61536
- const {
61537
- perPageCount: perPageCount,
61538
- currentPage: currentPage
61539
- } = table.pagination,
61540
- endIndex = perPageCount * (currentPage || 0) + perPageCount;
61541
- if (recordIndex < endIndex) if (recordIndex < endIndex - perPageCount) table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
61542
- const rowNum = recordIndex - (endIndex - perPageCount) + headerCount;
61543
- if (oldRowCount - headerCount === table.pagination.perPageCount) {
61544
- const updateRows = [];
61545
- for (let row = rowNum; row < newRowCount; row++) table.transpose ? updateRows.push({
61546
- col: row,
61547
- row: 0
61548
- }) : updateRows.push({
61549
- col: 0,
61550
- row: row
61551
- });
61552
- table.transpose ? table.scenegraph.updateCol([], [], updateRows) : table.scenegraph.updateRow([], [], updateRows);
61553
- } else {
61554
- const addRows = [];
61555
- for (let row = rowNum; row < Math.min(newRowCount, rowNum + (Array.isArray(records) ? records.length : 1)); row++) table.transpose ? addRows.push({
61556
- col: row,
61557
- row: 0
61558
- }) : addRows.push({
61559
- col: 0,
61560
- row: row
61561
- });
61562
- table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);
61710
+ try {
61711
+ if (!records || 0 === records.length) return !1;
61712
+ if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, records, recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordsForSorted(records), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
61713
+ void 0 === recordIndex || recordIndex > table.dataSource.sourceLength ? recordIndex = table.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
61714
+ const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
61715
+ table.dataSource.addRecords(records, recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length);
61716
+ const oldRowCount = table.transpose ? table.colCount : table.rowCount;
61717
+ if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(), !0;
61718
+ const newRowCount = table.transpose ? table.colCount : table.rowCount;
61719
+ if (table.pagination) {
61720
+ const {
61721
+ perPageCount: perPageCount,
61722
+ currentPage: currentPage
61723
+ } = table.pagination,
61724
+ endIndex = perPageCount * (currentPage || 0) + perPageCount;
61725
+ if (recordIndex < endIndex) if (recordIndex < endIndex - perPageCount) table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
61726
+ const rowNum = recordIndex - (endIndex - perPageCount) + headerCount;
61727
+ if (oldRowCount - headerCount === table.pagination.perPageCount) {
61728
+ const updateRows = [];
61729
+ for (let row = rowNum; row < newRowCount; row++) table.transpose ? updateRows.push({
61730
+ col: row,
61731
+ row: 0
61732
+ }) : updateRows.push({
61733
+ col: 0,
61734
+ row: row
61735
+ });
61736
+ table.transpose ? table.scenegraph.updateCol([], [], updateRows) : table.scenegraph.updateRow([], [], updateRows);
61737
+ } else {
61738
+ const addRows = [];
61739
+ for (let row = rowNum; row < Math.min(newRowCount, rowNum + (Array.isArray(records) ? records.length : 1)); row++) table.transpose ? addRows.push({
61740
+ col: row,
61741
+ row: 0
61742
+ }) : addRows.push({
61743
+ col: 0,
61744
+ row: row
61745
+ });
61746
+ table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);
61747
+ }
61563
61748
  }
61749
+ } else {
61750
+ const addRows = [];
61751
+ for (let row = recordIndex + headerCount; row < recordIndex + headerCount + (Array.isArray(records) ? records.length : 1); row++) table.transpose ? addRows.push({
61752
+ col: row,
61753
+ row: 0
61754
+ }) : addRows.push({
61755
+ col: 0,
61756
+ row: row
61757
+ });
61758
+ const topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount,
61759
+ bottomAggregationCount = table.internalProps.layoutMap.hasAggregationOnBottomCount,
61760
+ updateRows = [];
61761
+ for (let row = headerCount; row < headerCount + topAggregationCount; row++) table.transpose ? updateRows.push({
61762
+ col: row,
61763
+ row: 0
61764
+ }) : updateRows.push({
61765
+ col: 0,
61766
+ row: row
61767
+ });
61768
+ for (let row = (table.transpose ? table.colCount : table.rowCount) - bottomAggregationCount; row < (table.transpose ? table.colCount : table.rowCount); row++) table.transpose ? updateRows.push({
61769
+ col: row,
61770
+ row: 0
61771
+ }) : updateRows.push({
61772
+ col: 0,
61773
+ row: row
61774
+ });
61775
+ table.transpose ? table.scenegraph.updateCol([], addRows, updateRows) : table.scenegraph.updateRow([], addRows, updateRows);
61564
61776
  }
61565
- } else {
61566
- const addRows = [];
61567
- for (let row = recordIndex + headerCount; row < recordIndex + headerCount + (Array.isArray(records) ? records.length : 1); row++) table.transpose ? addRows.push({
61568
- col: row,
61569
- row: 0
61570
- }) : addRows.push({
61571
- col: 0,
61572
- row: row
61573
- });
61574
- const topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount,
61575
- bottomAggregationCount = table.internalProps.layoutMap.hasAggregationOnBottomCount,
61576
- updateRows = [];
61577
- for (let row = headerCount; row < headerCount + topAggregationCount; row++) table.transpose ? updateRows.push({
61578
- col: row,
61579
- row: 0
61580
- }) : updateRows.push({
61581
- col: 0,
61582
- row: row
61583
- });
61584
- for (let row = (table.transpose ? table.colCount : table.rowCount) - bottomAggregationCount; row < (table.transpose ? table.colCount : table.rowCount); row++) table.transpose ? updateRows.push({
61585
- col: row,
61586
- row: 0
61587
- }) : updateRows.push({
61588
- col: 0,
61589
- row: row
61590
- });
61591
- table.transpose ? table.scenegraph.updateCol([], addRows, updateRows) : table.scenegraph.updateRow([], addRows, updateRows);
61592
61777
  }
61778
+ return !0;
61779
+ } catch (error) {
61780
+ return !1;
61593
61781
  }
61594
61782
  }
61595
61783
  function listTableDeleteRecords(recordIndexs, table) {
@@ -61945,7 +62133,7 @@
61945
62133
  if (internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule, this.internalProps.customDealGroupData) : {
61946
62134
  addRecordRule: options.addRecordRule,
61947
62135
  customDealGroupData: this.internalProps.customDealGroupData
61948
- }, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_d = null !== (_c = options.enableTreeNodeMerge) && void 0 !== _c ? _c : isValid$5(this.internalProps.groupBy)) && void 0 !== _d && _d, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_e = options.showHeader) || void 0 === _e || _e, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, "node" !== Env.mode && (this.editorManager = new EditManager(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
62136
+ }, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_d = null !== (_c = options.enableTreeNodeMerge) && void 0 !== _c ? _c : isValid$5(this.internalProps.groupBy)) && void 0 !== _d && _d, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_e = options.showHeader) || void 0 === _e || _e, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.internalProps.rowHeightConfig = options.rowHeightConfig, this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, "node" !== Env.mode && (this.editorManager = new EditManager(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
61949
62137
  sortState: internalProps.sortState
61950
62138
  }) : this.setRecords([]), options.title) {
61951
62139
  const Title = Factory.getComponent("title");
@@ -61982,14 +62170,17 @@
61982
62170
  get recordsCount() {
61983
62171
  return this.dataSource.records.length;
61984
62172
  }
61985
- updateColumns(columns, options) {
62173
+ updateColumns(columns, options = {
62174
+ clearColWidthCache: !1,
62175
+ clearRowHeightCache: !0
62176
+ }) {
61986
62177
  var _a, _b, _c, _d;
61987
62178
  this.scenegraph.clearCells();
61988
62179
  const oldHoverState = {
61989
62180
  col: this.stateManager.hover.cellPos.col,
61990
62181
  row: this.stateManager.hover.cellPos.row
61991
62182
  };
61992
- this.internalProps.columns = cloneDeepSpec(columns, ["children"]), generateAggregationForColumn(this), (null == options ? void 0 : options.clearColWidthCache) && this.internalProps._widthResizedColMap.clear(), this.options.columns = columns, this.internalProps.headerHelper.setTableColumnsEditor(), this._hasAutoImageColumn = void 0, this.refreshHeader(), null === (_b = (_a = this.dataSource).updateColumns) || void 0 === _b || _b.call(_a, this.internalProps.columns), this.records && checkHasAggregationOnColumnDefine(this.internalProps.columns) && this.dataSource.processRecords(null !== (_d = null === (_c = this.dataSource.dataSourceObj) || void 0 === _c ? void 0 : _c.records) && void 0 !== _d ? _d : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
62183
+ this.internalProps.columns = cloneDeepSpec(columns, ["children"]), generateAggregationForColumn(this), (null == options ? void 0 : options.clearColWidthCache) && this.internalProps._widthResizedColMap.clear(), this.options.columns = columns, this.internalProps.headerHelper.setTableColumnsEditor(), this._hasAutoImageColumn = void 0, this.refreshHeader(), null === (_b = (_a = this.dataSource).updateColumns) || void 0 === _b || _b.call(_a, this.internalProps.columns), this.records && checkHasAggregationOnColumnDefine(this.internalProps.columns) && this.dataSource.processRecords(null !== (_d = null === (_c = this.dataSource.dataSourceObj) || void 0 === _c ? void 0 : _c.records) && void 0 !== _d ? _d : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this.scenegraph.createSceneGraph(!(null == options ? void 0 : options.clearRowHeightCache)), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
61993
62184
  }
61994
62185
  _recreateSceneForStateChange() {
61995
62186
  var _a, _b;
@@ -62000,21 +62191,49 @@
62000
62191
  };
62001
62192
  this._hasAutoImageColumn = void 0, this.refreshHeader(), this.records && checkHasAggregationOnColumnDefine(this.internalProps.columns) && this.dataSource.processRecords(null !== (_b = null === (_a = this.dataSource.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this._updateSize(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
62002
62193
  }
62003
- addColumn(column, colIndex, isMaintainArrayData = !0) {
62194
+ addColumns(toAddColumns, colIndex, isMaintainArrayData = !0) {
62195
+ var _a;
62004
62196
  const columns = this.options.columns;
62005
- if (void 0 === colIndex) columns.push(column);else {
62006
- if (isMaintainArrayData) for (let i = 0; i < columns.length; i++) "number" == typeof columns[i].field && columns[i].field >= colIndex && (columns[i].field = columns[i].field + 1);
62007
- columns.splice(colIndex, 0, column);
62008
- }
62009
- if (isMaintainArrayData) for (let i = 0; i < this.records.length; i++) {
62010
- const record = this.records[i];
62011
- Array.isArray(record) && record.splice(colIndex, 0, void 0);
62197
+ void 0 === colIndex ? (colIndex = columns.length, columns.push(...toAddColumns)) : columns.splice(colIndex, 0, ...toAddColumns);
62198
+ for (let i = 0; i < toAddColumns.length; i++) this.colWidthsMap.addAndReorder(colIndex + i, null !== (_a = toAddColumns[i].width) && void 0 !== _a ? _a : this.internalProps.defaultColWidth);
62199
+ this.internalProps._colRangeWidthsMap.clear();
62200
+ const resizedColIndexs = Array.from(this.internalProps._widthResizedColMap.keys());
62201
+ for (let i = 0; i < resizedColIndexs.length; i++) resizedColIndexs[i] >= colIndex && (this.internalProps._widthResizedColMap.delete(resizedColIndexs[i]), this.internalProps._widthResizedColMap.add(resizedColIndexs[i] + toAddColumns.length));
62202
+ if (isMaintainArrayData) {
62203
+ for (let i = 0; i < columns.length; i++) columns[i].field = i;
62204
+ for (let i = 0; i < this.records.length; i++) {
62205
+ const record = this.records[i];
62206
+ Array.isArray(record) && record.splice(colIndex, 0, ...Array(toAddColumns.length).fill(void 0));
62207
+ }
62012
62208
  }
62013
- this.updateColumns(columns);
62209
+ this.updateColumns(columns, {
62210
+ clearRowHeightCache: !1
62211
+ }), this.fireListeners(TABLE_EVENT_TYPE.ADD_COLUMN, {
62212
+ columnIndex: colIndex,
62213
+ columnCount: toAddColumns.length,
62214
+ columns: columns
62215
+ });
62014
62216
  }
62015
- deleteColumn(colIndex) {
62217
+ deleteColumns(deleteColIndexs, isMaintainArrayData = !0) {
62016
62218
  const columns = this.options.columns;
62017
- columns.splice(colIndex, 1), this.updateColumns(columns);
62219
+ deleteColIndexs.sort((a, b) => b - a);
62220
+ for (let i = 0; i < deleteColIndexs.length; i++) if (columns.splice(deleteColIndexs[i], 1), this.colWidthsMap.delAndReorder(deleteColIndexs[i]), this.internalProps._widthResizedColMap.delete(deleteColIndexs[i]), isMaintainArrayData) for (let j = 0; j < this.records.length; j++) {
62221
+ const record = this.records[j];
62222
+ Array.isArray(record) && record.splice(deleteColIndexs[i], 1);
62223
+ }
62224
+ this.internalProps._colRangeWidthsMap.clear();
62225
+ const resizedColIndexs = Array.from(this.internalProps._widthResizedColMap.keys());
62226
+ for (let i = 0; i < resizedColIndexs.length; i++) for (let j = 0; j < deleteColIndexs.length; j++) if (resizedColIndexs[i] > deleteColIndexs[j]) {
62227
+ this.internalProps._widthResizedColMap.delete(resizedColIndexs[i]), this.internalProps._widthResizedColMap.add(resizedColIndexs[i] - (deleteColIndexs.length - j));
62228
+ break;
62229
+ }
62230
+ if (isMaintainArrayData) for (let i = 0; i < columns.length; i++) columns[i].field = i;
62231
+ this.updateColumns(columns, {
62232
+ clearRowHeightCache: !1
62233
+ }), this.fireListeners(TABLE_EVENT_TYPE.DELETE_COLUMN, {
62234
+ deleteColIndexs: deleteColIndexs,
62235
+ columns: columns
62236
+ });
62018
62237
  }
62019
62238
  get columns() {
62020
62239
  return this.internalProps.layoutMap.columnTree.getCopiedTree();
@@ -62193,7 +62412,7 @@
62193
62412
  const internalProps = this.internalProps;
62194
62413
  if (super.updateOption(options, updateConfig), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule, this.internalProps.customDealGroupData) : {
62195
62414
  addRecordRule: options.addRecordRule
62196
- }, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$5(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
62415
+ }, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$5(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.internalProps.rowHeightConfig = options.rowHeightConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
62197
62416
  const releaseObj = internalProps.releaseList[i];
62198
62417
  releaseObj instanceof DataSource ? releaseObj.updateColumns(this.internalProps.columns) : (null === (_g = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _g || _g.call(releaseObj), internalProps.releaseList.splice(i, 1));
62199
62418
  }
@@ -62249,7 +62468,7 @@
62249
62468
  const sourceCellRange = this.getCellRange(source.col, source.row),
62250
62469
  targetCellRange = this.getCellRange(target.col, target.row),
62251
62470
  moveContext = this.internalProps.layoutMap.moveHeaderPosition(source, target);
62252
- return moveContext ? ("column" === moveContext.moveType ? (this.colWidthsMap.exchangeOrder(sourceCellRange.start.col, sourceCellRange.end.col - sourceCellRange.start.col + 1, targetCellRange.start.col, targetCellRange.end.col - targetCellRange.start.col + 1, moveContext.targetIndex), this.transpose || (this.colWidthsLimit = {}, this.setMinMaxLimitWidth())) : moveContext.targetIndex > moveContext.sourceIndex ? this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex + moveContext.sourceSize - moveContext.targetSize, moveContext.targetSize, moveContext.targetIndex) : this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex), moveContext) : null;
62471
+ return moveContext ? ("column" === moveContext.moveType ? (this.colWidthsMap.exchangeOrder(sourceCellRange.start.col, sourceCellRange.end.col - sourceCellRange.start.col + 1, targetCellRange.start.col, targetCellRange.end.col - targetCellRange.start.col + 1, moveContext.targetIndex), adjustWidthResizedColMap(moveContext, this), this.transpose || (this.colWidthsLimit = {}, this.setMinMaxLimitWidth())) : (moveContext.targetIndex > moveContext.sourceIndex ? this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex + moveContext.sourceSize - moveContext.targetSize, moveContext.targetSize, moveContext.targetIndex) : this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex), adjustHeightResizedRowMap(moveContext, this)), moveContext) : null;
62253
62472
  }
62254
62473
  changeRecordOrder(sourceIndex, targetIndex) {
62255
62474
  this.transpose ? (sourceIndex = this.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = this.getRecordShowIndexByCell(targetIndex, 0)) : (sourceIndex = this.getRecordShowIndexByCell(0, sourceIndex), targetIndex = this.getRecordShowIndexByCell(0, targetIndex)), this.dataSource.changeOrder(sourceIndex, targetIndex);
@@ -62413,8 +62632,13 @@
62413
62632
  };
62414
62633
  })), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1, this.scenegraph.sortCell()), sortState.length && this.stateManager.updateSortState(sortState);
62415
62634
  }
62416
- updateFilterRules(filterRules) {
62417
- this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(), this.resize();
62635
+ updateFilterRules(filterRules, options = {
62636
+ clearRowHeightCache: !0
62637
+ }) {
62638
+ this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(!(null == options ? void 0 : options.clearRowHeightCache)), this.resize();
62639
+ }
62640
+ getFilteredRecords() {
62641
+ return this.dataSource.records;
62418
62642
  }
62419
62643
  getCheckboxState(field) {
62420
62644
  if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$5(field)) {
@@ -62555,18 +62779,39 @@
62555
62779
  }
62556
62780
  addRecord(record, recordIndex) {
62557
62781
  var _a;
62558
- listTableAddRecord(record, recordIndex, this), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
62782
+ const success = listTableAddRecord(record, recordIndex, this);
62783
+ adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
62784
+ records: [record],
62785
+ recordIndex: recordIndex,
62786
+ recordCount: 1
62787
+ });
62559
62788
  }
62560
62789
  addRecords(records, recordIndex) {
62561
62790
  var _a;
62562
- listTableAddRecords(records, recordIndex, this), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
62791
+ const success = listTableAddRecords(records, recordIndex, this);
62792
+ "number" == typeof recordIndex && adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, records), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
62793
+ records: records,
62794
+ recordIndex: recordIndex,
62795
+ recordCount: records.length
62796
+ });
62563
62797
  }
62564
62798
  deleteRecords(recordIndexs) {
62565
62799
  var _a;
62566
- listTableDeleteRecords(recordIndexs, this), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
62800
+ listTableDeleteRecords(recordIndexs, this), adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
62801
+ const rowIndexs = [];
62802
+ for (let i = 0; i < recordIndexs.length; i++) rowIndexs.push(this.getBodyRowIndexByRecordIndex(recordIndexs[i]) + this.columnHeaderLevelCount);
62803
+ this.fireListeners(TABLE_EVENT_TYPE.DELETE_RECORD, {
62804
+ recordIndexs: recordIndexs,
62805
+ rowIndexs: rowIndexs,
62806
+ deletedCount: (Array.isArray(recordIndexs[0]), recordIndexs.length)
62807
+ });
62567
62808
  }
62568
62809
  updateRecords(records, recordIndexs) {
62569
- listTableUpdateRecords(records, recordIndexs, this);
62810
+ listTableUpdateRecords(records, recordIndexs, this), this.fireListeners(TABLE_EVENT_TYPE.UPDATE_RECORD, {
62811
+ records: records,
62812
+ recordIndexs: recordIndexs,
62813
+ updateCount: records.length
62814
+ });
62570
62815
  }
62571
62816
  _hasCustomRenderOrLayout() {
62572
62817
  var _a, _b, _c, _d;
@@ -65946,7 +66191,7 @@
65946
66191
  cellGroup.forEachChildren(child => {
65947
66192
  "icon-left" === child.role ? child.setAttribute("x", child.attribute.x + padding[3]) : "icon-right" === child.role ? child.setAttribute("x", child.attribute.x + Awidth - cellRightIconWidth + padding[3]) : "icon-absolute-right" === child.role ? child.setAttribute("x", child.attribute.x + Awidth - cellabsoluteRightIconWidth + padding[3] + padding[1]) : "content" !== child.name && "checkbox-content" !== child.name || ("center" === textAlign && "richtext" !== child.type ? child.setAttribute("x", padding[3] + cellLeftIconWidth + (Awidth - cellLeftIconWidth - cellRightIconWidth) / 2) : "right" === textAlign && "richtext" !== child.type ? child.setAttribute("x", padding[3] + Awidth - cellRightIconWidth) : child.setAttribute("x", padding[3] + cellLeftIconWidth));
65948
66193
  }), cellGroup.forEachChildren(child => {
65949
- child.name !== CUSTOM_CONTAINER_NAME && ("middle" === textBaseline ? (null == child ? void 0 : child._checkboxGroup) && child._leftGroup.setAttribute("y", padding[0] + (Aheight - child._checkboxGroup.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", padding[0] + Aheight - child.AABBBounds.height()) : child.setAttribute("y", padding[0]));
66194
+ child.name !== CUSTOM_CONTAINER_NAME$1 && ("middle" === textBaseline ? (null == child ? void 0 : child._checkboxGroup) && child._leftGroup.setAttribute("y", padding[0] + (Aheight - child._checkboxGroup.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", padding[0] + Aheight - child.AABBBounds.height()) : child.setAttribute("y", padding[0]));
65950
66195
  });
65951
66196
  }
65952
66197
  return width -= padding[1] + padding[3] + iconWidth, height -= padding[0] + padding[2], "center" === textAlign ? checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth + (width - checkboxComponent.AABBBounds.width()) / 2) : "right" === textAlign ? checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth + width - checkboxComponent.AABBBounds.width()) : checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth), "middle" === textBaseline ? checkboxComponent.setAttribute("y", padding[0] + (height - checkboxComponent.AABBBounds.height()) / 2) : "bottom" === textBaseline ? checkboxComponent.setAttribute("y", padding[0] + height - checkboxComponent.AABBBounds.height()) : checkboxComponent.setAttribute("y", padding[0]), cellGroup;
@@ -66780,7 +67025,7 @@
66780
67025
  }
66781
67026
 
66782
67027
  function createProgressBarCell(progressBarDefine, style, width, value, dataValue, col, row, padding, table, range) {
66783
- var _a, _b, _c, _d, _e;
67028
+ var _a, _b, _c, _d, _e, _f;
66784
67029
  if (progressBarDefine.dependField) {
66785
67030
  const dependField = getOrApply(progressBarDefine.dependField, {
66786
67031
  col: col,
@@ -66817,7 +67062,14 @@
66817
67062
  cellHeaderPaths: void 0
66818
67063
  })) && void 0 !== _e ? _e : min + 100;
66819
67064
  let height = 0;
66820
- height = range ? table.getRowsHeight(range.start.row, range.end.row) : table.getRowHeight(row);
67065
+ if (height = range ? table.getRowsHeight(range.start.row, range.end.row) : table.getRowHeight(row), table.pluginManager) {
67066
+ if (table.pluginManager.getPluginByName("Master Detail Plugin")) {
67067
+ const bodyRowIndex = row - table.columnHeaderLevelCount,
67068
+ internalProps = table.internalProps,
67069
+ originalHeight = null === (_f = null == internalProps ? void 0 : internalProps.originalRowHeights) || void 0 === _f ? void 0 : _f.get(bodyRowIndex);
67070
+ void 0 !== originalHeight && originalHeight > 0 && (height = originalHeight);
67071
+ }
67072
+ }
66821
67073
  let contentWidth = width,
66822
67074
  contentHeight = height,
66823
67075
  _contentOffset = 0;
@@ -68455,6 +68707,25 @@
68455
68707
  }
68456
68708
  }), headerPaths;
68457
68709
  }
68710
+ getCellRowHeaderFullPaths(col) {
68711
+ const headerPaths = [];
68712
+ if ("grid" === this.rowHierarchyType) {
68713
+ for (let i = 0; i <= Math.min(this.rowsDefine.length - 1, col); i++) {
68714
+ const rowDefine = this.rowsDefine[i];
68715
+ "string" == typeof rowDefine ? headerPaths.push({
68716
+ dimensionKey: rowDefine
68717
+ }) : headerPaths.push({
68718
+ dimensionKey: rowDefine.dimensionKey
68719
+ });
68720
+ }
68721
+ col >= this.rowsDefine.length && !1 === this.indicatorsAsCol && this.indicatorsDefine.length > 0 && ("string" == typeof this.indicatorsDefine[0] ? headerPaths.push({
68722
+ indicatorKey: this.indicatorsDefine[0]
68723
+ }) : headerPaths.push({
68724
+ indicatorKey: this.indicatorsDefine[0].indicatorKey
68725
+ }));
68726
+ }
68727
+ return headerPaths;
68728
+ }
68458
68729
  getIndicatorInfoByIndicatorKey(indicatorKey) {
68459
68730
  var _a;
68460
68731
  return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find(indicator => "string" != typeof indicator && !!indicatorKey && indicator.indicatorKey === indicatorKey);
@@ -68890,7 +69161,12 @@
68890
69161
  startInTotal: startInTotal,
68891
69162
  afterSpanLevel: afterSpanLevel
68892
69163
  } = null !== (_g = rowDimensionFinded) && void 0 !== _g ? _g : defaultDimension;
68893
- row += null != startInTotal ? startInTotal : 0, defaultCol = "grid" === this.rowHierarchyType ? (this.rowHeaderTitle ? afterSpanLevel + 1 : afterSpanLevel) + this.leftRowSeriesNumberColumnCount : 0;
69164
+ if (row += null != startInTotal ? startInTotal : 0, "grid" === this.rowHierarchyType) {
69165
+ if (rowHeaderPaths.every((path, index) => this.rowDimensionKeys[index] === path.dimensionKey)) {
69166
+ const col = rowHeaderPaths.length - 1;
69167
+ defaultCol = (this.rowHeaderTitle ? col + 1 : col) + this.leftRowSeriesNumberColumnCount;
69168
+ } else defaultCol = (this.rowHeaderTitle ? afterSpanLevel + 1 : afterSpanLevel) + this.leftRowSeriesNumberColumnCount;
69169
+ } else defaultCol = 0;
68894
69170
  }
68895
69171
  if (colDimensionFinded || forceBody) {
68896
69172
  col = this.rowHeaderLevelCount + this.leftRowSeriesNumberColumnCount;
@@ -68900,10 +69176,19 @@
68900
69176
  } = null !== (_h = colDimensionFinded) && void 0 !== _h ? _h : defaultDimension;
68901
69177
  col += null != startInTotal ? startInTotal : 0, defaultRow = this.columnHeaderTitle ? afterSpanLevel + 1 : afterSpanLevel;
68902
69178
  }
68903
- return isValid$5(col) || isValid$5(row) ? {
69179
+ if (isValid$5(col) || isValid$5(row)) return {
68904
69180
  col: null != col ? col : defaultCol,
68905
69181
  row: null != row ? row : defaultRow
68906
- } : void 0;
69182
+ };
69183
+ if (rowHeaderPaths.length > 0) {
69184
+ if (rowHeaderPaths.every((path, index) => this.rowDimensionKeys[index] === path.dimensionKey)) {
69185
+ const col = rowHeaderPaths.length - 1;
69186
+ return {
69187
+ col: (this.rowHeaderTitle ? col + 1 : col) + this.leftRowSeriesNumberColumnCount,
69188
+ row: void 0
69189
+ };
69190
+ }
69191
+ }
68907
69192
  }
68908
69193
  }
68909
69194
  setChartInstance(_col, _row, chartInstance) {
@@ -69115,6 +69400,7 @@
69115
69400
  const chartSpec = this.getRawChartSpec(_col, _row),
69116
69401
  indicatorKeys = [];
69117
69402
  if (chartSpec) {
69403
+ if ("boxPlot" === chartSpec.type) return [chartSpec.maxField];
69118
69404
  if (chartSpec.series || chartSpec.xField || chartSpec.yField) return !1 === this.indicatorsAsCol ? chartSpec.series ? chartSpec.series.forEach(chartSeries => {
69119
69405
  const yField = chartSeries.yField;
69120
69406
  indicatorKeys.push(yField);
@@ -69620,9 +69906,10 @@
69620
69906
  needSplitPositiveAndNegative: this.needSplitPositiveAndNegative
69621
69907
  })), this.collectedValues[field][collectKeys][sumByKeys].push(record);
69622
69908
  } else if (this.collectValuesBy[field].range) {
69623
- const fieldRange = this.collectedValues[field][collectKeys],
69624
- max = Math.max(record[field], fieldRange.max),
69909
+ const fieldRange = this.collectedValues[field][collectKeys];
69910
+ let max = Math.max(record[field], fieldRange.max),
69625
69911
  min = Math.min(record[field], fieldRange.min);
69912
+ if (this.collectValuesBy[field].considerFields) for (const considerField of this.collectValuesBy[field].considerFields) record[considerField] && ("number" == typeof record[considerField] ? (max = Math.max(record[considerField], max), min = Math.min(record[considerField], min)) : Array.isArray(record[considerField]) && (max = Math.max(...record[considerField], max), min = Math.min(...record[considerField], min)));
69626
69913
  isNaN(max) || (fieldRange.max = max, fieldRange.min = min);
69627
69914
  } else {
69628
69915
  const fieldRange = this.collectedValues[field][collectKeys];
@@ -69789,7 +70076,8 @@
69789
70076
  }
69790
70077
  updateFilterRules(filterRules, isResetTree = !1) {
69791
70078
  var _a, _b;
69792
- if (this.filterRules = filterRules, this.filteredRecords = void 0, isResetTree) this.tree = {};else for (const treeRowKey in this.tree) for (const treeColKey in this.tree[treeRowKey]) for (let i = 0; i < this.tree[treeRowKey][treeColKey].length; i++) null === (_a = this.tree[treeRowKey][treeColKey][i]) || void 0 === _a || _a.reset();
70079
+ if (this.filterRules = filterRules, this.filteredRecords = void 0, isResetTree) return this.setRecords(this.records);
70080
+ for (const treeRowKey in this.tree) for (const treeColKey in this.tree[treeRowKey]) for (let i = 0; i < this.tree[treeRowKey][treeColKey].length; i++) null === (_a = this.tree[treeRowKey][treeColKey][i]) || void 0 === _a || _a.reset();
69793
70081
  this.collectedValues = {}, this.processRecords(), this.processCollectedValuesWithSumBy(), this.processCollectedValuesWithSortBy(), this.totalStatistics(), (null === (_b = this.dataConfig) || void 0 === _b ? void 0 : _b.isPivotChart) && this.cacheDeminsionCollectedValues();
69794
70082
  }
69795
70083
  getAggregatorRule(indicatorKey) {
@@ -70443,12 +70731,12 @@
70443
70731
  this.setMinMaxLimitWidth(!0), this.refreshRowColCount();
70444
70732
  }
70445
70733
  refreshRowColCount() {
70446
- var _a, _b, _c, _d, _e, _f, _g, _h;
70734
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
70447
70735
  const table = this,
70448
70736
  {
70449
70737
  layoutMap: layoutMap
70450
70738
  } = table.internalProps;
70451
- layoutMap && (table.colCount = null !== (_a = layoutMap.colCount) && void 0 !== _a ? _a : 0, table.rowCount = null !== (_b = layoutMap.rowCount) && void 0 !== _b ? _b : 0, this.internalProps.frozenColCount = this.options.frozenColCount ? this.options.frozenColCount : (null !== (_c = layoutMap.rowHeaderLevelCount) && void 0 !== _c ? _c : 0) + layoutMap.leftRowSeriesNumberColumnCount, table._setFrozenRowCount(Math.max(layoutMap.headerLevelCount, null !== (_d = this.options.frozenRowCount) && void 0 !== _d ? _d : 0)), table.bottomFrozenRowCount !== (null !== (_e = this.options.bottomFrozenRowCount) && void 0 !== _e ? _e : 0) && (table.bottomFrozenRowCount = null !== (_f = this.options.bottomFrozenRowCount) && void 0 !== _f ? _f : 0), table.rightFrozenColCount !== (null !== (_g = this.options.rightFrozenColCount) && void 0 !== _g ? _g : 0) && (table.rightFrozenColCount = null !== (_h = this.options.rightFrozenColCount) && void 0 !== _h ? _h : 0), this.stateManager.setFrozenCol(this.internalProps.frozenColCount), this.stateManager.setFrozenRow(this.frozenRowCount));
70739
+ layoutMap && (table.colCount = null !== (_a = layoutMap.colCount) && void 0 !== _a ? _a : 0, table.rowCount = null !== (_b = layoutMap.rowCount) && void 0 !== _b ? _b : 0, this.internalProps.frozenColCount = null !== (_c = this.options.frozenColCount) && void 0 !== _c ? _c : (null !== (_d = layoutMap.rowHeaderLevelCount) && void 0 !== _d ? _d : 0) + layoutMap.leftRowSeriesNumberColumnCount, table._setFrozenRowCount(Math.max(layoutMap.headerLevelCount, null !== (_e = this.options.frozenRowCount) && void 0 !== _e ? _e : 0)), table.bottomFrozenRowCount !== (null !== (_f = this.options.bottomFrozenRowCount) && void 0 !== _f ? _f : 0) && (table.bottomFrozenRowCount = null !== (_g = this.options.bottomFrozenRowCount) && void 0 !== _g ? _g : 0), table.rightFrozenColCount !== (null !== (_h = this.options.rightFrozenColCount) && void 0 !== _h ? _h : 0) && (table.rightFrozenColCount = null !== (_j = this.options.rightFrozenColCount) && void 0 !== _j ? _j : 0), this.stateManager.setFrozenCol(this.internalProps.frozenColCount), this.stateManager.setFrozenRow(this.frozenRowCount));
70452
70740
  }
70453
70741
  _getSortFuncFromHeaderOption(columns, field, fieldKey) {}
70454
70742
  get rowHierarchyType() {
@@ -71218,12 +71506,12 @@
71218
71506
  });
71219
71507
  }
71220
71508
  }
71221
- updateFilterRules(filterRules) {
71222
- this.internalProps.dataConfig.filterRules = filterRules, this.dataset.updateFilterRules(filterRules), this.renderWithRecreateCells();
71509
+ updateFilterRules(filterRules, isResetTree = !1) {
71510
+ this.internalProps.dataConfig.filterRules = filterRules, isResetTree ? (this.dataset.updateFilterRules(filterRules, !0), this.internalProps.layoutMap.resetHeaderTree()) : this.dataset.updateFilterRules(filterRules), this.renderWithRecreateCells();
71223
71511
  }
71224
71512
  getFilteredRecords() {
71225
71513
  var _a;
71226
- return null === (_a = this.dataset) || void 0 === _a ? void 0 : _a.filterRules;
71514
+ return null === (_a = this.dataset) || void 0 === _a ? void 0 : _a.filteredRecords;
71227
71515
  }
71228
71516
  getCellPivotRole(col, row) {
71229
71517
  const path = this.getCellHeaderPaths(col, row),
@@ -71244,6 +71532,9 @@
71244
71532
  cellLocation: cellLocation
71245
71533
  };
71246
71534
  }
71535
+ getCellRowHeaderFullPaths(col) {
71536
+ return this.internalProps.layoutMap.getCellRowHeaderFullPaths(col);
71537
+ }
71247
71538
  setLoadingHierarchyState(col, row) {
71248
71539
  this.scenegraph.setLoadingHierarchyState(col, row);
71249
71540
  }
@@ -71621,7 +71912,7 @@
71621
71912
  };
71622
71913
  }
71623
71914
  _generateCollectValuesConfig(columnKeys, rowKeys) {
71624
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
71915
+ 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;
71625
71916
  columnKeys = columnKeys.filter(key => key !== IndicatorDimensionKeyPlaceholder), rowKeys = rowKeys.filter(key => key !== IndicatorDimensionKeyPlaceholder);
71626
71917
  const indicators = this.internalProps.indicators,
71627
71918
  collectValuesBy = {};
@@ -71659,14 +71950,15 @@
71659
71950
  range: hasLinearAxis(indicatorSpec, this._axes, "horizontal" === indicatorSpec.direction, !0),
71660
71951
  sortBy: "horizontal" !== indicatorSpec.direction ? null === (_o = null === (_m = null === (_l = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _l ? void 0 : _l.fields) || void 0 === _m ? void 0 : _m[xField]) || void 0 === _o ? void 0 : _o.domain : void 0
71661
71952
  }, !1 !== (null == indicatorSpec ? void 0 : indicatorSpec.stack) && ("bar" === (null == indicatorSpec ? void 0 : indicatorSpec.type) || "area" === (null == indicatorSpec ? void 0 : indicatorSpec.type)) && (indicatorSpec.stack = !0);
71662
- const yField = indicatorSpec.yField;
71953
+ const yField = null !== (_p = indicatorSpec.yField) && void 0 !== _p ? _p : indicatorSpec.maxField;
71663
71954
  collectValuesBy[yField] = {
71664
71955
  by: rowKeys,
71665
71956
  type: "horizontal" !== indicatorSpec.direction ? "yField" : void 0,
71666
71957
  range: hasLinearAxis(indicatorSpec, this._axes, "horizontal" === indicatorSpec.direction, !1),
71667
71958
  sumBy: "histogram" === indicatorSpec.type ? columnKeys.concat(null == indicatorSpec ? void 0 : indicatorSpec.xField, null == indicatorSpec ? void 0 : indicatorSpec.x2Field) : indicatorSpec.stack && columnKeys.concat(null == indicatorSpec ? void 0 : indicatorSpec.xField),
71668
- sortBy: "horizontal" === indicatorSpec.direction ? null === (_r = null === (_q = null === (_p = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _p ? void 0 : _p.fields) || void 0 === _q ? void 0 : _q[yField]) || void 0 === _r ? void 0 : _r.domain : void 0,
71669
- extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine)
71959
+ sortBy: "horizontal" === indicatorSpec.direction ? null === (_s = null === (_r = null === (_q = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _q ? void 0 : _q.fields) || void 0 === _r ? void 0 : _r[yField]) || void 0 === _s ? void 0 : _s.domain : void 0,
71960
+ extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine),
71961
+ considerFields: "boxPlot" === (null == indicatorSpec ? void 0 : indicatorSpec.type) ? [indicatorSpec.maxField, indicatorSpec.minField, indicatorSpec.outliersField] : void 0
71670
71962
  };
71671
71963
  }
71672
71964
  } else {
@@ -71698,16 +71990,17 @@
71698
71990
  by: rowKeys,
71699
71991
  type: "horizontal" === indicatorSpec.direction ? "yField" : void 0,
71700
71992
  range: hasLinearAxis(indicatorSpec, this._axes, "horizontal" === indicatorSpec.direction, !1),
71701
- sortBy: "horizontal" === indicatorSpec.direction ? null === (_u = null === (_t = null === (_s = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _s ? void 0 : _s.fields) || void 0 === _t ? void 0 : _t[yField]) || void 0 === _u ? void 0 : _u.domain : void 0
71993
+ sortBy: "horizontal" === indicatorSpec.direction ? null === (_v = null === (_u = null === (_t = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _t ? void 0 : _t.fields) || void 0 === _u ? void 0 : _u[yField]) || void 0 === _v ? void 0 : _v.domain : void 0
71702
71994
  }, !1 !== (null == indicatorSpec ? void 0 : indicatorSpec.stack) && ("bar" === (null == indicatorSpec ? void 0 : indicatorSpec.type) || "area" === (null == indicatorSpec ? void 0 : indicatorSpec.type)) && (indicatorSpec.stack = !0);
71703
- const xField = "histogram" === indicatorSpec.type ? indicatorSpec.x2Field : indicatorSpec.xField;
71995
+ const xField = "histogram" === indicatorSpec.type ? indicatorSpec.x2Field : null !== (_w = indicatorSpec.xField) && void 0 !== _w ? _w : indicatorSpec.maxField;
71704
71996
  collectValuesBy[xField] = {
71705
71997
  by: columnKeys,
71706
71998
  type: "horizontal" === indicatorSpec.direction ? "xField" : void 0,
71707
71999
  range: hasLinearAxis(indicatorSpec, this._axes, "horizontal" === indicatorSpec.direction, !0),
71708
72000
  sumBy: indicatorSpec.stack && rowKeys.concat(null == indicatorSpec ? void 0 : indicatorSpec.yField),
71709
- sortBy: "horizontal" !== indicatorSpec.direction ? null === (_x = null === (_w = null === (_v = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _v ? void 0 : _v.fields) || void 0 === _w ? void 0 : _w[xField]) || void 0 === _x ? void 0 : _x.domain : void 0,
71710
- extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine)
72001
+ sortBy: "horizontal" !== indicatorSpec.direction ? null === (_z = null === (_y = null === (_x = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _x ? void 0 : _x.fields) || void 0 === _y ? void 0 : _y[xField]) || void 0 === _z ? void 0 : _z.domain : void 0,
72002
+ extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine),
72003
+ considerFields: "boxPlot" === (null == indicatorSpec ? void 0 : indicatorSpec.type) ? [indicatorSpec.maxField, indicatorSpec.minField, indicatorSpec.outliersField] : void 0
71711
72004
  };
71712
72005
  }
71713
72006
  }
@@ -72873,6 +73166,8 @@
72873
73166
  return true;
72874
73167
  };
72875
73168
 
73169
+ const CUSTOM_CONTAINER_NAME = "custom-container";
73170
+
72876
73171
  class VTableReactAttributePlugin extends ReactAttributePlugin {
72877
73172
  removeElement(id) {
72878
73173
  super.removeElement(id);
@@ -73079,7 +73374,7 @@
73079
73374
  }
73080
73375
  function getTargetGroup(target) {
73081
73376
  while (target && target.parent) {
73082
- if (target.name === 'custom-container') {
73377
+ if (target.name === CUSTOM_CONTAINER_NAME) {
73083
73378
  return target;
73084
73379
  }
73085
73380
  target = target.parent;
@@ -80004,7 +80299,7 @@
80004
80299
  const Checkbox = React.forwardRef(CheckboxComponent);
80005
80300
  Checkbox.displayName = 'Checkbox';
80006
80301
 
80007
- const version = "1.0.19";
80302
+ const version = "1.0.21";
80008
80303
 
80009
80304
  exports.Arc = Arc;
80010
80305
  exports.Avatar = Avatar;