@visactor/vtable-gantt 1.9.1 → 1.9.2-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.
package/cjs/index.d.ts CHANGED
@@ -5,5 +5,5 @@ import { Gantt } from './Gantt';
5
5
  import * as tools from './tools';
6
6
  import * as VRender from './vrender';
7
7
  import * as VTable from './vtable';
8
- export declare const version = "1.9.1";
8
+ export declare const version = "1.9.2-alpha.1";
9
9
  export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable };
package/cjs/index.js CHANGED
@@ -52,5 +52,5 @@ exports.VRender = VRender;
52
52
 
53
53
  const VTable = __importStar(require("./vtable"));
54
54
 
55
- exports.VTable = VTable, exports.version = "1.9.1";
55
+ exports.VTable = VTable, exports.version = "1.9.2-alpha.1";
56
56
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,QAAA,OAAO,GAAG,OAAO,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nexport const version = \"1.9.1\";\n/**\n * @namespace VTable\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable\n};\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,QAAA,OAAO,GAAG,eAAe,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nexport const version = \"1.9.2-alpha.1\";\n/**\n * @namespace VTable\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable\n};\n"]}
@@ -4469,8 +4469,14 @@
4469
4469
  return needTestLetter && (index = testLetter(desc, index)), index;
4470
4470
  }
4471
4471
  function testLetter(string, index) {
4472
+ let negativeWrongMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
4472
4473
  let i = index;
4473
- for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return index;
4474
+ for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return negativeWrongMatch ? testLetter2(string, index) : index;
4475
+ return i;
4476
+ }
4477
+ function testLetter2(string, index) {
4478
+ let i = index;
4479
+ for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i++, i >= string.length) return i;
4474
4480
  return i;
4475
4481
  }
4476
4482
  function measureTextCanvas(text, character) {
@@ -4568,7 +4574,7 @@
4568
4574
  width: length
4569
4575
  };
4570
4576
  }
4571
- clipText(text, options, width, wordBreak) {
4577
+ clipText(text, options, width, wordBreak, keepAllBreak) {
4572
4578
  if (0 === text.length) return {
4573
4579
  str: "",
4574
4580
  width: 0
@@ -4584,8 +4590,8 @@
4584
4590
  };
4585
4591
  const data = this._clipText(text, options, width, 0, text.length - 1, "end", !1);
4586
4592
  if (wordBreak && data.str !== text) {
4587
- const index = testLetter(text, data.str.length);
4588
- index !== data.str.length && (data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
4593
+ let index = testLetter(text, data.str.length, keepAllBreak);
4594
+ 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));
4589
4595
  }
4590
4596
  return data;
4591
4597
  }
@@ -8665,7 +8671,7 @@
8665
8671
  const path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
8666
8672
  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;
8667
8673
  }
8668
- function intersect$2(x0, y0, x1, y1, x2, y2, x3, y3) {
8674
+ function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
8669
8675
  const x10 = x1 - x0,
8670
8676
  y10 = y1 - y0,
8671
8677
  x32 = x3 - x2,
@@ -8734,7 +8740,7 @@
8734
8740
  yire = innerRadius * sin(innerEndAngle);
8735
8741
  let xore, yore, xirs, yirs;
8736
8742
  if ((maxInnerCornerRadius > epsilon || maxOuterCornerRadius > epsilon) && (xore = outerRadius * cos(outerEndAngle), yore = outerRadius * sin(outerEndAngle), xirs = innerRadius * cos(innerStartAngle), yirs = innerRadius * sin(innerStartAngle), deltaAngle < pi)) {
8737
- const oc = intersect$2(xors, yors, xirs, yirs, xore, yore, xire, yire);
8743
+ const oc = intersect(xors, yors, xirs, yirs, xore, yore, xire, yire);
8738
8744
  if (oc) {
8739
8745
  const ax = xors - oc[0],
8740
8746
  ay = yors - oc[1],
@@ -9299,7 +9305,7 @@
9299
9305
  validCheck(attribute, theme, aabbBounds, graphic) {
9300
9306
  if (!graphic) return !0;
9301
9307
  if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
9302
- if (graphic.shadowRoot) return !0;
9308
+ if (graphic.shadowRoot || graphic.isContainer) return !0;
9303
9309
  const {
9304
9310
  visible = theme.visible
9305
9311
  } = attribute;
@@ -12568,20 +12574,22 @@
12568
12574
  });
12569
12575
  break;
12570
12576
  }
12571
- const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
12572
- if ("" !== str && "" === clip.str) {
12577
+ const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-all" !== wordBreak, "keep-all" === wordBreak);
12578
+ if ("" !== str && "" === clip.str || clip.wordBreaked) {
12573
12579
  if (ellipsis) {
12574
12580
  const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
12575
12581
  clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
12576
12582
  } else clip.str = "", clip.width = 0;
12577
12583
  needCut = !1;
12578
12584
  }
12579
- if (linesLayout.push({
12585
+ linesLayout.push({
12580
12586
  str: clip.str,
12581
12587
  width: clip.width
12582
- }), clip.str.length === str.length) ;else if (needCut) {
12583
- const newStr = str.substring(clip.str.length);
12584
- lines.splice(i + 1, 0, newStr);
12588
+ });
12589
+ let cutLength = clip.str.length;
12590
+ if (!clip.wordBreaked || "" !== str && "" === clip.str || (needCut = !0, cutLength = clip.wordBreaked), clip.str.length === str.length) ;else if (needCut) {
12591
+ let newStr = str.substring(cutLength);
12592
+ "keep-all" === wordBreak && (newStr = newStr.replace(/^\s+/g, "")), lines.splice(i + 1, 0, newStr);
12585
12593
  }
12586
12594
  }
12587
12595
  let maxWidth = 0;
@@ -21054,6 +21062,15 @@
21054
21062
  labelPoint = getVerticalCoord(point, getCircleVerticalVector(labelOffset, point, center, inside));
21055
21063
  return getCircleLabelPosition(labelPoint, getCircleVerticalVector(labelOffset || 1, labelPoint, center, inside));
21056
21064
  }
21065
+ function textIntersect(textA, textB, sep) {
21066
+ let a = textA.OBBBounds,
21067
+ b = textB.OBBBounds;
21068
+ 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));
21069
+ }
21070
+ function hasOverlap(items, pad) {
21071
+ 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;
21072
+ return !1;
21073
+ }
21057
21074
 
21058
21075
  const dispatchHoverState = (e, container, lastHover) => {
21059
21076
  const target = e.target;
@@ -21378,17 +21395,9 @@
21378
21395
  },
21379
21396
  greedy: function (items, sep) {
21380
21397
  let a;
21381
- return items.filter((b, i) => i && intersect$1(a, b, sep) ? b.setAttribute("opacity", 0) : (a = b, 1));
21398
+ return items.filter((b, i) => i && textIntersect(a, b, sep) ? b.setAttribute("opacity", 0) : (a = b, 1));
21382
21399
  }
21383
21400
  };
21384
- function intersect$1(textA, textB, sep) {
21385
- let a = textA.OBBBounds,
21386
- b = textB.OBBBounds;
21387
- 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));
21388
- }
21389
- function hasOverlap$1(items, pad) {
21390
- 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;
21391
- }
21392
21401
  function hasBounds(item) {
21393
21402
  let bounds;
21394
21403
  return bounds = item.OBBBounds.empty() ? item.AABBBounds : item.OBBBounds, bounds.width() > 1 && bounds.height() > 1;
@@ -21396,6 +21405,20 @@
21396
21405
  function reset(items) {
21397
21406
  return items.forEach(item => item.setAttribute("opacity", 1)), items;
21398
21407
  }
21408
+ function forceItemVisible$1(sourceItem, items, check, comparator) {
21409
+ let inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
21410
+ if (check && !sourceItem.attribute.opacity) {
21411
+ const remainLength = items.length;
21412
+ if (remainLength > 1) {
21413
+ sourceItem.setAttribute("opacity", 1);
21414
+ for (let i = 0; i < remainLength; i++) {
21415
+ const item = inverse ? items[remainLength - 1 - i] : items[i];
21416
+ if (!comparator(item)) break;
21417
+ item.setAttribute("opacity", 0);
21418
+ }
21419
+ }
21420
+ }
21421
+ }
21399
21422
  function autoHide(labels, config) {
21400
21423
  if (isEmpty$1(labels)) return;
21401
21424
  const source = labels.filter(hasBounds);
@@ -21407,20 +21430,19 @@
21407
21430
  separation: sep = 0
21408
21431
  } = config,
21409
21432
  reduce = isFunction$3(method) ? method : methods$1[method] || methods$1.parity;
21410
- if (items.length >= 3 && hasOverlap$1(items, sep)) {
21433
+ if (items.length >= 3 && hasOverlap(items, sep)) {
21411
21434
  do {
21412
21435
  items = reduce(items, sep);
21413
- } while (items.length >= 3 && hasOverlap$1(items, sep));
21414
- if (items.length < 3 || config.lastVisible) {
21415
- const lastSourceItem = last$1(source);
21416
- if (!lastSourceItem.attribute.opacity) {
21417
- const remainLength = items.length;
21418
- if (remainLength > 1) {
21419
- lastSourceItem.setAttribute("opacity", 1);
21420
- for (let i = remainLength - 1; i >= 0 && intersect$1(items[i], lastSourceItem, sep); i--) items[i].setAttribute("opacity", 0);
21421
- }
21422
- }
21423
- }
21436
+ } while (items.length >= 3 && hasOverlap(items, sep));
21437
+ const shouldCheck = function (length, visibility) {
21438
+ let checkLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
21439
+ return checkLength && length < 3 || visibility;
21440
+ },
21441
+ checkFirst = shouldCheck(items.length, config.firstVisible, !1);
21442
+ let checkLast = shouldCheck(items.length, config.lastVisible);
21443
+ const firstSourceItem = source[0],
21444
+ lastSourceItem = last$1(source);
21445
+ 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);
21424
21446
  }
21425
21447
  source.forEach(item => {
21426
21448
  item.setAttribute("visible", !!item.attribute.opacity);
@@ -22027,6 +22049,7 @@
22027
22049
  autoHideMethod: autoHideMethod,
22028
22050
  autoHideSeparation: autoHideSeparation,
22029
22051
  lastVisible: lastVisible,
22052
+ firstVisible: firstVisible,
22030
22053
  autoWrap: autoWrap$1,
22031
22054
  overflowLimitLength: overflowLimitLength
22032
22055
  } = label;
@@ -22060,7 +22083,8 @@
22060
22083
  orient: orient,
22061
22084
  method: autoHideMethod,
22062
22085
  separation: autoHideSeparation,
22063
- lastVisible: lastVisible
22086
+ lastVisible: lastVisible,
22087
+ firstVisible: firstVisible
22064
22088
  });
22065
22089
  }
22066
22090
  }
@@ -22130,13 +22154,6 @@
22130
22154
  nextBounds = new AABBBounds$1(nextLabel).expand(gap / 2);
22131
22155
  return prevBounds.intersects(nextBounds);
22132
22156
  };
22133
- function intersect(a, b, sep) {
22134
- return sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2);
22135
- }
22136
- function hasOverlap(items, pad) {
22137
- 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;
22138
- return !1;
22139
- }
22140
22157
  const MIN_TICK_GAP = 12;
22141
22158
  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;
22142
22159
  const getCartesianLabelBounds = (scale, domain, op) => {
@@ -22670,6 +22687,20 @@
22670
22687
  } else scaleTicks = getTicks(count);
22671
22688
  return scaleTicks;
22672
22689
  }
22690
+ function forceItemVisible(sourceItem, items, check, comparator) {
22691
+ let inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
22692
+ if (check && !items.includes(sourceItem)) {
22693
+ let remainLength = items.length;
22694
+ if (remainLength > 1) {
22695
+ inverse ? items.push(sourceItem) : items.unshift(sourceItem);
22696
+ for (let i = 0; i < remainLength; i++) {
22697
+ const index = inverse ? remainLength - 1 - i : i;
22698
+ if (!comparator(items[index])) break;
22699
+ items.splice(index, 1), i--, remainLength--;
22700
+ }
22701
+ }
22702
+ }
22703
+ }
22673
22704
  const continuousTicks = (scale, op) => {
22674
22705
  var _a, _b;
22675
22706
  if (!isContinuous(scale.type)) return convertDomainToTickData(scale.domain());
@@ -22709,7 +22740,8 @@
22709
22740
  customTicks: customTicks
22710
22741
  }));
22711
22742
  }
22712
- if (op.sampling && ("cartesian" === op.coordinateType || "polar" === op.coordinateType && "radius" === op.axisOrientType)) {
22743
+ const domain = scale.domain();
22744
+ 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)) {
22713
22745
  const {
22714
22746
  labelGap = 4,
22715
22747
  labelFlush: labelFlush
@@ -22718,8 +22750,14 @@
22718
22750
  AABBBounds: bounds,
22719
22751
  value: scaleTicks[i]
22720
22752
  }));
22721
- const samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
22753
+ const source = [...items],
22754
+ firstSourceItem = source[0],
22755
+ lastSourceItem = last$1(source),
22756
+ samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
22722
22757
  for (; items.length >= 3 && hasOverlap(items, labelGap);) items = samplingMethod(items, labelGap);
22758
+ const checkFirst = op.labelFirstVisible;
22759
+ let checkLast = op.labelLastVisible;
22760
+ 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);
22723
22761
  const ticks = items.map(item => item.value);
22724
22762
  ticks.length < 3 && labelFlush && (ticks.length > 1 && ticks.pop(), last$1(ticks) !== last$1(scaleTicks) && ticks.push(last$1(scaleTicks))), scaleTicks = ticks;
22725
22763
  }
@@ -22731,7 +22769,7 @@
22731
22769
  },
22732
22770
  greedy: function (items, sep) {
22733
22771
  let a;
22734
- return items.filter((b, i) => (!i || !intersect(a.AABBBounds, b.AABBBounds, sep)) && (a = b, !0));
22772
+ return items.filter((b, i) => (!i || !textIntersect(a, b, sep)) && (a = b, !0));
22735
22773
  }
22736
22774
  };
22737
22775
 
@@ -23493,8 +23531,8 @@
23493
23531
  this._autoEllipsis(autoEllipsisStrategy, layoutWidth, labelShape, valueShape), valueAttr.alignRight ? valueShape.setAttributes({
23494
23532
  textAlign: "right",
23495
23533
  x: this._itemWidthByUser - shapeSize / 2 - parsedPadding[1] - parsedPadding[3] - focusSpace - valueSpace
23496
- }) : valueShape.setAttribute("x", valueSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2));
23497
- } else valueShape.setAttribute("x", valueSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2));
23534
+ }) : valueShape.setAttribute("x", labelSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2));
23535
+ } else valueShape.setAttribute("x", labelSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2));
23498
23536
  focusStartX = valueSpace + (valueShape.AABBBounds.empty() ? 0 : valueShape.AABBBounds.x2), innerGroup.add(valueShape);
23499
23537
  } 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);
23500
23538
  focusShape && (focusShape.setAttribute("x", focusStartX), innerGroup.add(focusShape));
@@ -23560,9 +23598,8 @@
23560
23598
  disableTriggerEvent: disableTriggerEvent
23561
23599
  }));
23562
23600
  }
23563
- _updatePositionOfPager(contentWidth, contentHeight, renderStartY, compWidth, compHeight) {
23601
+ _updatePositionOfPager(renderStartY, compWidth, compHeight) {
23564
23602
  const {
23565
- maxHeight: maxHeight,
23566
23603
  pager: pager
23567
23604
  } = this.attribute,
23568
23605
  {
@@ -23573,14 +23610,14 @@
23573
23610
  if (this._pagerComponent.setTotal(totalPage), isHorizontal) {
23574
23611
  let y;
23575
23612
  y = "start" === position ? renderStartY : "end" === position ? renderStartY + compHeight - this._pagerComponent.AABBBounds.height() / 2 : renderStartY + compHeight / 2 - this._pagerComponent.AABBBounds.height() / 2, this._pagerComponent.setAttributes({
23576
- x: contentWidth,
23613
+ x: compWidth - this._pagerComponent.AABBBounds.width(),
23577
23614
  y: y
23578
23615
  });
23579
23616
  } else {
23580
23617
  let x;
23581
23618
  x = "start" === position ? 0 : "end" === position ? compWidth - this._pagerComponent.AABBBounds.width() : (compWidth - this._pagerComponent.AABBBounds.width()) / 2, this._pagerComponent.setAttributes({
23582
23619
  x: x,
23583
- y: maxHeight - this._pagerComponent.AABBBounds.height()
23620
+ y: compHeight - this._pagerComponent.AABBBounds.height()
23584
23621
  });
23585
23622
  }
23586
23623
  }
@@ -23609,11 +23646,10 @@
23609
23646
  const {
23610
23647
  value: value
23611
23648
  } = e.detail;
23612
- let newPage = value[0] * this._itemContext.totalPage;
23613
- return pager.scrollByPosition ? newPage += 1 : newPage = Math.floor(newPage) + 1, newPage;
23649
+ let newPage;
23650
+ 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;
23614
23651
  } : e => e.detail.current,
23615
23652
  onScroll = e => {
23616
- e.preventDefault();
23617
23653
  const scrollComponent = this._pagerComponent,
23618
23654
  preScrollRange = scrollComponent.getScrollRange(),
23619
23655
  {
@@ -23642,7 +23678,7 @@
23642
23678
  if (this._itemContext.isScrollbar) {
23643
23679
  if (this._pagerComponent.addEventListener("scrollDrag", onPaging), this._pagerComponent.addEventListener("scrollUp", onPaging), this.attribute.pager.roamScroll) {
23644
23680
  const THROTTLE_TIME = 50;
23645
- this.addEventListener("wheel", throttle$2(onScroll, THROTTLE_TIME));
23681
+ this.addEventListener("wheel", e => e.nativeEvent.preventDefault()), this.addEventListener("wheel", throttle$2(onScroll, THROTTLE_TIME));
23646
23682
  }
23647
23683
  } else this._pagerComponent.addEventListener("toPrev", onPaging), this._pagerComponent.addEventListener("toNext", onPaging);
23648
23684
  }
@@ -23690,7 +23726,7 @@
23690
23726
  }), startX += spaceCol + width;
23691
23727
  }), this._itemContext.startX = startX, this._itemContext.startY = startY, this._itemContext.pages = pages;
23692
23728
  const total = Math.ceil(pages / maxRow);
23693
- this._itemContext.totalPage = total, this._updatePositionOfPager(contentWidth, contentHeight, renderStartY, compWidth, compHeight);
23729
+ this._itemContext.totalPage = total, this._updatePositionOfPager(renderStartY, compWidth, compHeight);
23694
23730
  } else {
23695
23731
  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;
23696
23732
  itemsContainer.getChildren().forEach((item, index) => {
@@ -23703,7 +23739,7 @@
23703
23739
  }), startY += spaceRow + height;
23704
23740
  });
23705
23741
  const total = Math.ceil(pages / maxCol);
23706
- this._itemContext.totalPage = total, this._updatePositionOfPager(contentWidth, contentHeight, renderStartY, compWidth, compHeight);
23742
+ this._itemContext.totalPage = total, this._updatePositionOfPager(renderStartY, compWidth, compHeight);
23707
23743
  }
23708
23744
  defaultCurrent > 1 && (isHorizontal ? itemsContainer.setAttribute("y", -(defaultCurrent - 1) * (compHeight + spaceRow)) : itemsContainer.setAttribute("x", -(defaultCurrent - 1) * (compWidth + spaceCol)));
23709
23745
  const clipGroup = graphicCreator.group({
@@ -23826,6 +23862,9 @@
23826
23862
  config.state[key] && (isFunction$3(config.state[key]) ? newConfig.state[key] = config.state[key](item, isSelected, index, items) : newConfig.state[key] = config.state[key]);
23827
23863
  })), newConfig;
23828
23864
  }
23865
+ release() {
23866
+ super.release(), this.removeAllEventListeners();
23867
+ }
23829
23868
  }
23830
23869
  DiscreteLegend.defaultAttributes = {
23831
23870
  layout: "horizontal",
@@ -46923,7 +46962,7 @@
46923
46962
  constructor(container) {
46924
46963
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
46925
46964
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
46926
- if (super(), this.showFrozenIcon = !0, this.version = "1.9.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
46965
+ if (super(), this.showFrozenIcon = !0, this.version = "1.9.2-alpha.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
46927
46966
  const {
46928
46967
  frozenColCount = 0,
46929
46968
  frozenRowCount: frozenRowCount,
@@ -57265,7 +57304,7 @@
57265
57304
  themes: themes$1
57266
57305
  });
57267
57306
 
57268
- const version = "1.9.1";
57307
+ const version = "1.9.2-alpha.1";
57269
57308
 
57270
57309
  exports.Gantt = Gantt;
57271
57310
  exports.TYPES = index$2;