@visactor/vtable 1.9.2-alpha.4 → 1.9.2-alpha.5

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 (81) hide show
  1. package/cjs/components/menu/dom/logic/MenuElement.js +1 -1
  2. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
  3. package/cjs/components/menu/dom/logic/MenuElementStyle.js +1 -1
  4. package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
  5. package/cjs/core/BaseTable.js +1 -1
  6. package/cjs/core/BaseTable.js.map +1 -1
  7. package/cjs/dataset/dataset-pivot-table.js +2 -1
  8. package/cjs/dataset/dataset.js +0 -1
  9. package/cjs/event/listener/table-group.js +3 -3
  10. package/cjs/event/listener/table-group.js.map +1 -1
  11. package/cjs/index.d.ts +1 -3
  12. package/cjs/index.js +2 -20
  13. package/cjs/index.js.map +1 -1
  14. package/cjs/layout/index.js +2 -1
  15. package/cjs/layout/layout-helper.js +1 -2
  16. package/cjs/scenegraph/graphic/group.js +1 -2
  17. package/cjs/scenegraph/graphic/group.js.map +1 -1
  18. package/cjs/scenegraph/group-creater/cell-helper.js +2 -3
  19. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  20. package/cjs/scenegraph/layout/compute-row-height.js +1 -1
  21. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  22. package/cjs/scenegraph/scenegraph.js +1 -1
  23. package/cjs/scenegraph/utils/cell-border-stroke-width.js +9 -4
  24. package/cjs/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
  25. package/cjs/tools/style.d.ts +2 -0
  26. package/cjs/tools/style.js +17 -4
  27. package/cjs/tools/style.js.map +1 -1
  28. package/cjs/ts-types/base-table.d.ts +2 -4
  29. package/cjs/ts-types/base-table.js.map +1 -1
  30. package/cjs/vrender.js.map +1 -1
  31. package/dist/vtable.js +120 -271
  32. package/dist/vtable.min.js +2 -2
  33. package/es/components/menu/dom/logic/MenuElement.js +1 -1
  34. package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
  35. package/es/components/menu/dom/logic/MenuElementStyle.js +1 -1
  36. package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
  37. package/es/core/BaseTable.js +1 -1
  38. package/es/core/BaseTable.js.map +1 -1
  39. package/es/dataset/dataset-pivot-table.js +2 -1
  40. package/es/dataset/dataset.js +1 -2
  41. package/es/event/listener/table-group.js +3 -3
  42. package/es/event/listener/table-group.js.map +1 -1
  43. package/es/index.d.ts +1 -3
  44. package/es/index.js +1 -5
  45. package/es/index.js.map +1 -1
  46. package/es/layout/index.js +2 -1
  47. package/es/layout/layout-helper.js +1 -2
  48. package/es/scenegraph/graphic/group.js +1 -2
  49. package/es/scenegraph/graphic/group.js.map +1 -1
  50. package/es/scenegraph/group-creater/cell-helper.js +1 -4
  51. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  52. package/es/scenegraph/layout/compute-row-height.js +1 -1
  53. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  54. package/es/scenegraph/scenegraph.js +1 -1
  55. package/es/scenegraph/utils/cell-border-stroke-width.js +3 -1
  56. package/es/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
  57. package/es/tools/style.d.ts +2 -0
  58. package/es/tools/style.js +10 -0
  59. package/es/tools/style.js.map +1 -1
  60. package/es/ts-types/base-table.d.ts +2 -4
  61. package/es/ts-types/base-table.js.map +1 -1
  62. package/es/vrender.js.map +1 -1
  63. package/package.json +5 -5
  64. package/cjs/plugins/carousel-animation.d.ts +0 -29
  65. package/cjs/plugins/carousel-animation.js +0 -60
  66. package/cjs/plugins/carousel-animation.js.map +0 -1
  67. package/cjs/plugins/invert-highlight.d.ts +0 -19
  68. package/cjs/plugins/invert-highlight.js +0 -72
  69. package/cjs/plugins/invert-highlight.js.map +0 -1
  70. package/cjs/tools/cell-range.d.ts +0 -2
  71. package/cjs/tools/cell-range.js +0 -10
  72. package/cjs/tools/cell-range.js.map +0 -1
  73. package/es/plugins/carousel-animation.d.ts +0 -29
  74. package/es/plugins/carousel-animation.js +0 -52
  75. package/es/plugins/carousel-animation.js.map +0 -1
  76. package/es/plugins/invert-highlight.d.ts +0 -19
  77. package/es/plugins/invert-highlight.js +0 -69
  78. package/es/plugins/invert-highlight.js.map +0 -1
  79. package/es/tools/cell-range.d.ts +0 -2
  80. package/es/tools/cell-range.js +0 -4
  81. package/es/tools/cell-range.js.map +0 -1
package/dist/vtable.js CHANGED
@@ -4448,8 +4448,14 @@
4448
4448
  return needTestLetter && (index = testLetter(desc, index)), index;
4449
4449
  }
4450
4450
  function testLetter(string, index) {
4451
+ let negativeWrongMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
4451
4452
  let i = index;
4452
- for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return index;
4453
+ for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return negativeWrongMatch ? testLetter2(string, index) : index;
4454
+ return i;
4455
+ }
4456
+ function testLetter2(string, index) {
4457
+ let i = index;
4458
+ for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i++, i >= string.length) return i;
4453
4459
  return i;
4454
4460
  }
4455
4461
  function measureTextCanvas(text, character) {
@@ -4547,7 +4553,7 @@
4547
4553
  width: length
4548
4554
  };
4549
4555
  }
4550
- clipText(text, options, width, wordBreak) {
4556
+ clipText(text, options, width, wordBreak, keepAllBreak) {
4551
4557
  if (0 === text.length) return {
4552
4558
  str: "",
4553
4559
  width: 0
@@ -4563,8 +4569,8 @@
4563
4569
  };
4564
4570
  const data = this._clipText(text, options, width, 0, text.length - 1, "end", !1);
4565
4571
  if (wordBreak && data.str !== text) {
4566
- const index = testLetter(text, data.str.length);
4567
- index !== data.str.length && (data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
4572
+ let index = testLetter(text, data.str.length, keepAllBreak);
4573
+ index !== data.str.length && (index > data.str.length && (data.wordBreaked = index, index = data.str.length), data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
4568
4574
  }
4569
4575
  return data;
4570
4576
  }
@@ -8644,7 +8650,7 @@
8644
8650
  const path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
8645
8651
  return renderCommandList(path.commandList, context, x, y), context.setShadowBlendStyle && context.setShadowBlendStyle(graphic, graphic.attribute, themeAttributes), doStroke && (strokeCb ? strokeCb(context, graphic.attribute, themeAttributes) : sVisible && (context.setStrokeStyle(graphic, graphic.attribute, x - originX, y - originY, themeAttributes), context.stroke())), doFill && (fillCb ? fillCb(context, graphic.attribute, themeAttributes) : fVisible && (context.setCommonStyle(graphic, graphic.attribute, x - originX, y - originY, themeAttributes), context.fill())), !0;
8646
8652
  }
8647
- function intersect$2(x0, y0, x1, y1, x2, y2, x3, y3) {
8653
+ function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
8648
8654
  const x10 = x1 - x0,
8649
8655
  y10 = y1 - y0,
8650
8656
  x32 = x3 - x2,
@@ -8713,7 +8719,7 @@
8713
8719
  yire = innerRadius * sin(innerEndAngle);
8714
8720
  let xore, yore, xirs, yirs;
8715
8721
  if ((maxInnerCornerRadius > epsilon || maxOuterCornerRadius > epsilon) && (xore = outerRadius * cos(outerEndAngle), yore = outerRadius * sin(outerEndAngle), xirs = innerRadius * cos(innerStartAngle), yirs = innerRadius * sin(innerStartAngle), deltaAngle < pi)) {
8716
- const oc = intersect$2(xors, yors, xirs, yirs, xore, yore, xire, yire);
8722
+ const oc = intersect(xors, yors, xirs, yirs, xore, yore, xire, yire);
8717
8723
  if (oc) {
8718
8724
  const ax = xors - oc[0],
8719
8725
  ay = yors - oc[1],
@@ -9278,7 +9284,7 @@
9278
9284
  validCheck(attribute, theme, aabbBounds, graphic) {
9279
9285
  if (!graphic) return !0;
9280
9286
  if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
9281
- if (graphic.shadowRoot) return !0;
9287
+ if (graphic.shadowRoot || graphic.isContainer) return !0;
9282
9288
  const {
9283
9289
  visible = theme.visible
9284
9290
  } = attribute;
@@ -12547,20 +12553,22 @@
12547
12553
  });
12548
12554
  break;
12549
12555
  }
12550
- const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
12551
- if ("" !== str && "" === clip.str) {
12556
+ const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-all" !== wordBreak, "keep-all" === wordBreak);
12557
+ if ("" !== str && "" === clip.str || clip.wordBreaked) {
12552
12558
  if (ellipsis) {
12553
12559
  const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
12554
12560
  clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
12555
12561
  } else clip.str = "", clip.width = 0;
12556
12562
  needCut = !1;
12557
12563
  }
12558
- if (linesLayout.push({
12564
+ linesLayout.push({
12559
12565
  str: clip.str,
12560
12566
  width: clip.width
12561
- }), clip.str.length === str.length) ;else if (needCut) {
12562
- const newStr = str.substring(clip.str.length);
12563
- lines.splice(i + 1, 0, newStr);
12567
+ });
12568
+ let cutLength = clip.str.length;
12569
+ if (!clip.wordBreaked || "" !== str && "" === clip.str || (needCut = !0, cutLength = clip.wordBreaked), clip.str.length === str.length) ;else if (needCut) {
12570
+ let newStr = str.substring(cutLength);
12571
+ "keep-all" === wordBreak && (newStr = newStr.replace(/^\s+/g, "")), lines.splice(i + 1, 0, newStr);
12564
12572
  }
12565
12573
  }
12566
12574
  let maxWidth = 0;
@@ -21030,6 +21038,15 @@
21030
21038
  labelPoint = getVerticalCoord(point, getCircleVerticalVector(labelOffset, point, center, inside));
21031
21039
  return getCircleLabelPosition(labelPoint, getCircleVerticalVector(labelOffset || 1, labelPoint, center, inside));
21032
21040
  }
21041
+ function textIntersect(textA, textB, sep) {
21042
+ let a = textA.OBBBounds,
21043
+ b = textB.OBBBounds;
21044
+ return a && b && !a.empty() && !b.empty() ? a.intersects(b) : (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
21045
+ }
21046
+ function hasOverlap(items, pad) {
21047
+ for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (b = items[i], textIntersect(a, b, pad)) return !0;
21048
+ return !1;
21049
+ }
21033
21050
 
21034
21051
  const dispatchHoverState = (e, container, lastHover) => {
21035
21052
  const target = e.target;
@@ -21354,17 +21371,9 @@
21354
21371
  },
21355
21372
  greedy: function (items, sep) {
21356
21373
  let a;
21357
- return items.filter((b, i) => i && intersect$1(a, b, sep) ? b.setAttribute("opacity", 0) : (a = b, 1));
21374
+ return items.filter((b, i) => i && textIntersect(a, b, sep) ? b.setAttribute("opacity", 0) : (a = b, 1));
21358
21375
  }
21359
21376
  };
21360
- function intersect$1(textA, textB, sep) {
21361
- let a = textA.OBBBounds,
21362
- b = textB.OBBBounds;
21363
- return a && b && !a.empty() && !b.empty() ? a.intersects(b) : (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
21364
- }
21365
- function hasOverlap$1(items, pad) {
21366
- for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (intersect$1(a, b = items[i], pad)) return !0;
21367
- }
21368
21377
  function hasBounds(item) {
21369
21378
  let bounds;
21370
21379
  return bounds = item.OBBBounds.empty() ? item.AABBBounds : item.OBBBounds, bounds.width() > 1 && bounds.height() > 1;
@@ -21372,6 +21381,20 @@
21372
21381
  function reset(items) {
21373
21382
  return items.forEach(item => item.setAttribute("opacity", 1)), items;
21374
21383
  }
21384
+ function forceItemVisible$1(sourceItem, items, check, comparator) {
21385
+ let inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
21386
+ if (check && !sourceItem.attribute.opacity) {
21387
+ const remainLength = items.length;
21388
+ if (remainLength > 1) {
21389
+ sourceItem.setAttribute("opacity", 1);
21390
+ for (let i = 0; i < remainLength; i++) {
21391
+ const item = inverse ? items[remainLength - 1 - i] : items[i];
21392
+ if (!comparator(item)) break;
21393
+ item.setAttribute("opacity", 0);
21394
+ }
21395
+ }
21396
+ }
21397
+ }
21375
21398
  function autoHide(labels, config) {
21376
21399
  if (isEmpty$1(labels)) return;
21377
21400
  const source = labels.filter(hasBounds);
@@ -21383,20 +21406,19 @@
21383
21406
  separation: sep = 0
21384
21407
  } = config,
21385
21408
  reduce = isFunction$3(method) ? method : methods$1[method] || methods$1.parity;
21386
- if (items.length >= 3 && hasOverlap$1(items, sep)) {
21409
+ if (items.length >= 3 && hasOverlap(items, sep)) {
21387
21410
  do {
21388
21411
  items = reduce(items, sep);
21389
- } while (items.length >= 3 && hasOverlap$1(items, sep));
21390
- if (items.length < 3 || config.lastVisible) {
21391
- const lastSourceItem = last$1(source);
21392
- if (!lastSourceItem.attribute.opacity) {
21393
- const remainLength = items.length;
21394
- if (remainLength > 1) {
21395
- lastSourceItem.setAttribute("opacity", 1);
21396
- for (let i = remainLength - 1; i >= 0 && intersect$1(items[i], lastSourceItem, sep); i--) items[i].setAttribute("opacity", 0);
21397
- }
21398
- }
21399
- }
21412
+ } while (items.length >= 3 && hasOverlap(items, sep));
21413
+ const shouldCheck = function (length, visibility) {
21414
+ let checkLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
21415
+ return checkLength && length < 3 || visibility;
21416
+ },
21417
+ checkFirst = shouldCheck(items.length, config.firstVisible, !1);
21418
+ let checkLast = shouldCheck(items.length, config.lastVisible);
21419
+ const firstSourceItem = source[0],
21420
+ lastSourceItem = last$1(source);
21421
+ textIntersect(firstSourceItem, lastSourceItem, sep) && checkFirst && checkLast && (lastSourceItem.setAttribute("opacity", 0), checkLast = !1), forceItemVisible$1(firstSourceItem, items, checkFirst, item => textIntersect(item, firstSourceItem, sep)), forceItemVisible$1(lastSourceItem, items, checkLast, item => textIntersect(item, lastSourceItem, sep) || !(!checkFirst || item === firstSourceItem) && textIntersect(item, firstSourceItem, sep), !0);
21400
21422
  }
21401
21423
  source.forEach(item => {
21402
21424
  item.setAttribute("visible", !!item.attribute.opacity);
@@ -22003,6 +22025,7 @@
22003
22025
  autoHideMethod: autoHideMethod,
22004
22026
  autoHideSeparation: autoHideSeparation,
22005
22027
  lastVisible: lastVisible,
22028
+ firstVisible: firstVisible,
22006
22029
  autoWrap: autoWrap$1,
22007
22030
  overflowLimitLength: overflowLimitLength
22008
22031
  } = label;
@@ -22036,7 +22059,8 @@
22036
22059
  orient: orient,
22037
22060
  method: autoHideMethod,
22038
22061
  separation: autoHideSeparation,
22039
- lastVisible: lastVisible
22062
+ lastVisible: lastVisible,
22063
+ firstVisible: firstVisible
22040
22064
  });
22041
22065
  }
22042
22066
  }
@@ -22106,13 +22130,6 @@
22106
22130
  nextBounds = new AABBBounds$1(nextLabel).expand(gap / 2);
22107
22131
  return prevBounds.intersects(nextBounds);
22108
22132
  };
22109
- function intersect(a, b, sep) {
22110
- return sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2);
22111
- }
22112
- function hasOverlap(items, pad) {
22113
- for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (b = items[i], intersect(a.AABBBounds, b.AABBBounds, pad)) return !0;
22114
- return !1;
22115
- }
22116
22133
  const MIN_TICK_GAP = 12;
22117
22134
  const calculateFlushPos = (basePosition, size, rangePosition, otherEnd) => rangePosition < basePosition ? Math.max(basePosition - size / 2, rangePosition) : rangePosition > basePosition ? Math.min(basePosition - size / 2, rangePosition - size) : rangePosition < otherEnd ? rangePosition : rangePosition - size;
22118
22135
  const getCartesianLabelBounds = (scale, domain, op) => {
@@ -22646,6 +22663,20 @@
22646
22663
  } else scaleTicks = getTicks(count);
22647
22664
  return scaleTicks;
22648
22665
  }
22666
+ function forceItemVisible(sourceItem, items, check, comparator) {
22667
+ let inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
22668
+ if (check && !items.includes(sourceItem)) {
22669
+ let remainLength = items.length;
22670
+ if (remainLength > 1) {
22671
+ inverse ? items.push(sourceItem) : items.unshift(sourceItem);
22672
+ for (let i = 0; i < remainLength; i++) {
22673
+ const index = inverse ? remainLength - 1 - i : i;
22674
+ if (!comparator(items[index])) break;
22675
+ items.splice(index, 1), i--, remainLength--;
22676
+ }
22677
+ }
22678
+ }
22679
+ }
22649
22680
  const continuousTicks = (scale, op) => {
22650
22681
  var _a, _b;
22651
22682
  if (!isContinuous(scale.type)) return convertDomainToTickData(scale.domain());
@@ -22685,7 +22716,8 @@
22685
22716
  customTicks: customTicks
22686
22717
  }));
22687
22718
  }
22688
- if (op.sampling && ("cartesian" === op.coordinateType || "polar" === op.coordinateType && "radius" === op.axisOrientType)) {
22719
+ const domain = scale.domain();
22720
+ if (op.labelFirstVisible && domain[0] !== scaleTicks[0] && !scaleTicks.includes(domain[0]) && scaleTicks.unshift(domain[0]), op.labelLastVisible && domain[domain.length - 1] !== scaleTicks[scaleTicks.length - 1] && !scaleTicks.includes(domain[domain.length - 1]) && scaleTicks.push(domain[domain.length - 1]), op.sampling && scaleTicks.length > 1 && ("cartesian" === op.coordinateType || "polar" === op.coordinateType && "radius" === op.axisOrientType)) {
22689
22721
  const {
22690
22722
  labelGap = 4,
22691
22723
  labelFlush: labelFlush
@@ -22694,8 +22726,14 @@
22694
22726
  AABBBounds: bounds,
22695
22727
  value: scaleTicks[i]
22696
22728
  }));
22697
- const samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
22729
+ const source = [...items],
22730
+ firstSourceItem = source[0],
22731
+ lastSourceItem = last$1(source),
22732
+ samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
22698
22733
  for (; items.length >= 3 && hasOverlap(items, labelGap);) items = samplingMethod(items, labelGap);
22734
+ const checkFirst = op.labelFirstVisible;
22735
+ let checkLast = op.labelLastVisible;
22736
+ textIntersect(firstSourceItem, lastSourceItem, labelGap) && items.includes(lastSourceItem) && items.length > 1 && checkFirst && checkLast && (items.splice(items.indexOf(lastSourceItem), 1), checkLast = !1), forceItemVisible(firstSourceItem, items, checkFirst, item => textIntersect(item, firstSourceItem, labelGap)), forceItemVisible(lastSourceItem, items, checkLast, item => textIntersect(item, lastSourceItem, labelGap) || !(!checkFirst || item === firstSourceItem) && textIntersect(item, firstSourceItem, labelGap), !0);
22699
22737
  const ticks = items.map(item => item.value);
22700
22738
  ticks.length < 3 && labelFlush && (ticks.length > 1 && ticks.pop(), last$1(ticks) !== last$1(scaleTicks) && ticks.push(last$1(scaleTicks))), scaleTicks = ticks;
22701
22739
  }
@@ -22707,7 +22745,7 @@
22707
22745
  },
22708
22746
  greedy: function (items, sep) {
22709
22747
  let a;
22710
- return items.filter((b, i) => (!i || !intersect(a.AABBBounds, b.AABBBounds, sep)) && (a = b, !0));
22748
+ return items.filter((b, i) => (!i || !textIntersect(a, b, sep)) && (a = b, !0));
22711
22749
  }
22712
22750
  };
22713
22751
 
@@ -23469,8 +23507,8 @@
23469
23507
  this._autoEllipsis(autoEllipsisStrategy, layoutWidth, labelShape, valueShape), valueAttr.alignRight ? valueShape.setAttributes({
23470
23508
  textAlign: "right",
23471
23509
  x: this._itemWidthByUser - shapeSize / 2 - parsedPadding[1] - parsedPadding[3] - focusSpace - valueSpace
23472
- }) : valueShape.setAttribute("x", valueSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2));
23473
- } else valueShape.setAttribute("x", valueSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2));
23510
+ }) : valueShape.setAttribute("x", labelSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2));
23511
+ } else valueShape.setAttribute("x", labelSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2));
23474
23512
  focusStartX = valueSpace + (valueShape.AABBBounds.empty() ? 0 : valueShape.AABBBounds.x2), innerGroup.add(valueShape);
23475
23513
  } else this._itemWidthByUser ? (labelShape.setAttribute("maxLineWidth", this._itemWidthByUser - parsedPadding[1] - parsedPadding[3] - shapeSize - shapeSpace - focusSpace), focusStartX = labelSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2)) : focusStartX = labelSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2);
23476
23514
  focusShape && (focusShape.setAttribute("x", focusStartX), innerGroup.add(focusShape));
@@ -23536,9 +23574,8 @@
23536
23574
  disableTriggerEvent: disableTriggerEvent
23537
23575
  }));
23538
23576
  }
23539
- _updatePositionOfPager(contentWidth, contentHeight, renderStartY, compWidth, compHeight) {
23577
+ _updatePositionOfPager(renderStartY, compWidth, compHeight) {
23540
23578
  const {
23541
- maxHeight: maxHeight,
23542
23579
  pager: pager
23543
23580
  } = this.attribute,
23544
23581
  {
@@ -23549,14 +23586,14 @@
23549
23586
  if (this._pagerComponent.setTotal(totalPage), isHorizontal) {
23550
23587
  let y;
23551
23588
  y = "start" === position ? renderStartY : "end" === position ? renderStartY + compHeight - this._pagerComponent.AABBBounds.height() / 2 : renderStartY + compHeight / 2 - this._pagerComponent.AABBBounds.height() / 2, this._pagerComponent.setAttributes({
23552
- x: contentWidth,
23589
+ x: compWidth - this._pagerComponent.AABBBounds.width(),
23553
23590
  y: y
23554
23591
  });
23555
23592
  } else {
23556
23593
  let x;
23557
23594
  x = "start" === position ? 0 : "end" === position ? compWidth - this._pagerComponent.AABBBounds.width() : (compWidth - this._pagerComponent.AABBBounds.width()) / 2, this._pagerComponent.setAttributes({
23558
23595
  x: x,
23559
- y: maxHeight - this._pagerComponent.AABBBounds.height()
23596
+ y: compHeight - this._pagerComponent.AABBBounds.height()
23560
23597
  });
23561
23598
  }
23562
23599
  }
@@ -23585,11 +23622,10 @@
23585
23622
  const {
23586
23623
  value: value
23587
23624
  } = e.detail;
23588
- let newPage = value[0] * this._itemContext.totalPage;
23589
- return pager.scrollByPosition ? newPage += 1 : newPage = Math.floor(newPage) + 1, newPage;
23625
+ let newPage;
23626
+ 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;
23590
23627
  } : e => e.detail.current,
23591
23628
  onScroll = e => {
23592
- e.preventDefault();
23593
23629
  const scrollComponent = this._pagerComponent,
23594
23630
  preScrollRange = scrollComponent.getScrollRange(),
23595
23631
  {
@@ -23618,7 +23654,7 @@
23618
23654
  if (this._itemContext.isScrollbar) {
23619
23655
  if (this._pagerComponent.addEventListener("scrollDrag", onPaging), this._pagerComponent.addEventListener("scrollUp", onPaging), this.attribute.pager.roamScroll) {
23620
23656
  const THROTTLE_TIME = 50;
23621
- this.addEventListener("wheel", throttle$1(onScroll, THROTTLE_TIME));
23657
+ this.addEventListener("wheel", e => e.nativeEvent.preventDefault()), this.addEventListener("wheel", throttle$1(onScroll, THROTTLE_TIME));
23622
23658
  }
23623
23659
  } else this._pagerComponent.addEventListener("toPrev", onPaging), this._pagerComponent.addEventListener("toNext", onPaging);
23624
23660
  }
@@ -23666,7 +23702,7 @@
23666
23702
  }), startX += spaceCol + width;
23667
23703
  }), this._itemContext.startX = startX, this._itemContext.startY = startY, this._itemContext.pages = pages;
23668
23704
  const total = Math.ceil(pages / maxRow);
23669
- this._itemContext.totalPage = total, this._updatePositionOfPager(contentWidth, contentHeight, renderStartY, compWidth, compHeight);
23705
+ this._itemContext.totalPage = total, this._updatePositionOfPager(renderStartY, compWidth, compHeight);
23670
23706
  } else {
23671
23707
  if (compWidth = this._itemMaxWidth * maxCol + (maxCol - 1) * spaceCol, compHeight = maxHeight, contentWidth = compWidth, comp = this._createPager(compStyle), this._pagerComponent = comp, this._innerView.add(comp), contentHeight = maxHeight - comp.AABBBounds.height() - pagerSpace - renderStartY, contentHeight <= 0) return this._innerView.removeChild(comp), !1;
23672
23708
  itemsContainer.getChildren().forEach((item, index) => {
@@ -23679,7 +23715,7 @@
23679
23715
  }), startY += spaceRow + height;
23680
23716
  });
23681
23717
  const total = Math.ceil(pages / maxCol);
23682
- this._itemContext.totalPage = total, this._updatePositionOfPager(contentWidth, contentHeight, renderStartY, compWidth, compHeight);
23718
+ this._itemContext.totalPage = total, this._updatePositionOfPager(renderStartY, compWidth, compHeight);
23683
23719
  }
23684
23720
  defaultCurrent > 1 && (isHorizontal ? itemsContainer.setAttribute("y", -(defaultCurrent - 1) * (compHeight + spaceRow)) : itemsContainer.setAttribute("x", -(defaultCurrent - 1) * (compWidth + spaceCol)));
23685
23721
  const clipGroup = graphicCreator.group({
@@ -23802,6 +23838,9 @@
23802
23838
  config.state[key] && (isFunction$3(config.state[key]) ? newConfig.state[key] = config.state[key](item, isSelected, index, items) : newConfig.state[key] = config.state[key]);
23803
23839
  })), newConfig;
23804
23840
  }
23841
+ release() {
23842
+ super.release(), this.removeAllEventListeners();
23843
+ }
23805
23844
  }
23806
23845
  DiscreteLegend.defaultAttributes = {
23807
23846
  layout: "horizontal",
@@ -27441,6 +27480,18 @@
27441
27480
  }
27442
27481
  return scrollStyle?.width ?? 7;
27443
27482
  }
27483
+ function isValidStyle(style) {
27484
+ if (!isValid$1(style)) {
27485
+ return false;
27486
+ }
27487
+ if (isArray$1(style)) {
27488
+ return style.some(s => isValid$1(s));
27489
+ }
27490
+ return true;
27491
+ }
27492
+ function isZeroStyle(style) {
27493
+ return style === 0 || (isArray$1(style) && style.every(s => s === 0));
27494
+ }
27444
27495
 
27445
27496
  const judgeType$1 = (value) => {
27446
27497
  switch (Object.prototype.toString.call(value)) {
@@ -34144,9 +34195,6 @@
34144
34195
  this._AABBBounds.setValue(x, y, x + width, y + height);
34145
34196
  this.parent && this.parent.addChildUpdateBoundTag();
34146
34197
  this.clearUpdateBoundTag();
34147
- if (this.shadowRoot) {
34148
- this.shadowRoot.tryUpdateAABBBounds();
34149
- }
34150
34198
  return this._AABBBounds;
34151
34199
  }
34152
34200
  else if (this.role === 'body' ||
@@ -34271,7 +34319,9 @@
34271
34319
 
34272
34320
  function getCellBorderStrokeWidth(col, row, cellTheme, table) {
34273
34321
  let strokeArrayWidth = cellTheme?.group?.strokeArrayWidth ?? undefined;
34274
- if (table.theme.cellInnerBorder) {
34322
+ if (table.theme.cellInnerBorder ||
34323
+ !isValidStyle(table.theme.frameStyle.borderLineWidth) ||
34324
+ isZeroStyle(table.theme.frameStyle.borderLineWidth)) {
34275
34325
  return strokeArrayWidth;
34276
34326
  }
34277
34327
  if (col === 0) {
@@ -35517,107 +35567,6 @@
35517
35567
  });
35518
35568
  }
35519
35569
 
35520
- function isSameRange(range1, range2) {
35521
- if (!range1 && !range2) {
35522
- return true;
35523
- }
35524
- if (!range1 || !range2) {
35525
- return false;
35526
- }
35527
- return (range1.start.col === range2.start.col &&
35528
- range1.start.row === range2.start.row &&
35529
- range1.end.col === range2.end.col &&
35530
- range1.end.row === range2.end.row);
35531
- }
35532
-
35533
- class InvertHighlightPlugin {
35534
- table;
35535
- range;
35536
- _fill;
35537
- _opacity;
35538
- constructor(table, options) {
35539
- this.table = table;
35540
- this._fill = options?.fill ?? '#000';
35541
- this._opacity = options?.opacity ?? 0.5;
35542
- }
35543
- setInvertHighlightRange(range) {
35544
- if (isSameRange(this.range, range)) {
35545
- return;
35546
- }
35547
- this.range = range;
35548
- if (!range) {
35549
- this.deleteAllCellGroupShadow();
35550
- }
35551
- else {
35552
- this.updateCellGroupShadow();
35553
- }
35554
- this.table.scenegraph.updateNextFrame();
35555
- }
35556
- deleteAllCellGroupShadow() {
35557
- if (!this.table.isPivotTable()) {
35558
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rowHeaderGroup);
35559
- this.updateCellGroupShadowInContainer(this.table.scenegraph.leftBottomCornerGroup);
35560
- }
35561
- this.updateCellGroupShadowInContainer(this.table.scenegraph.bodyGroup);
35562
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rightFrozenGroup);
35563
- this.updateCellGroupShadowInContainer(this.table.scenegraph.bottomFrozenGroup);
35564
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rightBottomCornerGroup);
35565
- }
35566
- updateCellGroupShadow() {
35567
- if (!this.table.isPivotTable()) {
35568
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rowHeaderGroup, this.range);
35569
- this.updateCellGroupShadowInContainer(this.table.scenegraph.leftBottomCornerGroup, this.range);
35570
- }
35571
- this.updateCellGroupShadowInContainer(this.table.scenegraph.bodyGroup, this.range);
35572
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rightFrozenGroup, this.range);
35573
- this.updateCellGroupShadowInContainer(this.table.scenegraph.bottomFrozenGroup), this.range;
35574
- this.updateCellGroupShadowInContainer(this.table.scenegraph.rightBottomCornerGroup, this.range);
35575
- }
35576
- updateCellGroupShadowInContainer(container, range) {
35577
- container.forEachChildrenSkipChild((column) => {
35578
- if (column.role === 'column') {
35579
- column.forEachChildrenSkipChild((cell) => {
35580
- if (cell.role !== 'cell') {
35581
- return;
35582
- }
35583
- cell.attachShadow(cell.shadowRoot);
35584
- const shadowGroup = cell.shadowRoot;
35585
- if (!range) {
35586
- shadowGroup.removeAllChild();
35587
- }
35588
- else if (cellInRange(range, cell.col, cell.row)) {
35589
- shadowGroup.removeAllChild();
35590
- }
35591
- else if (!shadowGroup.firstChild) {
35592
- const shadowRect = createRect({
35593
- x: 0,
35594
- y: 0,
35595
- width: cell.attribute.width,
35596
- height: cell.attribute.height,
35597
- fill: this._fill,
35598
- opacity: this._opacity
35599
- });
35600
- shadowRect.name = 'shadow-rect';
35601
- shadowGroup.appendChild(shadowRect);
35602
- }
35603
- });
35604
- }
35605
- });
35606
- }
35607
- }
35608
- function onBeforeAttributeUpdateForInvertHighlight(val, attribute) {
35609
- const graphic = this;
35610
- if (graphic.shadowRoot && graphic.shadowRoot.childrenCount && (isValid$1(val.width) || isValid$1(val.height))) {
35611
- const shadowRect = graphic.shadowRoot.findChildrenByName('shadow-rect')[0];
35612
- if (shadowRect) {
35613
- shadowRect.setAttributes({
35614
- width: val.width ?? shadowRect.attribute.width,
35615
- height: val.height ?? shadowRect.attribute.height
35616
- });
35617
- }
35618
- }
35619
- }
35620
-
35621
35570
  function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult) {
35622
35571
  let isAsync = false;
35623
35572
  let cellGroup;
@@ -35736,7 +35685,6 @@
35736
35685
  const createRadioCellGroup = Factory.getFunction('createRadioCellGroup');
35737
35686
  cellGroup = createRadioCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define);
35738
35687
  }
35739
- cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight;
35740
35688
  return cellGroup;
35741
35689
  }
35742
35690
  function updateCell$1(col, row, table, addNew, isShadow) {
@@ -36433,9 +36381,7 @@
36433
36381
  if (isAllRowsAuto || table.getDefaultRowHeight(row) === 'auto') {
36434
36382
  const height = computeRowHeight(row, startCol, endCol, table);
36435
36383
  newHeights[row] = Math.round(height);
36436
- if (table.heightAdaptiveMode === 'only-body') {
36437
- table._setRowHeight(row, height);
36438
- }
36384
+ table._setRowHeight(row, height);
36439
36385
  }
36440
36386
  }
36441
36387
  for (let row = table.rowCount - table.bottomFrozenRowCount; row <= rowEnd; row++) {
@@ -50808,7 +50754,8 @@
50808
50754
  });
50809
50755
  table.scenegraph.stage.addEventListener('pointerdown', (e) => {
50810
50756
  const eventArgsSet = getCellEventArgsSet(e);
50811
- if (eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
50757
+ if (!eventArgsSet.eventArgs?.target ||
50758
+ eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
50812
50759
  stateManager.hideMenu();
50813
50760
  }
50814
50761
  const isCompleteEdit = table.editorManager?.completeEdit(e.nativeEvent);
@@ -52805,6 +52752,8 @@
52805
52752
  cursor: default;
52806
52753
  width: max-content;
52807
52754
  box-shadow: 0px 8px 16px rgba(27, 31, 35, 0.12);
52755
+ max-height: 100%;
52756
+ overflow-y: auto;
52808
52757
  }
52809
52758
  .vtable__menu-element--hidden {
52810
52759
  opacity: 0;
@@ -53233,8 +53182,8 @@
53233
53182
  rootElement.style.left = `0px`;
53234
53183
  const maxWidth = containerWidth * 0.8;
53235
53184
  rootElement.style.maxWidth = `${maxWidth}px`;
53236
- const rootElementWidth = rootElement.clientWidth;
53237
- const rootElementHeight = rootElement.clientHeight;
53185
+ const rootElementWidth = rootElement.offsetWidth;
53186
+ const rootElementHeight = rootElement.offsetHeight;
53238
53187
  let rootElementLeft;
53239
53188
  let rootElementTop;
53240
53189
  if (position) {
@@ -56611,7 +56560,7 @@
56611
56560
  return TABLE_EVENT_TYPE;
56612
56561
  }
56613
56562
  options;
56614
- version = "1.9.2-alpha.4";
56563
+ version = "1.9.2-alpha.5";
56615
56564
  pagination;
56616
56565
  id = `VTable${Date.now()}`;
56617
56566
  headerStyleCache;
@@ -76800,106 +76749,8 @@
76800
76749
  return new Radio(params ? params.attribute : {});
76801
76750
  }
76802
76751
 
76803
- class CarouselAnimationPlugin {
76804
- table;
76805
- rowCount;
76806
- colCount;
76807
- animationDuration;
76808
- animationDelay;
76809
- animationEasing;
76810
- replaceScrollAction;
76811
- playing;
76812
- row;
76813
- col;
76814
- constructor(table, options) {
76815
- this.table = table;
76816
- this.rowCount = options?.rowCount ?? undefined;
76817
- this.colCount = options?.colCount ?? undefined;
76818
- this.animationDuration = options?.animationDuration ?? 500;
76819
- this.animationDelay = options?.animationDelay ?? 1000;
76820
- this.animationEasing = options?.animationEasing ?? 'linear';
76821
- this.replaceScrollAction = options?.replaceScrollAction ?? false;
76822
- this.playing = false;
76823
- this.row = table.frozenRowCount;
76824
- this.col = table.frozenColCount;
76825
- this.init();
76826
- }
76827
- init() {
76828
- if (this.replaceScrollAction) {
76829
- this.table.disableScroll();
76830
- this.table.scenegraph.stage.addEventListener('wheel', this.onScrollEnd.bind(this));
76831
- }
76832
- }
76833
- onScrollEnd(e) {
76834
- if (this.rowCount) {
76835
- if (e.deltaY > 0) {
76836
- this.row += this.rowCount;
76837
- this.row = Math.min(this.row, this.table.rowCount - this.table.frozenRowCount);
76838
- }
76839
- else if (e.deltaY < 0) {
76840
- this.row -= this.rowCount;
76841
- this.row = Math.max(this.row, this.table.frozenRowCount);
76842
- }
76843
- this.table.scrollToRow(this.row, { duration: this.animationDuration, easing: this.animationEasing });
76844
- }
76845
- else if (this.colCount) {
76846
- if (e.deltaX > 0) {
76847
- this.col += this.colCount;
76848
- this.col = Math.min(this.col, this.table.colCount - this.table.frozenColCount);
76849
- }
76850
- else if (e.deltaX < 0) {
76851
- this.col -= this.colCount;
76852
- this.col = Math.max(this.col, this.table.frozenColCount);
76853
- }
76854
- this.table.scrollToCol(this.col, { duration: this.animationDuration, easing: this.animationEasing });
76855
- }
76856
- }
76857
- play() {
76858
- this.playing = true;
76859
- if (this.rowCount) {
76860
- this.updateRow();
76861
- }
76862
- else if (this.colCount) {
76863
- this.updateCol();
76864
- }
76865
- }
76866
- pause() {
76867
- this.playing = false;
76868
- }
76869
- updateRow() {
76870
- if (!this.playing) {
76871
- return;
76872
- }
76873
- if (this.table.scenegraph.proxy.screenTopRow !== this.row) {
76874
- this.row = this.table.frozenRowCount;
76875
- }
76876
- else {
76877
- this.row += this.rowCount;
76878
- }
76879
- this.table.scrollToRow(this.row, { duration: this.animationDuration, easing: this.animationEasing });
76880
- setTimeout(() => {
76881
- this.updateRow();
76882
- }, this.animationDuration + this.animationDelay);
76883
- }
76884
- updateCol() {
76885
- if (!this.playing) {
76886
- return;
76887
- }
76888
- if (this.table.scenegraph.proxy.screenLeftCol !== this.col) {
76889
- this.col = this.table.frozenColCount;
76890
- }
76891
- else {
76892
- this.col += this.colCount;
76893
- }
76894
- this.table.scrollToCol(this.col, { duration: this.animationDuration, easing: this.animationEasing });
76895
- setTimeout(() => {
76896
- this.updateCol();
76897
- }, this.animationDuration + 50);
76898
- }
76899
- }
76900
-
76901
76752
  registerForVrender();
76902
- const version = "1.9.2-alpha.4";
76753
+ const version = "1.9.2-alpha.5";
76903
76754
  function getIcons() {
76904
76755
  return get$2();
76905
76756
  }
@@ -76907,10 +76758,8 @@
76907
76758
  clearAll();
76908
76759
  }
76909
76760
 
76910
- exports.CarouselAnimationPlugin = CarouselAnimationPlugin;
76911
76761
  exports.CustomLayout = index;
76912
76762
  exports.DataStatistics = DataStatistics;
76913
- exports.InvertHighlightPlugin = InvertHighlightPlugin;
76914
76763
  exports.ListTable = ListTableAll;
76915
76764
  exports.ListTableSimple = ListTableSimple;
76916
76765
  exports.PIVOT_CHART_EVENT_TYPE = PIVOT_CHART_EVENT_TYPE;