@visactor/vtable-gantt 1.17.3-alpha.12 → 1.17.3-alpha.13

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.
@@ -624,7 +624,7 @@
624
624
  const VGlobal = Symbol.for("VGlobal");
625
625
  const DEFAULT_TEXT_FONT_FAMILY$2 = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
626
626
 
627
- var __decorate$16 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
627
+ var __decorate$17 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
628
628
  var d,
629
629
  c = arguments.length,
630
630
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -830,7 +830,7 @@
830
830
  return this._env || this.setEnv("browser"), this.envContribution.getElementTopLeft(dom, baseWindow);
831
831
  }
832
832
  };
833
- DefaultGlobal = __decorate$16([injectable(), __param$A(0, inject(ContributionProvider)), __param$A(0, named(EnvContribution)), __metadata$M("design:paramtypes", [Object])], DefaultGlobal);
833
+ DefaultGlobal = __decorate$17([injectable(), __param$A(0, inject(ContributionProvider)), __param$A(0, named(EnvContribution)), __metadata$M("design:paramtypes", [Object])], DefaultGlobal);
834
834
 
835
835
  var MeasureModeEnum;
836
836
  !function (MeasureModeEnum) {
@@ -4910,7 +4910,7 @@
4910
4910
  return "number" != typeof measurement.actualBoundingBoxAscent || "number" != typeof measurement.actualBoundingBoxDescent ? (result.width = Math.floor(measurement.width), result.height = character.fontSize || 0, result.ascent = result.height, result.descent = 0) : (result.width = Math.floor(measurement.width), result.height = Math.floor(measurement.actualBoundingBoxAscent + measurement.actualBoundingBoxDescent), result.ascent = Math.floor(measurement.actualBoundingBoxAscent), result.descent = result.height - result.ascent), result;
4911
4911
  }
4912
4912
 
4913
- var __decorate$15 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
4913
+ var __decorate$16 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
4914
4914
  var d,
4915
4915
  c = arguments.length,
4916
4916
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -5302,9 +5302,9 @@
5302
5302
  return data.str = data.result, data.width += suffixWidth, data;
5303
5303
  }
5304
5304
  };
5305
- ATextMeasure = __decorate$15([injectable()], ATextMeasure);
5305
+ ATextMeasure = __decorate$16([injectable()], ATextMeasure);
5306
5306
 
5307
- var __decorate$14 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
5307
+ var __decorate$15 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
5308
5308
  var d,
5309
5309
  c = arguments.length,
5310
5310
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -5313,7 +5313,7 @@
5313
5313
  };
5314
5314
  const TextMeasureContribution = Symbol.for("TextMeasureContribution");
5315
5315
  let DefaultTextMeasureContribution = class extends ATextMeasure {};
5316
- DefaultTextMeasureContribution = __decorate$14([injectable()], DefaultTextMeasureContribution);
5316
+ DefaultTextMeasureContribution = __decorate$15([injectable()], DefaultTextMeasureContribution);
5317
5317
 
5318
5318
  const container = new Container$2();
5319
5319
 
@@ -5375,7 +5375,7 @@
5375
5375
  }
5376
5376
  const canvasAllocate = new DefaultCanvasAllocate();
5377
5377
 
5378
- var __decorate$13 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
5378
+ var __decorate$14 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
5379
5379
  var d,
5380
5380
  c = arguments.length,
5381
5381
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -5519,9 +5519,9 @@
5519
5519
  return this._handler.getTopLeft(baseWindow);
5520
5520
  }
5521
5521
  };
5522
- DefaultWindow = __decorate$13([injectable(), __metadata$L("design:paramtypes", [])], DefaultWindow);
5522
+ DefaultWindow = __decorate$14([injectable(), __metadata$L("design:paramtypes", [])], DefaultWindow);
5523
5523
 
5524
- var __decorate$12 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
5524
+ var __decorate$13 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
5525
5525
  var d,
5526
5526
  c = arguments.length,
5527
5527
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -5626,7 +5626,7 @@
5626
5626
  return c.nativeCanvas ? c.nativeCanvas : null;
5627
5627
  }
5628
5628
  };
5629
- DefaultGraphicUtil = __decorate$12([injectable(), __param$z(0, inject(ContributionProvider)), __param$z(0, named(TextMeasureContribution)), __metadata$K("design:paramtypes", [Object])], DefaultGraphicUtil);
5629
+ DefaultGraphicUtil = __decorate$13([injectable(), __param$z(0, inject(ContributionProvider)), __param$z(0, named(TextMeasureContribution)), __metadata$K("design:paramtypes", [Object])], DefaultGraphicUtil);
5630
5630
  var TransformMode;
5631
5631
  !function (TransformMode) {
5632
5632
  TransformMode[TransformMode.transform = 0] = "transform", TransformMode[TransformMode.matrix = 1] = "matrix";
@@ -5684,7 +5684,7 @@
5684
5684
  return this;
5685
5685
  }
5686
5686
  };
5687
- DefaultTransformUtil = __decorate$12([injectable(), __metadata$K("design:paramtypes", [])], DefaultTransformUtil);
5687
+ DefaultTransformUtil = __decorate$13([injectable(), __metadata$K("design:paramtypes", [])], DefaultTransformUtil);
5688
5688
 
5689
5689
  const defaultThemeObj = {
5690
5690
  arc: DefaultArcAttribute,
@@ -9103,7 +9103,7 @@
9103
9103
  const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
9104
9104
 
9105
9105
  var DefaultLayerService_1,
9106
- __decorate$11 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9106
+ __decorate$12 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9107
9107
  var d,
9108
9108
  c = arguments.length,
9109
9109
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9174,7 +9174,7 @@
9174
9174
  this.layerMap.delete(stage);
9175
9175
  }
9176
9176
  };
9177
- DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0, DefaultLayerService = DefaultLayerService_1 = __decorate$11([injectable(), __metadata$J("design:paramtypes", [])], DefaultLayerService);
9177
+ DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0, DefaultLayerService = DefaultLayerService_1 = __decorate$12([injectable(), __metadata$J("design:paramtypes", [])], DefaultLayerService);
9178
9178
 
9179
9179
  var coreModule = new ContainerModule(bind => {
9180
9180
  bind(VGlobal).to(DefaultGlobal).inSingletonScope(), bind(VWindow).to(DefaultWindow), bind(GraphicUtil).to(DefaultGraphicUtil).inSingletonScope(), bind(TransformUtil).to(DefaultTransformUtil).inSingletonScope(), bind(LayerService).to(DefaultLayerService).inSingletonScope();
@@ -9680,7 +9680,7 @@
9680
9680
  const matrixAllocate = new DefaultMatrixAllocate();
9681
9681
  const mat4Allocate = new DefaultMat4Allocate();
9682
9682
 
9683
- var __decorate$10 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9683
+ var __decorate$11 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9684
9684
  var d,
9685
9685
  c = arguments.length,
9686
9686
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9870,7 +9870,7 @@
9870
9870
  };
9871
9871
  }
9872
9872
  };
9873
- DefaultGraphicService = __decorate$10([injectable(), __param$y(0, inject(GraphicCreator$1)), __metadata$I("design:paramtypes", [Object])], DefaultGraphicService);
9873
+ DefaultGraphicService = __decorate$11([injectable(), __param$y(0, inject(GraphicCreator$1)), __metadata$I("design:paramtypes", [Object])], DefaultGraphicService);
9874
9874
 
9875
9875
  const result = {
9876
9876
  x: 0,
@@ -10010,7 +10010,7 @@
10010
10010
  }
10011
10011
  }
10012
10012
 
10013
- var __decorate$$ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10013
+ var __decorate$10 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10014
10014
  var d,
10015
10015
  c = arguments.length,
10016
10016
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10094,7 +10094,7 @@
10094
10094
  });
10095
10095
  }
10096
10096
  };
10097
- DefaultBaseInteractiveRenderContribution = __decorate$$([injectable(), __param$x(0, inject(ContributionProvider)), __param$x(0, named(InteractiveSubRenderContribution)), __metadata$H("design:paramtypes", [Object])], DefaultBaseInteractiveRenderContribution);
10097
+ DefaultBaseInteractiveRenderContribution = __decorate$10([injectable(), __param$x(0, inject(ContributionProvider)), __param$x(0, named(InteractiveSubRenderContribution)), __metadata$H("design:paramtypes", [Object])], DefaultBaseInteractiveRenderContribution);
10098
10098
 
10099
10099
  class DefaultBaseTextureRenderContribution {
10100
10100
  constructor() {
@@ -10392,7 +10392,7 @@
10392
10392
  return !edgeCb && path.closePath(), path;
10393
10393
  }
10394
10394
 
10395
- var __decorate$_ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10395
+ var __decorate$$ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10396
10396
  var d,
10397
10397
  c = arguments.length,
10398
10398
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10456,7 +10456,7 @@
10456
10456
  Array.isArray(stroke) && stroke.some(s => !1 === s) && (doFillOrStroke.doStroke = !1);
10457
10457
  }
10458
10458
  };
10459
- SplitRectBeforeRenderContribution$1 = __decorate$_([injectable()], SplitRectBeforeRenderContribution$1);
10459
+ SplitRectBeforeRenderContribution$1 = __decorate$$([injectable()], SplitRectBeforeRenderContribution$1);
10460
10460
  let SplitRectAfterRenderContribution$1 = class SplitRectAfterRenderContribution {
10461
10461
  constructor() {
10462
10462
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
@@ -10492,7 +10492,7 @@
10492
10492
  }
10493
10493
  }
10494
10494
  };
10495
- SplitRectAfterRenderContribution$1 = __decorate$_([injectable()], SplitRectAfterRenderContribution$1);
10495
+ SplitRectAfterRenderContribution$1 = __decorate$$([injectable()], SplitRectAfterRenderContribution$1);
10496
10496
  const defaultRectRenderContribution = new DefaultRectRenderContribution();
10497
10497
  const defaultRectTextureRenderContribution = defaultBaseTextureRenderContribution;
10498
10498
  const defaultRectBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
@@ -10570,7 +10570,7 @@
10570
10570
  }
10571
10571
  }
10572
10572
 
10573
- var __decorate$Z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10573
+ var __decorate$_ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10574
10574
  var d,
10575
10575
  c = arguments.length,
10576
10576
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10744,9 +10744,9 @@
10744
10744
  this._draw(arc, arcAttribute, !1, drawContext, params);
10745
10745
  }
10746
10746
  };
10747
- DefaultCanvasArcRender = __decorate$Z([injectable(), __param$w(0, inject(ContributionProvider)), __param$w(0, named(ArcRenderContribution)), __metadata$G("design:paramtypes", [Object])], DefaultCanvasArcRender);
10747
+ DefaultCanvasArcRender = __decorate$_([injectable(), __param$w(0, inject(ContributionProvider)), __param$w(0, named(ArcRenderContribution)), __metadata$G("design:paramtypes", [Object])], DefaultCanvasArcRender);
10748
10748
 
10749
- var __decorate$Y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10749
+ var __decorate$Z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10750
10750
  var d,
10751
10751
  c = arguments.length,
10752
10752
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10797,7 +10797,7 @@
10797
10797
  this._draw(circle, circleAttribute, !1, drawContext, params);
10798
10798
  }
10799
10799
  };
10800
- DefaultCanvasCircleRender = __decorate$Y([injectable(), __param$v(0, inject(ContributionProvider)), __param$v(0, named(CircleRenderContribution)), __metadata$F("design:paramtypes", [Object])], DefaultCanvasCircleRender);
10800
+ DefaultCanvasCircleRender = __decorate$Z([injectable(), __param$v(0, inject(ContributionProvider)), __param$v(0, named(CircleRenderContribution)), __metadata$F("design:paramtypes", [Object])], DefaultCanvasCircleRender);
10801
10801
 
10802
10802
  function drawSegItem(ctx, curve, endPercent, params) {
10803
10803
  if (!curve.p1) return;
@@ -10921,7 +10921,7 @@
10921
10921
  });
10922
10922
  }
10923
10923
 
10924
- var __decorate$X = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10924
+ var __decorate$Y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10925
10925
  var d,
10926
10926
  c = arguments.length,
10927
10927
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -11082,7 +11082,7 @@
11082
11082
  } else this.drawSegmentItem(context, line.cache, !!fill, !!stroke, fillOpacity, strokeOpacity, line.attribute, lineAttribute, clipRange, clipRangeByDimension, x, y, line, fillCb, strokeCb);
11083
11083
  }
11084
11084
  };
11085
- DefaultCanvasLineRender = __decorate$X([injectable()], DefaultCanvasLineRender);
11085
+ DefaultCanvasLineRender = __decorate$Y([injectable()], DefaultCanvasLineRender);
11086
11086
 
11087
11087
  function drawAreaSegments(path, segPath, percent, params) {
11088
11088
  var _a;
@@ -11211,7 +11211,7 @@
11211
11211
  const defaultAreaTextureRenderContribution = new DefaultAreaTextureRenderContribution();
11212
11212
  const defaultAreaBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
11213
11213
 
11214
- var __decorate$W = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11214
+ var __decorate$X = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11215
11215
  var d,
11216
11216
  c = arguments.length,
11217
11217
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -11464,12 +11464,12 @@
11464
11464
  })(), !1;
11465
11465
  }
11466
11466
  };
11467
- DefaultCanvasAreaRender = __decorate$W([injectable(), __param$u(0, inject(ContributionProvider)), __param$u(0, named(AreaRenderContribution)), __metadata$E("design:paramtypes", [Object])], DefaultCanvasAreaRender);
11467
+ DefaultCanvasAreaRender = __decorate$X([injectable(), __param$u(0, inject(ContributionProvider)), __param$u(0, named(AreaRenderContribution)), __metadata$E("design:paramtypes", [Object])], DefaultCanvasAreaRender);
11468
11468
 
11469
11469
  const defaultPathTextureRenderContribution = defaultBaseTextureRenderContribution;
11470
11470
  const defaultPathBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
11471
11471
 
11472
- var __decorate$V = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11472
+ var __decorate$W = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11473
11473
  var d,
11474
11474
  c = arguments.length,
11475
11475
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -11523,9 +11523,9 @@
11523
11523
  this.tempTheme = pathAttribute, this._draw(path, pathAttribute, !1, drawContext, params), this.tempTheme = null;
11524
11524
  }
11525
11525
  };
11526
- DefaultCanvasPathRender = __decorate$V([injectable(), __param$t(0, inject(ContributionProvider)), __param$t(0, named(PathRenderContribution)), __metadata$D("design:paramtypes", [Object])], DefaultCanvasPathRender);
11526
+ DefaultCanvasPathRender = __decorate$W([injectable(), __param$t(0, inject(ContributionProvider)), __param$t(0, named(PathRenderContribution)), __metadata$D("design:paramtypes", [Object])], DefaultCanvasPathRender);
11527
11527
 
11528
- var __decorate$U = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11528
+ var __decorate$V = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11529
11529
  var d,
11530
11530
  c = arguments.length,
11531
11531
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -11594,9 +11594,9 @@
11594
11594
  this.tempTheme = rectAttribute, this._draw(rect, rectAttribute, !1, drawContext, params), this.tempTheme = null;
11595
11595
  }
11596
11596
  };
11597
- DefaultCanvasRectRender = __decorate$U([injectable(), __param$s(0, inject(ContributionProvider)), __param$s(0, named(RectRenderContribution)), __metadata$C("design:paramtypes", [Object])], DefaultCanvasRectRender);
11597
+ DefaultCanvasRectRender = __decorate$V([injectable(), __param$s(0, inject(ContributionProvider)), __param$s(0, named(RectRenderContribution)), __metadata$C("design:paramtypes", [Object])], DefaultCanvasRectRender);
11598
11598
 
11599
- var __decorate$T = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11599
+ var __decorate$U = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11600
11600
  var d,
11601
11601
  c = arguments.length,
11602
11602
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -11674,7 +11674,7 @@
11674
11674
  this._draw(symbol, symbolAttribute, !1, drawContext, params);
11675
11675
  }
11676
11676
  };
11677
- DefaultCanvasSymbolRender = __decorate$T([injectable(), __param$r(0, inject(ContributionProvider)), __param$r(0, named(SymbolRenderContribution)), __metadata$B("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
11677
+ DefaultCanvasSymbolRender = __decorate$U([injectable(), __param$r(0, inject(ContributionProvider)), __param$r(0, named(SymbolRenderContribution)), __metadata$B("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
11678
11678
 
11679
11679
  class DefaultBoundsAllocate {
11680
11680
  constructor() {
@@ -11779,7 +11779,7 @@
11779
11779
  }
11780
11780
  const defaultTextBackgroundRenderContribution = new DefaultTextBackgroundRenderContribution();
11781
11781
 
11782
- var __decorate$S = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11782
+ var __decorate$T = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11783
11783
  var d,
11784
11784
  c = arguments.length,
11785
11785
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -11928,7 +11928,7 @@
11928
11928
  }
11929
11929
  }
11930
11930
  };
11931
- DefaultCanvasTextRender = __decorate$S([injectable(), __param$q(0, inject(ContributionProvider)), __param$q(0, named(TextRenderContribution)), __metadata$A("design:paramtypes", [Object])], DefaultCanvasTextRender);
11931
+ DefaultCanvasTextRender = __decorate$T([injectable(), __param$q(0, inject(ContributionProvider)), __param$q(0, named(TextRenderContribution)), __metadata$A("design:paramtypes", [Object])], DefaultCanvasTextRender);
11932
11932
 
11933
11933
  function drawPolygon(path, points, x, y) {
11934
11934
  path.moveTo(points[0].x + x, points[0].y + y);
@@ -11984,7 +11984,7 @@
11984
11984
  const defaultPolygonTextureRenderContribution = defaultBaseTextureRenderContribution;
11985
11985
  const defaultPolygonBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
11986
11986
 
11987
- var __decorate$R = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11987
+ var __decorate$S = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11988
11988
  var d,
11989
11989
  c = arguments.length,
11990
11990
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -12035,9 +12035,9 @@
12035
12035
  this._draw(polygon, polygonAttribute, !1, drawContext, params);
12036
12036
  }
12037
12037
  };
12038
- DefaultCanvasPolygonRender = __decorate$R([injectable(), __param$p(0, inject(ContributionProvider)), __param$p(0, named(PolygonRenderContribution)), __metadata$z("design:paramtypes", [Object])], DefaultCanvasPolygonRender);
12038
+ DefaultCanvasPolygonRender = __decorate$S([injectable(), __param$p(0, inject(ContributionProvider)), __param$p(0, named(PolygonRenderContribution)), __metadata$z("design:paramtypes", [Object])], DefaultCanvasPolygonRender);
12039
12039
 
12040
- var __decorate$Q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12040
+ var __decorate$R = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12041
12041
  var d,
12042
12042
  c = arguments.length,
12043
12043
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -12141,9 +12141,9 @@
12141
12141
  }) : clip ? context.restore() : context.highPerformanceRestore();
12142
12142
  }
12143
12143
  };
12144
- DefaultCanvasGroupRender = __decorate$Q([injectable(), __param$o(0, inject(ContributionProvider)), __param$o(0, named(GroupRenderContribution)), __metadata$y("design:paramtypes", [Object])], DefaultCanvasGroupRender);
12144
+ DefaultCanvasGroupRender = __decorate$R([injectable(), __param$o(0, inject(ContributionProvider)), __param$o(0, named(GroupRenderContribution)), __metadata$y("design:paramtypes", [Object])], DefaultCanvasGroupRender);
12145
12145
 
12146
- var __decorate$P = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12146
+ var __decorate$Q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12147
12147
  var d,
12148
12148
  c = arguments.length,
12149
12149
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -12220,7 +12220,7 @@
12220
12220
  this._draw(image, imageAttribute, !1, drawContext);
12221
12221
  }
12222
12222
  };
12223
- DefaultCanvasImageRender = __decorate$P([injectable(), __param$n(0, inject(ContributionProvider)), __param$n(0, named(ImageRenderContribution)), __metadata$x("design:paramtypes", [Object])], DefaultCanvasImageRender);
12223
+ DefaultCanvasImageRender = __decorate$Q([injectable(), __param$n(0, inject(ContributionProvider)), __param$n(0, named(ImageRenderContribution)), __metadata$x("design:paramtypes", [Object])], DefaultCanvasImageRender);
12224
12224
 
12225
12225
  const IncrementalDrawContribution = Symbol.for("IncrementalDrawContribution");
12226
12226
  const ArcRender = Symbol.for("ArcRender");
@@ -12282,7 +12282,7 @@
12282
12282
  return result;
12283
12283
  };
12284
12284
 
12285
- var __decorate$O = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12285
+ var __decorate$P = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12286
12286
  var d,
12287
12287
  c = arguments.length,
12288
12288
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -12349,7 +12349,7 @@
12349
12349
  return !1;
12350
12350
  }
12351
12351
  };
12352
- CommonDrawItemInterceptorContribution = __decorate$O([injectable(), __metadata$w("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
12352
+ CommonDrawItemInterceptorContribution = __decorate$P([injectable(), __metadata$w("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
12353
12353
  class InteractiveDrawItemInterceptorContribution {
12354
12354
  constructor() {
12355
12355
  this.order = 1;
@@ -12440,7 +12440,7 @@
12440
12440
  }
12441
12441
  }
12442
12442
 
12443
- var __decorate$N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12443
+ var __decorate$O = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12444
12444
  var d,
12445
12445
  c = arguments.length,
12446
12446
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -12487,7 +12487,7 @@
12487
12487
  this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params), this.drawParams = null;
12488
12488
  }
12489
12489
  };
12490
- DefaultRenderService = __decorate$N([injectable(), __param$m(0, inject(DrawContribution)), __metadata$v("design:paramtypes", [Object])], DefaultRenderService);
12490
+ DefaultRenderService = __decorate$O([injectable(), __param$m(0, inject(DrawContribution)), __metadata$v("design:paramtypes", [Object])], DefaultRenderService);
12491
12491
 
12492
12492
  var renderModule$1 = new ContainerModule(bind => {
12493
12493
  bind(RenderService).to(DefaultRenderService);
@@ -15271,7 +15271,7 @@
15271
15271
  return new ShadowRoot(graphic);
15272
15272
  }
15273
15273
 
15274
- var __decorate$M = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15274
+ var __decorate$N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15275
15275
  var d,
15276
15276
  c = arguments.length,
15277
15277
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -15309,7 +15309,7 @@
15309
15309
  return context.highPerformanceRestore(), !result.graphic && result.group && "full" === shadowPickMode && (result.graphic = result.group), result;
15310
15310
  }
15311
15311
  };
15312
- ShadowRootPickItemInterceptorContribution = __decorate$M([injectable()], ShadowRootPickItemInterceptorContribution);
15312
+ ShadowRootPickItemInterceptorContribution = __decorate$N([injectable()], ShadowRootPickItemInterceptorContribution);
15313
15313
  let InteractivePickItemInterceptorContribution = class {
15314
15314
  constructor() {
15315
15315
  this.order = 1;
@@ -15328,7 +15328,7 @@
15328
15328
  return null;
15329
15329
  }
15330
15330
  };
15331
- InteractivePickItemInterceptorContribution = __decorate$M([injectable()], InteractivePickItemInterceptorContribution);
15331
+ InteractivePickItemInterceptorContribution = __decorate$N([injectable()], InteractivePickItemInterceptorContribution);
15332
15332
  let Canvas3DPickItemInterceptor = class {
15333
15333
  constructor() {
15334
15334
  this.order = 1;
@@ -15348,7 +15348,7 @@
15348
15348
  context.setTransformForCurrent();
15349
15349
  }
15350
15350
  };
15351
- Canvas3DPickItemInterceptor = __decorate$M([injectable()], Canvas3DPickItemInterceptor);
15351
+ Canvas3DPickItemInterceptor = __decorate$N([injectable()], Canvas3DPickItemInterceptor);
15352
15352
 
15353
15353
  var pickModule = new ContainerModule((bind, unbind, isBound) => {
15354
15354
  isBound(PickerService) || (bind(GlobalPickerService).toSelf(), bind(PickerService).toService(GlobalPickerService)), bind(Canvas3DPickItemInterceptor).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(Canvas3DPickItemInterceptor), bind(ShadowRootPickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(ShadowRootPickItemInterceptorContribution), bind(InteractivePickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(InteractivePickItemInterceptorContribution), bindContributionProvider(bind, PickItemInterceptor);
@@ -15361,7 +15361,7 @@
15361
15361
  const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
15362
15362
  const PluginService = Symbol.for("PluginService");
15363
15363
 
15364
- var __decorate$L = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15364
+ var __decorate$M = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15365
15365
  var d,
15366
15366
  c = arguments.length,
15367
15367
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -15411,7 +15411,7 @@
15411
15411
  }), this.onRegisterPlugin = [];
15412
15412
  }
15413
15413
  };
15414
- DefaultPluginService = __decorate$L([injectable(), __param$l(0, inject(ContributionProvider)), __param$l(0, named(AutoEnablePlugins)), __metadata$u("design:paramtypes", [Object])], DefaultPluginService);
15414
+ DefaultPluginService = __decorate$M([injectable(), __param$l(0, inject(ContributionProvider)), __param$l(0, named(AutoEnablePlugins)), __metadata$u("design:paramtypes", [Object])], DefaultPluginService);
15415
15415
 
15416
15416
  var pluginModule = new ContainerModule(bind => {
15417
15417
  bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
@@ -15425,7 +15425,7 @@
15425
15425
  bind(TextMeasureContribution).to(DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
15426
15426
  });
15427
15427
 
15428
- var __decorate$K = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15428
+ var __decorate$L = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15429
15429
  var d,
15430
15430
  c = arguments.length,
15431
15431
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -15502,7 +15502,7 @@
15502
15502
  this.canvas.release();
15503
15503
  }
15504
15504
  };
15505
- CanvasLayerHandlerContribution = __decorate$K([injectable(), __metadata$t("design:paramtypes", [])], CanvasLayerHandlerContribution);
15505
+ CanvasLayerHandlerContribution = __decorate$L([injectable(), __metadata$t("design:paramtypes", [])], CanvasLayerHandlerContribution);
15506
15506
 
15507
15507
  var layerHandlerModules = new ContainerModule(bind => {
15508
15508
  bind(CanvasLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution);
@@ -15621,7 +15621,7 @@
15621
15621
  return result;
15622
15622
  }
15623
15623
 
15624
- var __decorate$J = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15624
+ var __decorate$K = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15625
15625
  var d,
15626
15626
  c = arguments.length,
15627
15627
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -15830,9 +15830,9 @@
15830
15830
  }
15831
15831
  afterDraw(renderService, drawParams) {}
15832
15832
  };
15833
- DefaultDrawContribution = __decorate$J([injectable(), __param$k(0, multiInject(GraphicRender)), __param$k(1, inject(ContributionProvider)), __param$k(1, named(DrawItemInterceptor)), __metadata$s("design:paramtypes", [Array, Object])], DefaultDrawContribution);
15833
+ DefaultDrawContribution = __decorate$K([injectable(), __param$k(0, multiInject(GraphicRender)), __param$k(1, inject(ContributionProvider)), __param$k(1, named(DrawItemInterceptor)), __metadata$s("design:paramtypes", [Array, Object])], DefaultDrawContribution);
15834
15834
 
15835
- var __decorate$I = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15835
+ var __decorate$J = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15836
15836
  var d,
15837
15837
  c = arguments.length,
15838
15838
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -15883,9 +15883,9 @@
15883
15883
  }), context.setShadowBlendStyle && context.setShadowBlendStyle(line, attribute, defaultAttribute), context.setStrokeStyle(line, attribute, offsetX, offsetY, defaultAttribute), context.stroke());
15884
15884
  }
15885
15885
  };
15886
- DefaultIncrementalCanvasLineRender = __decorate$I([injectable()], DefaultIncrementalCanvasLineRender);
15886
+ DefaultIncrementalCanvasLineRender = __decorate$J([injectable()], DefaultIncrementalCanvasLineRender);
15887
15887
 
15888
- var __decorate$H = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15888
+ var __decorate$I = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15889
15889
  var d,
15890
15890
  c = arguments.length,
15891
15891
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -15928,10 +15928,10 @@
15928
15928
  }), context.setShadowBlendStyle && context.setShadowBlendStyle(area, attribute, defaultAttribute), context.setCommonStyle(area, attribute, offsetX, offsetY, defaultAttribute), context.fill());
15929
15929
  }
15930
15930
  };
15931
- DefaultIncrementalCanvasAreaRender = __decorate$H([injectable()], DefaultIncrementalCanvasAreaRender);
15931
+ DefaultIncrementalCanvasAreaRender = __decorate$I([injectable()], DefaultIncrementalCanvasAreaRender);
15932
15932
 
15933
15933
  var STATUS,
15934
- __decorate$G = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15934
+ __decorate$H = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15935
15935
  var d,
15936
15936
  c = arguments.length,
15937
15937
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -16071,7 +16071,7 @@
16071
16071
  });
16072
16072
  }
16073
16073
  };
16074
- DefaultIncrementalDrawContribution = __decorate$G([injectable(), __param$j(0, multiInject(GraphicRender)), __param$j(1, inject(DefaultIncrementalCanvasLineRender)), __param$j(2, inject(DefaultIncrementalCanvasAreaRender)), __param$j(3, inject(ContributionProvider)), __param$j(3, named(DrawItemInterceptor)), __metadata$r("design:paramtypes", [Array, Object, Object, Object])], DefaultIncrementalDrawContribution);
16074
+ DefaultIncrementalDrawContribution = __decorate$H([injectable(), __param$j(0, multiInject(GraphicRender)), __param$j(1, inject(DefaultIncrementalCanvasLineRender)), __param$j(2, inject(DefaultIncrementalCanvasAreaRender)), __param$j(3, inject(ContributionProvider)), __param$j(3, named(DrawItemInterceptor)), __metadata$r("design:paramtypes", [Array, Object, Object, Object])], DefaultIncrementalDrawContribution);
16075
16075
 
16076
16076
  var renderModule = new ContainerModule(bind => {
16077
16077
  bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope(), bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope(), bind(DrawContribution).to(DefaultDrawContribution), bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution), bind(GroupRender).to(DefaultCanvasGroupRender).inSingletonScope(), bind(GraphicRender).toService(GroupRender), bindContributionProvider(bind, GroupRenderContribution), bind(DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope(), bindContributionProvider(bind, InteractiveSubRenderContribution), bindContributionProvider(bind, GraphicRender), bind(CommonDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(CommonDrawItemInterceptorContribution), bindContributionProvider(bind, DrawItemInterceptor);
@@ -16861,7 +16861,7 @@
16861
16861
  }
16862
16862
  BaseCanvas.env = "browser";
16863
16863
 
16864
- var __decorate$F = undefined && undefined.__decorate || function (decorators, target, key, desc) {
16864
+ var __decorate$G = undefined && undefined.__decorate || function (decorators, target, key, desc) {
16865
16865
  var d,
16866
16866
  c = arguments.length,
16867
16867
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -16969,9 +16969,9 @@
16969
16969
  });
16970
16970
  }
16971
16971
  };
16972
- BaseEnvContribution = __decorate$F([injectable()], BaseEnvContribution);
16972
+ BaseEnvContribution = __decorate$G([injectable()], BaseEnvContribution);
16973
16973
 
16974
- var __decorate$E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
16974
+ var __decorate$F = undefined && undefined.__decorate || function (decorators, target, key, desc) {
16975
16975
  var d,
16976
16976
  c = arguments.length,
16977
16977
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17017,9 +17017,9 @@
17017
17017
  return this.modelMatrix;
17018
17018
  }
17019
17019
  };
17020
- BaseWindowHandlerContribution = __decorate$E([injectable(), __metadata$q("design:paramtypes", [])], BaseWindowHandlerContribution);
17020
+ BaseWindowHandlerContribution = __decorate$F([injectable(), __metadata$q("design:paramtypes", [])], BaseWindowHandlerContribution);
17021
17021
 
17022
- var __decorate$D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17022
+ var __decorate$E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17023
17023
  var d,
17024
17024
  c = arguments.length,
17025
17025
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17135,7 +17135,7 @@
17135
17135
  return picker || null;
17136
17136
  }
17137
17137
  };
17138
- DefaultPickService = __decorate$D([injectable(), __param$i(0, inject(ContributionProvider)), __param$i(0, named(PickItemInterceptor)), __metadata$p("design:paramtypes", [Object])], DefaultPickService);
17138
+ DefaultPickService = __decorate$E([injectable(), __param$i(0, inject(ContributionProvider)), __param$i(0, named(PickItemInterceptor)), __metadata$p("design:paramtypes", [Object])], DefaultPickService);
17139
17139
 
17140
17140
  let loadArcModule = !1;
17141
17141
  const arcModule = new ContainerModule(bind => {
@@ -17177,7 +17177,7 @@
17177
17177
  loadPolygonModule || (loadPolygonModule = !0, bind(PolygonRender).to(DefaultCanvasPolygonRender).inSingletonScope(), bind(GraphicRender).toService(PolygonRender), bind(PolygonRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, PolygonRenderContribution));
17178
17178
  });
17179
17179
 
17180
- var __decorate$C = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17180
+ var __decorate$D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17181
17181
  var d,
17182
17182
  c = arguments.length,
17183
17183
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17238,7 +17238,7 @@
17238
17238
  this._draw(richtext, richtextAttribute, !1, drawContext);
17239
17239
  }
17240
17240
  };
17241
- DefaultCanvasRichTextRender = __decorate$C([injectable(), __metadata$o("design:paramtypes", [])], DefaultCanvasRichTextRender);
17241
+ DefaultCanvasRichTextRender = __decorate$D([injectable(), __metadata$o("design:paramtypes", [])], DefaultCanvasRichTextRender);
17242
17242
 
17243
17243
  let loadRichtextModule = !1;
17244
17244
  const richtextModule = new ContainerModule(bind => {
@@ -17905,7 +17905,7 @@
17905
17905
  }
17906
17906
  }
17907
17907
 
17908
- var __decorate$B = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17908
+ var __decorate$C = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17909
17909
  var d,
17910
17910
  c = arguments.length,
17911
17911
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18422,9 +18422,9 @@
18422
18422
  this.stack.forEach(m => matrixAllocate.free(m)), this.stack.length = 0;
18423
18423
  }
18424
18424
  };
18425
- BrowserContext2d.env = "browser", BrowserContext2d = __decorate$B([injectable(), __metadata$n("design:paramtypes", [Object, Number])], BrowserContext2d);
18425
+ BrowserContext2d.env = "browser", BrowserContext2d = __decorate$C([injectable(), __metadata$n("design:paramtypes", [Object, Number])], BrowserContext2d);
18426
18426
 
18427
- var __decorate$A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18427
+ var __decorate$B = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18428
18428
  var d,
18429
18429
  c = arguments.length,
18430
18430
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18493,7 +18493,7 @@
18493
18493
  this._context.dpr = this._dpr;
18494
18494
  }
18495
18495
  };
18496
- BrowserCanvas.env = "browser", BrowserCanvas = __decorate$A([injectable(), __metadata$m("design:paramtypes", [Object])], BrowserCanvas);
18496
+ BrowserCanvas.env = "browser", BrowserCanvas = __decorate$B([injectable(), __metadata$m("design:paramtypes", [Object])], BrowserCanvas);
18497
18497
 
18498
18498
  function createModule(CanvasConstructor, ContextConstructor) {
18499
18499
  return new ContainerModule(bind => {
@@ -18503,7 +18503,7 @@
18503
18503
 
18504
18504
  const browserCanvasModule = createModule(BrowserCanvas, BrowserContext2d);
18505
18505
 
18506
- var __decorate$z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18506
+ var __decorate$A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18507
18507
  var d,
18508
18508
  c = arguments.length,
18509
18509
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18564,9 +18564,9 @@
18564
18564
  return data;
18565
18565
  }
18566
18566
  };
18567
- DefaultCanvasPickerService = __decorate$z([injectable(), __param$h(0, inject(ContributionProvider)), __param$h(0, named(CanvasPickerContribution)), __param$h(1, inject(DrawContribution)), __param$h(2, inject(ContributionProvider)), __param$h(2, named(PickItemInterceptor)), __metadata$l("design:paramtypes", [Object, Object, Object])], DefaultCanvasPickerService);
18567
+ DefaultCanvasPickerService = __decorate$A([injectable(), __param$h(0, inject(ContributionProvider)), __param$h(0, named(CanvasPickerContribution)), __param$h(1, inject(DrawContribution)), __param$h(2, inject(ContributionProvider)), __param$h(2, named(PickItemInterceptor)), __metadata$l("design:paramtypes", [Object, Object, Object])], DefaultCanvasPickerService);
18568
18568
 
18569
- var __decorate$y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18569
+ var __decorate$z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18570
18570
  var d,
18571
18571
  c = arguments.length,
18572
18572
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18581,7 +18581,7 @@
18581
18581
  return !1;
18582
18582
  }
18583
18583
  };
18584
- DefaultCanvasGroupPicker = __decorate$y([injectable()], DefaultCanvasGroupPicker);
18584
+ DefaultCanvasGroupPicker = __decorate$z([injectable()], DefaultCanvasGroupPicker);
18585
18585
 
18586
18586
  const m = new ContainerModule((bind, unbind, isBound, rebind) => {
18587
18587
  m.__vloaded || (m.__vloaded = !0, bind(CanvasGroupPicker).to(DefaultCanvasGroupPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(bind, CanvasPickerContribution));
@@ -18597,7 +18597,7 @@
18597
18597
  }
18598
18598
 
18599
18599
  var BrowserWindowHandlerContribution_1,
18600
- __decorate$x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18600
+ __decorate$y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18601
18601
  var d,
18602
18602
  c = arguments.length,
18603
18603
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18761,12 +18761,12 @@
18761
18761
  return this.global.getElementTopLeft(this.canvas.nativeCanvas, baseWindow);
18762
18762
  }
18763
18763
  };
18764
- BrowserWindowHandlerContribution.env = "browser", BrowserWindowHandlerContribution.idprefix = "visactor_window", BrowserWindowHandlerContribution.prefix_count = 0, BrowserWindowHandlerContribution = BrowserWindowHandlerContribution_1 = __decorate$x([injectable(), __metadata$k("design:paramtypes", [])], BrowserWindowHandlerContribution);
18764
+ BrowserWindowHandlerContribution.env = "browser", BrowserWindowHandlerContribution.idprefix = "visactor_window", BrowserWindowHandlerContribution.prefix_count = 0, BrowserWindowHandlerContribution = BrowserWindowHandlerContribution_1 = __decorate$y([injectable(), __metadata$k("design:paramtypes", [])], BrowserWindowHandlerContribution);
18765
18765
  const browserWindowModule = new ContainerModule(bind => {
18766
18766
  bind(BrowserWindowHandlerContribution).toSelf(), bind(WindowHandlerContribution).toDynamicValue(ctx => ctx.container.get(BrowserWindowHandlerContribution)).whenTargetNamed(BrowserWindowHandlerContribution.env);
18767
18767
  });
18768
18768
 
18769
- var __decorate$w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18769
+ var __decorate$x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18770
18770
  var d,
18771
18771
  c = arguments.length,
18772
18772
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19009,7 +19009,7 @@
19009
19009
  });
19010
19010
  }
19011
19011
  };
19012
- BrowserEnvContribution = __decorate$w([injectable(), __metadata$j("design:paramtypes", [])], BrowserEnvContribution);
19012
+ BrowserEnvContribution = __decorate$x([injectable(), __metadata$j("design:paramtypes", [])], BrowserEnvContribution);
19013
19013
 
19014
19014
  const browserEnvModule = new ContainerModule(bind => {
19015
19015
  browserEnvModule.isBrowserBound || (browserEnvModule.isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
@@ -19050,7 +19050,7 @@
19050
19050
  }
19051
19051
  }
19052
19052
 
19053
- var __decorate$v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19053
+ var __decorate$w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19054
19054
  var d,
19055
19055
  c = arguments.length,
19056
19056
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19070,14 +19070,14 @@
19070
19070
  super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
19071
19071
  }
19072
19072
  };
19073
- DefaultMathArcPicker = __decorate$v([injectable(), __param$g(0, inject(ArcRender)), __metadata$i("design:paramtypes", [Object])], DefaultMathArcPicker);
19073
+ DefaultMathArcPicker = __decorate$w([injectable(), __param$g(0, inject(ArcRender)), __metadata$i("design:paramtypes", [Object])], DefaultMathArcPicker);
19074
19074
 
19075
19075
  let loadArcPick$1 = !1;
19076
19076
  const arcMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19077
19077
  loadArcPick$1 || (loadArcPick$1 = !0, bind(MathArcPicker).to(DefaultMathArcPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathArcPicker));
19078
19078
  });
19079
19079
 
19080
- var __decorate$u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19080
+ var __decorate$v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19081
19081
  var d,
19082
19082
  c = arguments.length,
19083
19083
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19097,14 +19097,14 @@
19097
19097
  super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
19098
19098
  }
19099
19099
  };
19100
- DefaultMathCirclePicker = __decorate$u([injectable(), __param$f(0, inject(CircleRender)), __metadata$h("design:paramtypes", [Object])], DefaultMathCirclePicker);
19100
+ DefaultMathCirclePicker = __decorate$v([injectable(), __param$f(0, inject(CircleRender)), __metadata$h("design:paramtypes", [Object])], DefaultMathCirclePicker);
19101
19101
 
19102
19102
  let loadCirclePick$1 = !1;
19103
19103
  const circleMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19104
19104
  loadCirclePick$1 || (loadCirclePick$1 = !0, bind(MathCirclePicker).to(DefaultMathCirclePicker).inSingletonScope(), bind(MathPickerContribution).toService(MathCirclePicker));
19105
19105
  });
19106
19106
 
19107
- var __decorate$t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19107
+ var __decorate$u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19108
19108
  var d,
19109
19109
  c = arguments.length,
19110
19110
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19122,14 +19122,14 @@
19122
19122
  return !!pickContext && !!image.AABBBounds.containsPoint(point);
19123
19123
  }
19124
19124
  };
19125
- DefaultMathImagePicker = __decorate$t([injectable()], DefaultMathImagePicker);
19125
+ DefaultMathImagePicker = __decorate$u([injectable()], DefaultMathImagePicker);
19126
19126
 
19127
19127
  let loadImagePick$1 = !1;
19128
19128
  const imageMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19129
19129
  loadImagePick$1 || (loadImagePick$1 = !0, bind(MathImagePicker).to(DefaultMathImagePicker).inSingletonScope(), bind(DefaultMathImagePicker).toService(MathImagePicker));
19130
19130
  });
19131
19131
 
19132
- var __decorate$s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19132
+ var __decorate$t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19133
19133
  var d,
19134
19134
  c = arguments.length,
19135
19135
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19149,14 +19149,14 @@
19149
19149
  super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
19150
19150
  }
19151
19151
  };
19152
- DefaultMathLinePicker = __decorate$s([injectable(), __param$e(0, inject(LineRender)), __metadata$g("design:paramtypes", [Object])], DefaultMathLinePicker);
19152
+ DefaultMathLinePicker = __decorate$t([injectable(), __param$e(0, inject(LineRender)), __metadata$g("design:paramtypes", [Object])], DefaultMathLinePicker);
19153
19153
 
19154
19154
  let loadLinePick$1 = !1;
19155
19155
  const lineMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19156
19156
  loadLinePick$1 || (loadLinePick$1 = !0, bind(MathLinePicker).to(DefaultMathLinePicker).inSingletonScope(), bind(MathPickerContribution).toService(MathLinePicker));
19157
19157
  });
19158
19158
 
19159
- var __decorate$r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19159
+ var __decorate$s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19160
19160
  var d,
19161
19161
  c = arguments.length,
19162
19162
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19176,14 +19176,14 @@
19176
19176
  super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
19177
19177
  }
19178
19178
  };
19179
- DefaultMathPolygonPicker = __decorate$r([injectable(), __param$d(0, inject(PolygonRender)), __metadata$f("design:paramtypes", [Object])], DefaultMathPolygonPicker);
19179
+ DefaultMathPolygonPicker = __decorate$s([injectable(), __param$d(0, inject(PolygonRender)), __metadata$f("design:paramtypes", [Object])], DefaultMathPolygonPicker);
19180
19180
 
19181
19181
  let loadPolygonPick$1 = !1;
19182
19182
  const polygonMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19183
19183
  loadPolygonPick$1 || (loadPolygonPick$1 = !0, bind(MathPolygonPicker).to(DefaultMathPolygonPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathPolygonPicker));
19184
19184
  });
19185
19185
 
19186
- var __decorate$q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19186
+ var __decorate$r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19187
19187
  var d,
19188
19188
  c = arguments.length,
19189
19189
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19203,7 +19203,7 @@
19203
19203
  super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
19204
19204
  }
19205
19205
  };
19206
- DefaultMathPathPicker = __decorate$q([injectable(), __param$c(0, inject(PathRender)), __metadata$e("design:paramtypes", [Object])], DefaultMathPathPicker);
19206
+ DefaultMathPathPicker = __decorate$r([injectable(), __param$c(0, inject(PathRender)), __metadata$e("design:paramtypes", [Object])], DefaultMathPathPicker);
19207
19207
 
19208
19208
  let loadPathPick$1 = !1;
19209
19209
  const pathMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
@@ -19258,7 +19258,7 @@
19258
19258
  }
19259
19259
  }
19260
19260
 
19261
- var __decorate$p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19261
+ var __decorate$q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19262
19262
  var d,
19263
19263
  c = arguments.length,
19264
19264
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19278,7 +19278,7 @@
19278
19278
  super(), this.canvasRenderer = canvasRenderer;
19279
19279
  }
19280
19280
  };
19281
- DefaultMathRectPicker = __decorate$p([injectable(), __param$b(0, inject(RectRender)), __metadata$d("design:paramtypes", [Object])], DefaultMathRectPicker);
19281
+ DefaultMathRectPicker = __decorate$q([injectable(), __param$b(0, inject(RectRender)), __metadata$d("design:paramtypes", [Object])], DefaultMathRectPicker);
19282
19282
 
19283
19283
  let loadRectPick$1 = !1;
19284
19284
  const rectMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
@@ -19290,7 +19290,7 @@
19290
19290
  loadRichTextPick || (loadRichTextPick = !0, bind(MathImagePicker).to(DefaultMathImagePicker).inSingletonScope(), bind(DefaultMathImagePicker).toService(MathImagePicker));
19291
19291
  });
19292
19292
 
19293
- var __decorate$o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19293
+ var __decorate$p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19294
19294
  var d,
19295
19295
  c = arguments.length,
19296
19296
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19310,14 +19310,14 @@
19310
19310
  super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
19311
19311
  }
19312
19312
  };
19313
- DefaultMathSymbolPicker = __decorate$o([injectable(), __param$a(0, inject(SymbolRender)), __metadata$c("design:paramtypes", [Object])], DefaultMathSymbolPicker);
19313
+ DefaultMathSymbolPicker = __decorate$p([injectable(), __param$a(0, inject(SymbolRender)), __metadata$c("design:paramtypes", [Object])], DefaultMathSymbolPicker);
19314
19314
 
19315
19315
  let loadSymbolPick$1 = !1;
19316
19316
  const symbolMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19317
19317
  loadSymbolPick$1 || (loadSymbolPick$1 = !0, bind(MathSymbolPicker).to(DefaultMathSymbolPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathSymbolPicker));
19318
19318
  });
19319
19319
 
19320
- var __decorate$n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19320
+ var __decorate$o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19321
19321
  var d,
19322
19322
  c = arguments.length,
19323
19323
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19332,14 +19332,14 @@
19332
19332
  return !!text.AABBBounds.containsPoint(point);
19333
19333
  }
19334
19334
  };
19335
- DefaultMathTextPicker = __decorate$n([injectable()], DefaultMathTextPicker);
19335
+ DefaultMathTextPicker = __decorate$o([injectable()], DefaultMathTextPicker);
19336
19336
 
19337
19337
  let loadTextPick$1 = !1;
19338
19338
  const textMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19339
19339
  loadTextPick$1 || (loadTextPick$1 = !0, bind(MathTextPicker).to(DefaultMathTextPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathTextPicker));
19340
19340
  });
19341
19341
 
19342
- var __decorate$m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19342
+ var __decorate$n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19343
19343
  var d,
19344
19344
  c = arguments.length,
19345
19345
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19358,9 +19358,9 @@
19358
19358
  }
19359
19359
  release() {}
19360
19360
  };
19361
- NodeContext2d.env = "node", NodeContext2d = __decorate$m([injectable(), __metadata$b("design:paramtypes", [Object, Number])], NodeContext2d);
19361
+ NodeContext2d.env = "node", NodeContext2d = __decorate$n([injectable(), __metadata$b("design:paramtypes", [Object, Number])], NodeContext2d);
19362
19362
 
19363
- var __decorate$l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19363
+ var __decorate$m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19364
19364
  var d,
19365
19365
  c = arguments.length,
19366
19366
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19381,11 +19381,11 @@
19381
19381
  this._nativeCanvas.release && isFunction$5(this._nativeCanvas.release) && this._nativeCanvas.release();
19382
19382
  }
19383
19383
  };
19384
- NodeCanvas.env = "node", NodeCanvas = __decorate$l([injectable(), __metadata$a("design:paramtypes", [Object])], NodeCanvas);
19384
+ NodeCanvas.env = "node", NodeCanvas = __decorate$m([injectable(), __metadata$a("design:paramtypes", [Object])], NodeCanvas);
19385
19385
 
19386
19386
  const nodeCanvasModule = createModule(NodeCanvas, NodeContext2d);
19387
19387
 
19388
- var __decorate$k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19388
+ var __decorate$l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19389
19389
  var d,
19390
19390
  c = arguments.length,
19391
19391
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19486,12 +19486,12 @@
19486
19486
  }
19487
19487
  clearViewBox(color) {}
19488
19488
  };
19489
- NodeWindowHandlerContribution.env = "node", NodeWindowHandlerContribution = __decorate$k([injectable(), __param$9(0, inject(VGlobal)), __metadata$9("design:paramtypes", [Object])], NodeWindowHandlerContribution);
19489
+ NodeWindowHandlerContribution.env = "node", NodeWindowHandlerContribution = __decorate$l([injectable(), __param$9(0, inject(VGlobal)), __metadata$9("design:paramtypes", [Object])], NodeWindowHandlerContribution);
19490
19490
  const nodeWindowModule = new ContainerModule(bind => {
19491
19491
  bind(NodeWindowHandlerContribution).toSelf(), bind(WindowHandlerContribution).toDynamicValue(ctx => ctx.container.get(NodeWindowHandlerContribution)).whenTargetNamed(NodeWindowHandlerContribution.env);
19492
19492
  });
19493
19493
 
19494
- var __decorate$j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19494
+ var __decorate$k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19495
19495
  var d,
19496
19496
  c = arguments.length,
19497
19497
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19577,7 +19577,7 @@
19577
19577
  release() {}
19578
19578
  createOffscreenCanvas(params) {}
19579
19579
  };
19580
- NodeEnvContribution = __decorate$j([injectable()], NodeEnvContribution);
19580
+ NodeEnvContribution = __decorate$k([injectable()], NodeEnvContribution);
19581
19581
 
19582
19582
  const nodeEnvModule = new ContainerModule(bind => {
19583
19583
  nodeEnvModule.isNodeBound || (nodeEnvModule.isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
@@ -19588,7 +19588,7 @@
19588
19588
  }
19589
19589
  loadNodeEnv.__loaded = !1;
19590
19590
 
19591
- var __decorate$i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19591
+ var __decorate$j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19592
19592
  var d,
19593
19593
  c = arguments.length,
19594
19594
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19608,14 +19608,14 @@
19608
19608
  super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
19609
19609
  }
19610
19610
  };
19611
- DefaultCanvasArcPicker = __decorate$i([injectable(), __param$8(0, inject(ArcRender)), __metadata$8("design:paramtypes", [Object])], DefaultCanvasArcPicker);
19611
+ DefaultCanvasArcPicker = __decorate$j([injectable(), __param$8(0, inject(ArcRender)), __metadata$8("design:paramtypes", [Object])], DefaultCanvasArcPicker);
19612
19612
 
19613
19613
  let loadArcPick = !1;
19614
19614
  const arcCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19615
19615
  loadArcPick || (loadArcPick = !0, bind(CanvasArcPicker).to(DefaultCanvasArcPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasArcPicker));
19616
19616
  });
19617
19617
 
19618
- var __decorate$h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19618
+ var __decorate$i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19619
19619
  var d,
19620
19620
  c = arguments.length,
19621
19621
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19635,7 +19635,7 @@
19635
19635
  super(), this.canvasRenderer = canvasRenderer;
19636
19636
  }
19637
19637
  };
19638
- DefaultCanvasRectPicker = __decorate$h([injectable(), __param$7(0, inject(RectRender)), __metadata$7("design:paramtypes", [Object])], DefaultCanvasRectPicker);
19638
+ DefaultCanvasRectPicker = __decorate$i([injectable(), __param$7(0, inject(RectRender)), __metadata$7("design:paramtypes", [Object])], DefaultCanvasRectPicker);
19639
19639
 
19640
19640
  let loadRectPick = !1;
19641
19641
  const rectCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
@@ -19677,7 +19677,7 @@
19677
19677
  }
19678
19678
  }
19679
19679
 
19680
- var __decorate$g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19680
+ var __decorate$h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19681
19681
  var d,
19682
19682
  c = arguments.length,
19683
19683
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19697,7 +19697,7 @@
19697
19697
  super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
19698
19698
  }
19699
19699
  };
19700
- DefaultCanvasLinePicker = __decorate$g([injectable(), __param$6(0, inject(LineRender)), __metadata$6("design:paramtypes", [Object])], DefaultCanvasLinePicker);
19700
+ DefaultCanvasLinePicker = __decorate$h([injectable(), __param$6(0, inject(LineRender)), __metadata$6("design:paramtypes", [Object])], DefaultCanvasLinePicker);
19701
19701
 
19702
19702
  let loadLinePick = !1;
19703
19703
  const lineCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
@@ -19731,7 +19731,7 @@
19731
19731
  }
19732
19732
  }
19733
19733
 
19734
- var __decorate$f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19734
+ var __decorate$g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19735
19735
  var d,
19736
19736
  c = arguments.length,
19737
19737
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19786,14 +19786,14 @@
19786
19786
  }), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
19787
19787
  }
19788
19788
  };
19789
- DefaultCanvasSymbolPicker = __decorate$f([injectable(), __param$5(0, inject(SymbolRender)), __metadata$5("design:paramtypes", [Object])], DefaultCanvasSymbolPicker);
19789
+ DefaultCanvasSymbolPicker = __decorate$g([injectable(), __param$5(0, inject(SymbolRender)), __metadata$5("design:paramtypes", [Object])], DefaultCanvasSymbolPicker);
19790
19790
 
19791
19791
  let loadSymbolPick = !1;
19792
19792
  const symbolCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19793
19793
  loadSymbolPick || (loadSymbolPick = !0, bind(CanvasSymbolPicker).to(DefaultCanvasSymbolPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasSymbolPicker));
19794
19794
  });
19795
19795
 
19796
- var __decorate$e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19796
+ var __decorate$f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19797
19797
  var d,
19798
19798
  c = arguments.length,
19799
19799
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19813,14 +19813,14 @@
19813
19813
  super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
19814
19814
  }
19815
19815
  };
19816
- DefaultCanvasCirclePicker = __decorate$e([injectable(), __param$4(0, inject(CircleRender)), __metadata$4("design:paramtypes", [Object])], DefaultCanvasCirclePicker);
19816
+ DefaultCanvasCirclePicker = __decorate$f([injectable(), __param$4(0, inject(CircleRender)), __metadata$4("design:paramtypes", [Object])], DefaultCanvasCirclePicker);
19817
19817
 
19818
19818
  let loadCirclePick = !1;
19819
19819
  const circleCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19820
19820
  loadCirclePick || (loadCirclePick = !0, bind(CanvasCirclePicker).to(DefaultCanvasCirclePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasCirclePicker));
19821
19821
  });
19822
19822
 
19823
- var __decorate$d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19823
+ var __decorate$e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19824
19824
  var d,
19825
19825
  c = arguments.length,
19826
19826
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19883,14 +19883,14 @@
19883
19883
  }, (context, symbolAttribute, themeAttribute) => picked), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
19884
19884
  }
19885
19885
  };
19886
- DefaultCanvasTextPicker = __decorate$d([injectable(), __param$3(0, inject(TextRender)), __metadata$3("design:paramtypes", [Object])], DefaultCanvasTextPicker);
19886
+ DefaultCanvasTextPicker = __decorate$e([injectable(), __param$3(0, inject(TextRender)), __metadata$3("design:paramtypes", [Object])], DefaultCanvasTextPicker);
19887
19887
 
19888
19888
  let loadTextPick = !1;
19889
19889
  const textCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19890
19890
  loadTextPick || (loadTextPick = !0, bind(CanvasTextPicker).to(DefaultCanvasTextPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasTextPicker));
19891
19891
  });
19892
19892
 
19893
- var __decorate$c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19893
+ var __decorate$d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19894
19894
  var d,
19895
19895
  c = arguments.length,
19896
19896
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19910,14 +19910,14 @@
19910
19910
  super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
19911
19911
  }
19912
19912
  };
19913
- DefaultCanvasPathPicker = __decorate$c([injectable(), __param$2(0, inject(PathRender)), __metadata$2("design:paramtypes", [Object])], DefaultCanvasPathPicker);
19913
+ DefaultCanvasPathPicker = __decorate$d([injectable(), __param$2(0, inject(PathRender)), __metadata$2("design:paramtypes", [Object])], DefaultCanvasPathPicker);
19914
19914
 
19915
19915
  let loadPathPick = !1;
19916
19916
  const pathCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19917
19917
  loadPathPick || (loadPathPick = !0, bind(CanvasPathPicker).to(DefaultCanvasPathPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasPathPicker));
19918
19918
  });
19919
19919
 
19920
- var __decorate$b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19920
+ var __decorate$c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19921
19921
  var d,
19922
19922
  c = arguments.length,
19923
19923
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19937,14 +19937,14 @@
19937
19937
  super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
19938
19938
  }
19939
19939
  };
19940
- DefaultCanvasPolygonPicker = __decorate$b([injectable(), __param$1(0, inject(PolygonRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasPolygonPicker);
19940
+ DefaultCanvasPolygonPicker = __decorate$c([injectable(), __param$1(0, inject(PolygonRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasPolygonPicker);
19941
19941
 
19942
19942
  let loadPolygonPick = !1;
19943
19943
  const polygonCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19944
19944
  loadPolygonPick || (loadPolygonPick = !0, bind(CanvasPolygonPicker).to(DefaultCanvasPolygonPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasPolygonPicker));
19945
19945
  });
19946
19946
 
19947
- var __decorate$a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19947
+ var __decorate$b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19948
19948
  var d,
19949
19949
  c = arguments.length,
19950
19950
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19967,14 +19967,14 @@
19967
19967
  return !!richtext.AABBBounds.containsPoint(point);
19968
19968
  }
19969
19969
  };
19970
- DefaultCanvasRichTextPicker = __decorate$a([injectable(), __param(0, inject(RichTextRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasRichTextPicker);
19970
+ DefaultCanvasRichTextPicker = __decorate$b([injectable(), __param(0, inject(RichTextRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasRichTextPicker);
19971
19971
 
19972
19972
  let loadRichtextPick = !1;
19973
19973
  const richtextCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19974
19974
  loadRichtextPick || (loadRichtextPick = !0, bind(CanvasRichTextPicker).to(DefaultCanvasRichTextPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasRichTextPicker));
19975
19975
  });
19976
19976
 
19977
- var __decorate$9 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19977
+ var __decorate$a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19978
19978
  var d,
19979
19979
  c = arguments.length,
19980
19980
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19992,7 +19992,7 @@
19992
19992
  return !!pickContext && !!image.AABBBounds.containsPoint(point);
19993
19993
  }
19994
19994
  };
19995
- DefaultCanvasImagePicker = __decorate$9([injectable()], DefaultCanvasImagePicker);
19995
+ DefaultCanvasImagePicker = __decorate$a([injectable()], DefaultCanvasImagePicker);
19996
19996
 
19997
19997
  let loadImagePick = !1;
19998
19998
  const imageCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
@@ -21555,7 +21555,7 @@
21555
21555
  padding: 10
21556
21556
  };
21557
21557
 
21558
- var __decorate$8 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21558
+ var __decorate$9 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21559
21559
  var d,
21560
21560
  c = arguments.length,
21561
21561
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21597,9 +21597,9 @@
21597
21597
  }), null === (_b = this.poptipComponent.parent) || void 0 === _b || _b.removeChild(this.poptipComponent), this.poptipComponent = null));
21598
21598
  }
21599
21599
  };
21600
- PopTipRenderContribution = __decorate$8([injectable()], PopTipRenderContribution);
21600
+ PopTipRenderContribution = __decorate$9([injectable()], PopTipRenderContribution);
21601
21601
 
21602
- var __decorate$7 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21602
+ var __decorate$8 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21603
21603
  var d,
21604
21604
  c = arguments.length,
21605
21605
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21643,7 +21643,7 @@
21643
21643
  super(...arguments), this.name = "poptip", this.key = this.name + this._uid;
21644
21644
  }
21645
21645
  };
21646
- PopTipPlugin = __decorate$7([injectable()], PopTipPlugin);
21646
+ PopTipPlugin = __decorate$8([injectable()], PopTipPlugin);
21647
21647
  let PopTipForClipedTextPlugin = class extends PopTipPluginBase {
21648
21648
  constructor() {
21649
21649
  super(...arguments), this.name = "poptipForText", this.key = this.name + this._uid, this.pointerlave = e => {
@@ -21673,7 +21673,7 @@
21673
21673
  super.deactivate(context), stage.removeEventListener("pointerleave", this.pointerlave);
21674
21674
  }
21675
21675
  };
21676
- PopTipForClipedTextPlugin = __decorate$7([injectable()], PopTipForClipedTextPlugin);
21676
+ PopTipForClipedTextPlugin = __decorate$8([injectable()], PopTipForClipedTextPlugin);
21677
21677
 
21678
21678
  const popTipModule = new ContainerModule((bind, unbind, isBound, rebind) => {
21679
21679
  isBound(PopTipRenderContribution) || (bind(PopTipRenderContribution).toSelf().inSingletonScope(), bind(InteractiveSubRenderContribution).toService(PopTipRenderContribution)), isBound(PopTipPlugin) || (bind(PopTipPlugin).toSelf(), bind(AutoEnablePlugins).toService(PopTipPlugin)), isBound(PopTipForClipedTextPlugin) || (bind(PopTipForClipedTextPlugin).toSelf(), bind(AutoEnablePlugins).toService(PopTipForClipedTextPlugin));
@@ -26541,346 +26541,1151 @@
26541
26541
  registed || (registed = !0, preLoadAllModule(), isBrowserEnv() ? loadBrowserEnv(container) : isNodeEnv() && loadNodeEnv(container), registerArc(), registerCircle(), registerGroup(), registerImage(), registerLine(), registerRect(), registerRichtext(), registerShadowRoot(), registerSymbol(), registerText(), registerFlexLayoutPlugin(), loadPoptip(), registerFlexLayoutPlugin());
26542
26542
  }
26543
26543
 
26544
- function throttle$1(func, delay) {
26545
- let timer = null;
26546
- return function (...args) {
26547
- if (!timer) {
26548
- func.apply(this, args);
26549
- timer = setTimeout(() => {
26550
- timer = null;
26551
- }, delay);
26552
- }
26553
- };
26554
- }
26555
- function getTodayNearDay(dayOffset, format) {
26556
- const today = new Date();
26557
- const todayTime = today.getTime();
26558
- const oneDayTime = 24 * 60 * 60 * 1000;
26559
- const targetTime = todayTime + dayOffset * oneDayTime;
26560
- const date = new Date(targetTime);
26561
- if (format) {
26562
- const year = date.getFullYear().toString();
26563
- const month = (date.getMonth() + 1).toString().padStart(2, '0');
26564
- const day = date.getDate().toString().padStart(2, '0');
26565
- format = format.replace('yyyy', year);
26566
- format = format.replace('mm', month);
26567
- format = format.replace('dd', day);
26568
- return format;
26569
- }
26570
- return date;
26571
- }
26572
- function formatDate(date, format) {
26573
- const year = date.getFullYear().toString();
26574
- const month = (date.getMonth() + 1).toString().padStart(2, '0');
26575
- const day = date.getDate().toString().padStart(2, '0');
26576
- format = format.replace('yyyy', year);
26577
- format = format.replace('mm', month);
26578
- format = format.replace('dd', day);
26579
- if (format.length > 10) {
26580
- const hour = date.getHours().toString().padStart(2, '0');
26581
- const minute = date.getMinutes().toString().padStart(2, '0');
26582
- const second = date.getSeconds().toString().padStart(2, '0');
26583
- format = format.replace('hh', hour);
26584
- format = format.replace('mm', minute);
26585
- format = format.replace('ss', second);
26586
- }
26587
- return format;
26588
- }
26589
- function validateDate(dateParts, format) {
26590
- const yearIndex = format.indexOf('yyyy');
26591
- const monthIndex = format.indexOf('mm');
26592
- const dayIndex = format.indexOf('dd');
26593
- const dateYearIndex = yearIndex < monthIndex ? (yearIndex < dayIndex ? 0 : 1) : monthIndex < dayIndex ? 1 : 2;
26594
- const dateMonthIndex = monthIndex < yearIndex ? (monthIndex < dayIndex ? 0 : 1) : monthIndex < dayIndex ? 1 : 2;
26595
- const dateDayIndex = dayIndex < yearIndex ? (dayIndex < monthIndex ? 0 : 1) : dayIndex < monthIndex ? 1 : 2;
26596
- const year = parseInt(dateParts[dateYearIndex], 10);
26597
- const month = parseInt(dateParts[dateMonthIndex], 10) - 1;
26598
- const day = parseInt(dateParts[dateDayIndex], 10);
26599
- if (isNaN(year) || year < 1) {
26600
- return false;
26601
- }
26602
- if (isNaN(month) || month < 0 || month > 11) {
26603
- return false;
26604
- }
26605
- const daysInMonth = [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
26606
- if (isNaN(day) || day < 1 || day > daysInMonth[month]) {
26607
- return false;
26608
- }
26609
- return true;
26610
- }
26611
- function validateTime(dateParts, format) {
26612
- if (format.includes('hh') || format.includes('mm') || format.includes('ss')) {
26613
- const timeIndex = format.indexOf('hh') > -1 ? format.indexOf('hh') : format.indexOf('HH');
26614
- const hour = parseInt(dateParts[timeIndex], 10);
26615
- const minute = parseInt(dateParts[timeIndex + 1], 10);
26616
- const second = dateParts.length > timeIndex + 2 ? parseInt(dateParts[timeIndex + 2], 10) : 0;
26617
- if (isNaN(hour) || hour < 0 || hour > 23) {
26618
- return false;
26619
- }
26620
- if (isNaN(minute) || minute < 0 || minute > 59) {
26621
- return false;
26622
- }
26623
- if (isNaN(second) || second < 0 || second > 59) {
26624
- return false;
26625
- }
26626
- }
26627
- return true;
26544
+ const defaultTaskBarStyle = {
26545
+ barColor: 'blue',
26546
+ completedBarColor: 'gray',
26547
+ width: 30,
26548
+ cornerRadius: 3,
26549
+ borderWidth: 0,
26550
+ fontFamily: 'Arial',
26551
+ fontSize: 14
26552
+ };
26553
+ function setWidthToDefaultTaskBarStyle(width) {
26554
+ defaultTaskBarStyle.width = width;
26628
26555
  }
26629
- function isLeapYear(year) {
26630
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
26556
+ const isNode$1 = typeof window === 'undefined' || typeof window.window === 'undefined';
26557
+ const DayTimes = 1000 * 60 * 60 * 24;
26558
+ function getDateIndexByX(x, gantt) {
26559
+ const totalX = x + gantt.stateManager.scroll.horizontalBarPos;
26560
+ const firstDateColWidth = gantt.getDateColWidth(0);
26561
+ const dateIndex = Math.floor((totalX - firstDateColWidth) / gantt.parsedOptions.timelineColWidth) + 1;
26562
+ return dateIndex;
26631
26563
  }
26632
- function parseDateFormat(dateString) {
26633
- const formats = [
26634
- 'yyyy-mm-dd',
26635
- 'dd-mm-yyyy',
26636
- 'mm/dd/yyyy',
26637
- 'yyyy/mm/dd',
26638
- 'dd/mm/yyyy',
26639
- 'yyyy.mm.dd',
26640
- 'mm.dd.yyyy',
26641
- 'dd.mm.yyyy'
26642
- ];
26643
- const timeFormat = ['hh:mm:ss', 'hh:mm'];
26644
- dateString = dateString.trim();
26645
- const dates = dateString.split(' ');
26646
- const date = dates[0];
26647
- const time = dates[1];
26648
- let dateFormatMatched;
26649
- let timeFormatMatched;
26650
- if (date) {
26651
- for (let i = 0; i < formats.length; i++) {
26652
- const format = formats[i];
26653
- const dateParts = date.split(getSeparator(format));
26654
- const isValid = validateDate(dateParts, format);
26655
- if (dateParts.length === 3 && isValid) {
26656
- dateFormatMatched = format;
26657
- break;
26658
- }
26659
- }
26564
+ function generateMarkLine(markLine) {
26565
+ if (!markLine) {
26566
+ return [];
26660
26567
  }
26661
- if (dateFormatMatched) {
26662
- if (time) {
26663
- for (let i = 0; i < timeFormat.length; i++) {
26664
- const format = timeFormat[i];
26665
- const timeParts = time.split(getSeparator(format));
26666
- const formatParts = format.split(getSeparator(format));
26667
- const isValid = validateTime(timeParts, format);
26668
- if (isValid && timeParts.length === formatParts.length) {
26669
- timeFormatMatched = format;
26670
- break;
26568
+ if (markLine === true) {
26569
+ return [
26570
+ {
26571
+ date: createDateAtMidnight().toLocaleDateString(),
26572
+ scrollToMarkLine: true,
26573
+ position: 'left',
26574
+ style: {
26575
+ lineColor: 'red',
26576
+ lineWidth: 1
26671
26577
  }
26672
26578
  }
26673
- }
26674
- }
26675
- if (date && time && dateFormatMatched && timeFormatMatched) {
26676
- return dateFormatMatched + ' ' + timeFormatMatched;
26677
- }
26678
- if (date && !time) {
26679
- return dateFormatMatched;
26579
+ ];
26680
26580
  }
26681
- return 'yyyy-mm-dd hh:mm:ss';
26682
- }
26683
- function getSeparator(format) {
26684
- const separators = format.match(/[^\w]/g);
26685
- if (separators) {
26686
- const escapedSeparators = separators.map(s => '\\' + s).join('|');
26687
- return new RegExp(escapedSeparators, 'g');
26581
+ else if (Array.isArray(markLine)) {
26582
+ return markLine.map((item, index) => {
26583
+ return {
26584
+ ...item,
26585
+ date: item.date,
26586
+ scrollToMarkLine: item.scrollToMarkLine,
26587
+ position: item.position ?? 'left',
26588
+ style: {
26589
+ lineColor: item.style?.lineColor || 'red',
26590
+ lineWidth: item.style?.lineWidth || 1,
26591
+ lineDash: item.style?.lineDash
26592
+ }
26593
+ };
26594
+ });
26688
26595
  }
26689
- return /[^\w]/;
26690
- }
26691
- function parseStringTemplate(template, data) {
26692
- const result = template.replace(/\{([^}]+)\}/g, (match, key) => {
26693
- const keys = key.split('.');
26694
- let value = data;
26695
- for (const k of keys) {
26696
- if (value.hasOwnProperty(k)) {
26697
- value = value[k];
26698
- }
26699
- else {
26700
- value = match;
26701
- break;
26596
+ return [
26597
+ {
26598
+ ...markLine,
26599
+ date: markLine.date,
26600
+ scrollToMarkLine: markLine.scrollToMarkLine ?? true,
26601
+ position: markLine.position ?? 'left',
26602
+ style: {
26603
+ lineColor: markLine.style?.lineColor || 'red',
26604
+ lineWidth: markLine.style?.lineWidth || 1,
26605
+ lineDash: markLine.style?.lineDash
26702
26606
  }
26703
26607
  }
26704
- return value;
26705
- });
26706
- return result;
26608
+ ];
26707
26609
  }
26708
- function toBoxArray$2(obj) {
26709
- if (!Array.isArray(obj)) {
26710
- return [obj, obj, obj, obj];
26711
- }
26712
- if (obj.length === 3) {
26713
- return [obj[0], obj[1], obj[2], obj[1]];
26714
- }
26715
- if (obj.length === 2) {
26716
- return [obj[0], obj[1], obj[0], obj[1]];
26717
- }
26718
- if (obj.length === 1) {
26719
- return [obj[0], obj[0], obj[0], obj[0]];
26610
+ function getHorizontalScrollBarSize$1(scrollStyle) {
26611
+ if (scrollStyle?.hoverOn ||
26612
+ (scrollStyle?.horizontalVisible && scrollStyle?.horizontalVisible === 'none') ||
26613
+ (!scrollStyle?.horizontalVisible && scrollStyle?.visible === 'none')) {
26614
+ return 0;
26720
26615
  }
26721
- return [obj[0], obj[1], obj[2], obj[3]];
26722
- }
26723
- function getWeekNumber(currentDate) {
26724
- const startOfYear = new Date(currentDate.getFullYear(), 0, 1);
26725
- const weekNumber = Math.ceil(((currentDate.getTime() + 1 - startOfYear.getTime()) / 86400000 + 1) / 7);
26726
- return weekNumber;
26616
+ return scrollStyle?.width ?? 7;
26727
26617
  }
26728
- function getWeekday(dateString, format = 'long') {
26729
- const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
26730
- const date = new Date(dateString);
26731
- if (format === 'short') {
26732
- return days[date.getDay()].substr(0, 3);
26733
- }
26734
- else if (format === 'long') {
26735
- return days[date.getDay()];
26618
+ function getVerticalScrollBarSize$1(scrollStyle) {
26619
+ if (scrollStyle?.hoverOn ||
26620
+ (scrollStyle?.verticalVisible && scrollStyle?.verticalVisible === 'none') ||
26621
+ (!scrollStyle?.verticalVisible && scrollStyle?.visible === 'none')) {
26622
+ return 0;
26736
26623
  }
26737
- return 'Invalid format specified. Please use "short" or "long".';
26624
+ return scrollStyle?.width ?? 7;
26738
26625
  }
26739
- function isPropertyWritable(obj, prop) {
26740
- const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
26741
- if (!descriptor) {
26742
- return false;
26626
+ function initOptions(gantt) {
26627
+ const options = gantt.options;
26628
+ gantt.parsedOptions.tasksShowMode = options?.tasksShowMode ?? TasksShowMode.Tasks_Separate;
26629
+ gantt.parsedOptions.pixelRatio = options?.pixelRatio ?? 1;
26630
+ gantt.parsedOptions.rowHeight = options?.rowHeight ?? 40;
26631
+ gantt.parsedOptions.timelineColWidth = options?.timelineHeader?.colWidth ?? 60;
26632
+ gantt.parsedOptions.startDateField = options.taskBar?.startDateField ?? 'startDate';
26633
+ gantt.parsedOptions.endDateField = options.taskBar?.endDateField ?? 'endDate';
26634
+ gantt.parsedOptions.progressField = options.taskBar?.progressField ?? 'progress';
26635
+ const { unit: minTimeUnit, startOfWeek, step } = gantt.parsedOptions.reverseSortedTimelineScales[0];
26636
+ gantt.parsedOptions.minDate = options?.minDate
26637
+ ? getStartDateByTimeUnit(new Date(options.minDate), minTimeUnit, startOfWeek)
26638
+ : undefined;
26639
+ gantt.parsedOptions.maxDate = options?.maxDate
26640
+ ? getEndDateByTimeUnit(gantt.parsedOptions.minDate, new Date(options.maxDate), minTimeUnit, step)
26641
+ : undefined;
26642
+ gantt.parsedOptions._minDateTime = gantt.parsedOptions.minDate?.getTime();
26643
+ gantt.parsedOptions._maxDateTime = gantt.parsedOptions.maxDate?.getTime();
26644
+ gantt.parsedOptions.overscrollBehavior = options?.overscrollBehavior ?? 'auto';
26645
+ gantt.parsedOptions.underlayBackgroundColor = options?.underlayBackgroundColor ?? '#FFF';
26646
+ gantt.parsedOptions.scrollStyle = Object.assign({}, {
26647
+ scrollRailColor: 'rgba(100, 100, 100, 0.2)',
26648
+ scrollSliderColor: 'rgba(100, 100, 100, 0.5)',
26649
+ scrollSliderCornerRadius: 4,
26650
+ width: 10,
26651
+ visible: 'always',
26652
+ hoverOn: true,
26653
+ barToSide: false
26654
+ }, options?.scrollStyle);
26655
+ gantt.parsedOptions.timelineHeaderHorizontalLineStyle = options?.timelineHeader?.horizontalLine;
26656
+ gantt.parsedOptions.timelineHeaderVerticalLineStyle = options?.timelineHeader?.verticalLine;
26657
+ gantt.parsedOptions.timelineHeaderBackgroundColor = options?.timelineHeader?.backgroundColor;
26658
+ gantt.parsedOptions.timeLineHeaderRowHeights = [];
26659
+ gantt.parsedOptions.timelineHeaderStyles = [];
26660
+ for (let i = 0; i < gantt.parsedOptions.sortedTimelineScales.length ?? 0; i++) {
26661
+ const style = gantt.parsedOptions.sortedTimelineScales[i].style;
26662
+ gantt.parsedOptions.timelineHeaderStyles.push(Object.assign({
26663
+ fontSize: 20,
26664
+ fontWeight: 'bold',
26665
+ textAlign: 'center',
26666
+ textBaseline: 'middle',
26667
+ color: '#000',
26668
+ backgroundColor: '#fff'
26669
+ }, style));
26670
+ gantt.parsedOptions.timeLineHeaderRowHeights.push(gantt.parsedOptions.sortedTimelineScales[i].rowHeight ?? options?.headerRowHeight ?? 40);
26743
26671
  }
26744
- return !!descriptor.set || descriptor.writable === true;
26745
- }
26746
- function createDateAtMidnight(dateStr, forceMidnight = false) {
26747
- let date;
26748
- if (dateStr) {
26749
- date = new Date(dateStr);
26750
- if (typeof dateStr === 'string') {
26751
- if (dateStr.length > 10) {
26752
- if (forceMidnight) {
26753
- date.setHours(0, 0, 0, 0);
26754
- }
26755
- return date;
26756
- }
26757
- date.setHours(0, 0, 0, 0);
26672
+ gantt.parsedOptions.grid = Object.assign({}, options?.grid);
26673
+ setWidthToDefaultTaskBarStyle((gantt.parsedOptions.rowHeight * 3) / 4);
26674
+ gantt.parsedOptions.taskBarStyle =
26675
+ options?.taskBar?.barStyle && typeof options?.taskBar?.barStyle === 'function'
26676
+ ? options.taskBar.barStyle
26677
+ : Object.assign({}, defaultTaskBarStyle, options?.taskBar?.barStyle);
26678
+ gantt.parsedOptions.taskBarMilestoneStyle = Object.assign(typeof gantt.parsedOptions.taskBarStyle === 'function'
26679
+ ? {}
26680
+ : {
26681
+ width: gantt.parsedOptions.taskBarStyle.width,
26682
+ borderColor: gantt.parsedOptions.taskBarStyle.borderColor,
26683
+ borderLineWidth: gantt.parsedOptions.taskBarStyle.borderLineWidth ?? 1,
26684
+ fillColor: gantt.parsedOptions.taskBarStyle.barColor,
26685
+ cornerRadius: 0
26686
+ }, options?.taskBar?.milestoneStyle);
26687
+ gantt.parsedOptions.taskBarMilestoneHypotenuse = gantt.parsedOptions.taskBarMilestoneStyle.width * Math.sqrt(2);
26688
+ gantt.parsedOptions.dateFormat = options?.dateFormat;
26689
+ gantt.parsedOptions.taskBarHoverStyle = Object.assign({
26690
+ barOverlayColor: 'rgba(99, 144, 0, 0.4)'
26691
+ }, options?.taskBar?.hoverBarStyle);
26692
+ gantt.parsedOptions.taskBarSelectable = options?.taskBar?.selectable ?? true;
26693
+ gantt.parsedOptions.taskBarSelectedStyle = Object.assign(typeof gantt.parsedOptions.taskBarStyle === 'function'
26694
+ ? {
26695
+ shadowBlur: 6,
26696
+ shadowOffsetX: 0,
26697
+ shadowOffsetY: 0,
26698
+ borderLineWidth: 1
26699
+ }
26700
+ : {
26701
+ shadowBlur: 6,
26702
+ shadowOffsetX: 0,
26703
+ shadowOffsetY: 0,
26704
+ shadowColor: gantt.parsedOptions.taskBarStyle.barColor,
26705
+ borderColor: gantt.parsedOptions.taskBarStyle.barColor,
26706
+ borderLineWidth: 1
26707
+ }, options?.taskBar?.selectedBarStyle);
26708
+ gantt.parsedOptions.taskBarLabelText = options?.taskBar?.labelText ?? '';
26709
+ gantt.parsedOptions.taskBarMoveable = options?.taskBar?.moveable ?? true;
26710
+ gantt.parsedOptions.moveTaskBarToExtendDateRange = options?.taskBar?.moveToExtendDateRange ?? true;
26711
+ gantt.parsedOptions.taskBarResizable = options?.taskBar?.resizable ?? true;
26712
+ gantt.parsedOptions.taskBarDragOrder = options?.taskBar?.dragOrder ?? true;
26713
+ gantt.parsedOptions.taskBarLabelStyle = {
26714
+ fontFamily: options?.taskBar?.labelTextStyle?.fontFamily ?? 'Arial',
26715
+ fontSize: options?.taskBar?.labelTextStyle?.fontSize ?? 20,
26716
+ color: options?.taskBar?.labelTextStyle?.color ?? '#F01',
26717
+ textAlign: options?.taskBar?.labelTextStyle?.textAlign ?? 'left',
26718
+ textBaseline: options?.taskBar?.labelTextStyle?.textBaseline ?? 'middle',
26719
+ padding: options?.taskBar?.labelTextStyle?.padding ?? [0, 0, 0, 10],
26720
+ textOverflow: options?.taskBar?.labelTextStyle?.textOverflow
26721
+ };
26722
+ gantt.parsedOptions.taskBarCustomLayout = options?.taskBar?.customLayout;
26723
+ gantt.parsedOptions.taskBarCreatable =
26724
+ options?.taskBar?.scheduleCreatable ??
26725
+ !!(gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate ||
26726
+ gantt.parsedOptions.tasksShowMode === TasksShowMode.Tasks_Separate);
26727
+ gantt.parsedOptions.taskBarCreationButtonStyle = Object.assign({
26728
+ lineColor: 'rgb(99, 144, 0)',
26729
+ lineWidth: 1,
26730
+ lineDash: [5, 5],
26731
+ cornerRadius: 4,
26732
+ backgroundColor: '#FFF'
26733
+ }, options?.taskBar?.scheduleCreation?.buttonStyle);
26734
+ gantt.parsedOptions.taskBarCreationCustomLayout = options?.taskBar?.scheduleCreation?.customLayout;
26735
+ gantt.parsedOptions.taskBarCreationMaxWidth = options?.taskBar?.scheduleCreation?.maxWidth;
26736
+ gantt.parsedOptions.taskBarCreationMinWidth = options?.taskBar?.scheduleCreation?.minWidth;
26737
+ gantt.parsedOptions.outerFrameStyle = Object.assign({
26738
+ borderColor: '#e1e4e8',
26739
+ borderLineWidth: 1,
26740
+ cornerRadius: 4
26741
+ }, options.frame?.outerFrameStyle);
26742
+ gantt.parsedOptions.markLine = generateMarkLine(options?.markLine);
26743
+ if (gantt.parsedOptions.markLine?.length ?? 0) {
26744
+ if (gantt.parsedOptions.markLine?.every(item => item.scrollToMarkLine === undefined)) {
26745
+ gantt.parsedOptions.markLine[0].scrollToMarkLine = true;
26746
+ }
26747
+ if (gantt.parsedOptions.markLine?.find(item => item.scrollToMarkLine)) {
26748
+ gantt.parsedOptions.scrollToMarkLineDate = getStartDateByTimeUnit(new Date(gantt.parsedOptions.markLine?.find(item => item.scrollToMarkLine).date), minTimeUnit, startOfWeek);
26758
26749
  }
26759
26750
  }
26760
- else {
26761
- date = new Date();
26762
- }
26763
- if (forceMidnight) {
26764
- date.setHours(0, 0, 0, 0);
26765
- }
26766
- return date;
26767
- }
26768
- function createDateAtLastMinute(dateStr, forceSetMinute = false) {
26769
- let date;
26770
- if (dateStr) {
26771
- date = new Date(dateStr);
26772
- if (typeof dateStr === 'string') {
26773
- if (dateStr.length > 10) {
26774
- if (forceSetMinute) {
26775
- date.setMinutes(59, 59, 999);
26776
- }
26777
- return date;
26751
+ gantt.parsedOptions.verticalSplitLineHighlight = options.frame?.verticalSplitLineHighlight;
26752
+ gantt.parsedOptions.verticalSplitLine = Object.assign({
26753
+ lineColor: gantt.parsedOptions.outerFrameStyle?.borderColor,
26754
+ lineWidth: gantt.parsedOptions.outerFrameStyle?.borderLineWidth
26755
+ }, options.frame?.verticalSplitLine);
26756
+ gantt.parsedOptions.horizontalSplitLine = options.frame?.horizontalSplitLine;
26757
+ gantt.parsedOptions.verticalSplitLineMoveable = options.frame?.verticalSplitLineMoveable;
26758
+ gantt.parsedOptions.taskKeyField = options.taskKeyField ?? 'id';
26759
+ gantt.parsedOptions.dependencyLinks = options.dependency?.links ?? [];
26760
+ gantt.parsedOptions.dependencyLinkCreatable = options.dependency?.linkCreatable ?? false;
26761
+ gantt.parsedOptions.dependencyLinkSelectable = options.dependency?.linkSelectable ?? true;
26762
+ gantt.parsedOptions.dependencyLinkDeletable = options.dependency?.linkDeletable ?? false;
26763
+ gantt.parsedOptions.dependencyLinkLineStyle = Object.assign({
26764
+ lineColor: 'red',
26765
+ lineWidth: 1
26766
+ }, options.dependency?.linkLineStyle);
26767
+ gantt.parsedOptions.dependencyLinkSelectedLineStyle = Object.assign({
26768
+ shadowBlur: 4,
26769
+ shadowOffset: 0,
26770
+ shadowColor: gantt.parsedOptions.dependencyLinkLineStyle.lineColor,
26771
+ lineColor: gantt.parsedOptions.dependencyLinkLineStyle.lineColor,
26772
+ lineWidth: gantt.parsedOptions.dependencyLinkLineStyle.lineWidth
26773
+ }, options?.dependency?.linkSelectedLineStyle);
26774
+ gantt.parsedOptions.dependencyLinkLineCreatePointStyle = Object.assign({
26775
+ strokeColor: 'red',
26776
+ fillColor: 'white',
26777
+ radius: 5,
26778
+ strokeWidth: 1
26779
+ }, options?.dependency?.linkCreatePointStyle);
26780
+ gantt.parsedOptions.dependencyLinkLineCreatingPointStyle = Object.assign({
26781
+ strokeColor: 'red',
26782
+ fillColor: 'red',
26783
+ radius: 5,
26784
+ strokeWidth: 1
26785
+ }, options?.dependency?.linkCreatingPointStyle);
26786
+ gantt.parsedOptions.dependencyLinkLineCreatingStyle = Object.assign({
26787
+ lineColor: 'red',
26788
+ lineWidth: 1,
26789
+ lineDash: [5, 5]
26790
+ }, options?.dependency?.linkCreatingLineStyle);
26791
+ gantt.parsedOptions.eventOptions = options?.eventOptions;
26792
+ gantt.parsedOptions.keyboardOptions = options?.keyboardOptions;
26793
+ gantt.parsedOptions.markLineCreateOptions = options?.markLineCreateOptions;
26794
+ }
26795
+ function updateOptionsWhenScaleChanged(gantt) {
26796
+ const options = gantt.options;
26797
+ const { unit: minTimeUnit, startOfWeek, step } = gantt.parsedOptions.reverseSortedTimelineScales[0];
26798
+ gantt.parsedOptions.minDate = getStartDateByTimeUnit(new Date(gantt.parsedOptions.minDate), minTimeUnit, startOfWeek);
26799
+ gantt.parsedOptions.maxDate = getEndDateByTimeUnit(gantt.parsedOptions.minDate, new Date(gantt.parsedOptions.maxDate), minTimeUnit, step);
26800
+ gantt.parsedOptions._minDateTime = gantt.parsedOptions.minDate?.getTime();
26801
+ gantt.parsedOptions._maxDateTime = gantt.parsedOptions.maxDate?.getTime();
26802
+ gantt.parsedOptions.timeLineHeaderRowHeights = [];
26803
+ gantt.parsedOptions.timelineHeaderStyles = [];
26804
+ for (let i = 0; i < gantt.parsedOptions.sortedTimelineScales.length ?? 0; i++) {
26805
+ const style = gantt.parsedOptions.sortedTimelineScales[i].style;
26806
+ gantt.parsedOptions.timelineHeaderStyles.push(Object.assign({
26807
+ fontSize: 20,
26808
+ fontWeight: 'bold',
26809
+ textAlign: 'center',
26810
+ textBaseline: 'middle',
26811
+ color: '#000',
26812
+ backgroundColor: '#fff'
26813
+ }, style));
26814
+ gantt.parsedOptions.timeLineHeaderRowHeights.push(gantt.parsedOptions.sortedTimelineScales[i].rowHeight ?? options?.headerRowHeight ?? 40);
26815
+ }
26816
+ }
26817
+ function generateTimeLineDate(currentDate, endDate, scale) {
26818
+ const { unit, step, format } = scale;
26819
+ const timelineDates = [];
26820
+ while (currentDate < endDate) {
26821
+ if (unit === 'day') {
26822
+ const year = currentDate.getFullYear();
26823
+ const month = currentDate.getMonth();
26824
+ const day = currentDate.getDate();
26825
+ const end = createDateAtLastHour(new Date(year, month, day + step - 1), true);
26826
+ if (end.getTime() > endDate.getTime()) {
26827
+ end.setTime(endDate.getTime());
26778
26828
  }
26779
- date.setMinutes(59, 59, 999);
26829
+ const start = currentDate;
26830
+ const formattedDate = format?.({ dateIndex: day, startDate: start, endDate: end });
26831
+ const columnTitle = formattedDate || day.toString();
26832
+ const dayCellConfig = {
26833
+ days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
26834
+ startDate: start,
26835
+ endDate: end,
26836
+ step,
26837
+ unit: 'day',
26838
+ title: columnTitle,
26839
+ dateIndex: day
26840
+ };
26841
+ timelineDates.push(dayCellConfig);
26842
+ currentDate = new Date(year, month, day + step);
26843
+ }
26844
+ else if (unit === 'month') {
26845
+ const year = currentDate.getFullYear();
26846
+ const month = currentDate.getMonth();
26847
+ const end = createDateAtLastHour(new Date(year, month + step, 0), true);
26848
+ if (end.getTime() > endDate.getTime()) {
26849
+ end.setTime(endDate.getTime());
26850
+ }
26851
+ const start = currentDate;
26852
+ const formattedDate = format?.({ dateIndex: month + 1, startDate: start, endDate: end });
26853
+ const columnTitle = formattedDate || (month + 1).toString();
26854
+ const dayCellConfig = {
26855
+ days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
26856
+ startDate: start,
26857
+ step,
26858
+ unit: 'month',
26859
+ endDate: end,
26860
+ title: columnTitle,
26861
+ dateIndex: month + 1
26862
+ };
26863
+ timelineDates.push(dayCellConfig);
26864
+ currentDate = new Date(year, month + step, 1);
26865
+ }
26866
+ else if (unit === 'quarter') {
26867
+ const year = currentDate.getFullYear();
26868
+ const quarter = Math.floor(currentDate.getMonth() / 3);
26869
+ const end = createDateAtLastHour(new Date(year, (quarter + step) * 3, 0), true);
26870
+ if (end.getTime() > endDate.getTime()) {
26871
+ end.setTime(endDate.getTime());
26872
+ }
26873
+ const start = currentDate;
26874
+ const formattedDate = format?.({ dateIndex: quarter + 1, startDate: start, endDate: end });
26875
+ const columnTitle = formattedDate || (quarter + 1).toString();
26876
+ const dayCellConfig = {
26877
+ days: Math.abs(end.getTime() - currentDate.getTime() + 1) / (1000 * 60 * 60 * 24),
26878
+ startDate: start,
26879
+ step,
26880
+ unit: 'quarter',
26881
+ endDate: end,
26882
+ title: columnTitle,
26883
+ dateIndex: quarter + 1
26884
+ };
26885
+ timelineDates.push(dayCellConfig);
26886
+ currentDate = new Date(year, (quarter + step) * 3, 1);
26887
+ }
26888
+ else if (unit === 'year') {
26889
+ const year = currentDate.getFullYear();
26890
+ const end = createDateAtLastHour(new Date(year + step - 1, 11, 31), true);
26891
+ if (end.getTime() > endDate.getTime()) {
26892
+ end.setTime(endDate.getTime());
26893
+ }
26894
+ const start = currentDate;
26895
+ const formattedDate = format?.({ dateIndex: year, startDate: start, endDate: end });
26896
+ const columnTitle = formattedDate || year.toString();
26897
+ const dayCellConfig = {
26898
+ days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
26899
+ startDate: start,
26900
+ endDate: end,
26901
+ step,
26902
+ unit: 'year',
26903
+ title: columnTitle,
26904
+ dateIndex: year
26905
+ };
26906
+ timelineDates.push(dayCellConfig);
26907
+ currentDate = new Date(year + step, 0, 1);
26908
+ }
26909
+ else if (unit === 'week') {
26910
+ const startOfWeekSetting = scale.startOfWeek ?? 'monday';
26911
+ let dayOfWeek = currentDate.getDay();
26912
+ if (startOfWeekSetting === 'monday') {
26913
+ dayOfWeek = dayOfWeek === 0 ? 6 : dayOfWeek - 1;
26914
+ }
26915
+ const startOfWeek = createDateAtMidnight(currentDate);
26916
+ const dateEnd = createDateAtLastHour(currentDate.getTime() + (7 * step - dayOfWeek) * 24 * 60 * 60 * 1000 - 1, true);
26917
+ if (dateEnd > endDate) {
26918
+ dateEnd.setTime(endDate.getTime());
26919
+ }
26920
+ const weekNumber = getWeekNumber(startOfWeek);
26921
+ const columnTitle = format?.({ dateIndex: weekNumber, startDate: startOfWeek, endDate: dateEnd }) || weekNumber.toString();
26922
+ const dayCellConfig = {
26923
+ days: (dateEnd.getTime() - startOfWeek.getTime() + 1) / DayTimes,
26924
+ startDate: startOfWeek,
26925
+ endDate: dateEnd,
26926
+ step,
26927
+ unit: 'week',
26928
+ title: columnTitle,
26929
+ dateIndex: weekNumber
26930
+ };
26931
+ timelineDates.push(dayCellConfig);
26932
+ currentDate.setTime(createDateAtMidnight(currentDate.getTime() + (7 * step - dayOfWeek) * 24 * 60 * 60 * 1000, true).getTime());
26933
+ }
26934
+ else if (unit === 'hour') {
26935
+ const year = currentDate.getFullYear();
26936
+ const month = currentDate.getMonth();
26937
+ const day = currentDate.getDate();
26938
+ const hour = currentDate.getHours();
26939
+ const end = createDateAtLastMinute(new Date(year, month, day, hour + step - 1), true);
26940
+ if (end.getTime() > endDate.getTime()) {
26941
+ end.setTime(endDate.getTime());
26942
+ }
26943
+ const start = currentDate;
26944
+ const formattedDate = format?.({ dateIndex: hour, startDate: start, endDate: end });
26945
+ const columnTitle = formattedDate || hour.toString();
26946
+ const dayCellConfig = {
26947
+ days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
26948
+ startDate: start,
26949
+ endDate: end,
26950
+ step,
26951
+ unit: 'hour',
26952
+ title: columnTitle,
26953
+ dateIndex: currentDate.getHours()
26954
+ };
26955
+ timelineDates.push(dayCellConfig);
26956
+ currentDate = new Date(year, month, day, hour + step);
26957
+ }
26958
+ else if (unit === 'minute') {
26959
+ const year = currentDate.getFullYear();
26960
+ const month = currentDate.getMonth();
26961
+ const day = currentDate.getDate();
26962
+ const hour = currentDate.getHours();
26963
+ const minute = currentDate.getMinutes();
26964
+ const end = createDateAtLastSecond(new Date(year, month, day, hour, minute + step - 1), true);
26965
+ if (end.getTime() > endDate.getTime()) {
26966
+ end.setTime(endDate.getTime());
26967
+ }
26968
+ const start = currentDate;
26969
+ const formattedDate = format?.({ dateIndex: minute, startDate: start, endDate: end });
26970
+ const columnTitle = formattedDate || minute.toString();
26971
+ const dayCellConfig = {
26972
+ days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
26973
+ startDate: start,
26974
+ endDate: end,
26975
+ step,
26976
+ unit: 'minute',
26977
+ title: columnTitle,
26978
+ dateIndex: currentDate.getMinutes()
26979
+ };
26980
+ timelineDates.push(dayCellConfig);
26981
+ currentDate = new Date(year, month, day, hour, minute + step);
26982
+ }
26983
+ else if (unit === 'second') {
26984
+ const year = currentDate.getFullYear();
26985
+ const month = currentDate.getMonth();
26986
+ const day = currentDate.getDate();
26987
+ const hour = currentDate.getHours();
26988
+ const minute = currentDate.getMinutes();
26989
+ const second = currentDate.getSeconds();
26990
+ const end = createDateAtLastMillisecond(new Date(year, month, day, hour, minute, second + step - 1), true);
26991
+ if (end.getTime() > endDate.getTime()) {
26992
+ end.setTime(endDate.getTime());
26993
+ }
26994
+ const start = currentDate;
26995
+ const formattedDate = format?.({ dateIndex: second, startDate: start, endDate: end });
26996
+ const columnTitle = formattedDate || second.toString();
26997
+ const dayCellConfig = {
26998
+ days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
26999
+ startDate: start,
27000
+ endDate: end,
27001
+ step,
27002
+ unit: 'second',
27003
+ title: columnTitle,
27004
+ dateIndex: currentDate.getSeconds()
27005
+ };
27006
+ timelineDates.push(dayCellConfig);
27007
+ currentDate = new Date(year, month, day, hour, minute, second + step);
26780
27008
  }
26781
27009
  }
26782
- else {
26783
- date = new Date();
27010
+ return timelineDates;
27011
+ }
27012
+ function getTextPos(padding, textAlign, textBaseline, width, height) {
27013
+ let textX = padding[3] ?? 10;
27014
+ if (textAlign === 'right' || textAlign === 'end') {
27015
+ textX = width - 0 - (padding[1] ?? 10);
26784
27016
  }
26785
- if (forceSetMinute) {
26786
- date.setMinutes(59, 59, 999);
27017
+ else if (textAlign === 'center') {
27018
+ textX = 0 + (width - 0 + (padding[3] ?? 10) - (padding[1] ?? 10)) / 2;
26787
27019
  }
26788
- return date;
27020
+ let textY = 0 + (padding[0] ?? 10);
27021
+ if (textBaseline === 'bottom' || textBaseline === 'alphabetic' || textBaseline === 'ideographic') {
27022
+ textY = height - 0 - (padding[2] ?? 10);
27023
+ }
27024
+ else if (textBaseline === 'middle') {
27025
+ textY = 0 + (height - 0 - (padding[0] ?? 10) - (padding[2] ?? 10)) / 2 + (padding[0] ?? 10);
27026
+ }
27027
+ return {
27028
+ x: textX,
27029
+ y: textY
27030
+ };
26789
27031
  }
26790
- function createDateAtLastSecond(dateStr, forceSetSecond = false) {
26791
- let date;
26792
- if (dateStr) {
26793
- date = new Date(dateStr);
26794
- if (typeof dateStr === 'string') {
26795
- if (dateStr.length > 10) {
26796
- if (forceSetSecond) {
26797
- date.setSeconds(59, 999);
26798
- }
26799
- return date;
26800
- }
26801
- date.setSeconds(59, 999);
26802
- }
27032
+ function convertProgress(progress) {
27033
+ if (typeof progress === 'string') {
27034
+ progress = progress.replace('%', '');
27035
+ progress = parseFloat(progress);
26803
27036
  }
26804
- else {
26805
- date = new Date();
27037
+ return Math.round(progress);
27038
+ }
27039
+ function createSplitLineAndResizeLine(gantt) {
27040
+ if (gantt.taskListTableInstance) {
27041
+ gantt.verticalSplitResizeLine = document.createElement('div');
27042
+ gantt.verticalSplitResizeLine.style.position = 'absolute';
27043
+ gantt.verticalSplitResizeLine.style.top = gantt.tableY + 'px';
27044
+ gantt.verticalSplitResizeLine.style.left =
27045
+ (gantt.taskTableWidth ? gantt.taskTableWidth - 7 + gantt.parsedOptions.verticalSplitLine.lineWidth / 2 : 0) +
27046
+ 'px';
27047
+ gantt.verticalSplitResizeLine.style.width = '14px';
27048
+ gantt.verticalSplitResizeLine.style.height = gantt.drawHeight + 'px';
27049
+ gantt.verticalSplitResizeLine.style.backgroundColor = 'rgba(0,0,0,0)';
27050
+ gantt.verticalSplitResizeLine.style.zIndex = '100';
27051
+ gantt.parsedOptions.verticalSplitLineMoveable && (gantt.verticalSplitResizeLine.style.cursor = 'col-resize');
27052
+ gantt.verticalSplitResizeLine.style.userSelect = 'none';
27053
+ gantt.verticalSplitResizeLine.style.opacity = '1';
27054
+ const verticalSplitLine = document.createElement('div');
27055
+ verticalSplitLine.style.position = 'absolute';
27056
+ verticalSplitLine.style.top = '0px';
27057
+ verticalSplitLine.style.left = `${(14 - gantt.parsedOptions.verticalSplitLine.lineWidth) / 2}px`;
27058
+ verticalSplitLine.style.width = gantt.parsedOptions.verticalSplitLine.lineWidth + 'px';
27059
+ verticalSplitLine.style.height = '100%';
27060
+ verticalSplitLine.style.backgroundColor = gantt.parsedOptions.verticalSplitLine.lineColor;
27061
+ verticalSplitLine.style.zIndex = '100';
27062
+ verticalSplitLine.style.userSelect = 'none';
27063
+ verticalSplitLine.style.pointerEvents = 'none';
27064
+ verticalSplitLine.style.transition = 'background-color 0.3s';
27065
+ gantt.verticalSplitResizeLine.appendChild(verticalSplitLine);
27066
+ if (gantt.parsedOptions.verticalSplitLineHighlight) {
27067
+ const highlightLine = document.createElement('div');
27068
+ highlightLine.style.position = 'absolute';
27069
+ highlightLine.style.top = '0px';
27070
+ highlightLine.style.left = `${(14 - gantt.parsedOptions.verticalSplitLineHighlight.lineWidth ?? 2) / 2}px`;
27071
+ highlightLine.style.width = (gantt.parsedOptions.verticalSplitLineHighlight.lineWidth ?? 2) + 'px';
27072
+ highlightLine.style.height = '100%';
27073
+ highlightLine.style.backgroundColor = gantt.parsedOptions.verticalSplitLineHighlight.lineColor;
27074
+ highlightLine.style.zIndex = '100';
27075
+ highlightLine.style.cursor = 'col-resize';
27076
+ highlightLine.style.userSelect = 'none';
27077
+ highlightLine.style.pointerEvents = 'none';
27078
+ highlightLine.style.opacity = '0';
27079
+ highlightLine.style.transition = 'background-color 0.3s';
27080
+ gantt.verticalSplitResizeLine.appendChild(highlightLine);
27081
+ }
27082
+ gantt.container.appendChild(gantt.verticalSplitResizeLine);
26806
27083
  }
26807
- if (forceSetSecond) {
26808
- date.setSeconds(59, 999);
27084
+ }
27085
+ function updateSplitLineAndResizeLine(gantt) {
27086
+ if (gantt.verticalSplitResizeLine) {
27087
+ gantt.verticalSplitResizeLine.style.position = 'absolute';
27088
+ gantt.verticalSplitResizeLine.style.top = gantt.tableY + 'px';
27089
+ gantt.verticalSplitResizeLine.style.left = gantt.taskTableWidth
27090
+ ? `${gantt.taskTableWidth - 7 + gantt.parsedOptions.verticalSplitLine.lineWidth / 2}px`
27091
+ : '0px';
27092
+ gantt.verticalSplitResizeLine.style.width = '14px';
27093
+ gantt.verticalSplitResizeLine.style.height = gantt.drawHeight + 'px';
27094
+ gantt.verticalSplitResizeLine.style.backgroundColor = 'rgba(0,0,0,0)';
27095
+ gantt.verticalSplitResizeLine.style.zIndex = '100';
27096
+ gantt.parsedOptions.verticalSplitLineMoveable && (gantt.verticalSplitResizeLine.style.cursor = 'col-resize');
27097
+ gantt.verticalSplitResizeLine.style.userSelect = 'none';
27098
+ gantt.verticalSplitResizeLine.style.opacity = '1';
27099
+ const verticalSplitLine = gantt.verticalSplitResizeLine.childNodes[0];
27100
+ verticalSplitLine.style.position = 'absolute';
27101
+ verticalSplitLine.style.top = '0px';
27102
+ verticalSplitLine.style.left = `${(14 - gantt.parsedOptions.verticalSplitLine.lineWidth) / 2}px`;
27103
+ verticalSplitLine.style.width = gantt.parsedOptions.verticalSplitLine.lineWidth + 'px';
27104
+ verticalSplitLine.style.height = '100%';
27105
+ verticalSplitLine.style.backgroundColor = gantt.parsedOptions.verticalSplitLine.lineColor;
27106
+ verticalSplitLine.style.zIndex = '100';
27107
+ verticalSplitLine.style.userSelect = 'none';
27108
+ verticalSplitLine.style.pointerEvents = 'none';
27109
+ verticalSplitLine.style.transition = 'background-color 0.3s';
27110
+ if (gantt.verticalSplitResizeLine.childNodes[1]) {
27111
+ const highlightLine = gantt.verticalSplitResizeLine.childNodes[1];
27112
+ highlightLine.style.position = 'absolute';
27113
+ highlightLine.style.top = '0px';
27114
+ highlightLine.style.left = `${(14 - gantt.parsedOptions.verticalSplitLineHighlight.lineWidth ?? 2) / 2}px`;
27115
+ highlightLine.style.width = (gantt.parsedOptions.verticalSplitLineHighlight.lineWidth ?? 2) + 'px';
27116
+ highlightLine.style.height = '100%';
27117
+ highlightLine.style.backgroundColor = gantt.parsedOptions.verticalSplitLineHighlight.lineColor;
27118
+ highlightLine.style.zIndex = '100';
27119
+ highlightLine.style.cursor = 'col-resize';
27120
+ highlightLine.style.userSelect = 'none';
27121
+ highlightLine.style.pointerEvents = 'none';
27122
+ highlightLine.style.opacity = '0';
27123
+ highlightLine.style.transition = 'background-color 0.3s';
27124
+ }
26809
27125
  }
26810
- return date;
26811
27126
  }
26812
- function createDateAtLastMillisecond(dateStr, forceSetMillisecond = false) {
26813
- let date;
26814
- if (dateStr) {
26815
- date = new Date(dateStr);
26816
- if (typeof dateStr === 'string') {
26817
- if (dateStr.length > 10) {
26818
- if (forceSetMillisecond) {
26819
- date.setMilliseconds(999);
27127
+ function findRecordByTaskKey(records, taskKeyField, taskKey, childrenField = 'children') {
27128
+ for (let i = 0; i < records.length; i++) {
27129
+ if ((Array.isArray(taskKey) && taskKey.length === 1 && records[i][taskKeyField] === taskKey[0]) ||
27130
+ records[i][taskKeyField] === taskKey) {
27131
+ return { record: records[i], index: [i] };
27132
+ }
27133
+ else if (records[i][childrenField]?.length) {
27134
+ if (Array.isArray(taskKey) && taskKey[0] === records[i][taskKeyField]) {
27135
+ const result = findRecordByTaskKey(records[i][childrenField], taskKeyField, taskKey.slice(1));
27136
+ if (result) {
27137
+ result.index.unshift(i);
27138
+ return result;
27139
+ }
27140
+ }
27141
+ else if (!Array.isArray(taskKey)) {
27142
+ const result = findRecordByTaskKey(records[i][childrenField], taskKeyField, taskKey);
27143
+ if (result) {
27144
+ result.index.unshift(i);
27145
+ return result;
26820
27146
  }
26821
- return date;
26822
27147
  }
26823
- date.setMilliseconds(999);
26824
27148
  }
26825
27149
  }
26826
- else {
26827
- date = new Date();
27150
+ }
27151
+ function clearRecordLinkInfos(records, childrenField = 'children') {
27152
+ for (let i = 0; i < records.length; i++) {
27153
+ if (records[i][childrenField]?.length) {
27154
+ clearRecordLinkInfos(records[i][childrenField], childrenField);
27155
+ }
27156
+ else {
27157
+ delete records[i].vtable_gantt_linkedTo;
27158
+ delete records[i].vtable_gantt_linkedFrom;
27159
+ }
26828
27160
  }
26829
- if (forceSetMillisecond) {
26830
- date.setMilliseconds(999);
27161
+ }
27162
+ function clearRecordShowIndex(records, childrenField = 'children') {
27163
+ for (let i = 0; i < records.length; i++) {
27164
+ if (records[i][childrenField]?.length) {
27165
+ clearRecordShowIndex(records[i][childrenField], childrenField);
27166
+ }
27167
+ else {
27168
+ delete records[i].vtable_gantt_showIndex;
27169
+ }
26831
27170
  }
26832
- return date;
26833
27171
  }
26834
- function createDateAtLastHour(dateStr, forceLastHour = false) {
26835
- let date;
26836
- if (dateStr) {
26837
- date = new Date(dateStr);
26838
- if (typeof dateStr === 'string') {
26839
- if (dateStr.length > 10) {
26840
- if (forceLastHour) {
26841
- date.setHours(23, 59, 59, 999);
26842
- }
26843
- return date;
27172
+ function getTaskIndexsByTaskY(y, gantt) {
27173
+ let task_index;
27174
+ let sub_task_index;
27175
+ if (gantt.taskListTableInstance) {
27176
+ const rowInfo = gantt.taskListTableInstance.getTargetRowAt(y + gantt.headerHeight);
27177
+ if (rowInfo) {
27178
+ const { row } = rowInfo;
27179
+ task_index = row - gantt.taskListTableInstance.columnHeaderLevelCount;
27180
+ const beforeRowsHeight = gantt.getRowsHeightByIndex(0, task_index - 1);
27181
+ if (gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline ||
27182
+ gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||
27183
+ gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact ||
27184
+ gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate) {
27185
+ sub_task_index = Math.floor((y - beforeRowsHeight) / gantt.parsedOptions.rowHeight);
26844
27186
  }
26845
- date.setHours(23, 59, 59, 999);
26846
27187
  }
26847
27188
  }
26848
27189
  else {
26849
- date = new Date();
26850
- }
26851
- if (forceLastHour) {
26852
- date.setHours(23, 59, 59, 999);
27190
+ task_index = Math.floor(y / gantt.parsedOptions.rowHeight);
26853
27191
  }
26854
- return date;
27192
+ return { task_index, sub_task_index };
26855
27193
  }
26856
- function getEndDateByTimeUnit(startDate, date, timeScale, step) {
26857
- let endDate = new Date(date);
26858
- switch (timeScale) {
26859
- case 'second':
26860
- endDate.setMilliseconds(999);
26861
- break;
26862
- case 'minute':
26863
- endDate.setSeconds(59, 999);
26864
- break;
26865
- case 'hour':
26866
- endDate.setMinutes(59, 59, 999);
26867
- break;
26868
- case 'day':
26869
- endDate.setHours(23, 59, 59, 999);
26870
- break;
26871
- case 'week':
26872
- const day = endDate.getDay();
26873
- const diffToEndOfWeek = 6 - day;
26874
- endDate.setDate(endDate.getDate() + diffToEndOfWeek);
26875
- endDate.setHours(23, 59, 59, 999);
26876
- break;
26877
- case 'month':
26878
- const lastDayOfMonth = new Date(endDate.getFullYear(), endDate.getMonth() + 1, 0).getDate();
26879
- endDate.setDate(lastDayOfMonth);
26880
- endDate.setHours(23, 59, 59, 999);
26881
- break;
26882
- case 'quarter':
26883
- const currentMonth = endDate.getMonth();
27194
+ function computeRowsCountByRecordDateForCompact(gantt, record) {
27195
+ if (!record.children || record.children.length === 1) {
27196
+ if (record.children?.length === 1) {
27197
+ record.children[0].vtable_gantt_showIndex = 0;
27198
+ }
27199
+ else {
27200
+ record.vtable_gantt_showIndex = 0;
27201
+ }
27202
+ return 1;
27203
+ }
27204
+ const sortedChildren = record.children.slice().sort((a, b) => {
27205
+ const { startDate: aStartDate } = formatRecordDateConsiderHasHour(gantt, a);
27206
+ const { startDate: bStartDate } = formatRecordDateConsiderHasHour(gantt, b);
27207
+ return aStartDate.getTime() - bStartDate.getTime();
27208
+ });
27209
+ const rows = [];
27210
+ for (let i = 0; i <= sortedChildren.length - 1; i++) {
27211
+ const newRecord = sortedChildren[i];
27212
+ const { startDate, endDate } = formatRecordDateConsiderHasHour(gantt, newRecord);
27213
+ let placed = false;
27214
+ for (let j = 0; j < rows.length; j++) {
27215
+ if (startDate.getTime() > rows[j]) {
27216
+ rows[j] = endDate.getTime();
27217
+ placed = true;
27218
+ newRecord.vtable_gantt_showIndex = j;
27219
+ break;
27220
+ }
27221
+ }
27222
+ if (!placed) {
27223
+ rows.push(endDate.getTime());
27224
+ newRecord.vtable_gantt_showIndex = rows.length - 1;
27225
+ }
27226
+ }
27227
+ return rows.length;
27228
+ }
27229
+ function isOverlapping(startDate, endDate, rowTasks, gantt) {
27230
+ return rowTasks.some(rowTask => {
27231
+ const { startDate: startDate2, endDate: endDate2 } = formatRecordDateConsiderHasHour(gantt, rowTask);
27232
+ return startDate <= endDate2 && startDate2 <= endDate;
27233
+ });
27234
+ }
27235
+ function computeRowsCountByRecordDate(gantt, record) {
27236
+ if (!record.children || record.children.length === 1) {
27237
+ if (record.children?.length === 1) {
27238
+ record.children[0].vtable_gantt_showIndex = 0;
27239
+ }
27240
+ else {
27241
+ record.vtable_gantt_showIndex = 0;
27242
+ }
27243
+ return 1;
27244
+ }
27245
+ const rows = [];
27246
+ for (let i = 0; i <= record.children.length - 1; i++) {
27247
+ const newRecord = record.children[i];
27248
+ const { startDate, endDate } = formatRecordDateConsiderHasHour(gantt, newRecord);
27249
+ let placed = false;
27250
+ for (let j = 0; j < rows.length; j++) {
27251
+ const rowTasks = record.children.filter((t) => t !== newRecord && t.vtable_gantt_showIndex === j);
27252
+ if (!isOverlapping(startDate, endDate, rowTasks, gantt)) {
27253
+ rows[j] = endDate.getTime();
27254
+ placed = true;
27255
+ newRecord.vtable_gantt_showIndex = j;
27256
+ break;
27257
+ }
27258
+ }
27259
+ if (!placed) {
27260
+ rows.push(endDate.getTime());
27261
+ newRecord.vtable_gantt_showIndex = rows.length - 1;
27262
+ }
27263
+ }
27264
+ return rows.length;
27265
+ }
27266
+ function formatRecordDateConsiderHasHour(gantt, record) {
27267
+ const { timeScaleIncludeHour, startDateField, endDateField } = gantt.parsedOptions;
27268
+ const startDate = record[startDateField];
27269
+ const endDate = record[endDateField];
27270
+ if (timeScaleIncludeHour) {
27271
+ return { startDate: createDateAtMidnight(startDate), endDate: createDateAtLastHour(endDate) };
27272
+ }
27273
+ return { startDate: createDateAtMidnight(startDate, true), endDate: createDateAtLastHour(endDate, true) };
27274
+ }
27275
+ function updateOptionsWhenRecordChanged(gantt) {
27276
+ const options = gantt.options;
27277
+ const { unit: minTimeUnit, startOfWeek } = gantt.parsedOptions.reverseSortedTimelineScales[0];
27278
+ gantt.parsedOptions.markLine = generateMarkLine(options?.markLine);
27279
+ if (gantt.parsedOptions.markLine?.length ?? 0) {
27280
+ if (gantt.parsedOptions.markLine?.every(item => item.scrollToMarkLine === undefined)) {
27281
+ gantt.parsedOptions.markLine[0].scrollToMarkLine = true;
27282
+ }
27283
+ if (gantt.parsedOptions.markLine?.find(item => item.scrollToMarkLine)) {
27284
+ gantt.parsedOptions.scrollToMarkLineDate = getStartDateByTimeUnit(new Date(gantt.parsedOptions.markLine?.find(item => item.scrollToMarkLine).date), minTimeUnit, startOfWeek);
27285
+ }
27286
+ }
27287
+ gantt.parsedOptions.dependencyLinks = options.dependency?.links;
27288
+ }
27289
+ function updateOptionsWhenDateRangeChanged(gantt) {
27290
+ const options = gantt.options;
27291
+ const { unit: minTimeUnit, startOfWeek, step } = gantt.parsedOptions.reverseSortedTimelineScales[0];
27292
+ gantt.parsedOptions.minDate = options?.minDate
27293
+ ? getStartDateByTimeUnit(new Date(options.minDate), minTimeUnit, startOfWeek)
27294
+ : undefined;
27295
+ gantt.parsedOptions.maxDate = options?.maxDate
27296
+ ? getEndDateByTimeUnit(gantt.parsedOptions.minDate, new Date(options.maxDate), minTimeUnit, step)
27297
+ : undefined;
27298
+ gantt.parsedOptions._minDateTime = gantt.parsedOptions.minDate?.getTime();
27299
+ gantt.parsedOptions._maxDateTime = gantt.parsedOptions.maxDate?.getTime();
27300
+ }
27301
+ function updateOptionsWhenMarkLineChanged(gantt) {
27302
+ const options = gantt.options;
27303
+ gantt.parsedOptions.markLine = generateMarkLine(options?.markLine);
27304
+ }
27305
+ function _getTaskInfoByXYForCreateSchedule(eventX, eventY, gantt) {
27306
+ const taskIndex = getTaskIndexsByTaskY(eventY - gantt.headerHeight + gantt.stateManager.scrollTop, gantt);
27307
+ const recordParent = gantt.getRecordByIndex(taskIndex.task_index);
27308
+ const dateIndex = getDateIndexByX(eventX, gantt);
27309
+ const dateRange = gantt.getDateRangeByIndex(dateIndex);
27310
+ if (recordParent?.children) {
27311
+ const taskIndex = getTaskIndexsByTaskY(eventY - gantt.headerHeight + gantt.stateManager.scrollTop, gantt);
27312
+ for (let i = 0; i < recordParent.children.length; i++) {
27313
+ const { startDate, endDate, taskDays, progress, taskRecord } = gantt.getTaskInfoByTaskListIndex(taskIndex.task_index, i);
27314
+ if (((gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact ||
27315
+ gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange) &&
27316
+ taskRecord.vtable_gantt_showIndex === taskIndex.sub_task_index) ||
27317
+ gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline) {
27318
+ if (dateRange.startDate.getTime() >= startDate.getTime() && dateRange.endDate.getTime() <= endDate.getTime()) {
27319
+ return { startDate, endDate, taskDays, progress, taskRecord };
27320
+ }
27321
+ }
27322
+ }
27323
+ }
27324
+ }
27325
+ function getNodeClickPos(marklineIconNode, gantt) {
27326
+ const left = marklineIconNode.globalTransMatrix.e +
27327
+ gantt.taskListTableInstance.tableNoFrameWidth +
27328
+ gantt.taskListTableInstance.tableX +
27329
+ gantt.tableX;
27330
+ const top = marklineIconNode.globalTransMatrix.f;
27331
+ const width = marklineIconNode.attribute.width;
27332
+ const height = marklineIconNode.attribute.height;
27333
+ return {
27334
+ left,
27335
+ top,
27336
+ width,
27337
+ height
27338
+ };
27339
+ }
27340
+ function judgeIfHasMarkLine(data, markLine) {
27341
+ const beginTime = data.startDate.getTime();
27342
+ const endTime = data.endDate.getTime();
27343
+ return markLine.some(item => {
27344
+ const marklineTime = new Date(item.date).getTime();
27345
+ return marklineTime >= beginTime && marklineTime <= endTime;
27346
+ });
27347
+ }
27348
+
27349
+ function throttle$1(func, delay) {
27350
+ let timer = null;
27351
+ return function (...args) {
27352
+ if (!timer) {
27353
+ func.apply(this, args);
27354
+ timer = setTimeout(() => {
27355
+ timer = null;
27356
+ }, delay);
27357
+ }
27358
+ };
27359
+ }
27360
+ function getTodayNearDay(dayOffset, format) {
27361
+ const today = new Date();
27362
+ const todayTime = today.getTime();
27363
+ const oneDayTime = 24 * 60 * 60 * 1000;
27364
+ const targetTime = todayTime + dayOffset * oneDayTime;
27365
+ const date = new Date(targetTime);
27366
+ if (format) {
27367
+ const year = date.getFullYear().toString();
27368
+ const month = (date.getMonth() + 1).toString().padStart(2, '0');
27369
+ const day = date.getDate().toString().padStart(2, '0');
27370
+ format = format.replace('yyyy', year);
27371
+ format = format.replace('mm', month);
27372
+ format = format.replace('dd', day);
27373
+ return format;
27374
+ }
27375
+ return date;
27376
+ }
27377
+ function formatDate(date, format) {
27378
+ const year = date.getFullYear().toString();
27379
+ const month = (date.getMonth() + 1).toString().padStart(2, '0');
27380
+ const day = date.getDate().toString().padStart(2, '0');
27381
+ format = format.replace('yyyy', year);
27382
+ format = format.replace('mm', month);
27383
+ format = format.replace('dd', day);
27384
+ if (format.length > 10) {
27385
+ const hour = date.getHours().toString().padStart(2, '0');
27386
+ const minute = date.getMinutes().toString().padStart(2, '0');
27387
+ const second = date.getSeconds().toString().padStart(2, '0');
27388
+ format = format.replace('hh', hour);
27389
+ format = format.replace('mm', minute);
27390
+ format = format.replace('ss', second);
27391
+ }
27392
+ return format;
27393
+ }
27394
+ function validateDate(dateParts, format) {
27395
+ const yearIndex = format.indexOf('yyyy');
27396
+ const monthIndex = format.indexOf('mm');
27397
+ const dayIndex = format.indexOf('dd');
27398
+ const dateYearIndex = yearIndex < monthIndex ? (yearIndex < dayIndex ? 0 : 1) : monthIndex < dayIndex ? 1 : 2;
27399
+ const dateMonthIndex = monthIndex < yearIndex ? (monthIndex < dayIndex ? 0 : 1) : monthIndex < dayIndex ? 1 : 2;
27400
+ const dateDayIndex = dayIndex < yearIndex ? (dayIndex < monthIndex ? 0 : 1) : dayIndex < monthIndex ? 1 : 2;
27401
+ const year = parseInt(dateParts[dateYearIndex], 10);
27402
+ const month = parseInt(dateParts[dateMonthIndex], 10) - 1;
27403
+ const day = parseInt(dateParts[dateDayIndex], 10);
27404
+ if (isNaN(year) || year < 1) {
27405
+ return false;
27406
+ }
27407
+ if (isNaN(month) || month < 0 || month > 11) {
27408
+ return false;
27409
+ }
27410
+ const daysInMonth = [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
27411
+ if (isNaN(day) || day < 1 || day > daysInMonth[month]) {
27412
+ return false;
27413
+ }
27414
+ return true;
27415
+ }
27416
+ function validateTime(dateParts, format) {
27417
+ if (format.includes('hh') || format.includes('mm') || format.includes('ss')) {
27418
+ const timeIndex = format.indexOf('hh') > -1 ? format.indexOf('hh') : format.indexOf('HH');
27419
+ const hour = parseInt(dateParts[timeIndex], 10);
27420
+ const minute = parseInt(dateParts[timeIndex + 1], 10);
27421
+ const second = dateParts.length > timeIndex + 2 ? parseInt(dateParts[timeIndex + 2], 10) : 0;
27422
+ if (isNaN(hour) || hour < 0 || hour > 23) {
27423
+ return false;
27424
+ }
27425
+ if (isNaN(minute) || minute < 0 || minute > 59) {
27426
+ return false;
27427
+ }
27428
+ if (isNaN(second) || second < 0 || second > 59) {
27429
+ return false;
27430
+ }
27431
+ }
27432
+ return true;
27433
+ }
27434
+ function isLeapYear(year) {
27435
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
27436
+ }
27437
+ function parseDateFormat(dateString) {
27438
+ const formats = [
27439
+ 'yyyy-mm-dd',
27440
+ 'dd-mm-yyyy',
27441
+ 'mm/dd/yyyy',
27442
+ 'yyyy/mm/dd',
27443
+ 'dd/mm/yyyy',
27444
+ 'yyyy.mm.dd',
27445
+ 'mm.dd.yyyy',
27446
+ 'dd.mm.yyyy'
27447
+ ];
27448
+ const timeFormat = ['hh:mm:ss', 'hh:mm'];
27449
+ dateString = dateString.trim();
27450
+ const dates = dateString.split(' ');
27451
+ const date = dates[0];
27452
+ const time = dates[1];
27453
+ let dateFormatMatched;
27454
+ let timeFormatMatched;
27455
+ if (date) {
27456
+ for (let i = 0; i < formats.length; i++) {
27457
+ const format = formats[i];
27458
+ const dateParts = date.split(getSeparator(format));
27459
+ const isValid = validateDate(dateParts, format);
27460
+ if (dateParts.length === 3 && isValid) {
27461
+ dateFormatMatched = format;
27462
+ break;
27463
+ }
27464
+ }
27465
+ }
27466
+ if (dateFormatMatched) {
27467
+ if (time) {
27468
+ for (let i = 0; i < timeFormat.length; i++) {
27469
+ const format = timeFormat[i];
27470
+ const timeParts = time.split(getSeparator(format));
27471
+ const formatParts = format.split(getSeparator(format));
27472
+ const isValid = validateTime(timeParts, format);
27473
+ if (isValid && timeParts.length === formatParts.length) {
27474
+ timeFormatMatched = format;
27475
+ break;
27476
+ }
27477
+ }
27478
+ }
27479
+ }
27480
+ if (date && time && dateFormatMatched && timeFormatMatched) {
27481
+ return dateFormatMatched + ' ' + timeFormatMatched;
27482
+ }
27483
+ if (date && !time) {
27484
+ return dateFormatMatched;
27485
+ }
27486
+ return 'yyyy-mm-dd hh:mm:ss';
27487
+ }
27488
+ function getSeparator(format) {
27489
+ const separators = format.match(/[^\w]/g);
27490
+ if (separators) {
27491
+ const escapedSeparators = separators.map(s => '\\' + s).join('|');
27492
+ return new RegExp(escapedSeparators, 'g');
27493
+ }
27494
+ return /[^\w]/;
27495
+ }
27496
+ function parseStringTemplate(template, data) {
27497
+ const result = template.replace(/\{([^}]+)\}/g, (match, key) => {
27498
+ const keys = key.split('.');
27499
+ let value = data;
27500
+ for (const k of keys) {
27501
+ if (value.hasOwnProperty(k)) {
27502
+ value = value[k];
27503
+ }
27504
+ else {
27505
+ value = match;
27506
+ break;
27507
+ }
27508
+ }
27509
+ return value;
27510
+ });
27511
+ return result;
27512
+ }
27513
+ function toBoxArray$2(obj) {
27514
+ if (!Array.isArray(obj)) {
27515
+ return [obj, obj, obj, obj];
27516
+ }
27517
+ if (obj.length === 3) {
27518
+ return [obj[0], obj[1], obj[2], obj[1]];
27519
+ }
27520
+ if (obj.length === 2) {
27521
+ return [obj[0], obj[1], obj[0], obj[1]];
27522
+ }
27523
+ if (obj.length === 1) {
27524
+ return [obj[0], obj[0], obj[0], obj[0]];
27525
+ }
27526
+ return [obj[0], obj[1], obj[2], obj[3]];
27527
+ }
27528
+ function getWeekNumber(currentDate) {
27529
+ const startOfYear = new Date(currentDate.getFullYear(), 0, 1);
27530
+ const weekNumber = Math.ceil(((currentDate.getTime() + 1 - startOfYear.getTime()) / 86400000 + 1) / 7);
27531
+ return weekNumber;
27532
+ }
27533
+ function getWeekday(dateString, format = 'long') {
27534
+ const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
27535
+ const date = new Date(dateString);
27536
+ if (format === 'short') {
27537
+ return days[date.getDay()].substr(0, 3);
27538
+ }
27539
+ else if (format === 'long') {
27540
+ return days[date.getDay()];
27541
+ }
27542
+ return 'Invalid format specified. Please use "short" or "long".';
27543
+ }
27544
+ function isPropertyWritable(obj, prop) {
27545
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
27546
+ if (!descriptor) {
27547
+ return false;
27548
+ }
27549
+ return !!descriptor.set || descriptor.writable === true;
27550
+ }
27551
+ function createDateAtMidnight(dateStr, forceMidnight = false) {
27552
+ let date;
27553
+ if (dateStr) {
27554
+ date = new Date(dateStr);
27555
+ if (typeof dateStr === 'string') {
27556
+ if (dateStr.length > 10) {
27557
+ if (forceMidnight) {
27558
+ date.setHours(0, 0, 0, 0);
27559
+ }
27560
+ return date;
27561
+ }
27562
+ date.setHours(0, 0, 0, 0);
27563
+ }
27564
+ }
27565
+ else {
27566
+ date = new Date();
27567
+ }
27568
+ if (forceMidnight) {
27569
+ date.setHours(0, 0, 0, 0);
27570
+ }
27571
+ return date;
27572
+ }
27573
+ function createDateAtLastMinute(dateStr, forceSetMinute = false) {
27574
+ let date;
27575
+ if (dateStr) {
27576
+ date = new Date(dateStr);
27577
+ if (typeof dateStr === 'string') {
27578
+ if (dateStr.length > 10) {
27579
+ if (forceSetMinute) {
27580
+ date.setMinutes(59, 59, 999);
27581
+ }
27582
+ return date;
27583
+ }
27584
+ date.setMinutes(59, 59, 999);
27585
+ }
27586
+ }
27587
+ else {
27588
+ date = new Date();
27589
+ }
27590
+ if (forceSetMinute) {
27591
+ date.setMinutes(59, 59, 999);
27592
+ }
27593
+ return date;
27594
+ }
27595
+ function createDateAtLastSecond(dateStr, forceSetSecond = false) {
27596
+ let date;
27597
+ if (dateStr) {
27598
+ date = new Date(dateStr);
27599
+ if (typeof dateStr === 'string') {
27600
+ if (dateStr.length > 10) {
27601
+ if (forceSetSecond) {
27602
+ date.setSeconds(59, 999);
27603
+ }
27604
+ return date;
27605
+ }
27606
+ date.setSeconds(59, 999);
27607
+ }
27608
+ }
27609
+ else {
27610
+ date = new Date();
27611
+ }
27612
+ if (forceSetSecond) {
27613
+ date.setSeconds(59, 999);
27614
+ }
27615
+ return date;
27616
+ }
27617
+ function createDateAtLastMillisecond(dateStr, forceSetMillisecond = false) {
27618
+ let date;
27619
+ if (dateStr) {
27620
+ date = new Date(dateStr);
27621
+ if (typeof dateStr === 'string') {
27622
+ if (dateStr.length > 10) {
27623
+ if (forceSetMillisecond) {
27624
+ date.setMilliseconds(999);
27625
+ }
27626
+ return date;
27627
+ }
27628
+ date.setMilliseconds(999);
27629
+ }
27630
+ }
27631
+ else {
27632
+ date = new Date();
27633
+ }
27634
+ if (forceSetMillisecond) {
27635
+ date.setMilliseconds(999);
27636
+ }
27637
+ return date;
27638
+ }
27639
+ function createDateAtLastHour(dateStr, forceLastHour = false) {
27640
+ let date;
27641
+ if (dateStr) {
27642
+ date = new Date(dateStr);
27643
+ if (typeof dateStr === 'string') {
27644
+ if (dateStr.length > 10) {
27645
+ if (forceLastHour) {
27646
+ date.setHours(23, 59, 59, 999);
27647
+ }
27648
+ return date;
27649
+ }
27650
+ date.setHours(23, 59, 59, 999);
27651
+ }
27652
+ }
27653
+ else {
27654
+ date = new Date();
27655
+ }
27656
+ if (forceLastHour) {
27657
+ date.setHours(23, 59, 59, 999);
27658
+ }
27659
+ return date;
27660
+ }
27661
+ function getEndDateByTimeUnit(startDate, date, timeScale, step) {
27662
+ let endDate = new Date(date);
27663
+ switch (timeScale) {
27664
+ case 'second':
27665
+ endDate.setMilliseconds(999);
27666
+ break;
27667
+ case 'minute':
27668
+ endDate.setSeconds(59, 999);
27669
+ break;
27670
+ case 'hour':
27671
+ endDate.setMinutes(59, 59, 999);
27672
+ break;
27673
+ case 'day':
27674
+ endDate.setHours(23, 59, 59, 999);
27675
+ break;
27676
+ case 'week':
27677
+ const day = endDate.getDay();
27678
+ const diffToEndOfWeek = 6 - day;
27679
+ endDate.setDate(endDate.getDate() + diffToEndOfWeek);
27680
+ endDate.setHours(23, 59, 59, 999);
27681
+ break;
27682
+ case 'month':
27683
+ const lastDayOfMonth = new Date(endDate.getFullYear(), endDate.getMonth() + 1, 0).getDate();
27684
+ endDate.setDate(lastDayOfMonth);
27685
+ endDate.setHours(23, 59, 59, 999);
27686
+ break;
27687
+ case 'quarter':
27688
+ const currentMonth = endDate.getMonth();
26884
27689
  const endMonthOfQuarter = currentMonth - (currentMonth % 3) + 2;
26885
27690
  const lastDayOfQuarter = new Date(endDate.getFullYear(), endMonthOfQuarter + 1, 0).getDate();
26886
27691
  endDate.setMonth(endMonthOfQuarter, lastDayOfQuarter);
@@ -27020,9 +27825,11 @@
27020
27825
  case 'quarter':
27021
27826
  difference =
27022
27827
  (adjusted_date.getFullYear() - startDate.getFullYear()) * 4 +
27023
- (adjusted_date.getMonth() - startDate.getMonth()) / 3;
27828
+ Math.floor(adjusted_date.getMonth() / 3) -
27829
+ Math.floor(startDate.getMonth() / 3);
27024
27830
  difference +=
27025
- (adjusted_date.getDate() - startDate.getDate()) /
27831
+ (adjusted_date.getTime() - startDate.getTime()) /
27832
+ DayTimes /
27026
27833
  (3 * new Date(adjusted_date.getFullYear(), adjusted_date.getMonth() + 1, 0).getDate());
27027
27834
  break;
27028
27835
  case 'year':
@@ -27622,967 +28429,162 @@
27622
28429
  y: -this._gantt.tableNoFrameHeight * 2,
27623
28430
  height: 0,
27624
28431
  visible: false
27625
- });
27626
- }
27627
- this._gantt.stateManager.setScrollLeft(oldHorizontalBarPos);
27628
- this._gantt.stateManager.setScrollTop(oldVerticalBarPos);
27629
- }
27630
- }
27631
-
27632
- function handleWhell$1(event, state, gantt, isWheelEvent = true) {
27633
- let { deltaX, deltaY } = event;
27634
- if (event.shiftKey && event.deltaY) {
27635
- deltaX = deltaY;
27636
- deltaY = 0;
27637
- }
27638
- const [optimizedDeltaX, optimizedDeltaY] = optimizeScrollXY$1(deltaX, deltaY, { horizontal: 1, vertical: 1 });
27639
- if (optimizedDeltaX) {
27640
- state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX);
27641
- gantt.scenegraph.scrollbarComponent.showHorizontalScrollBar(true);
27642
- }
27643
- if (optimizedDeltaY) {
27644
- state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY);
27645
- gantt.scenegraph.scrollbarComponent.showVerticalScrollBar(true);
27646
- }
27647
- isWheelEvent && state.resetInteractionState();
27648
- if (event.cancelable &&
27649
- (state._gantt.parsedOptions.overscrollBehavior === 'none' ||
27650
- (Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable$1(deltaY, state)) ||
27651
- (Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable$1(deltaX, state)))) {
27652
- event.preventDefault();
27653
- }
27654
- }
27655
- function optimizeScrollXY$1(x, y, ratio) {
27656
- const ANGLE = 2;
27657
- const angle = Math.abs(x / y);
27658
- const deltaX = angle <= 1 / ANGLE ? 0 : x;
27659
- const deltaY = angle > ANGLE ? 0 : y;
27660
- return [Math.ceil(deltaX * (ratio.horizontal ?? 0)), Math.ceil(deltaY * (ratio.vertical ?? 0))];
27661
- }
27662
- function isVerticalScrollable$1(deltaY, state) {
27663
- const totalHeight = state._gantt.getAllRowsHeight() - state._gantt.scenegraph.height;
27664
- if (totalHeight === 0) {
27665
- return false;
27666
- }
27667
- return !isScrollToTop$1(deltaY, state) && !isScrollToBottom$1(deltaY, state);
27668
- }
27669
- function isHorizontalScrollable$1(deltaX, state) {
27670
- const totalWidth = state._gantt.getAllDateColsWidth() - state._gantt.scenegraph.width;
27671
- if (totalWidth === 0) {
27672
- return false;
27673
- }
27674
- return !isScrollToLeft$1(deltaX, state) && !isScrollToRight$1(deltaX, state);
27675
- }
27676
- function isScrollToTop$1(deltaY, state) {
27677
- const totalHeight = state._gantt.getAllRowsHeight() - state._gantt.scenegraph.height;
27678
- return totalHeight !== 0 && deltaY <= 0 && state.scroll.verticalBarPos < 1;
27679
- }
27680
- function isScrollToBottom$1(deltaY, state) {
27681
- const totalHeight = state._gantt.getAllRowsHeight() - state._gantt.scenegraph.height;
27682
- return totalHeight !== 0 && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1;
27683
- }
27684
- function isScrollToLeft$1(deltaX, state) {
27685
- const totalWidth = state._gantt.getAllDateColsWidth() - state._gantt.scenegraph.width;
27686
- return totalWidth !== 0 && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
27687
- }
27688
- function isScrollToRight$1(deltaX, state) {
27689
- const totalWidth = state._gantt.getAllDateColsWidth() - state._gantt.scenegraph.width;
27690
- return totalWidth !== 0 && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1;
27691
- }
27692
- function bindScrollBarListener$1(eventManager) {
27693
- const table = eventManager._gantt;
27694
- const stateManager = table.stateManager;
27695
- const scenegraph = table.scenegraph;
27696
- scenegraph.scrollbarComponent.vScrollBar.addEventListener('pointerover', (e) => {
27697
- scenegraph.scrollbarComponent.showVerticalScrollBar();
27698
- });
27699
- scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointerover', (e) => {
27700
- scenegraph.scrollbarComponent.showHorizontalScrollBar();
27701
- });
27702
- scenegraph.scrollbarComponent.vScrollBar.addEventListener('pointerout', (e) => {
27703
- if (stateManager.interactionState === InteractionState$1.scrolling) {
27704
- return;
27705
- }
27706
- scenegraph.scrollbarComponent.hideVerticalScrollBar();
27707
- });
27708
- scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointerout', (e) => {
27709
- if (stateManager.interactionState === InteractionState$1.scrolling) {
27710
- return;
27711
- }
27712
- scenegraph.scrollbarComponent.hideHorizontalScrollBar();
27713
- });
27714
- scenegraph.scrollbarComponent.vScrollBar.addEventListener('pointermove', (e) => {
27715
- e.stopPropagation();
27716
- });
27717
- scenegraph.scrollbarComponent.vScrollBar.addEventListener('scrollDown', (e) => {
27718
- scenegraph._gantt.eventManager.isDown = true;
27719
- });
27720
- scenegraph.scrollbarComponent.vScrollBar.addEventListener('pointerup', () => {
27721
- scenegraph._gantt.eventManager.isDraging = false;
27722
- if (stateManager.interactionState === InteractionState$1.scrolling) {
27723
- stateManager.updateInteractionState(InteractionState$1.default);
27724
- }
27725
- });
27726
- scenegraph.scrollbarComponent.vScrollBar.addEventListener('pointerupoutside', () => {
27727
- if (stateManager.interactionState === InteractionState$1.scrolling) {
27728
- stateManager.updateInteractionState(InteractionState$1.default);
27729
- }
27730
- });
27731
- scenegraph.scrollbarComponent.vScrollBar.addEventListener('scrollUp', (e) => {
27732
- scenegraph._gantt.eventManager.isDraging = false;
27733
- });
27734
- scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointermove', (e) => {
27735
- e.stopPropagation();
27736
- });
27737
- scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointerdown', (e) => {
27738
- e.stopPropagation();
27739
- });
27740
- scenegraph.scrollbarComponent.hScrollBar.addEventListener('scrollDown', (e) => {
27741
- scenegraph._gantt.eventManager.isDown = true;
27742
- if (stateManager.interactionState !== InteractionState$1.scrolling) {
27743
- stateManager.updateInteractionState(InteractionState$1.scrolling);
27744
- }
27745
- });
27746
- scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointerup', () => {
27747
- if (stateManager.interactionState === InteractionState$1.scrolling) {
27748
- stateManager.updateInteractionState(InteractionState$1.default);
27749
- }
27750
- });
27751
- scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointerupoutside', () => {
27752
- if (stateManager.interactionState === InteractionState$1.scrolling) {
27753
- stateManager.updateInteractionState(InteractionState$1.default);
27754
- }
27755
- });
27756
- scenegraph.scrollbarComponent.hScrollBar.addEventListener('scrollUp', (e) => {
27757
- scenegraph._gantt.eventManager.isDraging = false;
27758
- });
27759
- const throttleVerticalWheel = throttle$1(stateManager.updateVerticalScrollBar, 20);
27760
- const throttleHorizontalWheel = throttle$1(stateManager.updateHorizontalScrollBar, 20);
27761
- scenegraph.scrollbarComponent.vScrollBar.addEventListener('scrollDrag', (e) => {
27762
- if (scenegraph._gantt.eventManager.isDown) {
27763
- scenegraph._gantt.eventManager.isDraging = true;
27764
- }
27765
- if (stateManager.interactionState !== InteractionState$1.scrolling) {
27766
- stateManager.updateInteractionState(InteractionState$1.scrolling);
27767
- }
27768
- const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
27769
- throttleVerticalWheel(ratio, e);
27770
- });
27771
- scenegraph.scrollbarComponent.hScrollBar.addEventListener('scrollDrag', (e) => {
27772
- if (scenegraph._gantt.eventManager.isDown) {
27773
- scenegraph._gantt.eventManager.isDraging = true;
27774
- }
27775
- stateManager.fastScrolling = true;
27776
- if (stateManager.interactionState !== InteractionState$1.scrolling) {
27777
- stateManager.updateInteractionState(InteractionState$1.scrolling);
27778
- }
27779
- const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
27780
- throttleHorizontalWheel(ratio);
27781
- });
27782
- }
27783
-
27784
- const defaultTaskBarStyle = {
27785
- barColor: 'blue',
27786
- completedBarColor: 'gray',
27787
- width: 30,
27788
- cornerRadius: 3,
27789
- borderWidth: 0,
27790
- fontFamily: 'Arial',
27791
- fontSize: 14
27792
- };
27793
- function setWidthToDefaultTaskBarStyle(width) {
27794
- defaultTaskBarStyle.width = width;
27795
- }
27796
- const isNode$1 = typeof window === 'undefined' || typeof window.window === 'undefined';
27797
- const DayTimes = 1000 * 60 * 60 * 24;
27798
- function getDateIndexByX(x, gantt) {
27799
- const totalX = x + gantt.stateManager.scroll.horizontalBarPos;
27800
- const firstDateColWidth = gantt.getDateColWidth(0);
27801
- const dateIndex = Math.floor((totalX - firstDateColWidth) / gantt.parsedOptions.timelineColWidth) + 1;
27802
- return dateIndex;
27803
- }
27804
- function generateMarkLine(markLine) {
27805
- if (!markLine) {
27806
- return [];
27807
- }
27808
- if (markLine === true) {
27809
- return [
27810
- {
27811
- date: createDateAtMidnight().toLocaleDateString(),
27812
- scrollToMarkLine: true,
27813
- position: 'left',
27814
- style: {
27815
- lineColor: 'red',
27816
- lineWidth: 1
27817
- }
27818
- }
27819
- ];
27820
- }
27821
- else if (Array.isArray(markLine)) {
27822
- return markLine.map((item, index) => {
27823
- return {
27824
- ...item,
27825
- date: item.date,
27826
- scrollToMarkLine: item.scrollToMarkLine,
27827
- position: item.position ?? 'left',
27828
- style: {
27829
- lineColor: item.style?.lineColor || 'red',
27830
- lineWidth: item.style?.lineWidth || 1,
27831
- lineDash: item.style?.lineDash
27832
- }
27833
- };
27834
- });
27835
- }
27836
- return [
27837
- {
27838
- ...markLine,
27839
- date: markLine.date,
27840
- scrollToMarkLine: markLine.scrollToMarkLine ?? true,
27841
- position: markLine.position ?? 'left',
27842
- style: {
27843
- lineColor: markLine.style?.lineColor || 'red',
27844
- lineWidth: markLine.style?.lineWidth || 1,
27845
- lineDash: markLine.style?.lineDash
27846
- }
27847
- }
27848
- ];
27849
- }
27850
- function getHorizontalScrollBarSize$1(scrollStyle) {
27851
- if (scrollStyle?.hoverOn ||
27852
- (scrollStyle?.horizontalVisible && scrollStyle?.horizontalVisible === 'none') ||
27853
- (!scrollStyle?.horizontalVisible && scrollStyle?.visible === 'none')) {
27854
- return 0;
27855
- }
27856
- return scrollStyle?.width ?? 7;
27857
- }
27858
- function getVerticalScrollBarSize$1(scrollStyle) {
27859
- if (scrollStyle?.hoverOn ||
27860
- (scrollStyle?.verticalVisible && scrollStyle?.verticalVisible === 'none') ||
27861
- (!scrollStyle?.verticalVisible && scrollStyle?.visible === 'none')) {
27862
- return 0;
27863
- }
27864
- return scrollStyle?.width ?? 7;
27865
- }
27866
- function initOptions(gantt) {
27867
- const options = gantt.options;
27868
- gantt.parsedOptions.tasksShowMode = options?.tasksShowMode ?? TasksShowMode.Tasks_Separate;
27869
- gantt.parsedOptions.pixelRatio = options?.pixelRatio ?? 1;
27870
- gantt.parsedOptions.rowHeight = options?.rowHeight ?? 40;
27871
- gantt.parsedOptions.timelineColWidth = options?.timelineHeader?.colWidth ?? 60;
27872
- gantt.parsedOptions.startDateField = options.taskBar?.startDateField ?? 'startDate';
27873
- gantt.parsedOptions.endDateField = options.taskBar?.endDateField ?? 'endDate';
27874
- gantt.parsedOptions.progressField = options.taskBar?.progressField ?? 'progress';
27875
- const { unit: minTimeUnit, startOfWeek, step } = gantt.parsedOptions.reverseSortedTimelineScales[0];
27876
- gantt.parsedOptions.minDate = options?.minDate
27877
- ? getStartDateByTimeUnit(new Date(options.minDate), minTimeUnit, startOfWeek)
27878
- : undefined;
27879
- gantt.parsedOptions.maxDate = options?.maxDate
27880
- ? getEndDateByTimeUnit(gantt.parsedOptions.minDate, new Date(options.maxDate), minTimeUnit, step)
27881
- : undefined;
27882
- gantt.parsedOptions._minDateTime = gantt.parsedOptions.minDate?.getTime();
27883
- gantt.parsedOptions._maxDateTime = gantt.parsedOptions.maxDate?.getTime();
27884
- gantt.parsedOptions.overscrollBehavior = options?.overscrollBehavior ?? 'auto';
27885
- gantt.parsedOptions.underlayBackgroundColor = options?.underlayBackgroundColor ?? '#FFF';
27886
- gantt.parsedOptions.scrollStyle = Object.assign({}, {
27887
- scrollRailColor: 'rgba(100, 100, 100, 0.2)',
27888
- scrollSliderColor: 'rgba(100, 100, 100, 0.5)',
27889
- scrollSliderCornerRadius: 4,
27890
- width: 10,
27891
- visible: 'always',
27892
- hoverOn: true,
27893
- barToSide: false
27894
- }, options?.scrollStyle);
27895
- gantt.parsedOptions.timelineHeaderHorizontalLineStyle = options?.timelineHeader?.horizontalLine;
27896
- gantt.parsedOptions.timelineHeaderVerticalLineStyle = options?.timelineHeader?.verticalLine;
27897
- gantt.parsedOptions.timelineHeaderBackgroundColor = options?.timelineHeader?.backgroundColor;
27898
- gantt.parsedOptions.timeLineHeaderRowHeights = [];
27899
- gantt.parsedOptions.timelineHeaderStyles = [];
27900
- for (let i = 0; i < gantt.parsedOptions.sortedTimelineScales.length ?? 0; i++) {
27901
- const style = gantt.parsedOptions.sortedTimelineScales[i].style;
27902
- gantt.parsedOptions.timelineHeaderStyles.push(Object.assign({
27903
- fontSize: 20,
27904
- fontWeight: 'bold',
27905
- textAlign: 'center',
27906
- textBaseline: 'middle',
27907
- color: '#000',
27908
- backgroundColor: '#fff'
27909
- }, style));
27910
- gantt.parsedOptions.timeLineHeaderRowHeights.push(gantt.parsedOptions.sortedTimelineScales[i].rowHeight ?? options?.headerRowHeight ?? 40);
27911
- }
27912
- gantt.parsedOptions.grid = Object.assign({}, options?.grid);
27913
- setWidthToDefaultTaskBarStyle((gantt.parsedOptions.rowHeight * 3) / 4);
27914
- gantt.parsedOptions.taskBarStyle =
27915
- options?.taskBar?.barStyle && typeof options?.taskBar?.barStyle === 'function'
27916
- ? options.taskBar.barStyle
27917
- : Object.assign({}, defaultTaskBarStyle, options?.taskBar?.barStyle);
27918
- gantt.parsedOptions.taskBarMilestoneStyle = Object.assign(typeof gantt.parsedOptions.taskBarStyle === 'function'
27919
- ? {}
27920
- : {
27921
- width: gantt.parsedOptions.taskBarStyle.width,
27922
- borderColor: gantt.parsedOptions.taskBarStyle.borderColor,
27923
- borderLineWidth: gantt.parsedOptions.taskBarStyle.borderLineWidth ?? 1,
27924
- fillColor: gantt.parsedOptions.taskBarStyle.barColor,
27925
- cornerRadius: 0
27926
- }, options?.taskBar?.milestoneStyle);
27927
- gantt.parsedOptions.taskBarMilestoneHypotenuse = gantt.parsedOptions.taskBarMilestoneStyle.width * Math.sqrt(2);
27928
- gantt.parsedOptions.dateFormat = options?.dateFormat;
27929
- gantt.parsedOptions.taskBarHoverStyle = Object.assign({
27930
- barOverlayColor: 'rgba(99, 144, 0, 0.4)'
27931
- }, options?.taskBar?.hoverBarStyle);
27932
- gantt.parsedOptions.taskBarSelectable = options?.taskBar?.selectable ?? true;
27933
- gantt.parsedOptions.taskBarSelectedStyle = Object.assign(typeof gantt.parsedOptions.taskBarStyle === 'function'
27934
- ? {
27935
- shadowBlur: 6,
27936
- shadowOffsetX: 0,
27937
- shadowOffsetY: 0,
27938
- borderLineWidth: 1
27939
- }
27940
- : {
27941
- shadowBlur: 6,
27942
- shadowOffsetX: 0,
27943
- shadowOffsetY: 0,
27944
- shadowColor: gantt.parsedOptions.taskBarStyle.barColor,
27945
- borderColor: gantt.parsedOptions.taskBarStyle.barColor,
27946
- borderLineWidth: 1
27947
- }, options?.taskBar?.selectedBarStyle);
27948
- gantt.parsedOptions.taskBarLabelText = options?.taskBar?.labelText ?? '';
27949
- gantt.parsedOptions.taskBarMoveable = options?.taskBar?.moveable ?? true;
27950
- gantt.parsedOptions.moveTaskBarToExtendDateRange = options?.taskBar?.moveToExtendDateRange ?? true;
27951
- gantt.parsedOptions.taskBarResizable = options?.taskBar?.resizable ?? true;
27952
- gantt.parsedOptions.taskBarDragOrder = options?.taskBar?.dragOrder ?? true;
27953
- gantt.parsedOptions.taskBarLabelStyle = {
27954
- fontFamily: options?.taskBar?.labelTextStyle?.fontFamily ?? 'Arial',
27955
- fontSize: options?.taskBar?.labelTextStyle?.fontSize ?? 20,
27956
- color: options?.taskBar?.labelTextStyle?.color ?? '#F01',
27957
- textAlign: options?.taskBar?.labelTextStyle?.textAlign ?? 'left',
27958
- textBaseline: options?.taskBar?.labelTextStyle?.textBaseline ?? 'middle',
27959
- padding: options?.taskBar?.labelTextStyle?.padding ?? [0, 0, 0, 10],
27960
- textOverflow: options?.taskBar?.labelTextStyle?.textOverflow
27961
- };
27962
- gantt.parsedOptions.taskBarCustomLayout = options?.taskBar?.customLayout;
27963
- gantt.parsedOptions.taskBarCreatable =
27964
- options?.taskBar?.scheduleCreatable ??
27965
- !!(gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate ||
27966
- gantt.parsedOptions.tasksShowMode === TasksShowMode.Tasks_Separate);
27967
- gantt.parsedOptions.taskBarCreationButtonStyle = Object.assign({
27968
- lineColor: 'rgb(99, 144, 0)',
27969
- lineWidth: 1,
27970
- lineDash: [5, 5],
27971
- cornerRadius: 4,
27972
- backgroundColor: '#FFF'
27973
- }, options?.taskBar?.scheduleCreation?.buttonStyle);
27974
- gantt.parsedOptions.taskBarCreationCustomLayout = options?.taskBar?.scheduleCreation?.customLayout;
27975
- gantt.parsedOptions.taskBarCreationMaxWidth = options?.taskBar?.scheduleCreation?.maxWidth;
27976
- gantt.parsedOptions.taskBarCreationMinWidth = options?.taskBar?.scheduleCreation?.minWidth;
27977
- gantt.parsedOptions.outerFrameStyle = Object.assign({
27978
- borderColor: '#e1e4e8',
27979
- borderLineWidth: 1,
27980
- cornerRadius: 4
27981
- }, options.frame?.outerFrameStyle);
27982
- gantt.parsedOptions.markLine = generateMarkLine(options?.markLine);
27983
- if (gantt.parsedOptions.markLine?.length ?? 0) {
27984
- if (gantt.parsedOptions.markLine?.every(item => item.scrollToMarkLine === undefined)) {
27985
- gantt.parsedOptions.markLine[0].scrollToMarkLine = true;
27986
- }
27987
- if (gantt.parsedOptions.markLine?.find(item => item.scrollToMarkLine)) {
27988
- gantt.parsedOptions.scrollToMarkLineDate = getStartDateByTimeUnit(new Date(gantt.parsedOptions.markLine?.find(item => item.scrollToMarkLine).date), minTimeUnit, startOfWeek);
27989
- }
27990
- }
27991
- gantt.parsedOptions.verticalSplitLineHighlight = options.frame?.verticalSplitLineHighlight;
27992
- gantt.parsedOptions.verticalSplitLine = Object.assign({
27993
- lineColor: gantt.parsedOptions.outerFrameStyle?.borderColor,
27994
- lineWidth: gantt.parsedOptions.outerFrameStyle?.borderLineWidth
27995
- }, options.frame?.verticalSplitLine);
27996
- gantt.parsedOptions.horizontalSplitLine = options.frame?.horizontalSplitLine;
27997
- gantt.parsedOptions.verticalSplitLineMoveable = options.frame?.verticalSplitLineMoveable;
27998
- gantt.parsedOptions.taskKeyField = options.taskKeyField ?? 'id';
27999
- gantt.parsedOptions.dependencyLinks = options.dependency?.links ?? [];
28000
- gantt.parsedOptions.dependencyLinkCreatable = options.dependency?.linkCreatable ?? false;
28001
- gantt.parsedOptions.dependencyLinkSelectable = options.dependency?.linkSelectable ?? true;
28002
- gantt.parsedOptions.dependencyLinkDeletable = options.dependency?.linkDeletable ?? false;
28003
- gantt.parsedOptions.dependencyLinkLineStyle = Object.assign({
28004
- lineColor: 'red',
28005
- lineWidth: 1
28006
- }, options.dependency?.linkLineStyle);
28007
- gantt.parsedOptions.dependencyLinkSelectedLineStyle = Object.assign({
28008
- shadowBlur: 4,
28009
- shadowOffset: 0,
28010
- shadowColor: gantt.parsedOptions.dependencyLinkLineStyle.lineColor,
28011
- lineColor: gantt.parsedOptions.dependencyLinkLineStyle.lineColor,
28012
- lineWidth: gantt.parsedOptions.dependencyLinkLineStyle.lineWidth
28013
- }, options?.dependency?.linkSelectedLineStyle);
28014
- gantt.parsedOptions.dependencyLinkLineCreatePointStyle = Object.assign({
28015
- strokeColor: 'red',
28016
- fillColor: 'white',
28017
- radius: 5,
28018
- strokeWidth: 1
28019
- }, options?.dependency?.linkCreatePointStyle);
28020
- gantt.parsedOptions.dependencyLinkLineCreatingPointStyle = Object.assign({
28021
- strokeColor: 'red',
28022
- fillColor: 'red',
28023
- radius: 5,
28024
- strokeWidth: 1
28025
- }, options?.dependency?.linkCreatingPointStyle);
28026
- gantt.parsedOptions.dependencyLinkLineCreatingStyle = Object.assign({
28027
- lineColor: 'red',
28028
- lineWidth: 1,
28029
- lineDash: [5, 5]
28030
- }, options?.dependency?.linkCreatingLineStyle);
28031
- gantt.parsedOptions.eventOptions = options?.eventOptions;
28032
- gantt.parsedOptions.keyboardOptions = options?.keyboardOptions;
28033
- gantt.parsedOptions.markLineCreateOptions = options?.markLineCreateOptions;
28034
- }
28035
- function updateOptionsWhenScaleChanged(gantt) {
28036
- const options = gantt.options;
28037
- const { unit: minTimeUnit, startOfWeek, step } = gantt.parsedOptions.reverseSortedTimelineScales[0];
28038
- gantt.parsedOptions.minDate = getStartDateByTimeUnit(new Date(gantt.parsedOptions.minDate), minTimeUnit, startOfWeek);
28039
- gantt.parsedOptions.maxDate = getEndDateByTimeUnit(gantt.parsedOptions.minDate, new Date(gantt.parsedOptions.maxDate), minTimeUnit, step);
28040
- gantt.parsedOptions._minDateTime = gantt.parsedOptions.minDate?.getTime();
28041
- gantt.parsedOptions._maxDateTime = gantt.parsedOptions.maxDate?.getTime();
28042
- gantt.parsedOptions.timeLineHeaderRowHeights = [];
28043
- gantt.parsedOptions.timelineHeaderStyles = [];
28044
- for (let i = 0; i < gantt.parsedOptions.sortedTimelineScales.length ?? 0; i++) {
28045
- const style = gantt.parsedOptions.sortedTimelineScales[i].style;
28046
- gantt.parsedOptions.timelineHeaderStyles.push(Object.assign({
28047
- fontSize: 20,
28048
- fontWeight: 'bold',
28049
- textAlign: 'center',
28050
- textBaseline: 'middle',
28051
- color: '#000',
28052
- backgroundColor: '#fff'
28053
- }, style));
28054
- gantt.parsedOptions.timeLineHeaderRowHeights.push(gantt.parsedOptions.sortedTimelineScales[i].rowHeight ?? options?.headerRowHeight ?? 40);
28055
- }
28056
- }
28057
- function generateTimeLineDate(currentDate, endDate, scale) {
28058
- const { unit, step, format } = scale;
28059
- const timelineDates = [];
28060
- while (currentDate < endDate) {
28061
- if (unit === 'day') {
28062
- const year = currentDate.getFullYear();
28063
- const month = currentDate.getMonth();
28064
- const day = currentDate.getDate();
28065
- const end = createDateAtLastHour(new Date(year, month, day + step - 1), true);
28066
- if (end.getTime() > endDate.getTime()) {
28067
- end.setTime(endDate.getTime());
28068
- }
28069
- const start = currentDate;
28070
- const formattedDate = format?.({ dateIndex: day, startDate: start, endDate: end });
28071
- const columnTitle = formattedDate || day.toString();
28072
- const dayCellConfig = {
28073
- days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
28074
- startDate: start,
28075
- endDate: end,
28076
- step,
28077
- unit: 'day',
28078
- title: columnTitle,
28079
- dateIndex: day
28080
- };
28081
- timelineDates.push(dayCellConfig);
28082
- currentDate = new Date(year, month, day + step);
28083
- }
28084
- else if (unit === 'month') {
28085
- const year = currentDate.getFullYear();
28086
- const month = currentDate.getMonth();
28087
- const end = createDateAtLastHour(new Date(year, month + step, 0), true);
28088
- if (end.getTime() > endDate.getTime()) {
28089
- end.setTime(endDate.getTime());
28090
- }
28091
- const start = currentDate;
28092
- const formattedDate = format?.({ dateIndex: month + 1, startDate: start, endDate: end });
28093
- const columnTitle = formattedDate || (month + 1).toString();
28094
- const dayCellConfig = {
28095
- days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
28096
- startDate: start,
28097
- step,
28098
- unit: 'month',
28099
- endDate: end,
28100
- title: columnTitle,
28101
- dateIndex: month + 1
28102
- };
28103
- timelineDates.push(dayCellConfig);
28104
- currentDate = new Date(year, month + step, 1);
28105
- }
28106
- else if (unit === 'quarter') {
28107
- const year = currentDate.getFullYear();
28108
- const quarter = Math.floor(currentDate.getMonth() / 3);
28109
- const end = createDateAtLastHour(new Date(year, (quarter + step) * 3, 0), true);
28110
- if (end.getTime() > endDate.getTime()) {
28111
- end.setTime(endDate.getTime());
28112
- }
28113
- const start = currentDate;
28114
- const formattedDate = format?.({ dateIndex: quarter + 1, startDate: start, endDate: end });
28115
- const columnTitle = formattedDate || (quarter + 1).toString();
28116
- const dayCellConfig = {
28117
- days: Math.abs(end.getTime() - currentDate.getTime() + 1) / (1000 * 60 * 60 * 24),
28118
- startDate: start,
28119
- step,
28120
- unit: 'quarter',
28121
- endDate: end,
28122
- title: columnTitle,
28123
- dateIndex: quarter + 1
28124
- };
28125
- timelineDates.push(dayCellConfig);
28126
- currentDate = new Date(year, (quarter + step) * 3, 1);
28127
- }
28128
- else if (unit === 'year') {
28129
- const year = currentDate.getFullYear();
28130
- const end = createDateAtLastHour(new Date(year + step - 1, 11, 31), true);
28131
- if (end.getTime() > endDate.getTime()) {
28132
- end.setTime(endDate.getTime());
28133
- }
28134
- const start = currentDate;
28135
- const formattedDate = format?.({ dateIndex: year, startDate: start, endDate: end });
28136
- const columnTitle = formattedDate || year.toString();
28137
- const dayCellConfig = {
28138
- days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
28139
- startDate: start,
28140
- endDate: end,
28141
- step,
28142
- unit: 'year',
28143
- title: columnTitle,
28144
- dateIndex: year
28145
- };
28146
- timelineDates.push(dayCellConfig);
28147
- currentDate = new Date(year + step, 0, 1);
28148
- }
28149
- else if (unit === 'week') {
28150
- const startOfWeekSetting = scale.startOfWeek ?? 'monday';
28151
- let dayOfWeek = currentDate.getDay();
28152
- if (startOfWeekSetting === 'monday') {
28153
- dayOfWeek = dayOfWeek === 0 ? 6 : dayOfWeek - 1;
28154
- }
28155
- const startOfWeek = createDateAtMidnight(currentDate);
28156
- const dateEnd = createDateAtLastHour(currentDate.getTime() + (7 * step - dayOfWeek) * 24 * 60 * 60 * 1000 - 1, true);
28157
- if (dateEnd > endDate) {
28158
- dateEnd.setTime(endDate.getTime());
28159
- }
28160
- const weekNumber = getWeekNumber(startOfWeek);
28161
- const columnTitle = format?.({ dateIndex: weekNumber, startDate: startOfWeek, endDate: dateEnd }) || weekNumber.toString();
28162
- const dayCellConfig = {
28163
- days: (dateEnd.getTime() - startOfWeek.getTime() + 1) / DayTimes,
28164
- startDate: startOfWeek,
28165
- endDate: dateEnd,
28166
- step,
28167
- unit: 'week',
28168
- title: columnTitle,
28169
- dateIndex: weekNumber
28170
- };
28171
- timelineDates.push(dayCellConfig);
28172
- currentDate.setTime(createDateAtMidnight(currentDate.getTime() + (7 * step - dayOfWeek) * 24 * 60 * 60 * 1000, true).getTime());
28173
- }
28174
- else if (unit === 'hour') {
28175
- const year = currentDate.getFullYear();
28176
- const month = currentDate.getMonth();
28177
- const day = currentDate.getDate();
28178
- const hour = currentDate.getHours();
28179
- const end = createDateAtLastMinute(new Date(year, month, day, hour + step - 1), true);
28180
- if (end.getTime() > endDate.getTime()) {
28181
- end.setTime(endDate.getTime());
28182
- }
28183
- const start = currentDate;
28184
- const formattedDate = format?.({ dateIndex: hour, startDate: start, endDate: end });
28185
- const columnTitle = formattedDate || hour.toString();
28186
- const dayCellConfig = {
28187
- days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
28188
- startDate: start,
28189
- endDate: end,
28190
- step,
28191
- unit: 'hour',
28192
- title: columnTitle,
28193
- dateIndex: currentDate.getHours()
28194
- };
28195
- timelineDates.push(dayCellConfig);
28196
- currentDate = new Date(year, month, day, hour + step);
28197
- }
28198
- else if (unit === 'minute') {
28199
- const year = currentDate.getFullYear();
28200
- const month = currentDate.getMonth();
28201
- const day = currentDate.getDate();
28202
- const hour = currentDate.getHours();
28203
- const minute = currentDate.getMinutes();
28204
- const end = createDateAtLastSecond(new Date(year, month, day, hour, minute + step - 1), true);
28205
- if (end.getTime() > endDate.getTime()) {
28206
- end.setTime(endDate.getTime());
28207
- }
28208
- const start = currentDate;
28209
- const formattedDate = format?.({ dateIndex: minute, startDate: start, endDate: end });
28210
- const columnTitle = formattedDate || minute.toString();
28211
- const dayCellConfig = {
28212
- days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
28213
- startDate: start,
28214
- endDate: end,
28215
- step,
28216
- unit: 'minute',
28217
- title: columnTitle,
28218
- dateIndex: currentDate.getMinutes()
28219
- };
28220
- timelineDates.push(dayCellConfig);
28221
- currentDate = new Date(year, month, day, hour, minute + step);
28222
- }
28223
- else if (unit === 'second') {
28224
- const year = currentDate.getFullYear();
28225
- const month = currentDate.getMonth();
28226
- const day = currentDate.getDate();
28227
- const hour = currentDate.getHours();
28228
- const minute = currentDate.getMinutes();
28229
- const second = currentDate.getSeconds();
28230
- const end = createDateAtLastMillisecond(new Date(year, month, day, hour, minute, second + step - 1), true);
28231
- if (end.getTime() > endDate.getTime()) {
28232
- end.setTime(endDate.getTime());
28233
- }
28234
- const start = currentDate;
28235
- const formattedDate = format?.({ dateIndex: second, startDate: start, endDate: end });
28236
- const columnTitle = formattedDate || second.toString();
28237
- const dayCellConfig = {
28238
- days: Math.abs(end.getTime() - currentDate.getTime() + 1) / DayTimes,
28239
- startDate: start,
28240
- endDate: end,
28241
- step,
28242
- unit: 'second',
28243
- title: columnTitle,
28244
- dateIndex: currentDate.getSeconds()
28245
- };
28246
- timelineDates.push(dayCellConfig);
28247
- currentDate = new Date(year, month, day, hour, minute, second + step);
28432
+ });
28248
28433
  }
28434
+ this._gantt.stateManager.setScrollLeft(oldHorizontalBarPos);
28435
+ this._gantt.stateManager.setScrollTop(oldVerticalBarPos);
28249
28436
  }
28250
- return timelineDates;
28251
28437
  }
28252
- function getTextPos(padding, textAlign, textBaseline, width, height) {
28253
- let textX = padding[3] ?? 10;
28254
- if (textAlign === 'right' || textAlign === 'end') {
28255
- textX = width - 0 - (padding[1] ?? 10);
28438
+
28439
+ function handleWhell$1(event, state, gantt, isWheelEvent = true) {
28440
+ let { deltaX, deltaY } = event;
28441
+ if (event.shiftKey && event.deltaY) {
28442
+ deltaX = deltaY;
28443
+ deltaY = 0;
28256
28444
  }
28257
- else if (textAlign === 'center') {
28258
- textX = 0 + (width - 0 + (padding[3] ?? 10) - (padding[1] ?? 10)) / 2;
28445
+ const [optimizedDeltaX, optimizedDeltaY] = optimizeScrollXY$1(deltaX, deltaY, { horizontal: 1, vertical: 1 });
28446
+ if (optimizedDeltaX) {
28447
+ state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX);
28448
+ gantt.scenegraph.scrollbarComponent.showHorizontalScrollBar(true);
28259
28449
  }
28260
- let textY = 0 + (padding[0] ?? 10);
28261
- if (textBaseline === 'bottom' || textBaseline === 'alphabetic' || textBaseline === 'ideographic') {
28262
- textY = height - 0 - (padding[2] ?? 10);
28450
+ if (optimizedDeltaY) {
28451
+ state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY);
28452
+ gantt.scenegraph.scrollbarComponent.showVerticalScrollBar(true);
28263
28453
  }
28264
- else if (textBaseline === 'middle') {
28265
- textY = 0 + (height - 0 - (padding[0] ?? 10) - (padding[2] ?? 10)) / 2 + (padding[0] ?? 10);
28454
+ isWheelEvent && state.resetInteractionState();
28455
+ if (event.cancelable &&
28456
+ (state._gantt.parsedOptions.overscrollBehavior === 'none' ||
28457
+ (Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable$1(deltaY, state)) ||
28458
+ (Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable$1(deltaX, state)))) {
28459
+ event.preventDefault();
28266
28460
  }
28267
- return {
28268
- x: textX,
28269
- y: textY
28270
- };
28271
28461
  }
28272
- function convertProgress(progress) {
28273
- if (typeof progress === 'string') {
28274
- progress = progress.replace('%', '');
28275
- progress = parseFloat(progress);
28276
- }
28277
- return Math.round(progress);
28462
+ function optimizeScrollXY$1(x, y, ratio) {
28463
+ const ANGLE = 2;
28464
+ const angle = Math.abs(x / y);
28465
+ const deltaX = angle <= 1 / ANGLE ? 0 : x;
28466
+ const deltaY = angle > ANGLE ? 0 : y;
28467
+ return [Math.ceil(deltaX * (ratio.horizontal ?? 0)), Math.ceil(deltaY * (ratio.vertical ?? 0))];
28278
28468
  }
28279
- function createSplitLineAndResizeLine(gantt) {
28280
- if (gantt.taskListTableInstance) {
28281
- gantt.verticalSplitResizeLine = document.createElement('div');
28282
- gantt.verticalSplitResizeLine.style.position = 'absolute';
28283
- gantt.verticalSplitResizeLine.style.top = gantt.tableY + 'px';
28284
- gantt.verticalSplitResizeLine.style.left =
28285
- (gantt.taskTableWidth ? gantt.taskTableWidth - 7 + gantt.parsedOptions.verticalSplitLine.lineWidth / 2 : 0) +
28286
- 'px';
28287
- gantt.verticalSplitResizeLine.style.width = '14px';
28288
- gantt.verticalSplitResizeLine.style.height = gantt.drawHeight + 'px';
28289
- gantt.verticalSplitResizeLine.style.backgroundColor = 'rgba(0,0,0,0)';
28290
- gantt.verticalSplitResizeLine.style.zIndex = '100';
28291
- gantt.parsedOptions.verticalSplitLineMoveable && (gantt.verticalSplitResizeLine.style.cursor = 'col-resize');
28292
- gantt.verticalSplitResizeLine.style.userSelect = 'none';
28293
- gantt.verticalSplitResizeLine.style.opacity = '1';
28294
- const verticalSplitLine = document.createElement('div');
28295
- verticalSplitLine.style.position = 'absolute';
28296
- verticalSplitLine.style.top = '0px';
28297
- verticalSplitLine.style.left = `${(14 - gantt.parsedOptions.verticalSplitLine.lineWidth) / 2}px`;
28298
- verticalSplitLine.style.width = gantt.parsedOptions.verticalSplitLine.lineWidth + 'px';
28299
- verticalSplitLine.style.height = '100%';
28300
- verticalSplitLine.style.backgroundColor = gantt.parsedOptions.verticalSplitLine.lineColor;
28301
- verticalSplitLine.style.zIndex = '100';
28302
- verticalSplitLine.style.userSelect = 'none';
28303
- verticalSplitLine.style.pointerEvents = 'none';
28304
- verticalSplitLine.style.transition = 'background-color 0.3s';
28305
- gantt.verticalSplitResizeLine.appendChild(verticalSplitLine);
28306
- if (gantt.parsedOptions.verticalSplitLineHighlight) {
28307
- const highlightLine = document.createElement('div');
28308
- highlightLine.style.position = 'absolute';
28309
- highlightLine.style.top = '0px';
28310
- highlightLine.style.left = `${(14 - gantt.parsedOptions.verticalSplitLineHighlight.lineWidth ?? 2) / 2}px`;
28311
- highlightLine.style.width = (gantt.parsedOptions.verticalSplitLineHighlight.lineWidth ?? 2) + 'px';
28312
- highlightLine.style.height = '100%';
28313
- highlightLine.style.backgroundColor = gantt.parsedOptions.verticalSplitLineHighlight.lineColor;
28314
- highlightLine.style.zIndex = '100';
28315
- highlightLine.style.cursor = 'col-resize';
28316
- highlightLine.style.userSelect = 'none';
28317
- highlightLine.style.pointerEvents = 'none';
28318
- highlightLine.style.opacity = '0';
28319
- highlightLine.style.transition = 'background-color 0.3s';
28320
- gantt.verticalSplitResizeLine.appendChild(highlightLine);
28321
- }
28322
- gantt.container.appendChild(gantt.verticalSplitResizeLine);
28469
+ function isVerticalScrollable$1(deltaY, state) {
28470
+ const totalHeight = state._gantt.getAllRowsHeight() - state._gantt.scenegraph.height;
28471
+ if (totalHeight === 0) {
28472
+ return false;
28323
28473
  }
28474
+ return !isScrollToTop$1(deltaY, state) && !isScrollToBottom$1(deltaY, state);
28324
28475
  }
28325
- function updateSplitLineAndResizeLine(gantt) {
28326
- if (gantt.verticalSplitResizeLine) {
28327
- gantt.verticalSplitResizeLine.style.position = 'absolute';
28328
- gantt.verticalSplitResizeLine.style.top = gantt.tableY + 'px';
28329
- gantt.verticalSplitResizeLine.style.left = gantt.taskTableWidth
28330
- ? `${gantt.taskTableWidth - 7 + gantt.parsedOptions.verticalSplitLine.lineWidth / 2}px`
28331
- : '0px';
28332
- gantt.verticalSplitResizeLine.style.width = '14px';
28333
- gantt.verticalSplitResizeLine.style.height = gantt.drawHeight + 'px';
28334
- gantt.verticalSplitResizeLine.style.backgroundColor = 'rgba(0,0,0,0)';
28335
- gantt.verticalSplitResizeLine.style.zIndex = '100';
28336
- gantt.parsedOptions.verticalSplitLineMoveable && (gantt.verticalSplitResizeLine.style.cursor = 'col-resize');
28337
- gantt.verticalSplitResizeLine.style.userSelect = 'none';
28338
- gantt.verticalSplitResizeLine.style.opacity = '1';
28339
- const verticalSplitLine = gantt.verticalSplitResizeLine.childNodes[0];
28340
- verticalSplitLine.style.position = 'absolute';
28341
- verticalSplitLine.style.top = '0px';
28342
- verticalSplitLine.style.left = `${(14 - gantt.parsedOptions.verticalSplitLine.lineWidth) / 2}px`;
28343
- verticalSplitLine.style.width = gantt.parsedOptions.verticalSplitLine.lineWidth + 'px';
28344
- verticalSplitLine.style.height = '100%';
28345
- verticalSplitLine.style.backgroundColor = gantt.parsedOptions.verticalSplitLine.lineColor;
28346
- verticalSplitLine.style.zIndex = '100';
28347
- verticalSplitLine.style.userSelect = 'none';
28348
- verticalSplitLine.style.pointerEvents = 'none';
28349
- verticalSplitLine.style.transition = 'background-color 0.3s';
28350
- if (gantt.verticalSplitResizeLine.childNodes[1]) {
28351
- const highlightLine = gantt.verticalSplitResizeLine.childNodes[1];
28352
- highlightLine.style.position = 'absolute';
28353
- highlightLine.style.top = '0px';
28354
- highlightLine.style.left = `${(14 - gantt.parsedOptions.verticalSplitLineHighlight.lineWidth ?? 2) / 2}px`;
28355
- highlightLine.style.width = (gantt.parsedOptions.verticalSplitLineHighlight.lineWidth ?? 2) + 'px';
28356
- highlightLine.style.height = '100%';
28357
- highlightLine.style.backgroundColor = gantt.parsedOptions.verticalSplitLineHighlight.lineColor;
28358
- highlightLine.style.zIndex = '100';
28359
- highlightLine.style.cursor = 'col-resize';
28360
- highlightLine.style.userSelect = 'none';
28361
- highlightLine.style.pointerEvents = 'none';
28362
- highlightLine.style.opacity = '0';
28363
- highlightLine.style.transition = 'background-color 0.3s';
28364
- }
28476
+ function isHorizontalScrollable$1(deltaX, state) {
28477
+ const totalWidth = state._gantt.getAllDateColsWidth() - state._gantt.scenegraph.width;
28478
+ if (totalWidth === 0) {
28479
+ return false;
28365
28480
  }
28481
+ return !isScrollToLeft$1(deltaX, state) && !isScrollToRight$1(deltaX, state);
28366
28482
  }
28367
- function findRecordByTaskKey(records, taskKeyField, taskKey, childrenField = 'children') {
28368
- for (let i = 0; i < records.length; i++) {
28369
- if ((Array.isArray(taskKey) && taskKey.length === 1 && records[i][taskKeyField] === taskKey[0]) ||
28370
- records[i][taskKeyField] === taskKey) {
28371
- return { record: records[i], index: [i] };
28372
- }
28373
- else if (records[i][childrenField]?.length) {
28374
- if (Array.isArray(taskKey) && taskKey[0] === records[i][taskKeyField]) {
28375
- const result = findRecordByTaskKey(records[i][childrenField], taskKeyField, taskKey.slice(1));
28376
- if (result) {
28377
- result.index.unshift(i);
28378
- return result;
28379
- }
28380
- }
28381
- else if (!Array.isArray(taskKey)) {
28382
- const result = findRecordByTaskKey(records[i][childrenField], taskKeyField, taskKey);
28383
- if (result) {
28384
- result.index.unshift(i);
28385
- return result;
28386
- }
28387
- }
28388
- }
28389
- }
28483
+ function isScrollToTop$1(deltaY, state) {
28484
+ const totalHeight = state._gantt.getAllRowsHeight() - state._gantt.scenegraph.height;
28485
+ return totalHeight !== 0 && deltaY <= 0 && state.scroll.verticalBarPos < 1;
28390
28486
  }
28391
- function clearRecordLinkInfos(records, childrenField = 'children') {
28392
- for (let i = 0; i < records.length; i++) {
28393
- if (records[i][childrenField]?.length) {
28394
- clearRecordLinkInfos(records[i][childrenField], childrenField);
28395
- }
28396
- else {
28397
- delete records[i].vtable_gantt_linkedTo;
28398
- delete records[i].vtable_gantt_linkedFrom;
28399
- }
28400
- }
28487
+ function isScrollToBottom$1(deltaY, state) {
28488
+ const totalHeight = state._gantt.getAllRowsHeight() - state._gantt.scenegraph.height;
28489
+ return totalHeight !== 0 && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1;
28401
28490
  }
28402
- function clearRecordShowIndex(records, childrenField = 'children') {
28403
- for (let i = 0; i < records.length; i++) {
28404
- if (records[i][childrenField]?.length) {
28405
- clearRecordShowIndex(records[i][childrenField], childrenField);
28406
- }
28407
- else {
28408
- delete records[i].vtable_gantt_showIndex;
28409
- }
28410
- }
28491
+ function isScrollToLeft$1(deltaX, state) {
28492
+ const totalWidth = state._gantt.getAllDateColsWidth() - state._gantt.scenegraph.width;
28493
+ return totalWidth !== 0 && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
28411
28494
  }
28412
- function getTaskIndexsByTaskY(y, gantt) {
28413
- let task_index;
28414
- let sub_task_index;
28415
- if (gantt.taskListTableInstance) {
28416
- const rowInfo = gantt.taskListTableInstance.getTargetRowAt(y + gantt.headerHeight);
28417
- if (rowInfo) {
28418
- const { row } = rowInfo;
28419
- task_index = row - gantt.taskListTableInstance.columnHeaderLevelCount;
28420
- const beforeRowsHeight = gantt.getRowsHeightByIndex(0, task_index - 1);
28421
- if (gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline ||
28422
- gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||
28423
- gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact ||
28424
- gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate) {
28425
- sub_task_index = Math.floor((y - beforeRowsHeight) / gantt.parsedOptions.rowHeight);
28426
- }
28427
- }
28428
- }
28429
- else {
28430
- task_index = Math.floor(y / gantt.parsedOptions.rowHeight);
28431
- }
28432
- return { task_index, sub_task_index };
28495
+ function isScrollToRight$1(deltaX, state) {
28496
+ const totalWidth = state._gantt.getAllDateColsWidth() - state._gantt.scenegraph.width;
28497
+ return totalWidth !== 0 && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1;
28433
28498
  }
28434
- function computeRowsCountByRecordDateForCompact(gantt, record) {
28435
- if (!record.children || record.children.length === 1) {
28436
- if (record.children?.length === 1) {
28437
- record.children[0].vtable_gantt_showIndex = 0;
28499
+ function bindScrollBarListener$1(eventManager) {
28500
+ const table = eventManager._gantt;
28501
+ const stateManager = table.stateManager;
28502
+ const scenegraph = table.scenegraph;
28503
+ scenegraph.scrollbarComponent.vScrollBar.addEventListener('pointerover', (e) => {
28504
+ scenegraph.scrollbarComponent.showVerticalScrollBar();
28505
+ });
28506
+ scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointerover', (e) => {
28507
+ scenegraph.scrollbarComponent.showHorizontalScrollBar();
28508
+ });
28509
+ scenegraph.scrollbarComponent.vScrollBar.addEventListener('pointerout', (e) => {
28510
+ if (stateManager.interactionState === InteractionState$1.scrolling) {
28511
+ return;
28438
28512
  }
28439
- else {
28440
- record.vtable_gantt_showIndex = 0;
28513
+ scenegraph.scrollbarComponent.hideVerticalScrollBar();
28514
+ });
28515
+ scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointerout', (e) => {
28516
+ if (stateManager.interactionState === InteractionState$1.scrolling) {
28517
+ return;
28441
28518
  }
28442
- return 1;
28443
- }
28444
- const sortedChildren = record.children.slice().sort((a, b) => {
28445
- const { startDate: aStartDate } = formatRecordDateConsiderHasHour(gantt, a);
28446
- const { startDate: bStartDate } = formatRecordDateConsiderHasHour(gantt, b);
28447
- return aStartDate.getTime() - bStartDate.getTime();
28519
+ scenegraph.scrollbarComponent.hideHorizontalScrollBar();
28448
28520
  });
28449
- const rows = [];
28450
- for (let i = 0; i <= sortedChildren.length - 1; i++) {
28451
- const newRecord = sortedChildren[i];
28452
- const { startDate, endDate } = formatRecordDateConsiderHasHour(gantt, newRecord);
28453
- let placed = false;
28454
- for (let j = 0; j < rows.length; j++) {
28455
- if (startDate.getTime() > rows[j]) {
28456
- rows[j] = endDate.getTime();
28457
- placed = true;
28458
- newRecord.vtable_gantt_showIndex = j;
28459
- break;
28460
- }
28521
+ scenegraph.scrollbarComponent.vScrollBar.addEventListener('pointermove', (e) => {
28522
+ e.stopPropagation();
28523
+ });
28524
+ scenegraph.scrollbarComponent.vScrollBar.addEventListener('scrollDown', (e) => {
28525
+ scenegraph._gantt.eventManager.isDown = true;
28526
+ });
28527
+ scenegraph.scrollbarComponent.vScrollBar.addEventListener('pointerup', () => {
28528
+ scenegraph._gantt.eventManager.isDraging = false;
28529
+ if (stateManager.interactionState === InteractionState$1.scrolling) {
28530
+ stateManager.updateInteractionState(InteractionState$1.default);
28461
28531
  }
28462
- if (!placed) {
28463
- rows.push(endDate.getTime());
28464
- newRecord.vtable_gantt_showIndex = rows.length - 1;
28532
+ });
28533
+ scenegraph.scrollbarComponent.vScrollBar.addEventListener('pointerupoutside', () => {
28534
+ if (stateManager.interactionState === InteractionState$1.scrolling) {
28535
+ stateManager.updateInteractionState(InteractionState$1.default);
28465
28536
  }
28466
- }
28467
- return rows.length;
28468
- }
28469
- function isOverlapping(startDate, endDate, rowTasks, gantt) {
28470
- return rowTasks.some(rowTask => {
28471
- const { startDate: startDate2, endDate: endDate2 } = formatRecordDateConsiderHasHour(gantt, rowTask);
28472
- return startDate <= endDate2 && startDate2 <= endDate;
28473
28537
  });
28474
- }
28475
- function computeRowsCountByRecordDate(gantt, record) {
28476
- if (!record.children || record.children.length === 1) {
28477
- if (record.children?.length === 1) {
28478
- record.children[0].vtable_gantt_showIndex = 0;
28538
+ scenegraph.scrollbarComponent.vScrollBar.addEventListener('scrollUp', (e) => {
28539
+ scenegraph._gantt.eventManager.isDraging = false;
28540
+ });
28541
+ scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointermove', (e) => {
28542
+ e.stopPropagation();
28543
+ });
28544
+ scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointerdown', (e) => {
28545
+ e.stopPropagation();
28546
+ });
28547
+ scenegraph.scrollbarComponent.hScrollBar.addEventListener('scrollDown', (e) => {
28548
+ scenegraph._gantt.eventManager.isDown = true;
28549
+ if (stateManager.interactionState !== InteractionState$1.scrolling) {
28550
+ stateManager.updateInteractionState(InteractionState$1.scrolling);
28479
28551
  }
28480
- else {
28481
- record.vtable_gantt_showIndex = 0;
28552
+ });
28553
+ scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointerup', () => {
28554
+ if (stateManager.interactionState === InteractionState$1.scrolling) {
28555
+ stateManager.updateInteractionState(InteractionState$1.default);
28482
28556
  }
28483
- return 1;
28484
- }
28485
- const rows = [];
28486
- for (let i = 0; i <= record.children.length - 1; i++) {
28487
- const newRecord = record.children[i];
28488
- const { startDate, endDate } = formatRecordDateConsiderHasHour(gantt, newRecord);
28489
- let placed = false;
28490
- for (let j = 0; j < rows.length; j++) {
28491
- const rowTasks = record.children.filter((t) => t !== newRecord && t.vtable_gantt_showIndex === j);
28492
- if (!isOverlapping(startDate, endDate, rowTasks, gantt)) {
28493
- rows[j] = endDate.getTime();
28494
- placed = true;
28495
- newRecord.vtable_gantt_showIndex = j;
28496
- break;
28497
- }
28557
+ });
28558
+ scenegraph.scrollbarComponent.hScrollBar.addEventListener('pointerupoutside', () => {
28559
+ if (stateManager.interactionState === InteractionState$1.scrolling) {
28560
+ stateManager.updateInteractionState(InteractionState$1.default);
28498
28561
  }
28499
- if (!placed) {
28500
- rows.push(endDate.getTime());
28501
- newRecord.vtable_gantt_showIndex = rows.length - 1;
28562
+ });
28563
+ scenegraph.scrollbarComponent.hScrollBar.addEventListener('scrollUp', (e) => {
28564
+ scenegraph._gantt.eventManager.isDraging = false;
28565
+ });
28566
+ const throttleVerticalWheel = throttle$1(stateManager.updateVerticalScrollBar, 20);
28567
+ const throttleHorizontalWheel = throttle$1(stateManager.updateHorizontalScrollBar, 20);
28568
+ scenegraph.scrollbarComponent.vScrollBar.addEventListener('scrollDrag', (e) => {
28569
+ if (scenegraph._gantt.eventManager.isDown) {
28570
+ scenegraph._gantt.eventManager.isDraging = true;
28502
28571
  }
28503
- }
28504
- return rows.length;
28505
- }
28506
- function formatRecordDateConsiderHasHour(gantt, record) {
28507
- const { timeScaleIncludeHour, startDateField, endDateField } = gantt.parsedOptions;
28508
- const startDate = record[startDateField];
28509
- const endDate = record[endDateField];
28510
- if (timeScaleIncludeHour) {
28511
- return { startDate: createDateAtMidnight(startDate), endDate: createDateAtLastHour(endDate) };
28512
- }
28513
- return { startDate: createDateAtMidnight(startDate, true), endDate: createDateAtLastHour(endDate, true) };
28514
- }
28515
- function updateOptionsWhenRecordChanged(gantt) {
28516
- const options = gantt.options;
28517
- const { unit: minTimeUnit, startOfWeek } = gantt.parsedOptions.reverseSortedTimelineScales[0];
28518
- gantt.parsedOptions.markLine = generateMarkLine(options?.markLine);
28519
- if (gantt.parsedOptions.markLine?.length ?? 0) {
28520
- if (gantt.parsedOptions.markLine?.every(item => item.scrollToMarkLine === undefined)) {
28521
- gantt.parsedOptions.markLine[0].scrollToMarkLine = true;
28572
+ if (stateManager.interactionState !== InteractionState$1.scrolling) {
28573
+ stateManager.updateInteractionState(InteractionState$1.scrolling);
28522
28574
  }
28523
- if (gantt.parsedOptions.markLine?.find(item => item.scrollToMarkLine)) {
28524
- gantt.parsedOptions.scrollToMarkLineDate = getStartDateByTimeUnit(new Date(gantt.parsedOptions.markLine?.find(item => item.scrollToMarkLine).date), minTimeUnit, startOfWeek);
28575
+ const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
28576
+ throttleVerticalWheel(ratio, e);
28577
+ });
28578
+ scenegraph.scrollbarComponent.hScrollBar.addEventListener('scrollDrag', (e) => {
28579
+ if (scenegraph._gantt.eventManager.isDown) {
28580
+ scenegraph._gantt.eventManager.isDraging = true;
28525
28581
  }
28526
- }
28527
- gantt.parsedOptions.dependencyLinks = options.dependency?.links;
28528
- }
28529
- function updateOptionsWhenDateRangeChanged(gantt) {
28530
- const options = gantt.options;
28531
- const { unit: minTimeUnit, startOfWeek, step } = gantt.parsedOptions.reverseSortedTimelineScales[0];
28532
- gantt.parsedOptions.minDate = options?.minDate
28533
- ? getStartDateByTimeUnit(new Date(options.minDate), minTimeUnit, startOfWeek)
28534
- : undefined;
28535
- gantt.parsedOptions.maxDate = options?.maxDate
28536
- ? getEndDateByTimeUnit(gantt.parsedOptions.minDate, new Date(options.maxDate), minTimeUnit, step)
28537
- : undefined;
28538
- gantt.parsedOptions._minDateTime = gantt.parsedOptions.minDate?.getTime();
28539
- gantt.parsedOptions._maxDateTime = gantt.parsedOptions.maxDate?.getTime();
28540
- }
28541
- function updateOptionsWhenMarkLineChanged(gantt) {
28542
- const options = gantt.options;
28543
- gantt.parsedOptions.markLine = generateMarkLine(options?.markLine);
28544
- }
28545
- function _getTaskInfoByXYForCreateSchedule(eventX, eventY, gantt) {
28546
- const taskIndex = getTaskIndexsByTaskY(eventY - gantt.headerHeight + gantt.stateManager.scrollTop, gantt);
28547
- const recordParent = gantt.getRecordByIndex(taskIndex.task_index);
28548
- const dateIndex = getDateIndexByX(eventX, gantt);
28549
- const dateRange = gantt.getDateRangeByIndex(dateIndex);
28550
- if (recordParent?.children) {
28551
- const taskIndex = getTaskIndexsByTaskY(eventY - gantt.headerHeight + gantt.stateManager.scrollTop, gantt);
28552
- for (let i = 0; i < recordParent.children.length; i++) {
28553
- const { startDate, endDate, taskDays, progress, taskRecord } = gantt.getTaskInfoByTaskListIndex(taskIndex.task_index, i);
28554
- if (((gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact ||
28555
- gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange) &&
28556
- taskRecord.vtable_gantt_showIndex === taskIndex.sub_task_index) ||
28557
- gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline) {
28558
- if (dateRange.startDate.getTime() >= startDate.getTime() && dateRange.endDate.getTime() <= endDate.getTime()) {
28559
- return { startDate, endDate, taskDays, progress, taskRecord };
28560
- }
28561
- }
28582
+ stateManager.fastScrolling = true;
28583
+ if (stateManager.interactionState !== InteractionState$1.scrolling) {
28584
+ stateManager.updateInteractionState(InteractionState$1.scrolling);
28562
28585
  }
28563
- }
28564
- }
28565
- function getNodeClickPos(marklineIconNode, gantt) {
28566
- const left = marklineIconNode.globalTransMatrix.e +
28567
- gantt.taskListTableInstance.tableNoFrameWidth +
28568
- gantt.taskListTableInstance.tableX +
28569
- gantt.tableX;
28570
- const top = marklineIconNode.globalTransMatrix.f;
28571
- const width = marklineIconNode.attribute.width;
28572
- const height = marklineIconNode.attribute.height;
28573
- return {
28574
- left,
28575
- top,
28576
- width,
28577
- height
28578
- };
28579
- }
28580
- function judgeIfHasMarkLine(data, markLine) {
28581
- const beginTime = data.startDate.getTime();
28582
- const endTime = data.endDate.getTime();
28583
- return markLine.some(item => {
28584
- const marklineTime = new Date(item.date).getTime();
28585
- return marklineTime >= beginTime && marklineTime <= endTime;
28586
+ const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
28587
+ throttleHorizontalWheel(ratio);
28586
28588
  });
28587
28589
  }
28588
28590
 
@@ -29533,7 +29535,7 @@
29533
29535
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
29534
29536
  PERFORMANCE OF THIS SOFTWARE.
29535
29537
  ***************************************************************************** */
29536
- function __decorate$6(decorators, target, key, desc) {
29538
+ function __decorate$7(decorators, target, key, desc) {
29537
29539
  var c = arguments.length,
29538
29540
  r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
29539
29541
  d;
@@ -29576,7 +29578,7 @@
29576
29578
  }
29577
29579
  }
29578
29580
  };
29579
- DateHeaderGroupBeforeRenderContribution = __decorate$6([
29581
+ DateHeaderGroupBeforeRenderContribution = __decorate$7([
29580
29582
  injectable()
29581
29583
  ], DateHeaderGroupBeforeRenderContribution);
29582
29584
 
@@ -32428,6 +32430,7 @@
32428
32430
  AFTER_SORT: "after_sort",
32429
32431
  FREEZE_CLICK: "freeze_click",
32430
32432
  SCROLL: "scroll",
32433
+ CAN_SCROLL: "can_scroll",
32431
32434
  SCROLL_HORIZONTAL_END: "scroll_horizontal_end",
32432
32435
  SCROLL_VERTICAL_END: "scroll_vertical_end",
32433
32436
  DROPDOWN_MENU_CLICK: "dropdown_menu_click",
@@ -37083,7 +37086,7 @@
37083
37086
  }
37084
37087
  updateCustomCell(componentId, isHeaderCustomLayout) {
37085
37088
  const table = this.table;
37086
- if (table.isPivotTable()) {
37089
+ if ("autoWidth" === table.widthMode && table.scenegraph.recalculateColWidths(), (table.isAutoRowHeight() || "auto" === table.internalProps.defaultRowHeight && !isHeaderCustomLayout || "auto" === table.internalProps.defaultHeaderRowHeight && isHeaderCustomLayout) && table.scenegraph.recalculateRowHeights(), table.isPivotTable()) {
37087
37090
  const ranges = getUpdateCustomCellRangeInPivotTable(componentId, table, isHeaderCustomLayout);
37088
37091
  for (let i = 0; i < ranges.length; i++) {
37089
37092
  const range = ranges[i];
@@ -37093,7 +37096,7 @@
37093
37096
  const range = getUpdateCustomCellRangeInListTable(componentId, table, isHeaderCustomLayout);
37094
37097
  for (let col = range.start.col; col <= range.end.col; col++) for (let row = range.start.row; row <= range.end.row; row++) table.scenegraph.updateCellContent(col, row);
37095
37098
  }
37096
- "autoWidth" === table.widthMode && table.scenegraph.recalculateColWidths(), table.isAutoRowHeight() && table.scenegraph.recalculateRowHeights(), table.scenegraph.renderSceneGraph();
37099
+ table.scenegraph.renderSceneGraph();
37097
37100
  }
37098
37101
  getCustomLayoutFunc(col, row) {
37099
37102
  var _a;
@@ -38781,8 +38784,9 @@
38781
38784
  }
38782
38785
  function updateCell$1(col, row, table, addNew, isShadow, forceFastUpdate) {
38783
38786
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
38784
- const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0),
38785
- cellLocation = table.getCellLocation(col, row);
38787
+ const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0);
38788
+ if ("cell" !== oldCellGroup.role && !addNew) return;
38789
+ const cellLocation = table.getCellLocation(col, row);
38786
38790
  let isMerge,
38787
38791
  range,
38788
38792
  customStyle,
@@ -39346,7 +39350,7 @@
39346
39350
  const layoutMap = table.internalProps.layoutMap;
39347
39351
  table.isPivotTable() && (layoutMap.enableUseGetBodyCache(), layoutMap.enableUseHeaderPathCache()), table.defaultHeaderRowHeight, table.defaultHeaderColWidth;
39348
39352
  const isDefaultHeaderHasAuto = "auto" === table.defaultHeaderRowHeight || isArray$7(table.defaultHeaderRowHeight) && table.defaultHeaderRowHeight.some(item => "auto" === item),
39349
- isAllRowsAuto = table.isAutoRowHeight() || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode,
39353
+ isAllRowsAuto = table.isAutoRowHeight(rowStart) || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode,
39350
39354
  isDefaultRowHeightIsAuto = "auto" === table.options.defaultRowHeight;
39351
39355
  if (isAllRowsAuto || isDefaultHeaderHasAuto || isDefaultRowHeightIsAuto) {
39352
39356
  rowStart = null != rowStart ? rowStart : 0, rowEnd = null != rowEnd ? rowEnd : table.rowCount - 1, (0 === rowStart && rowEnd === table.rowCount - 1 || isClearRowRangeHeightsMap) && table._clearRowRangeHeightsMap();
@@ -39362,7 +39366,7 @@
39362
39366
  const height = computeRowHeight(row, 0, table.colCount - 1, table);
39363
39367
  update ? newHeights[row] = Math.round(height) : table._setRowHeight(row, height);
39364
39368
  }
39365
- if (rowEnd < table.columnHeaderLevelCount || !isAllRowsAuto && !isDefaultRowHeightIsAuto) ;else if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol || table.options.customComputeRowHeight || !checkFixedStyleAndNoWrap(table)) {
39369
+ if (rowEnd < table.columnHeaderLevelCount || !isAllRowsAuto && !isDefaultRowHeightIsAuto) ;else if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol || table.options.customComputeRowHeight || !checkFixedStyleAndNoWrap(table, rowStart)) {
39366
39370
  if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol) for (let row = Math.max(rowStart, table.columnHeaderLevelCount); row <= rowEnd; row++) {
39367
39371
  let height;
39368
39372
  height = checkFixedStyleAndNoWrapForTranspose(table, row) ? computeRowHeight(row, 0, table.rowHeaderLevelCount, table) : computeRowHeight(row, 0, table.colCount - 1, table), update ? newHeights[row] = Math.round(height) : table._setRowHeight(row, height);
@@ -39436,7 +39440,7 @@
39436
39440
  }
39437
39441
  function computeRowHeight(row, startCol, endCol, table) {
39438
39442
  var _a;
39439
- if (!(table.isAutoRowHeight() || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
39443
+ if (!(table.isAutoRowHeight(row) || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
39440
39444
  let maxHeight;
39441
39445
  if (table.options.customComputeRowHeight) {
39442
39446
  const customRowHeight = table.options.customComputeRowHeight({
@@ -39474,13 +39478,13 @@
39474
39478
  const defaultHeight = table.getDefaultRowHeight(row);
39475
39479
  return isNumber$4(defaultHeight) ? defaultHeight : table.defaultRowHeight;
39476
39480
  }
39477
- function checkFixedStyleAndNoWrap(table) {
39481
+ function checkFixedStyleAndNoWrap(table, rowStart) {
39478
39482
  var _a, _b, _c;
39479
39483
  const {
39480
39484
  layoutMap: layoutMap
39481
39485
  } = table.internalProps,
39482
39486
  row = table.columnHeaderLevelCount;
39483
- if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak || table.isPivotChart()) && (table.isAutoRowHeight() || "adaptive" === table.options.heightMode)) return !1;
39487
+ if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak || table.isPivotChart()) && (table.isAutoRowHeight(rowStart) || "adaptive" === table.options.heightMode)) return !1;
39484
39488
  for (let col = 0; col < table.colCount; col++) {
39485
39489
  const cellDefine = layoutMap.getBody(col, row);
39486
39490
  if ("radio" === cellDefine.cellType) return !1;
@@ -39495,7 +39499,7 @@
39495
39499
  const {
39496
39500
  layoutMap: layoutMap
39497
39501
  } = table.internalProps;
39498
- if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak) && (table.isAutoRowHeight() || "adaptive" === table.options.heightMode)) return !1;
39502
+ if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak) && (table.isAutoRowHeight(row) || "adaptive" === table.options.heightMode)) return !1;
39499
39503
  const cellDefine = layoutMap.getBody(table.rowHeaderLevelCount, row);
39500
39504
  if ("function" == typeof cellDefine.style || "function" == typeof cellDefine.icon || (null === (_a = cellDefine.define) || void 0 === _a ? void 0 : _a.customRender) || (null === (_b = cellDefine.define) || void 0 === _b ? void 0 : _b.customLayout) || "function" == typeof (null === (_c = cellDefine.define) || void 0 === _c ? void 0 : _c.icon)) return !1;
39501
39505
  const cellStyle = table._getCellStyle(table.rowHeaderLevelCount, row);
@@ -39506,7 +39510,7 @@
39506
39510
  const {
39507
39511
  layoutMap: layoutMap
39508
39512
  } = table.internalProps;
39509
- if (table.internalProps.autoWrapText && (table.isAutoRowHeight() || "adaptive" === table.options.heightMode)) return !1;
39513
+ if (table.internalProps.autoWrapText && (table.isAutoRowHeight(row) || "adaptive" === table.options.heightMode)) return !1;
39510
39514
  const headerDefine = layoutMap.getHeader(table.rowHeaderLevelCount, row);
39511
39515
  if ("function" == typeof headerDefine.style || "function" == typeof headerDefine.icons || (null === (_a = headerDefine.define) || void 0 === _a ? void 0 : _a.headerCustomRender) || (null === (_b = headerDefine.define) || void 0 === _b ? void 0 : _b.headerCustomLayout) || "function" == typeof (null === (_c = headerDefine.define) || void 0 === _c ? void 0 : _c.icon)) return !1;
39512
39516
  const headerStyle = table._getCellStyle(table.rowHeaderLevelCount, row);
@@ -39537,7 +39541,8 @@
39537
39541
  rect: getCellRect$1(col, row, table),
39538
39542
  table: table,
39539
39543
  originCol: col,
39540
- originRow: row
39544
+ originRow: row,
39545
+ forComputation: !0
39541
39546
  };
39542
39547
  if ("react-custom-layout" === customLayout && (customLayout = (null === (_d = table.reactCustomLayout) || void 0 === _d ? void 0 : _d.getCustomLayoutFunc(col, row)) || emptyCustomLayout), isFunction$5(customLayout)) {
39543
39548
  const customLayoutObj = customLayout(arg);
@@ -41171,7 +41176,7 @@
41171
41176
  }
41172
41177
 
41173
41178
  const CHART_NUMBER_TYPE = genNumberType();
41174
- class Chart extends Group$2 {
41179
+ class Chart extends Rect$2 {
41175
41180
  constructor(isShareChartSpec, params) {
41176
41181
  if (super(params), this.type = "chart", this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
41177
41182
  const chartInstance = this.chartInstance = new params.ClassType(params.spec, merge$1({}, this.attribute.tableChartOption, {
@@ -41466,7 +41471,7 @@
41466
41471
  }), stage.renderTo(window), window;
41467
41472
  }
41468
41473
 
41469
- var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
41474
+ var __decorate$6 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
41470
41475
  var d,
41471
41476
  c = arguments.length,
41472
41477
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -41548,9 +41553,9 @@
41548
41553
  this._draw(chart, {}, !1, drawContext, params);
41549
41554
  }
41550
41555
  };
41551
- DefaultCanvasChartRender = __decorate$5([injectable()], DefaultCanvasChartRender);
41556
+ DefaultCanvasChartRender = __decorate$6([injectable()], DefaultCanvasChartRender);
41552
41557
 
41553
- var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
41558
+ var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
41554
41559
  var d,
41555
41560
  c = arguments.length,
41556
41561
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -41574,7 +41579,7 @@
41574
41579
  }
41575
41580
  }
41576
41581
  };
41577
- BeforeImageRenderContribution = __decorate$4([injectable()], BeforeImageRenderContribution);
41582
+ BeforeImageRenderContribution = __decorate$5([injectable()], BeforeImageRenderContribution);
41578
41583
  let AfterImageRenderContribution = class {
41579
41584
  constructor() {
41580
41585
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
@@ -41586,7 +41591,7 @@
41586
41591
  "circle" === shape && context.restore();
41587
41592
  }
41588
41593
  };
41589
- AfterImageRenderContribution = __decorate$4([injectable()], AfterImageRenderContribution);
41594
+ AfterImageRenderContribution = __decorate$5([injectable()], AfterImageRenderContribution);
41590
41595
  let BeforeGifImageRenderContribution = class {
41591
41596
  constructor() {
41592
41597
  this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
@@ -41598,7 +41603,7 @@
41598
41603
  isGif && image.playing && (image.attribute.opacity = 0);
41599
41604
  }
41600
41605
  };
41601
- BeforeGifImageRenderContribution = __decorate$4([injectable()], BeforeGifImageRenderContribution);
41606
+ BeforeGifImageRenderContribution = __decorate$5([injectable()], BeforeGifImageRenderContribution);
41602
41607
  let AfterGifImageRenderContribution = class {
41603
41608
  constructor() {
41604
41609
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
@@ -41610,7 +41615,7 @@
41610
41615
  isGif && image.playing && (image.attribute.opacity = 1, context.globalAlpha = image.attribute.opacity, image.renderFrame(context, x, y));
41611
41616
  }
41612
41617
  };
41613
- AfterGifImageRenderContribution = __decorate$4([injectable()], AfterGifImageRenderContribution);
41618
+ AfterGifImageRenderContribution = __decorate$5([injectable()], AfterGifImageRenderContribution);
41614
41619
 
41615
41620
  function getCellHoverColor(cellGroup, table) {
41616
41621
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -41745,7 +41750,7 @@
41745
41750
  return !1;
41746
41751
  }
41747
41752
 
41748
- var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
41753
+ var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
41749
41754
  var d,
41750
41755
  c = arguments.length,
41751
41756
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -41765,7 +41770,7 @@
41765
41770
  stroke && (Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor)) && (doFillOrStroke.doStroke = !1);
41766
41771
  }
41767
41772
  };
41768
- SplitGroupBeforeRenderContribution = __decorate$3([injectable()], SplitGroupBeforeRenderContribution);
41773
+ SplitGroupBeforeRenderContribution = __decorate$4([injectable()], SplitGroupBeforeRenderContribution);
41769
41774
  let SplitGroupAfterRenderContribution = class {
41770
41775
  constructor() {
41771
41776
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
@@ -41811,7 +41816,7 @@
41811
41816
  }
41812
41817
  }
41813
41818
  };
41814
- SplitGroupAfterRenderContribution = __decorate$3([injectable()], SplitGroupAfterRenderContribution);
41819
+ SplitGroupAfterRenderContribution = __decorate$4([injectable()], SplitGroupAfterRenderContribution);
41815
41820
  function getWidthInfo(widthArray) {
41816
41821
  if (!Array.isArray(widthArray)) return {
41817
41822
  isSplitDraw: !1,
@@ -41885,7 +41890,7 @@
41885
41890
  stroke && Array.isArray(lineDash) && lineDash.length && (null === (_a = lineDash[0]) || void 0 === _a ? void 0 : _a.length) && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && (doFillOrStroke.doStroke = !1);
41886
41891
  }
41887
41892
  };
41888
- DashGroupBeforeRenderContribution = __decorate$3([injectable()], DashGroupBeforeRenderContribution);
41893
+ DashGroupBeforeRenderContribution = __decorate$4([injectable()], DashGroupBeforeRenderContribution);
41889
41894
  let DashGroupAfterRenderContribution = class {
41890
41895
  constructor() {
41891
41896
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
@@ -41927,7 +41932,7 @@
41927
41932
  context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.beginPath(), context.moveTo(x, y), context.lineTo(x + widthForStroke, y), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, context.setLineDash(null !== (_c = splitLineDash[0]) && void 0 !== _c ? _c : []), context.stroke(), context.beginPath(), context.moveTo(x + widthForStroke, y), context.lineTo(x + widthForStroke, y + heightForStroke), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, context.setLineDash(null !== (_d = splitLineDash[1]) && void 0 !== _d ? _d : []), context.stroke(), context.beginPath(), context.moveTo(x, y + heightForStroke), context.lineTo(x + widthForStroke, y + heightForStroke), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, context.setLineDash(null !== (_e = splitLineDash[2]) && void 0 !== _e ? _e : []), context.stroke(), context.beginPath(), context.moveTo(x, y), context.lineTo(x, y + heightForStroke), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, context.setLineDash(null !== (_f = splitLineDash[3]) && void 0 !== _f ? _f : []), context.stroke(), context.lineDashOffset = 0, context.setLineDash([]);
41928
41933
  }
41929
41934
  };
41930
- DashGroupAfterRenderContribution = __decorate$3([injectable()], DashGroupAfterRenderContribution);
41935
+ DashGroupAfterRenderContribution = __decorate$4([injectable()], DashGroupAfterRenderContribution);
41931
41936
  let AdjustPosGroupBeforeRenderContribution = class {
41932
41937
  constructor() {
41933
41938
  this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
@@ -41944,7 +41949,7 @@
41944
41949
  !0 !== notAdjustPos && stroke && Array.isArray(lineDash) && !lineDash.length && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && 1 & lineWidth && (doFillOrStroke.doStroke = !1);
41945
41950
  }
41946
41951
  };
41947
- AdjustPosGroupBeforeRenderContribution = __decorate$3([injectable()], AdjustPosGroupBeforeRenderContribution);
41952
+ AdjustPosGroupBeforeRenderContribution = __decorate$4([injectable()], AdjustPosGroupBeforeRenderContribution);
41948
41953
  let AdjustPosGroupAfterRenderContribution = class {
41949
41954
  constructor() {
41950
41955
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
@@ -41984,7 +41989,7 @@
41984
41989
  }
41985
41990
  }
41986
41991
  };
41987
- AdjustPosGroupAfterRenderContribution = __decorate$3([injectable()], AdjustPosGroupAfterRenderContribution);
41992
+ AdjustPosGroupAfterRenderContribution = __decorate$4([injectable()], AdjustPosGroupAfterRenderContribution);
41988
41993
  let AdjustColorGroupBeforeRenderContribution = class {
41989
41994
  constructor() {
41990
41995
  this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
@@ -42002,7 +42007,7 @@
42002
42007
  }
42003
42008
  }
42004
42009
  };
42005
- AdjustColorGroupBeforeRenderContribution = __decorate$3([injectable()], AdjustColorGroupBeforeRenderContribution);
42010
+ AdjustColorGroupBeforeRenderContribution = __decorate$4([injectable()], AdjustColorGroupBeforeRenderContribution);
42006
42011
  let AdjustColorGroupAfterRenderContribution = class {
42007
42012
  constructor() {
42008
42013
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
@@ -42014,7 +42019,7 @@
42014
42019
  }
42015
42020
  }
42016
42021
  };
42017
- AdjustColorGroupAfterRenderContribution = __decorate$3([injectable()], AdjustColorGroupAfterRenderContribution);
42022
+ AdjustColorGroupAfterRenderContribution = __decorate$4([injectable()], AdjustColorGroupAfterRenderContribution);
42018
42023
  let ClipBodyGroupBeforeRenderContribution = class {
42019
42024
  constructor() {
42020
42025
  this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
@@ -42043,7 +42048,7 @@
42043
42048
  }
42044
42049
  }
42045
42050
  };
42046
- ClipBodyGroupBeforeRenderContribution = __decorate$3([injectable()], ClipBodyGroupBeforeRenderContribution);
42051
+ ClipBodyGroupBeforeRenderContribution = __decorate$4([injectable()], ClipBodyGroupBeforeRenderContribution);
42047
42052
  const precision = Math.pow(2, 24);
42048
42053
  function drawClipRect(context, x, y, width, height) {
42049
42054
  context.beginPath();
@@ -42071,7 +42076,7 @@
42071
42076
  return 1 === lineDash.length ? [lineDash[0], lineDash[0], lineDash[0], lineDash[0]] : 2 === lineDash.length ? [lineDash[0], lineDash[1], lineDash[0], lineDash[1]] : lineDash;
42072
42077
  }
42073
42078
 
42074
- var __decorate$2 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
42079
+ var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
42075
42080
  var d,
42076
42081
  c = arguments.length,
42077
42082
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -42091,7 +42096,7 @@
42091
42096
  stroke && (Array.isArray(stroke) || Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor)) && (doFillOrStroke.doStroke = !1);
42092
42097
  }
42093
42098
  };
42094
- SplitRectBeforeRenderContribution = __decorate$2([injectable()], SplitRectBeforeRenderContribution);
42099
+ SplitRectBeforeRenderContribution = __decorate$3([injectable()], SplitRectBeforeRenderContribution);
42095
42100
  let SplitRectAfterRenderContribution = class {
42096
42101
  constructor() {
42097
42102
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
@@ -42116,7 +42121,7 @@
42116
42121
  }
42117
42122
  }
42118
42123
  };
42119
- SplitRectAfterRenderContribution = __decorate$2([injectable()], SplitRectAfterRenderContribution);
42124
+ SplitRectAfterRenderContribution = __decorate$3([injectable()], SplitRectAfterRenderContribution);
42120
42125
  function renderStrokeWithCornerRadius(i, x1, y1, x2, y2, rect, context, x, y, rectAttribute, stroke, strokeArrayWidth, strokeArrayColor, width, height) {
42121
42126
  var _a, _b, _c, _d;
42122
42127
  const group = rect,
@@ -42154,7 +42159,7 @@
42154
42159
  context.closePath(), isSplitDraw || isDash || (!isWidthNumber && widthInfo.width && (context.lineWidth = widthInfo.width), context.stroke()), context.lineDashOffset = 0, context.setLineDash([]), context.beginPath();
42155
42160
  }
42156
42161
 
42157
- var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
42162
+ var __decorate$2 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
42158
42163
  var d,
42159
42164
  c = arguments.length,
42160
42165
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -42176,7 +42181,7 @@
42176
42181
  return !1;
42177
42182
  }
42178
42183
  };
42179
- VTableDrawItemInterceptorContribution = __decorate$1([injectable()], VTableDrawItemInterceptorContribution);
42184
+ VTableDrawItemInterceptorContribution = __decorate$2([injectable()], VTableDrawItemInterceptorContribution);
42180
42185
  class ImageDrawItemInterceptorContribution {
42181
42186
  constructor() {
42182
42187
  this.order = 1;
@@ -42223,7 +42228,7 @@
42223
42228
  }
42224
42229
  }
42225
42230
 
42226
- var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
42231
+ var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
42227
42232
  var d,
42228
42233
  c = arguments.length,
42229
42234
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -42308,10 +42313,42 @@
42308
42313
  }
42309
42314
  }
42310
42315
  };
42311
- SuffixTextBeforeRenderContribution = __decorate([injectable()], SuffixTextBeforeRenderContribution);
42316
+ SuffixTextBeforeRenderContribution = __decorate$1([injectable()], SuffixTextBeforeRenderContribution);
42317
+
42318
+ var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
42319
+ var d,
42320
+ c = arguments.length,
42321
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
42322
+ 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);
42323
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
42324
+ };
42325
+ let VChartPicker = class {
42326
+ constructor() {
42327
+ this.type = "chart", this.numberType = CHART_NUMBER_TYPE;
42328
+ }
42329
+ contains(chart, point, params) {
42330
+ var _a;
42331
+ const vChart = chart.activeChartInstance;
42332
+ if (!vChart) return !1;
42333
+ const matrix = chart.parent.globalTransMatrix.clone(),
42334
+ stageMatrix = chart.stage.window.getViewBoxTransform();
42335
+ matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
42336
+ const nextP = {
42337
+ x: 0,
42338
+ y: 0
42339
+ };
42340
+ matrix.getInverse().transformPoint(point, nextP);
42341
+ const vchartStage = vChart.getStage();
42342
+ null === (_a = vchartStage.dirtyBounds) || void 0 === _a || _a.clear();
42343
+ vchartStage.window.getViewBoxTransform().transformPoint(nextP, nextP);
42344
+ const pick = vchartStage.pick(nextP.x, nextP.y);
42345
+ return (null !== pick.graphic || "root" !== pick.group.name) && pick;
42346
+ }
42347
+ };
42348
+ VChartPicker = __decorate([injectable()], VChartPicker);
42312
42349
 
42313
42350
  var splitModule = new ContainerModule((bind, unbind, isBound, rebind) => {
42314
- isBound(SplitRectBeforeRenderContribution$1) ? rebind(SplitRectBeforeRenderContribution$1).to(SplitRectBeforeRenderContribution).inSingletonScope() : (bind(SplitRectBeforeRenderContribution).toSelf().inSingletonScope(), bind(RectRenderContribution).toService(SplitRectBeforeRenderContribution)), isBound(SplitRectAfterRenderContribution$1) ? rebind(SplitRectAfterRenderContribution$1).to(SplitRectAfterRenderContribution).inSingletonScope() : (bind(SplitRectAfterRenderContribution).toSelf().inSingletonScope(), bind(RectRenderContribution).toService(SplitRectAfterRenderContribution)), bind(DefaultCanvasChartRender).toSelf().inSingletonScope(), bind(ChartRender).to(DefaultCanvasChartRender), bind(GraphicRender).to(DefaultCanvasChartRender), bind(BeforeImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(BeforeImageRenderContribution), bind(AfterImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(AfterImageRenderContribution), bind(BeforeGifImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(BeforeGifImageRenderContribution), bind(AfterGifImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(AfterGifImageRenderContribution), bind(AdjustColorGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustColorGroupBeforeRenderContribution), bind(AdjustColorGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustColorGroupAfterRenderContribution), bind(SplitGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(SplitGroupAfterRenderContribution), bind(SplitGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(SplitGroupBeforeRenderContribution), bind(DashGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(DashGroupBeforeRenderContribution), bind(DashGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(DashGroupAfterRenderContribution), bind(AdjustPosGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustPosGroupBeforeRenderContribution), bind(AdjustPosGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustPosGroupAfterRenderContribution), bind(ClipBodyGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(ClipBodyGroupBeforeRenderContribution), bind(VTableDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(VTableDrawItemInterceptorContribution), bind(SuffixTextBeforeRenderContribution).toSelf().inSingletonScope(), bind(TextRenderContribution).toService(SuffixTextBeforeRenderContribution);
42351
+ isBound(SplitRectBeforeRenderContribution$1) ? rebind(SplitRectBeforeRenderContribution$1).to(SplitRectBeforeRenderContribution).inSingletonScope() : (bind(SplitRectBeforeRenderContribution).toSelf().inSingletonScope(), bind(RectRenderContribution).toService(SplitRectBeforeRenderContribution)), isBound(SplitRectAfterRenderContribution$1) ? rebind(SplitRectAfterRenderContribution$1).to(SplitRectAfterRenderContribution).inSingletonScope() : (bind(SplitRectAfterRenderContribution).toSelf().inSingletonScope(), bind(RectRenderContribution).toService(SplitRectAfterRenderContribution)), bind(DefaultCanvasChartRender).toSelf().inSingletonScope(), bind(ChartRender).to(DefaultCanvasChartRender), bind(GraphicRender).to(DefaultCanvasChartRender), bind(VChartPicker).toSelf().inSingletonScope(), bind(CanvasPickerContribution).toService(VChartPicker), bind(BeforeImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(BeforeImageRenderContribution), bind(AfterImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(AfterImageRenderContribution), bind(BeforeGifImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(BeforeGifImageRenderContribution), bind(AfterGifImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(AfterGifImageRenderContribution), bind(AdjustColorGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustColorGroupBeforeRenderContribution), bind(AdjustColorGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustColorGroupAfterRenderContribution), bind(SplitGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(SplitGroupAfterRenderContribution), bind(SplitGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(SplitGroupBeforeRenderContribution), bind(DashGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(DashGroupBeforeRenderContribution), bind(DashGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(DashGroupAfterRenderContribution), bind(AdjustPosGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustPosGroupBeforeRenderContribution), bind(AdjustPosGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustPosGroupAfterRenderContribution), bind(ClipBodyGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(ClipBodyGroupBeforeRenderContribution), bind(VTableDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(VTableDrawItemInterceptorContribution), bind(SuffixTextBeforeRenderContribution).toSelf().inSingletonScope(), bind(TextRenderContribution).toService(SuffixTextBeforeRenderContribution);
42315
42352
  });
42316
42353
 
42317
42354
  function computeColsWidth(table, colStart, colEnd, update) {
@@ -42453,7 +42490,8 @@
42453
42490
  rect: getCellRect(col, row, table),
42454
42491
  table: table,
42455
42492
  originCol: col,
42456
- originRow: row
42493
+ originRow: row,
42494
+ forComputation: !0
42457
42495
  };
42458
42496
  if ("react-custom-layout" === customLayout && (customLayout = (null === (_d = table.reactCustomLayout) || void 0 === _d ? void 0 : _d.getCustomLayoutFunc(col, row)) || emptyCustomLayout), isFunction$5(customLayout)) {
42459
42497
  const customLayoutObj = customLayout(arg);
@@ -42809,7 +42847,7 @@
42809
42847
  rightBottomCornerGroup: rightBottomCornerGroup
42810
42848
  } = table.scenegraph;
42811
42849
  let distCol, distRow, distColForCompute, distRowForCompute;
42812
- proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight()) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
42850
+ proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
42813
42851
  x: table.getFrozenColsWidth(),
42814
42852
  y: table.getFrozenRowsHeight()
42815
42853
  }), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, Math.min(table.frozenColCount - 1, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount - 1), table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_d = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : null === (_c = rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.rowNumber) && void 0 !== _d ? _d : proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = null !== (_m = null !== (_k = null !== (_h = null !== (_f = null === (_e = bodyGroup.lastChild) || void 0 === _e ? void 0 : _e.col) && void 0 !== _f ? _f : null === (_g = colHeaderGroup.lastChild) || void 0 === _g ? void 0 : _g.col) && void 0 !== _h ? _h : null === (_j = rowHeaderGroup.lastChild) || void 0 === _j ? void 0 : _j.col) && void 0 !== _k ? _k : null === (_l = cornerHeaderGroup.lastChild) || void 0 === _l ? void 0 : _l.col) && void 0 !== _m ? _m : proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2), proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
@@ -43093,20 +43131,20 @@
43093
43131
  distStartRow = "up" === direction ? proxy.rowEnd + 1 : proxy.rowStart - count,
43094
43132
  distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowStart - 1;
43095
43133
  let syncTopRow, syncBottomRow;
43096
- if (proxy.table.isAutoRowHeight()) syncTopRow = distStartRow, syncBottomRow = distEndRow;else {
43134
+ if (proxy.table.isAutoRowHeight(startRow)) syncTopRow = distStartRow, syncBottomRow = distEndRow;else {
43097
43135
  syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1);
43098
43136
  }
43099
43137
  computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, !1), updatePartRowPosition(startRow, endRow, direction, proxy), proxy.rowStart = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count, proxy.rowEnd = "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count;
43100
43138
  const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, !0);
43101
- proxy.table.isAutoRowHeight() && (updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0), updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0), updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0)), proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count, proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, "up" === direction ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1)), proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.table.isAutoRowHeight() && sync ? proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, proxy.rowEnd + 1) : proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, distStartRow), proxy.rowUpdateDirection = direction, proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
43139
+ proxy.table.isAutoRowHeight(startRow) && (updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0), updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0), updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0)), proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count, proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, "up" === direction ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1)), proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.table.isAutoRowHeight(startRow) && sync ? proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, proxy.rowEnd + 1) : proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, distStartRow), proxy.rowUpdateDirection = direction, proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
43102
43140
  } else {
43103
43141
  const distStartRow = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count,
43104
43142
  distEndRow = Math.min(proxy.table.rowCount - 1, "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count),
43105
43143
  distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);
43106
43144
  let syncTopRow, syncBottomRow;
43107
- proxy.table.isAutoRowHeight() ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1)), computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, !1), updateAllRowPosition(distStartRowY, count, direction, proxy), proxy.rowStart = distStartRow, proxy.rowEnd = distEndRow;
43145
+ proxy.table.isAutoRowHeight(distStartRow) ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1)), computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, !1), updateAllRowPosition(distStartRowY, count, direction, proxy), proxy.rowStart = distStartRow, proxy.rowEnd = distEndRow;
43108
43146
  const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, !0);
43109
- proxy.table.isAutoRowHeight() && (updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up")), proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count, proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, "up" === direction ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1)), proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.table.isAutoRowHeight() && sync ? proxy.rowUpdatePos = proxy.rowEnd + 1 : proxy.rowUpdatePos = proxy.rowStart, proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
43147
+ proxy.table.isAutoRowHeight(distStartRow) && (updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up")), proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count, proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, "up" === direction ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1)), proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.table.isAutoRowHeight(distStartRow) && sync ? proxy.rowUpdatePos = proxy.rowEnd + 1 : proxy.rowUpdatePos = proxy.rowStart, proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
43110
43148
  }
43111
43149
  });
43112
43150
  }
@@ -43220,12 +43258,12 @@
43220
43258
  "group" === colGroup.type && (colGroup.needUpdate = !0, null == colGroup || colGroup.forEachChildren(cellGroup => {
43221
43259
  cellGroup.needUpdate = !0;
43222
43260
  }));
43223
- }), proxy.table.isAutoRowHeight() ? (syncTopRow = proxy.rowStart, syncBottomRow = proxy.rowEnd) : (syncTopRow = Math.max(proxy.bodyTopRow, proxy.screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, proxy.screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1));
43261
+ }), proxy.table.isAutoRowHeight(proxy.rowStart) ? (syncTopRow = proxy.rowStart, syncBottomRow = proxy.rowEnd) : (syncTopRow = Math.max(proxy.bodyTopRow, proxy.screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, proxy.screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1));
43224
43262
  const oldBodyHeight = proxy.table.getAllRowsHeight();
43225
43263
  computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
43226
43264
  const newBodyHeight = proxy.table.getAllRowsHeight();
43227
43265
  oldBodyHeight !== newBodyHeight && proxy.table.scenegraph.updateContainerHeight(proxy.table.frozenRowCount, newBodyHeight - oldBodyHeight);
43228
- for (let col = 0; null !== (_a = col < proxy.table.frozenColCount) && void 0 !== _a && _a; col++) {
43266
+ for (let col = 0; col < (null !== (_a = proxy.table.frozenColCount) && void 0 !== _a ? _a : 0); col++) {
43229
43267
  const columnGroup = proxy.table.scenegraph.getColGroup(col);
43230
43268
  null == columnGroup || columnGroup.setAttribute("chartInstance", void 0);
43231
43269
  for (let row = proxy.rowStart; row <= proxy.rowEnd; row++) proxy.table.scenegraph.updateCellContent(col, row);
@@ -43242,7 +43280,7 @@
43242
43280
  for (let row = proxy.rowStart; row <= proxy.rowEnd; row++) proxy.table.scenegraph.updateCellContent(col, row);
43243
43281
  for (let row = proxy.table.rowCount - proxy.table.bottomFrozenRowCount; row < proxy.table.rowCount; row++) proxy.table.scenegraph.updateCellContent(col, row);
43244
43282
  }
43245
- updateRowContent(syncTopRow, syncBottomRow, proxy), proxy.table.isAutoRowHeight() && updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, proxy.rowEnd > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), proxy.rowUpdatePos = proxy.rowStart, proxy.rowUpdateDirection = proxy.rowEnd > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", proxy.table.scenegraph.updateNextFrame(), proxy.table.isAutoRowHeight() || (yield proxy.progress());
43283
+ updateRowContent(syncTopRow, syncBottomRow, proxy), proxy.table.isAutoRowHeight(syncTopRow) && updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, proxy.rowEnd > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), proxy.rowUpdatePos = proxy.rowStart, proxy.rowUpdateDirection = proxy.rowEnd > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", proxy.table.scenegraph.updateNextFrame(), proxy.table.isAutoRowHeight(proxy.rowStart) || (yield proxy.progress());
43246
43284
  });
43247
43285
  }
43248
43286
 
@@ -43535,7 +43573,7 @@
43535
43573
  };
43536
43574
  class SceneProxy {
43537
43575
  constructor(table) {
43538
- this.isRelease = !1, this.mode = "column", this.rowLimit = 200, this.currentRow = 0, this.rowStart = 0, this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0, this.deltaHeight = 0, this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.deltaWidth = 0, this.cellCache = new Map(), this.table = table, this.table.isPivotChart() ? (this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) : this.table.isAutoRowHeight() ? this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)) : ("autoWidth" === this.table.widthMode || (this.rowLimit = Math.max(200, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight))), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))), this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"), this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount), this.table.options.maintainedColumnCount && (this.colLimit = this.table.options.maintainedColumnCount);
43576
+ this.isRelease = !1, this.mode = "column", this.rowLimit = 200, this.currentRow = 0, this.rowStart = 0, this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0, this.deltaHeight = 0, this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.deltaWidth = 0, this.cellCache = new Map(), this.table = table, this.table.isPivotChart() ? (this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) : this.table.isAutoRowHeight(table.columnHeaderLevelCount) ? this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)) : ("autoWidth" === this.table.widthMode || (this.rowLimit = Math.max(200, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight))), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))), this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"), this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount), this.table.options.maintainedColumnCount && (this.colLimit = this.table.options.maintainedColumnCount);
43539
43577
  }
43540
43578
  get bodyLeftCol() {
43541
43579
  return this.table.frozenColCount;
@@ -43708,17 +43746,17 @@
43708
43746
  }
43709
43747
  updateCellGroups(count) {
43710
43748
  const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
43711
- this.table.isAutoRowHeight() && computeRowsHeight(this.table, this.rowUpdatePos, distRow, !1), updateRowContent(this.rowUpdatePos, distRow, this), this.table.isAutoRowHeight() && (updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0), updateAutoRow(0, this.table.frozenColCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0), updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0)), this.rowUpdatePos = distRow + 1;
43749
+ this.table.isAutoRowHeight(this.rowUpdatePos) && computeRowsHeight(this.table, this.rowUpdatePos, distRow, !1), updateRowContent(this.rowUpdatePos, distRow, this), this.table.isAutoRowHeight(this.rowUpdatePos) && (updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0), updateAutoRow(0, this.table.frozenColCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0), updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0)), this.rowUpdatePos = distRow + 1;
43712
43750
  }
43713
43751
  updateBottomFrozenCellGroups() {
43714
43752
  const startRow = this.table.rowCount - this.table.bottomFrozenRowCount,
43715
43753
  endRow = this.table.rowCount - 1;
43716
- this.table.isAutoRowHeight() && computeRowsHeight(this.table, startRow, endRow, !1), updateRowContent(startRow, endRow, this), this.table.isAutoRowHeight() && (updateAutoRow(this.bodyLeftCol, this.bodyRightCol, startRow, endRow, this.table, this.rowUpdateDirection), updateAutoRow(0, this.table.frozenColCount - 1, startRow, endRow, this.table, this.rowUpdateDirection), updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, startRow, endRow, this.table, this.rowUpdateDirection));
43754
+ this.table.isAutoRowHeight(startRow) && computeRowsHeight(this.table, startRow, endRow, !1), updateRowContent(startRow, endRow, this), this.table.isAutoRowHeight(startRow) && (updateAutoRow(this.bodyLeftCol, this.bodyRightCol, startRow, endRow, this.table, this.rowUpdateDirection), updateAutoRow(0, this.table.frozenColCount - 1, startRow, endRow, this.table, this.rowUpdateDirection), updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, startRow, endRow, this.table, this.rowUpdateDirection));
43717
43755
  }
43718
43756
  updateRightFrozenCellGroups() {
43719
43757
  const startCol = this.table.colCount - this.table.rightFrozenColCount,
43720
43758
  endCol = this.table.colCount - 1;
43721
- "autoWidth" === this.table.widthMode && computeColsWidth(this.table, startCol, endCol, !1), updateColContent(startCol, endCol, this), this.table.isAutoRowHeight() && updateAutoColumn(startCol, endCol, this.table, this.colUpdateDirection);
43759
+ "autoWidth" === this.table.widthMode && computeColsWidth(this.table, startCol, endCol, !1), updateColContent(startCol, endCol, this), this.table.isAutoRowHeight(this.rowStart) && updateAutoColumn(startCol, endCol, this.table, this.colUpdateDirection);
43722
43760
  }
43723
43761
  updateColCellGroupsAsync() {
43724
43762
  return __awaiter$1(this, void 0, void 0, function* () {
@@ -44438,22 +44476,22 @@
44438
44476
  beforeCell.mergeStartRow && beforeCell.mergeEndRow && beforeCell.mergeEndRow > beforeRow && (addNeedUpdateTag({
44439
44477
  start: {
44440
44478
  row: beforeCell.mergeStartRow,
44441
- col: scene.table.isAutoRowHeight() ? 0 : beforeCell.mergeStartCol
44479
+ col: scene.table.isAutoRowHeight(afterRow) ? 0 : beforeCell.mergeStartCol
44442
44480
  },
44443
44481
  end: {
44444
44482
  row: beforeCell.mergeEndRow,
44445
- col: scene.table.isAutoRowHeight() ? scene.table.colCount - 1 : beforeCell.mergeEndCol
44483
+ col: scene.table.isAutoRowHeight(afterRow) ? scene.table.colCount - 1 : beforeCell.mergeEndCol
44446
44484
  }
44447
44485
  }, scene), row = beforeCell.mergeStartRow);
44448
44486
  const afterCell = scene.highPerformanceGetCell(col, afterRow);
44449
44487
  afterCell.mergeStartRow && afterCell.mergeEndRow && afterCell.mergeStartRow < afterRow && (addNeedUpdateTag({
44450
44488
  start: {
44451
44489
  row: afterCell.mergeStartRow,
44452
- col: scene.table.isAutoRowHeight() ? 0 : afterCell.mergeStartCol
44490
+ col: scene.table.isAutoRowHeight(afterRow) ? 0 : afterCell.mergeStartCol
44453
44491
  },
44454
44492
  end: {
44455
44493
  row: afterCell.mergeEndRow,
44456
- col: scene.table.isAutoRowHeight() ? scene.table.colCount - 1 : afterCell.mergeEndCol
44494
+ col: scene.table.isAutoRowHeight(afterRow) ? scene.table.colCount - 1 : afterCell.mergeEndCol
44457
44495
  }
44458
44496
  }, scene), row = afterCell.mergeStartRow), isValid$3(row) && (updateRow = isValid$3(updateRow) ? Math.min(updateRow, row) : row);
44459
44497
  }
@@ -46125,7 +46163,7 @@
46125
46163
  const addRows = deduplication$1(addCells.map(cell => cell.row)).sort((a, b) => a - b),
46126
46164
  updateRows = deduplication$1(updateCells.map(cell => cell.row)).sort((a, b) => a - b),
46127
46165
  isNotFillHeight = this.table.getAllRowsHeight() - [...addRows, ...updateRows].reduce((tolHeight, rowNumber) => tolHeight + this.table.getRowHeight(rowNumber), 0) <= this.table.tableNoFrameHeight;
46128
- if (updateRow(removeCells, addCells, updateCells, this.table, skipUpdateProxy), recalculateColWidths && this.recalculateColWidths(), "adaptive" === this.table.heightMode || this.table.autoFillHeight && (this.table.getAllRowsHeight() <= this.table.tableNoFrameHeight || isNotFillHeight)) this.table.scenegraph.recalculateRowHeights();else if (this.table.isAutoRowHeight()) for (let i = 0; i < updateRows.length; i++) {
46166
+ if (updateRow(removeCells, addCells, updateCells, this.table, skipUpdateProxy), recalculateColWidths && this.recalculateColWidths(), "adaptive" === this.table.heightMode || this.table.autoFillHeight && (this.table.getAllRowsHeight() <= this.table.tableNoFrameHeight || isNotFillHeight)) this.table.scenegraph.recalculateRowHeights();else if (this.table.isAutoRowHeight(this.table.columnHeaderLevelCount)) for (let i = 0; i < updateRows.length; i++) {
46129
46167
  const row = updateRows[i],
46130
46168
  oldHeight = this.table.getRowHeight(row),
46131
46169
  newHeight = computeRowHeight(row, 0, this.table.colCount - 1, this.table);
@@ -47512,7 +47550,7 @@
47512
47550
  let isSelectAll = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
47513
47551
  let makeSelectCellVisible = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : !0;
47514
47552
  let skipBodyMerge = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !1;
47515
- -1 !== row && -1 !== row && (this.select.selecting = !0), updateSelectPosition(this, col, row, isShift, isCtrl, isSelectAll, makeSelectCellVisible, skipBodyMerge);
47553
+ -1 !== row && -1 !== row && (this.select.selecting = !0), col < 0 && (col = -1), row < 0 && (row = -1), col > this.table.colCount - 1 && (col = this.table.colCount - 1), row > this.table.rowCount - 1 && (row = this.table.rowCount - 1), updateSelectPosition(this, col, row, isShift, isCtrl, isSelectAll, makeSelectCellVisible, skipBodyMerge);
47516
47554
  }
47517
47555
  checkCellRangeInSelect(cellPosStart, cellPosEnd) {
47518
47556
  return checkMultiCellInSelect(cellPosStart, cellPosEnd, this.select.ranges, this.select.highlightScope);
@@ -47677,13 +47715,13 @@
47677
47715
  });
47678
47716
  }
47679
47717
  updateVerticalScrollBar(yRatio) {
47680
- var _a, _b;
47718
+ var _a, _b, _c, _d;
47681
47719
  const totalHeight = this.table.getAllRowsHeight(),
47682
47720
  oldVerticalBarPos = this.scroll.verticalBarPos;
47683
47721
  let verticalBarPos = Math.ceil(yRatio * (totalHeight - this.table.scenegraph.height));
47684
47722
  isValid$3(verticalBarPos) && !isNaN(verticalBarPos) || (verticalBarPos = 0);
47685
47723
  const dy = verticalBarPos - this.table.scenegraph.proxy.deltaY - oldVerticalBarPos;
47686
- if (this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
47724
+ if (this.table.fireListeners(TABLE_EVENT_TYPE.CAN_SCROLL, {
47687
47725
  event: void 0,
47688
47726
  scrollTop: verticalBarPos - this.table.scenegraph.proxy.deltaY,
47689
47727
  scrollLeft: this.scroll.horizontalBarPos,
@@ -47697,16 +47735,27 @@
47697
47735
  }).some(value => !1 === value)) {
47698
47736
  const yRatio = this.scroll.verticalBarPos / (totalHeight - this.table.scenegraph.height);
47699
47737
  this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
47700
- } else this.scroll.verticalBarPos = verticalBarPos, this.table.scenegraph.setY(-this.scroll.verticalBarPos, 1 === yRatio), this.scroll.verticalBarPos -= this.table.scenegraph.proxy.deltaY, this.table.scenegraph.proxy.deltaY = 0, this.updateHoverPos(-1, -1), oldVerticalBarPos !== this.scroll.verticalBarPos && this.checkVerticalScrollBarEnd();
47738
+ } else this.scroll.verticalBarPos = verticalBarPos, this.table.scenegraph.setY(-this.scroll.verticalBarPos, 1 === yRatio), this.scroll.verticalBarPos -= this.table.scenegraph.proxy.deltaY, this.table.scenegraph.proxy.deltaY = 0, this.updateHoverPos(-1, -1), this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
47739
+ event: void 0,
47740
+ scrollTop: this.scroll.verticalBarPos,
47741
+ scrollLeft: this.scroll.horizontalBarPos,
47742
+ scrollHeight: null === (_c = this.table.theme.scrollStyle) || void 0 === _c ? void 0 : _c.width,
47743
+ scrollWidth: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
47744
+ viewHeight: this.table.tableNoFrameHeight,
47745
+ viewWidth: this.table.tableNoFrameWidth,
47746
+ scrollDirection: "vertical",
47747
+ scrollRatioY: yRatio,
47748
+ dy: dy
47749
+ }), oldVerticalBarPos !== this.scroll.verticalBarPos && this.checkVerticalScrollBarEnd();
47701
47750
  }
47702
47751
  updateHorizontalScrollBar(xRatio) {
47703
- var _a, _b;
47752
+ var _a, _b, _c, _d;
47704
47753
  const totalWidth = this.table.getAllColsWidth(),
47705
47754
  oldHorizontalBarPos = this.scroll.horizontalBarPos;
47706
47755
  let horizontalBarPos = Math.ceil(xRatio * (totalWidth - this.table.scenegraph.width));
47707
47756
  isValid$3(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
47708
47757
  const dx = horizontalBarPos - this.table.scenegraph.proxy.deltaX - oldHorizontalBarPos;
47709
- if (this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
47758
+ if (this.table.fireListeners(TABLE_EVENT_TYPE.CAN_SCROLL, {
47710
47759
  event: void 0,
47711
47760
  scrollTop: this.scroll.verticalBarPos,
47712
47761
  scrollLeft: horizontalBarPos - this.table.scenegraph.proxy.deltaX,
@@ -47720,11 +47769,22 @@
47720
47769
  }).some(value => !1 === value)) {
47721
47770
  const xRatio = this.scroll.horizontalBarPos / (totalWidth - this.table.scenegraph.width);
47722
47771
  this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
47723
- } else this.scroll.horizontalBarPos = horizontalBarPos, this.table.scenegraph.setX(-this.scroll.horizontalBarPos, 1 === xRatio), this.scroll.horizontalBarPos -= this.table.scenegraph.proxy.deltaX, this.table.scenegraph.proxy.deltaX = 0, this.updateHoverPos(-1, -1), oldHorizontalBarPos !== this.scroll.horizontalBarPos && this.checkHorizontalScrollBarEnd();
47772
+ } else this.scroll.horizontalBarPos = horizontalBarPos, this.table.scenegraph.setX(-this.scroll.horizontalBarPos, 1 === xRatio), this.scroll.horizontalBarPos -= this.table.scenegraph.proxy.deltaX, this.table.scenegraph.proxy.deltaX = 0, this.updateHoverPos(-1, -1), this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
47773
+ event: void 0,
47774
+ scrollTop: this.scroll.verticalBarPos,
47775
+ scrollLeft: this.scroll.horizontalBarPos,
47776
+ scrollHeight: null === (_c = this.table.theme.scrollStyle) || void 0 === _c ? void 0 : _c.width,
47777
+ scrollWidth: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
47778
+ viewHeight: this.table.tableNoFrameHeight,
47779
+ viewWidth: this.table.tableNoFrameWidth,
47780
+ scrollDirection: "horizontal",
47781
+ scrollRatioX: xRatio,
47782
+ dx: dx
47783
+ }), oldHorizontalBarPos !== this.scroll.horizontalBarPos && this.checkHorizontalScrollBarEnd();
47724
47784
  }
47725
47785
  setScrollTop(top, event) {
47726
47786
  let triggerEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
47727
- var _a, _b, _c, _d, _e;
47787
+ var _a, _b, _c, _d, _e, _f, _g;
47728
47788
  const totalHeight = this.table.getAllRowsHeight(),
47729
47789
  sizeTolerance = (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0;
47730
47790
  top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance)), top = Math.ceil(top);
@@ -47734,7 +47794,7 @@
47734
47794
  let verticalBarPos = top;
47735
47795
  isValid$3(verticalBarPos) && !isNaN(verticalBarPos) || (verticalBarPos = 0);
47736
47796
  const dy = verticalBarPos - oldVerticalBarPos;
47737
- if (this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
47797
+ if (this.table.fireListeners(TABLE_EVENT_TYPE.CAN_SCROLL, {
47738
47798
  event: null == event ? void 0 : event.nativeEvent,
47739
47799
  scrollTop: verticalBarPos,
47740
47800
  scrollLeft: this.scroll.horizontalBarPos,
@@ -47750,11 +47810,24 @@
47750
47810
  return void this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
47751
47811
  }
47752
47812
  }
47753
- (top !== this.scroll.verticalBarPos || this.table.isPivotChart()) && this.updateHoverPos(-1, -1), this.scroll.verticalBarPos = top, isValid$3(this.scroll.verticalBarPos) && !isNaN(this.scroll.verticalBarPos) || (this.scroll.verticalBarPos = 0), this.table.scenegraph.setY(-top), this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio), oldVerticalBarPos !== top && triggerEvent && this.checkVerticalScrollBarEnd();
47813
+ (top !== this.scroll.verticalBarPos || this.table.isPivotChart()) && this.updateHoverPos(-1, -1), this.scroll.verticalBarPos = top, isValid$3(this.scroll.verticalBarPos) && !isNaN(this.scroll.verticalBarPos) || (this.scroll.verticalBarPos = 0), this.table.scenegraph.setY(-top), this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
47814
+ const dy = this.scroll.verticalBarPos - oldVerticalBarPos;
47815
+ this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
47816
+ event: null == event ? void 0 : event.nativeEvent,
47817
+ scrollTop: this.scroll.verticalBarPos,
47818
+ scrollLeft: this.scroll.horizontalBarPos,
47819
+ scrollHeight: null === (_f = this.table.theme.scrollStyle) || void 0 === _f ? void 0 : _f.width,
47820
+ scrollWidth: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
47821
+ viewHeight: this.table.tableNoFrameHeight,
47822
+ viewWidth: this.table.tableNoFrameWidth,
47823
+ scrollDirection: "vertical",
47824
+ scrollRatioY: yRatio,
47825
+ dy: dy
47826
+ }), oldVerticalBarPos !== top && triggerEvent && this.checkVerticalScrollBarEnd();
47754
47827
  }
47755
47828
  setScrollLeft(left, event) {
47756
47829
  let triggerEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
47757
- var _a, _b, _c, _d, _e;
47830
+ var _a, _b, _c, _d, _e, _f, _g;
47758
47831
  this.table.scrollLeft;
47759
47832
  const totalWidth = this.table.getAllColsWidth(),
47760
47833
  sizeTolerance = (this.table.getFrozenColsWidth(), (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0);
@@ -47765,7 +47838,7 @@
47765
47838
  let horizontalBarPos = left;
47766
47839
  isValid$3(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
47767
47840
  const dx = horizontalBarPos - oldHorizontalBarPos;
47768
- if (this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
47841
+ if (this.table.fireListeners(TABLE_EVENT_TYPE.CAN_SCROLL, {
47769
47842
  event: null == event ? void 0 : event.nativeEvent,
47770
47843
  scrollTop: this.scroll.verticalBarPos,
47771
47844
  scrollLeft: horizontalBarPos,
@@ -47781,7 +47854,20 @@
47781
47854
  return void this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
47782
47855
  }
47783
47856
  }
47784
- left !== this.scroll.horizontalBarPos && this.updateHoverPos(-1, -1), this.scroll.horizontalBarPos = left, isValid$3(this.scroll.horizontalBarPos) && !isNaN(this.scroll.horizontalBarPos) || (this.scroll.horizontalBarPos = 0), this.table.scenegraph.setX(-left), this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio), oldHorizontalBarPos !== left && triggerEvent && this.checkHorizontalScrollBarEnd();
47857
+ left !== this.scroll.horizontalBarPos && this.updateHoverPos(-1, -1), this.scroll.horizontalBarPos = left, isValid$3(this.scroll.horizontalBarPos) && !isNaN(this.scroll.horizontalBarPos) || (this.scroll.horizontalBarPos = 0), this.table.scenegraph.setX(-left), this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
47858
+ const dx = this.scroll.horizontalBarPos - oldHorizontalBarPos;
47859
+ this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
47860
+ event: null == event ? void 0 : event.nativeEvent,
47861
+ scrollTop: this.scroll.verticalBarPos,
47862
+ scrollLeft: this.scroll.horizontalBarPos,
47863
+ scrollHeight: null === (_f = this.table.theme.scrollStyle) || void 0 === _f ? void 0 : _f.width,
47864
+ scrollWidth: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
47865
+ viewHeight: this.table.tableNoFrameHeight,
47866
+ viewWidth: this.table.tableNoFrameWidth,
47867
+ scrollDirection: "horizontal",
47868
+ scrollRatioX: xRatio,
47869
+ dx: dx
47870
+ }), oldHorizontalBarPos !== left && triggerEvent && this.checkHorizontalScrollBarEnd();
47785
47871
  }
47786
47872
  hideVerticalScrollBar() {
47787
47873
  this.table.scenegraph.component.hideVerticalScrollBar();
@@ -52273,7 +52359,7 @@
52273
52359
  constructor(container) {
52274
52360
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52275
52361
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
52276
- if (super(), this.showFrozenIcon = !0, this.version = "1.17.3-alpha.12", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
52362
+ if (super(), this.showFrozenIcon = !0, this.version = "1.17.3-alpha.13", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
52277
52363
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
52278
52364
  const {
52279
52365
  frozenColCount = 0,
@@ -52752,7 +52838,7 @@
52752
52838
  return this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
52753
52839
  }
52754
52840
  isAutoRowHeight(row) {
52755
- return "autoHeight" === this.heightMode || !!this.options.customComputeRowHeight || row >= 0 && row < this.columnHeaderLevelCount && "auto" === this.getDefaultRowHeight(row);
52841
+ return "autoHeight" === this.heightMode || !!this.options.customComputeRowHeight || (row >= 0 && row < this.columnHeaderLevelCount ? "auto" === this.getDefaultRowHeight(row) : "auto" === this.internalProps.defaultRowHeight);
52756
52842
  }
52757
52843
  getColWidth(col) {
52758
52844
  var _a;
@@ -53402,7 +53488,18 @@
53402
53488
  var _a;
53403
53489
  if (this.internalProps.customMergeCell) {
53404
53490
  const customMerge = this.internalProps.customMergeCell(col, row, this);
53405
- if (customMerge && customMerge.range && (isValid$3(customMerge.text) || customMerge.customLayout || customMerge.customRender)) return customMerge.range;
53491
+ if (customMerge && customMerge.range && (isValid$3(customMerge.text) || customMerge.customLayout || customMerge.customRender)) {
53492
+ return {
53493
+ start: {
53494
+ col: Math.max(customMerge.range.start.col, 0),
53495
+ row: Math.max(customMerge.range.start.row, 0)
53496
+ },
53497
+ end: {
53498
+ col: Math.min(customMerge.range.end.col, this.colCount - 1),
53499
+ row: Math.min(customMerge.range.end.row, this.rowCount - 1)
53500
+ }
53501
+ };
53502
+ }
53406
53503
  }
53407
53504
  return null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.getCellRange(col, row);
53408
53505
  }
@@ -56529,7 +56626,7 @@
56529
56626
  newWidth = computeColWidth(col, 0, table.rowCount - 1, table, !1);
56530
56627
  newWidth !== oldWidth && table.scenegraph.updateColWidth(col, newWidth - oldWidth);
56531
56628
  }
56532
- if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) 0 === table.internalProps._heightResizedRowMap.size && table.scenegraph.recalculateRowHeights();else if (table.isAutoRowHeight() && !table.internalProps._heightResizedRowMap.has(row)) {
56629
+ if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) 0 === table.internalProps._heightResizedRowMap.size && table.scenegraph.recalculateRowHeights();else if (table.isAutoRowHeight(row) && !table.internalProps._heightResizedRowMap.has(row)) {
56533
56630
  const oldHeight = table.getRowHeight(row),
56534
56631
  newHeight = computeRowHeight(row, 0, table.colCount - 1, table);
56535
56632
  table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
@@ -56619,7 +56716,7 @@
56619
56716
  newWidth = computeColWidth(sCol, 0, table.rowCount - 1, table, !1);
56620
56717
  newWidth !== oldWidth && table.scenegraph.updateColWidth(sCol, newWidth - oldWidth);
56621
56718
  }
56622
- if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) table.scenegraph.recalculateRowHeights();else if (table.isAutoRowHeight()) {
56719
+ if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) table.scenegraph.recalculateRowHeights();else if (table.isAutoRowHeight(startRow)) {
56623
56720
  const rows = [],
56624
56721
  deltaYs = [];
56625
56722
  for (let sRow = startRow; sRow <= range.end.row; sRow++) if (table.rowHeightsMap.get(sRow)) {
@@ -60906,7 +61003,7 @@
60906
61003
  lineClamp: lineClamp
60907
61004
  } = cellStyle,
60908
61005
  autoColWidth = "auto" === colWidth,
60909
- autoRowHeight = table.isAutoRowHeight(),
61006
+ autoRowHeight = table.isAutoRowHeight(row),
60910
61007
  attribute = {
60911
61008
  maxLineWidth: autoColWidth ? 1 / 0 : cellWidth - (padding[1] + padding[3] + hierarchyOffset) - size - spaceBetweenTextAndIcon,
60912
61009
  textAlign: "left",
@@ -61447,13 +61544,20 @@
61447
61544
  iconSize = Math.floor(Math.min(width - padding[1] - padding[3], height - padding[2] - padding[0]) / 2),
61448
61545
  anchorX = 0 + (width > image.attribute.width ? image.attribute.x - 0 + image.attribute.width / 2 : width / 2),
61449
61546
  anchorY = 0 + (height > image.attribute.height ? image.attribute.y - 0 + image.attribute.height / 2 : height / 2),
61547
+ imageGraphic = cellGroup.getChildByName("image", !0),
61548
+ {
61549
+ dx: dx,
61550
+ dy: dy
61551
+ } = imageGraphic.attribute,
61450
61552
  playIcon = new Icon$1({
61451
61553
  x: anchorX - iconSize / 2,
61452
61554
  y: anchorY - iconSize / 2,
61453
61555
  width: iconSize,
61454
61556
  height: iconSize,
61455
61557
  image: regedIcons.play.svg,
61456
- cursor: regedIcons.play.cursor
61558
+ cursor: regedIcons.play.cursor,
61559
+ dx: dx,
61560
+ dy: dy
61457
61561
  });
61458
61562
  playIcon.name = "play-icon", cellGroup.appendChild(playIcon), table.scenegraph.updateNextFrame();
61459
61563
  }), video.onerror = () => {
@@ -65287,7 +65391,7 @@
65287
65391
  themes: themes$1
65288
65392
  });
65289
65393
 
65290
- const version = "1.17.3-alpha.12";
65394
+ const version = "1.17.3-alpha.13";
65291
65395
 
65292
65396
  exports.Gantt = Gantt;
65293
65397
  exports.TYPES = index$3;