@visactor/vtable 1.23.3 → 1.24.0

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.
Files changed (75) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +182 -24
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotTable.d.ts +1 -0
  5. package/cjs/PivotTable.js +10 -2
  6. package/cjs/PivotTable.js.map +1 -1
  7. package/cjs/core/BaseTable.d.ts +9 -0
  8. package/cjs/core/BaseTable.js +64 -15
  9. package/cjs/core/BaseTable.js.map +1 -1
  10. package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
  11. package/cjs/core/TABLE_EVENT_TYPE.js +2 -0
  12. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  13. package/cjs/core/record-helper.js +83 -13
  14. package/cjs/core/record-helper.js.map +1 -1
  15. package/cjs/data/DataSource.js +3 -2
  16. package/cjs/data/DataSource.js.map +1 -1
  17. package/cjs/dataset/DataStatistics.js +1 -2
  18. package/cjs/edit/edit-manager.js +21 -15
  19. package/cjs/edit/edit-manager.js.map +1 -1
  20. package/cjs/index.d.ts +3 -3
  21. package/cjs/index.js +51 -12
  22. package/cjs/index.js.map +1 -1
  23. package/cjs/layout/cell-range/simple-cell-range.js +14 -4
  24. package/cjs/layout/cell-range/simple-cell-range.js.map +1 -1
  25. package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
  26. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  27. package/cjs/scenegraph/group-creater/init-scenegraph.js +1 -1
  28. package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  29. package/cjs/state/state.js +14 -11
  30. package/cjs/state/state.js.map +1 -1
  31. package/cjs/ts-types/base-table.d.ts +5 -0
  32. package/cjs/ts-types/base-table.js.map +1 -1
  33. package/cjs/ts-types/events.d.ts +16 -0
  34. package/cjs/ts-types/events.js.map +1 -1
  35. package/cjs/ts-types/table-engine.js.map +1 -1
  36. package/cjs/vrender.js.map +1 -1
  37. package/dist/vtable.js +896 -218
  38. package/dist/vtable.min.js +2 -2
  39. package/es/ListTable.d.ts +1 -0
  40. package/es/ListTable.js +177 -24
  41. package/es/ListTable.js.map +1 -1
  42. package/es/PivotTable.d.ts +1 -0
  43. package/es/PivotTable.js +8 -2
  44. package/es/PivotTable.js.map +1 -1
  45. package/es/core/BaseTable.d.ts +9 -0
  46. package/es/core/BaseTable.js +64 -15
  47. package/es/core/BaseTable.js.map +1 -1
  48. package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
  49. package/es/core/TABLE_EVENT_TYPE.js +2 -0
  50. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  51. package/es/core/record-helper.js +83 -12
  52. package/es/core/record-helper.js.map +1 -1
  53. package/es/data/DataSource.js +3 -2
  54. package/es/data/DataSource.js.map +1 -1
  55. package/es/dataset/DataStatistics.js +1 -2
  56. package/es/edit/edit-manager.js +20 -16
  57. package/es/edit/edit-manager.js.map +1 -1
  58. package/es/index.d.ts +3 -3
  59. package/es/index.js +5 -3
  60. package/es/index.js.map +1 -1
  61. package/es/layout/cell-range/simple-cell-range.js +14 -4
  62. package/es/layout/cell-range/simple-cell-range.js.map +1 -1
  63. package/es/scenegraph/group-creater/cell-helper.js +1 -1
  64. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  65. package/es/scenegraph/group-creater/init-scenegraph.js +1 -1
  66. package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  67. package/es/state/state.js +14 -11
  68. package/es/state/state.js.map +1 -1
  69. package/es/ts-types/base-table.d.ts +5 -0
  70. package/es/ts-types/base-table.js.map +1 -1
  71. package/es/ts-types/events.d.ts +16 -0
  72. package/es/ts-types/events.js.map +1 -1
  73. package/es/ts-types/table-engine.js.map +1 -1
  74. package/es/vrender.js.map +1 -1
  75. package/package.json +4 -4
package/dist/vtable.js CHANGED
@@ -1307,13 +1307,13 @@
1307
1307
  const isDate = value => isType$1(value, "Date");
1308
1308
  var isDate$1 = isDate;
1309
1309
 
1310
- const isNumber$1 = (value, fuzzy = !1) => {
1310
+ const isNumber$2 = (value, fuzzy = !1) => {
1311
1311
  const type = typeof value;
1312
1312
  return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
1313
1313
  };
1314
- var isNumber$2 = isNumber$1;
1314
+ var isNumber$3 = isNumber$2;
1315
1315
 
1316
- const isValidNumber = value => isNumber$2(value) && Number.isFinite(value);
1316
+ const isValidNumber = value => isNumber$3(value) && Number.isFinite(value);
1317
1317
  var isValidNumber$1 = isValidNumber;
1318
1318
 
1319
1319
  const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
@@ -1359,7 +1359,7 @@
1359
1359
  if (!isValid$1(value) || "object" != typeof value || ignoreWhen && ignoreWhen(value)) return value;
1360
1360
  const isArr = isArray$5(value),
1361
1361
  length = value.length;
1362
- result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$2(value) || isNumber$2(value) || isString$2(value) ? value : isDate$1(value) ? new Date(+value) : void 0;
1362
+ result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$2(value) || isNumber$3(value) || isString$2(value) ? value : isDate$1(value) ? new Date(+value) : void 0;
1363
1363
  const props = isArr ? void 0 : Object.keys(Object(value));
1364
1364
  let index = -1;
1365
1365
  if (result) for (; ++index < (props || value).length;) {
@@ -1556,7 +1556,7 @@
1556
1556
  }(LoggerLevel || (LoggerLevel = {}));
1557
1557
  class Logger {
1558
1558
  static getInstance(level, method) {
1559
- return Logger._instance && isNumber$2(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
1559
+ return Logger._instance && isNumber$3(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
1560
1560
  }
1561
1561
  static setInstance(logger) {
1562
1562
  return Logger._instance = logger;
@@ -1804,10 +1804,10 @@
1804
1804
  return this.x = x, this.y = y, this;
1805
1805
  }
1806
1806
  add(point) {
1807
- return isNumber$2(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
1807
+ return isNumber$3(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
1808
1808
  }
1809
1809
  sub(point) {
1810
- return isNumber$2(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
1810
+ return isNumber$3(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
1811
1811
  }
1812
1812
  multi(point) {
1813
1813
  throw new Error("暂不支持");
@@ -2814,10 +2814,10 @@
2814
2814
  return ((value = Math.max(0, Math.min(255, Math.round(value) || 0))) < 16 ? "0" : "") + value.toString(16);
2815
2815
  }
2816
2816
  function rgb(value) {
2817
- return isNumber$2(value) ? new RGB(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$5(value) ? new RGB(value[0], value[1], value[2]) : new RGB(255, 255, 255);
2817
+ return isNumber$3(value) ? new RGB(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$5(value) ? new RGB(value[0], value[1], value[2]) : new RGB(255, 255, 255);
2818
2818
  }
2819
2819
  function rgba(value) {
2820
- return isNumber$2(value) ? new RGB(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$5(value) ? new RGB(value[0], value[1], value[2], value[3]) : new RGB(255, 255, 255, 1);
2820
+ return isNumber$3(value) ? new RGB(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$5(value) ? new RGB(value[0], value[1], value[2], value[3]) : new RGB(255, 255, 255, 1);
2821
2821
  }
2822
2822
  function SRGBToLinear(c) {
2823
2823
  return c < .04045 ? .0773993808 * c : Math.pow(.9478672986 * c + .0521327014, 2.4);
@@ -5631,6 +5631,9 @@
5631
5631
  function isNotAroundZero(val) {
5632
5632
  return val > EPSILON || val < -EPSILON;
5633
5633
  }
5634
+ function isNumber$1(data) {
5635
+ return "number" == typeof data && Number.isFinite(data);
5636
+ }
5634
5637
  const _v0 = [0, 0],
5635
5638
  _v1 = [0, 0],
5636
5639
  _v2 = [0, 0];
@@ -7633,13 +7636,13 @@
7633
7636
 
7634
7637
  class BaseSymbol {
7635
7638
  bounds(size, bounds) {
7636
- if (isNumber$2(size)) {
7639
+ if (isNumber$3(size)) {
7637
7640
  const halfS = size / 2;
7638
7641
  bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
7639
7642
  } else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
7640
7643
  }
7641
7644
  parseSize(size) {
7642
- return isNumber$2(size) ? size : Math.min(size[0], size[1]);
7645
+ return isNumber$3(size) ? size : Math.min(size[0], size[1]);
7643
7646
  }
7644
7647
  }
7645
7648
 
@@ -8055,10 +8058,10 @@
8055
8058
  super(...arguments), this.type = "rect", this.pathStr = "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z";
8056
8059
  }
8057
8060
  draw(ctx, size, x, y) {
8058
- return isNumber$2(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
8061
+ return isNumber$3(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
8059
8062
  }
8060
8063
  drawWithClipRange(ctx, size, x, y, clipRange, z, cb) {
8061
- isNumber$2(size) && (size = [size, size / 2]);
8064
+ isNumber$3(size) && (size = [size, size / 2]);
8062
8065
  const drawLength = 2 * (size[0] + size[1]) * clipRange,
8063
8066
  points = [{
8064
8067
  x: x + size[0] / 2,
@@ -8090,7 +8093,7 @@
8090
8093
  return !1;
8091
8094
  }
8092
8095
  drawOffset(ctx, size, x, y, offset) {
8093
- return isNumber$2(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
8096
+ return isNumber$3(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
8094
8097
  }
8095
8098
  }
8096
8099
  var rect = new RectSymbol();
@@ -8109,7 +8112,7 @@
8109
8112
  return size = this.parseSize(size), this.drawOffset(ctx, size, x, y, 0, z, cb);
8110
8113
  }
8111
8114
  parseSize(size) {
8112
- return isNumber$2(size) ? size : Math.min(size[0], size[1]);
8115
+ return isNumber$3(size) ? size : Math.min(size[0], size[1]);
8113
8116
  }
8114
8117
  drawWithClipRange(ctx, size, x, y, clipRange, z, cb) {
8115
8118
  return size = this.parseSize(size), this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
@@ -8921,10 +8924,10 @@
8921
8924
  ColorStore.store255 = {}, ColorStore.store1 = {};
8922
8925
 
8923
8926
  function colorArrayToString(color, alphaChannel = !1) {
8924
- return Array.isArray(color) && isNumber$2(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
8927
+ return Array.isArray(color) && isNumber$3(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
8925
8928
  }
8926
8929
  function interpolateColor(from, to, ratio, alphaChannel, cb) {
8927
- if (Array.isArray(from) && !isNumber$2(from[0]) || Array.isArray(to) && !isNumber$2(to[0])) {
8930
+ if (Array.isArray(from) && !isNumber$3(from[0]) || Array.isArray(to) && !isNumber$3(to[0])) {
8928
8931
  return new Array(4).fill(0).map((_, index) => {
8929
8932
  var _a, _b;
8930
8933
  return _interpolateColor(isArray$5(from) ? null !== (_a = from[index]) && void 0 !== _a ? _a : from[0] : from, isArray$5(to) ? null !== (_b = to[index]) && void 0 !== _b ? _b : to[0] : to, ratio, alphaChannel);
@@ -10533,12 +10536,12 @@
10533
10536
  textBaseline: textBaseline
10534
10537
  } = attribute;
10535
10538
  if (null != attribute.forceBoundsHeight) {
10536
- const h = isNumber$2(attribute.forceBoundsHeight) ? attribute.forceBoundsHeight : attribute.forceBoundsHeight(),
10539
+ const h = isNumber$3(attribute.forceBoundsHeight) ? attribute.forceBoundsHeight : attribute.forceBoundsHeight(),
10537
10540
  dy = textLayoutOffsetY(textBaseline, h, h);
10538
10541
  aabbBounds.set(aabbBounds.x1, dy, aabbBounds.x2, dy + h);
10539
10542
  }
10540
10543
  if (null != attribute.forceBoundsWidth) {
10541
- const w = isNumber$2(attribute.forceBoundsWidth) ? attribute.forceBoundsWidth : attribute.forceBoundsWidth(),
10544
+ const w = isNumber$3(attribute.forceBoundsWidth) ? attribute.forceBoundsWidth : attribute.forceBoundsWidth(),
10542
10545
  dx = textDrawOffsetX(textAlign, w);
10543
10546
  aabbBounds.set(dx, aabbBounds.y1, dx + w, aabbBounds.y2);
10544
10547
  }
@@ -12470,7 +12473,7 @@
12470
12473
  }
12471
12474
  } else {
12472
12475
  const richTextConfig = this.combinedStyleToCharacter(textConfig[i]);
12473
- if (isNumber$2(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
12476
+ if (isNumber$3(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
12474
12477
  const textParts = richTextConfig.text.split("\n");
12475
12478
  for (let j = 0; j < textParts.length; j++) if (0 === j) paragraphs.push(new Paragraph(textParts[j], !1, richTextConfig, ascentDescentMode));else if (textParts[j] || i === textConfig.length - 1) paragraphs.push(new Paragraph(textParts[j], !0, richTextConfig, ascentDescentMode));else {
12476
12479
  const nextRichTextConfig = this.combinedStyleToCharacter(textConfig[i + 1]);
@@ -12661,7 +12664,7 @@
12661
12664
  } = this.attribute;
12662
12665
  if (outerRadius += outerPadding, innerRadius -= innerPadding, 0 === cornerRadius || "0%" === cornerRadius) return 0;
12663
12666
  const deltaRadius = Math.abs(outerRadius - innerRadius),
12664
- parseCR = cornerRadius => Math.min(isNumber$2(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
12667
+ parseCR = cornerRadius => Math.min(isNumber$3(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
12665
12668
  if (isArray$5(cornerRadius)) {
12666
12669
  const crList = cornerRadius.map(cr => parseCR(cr) || 0);
12667
12670
  return 0 === crList.length ? [crList[0], crList[0], crList[0], crList[0]] : 2 === crList.length ? [crList[0], crList[1], crList[0], crList[1]] : (3 === crList.length && crList.push(0), crList);
@@ -13452,7 +13455,7 @@
13452
13455
  const halfPi = pi / 2;
13453
13456
  function createRectPath(path, x, y, width, height, rectCornerRadius, roundCorner = !0, edgeCb) {
13454
13457
  let cornerRadius;
13455
- if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$2(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
13458
+ if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$3(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
13456
13459
  const cornerRadiusArr = rectCornerRadius;
13457
13460
  let cr0, cr1;
13458
13461
  switch (cornerRadiusArr.length) {
@@ -17583,6 +17586,77 @@
17583
17586
  return diffObj;
17584
17587
  }
17585
17588
 
17589
+ function isIdentityMatrix(matrix) {
17590
+ return 1 === matrix.a && 0 === matrix.b && 0 === matrix.c && 1 === matrix.d && 0 === matrix.e && 0 === matrix.f;
17591
+ }
17592
+ function createEventTransformer(containerElement, getMatrix, getRect, transformPoint) {
17593
+ return event => {
17594
+ if (!(event instanceof MouseEvent || event instanceof TouchEvent || event instanceof PointerEvent)) return event;
17595
+ const transformMatrix = getMatrix();
17596
+ if (isIdentityMatrix(transformMatrix)) return event;
17597
+ const containerRect = getRect(),
17598
+ transformedEvent = new event.constructor(event.type, event);
17599
+ if (Object.defineProperties(transformedEvent, {
17600
+ target: {
17601
+ value: event.target
17602
+ },
17603
+ currentTarget: {
17604
+ value: event.currentTarget
17605
+ }
17606
+ }), event instanceof MouseEvent || event instanceof PointerEvent) transformPoint(event.clientX, event.clientY, transformMatrix, containerRect, transformedEvent);else if (event instanceof TouchEvent) {
17607
+ if (event.touches.length > 0) {
17608
+ const touch = transformedEvent.touches[0];
17609
+ transformPoint(touch.clientX, touch.clientY, transformMatrix, containerRect, touch);
17610
+ }
17611
+ if (event.changedTouches.length > 0) {
17612
+ const touch = transformedEvent.changedTouches[0];
17613
+ transformPoint(touch.clientX, touch.clientY, transformMatrix, containerRect, touch);
17614
+ }
17615
+ }
17616
+ return transformedEvent;
17617
+ };
17618
+ }
17619
+ function registerWindowEventTransformer(window, container, getMatrix, getRect, transformPoint) {
17620
+ const transformer = createEventTransformer(container, getMatrix, getRect, transformPoint);
17621
+ window.setEventListenerTransformer(transformer);
17622
+ }
17623
+ function registerGlobalEventTransformer(global, container, getMatrix, getRect, transformPoint) {
17624
+ const transformer = createEventTransformer(container, getMatrix, getRect, transformPoint);
17625
+ global.setEventListenerTransformer(transformer);
17626
+ }
17627
+ function transformPointForCanvas(clientX, clientY, matrix, rect, transformedEvent) {
17628
+ const transformedPoint = {
17629
+ x: clientX,
17630
+ y: clientY
17631
+ };
17632
+ matrix.transformPoint(transformedPoint, transformedPoint), Object.defineProperties(transformedEvent, {
17633
+ _canvasX: {
17634
+ value: transformedPoint.x
17635
+ },
17636
+ _canvasY: {
17637
+ value: transformedPoint.y
17638
+ }
17639
+ });
17640
+ }
17641
+ function mapToCanvasPointForCanvas(nativeEvent) {
17642
+ var _a;
17643
+ if (isNumber$1(nativeEvent._canvasX) && isNumber$1(nativeEvent._canvasY)) return {
17644
+ x: nativeEvent._canvasX,
17645
+ y: nativeEvent._canvasY
17646
+ };
17647
+ if (nativeEvent.changedTouches) {
17648
+ const data = null !== (_a = nativeEvent.changedTouches[0]) && void 0 !== _a ? _a : {};
17649
+ return {
17650
+ x: data._canvasX,
17651
+ y: data._canvasY
17652
+ };
17653
+ }
17654
+ return {
17655
+ x: nativeEvent._canvasX || 0,
17656
+ y: nativeEvent._canvasY || 0
17657
+ };
17658
+ }
17659
+
17586
17660
  let loadArcModule = !1;
17587
17661
  const arcModule = new ContainerModule(bind => {
17588
17662
  loadArcModule || (loadArcModule = !0, bind(DefaultCanvasArcRender).toSelf().inSingletonScope(), bind(ArcRender).to(DefaultCanvasArcRender).inSingletonScope(), bind(GraphicRender).toService(ArcRender), bind(ArcRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, ArcRenderContribution));
@@ -19795,7 +19869,7 @@
19795
19869
  x += point.x, y += point.y, pickContext.setTransformForCurrent();
19796
19870
  } else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
19797
19871
  let picked = !0;
19798
- if (!onlyTranslate || rect.shadowRoot || isNumber$2(cornerRadius, !0) && 0 !== cornerRadius || isArray$5(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
19872
+ if (!onlyTranslate || rect.shadowRoot || isNumber$3(cornerRadius, !0) && 0 !== cornerRadius || isArray$5(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
19799
19873
  if (picked) return !0;
19800
19874
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
19801
19875
  pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
@@ -21712,7 +21786,7 @@
21712
21786
  shapeStyle = __rest$3(shape, ["visible"]);
21713
21787
  if (isBoolean$2(shapeVisible)) {
21714
21788
  const size = (null == shapeStyle ? void 0 : shapeStyle.size) || 10,
21715
- maxSize = isNumber$2(size) ? size : Math.max(size[0], size[1]);
21789
+ maxSize = isNumber$3(size) ? size : Math.max(size[0], size[1]);
21716
21790
  symbol = group.createOrUpdateChild("tag-shape", Object.assign(Object.assign({
21717
21791
  symbolType: "circle",
21718
21792
  size: size,
@@ -21752,7 +21826,7 @@
21752
21826
  }
21753
21827
  tagWidth += textWidth;
21754
21828
  const size = null !== (_c = shape.size) && void 0 !== _c ? _c : 10,
21755
- maxSize = isNumber$2(size) ? size : Math.max(size[0], size[1]);
21829
+ maxSize = isNumber$3(size) ? size : Math.max(size[0], size[1]);
21756
21830
  tagHeight += Math.max(textHeight, shape.visible ? maxSize : 0);
21757
21831
  const {
21758
21832
  textAlign: textAlign,
@@ -25211,7 +25285,7 @@
25211
25285
  growAngleInOverall = (graphic, options, animationParameters) => {
25212
25286
  const attrs = graphic.getFinalAttribute();
25213
25287
  if (options && "anticlockwise" === options.orient) {
25214
- const overallValue = isNumber$2(options.overall) ? options.overall : 2 * Math.PI;
25288
+ const overallValue = isNumber$3(options.overall) ? options.overall : 2 * Math.PI;
25215
25289
  return {
25216
25290
  from: {
25217
25291
  startAngle: overallValue,
@@ -25223,7 +25297,7 @@
25223
25297
  }
25224
25298
  };
25225
25299
  }
25226
- const overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
25300
+ const overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0;
25227
25301
  return {
25228
25302
  from: {
25229
25303
  startAngle: overallValue,
@@ -25260,7 +25334,7 @@
25260
25334
  growAngleOutOverall = (graphic, options, animationParameters) => {
25261
25335
  const attrs = graphic.attribute;
25262
25336
  if (options && "anticlockwise" === options.orient) {
25263
- const overallValue = isNumber$2(options.overall) ? options.overall : 2 * Math.PI;
25337
+ const overallValue = isNumber$3(options.overall) ? options.overall : 2 * Math.PI;
25264
25338
  return {
25265
25339
  from: {
25266
25340
  startAngle: attrs.startAngle,
@@ -25272,7 +25346,7 @@
25272
25346
  }
25273
25347
  };
25274
25348
  }
25275
- const overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
25349
+ const overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0;
25276
25350
  return {
25277
25351
  from: {
25278
25352
  startAngle: attrs.startAngle,
@@ -25548,7 +25622,7 @@
25548
25622
  y1 = attrs.y1,
25549
25623
  height = attrs.height;
25550
25624
  let overallValue;
25551
- return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_c = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : null === (_b = options.layoutRect) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0, {
25625
+ return options && "negative" === options.orient ? isNumber$3(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_c = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : null === (_b = options.layoutRect) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0, {
25552
25626
  from: {
25553
25627
  y: overallValue,
25554
25628
  y1: isNil$1(y1) ? void 0 : overallValue,
@@ -25621,7 +25695,7 @@
25621
25695
  y1 = attrs.y1,
25622
25696
  height = attrs.height;
25623
25697
  let overallValue;
25624
- return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_c = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : null === (_b = options.layoutRect) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0, {
25698
+ return options && "negative" === options.orient ? isNumber$3(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_c = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : null === (_b = options.layoutRect) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0, {
25625
25699
  to: {
25626
25700
  y: overallValue,
25627
25701
  y1: isNil$1(y1) ? void 0 : overallValue,
@@ -25867,7 +25941,7 @@
25867
25941
  },
25868
25942
  growRadiusInOverall = (graphic, options, animationParameters) => {
25869
25943
  const attrs = graphic.getFinalAttribute(),
25870
- overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
25944
+ overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0;
25871
25945
  return {
25872
25946
  from: {
25873
25947
  innerRadius: overallValue,
@@ -25903,7 +25977,7 @@
25903
25977
  },
25904
25978
  growRadiusOutOverall = (graphic, options, animationParameters) => {
25905
25979
  const attrs = graphic.getFinalAttribute(),
25906
- overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
25980
+ overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0;
25907
25981
  return {
25908
25982
  from: {
25909
25983
  innerRadius: null == attrs ? void 0 : attrs.innerRadius,
@@ -25992,7 +26066,7 @@
25992
26066
  x1 = attrs.x1,
25993
26067
  width = attrs.width;
25994
26068
  let overallValue;
25995
- return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? null == options ? void 0 : options.overall : 0, {
26069
+ return options && "negative" === options.orient ? isNumber$3(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$3(null == options ? void 0 : options.overall) ? null == options ? void 0 : options.overall : 0, {
25996
26070
  from: {
25997
26071
  x: overallValue,
25998
26072
  x1: isNil$1(x1) ? void 0 : overallValue,
@@ -26039,7 +26113,7 @@
26039
26113
  x1 = attrs.x1,
26040
26114
  width = attrs.width;
26041
26115
  let overallValue;
26042
- return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0, {
26116
+ return options && "negative" === options.orient ? isNumber$3(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0, {
26043
26117
  to: {
26044
26118
  x: overallValue,
26045
26119
  x1: isNil$1(x1) ? void 0 : overallValue,
@@ -30191,7 +30265,7 @@
30191
30265
  return this._isFixed && !!this._bandwidth;
30192
30266
  }
30193
30267
  _isBandwidthFixedByUser() {
30194
- return this._isFixed && this._userBandwidth && isNumber$2(this._userBandwidth);
30268
+ return this._isFixed && this._userBandwidth && isNumber$3(this._userBandwidth);
30195
30269
  }
30196
30270
  clone() {
30197
30271
  var _a, _b, _c;
@@ -30455,13 +30529,13 @@
30455
30529
  }
30456
30530
  }
30457
30531
  function parseNiceOptions(originalDomain, option) {
30458
- const hasForceMin = isNumber$2(option.forceMin),
30459
- hasForceMax = isNumber$2(option.forceMax);
30532
+ const hasForceMin = isNumber$3(option.forceMin),
30533
+ hasForceMax = isNumber$3(option.forceMax);
30460
30534
  let niceType = null;
30461
30535
  const niceMinMax = [];
30462
30536
  let niceDomain = null;
30463
30537
  const domainValidator = hasForceMin && hasForceMax ? x => x >= option.forceMin && x <= option.forceMax : hasForceMin ? x => x >= option.forceMin : hasForceMax ? x => x <= option.forceMax : null;
30464
- return hasForceMin ? niceMinMax[0] = option.forceMin : isNumber$2(option.min) && option.min <= Math.min(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[0] = option.min), hasForceMax ? niceMinMax[1] = option.forceMax : isNumber$2(option.max) && option.max >= Math.max(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[1] = option.max), isNumber$2(niceMinMax[0]) && isNumber$2(niceMinMax[1]) ? (niceDomain = originalDomain.slice(), niceDomain[0] = niceMinMax[0], niceDomain[niceDomain.length - 1] = niceMinMax[1]) : niceType = isNumber$2(niceMinMax[0]) || isNumber$2(niceMinMax[1]) ? isNumber$2(niceMinMax[0]) ? "max" : "min" : "all", {
30538
+ return hasForceMin ? niceMinMax[0] = option.forceMin : isNumber$3(option.min) && option.min <= Math.min(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[0] = option.min), hasForceMax ? niceMinMax[1] = option.forceMax : isNumber$3(option.max) && option.max >= Math.max(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[1] = option.max), isNumber$3(niceMinMax[0]) && isNumber$3(niceMinMax[1]) ? (niceDomain = originalDomain.slice(), niceDomain[0] = niceMinMax[0], niceDomain[niceDomain.length - 1] = niceMinMax[1]) : niceType = isNumber$3(niceMinMax[0]) || isNumber$3(niceMinMax[1]) ? isNumber$3(niceMinMax[0]) ? "max" : "min" : "all", {
30465
30539
  niceType: niceType,
30466
30540
  niceDomain: niceDomain,
30467
30541
  niceMinMax: niceMinMax,
@@ -31150,8 +31224,8 @@
31150
31224
  textAlign: "center",
31151
31225
  textBaseline: "middle"
31152
31226
  }, textStyle), null === (_c = null === (_b = this.stage) || void 0 === _b ? void 0 : _b.getTheme()) || void 0 === _c ? void 0 : _c.text),
31153
- handlerSizeX = isNumber$2(handlerSize) ? handlerSize : handlerSize[0],
31154
- handlerSizeY = isNumber$2(handlerSize) ? handlerSize : handlerSize[1],
31227
+ handlerSizeX = isNumber$3(handlerSize) ? handlerSize : handlerSize[0],
31228
+ handlerSizeY = isNumber$3(handlerSize) ? handlerSize : handlerSize[1],
31155
31229
  text = graphicCreator.text(Object.assign({
31156
31230
  x: isHorizontal ? handlerSizeX / 2 + handlerSpace + maxTextWidth / 2 : 0,
31157
31231
  y: isHorizontal ? 0 : handlerSizeY / 2 + handlerSpace + maxTextHeight / 2,
@@ -36481,6 +36555,8 @@
36481
36555
  RESIZE_COLUMN_END: 'resize_column_end',
36482
36556
  RESIZE_ROW: 'resize_row',
36483
36557
  RESIZE_ROW_END: 'resize_row_end',
36558
+ MERGE_CELLS: 'merge_cells',
36559
+ UNMERGE_CELLS: 'unmerge_cells',
36484
36560
  CHANGE_HEADER_POSITION_START: 'change_header_position_start',
36485
36561
  CHANGE_HEADER_POSITION: 'change_header_position',
36486
36562
  CHANGING_HEADER_POSITION: 'changing_header_position',
@@ -39616,6 +39692,7 @@
39616
39692
  }
39617
39693
  clearFilteredChildren(record) {
39618
39694
  record.filteredChildren = undefined;
39695
+ delete record.filteredChildren;
39619
39696
  for (let i = 0; i < (record.children?.length ?? 0); i++) {
39620
39697
  this.clearFilteredChildren(record.children[i]);
39621
39698
  }
@@ -39823,6 +39900,9 @@
39823
39900
  if ((this.dataSourceObj?.canChangeOrder)) {
39824
39901
  return this.dataSourceObj.canChangeOrder(sourceIndex, targetIndex);
39825
39902
  }
39903
+ if (this.lastSortStates?.some(state => state.order === 'asc' || state.order === 'desc')) {
39904
+ return false;
39905
+ }
39826
39906
  if (this.hasHierarchyStateExpand) {
39827
39907
  let sourceIndexs = this.currentPagerIndexedData[sourceIndex];
39828
39908
  let targetIndexs = this.currentPagerIndexedData[targetIndex];
@@ -40054,10 +40134,10 @@
40054
40134
  }
40055
40135
  function sortRecordIndexs(recordIndexs, sort) {
40056
40136
  const result = recordIndexs.sort((a, b) => {
40057
- if (isNumber$2(a)) {
40137
+ if (isNumber$3(a)) {
40058
40138
  a = [a];
40059
40139
  }
40060
- if (isNumber$2(b)) {
40140
+ if (isNumber$3(b)) {
40061
40141
  b = [b];
40062
40142
  }
40063
40143
  const length = Math.max(a.length, b.length);
@@ -41326,7 +41406,7 @@
41326
41406
  this._fieldCache = {};
41327
41407
  }
41328
41408
  getOriginalRecord(index) {
41329
- if (isNumber$2(index) && this._recordCache && this._recordCache[index]) {
41409
+ if (isNumber$3(index) && this._recordCache && this._recordCache[index]) {
41330
41410
  return this._recordCache[index];
41331
41411
  }
41332
41412
  return super.getOriginalRecord(index);
@@ -41344,7 +41424,7 @@
41344
41424
  return this.beforeChangedRecordsMap?.get(index.toString());
41345
41425
  }
41346
41426
  }
41347
- if (isNumber$2(index) && this._recordCache && this._recordCache[index]) {
41427
+ if (isNumber$3(index) && this._recordCache && this._recordCache[index]) {
41348
41428
  return this._recordCache[index];
41349
41429
  }
41350
41430
  let data;
@@ -41475,7 +41555,7 @@
41475
41555
  const recordIndexsMaxToMin = sortRecordIndexs(recordIndexs, -1);
41476
41556
  for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
41477
41557
  const recordIndex = recordIndexsMaxToMin[index];
41478
- if (isNumber$2(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
41558
+ if (isNumber$3(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
41479
41559
  continue;
41480
41560
  }
41481
41561
  const originRecordIndex = this.getOriginRecordIndexForGroup(recordIndex);
@@ -41489,7 +41569,7 @@
41489
41569
  updateRecordsForGroup(records, recordIndexs) {
41490
41570
  for (let index = 0; index < recordIndexs.length; index++) {
41491
41571
  const recordIndex = recordIndexs[index];
41492
- if (isNumber$2(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
41572
+ if (isNumber$3(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
41493
41573
  continue;
41494
41574
  }
41495
41575
  const originRecordIndex = this.getOriginRecordIndexForGroup(recordIndex);
@@ -41503,7 +41583,7 @@
41503
41583
  return;
41504
41584
  }
41505
41585
  this.adjustBeforeChangedRecordsMap(recordIndex, recordArr.length);
41506
- if (isNumber$2(recordIndex)) {
41586
+ if (isNumber$3(recordIndex)) {
41507
41587
  this.dataSourceObj.records.splice(recordIndex, 0, ...recordArr);
41508
41588
  }
41509
41589
  else {
@@ -41528,11 +41608,11 @@
41528
41608
  const deletedRecordIndexs = [];
41529
41609
  for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
41530
41610
  const recordIndex = recordIndexsMaxToMin[index];
41531
- if (isNumber$2(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
41611
+ if (isNumber$3(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
41532
41612
  continue;
41533
41613
  }
41534
41614
  this.beforeChangedRecordsMap.delete(recordIndex.toString());
41535
- if (isNumber$2(recordIndex)) {
41615
+ if (isNumber$3(recordIndex)) {
41536
41616
  this.dataSourceObj.records.splice(recordIndex, 1);
41537
41617
  }
41538
41618
  else {
@@ -41552,11 +41632,11 @@
41552
41632
  for (let index = 0; index < recordIndexs.length; index++) {
41553
41633
  const recordIndex = recordIndexs[index];
41554
41634
  const record = records[index];
41555
- if (isNumber$2(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
41635
+ if (isNumber$3(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
41556
41636
  continue;
41557
41637
  }
41558
41638
  this.beforeChangedRecordsMap.delete(recordIndex.toString());
41559
- if (isNumber$2(recordIndex)) {
41639
+ if (isNumber$3(recordIndex)) {
41560
41640
  this.dataSourceObj.records.splice(recordIndex, 1, record);
41561
41641
  }
41562
41642
  else {
@@ -41572,7 +41652,7 @@
41572
41652
  adjustBeforeChangedRecordsMap(insertIndex, insertCount, type = 'add') {
41573
41653
  if (this.rowHierarchyType === 'tree') {
41574
41654
  let insertIndexArr;
41575
- if (isNumber$2(insertIndex)) {
41655
+ if (isNumber$3(insertIndex)) {
41576
41656
  insertIndexArr = [insertIndex];
41577
41657
  }
41578
41658
  else {
@@ -41622,7 +41702,7 @@
41622
41702
  let i = 1;
41623
41703
  for (; recordIndexLength > parentRecordIndexLength; i++) {
41624
41704
  const index = this.dataSource.currentIndexedData[showIndex - i];
41625
- recordIndexLength = isNumber$2(index) ? 1 : index.length;
41705
+ recordIndexLength = isNumber$3(index) ? 1 : index.length;
41626
41706
  }
41627
41707
  return i - 1;
41628
41708
  }
@@ -41845,7 +41925,7 @@
41845
41925
  }
41846
41926
 
41847
41927
  function getQuadProps(paddingOrigin) {
41848
- if (isNumber$2(paddingOrigin) || isString$2(paddingOrigin) || isArray$5(paddingOrigin)) {
41928
+ if (isNumber$3(paddingOrigin) || isString$2(paddingOrigin) || isArray$5(paddingOrigin)) {
41849
41929
  let padding = parsePadding(paddingOrigin);
41850
41930
  if (typeof padding === 'number' || typeof padding === 'string') {
41851
41931
  padding = [padding, padding, padding, padding];
@@ -42111,7 +42191,7 @@
42111
42191
  if (isNil$1(v)) {
42112
42192
  return false;
42113
42193
  }
42114
- if (isNumber$2(v)) {
42194
+ if (isNumber$3(v)) {
42115
42195
  return true;
42116
42196
  }
42117
42197
  return +v === +v;
@@ -44449,7 +44529,7 @@
44449
44529
  ? getHierarchyOffset(range.start.col, range.start.row, table)
44450
44530
  : getHierarchyOffset(cellGroup.col, cellGroup.row, table);
44451
44531
  let _contentOffset = 0;
44452
- if (isNumber$2(table.theme._contentOffset)) {
44532
+ if (isNumber$3(table.theme._contentOffset)) {
44453
44533
  if (textAlign === 'left') {
44454
44534
  _contentOffset = table.theme._contentOffset;
44455
44535
  }
@@ -44495,7 +44575,7 @@
44495
44575
  let textMark;
44496
44576
  if (inlineFrontIcons.length === 0 && inlineEndIcons.length === 0) {
44497
44577
  let _contentOffset = 0;
44498
- if (isNumber$2(table.theme._contentOffset)) {
44578
+ if (isNumber$3(table.theme._contentOffset)) {
44499
44579
  if (textAlign === 'left') {
44500
44580
  _contentOffset = table.theme._contentOffset;
44501
44581
  }
@@ -44682,8 +44762,8 @@
44682
44762
  iconAttribute.isGif = icon.isGif;
44683
44763
  let hierarchyOffset = 0;
44684
44764
  if ((!dealWithIconComputeVar || dealWithIconComputeVar?.addedHierarchyOffset === 0) &&
44685
- isNumber$2(col) &&
44686
- isNumber$2(row) &&
44765
+ isNumber$3(col) &&
44766
+ isNumber$3(row) &&
44687
44767
  table &&
44688
44768
  (icon.funcType === IconFuncTypeEnum.collapse ||
44689
44769
  icon.funcType === IconFuncTypeEnum.expand ||
@@ -45656,7 +45736,7 @@
45656
45736
  }
45657
45737
  function updateCell$1(col, row, table, addNew, isShadow, forceFastUpdate) {
45658
45738
  const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
45659
- if (oldCellGroup.role !== 'cell' && !addNew) {
45739
+ if (oldCellGroup.role !== 'cell' && oldCellGroup.role !== 'shadow-cell' && !addNew) {
45660
45740
  return undefined;
45661
45741
  }
45662
45742
  const cellLocation = table.getCellLocation(col, row);
@@ -45879,7 +45959,7 @@
45879
45959
  const reactGroup = oldCellGroup.getChildByName(CUSTOM_CONTAINER_NAME);
45880
45960
  if (reactGroup) {
45881
45961
  const { col, row } = reactGroup;
45882
- if (isNumber$2(col) && isNumber$2(row)) {
45962
+ if (isNumber$3(col) && isNumber$3(row)) {
45883
45963
  table.reactCustomLayout.removeCustomCell(col, row);
45884
45964
  }
45885
45965
  }
@@ -46061,10 +46141,10 @@
46061
46141
 
46062
46142
  function isMergeCellGroup(cellGroup) {
46063
46143
  if (cellGroup.role === 'cell' &&
46064
- isNumber$2(cellGroup.mergeStartCol) &&
46065
- isNumber$2(cellGroup.mergeStartRow) &&
46066
- isNumber$2(cellGroup.mergeEndCol) &&
46067
- isNumber$2(cellGroup.mergeEndRow)) {
46144
+ isNumber$3(cellGroup.mergeStartCol) &&
46145
+ isNumber$3(cellGroup.mergeStartRow) &&
46146
+ isNumber$3(cellGroup.mergeEndCol) &&
46147
+ isNumber$3(cellGroup.mergeEndRow)) {
46068
46148
  return true;
46069
46149
  }
46070
46150
  return false;
@@ -46143,12 +46223,12 @@
46143
46223
  const cellWidth = table.getColsWidth(col, endCol);
46144
46224
  const size = getProp('size', actStyle, col, row, table);
46145
46225
  let outerRadius = getProp('outerRadius', actStyle, col, row, table);
46146
- const circleSize = isNumber$2(outerRadius) ? outerRadius * 2 : size;
46226
+ const circleSize = isNumber$3(outerRadius) ? outerRadius * 2 : size;
46147
46227
  let maxHeight = 0;
46148
46228
  if (autoWrapText) {
46149
46229
  const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', actStyle, col, row, table);
46150
46230
  const maxLineWidth = cellWidth - (padding[1] + padding[3]) - iconWidth - circleSize - spaceBetweenTextAndIcon;
46151
- if (!isNumber$2(outerRadius)) {
46231
+ if (!isNumber$3(outerRadius)) {
46152
46232
  outerRadius = Math.round(size / 2);
46153
46233
  }
46154
46234
  utilRadioMark.setAttributes({
@@ -46675,7 +46755,7 @@
46675
46755
  }
46676
46756
  else {
46677
46757
  const defaultHeight = table.getDefaultRowHeight(row);
46678
- if (isNumber$2(defaultHeight)) {
46758
+ if (isNumber$3(defaultHeight)) {
46679
46759
  return defaultHeight;
46680
46760
  }
46681
46761
  }
@@ -46713,7 +46793,7 @@
46713
46793
  return maxHeight;
46714
46794
  }
46715
46795
  const defaultHeight = table.getDefaultRowHeight(row);
46716
- return isNumber$2(defaultHeight) ? defaultHeight : table.defaultRowHeight;
46796
+ return isNumber$3(defaultHeight) ? defaultHeight : table.defaultRowHeight;
46717
46797
  }
46718
46798
  function checkFixedStyleAndNoWrap(table, rowStart) {
46719
46799
  const { layoutMap } = table.internalProps;
@@ -50040,13 +50120,13 @@
50040
50120
  const chartCellStyle = layout._table._getCellStyle(col, row + 1);
50041
50121
  const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col, row + 1, layout._table));
50042
50122
  const { range, ticks, axisOption, targetTicks, targetRange, index, theme } = axisRange;
50043
- if (isNumber$2(axisOption?.min)) {
50123
+ if (isNumber$3(axisOption?.min)) {
50044
50124
  range.min = axisOption.min;
50045
50125
  if (range.min > 0) {
50046
50126
  axisOption.zero = false;
50047
50127
  }
50048
50128
  }
50049
- if (isNumber$2(axisOption?.max)) {
50129
+ if (isNumber$3(axisOption?.max)) {
50050
50130
  range.max = axisOption.max;
50051
50131
  if (range.max < 0) {
50052
50132
  axisOption.zero = false;
@@ -50087,7 +50167,7 @@
50087
50167
  const chartCellStyle = layout._table._getCellStyle(col, row - 1);
50088
50168
  const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col, row - 1, layout._table));
50089
50169
  const { range, ticks, axisOption, index, targetTicks, targetRange, theme } = axisRange;
50090
- if (isNumber$2(axisOption?.max)) {
50170
+ if (isNumber$3(axisOption?.max)) {
50091
50171
  range.max = axisOption.max;
50092
50172
  if (range.max < 0) {
50093
50173
  axisOption.zero = false;
@@ -50096,7 +50176,7 @@
50096
50176
  else if (chartType === 'boxPlot') {
50097
50177
  range.max += (range.max - range.min) / 20;
50098
50178
  }
50099
- if (isNumber$2(axisOption?.min)) {
50179
+ if (isNumber$3(axisOption?.min)) {
50100
50180
  range.min = axisOption.min;
50101
50181
  if (range.min > 0) {
50102
50182
  axisOption.zero = false;
@@ -50188,7 +50268,7 @@
50188
50268
  const chartCellStyle = layout._table._getCellStyle(col + 1, row);
50189
50269
  const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col + 1, row, layout._table));
50190
50270
  const { range, ticks, axisOption, index, targetTicks, targetRange, theme } = axisRange;
50191
- if (isNumber$2(axisOption?.max)) {
50271
+ if (isNumber$3(axisOption?.max)) {
50192
50272
  range.max = axisOption.max;
50193
50273
  if (range.max < 0) {
50194
50274
  axisOption.zero = false;
@@ -50197,7 +50277,7 @@
50197
50277
  else if (chartType === 'boxPlot') {
50198
50278
  range.max += (range.max - range.min) / 20;
50199
50279
  }
50200
- if (isNumber$2(axisOption?.min)) {
50280
+ if (isNumber$3(axisOption?.min)) {
50201
50281
  range.min = axisOption.min;
50202
50282
  if (range.min > 0) {
50203
50283
  axisOption.zero = false;
@@ -50251,13 +50331,13 @@
50251
50331
  const chartCellStyle = layout._table._getCellStyle(col - 1, row);
50252
50332
  const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col - 1, row, layout._table));
50253
50333
  const { range, ticks, index, targetTicks, targetRange, theme } = axisRange;
50254
- if (isNumber$2(axisOption?.min)) {
50334
+ if (isNumber$3(axisOption?.min)) {
50255
50335
  range.min = axisOption.min;
50256
50336
  if (range.min > 0) {
50257
50337
  axisOption.zero = false;
50258
50338
  }
50259
50339
  }
50260
- if (isNumber$2(axisOption?.max)) {
50340
+ if (isNumber$3(axisOption?.max)) {
50261
50341
  range.max = axisOption.max;
50262
50342
  if (range.max < 0) {
50263
50343
  axisOption.zero = false;
@@ -50339,7 +50419,7 @@
50339
50419
  });
50340
50420
  if (axisOption) {
50341
50421
  if (axisOption.zero) {
50342
- if (isNumber$2(axisOption.range?.min)) {
50422
+ if (isNumber$3(axisOption.range?.min)) {
50343
50423
  axisOption.zero = false;
50344
50424
  }
50345
50425
  }
@@ -50377,7 +50457,7 @@
50377
50457
  return axisOption.orient === orient;
50378
50458
  }) ?? {};
50379
50459
  if (axisOption.zero) {
50380
- if (isNumber$2(axisOption.range?.min)) {
50460
+ if (isNumber$3(axisOption.range?.min)) {
50381
50461
  axisOption.zero = false;
50382
50462
  }
50383
50463
  }
@@ -50675,10 +50755,10 @@
50675
50755
  range.max = axisRange[1];
50676
50756
  }
50677
50757
  const ticks = selfTicks;
50678
- if (isNumber$2(axisOption?.min)) {
50758
+ if (isNumber$3(axisOption?.min)) {
50679
50759
  range.min = axisOption.min;
50680
50760
  }
50681
- if (isNumber$2(axisOption?.max)) {
50761
+ if (isNumber$3(axisOption?.max)) {
50682
50762
  range.max = axisOption.max;
50683
50763
  }
50684
50764
  return {
@@ -53293,7 +53373,7 @@
53293
53373
  else if (cellType === 'radio') {
53294
53374
  const size = getProp('size', actStyle, col, row, table);
53295
53375
  const outerRadius = getProp('outerRadius', actStyle, col, row, table);
53296
- const circleSize = isNumber$2(outerRadius) ? outerRadius * 2 : size;
53376
+ const circleSize = isNumber$3(outerRadius) ? outerRadius * 2 : size;
53297
53377
  const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', actStyle, col, row, table);
53298
53378
  if (isArray$5(cellValue)) {
53299
53379
  const define = table.getBodyColumnDefine(col, row);
@@ -53782,7 +53862,7 @@
53782
53862
  columnGroup.role = 'column';
53783
53863
  columnGroup.col = i;
53784
53864
  containerGroup.addChild(columnGroup);
53785
- const { width: default2Width, height: default2Height } = createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, table.scenegraph.mergeMap, cellLocation === 'columnHeader' && isNumber$2(defaultHeaderRowHeight)
53865
+ const { width: default2Width, height: default2Height } = createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, table.scenegraph.mergeMap, cellLocation === 'columnHeader' && isNumber$3(defaultHeaderRowHeight)
53786
53866
  ? defaultHeaderRowHeight
53787
53867
  : defaultRowHeight, table, rowLimit);
53788
53868
  x += default2Width;
@@ -54738,10 +54818,10 @@
54738
54818
  }
54739
54819
  }
54740
54820
  function adjustCellContentVerticalLayout(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign, table) {
54741
- if (isNumber$2(cellGroup.mergeStartCol) &&
54742
- isNumber$2(cellGroup.mergeStartRow) &&
54743
- isNumber$2(cellGroup.mergeEndCol) &&
54744
- isNumber$2(cellGroup.mergeEndRow)) {
54821
+ if (isNumber$3(cellGroup.mergeStartCol) &&
54822
+ isNumber$3(cellGroup.mergeStartRow) &&
54823
+ isNumber$3(cellGroup.mergeEndCol) &&
54824
+ isNumber$3(cellGroup.mergeEndRow)) {
54745
54825
  const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
54746
54826
  for (let col = colStart; col <= colEnd; col++) {
54747
54827
  for (let row = rowStart; row <= rowEnd; row++) {
@@ -54823,10 +54903,10 @@
54823
54903
  }
54824
54904
  }
54825
54905
  function adjustCellContentHorizontalLayout(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign, table) {
54826
- if (isNumber$2(cellGroup.mergeStartCol) &&
54827
- isNumber$2(cellGroup.mergeStartRow) &&
54828
- isNumber$2(cellGroup.mergeEndCol) &&
54829
- isNumber$2(cellGroup.mergeEndRow)) {
54906
+ if (isNumber$3(cellGroup.mergeStartCol) &&
54907
+ isNumber$3(cellGroup.mergeStartRow) &&
54908
+ isNumber$3(cellGroup.mergeEndCol) &&
54909
+ isNumber$3(cellGroup.mergeEndRow)) {
54830
54910
  const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
54831
54911
  for (let col = colStart; col <= colEnd; col++) {
54832
54912
  for (let row = rowStart; row <= rowEnd; row++) {
@@ -55172,7 +55252,7 @@
55172
55252
  this.colEnd = endCol;
55173
55253
  for (let row = 0; row < this.table.rowCount; row++) {
55174
55254
  const cellGroup = this.highPerformanceGetCell(this.currentCol, row);
55175
- if (cellGroup.role === 'cell' && isNumber$2(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol) {
55255
+ if (cellGroup.role === 'cell' && isNumber$3(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol) {
55176
55256
  this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);
55177
55257
  }
55178
55258
  }
@@ -56303,7 +56383,7 @@
56303
56383
  const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);
56304
56384
  rowUpdatePos = isValid$1(rowUpdatePos) ? (isValid$1(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;
56305
56385
  }
56306
- if (isNumber$2(updateAfter)) {
56386
+ if (isNumber$3(updateAfter)) {
56307
56387
  for (let col = 0; col < Math.max(table.colCount, table.internalProps._oldColCount ?? table.colCount); col++) {
56308
56388
  for (let row = updateAfter; row < Math.max(table.rowCount, table.internalProps._oldRowCount ?? table.rowCount); row++) {
56309
56389
  const cellGroup = scene.highPerformanceGetCell(col, row, true);
@@ -56316,9 +56396,9 @@
56316
56396
  : rowUpdatePos
56317
56397
  : updateAfter;
56318
56398
  }
56319
- isNumber$2(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));
56399
+ isNumber$3(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));
56320
56400
  if (addRows.length) {
56321
- if (!isNumber$2(updateAfter)) {
56401
+ if (!isNumber$3(updateAfter)) {
56322
56402
  const minRow = Math.min(...addRows);
56323
56403
  scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);
56324
56404
  }
@@ -57698,7 +57778,7 @@
57698
57778
  const colHeaderGroup = createContainerGroup(0, 0, !scene.table.internalProps.enableTreeStickCell);
57699
57779
  colHeaderGroup.role = 'col-header';
57700
57780
  scene.colHeaderGroup = colHeaderGroup;
57701
- const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
57781
+ const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.internalProps.enableTreeStickCell);
57702
57782
  cornerHeaderGroup.role = 'corner-header';
57703
57783
  scene.cornerHeaderGroup = cornerHeaderGroup;
57704
57784
  const rowHeaderGroup = createContainerGroup(0, 0, true);
@@ -58106,7 +58186,7 @@
58106
58186
  }
58107
58187
  }
58108
58188
  });
58109
- if (isNumber$2(updateAfter)) {
58189
+ if (isNumber$3(updateAfter)) {
58110
58190
  for (let col = updateAfter; col < Math.max(table.colCount, table.internalProps._oldColCount ?? table.colCount); col++) {
58111
58191
  for (let row = 0; row < Math.max(table.rowCount, table.internalProps._oldRowCount ?? table.rowCount); row++) {
58112
58192
  const cellGroup = scene.highPerformanceGetCell(col, row, true);
@@ -58116,7 +58196,7 @@
58116
58196
  scene.proxy.colUpdatePos = updateAfter;
58117
58197
  }
58118
58198
  if (addCols.length) {
58119
- if (!isNumber$2(updateAfter)) {
58199
+ if (!isNumber$3(updateAfter)) {
58120
58200
  const minCol = Math.min(...addCols);
58121
58201
  scene.proxy.colUpdatePos = minCol;
58122
58202
  }
@@ -61647,7 +61727,7 @@
61647
61727
  if (recordIndex >= 0) {
61648
61728
  const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
61649
61729
  if (type === 'column') {
61650
- if (isNumber$2(indexInCell)) {
61730
+ if (isNumber$3(indexInCell)) {
61651
61731
  state.radioState[field] = {};
61652
61732
  state.radioState[field][dataIndex] = indexInCell;
61653
61733
  }
@@ -61659,7 +61739,7 @@
61659
61739
  if (!state.radioState[field]) {
61660
61740
  state.radioState[field] = {};
61661
61741
  }
61662
- if (isNumber$2(indexInCell)) {
61742
+ if (isNumber$3(indexInCell)) {
61663
61743
  state.radioState[field][dataIndex] = indexInCell;
61664
61744
  }
61665
61745
  else {
@@ -61675,14 +61755,14 @@
61675
61755
  if (isValid$1(field) && cellType === 'radio') {
61676
61756
  const dataIndex = table.dataSource.getIndexKey(table.getRecordShowIndexByCell(col, row));
61677
61757
  const columnState = table.stateManager.radioState?.[field];
61678
- if (isNumber$2(columnState)) {
61758
+ if (isNumber$3(columnState)) {
61679
61759
  if (columnState === dataIndex) {
61680
61760
  return true;
61681
61761
  }
61682
61762
  }
61683
61763
  else if (isObject$7(columnState)) {
61684
61764
  const cellState = columnState[dataIndex];
61685
- if (isNumber$2(cellState)) {
61765
+ if (isNumber$3(cellState)) {
61686
61766
  return cellState;
61687
61767
  }
61688
61768
  }
@@ -61695,7 +61775,7 @@
61695
61775
  const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
61696
61776
  if (type === 'column') {
61697
61777
  if (!isValid$1(state.radioState[field]) && isChecked) {
61698
- if (isNumber$2(indexInCell)) {
61778
+ if (isNumber$3(indexInCell)) {
61699
61779
  state.radioState[field] = {};
61700
61780
  state.radioState[field][dataIndex] = indexInCell;
61701
61781
  }
@@ -61704,23 +61784,23 @@
61704
61784
  }
61705
61785
  return true;
61706
61786
  }
61707
- else if (isNumber$2(state.radioState[field]) && !isNumber$2(indexInCell)) {
61787
+ else if (isNumber$3(state.radioState[field]) && !isNumber$3(indexInCell)) {
61708
61788
  return state.radioState[field] === dataIndex;
61709
61789
  }
61710
- else if (isNumber$2(state.radioState[field]) && isNumber$2(indexInCell)) {
61790
+ else if (isNumber$3(state.radioState[field]) && isNumber$3(indexInCell)) {
61711
61791
  return false;
61712
61792
  }
61713
- else if (isObject$7(state.radioState[field]) && !isNumber$2(indexInCell)) {
61793
+ else if (isObject$7(state.radioState[field]) && !isNumber$3(indexInCell)) {
61714
61794
  return false;
61715
61795
  }
61716
- else if (isObject$7(state.radioState[field]) && isNumber$2(indexInCell)) {
61796
+ else if (isObject$7(state.radioState[field]) && isNumber$3(indexInCell)) {
61717
61797
  return state.radioState[field][dataIndex] === indexInCell;
61718
61798
  }
61719
61799
  }
61720
61800
  else if (type === 'cell') {
61721
61801
  if (!isValid$1(state.radioState[field]) && isChecked) {
61722
61802
  state.radioState[field] = {};
61723
- if (isNumber$2(indexInCell)) {
61803
+ if (isNumber$3(indexInCell)) {
61724
61804
  state.radioState[field][dataIndex] = indexInCell;
61725
61805
  }
61726
61806
  else {
@@ -61729,7 +61809,7 @@
61729
61809
  return true;
61730
61810
  }
61731
61811
  else if (!isValid$1(state.radioState[field]?.[dataIndex]) && isChecked) {
61732
- if (isNumber$2(indexInCell)) {
61812
+ if (isNumber$3(indexInCell)) {
61733
61813
  state.radioState[field][dataIndex] = indexInCell;
61734
61814
  }
61735
61815
  else {
@@ -61737,16 +61817,16 @@
61737
61817
  }
61738
61818
  return true;
61739
61819
  }
61740
- else if (isBoolean$2(state.radioState[field]?.[dataIndex]) && !isNumber$2(indexInCell)) {
61820
+ else if (isBoolean$2(state.radioState[field]?.[dataIndex]) && !isNumber$3(indexInCell)) {
61741
61821
  return state.radioState[field][dataIndex];
61742
61822
  }
61743
- else if (isBoolean$2(state.radioState[field]?.[dataIndex]) && isNumber$2(indexInCell)) {
61823
+ else if (isBoolean$2(state.radioState[field]?.[dataIndex]) && isNumber$3(indexInCell)) {
61744
61824
  return false;
61745
61825
  }
61746
- else if (isNumber$2(state.radioState[field]?.[dataIndex]) && !isNumber$2(indexInCell)) {
61826
+ else if (isNumber$3(state.radioState[field]?.[dataIndex]) && !isNumber$3(indexInCell)) {
61747
61827
  return false;
61748
61828
  }
61749
- else if (isNumber$2(state.radioState[field]?.[dataIndex]) && isNumber$2(indexInCell)) {
61829
+ else if (isNumber$3(state.radioState[field]?.[dataIndex]) && isNumber$3(indexInCell)) {
61750
61830
  return state.radioState[field][dataIndex] === indexInCell;
61751
61831
  }
61752
61832
  }
@@ -61758,7 +61838,7 @@
61758
61838
  if (!cellGoup) {
61759
61839
  return;
61760
61840
  }
61761
- if (isNumber$2(index)) {
61841
+ if (isNumber$3(index)) {
61762
61842
  const radio = cellGoup.getChildAt(index);
61763
61843
  radio?._handlePointerUp();
61764
61844
  }
@@ -62054,7 +62134,7 @@
62054
62134
  source = table.isPivotTable() ? undefined : table.getRecordIndexByCell(0, sourceIndex);
62055
62135
  target = table.isPivotTable() ? undefined : table.getRecordIndexByCell(0, targetIndex);
62056
62136
  }
62057
- if (isNumber$2(source) && isNumber$2(target)) {
62137
+ if (isNumber$3(source) && isNumber$3(target)) {
62058
62138
  sourceIndex = source;
62059
62139
  targetIndex = target;
62060
62140
  if (sourceIndex > targetIndex) {
@@ -62701,7 +62781,7 @@
62701
62781
  function flatten(cols, parentStartIndex = 0) {
62702
62782
  cols.forEach((col) => {
62703
62783
  const startIndex = col.startInTotal
62704
- ? col.startInTotal + state.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0
62784
+ ? col.startInTotal + (state.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0)
62705
62785
  : parentStartIndex;
62706
62786
  if (col.columns) {
62707
62787
  flatten(col.columns, startIndex);
@@ -62724,7 +62804,7 @@
62724
62804
  prev.push({
62725
62805
  field: item.field,
62726
62806
  order: item.order,
62727
- row: column?.startInTotal + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0,
62807
+ row: (column?.startInTotal ?? 0) + (this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0),
62728
62808
  col: column?.level
62729
62809
  });
62730
62810
  }
@@ -62732,7 +62812,7 @@
62732
62812
  prev.push({
62733
62813
  field: item.field,
62734
62814
  order: item.order,
62735
- col: column?.startInTotal + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0,
62815
+ col: (column?.startInTotal ?? 0) + (this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0),
62736
62816
  row: column?.level
62737
62817
  });
62738
62818
  }
@@ -63537,11 +63617,12 @@
63537
63617
  }
63538
63618
  updateSortState(sortState) {
63539
63619
  sortState = Array.isArray(sortState) ? sortState : [sortState];
63620
+ const isSame = sortState.length === this.sort.length &&
63621
+ sortState.every((item, index) => item?.field === this.sort[index]?.field && item?.order === this.sort[index]?.order);
63622
+ if (isSame) {
63623
+ return;
63624
+ }
63540
63625
  for (let index = 0; index < sortState.length; index++) {
63541
- if (sortState[index].field === this.sort[index]?.field &&
63542
- sortState[sortState.length - 1].order === this.sort[index]?.order) {
63543
- return;
63544
- }
63545
63626
  const oldSortCol = this.table.internalProps.multipleSort ? null : this.sort[index]?.col || null;
63546
63627
  const oldSortRow = this.table.internalProps.multipleSort ? null : this.sort[index]?.row || null;
63547
63628
  this.sort[index]?.order === 'asc'
@@ -63585,7 +63666,7 @@
63585
63666
  row: null,
63586
63667
  iconMark: null,
63587
63668
  order: null,
63588
- oldSortCol: column.startInTotal + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0,
63669
+ oldSortCol: (column.startInTotal ?? 0) + (this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0),
63589
63670
  oldSortRow: column.level,
63590
63671
  oldIconMark: null
63591
63672
  });
@@ -65878,7 +65959,7 @@
65878
65959
  const indexedData = table.dataSource.currentPagerIndexedData;
65879
65960
  const titleShowIndex = table.getRecordShowIndexByCell(col, row);
65880
65961
  let titleIndex = indexedData[titleShowIndex];
65881
- if (isNumber$2(titleIndex)) {
65962
+ if (isNumber$3(titleIndex)) {
65882
65963
  titleIndex = [titleIndex];
65883
65964
  }
65884
65965
  if (record.vtableMerge || record.children?.length) {
@@ -65929,7 +66010,7 @@
65929
66010
  const indexedData = table.dataSource.currentPagerIndexedData;
65930
66011
  const titleShowIndex = table.getRecordShowIndexByCell(col, row);
65931
66012
  let titleIndex = indexedData[titleShowIndex];
65932
- if (isNumber$2(titleIndex)) {
66013
+ if (isNumber$3(titleIndex)) {
65933
66014
  titleIndex = [titleIndex];
65934
66015
  }
65935
66016
  if (record.vtableMerge || record.children?.length) {
@@ -65978,7 +66059,7 @@
65978
66059
  let i = titleShowIndex - 1;
65979
66060
  while (parentLength > 0 && i >= 0) {
65980
66061
  if ((isArray$5(indexedData[i]) && indexedData[i]?.length === parentLength) ||
65981
- (parentLength === 1 && isNumber$2(indexedData[i]))) {
66062
+ (parentLength === 1 && isNumber$3(indexedData[i]))) {
65982
66063
  const row = table.columnHeaderLevelCount + i;
65983
66064
  updateParentCheckboxState(col, row, indexedData[i], table, field);
65984
66065
  parentLength--;
@@ -70896,11 +70977,11 @@
70896
70977
  let rowInt = row;
70897
70978
  let colDecimal;
70898
70979
  let rowDecimal;
70899
- if (isNumber$2(col) && !isInteger(col)) {
70980
+ if (isNumber$3(col) && !isInteger(col)) {
70900
70981
  colInt = Math.floor(col);
70901
70982
  colDecimal = col - colInt;
70902
70983
  }
70903
- if (isNumber$2(row) && !isInteger(row)) {
70984
+ if (isNumber$3(row) && !isInteger(row)) {
70904
70985
  rowInt = Math.floor(row);
70905
70986
  rowDecimal = row - rowInt;
70906
70987
  }
@@ -70913,8 +70994,8 @@
70913
70994
  top += rowDecimal * cellRect.height;
70914
70995
  }
70915
70996
  const to = {
70916
- x: isNumber$2(col) ? left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
70917
- y: isNumber$2(row) ? top - this.table.getFrozenRowsHeight() : this.table.scrollTop
70997
+ x: isNumber$3(col) ? left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
70998
+ y: isNumber$3(row) ? top - this.table.getFrozenRowsHeight() : this.table.scrollTop
70918
70999
  };
70919
71000
  const duration = !isBoolean$2(animationOption) ? animationOption?.duration ?? 3000 : animationOption ? 3000 : 0;
70920
71001
  const easing = !isBoolean$2(animationOption) ? animationOption?.easing ?? 'linear' : animationOption ? 'linear' : '';
@@ -71014,6 +71095,7 @@
71014
71095
  class BaseTable extends EventTarget$1 {
71015
71096
  internalProps;
71016
71097
  showFrozenIcon = true;
71098
+ _scrollToRowCorrectTimer = null;
71017
71099
  padding;
71018
71100
  globalDropDownMenu;
71019
71101
  tableNoFrameWidth;
@@ -71048,7 +71130,7 @@
71048
71130
  return TABLE_EVENT_TYPE;
71049
71131
  }
71050
71132
  options;
71051
- version = "1.23.3";
71133
+ version = "1.24.0";
71052
71134
  pagination;
71053
71135
  id = `VTable${Date.now()}`;
71054
71136
  headerStyleCache;
@@ -71135,8 +71217,8 @@
71135
71217
  this.tableNoFrameHeight = 0;
71136
71218
  this.contentOffsetX = translateX ?? 0;
71137
71219
  this.contentOffsetY = translateY ?? 0;
71138
- this.canvasWidth = isNumber$2(canvasWidth) ? canvasWidth : undefined;
71139
- this.canvasHeight = isNumber$2(canvasHeight) ? canvasHeight : undefined;
71220
+ this.canvasWidth = isNumber$3(canvasWidth) ? canvasWidth : undefined;
71221
+ this.canvasHeight = isNumber$3(canvasHeight) ? canvasHeight : undefined;
71140
71222
  this.columnWidthComputeMode = options.columnWidthComputeMode ?? 'normal';
71141
71223
  const internalProps = (this.internalProps = {});
71142
71224
  showFrozenIcon !== undefined && (this.showFrozenIcon = showFrozenIcon);
@@ -71163,7 +71245,7 @@
71163
71245
  }
71164
71246
  }
71165
71247
  internalProps.handler = new EventHandler();
71166
- if (isNumber$2(this.options.resizeTime)) {
71248
+ if (isNumber$3(this.options.resizeTime)) {
71167
71249
  internalProps.handler.resizeTime = this.options.resizeTime;
71168
71250
  }
71169
71251
  internalProps.pixelRatio = pixelRatio;
@@ -71509,7 +71591,7 @@
71509
71591
  this.scenegraph.dealWidthBottomFrozen(bottomFrozenRowCount);
71510
71592
  }
71511
71593
  get defaultRowHeight() {
71512
- if (isNumber$2(this.internalProps.defaultRowHeight)) {
71594
+ if (isNumber$3(this.internalProps.defaultRowHeight)) {
71513
71595
  return this.internalProps.defaultRowHeight;
71514
71596
  }
71515
71597
  return 40;
@@ -71948,7 +72030,7 @@
71948
72030
  return this.rowHeightsMap.get(row);
71949
72031
  }
71950
72032
  const defaultHeight = this.getDefaultRowHeight(row);
71951
- if (isNumber$2(defaultHeight)) {
72033
+ if (isNumber$3(defaultHeight)) {
71952
72034
  return defaultHeight;
71953
72035
  }
71954
72036
  return this.defaultRowHeight;
@@ -72639,6 +72721,12 @@
72639
72721
  dispose() {
72640
72722
  this.release();
72641
72723
  }
72724
+ clearCorrectTimer() {
72725
+ if (this._scrollToRowCorrectTimer) {
72726
+ clearTimeout(this._scrollToRowCorrectTimer);
72727
+ this._scrollToRowCorrectTimer = null;
72728
+ }
72729
+ }
72642
72730
  release() {
72643
72731
  this.scenegraph?.component?.vScrollBar?.release();
72644
72732
  this.scenegraph?.component?.hScrollBar?.release();
@@ -72649,6 +72737,7 @@
72649
72737
  if (this.isReleased) {
72650
72738
  return;
72651
72739
  }
72740
+ this.clearCorrectTimer();
72652
72741
  internalProps.tooltipHandler?.release?.();
72653
72742
  internalProps.menuHandler?.release?.();
72654
72743
  super.release?.();
@@ -72738,8 +72827,8 @@
72738
72827
  this.customRender = customRender;
72739
72828
  this.contentOffsetX = translateX ?? 0;
72740
72829
  this.contentOffsetY = translateY ?? 0;
72741
- this.canvasWidth = isNumber$2(canvasWidth) ? canvasWidth : undefined;
72742
- this.canvasHeight = isNumber$2(canvasHeight) ? canvasHeight : undefined;
72830
+ this.canvasWidth = isNumber$3(canvasWidth) ? canvasWidth : undefined;
72831
+ this.canvasHeight = isNumber$3(canvasHeight) ? canvasHeight : undefined;
72743
72832
  const internalProps = this.internalProps;
72744
72833
  if (Env.mode !== 'node' && !options.canvas) {
72745
72834
  updateRootElementPadding(internalProps.element, this.padding);
@@ -73112,6 +73201,86 @@
73112
73201
  this.stateManager.updateSelectPos(this.colCount - 1, rowIndex, false, isCtrl, false, makeSelectCellVisible, true);
73113
73202
  this.stateManager.select.selecting = false;
73114
73203
  }
73204
+ changeHeaderPosition(args) {
73205
+ if (!('canMoveHeaderPosition' in this.internalProps.layoutMap) ||
73206
+ this.options.customConfig?.notUpdateInColumnRowMove === true) {
73207
+ return false;
73208
+ }
73209
+ const prevMoving = this.stateManager.columnMove.movingColumnOrRow;
73210
+ this.stateManager.columnMove.movingColumnOrRow = args.movingColumnOrRow;
73211
+ try {
73212
+ if (this.internalProps.layoutMap.canMoveHeaderPosition?.(args.source, args.target) === false) {
73213
+ return false;
73214
+ }
73215
+ const oldSourceMergeInfo = this.getCellRange(args.source.col, args.source.row);
73216
+ const oldTargetMergeInfo = this.getCellRange(args.target.col, args.target.row);
73217
+ const moveContext = this._moveHeaderPosition(args.source, args.target);
73218
+ if (!moveContext || moveContext.targetIndex === moveContext.sourceIndex) {
73219
+ return false;
73220
+ }
73221
+ this.internalProps.useOneRowHeightFillAll = false;
73222
+ this.internalProps.layoutMap.clearCellRangeMap();
73223
+ const sourceMergeInfo = this.getCellRange(args.source.col, args.source.row);
73224
+ const targetMergeInfo = this.getCellRange(args.target.col, args.target.row);
73225
+ const colMin = Math.min(sourceMergeInfo.start.col, targetMergeInfo.start.col, oldSourceMergeInfo.start.col, oldTargetMergeInfo.start.col);
73226
+ const colMax = Math.max(sourceMergeInfo.end.col, targetMergeInfo.end.col, oldSourceMergeInfo.end.col, oldTargetMergeInfo.end.col);
73227
+ const rowMin = Math.min(sourceMergeInfo.start.row, targetMergeInfo.start.row, oldSourceMergeInfo.start.row, oldTargetMergeInfo.start.row);
73228
+ let rowMax = Math.max(sourceMergeInfo.end.row, targetMergeInfo.end.row, oldSourceMergeInfo.end.row, oldTargetMergeInfo.end.row);
73229
+ if (moveContext.moveType === 'row' &&
73230
+ this.internalProps.layoutMap.rowHierarchyType === 'tree') {
73231
+ if (moveContext.targetIndex > moveContext.sourceIndex) {
73232
+ rowMax = rowMax + moveContext.targetSize - 1;
73233
+ }
73234
+ else {
73235
+ rowMax = rowMax + moveContext.sourceSize - 1;
73236
+ }
73237
+ }
73238
+ if (!this.transpose &&
73239
+ (this.isSeriesNumberInBody(args.source.col, args.source.row) || args.movingColumnOrRow === 'row')) {
73240
+ this.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex);
73241
+ this.stateManager.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex);
73242
+ }
73243
+ if (moveContext.moveType === 'column') {
73244
+ for (let col = colMin; col <= colMax; col++) {
73245
+ this._clearColRangeWidthsMap(col);
73246
+ }
73247
+ }
73248
+ else {
73249
+ for (let row = rowMin; row <= rowMax; row++) {
73250
+ this._clearRowRangeHeightsMap(row);
73251
+ }
73252
+ }
73253
+ this.clearCellStyleCache();
73254
+ if (this.isSeriesNumberInBody(args.source.col, args.source.row) || args.movingColumnOrRow === 'row') {
73255
+ this.scenegraph.updateHeaderPosition(this.scenegraph.proxy.colStart, this.scenegraph.proxy.colEnd, this.scenegraph.proxy.rowStart, this.scenegraph.proxy.rowEnd, moveContext.moveType);
73256
+ }
73257
+ else if (moveContext.moveType === 'column') {
73258
+ this.scenegraph.updateHeaderPosition(colMin, colMax, 0, -1, moveContext.moveType);
73259
+ }
73260
+ else {
73261
+ this.scenegraph.updateHeaderPosition(0, -1, rowMin, rowMax, moveContext.moveType);
73262
+ }
73263
+ if (this.internalProps.frozenColDragHeaderMode === 'adjustFrozenCount' && this.isListTable()) {
73264
+ if (this.isLeftFrozenColumn(args.target.col) && !this.isLeftFrozenColumn(args.source.col)) {
73265
+ this.frozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1;
73266
+ }
73267
+ else if (this.isLeftFrozenColumn(args.source.col) && !this.isLeftFrozenColumn(args.target.col)) {
73268
+ this.frozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1;
73269
+ }
73270
+ if (this.isRightFrozenColumn(args.target.col) && !this.isRightFrozenColumn(args.source.col)) {
73271
+ this.rightFrozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1;
73272
+ }
73273
+ else if (this.isRightFrozenColumn(args.source.col) && !this.isRightFrozenColumn(args.target.col)) {
73274
+ this.rightFrozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1;
73275
+ }
73276
+ }
73277
+ this.scenegraph.updateNextFrame?.();
73278
+ return true;
73279
+ }
73280
+ finally {
73281
+ this.stateManager.columnMove.movingColumnOrRow = prevMoving;
73282
+ }
73283
+ }
73115
73284
  get recordsCount() {
73116
73285
  return this.records?.length;
73117
73286
  }
@@ -73297,8 +73466,7 @@
73297
73466
  if (this.internalProps.customMergeCell) {
73298
73467
  const customMerge = this.internalProps.customMergeCell(col, row, this);
73299
73468
  if (customMerge &&
73300
- customMerge.range &&
73301
- (isValid$1(customMerge.text) || customMerge.customLayout || this.customRender)) {
73469
+ customMerge.range) {
73302
73470
  if (customMerge.style) {
73303
73471
  const styleClass = this.internalProps.bodyHelper.getStyleClass('text');
73304
73472
  const style = customMerge.style;
@@ -74246,12 +74414,37 @@
74246
74414
  getGroupTitleLevel(col, row) {
74247
74415
  return undefined;
74248
74416
  }
74417
+ getTargetScrollTop(row) {
74418
+ const drawRange = this.getDrawRange();
74419
+ const frozenHeight = this.getFrozenRowsHeight();
74420
+ return Math.max(0, Math.min(this.getRowsHeight(0, row - 1) - frozenHeight, this.getAllRowsHeight() - drawRange.height));
74421
+ }
74422
+ _scheduleScrollToRowCorrect(row, delay = 0) {
74423
+ this._scrollToRowCorrectTimer = setTimeout(() => {
74424
+ this.clearCorrectTimer();
74425
+ const targetScrollTop = this.getTargetScrollTop(row);
74426
+ if (targetScrollTop !== this.scrollTop) {
74427
+ this.scrollTop = targetScrollTop;
74428
+ const correctedTargetScrollTop = this.getTargetScrollTop(row);
74429
+ if (correctedTargetScrollTop !== this.scrollTop) {
74430
+ this.scrollTop = correctedTargetScrollTop;
74431
+ }
74432
+ }
74433
+ }, delay);
74434
+ }
74249
74435
  scrollToRow(row, animationOption) {
74436
+ const targetRow = Math.min(Math.max(Math.floor(row), 0), this.rowCount - 1);
74437
+ this.clearCorrectTimer();
74250
74438
  if (!animationOption) {
74251
- this.scrollToCell({ row });
74439
+ this.scrollToCell({ row: targetRow });
74440
+ this._scheduleScrollToRowCorrect(targetRow);
74252
74441
  return;
74253
74442
  }
74254
- this.animationManager.scrollTo({ row }, animationOption);
74443
+ const duration = !isBoolean$2(animationOption) ? animationOption?.duration ?? 3000 : 3000;
74444
+ this.animationManager.scrollTo({ row: targetRow }, animationOption);
74445
+ this._scrollToRowCorrectTimer = setTimeout(() => {
74446
+ this.scrollToRow(targetRow, false);
74447
+ }, duration);
74255
74448
  }
74256
74449
  scrollToCol(col, animationOption) {
74257
74450
  if (!animationOption) {
@@ -74273,8 +74466,8 @@
74273
74466
  }
74274
74467
  if (isValid$1(cellAddr.row) && cellAddr.row >= this.frozenRowCount) {
74275
74468
  const frozenHeight = this.getFrozenRowsHeight();
74276
- const top = this.getRowsHeight(0, cellAddr.row - 1);
74277
- this.scrollTop = Math.min(top - frozenHeight, this.getAllRowsHeight() - drawRange.height);
74469
+ const top = this.rowHeightsMap.getSumInRange(0, cellAddr.row - 1);
74470
+ this.scrollTop = Math.min(top - frozenHeight, this.rowHeightsMap.getSumInRange(0, this.rowCount - 1) - drawRange.height);
74278
74471
  }
74279
74472
  this.render();
74280
74473
  }
@@ -75193,13 +75386,13 @@
75193
75386
  const colPath = layout.getColKeysPath(col, row);
75194
75387
  indicatorKeys.forEach((key, index) => {
75195
75388
  const { range, targetTicks, targetRange, axisOption, chartType } = getAxisRangeAndTicks(col, row, index, index === 0 ? 'bottom' : 'top', index === 0 ? 'top' : 'bottom', indicatorKeys, colPath, layout);
75196
- if (isNumber$2(axisOption?.max)) {
75389
+ if (isNumber$3(axisOption?.max)) {
75197
75390
  range.max = axisOption.max;
75198
75391
  }
75199
75392
  else if (chartType === 'boxPlot') {
75200
75393
  range.max += (range.max - range.min) / 20;
75201
75394
  }
75202
- if (isNumber$2(axisOption?.min)) {
75395
+ if (isNumber$3(axisOption?.min)) {
75203
75396
  range.min = axisOption.min;
75204
75397
  }
75205
75398
  else if (chartType === 'boxPlot') {
@@ -75263,13 +75456,13 @@
75263
75456
  indicatorKeys.forEach((key, index) => {
75264
75457
  const { range, targetTicks, targetRange, axisOption } = getAxisRangeAndTicks(col, row, index, index === 0 ? 'left' : 'right', index === 0 ? 'right' : 'left', indicatorKeys, rowPath, layout);
75265
75458
  const { chartType } = getAxisOption(col, row, index === 0 ? 'left' : 'right', layout);
75266
- if (isNumber$2(axisOption?.max)) {
75459
+ if (isNumber$3(axisOption?.max)) {
75267
75460
  range.max = axisOption.max;
75268
75461
  }
75269
75462
  else if (chartType === 'boxPlot') {
75270
75463
  range.max += (range.max - range.min) / 20;
75271
75464
  }
75272
- if (isNumber$2(axisOption?.min)) {
75465
+ if (isNumber$3(axisOption?.min)) {
75273
75466
  range.min = axisOption.min;
75274
75467
  }
75275
75468
  else if (chartType === 'boxPlot') {
@@ -75497,19 +75690,35 @@
75497
75690
  if (layout.rowHierarchyType !== 'tree') {
75498
75691
  return;
75499
75692
  }
75500
- const cellRecord = layout._table.getCellRawRecord(col, row);
75501
- if (layout._table.internalProps.groupTitleCheckbox && layout._table.internalProps.rowSeriesNumber) {
75502
- if (cellRecord?.vtableMerge && col >= layout.leftRowSeriesNumberColumnCount) {
75503
- cellRange.start.col = layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount;
75504
- cellRange.end.col = layout.colCount - 1;
75505
- cellRange.start.row = cellRange.end.row = row;
75506
- }
75693
+ const table = layout._table;
75694
+ const internalProps = table.internalProps || {};
75695
+ const isGroupMode = !!internalProps.groupBy;
75696
+ const cellRecord = table.getCellRawRecord(col, row);
75697
+ if (!cellRecord?.vtableMerge) {
75698
+ return;
75507
75699
  }
75508
- else {
75509
- if (cellRecord?.vtableMerge) {
75510
- cellRange.start.col = layout.rowHeaderLevelCount;
75511
- cellRange.end.col = layout.colCount - 1;
75512
- cellRange.start.row = cellRange.end.row = row;
75700
+ const treeTitleStartCol = internalProps.groupTitleCheckbox && internalProps.rowSeriesNumber
75701
+ ? layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount
75702
+ : layout.rowHeaderLevelCount;
75703
+ if (col < treeTitleStartCol) {
75704
+ return;
75705
+ }
75706
+ cellRange.start.col = treeTitleStartCol;
75707
+ cellRange.end.col = layout.colCount - 1;
75708
+ cellRange.start.row = cellRange.end.row = row;
75709
+ if (isGroupMode && layout.columnObjects?.length === 1) {
75710
+ const onlyColumn = layout.columnObjects[0];
75711
+ const field = onlyColumn?.field;
75712
+ if (field != null) {
75713
+ let text = cellRecord.vtableMergeName;
75714
+ const groupTitleFieldFormat = internalProps.groupTitleFieldFormat;
75715
+ if (typeof groupTitleFieldFormat === 'function') {
75716
+ text = groupTitleFieldFormat(cellRecord, col, row, table);
75717
+ }
75718
+ const current = cellRecord[field];
75719
+ if (current == null && text != null) {
75720
+ cellRecord[field] = text;
75721
+ }
75513
75722
  }
75514
75723
  }
75515
75724
  }
@@ -76981,7 +77190,12 @@
76981
77190
  }
76982
77191
  this.table._makeVisibleCell(col, row);
76983
77192
  this.editingEditor = editor;
76984
- const dataValue = isValid$1(value) ? value : this.table.getCellOriginValue(col, row);
77193
+ const customMergeText = this.table.getCustomMerge(col, row)?.text;
77194
+ const dataValue = isValid$1(value)
77195
+ ? value
77196
+ : isValid$1(customMergeText)
77197
+ ? customMergeText
77198
+ : this.table.getCellOriginValue(col, row);
76985
77199
  const rect = this.table.getCellRangeRelativeRect(this.table.getCellRange(col, row));
76986
77200
  const referencePosition = { rect: { left: rect.left, top: rect.top, width: rect.width, height: rect.height } };
76987
77201
  if (col === this.table.colCount - 1) {
@@ -77039,7 +77253,10 @@
77039
77253
  if (this.editingEditor.validateValue) {
77040
77254
  this.isValidatingValue = true;
77041
77255
  const newValue = this.editingEditor.getValue();
77042
- const oldValue = this.table.getCellOriginValue(this.editCell.col, this.editCell.row);
77256
+ const customMergeText = this.table.getCustomMerge(this.editCell.col, this.editCell.row)?.text;
77257
+ const oldValue = isValid$1(customMergeText)
77258
+ ? customMergeText
77259
+ : this.table.getCellOriginValue(this.editCell.col, this.editCell.row);
77043
77260
  const target = e?.target;
77044
77261
  const maybePromiseOrValue = this.editingEditor.validateValue?.(newValue, oldValue, this.editCell, this.table, !!this.table.getElement().contains(target));
77045
77262
  if (isPromise(maybePromiseOrValue)) {
@@ -77063,16 +77280,21 @@
77063
77280
  doExit() {
77064
77281
  const changedValue = this.editingEditor.getValue?.();
77065
77282
  const range = this.table.getCellRange(this.editCell.col, this.editCell.row);
77066
- const changedValues = [];
77067
- for (let row = range.start.row; row <= range.end.row; row++) {
77068
- const rowChangedValues = [];
77069
- for (let col = range.start.col; col <= range.end.col; col++) {
77070
- rowChangedValues.push(changedValue);
77283
+ this.editingEditor.beforeEnd?.();
77284
+ if (range.isCustom) {
77285
+ this.table.changeCellValue(range.start.col, range.start.row, changedValue);
77286
+ }
77287
+ else {
77288
+ const changedValues = [];
77289
+ for (let row = range.start.row; row <= range.end.row; row++) {
77290
+ const rowChangedValues = [];
77291
+ for (let col = range.start.col; col <= range.end.col; col++) {
77292
+ rowChangedValues.push(changedValue);
77293
+ }
77294
+ changedValues.push(rowChangedValues);
77071
77295
  }
77072
- changedValues.push(rowChangedValues);
77296
+ this.table.changeCellValues(range.start.col, range.start.row, changedValues);
77073
77297
  }
77074
- this.editingEditor.beforeEnd?.();
77075
- this.table.changeCellValues(range.start.col, range.start.row, changedValues);
77076
77298
  this.editingEditor.exit && (void 0);
77077
77299
  this.editingEditor.exit?.();
77078
77300
  this.editingEditor.onEnd?.();
@@ -77141,6 +77363,24 @@
77141
77363
  return { addRecordRule };
77142
77364
  }
77143
77365
 
77366
+ function refreshCustomMergeCellGroups(table) {
77367
+ if (!Array.isArray(table.options.customMergeCell)) {
77368
+ return;
77369
+ }
77370
+ table.internalProps.customMergeCell = getCustomMergeCellFunc(table.options.customMergeCell);
77371
+ const merges = table.options.customMergeCell;
77372
+ for (let i = 0; i < merges.length; i++) {
77373
+ const r = merges[i]?.range;
77374
+ if (!r?.start) {
77375
+ continue;
77376
+ }
77377
+ for (let col = r.start.col; col <= r.end.col; col++) {
77378
+ for (let row = r.start.row; row <= r.end.row; row++) {
77379
+ table.scenegraph.updateCellContent(col, row);
77380
+ }
77381
+ }
77382
+ }
77383
+ }
77144
77384
  function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table, noTriggerChangeCellValuesEvent) {
77145
77385
  if ((workOnEditableCell && table.isHasEditorDefine(col, row)) || workOnEditableCell === false) {
77146
77386
  const recordShowIndex = table.getRecordShowIndexByCell(col, row);
@@ -77155,6 +77395,16 @@
77155
77395
  table.dataSource.changeFieldValue(value, recordShowIndex, field, col, row, table);
77156
77396
  }
77157
77397
  const range = table.getCellRange(col, row);
77398
+ if (range.isCustom &&
77399
+ range.start.col === col &&
77400
+ range.start.row === row &&
77401
+ Array.isArray(table.options.customMergeCell) &&
77402
+ typeof table.getCellValue === 'function') {
77403
+ const customMerge = table.internalProps?.customMergeCell?.(col, row, table);
77404
+ if (customMerge) {
77405
+ customMerge.text = value;
77406
+ }
77407
+ }
77158
77408
  const aggregators = table.internalProps.layoutMap.getAggregatorsByCell(col, row);
77159
77409
  if (aggregators) {
77160
77410
  if (Array.isArray(aggregators)) {
@@ -77534,10 +77784,15 @@
77534
77784
  table.dataSource.addRecord(record, recordIndex, syncToOriginalRecords);
77535
77785
  adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1);
77536
77786
  if (syncToOriginalRecords) {
77787
+ if (!table.transpose) {
77788
+ const topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount;
77789
+ const insertRowIndex = recordIndex + headerCount + topAggregationCount;
77790
+ table.rowHeightsMap.insert(insertRowIndex);
77791
+ }
77537
77792
  table.refreshRowColCount();
77538
77793
  table.internalProps.layoutMap.clearCellRangeMap();
77539
77794
  table.scenegraph.clearCells();
77540
- table.scenegraph.createSceneGraph();
77795
+ table.scenegraph.createSceneGraph(true);
77541
77796
  return true;
77542
77797
  }
77543
77798
  const oldRowCount = table.rowCount;
@@ -77676,10 +77931,17 @@
77676
77931
  table.dataSource.addRecords(records, recordIndex, syncToOriginalRecords);
77677
77932
  adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length);
77678
77933
  if (syncToOriginalRecords) {
77934
+ if (!table.transpose) {
77935
+ const topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount;
77936
+ const insertRowIndex = recordIndex + headerCount + topAggregationCount;
77937
+ for (let i = 0; i < records.length; i++) {
77938
+ table.rowHeightsMap.insert(insertRowIndex);
77939
+ }
77940
+ }
77679
77941
  table.refreshRowColCount();
77680
77942
  table.internalProps.layoutMap.clearCellRangeMap();
77681
77943
  table.scenegraph.clearCells();
77682
- table.scenegraph.createSceneGraph();
77944
+ table.scenegraph.createSceneGraph(true);
77683
77945
  return true;
77684
77946
  }
77685
77947
  const oldRowCount = table.transpose ? table.colCount : table.rowCount;
@@ -77815,14 +78077,25 @@
77815
78077
  if (deletedRecordIndexs.length === 0) {
77816
78078
  return;
77817
78079
  }
78080
+ if (Array.isArray(table.options.customMergeCell)) {
78081
+ table.internalProps.customMergeCell = getCustomMergeCellFunc(table.options.customMergeCell);
78082
+ }
77818
78083
  for (let index = 0; index < deletedRecordIndexs.length; index++) {
77819
78084
  adjustCheckBoxStateMapWithDeleteRecordIndex(table, deletedRecordIndexs[index], 1);
77820
78085
  }
77821
78086
  if (syncToOriginalRecords) {
78087
+ if (!table.transpose) {
78088
+ const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
78089
+ const topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount;
78090
+ const sorted = [...deletedRecordIndexs].sort((a, b) => b - a);
78091
+ for (let i = 0; i < sorted.length; i++) {
78092
+ table.rowHeightsMap.delete(sorted[i] + headerCount + topAggregationCount);
78093
+ }
78094
+ }
77822
78095
  table.refreshRowColCount();
77823
78096
  table.internalProps.layoutMap.clearCellRangeMap();
77824
78097
  table.scenegraph.clearCells();
77825
- table.scenegraph.createSceneGraph();
78098
+ table.scenegraph.createSceneGraph(true);
77826
78099
  return;
77827
78100
  }
77828
78101
  const oldRowCount = table.transpose ? table.colCount : table.rowCount;
@@ -77879,6 +78152,7 @@
77879
78152
  ? table.scenegraph.updateCol(delRows, [], updateRows)
77880
78153
  : table.scenegraph.updateRow(delRows, [], updateRows);
77881
78154
  table.reactCustomLayout?.updateAllCustomCell();
78155
+ refreshCustomMergeCellGroups(table);
77882
78156
  }
77883
78157
  }
77884
78158
  }
@@ -77898,6 +78172,46 @@
77898
78172
  }
77899
78173
  }
77900
78174
  const updateRows = [];
78175
+ if (table.internalProps.customMergeCell) {
78176
+ const proxy = table.scenegraph.proxy;
78177
+ recordIndexsMinToMax[0];
78178
+ const deletedIndexNums = recordIndexsMinToMax.map(recordIndex => recordIndex + headerCount + topAggregationCount);
78179
+ const minIndexNum = deletedIndexNums[0];
78180
+ let updateMin = minIndexNum;
78181
+ let updateMax = minIndexNum;
78182
+ if (Array.isArray(table.options.customMergeCell)) {
78183
+ const merges = table.options.customMergeCell;
78184
+ const axis = table.transpose ? 'col' : 'row';
78185
+ merges.forEach(m => {
78186
+ const r = m?.range;
78187
+ if (!r?.start || !r?.end) {
78188
+ return;
78189
+ }
78190
+ for (let i = 0; i < deletedIndexNums.length; i++) {
78191
+ const deleteIndex = deletedIndexNums[i];
78192
+ if (r.end[axis] >= deleteIndex - 1) {
78193
+ updateMin = Math.min(updateMin, r.start[axis]);
78194
+ updateMax = Math.max(updateMax, r.end[axis]);
78195
+ break;
78196
+ }
78197
+ }
78198
+ });
78199
+ }
78200
+ if (table.transpose) {
78201
+ const start = Math.max(updateMin, proxy?.colStart ?? updateMin);
78202
+ const end = Math.min(updateMax, proxy?.colEnd ?? updateMax);
78203
+ for (let col = start; col <= end; col++) {
78204
+ updateRows.push({ col, row: 0 });
78205
+ }
78206
+ }
78207
+ else {
78208
+ const start = Math.max(updateMin, proxy?.rowStart ?? updateMin);
78209
+ const end = Math.min(updateMax, proxy?.rowEnd ?? updateMax);
78210
+ for (let row = start; row <= end; row++) {
78211
+ updateRows.push({ col: 0, row });
78212
+ }
78213
+ }
78214
+ }
77901
78215
  for (let row = headerCount; row < headerCount + topAggregationCount; row++) {
77902
78216
  if (table.transpose) {
77903
78217
  updateRows.push({ col: row, row: 0 });
@@ -77919,6 +78233,7 @@
77919
78233
  ? table.scenegraph.updateCol(delRows, [], updateRows)
77920
78234
  : table.scenegraph.updateRow(delRows, [], updateRows);
77921
78235
  table.reactCustomLayout?.updateAllCustomCell();
78236
+ refreshCustomMergeCellGroups(table);
77922
78237
  }
77923
78238
  }
77924
78239
  }
@@ -77964,7 +78279,7 @@
77964
78279
  table.refreshRowColCount();
77965
78280
  table.internalProps.layoutMap.clearCellRangeMap();
77966
78281
  table.scenegraph.clearCells();
77967
- table.scenegraph.createSceneGraph();
78282
+ table.scenegraph.createSceneGraph(true);
77968
78283
  return;
77969
78284
  }
77970
78285
  const bodyRowIndex = updateRecordIndexs.map((index) => table.getBodyRowIndexByRecordIndex(index));
@@ -78055,7 +78370,7 @@
78055
78370
  }
78056
78371
  if (table.dataSource.rowHierarchyType === 'tree') {
78057
78372
  let toOperateIndexArr;
78058
- if (isNumber$2(recordIndex)) {
78373
+ if (isNumber$3(recordIndex)) {
78059
78374
  toOperateIndexArr = [recordIndex];
78060
78375
  }
78061
78376
  else {
@@ -78146,7 +78461,7 @@
78146
78461
  }
78147
78462
  if (table.dataSource.rowHierarchyType === 'tree') {
78148
78463
  let toOperateIndexArr;
78149
- if (isNumber$2(recordIndex)) {
78464
+ if (isNumber$3(recordIndex)) {
78150
78465
  toOperateIndexArr = [recordIndex];
78151
78466
  }
78152
78467
  else {
@@ -78416,6 +78731,53 @@
78416
78731
  }
78417
78732
  addColumns(toAddColumns, colIndex, isMaintainArrayData = true) {
78418
78733
  const columns = this.options.columns;
78734
+ if (Array.isArray(this.options.customMergeCell) && toAddColumns?.length) {
78735
+ const axis = this.transpose ? 'row' : 'col';
78736
+ let insertIndex = colIndex;
78737
+ if (insertIndex === undefined) {
78738
+ insertIndex = columns.length;
78739
+ }
78740
+ else if (insertIndex < 0) {
78741
+ insertIndex = 0;
78742
+ }
78743
+ else if (insertIndex > columns.length) {
78744
+ insertIndex = columns.length;
78745
+ }
78746
+ const toAddCount = toAddColumns.length;
78747
+ const merges = this.options.customMergeCell.map(m => ({
78748
+ ...m,
78749
+ range: { start: { ...m.range.start }, end: { ...m.range.end } }
78750
+ }));
78751
+ for (let i = 0; i < merges.length; i++) {
78752
+ const r = merges[i]?.range;
78753
+ if (!r?.start || !r?.end) {
78754
+ continue;
78755
+ }
78756
+ const start = r.start[axis];
78757
+ const end = r.end[axis];
78758
+ if (end < insertIndex) {
78759
+ continue;
78760
+ }
78761
+ if (start > insertIndex) {
78762
+ r.start[axis] = start + toAddCount;
78763
+ r.end[axis] = end + toAddCount;
78764
+ }
78765
+ else {
78766
+ r.end[axis] = end + toAddCount;
78767
+ }
78768
+ }
78769
+ this.options.customMergeCell = merges.filter((m) => {
78770
+ const r = m?.range;
78771
+ if (!r?.start || !r?.end) {
78772
+ return false;
78773
+ }
78774
+ if (r.end.row < r.start.row || r.end.col < r.start.col) {
78775
+ return false;
78776
+ }
78777
+ return !(r.start.row === r.end.row && r.start.col === r.end.col);
78778
+ });
78779
+ this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
78780
+ }
78419
78781
  if (colIndex === undefined) {
78420
78782
  colIndex = columns.length;
78421
78783
  columns.push(...toAddColumns);
@@ -78446,6 +78808,21 @@
78446
78808
  }
78447
78809
  }
78448
78810
  this.updateColumns(columns, { clearRowHeightCache: false });
78811
+ if (Array.isArray(this.options.customMergeCell)) {
78812
+ this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
78813
+ this.options.customMergeCell.forEach(m => {
78814
+ const r = m?.range;
78815
+ if (!r?.start) {
78816
+ return;
78817
+ }
78818
+ for (let col = r.start.col; col <= r.end.col; col++) {
78819
+ for (let row = r.start.row; row <= r.end.row; row++) {
78820
+ this.scenegraph.updateCellContent(col, row);
78821
+ }
78822
+ }
78823
+ });
78824
+ this.scenegraph.updateNextFrame();
78825
+ }
78449
78826
  this.fireListeners(TABLE_EVENT_TYPE.ADD_COLUMN, {
78450
78827
  columnIndex: colIndex,
78451
78828
  columnCount: toAddColumns.length,
@@ -78455,6 +78832,65 @@
78455
78832
  deleteColumns(deleteColIndexs, isMaintainArrayData = true) {
78456
78833
  const columns = this.options.columns;
78457
78834
  deleteColIndexs.sort((a, b) => b - a);
78835
+ const deletedColumns = deleteColIndexs.map(idx => cloneDeepSpec(columns[idx], ['children']));
78836
+ let deletedRecordValues;
78837
+ if (Array.isArray(this.options.customMergeCell) && deleteColIndexs?.length) {
78838
+ const axis = this.transpose ? 'row' : 'col';
78839
+ const deleteIndexNums = deleteColIndexs
78840
+ .slice()
78841
+ .sort((a, b) => a - b)
78842
+ .map((idx, i) => idx - i);
78843
+ const merges = this.options.customMergeCell.map(m => ({
78844
+ ...m,
78845
+ range: {
78846
+ start: { ...m.range.start },
78847
+ end: { ...m.range.end }
78848
+ }
78849
+ }));
78850
+ for (let i = 0; i < deleteIndexNums.length; i++) {
78851
+ const deleteIndex = deleteIndexNums[i];
78852
+ for (let j = 0; j < merges.length; j++) {
78853
+ const r = merges[j]?.range;
78854
+ if (!r?.start || !r?.end) {
78855
+ continue;
78856
+ }
78857
+ const start = r.start[axis];
78858
+ const end = r.end[axis];
78859
+ if (end < deleteIndex) {
78860
+ continue;
78861
+ }
78862
+ if (start > deleteIndex) {
78863
+ r.start[axis] = start - 1;
78864
+ r.end[axis] = end - 1;
78865
+ }
78866
+ else {
78867
+ r.end[axis] = end - 1;
78868
+ }
78869
+ }
78870
+ }
78871
+ this.options.customMergeCell = merges.filter((m) => {
78872
+ const r = m?.range;
78873
+ if (!r?.start || !r?.end) {
78874
+ return false;
78875
+ }
78876
+ if (r.end.row < r.start.row || r.end.col < r.start.col) {
78877
+ return false;
78878
+ }
78879
+ return !(r.start.row === r.end.row && r.start.col === r.end.col);
78880
+ });
78881
+ this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
78882
+ }
78883
+ if (isMaintainArrayData && Array.isArray(this.records) && this.records.length) {
78884
+ deletedRecordValues = this.records.map(record => {
78885
+ if (Array.isArray(record)) {
78886
+ return deleteColIndexs.map(idx => record[idx]);
78887
+ }
78888
+ return [];
78889
+ });
78890
+ if (deletedRecordValues.every(v => v.length === 0)) {
78891
+ deletedRecordValues = undefined;
78892
+ }
78893
+ }
78458
78894
  for (let i = 0; i < deleteColIndexs.length; i++) {
78459
78895
  columns.splice(deleteColIndexs[i], 1);
78460
78896
  this.colWidthsMap.delAndReorder(deleteColIndexs[i]);
@@ -78487,7 +78923,9 @@
78487
78923
  this.updateColumns(columns, { clearRowHeightCache: false });
78488
78924
  this.fireListeners(TABLE_EVENT_TYPE.DELETE_COLUMN, {
78489
78925
  deleteColIndexs: deleteColIndexs,
78490
- columns
78926
+ columns,
78927
+ deletedColumns,
78928
+ deletedRecordValues
78491
78929
  });
78492
78930
  }
78493
78931
  get columns() {
@@ -79104,47 +79542,54 @@
79104
79542
  return undefined;
79105
79543
  }
79106
79544
  updateSortState(sortState, executeSort = true) {
79107
- if (!sortState) {
79108
- if (this.internalProps.sortState) {
79109
- if (Array.isArray(this.internalProps.sortState)) {
79110
- for (let i = 0; i < this.internalProps.sortState.length; i++) {
79111
- sortState = this.internalProps.sortState?.[i];
79112
- sortState && (sortState.order = 'normal');
79113
- }
79114
- }
79115
- else {
79116
- this.internalProps.sortState.order = 'normal';
79117
- sortState = this.internalProps.sortState;
79118
- }
79119
- }
79120
- }
79121
- else {
79545
+ const nextSortState = Array.isArray(sortState) ? sortState : sortState ? [sortState] : [];
79546
+ const normalizedSortState = nextSortState.filter(Boolean);
79547
+ if (normalizedSortState.length) {
79122
79548
  this.internalProps.sortState = sortState;
79123
79549
  }
79124
- sortState = Array.isArray(sortState) ? sortState : [sortState];
79125
- if (sortState.some((item) => item.field) && executeSort) {
79126
- if (this.internalProps.layoutMap.headerObjects.some(item => item.define.sort !== false)) {
79127
- this.dataSource.sort(sortState.map((item) => {
79128
- const sortFunc = this._getSortFuncFromHeaderOption(this.internalProps.columns, item.field);
79129
- this.internalProps.layoutMap.headerObjects.find((col) => col && col.field === item.field);
79130
- return {
79131
- field: item.field,
79132
- order: item.order,
79133
- orderFn: sortFunc ?? defaultOrderFn
79134
- };
79135
- }));
79550
+ else {
79551
+ this.internalProps.sortState = null;
79552
+ }
79553
+ if (executeSort) {
79554
+ if (normalizedSortState.length) {
79555
+ if (this.internalProps.layoutMap.headerObjects.some(item => item.define.sort !== false)) {
79556
+ this.dataSource.sort(normalizedSortState.map((item) => {
79557
+ const sortFunc = this._getSortFuncFromHeaderOption(this.internalProps.columns, item.field);
79558
+ this.internalProps.layoutMap.headerObjects.find((col) => col && col.field === item.field);
79559
+ return {
79560
+ field: item.field,
79561
+ order: item.order,
79562
+ orderFn: sortFunc ?? defaultOrderFn
79563
+ };
79564
+ }));
79565
+ this.internalProps.layoutMap.clearCellRangeMap();
79566
+ this.internalProps.useOneRowHeightFillAll = false;
79567
+ this.scenegraph.sortCell();
79568
+ }
79569
+ }
79570
+ else {
79571
+ const ds = this.dataSource;
79572
+ const sourceLength = ds?.sourceLength ?? ds?._sourceLength ?? ds?.length ?? 0;
79573
+ if (ds?.sortedIndexMap?.clear) {
79574
+ ds.sortedIndexMap.clear();
79575
+ }
79576
+ if (typeof ds.currentIndexedData !== 'undefined') {
79577
+ ds.currentIndexedData = Array.from({ length: sourceLength }, (_, i) => i);
79578
+ }
79579
+ ds.lastSortStates = [];
79580
+ ds.updatePagination?.(ds.pagination);
79136
79581
  this.internalProps.layoutMap.clearCellRangeMap();
79137
79582
  this.internalProps.useOneRowHeightFillAll = false;
79138
79583
  this.scenegraph.sortCell();
79139
79584
  }
79140
79585
  }
79141
- if (sortState.length) {
79142
- this.stateManager.updateSortState(sortState);
79143
- }
79586
+ this.stateManager.updateSortState(normalizedSortState);
79144
79587
  }
79145
79588
  updateFilterRules(filterRules, options = { clearRowHeightCache: true }) {
79146
79589
  this.scenegraph.clearCells();
79147
- this.dataSource.clearForceVisibleRecords?.();
79590
+ if (options?.clearForceVisibleRecords !== false) {
79591
+ this.dataSource.clearForceVisibleRecords?.();
79592
+ }
79148
79593
  if (this.sortState) {
79149
79594
  this.dataSource.updateFilterRulesForSorted(filterRules);
79150
79595
  sortRecords(this);
@@ -79548,9 +79993,70 @@
79548
79993
  this.resize();
79549
79994
  }
79550
79995
  addRecord(record, recordIndex, triggerEvent = true) {
79996
+ if (Array.isArray(this.options.customMergeCell) && typeof recordIndex === 'number') {
79997
+ const axis = this.transpose ? 'col' : 'row';
79998
+ const headerCount = this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount;
79999
+ const topAggregationCount = this.internalProps.layoutMap.hasAggregationOnTopCount;
80000
+ let insertIndex = recordIndex;
80001
+ if (insertIndex === undefined || insertIndex > this.dataSource.sourceLength) {
80002
+ insertIndex = this.dataSource.sourceLength;
80003
+ }
80004
+ else if (insertIndex < 0) {
80005
+ insertIndex = 0;
80006
+ }
80007
+ const insertIndexNum = insertIndex + headerCount + topAggregationCount;
80008
+ const merges = this.options.customMergeCell.map(m => ({
80009
+ ...m,
80010
+ range: { start: { ...m.range.start }, end: { ...m.range.end } }
80011
+ }));
80012
+ for (let i = 0; i < merges.length; i++) {
80013
+ const r = merges[i]?.range;
80014
+ if (!r?.start || !r?.end) {
80015
+ continue;
80016
+ }
80017
+ const start = r.start[axis];
80018
+ const end = r.end[axis];
80019
+ if (end < insertIndexNum) {
80020
+ continue;
80021
+ }
80022
+ if (start > insertIndexNum) {
80023
+ r.start[axis] = start + 1;
80024
+ r.end[axis] = end + 1;
80025
+ }
80026
+ else {
80027
+ r.end[axis] = end + 1;
80028
+ }
80029
+ }
80030
+ this.options.customMergeCell = merges.filter((m) => {
80031
+ const r = m?.range;
80032
+ if (!r?.start || !r?.end) {
80033
+ return false;
80034
+ }
80035
+ if (r.end.row < r.start.row || r.end.col < r.start.col) {
80036
+ return false;
80037
+ }
80038
+ return !(r.start.row === r.end.row && r.start.col === r.end.col);
80039
+ });
80040
+ this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
80041
+ }
79551
80042
  const success = listTableAddRecord(record, recordIndex, this);
79552
80043
  adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]);
79553
80044
  this.internalProps.emptyTip?.resetVisible();
80045
+ if (success && Array.isArray(this.options.customMergeCell)) {
80046
+ this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
80047
+ this.options.customMergeCell.forEach(m => {
80048
+ const r = m?.range;
80049
+ if (!r?.start) {
80050
+ return;
80051
+ }
80052
+ for (let col = r.start.col; col <= r.end.col; col++) {
80053
+ for (let row = r.start.row; row <= r.end.row; row++) {
80054
+ this.scenegraph.updateCellContent(col, row);
80055
+ }
80056
+ }
80057
+ });
80058
+ this.scenegraph.updateNextFrame();
80059
+ }
79554
80060
  if (triggerEvent && success) {
79555
80061
  this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
79556
80062
  records: [record],
@@ -79560,11 +80066,73 @@
79560
80066
  }
79561
80067
  }
79562
80068
  addRecords(records, recordIndex, triggerEvent = true) {
80069
+ if (Array.isArray(this.options.customMergeCell) && typeof recordIndex === 'number' && records?.length) {
80070
+ const axis = this.transpose ? 'col' : 'row';
80071
+ const headerCount = this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount;
80072
+ const topAggregationCount = this.internalProps.layoutMap.hasAggregationOnTopCount;
80073
+ let insertIndex = recordIndex;
80074
+ if (insertIndex === undefined || insertIndex > this.dataSource.sourceLength) {
80075
+ insertIndex = this.dataSource.sourceLength;
80076
+ }
80077
+ else if (insertIndex < 0) {
80078
+ insertIndex = 0;
80079
+ }
80080
+ const insertIndexNum = insertIndex + headerCount + topAggregationCount;
80081
+ const toAddCount = records.length;
80082
+ const merges = this.options.customMergeCell.map(m => ({
80083
+ ...m,
80084
+ range: { start: { ...m.range.start }, end: { ...m.range.end } }
80085
+ }));
80086
+ for (let i = 0; i < merges.length; i++) {
80087
+ const r = merges[i]?.range;
80088
+ if (!r?.start || !r?.end) {
80089
+ continue;
80090
+ }
80091
+ const start = r.start[axis];
80092
+ const end = r.end[axis];
80093
+ if (end < insertIndexNum) {
80094
+ continue;
80095
+ }
80096
+ if (start > insertIndexNum) {
80097
+ r.start[axis] = start + toAddCount;
80098
+ r.end[axis] = end + toAddCount;
80099
+ }
80100
+ else {
80101
+ r.end[axis] = end + toAddCount;
80102
+ }
80103
+ }
80104
+ this.options.customMergeCell = merges.filter((m) => {
80105
+ const r = m?.range;
80106
+ if (!r?.start || !r?.end) {
80107
+ return false;
80108
+ }
80109
+ if (r.end.row < r.start.row || r.end.col < r.start.col) {
80110
+ return false;
80111
+ }
80112
+ return !(r.start.row === r.end.row && r.start.col === r.end.col);
80113
+ });
80114
+ this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
80115
+ }
79563
80116
  const success = listTableAddRecords(records, recordIndex, this);
79564
80117
  if (typeof recordIndex === 'number') {
79565
80118
  adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, records);
79566
80119
  }
79567
80120
  this.internalProps.emptyTip?.resetVisible();
80121
+ if (success && Array.isArray(this.options.customMergeCell)) {
80122
+ this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
80123
+ this.options.customMergeCell.forEach(m => {
80124
+ const r = m?.range;
80125
+ if (!r?.start) {
80126
+ return;
80127
+ }
80128
+ for (let col = r.start.col; col <= r.end.col; col++) {
80129
+ for (let row = r.start.row; row <= r.end.row; row++) {
80130
+ this.scenegraph.updateCellContent(col, row);
80131
+ }
80132
+ }
80133
+ });
80134
+ this.scenegraph.updateNextFrame();
80135
+ }
79568
80136
  if (triggerEvent && success) {
79569
80137
  this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
79570
80138
  records,
@@ -79574,6 +80142,15 @@
79574
80142
  }
79575
80143
  }
79576
80144
  deleteRecords(recordIndexs, triggerEvent = true) {
80145
+ const prevMergeRanges = Array.isArray(this.options.customMergeCell)
80146
+ ? this.options.customMergeCell
80147
+ .map(m => m?.range)
80148
+ .filter(Boolean)
80149
+ .map((r) => ({
80150
+ start: { ...r.start },
80151
+ end: { ...r.end }
80152
+ }))
80153
+ : [];
79577
80154
  const deletedRecords = [];
79578
80155
  if (recordIndexs?.length > 0) {
79579
80156
  recordIndexs.forEach(index => {
@@ -79587,6 +80164,47 @@
79587
80164
  deletedRecords.push(record);
79588
80165
  });
79589
80166
  }
80167
+ if (Array.isArray(this.options.customMergeCell) && recordIndexs?.length && typeof recordIndexs[0] === 'number') {
80168
+ const axis = this.transpose ? 'col' : 'row';
80169
+ const headerCount = this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount;
80170
+ const topAggregationCount = this.internalProps.layoutMap.hasAggregationOnTopCount;
80171
+ const deleteIndexNums = recordIndexs
80172
+ .slice()
80173
+ .sort((a, b) => a - b)
80174
+ .map((index, i) => index + headerCount + topAggregationCount - i);
80175
+ const merges = this.options.customMergeCell;
80176
+ for (let i = 0; i < deleteIndexNums.length; i++) {
80177
+ const deleteIndex = deleteIndexNums[i];
80178
+ for (let j = 0; j < merges.length; j++) {
80179
+ const r = merges[j]?.range;
80180
+ if (!r?.start || !r?.end) {
80181
+ continue;
80182
+ }
80183
+ const start = r.start[axis];
80184
+ const end = r.end[axis];
80185
+ if (end < deleteIndex) {
80186
+ continue;
80187
+ }
80188
+ if (start > deleteIndex) {
80189
+ r.start[axis] = start - 1;
80190
+ r.end[axis] = end - 1;
80191
+ }
80192
+ else {
80193
+ r.end[axis] = end - 1;
80194
+ }
80195
+ }
80196
+ }
80197
+ this.options.customMergeCell = merges.filter((m) => {
80198
+ const r = m?.range;
80199
+ if (!r?.start || !r?.end) {
80200
+ return false;
80201
+ }
80202
+ if (r.end.row < r.start.row || r.end.col < r.start.col) {
80203
+ return false;
80204
+ }
80205
+ return !(r.start.row === r.end.row && r.start.col === r.end.col);
80206
+ });
80207
+ }
79590
80208
  listTableDeleteRecords(recordIndexs, this);
79591
80209
  adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs);
79592
80210
  this.internalProps.emptyTip?.resetVisible();
@@ -79604,6 +80222,46 @@
79604
80222
  : recordIndexs.length
79605
80223
  });
79606
80224
  }
80225
+ if (Array.isArray(this.options.customMergeCell)) {
80226
+ this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
80227
+ this.options.customMergeCell.forEach(m => {
80228
+ const r = m?.range;
80229
+ if (!r?.start) {
80230
+ return;
80231
+ }
80232
+ for (let col = r.start.col; col <= r.end.col; col++) {
80233
+ for (let row = r.start.row; row <= r.end.row; row++) {
80234
+ this.scenegraph.updateCellContent(col, row);
80235
+ }
80236
+ }
80237
+ });
80238
+ this.scenegraph.updateNextFrame();
80239
+ setTimeout(() => {
80240
+ if (!this.internalProps || !this.options || !this.scenegraph) {
80241
+ return;
80242
+ }
80243
+ if (Array.isArray(this.options.customMergeCell)) {
80244
+ this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
80245
+ }
80246
+ const refreshRanges = [
80247
+ ...prevMergeRanges,
80248
+ ...(Array.isArray(this.options.customMergeCell)
80249
+ ? this.options.customMergeCell.map(m => m?.range)
80250
+ : [])
80251
+ ].filter(Boolean);
80252
+ refreshRanges.forEach(r => {
80253
+ if (!r?.start) {
80254
+ return;
80255
+ }
80256
+ for (let col = r.start.col; col <= r.end.col; col++) {
80257
+ for (let row = r.start.row; row <= r.end.row; row++) {
80258
+ this.scenegraph.updateCellContent(col, row);
80259
+ }
80260
+ }
80261
+ });
80262
+ this.scenegraph.updateNextFrame();
80263
+ }, 0);
80264
+ }
79607
80265
  }
79608
80266
  updateRecords(records, recordIndexs, triggerEvent = true) {
79609
80267
  listTableUpdateRecords(records, recordIndexs, this);
@@ -79760,6 +80418,7 @@
79760
80418
  }
79761
80419
  }
79762
80420
  this.scenegraph.updateNextFrame();
80421
+ this.fireListeners(TABLE_EVENT_TYPE.MERGE_CELLS, { startCol, startRow, endCol, endRow });
79763
80422
  }
79764
80423
  unmergeCells(startCol, startRow, endCol, endRow) {
79765
80424
  if (!this.options.customMergeCell) {
@@ -79779,6 +80438,7 @@
79779
80438
  }
79780
80439
  }
79781
80440
  this.scenegraph.updateNextFrame();
80441
+ this.fireListeners(TABLE_EVENT_TYPE.UNMERGE_CELLS, { startCol, startRow, endCol, endRow });
79782
80442
  }
79783
80443
  }
79784
80444
 
@@ -83556,13 +84216,13 @@
83556
84216
  const checkedStroke = getProp('checkedStroke', style, col, row, table);
83557
84217
  const disableCheckedFill = getProp('disableCheckedFill', style, col, row, table);
83558
84218
  const disableCheckedStroke = getProp('disableCheckedStroke', style, col, row, table);
83559
- if (isNumber$2(outerRadius)) {
84219
+ if (isNumber$3(outerRadius)) {
83560
84220
  size = outerRadius * 2;
83561
84221
  }
83562
84222
  else {
83563
84223
  outerRadius = Math.round(size / 2);
83564
84224
  }
83565
- if (!isNumber$2(innerRadius) || innerRadius < 0) {
84225
+ if (!isNumber$3(innerRadius) || innerRadius < 0) {
83566
84226
  innerRadius = Math.round((outerRadius / 7) * 3);
83567
84227
  }
83568
84228
  const value = table.getCellValue(col, row);
@@ -84657,7 +85317,7 @@
84657
85317
  let contentWidth = width;
84658
85318
  let contentHeight = height;
84659
85319
  let _contentOffset = 0;
84660
- if (isNumber$2(table.theme._contentOffset)) {
85320
+ if (isNumber$3(table.theme._contentOffset)) {
84661
85321
  _contentOffset = table.theme._contentOffset;
84662
85322
  }
84663
85323
  const percentCompleteBarGroup = new Group$1({
@@ -85116,10 +85776,10 @@
85116
85776
  max = domainMax + (domainMax - domainMin) * axisOption.expand.max;
85117
85777
  }
85118
85778
  }
85119
- if (isNumber$2(axisOption?.min)) {
85779
+ if (isNumber$3(axisOption?.min)) {
85120
85780
  min = axisOption.min;
85121
85781
  }
85122
- if (isNumber$2(axisOption?.max)) {
85782
+ if (isNumber$3(axisOption?.max)) {
85123
85783
  max = axisOption.max;
85124
85784
  }
85125
85785
  let scale;
@@ -85167,7 +85827,7 @@
85167
85827
  scaleTicks = scale.forceTicks(target?.targetTicks?.length ?? axisOption?.tick?.forceTickCount);
85168
85828
  }
85169
85829
  else {
85170
- scaleTicks = scale.ticks(isNumber$2(axisOption?.tick?.tickCount) ? axisOption.tick.tickCount : DEFAULT_CONTINUOUS_TICK_COUNT, {
85830
+ scaleTicks = scale.ticks(isNumber$3(axisOption?.tick?.tickCount) ? axisOption.tick.tickCount : DEFAULT_CONTINUOUS_TICK_COUNT, {
85171
85831
  noDecimals: axisOption?.tick?.noDecimals
85172
85832
  });
85173
85833
  }
@@ -92068,10 +92728,11 @@
92068
92728
  }
92069
92729
  this.dataset.updateSortRules(sortRules);
92070
92730
  this._changePivotSortStateBySortRules();
92731
+ this._filterHideIndicatorNode();
92071
92732
  const { layoutMap } = this.internalProps;
92072
92733
  layoutMap.resetHeaderTree();
92073
92734
  this.scenegraph.clearCells();
92074
- if (isNumber$2(col) && isNumber$2(row)) {
92735
+ if (isNumber$3(col) && isNumber$3(row)) {
92075
92736
  if (this.isRowHeader(col, row)) {
92076
92737
  this.setMinMaxLimitWidth(true);
92077
92738
  this.internalProps._widthResizedColMap.clear();
@@ -92134,6 +92795,15 @@
92134
92795
  });
92135
92796
  }
92136
92797
  }
92798
+ _filterHideIndicatorNode() {
92799
+ const options = this.options;
92800
+ if (options.indicatorsAsCol !== false && options.indicators && this.dataset.colHeaderTree) {
92801
+ deleteHideIndicatorNode(this.dataset.colHeaderTree, options.indicators, false, this);
92802
+ }
92803
+ if (options.indicatorsAsCol === false && this.dataset.rowHeaderTree && options.indicators) {
92804
+ deleteHideIndicatorNode(this.dataset.rowHeaderTree, options.indicators, false, this);
92805
+ }
92806
+ }
92137
92807
  updatePivotSortState(pivotSortStateConfig) {
92138
92808
  this.pivotSortState = pivotSortStateConfig;
92139
92809
  }
@@ -92877,6 +93547,7 @@
92877
93547
  this.internalProps.dataConfig.filterRules = filterRules;
92878
93548
  if (isResetTree) {
92879
93549
  this.dataset.updateFilterRules(filterRules, true);
93550
+ this._filterHideIndicatorNode();
92880
93551
  this.internalProps.layoutMap.resetHeaderTree();
92881
93552
  }
92882
93553
  else {
@@ -93898,7 +94569,7 @@
93898
94569
  this.render();
93899
94570
  }
93900
94571
  clearChartCacheImage(col, row) {
93901
- if (isNumber$2(col) && isNumber$2(row)) {
94572
+ if (isNumber$3(col) && isNumber$3(row)) {
93902
94573
  clearCellChartCacheImage(col, row, this.scenegraph);
93903
94574
  }
93904
94575
  else {
@@ -94820,7 +95491,7 @@
94820
95491
  }
94821
95492
 
94822
95493
  registerForVrender();
94823
- const version = "1.23.3";
95494
+ const version = "1.24.0";
94824
95495
  function getIcons() {
94825
95496
  return get$2();
94826
95497
  }
@@ -94833,6 +95504,7 @@
94833
95504
  exports.CustomLayout = index;
94834
95505
  exports.DataStatistics = DataStatistics;
94835
95506
  exports.EventTarget = EventTarget$1;
95507
+ exports.Group = Group$2;
94836
95508
  exports.Icon = Icon$1;
94837
95509
  exports.ListTable = ListTableAll;
94838
95510
  exports.ListTableSimple = ListTableSimple;
@@ -94866,6 +95538,8 @@
94866
95538
  exports.getTargetCell = getTargetCell;
94867
95539
  exports.graphicUtil = graphicUtil;
94868
95540
  exports.jsx = jsx;
95541
+ exports.mapToCanvasPointForCanvas = mapToCanvasPointForCanvas;
95542
+ exports.matrixAllocate = matrixAllocate;
94869
95543
  exports.pluginsDefinition = index$1;
94870
95544
  exports.register = register$1;
94871
95545
  exports.registerAnimation = registerAnimation;
@@ -94874,6 +95548,7 @@
94874
95548
  exports.registerChartCell = registerChartCell;
94875
95549
  exports.registerCheckboxCell = registerCheckboxCell;
94876
95550
  exports.registerEmptyTip = registerEmptyTip;
95551
+ exports.registerGlobalEventTransformer = registerGlobalEventTransformer;
94877
95552
  exports.registerImageCell = registerImageCell;
94878
95553
  exports.registerLegend = registerLegend;
94879
95554
  exports.registerMenu = registerMenu;
@@ -94885,13 +95560,16 @@
94885
95560
  exports.registerTitle = registerTitle;
94886
95561
  exports.registerTooltip = registerTooltip;
94887
95562
  exports.registerVideoCell = registerVideoCell;
95563
+ exports.registerWindowEventTransformer = registerWindowEventTransformer;
94888
95564
  exports.renderChart = renderChart;
94889
95565
  exports.restoreMeasureText = restoreMeasureText;
94890
95566
  exports.setCustomAlphabetCharSet = setCustomAlphabetCharSet;
94891
95567
  exports.textMeasure = textMeasure;
94892
95568
  exports.themes = themes$1;
94893
95569
  exports.toBoxArray = toBoxArray$1;
95570
+ exports.transformPointForCanvas = transformPointForCanvas;
94894
95571
  exports.updateCell = updateCell$1;
94895
95572
  exports.version = version;
95573
+ exports.vglobal = vglobal;
94896
95574
 
94897
95575
  }));