@visactor/vtable 0.17.5-alpha.2 → 0.17.6

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 (73) hide show
  1. package/cjs/ListTable.js +8 -6
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/core/BaseTable.js +1 -1
  4. package/cjs/core/BaseTable.js.map +1 -1
  5. package/cjs/edit/edit-manager.js +6 -4
  6. package/cjs/edit/edit-manager.js.map +1 -1
  7. package/cjs/index.d.ts +1 -1
  8. package/cjs/index.js +1 -1
  9. package/cjs/index.js.map +1 -1
  10. package/cjs/layout/simple-header-layout.d.ts +1 -0
  11. package/cjs/layout/simple-header-layout.js +4 -0
  12. package/cjs/layout/simple-header-layout.js.map +1 -1
  13. package/cjs/scenegraph/component/custom.js +3 -3
  14. package/cjs/scenegraph/component/custom.js.map +1 -1
  15. package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +15 -0
  16. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +58 -3
  17. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  18. package/cjs/scenegraph/graphic/contributions/index.js +5 -1
  19. package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
  20. package/cjs/scenegraph/graphic/group.js +3 -1
  21. package/cjs/scenegraph/graphic/group.js.map +1 -1
  22. package/cjs/scenegraph/group-creater/cell-helper.js +2 -1
  23. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  24. package/cjs/scenegraph/group-creater/init-scenegraph.js +11 -11
  25. package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  26. package/cjs/scenegraph/group-creater/progress/proxy.js +4 -4
  27. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  28. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +1 -1
  29. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  30. package/cjs/themes/BRIGHT.js +1 -2
  31. package/cjs/themes/DARK.js +2 -1
  32. package/cjs/ts-types/list-table/define/basic-define.d.ts +3 -0
  33. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  34. package/cjs/ts-types/table-engine.d.ts +3 -0
  35. package/cjs/ts-types/table-engine.js.map +1 -1
  36. package/dist/vtable.js +405 -218
  37. package/dist/vtable.min.js +2 -2
  38. package/es/ListTable.js +8 -6
  39. package/es/ListTable.js.map +1 -1
  40. package/es/core/BaseTable.js +1 -1
  41. package/es/core/BaseTable.js.map +1 -1
  42. package/es/edit/edit-manager.js +6 -4
  43. package/es/edit/edit-manager.js.map +1 -1
  44. package/es/index.d.ts +1 -1
  45. package/es/index.js +1 -1
  46. package/es/index.js.map +1 -1
  47. package/es/layout/simple-header-layout.d.ts +1 -0
  48. package/es/layout/simple-header-layout.js +4 -0
  49. package/es/layout/simple-header-layout.js.map +1 -1
  50. package/es/scenegraph/component/custom.js +3 -3
  51. package/es/scenegraph/component/custom.js.map +1 -1
  52. package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +15 -0
  53. package/es/scenegraph/graphic/contributions/group-contribution-render.js +55 -0
  54. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  55. package/es/scenegraph/graphic/contributions/index.js +4 -2
  56. package/es/scenegraph/graphic/contributions/index.js.map +1 -1
  57. package/es/scenegraph/graphic/group.js +3 -1
  58. package/es/scenegraph/graphic/group.js.map +1 -1
  59. package/es/scenegraph/group-creater/cell-helper.js +1 -1
  60. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  61. package/es/scenegraph/group-creater/init-scenegraph.js +11 -11
  62. package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  63. package/es/scenegraph/group-creater/progress/proxy.js +4 -4
  64. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  65. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +1 -1
  66. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  67. package/es/themes/BRIGHT.js +1 -2
  68. package/es/themes/DARK.js +2 -1
  69. package/es/ts-types/list-table/define/basic-define.d.ts +3 -0
  70. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  71. package/es/ts-types/table-engine.d.ts +3 -0
  72. package/es/ts-types/table-engine.js.map +1 -1
  73. package/package.json +7 -7
package/dist/vtable.js CHANGED
@@ -2115,6 +2115,54 @@
2115
2115
  out.a = scaleX * a1, out.b = scaleX * b1, out.c = scaleY * c1, out.d = scaleY * d1, out.e = oe + oa * rotateCenterX + oc * rotateCenterY - a1 * offsetX - c1 * offsetY, out.f = of + ob * rotateCenterX + od * rotateCenterY - b1 * offsetX - d1 * offsetY;
2116
2116
  }
2117
2117
 
2118
+ class LRU {
2119
+ constructor() {
2120
+ this.CLEAN_THRESHOLD = 1e3, this.L_TIME = 1e3, this.R_COUNT = 1, this.R_TIMESTAMP_MAX_SIZE = 20;
2121
+ }
2122
+ clearCache(cache, params) {
2123
+ const {
2124
+ CLEAN_THRESHOLD = this.CLEAN_THRESHOLD,
2125
+ L_TIME = this.L_TIME,
2126
+ R_COUNT = this.R_COUNT
2127
+ } = params;
2128
+ if (cache.size < CLEAN_THRESHOLD) return 0;
2129
+ let clearNum = 0;
2130
+ const clear = key => {
2131
+ clearNum++, cache.delete(key);
2132
+ },
2133
+ now = Date.now();
2134
+ return cache.forEach((item, key) => {
2135
+ if (item.timestamp.length < R_COUNT) return clear(key);
2136
+ let useCount = 0;
2137
+ for (; now - item.timestamp[item.timestamp.length - 1 - useCount] < L_TIME && (useCount++, !(useCount >= R_COUNT)););
2138
+ if (useCount < R_COUNT) return clear(key);
2139
+ for (; now - item.timestamp[0] > L_TIME;) item.timestamp.shift();
2140
+ }), clearNum;
2141
+ }
2142
+ addLimitedTimestamp(cacheItem, t, params) {
2143
+ const {
2144
+ R_TIMESTAMP_MAX_SIZE = this.R_TIMESTAMP_MAX_SIZE
2145
+ } = params;
2146
+ cacheItem.timestamp.length > R_TIMESTAMP_MAX_SIZE && cacheItem.timestamp.shift(), cacheItem.timestamp.push(t);
2147
+ }
2148
+ clearTimeStamp(cache, params) {
2149
+ const {
2150
+ L_TIME = this.L_TIME
2151
+ } = params,
2152
+ now = Date.now();
2153
+ cache.forEach(item => {
2154
+ for (; now - item.timestamp[0] > L_TIME;) item.timestamp.shift();
2155
+ });
2156
+ }
2157
+ clearItemTimestamp(cacheItem, params) {
2158
+ const {
2159
+ L_TIME = this.L_TIME
2160
+ } = params,
2161
+ now = Date.now();
2162
+ for (; now - cacheItem.timestamp[0] > L_TIME;) cacheItem.timestamp.shift();
2163
+ }
2164
+ }
2165
+
2118
2166
  function hslToRgb$1(h, s, l) {
2119
2167
  s /= 100, l /= 100;
2120
2168
  const c = (1 - Math.abs(2 * l - 1)) * s,
@@ -3430,6 +3478,10 @@
3430
3478
  let defined0 = !1;
3431
3479
  for (let i = 0, n = points.length; i <= n; i++) i >= n === defined0 && ((defined0 = !defined0) ? path.lineStart() : path.lineEnd()), defined0 && path.point(points[i]);
3432
3480
  }
3481
+ function genSegContext(curveType, direction, points) {
3482
+ const curveDirection = null != direction ? direction : abs$1(points[points.length - 1].x - points[0].x) > abs$1(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN;
3483
+ return "monotoneY" === curveType ? new ReflectSegContext$1(curveType, curveDirection) : new SegContext$1(curveType, curveDirection);
3484
+ }
3433
3485
 
3434
3486
  let Linear$1 = class Linear {
3435
3487
  constructor(context, startPoint) {
@@ -3472,7 +3524,7 @@
3472
3524
  startPoint: startPoint
3473
3525
  } = params;
3474
3526
  if (points.length < 2 - Number(!!startPoint)) return null;
3475
- const segContext = new SegContext$1("linear", null != direction ? direction : abs$1(points[points.length - 1].x - points[0].x) > abs$1(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
3527
+ const segContext = genSegContext("linear", direction, points);
3476
3528
  return genLinearTypeSegments$1(new Linear$1(segContext, startPoint), points), segContext;
3477
3529
  }
3478
3530
  function genLinearTypeSegments$1(path, points) {
@@ -3529,7 +3581,7 @@
3529
3581
  } = params;
3530
3582
  if (points.length < 2 - Number(!!startPoint)) return null;
3531
3583
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments$1(points, params);
3532
- const segContext = new SegContext$1("basis", null != direction ? direction : abs$1(points[points.length - 1].x - points[0].x) > abs$1(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
3584
+ const segContext = genSegContext("basis", direction, points);
3533
3585
  return genBasisTypeSegments$1(new Basis$1(segContext, startPoint), points), segContext;
3534
3586
  }
3535
3587
 
@@ -3614,7 +3666,7 @@
3614
3666
  });
3615
3667
  }
3616
3668
  };
3617
- function genMonotpneXTypeSegments$1(path, points) {
3669
+ function genMonotoneXTypeSegments(path, points) {
3618
3670
  return genCurveSegments$1(path, points);
3619
3671
  }
3620
3672
  function genMonotoneXSegments$1(points) {
@@ -3625,10 +3677,10 @@
3625
3677
  } = params;
3626
3678
  if (points.length < 2 - Number(!!startPoint)) return null;
3627
3679
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments$1(points, params);
3628
- const segContext = new SegContext$1("monotoneX", null != direction ? direction : abs$1(points[points.length - 1].x - points[0].x) > abs$1(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
3629
- return genMonotpneXTypeSegments$1(new MonotoneX$1(segContext, startPoint), points), segContext;
3680
+ const segContext = genSegContext("monotoneX", direction, points);
3681
+ return genMonotoneXTypeSegments(new MonotoneX$1(segContext, startPoint), points), segContext;
3630
3682
  }
3631
- function genMonotpneYTypeSegments$1(path, points) {
3683
+ function genMonotoneYTypeSegments(path, points) {
3632
3684
  return genCurveSegments$1(path, points);
3633
3685
  }
3634
3686
  function genMonotoneYSegments$1(points) {
@@ -3639,8 +3691,8 @@
3639
3691
  } = params;
3640
3692
  if (points.length < 2 - Number(!!startPoint)) return null;
3641
3693
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments$1(points, params);
3642
- const segContext = new ReflectSegContext$1("monotoneY", null != direction ? direction : abs$1(points[points.length - 1].x - points[0].x) > abs$1(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
3643
- return genMonotpneYTypeSegments$1(new MonotoneY$1(segContext, startPoint), points), segContext;
3694
+ const segContext = genSegContext("monotoneY", direction, points);
3695
+ return genMonotoneYTypeSegments(new MonotoneY$1(segContext, startPoint), points), segContext;
3644
3696
  }
3645
3697
 
3646
3698
  let Step$3 = class Step {
@@ -3696,39 +3748,10 @@
3696
3748
  return genCurveSegments$1(path, points);
3697
3749
  }
3698
3750
 
3699
- let LinearClosed$1 = class LinearClosed {
3700
- constructor(context, startPoint) {
3701
- this.context = context, startPoint && (this.startPoint = startPoint);
3702
- }
3703
- areaStart() {
3704
- this._line = 0;
3705
- }
3706
- areaEnd() {
3707
- this._line = NaN;
3708
- }
3709
- lineStart() {
3710
- this._point = 0, this.startPoint && this.point(this.startPoint);
3711
- }
3751
+ let LinearClosed$1 = class LinearClosed extends Linear$1 {
3712
3752
  lineEnd() {
3713
3753
  this.context.closePath();
3714
3754
  }
3715
- point(p) {
3716
- const x = p.x,
3717
- y = p.y;
3718
- switch (this._point) {
3719
- case 0:
3720
- this._point = 1, this._line ? this.context.lineTo(x, y, !1 !== this._lastDefined && !1 !== p.defined, p) : this.context.moveTo(x, y, p);
3721
- break;
3722
- case 1:
3723
- this._point = 2;
3724
- default:
3725
- this.context.lineTo(x, y, !1 !== this._lastDefined && !1 !== p.defined, p);
3726
- }
3727
- this._lastDefined = p.defined;
3728
- }
3729
- tryUpdateLength() {
3730
- return this.context.tryUpdateLength();
3731
- }
3732
3755
  };
3733
3756
  function genLinearClosedSegments$1(points) {
3734
3757
  let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -3737,7 +3760,7 @@
3737
3760
  startPoint: startPoint
3738
3761
  } = params;
3739
3762
  if (points.length < 2 - Number(!!startPoint)) return null;
3740
- const segContext = new SegContext$1("linear", null != direction ? direction : abs$1(points[points.length - 1].x - points[0].x) > abs$1(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
3763
+ const segContext = genSegContext("linear", direction, points);
3741
3764
  return genLinearClosedTypeSegments$1(new LinearClosed$1(segContext, startPoint), points), segContext;
3742
3765
  }
3743
3766
  function genLinearClosedTypeSegments$1(path, points) {
@@ -4146,6 +4169,8 @@
4146
4169
  strokeSeg: null,
4147
4170
  pickable: !0,
4148
4171
  childrenPickable: !0,
4172
+ fillPickable: !0,
4173
+ strokePickable: !0,
4149
4174
  visible: !0,
4150
4175
  zIndex: 0,
4151
4176
  layout: null,
@@ -8535,10 +8560,17 @@
8535
8560
  return ConicalCanvas.ctx;
8536
8561
  }
8537
8562
  }
8538
- class ColorInterpolate {
8563
+ class ColorInterpolate extends LRU {
8564
+ static getInstance() {
8565
+ return ColorInterpolate._instance || (ColorInterpolate._instance = new ColorInterpolate()), ColorInterpolate._instance;
8566
+ }
8539
8567
  constructor() {
8540
8568
  let stops = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
8541
8569
  let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
8570
+ super(), this.cacheParams = {
8571
+ CLEAN_THRESHOLD: 100,
8572
+ L_TIME: 1e3
8573
+ }, this.dataMap = new Map();
8542
8574
  const canvas = ConicalCanvas.GetCanvas(),
8543
8575
  conicalCtx = ConicalCanvas.GetCtx();
8544
8576
  if (canvas.width = precision, canvas.height = 1, !conicalCtx) return;
@@ -8552,22 +8584,21 @@
8552
8584
  const rgba = this.rgbaSet.slice(4 * offset, 4 * offset + 4);
8553
8585
  return `rgba(${rgba[0]}, ${rgba[1]}, ${rgba[2]}, ${rgba[3] / 255})`;
8554
8586
  }
8555
- static GetOrCreate() {
8556
- let stops = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
8557
- let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
8558
- let str = "";
8587
+ GetOrCreate(x, y, w, h) {
8588
+ let stops = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
8589
+ let precision = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 100;
8590
+ let str = `${x}${y}${w}${h}`;
8559
8591
  stops.forEach(item => str += item.join()), str += precision;
8560
- let colorInter = ColorInterpolate.dataMap.get(str);
8561
- return colorInter || (colorInter = new ColorInterpolate(stops, precision), ColorInterpolate.dataMap.set(str, colorInter)), colorInter;
8562
- }
8563
- static SetColorInterpolateInstance(stops, ins) {
8564
- ColorInterpolate.dataMap.set(stops, ins);
8565
- }
8566
- static GetColorInterpolateInstance(stops) {
8567
- return ColorInterpolate.dataMap.get(stops);
8592
+ let colorInter = this.dataMap.get(str);
8593
+ if (!colorInter) {
8594
+ colorInter = {
8595
+ data: new ColorInterpolate(stops, precision),
8596
+ timestamp: []
8597
+ }, this.addLimitedTimestamp(colorInter, Date.now(), {}), this.dataMap.set(str, colorInter);
8598
+ }
8599
+ return this.clearCache(this.dataMap, this.cacheParams), colorInter.data;
8568
8600
  }
8569
8601
  }
8570
- ColorInterpolate.dataMap = new Map();
8571
8602
  class ConicalPatternStore {
8572
8603
  static GetSize(minSize) {
8573
8604
  for (let i = 0; i < ConicalPatternStore.ImageSize.length; i++) if (ConicalPatternStore.ImageSize[i] >= minSize) return ConicalPatternStore.ImageSize[i];
@@ -8628,7 +8659,7 @@
8628
8659
  const r = Math.sqrt(Math.max(Math.max(Math.pow(x, 2) + Math.pow(y, 2), Math.pow(width - x, 2) + Math.pow(y, 2)), Math.max(Math.pow(width - x, 2) + Math.pow(height - y, 2), Math.pow(x, 2) + Math.pow(height - y, 2)))),
8629
8660
  stepNum = deltaDeg + 1,
8630
8661
  step = deltaAngle / Math.max(1, stepNum - 1),
8631
- colorInter = ColorInterpolate.GetOrCreate(stops, stepNum),
8662
+ colorInter = ColorInterpolate.getInstance().GetOrCreate(x, y, width, height, stops, stepNum),
8632
8663
  lineWidth = 2 * Math.PI * r / 360;
8633
8664
  conicalCanvas.width = width, conicalCanvas.height = height, conicalCtx.setTransform(1, 0, 0, 1, 0, 0), conicalCtx.clearRect(0, 0, width, height), conicalCtx.translate(x, y), conicalCtx.rotate(startAngle);
8634
8665
  for (let i = 0, len = stepNum - 1; i < len && !(startAngle + i * step > endAngle); i++) {
@@ -12488,6 +12519,7 @@
12488
12519
  }
12489
12520
  };
12490
12521
  DefaultBaseInteractiveRenderContribution$1 = __decorate$23([injectable$1(), __param$11(0, inject$1(ContributionProvider$1)), __param$11(0, named$1(InteractiveSubRenderContribution$1)), __metadata$1h("design:paramtypes", [Object])], DefaultBaseInteractiveRenderContribution$1);
12522
+
12491
12523
  let DefaultBaseTextureRenderContribution$1 = class DefaultBaseTextureRenderContribution {
12492
12524
  constructor() {
12493
12525
  this.time = BaseRenderContributionTime$1.afterFillStroke, this.useStyle = !0, this.order = 10;
@@ -12571,7 +12603,9 @@
12571
12603
  textureSize = graphicAttribute.textureSize,
12572
12604
  texturePadding = graphicAttribute.texturePadding
12573
12605
  } = graphic.attribute;
12574
- if (!texture) return;
12606
+ texture && this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
12607
+ }
12608
+ drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding) {
12575
12609
  let pattern = this.textureMap.get(texture);
12576
12610
  if (!pattern) switch (texture) {
12577
12611
  case "circle":
@@ -13011,6 +13045,26 @@
13011
13045
  const defaultSymbolTextureRenderContribution = defaultBaseTextureRenderContribution;
13012
13046
  const defaultSymbolBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
13013
13047
 
13048
+ let DefaultAreaTextureRenderContribution$1 = class DefaultAreaTextureRenderContribution extends DefaultBaseTextureRenderContribution$1 {
13049
+ constructor() {
13050
+ super(...arguments), this.time = BaseRenderContributionTime$1.afterFillStroke;
13051
+ }
13052
+ drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
13053
+ var _a, _b, _c, _d;
13054
+ this.textureMap || this.initTextureMap(context, graphic.stage);
13055
+ const {
13056
+ attribute = graphic.attribute
13057
+ } = options || {},
13058
+ {
13059
+ texture = null !== (_a = graphic.attribute.texture) && void 0 !== _a ? _a : getAttributeFromDefaultAttrList$1(graphicAttribute, "texture"),
13060
+ textureColor = null !== (_b = graphic.attribute.textureColor) && void 0 !== _b ? _b : getAttributeFromDefaultAttrList$1(graphicAttribute, "textureColor"),
13061
+ textureSize = null !== (_c = graphic.attribute.textureSize) && void 0 !== _c ? _c : getAttributeFromDefaultAttrList$1(graphicAttribute, "textureSize"),
13062
+ texturePadding = null !== (_d = graphic.attribute.texturePadding) && void 0 !== _d ? _d : getAttributeFromDefaultAttrList$1(graphicAttribute, "texturePadding")
13063
+ } = attribute;
13064
+ texture && this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
13065
+ }
13066
+ };
13067
+
13014
13068
  var __decorate$21 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13015
13069
  var d,
13016
13070
  c = arguments.length,
@@ -13224,6 +13278,22 @@
13224
13278
  };
13225
13279
  DefaultCanvasCircleRender$1 = __decorate$20([injectable$1(), __param$$(0, inject$1(ContributionProvider$1)), __param$$(0, named$1(CircleRenderContribution$1)), __metadata$1f("design:paramtypes", [Object])], DefaultCanvasCircleRender$1);
13226
13280
 
13281
+ function drawSegItem$2(ctx, curve, endPercent, params) {
13282
+ if (!curve.p1) return;
13283
+ const {
13284
+ offsetX = 0,
13285
+ offsetY = 0,
13286
+ offsetZ = 0
13287
+ } = params || {};
13288
+ if (1 === endPercent) curve.p2 && curve.p3 ? ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ) : ctx.lineTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetZ);else if (curve.p2 && curve.p3) {
13289
+ const [curve1] = divideCubic$1(curve, endPercent);
13290
+ ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
13291
+ } else {
13292
+ const p = curve.getPointAt(endPercent);
13293
+ ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
13294
+ }
13295
+ }
13296
+
13227
13297
  function drawSegments$1(path, segPath, percent, clipRangeByDimension, params) {
13228
13298
  var _a;
13229
13299
  const {
@@ -13266,7 +13336,7 @@
13266
13336
  } else lastCurve = curve;
13267
13337
  });
13268
13338
  } else curves.forEach(curve => {
13269
- curve.defined ? (needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem$3(path, curve, 1, params), needMoveTo = !1) : needMoveTo = !0;
13339
+ curve.defined ? (needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem$2(path, curve, 1, params), needMoveTo = !1) : needMoveTo = !0;
13270
13340
  });
13271
13341
  return;
13272
13342
  }
@@ -13307,7 +13377,7 @@
13307
13377
  needMoveTo = !0;
13308
13378
  continue;
13309
13379
  }
13310
- needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem$3(path, curve, min$1(_p, 1), params), needMoveTo = !1;
13380
+ needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem$2(path, curve, min$1(_p, 1), params), needMoveTo = !1;
13311
13381
  }
13312
13382
  }
13313
13383
  }
@@ -13344,21 +13414,6 @@
13344
13414
  path.lineTo(null !== (_c = startP.x1) && void 0 !== _c ? _c : startP.x, null !== (_d = startP.y1) && void 0 !== _d ? _d : startP.y), path.closePath();
13345
13415
  });
13346
13416
  }
13347
- function drawSegItem$3(ctx, curve, endPercent, params) {
13348
- if (!curve.p1) return;
13349
- const {
13350
- offsetX = 0,
13351
- offsetY = 0,
13352
- offsetZ = 0
13353
- } = params || {};
13354
- if (1 === endPercent) curve.p2 && curve.p3 ? ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ) : ctx.lineTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetZ);else if (curve.p2 && curve.p3) {
13355
- const [curve1] = divideCubic$1(curve, endPercent);
13356
- ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
13357
- } else {
13358
- const p = curve.getPointAt(endPercent);
13359
- ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
13360
- }
13361
- }
13362
13417
 
13363
13418
  var __decorate$1$ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13364
13419
  var d,
@@ -13419,10 +13474,10 @@
13419
13474
  points: points
13420
13475
  } = line.attribute,
13421
13476
  startP = points[0];
13422
- context.moveTo(startP.x, startP.y, z);
13477
+ context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
13423
13478
  for (let i = 1; i < points.length; i++) {
13424
13479
  const p = points[i];
13425
- context.lineTo(p.x, p.y, z);
13480
+ context.lineTo(p.x + offsetX, p.y + offsetY, z);
13426
13481
  }
13427
13482
  context.setShadowBlendStyle && context.setShadowBlendStyle(line, line.attribute, lineAttribute);
13428
13483
  const {
@@ -13642,68 +13697,7 @@
13642
13697
  }
13643
13698
  path.closePath();
13644
13699
  }
13645
- function drawSegItem$2(ctx, curve, endPercent, params) {
13646
- if (!curve.p1) return;
13647
- const {
13648
- offsetX = 0,
13649
- offsetY = 0,
13650
- offsetZ = 0
13651
- } = params || {};
13652
- if (1 === endPercent) curve.p2 && curve.p3 ? ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ) : ctx.lineTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetZ);else if (curve.p2 && curve.p3) {
13653
- const [curve1] = divideCubic$1(curve, endPercent);
13654
- ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
13655
- } else {
13656
- const p = curve.getPointAt(endPercent);
13657
- ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
13658
- }
13659
- }
13660
13700
 
13661
- let DefaultAreaTextureRenderContribution$1 = class DefaultAreaTextureRenderContribution extends DefaultBaseTextureRenderContribution$1 {
13662
- constructor() {
13663
- super(...arguments), this.time = BaseRenderContributionTime$1.afterFillStroke;
13664
- }
13665
- drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
13666
- var _a, _b, _c, _d;
13667
- this.textureMap || this.initTextureMap(context, graphic.stage);
13668
- const {
13669
- attribute = graphic.attribute
13670
- } = options || {},
13671
- {
13672
- texture = null !== (_a = graphic.attribute.texture) && void 0 !== _a ? _a : getAttributeFromDefaultAttrList$1(graphicAttribute, "texture"),
13673
- textureColor = null !== (_b = graphic.attribute.textureColor) && void 0 !== _b ? _b : getAttributeFromDefaultAttrList$1(graphicAttribute, "textureColor"),
13674
- textureSize = null !== (_c = graphic.attribute.textureSize) && void 0 !== _c ? _c : getAttributeFromDefaultAttrList$1(graphicAttribute, "textureSize"),
13675
- texturePadding = null !== (_d = graphic.attribute.texturePadding) && void 0 !== _d ? _d : getAttributeFromDefaultAttrList$1(graphicAttribute, "texturePadding")
13676
- } = attribute;
13677
- if (!texture) return;
13678
- let pattern = this.textureMap.get(texture);
13679
- if (!pattern) switch (texture) {
13680
- case "circle":
13681
- pattern = this.createCirclePattern(textureSize, texturePadding, textureColor, context);
13682
- break;
13683
- case "diamond":
13684
- pattern = this.createDiamondPattern(textureSize, texturePadding, textureColor, context);
13685
- break;
13686
- case "rect":
13687
- pattern = this.createRectPattern(textureSize, texturePadding, textureColor, context);
13688
- break;
13689
- case "vertical-line":
13690
- pattern = this.createVerticalLinePattern(textureSize, texturePadding, textureColor, context);
13691
- break;
13692
- case "horizontal-line":
13693
- pattern = this.createHorizontalLinePattern(textureSize, texturePadding, textureColor, context);
13694
- break;
13695
- case "bias-lr":
13696
- pattern = this.createBiasLRLinePattern(textureSize, texturePadding, textureColor, context);
13697
- break;
13698
- case "bias-rl":
13699
- pattern = this.createBiasRLLinePattern(textureSize, texturePadding, textureColor, context);
13700
- break;
13701
- case "grid":
13702
- pattern = this.createGridPattern(textureSize, texturePadding, textureColor, context);
13703
- }
13704
- pattern && (context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = pattern, context.fill(), context.highPerformanceRestore());
13705
- }
13706
- };
13707
13701
  const defaultAreaTextureRenderContribution = new DefaultAreaTextureRenderContribution$1();
13708
13702
  const defaultAreaBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
13709
13703
 
@@ -13755,39 +13749,43 @@
13755
13749
  points: points
13756
13750
  } = area.attribute,
13757
13751
  startP = points[0];
13758
- context.moveTo(startP.x, startP.y, z);
13752
+ context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
13759
13753
  for (let i = 1; i < points.length; i++) {
13760
13754
  const p = points[i];
13761
- context.lineTo(p.x, p.y, z);
13755
+ context.lineTo(p.x + offsetX, p.y + offsetY, z);
13762
13756
  }
13763
13757
  for (let i = points.length - 1; i >= 0; i--) {
13764
13758
  const p = points[i];
13765
- context.lineTo(null !== (_b = p.x1) && void 0 !== _b ? _b : p.x, null !== (_c = p.y1) && void 0 !== _c ? _c : p.y, z);
13759
+ context.lineTo((null !== (_b = p.x1) && void 0 !== _b ? _b : p.x) + offsetX, (null !== (_c = p.y1) && void 0 !== _c ? _c : p.y) + offsetY, z);
13766
13760
  }
13767
- context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(area, area.attribute, areaAttribute);
13761
+ context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(area, area.attribute, areaAttribute), this.beforeRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, areaAttribute, drawContext, fillCb, null, {
13762
+ attribute: area.attribute
13763
+ });
13768
13764
  const {
13769
13765
  x: originX = 0,
13770
13766
  x: originY = 0
13771
13767
  } = area.attribute;
13772
- if (!1 !== fill && (fillCb ? fillCb(context, area.attribute, areaAttribute) : fillOpacity && (context.setCommonStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.fill())), stroke) {
13768
+ if (!1 !== fill && (fillCb ? fillCb(context, area.attribute, areaAttribute) : fillOpacity && (context.setCommonStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.fill())), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, areaAttribute, drawContext, fillCb, null, {
13769
+ attribute: area.attribute
13770
+ }), stroke) {
13773
13771
  const {
13774
13772
  stroke = areaAttribute && areaAttribute.stroke
13775
13773
  } = area.attribute;
13776
13774
  if (isArray$3(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1]) if (context.beginPath(), stroke[0]) {
13777
- context.moveTo(startP.x, startP.y, z);
13775
+ context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
13778
13776
  for (let i = 1; i < points.length; i++) {
13779
13777
  const p = points[i];
13780
- context.lineTo(p.x, p.y, z);
13778
+ context.lineTo(p.x + offsetX, p.y + offsetY, z);
13781
13779
  }
13782
13780
  } else if (stroke[2]) {
13783
13781
  const endP = points[points.length - 1];
13784
- context.moveTo(endP.x, endP.y, z);
13782
+ context.moveTo(endP.x + offsetX, endP.y + offsetY, z);
13785
13783
  for (let i = points.length - 2; i >= 0; i--) {
13786
13784
  const p = points[i];
13787
- context.lineTo(null !== (_d = p.x1) && void 0 !== _d ? _d : p.x, null !== (_e = p.y1) && void 0 !== _e ? _e : p.y, z);
13785
+ context.lineTo((null !== (_d = p.x1) && void 0 !== _d ? _d : p.x) + offsetX, (null !== (_e = p.y1) && void 0 !== _e ? _e : p.y) + offsetY, z);
13788
13786
  }
13789
13787
  }
13790
- context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke();
13788
+ strokeCb ? strokeCb(context, area.attribute, areaAttribute) : (context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke());
13791
13789
  }
13792
13790
  }
13793
13791
  drawShape(area, context, x, y, drawContext, params, fillCb, strokeCb) {
@@ -16730,7 +16728,7 @@
16730
16728
  return this.removeChild(this.findChildByUid(ILayerId));
16731
16729
  }
16732
16730
  tryInitInteractiveLayer() {
16733
- this.supportInteractiveLayer && !this.interactiveLayer && (this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive", this.nextFrameRenderLayerSet.add(this.interactiveLayer));
16731
+ this.supportInteractiveLayer && !this.interactiveLayer && (this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive", this.interactiveLayer.attribute.pickable = !1, this.nextFrameRenderLayerSet.add(this.interactiveLayer));
16734
16732
  }
16735
16733
  clearViewBox(color) {
16736
16734
  this.window.clearViewBox(this._viewBox, color);
@@ -19923,12 +19921,22 @@
19923
19921
  x = areaAttribute.x,
19924
19922
  y = areaAttribute.y
19925
19923
  } = area.attribute;
19924
+ const {
19925
+ fillPickable = areaAttribute.fillPickable,
19926
+ strokePickable = areaAttribute.strokePickable
19927
+ } = area.attribute;
19926
19928
  if (pickContext.highPerformanceSave(), area.transMatrix.onlyTranslate()) {
19927
19929
  const point = area.getOffsetXY(areaAttribute);
19928
19930
  x += point.x, y += point.y, pickContext.setTransformForCurrent();
19929
19931
  } else x = 0, y = 0, pickContext.transformFromMatrix(area.transMatrix, !0);
19930
19932
  let picked = !1;
19931
- return this.canvasRenderer.drawShape(area, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(point.x, point.y), picked)), pickContext.highPerformanceRestore(), picked;
19933
+ return this.canvasRenderer.drawShape(area, pickContext, x, y, {}, null, context => !!picked || !!fillPickable && (picked = context.isPointInPath(point.x, point.y), picked), (context, areaAttribute, themeAttribute) => {
19934
+ if (picked) return !0;
19935
+ if (!strokePickable) return !1;
19936
+ const lineWidth = areaAttribute.lineWidth || themeAttribute.lineWidth,
19937
+ pickStrokeBuffer = areaAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
19938
+ return pickContext.lineWidth = getScaledStroke$1(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
19939
+ }), pickContext.highPerformanceRestore(), picked;
19932
19940
  }
19933
19941
  };
19934
19942
  DefaultCanvasAreaPicker = __decorate$1h([injectable$1(), __param$F(0, inject$1(AreaRender$1)), __metadata$I("design:paramtypes", [Object])], DefaultCanvasAreaPicker);
@@ -24287,7 +24295,8 @@
24287
24295
  padding = 4,
24288
24296
  visible: visible,
24289
24297
  state: state,
24290
- type: type
24298
+ type: type,
24299
+ textAlwaysCenter: textAlwaysCenter
24291
24300
  } = this.attribute,
24292
24301
  parsedPadding = normalizePadding(padding),
24293
24302
  group = this.createOrUpdateChild("tag-content", {
@@ -24393,7 +24402,10 @@
24393
24402
  (isValid$3(minWidth) || isValid$3(maxWidth)) && (isValid$3(minWidth) && tagWidth < minWidth && (tagWidth = minWidth), isValid$3(maxWidth) && tagWidth > maxWidth && (tagWidth = maxWidth, textShape.setAttribute("maxLineWidth", maxWidth - parsedPadding[1] - parsedPadding[2])));
24394
24403
  let x = 0,
24395
24404
  y = 0;
24396
- "center" === textAlign ? (x -= tagWidth / 2, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth / 2), group.setAttribute("x", -symbolPlaceWidth / 2)) : "right" === textAlign || "end" === textAlign ? (x -= tagWidth, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth), group.setAttribute("x", -parsedPadding[1] - symbolPlaceWidth)) : "left" !== textAlign && "start" !== textAlign || group.setAttribute("x", parsedPadding[3]), "middle" === textBaseline ? (y -= tagHeight / 2, symbol && symbol.setAttribute("y", 0)) : "bottom" === textBaseline ? (y -= tagHeight, symbol && symbol.setAttribute("y", -textHeight / 2), group.setAttribute("y", -parsedPadding[2])) : "top" === textBaseline && (group.setAttribute("y", parsedPadding[0]), symbol && symbol.setAttribute("y", textHeight / 2));
24405
+ "center" === textAlign ? (x -= tagWidth / 2, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth / 2), group.setAttribute("x", -symbolPlaceWidth / 2)) : "right" === textAlign || "end" === textAlign ? (x -= tagWidth, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth), group.setAttribute("x", -parsedPadding[1] - symbolPlaceWidth)) : "left" !== textAlign && "start" !== textAlign || group.setAttribute("x", parsedPadding[3]), !textAlwaysCenter || "left" !== textAlign && "start" !== textAlign || textShape.setAttributes({
24406
+ x: textX + tagWidth / 2,
24407
+ textAlign: "center"
24408
+ }), "middle" === textBaseline ? (y -= tagHeight / 2, symbol && symbol.setAttribute("y", 0)) : "bottom" === textBaseline ? (y -= tagHeight, symbol && symbol.setAttribute("y", -textHeight / 2), group.setAttribute("y", -parsedPadding[2])) : "top" === textBaseline && (group.setAttribute("y", parsedPadding[0]), symbol && symbol.setAttribute("y", textHeight / 2));
24397
24409
  const {
24398
24410
  visible: bgVisible
24399
24411
  } = panel,
@@ -25167,6 +25179,24 @@
25167
25179
  const layerLabelGroup = this.renderLabels(labelGroup, axisItems, layer),
25168
25180
  labels = layerLabelGroup.getChildren();
25169
25181
  this.beforeLabelsOverlap(labels, axisItems, layerLabelGroup, layer, items.length), this.handleLabelsOverlap(labels, axisItems, layerLabelGroup, layer, items.length), this.afterLabelsOverlap(labels, axisItems, layerLabelGroup, layer, items.length);
25182
+ let maxTextWidth = 0,
25183
+ maxTextHeight = 0,
25184
+ textAlign = "center",
25185
+ textBaseline = "middle";
25186
+ labels.forEach(label => {
25187
+ var _a;
25188
+ const labelStyle = label.attribute,
25189
+ angle = null !== (_a = labelStyle.angle) && void 0 !== _a ? _a : 0,
25190
+ textBounds = label.AABBBounds;
25191
+ let textWidth = textBounds.width(),
25192
+ textHeight = textBounds.height();
25193
+ angle && (textWidth = Math.abs(textWidth * Math.cos(angle)), textHeight = Math.abs(textHeight * Math.sin(angle))), maxTextWidth = Math.max(maxTextWidth, textWidth), maxTextHeight = Math.max(maxTextHeight, textHeight), textAlign = labelStyle.textAlign, textBaseline = labelStyle.textBaseline;
25194
+ }), this.axisLabelLayerSize[layer] = {
25195
+ width: maxTextWidth,
25196
+ height: maxTextHeight,
25197
+ textAlign: textAlign,
25198
+ textBaseline: textBaseline
25199
+ };
25170
25200
  });
25171
25201
  }
25172
25202
  title && title.visible && this.renderTitle(axisContainer);
@@ -25218,13 +25248,8 @@
25218
25248
  y: 0,
25219
25249
  pickable: !1
25220
25250
  });
25221
- labelGroup.name = `${AXIS_ELEMENT_NAME.labelContainer}-layer-${layer}`, labelGroup.id = this._getNodeId(`label-container-layer-${layer}`), container.add(labelGroup);
25222
- let maxTextWidth = 0,
25223
- maxTextHeight = 0,
25224
- textAlign = "center",
25225
- textBaseline = "middle";
25226
- return data.forEach((item, index) => {
25227
- var _a, _b, _c, _d;
25251
+ return labelGroup.name = `${AXIS_ELEMENT_NAME.labelContainer}-layer-${layer}`, labelGroup.id = this._getNodeId(`label-container-layer-${layer}`), container.add(labelGroup), data.forEach((item, index) => {
25252
+ var _a, _b, _c;
25228
25253
  const labelStyle = this._getLabelAttribute(item, index, data, layer);
25229
25254
  let text;
25230
25255
  if ("rich" === labelStyle.type ? (labelStyle.textConfig = labelStyle.text, labelStyle.width = null !== (_a = labelStyle.width) && void 0 !== _a ? _a : 0, labelStyle.height = null !== (_b = labelStyle.height) && void 0 !== _b ? _b : 0, text = graphicCreator$1.richtext(labelStyle)) : "html" === labelStyle.type ? (labelStyle.textConfig = [], labelStyle.html = Object.assign(Object.assign({
@@ -25236,14 +25261,7 @@
25236
25261
  }), text.states = labelState;
25237
25262
  }
25238
25263
  labelGroup.add(text);
25239
- const angle = null !== (_d = labelStyle.angle) && void 0 !== _d ? _d : 0;
25240
- maxTextWidth = Math.max(maxTextWidth, text.AABBBounds.width()), maxTextHeight = Math.max(maxTextHeight, text.AABBBounds.height()), angle && (maxTextWidth = Math.abs(maxTextWidth * Math.cos(angle)), maxTextHeight = Math.abs(maxTextHeight * Math.sin(angle))), textAlign = labelStyle.textAlign, textBaseline = labelStyle.textBaseline;
25241
- }), this.axisLabelLayerSize[layer] = {
25242
- width: maxTextWidth,
25243
- height: maxTextHeight,
25244
- textAlign: textAlign,
25245
- textBaseline: textBaseline
25246
- }, labelGroup;
25264
+ }), labelGroup;
25247
25265
  }
25248
25266
  renderTitle(container) {
25249
25267
  const titleAttributes = this.getTitleAttribute(),
@@ -25367,7 +25385,7 @@
25367
25385
  const axisVector = this.getRelativeVector(tickDatum.point);
25368
25386
  layer > 0 && (0 === axisVector[1] ? offset += (this.axisLabelLayerSize[layer - 1].height + get$5(this.attribute, "label.space", 4)) * layer : offset += (this.axisLabelLayerSize[layer - 1].width + get$5(this.attribute, "label.space", 4)) * layer);
25369
25387
  const point = this.getVerticalCoord(tickDatum.point, offset, inside),
25370
- vector = this.getVerticalVector(offset, inside, point),
25388
+ vector = this.getVerticalVector(offset || 1, inside, point),
25371
25389
  textContent = formatMethod ? formatMethod(`${tickDatum.label}`, tickDatum, index, tickData, layer) : tickDatum.label;
25372
25390
  let {
25373
25391
  style: textStyle
@@ -25471,7 +25489,16 @@
25471
25489
  do {
25472
25490
  items = reduce(items, sep);
25473
25491
  } while (items.length >= 3 && hasOverlap$1(items, sep));
25474
- items.length < 3 && !last$1(source).attribute.opacity && items.length > 1 && (last$1(items).setAttribute("opacity", 0), last$1(source).setAttribute("opacity", 1));
25492
+ if (items.length < 3 || config.lastVisible) {
25493
+ const lastSourceItem = last$1(source);
25494
+ if (!lastSourceItem.attribute.opacity) {
25495
+ const remainLength = items.length;
25496
+ if (remainLength > 1) {
25497
+ lastSourceItem.setAttribute("opacity", 1);
25498
+ for (let i = remainLength - 1; i >= 0 && intersect$2(items[i], lastSourceItem, sep); i--) items[i].setAttribute("opacity", 0);
25499
+ }
25500
+ }
25501
+ }
25475
25502
  }
25476
25503
  source.forEach(item => {
25477
25504
  item.setAttribute("visible", !!item.attribute.opacity);
@@ -25549,13 +25576,16 @@
25549
25576
  function autoLimit(labels, config) {
25550
25577
  const {
25551
25578
  limitLength: limitLength,
25579
+ verticalLimitLength: verticalLimitLength,
25552
25580
  ellipsis = "...",
25553
25581
  orient: orient
25554
25582
  } = config;
25555
25583
  !isEmpty(labels) && isValidNumber$1(limitLength) && labels.forEach(label => {
25556
25584
  if (("top" === orient || "bottom" === orient) && Math.floor(label.AABBBounds.height()) <= limitLength) return;
25557
- if (("left" === orient || "right" === orient) && Math.floor(label.AABBBounds.width()) <= limitLength) return;
25558
- let limitLabelLength = 0 === label.attribute.angle || isNil$3(label.attribute.angle) ? "top" === orient || "bottom" === orient ? null : limitLength : Math.abs(limitLength / Math.sin(label.attribute.angle));
25585
+ const direction = label.attribute.direction;
25586
+ if (("left" === orient || "right" === orient) && ("vertical" === direction && Math.floor(label.AABBBounds.height()) <= verticalLimitLength || "vertical" !== direction && Math.floor(label.AABBBounds.width()) <= limitLength)) return;
25587
+ const angle = label.attribute.angle;
25588
+ let limitLabelLength = 0 === angle || isNil$3(angle) ? "top" === orient || "bottom" === orient ? null : "vertical" === direction ? verticalLimitLength : limitLength : Math.abs(limitLength / Math.sin(angle));
25559
25589
  isValidNumber$1(label.attribute.maxLineWidth) && (limitLabelLength = isValidNumber$1(limitLabelLength) ? Math.min(label.attribute.maxLineWidth, limitLabelLength) : label.attribute.maxLineWidth), label.setAttributes({
25560
25590
  maxLineWidth: limitLabelLength,
25561
25591
  ellipsis: label.attribute.ellipsis || ellipsis
@@ -25901,20 +25931,29 @@
25901
25931
  limitEllipsis: limitEllipsis,
25902
25932
  autoHide: autoHide$1,
25903
25933
  autoHideMethod: autoHideMethod,
25904
- autoHideSeparation: autoHideSeparation
25934
+ autoHideSeparation: autoHideSeparation,
25935
+ lastVisible: lastVisible
25905
25936
  } = label;
25906
- isFunction$3(layoutFunc) ? layoutFunc(labelShapes, labelData, layer, this) : (autoRotate$1 && autoRotate(labelShapes, {
25907
- labelRotateAngle: autoRotateAngle,
25908
- orient: orient
25909
- }), autoLimit$1 && isValidNumber$1(limitLength) && limitLength > 0 && autoLimit(labelShapes, {
25910
- limitLength: limitLength,
25911
- ellipsis: limitEllipsis,
25912
- orient: orient
25913
- }), autoHide$1 && autoHide(labelShapes, {
25914
- orient: orient,
25915
- method: autoHideMethod,
25916
- separation: autoHideSeparation
25917
- }));
25937
+ if (isFunction$3(layoutFunc)) layoutFunc(labelShapes, labelData, layer, this);else {
25938
+ if (autoRotate$1 && autoRotate(labelShapes, {
25939
+ labelRotateAngle: autoRotateAngle,
25940
+ orient: orient
25941
+ }), autoLimit$1 && isValidNumber$1(limitLength) && limitLength > 0) {
25942
+ const verticalLimitLength = "left" !== orient && "right" !== orient || !labelShapes.some(label => "vertical" === label.attribute.direction) ? 1 / 0 : Math.abs(this.attribute.start.y - this.attribute.end.y) / labelShapes.length;
25943
+ autoLimit(labelShapes, {
25944
+ limitLength: limitLength,
25945
+ verticalLimitLength: verticalLimitLength,
25946
+ ellipsis: limitEllipsis,
25947
+ orient: orient
25948
+ });
25949
+ }
25950
+ autoHide$1 && autoHide(labelShapes, {
25951
+ orient: orient,
25952
+ method: autoHideMethod,
25953
+ separation: autoHideSeparation,
25954
+ lastVisible: lastVisible
25955
+ });
25956
+ }
25918
25957
  }
25919
25958
  afterLabelsOverlap(labelShapes, labelData, labelContainer, layer, layerCount) {
25920
25959
  const {
@@ -26383,7 +26422,8 @@
26383
26422
  shapeSize = 0,
26384
26423
  shapeSpace = 0;
26385
26424
  if (shapeAttr && !1 !== shapeAttr.visible) {
26386
- shapeSize = get$5(shapeStyle, "style.size", DEFAULT_SHAPE_SIZE), shapeSpace = get$5(shapeAttr, "space", DEFAULT_SHAPE_SPACE);
26425
+ const s = get$5(shapeStyle, "style.size", DEFAULT_SHAPE_SIZE);
26426
+ shapeSize = isArray$3(s) ? s[0] || 0 : s, shapeSpace = get$5(shapeAttr, "space", DEFAULT_SHAPE_SPACE);
26387
26427
  const itemShape = graphicCreator$1.symbol(Object.assign(Object.assign({
26388
26428
  x: 0,
26389
26429
  y: 0,
@@ -48924,6 +48964,9 @@
48924
48964
  return;
48925
48965
  }
48926
48966
  group.forEachChildren((child) => {
48967
+ if (!child) {
48968
+ return;
48969
+ }
48927
48970
  if (isObject$6(child.attribute.width) && child.attribute.width.percent) {
48928
48971
  child.setAttribute('width', (child.attribute.width.percent / 100) * parentWidth +
48929
48972
  (child.attribute.width.delta ?? 0));
@@ -48938,7 +48981,7 @@
48938
48981
  });
48939
48982
  }
48940
48983
  function decodeReactDom(dom) {
48941
- if (!dom.$$typeof) {
48984
+ if (!dom || !dom.$$typeof) {
48942
48985
  return dom;
48943
48986
  }
48944
48987
  const type = dom.type;
@@ -49414,6 +49457,20 @@
49414
49457
  this.clearUpdateBoundTag();
49415
49458
  return this._AABBBounds;
49416
49459
  }
49460
+ else if (this.role === 'body' ||
49461
+ this.role === 'row-header' ||
49462
+ this.role === 'col-header' ||
49463
+ this.role === 'right-frozen' ||
49464
+ this.role === 'bottom-frozen' ||
49465
+ this.role === 'corner-header' ||
49466
+ this.role === 'corner-right-top-header' ||
49467
+ this.role === 'corner-right-bottom-header' ||
49468
+ this.role === 'corner-left-bottom-header') {
49469
+ this._AABBBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);
49470
+ this.parent && this.parent.addChildUpdateBoundTag();
49471
+ this.clearUpdateBoundTag();
49472
+ return this._AABBBounds;
49473
+ }
49417
49474
  return super.doUpdateAABBBounds();
49418
49475
  }
49419
49476
  updateColumnRowNumber(row) {
@@ -51724,7 +51781,9 @@
51724
51781
  isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;
51725
51782
  value = customMergeText;
51726
51783
  customStyle = customMergeStyle;
51727
- cellTheme = getStyleTheme(customStyle, table, range.start.col, range.start.row, getProp).theme;
51784
+ if (customStyle) {
51785
+ cellTheme = getStyleTheme(customStyle, table, range.start.col, range.start.row, getProp).theme;
51786
+ }
51728
51787
  }
51729
51788
  }
51730
51789
  let newCellGroup;
@@ -55643,6 +55702,100 @@
55643
55702
  AdjustColorGroupAfterRenderContribution = __decorate([
55644
55703
  injectable$1()
55645
55704
  ], AdjustColorGroupAfterRenderContribution);
55705
+ let ClipBodyGroupBeforeRenderContribution = class ClipBodyGroupBeforeRenderContribution {
55706
+ time = BaseRenderContributionTime$1.beforeFillStroke;
55707
+ useStyle = true;
55708
+ order = 0;
55709
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
55710
+ const table = group.stage.table;
55711
+ if (group.role === 'body') {
55712
+ const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();
55713
+ const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();
55714
+ const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();
55715
+ const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
55716
+ context.beginPath();
55717
+ context.rect(x, y, width, height);
55718
+ }
55719
+ else if (group.role === 'row-header') {
55720
+ const x = 0;
55721
+ const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();
55722
+ const width = table.getFrozenColsWidth();
55723
+ const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
55724
+ context.beginPath();
55725
+ context.rect(x, y, width, height);
55726
+ }
55727
+ else if (group.role === 'col-header') {
55728
+ const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();
55729
+ const y = 0;
55730
+ const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();
55731
+ const height = table.getFrozenRowsHeight();
55732
+ context.beginPath();
55733
+ context.rect(x, y, width, height);
55734
+ }
55735
+ else if (group.role === 'right-frozen') {
55736
+ const x = 0;
55737
+ const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();
55738
+ const width = table.getRightFrozenColsWidth();
55739
+ const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
55740
+ context.beginPath();
55741
+ context.rect(x, y, width, height);
55742
+ }
55743
+ else if (group.role === 'bottom-frozen') {
55744
+ const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();
55745
+ const y = 0;
55746
+ const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();
55747
+ const height = table.getBottomFrozenRowsHeight();
55748
+ context.beginPath();
55749
+ context.rect(x, y, width, height);
55750
+ }
55751
+ else if (group.role === 'corner-header') {
55752
+ const x = 0;
55753
+ const y = 0;
55754
+ const width = table.getFrozenColsWidth();
55755
+ const height = table.getFrozenRowsHeight();
55756
+ context.beginPath();
55757
+ context.rect(x, y, width, height);
55758
+ }
55759
+ else if (group.role === 'corner-right-top-header') {
55760
+ const x = 0;
55761
+ const y = 0;
55762
+ const width = table.getRightFrozenColsWidth();
55763
+ const height = table.getFrozenRowsHeight();
55764
+ context.beginPath();
55765
+ context.rect(x, y, width, height);
55766
+ }
55767
+ else if (group.role === 'corner-right-bottom-header') {
55768
+ const x = 0;
55769
+ const y = 0;
55770
+ const width = table.getRightFrozenColsWidth();
55771
+ const height = table.getBottomFrozenRowsHeight();
55772
+ context.beginPath();
55773
+ context.rect(x, y, width, height);
55774
+ }
55775
+ else if (group.role === 'corner-left-bottom-header') {
55776
+ const x = 0;
55777
+ const y = 0;
55778
+ const width = table.getFrozenColsWidth();
55779
+ const height = table.getBottomFrozenRowsHeight();
55780
+ context.beginPath();
55781
+ context.rect(x, y, width, height);
55782
+ }
55783
+ }
55784
+ };
55785
+ ClipBodyGroupBeforeRenderContribution = __decorate([
55786
+ injectable$1()
55787
+ ], ClipBodyGroupBeforeRenderContribution);
55788
+ let ClipBodyGroupAfterRenderContribution = class ClipBodyGroupAfterRenderContribution {
55789
+ time = BaseRenderContributionTime$1.afterFillStroke;
55790
+ useStyle = true;
55791
+ order = 0;
55792
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
55793
+ if (group.role === 'body') ;
55794
+ }
55795
+ };
55796
+ ClipBodyGroupAfterRenderContribution = __decorate([
55797
+ injectable$1()
55798
+ ], ClipBodyGroupAfterRenderContribution);
55646
55799
  function getCellSizeForDraw(group, width, height) {
55647
55800
  const table = group.stage.table;
55648
55801
  if (group.role === 'cell') {
@@ -55752,6 +55905,10 @@
55752
55905
  bind(GroupRenderContribution$1).toService(AdjustPosGroupBeforeRenderContribution);
55753
55906
  bind(AdjustPosGroupAfterRenderContribution).toSelf().inSingletonScope();
55754
55907
  bind(GroupRenderContribution$1).toService(AdjustPosGroupAfterRenderContribution);
55908
+ bind(ClipBodyGroupBeforeRenderContribution).toSelf().inSingletonScope();
55909
+ bind(GroupRenderContribution$1).toService(ClipBodyGroupBeforeRenderContribution);
55910
+ bind(ClipBodyGroupAfterRenderContribution).toSelf().inSingletonScope();
55911
+ bind(GroupRenderContribution$1).toService(ClipBodyGroupAfterRenderContribution);
55755
55912
  });
55756
55913
 
55757
55914
  function computeColsWidth(table, colStart, colEnd, update) {
@@ -56720,15 +56877,17 @@
56720
56877
  }
56721
56878
  }
56722
56879
  function updateCellGroupPosition(colGroup, direction, proxy) {
56723
- if (direction === 'up') {
56724
- const cellGroup = colGroup.firstChild;
56725
- proxy.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + proxy.table.getRowHeight(colGroup.lastChild.row));
56726
- colGroup.appendChild(cellGroup);
56727
- }
56728
- else {
56729
- const cellGroup = colGroup.lastChild;
56730
- proxy.updateCellGroupPosition(cellGroup, colGroup.firstChild.row - 1, colGroup.firstChild.attribute.y - proxy.table.getRowHeight(cellGroup.row));
56731
- colGroup.insertBefore(cellGroup, colGroup.firstChild);
56880
+ if (colGroup.childrenCount >= 1) {
56881
+ if (direction === 'up') {
56882
+ const cellGroup = colGroup.firstChild;
56883
+ proxy.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + proxy.table.getRowHeight(colGroup.lastChild.row));
56884
+ colGroup.appendChild(cellGroup);
56885
+ }
56886
+ else {
56887
+ const cellGroup = colGroup.lastChild;
56888
+ proxy.updateCellGroupPosition(cellGroup, colGroup.firstChild.row - 1, colGroup.firstChild.attribute.y - proxy.table.getRowHeight(cellGroup.row));
56889
+ colGroup.insertBefore(cellGroup, colGroup.firstChild);
56890
+ }
56732
56891
  }
56733
56892
  }
56734
56893
  function updateAllRowPosition(distStartRowY, count, direction, proxy) {
@@ -57095,7 +57254,7 @@
57095
57254
  this.table.scenegraph.updateBorderSizeAndPosition();
57096
57255
  }
57097
57256
  async setY(y) {
57098
- const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + this.totalActualBodyRowCount) / 2;
57257
+ const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + (this.rowEnd - this.rowStart + 1)) / 2;
57099
57258
  const yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;
57100
57259
  if (y < yLimitTop && this.rowStart === this.bodyTopRow) {
57101
57260
  this.table.scenegraph.setBodyAndRowHeaderY(-y);
@@ -57103,12 +57262,16 @@
57103
57262
  else if (y > yLimitBottom && this.rowEnd === this.bodyBottomRow) {
57104
57263
  this.table.scenegraph.setBodyAndRowHeaderY(-y);
57105
57264
  }
57265
+ else if (!this.table.scenegraph.bodyGroup.firstChild ||
57266
+ this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0) {
57267
+ this.table.scenegraph.setBodyAndRowHeaderY(-y);
57268
+ }
57106
57269
  else {
57107
57270
  this.dynamicSetY(y);
57108
57271
  }
57109
57272
  }
57110
57273
  async setX(x) {
57111
- const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + this.totalActualBodyColCount) / 2;
57274
+ const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + (this.colEnd - this.colStart + 1)) / 2;
57112
57275
  const xLimitRight = this.table.getAllColsWidth() - xLimitLeft;
57113
57276
  if (x < xLimitLeft && this.colStart === this.bodyLeftCol) {
57114
57277
  this.table.scenegraph.setBodyAndColHeaderX(-x);
@@ -57116,6 +57279,10 @@
57116
57279
  else if (x > xLimitRight && this.colEnd === this.bodyRightCol) {
57117
57280
  this.table.scenegraph.setBodyAndColHeaderX(-x);
57118
57281
  }
57282
+ else if (this.table.scenegraph.bodyGroup.firstChild &&
57283
+ this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0) {
57284
+ this.table.scenegraph.setBodyAndColHeaderX(-x);
57285
+ }
57119
57286
  else {
57120
57287
  this.dynamicSetX(x);
57121
57288
  }
@@ -58772,34 +58939,34 @@
58772
58939
  const height = scene.table.tableNoFrameHeight;
58773
58940
  scene.tableGroup = new Group$1({ x: 0, y: 0, width, height, clip: true, pickable: false });
58774
58941
  scene.tableGroup.role = 'table';
58775
- const colHeaderGroup = createContainerGroup(0, 0);
58942
+ const colHeaderGroup = createContainerGroup(0, 0, true);
58776
58943
  colHeaderGroup.role = 'col-header';
58777
58944
  scene.colHeaderGroup = colHeaderGroup;
58778
- const cornerHeaderGroup = createContainerGroup(0, 0);
58945
+ const cornerHeaderGroup = createContainerGroup(0, 0, true);
58779
58946
  cornerHeaderGroup.role = 'corner-header';
58780
58947
  scene.cornerHeaderGroup = cornerHeaderGroup;
58781
- const rowHeaderGroup = createContainerGroup(0, 0);
58948
+ const rowHeaderGroup = createContainerGroup(0, 0, true);
58782
58949
  rowHeaderGroup.role = 'row-header';
58783
58950
  scene.rowHeaderGroup = rowHeaderGroup;
58784
- const bodyGroup = createContainerGroup(width, 0);
58951
+ const bodyGroup = createContainerGroup(width, 0, true);
58785
58952
  bodyGroup.role = 'body';
58786
58953
  scene.bodyGroup = bodyGroup;
58787
- const rightFrozenGroup = createContainerGroup(0, 0);
58954
+ const rightFrozenGroup = createContainerGroup(0, 0, true);
58788
58955
  rightFrozenGroup.role = 'right-frozen';
58789
58956
  scene.rightFrozenGroup = rightFrozenGroup;
58790
- const bottomFrozenGroup = createContainerGroup(0, 0);
58957
+ const bottomFrozenGroup = createContainerGroup(0, 0, true);
58791
58958
  bottomFrozenGroup.role = 'bottom-frozen';
58792
58959
  scene.bottomFrozenGroup = bottomFrozenGroup;
58793
58960
  const componentGroup = createContainerGroup(0, 0);
58794
58961
  componentGroup.role = 'component';
58795
58962
  scene.componentGroup = componentGroup;
58796
- const rightTopCornerGroup = createContainerGroup(0, 0);
58963
+ const rightTopCornerGroup = createContainerGroup(0, 0, true);
58797
58964
  rightTopCornerGroup.role = 'corner-right-top-header';
58798
58965
  scene.rightTopCornerGroup = rightTopCornerGroup;
58799
- const rightBottomCornerGroup = createContainerGroup(0, 0);
58966
+ const rightBottomCornerGroup = createContainerGroup(0, 0, true);
58800
58967
  rightBottomCornerGroup.role = 'corner-right-bottom-header';
58801
58968
  scene.rightBottomCornerGroup = rightBottomCornerGroup;
58802
- const leftBottomCornerGroup = createContainerGroup(0, 0);
58969
+ const leftBottomCornerGroup = createContainerGroup(0, 0, true);
58803
58970
  leftBottomCornerGroup.role = 'corner-left-bottom-header';
58804
58971
  scene.leftBottomCornerGroup = leftBottomCornerGroup;
58805
58972
  scene.tableGroup.addChild(bodyGroup);
@@ -58813,13 +58980,13 @@
58813
58980
  scene.tableGroup.addChild(cornerHeaderGroup);
58814
58981
  scene.tableGroup.addChild(componentGroup);
58815
58982
  }
58816
- function createContainerGroup(width, height) {
58983
+ function createContainerGroup(width, height, clip) {
58817
58984
  return new Group$1({
58818
58985
  x: 0,
58819
58986
  y: 0,
58820
58987
  width,
58821
58988
  height,
58822
- clip: false,
58989
+ clip: clip ?? false,
58823
58990
  pickable: false
58824
58991
  });
58825
58992
  }
@@ -66823,7 +66990,7 @@
66823
66990
  return TABLE_EVENT_TYPE;
66824
66991
  }
66825
66992
  options;
66826
- version = "0.17.5-alpha.2";
66993
+ version = "0.17.6";
66827
66994
  pagination;
66828
66995
  id = `VTable${Date.now()}`;
66829
66996
  headerStyleCache;
@@ -70259,6 +70426,11 @@
70259
70426
  clearCellRangeMap() {
70260
70427
  this._cellRangeMap.clear();
70261
70428
  }
70429
+ updateColumnTitle(col, row, title) {
70430
+ const define = this._table.internalProps.layoutMap.getHeader(col, row);
70431
+ define.title = title;
70432
+ define.define.title = title;
70433
+ }
70262
70434
  }
70263
70435
 
70264
70436
  class Title {
@@ -70430,7 +70602,7 @@
70430
70602
  });
70431
70603
  }
70432
70604
  startEditCell(col, row) {
70433
- if (this.table.isHeader(col, row)) {
70605
+ if (this.table.isPivotTable() && this.table.isHeader(col, row)) {
70434
70606
  return;
70435
70607
  }
70436
70608
  const editor = this.table.getEditor(col, row);
@@ -70438,10 +70610,12 @@
70438
70610
  if (this.table.getCustomRender(col, row) || this.table.getCustomLayout(col, row)) {
70439
70611
  return;
70440
70612
  }
70441
- const range = this.table.getCellRange(col, row);
70442
- const isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;
70443
- if (isMerge) {
70444
- return;
70613
+ if (!this.table.isHeader(col, row)) {
70614
+ const range = this.table.getCellRange(col, row);
70615
+ const isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;
70616
+ if (isMerge) {
70617
+ return;
70618
+ }
70445
70619
  }
70446
70620
  editor.bindSuccessCallback?.(() => {
70447
70621
  this.completeEdit();
@@ -70449,7 +70623,7 @@
70449
70623
  this.editingEditor = editor;
70450
70624
  this.editCell = { col, row };
70451
70625
  const dataValue = this.table.getCellOriginValue(col, row);
70452
- const rect = this.table.getCellRelativeRect(col, row);
70626
+ const rect = this.table.getCellRangeRelativeRect(this.table.getCellRange(col, row));
70453
70627
  editor.beginEditing(this.table.getElement(), { rect: { left: rect.left, top: rect.top, width: rect.width, height: rect.height } }, dataValue);
70454
70628
  }
70455
70629
  }
@@ -71113,7 +71287,9 @@
71113
71287
  }
71114
71288
  getEditor(col, row) {
71115
71289
  const define = this.getBodyColumnDefine(col, row);
71116
- let editorDefine = define?.editor ?? this.options.editor;
71290
+ let editorDefine = this.isHeader(col, row)
71291
+ ? define?.headerEditor ?? this.options.headerEditor
71292
+ : define?.editor ?? this.options.editor;
71117
71293
  if (typeof editorDefine === 'function') {
71118
71294
  const arg = {
71119
71295
  col,
@@ -71132,8 +71308,19 @@
71132
71308
  changeCellValue(col, row, value) {
71133
71309
  const recordIndex = this.getRecordShowIndexByCell(col, row);
71134
71310
  const { field } = this.internalProps.layoutMap.getBody(col, row);
71135
- this.dataSource.changeFieldValue(value, recordIndex, field, col, row, this);
71136
- this.scenegraph.updateCellContent(col, row);
71311
+ const beforeChangeValue = this.getCellRawValue(col, row);
71312
+ if (this.isHeader(col, row)) {
71313
+ this.internalProps.layoutMap.updateColumnTitle(col, row, value);
71314
+ }
71315
+ else {
71316
+ this.dataSource.changeFieldValue(value, recordIndex, field, col, row, this);
71317
+ }
71318
+ const range = this.getCellRange(col, row);
71319
+ for (let sCol = range.start.col; sCol <= range.end.col; sCol++) {
71320
+ for (let sRow = range.start.row; sRow <= range.end.row; sRow++) {
71321
+ this.scenegraph.updateCellContent(sCol, sRow);
71322
+ }
71323
+ }
71137
71324
  if (this.widthMode === 'adaptive' || (this.autoFillWidth && this.getAllColsWidth() <= this.tableNoFrameWidth)) {
71138
71325
  if (this.internalProps._widthResizedColMap.size === 0) {
71139
71326
  this.scenegraph.recalculateColWidths();
@@ -71157,7 +71344,7 @@
71157
71344
  this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
71158
71345
  col,
71159
71346
  row,
71160
- rawValue: this.getCellRawValue(col, row),
71347
+ rawValue: beforeChangeValue,
71161
71348
  changedValue: this.getCellOriginValue(col, row)
71162
71349
  });
71163
71350
  this.scenegraph.updateNextFrame();
@@ -77546,7 +77733,7 @@
77546
77733
  return new Tag$1(params ? params.attribute : {});
77547
77734
  }
77548
77735
 
77549
- const version = "0.17.5-alpha.2";
77736
+ const version = "0.17.6";
77550
77737
  function getIcons() {
77551
77738
  return get$2();
77552
77739
  }