@visactor/vtable 1.14.1 → 1.14.2

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 (43) hide show
  1. package/cjs/core/BaseTable.js +1 -1
  2. package/cjs/core/BaseTable.js.map +1 -1
  3. package/cjs/index.d.ts +1 -1
  4. package/cjs/index.js +1 -1
  5. package/cjs/index.js.map +1 -1
  6. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +4 -4
  7. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  8. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +4 -4
  9. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  10. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +2 -2
  11. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  12. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +9 -1
  13. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  14. package/cjs/scenegraph/group-creater/progress/update-position/util.js +2 -2
  15. package/cjs/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
  16. package/cjs/scenegraph/layout/update-width.js +1 -2
  17. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  18. package/cjs/scenegraph/scenegraph.js +6 -3
  19. package/cjs/scenegraph/scenegraph.js.map +1 -1
  20. package/cjs/vrender.js.map +1 -1
  21. package/dist/vtable.js +274 -185
  22. package/dist/vtable.min.js +2 -2
  23. package/es/core/BaseTable.js +1 -1
  24. package/es/core/BaseTable.js.map +1 -1
  25. package/es/index.d.ts +1 -1
  26. package/es/index.js +1 -1
  27. package/es/index.js.map +1 -1
  28. package/es/scenegraph/graphic/contributions/group-contribution-render.js +4 -4
  29. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  30. package/es/scenegraph/graphic/contributions/rect-contribution-render.js +4 -4
  31. package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  32. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +2 -2
  33. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  34. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +9 -1
  35. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  36. package/es/scenegraph/group-creater/progress/update-position/util.js +2 -2
  37. package/es/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
  38. package/es/scenegraph/layout/update-width.js +1 -2
  39. package/es/scenegraph/layout/update-width.js.map +1 -1
  40. package/es/scenegraph/scenegraph.js +6 -3
  41. package/es/scenegraph/scenegraph.js.map +1 -1
  42. package/es/vrender.js.map +1 -1
  43. package/package.json +6 -6
package/dist/vtable.js CHANGED
@@ -591,6 +591,31 @@
591
591
  return function (target, key) {
592
592
  decorator(target, key, paramIndex);
593
593
  };
594
+ },
595
+ __awaiter$5 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
596
+ return new (P || (P = Promise))(function (resolve, reject) {
597
+ function fulfilled(value) {
598
+ try {
599
+ step(generator.next(value));
600
+ } catch (e) {
601
+ reject(e);
602
+ }
603
+ }
604
+ function rejected(value) {
605
+ try {
606
+ step(generator.throw(value));
607
+ } catch (e) {
608
+ reject(e);
609
+ }
610
+ }
611
+ function step(result) {
612
+ var value;
613
+ result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
614
+ resolve(value);
615
+ })).then(fulfilled, rejected);
616
+ }
617
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
618
+ });
594
619
  };
595
620
  let DefaultGlobal = class {
596
621
  get env() {
@@ -716,6 +741,11 @@
716
741
  loadBlob(url) {
717
742
  return this._env || this.setEnv("browser"), this.envContribution.loadBlob(url);
718
743
  }
744
+ loadFont(name, source, descriptors) {
745
+ return __awaiter$5(this, void 0, void 0, function* () {
746
+ return this._env || this.setEnv("browser"), this.envContribution.loadFont(name, source, descriptors);
747
+ });
748
+ }
719
749
  isChrome() {
720
750
  return null != this._isChrome || (this._env || this.setEnv("browser"), this._isChrome = "browser" === this._env && navigator.userAgent.indexOf("Chrome") > -1), this._isChrome;
721
751
  }
@@ -1794,19 +1824,10 @@
1794
1824
  }
1795
1825
  function isRotateAABBIntersect(box1, box2) {
1796
1826
  let isDeg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
1797
- let ctx = arguments.length > 3 ? arguments[3] : undefined;
1798
1827
  const rect1 = toRect(box1, isDeg),
1799
1828
  rect2 = toRect(box2, isDeg),
1800
- vector = (start, end) => [end.x - start.x, end.y - start.y];
1801
- ctx && (ctx.save(), ctx.fillStyle = "red", ctx.globalAlpha = .6, rect1.forEach((item, index) => {
1802
- 0 === index ? ctx.moveTo(item.x, item.y) : ctx.lineTo(item.x, item.y);
1803
- }), ctx.fill(), ctx.restore(), ctx.save(), ctx.fillStyle = "green", ctx.globalAlpha = .6, rect2.forEach((item, index) => {
1804
- 0 === index ? ctx.moveTo(item.x, item.y) : ctx.lineTo(item.x, item.y);
1805
- }), ctx.fill(), ctx.restore());
1806
- const p1 = getCenterPoint(box1),
1807
- p2 = getCenterPoint(box2);
1808
- ctx && ctx.fillRect(p1.x, p1.y, 2, 2), ctx && ctx.fillRect(p2.x, p2.y, 2, 2);
1809
- const vp1p2 = vector(p1, p2),
1829
+ vector = (start, end) => [end.x - start.x, end.y - start.y],
1830
+ vp1p2 = vector(getCenterPoint(box1), getCenterPoint(box2)),
1810
1831
  AB = vector(rect1[0], rect1[1]),
1811
1832
  BC = vector(rect1[1], rect1[2]),
1812
1833
  A1B1 = vector(rect2[0], rect2[1]),
@@ -2195,7 +2216,8 @@
2195
2216
  class OBBBounds extends Bounds$1 {
2196
2217
  constructor(bounds) {
2197
2218
  let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2198
- super(bounds), bounds && (this.angle = angle);
2219
+ var _a;
2220
+ super(bounds), bounds && (this.angle = null !== (_a = bounds.angle) && void 0 !== _a ? _a : angle);
2199
2221
  }
2200
2222
  intersects(b) {
2201
2223
  return isRotateAABBIntersect(this, b);
@@ -2208,6 +2230,9 @@
2208
2230
  let angle = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
2209
2231
  return super.setValue(x1, y1, x2, y2), this.angle = angle, this;
2210
2232
  }
2233
+ clone() {
2234
+ return new OBBBounds(this);
2235
+ }
2211
2236
  }
2212
2237
 
2213
2238
  class Matrix {
@@ -5653,7 +5678,7 @@
5653
5678
  return null;
5654
5679
  }
5655
5680
 
5656
- var __awaiter$2 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
5681
+ var __awaiter$4 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
5657
5682
  return new (P || (P = Promise))(function (resolve, reject) {
5658
5683
  function fulfilled(value) {
5659
5684
  try {
@@ -5723,7 +5748,7 @@
5723
5748
  }
5724
5749
  forEachChildrenAsync(cb) {
5725
5750
  let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
5726
- return __awaiter$2(this, void 0, void 0, function* () {
5751
+ return __awaiter$4(this, void 0, void 0, function* () {
5727
5752
  if (reverse) {
5728
5753
  let child = this._lastChild,
5729
5754
  i = 0;
@@ -10353,68 +10378,6 @@
10353
10378
  const defaultRectTextureRenderContribution = defaultBaseTextureRenderContribution;
10354
10379
  const defaultRectBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
10355
10380
 
10356
- class DefaultImageBackgroundRenderContribution extends DefaultBaseBackgroundRenderContribution {
10357
- constructor() {
10358
- super(...arguments), this.time = BaseRenderContributionTime.beforeFillStroke;
10359
- }
10360
- drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
10361
- const {
10362
- background: background,
10363
- backgroundMode = graphicAttribute.backgroundMode,
10364
- backgroundFit = graphicAttribute.backgroundFit
10365
- } = graphic.attribute;
10366
- if (background) if (graphic.backgroundImg) {
10367
- const res = graphic.resources.get(background);
10368
- if ("success" !== res.state || !res.data) return;
10369
- if (context.save(), graphic.parent && !graphic.transMatrix.onlyTranslate()) {
10370
- const groupAttribute = getTheme(graphic.parent).group,
10371
- {
10372
- scrollX = groupAttribute.scrollX,
10373
- scrollY = groupAttribute.scrollY
10374
- } = graphic.parent.attribute;
10375
- context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.translate(scrollX, scrollY);
10376
- }
10377
- const b = graphic.AABBBounds;
10378
- this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
10379
- } else if (isObject$6(background)) {
10380
- const {
10381
- stroke: stroke,
10382
- fill: fill,
10383
- lineWidth = 1,
10384
- cornerRadius = 0,
10385
- expandX = 0,
10386
- expandY = 0
10387
- } = background;
10388
- if (!stroke && !fill) return;
10389
- context.beginPath();
10390
- const {
10391
- x: x,
10392
- y: y,
10393
- width: width,
10394
- height: height
10395
- } = getActualPosition(graphic);
10396
- cornerRadius ? createRectPath(context, x - expandX, y - expandY, width + 2 * expandX, height + 2 * expandY, cornerRadius) : context.rect(x - expandX, y - expandY, width + 2 * expandX, height + 2 * expandY), context.globalAlpha = 1, fill && (context.fillStyle = fill, context.fill()), stroke && lineWidth > 0 && (context.lineWidth = lineWidth, context.strokeStyle = stroke, context.stroke());
10397
- } else {
10398
- context.beginPath();
10399
- const b = graphic.AABBBounds;
10400
- context.rect(x, y, b.width(), b.height()), context.fillStyle = background, context.globalAlpha = 1, context.fill();
10401
- }
10402
- }
10403
- }
10404
- function getActualPosition(graphic) {
10405
- const boundsPadding = parsePadding(graphic.attribute.boundsPadding),
10406
- bounds = graphic.AABBBounds;
10407
- let x = bounds.x1,
10408
- y = bounds.y1,
10409
- width = bounds.width(),
10410
- height = bounds.height();
10411
- return isNumber$4(boundsPadding) ? (x += boundsPadding, y += boundsPadding, width -= 2 * boundsPadding, height -= 2 * boundsPadding) : (x += boundsPadding[3], y += boundsPadding[0], width -= boundsPadding[1] + boundsPadding[3], height -= boundsPadding[0] + boundsPadding[2]), {
10412
- x: x,
10413
- y: y,
10414
- width: width,
10415
- height: height
10416
- };
10417
- }
10418
10381
  class DefaultImageRenderContribution extends DefaultRectRenderContribution {
10419
10382
  constructor() {
10420
10383
  super(...arguments), this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
@@ -10424,7 +10387,7 @@
10424
10387
  }
10425
10388
  }
10426
10389
  const defaultImageRenderContribution = new DefaultImageRenderContribution();
10427
- const defaultImageBackgroundRenderContribution = new DefaultImageBackgroundRenderContribution();
10390
+ const defaultImageBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
10428
10391
 
10429
10392
  class DefaultSymbolRenderContribution {
10430
10393
  constructor() {
@@ -12102,26 +12065,25 @@
12102
12065
  doFill: doFill,
12103
12066
  doStroke: doStroke
12104
12067
  } = data;
12105
- context.setShadowBlendStyle && context.setShadowBlendStyle(image, imageAttribute), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
12068
+ if (!url || !image.resources) return;
12069
+ const res = image.resources.get(url);
12070
+ if ("success" !== res.state) return;
12071
+ let needRestore = !1;
12072
+ 0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), needRestore = !0), context.setShadowBlendStyle && context.setShadowBlendStyle(image, image.attribute, imageAttribute);
12106
12073
  const _runFill = () => {
12107
12074
  if (doFill) if (fillCb) fillCb(context, image.attribute, imageAttribute);else if (fVisible) {
12108
- if (!url || !image.resources) return;
12109
- const res = image.resources.get(url);
12110
- if ("success" !== res.state) return;
12111
- let needRestore = !1;
12112
- 0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), context.save(), context.clip(), needRestore = !0), context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
12075
+ context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
12113
12076
  let repeat = 0;
12114
12077
  if ("repeat" === repeatX && (repeat |= 1), "repeat" === repeatY && (repeat |= 2), repeat) {
12115
12078
  const pattern = context.createPattern(res.data, repeatStr[repeat]);
12116
12079
  context.fillStyle = pattern, context.translate(x, y, !0), context.fillRect(0, 0, width, height), context.translate(-x, -y, !0);
12117
12080
  } else context.drawImage(res.data, x, y, width, height);
12118
- needRestore && context.restore();
12119
12081
  }
12120
12082
  },
12121
12083
  _runStroke = () => {
12122
12084
  doStroke && (strokeCb ? strokeCb(context, image.attribute, imageAttribute) : sVisible && (context.setStrokeStyle(image, image.attribute, originX - x, originY - y, imageAttribute), context.stroke()));
12123
12085
  };
12124
- fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
12086
+ fillStrokeOrder ? (_runStroke(), needRestore && (context.save(), context.clip()), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb), _runFill(), needRestore && context.restore()) : (needRestore && (context.save(), context.clip()), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb), _runFill(), needRestore && context.restore(), _runStroke()), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
12125
12087
  }
12126
12088
  draw(image, renderService, drawContext) {
12127
12089
  const {
@@ -15338,7 +15300,7 @@
15338
15300
  container.load(envModules), container.load(textMeasureModules), container.load(layerHandlerModules);
15339
15301
  }
15340
15302
 
15341
- var __awaiter$1 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
15303
+ var __awaiter$3 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
15342
15304
  return new (P || (P = Promise))(function (resolve, reject) {
15343
15305
  function fulfilled(value) {
15344
15306
  try {
@@ -15411,7 +15373,7 @@
15411
15373
  }
15412
15374
  function foreachAsync(graphic, defaultZIndex, cb) {
15413
15375
  let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
15414
- return __awaiter$1(this, void 0, void 0, function* () {
15376
+ return __awaiter$3(this, void 0, void 0, function* () {
15415
15377
  yield graphic.forEachChildrenAsync(cb, reverse);
15416
15378
  });
15417
15379
  }
@@ -15772,7 +15734,7 @@
15772
15734
  decorator(target, key, paramIndex);
15773
15735
  };
15774
15736
  },
15775
- __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
15737
+ __awaiter$2 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
15776
15738
  return new (P || (P = Promise))(function (resolve, reject) {
15777
15739
  function fulfilled(value) {
15778
15740
  try {
@@ -15807,7 +15769,7 @@
15807
15769
  }, this.defaultRenderMap.set(this.lineRender.numberType, this.lineRender), this.defaultRenderMap.set(this.areaRender.numberType, this.areaRender);
15808
15770
  }
15809
15771
  draw(renderService, drawContext) {
15810
- return __awaiter(this, void 0, void 0, function* () {
15772
+ return __awaiter$2(this, void 0, void 0, function* () {
15811
15773
  if (this.checkingForDrawPromise) return;
15812
15774
  this.lastRenderService = renderService, this.lastDrawContext = drawContext, this.checkingForDrawPromise = this.checkForDraw(drawContext);
15813
15775
  const skipDraw = yield this.checkingForDrawPromise;
@@ -15828,15 +15790,15 @@
15828
15790
  });
15829
15791
  }
15830
15792
  _increaseRender(group, drawContext) {
15831
- return __awaiter(this, void 0, void 0, function* () {
15793
+ return __awaiter$2(this, void 0, void 0, function* () {
15832
15794
  this.rendering = !0, yield this._renderIncrementalGroup(group, drawContext);
15833
15795
  });
15834
15796
  }
15835
15797
  _renderIncrementalGroup(group, drawContext) {
15836
- return __awaiter(this, void 0, void 0, function* () {
15798
+ return __awaiter$2(this, void 0, void 0, function* () {
15837
15799
  this.count = group.count, yield new Promise(resolve => {
15838
15800
  this.renderItem(group, drawContext, {
15839
- drawingCb: () => __awaiter(this, void 0, void 0, function* () {
15801
+ drawingCb: () => __awaiter$2(this, void 0, void 0, function* () {
15840
15802
  if (2 !== group.count) yield foreachAsync(group, DefaultAttribute.zIndex, (item, i) => {
15841
15803
  if (this.status === STATUS.STOP) return !0;
15842
15804
  if (item.isContainer) return !1;
@@ -15857,7 +15819,7 @@
15857
15819
  });
15858
15820
  }
15859
15821
  waitToNextFrame() {
15860
- return __awaiter(this, void 0, void 0, function* () {
15822
+ return __awaiter$2(this, void 0, void 0, function* () {
15861
15823
  return new Promise(resolve => {
15862
15824
  this.global.getRequestAnimationFrame()(() => {
15863
15825
  resolve(!1);
@@ -15866,13 +15828,13 @@
15866
15828
  });
15867
15829
  }
15868
15830
  checkForDraw(drawContext) {
15869
- return __awaiter(this, void 0, void 0, function* () {
15831
+ return __awaiter$2(this, void 0, void 0, function* () {
15870
15832
  let skip = this.rendering;
15871
15833
  return drawContext.restartIncremental && (skip = !1, yield this.forceStop(), this.resetToInit()), skip;
15872
15834
  });
15873
15835
  }
15874
15836
  forceStop() {
15875
- return __awaiter(this, void 0, void 0, function* () {
15837
+ return __awaiter$2(this, void 0, void 0, function* () {
15876
15838
  this.rendering && (this.status = STATUS.STOP, yield new Promise(resolve => {
15877
15839
  this.hooks.completeDraw.tap("stopCb", () => {
15878
15840
  this.status = STATUS.NORMAL, this.hooks.completeDraw.taps = this.hooks.completeDraw.taps.filter(item => "stopCb" !== item.name), resolve(!1);
@@ -15884,11 +15846,11 @@
15884
15846
  this.currFrameStartAt = 0, this.currentIdx = 0;
15885
15847
  }
15886
15848
  renderGroup(group, drawContext) {
15887
- return __awaiter(this, void 0, void 0, function* () {
15849
+ return __awaiter$2(this, void 0, void 0, function* () {
15888
15850
  if (!drawContext.break && !1 !== group.attribute.visibleAll) return group.incremental && drawContext.startAtId === group._uid ? (yield this._increaseRender(group, drawContext), void (drawContext.break = !0)) : void (yield new Promise(resolve => {
15889
15851
  this.renderItem(group, drawContext, {
15890
- drawingCb: () => __awaiter(this, void 0, void 0, function* () {
15891
- yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter(this, void 0, void 0, function* () {
15852
+ drawingCb: () => __awaiter$2(this, void 0, void 0, function* () {
15853
+ yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$2(this, void 0, void 0, function* () {
15892
15854
  drawContext.break || item.isContainer && (yield this.renderGroup(item, drawContext));
15893
15855
  })), resolve(!1);
15894
15856
  })
@@ -16688,12 +16650,37 @@
16688
16650
  BaseCanvas.env = "browser";
16689
16651
 
16690
16652
  var __decorate$z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
16691
- var d,
16692
- c = arguments.length,
16693
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
16694
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
16695
- return c > 3 && r && Object.defineProperty(target, key, r), r;
16696
- };
16653
+ var d,
16654
+ c = arguments.length,
16655
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
16656
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
16657
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
16658
+ },
16659
+ __awaiter$1 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
16660
+ return new (P || (P = Promise))(function (resolve, reject) {
16661
+ function fulfilled(value) {
16662
+ try {
16663
+ step(generator.next(value));
16664
+ } catch (e) {
16665
+ reject(e);
16666
+ }
16667
+ }
16668
+ function rejected(value) {
16669
+ try {
16670
+ step(generator.throw(value));
16671
+ } catch (e) {
16672
+ reject(e);
16673
+ }
16674
+ }
16675
+ function step(result) {
16676
+ var value;
16677
+ result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
16678
+ resolve(value);
16679
+ })).then(fulfilled, rejected);
16680
+ }
16681
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
16682
+ });
16683
+ };
16697
16684
  let BaseEnvContribution = class {
16698
16685
  configure(service) {
16699
16686
  service.env === this.type && service.setActiveEnvContribution(this);
@@ -16762,6 +16749,13 @@
16762
16749
  left: 0
16763
16750
  };
16764
16751
  }
16752
+ loadFont(font, source, descriptors) {
16753
+ return __awaiter$1(this, void 0, void 0, function* () {
16754
+ return {
16755
+ loadState: "fail"
16756
+ };
16757
+ });
16758
+ }
16765
16759
  };
16766
16760
  BaseEnvContribution = __decorate$z([injectable()], BaseEnvContribution);
16767
16761
 
@@ -16997,7 +16991,7 @@
16997
16991
  const fVisible = fillVisible(opacity, fillOpacity, !0),
16998
16992
  sVisible = fillVisible(opacity, strokeOpacity, !0);
16999
16993
  if (!fVisible) return;
17000
- context.translate(x, y), this.beforeRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
16994
+ context.setShadowBlendStyle && context.setShadowBlendStyle(richtext, richtext.attribute, richtextAttribute), context.translate(x, y), this.beforeRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
17001
16995
  richtext.getFrameCache().draw(context, this.drawIcon), this.afterRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
17002
16996
  }
17003
16997
  drawIcon(icon, context, x, y, baseline) {
@@ -17375,10 +17369,17 @@
17375
17369
  this.render(), this.bindEvents();
17376
17370
  });
17377
17371
  }
17378
- setAttribute(key, value, forceUpdateTag) {
17372
+ setAttribute(key, value, forceUpdateTag, context) {
17373
+ const params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate({
17374
+ [key]: value
17375
+ }, this.attribute, key, context);
17376
+ if (params) return this._setAttributes(params, forceUpdateTag);
17379
17377
  isPlainObject$3(this.attribute[key]) && isPlainObject$3(value) && !isFunction$3(this.attribute[key]) && !isFunction$3(value) ? merge$1(this.attribute[key], value) : this.attribute[key] = value, GROUP_ATTRIBUTES.includes(key) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
17380
17378
  }
17381
- setAttributes(params, forceUpdateTag) {
17379
+ setAttributes(params, forceUpdateTag, context) {
17380
+ return params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this._setAttributes(params, forceUpdateTag);
17381
+ }
17382
+ _setAttributes(params, forceUpdateTag) {
17382
17383
  const keys = Object.keys(params);
17383
17384
  this._mergeAttributes(params, keys), keys.every(key => GROUP_ATTRIBUTES.includes(key)) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTags(keys) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
17384
17385
  }
@@ -17775,6 +17776,7 @@
17775
17776
  });
17776
17777
  }
17777
17778
  emitEvent(type, e) {
17779
+ if (!this.element) return;
17778
17780
  const listeners = this.element._events[WILDCARD];
17779
17781
  if (listeners) if ("fn" in listeners) listeners.fn.call(listeners.context, e, type);else for (let i = 0, j = listeners.length; i < j && !e.propagationImmediatelyStopped; i++) listeners[i].fn.call(listeners[i].context, e, type);
17780
17782
  this.emit(type, e);
@@ -18651,6 +18653,31 @@
18651
18653
  },
18652
18654
  __metadata$j = undefined && undefined.__metadata || function (k, v) {
18653
18655
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
18656
+ },
18657
+ __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
18658
+ return new (P || (P = Promise))(function (resolve, reject) {
18659
+ function fulfilled(value) {
18660
+ try {
18661
+ step(generator.next(value));
18662
+ } catch (e) {
18663
+ reject(e);
18664
+ }
18665
+ }
18666
+ function rejected(value) {
18667
+ try {
18668
+ step(generator.throw(value));
18669
+ } catch (e) {
18670
+ reject(e);
18671
+ }
18672
+ }
18673
+ function step(result) {
18674
+ var value;
18675
+ result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
18676
+ resolve(value);
18677
+ })).then(fulfilled, rejected);
18678
+ }
18679
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18680
+ });
18654
18681
  };
18655
18682
  class DynamicB {
18656
18683
  get x1() {
@@ -18846,6 +18873,19 @@
18846
18873
  left: actualLeft
18847
18874
  };
18848
18875
  }
18876
+ loadFont(font, source, descriptors) {
18877
+ return __awaiter(this, void 0, void 0, function* () {
18878
+ return new FontFace(font, isString$4(source) ? `url(${source})` : source, descriptors).load().then(function (loadedFont) {
18879
+ return document.fonts.add(loadedFont), {
18880
+ loadState: "success"
18881
+ };
18882
+ }).catch(function (error) {
18883
+ return {
18884
+ loadState: "fail"
18885
+ };
18886
+ });
18887
+ });
18888
+ }
18849
18889
  };
18850
18890
  BrowserEnvContribution = __decorate$q([injectable(), __metadata$j("design:paramtypes", [])], BrowserEnvContribution);
18851
18891
 
@@ -21194,6 +21234,52 @@
21194
21234
  zIndex: 1
21195
21235
  };
21196
21236
 
21237
+ function genNormalBounds(item) {
21238
+ const bounds = item.AABBBounds;
21239
+ return {
21240
+ x1: bounds.x1,
21241
+ x2: bounds.x2,
21242
+ y1: bounds.y1,
21243
+ y2: bounds.y2,
21244
+ centerX: item.attribute.x,
21245
+ centerY: item.attribute.y,
21246
+ angle: item.attribute.angle
21247
+ };
21248
+ }
21249
+ function genRotateBounds(items) {
21250
+ items.forEach(item => {
21251
+ if (item.rotatedBounds || !item.attribute.angle) return;
21252
+ const bounds = genNormalBounds(item),
21253
+ rotatedCenter = rotatePoint({
21254
+ x: item.attribute.x,
21255
+ y: item.attribute.y
21256
+ }, bounds.angle, {
21257
+ x: bounds.centerX,
21258
+ y: bounds.centerY
21259
+ }),
21260
+ deltaX = rotatedCenter.x - bounds.centerX,
21261
+ deltaY = rotatedCenter.y - bounds.centerY;
21262
+ bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
21263
+ });
21264
+ }
21265
+ function itemIntersect(item1, item2) {
21266
+ var _a, _b;
21267
+ return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
21268
+ }
21269
+ const DELTA_ANGLE = Math.sin(Math.PI / 10);
21270
+ function isAngleVertical(angle) {
21271
+ let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
21272
+ const hasAngle = !isNil$3(angle) && 0 !== angle,
21273
+ cos = hasAngle ? Math.cos(angle) : 1;
21274
+ return hasAngle && Math.abs(cos) <= delta;
21275
+ }
21276
+ function isAngleHorizontal(angle) {
21277
+ let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
21278
+ const hasAngle = !isNil$3(angle) && 0 !== angle,
21279
+ sin = hasAngle ? Math.sin(angle) : 0;
21280
+ return !hasAngle || Math.abs(sin) <= delta;
21281
+ }
21282
+
21197
21283
  function getCircleLabelPosition(tickPosition, tickVector) {
21198
21284
  return {
21199
21285
  x: tickPosition.x + tickVector[0],
@@ -21241,9 +21327,11 @@
21241
21327
  return getCircleLabelPosition(labelPoint, getCircleVerticalVector(labelOffset || 1, labelPoint, center, inside));
21242
21328
  }
21243
21329
  function textIntersect(textA, textB, sep) {
21244
- let a = textA.OBBBounds,
21245
- b = textB.OBBBounds;
21246
- return a && b && !a.empty() && !b.empty() ? a.intersects(b) : (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
21330
+ var _a;
21331
+ let a, b;
21332
+ const angle = null === (_a = textA.attribute) || void 0 === _a ? void 0 : _a.angle,
21333
+ isAABBIntersects = (textA, textB, sep) => (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
21334
+ return isAngleHorizontal(angle, Number.EPSILON) ? isAABBIntersects(textA, textB, sep) : (a = textA.OBBBounds, b = textB.OBBBounds, !a || !b || a.empty() || b.empty() ? isAABBIntersects(textA, textB, sep) : a.intersects(b));
21247
21335
  }
21248
21336
  function hasOverlap(items, pad) {
21249
21337
  for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (b = items[i], textIntersect(a, b, pad)) return !0;
@@ -21413,7 +21501,10 @@
21413
21501
  isFunction$3(labelState[key]) && (labelState[key] = labelState[key](item, index, data, layer));
21414
21502
  }), text.states = labelState;
21415
21503
  }
21416
- labelGroup.add(text);
21504
+ text.data = Object.assign(Object.assign({}, item), {
21505
+ index: index,
21506
+ layer: layer
21507
+ }), labelGroup.add(text);
21417
21508
  }), labelGroup;
21418
21509
  }
21419
21510
  renderTitle(container) {
@@ -21627,50 +21718,6 @@
21627
21718
  });
21628
21719
  }
21629
21720
 
21630
- function genNormalBounds(item) {
21631
- const bounds = item.AABBBounds;
21632
- return {
21633
- x1: bounds.x1,
21634
- x2: bounds.x2,
21635
- y1: bounds.y1,
21636
- y2: bounds.y2,
21637
- centerX: item.attribute.x,
21638
- centerY: item.attribute.y,
21639
- angle: item.attribute.angle
21640
- };
21641
- }
21642
- function genRotateBounds(items) {
21643
- items.forEach(item => {
21644
- if (item.rotatedBounds || !item.attribute.angle) return;
21645
- const bounds = genNormalBounds(item),
21646
- rotatedCenter = rotatePoint({
21647
- x: item.attribute.x,
21648
- y: item.attribute.y
21649
- }, bounds.angle, {
21650
- x: bounds.centerX,
21651
- y: bounds.centerY
21652
- }),
21653
- deltaX = rotatedCenter.x - bounds.centerX,
21654
- deltaY = rotatedCenter.y - bounds.centerY;
21655
- bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
21656
- });
21657
- }
21658
- function itemIntersect(item1, item2) {
21659
- var _a, _b;
21660
- return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
21661
- }
21662
- const DELTA_ANGLE = Math.sin(Math.PI / 10);
21663
- function isAngleVertical(angle) {
21664
- const hasAngle = !isNil$3(angle) && 0 !== angle,
21665
- cos = hasAngle ? Math.cos(angle) : 1;
21666
- return hasAngle && Math.abs(cos) <= DELTA_ANGLE;
21667
- }
21668
- function isAngleHorizontal(angle) {
21669
- const hasAngle = !isNil$3(angle) && 0 !== angle,
21670
- sin = hasAngle ? Math.sin(angle) : 0;
21671
- return !hasAngle || Math.abs(sin) <= DELTA_ANGLE;
21672
- }
21673
-
21674
21721
  function autoRotate(items, rotateConfig) {
21675
21722
  if (isEmpty$1(items)) return;
21676
21723
  const {
@@ -22906,7 +22953,7 @@
22906
22953
  breakData: breakData
22907
22954
  } = op;
22908
22955
  let scaleTicks;
22909
- if (isValid$3(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$3(forceTickCount)) scaleTicks = getScaleTicks(op, scale, forceTickCount, (count, subDomain) => subDomain && subDomain.length ? scale.domain(subDomain, !0).forceTicks(count) : scale.forceTicks(count));else if ("d3" === op.tickMode) {
22956
+ if (isValid$3(tickStep)) ticks = scale.stepTicks(tickStep), breakDomains = breakData && breakData() ? breakData().breakDomains : null, scaleTicks = breakDomains && breakDomains.length ? ticks.filter(tick => breakDomains.every(breakDomain => tick < breakDomain[0] || tick > breakDomain[1])) : ticks;else if (isValid$3(forceTickCount)) scaleTicks = getScaleTicks(op, scale, forceTickCount, (count, subDomain) => subDomain && subDomain.length ? scale.domain(subDomain, !0).forceTicks(count) : scale.forceTicks(count));else if ("d3" === op.tickMode) {
22910
22957
  const count = null !== (_a = isFunction$3(tickCount) ? tickCount({
22911
22958
  axisLength: rangeSize,
22912
22959
  labelStyle: labelStyle
@@ -22930,19 +22977,30 @@
22930
22977
  customTicks: customTicks
22931
22978
  }));
22932
22979
  }
22980
+ var ticks, breakDomains;
22933
22981
  const domain = scale.domain();
22934
22982
  if (op.labelFirstVisible && domain[0] !== scaleTicks[0] && !scaleTicks.includes(domain[0]) && scaleTicks.unshift(domain[0]), op.labelLastVisible && domain[domain.length - 1] !== scaleTicks[scaleTicks.length - 1] && !scaleTicks.includes(domain[domain.length - 1]) && scaleTicks.push(domain[domain.length - 1]), op.sampling && scaleTicks.length > 1 && ("cartesian" === op.coordinateType || "polar" === op.coordinateType && "radius" === op.axisOrientType)) {
22935
22983
  const {
22936
- labelGap = 4,
22937
- labelFlush: labelFlush
22938
- } = op;
22939
- let items = getCartesianLabelBounds(scale, scaleTicks, op).map((bounds, i) => ({
22984
+ labelGap = 4,
22985
+ labelFlush: labelFlush
22986
+ } = op,
22987
+ MIN_FONT_SIZE = 6;
22988
+ let items;
22989
+ if (scaleTicks.length * MIN_FONT_SIZE > rangeSize) {
22990
+ const samplingScaleTicks = [],
22991
+ step = Math.floor(scaleTicks.length * MIN_FONT_SIZE / rangeSize);
22992
+ scaleTicks.forEach((tick, index) => {
22993
+ index % step != 0 && index !== scaleTicks.length - 1 || samplingScaleTicks.push(tick);
22994
+ }), items = getCartesianLabelBounds(scale, samplingScaleTicks, op).map((bounds, i) => ({
22995
+ AABBBounds: bounds,
22996
+ value: samplingScaleTicks[i]
22997
+ }));
22998
+ } else items = getCartesianLabelBounds(scale, scaleTicks, op).map((bounds, i) => ({
22940
22999
  AABBBounds: bounds,
22941
23000
  value: scaleTicks[i]
22942
23001
  }));
22943
- const source = [...items],
22944
- firstSourceItem = source[0],
22945
- lastSourceItem = last$1(source),
23002
+ const firstSourceItem = items[0],
23003
+ lastSourceItem = last$1(items),
22946
23004
  samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
22947
23005
  for (; items.length >= 3 && hasOverlap(items, labelGap);) items = samplingMethod(items, labelGap);
22948
23006
  const checkFirst = op.labelFirstVisible;
@@ -23512,7 +23570,8 @@
23512
23570
  } = this.attribute,
23513
23571
  {
23514
23572
  spaceCol = DEFAULT_ITEM_SPACE_COL,
23515
- spaceRow = DEFAULT_ITEM_SPACE_ROW
23573
+ spaceRow = DEFAULT_ITEM_SPACE_ROW,
23574
+ verticalAlign = "middle"
23516
23575
  } = itemAttrs,
23517
23576
  itemsContainer = this._itemsContainer,
23518
23577
  {
@@ -23531,7 +23590,9 @@
23531
23590
  startY: startY,
23532
23591
  pages: pages
23533
23592
  } = this._itemContext,
23534
- lastItemWidth = 0;
23593
+ lastItemWidth = 0,
23594
+ lastLineHeight = 0;
23595
+ const lastLineItemGroup = [];
23535
23596
  for (let index = startIndex, len = legendItems.length; index < len && !(lazyload && pages > this._itemContext.currentPage * maxPages); index++) {
23536
23597
  lazyload && (this._itemContext.startIndex = index + 1), item = legendItems[index], item.id || (item.id = item.label), item.index = index;
23537
23598
  let isSelected = !0;
@@ -23539,15 +23600,23 @@
23539
23600
  const itemGroup = this._renderEachItem(item, isSelected, index, legendItems),
23540
23601
  itemWidth = itemGroup.attribute.width,
23541
23602
  itemHeight = itemGroup.attribute.height;
23542
- this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (isValid$3(maxWidth) && (isScrollbar && autoPage ? (pages = Math.ceil((startX + itemWidth) / maxWidth), doWrap = pages > 1) : startX + itemWidth > maxWidth && (doWrap = !0, startX > 0 && (pages += 1, startX = 0, startY += itemHeight + spaceRow))), 0 === startX && 0 === startY || itemGroup.setAttributes({
23603
+ this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (isValid$3(maxWidth) && (isScrollbar && autoPage ? (pages = Math.ceil((startX + itemWidth) / maxWidth), doWrap = pages > 1) : startX + itemWidth > maxWidth && (doWrap = !0, startX > 0 && ("middle" !== verticalAlign && "bottom" !== verticalAlign || lastLineItemGroup.forEach(i => {
23604
+ i.setAttributes({
23605
+ y: i.attribute.y + (lastLineHeight - i.attribute.height) / ("middle" === verticalAlign ? 2 : 1)
23606
+ });
23607
+ }), pages += 1, startX = 0, startY += lastLineHeight + spaceRow, lastLineHeight = 0, lastLineItemGroup.length = 0))), 0 === startX && 0 === startY || itemGroup.setAttributes({
23543
23608
  x: startX,
23544
23609
  y: startY
23545
- }), startX += spaceCol + itemWidth) : (isValid$3(maxHeight) && (isScrollbar && autoPage ? (pages = Math.ceil((startY + itemHeight) / maxHeight), doWrap = pages > 1) : maxHeight <= itemHeight ? (pages += 1, doWrap = !0, startY = 0, index > 0 && (startX += lastItemWidth + spaceCol)) : maxHeight < startY + itemHeight && (pages += 1, doWrap = !0, startY = 0, startX += maxWidthInCol + spaceCol, maxWidthInCol = 0)), 0 === startX && 0 === startY || itemGroup.setAttributes({
23610
+ }), startX += spaceCol + itemWidth, lastLineHeight = Math.max(lastLineHeight, itemHeight), lastLineItemGroup.push(itemGroup)) : (isValid$3(maxHeight) && (isScrollbar && autoPage ? (pages = Math.ceil((startY + itemHeight) / maxHeight), doWrap = pages > 1) : maxHeight <= itemHeight ? (pages += 1, doWrap = !0, startY = 0, index > 0 && (startX += lastItemWidth + spaceCol)) : maxHeight < startY + itemHeight && (pages += 1, doWrap = !0, startY = 0, startX += maxWidthInCol + spaceCol, maxWidthInCol = 0)), 0 === startX && 0 === startY || itemGroup.setAttributes({
23546
23611
  x: startX,
23547
23612
  y: startY
23548
23613
  }), startY += spaceRow + itemHeight), itemsContainer.add(itemGroup), lastItemWidth = itemWidth;
23549
23614
  }
23550
- return this._itemContext.doWrap = doWrap, this._itemContext.startX = startX, this._itemContext.startY = startY, this._itemContext.maxWidthInCol = maxWidthInCol, this._itemContext.pages = pages, this._itemContext.maxPages = maxPages, isScrollbar && (this._itemContext.totalPage = pages), lazyload || (this._itemContext.startIndex = legendItems.length), this._itemContext;
23615
+ return !isHorizontal || "middle" !== verticalAlign && "bottom" !== verticalAlign || lastLineItemGroup.forEach(i => {
23616
+ i.setAttributes({
23617
+ y: i.attribute.y + (lastLineHeight - i.attribute.height) / ("middle" === verticalAlign ? 2 : 1)
23618
+ });
23619
+ }), this._itemContext.doWrap = doWrap, this._itemContext.startX = startX, this._itemContext.startY = startY, this._itemContext.maxWidthInCol = maxWidthInCol, this._itemContext.pages = pages, this._itemContext.maxPages = maxPages, isScrollbar && (this._itemContext.totalPage = pages), lazyload || (this._itemContext.startIndex = legendItems.length), this._itemContext;
23551
23620
  }
23552
23621
  _renderContent() {
23553
23622
  const {
@@ -38774,7 +38843,7 @@
38774
38843
  const distHeight = maxHeight;
38775
38844
  const cell = scene.highPerformanceGetCell(col, row);
38776
38845
  if (cell.role === 'empty') {
38777
- return;
38846
+ continue;
38778
38847
  }
38779
38848
  updateCellHeightForRow(scene, cell, col, row, distHeight, distHeight - cell.attribute.height, scene.table.isHeader(col, row));
38780
38849
  }
@@ -41272,7 +41341,7 @@
41272
41341
  if (strokeArrayColor && strokeArrayColor[0]) {
41273
41342
  context.strokeStyle = strokeArrayColor[0];
41274
41343
  }
41275
- else {
41344
+ else if (strokeArrayColor && !strokeArrayColor[0]) {
41276
41345
  context.strokeStyle = 'transparent';
41277
41346
  }
41278
41347
  if (!isWidthNumber) {
@@ -41306,7 +41375,7 @@
41306
41375
  if (strokeArrayColor && strokeArrayColor[1]) {
41307
41376
  context.strokeStyle = strokeArrayColor[1];
41308
41377
  }
41309
- else {
41378
+ else if (strokeArrayColor && !strokeArrayColor[1]) {
41310
41379
  context.strokeStyle = 'transparent';
41311
41380
  }
41312
41381
  if (!isWidthNumber) {
@@ -41340,7 +41409,7 @@
41340
41409
  if (strokeArrayColor && strokeArrayColor[2]) {
41341
41410
  context.strokeStyle = strokeArrayColor[2];
41342
41411
  }
41343
- else {
41412
+ else if (strokeArrayColor && !strokeArrayColor[2]) {
41344
41413
  context.strokeStyle = 'transparent';
41345
41414
  }
41346
41415
  if (!isWidthNumber) {
@@ -41374,7 +41443,7 @@
41374
41443
  if (strokeArrayColor && strokeArrayColor[3]) {
41375
41444
  context.strokeStyle = strokeArrayColor[3];
41376
41445
  }
41377
- else {
41446
+ else if (strokeArrayColor && !strokeArrayColor[3]) {
41378
41447
  context.strokeStyle = 'transparent';
41379
41448
  }
41380
41449
  if (!isWidthNumber) {
@@ -41851,7 +41920,7 @@
41851
41920
  if (strokeArrayColor && strokeArrayColor[0]) {
41852
41921
  context.strokeStyle = strokeArrayColor[0];
41853
41922
  }
41854
- else {
41923
+ else if (strokeArrayColor && !strokeArrayColor[0]) {
41855
41924
  context.strokeStyle = 'transparent';
41856
41925
  }
41857
41926
  if (!isWidthNumber) {
@@ -41877,7 +41946,7 @@
41877
41946
  if (strokeArrayColor && strokeArrayColor[1]) {
41878
41947
  context.strokeStyle = strokeArrayColor[1];
41879
41948
  }
41880
- else {
41949
+ else if (strokeArrayColor && !strokeArrayColor[1]) {
41881
41950
  context.strokeStyle = 'transparent';
41882
41951
  }
41883
41952
  if (!isWidthNumber) {
@@ -41904,7 +41973,7 @@
41904
41973
  if (strokeArrayColor && strokeArrayColor[2]) {
41905
41974
  context.strokeStyle = strokeArrayColor[2];
41906
41975
  }
41907
- else {
41976
+ else if (strokeArrayColor && !strokeArrayColor[2]) {
41908
41977
  context.strokeStyle = 'transparent';
41909
41978
  }
41910
41979
  if (!isWidthNumber) {
@@ -41931,7 +42000,7 @@
41931
42000
  if (strokeArrayColor && strokeArrayColor[3]) {
41932
42001
  context.strokeStyle = strokeArrayColor[3];
41933
42002
  }
41934
- else {
42003
+ else if (strokeArrayColor && !strokeArrayColor[3]) {
41935
42004
  context.strokeStyle = 'transparent';
41936
42005
  }
41937
42006
  if (!isWidthNumber) {
@@ -42984,17 +43053,17 @@
42984
43053
  if (table.widthMode === 'adaptive' ||
42985
43054
  (table.options.autoWrapText && (table.heightMode === 'adaptive' || table.isAutoRowHeight()))) {
42986
43055
  distColForCompute = table.colCount - 1;
42987
- distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1);
43056
+ distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);
42988
43057
  }
42989
43058
  else {
42990
- distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1);
43059
+ distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);
42991
43060
  }
42992
43061
  if (table.heightMode === 'adaptive') {
42993
43062
  distRowForCompute = table.rowCount - 1;
42994
- distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1);
43063
+ distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);
42995
43064
  }
42996
43065
  else {
42997
- distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1);
43066
+ distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);
42998
43067
  }
42999
43068
  if (table.internalProps._widthResizedColMap.size === 0) {
43000
43069
  computeColsWidth(table, 0, distColForCompute ?? distCol);
@@ -43088,14 +43157,14 @@
43088
43157
 
43089
43158
  function getFirstChild(containerGroup) {
43090
43159
  let child = containerGroup.firstChild;
43091
- while (child.type !== 'group') {
43160
+ while (child && child.type !== 'group') {
43092
43161
  child = child._next;
43093
43162
  }
43094
43163
  return child;
43095
43164
  }
43096
43165
  function getLastChild(containerGroup) {
43097
43166
  let child = containerGroup.lastChild;
43098
- while (child.type !== 'group') {
43167
+ while (child && child.type !== 'group') {
43099
43168
  child = child._prev;
43100
43169
  }
43101
43170
  return child;
@@ -43343,6 +43412,9 @@
43343
43412
  const colGroup = proxy.table.scenegraph.getColGroup(col);
43344
43413
  colGroup && updateColGroupContentAsync(colGroup, proxy);
43345
43414
  }
43415
+ updateColumnContainerWidth(proxy.table.scenegraph.colHeaderGroup);
43416
+ updateColumnContainerWidth(proxy.table.scenegraph.bottomFrozenGroup);
43417
+ updateColumnContainerWidth(proxy.table.scenegraph.bodyGroup);
43346
43418
  proxy.progress();
43347
43419
  }
43348
43420
  function updateAllColPosition(distStartColY, count, direction, proxy) {
@@ -43368,6 +43440,14 @@
43368
43440
  }
43369
43441
  });
43370
43442
  }
43443
+ function updateColumnContainerWidth(containerGroup) {
43444
+ const lastColGroup = getLastChild(containerGroup);
43445
+ if (!lastColGroup) {
43446
+ return;
43447
+ }
43448
+ containerGroup.setAttribute('width', lastColGroup.attribute.x + lastColGroup.attribute.width);
43449
+ containerGroup.border?.setAttribute('width', lastColGroup.attribute.x + lastColGroup.attribute.width);
43450
+ }
43371
43451
 
43372
43452
  function updateAutoRow(colStart, colEnd, rowStart, rowEnd, table, direction = 'up', part) {
43373
43453
  if (direction === 'up') {
@@ -47404,14 +47484,23 @@
47404
47484
  this.hasFrozen = false;
47405
47485
  this.mergeMap.clear();
47406
47486
  this.colHeaderGroup.clear();
47487
+ delete this.colHeaderGroup.border;
47407
47488
  this.rowHeaderGroup.clear();
47489
+ delete this.rowHeaderGroup.border;
47408
47490
  this.cornerHeaderGroup.clear();
47491
+ delete this.cornerHeaderGroup.border;
47409
47492
  this.bodyGroup.clear();
47493
+ delete this.bodyGroup.border;
47410
47494
  this.bottomFrozenGroup.clear();
47495
+ delete this.bottomFrozenGroup.border;
47411
47496
  this.rightFrozenGroup.clear();
47497
+ delete this.rightFrozenGroup.border;
47412
47498
  this.rightTopCornerGroup.clear();
47499
+ delete this.rightTopCornerGroup.border;
47413
47500
  this.rightBottomCornerGroup.clear();
47501
+ delete this.rightBottomCornerGroup.border;
47414
47502
  this.leftBottomCornerGroup.clear();
47503
+ delete this.leftBottomCornerGroup.border;
47415
47504
  this.colHeaderGroup.setAttributes({
47416
47505
  x: 0,
47417
47506
  y: 0,
@@ -58526,7 +58615,7 @@
58526
58615
  return TABLE_EVENT_TYPE;
58527
58616
  }
58528
58617
  options;
58529
- version = "1.14.1";
58618
+ version = "1.14.2";
58530
58619
  pagination;
58531
58620
  id = `VTable${Date.now()}`;
58532
58621
  headerStyleCache;
@@ -79083,7 +79172,7 @@
79083
79172
  }
79084
79173
 
79085
79174
  registerForVrender();
79086
- const version = "1.14.1";
79175
+ const version = "1.14.2";
79087
79176
  function getIcons() {
79088
79177
  return get$2();
79089
79178
  }