@visactor/vtable 1.10.6-alpha.0 → 1.10.6-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/cjs/ListTable.d.ts +0 -1
  2. package/cjs/ListTable.js +0 -3
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/core/BaseTable.js +1 -2
  5. package/cjs/core/BaseTable.js.map +1 -1
  6. package/cjs/core/animation.js +2 -3
  7. package/cjs/core/animation.js.map +1 -1
  8. package/cjs/data/DataSource.js +1 -1
  9. package/cjs/data/DataSource.js.map +1 -1
  10. package/cjs/icons.js +0 -18
  11. package/cjs/icons.js.map +1 -1
  12. package/cjs/index.d.ts +1 -4
  13. package/cjs/index.js +2 -3
  14. package/cjs/index.js.map +1 -1
  15. package/cjs/plugins/chartModules.js +1 -1
  16. package/cjs/plugins/custom-cell-style.js +15 -22
  17. package/cjs/plugins/custom-cell-style.js.map +1 -1
  18. package/cjs/scenegraph/component/custom.d.ts +1 -2
  19. package/cjs/scenegraph/component/custom.js +7 -13
  20. package/cjs/scenegraph/component/custom.js.map +1 -1
  21. package/cjs/scenegraph/graphic/contributions/draw-interceptor.js +2 -4
  22. package/cjs/scenegraph/graphic/contributions/draw-interceptor.js.map +1 -1
  23. package/cjs/scenegraph/graphic/contributions/image-contribution-render.d.ts +0 -18
  24. package/cjs/scenegraph/graphic/contributions/image-contribution-render.js +1 -30
  25. package/cjs/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
  26. package/cjs/scenegraph/graphic/contributions/index.js +0 -4
  27. package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
  28. package/cjs/scenegraph/graphic/group.js +1 -2
  29. package/cjs/scenegraph/graphic/group.js.map +1 -1
  30. package/cjs/scenegraph/graphic/icon.d.ts +1 -18
  31. package/cjs/scenegraph/graphic/icon.js +2 -43
  32. package/cjs/scenegraph/graphic/icon.js.map +1 -1
  33. package/cjs/scenegraph/group-creater/cell-helper.js +4 -5
  34. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  35. package/cjs/scenegraph/layout/compute-row-height.js +7 -7
  36. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  37. package/cjs/scenegraph/layout/update-height.js +2 -2
  38. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  39. package/cjs/scenegraph/scenegraph.d.ts +0 -1
  40. package/cjs/scenegraph/scenegraph.js +3 -33
  41. package/cjs/scenegraph/scenegraph.js.map +1 -1
  42. package/cjs/scenegraph/utils/text-icon-layout.d.ts +1 -1
  43. package/cjs/scenegraph/utils/text-icon-layout.js +12 -14
  44. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  45. package/cjs/tools/icons.js +1 -1
  46. package/cjs/tools/icons.js.map +1 -1
  47. package/cjs/ts-types/base-table.d.ts +2 -6
  48. package/cjs/ts-types/base-table.js.map +1 -1
  49. package/cjs/ts-types/icon.d.ts +1 -3
  50. package/cjs/ts-types/icon.js +1 -2
  51. package/cjs/ts-types/icon.js.map +1 -1
  52. package/cjs/ts-types/table-engine.d.ts +1 -2
  53. package/cjs/ts-types/table-engine.js +1 -2
  54. package/cjs/ts-types/table-engine.js.map +1 -1
  55. package/cjs/vrender.js.map +1 -1
  56. package/dist/vtable.js +212 -1625
  57. package/dist/vtable.min.js +2 -2
  58. package/es/ListTable.d.ts +0 -1
  59. package/es/ListTable.js +0 -3
  60. package/es/ListTable.js.map +1 -1
  61. package/es/core/BaseTable.js +1 -2
  62. package/es/core/BaseTable.js.map +1 -1
  63. package/es/core/animation.js +2 -3
  64. package/es/core/animation.js.map +1 -1
  65. package/es/data/DataSource.js +1 -1
  66. package/es/data/DataSource.js.map +1 -1
  67. package/es/icons.js +0 -18
  68. package/es/icons.js.map +1 -1
  69. package/es/index.d.ts +1 -4
  70. package/es/index.js +1 -7
  71. package/es/index.js.map +1 -1
  72. package/es/plugins/chartModules.js +1 -1
  73. package/es/plugins/custom-cell-style.js +15 -22
  74. package/es/plugins/custom-cell-style.js.map +1 -1
  75. package/es/scenegraph/component/custom.d.ts +1 -2
  76. package/es/scenegraph/component/custom.js +7 -13
  77. package/es/scenegraph/component/custom.js.map +1 -1
  78. package/es/scenegraph/graphic/contributions/draw-interceptor.js +2 -4
  79. package/es/scenegraph/graphic/contributions/draw-interceptor.js.map +1 -1
  80. package/es/scenegraph/graphic/contributions/image-contribution-render.d.ts +0 -18
  81. package/es/scenegraph/graphic/contributions/image-contribution-render.js +0 -29
  82. package/es/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
  83. package/es/scenegraph/graphic/contributions/index.js +2 -4
  84. package/es/scenegraph/graphic/contributions/index.js.map +1 -1
  85. package/es/scenegraph/graphic/group.js +1 -2
  86. package/es/scenegraph/graphic/group.js.map +1 -1
  87. package/es/scenegraph/graphic/icon.d.ts +1 -18
  88. package/es/scenegraph/graphic/icon.js +2 -45
  89. package/es/scenegraph/graphic/icon.js.map +1 -1
  90. package/es/scenegraph/group-creater/cell-helper.js +3 -6
  91. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  92. package/es/scenegraph/layout/compute-row-height.js +7 -7
  93. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  94. package/es/scenegraph/layout/update-height.js +2 -2
  95. package/es/scenegraph/layout/update-height.js.map +1 -1
  96. package/es/scenegraph/scenegraph.d.ts +0 -1
  97. package/es/scenegraph/scenegraph.js +1 -14
  98. package/es/scenegraph/scenegraph.js.map +1 -1
  99. package/es/scenegraph/utils/text-icon-layout.d.ts +1 -1
  100. package/es/scenegraph/utils/text-icon-layout.js +12 -14
  101. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  102. package/es/tools/icons.js +1 -1
  103. package/es/tools/icons.js.map +1 -1
  104. package/es/ts-types/base-table.d.ts +2 -6
  105. package/es/ts-types/base-table.js.map +1 -1
  106. package/es/ts-types/icon.d.ts +1 -3
  107. package/es/ts-types/icon.js +1 -2
  108. package/es/ts-types/icon.js.map +1 -1
  109. package/es/ts-types/table-engine.d.ts +1 -2
  110. package/es/ts-types/table-engine.js +1 -2
  111. package/es/ts-types/table-engine.js.map +1 -1
  112. package/es/vrender.js.map +1 -1
  113. package/package.json +8 -9
  114. package/cjs/plugins/carousel-animation.d.ts +0 -29
  115. package/cjs/plugins/carousel-animation.js +0 -60
  116. package/cjs/plugins/carousel-animation.js.map +0 -1
  117. package/cjs/plugins/header-highlight.d.ts +0 -21
  118. package/cjs/plugins/header-highlight.js +0 -106
  119. package/cjs/plugins/header-highlight.js.map +0 -1
  120. package/cjs/plugins/invert-highlight.d.ts +0 -19
  121. package/cjs/plugins/invert-highlight.js +0 -72
  122. package/cjs/plugins/invert-highlight.js.map +0 -1
  123. package/cjs/tools/cell-range.d.ts +0 -2
  124. package/cjs/tools/cell-range.js +0 -10
  125. package/cjs/tools/cell-range.js.map +0 -1
  126. package/es/plugins/carousel-animation.d.ts +0 -29
  127. package/es/plugins/carousel-animation.js +0 -52
  128. package/es/plugins/carousel-animation.js.map +0 -1
  129. package/es/plugins/header-highlight.d.ts +0 -21
  130. package/es/plugins/header-highlight.js +0 -98
  131. package/es/plugins/header-highlight.js.map +0 -1
  132. package/es/plugins/invert-highlight.d.ts +0 -19
  133. package/es/plugins/invert-highlight.js +0 -69
  134. package/es/plugins/invert-highlight.js.map +0 -1
  135. package/es/tools/cell-range.d.ts +0 -2
  136. package/es/tools/cell-range.js +0 -4
  137. package/es/tools/cell-range.js.map +0 -1
package/dist/vtable.js CHANGED
@@ -3050,12 +3050,11 @@
3050
3050
  for (let i = 0, len = paths.length; i < len; i++) if (currPath = paths[i], coordsStr = currPath.slice(1), commandChar = currPath[0], currCommandData = [commandChar], coordsStrArr = coordsStr.match(rePathCommand), null !== coordsStrArr) {
3051
3051
  for (let i = 0, len = coordsStrArr.length; i < len; i++) coordStr = coordsStrArr[i], coordNumber = parseFloat(coordStr), Number.isNaN(coordNumber) || currCommandData.push(coordNumber);
3052
3052
  if (standardCommandLen = commandLengths[commandChar], currCommandData.length - 1 > standardCommandLen) {
3053
- let subCommand,
3054
- bestCommandChar = commandChar;
3053
+ let subCommand;
3055
3054
  for (let i = 1, len = currCommandData.length; i < len; i += standardCommandLen) {
3056
- subCommand = [bestCommandChar];
3055
+ subCommand = [commandChar];
3057
3056
  for (let j = i, subLen = i + standardCommandLen; j < subLen; j++) subCommand.push(currCommandData[j]);
3058
- result.push(subCommand), "m" === bestCommandChar ? bestCommandChar = "l" : "M" === bestCommandChar && (bestCommandChar = "L");
3057
+ result.push(subCommand);
3059
3058
  }
3060
3059
  } else result.push(currCommandData);
3061
3060
  } else result.push(currCommandData);
@@ -4266,7 +4265,6 @@
4266
4265
  zIndex: 0,
4267
4266
  layout: null,
4268
4267
  boundsPadding: 0,
4269
- fillStrokeOrder: 0,
4270
4268
  renderStyle: "default",
4271
4269
  pickMode: "accurate",
4272
4270
  customPickShape: null,
@@ -4337,7 +4335,6 @@
4337
4335
  });
4338
4336
  const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
4339
4337
  path: new CustomPath2D(),
4340
- fillStrokeOrder: 1,
4341
4338
  customPath: () => {
4342
4339
  Logger.getInstance().warn("空函数");
4343
4340
  }
@@ -4650,14 +4647,6 @@
4650
4647
  return data;
4651
4648
  }
4652
4649
  _clipTextEnd(text, options, width, leftIdx, rightIdx) {
4653
- if (leftIdx === rightIdx) {
4654
- Logger.getInstance().warn(`【_clipTextEnd】不应该走到这里${text}, ${leftIdx}, ${rightIdx}`);
4655
- const subText = text.substring(0, rightIdx + 1);
4656
- return {
4657
- str: subText,
4658
- width: this.measureTextWidth(subText, options)
4659
- };
4660
- }
4661
4650
  const middleIdx = Math.floor((leftIdx + rightIdx) / 2),
4662
4651
  subText = text.substring(0, middleIdx + 1),
4663
4652
  strWidth = this.measureTextWidth(subText, options);
@@ -4691,7 +4680,7 @@
4691
4680
  }
4692
4681
  _clipTextStart(text, options, width, leftIdx, rightIdx) {
4693
4682
  const middleIdx = Math.ceil((leftIdx + rightIdx) / 2),
4694
- subText = text.substring(middleIdx - 1, text.length),
4683
+ subText = text.substring(middleIdx - 1, text.length - 1),
4695
4684
  strWidth = this.measureTextWidth(subText, options);
4696
4685
  let length;
4697
4686
  if (strWidth > width) {
@@ -4699,18 +4688,18 @@
4699
4688
  str: "",
4700
4689
  width: 0
4701
4690
  };
4702
- const str = text.substring(middleIdx, text.length);
4691
+ const str = text.substring(middleIdx, text.length - 1);
4703
4692
  return length = this.measureTextWidth(str, options), length <= width ? {
4704
4693
  str: str,
4705
4694
  width: length
4706
- } : this._clipTextStart(text, options, width, middleIdx, text.length);
4695
+ } : this._clipTextStart(text, options, width, middleIdx, text.length - 1);
4707
4696
  }
4708
4697
  if (strWidth < width) {
4709
4698
  if (middleIdx <= 0) return {
4710
4699
  str: text,
4711
4700
  width: this.measureTextWidth(text, options)
4712
4701
  };
4713
- const str = text.substring(middleIdx - 2, text.length);
4702
+ const str = text.substring(middleIdx - 2, text.length - 1);
4714
4703
  return length = this.measureTextWidth(str, options), length >= width ? {
4715
4704
  str: subText,
4716
4705
  width: strWidth
@@ -5019,7 +5008,7 @@
5019
5008
  }
5020
5009
  hasSubView() {
5021
5010
  const viewBox = this._handler.getViewBox();
5022
- return !(0 === viewBox.x1 && 0 === viewBox.y1 && isNumberClose(this.width, viewBox.width()) && isNumberClose(this.height, viewBox.height()));
5011
+ return !(0 === viewBox.x1 && 0 === viewBox.y1 && this.width === viewBox.width() && this.height === viewBox.height());
5023
5012
  }
5024
5013
  isVisible(bbox) {
5025
5014
  return this._handler.isVisible(bbox);
@@ -5943,7 +5932,7 @@
5943
5932
  timeStamp: now
5944
5933
  });
5945
5934
  const clickHistory = trackingData.clicksByButton[from.button];
5946
- clickHistory.target === clickEvent.target && now - clickHistory.timeStamp < (null !== (_a = this._config.clickInterval) && void 0 !== _a ? _a : 200) ? ++clickHistory.clickCount : clickHistory.clickCount = 1, clickHistory.target = clickEvent.target, clickHistory.timeStamp = now, clickEvent.detail = clickHistory.clickCount, isMouseLike(clickEvent.pointerType) ? (this.dispatchEvent(clickEvent, "click"), 2 === clickHistory.clickCount && this.dispatchEvent(clickEvent, "dblclick")) : "touch" === clickEvent.pointerType && this._config.supportsTouchEvents && (this.dispatchEvent(clickEvent, "tap"), 2 === clickHistory.clickCount && this.dispatchEvent(clickEvent, "dbltap")), this.dispatchEvent(clickEvent, "pointertap"), this.freeEvent(clickEvent);
5935
+ clickHistory.target === clickEvent.target && now - clickHistory.timeStamp < (null !== (_a = this._config.clickInterval) && void 0 !== _a ? _a : 200) ? ++clickHistory.clickCount : clickHistory.clickCount = 1, clickHistory.target = clickEvent.target, clickHistory.timeStamp = now, clickEvent.detail = clickHistory.clickCount, isMouseLike(clickEvent.pointerType) ? (this.dispatchEvent(clickEvent, "click"), 2 === clickHistory.clickCount && this.dispatchEvent(clickEvent, "dblclick")) : "touch" === clickEvent.pointerType && (this.dispatchEvent(clickEvent, "tap"), 2 === clickHistory.clickCount && this.dispatchEvent(clickEvent, "dbltap")), this.dispatchEvent(clickEvent, "pointertap"), this.freeEvent(clickEvent);
5947
5936
  }
5948
5937
  this.freeEvent(e);
5949
5938
  }, this.onPointerUpOutside = (from, target) => {
@@ -6160,8 +6149,7 @@
6160
6149
  supportsPointerEvents = global.supportsPointerEvents
6161
6150
  } = params;
6162
6151
  this.manager = new EventManager$1(rootNode, {
6163
- clickInterval: clickInterval,
6164
- supportsTouchEvents: supportsTouchEvents
6152
+ clickInterval: clickInterval
6165
6153
  }), this.globalObj = global, this.supportsPointerEvents = supportsPointerEvents, this.supportsTouchEvents = supportsTouchEvents, this.supportsMouseEvents = global.supportsMouseEvents, this.applyStyles = global.applyStyles, this.autoPreventDefault = autoPreventDefault, this.eventsAdded = !1, this.rootPointerEvent = new FederatedPointerEvent(), this.rootWheelEvent = new FederatedWheelEvent(), this.cursorStyles = {
6166
6154
  default: "inherit",
6167
6155
  pointer: "pointer"
@@ -7253,7 +7241,7 @@
7253
7241
  }
7254
7242
  static GetFile(url, type) {
7255
7243
  let data = ResourceLoader.cache.get(url);
7256
- return data ? "fail" === data.loadState ? Promise.reject() : "init" === data.loadState || "loading" === data.loadState ? data.dataPromise.then(data => data.data) : Promise.resolve(data.data) : (data = {
7244
+ return data ? "init" === data.loadState || "fail" === data.loadState ? Promise.reject() : "loading" === data.loadState ? data.dataPromise.then(data => data.data) : Promise.resolve(data.data) : (data = {
7257
7245
  type: type,
7258
7246
  loadState: "init"
7259
7247
  }, ResourceLoader.cache.set(url, data), "arrayBuffer" === type ? data.dataPromise = application.global.loadArrayBuffer(url) : "blob" === type ? data.dataPromise = application.global.loadBlob(url) : "json" === type && (data.dataPromise = application.global.loadJson(url)), data.dataPromise.then(data => data.data));
@@ -9511,7 +9499,7 @@
9511
9499
  }
9512
9500
  }
9513
9501
 
9514
- const parse$4 = function () {
9502
+ const parse$3 = function () {
9515
9503
  const tokens = {
9516
9504
  linearGradient: /^(linear\-gradient)/i,
9517
9505
  radialGradient: /^(radial\-gradient)/i,
@@ -9664,7 +9652,7 @@
9664
9652
  }
9665
9653
  static Parse(c) {
9666
9654
  if (GradientParser.IsGradientStr(c)) try {
9667
- const datum = parse$4(c)[0];
9655
+ const datum = parse$3(c)[0];
9668
9656
  if (datum) {
9669
9657
  if ("linear" === datum.type) return GradientParser.ParseLinear(datum);
9670
9658
  if ("radial" === datum.type) return GradientParser.ParseRadial(datum);
@@ -10347,9 +10335,8 @@
10347
10335
  constructor() {
10348
10336
  super(...arguments), this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
10349
10337
  }
10350
- drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
10351
- if (!(image.isGifImage && image.renderFrame && image.playing)) return super.drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
10352
- image.renderFrame(context, x, y);
10338
+ drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
10339
+ return super.drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
10353
10340
  }
10354
10341
  }
10355
10342
  const defaultImageRenderContribution = new DefaultImageRenderContribution();
@@ -10502,8 +10489,7 @@
10502
10489
  fill = arcAttribute.fill,
10503
10490
  stroke = arcAttribute.stroke,
10504
10491
  x: originX = arcAttribute.x,
10505
- y: originY = arcAttribute.y,
10506
- fillStrokeOrder = arcAttribute.fillStrokeOrder
10492
+ y: originY = arcAttribute.y
10507
10493
  } = arc.attribute,
10508
10494
  data = this.valid(arc, arcAttribute, fillCb, strokeCb);
10509
10495
  if (!data) return;
@@ -10539,17 +10525,7 @@
10539
10525
  isFullStroke: isFullStroke,
10540
10526
  stroke: arrayStroke
10541
10527
  } = parseStroke(stroke);
10542
- if (doFill || isFullStroke) {
10543
- context.beginPath(), drawArcPath(arc, context, x, y, outerRadius, innerRadius), beforeRenderContribitionsRuned = !0, context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute), this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb);
10544
- const _runFill = () => {
10545
- doFill && (fillCb ? fillCb(context, arc.attribute, arcAttribute) : fVisible && (context.setCommonStyle(arc, arc.attribute, originX - x, originY - y, arcAttribute), context.fill()));
10546
- },
10547
- _runStroke = () => {
10548
- doStroke && isFullStroke && (strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, originX - x, originY - y, arcAttribute), context.stroke()));
10549
- };
10550
- fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke());
10551
- }
10552
- if (!isFullStroke && doStroke) {
10528
+ if ((doFill || isFullStroke) && (context.beginPath(), drawArcPath(arc, context, x, y, outerRadius, innerRadius), beforeRenderContribitionsRuned = !0, context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute), this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb), doFill && (fillCb ? fillCb(context, arc.attribute, arcAttribute) : fVisible && (context.setCommonStyle(arc, arc.attribute, originX - x, originY - y, arcAttribute), context.fill())), doStroke && isFullStroke && (strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, originX - x, originY - y, arcAttribute), context.stroke()))), !isFullStroke && doStroke) {
10553
10529
  context.beginPath();
10554
10530
  drawArcPath(arc, context, x, y, outerRadius, innerRadius, arrayStroke);
10555
10531
  beforeRenderContribitionsRuned || this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb), strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke());
@@ -10567,20 +10543,14 @@
10567
10543
  fill = arcAttribute.fill
10568
10544
  } = arc.attribute,
10569
10545
  startAngle = endAngle;
10570
- this.drawArcTailCapPath(arc, context, x, y, outerRadius, innerRadius, startAngle, startAngle + capAngle), beforeRenderContribitionsRuned || this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb);
10571
- const _runFill = () => {
10572
- if (doFill) {
10573
- const color = fill;
10574
- if ("conical" === color.gradient) {
10575
- const lastColor = getConicGradientAt(0, 0, endAngle, color);
10576
- fillCb || fillVisible && (context.setCommonStyle(arc, arc.attribute, x, y, arcAttribute), context.fillStyle = lastColor, context.fill());
10577
- }
10578
- }
10579
- },
10580
- _runStroke = () => {
10581
- doStroke && (strokeCb || sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke()));
10582
- };
10583
- _runFill(), _runStroke();
10546
+ if (this.drawArcTailCapPath(arc, context, x, y, outerRadius, innerRadius, startAngle, startAngle + capAngle), beforeRenderContribitionsRuned || this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb), doFill) {
10547
+ const color = fill;
10548
+ if ("conical" === color.gradient) {
10549
+ const lastColor = getConicGradientAt(0, 0, endAngle, color);
10550
+ fillCb || fillVisible && (context.setCommonStyle(arc, arc.attribute, x, y, arcAttribute), context.fillStyle = lastColor, context.fill());
10551
+ }
10552
+ }
10553
+ doStroke && (strokeCb || sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke()));
10584
10554
  }
10585
10555
  }
10586
10556
  this.afterRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb), tempChangeConicalColor && (fill.startAngle += conicalOffset, fill.endAngle += conicalOffset);
@@ -10618,8 +10588,7 @@
10618
10588
  startAngle = circleAttribute.startAngle,
10619
10589
  endAngle = circleAttribute.endAngle,
10620
10590
  x: originX = circleAttribute.x,
10621
- y: originY = circleAttribute.y,
10622
- fillStrokeOrder = circleAttribute.fillStrokeOrder
10591
+ y: originY = circleAttribute.y
10623
10592
  } = circle.attribute,
10624
10593
  data = this.valid(circle, circleAttribute, fillCb, strokeCb);
10625
10594
  if (!data) return;
@@ -10629,14 +10598,7 @@
10629
10598
  doFill: doFill,
10630
10599
  doStroke: doStroke
10631
10600
  } = data;
10632
- context.beginPath(), context.arc(x, y, radius, startAngle, endAngle), context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(circle, circle.attribute, circleAttribute), this.beforeRenderStep(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
10633
- const _runFill = () => {
10634
- doFill && (fillCb ? fillCb(context, circle.attribute, circleAttribute) : fVisible && (context.setCommonStyle(circle, circle.attribute, originX - x, originY - y, circleAttribute), context.fill()));
10635
- },
10636
- _runStroke = () => {
10637
- doStroke && (strokeCb ? strokeCb(context, circle.attribute, circleAttribute) : sVisible && (context.setStrokeStyle(circle, circle.attribute, originX - x, originY - y, circleAttribute), context.stroke()));
10638
- };
10639
- fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
10601
+ context.beginPath(), context.arc(x, y, radius, startAngle, endAngle), context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(circle, circle.attribute, circleAttribute), this.beforeRenderStep(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb), doFill && (fillCb ? fillCb(context, circle.attribute, circleAttribute) : fVisible && (context.setCommonStyle(circle, circle.attribute, originX - x, originY - y, circleAttribute), context.fill())), doStroke && (strokeCb ? strokeCb(context, circle.attribute, circleAttribute) : sVisible && (context.setStrokeStyle(circle, circle.attribute, originX - x, originY - y, circleAttribute), context.stroke())), this.afterRenderStep(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
10640
10602
  }
10641
10603
  draw(circle, renderService, drawContext, params) {
10642
10604
  const circleAttribute = getTheme(circle, null == params ? void 0 : params.theme).circle;
@@ -11077,7 +11039,7 @@
11077
11039
  super(), this.areaRenderContribitions = areaRenderContribitions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(areaRenderContribitions);
11078
11040
  }
11079
11041
  drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
11080
- var _a, _b, _c;
11042
+ var _a, _b, _c, _d, _e;
11081
11043
  const {
11082
11044
  points: points
11083
11045
  } = area.attribute;
@@ -11101,31 +11063,28 @@
11101
11063
  x: originX = 0,
11102
11064
  x: originY = 0
11103
11065
  } = area.attribute;
11104
- !1 !== fill && (fillCb ? fillCb(context, area.attribute, areaAttribute) : fillOpacity && (context.setCommonStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.fill())), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, areaAttribute, drawContext, fillCb, null, {
11066
+ if (!1 !== fill && (fillCb ? fillCb(context, area.attribute, areaAttribute) : fillOpacity && (context.setCommonStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.fill())), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, areaAttribute, drawContext, fillCb, null, {
11105
11067
  attribute: area.attribute
11106
- }), (() => {
11107
- var _a, _b;
11108
- if (stroke) {
11109
- const {
11110
- stroke = areaAttribute && areaAttribute.stroke
11111
- } = area.attribute;
11112
- if (isArray$1(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1]) if (context.beginPath(), stroke[0]) {
11113
- context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
11114
- for (let i = 1; i < points.length; i++) {
11115
- const p = points[i];
11116
- context.lineTo(p.x + offsetX, p.y + offsetY, z);
11117
- }
11118
- } else if (stroke[2]) {
11119
- const endP = points[points.length - 1];
11120
- context.moveTo(endP.x + offsetX, endP.y + offsetY, z);
11121
- for (let i = points.length - 2; i >= 0; i--) {
11122
- const p = points[i];
11123
- context.lineTo((null !== (_a = p.x1) && void 0 !== _a ? _a : p.x) + offsetX, (null !== (_b = p.y1) && void 0 !== _b ? _b : p.y) + offsetY, z);
11124
- }
11068
+ }), stroke) {
11069
+ const {
11070
+ stroke = areaAttribute && areaAttribute.stroke
11071
+ } = area.attribute;
11072
+ if (isArray$1(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1]) if (context.beginPath(), stroke[0]) {
11073
+ context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
11074
+ for (let i = 1; i < points.length; i++) {
11075
+ const p = points[i];
11076
+ context.lineTo(p.x + offsetX, p.y + offsetY, z);
11077
+ }
11078
+ } else if (stroke[2]) {
11079
+ const endP = points[points.length - 1];
11080
+ context.moveTo(endP.x + offsetX, endP.y + offsetY, z);
11081
+ for (let i = points.length - 2; i >= 0; i--) {
11082
+ const p = points[i];
11083
+ context.lineTo((null !== (_d = p.x1) && void 0 !== _d ? _d : p.x) + offsetX, (null !== (_e = p.y1) && void 0 !== _e ? _e : p.y) + offsetY, z);
11125
11084
  }
11126
- strokeCb ? strokeCb(context, area.attribute, areaAttribute) : (context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke());
11127
11085
  }
11128
- })();
11086
+ strokeCb ? strokeCb(context, area.attribute, areaAttribute) : (context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke());
11087
+ }
11129
11088
  }
11130
11089
  drawShape(area, context, x, y, drawContext, params, fillCb, strokeCb) {
11131
11090
  var _a, _b, _c, _d, _e, _f;
@@ -11290,24 +11249,23 @@
11290
11249
  x: originX = 0,
11291
11250
  x: originY = 0
11292
11251
  } = attribute;
11293
- return !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(area, connect ? connectedStyle : attribute, originX - offsetX, originY - offsetY, connect ? da : defaultAttribute), context.fill())), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, defaultAttribute, drawContext, fillCb, null, {
11252
+ if (!1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(area, connect ? connectedStyle : attribute, originX - offsetX, originY - offsetY, connect ? da : defaultAttribute), context.fill())), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, defaultAttribute, drawContext, fillCb, null, {
11294
11253
  attribute: attribute
11295
- }), (() => {
11296
- if (!1 !== stroke) if (strokeCb) strokeCb(context, attribute, defaultAttribute);else {
11297
- const {
11298
- stroke = defaultAttribute && defaultAttribute[1] && defaultAttribute[1].stroke
11299
- } = attribute;
11300
- isArray$1(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction$1.ROW ? "x" : "y", {
11301
- offsetX: offsetX,
11302
- offsetY: offsetY,
11303
- offsetZ: offsetZ,
11304
- drawConnect: connect,
11305
- mode: connectedType,
11306
- zeroX: connectedX,
11307
- zeroY: connectedY
11308
- })), context.setStrokeStyle(area, connect ? connectedStyle : attribute, originX - offsetX, originY - offsetY, connect ? da : defaultAttribute), context.stroke();
11309
- }
11310
- })(), !1;
11254
+ }), !1 !== stroke) if (strokeCb) strokeCb(context, attribute, defaultAttribute);else {
11255
+ const {
11256
+ stroke = defaultAttribute && defaultAttribute[1] && defaultAttribute[1].stroke
11257
+ } = attribute;
11258
+ isArray$1(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction$1.ROW ? "x" : "y", {
11259
+ offsetX: offsetX,
11260
+ offsetY: offsetY,
11261
+ offsetZ: offsetZ,
11262
+ drawConnect: connect,
11263
+ mode: connectedType,
11264
+ zeroX: connectedX,
11265
+ zeroY: connectedY
11266
+ })), context.setStrokeStyle(area, connect ? connectedStyle : attribute, originX - offsetX, originY - offsetY, connect ? da : defaultAttribute), context.stroke();
11267
+ }
11268
+ return !1;
11311
11269
  }
11312
11270
  };
11313
11271
  DefaultCanvasAreaRender = __decorate$Q([injectable(), __param$u(0, inject(ContributionProvider)), __param$u(0, named(AreaRenderContribution)), __metadata$E("design:paramtypes", [Object])], DefaultCanvasAreaRender);
@@ -11339,8 +11297,7 @@
11339
11297
  const pathAttribute = null !== (_a = this.tempTheme) && void 0 !== _a ? _a : getTheme(path, null == params ? void 0 : params.theme).path,
11340
11298
  {
11341
11299
  x: originX = pathAttribute.x,
11342
- y: originY = pathAttribute.y,
11343
- fillStrokeOrder = pathAttribute.fillStrokeOrder
11300
+ y: originY = pathAttribute.y
11344
11301
  } = path.attribute,
11345
11302
  z = null !== (_b = this.z) && void 0 !== _b ? _b : 0,
11346
11303
  data = this.valid(path, pathAttribute, fillCb, strokeCb);
@@ -11355,14 +11312,7 @@
11355
11312
  const path2D = null !== (_c = path.attribute.path) && void 0 !== _c ? _c : pathAttribute.path;
11356
11313
  renderCommandList(path2D.commandList, context, x, y, 1, 1, z);
11357
11314
  }
11358
- context.setShadowBlendStyle && context.setShadowBlendStyle(path, path.attribute, pathAttribute), this.beforeRenderStep(path, context, x, y, doFill, doStroke, fVisible, sVisible, pathAttribute, drawContext, fillCb, strokeCb);
11359
- const _runStroke = () => {
11360
- doStroke && (strokeCb ? strokeCb(context, path.attribute, pathAttribute) : sVisible && (context.setStrokeStyle(path, path.attribute, originX - x, originY - y, pathAttribute), context.stroke()));
11361
- },
11362
- _runFill = () => {
11363
- doFill && (fillCb ? fillCb(context, path.attribute, pathAttribute) : fVisible && (context.setCommonStyle(path, path.attribute, originX - x, originY - y, pathAttribute), context.fill()));
11364
- };
11365
- fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(path, context, x, y, doFill, doStroke, fVisible, sVisible, pathAttribute, drawContext, fillCb, strokeCb);
11315
+ context.setShadowBlendStyle && context.setShadowBlendStyle(path, path.attribute, pathAttribute), this.beforeRenderStep(path, context, x, y, doFill, doStroke, fVisible, sVisible, pathAttribute, drawContext, fillCb, strokeCb), doStroke && (strokeCb ? strokeCb(context, path.attribute, pathAttribute) : sVisible && (context.setStrokeStyle(path, path.attribute, originX - x, originY - y, pathAttribute), context.stroke())), doFill && (fillCb ? fillCb(context, path.attribute, pathAttribute) : fVisible && (context.setCommonStyle(path, path.attribute, originX - x, originY - y, pathAttribute), context.fill())), this.afterRenderStep(path, context, x, y, doFill, doStroke, fVisible, sVisible, pathAttribute, drawContext, fillCb, strokeCb);
11366
11316
  }
11367
11317
  draw(path, renderService, drawContext, params) {
11368
11318
  const pathAttribute = getTheme(path, null == params ? void 0 : params.theme).path;
@@ -11406,8 +11356,7 @@
11406
11356
  x1: x1,
11407
11357
  y1: y1,
11408
11358
  x: originX = rectAttribute.x,
11409
- y: originY = rectAttribute.y,
11410
- fillStrokeOrder = rectAttribute.fillStrokeOrder
11359
+ y: originY = rectAttribute.y
11411
11360
  } = rect.attribute;
11412
11361
  let {
11413
11362
  width: width,
@@ -11426,14 +11375,7 @@
11426
11375
  doFill: doFill,
11427
11376
  doStroke: doStroke
11428
11377
  };
11429
- context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute), this.beforeRenderStep(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
11430
- const _runFill = () => {
11431
- doFillOrStroke.doFill && (fillCb ? fillCb(context, rect.attribute, rectAttribute) : fVisible && (context.setCommonStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute), context.fill()));
11432
- },
11433
- _runStroke = () => {
11434
- doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, rect.attribute, rectAttribute) : sVisible && (context.setStrokeStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute), context.stroke()));
11435
- };
11436
- fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
11378
+ context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute), this.beforeRenderStep(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb, doFillOrStroke), doFillOrStroke.doFill && (fillCb ? fillCb(context, rect.attribute, rectAttribute) : fVisible && (context.setCommonStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute), context.fill())), doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, rect.attribute, rectAttribute) : sVisible && (context.setStrokeStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute), context.stroke())), this.afterRenderStep(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
11437
11379
  }
11438
11380
  draw(rect, renderService, drawContext, params) {
11439
11381
  const rectAttribute = getTheme(rect, null == params ? void 0 : params.theme).rect;
@@ -11469,8 +11411,7 @@
11469
11411
  x: originX = symbolAttribute.x,
11470
11412
  y: originY = symbolAttribute.y,
11471
11413
  scaleX = symbolAttribute.scaleX,
11472
- scaleY = symbolAttribute.scaleY,
11473
- fillStrokeOrder = symbolAttribute.fillStrokeOrder
11414
+ scaleY = symbolAttribute.scaleY
11474
11415
  } = symbol.attribute,
11475
11416
  data = this.valid(symbol, symbolAttribute, fillCb, strokeCb);
11476
11417
  if (!data) return;
@@ -11493,27 +11434,14 @@
11493
11434
  const obj = Object.assign({}, a);
11494
11435
  obj.fill = null !== (_a = a.fill) && void 0 !== _a ? _a : symbol.attribute.fill, obj.opacity = null !== (_b = a.opacity) && void 0 !== _b ? _b : symbol.attribute.opacity, obj.fillOpacity = symbol.attribute.fillOpacity, obj.stroke = null !== (_c = a.stroke) && void 0 !== _c ? _c : symbol.attribute.stroke, a = obj;
11495
11436
  }
11496
- const _runFill = () => {
11497
- a.fill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : (context.setCommonStyle(symbol, a, originX - x, originY - y, symbolAttribute), context.fill()));
11498
- },
11499
- _runStroke = () => {
11500
- a.stroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : (context.setStrokeStyle(symbol, a, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke()));
11501
- };
11502
- fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke());
11437
+ a.fill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : (context.setCommonStyle(symbol, a, originX - x, originY - y, symbolAttribute), context.fill())), a.stroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : (context.setStrokeStyle(symbol, a, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke()));
11503
11438
  };
11504
11439
  if (keepDirIn3d && context.camera && context.project) {
11505
11440
  const p = context.project(x, y, z),
11506
11441
  camera = context.camera;
11507
11442
  context.camera = null, !1 === parsedPath.draw(context, isArray$1(size) ? [size[0] * scaleX, size[1] * scaleY] : size * scaleX, p.x, p.y, void 0, callback) && context.closePath(), context.camera = camera;
11508
11443
  } else !1 === parsedPath.draw(context, size, x, y, z, callback) && context.closePath();
11509
- context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute), this.beforeRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
11510
- const _runFill = () => {
11511
- doFill && !parsedPath.isSvg && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : fVisible && (context.setCommonStyle(symbol, symbol.attribute, originX - x, originY - y, symbolAttribute), context.fill()));
11512
- },
11513
- _runStroke = () => {
11514
- doStroke && !parsedPath.isSvg && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : sVisible && (context.setStrokeStyle(symbol, symbol.attribute, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke()));
11515
- };
11516
- fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
11444
+ context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute), this.beforeRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb), doFill && !parsedPath.isSvg && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : fVisible && (context.setCommonStyle(symbol, symbol.attribute, originX - x, originY - y, symbolAttribute), context.fill())), doStroke && !parsedPath.isSvg && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : sVisible && (context.setStrokeStyle(symbol, symbol.attribute, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke())), this.afterRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
11517
11445
  }
11518
11446
  draw(symbol, renderService, drawContext, params) {
11519
11447
  const symbolAttribute = getTheme(symbol, null == params ? void 0 : params.theme).symbol;
@@ -11887,8 +11815,7 @@
11887
11815
  cornerRadius = polygonAttribute.cornerRadius,
11888
11816
  x: originX = polygonAttribute.x,
11889
11817
  y: originY = polygonAttribute.y,
11890
- closePath = polygonAttribute.closePath,
11891
- fillStrokeOrder = polygonAttribute.fillStrokeOrder
11818
+ closePath = polygonAttribute.closePath
11892
11819
  } = polygon.attribute,
11893
11820
  data = this.valid(polygon, polygonAttribute, fillCb, strokeCb);
11894
11821
  if (!data) return;
@@ -11898,14 +11825,7 @@
11898
11825
  doFill: doFill,
11899
11826
  doStroke: doStroke
11900
11827
  } = data;
11901
- context.beginPath(), cornerRadius <= 0 || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num) ? drawPolygon(context.camera ? context : context.nativeContext, points, x, y) : drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius, closePath), closePath && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(polygon, polygon.attribute, polygonAttribute), this.beforeRenderStep(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
11902
- const _runFill = () => {
11903
- doFill && (fillCb ? fillCb(context, polygon.attribute, polygonAttribute) : fVisible && (context.setCommonStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.fill()));
11904
- },
11905
- _runStroke = () => {
11906
- doStroke && (strokeCb ? strokeCb(context, polygon.attribute, polygonAttribute) : sVisible && (context.setStrokeStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.stroke()));
11907
- };
11908
- fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
11828
+ context.beginPath(), cornerRadius <= 0 || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num) ? drawPolygon(context.camera ? context : context.nativeContext, points, x, y) : drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius, closePath), closePath && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(polygon, polygon.attribute, polygonAttribute), this.beforeRenderStep(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb), doFill && (fillCb ? fillCb(context, polygon.attribute, polygonAttribute) : fVisible && (context.setCommonStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.fill())), doStroke && (strokeCb ? strokeCb(context, polygon.attribute, polygonAttribute) : sVisible && (context.setStrokeStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.stroke())), this.afterRenderStep(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
11909
11829
  }
11910
11830
  draw(polygon, renderService, drawContext, params) {
11911
11831
  const polygonAttribute = getTheme(polygon, null == params ? void 0 : params.theme).polygon;
@@ -11948,10 +11868,7 @@
11948
11868
  cornerRadius = groupAttribute.cornerRadius,
11949
11869
  path = groupAttribute.path,
11950
11870
  lineWidth = groupAttribute.lineWidth,
11951
- visible = groupAttribute.visible,
11952
- fillStrokeOrder = groupAttribute.fillStrokeOrder,
11953
- x: originX = groupAttribute.x,
11954
- y: originY = groupAttribute.y
11871
+ visible = groupAttribute.visible
11955
11872
  } = group.attribute,
11956
11873
  fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
11957
11874
  sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
@@ -11977,14 +11894,7 @@
11977
11894
  };
11978
11895
  this._groupRenderContribitions.forEach(c => {
11979
11896
  c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
11980
- }), clip && context.clip(), context.setShadowBlendStyle && context.setShadowBlendStyle(group, group.attribute, groupAttribute);
11981
- const _runFill = () => {
11982
- doFillOrStroke.doFill && (fillCb ? fillCb(context, group.attribute, groupAttribute) : fVisible && (context.setCommonStyle(group, group.attribute, originX - x, originY - y, groupAttribute), context.fill()));
11983
- },
11984
- _runStroke = () => {
11985
- doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, group.attribute, groupAttribute) : sVisible && (context.setStrokeStyle(group, group.attribute, originX - x, originY - y, groupAttribute), context.stroke()));
11986
- };
11987
- fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this._groupRenderContribitions.forEach(c => {
11897
+ }), clip && context.clip(), context.setShadowBlendStyle && context.setShadowBlendStyle(group, group.attribute, groupAttribute), doFillOrStroke.doFill && (fillCb ? fillCb(context, group.attribute, groupAttribute) : fVisible && (context.setCommonStyle(group, group.attribute, x, y, groupAttribute), context.fill())), doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, group.attribute, groupAttribute) : sVisible && (context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke())), this._groupRenderContribitions.forEach(c => {
11988
11898
  c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb);
11989
11899
  });
11990
11900
  }
@@ -12050,7 +11960,6 @@
12050
11960
  x: originX = imageAttribute.x,
12051
11961
  y: originY = imageAttribute.y,
12052
11962
  cornerRadius = imageAttribute.cornerRadius,
12053
- fillStrokeOrder = imageAttribute.fillStrokeOrder,
12054
11963
  image: url
12055
11964
  } = image.attribute,
12056
11965
  data = this.valid(image, imageAttribute, fillCb);
@@ -12061,37 +11970,29 @@
12061
11970
  doFill: doFill,
12062
11971
  doStroke: doStroke
12063
11972
  } = data;
12064
- context.setShadowBlendStyle && context.setShadowBlendStyle(image, imageAttribute), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
12065
- const _runFill = () => {
12066
- if (doFill) if (fillCb) fillCb(context, image.attribute, imageAttribute);else if (fVisible) {
12067
- if (!url || !image.resources) return;
12068
- const res = image.resources.get(url);
12069
- if ("success" !== res.state) return;
12070
- let needRestore = !1;
12071
- 0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), context.save(), context.clip(), needRestore = !0), context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
12072
- let repeat = 0;
12073
- if ("repeat" === repeatX && (repeat |= 1), "repeat" === repeatY && (repeat |= 2), repeat) {
12074
- const pattern = context.createPattern(res.data, repeatStr[repeat]);
12075
- context.fillStyle = pattern, context.translate(x, y, !0), context.fillRect(0, 0, width, height), context.translate(-x, -y, !0);
12076
- } else context.drawImage(res.data, x, y, width, height);
12077
- needRestore && context.restore();
12078
- }
12079
- },
12080
- _runStroke = () => {
12081
- doStroke && (strokeCb ? strokeCb(context, image.attribute, imageAttribute) : sVisible && (context.setStrokeStyle(image, image.attribute, originX - x, originY - y, imageAttribute), context.stroke()));
12082
- };
12083
- fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
11973
+ if (context.setShadowBlendStyle && context.setShadowBlendStyle(image, imageAttribute), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb), doFill) if (fillCb) fillCb(context, image.attribute, imageAttribute);else if (fVisible) {
11974
+ if (!url || !image.resources) return;
11975
+ const res = image.resources.get(url);
11976
+ if ("success" !== res.state) return;
11977
+ let needRestore = !1;
11978
+ 0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), context.save(), context.clip(), needRestore = !0), context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
11979
+ let repeat = 0;
11980
+ if ("repeat" === repeatX && (repeat |= 1), "repeat" === repeatY && (repeat |= 2), repeat) {
11981
+ const pattern = context.createPattern(res.data, repeatStr[repeat]);
11982
+ context.fillStyle = pattern, context.translate(x, y, !0), context.fillRect(0, 0, width, height), context.translate(-x, -y, !0);
11983
+ } else context.drawImage(res.data, x, y, width, height);
11984
+ needRestore && context.restore();
11985
+ }
11986
+ doStroke && (strokeCb ? strokeCb(context, image.attribute, imageAttribute) : sVisible && (context.setStrokeStyle(image, image.attribute, originX - x, originY - y, imageAttribute), context.stroke())), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
12084
11987
  }
12085
11988
  draw(image, renderService, drawContext) {
12086
11989
  const {
12087
11990
  image: url
12088
11991
  } = image.attribute;
12089
- if (!image.isGifImage) {
12090
- if (!url || !image.resources) return;
12091
- const res = image.resources.get(url);
12092
- if ("loading" === res.state && isString$2(url)) return void ResourceLoader.improveImageLoading(url);
12093
- if ("success" !== res.state) return;
12094
- }
11992
+ if (!url || !image.resources) return;
11993
+ const res = image.resources.get(url);
11994
+ if ("loading" === res.state && isString$2(url)) return void ResourceLoader.improveImageLoading(url);
11995
+ if ("success" !== res.state) return;
12095
11996
  const {
12096
11997
  context: context
12097
11998
  } = renderService.drawParams;
@@ -15947,42 +15848,6 @@
15947
15848
  }
15948
15849
  }
15949
15850
 
15950
- class AutoRefreshPlugin {
15951
- constructor() {
15952
- this.name = "AutoRefreshPlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.handleChange = graphic => {
15953
- graphic.glyphHost && (graphic = graphic.glyphHost), graphic.stage === this.pluginService.stage && null != graphic.stage && graphic.stage.renderNextFrame();
15954
- };
15955
- }
15956
- activate(context) {
15957
- this.pluginService = context, this.dpr = application.global.devicePixelRatio, this.refresh();
15958
- }
15959
- refresh() {
15960
- this._refreshByMediaQuery() || this._refreshByRaf();
15961
- }
15962
- _refreshByRaf() {
15963
- const raf = application.global.getRequestAnimationFrame();
15964
- this.rafId = raf(() => {
15965
- application.global.devicePixelRatio !== this.dpr && (this.dpr = application.global.devicePixelRatio, this.pluginService.stage.setDpr(this.dpr, !0)), this.refresh();
15966
- });
15967
- }
15968
- _refreshByMediaQuery() {
15969
- try {
15970
- const mqString = `(resolution: ${window.devicePixelRatio}dppx)`,
15971
- updatePixelRatio = () => {
15972
- window.devicePixelRatio !== this.dpr && (this.dpr = window.devicePixelRatio, this.pluginService.stage.setDpr(this.dpr, !0));
15973
- };
15974
- matchMedia(mqString).addEventListener("change", updatePixelRatio);
15975
- } catch (err) {
15976
- return !1;
15977
- }
15978
- return !0;
15979
- }
15980
- deactivate(context) {
15981
- const craf = application.global.getCancelAnimationFrame();
15982
- craf && this.rafId && craf(this.rafId);
15983
- }
15984
- }
15985
-
15986
15851
  class IncrementalAutoRenderPlugin {
15987
15852
  constructor() {
15988
15853
  this.name = "IncrementalAutoRenderPlugin", this.activeEvent = "onRegister", this.nextFrameRenderGroupSet = new Set(), this.willNextFrameRender = !1, this.nextUserParams = {}, this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid;
@@ -16182,7 +16047,7 @@
16182
16047
  canvas: params.canvas
16183
16048
  }), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig$1.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
16184
16049
  main: !0
16185
- })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.ticker = params.ticker || defaultTicker, this.supportInteractiveLayer = !1 !== params.interactiveLayer, this.timeline = new DefaultTimeline(), this.ticker.addTimeline(this.timeline), this.timeline.pause(), params.optimize || (params.optimize = {}), this.optmize(params.optimize), params.background && isString$2(this._background) && this._background.includes("/") && this.setAttributes({
16050
+ })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.ticker = params.ticker || defaultTicker, this.supportInteractiveLayer = !1 !== params.interactiveLayer, this.timeline = new DefaultTimeline(), this.ticker.addTimeline(this.timeline), this.timeline.pause(), params.optimize || (params.optimize = {}), this.optmize(params.optimize), params.background && isString$2(this._background) && this._background.includes("/") && this.setAttributes({
16186
16051
  background: this._background
16187
16052
  });
16188
16053
  }
@@ -16317,14 +16182,6 @@
16317
16182
  this.pluginService.unRegister(plugin);
16318
16183
  }));
16319
16184
  }
16320
- enableAutoRefresh() {
16321
- this.autoRefresh || (this.autoRefresh = !0, this.pluginService.register(new AutoRefreshPlugin()));
16322
- }
16323
- disableAutoRefresh() {
16324
- this.autoRefresh && (this.autoRefresh = !1, this.pluginService.findPluginsByName("AutoRefreshPlugin").forEach(plugin => {
16325
- this.pluginService.unRegister(plugin);
16326
- }));
16327
- }
16328
16185
  enableIncrementalAutoRender() {
16329
16186
  this.increaseAutoRender || (this.increaseAutoRender = !0, this.pluginService.register(new IncrementalAutoRenderPlugin()));
16330
16187
  }
@@ -17535,11 +17392,9 @@
17535
17392
  name: name,
17536
17393
  id: id,
17537
17394
  attribute: attribute,
17538
- stateProxy: stateProxy,
17539
- animation: animation,
17540
- timeline: timeline
17395
+ stateProxy: stateProxy
17541
17396
  } = _a,
17542
- props = __rest$4(_a, ["key", "name", "id", "attribute", "stateProxy", "animation", "timeline"]);
17397
+ props = __rest$4(_a, ["key", "name", "id", "attribute", "stateProxy"]);
17543
17398
  let c = type;
17544
17399
  isString$2(type) && (c = graphicCreator[type]);
17545
17400
  const childrenList = [];
@@ -17548,13 +17403,7 @@
17548
17403
  }
17549
17404
  children.length && flatten(1 === children.length ? children[0] : children, childrenList);
17550
17405
  const g = "Group" === c.name ? new c(attribute) : c(config);
17551
- if (parseToGraphic$1(g, childrenList, props), stateProxy && (g.stateProxy = stateProxy), name && (g.name = name), isArray$1(animation)) {
17552
- const animate = g.animate();
17553
- timeline && animate.setTimeline(timeline), animation.forEach(item => {
17554
- animate[item[0]](...item.slice(1));
17555
- });
17556
- }
17557
- return g;
17406
+ return parseToGraphic$1(g, childrenList, props), stateProxy && (g.stateProxy = stateProxy), g;
17558
17407
  }
17559
17408
  function parseToGraphic$1(g, childrenList, props) {
17560
17409
  let out,
@@ -17607,7 +17456,7 @@
17607
17456
  let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17608
17457
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
17609
17458
  super(), this.cachedEvents = [], this.startPoints = [], this.processEvent = {}, this.throttleTimer = 0, this.emitThrottles = [], this.lastTapTarget = null, this.onStart = ev => {
17610
- this.cachedEvents = [], this.startPoints = [], this.reset(), this.startTime = clock.now();
17459
+ this.reset(), this.startTime = clock.now();
17611
17460
  const {
17612
17461
  cachedEvents: cachedEvents,
17613
17462
  startPoints: startPoints
@@ -17627,7 +17476,7 @@
17627
17476
  if (1 !== startPoints.length) this.startDistance = calcDistance(startPoints[0], startPoints[1]), this.center = getCenter([startPoints[0], startPoints[1]]);else {
17628
17477
  const event = cachedEvents[0];
17629
17478
  this.pressTimeout = setTimeout(() => {
17630
- event.direction = "none", event.deltaX = 0, event.deltaY = 0, event.points = startPoints, this.triggerStartEvent("press", event), this.triggerEvent("press", event), this.eventType = "press", this.direction = "none", this.pressTimeout = null;
17479
+ event.direction = "none", event.deltaX = 0, event.deltaY = 0, event.points = startPoints, this.triggerStartEvent("press", event), this.triggerEvent("press", event), this.eventType = "press", this.direction = "none";
17631
17480
  }, this.config.press.time);
17632
17481
  }
17633
17482
  }, this.onMove = ev => {
@@ -17690,10 +17539,10 @@
17690
17539
  lastMovePoint = this.lastMovePoint || startPoints[0],
17691
17540
  distance = calcDistance(prevMovePoint, lastMovePoint),
17692
17541
  velocity = distance / intervalTime;
17693
- if (velocity > this.config.swipe.velocity && distance > this.config.swipe.threshold) return endEvent.velocity = velocity, endEvent.direction = calcDirection(prevMovePoint, lastMovePoint), this.triggerEvent("swipe", endEvent), this.cachedEvents = [], this.startPoints = [], void this.reset();
17542
+ velocity > this.config.swipe.velocity && distance > this.config.swipe.threshold && (endEvent.velocity = velocity, endEvent.direction = calcDirection(prevMovePoint, lastMovePoint), this.triggerEvent("swipe", endEvent));
17694
17543
  }
17695
17544
  }
17696
- now - this.startTime < this.config.press.time && (now - this.lastTapTime < this.config.tap.interval && ev.target === this.lastTapTarget ? this.tapCount++ : this.tapCount = 1, this.lastTapTime = now, this.lastTapTarget = ev.target, 1 === this.tapCount ? this.triggerEvent("tap", endEvent) : 2 === this.tapCount && (this.triggerEvent("doubletap", endEvent), this.tapCount = 0));
17545
+ now - this.lastTapTime < this.config.tap.interval && ev.target === this.lastTapTarget ? this.tapCount++ : this.tapCount = 1, this.lastTapTime = now, this.lastTapTarget = ev.target, 1 === this.tapCount ? this.triggerEvent("tap", endEvent) : 2 === this.tapCount && (this.triggerEvent("doubletap", endEvent), this.tapCount = 0);
17697
17546
  }
17698
17547
  for (let i = 0, len = cachedEvents.length; i < len; i++) if (cachedEvents[i].pointerId === endEvent.pointerId) {
17699
17548
  cachedEvents.splice(i, 1), startPoints.splice(i, 1);
@@ -17769,7 +17618,6 @@
17769
17618
  emitThrottles: emitThrottles
17770
17619
  } = this;
17771
17620
  throttleTimer || (this.throttleTimer = application.global.getRequestAnimationFrame()(() => {
17772
- application.global.getCancelAnimationFrame()(this.throttleTimer), this.throttleTimer = null;
17773
17621
  for (let i = 0, len = emitThrottles.length; i < len; i++) {
17774
17622
  const {
17775
17623
  type: type,
@@ -17777,7 +17625,7 @@
17777
17625
  } = emitThrottles[i];
17778
17626
  this.emitEvent(type, ev);
17779
17627
  }
17780
- this.emitThrottles.length = 0;
17628
+ this.throttleTimer = 0, this.emitThrottles.length = 0;
17781
17629
  }));
17782
17630
  }
17783
17631
  triggerStartEvent(type, ev) {
@@ -21770,23 +21618,21 @@
21770
21618
  axisLength: axisLength
21771
21619
  } = config;
21772
21620
  if (isEmpty(labels) || !isValidNumber$1(limitLength)) return;
21773
- const overflowLimitLength = normalizeOverflowLimitLength(config.overflowLimitLength),
21774
- firstLabel = labels[0],
21775
- angle = firstLabel.attribute.angle,
21776
- hasAngle = !isNil$1(angle),
21777
- cos = hasAngle ? Math.cos(angle) : 1,
21778
- sin = hasAngle ? Math.sin(angle) : 0,
21779
- isHorizontal = isAngleHorizontal(angle),
21780
- isVertical = isAngleVertical(angle),
21781
- isX = "top" === orient || "bottom" === orient,
21782
- direction = firstLabel.attribute.direction,
21783
- checkBox = !isHorizontal && !isVertical && isX && (labels.length < 2 || labels.some(label => Math.abs(label.AABBBounds.width() - firstLabel.AABBBounds.width()) >= 2)) && firstLabel.AABBBounds.width() > Math.abs(limitLength / sin);
21621
+ const overflowLimitLength = normalizeOverflowLimitLength(config.overflowLimitLength);
21784
21622
  labels.forEach(label => {
21785
21623
  var _a;
21624
+ const angle = label.attribute.angle,
21625
+ hasAngle = !isNil$1(angle),
21626
+ cos = hasAngle ? Math.cos(angle) : 1,
21627
+ sin = hasAngle ? Math.sin(angle) : 0,
21628
+ isHorizontal = isAngleHorizontal(angle),
21629
+ isVertical = isAngleVertical(angle),
21630
+ isX = "top" === orient || "bottom" === orient;
21786
21631
  if (isX) {
21787
21632
  if (isVertical && Math.floor(label.AABBBounds.height()) <= limitLength) return;
21788
21633
  if (isHorizontal && Math.floor(label.AABBBounds.width()) <= verticalLimitLength) return;
21789
21634
  }
21635
+ const direction = label.attribute.direction;
21790
21636
  if (!isX) {
21791
21637
  if ("vertical" === direction && Math.floor(label.AABBBounds.height()) <= verticalLimitLength) return;
21792
21638
  if ("vertical" !== direction) {
@@ -21802,11 +21648,11 @@
21802
21648
  } = label.AABBBounds,
21803
21649
  tan = sin / cos,
21804
21650
  verticalSizeLimit = Math.abs(limitLength / sin);
21805
- if (checkBox && tan > 0 && x1 <= axisLength + overflowLimitLength.right && limitLength / tan + x1 > axisLength + overflowLimitLength.right) {
21806
- const lengthLimit = (axisLength - x1 + overflowLimitLength.right) / Math.abs(cos);
21651
+ if (tan > 0 && x1 <= axisLength && limitLength / tan + x1 > axisLength) {
21652
+ const lengthLimit = (axisLength - x1) / Math.abs(cos) + overflowLimitLength.right;
21807
21653
  limitLabelLength = Math.min(lengthLimit, verticalSizeLimit);
21808
- } else if (checkBox && tan < 0 && x2 >= -overflowLimitLength.left && limitLength / tan + x2 < -overflowLimitLength.left) {
21809
- const lengthLimit = (x2 + overflowLimitLength.left) / Math.abs(cos);
21654
+ } else if (tan < 0 && x2 >= 0 && limitLength / tan + x2 < 0) {
21655
+ const lengthLimit = x2 / Math.abs(cos) + overflowLimitLength.left;
21810
21656
  limitLabelLength = Math.min(lengthLimit, verticalSizeLimit);
21811
21657
  } else limitLabelLength = verticalSizeLimit;
21812
21658
  } else limitLabelLength = Math.abs(limitLength / cos);
@@ -21825,40 +21671,30 @@
21825
21671
  orient: orient
21826
21672
  } = config;
21827
21673
  if (isEmpty(labels) || !isValidNumber$1(limitLength)) return;
21828
- const angle = labels[0].attribute.angle,
21829
- isHorizontal = isAngleHorizontal(angle),
21830
- isVertical = isAngleVertical(angle),
21831
- isX = "top" === orient || "bottom" === orient;
21832
- let verticalLimitLength = axisLength / labels.length;
21833
- labels.forEach((label, index) => {
21834
- var _a, _b, _c, _d, _e;
21674
+ const verticalLimitLength = axisLength / labels.length;
21675
+ labels.forEach(label => {
21676
+ var _a;
21677
+ const angle = label.attribute.angle,
21678
+ isHorizontal = isAngleHorizontal(angle),
21679
+ isVertical = isAngleVertical(angle),
21680
+ isX = "top" === orient || "bottom" === orient;
21835
21681
  if (isX) {
21836
21682
  if (isVertical && Math.floor(label.AABBBounds.height()) <= limitLength) return;
21837
- if (isHorizontal) {
21838
- const minGap = getLabelMinGap(label.attribute.x, null === (_a = labels[index + 1]) || void 0 === _a ? void 0 : _a.attribute.x, null === (_b = labels[index - 1]) || void 0 === _b ? void 0 : _b.attribute.x);
21839
- isValidNumber$1(minGap) && (verticalLimitLength = min(verticalLimitLength, minGap));
21840
- }
21683
+ if (isHorizontal && Math.floor(label.AABBBounds.width()) <= verticalLimitLength) return;
21841
21684
  } else {
21842
- if (isVertical) {
21843
- const minGap = getLabelMinGap(label.attribute.y, null === (_c = labels[index + 1]) || void 0 === _c ? void 0 : _c.attribute.y, null === (_d = labels[index - 1]) || void 0 === _d ? void 0 : _d.attribute.y);
21844
- isValidNumber$1(minGap) && (verticalLimitLength = min(verticalLimitLength, minGap));
21845
- }
21685
+ if (isVertical && Math.floor(label.AABBBounds.height()) <= verticalLimitLength) return;
21846
21686
  if (isHorizontal && Math.floor(label.AABBBounds.width()) <= limitLength) return;
21847
21687
  }
21848
21688
  let limitLabelLength = null,
21849
21689
  heightLimit = null;
21850
21690
  isX ? isVertical ? (limitLabelLength = limitLength, heightLimit = verticalLimitLength) : (limitLabelLength = verticalLimitLength, heightLimit = limitLength) : isVertical ? (limitLabelLength = verticalLimitLength, heightLimit = limitLength) : (limitLabelLength = limitLength, heightLimit = verticalLimitLength), label.setAttributes({
21851
21691
  maxLineWidth: limitLabelLength,
21852
- ellipsis: null !== (_e = label.attribute.ellipsis) && void 0 !== _e ? _e : ellipsis,
21692
+ ellipsis: null !== (_a = label.attribute.ellipsis) && void 0 !== _a ? _a : ellipsis,
21853
21693
  whiteSpace: "normal",
21854
21694
  heightLimit: heightLimit
21855
21695
  });
21856
21696
  });
21857
21697
  }
21858
- function getLabelMinGap(current, next, prev) {
21859
- let minGap;
21860
- return isValidNumber$1(next) && (minGap = Math.abs(next - current)), isValidNumber$1(prev) && (minGap = isValidNumber$1(minGap) ? Math.min(Math.abs(current - prev), minGap) : Math.abs(current - prev)), minGap;
21861
- }
21862
21698
 
21863
21699
  function alignAxisLabels(labels, start, containerSize, orient, align) {
21864
21700
  "left" === orient || "right" === orient ? "left" === align ? labels.forEach(label => {
@@ -23862,20 +23698,20 @@
23862
23698
  render() {
23863
23699
  this.removeAllChild(!0);
23864
23700
  const {
23865
- interactive = !0,
23866
- title: title,
23867
- padding = 0
23868
- } = this.attribute;
23869
- this._parsedPadding = normalizePadding(padding);
23870
- const innerView = graphicCreator.group({
23871
- x: this._parsedPadding[3],
23872
- y: this._parsedPadding[0],
23873
- pickable: interactive,
23874
- childrenPickable: interactive
23875
- });
23701
+ interactive = !0,
23702
+ title: title,
23703
+ padding = 0
23704
+ } = this.attribute,
23705
+ parsedPadding = normalizePadding(padding),
23706
+ innerView = graphicCreator.group({
23707
+ x: parsedPadding[3],
23708
+ y: parsedPadding[0],
23709
+ pickable: interactive,
23710
+ childrenPickable: interactive
23711
+ });
23876
23712
  innerView.name = LEGEND_ELEMENT_NAME.innerView, this.add(innerView), this._innerView = innerView, (null == title ? void 0 : title.visible) && this._renderTitle(title), this._renderContent(), this._adjustLayout(), interactive && this._bindEvents();
23877
23713
  const viewBounds = this._innerView.AABBBounds;
23878
- this.attribute.width = viewBounds.width() + this._parsedPadding[1] + this._parsedPadding[3], this.attribute.height = viewBounds.height() + this._parsedPadding[0] + this._parsedPadding[2];
23714
+ this.attribute.width = viewBounds.width() + parsedPadding[1] + parsedPadding[3], this.attribute.height = viewBounds.height() + parsedPadding[0] + parsedPadding[2];
23879
23715
  }
23880
23716
  _renderTitle(title) {
23881
23717
  const {
@@ -23951,7 +23787,7 @@
23951
23787
  loadDiscreteLegendComponent();
23952
23788
  class DiscreteLegend extends LegendBase {
23953
23789
  constructor(attributes, options) {
23954
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge({}, DiscreteLegend.defaultAttributes, attributes)), this.name = "discreteLegend", this._itemsContainer = null, this._itemHeightByUser = void 0, this._itemHeight = 0, this._itemMaxWidth = 0, this._contentMaxHeight = 0, this._onHover = e => {
23790
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge({}, DiscreteLegend.defaultAttributes, attributes)), this.name = "discreteLegend", this._itemsContainer = null, this._itemHeightByUser = void 0, this._itemHeight = 0, this._itemMaxWidth = 0, this._onHover = e => {
23955
23791
  const target = e.target;
23956
23792
  if (target && target.name && target.name.startsWith(LEGEND_ELEMENT_NAME.item)) {
23957
23793
  const legendItem = target.delegate;
@@ -24014,6 +23850,7 @@
24014
23850
  maxCol = 1,
24015
23851
  maxRow = 2,
24016
23852
  maxWidth: maxWidth,
23853
+ maxHeight: maxHeight,
24017
23854
  defaultSelected: defaultSelected,
24018
23855
  lazyload: lazyload,
24019
23856
  autoPage: autoPage
@@ -24029,8 +23866,7 @@
24029
23866
  startIndex: startIndex,
24030
23867
  isScrollbar: isScrollbar
24031
23868
  } = this._itemContext,
24032
- maxPages = isScrollbar ? 1 : isHorizontal ? maxRow : maxCol,
24033
- maxHeight = this._contentMaxHeight;
23869
+ maxPages = isScrollbar ? 1 : isHorizontal ? maxRow : maxCol;
24034
23870
  let item,
24035
23871
  {
24036
23872
  doWrap: doWrap,
@@ -24062,12 +23898,11 @@
24062
23898
  item = {},
24063
23899
  items: items,
24064
23900
  reversed: reversed,
24065
- maxWidth: maxWidth,
24066
- maxHeight: maxHeight
23901
+ maxWidth: maxWidth
24067
23902
  } = this.attribute;
24068
23903
  if (!1 === item.visible || isEmpty(items)) return;
24069
23904
  let legendItems = items;
24070
- reversed && (legendItems = null == items ? void 0 : items.reverse()), this._contentMaxHeight = Math.max(0, maxHeight - this._parsedPadding[0] - this._parsedPadding[2]);
23905
+ reversed && (legendItems = null == items ? void 0 : items.reverse());
24071
23906
  const itemsContainer = graphicCreator.group({
24072
23907
  x: 0,
24073
23908
  y: 0
@@ -24098,8 +23933,7 @@
24098
23933
  items: legendItems,
24099
23934
  isHorizontal: isHorizontal,
24100
23935
  totalPage: 1 / 0,
24101
- isScrollbar: pager && "scrollbar" === pager.type,
24102
- clipContainer: void 0
23936
+ isScrollbar: pager && "scrollbar" === pager.type
24103
23937
  }, this._itemContext = this._renderItems();
24104
23938
  let pagerRendered = !1;
24105
23939
  this._itemContext.doWrap && autoPage && this._itemContext.pages > this._itemContext.maxPages && (pagerRendered = this._renderPagerComponent()), pagerRendered || (itemsContainer.setAttribute("y", this._title ? this._title.AABBBounds.height() + get$5(this.attribute, "title.space", 8) : 0), this._innerView.add(itemsContainer));
@@ -24111,15 +23945,7 @@
24111
23945
  hover = !0,
24112
23946
  select = !0
24113
23947
  } = this.attribute;
24114
- if (hover) {
24115
- let trigger = "pointermove",
24116
- triggerOff = "pointerleave";
24117
- isObject$4(hover) && (hover.trigger && (trigger = hover.trigger), hover.triggerOff && (triggerOff = hover.triggerOff)), this._itemsContainer.addEventListener(trigger, this._onHover), this._itemsContainer.addEventListener(triggerOff, this._onUnHover);
24118
- }
24119
- if (select) {
24120
- let trigger = "pointerdown";
24121
- isObject$4(select) && select.trigger && (trigger = select.trigger), this._itemsContainer.addEventListener(trigger, this._onClick);
24122
- }
23948
+ hover && (this._itemsContainer.addEventListener("pointermove", this._onHover), this._itemsContainer.addEventListener("pointerleave", this._onUnHover)), select && this._itemsContainer.addEventListener("pointerdown", this._onClick);
24123
23949
  }
24124
23950
  _autoEllipsis(autoEllipsisStrategy, layoutWidth, labelShape, valueShape) {
24125
23951
  var _a, _b;
@@ -24294,12 +24120,12 @@
24294
24120
  direction: "horizontal",
24295
24121
  disableTriggerEvent: disableTriggerEvent,
24296
24122
  range: [0, .5],
24297
- height: !1 === compStyle.visible ? 0 : 12
24123
+ height: 12
24298
24124
  }, compStyle), {
24299
24125
  width: compSize
24300
24126
  })) : new ScrollBar(Object.assign(Object.assign({
24301
24127
  direction: "vertical",
24302
- width: !1 === compStyle.visible ? 0 : 12,
24128
+ width: 12,
24303
24129
  range: [0, .5]
24304
24130
  }, compStyle), {
24305
24131
  height: compSize,
@@ -24329,24 +24155,13 @@
24329
24155
  });
24330
24156
  }
24331
24157
  }
24332
- _computeScrollbarDelta() {
24333
- const {
24334
- isHorizontal: isHorizontal,
24335
- clipContainer: clipContainer
24336
- } = this._itemContext,
24337
- itemContainerBounds = this._itemsContainer.AABBBounds,
24338
- clipContainerBounds = clipContainer.AABBBounds;
24339
- let delta, innerViewSize;
24340
- return isHorizontal ? (innerViewSize = clipContainerBounds.width(), delta = innerViewSize / itemContainerBounds.width()) : (innerViewSize = clipContainerBounds.height(), delta = innerViewSize / itemContainerBounds.height()), delta;
24341
- }
24342
24158
  _updatePositionOfScrollbar(contentWidth, contentHeight, renderStartY) {
24343
24159
  const {
24344
- isHorizontal: isHorizontal,
24345
- currentPage: currentPage,
24346
- totalPage: totalPage
24347
- } = this._itemContext,
24348
- start = (currentPage - 1) / totalPage;
24349
- this._pagerComponent.setScrollRange([start, start + this._computeScrollbarDelta()]), isHorizontal ? this._pagerComponent.setAttributes({
24160
+ currentPage: currentPage,
24161
+ totalPage: totalPage,
24162
+ isHorizontal: isHorizontal
24163
+ } = this._itemContext;
24164
+ this._pagerComponent.setScrollRange([(currentPage - 1) / totalPage, currentPage / totalPage]), isHorizontal ? this._pagerComponent.setAttributes({
24350
24165
  x: 0,
24351
24166
  y: renderStartY + contentHeight
24352
24167
  }) : this._pagerComponent.setAttributes({
@@ -24366,7 +24181,7 @@
24366
24181
  value: value
24367
24182
  } = e.detail;
24368
24183
  let newPage;
24369
- return newPage = 0 === value[0] ? 1 : 1 === value[1] ? this._itemContext.totalPage : value[0] * this._itemContext.totalPage + 1, newPage;
24184
+ return 0 === value[0] ? newPage = 1 : 1 === value[1] ? newPage = this._itemContext.totalPage : (newPage = value[0] * this._itemContext.totalPage, pager.scrollByPosition ? newPage += 1 : newPage = Math.floor(newPage) + 1), newPage;
24370
24185
  } : e => e.detail.current,
24371
24186
  onScroll = e => {
24372
24187
  const scrollComponent = this._pagerComponent,
@@ -24379,7 +24194,7 @@
24379
24194
  height: height
24380
24195
  } = scrollComponent.getSliderRenderBounds(),
24381
24196
  currentScrollValue = "vertical" === direction ? e.deltaY / height : e.deltaX / width;
24382
- scrollComponent.setScrollRange([preScrollRange[0] + currentScrollValue, preScrollRange[1] + currentScrollValue], !0), this.updateScrollMask();
24197
+ scrollComponent.setScrollRange([preScrollRange[0] + currentScrollValue, preScrollRange[1] + currentScrollValue], !0);
24383
24198
  },
24384
24199
  onPaging = e => {
24385
24200
  const newPage = pageParser(e);
@@ -24387,21 +24202,9 @@
24387
24202
  if (this._itemContext.currentPage = newPage, this._itemContext && this._itemContext.startIndex < this._itemContext.items.length) {
24388
24203
  this._renderItems();
24389
24204
  const newTotalPage = Math.ceil(this._itemContext.pages / this._itemContext.maxPages);
24390
- if (this._itemContext.totalPage = newTotalPage, this._itemContext.isScrollbar && this._pagerComponent) {
24391
- const newDelta = this._computeScrollbarDelta(),
24392
- [start] = this._pagerComponent.getScrollRange();
24393
- this._pagerComponent.setScrollRange([start, start + newDelta]);
24394
- }
24205
+ this._itemContext.totalPage = newTotalPage, this._pagerComponent.setScrollRange([(newPage - 1) / newTotalPage, newPage / newTotalPage]);
24395
24206
  }
24396
- if (this._itemContext.isScrollbar) {
24397
- const [start] = this._pagerComponent.getScrollRange();
24398
- let containerSize;
24399
- containerSize = this._itemContext.isHorizontal ? this._itemsContainer.AABBBounds.width() : this._itemsContainer.AABBBounds.height();
24400
- const startOffset = containerSize * start;
24401
- this.updateScrollMask(), animation ? this._itemsContainer.animate().to({
24402
- [channel]: -startOffset
24403
- }, animationDuration, animationEasing) : this._itemsContainer.setAttribute(channel, -startOffset);
24404
- } else animation ? this._itemsContainer.animate().to({
24207
+ animation ? this._itemsContainer.animate().to({
24405
24208
  [channel]: -(newPage - 1) * pageSize
24406
24209
  }, animationDuration, animationEasing) : this._itemsContainer.setAttribute(channel, -(newPage - 1) * pageSize);
24407
24210
  }
@@ -24417,6 +24220,7 @@
24417
24220
  const renderStartY = this._title ? this._title.AABBBounds.height() + get$5(this.attribute, "title.space", 8) : 0,
24418
24221
  {
24419
24222
  maxWidth: maxWidth,
24223
+ maxHeight: maxHeight,
24420
24224
  maxCol = 1,
24421
24225
  maxRow = 2,
24422
24226
  item = {},
@@ -24434,8 +24238,7 @@
24434
24238
  compStyle = __rest(pager, ["space", "defaultCurrent"]),
24435
24239
  {
24436
24240
  isHorizontal: isHorizontal
24437
- } = this._itemContext,
24438
- maxHeight = this._contentMaxHeight;
24241
+ } = this._itemContext;
24439
24242
  let comp,
24440
24243
  compWidth = 0,
24441
24244
  compHeight = 0,
@@ -24481,13 +24284,13 @@
24481
24284
  clip: !0,
24482
24285
  pickable: !1
24483
24286
  });
24484
- return clipGroup.add(itemsContainer), this._innerView.add(clipGroup), this._itemContext.clipContainer = clipGroup, this._bindEventsOfPager(isHorizontal ? compHeight + spaceRow : compWidth + spaceCol, isHorizontal ? "y" : "x"), !0;
24287
+ return clipGroup.add(itemsContainer), this._innerView.add(clipGroup), this._bindEventsOfPager(isHorizontal ? compHeight + spaceRow : compWidth + spaceCol, isHorizontal ? "y" : "x"), !0;
24485
24288
  }
24486
24289
  _renderScrollbar() {
24487
- var _a;
24488
24290
  const renderStartY = this._title ? this._title.AABBBounds.height() + get$5(this.attribute, "title.space", 8) : 0,
24489
24291
  {
24490
24292
  maxWidth: maxWidth,
24293
+ maxHeight: maxHeight,
24491
24294
  item = {},
24492
24295
  pager = {}
24493
24296
  } = this.attribute,
@@ -24503,39 +24306,23 @@
24503
24306
  compStyle = __rest(pager, ["space", "defaultCurrent"]),
24504
24307
  {
24505
24308
  isHorizontal: isHorizontal
24506
- } = this._itemContext,
24507
- maxHeight = this._contentMaxHeight;
24309
+ } = this._itemContext;
24508
24310
  let comp,
24311
+ compSize = 0,
24509
24312
  contentWidth = 0,
24510
24313
  contentHeight = 0,
24511
24314
  startY = 0,
24512
24315
  pages = 1;
24513
- if (isHorizontal) contentWidth = maxWidth, contentHeight = this._itemHeight, comp = this._createScrollbar(compStyle, contentWidth), this._pagerComponent = comp, this._innerView.add(comp);else {
24514
- if (contentHeight = maxHeight - renderStartY, contentWidth = this._itemMaxWidth, comp = this._createScrollbar(compStyle, contentHeight), this._pagerComponent = comp, this._innerView.add(comp), contentHeight <= 0) return this._innerView.removeChild(comp), !1;
24515
- const items = itemsContainer.getChildren(),
24516
- itemsHeightArr = items.map(item => item.attribute.height);
24517
- if (1 === itemsHeightArr.length || itemsHeightArr.every(entry => entry === itemsHeightArr[0])) {
24518
- const itemHeight = itemsHeightArr[0],
24519
- maxContentHeight = contentHeight,
24520
- pageItemsCount = Math.floor(maxContentHeight / (spaceRow + itemHeight));
24521
- contentHeight = pageItemsCount * (spaceRow + itemHeight), pages = Math.ceil(items.length / pageItemsCount);
24522
- } else items.forEach((item, index) => {
24316
+ if (isHorizontal) compSize = maxWidth, contentWidth = maxWidth, contentHeight = this._itemHeight, comp = this._createScrollbar(compStyle, compSize), this._pagerComponent = comp, this._innerView.add(comp), this._updatePositionOfScrollbar(contentWidth, contentHeight, renderStartY);else {
24317
+ if (compSize = maxHeight, comp = this._createScrollbar(compStyle, compSize), this._pagerComponent = comp, this._innerView.add(comp), contentHeight = maxHeight - renderStartY, contentWidth = this._itemMaxWidth, contentHeight <= 0) return this._innerView.removeChild(comp), !1;
24318
+ itemsContainer.getChildren().forEach((item, index) => {
24523
24319
  const {
24524
- height: height
24525
- } = item.attribute,
24526
- prePages = pages,
24527
- preStartY = startY;
24528
- pages = Math.floor((startY + height) / contentHeight) + 1, startY += spaceRow + height, prePages !== pages && index === itemsContainer.getChildren().length - 1 && startY - contentHeight >= 1 / 3 * height && (contentHeight = preStartY + height, pages -= 1);
24529
- });
24530
- this._itemContext.totalPage = pages, this._itemContext.pages = pages;
24531
- }
24532
- if (defaultCurrent > 1) if (isHorizontal) {
24533
- const maxOffset = this._itemsContainer.AABBBounds.width() - contentWidth;
24534
- itemsContainer.setAttribute("x", -Math.min((defaultCurrent - 1) * (contentWidth + spaceCol), maxOffset));
24535
- } else {
24536
- const maxOffset = this._itemsContainer.AABBBounds.height() - contentHeight;
24537
- itemsContainer.setAttribute("y", -Math.min((defaultCurrent - 1) * (contentHeight + spaceRow), maxOffset));
24320
+ height: height
24321
+ } = item.attribute;
24322
+ pages = Math.floor((startY + height) / contentHeight) + 1, startY += spaceRow + height;
24323
+ }), this._itemContext.totalPage = pages, this._itemContext.pages = pages, this._updatePositionOfScrollbar(contentWidth, contentHeight, renderStartY);
24538
24324
  }
24325
+ defaultCurrent > 1 && (isHorizontal ? itemsContainer.setAttribute("x", -(defaultCurrent - 1) * (contentWidth + spaceCol)) : itemsContainer.setAttribute("y", -(defaultCurrent - 1) * (contentHeight + spaceRow)));
24539
24326
  const clipGroup = graphicCreator.group({
24540
24327
  x: 0,
24541
24328
  y: renderStartY,
@@ -24544,64 +24331,7 @@
24544
24331
  clip: !0,
24545
24332
  pickable: !1
24546
24333
  });
24547
- return clipGroup.add(itemsContainer), this._innerView.add(clipGroup), this._itemContext.clipContainer = clipGroup, this._updatePositionOfScrollbar(contentWidth, contentHeight, renderStartY), (null === (_a = pager.scrollMask) || void 0 === _a ? void 0 : _a.visible) && this.renderScrollMask(clipGroup), this._bindEventsOfPager(isHorizontal ? contentWidth : contentHeight, isHorizontal ? "x" : "y"), !0;
24548
- }
24549
- renderScrollMask(clipGroup) {
24550
- const {
24551
- scrollMask = {}
24552
- } = this.attribute.pager,
24553
- {
24554
- visible = !0,
24555
- gradientLength = 16,
24556
- gradientStops: gradientStops
24557
- } = scrollMask;
24558
- if (!visible || !gradientStops) return;
24559
- const width = clipGroup.AABBBounds.width(),
24560
- height = clipGroup.AABBBounds.height(),
24561
- totalLength = this._itemContext.isHorizontal ? width : height,
24562
- startStops = gradientStops.map(stop => ({
24563
- offset: gradientLength * stop.offset / totalLength,
24564
- color: stop.color
24565
- })),
24566
- endStops = gradientStops.map(stop => ({
24567
- offset: (totalLength - gradientLength * stop.offset) / totalLength,
24568
- color: stop.color
24569
- })),
24570
- mask = graphicCreator.rect({
24571
- x: 0,
24572
- y: 0,
24573
- width: width,
24574
- height: height
24575
- });
24576
- this._scrollMask = mask, this._scrollMaskContext = {
24577
- startStops: startStops,
24578
- endStops: endStops
24579
- }, this.updateScrollMask(), clipGroup.add(mask);
24580
- }
24581
- updateScrollMask() {
24582
- if (!this._scrollMask || !this._pagerComponent) return;
24583
- if (!this._itemContext.isScrollbar) return;
24584
- const [start, end] = this._pagerComponent.getScrollRange(),
24585
- stops = [];
24586
- isNumberClose(clamp$1(end, 0, 1), 1) || stops.push(...this._scrollMaskContext.endStops), isNumberClose(clamp$1(start, 0, 1), 0) || stops.push(...this._scrollMaskContext.startStops), stops.length && (this._itemContext.isHorizontal ? this._scrollMask.setAttributes({
24587
- fill: {
24588
- gradient: "linear",
24589
- x0: 0,
24590
- y0: 0,
24591
- x1: 1,
24592
- y1: 0,
24593
- stops: stops
24594
- }
24595
- }) : this._scrollMask.setAttributes({
24596
- fill: {
24597
- gradient: "linear",
24598
- x0: 0,
24599
- y0: 0,
24600
- x1: 0,
24601
- y1: 1,
24602
- stops: stops
24603
- }
24604
- }));
24334
+ return clipGroup.add(itemsContainer), this._innerView.add(clipGroup), this._bindEventsOfPager(isHorizontal ? contentWidth : contentHeight, isHorizontal ? "x" : "y"), !0;
24605
24335
  }
24606
24336
  _renderPagerComponent() {
24607
24337
  return this._itemContext.isScrollbar ? this._renderScrollbar() : this._renderPager(), !0;
@@ -26158,598 +25888,6 @@
26158
25888
  }
26159
25889
  };
26160
25890
 
26161
- var lib$1 = {};
26162
-
26163
- var gif = {};
26164
-
26165
- var lib = {};
26166
-
26167
- Object.defineProperty(lib, "__esModule", {
26168
- value: true
26169
- });
26170
- lib.loop = lib.conditional = lib.parse = void 0;
26171
- var parse$3 = function parse(stream, schema) {
26172
- var result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
26173
- var parent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : result;
26174
- if (Array.isArray(schema)) {
26175
- schema.forEach(function (partSchema) {
26176
- return parse(stream, partSchema, result, parent);
26177
- });
26178
- } else if (typeof schema === 'function') {
26179
- schema(stream, result, parent, parse);
26180
- } else {
26181
- var key = Object.keys(schema)[0];
26182
- if (Array.isArray(schema[key])) {
26183
- parent[key] = {};
26184
- parse(stream, schema[key], result, parent[key]);
26185
- } else {
26186
- parent[key] = schema[key](stream, result, parent, parse);
26187
- }
26188
- }
26189
- return result;
26190
- };
26191
- lib.parse = parse$3;
26192
- var conditional = function conditional(schema, conditionFunc) {
26193
- return function (stream, result, parent, parse) {
26194
- if (conditionFunc(stream, result, parent)) {
26195
- parse(stream, schema, result, parent);
26196
- }
26197
- };
26198
- };
26199
- lib.conditional = conditional;
26200
- var loop = function loop(schema, continueFunc) {
26201
- return function (stream, result, parent, parse) {
26202
- var arr = [];
26203
- var lastStreamPos = stream.pos;
26204
- while (continueFunc(stream, result, parent)) {
26205
- var newParent = {};
26206
- parse(stream, schema, result, newParent); // cases when whole file is parsed but no termination is there and stream position is not getting updated as well
26207
- // it falls into infinite recursion, null check to avoid the same
26208
-
26209
- if (stream.pos === lastStreamPos) {
26210
- break;
26211
- }
26212
- lastStreamPos = stream.pos;
26213
- arr.push(newParent);
26214
- }
26215
- return arr;
26216
- };
26217
- };
26218
- lib.loop = loop;
26219
-
26220
- var uint8 = {};
26221
-
26222
- Object.defineProperty(uint8, "__esModule", {
26223
- value: true
26224
- });
26225
- uint8.readBits = uint8.readArray = uint8.readUnsigned = uint8.readString = uint8.peekBytes = uint8.readBytes = uint8.peekByte = uint8.readByte = uint8.buildStream = void 0;
26226
-
26227
- // Default stream and parsers for Uint8TypedArray data type
26228
- var buildStream = function buildStream(uint8Data) {
26229
- return {
26230
- data: uint8Data,
26231
- pos: 0
26232
- };
26233
- };
26234
- uint8.buildStream = buildStream;
26235
- var readByte = function readByte() {
26236
- return function (stream) {
26237
- return stream.data[stream.pos++];
26238
- };
26239
- };
26240
- uint8.readByte = readByte;
26241
- var peekByte = function peekByte() {
26242
- var offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
26243
- return function (stream) {
26244
- return stream.data[stream.pos + offset];
26245
- };
26246
- };
26247
- uint8.peekByte = peekByte;
26248
- var readBytes = function readBytes(length) {
26249
- return function (stream) {
26250
- return stream.data.subarray(stream.pos, stream.pos += length);
26251
- };
26252
- };
26253
- uint8.readBytes = readBytes;
26254
- var peekBytes = function peekBytes(length) {
26255
- return function (stream) {
26256
- return stream.data.subarray(stream.pos, stream.pos + length);
26257
- };
26258
- };
26259
- uint8.peekBytes = peekBytes;
26260
- var readString = function readString(length) {
26261
- return function (stream) {
26262
- return Array.from(readBytes(length)(stream)).map(function (value) {
26263
- return String.fromCharCode(value);
26264
- }).join('');
26265
- };
26266
- };
26267
- uint8.readString = readString;
26268
- var readUnsigned = function readUnsigned(littleEndian) {
26269
- return function (stream) {
26270
- var bytes = readBytes(2)(stream);
26271
- return littleEndian ? (bytes[1] << 8) + bytes[0] : (bytes[0] << 8) + bytes[1];
26272
- };
26273
- };
26274
- uint8.readUnsigned = readUnsigned;
26275
- var readArray = function readArray(byteSize, totalOrFunc) {
26276
- return function (stream, result, parent) {
26277
- var total = typeof totalOrFunc === 'function' ? totalOrFunc(stream, result, parent) : totalOrFunc;
26278
- var parser = readBytes(byteSize);
26279
- var arr = new Array(total);
26280
- for (var i = 0; i < total; i++) {
26281
- arr[i] = parser(stream);
26282
- }
26283
- return arr;
26284
- };
26285
- };
26286
- uint8.readArray = readArray;
26287
- var subBitsTotal = function subBitsTotal(bits, startIndex, length) {
26288
- var result = 0;
26289
- for (var i = 0; i < length; i++) {
26290
- result += bits[startIndex + i] && Math.pow(2, length - i - 1);
26291
- }
26292
- return result;
26293
- };
26294
- var readBits = function readBits(schema) {
26295
- return function (stream) {
26296
- var _byte = readByte()(stream); // convert the byte to bit array
26297
-
26298
- var bits = new Array(8);
26299
- for (var i = 0; i < 8; i++) {
26300
- bits[7 - i] = !!(_byte & 1 << i);
26301
- } // convert the bit array to values based on the schema
26302
-
26303
- return Object.keys(schema).reduce(function (res, key) {
26304
- var def = schema[key];
26305
- if (def.length) {
26306
- res[key] = subBitsTotal(bits, def.index, def.length);
26307
- } else {
26308
- res[key] = bits[def.index];
26309
- }
26310
- return res;
26311
- }, {});
26312
- };
26313
- };
26314
- uint8.readBits = readBits;
26315
-
26316
- (function (exports) {
26317
-
26318
- Object.defineProperty(exports, "__esModule", {
26319
- value: true
26320
- });
26321
- exports["default"] = void 0;
26322
- var _ = lib;
26323
- var _uint = uint8;
26324
-
26325
- // a set of 0x00 terminated subblocks
26326
- var subBlocksSchema = {
26327
- blocks: function blocks(stream) {
26328
- var terminator = 0x00;
26329
- var chunks = [];
26330
- var streamSize = stream.data.length;
26331
- var total = 0;
26332
- for (var size = (0, _uint.readByte)()(stream); size !== terminator; size = (0, _uint.readByte)()(stream)) {
26333
- // size becomes undefined for some case when file is corrupted and terminator is not proper
26334
- // null check to avoid recursion
26335
- if (!size) break; // catch corrupted files with no terminator
26336
-
26337
- if (stream.pos + size >= streamSize) {
26338
- var availableSize = streamSize - stream.pos;
26339
- chunks.push((0, _uint.readBytes)(availableSize)(stream));
26340
- total += availableSize;
26341
- break;
26342
- }
26343
- chunks.push((0, _uint.readBytes)(size)(stream));
26344
- total += size;
26345
- }
26346
- var result = new Uint8Array(total);
26347
- var offset = 0;
26348
- for (var i = 0; i < chunks.length; i++) {
26349
- result.set(chunks[i], offset);
26350
- offset += chunks[i].length;
26351
- }
26352
- return result;
26353
- }
26354
- }; // global control extension
26355
-
26356
- var gceSchema = (0, _.conditional)({
26357
- gce: [{
26358
- codes: (0, _uint.readBytes)(2)
26359
- }, {
26360
- byteSize: (0, _uint.readByte)()
26361
- }, {
26362
- extras: (0, _uint.readBits)({
26363
- future: {
26364
- index: 0,
26365
- length: 3
26366
- },
26367
- disposal: {
26368
- index: 3,
26369
- length: 3
26370
- },
26371
- userInput: {
26372
- index: 6
26373
- },
26374
- transparentColorGiven: {
26375
- index: 7
26376
- }
26377
- })
26378
- }, {
26379
- delay: (0, _uint.readUnsigned)(true)
26380
- }, {
26381
- transparentColorIndex: (0, _uint.readByte)()
26382
- }, {
26383
- terminator: (0, _uint.readByte)()
26384
- }]
26385
- }, function (stream) {
26386
- var codes = (0, _uint.peekBytes)(2)(stream);
26387
- return codes[0] === 0x21 && codes[1] === 0xf9;
26388
- }); // image pipeline block
26389
-
26390
- var imageSchema = (0, _.conditional)({
26391
- image: [{
26392
- code: (0, _uint.readByte)()
26393
- }, {
26394
- descriptor: [{
26395
- left: (0, _uint.readUnsigned)(true)
26396
- }, {
26397
- top: (0, _uint.readUnsigned)(true)
26398
- }, {
26399
- width: (0, _uint.readUnsigned)(true)
26400
- }, {
26401
- height: (0, _uint.readUnsigned)(true)
26402
- }, {
26403
- lct: (0, _uint.readBits)({
26404
- exists: {
26405
- index: 0
26406
- },
26407
- interlaced: {
26408
- index: 1
26409
- },
26410
- sort: {
26411
- index: 2
26412
- },
26413
- future: {
26414
- index: 3,
26415
- length: 2
26416
- },
26417
- size: {
26418
- index: 5,
26419
- length: 3
26420
- }
26421
- })
26422
- }]
26423
- }, (0, _.conditional)({
26424
- lct: (0, _uint.readArray)(3, function (stream, result, parent) {
26425
- return Math.pow(2, parent.descriptor.lct.size + 1);
26426
- })
26427
- }, function (stream, result, parent) {
26428
- return parent.descriptor.lct.exists;
26429
- }), {
26430
- data: [{
26431
- minCodeSize: (0, _uint.readByte)()
26432
- }, subBlocksSchema]
26433
- }]
26434
- }, function (stream) {
26435
- return (0, _uint.peekByte)()(stream) === 0x2c;
26436
- }); // plain text block
26437
-
26438
- var textSchema = (0, _.conditional)({
26439
- text: [{
26440
- codes: (0, _uint.readBytes)(2)
26441
- }, {
26442
- blockSize: (0, _uint.readByte)()
26443
- }, {
26444
- preData: function preData(stream, result, parent) {
26445
- return (0, _uint.readBytes)(parent.text.blockSize)(stream);
26446
- }
26447
- }, subBlocksSchema]
26448
- }, function (stream) {
26449
- var codes = (0, _uint.peekBytes)(2)(stream);
26450
- return codes[0] === 0x21 && codes[1] === 0x01;
26451
- }); // application block
26452
-
26453
- var applicationSchema = (0, _.conditional)({
26454
- application: [{
26455
- codes: (0, _uint.readBytes)(2)
26456
- }, {
26457
- blockSize: (0, _uint.readByte)()
26458
- }, {
26459
- id: function id(stream, result, parent) {
26460
- return (0, _uint.readString)(parent.blockSize)(stream);
26461
- }
26462
- }, subBlocksSchema]
26463
- }, function (stream) {
26464
- var codes = (0, _uint.peekBytes)(2)(stream);
26465
- return codes[0] === 0x21 && codes[1] === 0xff;
26466
- }); // comment block
26467
-
26468
- var commentSchema = (0, _.conditional)({
26469
- comment: [{
26470
- codes: (0, _uint.readBytes)(2)
26471
- }, subBlocksSchema]
26472
- }, function (stream) {
26473
- var codes = (0, _uint.peekBytes)(2)(stream);
26474
- return codes[0] === 0x21 && codes[1] === 0xfe;
26475
- });
26476
- var schema = [{
26477
- header: [{
26478
- signature: (0, _uint.readString)(3)
26479
- }, {
26480
- version: (0, _uint.readString)(3)
26481
- }]
26482
- }, {
26483
- lsd: [{
26484
- width: (0, _uint.readUnsigned)(true)
26485
- }, {
26486
- height: (0, _uint.readUnsigned)(true)
26487
- }, {
26488
- gct: (0, _uint.readBits)({
26489
- exists: {
26490
- index: 0
26491
- },
26492
- resolution: {
26493
- index: 1,
26494
- length: 3
26495
- },
26496
- sort: {
26497
- index: 4
26498
- },
26499
- size: {
26500
- index: 5,
26501
- length: 3
26502
- }
26503
- })
26504
- }, {
26505
- backgroundColorIndex: (0, _uint.readByte)()
26506
- }, {
26507
- pixelAspectRatio: (0, _uint.readByte)()
26508
- }]
26509
- }, (0, _.conditional)({
26510
- gct: (0, _uint.readArray)(3, function (stream, result) {
26511
- return Math.pow(2, result.lsd.gct.size + 1);
26512
- })
26513
- }, function (stream, result) {
26514
- return result.lsd.gct.exists;
26515
- }),
26516
- // content frames
26517
- {
26518
- frames: (0, _.loop)([gceSchema, applicationSchema, commentSchema, imageSchema, textSchema], function (stream) {
26519
- var nextCode = (0, _uint.peekByte)()(stream); // rather than check for a terminator, we should check for the existence
26520
- // of an ext or image block to avoid infinite loops
26521
- //var terminator = 0x3B;
26522
- //return nextCode !== terminator;
26523
-
26524
- return nextCode === 0x21 || nextCode === 0x2c;
26525
- })
26526
- }];
26527
- var _default = schema;
26528
- exports["default"] = _default;
26529
- })(gif);
26530
-
26531
- var deinterlace$1 = {};
26532
-
26533
- Object.defineProperty(deinterlace$1, "__esModule", {
26534
- value: true
26535
- });
26536
- deinterlace$1.deinterlace = void 0;
26537
-
26538
- /**
26539
- * Deinterlace function from https://github.com/shachaf/jsgif
26540
- */
26541
- var deinterlace = function deinterlace(pixels, width) {
26542
- var newPixels = new Array(pixels.length);
26543
- var rows = pixels.length / width;
26544
- var cpRow = function cpRow(toRow, fromRow) {
26545
- var fromPixels = pixels.slice(fromRow * width, (fromRow + 1) * width);
26546
- newPixels.splice.apply(newPixels, [toRow * width, width].concat(fromPixels));
26547
- }; // See appendix E.
26548
-
26549
- var offsets = [0, 4, 2, 1];
26550
- var steps = [8, 8, 4, 2];
26551
- var fromRow = 0;
26552
- for (var pass = 0; pass < 4; pass++) {
26553
- for (var toRow = offsets[pass]; toRow < rows; toRow += steps[pass]) {
26554
- cpRow(toRow, fromRow);
26555
- fromRow++;
26556
- }
26557
- }
26558
- return newPixels;
26559
- };
26560
- deinterlace$1.deinterlace = deinterlace;
26561
-
26562
- var lzw$1 = {};
26563
-
26564
- Object.defineProperty(lzw$1, "__esModule", {
26565
- value: true
26566
- });
26567
- lzw$1.lzw = void 0;
26568
-
26569
- /**
26570
- * javascript port of java LZW decompression
26571
- * Original java author url: https://gist.github.com/devunwired/4479231
26572
- */
26573
- var lzw = function lzw(minCodeSize, data, pixelCount) {
26574
- var MAX_STACK_SIZE = 4096;
26575
- var nullCode = -1;
26576
- var npix = pixelCount;
26577
- var available, clear, code_mask, code_size, end_of_information, in_code, old_code, bits, code, i, datum, data_size, first, top, bi, pi;
26578
- var dstPixels = new Array(pixelCount);
26579
- var prefix = new Array(MAX_STACK_SIZE);
26580
- var suffix = new Array(MAX_STACK_SIZE);
26581
- var pixelStack = new Array(MAX_STACK_SIZE + 1); // Initialize GIF data stream decoder.
26582
-
26583
- data_size = minCodeSize;
26584
- clear = 1 << data_size;
26585
- end_of_information = clear + 1;
26586
- available = clear + 2;
26587
- old_code = nullCode;
26588
- code_size = data_size + 1;
26589
- code_mask = (1 << code_size) - 1;
26590
- for (code = 0; code < clear; code++) {
26591
- prefix[code] = 0;
26592
- suffix[code] = code;
26593
- } // Decode GIF pixel stream.
26594
-
26595
- var datum, bits, first, top, pi, bi;
26596
- datum = bits = first = top = pi = bi = 0;
26597
- for (i = 0; i < npix;) {
26598
- if (top === 0) {
26599
- if (bits < code_size) {
26600
- // get the next byte
26601
- datum += data[bi] << bits;
26602
- bits += 8;
26603
- bi++;
26604
- continue;
26605
- } // Get the next code.
26606
-
26607
- code = datum & code_mask;
26608
- datum >>= code_size;
26609
- bits -= code_size; // Interpret the code
26610
-
26611
- if (code > available || code == end_of_information) {
26612
- break;
26613
- }
26614
- if (code == clear) {
26615
- // Reset decoder.
26616
- code_size = data_size + 1;
26617
- code_mask = (1 << code_size) - 1;
26618
- available = clear + 2;
26619
- old_code = nullCode;
26620
- continue;
26621
- }
26622
- if (old_code == nullCode) {
26623
- pixelStack[top++] = suffix[code];
26624
- old_code = code;
26625
- first = code;
26626
- continue;
26627
- }
26628
- in_code = code;
26629
- if (code == available) {
26630
- pixelStack[top++] = first;
26631
- code = old_code;
26632
- }
26633
- while (code > clear) {
26634
- pixelStack[top++] = suffix[code];
26635
- code = prefix[code];
26636
- }
26637
- first = suffix[code] & 0xff;
26638
- pixelStack[top++] = first; // add a new string to the table, but only if space is available
26639
- // if not, just continue with current table until a clear code is found
26640
- // (deferred clear code implementation as per GIF spec)
26641
-
26642
- if (available < MAX_STACK_SIZE) {
26643
- prefix[available] = old_code;
26644
- suffix[available] = first;
26645
- available++;
26646
- if ((available & code_mask) === 0 && available < MAX_STACK_SIZE) {
26647
- code_size++;
26648
- code_mask += available;
26649
- }
26650
- }
26651
- old_code = in_code;
26652
- } // Pop a pixel off the pixel stack.
26653
-
26654
- top--;
26655
- dstPixels[pi++] = pixelStack[top];
26656
- i++;
26657
- }
26658
- for (i = pi; i < npix; i++) {
26659
- dstPixels[i] = 0; // clear missing pixels
26660
- }
26661
-
26662
- return dstPixels;
26663
- };
26664
- lzw$1.lzw = lzw;
26665
-
26666
- Object.defineProperty(lib$1, "__esModule", {
26667
- value: true
26668
- });
26669
- var decompressFrames_1 = lib$1.decompressFrames = lib$1.decompressFrame = parseGIF_1 = lib$1.parseGIF = void 0;
26670
- var _gif = _interopRequireDefault(gif);
26671
- var _jsBinarySchemaParser = lib;
26672
- var _uint = uint8;
26673
- var _deinterlace = deinterlace$1;
26674
- var _lzw = lzw$1;
26675
- function _interopRequireDefault(obj) {
26676
- return obj && obj.__esModule ? obj : {
26677
- "default": obj
26678
- };
26679
- }
26680
- var parseGIF = function parseGIF(arrayBuffer) {
26681
- var byteData = new Uint8Array(arrayBuffer);
26682
- return (0, _jsBinarySchemaParser.parse)((0, _uint.buildStream)(byteData), _gif["default"]);
26683
- };
26684
- var parseGIF_1 = lib$1.parseGIF = parseGIF;
26685
- var generatePatch = function generatePatch(image) {
26686
- var totalPixels = image.pixels.length;
26687
- var patchData = new Uint8ClampedArray(totalPixels * 4);
26688
- for (var i = 0; i < totalPixels; i++) {
26689
- var pos = i * 4;
26690
- var colorIndex = image.pixels[i];
26691
- var color = image.colorTable[colorIndex] || [0, 0, 0];
26692
- patchData[pos] = color[0];
26693
- patchData[pos + 1] = color[1];
26694
- patchData[pos + 2] = color[2];
26695
- patchData[pos + 3] = colorIndex !== image.transparentIndex ? 255 : 0;
26696
- }
26697
- return patchData;
26698
- };
26699
- var decompressFrame = function decompressFrame(frame, gct, buildImagePatch) {
26700
- if (!frame.image) {
26701
- return;
26702
- }
26703
- var image = frame.image; // get the number of pixels
26704
-
26705
- var totalPixels = image.descriptor.width * image.descriptor.height; // do lzw decompression
26706
-
26707
- var pixels = (0, _lzw.lzw)(image.data.minCodeSize, image.data.blocks, totalPixels); // deal with interlacing if necessary
26708
-
26709
- if (image.descriptor.lct.interlaced) {
26710
- pixels = (0, _deinterlace.deinterlace)(pixels, image.descriptor.width);
26711
- }
26712
- var resultImage = {
26713
- pixels: pixels,
26714
- dims: {
26715
- top: frame.image.descriptor.top,
26716
- left: frame.image.descriptor.left,
26717
- width: frame.image.descriptor.width,
26718
- height: frame.image.descriptor.height
26719
- }
26720
- }; // color table
26721
-
26722
- if (image.descriptor.lct && image.descriptor.lct.exists) {
26723
- resultImage.colorTable = image.lct;
26724
- } else {
26725
- resultImage.colorTable = gct;
26726
- } // add per frame relevant gce information
26727
-
26728
- if (frame.gce) {
26729
- resultImage.delay = (frame.gce.delay || 10) * 10; // convert to ms
26730
-
26731
- resultImage.disposalType = frame.gce.extras.disposal; // transparency
26732
-
26733
- if (frame.gce.extras.transparentColorGiven) {
26734
- resultImage.transparentIndex = frame.gce.transparentColorIndex;
26735
- }
26736
- } // create canvas usable imagedata if desired
26737
-
26738
- if (buildImagePatch) {
26739
- resultImage.patch = generatePatch(resultImage);
26740
- }
26741
- return resultImage;
26742
- };
26743
- lib$1.decompressFrame = decompressFrame;
26744
- var decompressFrames = function decompressFrames(parsedGif, buildImagePatches) {
26745
- return parsedGif.frames.filter(function (f) {
26746
- return f.image;
26747
- }).map(function (f) {
26748
- return decompressFrame(f, parsedGif.gct, buildImagePatches);
26749
- });
26750
- };
26751
- decompressFrames_1 = lib$1.decompressFrames = decompressFrames;
26752
-
26753
25891
  let registed = false;
26754
25892
  function registerForVrender() {
26755
25893
  if (registed) {
@@ -26805,7 +25943,6 @@
26805
25943
  HierarchyState["expand"] = "expand";
26806
25944
  HierarchyState["collapse"] = "collapse";
26807
25945
  HierarchyState["none"] = "none";
26808
- HierarchyState["loading"] = "loading";
26809
25946
  })(HierarchyState || (HierarchyState = {}));
26810
25947
 
26811
25948
  var AggregationType;
@@ -26867,7 +26004,6 @@
26867
26004
  InternalIconName["expandIconName"] = "expand";
26868
26005
  InternalIconName["collapseIconName"] = "collapse";
26869
26006
  InternalIconName["dragReorderIconName"] = "dragReorder";
26870
- InternalIconName["loadingIconName"] = "loading";
26871
26007
  })(InternalIconName || (InternalIconName = {}));
26872
26008
 
26873
26009
  var index$1 = /*#__PURE__*/Object.freeze({
@@ -31350,7 +30486,7 @@
31350
30486
  return this.hasOriginalField(_getIndex(this.currentPagerIndexedData, index), field);
31351
30487
  }
31352
30488
  getHierarchyState(index) {
31353
- const record = this.getOriginalRecord(this.currentIndexedData[index]);
30489
+ const record = this.getOriginalRecord(this.currentPagerIndexedData[index]);
31354
30490
  return record?.hierarchyState ?? null;
31355
30491
  }
31356
30492
  toggleHierarchyState(index, bodyStartIndex, bodyEndIndex) {
@@ -33159,15 +32295,6 @@
33159
32295
  let Icon$1 = class Icon extends Image$2 {
33160
32296
  role;
33161
32297
  tooltip;
33162
- frameImageData;
33163
- tempCanvas;
33164
- tempCtx;
33165
- gifCanvas;
33166
- gifCtx;
33167
- loadedFrames;
33168
- frameIndex;
33169
- playing;
33170
- lastTime;
33171
32298
  constructor(params) {
33172
32299
  super(params);
33173
32300
  if (this.attribute.visibleTime === 'mouseenter_cell' || this.attribute.visibleTime === 'click_cell') {
@@ -33176,24 +32303,6 @@
33176
32303
  if (this.attribute.hoverImage) {
33177
32304
  this.attribute.originImage = this.attribute.image;
33178
32305
  }
33179
- if (this.attribute.isGif && this.attribute.gif) {
33180
- this.loadGif();
33181
- }
33182
- }
33183
- loadGif() {
33184
- this.playing = false;
33185
- ResourceLoader.GetFile(this.attribute.gif, 'arrayBuffer')
33186
- .then((res) => {
33187
- const gif = parseGIF_1(res);
33188
- const frames = decompressFrames_1(gif, true);
33189
- this.renderGIF(frames);
33190
- this.resources.set(this.attribute.image, {
33191
- state: 'success',
33192
- data: this.gifCanvas
33193
- });
33194
- })
33195
- .catch((e) => {
33196
- });
33197
32306
  }
33198
32307
  get backgroundWidth() {
33199
32308
  return this.attribute.backgroundWidth ?? this.attribute.width ?? 0;
@@ -33201,67 +32310,6 @@
33201
32310
  get backgroundHeight() {
33202
32311
  return this.attribute.backgroundHeight ?? this.attribute.height ?? 0;
33203
32312
  }
33204
- renderGIF(frames) {
33205
- this.loadedFrames = frames;
33206
- this.frameIndex = 0;
33207
- if (!this.tempCanvas) {
33208
- this.tempCanvas = document.createElement('canvas');
33209
- this.tempCtx = this.tempCanvas.getContext('2d');
33210
- }
33211
- if (!this.gifCanvas) {
33212
- this.gifCanvas = document.createElement('canvas');
33213
- this.gifCtx = this.gifCanvas.getContext('2d');
33214
- }
33215
- this.gifCanvas.width = frames[0].dims.width;
33216
- this.gifCanvas.height = frames[0].dims.height;
33217
- this.playing = true;
33218
- this.lastTime = new Date().getTime();
33219
- this.animate().to({}, 1000, 'linear').loop(Infinity);
33220
- }
33221
- renderFrame(context, x, y) {
33222
- const frame = this.loadedFrames[this.frameIndex || 0];
33223
- if (frame.disposalType === 2) {
33224
- this.gifCtx.clearRect(0, 0, this.gifCanvas.width, this.gifCanvas.height);
33225
- }
33226
- this.drawPatch(frame);
33227
- this.manipulate(context, x, y);
33228
- const diff = new Date().getTime() - this.lastTime;
33229
- if (frame.delay < diff) {
33230
- this.frameIndex++;
33231
- this.lastTime = new Date().getTime();
33232
- }
33233
- if (this.frameIndex >= this.loadedFrames.length) {
33234
- this.frameIndex = 0;
33235
- }
33236
- }
33237
- drawPatch(frame) {
33238
- const dims = frame.dims;
33239
- if (!this.frameImageData ||
33240
- dims.width !== this.frameImageData.width ||
33241
- dims.height !== this.frameImageData.height) {
33242
- this.tempCanvas.width = dims.width;
33243
- this.tempCanvas.height = dims.height;
33244
- this.frameImageData = this.tempCtx.createImageData(dims.width, dims.height);
33245
- }
33246
- this.frameImageData.data.set(frame.patch);
33247
- this.tempCtx.putImageData(this.frameImageData, 0, 0);
33248
- this.gifCtx.drawImage(this.tempCanvas, dims.left, dims.top);
33249
- }
33250
- manipulate(context, x, y) {
33251
- context.drawImage(this.gifCanvas, 0, 0, this.gifCanvas.width, this.gifCanvas.height, x, y, this.attribute.width, this.attribute.height);
33252
- }
33253
- setAttribute(key, value, forceUpdateTag, context) {
33254
- super.setAttribute(key, value, forceUpdateTag, context);
33255
- if (key === 'gif') {
33256
- this.loadGif();
33257
- }
33258
- }
33259
- setAttributes(params, forceUpdateTag, context) {
33260
- super.setAttributes(params, forceUpdateTag, context);
33261
- if (params.gif) {
33262
- this.loadGif();
33263
- }
33264
- }
33265
32313
  };
33266
32314
 
33267
32315
  function emptyCustomLayout(args) {
@@ -33556,7 +32604,7 @@
33556
32604
  };
33557
32605
  const customRenderObj = customLayout(arg);
33558
32606
  if (customRenderObj.rootContainer) {
33559
- customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer, table.animationManager.timeline);
32607
+ customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer);
33560
32608
  }
33561
32609
  if (customRenderObj.rootContainer instanceof Group$2) {
33562
32610
  elementsGroup = customRenderObj.rootContainer;
@@ -33858,14 +32906,14 @@
33858
32906
  }
33859
32907
  });
33860
32908
  }
33861
- function decodeReactDom(dom, timeline) {
32909
+ function decodeReactDom(dom) {
33862
32910
  if (!dom ||
33863
32911
  (!isValid$1(dom.$$typeof) &&
33864
32912
  !isValid$1(dom.vtype))) {
33865
32913
  return dom;
33866
32914
  }
33867
32915
  const type = dom.type;
33868
- const { attribute, children, stateProxy, animation } = dom.props;
32916
+ const { attribute, children, stateProxy } = dom.props;
33869
32917
  const g = type({ attribute });
33870
32918
  parseToGraphic(g, dom.props);
33871
32919
  if (stateProxy) {
@@ -33875,19 +32923,12 @@
33875
32923
  g.name = attribute.name;
33876
32924
  if (isArray$1(children)) {
33877
32925
  children.forEach((item) => {
33878
- const c = decodeReactDom(item, timeline);
32926
+ const c = decodeReactDom(item);
33879
32927
  c && c.type && g.add(c);
33880
32928
  });
33881
32929
  }
33882
32930
  else if (children) {
33883
- g.add(decodeReactDom(children, timeline));
33884
- }
33885
- if (isArray$1(animation) && timeline) {
33886
- const animate = g.animate();
33887
- animate.setTimeline(timeline);
33888
- animation.forEach((item) => {
33889
- animate[item[0]](...item.slice(1));
33890
- });
32931
+ g.add(decodeReactDom(children));
33891
32932
  }
33892
32933
  return g;
33893
32934
  }
@@ -34274,24 +33315,6 @@
34274
33315
  cursor: 'pointer'
34275
33316
  };
34276
33317
  },
34277
- get loading() {
34278
- return {
34279
- type: 'image',
34280
- src: 'https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/media/loading-circle.gif',
34281
- width: collapse_size,
34282
- height: collapse_size,
34283
- name: 'loading',
34284
- positionType: IconPosition.contentLeft,
34285
- marginLeft: 0,
34286
- marginRight: 4,
34287
- hover: {
34288
- width: collapse_size_2,
34289
- height: collapse_size_2,
34290
- bgColor: 'rgba(101, 117, 168, 0.1)'
34291
- },
34292
- isGif: true
34293
- };
34294
- },
34295
33318
  get drillDown() {
34296
33319
  return {
34297
33320
  name: 'drillDown',
@@ -34524,9 +33547,6 @@
34524
33547
  this._AABBBounds.setValue(x, y, x + width, y + height);
34525
33548
  this.parent && this.parent.addChildUpdateBoundTag();
34526
33549
  this.clearUpdateBoundTag();
34527
- if (this.shadowRoot) {
34528
- this.shadowRoot.tryUpdateAABBBounds();
34529
- }
34530
33550
  return this._AABBBounds;
34531
33551
  }
34532
33552
  else if (this.role === 'body' ||
@@ -34957,18 +33977,12 @@
34957
33977
  autoWrapText,
34958
33978
  lineClamp,
34959
33979
  wordBreak: 'break-word',
34960
- heightLimit: table.options.customConfig?.limitContentHeight === false
33980
+ heightLimit: autoRowHeight && !table.options.customConfig?.multilinesForXTable
34961
33981
  ? -1
34962
- : autoRowHeight && !table.options.customConfig?.multilinesForXTable
34963
- ? -1
34964
- : cellHeight - Math.floor(padding[0] + padding[2]),
33982
+ : cellHeight - Math.floor(padding[0] + padding[2]),
34965
33983
  pickable: false,
34966
33984
  dx: (textAlign === 'left' ? hierarchyOffset : 0) + _contentOffset,
34967
- whiteSpace: table.options.customConfig?.limitContentHeight === false
34968
- ? 'normal'
34969
- : text.length === 1 && !autoWrapText
34970
- ? 'no-wrap'
34971
- : 'normal'
33985
+ whiteSpace: text.length === 1 && !autoWrapText ? 'no-wrap' : 'normal'
34972
33986
  };
34973
33987
  const wrapText = new Text$1(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
34974
33988
  wrapText.name = 'text';
@@ -35005,20 +34019,14 @@
35005
34019
  ? Infinity
35006
34020
  : cellWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth - hierarchyOffset,
35007
34021
  textBaseline: 'top',
35008
- heightLimit: table.options.customConfig?.limitContentHeight === false
34022
+ heightLimit: autoRowHeight && !table.options.customConfig?.multilinesForXTable
35009
34023
  ? -1
35010
- : autoRowHeight && !table.options.customConfig?.multilinesForXTable
35011
- ? -1
35012
- : cellHeight - Math.floor(padding[0] + padding[2]),
34024
+ : cellHeight - Math.floor(padding[0] + padding[2]),
35013
34025
  pickable: false,
35014
34026
  autoWrapText,
35015
34027
  lineClamp,
35016
34028
  wordBreak: 'break-word',
35017
- whiteSpace: table.options.customConfig?.limitContentHeight === false
35018
- ? 'normal'
35019
- : text.length === 1 && !autoWrapText
35020
- ? 'no-wrap'
35021
- : 'normal',
34029
+ whiteSpace: text.length === 1 && !autoWrapText ? 'no-wrap' : 'normal',
35022
34030
  dx: (textAlign === 'left' ? (!contentLeftIcons.length ? hierarchyOffset : 0) : 0) + _contentOffset
35023
34031
  };
35024
34032
  const wrapText = new Text$1(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
@@ -35147,13 +34155,7 @@
35147
34155
  function dealWithIcon(icon, mark, col, row, range, table, dealWithIconComputeVar) {
35148
34156
  const iconAttribute = {};
35149
34157
  if (icon.type === 'image') {
35150
- if (icon.isGif) {
35151
- iconAttribute.gif = icon.src;
35152
- iconAttribute.image = icon.src;
35153
- }
35154
- else {
35155
- iconAttribute.image = icon.src;
35156
- }
34158
+ iconAttribute.image = icon.src;
35157
34159
  }
35158
34160
  else if (icon.type === 'svg' || 'svg' in icon) {
35159
34161
  iconAttribute.image = icon.svg;
@@ -35163,7 +34165,6 @@
35163
34165
  iconAttribute.visibleTime = icon.visibleTime ?? 'always';
35164
34166
  iconAttribute.funcType = icon.funcType;
35165
34167
  iconAttribute.interactive = icon.interactive;
35166
- iconAttribute.isGif = icon.isGif;
35167
34168
  let hierarchyOffset = 0;
35168
34169
  if ((!dealWithIconComputeVar || dealWithIconComputeVar?.addedHierarchyOffset === 0) &&
35169
34170
  isNumber$2(col) &&
@@ -35200,13 +34201,10 @@
35200
34201
  if (mark) {
35201
34202
  mark.setAttributes(iconAttribute);
35202
34203
  mark.loadImage(iconAttribute.image);
35203
- mark.tooltip = icon.tooltip;
35204
- mark.name = icon.name;
35205
34204
  return mark;
35206
34205
  }
35207
34206
  const iconMark = new Icon$1(iconAttribute);
35208
34207
  iconMark.tooltip = icon.tooltip;
35209
- iconMark.name = icon.name;
35210
34208
  return iconMark;
35211
34209
  }
35212
34210
  function dealWithRichTextIcon(icon) {
@@ -35351,12 +34349,12 @@
35351
34349
  }
35352
34350
  return false;
35353
34351
  }
35354
- function updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, textAlign, textBaseline, table) {
34352
+ function updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, textAlign, textBaseline) {
35355
34353
  const newHeight = distHeight - Math.floor(padding[0] + padding[2]);
35356
34354
  const textMark = cellGroup.getChildByName('text');
35357
34355
  if (textMark instanceof Text$1 && !autoRowHeight) {
35358
34356
  textMark.setAttributes({
35359
- heightLimit: table.options.customConfig?.limitContentHeight === false ? -1 : newHeight
34357
+ heightLimit: newHeight
35360
34358
  });
35361
34359
  }
35362
34360
  else if (textMark instanceof RichText && !autoRowHeight) {
@@ -35921,107 +34919,6 @@
35921
34919
  });
35922
34920
  }
35923
34921
 
35924
- function isSameRange$1(range1, range2) {
35925
- if (!range1 && !range2) {
35926
- return true;
35927
- }
35928
- if (!range1 || !range2) {
35929
- return false;
35930
- }
35931
- return (range1.start.col === range2.start.col &&
35932
- range1.start.row === range2.start.row &&
35933
- range1.end.col === range2.end.col &&
35934
- range1.end.row === range2.end.row);
35935
- }
35936
-
35937
- class InvertHighlightPlugin {
35938
- table;
35939
- range;
35940
- _fill;
35941
- _opacity;
35942
- constructor(table, options) {
35943
- this.table = table;
35944
- this._fill = options?.fill ?? '#000';
35945
- this._opacity = options?.opacity ?? 0.5;
35946
- }
35947
- setInvertHighlightRange(range) {
35948
- if (isSameRange$1(this.range, range)) {
35949
- return;
35950
- }
35951
- this.range = range;
35952
- if (!range) {
35953
- this.deleteAllCellGroupShadow();
35954
- }
35955
- else {
35956
- this.updateCellGroupShadow();
35957
- }
35958
- this.table.scenegraph.updateNextFrame();
35959
- }
35960
- deleteAllCellGroupShadow() {
35961
- if (!this.table.isPivotTable()) {
35962
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rowHeaderGroup);
35963
- this.updateCellGroupShadowInContainer(this.table.scenegraph.leftBottomCornerGroup);
35964
- }
35965
- this.updateCellGroupShadowInContainer(this.table.scenegraph.bodyGroup);
35966
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rightFrozenGroup);
35967
- this.updateCellGroupShadowInContainer(this.table.scenegraph.bottomFrozenGroup);
35968
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rightBottomCornerGroup);
35969
- }
35970
- updateCellGroupShadow() {
35971
- if (!this.table.isPivotTable()) {
35972
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rowHeaderGroup, this.range);
35973
- this.updateCellGroupShadowInContainer(this.table.scenegraph.leftBottomCornerGroup, this.range);
35974
- }
35975
- this.updateCellGroupShadowInContainer(this.table.scenegraph.bodyGroup, this.range);
35976
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rightFrozenGroup, this.range);
35977
- this.updateCellGroupShadowInContainer(this.table.scenegraph.bottomFrozenGroup), this.range;
35978
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rightBottomCornerGroup, this.range);
35979
- }
35980
- updateCellGroupShadowInContainer(container, range) {
35981
- container.forEachChildrenSkipChild((column) => {
35982
- if (column.role === 'column') {
35983
- column.forEachChildrenSkipChild((cell) => {
35984
- if (cell.role !== 'cell') {
35985
- return;
35986
- }
35987
- cell.attachShadow(cell.shadowRoot);
35988
- const shadowGroup = cell.shadowRoot;
35989
- if (!range) {
35990
- shadowGroup.removeAllChild();
35991
- }
35992
- else if (cellInRange(range, cell.col, cell.row)) {
35993
- shadowGroup.removeAllChild();
35994
- }
35995
- else if (!shadowGroup.firstChild) {
35996
- const shadowRect = createRect({
35997
- x: 0,
35998
- y: 0,
35999
- width: cell.attribute.width,
36000
- height: cell.attribute.height,
36001
- fill: this._fill,
36002
- opacity: this._opacity
36003
- });
36004
- shadowRect.name = 'shadow-rect';
36005
- shadowGroup.appendChild(shadowRect);
36006
- }
36007
- });
36008
- }
36009
- });
36010
- }
36011
- }
36012
- function onBeforeAttributeUpdateForInvertHighlight(val, attribute) {
36013
- const graphic = this;
36014
- if (graphic.shadowRoot && graphic.shadowRoot.childrenCount && (isValid$1(val.width) || isValid$1(val.height))) {
36015
- const shadowRect = graphic.shadowRoot.findChildrenByName('shadow-rect')[0];
36016
- if (shadowRect) {
36017
- shadowRect.setAttributes({
36018
- width: val.width ?? shadowRect.attribute.width,
36019
- height: val.height ?? shadowRect.attribute.height
36020
- });
36021
- }
36022
- }
36023
- }
36024
-
36025
34922
  function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult) {
36026
34923
  let isAsync = false;
36027
34924
  let cellGroup;
@@ -36140,7 +35037,6 @@
36140
35037
  const createRadioCellGroup = Factory.getFunction('createRadioCellGroup');
36141
35038
  cellGroup = createRadioCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define);
36142
35039
  }
36143
- cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight;
36144
35040
  return cellGroup;
36145
35041
  }
36146
35042
  function updateCell$1(col, row, table, addNew, isShadow) {
@@ -36396,7 +35292,7 @@
36396
35292
  continue;
36397
35293
  }
36398
35294
  if (range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight) {
36399
- updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table);
35295
+ updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline);
36400
35296
  }
36401
35297
  if (range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth) {
36402
35298
  updateCellContentWidth(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph);
@@ -36412,7 +35308,7 @@
36412
35308
  function dealWithMergeCellSizeForShadow(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellGroup) {
36413
35309
  const { col, row } = cellGroup;
36414
35310
  if (range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight) {
36415
- updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table);
35311
+ updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline);
36416
35312
  }
36417
35313
  if (range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth) {
36418
35314
  updateCellContentWidth(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph);
@@ -36817,8 +35713,7 @@
36817
35713
  table.defaultHeaderColWidth;
36818
35714
  const isDefaultHeaderHasAuto = table.defaultHeaderRowHeight === 'auto' ||
36819
35715
  (isArray$1(table.defaultHeaderRowHeight) && table.defaultHeaderRowHeight.some(item => item === 'auto'));
36820
- const isAllRowsAuto = table.heightMode === 'autoHeight' ||
36821
- (table.heightMode === 'adaptive' && table.options.autoHeightInAdaptiveMode !== false);
35716
+ const isAllRowsAuto = table.heightMode === 'autoHeight' || table.heightMode === 'adaptive';
36822
35717
  if (isAllRowsAuto || isDefaultHeaderHasAuto) {
36823
35718
  rowStart = rowStart ?? 0;
36824
35719
  rowEnd = rowEnd ?? table.rowCount - 1;
@@ -36838,9 +35733,7 @@
36838
35733
  if (isAllRowsAuto || table.getDefaultRowHeight(row) === 'auto') {
36839
35734
  const height = computeRowHeight(row, startCol, endCol, table);
36840
35735
  newHeights[row] = Math.round(height);
36841
- if (table.heightAdaptiveMode === 'only-body' || !update) {
36842
- table._setRowHeight(row, height);
36843
- }
35736
+ table._setRowHeight(row, height);
36844
35737
  }
36845
35738
  }
36846
35739
  for (let row = table.rowCount - table.bottomFrozenRowCount; row <= rowEnd; row++) {
@@ -37005,7 +35898,7 @@
37005
35898
  if (update) {
37006
35899
  for (let row = rowStart; row <= rowEnd; row++) {
37007
35900
  const newRowHeight = newHeights[row] ?? table.getRowHeight(row);
37008
- if (isValid$1(newRowHeight)) {
35901
+ if (newRowHeight !== (oldRowHeights[row] ?? table.getRowHeight(row))) {
37009
35902
  table._setRowHeight(row, newRowHeight);
37010
35903
  }
37011
35904
  }
@@ -37614,7 +36507,7 @@
37614
36507
  });
37615
36508
  if (renderDefault) {
37616
36509
  const style = table._getCellStyle(colStart, rowStart);
37617
- updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline, table);
36510
+ updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline);
37618
36511
  }
37619
36512
  const rangeHeight = table.getRowHeight(row);
37620
36513
  const rangeWidth = table.getColWidth(col);
@@ -37637,7 +36530,7 @@
37637
36530
  }
37638
36531
  else {
37639
36532
  const style = table._getCellStyle(cellGroup.col, cellGroup.row);
37640
- updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline, table);
36533
+ updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline);
37641
36534
  }
37642
36535
  }
37643
36536
 
@@ -40051,36 +38944,6 @@
40051
38944
  AfterImageRenderContribution = __decorate([
40052
38945
  injectable()
40053
38946
  ], AfterImageRenderContribution);
40054
- let BeforeGifImageRenderContribution = class BeforeGifImageRenderContribution {
40055
- time = BaseRenderContributionTime.beforeFillStroke;
40056
- useStyle = true;
40057
- order = 0;
40058
- drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, imageAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
40059
- const { isGif } = image.attribute;
40060
- if (isGif && image.playing) {
40061
- image.attribute.opacity = 0;
40062
- }
40063
- }
40064
- };
40065
- BeforeGifImageRenderContribution = __decorate([
40066
- injectable()
40067
- ], BeforeGifImageRenderContribution);
40068
- let AfterGifImageRenderContribution = class AfterGifImageRenderContribution {
40069
- time = BaseRenderContributionTime.afterFillStroke;
40070
- useStyle = true;
40071
- order = 0;
40072
- drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, imageAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
40073
- const { isGif } = image.attribute;
40074
- if (isGif && image.playing) {
40075
- image.attribute.opacity = 1;
40076
- context.globalAlpha = image.attribute.opacity;
40077
- image.renderFrame(context, x, y);
40078
- }
40079
- }
40080
- };
40081
- AfterGifImageRenderContribution = __decorate([
40082
- injectable()
40083
- ], AfterGifImageRenderContribution);
40084
38947
 
40085
38948
  function getCellHoverColor(cellGroup, table) {
40086
38949
  let colorKey;
@@ -41244,15 +40107,12 @@
41244
40107
  return false;
41245
40108
  }
41246
40109
  drawItem(graphic, renderService, drawContext, drawContribution, params) {
41247
- const { image: url, gif } = graphic.attribute;
41248
- if (gif && graphic.playing) {
41249
- return false;
41250
- }
40110
+ const { image: url } = graphic.attribute;
41251
40111
  if (!url || !graphic.resources) {
41252
40112
  return false;
41253
40113
  }
41254
40114
  const res = graphic.resources.get(url);
41255
- if (!res || res.state !== 'loading') {
40115
+ if (res.state !== 'loading') {
41256
40116
  return false;
41257
40117
  }
41258
40118
  if (!loadingImage) {
@@ -41407,10 +40267,6 @@
41407
40267
  bind(ImageRenderContribution).toService(BeforeImageRenderContribution);
41408
40268
  bind(AfterImageRenderContribution).toSelf().inSingletonScope();
41409
40269
  bind(ImageRenderContribution).toService(AfterImageRenderContribution);
41410
- bind(BeforeGifImageRenderContribution).toSelf().inSingletonScope();
41411
- bind(ImageRenderContribution).toService(BeforeGifImageRenderContribution);
41412
- bind(AfterGifImageRenderContribution).toSelf().inSingletonScope();
41413
- bind(ImageRenderContribution).toService(AfterGifImageRenderContribution);
41414
40270
  bind(AdjustColorGroupBeforeRenderContribution).toSelf().inSingletonScope();
41415
40271
  bind(GroupRenderContribution).toService(AdjustColorGroupBeforeRenderContribution);
41416
40272
  bind(AdjustColorGroupAfterRenderContribution).toSelf().inSingletonScope();
@@ -46502,7 +45358,6 @@
46502
45358
  enableLayout: true,
46503
45359
  beforeRender: (stage) => {
46504
45360
  this.table.options.beforeRender && this.table.options.beforeRender(stage);
46505
- this.table.animationManager.ticker.start();
46506
45361
  },
46507
45362
  afterRender: (stage) => {
46508
45363
  this.table.options.afterRender && this.table.options.afterRender(stage);
@@ -47839,15 +46694,6 @@
47839
46694
  updateDomContainer() {
47840
46695
  updateReactContainer(this.table);
47841
46696
  }
47842
- setLoadingHierarchyState(col, row) {
47843
- const cellGroup = this.getCell(col, row);
47844
- const iconGraphic = cellGroup.getChildByName('collapse', true);
47845
- if (iconGraphic) {
47846
- const regedIcons = get$2();
47847
- const loadingIcon = regedIcons[InternalIconName.loadingIconName];
47848
- dealWithIcon(loadingIcon, iconGraphic, col, row);
47849
- }
47850
- }
47851
46697
  }
47852
46698
 
47853
46699
  function checkCellInSelect(col, row, cellRanges) {
@@ -53444,8 +52290,7 @@
53444
52290
  'hover',
53445
52291
  'cursor',
53446
52292
  'shape',
53447
- 'interactive',
53448
- 'isGif'
52293
+ 'interactive'
53449
52294
  ];
53450
52295
  const iconPropKeys = ICON_PROP_KEYS;
53451
52296
 
@@ -55313,24 +54158,19 @@
55313
54158
  }
55314
54159
  getCustomCellStyleId(col, row) {
55315
54160
  let customStyleId;
55316
- const range = this.table.getCellRange(col, row);
55317
- for (let c = range.start.col; c <= range.end.col; c++) {
55318
- for (let r = range.start.row; r <= range.end.row; r++) {
55319
- this.customCellStyleArrangement.forEach(style => {
55320
- if (style.cellPosition.range) {
55321
- if (style.cellPosition.range.start.col <= c &&
55322
- style.cellPosition.range.end.col >= c &&
55323
- style.cellPosition.range.start.row <= r &&
55324
- style.cellPosition.range.end.row >= r) {
55325
- customStyleId = style.customStyleId;
55326
- }
55327
- }
55328
- else if (style.cellPosition.col === c && style.cellPosition.row === r) {
55329
- customStyleId = style.customStyleId;
55330
- }
55331
- });
54161
+ this.customCellStyleArrangement.forEach(style => {
54162
+ if (style.cellPosition.range) {
54163
+ if (style.cellPosition.range.start.col <= col &&
54164
+ style.cellPosition.range.end.col >= col &&
54165
+ style.cellPosition.range.start.row <= row &&
54166
+ style.cellPosition.range.end.row >= row) {
54167
+ customStyleId = style.customStyleId;
54168
+ }
55332
54169
  }
55333
- }
54170
+ else if (style.cellPosition.col === col && style.cellPosition.row === row) {
54171
+ customStyleId = style.customStyleId;
54172
+ }
54173
+ });
55334
54174
  return customStyleId;
55335
54175
  }
55336
54176
  getCustomCellStyleOption(customStyleId) {
@@ -55377,10 +54217,7 @@
55377
54217
  }
55378
54218
  return style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row;
55379
54219
  });
55380
- if (index === -1 && !customStyleId) {
55381
- return;
55382
- }
55383
- else if (index === -1 && customStyleId) {
54220
+ if (index === -1) {
55384
54221
  this.customCellStyleArrangement.push({
55385
54222
  cellPosition: {
55386
54223
  col: cellPos.col,
@@ -55393,21 +54230,13 @@
55393
54230
  else if (this.customCellStyleArrangement[index].customStyleId === customStyleId) {
55394
54231
  return;
55395
54232
  }
55396
- else if (customStyleId) {
55397
- this.customCellStyleArrangement[index].customStyleId = customStyleId;
55398
- }
55399
54233
  else {
55400
- this.customCellStyleArrangement.splice(index, 1);
54234
+ this.customCellStyleArrangement[index].customStyleId = customStyleId;
55401
54235
  }
55402
54236
  if (cellPos.range) {
55403
54237
  for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) {
55404
54238
  for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) {
55405
- const range = this.table.getCellRange(col, row);
55406
- for (let c = range.start.col; c <= range.end.col; c++) {
55407
- for (let r = range.start.row; r <= range.end.row; r++) {
55408
- this.table.scenegraph.updateCellContent(c, r);
55409
- }
55410
- }
54239
+ this.table.scenegraph.updateCellContent(col, row);
55411
54240
  }
55412
54241
  }
55413
54242
  }
@@ -57383,10 +56212,7 @@
57383
56212
  constructor(table) {
57384
56213
  this.table = table;
57385
56214
  this.timeline = new DefaultTimeline();
57386
- this.ticker = new DefaultTicker();
57387
- this.ticker.addTimeline(this.timeline);
57388
- const TICKER_FPS = 60;
57389
- this.ticker.setFPS(TICKER_FPS);
56215
+ this.ticker = new DefaultTicker([this.timeline]);
57390
56216
  this.tempGraphic = createRect({});
57391
56217
  }
57392
56218
  scrollTo(position, animationOption) {
@@ -57447,7 +56273,7 @@
57447
56273
  return TABLE_EVENT_TYPE;
57448
56274
  }
57449
56275
  options;
57450
- version = "1.10.6-alpha.0";
56276
+ version = "1.10.6-alpha.1";
57451
56277
  pagination;
57452
56278
  id = `VTable${Date.now()}`;
57453
56279
  headerStyleCache;
@@ -58684,9 +57510,6 @@
58684
57510
  }
58685
57511
  release() {
58686
57512
  const internalProps = this.internalProps;
58687
- if (this.isReleased) {
58688
- return;
58689
- }
58690
57513
  internalProps.tooltipHandler?.release?.();
58691
57514
  internalProps.menuHandler?.release?.();
58692
57515
  IconCache.clearAll();
@@ -63877,9 +62700,6 @@
63877
62700
  });
63878
62701
  }
63879
62702
  }
63880
- setLoadingHierarchyState(col, row) {
63881
- this.scenegraph.setLoadingHierarchyState(col, row);
63882
- }
63883
62703
  _refreshHierarchyState(col, row, recalculateColWidths = true) {
63884
62704
  let notFillWidth = false;
63885
62705
  let notFillHeight = false;
@@ -76828,237 +75648,8 @@
76828
75648
  return new Radio(params ? params.attribute : {});
76829
75649
  }
76830
75650
 
76831
- class CarouselAnimationPlugin {
76832
- table;
76833
- rowCount;
76834
- colCount;
76835
- animationDuration;
76836
- animationDelay;
76837
- animationEasing;
76838
- replaceScrollAction;
76839
- playing;
76840
- row;
76841
- col;
76842
- constructor(table, options) {
76843
- this.table = table;
76844
- this.rowCount = options?.rowCount ?? undefined;
76845
- this.colCount = options?.colCount ?? undefined;
76846
- this.animationDuration = options?.animationDuration ?? 500;
76847
- this.animationDelay = options?.animationDelay ?? 1000;
76848
- this.animationEasing = options?.animationEasing ?? 'linear';
76849
- this.replaceScrollAction = options?.replaceScrollAction ?? false;
76850
- this.playing = false;
76851
- this.row = table.frozenRowCount;
76852
- this.col = table.frozenColCount;
76853
- this.init();
76854
- }
76855
- init() {
76856
- if (this.replaceScrollAction) {
76857
- this.table.disableScroll();
76858
- this.table.scenegraph.stage.addEventListener('wheel', this.onScrollEnd.bind(this));
76859
- }
76860
- }
76861
- onScrollEnd(e) {
76862
- if (this.rowCount) {
76863
- if (e.deltaY > 0) {
76864
- this.row += this.rowCount;
76865
- this.row = Math.min(this.row, this.table.rowCount - this.table.frozenRowCount);
76866
- }
76867
- else if (e.deltaY < 0) {
76868
- this.row -= this.rowCount;
76869
- this.row = Math.max(this.row, this.table.frozenRowCount);
76870
- }
76871
- this.table.scrollToRow(this.row, { duration: this.animationDuration, easing: this.animationEasing });
76872
- }
76873
- else if (this.colCount) {
76874
- if (e.deltaX > 0) {
76875
- this.col += this.colCount;
76876
- this.col = Math.min(this.col, this.table.colCount - this.table.frozenColCount);
76877
- }
76878
- else if (e.deltaX < 0) {
76879
- this.col -= this.colCount;
76880
- this.col = Math.max(this.col, this.table.frozenColCount);
76881
- }
76882
- this.table.scrollToCol(this.col, { duration: this.animationDuration, easing: this.animationEasing });
76883
- }
76884
- }
76885
- play() {
76886
- this.playing = true;
76887
- if (this.rowCount) {
76888
- this.updateRow();
76889
- }
76890
- else if (this.colCount) {
76891
- this.updateCol();
76892
- }
76893
- }
76894
- pause() {
76895
- this.playing = false;
76896
- }
76897
- updateRow() {
76898
- if (!this.playing) {
76899
- return;
76900
- }
76901
- if (this.table.scenegraph.proxy.screenTopRow !== this.row) {
76902
- this.row = this.table.frozenRowCount;
76903
- }
76904
- else {
76905
- this.row += this.rowCount;
76906
- }
76907
- this.table.scrollToRow(this.row, { duration: this.animationDuration, easing: this.animationEasing });
76908
- setTimeout(() => {
76909
- this.updateRow();
76910
- }, this.animationDuration + this.animationDelay);
76911
- }
76912
- updateCol() {
76913
- if (!this.playing) {
76914
- return;
76915
- }
76916
- if (this.table.scenegraph.proxy.screenLeftCol !== this.col) {
76917
- this.col = this.table.frozenColCount;
76918
- }
76919
- else {
76920
- this.col += this.colCount;
76921
- }
76922
- this.table.scrollToCol(this.col, { duration: this.animationDuration, easing: this.animationEasing });
76923
- setTimeout(() => {
76924
- this.updateCol();
76925
- }, this.animationDuration + 50);
76926
- }
76927
- }
76928
-
76929
- class HeaderHighlightPlugin {
76930
- table;
76931
- options;
76932
- colHeaderRange;
76933
- rowHeaderRange;
76934
- constructor(table, options) {
76935
- this.table = table;
76936
- this.options = options;
76937
- this.registerStyle();
76938
- this.bindEvent();
76939
- }
76940
- registerStyle() {
76941
- this.table.registerCustomCellStyle('col-highlight', {
76942
- bgColor: this.options?.colHighlightBGColor ?? '#82b2f5',
76943
- color: this.options?.colHighlightColor ?? '#FFF'
76944
- });
76945
- this.table.registerCustomCellStyle('row-highlight', {
76946
- bgColor: this.options?.rowHighlightBGColor ?? '#82b2f5',
76947
- color: this.options?.rowHighlightColor ?? '#FFF'
76948
- });
76949
- }
76950
- bindEvent() {
76951
- this.table.on('selected_cell', e => {
76952
- this.updateHighlight();
76953
- });
76954
- this.table.on('selected_clear', () => {
76955
- this.clearHighlight();
76956
- });
76957
- }
76958
- clearHighlight() {
76959
- this.colHeaderRange && this.table.arrangeCustomCellStyle({ range: this.colHeaderRange }, undefined);
76960
- this.rowHeaderRange && this.table.arrangeCustomCellStyle({ range: this.rowHeaderRange }, undefined);
76961
- this.colHeaderRange = undefined;
76962
- this.rowHeaderRange = undefined;
76963
- }
76964
- updateHighlight() {
76965
- if (this.options?.colHighlight === false && this.options?.rowHighlight === false) {
76966
- return;
76967
- }
76968
- const selectRanges = this.table.getSelectedCellRanges();
76969
- if (selectRanges.length === 0) {
76970
- this.clearHighlight();
76971
- return;
76972
- }
76973
- const selectRange = selectRanges[0];
76974
- const rowSelectRange = [selectRange.start.row, selectRange.end.row];
76975
- rowSelectRange.sort((a, b) => a - b);
76976
- const colSelectRange = [selectRange.start.col, selectRange.end.col];
76977
- colSelectRange.sort((a, b) => a - b);
76978
- let colHeaderRange;
76979
- let rowHeaderRange;
76980
- if (this.table.isPivotTable()) {
76981
- colHeaderRange = {
76982
- start: {
76983
- col: colSelectRange[0],
76984
- row: 0
76985
- },
76986
- end: {
76987
- col: colSelectRange[1],
76988
- row: this.table.columnHeaderLevelCount - 1
76989
- }
76990
- };
76991
- rowHeaderRange = {
76992
- start: {
76993
- col: 0,
76994
- row: rowSelectRange[0]
76995
- },
76996
- end: {
76997
- col: this.table.rowHeaderLevelCount - 1,
76998
- row: rowSelectRange[1]
76999
- }
77000
- };
77001
- }
77002
- else if (this.table.internalProps.transpose) {
77003
- rowHeaderRange = {
77004
- start: {
77005
- col: 0,
77006
- row: rowSelectRange[0]
77007
- },
77008
- end: {
77009
- col: this.table.rowHeaderLevelCount - 1,
77010
- row: rowSelectRange[1]
77011
- }
77012
- };
77013
- }
77014
- else {
77015
- colHeaderRange = {
77016
- start: {
77017
- col: colSelectRange[0],
77018
- row: 0
77019
- },
77020
- end: {
77021
- col: colSelectRange[1],
77022
- row: this.table.columnHeaderLevelCount - 1
77023
- }
77024
- };
77025
- if (this.table.internalProps.rowSeriesNumber) {
77026
- rowHeaderRange = {
77027
- start: {
77028
- col: 0,
77029
- row: rowSelectRange[0]
77030
- },
77031
- end: {
77032
- col: 0,
77033
- row: rowSelectRange[1]
77034
- }
77035
- };
77036
- }
77037
- }
77038
- if (this.options?.colHighlight !== false && !isSameRange(this.colHeaderRange, colHeaderRange)) {
77039
- this.colHeaderRange && this.table.arrangeCustomCellStyle({ range: this.colHeaderRange }, undefined);
77040
- colHeaderRange && this.table.arrangeCustomCellStyle({ range: colHeaderRange }, 'col-highlight');
77041
- this.colHeaderRange = colHeaderRange;
77042
- }
77043
- if (this.options?.rowHighlight !== false && !isSameRange(this.rowHeaderRange, rowHeaderRange)) {
77044
- this.rowHeaderRange && this.table.arrangeCustomCellStyle({ range: this.rowHeaderRange }, undefined);
77045
- rowHeaderRange && this.table.arrangeCustomCellStyle({ range: rowHeaderRange }, 'row-highlight');
77046
- this.rowHeaderRange = rowHeaderRange;
77047
- }
77048
- }
77049
- }
77050
- function isSameRange(a, b) {
77051
- if (a === undefined && b === undefined) {
77052
- return true;
77053
- }
77054
- if (a === undefined || b === undefined) {
77055
- return false;
77056
- }
77057
- return (a.start.col === b.start.col && a.start.row === b.start.row && a.end.col === b.end.col && a.end.row === b.end.row);
77058
- }
77059
-
77060
75651
  registerForVrender();
77061
- const version = "1.10.6-alpha.0";
75652
+ const version = "1.10.6-alpha.1";
77062
75653
  function getIcons() {
77063
75654
  return get$2();
77064
75655
  }
@@ -77066,11 +75657,8 @@
77066
75657
  clearAll();
77067
75658
  }
77068
75659
 
77069
- exports.CarouselAnimationPlugin = CarouselAnimationPlugin;
77070
75660
  exports.CustomLayout = index;
77071
75661
  exports.DataStatistics = DataStatistics;
77072
- exports.HeaderHighlightPlugin = HeaderHighlightPlugin;
77073
- exports.InvertHighlightPlugin = InvertHighlightPlugin;
77074
75662
  exports.ListTable = ListTableAll;
77075
75663
  exports.ListTableSimple = ListTableSimple;
77076
75664
  exports.PIVOT_CHART_EVENT_TYPE = PIVOT_CHART_EVENT_TYPE;
@@ -77103,7 +75691,6 @@
77103
75691
  exports.getTargetCell = getTargetCell;
77104
75692
  exports.graphicUtil = graphicUtil;
77105
75693
  exports.jsx = jsx;
77106
- exports.onBeforeAttributeUpdateForInvertHighlight = onBeforeAttributeUpdateForInvertHighlight;
77107
75694
  exports.register = register$1;
77108
75695
  exports.registerAxis = registerAxis;
77109
75696
  exports.registerChartCell = registerChartCell;