@visactor/vtable 0.13.2-alpha.5 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/cjs/PivotChart.js +6 -6
  2. package/cjs/PivotChart.js.map +1 -1
  3. package/cjs/components/menu/dom/logic/MenuContainer.js +1 -1
  4. package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -1
  5. package/cjs/components/menu/dom/logic/MenuElement.js +3 -3
  6. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
  7. package/cjs/core/BaseTable.d.ts +2 -2
  8. package/cjs/core/BaseTable.js +6 -1
  9. package/cjs/core/BaseTable.js.map +1 -1
  10. package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -1
  11. package/cjs/core/TABLE_EVENT_TYPE.js +1 -1
  12. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  13. package/cjs/event/event.js +8 -3
  14. package/cjs/event/event.js.map +1 -1
  15. package/cjs/event/listener/table-group.js +29 -5
  16. package/cjs/event/listener/table-group.js.map +1 -1
  17. package/cjs/index.d.ts +1 -1
  18. package/cjs/index.js +1 -1
  19. package/cjs/index.js.map +1 -1
  20. package/cjs/layout/pivot-header-layout.js +1 -0
  21. package/cjs/layout/pivot-header-layout.js.map +1 -1
  22. package/cjs/layout/simple-header-layout.js +1 -0
  23. package/cjs/layout/simple-header-layout.js.map +1 -1
  24. package/cjs/scenegraph/component/custom.d.ts +1 -0
  25. package/cjs/scenegraph/component/custom.js +14 -2
  26. package/cjs/scenegraph/component/custom.js.map +1 -1
  27. package/cjs/scenegraph/component/menu.js +1 -1
  28. package/cjs/scenegraph/component/menu.js.map +1 -1
  29. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
  30. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  31. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +15 -15
  32. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  33. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +2 -0
  34. package/cjs/scenegraph/group-creater/progress/proxy.js +10 -6
  35. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  36. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js +3 -3
  37. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -1
  38. package/cjs/scenegraph/layout/compute-col-width.js +3 -2
  39. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  40. package/cjs/scenegraph/layout/compute-row-height.js +3 -2
  41. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  42. package/cjs/scenegraph/layout/frozen.js +1 -2
  43. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  44. package/cjs/scenegraph/layout/move-cell.js +1 -1
  45. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  46. package/cjs/scenegraph/scenegraph.js +15 -13
  47. package/cjs/scenegraph/scenegraph.js.map +1 -1
  48. package/cjs/scenegraph/utils/update-container.d.ts +1 -1
  49. package/cjs/scenegraph/utils/update-container.js +1 -2
  50. package/cjs/scenegraph/utils/update-container.js.map +1 -1
  51. package/cjs/ts-types/events.d.ts +2 -2
  52. package/cjs/ts-types/events.js.map +1 -1
  53. package/dist/vtable.js +259 -135
  54. package/dist/vtable.min.js +2 -2
  55. package/es/PivotChart.js +6 -6
  56. package/es/PivotChart.js.map +1 -1
  57. package/es/components/menu/dom/logic/MenuContainer.js +1 -1
  58. package/es/components/menu/dom/logic/MenuContainer.js.map +1 -1
  59. package/es/components/menu/dom/logic/MenuElement.js +3 -3
  60. package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
  61. package/es/core/BaseTable.d.ts +2 -2
  62. package/es/core/BaseTable.js +6 -1
  63. package/es/core/BaseTable.js.map +1 -1
  64. package/es/core/TABLE_EVENT_TYPE.d.ts +1 -1
  65. package/es/core/TABLE_EVENT_TYPE.js +1 -1
  66. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  67. package/es/event/event.js +8 -3
  68. package/es/event/event.js.map +1 -1
  69. package/es/event/listener/table-group.js +29 -5
  70. package/es/event/listener/table-group.js.map +1 -1
  71. package/es/index.d.ts +1 -1
  72. package/es/index.js +1 -1
  73. package/es/index.js.map +1 -1
  74. package/es/layout/pivot-header-layout.js +1 -0
  75. package/es/layout/pivot-header-layout.js.map +1 -1
  76. package/es/layout/simple-header-layout.js +1 -0
  77. package/es/layout/simple-header-layout.js.map +1 -1
  78. package/es/scenegraph/component/custom.d.ts +1 -0
  79. package/es/scenegraph/component/custom.js +12 -0
  80. package/es/scenegraph/component/custom.js.map +1 -1
  81. package/es/scenegraph/component/menu.js +1 -1
  82. package/es/scenegraph/component/menu.js.map +1 -1
  83. package/es/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
  84. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  85. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +14 -13
  86. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  87. package/es/scenegraph/group-creater/progress/proxy.d.ts +2 -0
  88. package/es/scenegraph/group-creater/progress/proxy.js +10 -6
  89. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  90. package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js +3 -3
  91. package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -1
  92. package/es/scenegraph/layout/compute-col-width.js +4 -1
  93. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  94. package/es/scenegraph/layout/compute-row-height.js +4 -1
  95. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  96. package/es/scenegraph/layout/frozen.js +1 -2
  97. package/es/scenegraph/layout/frozen.js.map +1 -1
  98. package/es/scenegraph/layout/move-cell.js +1 -1
  99. package/es/scenegraph/layout/move-cell.js.map +1 -1
  100. package/es/scenegraph/scenegraph.js +10 -10
  101. package/es/scenegraph/scenegraph.js.map +1 -1
  102. package/es/scenegraph/utils/update-container.d.ts +1 -1
  103. package/es/scenegraph/utils/update-container.js +1 -2
  104. package/es/scenegraph/utils/update-container.js.map +1 -1
  105. package/es/ts-types/events.d.ts +2 -2
  106. package/es/ts-types/events.js.map +1 -1
  107. package/package.json +6 -6
package/dist/vtable.js CHANGED
@@ -492,7 +492,7 @@
492
492
  const isRegExp = value => isType$5(value, "RegExp");
493
493
  var isRegExp$1 = isRegExp;
494
494
 
495
- const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
495
+ const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
496
496
  var isBase64$1 = isBase64;
497
497
 
498
498
  const getType = value => ({}).toString.call(value).replace(/^\[object /, "").replace(/]$/, "");
@@ -3178,7 +3178,7 @@
3178
3178
  SORT_CLICK: 'sort_click',
3179
3179
  FREEZE_CLICK: 'freeze_click',
3180
3180
  SCROLL: 'scroll',
3181
- DROPDOWNMENU_CLICK: 'dropdownmenu_click',
3181
+ DROPDOWN_MENU_CLICK: 'dropdown_menu_click',
3182
3182
  MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol',
3183
3183
  DRAG_SELECT_END: 'drag_select_end',
3184
3184
  DROPDOWN_ICON_CLICK: 'dropdown_icon_click',
@@ -10630,9 +10630,7 @@
10630
10630
  let data = ResourceLoader.cache.get(url);
10631
10631
  data ? "fail" === data.loadState ? application$1.global.getRequestAnimationFrame()(() => {
10632
10632
  mark.imageLoadFail(url);
10633
- }) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && application$1.global.getRequestAnimationFrame()(() => {
10634
- mark.imageLoadSuccess(url, data.data);
10635
- }) : (data = {
10633
+ }) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(url, data.data) : (data = {
10636
10634
  type: "image",
10637
10635
  loadState: "init"
10638
10636
  }, ResourceLoader.cache.set(url, data), data.dataPromise = application$1.global.loadImage(url), data.dataPromise ? (data.waitingMark = [mark], data.dataPromise.then(res => {
@@ -11284,7 +11282,7 @@
11284
11282
  data: "init",
11285
11283
  state: null
11286
11284
  };
11287
- this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", isValidUrl$1(image) || isBase64$1(image) ? (ResourceLoader$1.GetImage(image, this), this.backgroundImg = this.backgroundImg || background) : image.startsWith("<svg") && (ResourceLoader$1.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background)) : (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background);
11285
+ this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader$1.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader$1.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background);
11288
11286
  }
11289
11287
  imageLoadSuccess(url, image, cb) {
11290
11288
  if (!this.resources) return;
@@ -11434,7 +11432,7 @@
11434
11432
  if ("/" === xmlData[i + 1]) {
11435
11433
  const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."),
11436
11434
  propIndex = jPath.lastIndexOf(".");
11437
- jPath = jPath.substring(0, propIndex), currentNode = this.tagsNodeStack.pop(), textData = "", i = closeIndex;
11435
+ jPath = jPath.substring(0, propIndex), currentNode = this.tagsNodeStack.pop(), currentNode && currentNode.child && textData && currentNode.child[currentNode.child.length - 1][":@"] && (currentNode.child[currentNode.child.length - 1][":@"].text = textData), textData = "", i = closeIndex;
11438
11436
  } else if ("?" === xmlData[i + 1]) {
11439
11437
  i = readTagExp(xmlData, i, !1, "?>").closeIndex + 1;
11440
11438
  } else if ("!--" === xmlData.substr(i + 1, 3)) {
@@ -19122,6 +19120,7 @@
19122
19120
  return this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
19123
19121
  }
19124
19122
  clearScreen(renderService, context, drawContext) {
19123
+ var _a;
19125
19124
  const {
19126
19125
  clear: clear
19127
19126
  } = drawContext;
@@ -19133,7 +19132,12 @@
19133
19132
  } = drawContext,
19134
19133
  x = 0,
19135
19134
  y = 0;
19136
- context.clearRect(x, y, width, height), context.fillStyle = createColor(context, clear, {
19135
+ context.clearRect(x, y, width, height);
19136
+ const stage = null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage;
19137
+ if (stage && stage.backgroundImg && stage.resources) {
19138
+ const res = stage.resources.get(clear);
19139
+ res && "success" === res.state && res.data && context.drawImage(res.data, x, y, width, height);
19140
+ } else context.fillStyle = createColor(context, clear, {
19137
19141
  AABBBounds: {
19138
19142
  x1: x,
19139
19143
  y1: y,
@@ -20215,7 +20219,7 @@
20215
20219
  wrapGroup: wrapGroup
20216
20220
  } = _ref;
20217
20221
  application$1.global.removeDom(wrapGroup);
20218
- }), nativeDom = "string" == typeof dom ? new DOMParser().parseFromString(dom, "text/xml").firstChild : dom;
20222
+ }), nativeDom = "string" == typeof dom ? new DOMParser().parseFromString(dom, "text/html").firstChild : dom;
20219
20223
  const _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
20220
20224
  nativeContainer = _container ? "string" == typeof _container ? application$1.global.getElementById(_container) : _container : graphic.stage.window.getContainer();
20221
20225
  const wrapGroup = application$1.global.createDom({
@@ -20697,7 +20701,9 @@
20697
20701
  return this.viewBox.height();
20698
20702
  }
20699
20703
  }
20700
- })), params.autoRender && this.enableAutoRender(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), 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$1(), this.ticker.addTimeline(this.timeline), this.timeline.pause(), this.optmize(params.optimize);
20704
+ })), params.autoRender && this.enableAutoRender(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), 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$1(), this.ticker.addTimeline(this.timeline), this.timeline.pause(), this.optmize(params.optimize), this._background && isString$3(this._background) && this.setAttributes({
20705
+ background: this._background
20706
+ });
20701
20707
  }
20702
20708
  optmize(params) {
20703
20709
  this.optmizeRender(null == params ? void 0 : params.skipRenderWithOutRange);
@@ -21805,7 +21811,7 @@
21805
21811
  }
21806
21812
  getNativeAABBBounds(_dom) {
21807
21813
  let dom = _dom;
21808
- if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/xml").firstChild), dom.getBoundingClientRect) {
21814
+ if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/html").firstChild), dom.getBoundingClientRect) {
21809
21815
  const b = dom.getBoundingClientRect();
21810
21816
  return new DynamicB(b);
21811
21817
  }
@@ -25709,7 +25715,7 @@
25709
25715
  });
25710
25716
  }
25711
25717
  setAttribute(key, value, forceUpdateTag) {
25712
- !isPlainObject$3(this.attribute[key]) || isFunction$1(this.attribute[key]) || isFunction$1(value) ? this.attribute[key] = value : merge$1(this.attribute[key], value), GROUP_ATTRIBUTES.includes(key) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
25718
+ isPlainObject$3(this.attribute[key]) && isPlainObject$3(value) && !isFunction$1(this.attribute[key]) && !isFunction$1(value) ? merge$1(this.attribute[key], value) : this.attribute[key] = value, GROUP_ATTRIBUTES.includes(key) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
25713
25719
  }
25714
25720
  setAttributes(params, forceUpdateTag) {
25715
25721
  const keys = Object.keys(params);
@@ -27118,20 +27124,54 @@
27118
27124
  }
27119
27125
  }
27120
27126
 
27127
+ function rotate(x, y, deg, originX, originY) {
27128
+ return {
27129
+ x: (x - originX) * Math.cos(deg) + (y - originY) * Math.sin(deg) + originX,
27130
+ y: (x - originX) * Math.sin(deg) + (originY - y) * Math.cos(deg) + originY
27131
+ };
27132
+ }
27133
+ function genNormalBounds(item) {
27134
+ const bounds = item.AABBBounds;
27135
+ return {
27136
+ x1: bounds.x1,
27137
+ x2: bounds.x2,
27138
+ y1: bounds.y1,
27139
+ y2: bounds.y2,
27140
+ centerX: item.attribute.x,
27141
+ centerY: item.attribute.y,
27142
+ angle: item.attribute.angle
27143
+ };
27144
+ }
27145
+ function genRotateBounds(items) {
27146
+ items.forEach(item => {
27147
+ if (item.rotatedBounds || !item.attribute.angle) return;
27148
+ const bounds = genNormalBounds(item),
27149
+ rotatedCenter = rotate(bounds.centerX, bounds.centerY, bounds.angle, item.attribute.x, item.attribute.y),
27150
+ deltaX = rotatedCenter.x - bounds.centerX,
27151
+ deltaY = rotatedCenter.y - bounds.centerY;
27152
+ bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
27153
+ });
27154
+ }
27155
+ function itemIntersect(item1, item2) {
27156
+ return isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0));
27157
+ }
27158
+
27121
27159
  const methods$1 = {
27122
27160
  parity: function (items) {
27123
27161
  return items.filter((item, i) => i % 2 ? item.setAttribute("opacity", 0) : 1);
27124
27162
  },
27125
27163
  greedy: function (items, sep) {
27126
27164
  let a;
27127
- return items.filter((b, i) => i && intersect$1(a.AABBBounds, b.AABBBounds, sep) ? b.setAttribute("opacity", 0) : (a = b, 1));
27165
+ return items.filter((b, i) => i && intersect$1(a, b, sep) ? b.setAttribute("opacity", 0) : (a = b, 1));
27128
27166
  }
27129
27167
  };
27130
- function intersect$1(a, b, sep) {
27131
- return sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2);
27168
+ function intersect$1(textA, textB, sep) {
27169
+ const a = textA.AABBBounds,
27170
+ b = textB.AABBBounds;
27171
+ return sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2) && (!textA.rotatedBounds || !textB.rotatedBounds || sep > Math.max(textB.rotatedBounds.x1 - textA.rotatedBounds.x2, textA.rotatedBounds.x1 - textB.rotatedBounds.x2, textB.rotatedBounds.y1 - textA.rotatedBounds.y2, textA.rotatedBounds.y1 - textB.rotatedBounds.y2));
27132
27172
  }
27133
27173
  function hasOverlap$1(items, pad) {
27134
- for (let b, i = 1, n = items.length, a = items[0].AABBBounds; i < n; a = b, ++i) if (intersect$1(a, b = items[i].AABBBounds, pad)) return !0;
27174
+ 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;
27135
27175
  }
27136
27176
  function hasBounds(item) {
27137
27177
  const b = item.AABBBounds;
@@ -27145,7 +27185,7 @@
27145
27185
  const source = labels.filter(hasBounds);
27146
27186
  if (isEmpty(source)) return;
27147
27187
  let items;
27148
- items = reset(source);
27188
+ items = reset(source), genRotateBounds(items);
27149
27189
  const {
27150
27190
  method = "parity",
27151
27191
  separation: sep = 0
@@ -27155,7 +27195,7 @@
27155
27195
  do {
27156
27196
  items = reduce(items, sep);
27157
27197
  } while (items.length >= 3 && hasOverlap$1(items, sep));
27158
- items.length < 3 && !last(source).attribute.opacity && (items.length > 1 && last(items).setAttribute("opacity", 0), last(source).setAttribute("opacity", 1));
27198
+ items.length < 3 && !last(source).attribute.opacity && items.length > 1 && (last(items).setAttribute("opacity", 0), last(source).setAttribute("opacity", 1));
27159
27199
  }
27160
27200
  source.forEach(item => {
27161
27201
  item.setAttribute("visible", !!item.attribute.opacity);
@@ -27182,39 +27222,9 @@
27182
27222
  for (let i = 1; i < items.length; i++) if (itemIntersect(items[i - 1], items[i])) return !0;
27183
27223
  return !1;
27184
27224
  }
27185
- function itemIntersect(item1, item2) {
27186
- return isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0);
27187
- }
27188
27225
  function tryRotate(orient, items) {
27189
27226
  "bottom" !== orient && "top" !== orient || rotateXAxis(orient, items), "left" !== orient && "right" !== orient || rotateYAxis(orient, items), genRotateBounds(items);
27190
27227
  }
27191
- function rotate(x, y, deg, originX, originY) {
27192
- return {
27193
- x: (x - originX) * Math.cos(deg) + (y - originY) * Math.sin(deg) + originX,
27194
- y: (x - originX) * Math.sin(deg) + (originY - y) * Math.cos(deg) + originY
27195
- };
27196
- }
27197
- function genNormalBounds(item) {
27198
- const bounds = item.AABBBounds;
27199
- return {
27200
- x1: bounds.x1,
27201
- x2: bounds.x2,
27202
- y1: bounds.y1,
27203
- y2: bounds.y2,
27204
- centerX: item.attribute.x,
27205
- centerY: item.attribute.y,
27206
- angle: item.attribute.angle
27207
- };
27208
- }
27209
- function genRotateBounds(items) {
27210
- items.forEach(item => {
27211
- const bounds = genNormalBounds(item),
27212
- rotatedCenter = rotate(bounds.centerX, bounds.centerY, bounds.angle, item.attribute.x, item.attribute.y),
27213
- deltaX = rotatedCenter.x - bounds.centerX,
27214
- deltaY = rotatedCenter.y - bounds.centerY;
27215
- bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
27216
- });
27217
- }
27218
27228
  function clampAngle() {
27219
27229
  let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
27220
27230
  if (angle < 0) for (; angle < 0;) angle += 2 * Math.PI;
@@ -27531,18 +27541,17 @@
27531
27541
  if (flush && labelShapes.length) {
27532
27542
  const {
27533
27543
  orient: orient,
27534
- start: start,
27535
- end: end
27544
+ start: axisStart,
27545
+ end: axisEnd
27536
27546
  } = this.attribute,
27537
27547
  isX = "bottom" === orient || "top" === orient,
27538
27548
  first = labelShapes[0],
27539
27549
  last$1 = last(labelShapes),
27540
27550
  isInverse = isX ? first.attribute.x > last$1.attribute.x : first.attribute.y < last$1.attribute.y;
27541
27551
  if (isX) {
27542
- const width = Math.abs(start.x - end.x);
27543
27552
  if (isInverse) {
27544
- const start = width,
27545
- end = 0,
27553
+ const start = axisEnd.x,
27554
+ end = axisStart.x,
27546
27555
  startBound = first.AABBBounds.x2,
27547
27556
  endBound = last$1.AABBBounds.x1;
27548
27557
  startBound > start && first.setAttributes({
@@ -27553,8 +27562,8 @@
27553
27562
  textAlign: "left"
27554
27563
  });
27555
27564
  } else {
27556
- const start = 0,
27557
- end = width,
27565
+ const start = axisStart.x,
27566
+ end = axisEnd.x,
27558
27567
  startBound = first.AABBBounds.x1,
27559
27568
  endBound = last$1.AABBBounds.x2;
27560
27569
  startBound < start && first.setAttributes({
@@ -27565,33 +27574,30 @@
27565
27574
  textAlign: "right"
27566
27575
  });
27567
27576
  }
27577
+ } else if (isInverse) {
27578
+ const startBound = first.AABBBounds.y1,
27579
+ endBound = last$1.AABBBounds.y2,
27580
+ start = axisStart.y,
27581
+ end = axisEnd.y;
27582
+ startBound < start && first.setAttributes({
27583
+ y: start,
27584
+ textBaseline: "top"
27585
+ }), endBound > end && last$1.setAttributes({
27586
+ y: end,
27587
+ textBaseline: "bottom"
27588
+ });
27568
27589
  } else {
27569
- const height = Math.abs(start.y - end.y);
27570
- if (isInverse) {
27571
- const startBound = first.AABBBounds.y1,
27572
- endBound = last$1.AABBBounds.y2,
27573
- start = 0,
27574
- end = height;
27575
- startBound < start && first.setAttributes({
27576
- y: start,
27577
- textBaseline: "top"
27578
- }), endBound > end && last$1.setAttributes({
27579
- y: end,
27580
- textBaseline: "bottom"
27581
- });
27582
- } else {
27583
- const start = height,
27584
- end = 0,
27585
- startBound = first.AABBBounds.y2,
27586
- endBound = last$1.AABBBounds.y1;
27587
- startBound > start && first.setAttributes({
27588
- y: start,
27589
- textBaseline: "bottom"
27590
- }), endBound < end && last$1.setAttributes({
27591
- y: end,
27592
- textBaseline: "top"
27593
- });
27594
- }
27590
+ const start = axisEnd.y,
27591
+ end = axisStart.y,
27592
+ startBound = first.AABBBounds.y2,
27593
+ endBound = last$1.AABBBounds.y1;
27594
+ startBound > start && first.setAttributes({
27595
+ y: start,
27596
+ textBaseline: "bottom"
27597
+ }), endBound < end && last$1.setAttributes({
27598
+ y: end,
27599
+ textBaseline: "top"
27600
+ });
27595
27601
  }
27596
27602
  }
27597
27603
  }
@@ -38300,6 +38306,9 @@
38300
38306
  table
38301
38307
  };
38302
38308
  const customRenderObj = customLayout(arg);
38309
+ if (customRenderObj.rootContainer) {
38310
+ customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer);
38311
+ }
38303
38312
  if (customRenderObj.rootContainer instanceof Group$1) {
38304
38313
  elementsGroup = customRenderObj.rootContainer;
38305
38314
  elementsGroup.name = 'custom-container';
@@ -38548,6 +38557,23 @@
38548
38557
  }
38549
38558
  return parseInt(str, 10);
38550
38559
  }
38560
+ function decodeReactDom(dom) {
38561
+ if (!dom.$$typeof) {
38562
+ return dom;
38563
+ }
38564
+ const type = dom.type;
38565
+ const { attribute, children } = dom.props;
38566
+ const g = type({ attribute });
38567
+ g.id = attribute.id;
38568
+ g.name = attribute.name;
38569
+ children &&
38570
+ children.length &&
38571
+ children.forEach((item) => {
38572
+ const c = decodeReactDom(item);
38573
+ g.add(c);
38574
+ });
38575
+ return g;
38576
+ }
38551
38577
 
38552
38578
  const icons = {};
38553
38579
  class IconCache {
@@ -41245,6 +41271,9 @@
41245
41271
  };
41246
41272
  if (customLayout) {
41247
41273
  const customLayoutObj = customLayout(arg);
41274
+ if (customLayoutObj.rootContainer) {
41275
+ customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
41276
+ }
41248
41277
  if (customLayoutObj.rootContainer instanceof Group$1) {
41249
41278
  height = customLayoutObj.rootContainer.AABBBounds.height() ?? 0;
41250
41279
  }
@@ -41998,7 +42027,7 @@
41998
42027
  const resultMenuInfo = this.getEventInfo(target);
41999
42028
  const resultTableInfo = this._table.getMenuInfo(this._menuInfo.col, this._menuInfo.row, this._menuInfo.type);
42000
42029
  const result = Object.assign(resultMenuInfo, resultTableInfo);
42001
- this._table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, result);
42030
+ this._table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, result);
42002
42031
  }
42003
42032
  });
42004
42033
  }
@@ -42873,6 +42902,12 @@
42873
42902
  const { axes, dataId, data, spec } = chart.attribute;
42874
42903
  const { chartInstance } = chart;
42875
42904
  const viewBox = chart.getViewBox();
42905
+ if (viewBox.x2 <= viewBox.x1) {
42906
+ viewBox.x2 = viewBox.x1 + 1;
42907
+ }
42908
+ if (viewBox.y2 <= viewBox.y1) {
42909
+ viewBox.y2 = viewBox.y1 + 1;
42910
+ }
42876
42911
  axes.forEach((axis, index) => {
42877
42912
  if (axis.type === 'linear') {
42878
42913
  const chartAxis = chartInstance._chart._components[index];
@@ -43863,6 +43898,9 @@
43863
43898
  };
43864
43899
  if (customLayout) {
43865
43900
  const customLayoutObj = customLayout(arg);
43901
+ if (customLayoutObj.rootContainer) {
43902
+ customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
43903
+ }
43866
43904
  if (customLayoutObj.rootContainer instanceof Group$1) {
43867
43905
  width = customLayoutObj.rootContainer.AABBBounds.width() ?? 0;
43868
43906
  }
@@ -44721,13 +44759,27 @@
44721
44759
  const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;
44722
44760
  proxy.setParamsForRow();
44723
44761
  proxy.setParamsForColumn();
44724
- computeColsWidth(table, 0, Math.min(proxy.firstScreenColLimit, table.colCount - 1));
44725
- computeRowsHeight(table, 0, Math.min(proxy.firstScreenRowLimit, table.rowCount - 1));
44726
- if (table.rightFrozenColCount > 0 && table.colCount - 1 > proxy.firstScreenColLimit) {
44762
+ let distCol;
44763
+ let distRow;
44764
+ if (table.widthMode === 'adaptive') {
44765
+ distCol = table.colCount - 1;
44766
+ }
44767
+ else {
44768
+ distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1);
44769
+ }
44770
+ if (table.heightMode === 'adaptive') {
44771
+ distRow = table.rowCount - 1;
44772
+ }
44773
+ else {
44774
+ distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1);
44775
+ }
44776
+ computeColsWidth(table, 0, distCol);
44777
+ computeRowsHeight(table, 0, distRow);
44778
+ if (distCol < table.colCount - 1 - table.rightFrozenColCount) {
44727
44779
  computeColsWidth(table, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1);
44728
44780
  }
44729
- if (table.bottomFrozenRowCount > 0 && table.rowCount - 1 > proxy.firstScreenRowLimit) {
44730
- computeColsWidth(table, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1);
44781
+ if (distRow < table.rowCount - 1 - table.bottomFrozenRowCount) {
44782
+ computeRowsHeight(table, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1);
44731
44783
  }
44732
44784
  table.scenegraph.colHeaderGroup.setAttribute('x', table.getFrozenColsWidth());
44733
44785
  table.scenegraph.rowHeaderGroup.setAttribute('y', table.getFrozenRowsHeight());
@@ -44738,43 +44790,43 @@
44738
44790
  y: table.getFrozenRowsHeight()
44739
44791
  });
44740
44792
  createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.columnHeaderLevelCount - 1, table.isListTable() ? 'columnHeader' : 'cornerHeader', table);
44741
- createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), 0, table.columnHeaderLevelCount - 1, 'columnHeader', table);
44742
- createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), table.isListTable() && !table.internalProps.transpose ? 'body' : 'rowHeader', table);
44793
+ createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.columnHeaderLevelCount - 1, 'columnHeader', table);
44794
+ createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isListTable() && !table.internalProps.transpose ? 'body' : 'rowHeader', table);
44743
44795
  if (table.bottomFrozenRowCount > 0) {
44744
44796
  if (!table.isPivotChart()) {
44745
44797
  createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isListTable() ? 'body' : 'rowHeader', table);
44746
44798
  }
44747
- createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? 'rowHeader' : 'body', table);
44799
+ createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? 'rowHeader' : 'body', table);
44748
44800
  }
44749
44801
  if (table.rightFrozenColCount > 0) {
44750
44802
  if (!table.isPivotChart()) {
44751
44803
  createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.columnHeaderLevelCount - 1, 'columnHeader', table);
44752
44804
  }
44753
- createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), table.isPivotChart() ? 'rowHeader' : 'body', table);
44805
+ createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? 'rowHeader' : 'body', table);
44754
44806
  }
44755
44807
  if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && !table.isPivotChart()) {
44756
44808
  createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, 'body', table);
44757
44809
  }
44758
- createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), 'body', table);
44810
+ createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, 'body', table);
44759
44811
  if (!bodyGroup.firstChild && !colHeaderGroup.firstChild) {
44760
44812
  proxy.currentRow = proxy.totalRow;
44761
44813
  proxy.rowEnd = proxy.currentRow;
44762
- proxy.rowUpdatePos = proxy.rowEnd;
44814
+ proxy.rowUpdatePos = proxy.rowEnd + 1;
44763
44815
  proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
44764
44816
  proxy.currentCol = proxy.totalCol;
44765
44817
  proxy.colEnd = proxy.currentCol;
44766
- proxy.colUpdatePos = proxy.colEnd;
44818
+ proxy.colUpdatePos = proxy.colEnd + 1;
44767
44819
  proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);
44768
44820
  }
44769
44821
  else {
44770
44822
  proxy.currentRow = bodyGroup.firstChild?.rowNumber ?? proxy.totalRow;
44771
44823
  proxy.rowEnd = proxy.currentRow;
44772
- proxy.rowUpdatePos = proxy.rowEnd;
44824
+ proxy.rowUpdatePos = proxy.rowEnd + 1;
44773
44825
  proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
44774
44826
  proxy.currentCol =
44775
44827
  bodyGroup.lastChild?.col ?? colHeaderGroup.lastChild?.col ?? proxy.totalCol;
44776
44828
  proxy.colEnd = proxy.currentCol;
44777
- proxy.colUpdatePos = proxy.colEnd;
44829
+ proxy.colUpdatePos = proxy.colEnd + 1;
44778
44830
  proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);
44779
44831
  await proxy.progress();
44780
44832
  }
@@ -44912,8 +44964,8 @@
44912
44964
  }
44913
44965
  }
44914
44966
  const totalActualBodyColumnCount = Math.min(table.scenegraph.proxy.colLimit, table.scenegraph.proxy.bodyRightCol - table.scenegraph.proxy.bodyLeftCol + 1);
44915
- const totalBodyWidth = table.getColsWidth(table.rowHeaderLevelCount, table.rowHeaderLevelCount + totalActualBodyColumnCount);
44916
- const totalWidth = table.getColsWidth(table.rowHeaderLevelCount, table.colCount - 1);
44967
+ const totalBodyWidth = table.getColsWidth(table.frozenColCount, table.frozenColCount + totalActualBodyColumnCount);
44968
+ const totalWidth = table.getColsWidth(table.frozenColCount, table.colCount - 1);
44917
44969
  table.scenegraph.proxy.xLimitLeft = totalBodyWidth / 2;
44918
44970
  table.scenegraph.proxy.xLimitRight = totalWidth - totalBodyWidth / 2;
44919
44971
  }
@@ -44925,7 +44977,7 @@
44925
44977
  x = prevCellGroup.attribute.x + table.getColWidth(colGroup._prev.col);
44926
44978
  }
44927
44979
  else {
44928
- x = table.getColsWidth(table.rowHeaderLevelCount, colGroup.col - 1);
44980
+ x = table.getColsWidth(table.frozenColCount, colGroup.col - 1);
44929
44981
  }
44930
44982
  colGroup.setAttribute('x', x);
44931
44983
  }
@@ -44936,7 +44988,7 @@
44936
44988
  x = nextCellGroup.attribute.x - table.getColWidth(colGroup.col);
44937
44989
  }
44938
44990
  else {
44939
- x = table.getColsWidth(table.rowHeaderLevelCount, colGroup.col - 1);
44991
+ x = table.getColsWidth(table.frozenColCount, colGroup.col - 1);
44940
44992
  }
44941
44993
  colGroup.setAttribute('x', x);
44942
44994
  }
@@ -45429,6 +45481,7 @@
45429
45481
  rowUpdatePos;
45430
45482
  rowUpdateDirection;
45431
45483
  screenTopRow = 0;
45484
+ totalActualBodyRowCount;
45432
45485
  deltaY = 0;
45433
45486
  colLimit = 100;
45434
45487
  bodyRightCol;
@@ -45445,6 +45498,7 @@
45445
45498
  referenceCol;
45446
45499
  screenLeftCol = 0;
45447
45500
  colUpdateDirection;
45501
+ totalActualBodyColCount;
45448
45502
  deltaX = 0;
45449
45503
  cellCache = new Map();
45450
45504
  constructor(table) {
@@ -45475,6 +45529,7 @@
45475
45529
  setParamsForColumn() {
45476
45530
  this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;
45477
45531
  const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
45532
+ this.totalActualBodyColCount = totalActualBodyColCount;
45478
45533
  this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1;
45479
45534
  this.colStart = this.bodyLeftCol;
45480
45535
  const defaultColWidth = this.table.defaultColWidth;
@@ -45492,6 +45547,7 @@
45492
45547
  this.bodyTopRow = this.table.columnHeaderLevelCount;
45493
45548
  this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
45494
45549
  const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
45550
+ this.totalActualBodyRowCount = totalActualBodyRowCount;
45495
45551
  this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1;
45496
45552
  this.rowStart = this.bodyTopRow;
45497
45553
  const defaultRowHeight = this.table.defaultRowHeight;
@@ -45635,15 +45691,16 @@
45635
45691
  this.colEnd = endCol;
45636
45692
  this.colUpdatePos = this.colEnd;
45637
45693
  this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);
45638
- this.table.scenegraph.updateContainerAttrWidthAndX();
45639
45694
  this.table.scenegraph.updateContainer();
45640
45695
  this.table.scenegraph.updateBorderSizeAndPosition();
45641
45696
  }
45642
45697
  async setY(y) {
45643
- if (y < this.yLimitTop && this.rowStart === this.bodyTopRow) {
45698
+ const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + this.totalActualBodyRowCount) / 2;
45699
+ const yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;
45700
+ if (y < yLimitTop && this.rowStart === this.bodyTopRow) {
45644
45701
  this.table.scenegraph.setBodyAndRowHeaderY(-y);
45645
45702
  }
45646
- else if (y > this.yLimitBottom && this.rowEnd === this.bodyBottomRow) {
45703
+ else if (y > yLimitBottom && this.rowEnd === this.bodyBottomRow) {
45647
45704
  this.table.scenegraph.setBodyAndRowHeaderY(-y);
45648
45705
  }
45649
45706
  else {
@@ -45651,10 +45708,12 @@
45651
45708
  }
45652
45709
  }
45653
45710
  async setX(x) {
45654
- if (x < this.xLimitLeft && this.colStart === this.bodyLeftCol) {
45711
+ const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + this.totalActualBodyColCount) / 2;
45712
+ const xLimitRight = this.table.getAllColsWidth() - xLimitLeft;
45713
+ if (x < xLimitLeft && this.colStart === this.bodyLeftCol) {
45655
45714
  this.table.scenegraph.setBodyAndColHeaderX(-x);
45656
45715
  }
45657
- else if (x > this.xLimitRight && this.colEnd === this.bodyRightCol) {
45716
+ else if (x > xLimitRight && this.colEnd === this.bodyRightCol) {
45658
45717
  this.table.scenegraph.setBodyAndColHeaderX(-x);
45659
45718
  }
45660
45719
  else {
@@ -45830,7 +45889,6 @@
45830
45889
  columnGroup.setAttribute('width', table.getColWidth(col));
45831
45890
  }
45832
45891
  }
45833
- scene.updateContainerAttrWidthAndX();
45834
45892
  scene.updateContainer();
45835
45893
  for (let col = updateColStart; col <= updateColEnd; col++) {
45836
45894
  const columnGroup = table.scenegraph.getColGroup(col);
@@ -46430,7 +46488,6 @@
46430
46488
  scene.proxy.colStart = scene.table.frozenColCount;
46431
46489
  scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);
46432
46490
  scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);
46433
- scene.updateContainerAttrWidthAndX();
46434
46491
  scene.updateContainer();
46435
46492
  scene.updateBorderSizeAndPosition();
46436
46493
  if (!scene.isPivot && !scene.transpose) {
@@ -46879,8 +46936,7 @@
46879
46936
  });
46880
46937
  }
46881
46938
 
46882
- function updateContainerChildrenX(containerGroup) {
46883
- let x = 0;
46939
+ function updateContainerChildrenX(containerGroup, x) {
46884
46940
  containerGroup.forEachChildrenSkipChild((column, index) => {
46885
46941
  column.setAttribute('x', x);
46886
46942
  x += column.attribute.width;
@@ -47525,7 +47581,6 @@
47525
47581
  updateColWidth(col, detaX, skipUpdateContainer) {
47526
47582
  updateColWidth(this, col, Math.round(detaX));
47527
47583
  if (!skipUpdateContainer) {
47528
- this.updateContainerAttrWidthAndX();
47529
47584
  this.updateContainer();
47530
47585
  }
47531
47586
  }
@@ -47772,7 +47827,6 @@
47772
47827
  this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
47773
47828
  }
47774
47829
  this.table.stateManeger.checkFrozen();
47775
- this.updateContainerAttrWidthAndX();
47776
47830
  this.updateContainer();
47777
47831
  this.createFrameBorder();
47778
47832
  this.updateBorderSizeAndPosition();
@@ -47940,15 +47994,26 @@
47940
47994
  moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, this.table);
47941
47995
  }
47942
47996
  updateContainerAttrWidthAndX() {
47943
- const cornerX = updateContainerChildrenX(this.cornerHeaderGroup);
47944
- const rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup);
47945
- const colHeaderX = updateContainerChildrenX(this.colHeaderGroup);
47946
- const bodyX = updateContainerChildrenX(this.bodyGroup);
47947
- const rightX = updateContainerChildrenX(this.rightFrozenGroup);
47948
- updateContainerChildrenX(this.bottomFrozenGroup);
47949
- updateContainerChildrenX(this.leftBottomCornerGroup);
47950
- updateContainerChildrenX(this.rightTopCornerGroup);
47951
- updateContainerChildrenX(this.rightBottomCornerGroup);
47997
+ const cornerX = updateContainerChildrenX(this.cornerHeaderGroup, 0);
47998
+ const rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup, 0);
47999
+ const colHeaderX = this.colHeaderGroup.hasChildNodes()
48000
+ ? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0
48001
+ ? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.colHeaderGroup.firstChild.col - 1)
48002
+ : 0)
48003
+ : 0;
48004
+ const bodyX = this.bodyGroup.hasChildNodes()
48005
+ ? updateContainerChildrenX(this.bodyGroup, this.bodyGroup.firstChild.col > 0
48006
+ ? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bodyGroup.firstChild.col - 1)
48007
+ : 0)
48008
+ : 0;
48009
+ const rightX = updateContainerChildrenX(this.rightFrozenGroup, 0);
48010
+ this.bottomFrozenGroup.hasChildNodes() &&
48011
+ updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0
48012
+ ? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bottomFrozenGroup.firstChild.col - 1)
48013
+ : 0);
48014
+ updateContainerChildrenX(this.leftBottomCornerGroup, 0);
48015
+ updateContainerChildrenX(this.rightTopCornerGroup, 0);
48016
+ updateContainerChildrenX(this.rightBottomCornerGroup, 0);
47952
48017
  this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width);
47953
48018
  this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width);
47954
48019
  this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width);
@@ -47964,6 +48029,7 @@
47964
48029
  this.bodyGroup.setAttribute('x', this.rowHeaderGroup.attribute.width);
47965
48030
  }
47966
48031
  updateContainer() {
48032
+ this.updateContainerAttrWidthAndX();
47967
48033
  this.updateTableSize();
47968
48034
  const oldHorizontalBarPos = this.table.stateManeger.scroll.horizontalBarPos;
47969
48035
  const oldVerticalBarPos = this.table.stateManeger.scroll.verticalBarPos;
@@ -50222,9 +50288,44 @@
50222
50288
  if (stateManeger.isResizeCol()) {
50223
50289
  endResizeCol(table);
50224
50290
  }
50291
+ else if (stateManeger.isMoveCol()) {
50292
+ table.stateManeger.endMoveCol();
50293
+ if (table.stateManeger.columnMove?.colSource !== -1 &&
50294
+ table.stateManeger.columnMove?.rowSource !== -1 &&
50295
+ table.stateManeger.columnMove?.colTarget !== -1 &&
50296
+ table.stateManeger.columnMove?.rowTarget !== -1) {
50297
+ if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
50298
+ table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
50299
+ target: { col: table.stateManeger.columnMove.colTarget, row: table.stateManeger.columnMove.rowTarget },
50300
+ source: {
50301
+ col: table.stateManeger.columnMove.colSource,
50302
+ row: table.stateManeger.columnMove.rowSource
50303
+ }
50304
+ });
50305
+ }
50306
+ }
50307
+ }
50308
+ else if (stateManeger.isSelecting()) {
50309
+ table.stateManeger.endSelectCells();
50310
+ if (table.stateManeger.select?.ranges?.length) {
50311
+ const lastCol = table.stateManeger.select.ranges[table.stateManeger.select.ranges.length - 1].end.col;
50312
+ const lastRow = table.stateManeger.select.ranges[table.stateManeger.select.ranges.length - 1].end.row;
50313
+ if (table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
50314
+ const cellsEvent = {
50315
+ event: e.nativeEvent,
50316
+ cells: [],
50317
+ col: lastCol,
50318
+ row: lastRow,
50319
+ scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
50320
+ target: undefined
50321
+ };
50322
+ cellsEvent.cells = table.getSelectedCellInfos();
50323
+ table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
50324
+ }
50325
+ }
50326
+ }
50225
50327
  stateManeger.updateInteractionState(InteractionState.default);
50226
50328
  eventManeger.dealTableHover();
50227
- eventManeger.dealTableSelect();
50228
50329
  });
50229
50330
  table.scenegraph.tableGroup.addEventListener('pointerdown', (e) => {
50230
50331
  LastPointerXY = { x: e.x, y: e.y };
@@ -50303,8 +50404,8 @@
50303
50404
  endResizeCol(table);
50304
50405
  }
50305
50406
  else if (stateManeger.isMoveCol()) {
50306
- table.stateManeger.endMoveCol();
50307
50407
  const eventArgsSet = getCellEventArgsSet(e);
50408
+ table.stateManeger.endMoveCol();
50308
50409
  if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
50309
50410
  table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
50310
50411
  target: { col: eventArgsSet.eventArgs.col, row: eventArgsSet.eventArgs.row },
@@ -50401,6 +50502,7 @@
50401
50502
  if (eventManeger.touchSetTimeout) {
50402
50503
  clearTimeout(eventManeger.touchSetTimeout);
50403
50504
  eventManeger.dealTableSelect(eventArgsSet);
50505
+ stateManeger.endSelectCells();
50404
50506
  eventManeger.touchSetTimeout = undefined;
50405
50507
  }
50406
50508
  }
@@ -50998,7 +51100,7 @@
50998
51100
  this.table.toggleHierarchyState(col, row);
50999
51101
  }
51000
51102
  });
51001
- this.table.on(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, () => {
51103
+ this.table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, () => {
51002
51104
  stateManeger.hideMenu();
51003
51105
  });
51004
51106
  if (checkHaveTextStick(this.table)) {
@@ -51057,6 +51159,13 @@
51057
51159
  if (eventArgs.target.name === 'checkbox') {
51058
51160
  return false;
51059
51161
  }
51162
+ const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row);
51163
+ if (this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableHeaderSelect) {
51164
+ return false;
51165
+ }
51166
+ else if (!this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableSelect) {
51167
+ return false;
51168
+ }
51060
51169
  if (this.table.isPivotChart() &&
51061
51170
  (eventArgsSet?.eventArgs?.target.name === 'axis-label' || eventArgsSet?.eventArgs?.target.type === 'chart')) {
51062
51171
  this.table.stateManeger.updateSelectPos(-1, -1);
@@ -51633,7 +51742,7 @@
51633
51742
  ? table.internalProps.layoutMap.getPivotDimensionInfo(col, row)
51634
51743
  : table.getHeaderField(col, row);
51635
51744
  const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex);
51636
- table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, {
51745
+ table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
51637
51746
  col,
51638
51747
  row,
51639
51748
  field: field,
@@ -51661,7 +51770,7 @@
51661
51770
  ? table.internalProps.layoutMap.getPivotDimensionInfo(col, row)
51662
51771
  : table.getHeaderField(col, row);
51663
51772
  const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex);
51664
- table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, {
51773
+ table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
51665
51774
  col,
51666
51775
  row,
51667
51776
  field: field,
@@ -51774,7 +51883,7 @@
51774
51883
  }
51775
51884
  }
51776
51885
  });
51777
- table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, {
51886
+ table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
51778
51887
  col,
51779
51888
  row,
51780
51889
  field: field,
@@ -53008,7 +53117,7 @@
53008
53117
  ? table.internalProps.layoutMap.getPivotDimensionInfo(col, row)
53009
53118
  : table.getHeaderField(col, row);
53010
53119
  const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex);
53011
- table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, {
53120
+ table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
53012
53121
  col,
53013
53122
  row,
53014
53123
  field: field,
@@ -53968,7 +54077,7 @@
53968
54077
  return TABLE_EVENT_TYPE;
53969
54078
  }
53970
54079
  options;
53971
- version = "0.13.2-alpha.5";
54080
+ version = "0.13.2";
53972
54081
  pagination;
53973
54082
  id = `VTable${Date.now()}`;
53974
54083
  headerStyleCache;
@@ -55781,6 +55890,9 @@
55781
55890
  this.render();
55782
55891
  }
55783
55892
  getCopyValue() {
55893
+ if (!this.stateManeger.select?.ranges) {
55894
+ return null;
55895
+ }
55784
55896
  const ranges = this.stateManeger.select.ranges;
55785
55897
  let minCol = Math.min(ranges[0].start.col, ranges[0].end.col);
55786
55898
  let maxCol = Math.max(ranges[0].start.col, ranges[0].end.col);
@@ -55876,7 +55988,13 @@
55876
55988
  return copyValue;
55877
55989
  }
55878
55990
  getSelectedCellInfos() {
55991
+ if (!this.stateManeger.select?.ranges) {
55992
+ return null;
55993
+ }
55879
55994
  const ranges = this.stateManeger.select.ranges;
55995
+ if (!ranges.length) {
55996
+ return [];
55997
+ }
55880
55998
  let minCol = Math.min(ranges[0].start.col, ranges[0].end.col);
55881
55999
  let maxCol = Math.max(ranges[0].start.col, ranges[0].end.col);
55882
56000
  let minRow = Math.min(ranges[0].start.row, ranges[0].end.row);
@@ -56971,6 +57089,9 @@
56971
57089
  return undefined;
56972
57090
  }
56973
57091
  canMoveHeaderPosition(source, target) {
57092
+ if (source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) {
57093
+ return false;
57094
+ }
56974
57095
  const sourceCellRange = this.getCellRange(source.col, source.row);
56975
57096
  if (this.isColumnHeader(source.col, source.row)) {
56976
57097
  const sourceTopId = this.getParentCellId(source.col, sourceCellRange.start.row);
@@ -59325,6 +59446,9 @@
59325
59446
  return undefined;
59326
59447
  }
59327
59448
  canMoveHeaderPosition(source, target) {
59449
+ if (source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) {
59450
+ return false;
59451
+ }
59328
59452
  const sourceCellRange = this.getCellRange(source.col, source.row);
59329
59453
  if (this.isColumnHeader(source.col, source.row)) {
59330
59454
  const sourceTopId = this.getParentCellId(source.col, sourceCellRange.start.row);
@@ -62630,7 +62754,7 @@
62630
62754
  collectValuesBy[indicatorDefine.indicatorKey] = {
62631
62755
  by: rowKeys,
62632
62756
  range: true,
62633
- sumBy: indicatorDefine.chartSpec?.stack !== false &&
62757
+ sumBy: indicatorDefine.chartSpec?.stack &&
62634
62758
  columnKeys.concat(indicatorDefine.chartSpec?.xField)
62635
62759
  };
62636
62760
  if (indicatorDefine.chartSpec.series) {
@@ -62652,7 +62776,7 @@
62652
62776
  collectValuesBy[yField] = {
62653
62777
  by: rowKeys,
62654
62778
  range: chartSeries.direction !== 'horizontal',
62655
- sumBy: chartSeries.stack !== false && columnKeys.concat(chartSeries?.xField),
62779
+ sumBy: chartSeries.stack && columnKeys.concat(chartSeries?.xField),
62656
62780
  sortBy: chartSeries.direction === 'horizontal'
62657
62781
  ? chartSeries?.data?.fields?.[yField]?.domain ??
62658
62782
  indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
@@ -62680,7 +62804,7 @@
62680
62804
  collectValuesBy[yField] = {
62681
62805
  by: rowKeys,
62682
62806
  range: indicators[i].chartSpec.direction !== 'horizontal',
62683
- sumBy: indicatorDefine.chartSpec.stack !== false &&
62807
+ sumBy: indicatorDefine.chartSpec.stack &&
62684
62808
  columnKeys.concat(indicatorDefine.chartSpec?.xField),
62685
62809
  sortBy: indicatorDefine.chartSpec.direction === 'horizontal'
62686
62810
  ? indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
@@ -62697,7 +62821,7 @@
62697
62821
  collectValuesBy[indicatorDefine.indicatorKey] = {
62698
62822
  by: columnKeys,
62699
62823
  range: true,
62700
- sumBy: indicatorDefine.chartSpec?.stack !== false &&
62824
+ sumBy: indicatorDefine.chartSpec?.stack &&
62701
62825
  rowKeys.concat(indicatorDefine.chartSpec?.yField)
62702
62826
  };
62703
62827
  if (indicatorDefine.chartSpec.series) {
@@ -62719,7 +62843,7 @@
62719
62843
  collectValuesBy[xField] = {
62720
62844
  by: columnKeys,
62721
62845
  range: chartSeries.direction === 'horizontal',
62722
- sumBy: chartSeries.stack !== false && rowKeys.concat(chartSeries?.yField),
62846
+ sumBy: chartSeries.stack && rowKeys.concat(chartSeries?.yField),
62723
62847
  sortBy: chartSeries.direction !== 'horizontal'
62724
62848
  ? chartSeries?.data?.fields?.[xField]?.domain ??
62725
62849
  indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
@@ -62747,7 +62871,7 @@
62747
62871
  collectValuesBy[xField] = {
62748
62872
  by: columnKeys,
62749
62873
  range: indicators[i].chartSpec.direction === 'horizontal',
62750
- sumBy: indicatorDefine.chartSpec.stack !== false &&
62874
+ sumBy: indicatorDefine.chartSpec.stack &&
62751
62875
  rowKeys.concat(indicatorDefine.chartSpec?.yField),
62752
62876
  sortBy: indicatorDefine.chartSpec.direction !== 'horizontal'
62753
62877
  ? indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
@@ -63838,7 +63962,7 @@
63838
63962
  return new Tag(params ? params.attribute : {});
63839
63963
  }
63840
63964
 
63841
- const version = "0.13.2-alpha.5";
63965
+ const version = "0.13.2";
63842
63966
  function getIcons() {
63843
63967
  return get$1();
63844
63968
  }