@visactor/vtable 0.13.2-alpha.6 → 0.13.3

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 (101) 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 +7 -2
  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/group-creater/progress/proxy.js +2 -2
  30. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  31. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js +3 -3
  32. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -1
  33. package/cjs/scenegraph/layout/compute-col-width.js +3 -2
  34. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  35. package/cjs/scenegraph/layout/compute-row-height.js +3 -2
  36. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  37. package/cjs/scenegraph/layout/frozen.js +1 -2
  38. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  39. package/cjs/scenegraph/layout/move-cell.js +1 -1
  40. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  41. package/cjs/scenegraph/layout/update-row.js +4 -1
  42. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  43. package/cjs/scenegraph/scenegraph.js +17 -14
  44. package/cjs/scenegraph/scenegraph.js.map +1 -1
  45. package/cjs/scenegraph/utils/update-container.d.ts +1 -1
  46. package/cjs/scenegraph/utils/update-container.js +1 -2
  47. package/cjs/scenegraph/utils/update-container.js.map +1 -1
  48. package/cjs/ts-types/events.d.ts +2 -2
  49. package/cjs/ts-types/events.js.map +1 -1
  50. package/dist/vtable.js +229 -118
  51. package/dist/vtable.min.js +2 -2
  52. package/es/PivotChart.js +6 -6
  53. package/es/PivotChart.js.map +1 -1
  54. package/es/components/menu/dom/logic/MenuContainer.js +1 -1
  55. package/es/components/menu/dom/logic/MenuContainer.js.map +1 -1
  56. package/es/components/menu/dom/logic/MenuElement.js +3 -3
  57. package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
  58. package/es/core/BaseTable.d.ts +2 -2
  59. package/es/core/BaseTable.js +7 -2
  60. package/es/core/BaseTable.js.map +1 -1
  61. package/es/core/TABLE_EVENT_TYPE.d.ts +1 -1
  62. package/es/core/TABLE_EVENT_TYPE.js +1 -1
  63. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  64. package/es/event/event.js +8 -3
  65. package/es/event/event.js.map +1 -1
  66. package/es/event/listener/table-group.js +29 -5
  67. package/es/event/listener/table-group.js.map +1 -1
  68. package/es/index.d.ts +1 -1
  69. package/es/index.js +1 -1
  70. package/es/index.js.map +1 -1
  71. package/es/layout/pivot-header-layout.js +1 -0
  72. package/es/layout/pivot-header-layout.js.map +1 -1
  73. package/es/layout/simple-header-layout.js +1 -0
  74. package/es/layout/simple-header-layout.js.map +1 -1
  75. package/es/scenegraph/component/custom.d.ts +1 -0
  76. package/es/scenegraph/component/custom.js +12 -0
  77. package/es/scenegraph/component/custom.js.map +1 -1
  78. package/es/scenegraph/component/menu.js +1 -1
  79. package/es/scenegraph/component/menu.js.map +1 -1
  80. package/es/scenegraph/group-creater/progress/proxy.js +2 -2
  81. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  82. package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js +3 -3
  83. package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -1
  84. package/es/scenegraph/layout/compute-col-width.js +4 -1
  85. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  86. package/es/scenegraph/layout/compute-row-height.js +4 -1
  87. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  88. package/es/scenegraph/layout/frozen.js +1 -2
  89. package/es/scenegraph/layout/frozen.js.map +1 -1
  90. package/es/scenegraph/layout/move-cell.js +1 -1
  91. package/es/scenegraph/layout/move-cell.js.map +1 -1
  92. package/es/scenegraph/layout/update-row.js +4 -1
  93. package/es/scenegraph/layout/update-row.js.map +1 -1
  94. package/es/scenegraph/scenegraph.js +12 -11
  95. package/es/scenegraph/scenegraph.js.map +1 -1
  96. package/es/scenegraph/utils/update-container.d.ts +1 -1
  97. package/es/scenegraph/utils/update-container.js +1 -2
  98. package/es/scenegraph/utils/update-container.js.map +1 -1
  99. package/es/ts-types/events.d.ts +2 -2
  100. package/es/ts-types/events.js.map +1 -1
  101. 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
  }
@@ -43869,6 +43898,9 @@
43869
43898
  };
43870
43899
  if (customLayout) {
43871
43900
  const customLayoutObj = customLayout(arg);
43901
+ if (customLayoutObj.rootContainer) {
43902
+ customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
43903
+ }
43872
43904
  if (customLayoutObj.rootContainer instanceof Group$1) {
43873
43905
  width = customLayoutObj.rootContainer.AABBBounds.width() ?? 0;
43874
43906
  }
@@ -44932,8 +44964,8 @@
44932
44964
  }
44933
44965
  }
44934
44966
  const totalActualBodyColumnCount = Math.min(table.scenegraph.proxy.colLimit, table.scenegraph.proxy.bodyRightCol - table.scenegraph.proxy.bodyLeftCol + 1);
44935
- const totalBodyWidth = table.getColsWidth(table.rowHeaderLevelCount, table.rowHeaderLevelCount + totalActualBodyColumnCount);
44936
- 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);
44937
44969
  table.scenegraph.proxy.xLimitLeft = totalBodyWidth / 2;
44938
44970
  table.scenegraph.proxy.xLimitRight = totalWidth - totalBodyWidth / 2;
44939
44971
  }
@@ -44945,7 +44977,7 @@
44945
44977
  x = prevCellGroup.attribute.x + table.getColWidth(colGroup._prev.col);
44946
44978
  }
44947
44979
  else {
44948
- x = table.getColsWidth(table.rowHeaderLevelCount, colGroup.col - 1);
44980
+ x = table.getColsWidth(table.frozenColCount, colGroup.col - 1);
44949
44981
  }
44950
44982
  colGroup.setAttribute('x', x);
44951
44983
  }
@@ -44956,7 +44988,7 @@
44956
44988
  x = nextCellGroup.attribute.x - table.getColWidth(colGroup.col);
44957
44989
  }
44958
44990
  else {
44959
- x = table.getColsWidth(table.rowHeaderLevelCount, colGroup.col - 1);
44991
+ x = table.getColsWidth(table.frozenColCount, colGroup.col - 1);
44960
44992
  }
44961
44993
  colGroup.setAttribute('x', x);
44962
44994
  }
@@ -45659,7 +45691,6 @@
45659
45691
  this.colEnd = endCol;
45660
45692
  this.colUpdatePos = this.colEnd;
45661
45693
  this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);
45662
- this.table.scenegraph.updateContainerAttrWidthAndX();
45663
45694
  this.table.scenegraph.updateContainer();
45664
45695
  this.table.scenegraph.updateBorderSizeAndPosition();
45665
45696
  }
@@ -45858,7 +45889,6 @@
45858
45889
  columnGroup.setAttribute('width', table.getColWidth(col));
45859
45890
  }
45860
45891
  }
45861
- scene.updateContainerAttrWidthAndX();
45862
45892
  scene.updateContainer();
45863
45893
  for (let col = updateColStart; col <= updateColEnd; col++) {
45864
45894
  const columnGroup = table.scenegraph.getColGroup(col);
@@ -46171,6 +46201,9 @@
46171
46201
  function removeRow(row, scene) {
46172
46202
  for (let col = 0; col < scene.table.colCount; col++) {
46173
46203
  const colGroup = scene.getColGroup(col, false);
46204
+ if (!colGroup) {
46205
+ continue;
46206
+ }
46174
46207
  let cellGroup;
46175
46208
  colGroup.forEachChildren((cell) => {
46176
46209
  if (cell.row === row) {
@@ -46204,6 +46237,9 @@
46204
46237
  continue;
46205
46238
  }
46206
46239
  const colGroup = scene.getColGroup(col);
46240
+ if (!colGroup) {
46241
+ continue;
46242
+ }
46207
46243
  if (colGroup.firstChild && row < colGroup.firstChild.row) {
46208
46244
  colGroup.insertBefore(cellGroup, colGroup.firstChild);
46209
46245
  colGroup.firstChild.row = colGroup.firstChild.row + 1;
@@ -46240,6 +46276,9 @@
46240
46276
  for (let col = 0; col < scene.table.colCount; col++) {
46241
46277
  const headerColGroup = scene.getColGroup(col, true);
46242
46278
  const colGroup = scene.getColGroup(col, false);
46279
+ if (!headerColGroup || !colGroup) {
46280
+ continue;
46281
+ }
46243
46282
  let rowIndex = headerColGroup.firstChild?.row;
46244
46283
  headerColGroup.forEachChildren((cellGroup) => {
46245
46284
  cellGroup.row = rowIndex;
@@ -46257,6 +46296,9 @@
46257
46296
  for (let col = 0; col < scene.table.colCount; col++) {
46258
46297
  const headerColGroup = scene.getColGroup(col, true);
46259
46298
  const colGroup = scene.getColGroup(col, false);
46299
+ if (!headerColGroup || !colGroup) {
46300
+ continue;
46301
+ }
46260
46302
  let rowIndex = headerColGroup.firstChild?.row;
46261
46303
  let y = 0;
46262
46304
  rowIndex = colGroup.firstChild?.row;
@@ -46446,7 +46488,6 @@
46446
46488
  scene.proxy.colStart = scene.table.frozenColCount;
46447
46489
  scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);
46448
46490
  scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);
46449
- scene.updateContainerAttrWidthAndX();
46450
46491
  scene.updateContainer();
46451
46492
  scene.updateBorderSizeAndPosition();
46452
46493
  if (!scene.isPivot && !scene.transpose) {
@@ -46895,8 +46936,7 @@
46895
46936
  });
46896
46937
  }
46897
46938
 
46898
- function updateContainerChildrenX(containerGroup) {
46899
- let x = 0;
46939
+ function updateContainerChildrenX(containerGroup, x) {
46900
46940
  containerGroup.forEachChildrenSkipChild((column, index) => {
46901
46941
  column.setAttribute('x', x);
46902
46942
  x += column.attribute.width;
@@ -47541,7 +47581,6 @@
47541
47581
  updateColWidth(col, detaX, skipUpdateContainer) {
47542
47582
  updateColWidth(this, col, Math.round(detaX));
47543
47583
  if (!skipUpdateContainer) {
47544
- this.updateContainerAttrWidthAndX();
47545
47584
  this.updateContainer();
47546
47585
  }
47547
47586
  }
@@ -47788,7 +47827,6 @@
47788
47827
  this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
47789
47828
  }
47790
47829
  this.table.stateManeger.checkFrozen();
47791
- this.updateContainerAttrWidthAndX();
47792
47830
  this.updateContainer();
47793
47831
  this.createFrameBorder();
47794
47832
  this.updateBorderSizeAndPosition();
@@ -47956,15 +47994,26 @@
47956
47994
  moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, this.table);
47957
47995
  }
47958
47996
  updateContainerAttrWidthAndX() {
47959
- const cornerX = updateContainerChildrenX(this.cornerHeaderGroup);
47960
- const rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup);
47961
- const colHeaderX = updateContainerChildrenX(this.colHeaderGroup);
47962
- const bodyX = updateContainerChildrenX(this.bodyGroup);
47963
- const rightX = updateContainerChildrenX(this.rightFrozenGroup);
47964
- updateContainerChildrenX(this.bottomFrozenGroup);
47965
- updateContainerChildrenX(this.leftBottomCornerGroup);
47966
- updateContainerChildrenX(this.rightTopCornerGroup);
47967
- 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);
47968
48017
  this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width);
47969
48018
  this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width);
47970
48019
  this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width);
@@ -47980,6 +48029,7 @@
47980
48029
  this.bodyGroup.setAttribute('x', this.rowHeaderGroup.attribute.width);
47981
48030
  }
47982
48031
  updateContainer() {
48032
+ this.updateContainerAttrWidthAndX();
47983
48033
  this.updateTableSize();
47984
48034
  const oldHorizontalBarPos = this.table.stateManeger.scroll.horizontalBarPos;
47985
48035
  const oldVerticalBarPos = this.table.stateManeger.scroll.verticalBarPos;
@@ -48210,6 +48260,9 @@
48210
48260
  this.recalculateColWidths();
48211
48261
  this.recalculateRowHeights();
48212
48262
  this.table.stateManeger.checkFrozen();
48263
+ if (!this.isPivot && !this.transpose) {
48264
+ this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
48265
+ }
48213
48266
  this.updateNextFrame();
48214
48267
  }
48215
48268
  findAndUpdateIcon(group, funcTypeArr, iconConfig) {
@@ -50238,9 +50291,44 @@
50238
50291
  if (stateManeger.isResizeCol()) {
50239
50292
  endResizeCol(table);
50240
50293
  }
50294
+ else if (stateManeger.isMoveCol()) {
50295
+ table.stateManeger.endMoveCol();
50296
+ if (table.stateManeger.columnMove?.colSource !== -1 &&
50297
+ table.stateManeger.columnMove?.rowSource !== -1 &&
50298
+ table.stateManeger.columnMove?.colTarget !== -1 &&
50299
+ table.stateManeger.columnMove?.rowTarget !== -1) {
50300
+ if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
50301
+ table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
50302
+ target: { col: table.stateManeger.columnMove.colTarget, row: table.stateManeger.columnMove.rowTarget },
50303
+ source: {
50304
+ col: table.stateManeger.columnMove.colSource,
50305
+ row: table.stateManeger.columnMove.rowSource
50306
+ }
50307
+ });
50308
+ }
50309
+ }
50310
+ }
50311
+ else if (stateManeger.isSelecting()) {
50312
+ table.stateManeger.endSelectCells();
50313
+ if (table.stateManeger.select?.ranges?.length) {
50314
+ const lastCol = table.stateManeger.select.ranges[table.stateManeger.select.ranges.length - 1].end.col;
50315
+ const lastRow = table.stateManeger.select.ranges[table.stateManeger.select.ranges.length - 1].end.row;
50316
+ if (table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
50317
+ const cellsEvent = {
50318
+ event: e.nativeEvent,
50319
+ cells: [],
50320
+ col: lastCol,
50321
+ row: lastRow,
50322
+ scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
50323
+ target: undefined
50324
+ };
50325
+ cellsEvent.cells = table.getSelectedCellInfos();
50326
+ table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
50327
+ }
50328
+ }
50329
+ }
50241
50330
  stateManeger.updateInteractionState(InteractionState.default);
50242
50331
  eventManeger.dealTableHover();
50243
- eventManeger.dealTableSelect();
50244
50332
  });
50245
50333
  table.scenegraph.tableGroup.addEventListener('pointerdown', (e) => {
50246
50334
  LastPointerXY = { x: e.x, y: e.y };
@@ -50319,8 +50407,8 @@
50319
50407
  endResizeCol(table);
50320
50408
  }
50321
50409
  else if (stateManeger.isMoveCol()) {
50322
- table.stateManeger.endMoveCol();
50323
50410
  const eventArgsSet = getCellEventArgsSet(e);
50411
+ table.stateManeger.endMoveCol();
50324
50412
  if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
50325
50413
  table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
50326
50414
  target: { col: eventArgsSet.eventArgs.col, row: eventArgsSet.eventArgs.row },
@@ -50417,6 +50505,7 @@
50417
50505
  if (eventManeger.touchSetTimeout) {
50418
50506
  clearTimeout(eventManeger.touchSetTimeout);
50419
50507
  eventManeger.dealTableSelect(eventArgsSet);
50508
+ stateManeger.endSelectCells();
50420
50509
  eventManeger.touchSetTimeout = undefined;
50421
50510
  }
50422
50511
  }
@@ -51014,7 +51103,7 @@
51014
51103
  this.table.toggleHierarchyState(col, row);
51015
51104
  }
51016
51105
  });
51017
- this.table.on(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, () => {
51106
+ this.table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, () => {
51018
51107
  stateManeger.hideMenu();
51019
51108
  });
51020
51109
  if (checkHaveTextStick(this.table)) {
@@ -51073,6 +51162,13 @@
51073
51162
  if (eventArgs.target.name === 'checkbox') {
51074
51163
  return false;
51075
51164
  }
51165
+ const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row);
51166
+ if (this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableHeaderSelect) {
51167
+ return false;
51168
+ }
51169
+ else if (!this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableSelect) {
51170
+ return false;
51171
+ }
51076
51172
  if (this.table.isPivotChart() &&
51077
51173
  (eventArgsSet?.eventArgs?.target.name === 'axis-label' || eventArgsSet?.eventArgs?.target.type === 'chart')) {
51078
51174
  this.table.stateManeger.updateSelectPos(-1, -1);
@@ -51649,7 +51745,7 @@
51649
51745
  ? table.internalProps.layoutMap.getPivotDimensionInfo(col, row)
51650
51746
  : table.getHeaderField(col, row);
51651
51747
  const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex);
51652
- table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, {
51748
+ table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
51653
51749
  col,
51654
51750
  row,
51655
51751
  field: field,
@@ -51677,7 +51773,7 @@
51677
51773
  ? table.internalProps.layoutMap.getPivotDimensionInfo(col, row)
51678
51774
  : table.getHeaderField(col, row);
51679
51775
  const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex);
51680
- table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, {
51776
+ table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
51681
51777
  col,
51682
51778
  row,
51683
51779
  field: field,
@@ -51790,7 +51886,7 @@
51790
51886
  }
51791
51887
  }
51792
51888
  });
51793
- table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, {
51889
+ table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
51794
51890
  col,
51795
51891
  row,
51796
51892
  field: field,
@@ -53024,7 +53120,7 @@
53024
53120
  ? table.internalProps.layoutMap.getPivotDimensionInfo(col, row)
53025
53121
  : table.getHeaderField(col, row);
53026
53122
  const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex);
53027
- table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, {
53123
+ table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
53028
53124
  col,
53029
53125
  row,
53030
53126
  field: field,
@@ -53984,7 +54080,7 @@
53984
54080
  return TABLE_EVENT_TYPE;
53985
54081
  }
53986
54082
  options;
53987
- version = "0.13.2-alpha.6";
54083
+ version = "0.13.3";
53988
54084
  pagination;
53989
54085
  id = `VTable${Date.now()}`;
53990
54086
  headerStyleCache;
@@ -54723,7 +54819,7 @@
54723
54819
  }
54724
54820
  isFrozenCell(col, row) {
54725
54821
  const isFrozenRow = this.isFrozenRow(row) || this.isBottomFrozenRow(row);
54726
- const isFrozenCol = this.isFrozenRow(col) || this.isRightFrozenColumn(col);
54822
+ const isFrozenCol = this.isFrozenColumn(col) || this.isRightFrozenColumn(col);
54727
54823
  if (isFrozenRow || isFrozenCol) {
54728
54824
  return {
54729
54825
  row: isFrozenRow,
@@ -55797,6 +55893,9 @@
55797
55893
  this.render();
55798
55894
  }
55799
55895
  getCopyValue() {
55896
+ if (!this.stateManeger.select?.ranges) {
55897
+ return null;
55898
+ }
55800
55899
  const ranges = this.stateManeger.select.ranges;
55801
55900
  let minCol = Math.min(ranges[0].start.col, ranges[0].end.col);
55802
55901
  let maxCol = Math.max(ranges[0].start.col, ranges[0].end.col);
@@ -55892,7 +55991,13 @@
55892
55991
  return copyValue;
55893
55992
  }
55894
55993
  getSelectedCellInfos() {
55994
+ if (!this.stateManeger.select?.ranges) {
55995
+ return null;
55996
+ }
55895
55997
  const ranges = this.stateManeger.select.ranges;
55998
+ if (!ranges.length) {
55999
+ return [];
56000
+ }
55896
56001
  let minCol = Math.min(ranges[0].start.col, ranges[0].end.col);
55897
56002
  let maxCol = Math.max(ranges[0].start.col, ranges[0].end.col);
55898
56003
  let minRow = Math.min(ranges[0].start.row, ranges[0].end.row);
@@ -56987,6 +57092,9 @@
56987
57092
  return undefined;
56988
57093
  }
56989
57094
  canMoveHeaderPosition(source, target) {
57095
+ if (source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) {
57096
+ return false;
57097
+ }
56990
57098
  const sourceCellRange = this.getCellRange(source.col, source.row);
56991
57099
  if (this.isColumnHeader(source.col, source.row)) {
56992
57100
  const sourceTopId = this.getParentCellId(source.col, sourceCellRange.start.row);
@@ -59341,6 +59449,9 @@
59341
59449
  return undefined;
59342
59450
  }
59343
59451
  canMoveHeaderPosition(source, target) {
59452
+ if (source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) {
59453
+ return false;
59454
+ }
59344
59455
  const sourceCellRange = this.getCellRange(source.col, source.row);
59345
59456
  if (this.isColumnHeader(source.col, source.row)) {
59346
59457
  const sourceTopId = this.getParentCellId(source.col, sourceCellRange.start.row);
@@ -62646,7 +62757,7 @@
62646
62757
  collectValuesBy[indicatorDefine.indicatorKey] = {
62647
62758
  by: rowKeys,
62648
62759
  range: true,
62649
- sumBy: indicatorDefine.chartSpec?.stack !== false &&
62760
+ sumBy: indicatorDefine.chartSpec?.stack &&
62650
62761
  columnKeys.concat(indicatorDefine.chartSpec?.xField)
62651
62762
  };
62652
62763
  if (indicatorDefine.chartSpec.series) {
@@ -62668,7 +62779,7 @@
62668
62779
  collectValuesBy[yField] = {
62669
62780
  by: rowKeys,
62670
62781
  range: chartSeries.direction !== 'horizontal',
62671
- sumBy: chartSeries.stack !== false && columnKeys.concat(chartSeries?.xField),
62782
+ sumBy: chartSeries.stack && columnKeys.concat(chartSeries?.xField),
62672
62783
  sortBy: chartSeries.direction === 'horizontal'
62673
62784
  ? chartSeries?.data?.fields?.[yField]?.domain ??
62674
62785
  indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
@@ -62696,7 +62807,7 @@
62696
62807
  collectValuesBy[yField] = {
62697
62808
  by: rowKeys,
62698
62809
  range: indicators[i].chartSpec.direction !== 'horizontal',
62699
- sumBy: indicatorDefine.chartSpec.stack !== false &&
62810
+ sumBy: indicatorDefine.chartSpec.stack &&
62700
62811
  columnKeys.concat(indicatorDefine.chartSpec?.xField),
62701
62812
  sortBy: indicatorDefine.chartSpec.direction === 'horizontal'
62702
62813
  ? indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
@@ -62713,7 +62824,7 @@
62713
62824
  collectValuesBy[indicatorDefine.indicatorKey] = {
62714
62825
  by: columnKeys,
62715
62826
  range: true,
62716
- sumBy: indicatorDefine.chartSpec?.stack !== false &&
62827
+ sumBy: indicatorDefine.chartSpec?.stack &&
62717
62828
  rowKeys.concat(indicatorDefine.chartSpec?.yField)
62718
62829
  };
62719
62830
  if (indicatorDefine.chartSpec.series) {
@@ -62735,7 +62846,7 @@
62735
62846
  collectValuesBy[xField] = {
62736
62847
  by: columnKeys,
62737
62848
  range: chartSeries.direction === 'horizontal',
62738
- sumBy: chartSeries.stack !== false && rowKeys.concat(chartSeries?.yField),
62849
+ sumBy: chartSeries.stack && rowKeys.concat(chartSeries?.yField),
62739
62850
  sortBy: chartSeries.direction !== 'horizontal'
62740
62851
  ? chartSeries?.data?.fields?.[xField]?.domain ??
62741
62852
  indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
@@ -62763,7 +62874,7 @@
62763
62874
  collectValuesBy[xField] = {
62764
62875
  by: columnKeys,
62765
62876
  range: indicators[i].chartSpec.direction === 'horizontal',
62766
- sumBy: indicatorDefine.chartSpec.stack !== false &&
62877
+ sumBy: indicatorDefine.chartSpec.stack &&
62767
62878
  rowKeys.concat(indicatorDefine.chartSpec?.yField),
62768
62879
  sortBy: indicatorDefine.chartSpec.direction !== 'horizontal'
62769
62880
  ? indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
@@ -63854,7 +63965,7 @@
63854
63965
  return new Tag(params ? params.attribute : {});
63855
63966
  }
63856
63967
 
63857
- const version = "0.13.2-alpha.6";
63968
+ const version = "0.13.3";
63858
63969
  function getIcons() {
63859
63970
  return get$1();
63860
63971
  }