@visactor/vtable 0.18.3-alpha.0 → 0.18.4

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 (51) hide show
  1. package/cjs/core/BaseTable.d.ts +1 -3
  2. package/cjs/core/BaseTable.js +37 -29
  3. package/cjs/core/BaseTable.js.map +1 -1
  4. package/cjs/edit/edit-manager.d.ts +1 -0
  5. package/cjs/edit/edit-manager.js +3 -0
  6. package/cjs/edit/edit-manager.js.map +1 -1
  7. package/cjs/event/listener/container-dom.js +1 -2
  8. package/cjs/event/listener/container-dom.js.map +1 -1
  9. package/cjs/event/listener/table-group.js +2 -2
  10. package/cjs/event/listener/table-group.js.map +1 -1
  11. package/cjs/event/util.js +2 -2
  12. package/cjs/event/util.js.map +1 -1
  13. package/cjs/index.d.ts +1 -1
  14. package/cjs/index.js +1 -1
  15. package/cjs/index.js.map +1 -1
  16. package/cjs/scenegraph/debug-tool/debug-tool.js +1 -4
  17. package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
  18. package/cjs/scenegraph/graphic/chart.js +6 -12
  19. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  20. package/cjs/scenegraph/scenegraph.js +2 -5
  21. package/cjs/scenegraph/scenegraph.js.map +1 -1
  22. package/cjs/ts-types/base-table.d.ts +5 -3
  23. package/cjs/ts-types/base-table.js.map +1 -1
  24. package/cjs/vrender.js.map +1 -1
  25. package/dist/vtable.js +209 -175
  26. package/dist/vtable.min.js +2 -2
  27. package/es/core/BaseTable.d.ts +1 -3
  28. package/es/core/BaseTable.js +37 -29
  29. package/es/core/BaseTable.js.map +1 -1
  30. package/es/edit/edit-manager.d.ts +1 -0
  31. package/es/edit/edit-manager.js +3 -0
  32. package/es/edit/edit-manager.js.map +1 -1
  33. package/es/event/listener/container-dom.js +1 -2
  34. package/es/event/listener/container-dom.js.map +1 -1
  35. package/es/event/listener/table-group.js +2 -2
  36. package/es/event/listener/table-group.js.map +1 -1
  37. package/es/event/util.js +2 -2
  38. package/es/event/util.js.map +1 -1
  39. package/es/index.d.ts +1 -1
  40. package/es/index.js +1 -1
  41. package/es/index.js.map +1 -1
  42. package/es/scenegraph/debug-tool/debug-tool.js +1 -4
  43. package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
  44. package/es/scenegraph/graphic/chart.js +6 -12
  45. package/es/scenegraph/graphic/chart.js.map +1 -1
  46. package/es/scenegraph/scenegraph.js +2 -5
  47. package/es/scenegraph/scenegraph.js.map +1 -1
  48. package/es/ts-types/base-table.d.ts +5 -3
  49. package/es/ts-types/base-table.js.map +1 -1
  50. package/es/vrender.js.map +1 -1
  51. package/package.json +6 -6
package/dist/vtable.js CHANGED
@@ -8074,7 +8074,7 @@
8074
8074
  const SYMBOL_NUMBER_TYPE = genNumberType();
8075
8075
  const TEXT_NUMBER_TYPE = genNumberType();
8076
8076
  const GraphicService = Symbol.for("GraphicService");
8077
- const GraphicCreator$1 = Symbol.for("GraphicCreator");
8077
+ const GraphicCreator$2 = Symbol.for("GraphicCreator");
8078
8078
  const SVG_PARSE_ATTRIBUTE_MAP = {
8079
8079
  "stroke-linecap": "lineCap",
8080
8080
  "stroke-linejoin": "lineJoin",
@@ -12312,9 +12312,9 @@
12312
12312
  return !!visible || (aabbBounds.clear(), !1);
12313
12313
  }
12314
12314
  };
12315
- DefaultGraphicService = __decorate$19([injectable(), __param$F(0, inject(GraphicCreator$1)), __metadata$S("design:paramtypes", [Object])], DefaultGraphicService);
12315
+ DefaultGraphicService = __decorate$19([injectable(), __param$F(0, inject(GraphicCreator$2)), __metadata$S("design:paramtypes", [Object])], DefaultGraphicService);
12316
12316
 
12317
- class GraphicCreator {
12317
+ let GraphicCreator$1 = class GraphicCreator {
12318
12318
  constructor() {
12319
12319
  this.store = new Map();
12320
12320
  }
@@ -12325,12 +12325,12 @@
12325
12325
  const cb = this.store.get(name);
12326
12326
  return cb ? cb(params) : null;
12327
12327
  }
12328
- }
12329
- const graphicCreator = new GraphicCreator();
12328
+ };
12329
+ const graphicCreator$1 = new GraphicCreator$1();
12330
12330
 
12331
- let text;
12332
- function getTextBounds(params) {
12333
- return text || (text = graphicCreator.CreateGraphic("text", {})), text.initAttributes(params), text.AABBBounds;
12331
+ let text$1;
12332
+ function getTextBounds$1(params) {
12333
+ return text$1 || (text$1 = graphicCreator$1.CreateGraphic("text", {})), text$1.initAttributes(params), text$1.AABBBounds;
12334
12334
  }
12335
12335
 
12336
12336
  const result = {
@@ -15069,7 +15069,7 @@
15069
15069
  getShadowRoot(interactiveLayer) {
15070
15070
  var _a;
15071
15071
  let group = interactiveLayer.getElementById("_interactive_group");
15072
- return group || (group = graphicCreator.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
15072
+ return group || (group = graphicCreator$1.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
15073
15073
  }
15074
15074
  }
15075
15075
  class Canvas3DDrawItemInterceptor {
@@ -15322,7 +15322,7 @@
15322
15322
  });
15323
15323
 
15324
15324
  var graphicModule = new ContainerModule(bind => {
15325
- bind(GraphicService).to(DefaultGraphicService).inSingletonScope(), bind(GraphicCreator$1).toConstantValue(graphicCreator);
15325
+ bind(GraphicService).to(DefaultGraphicService).inSingletonScope(), bind(GraphicCreator$2).toConstantValue(graphicCreator$1);
15326
15326
  });
15327
15327
 
15328
15328
  const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
@@ -18129,75 +18129,75 @@
18129
18129
  });
18130
18130
 
18131
18131
  function registerArcGraphic() {
18132
- graphicCreator.RegisterGraphicCreator("arc", createArc);
18132
+ graphicCreator$1.RegisterGraphicCreator("arc", createArc);
18133
18133
  }
18134
18134
 
18135
18135
  function registerArc3dGraphic() {
18136
- graphicCreator.RegisterGraphicCreator("arc3d", createArc3d);
18136
+ graphicCreator$1.RegisterGraphicCreator("arc3d", createArc3d);
18137
18137
  }
18138
18138
 
18139
18139
  function registerAreaGraphic() {
18140
- graphicCreator.RegisterGraphicCreator("area", createArea);
18140
+ graphicCreator$1.RegisterGraphicCreator("area", createArea);
18141
18141
  }
18142
18142
 
18143
18143
  function registerCircleGraphic() {
18144
- graphicCreator.RegisterGraphicCreator("circle", createCircle);
18144
+ graphicCreator$1.RegisterGraphicCreator("circle", createCircle);
18145
18145
  }
18146
18146
 
18147
18147
  function registerGlyphGraphic() {
18148
- graphicCreator.RegisterGraphicCreator("glyph", createGlyph);
18148
+ graphicCreator$1.RegisterGraphicCreator("glyph", createGlyph);
18149
18149
  }
18150
18150
 
18151
18151
  function registerGroupGraphic() {
18152
- graphicCreator.RegisterGraphicCreator("group", createGroup);
18152
+ graphicCreator$1.RegisterGraphicCreator("group", createGroup);
18153
18153
  }
18154
18154
 
18155
18155
  function registerImageGraphic() {
18156
- graphicCreator.RegisterGraphicCreator("image", createImage);
18156
+ graphicCreator$1.RegisterGraphicCreator("image", createImage);
18157
18157
  }
18158
18158
 
18159
18159
  function registerLineGraphic() {
18160
- graphicCreator.RegisterGraphicCreator("line", createLine);
18160
+ graphicCreator$1.RegisterGraphicCreator("line", createLine);
18161
18161
  }
18162
18162
 
18163
18163
  function registerPathGraphic() {
18164
- graphicCreator.RegisterGraphicCreator("path", createPath);
18164
+ graphicCreator$1.RegisterGraphicCreator("path", createPath);
18165
18165
  }
18166
18166
 
18167
18167
  function registerPolygonGraphic() {
18168
- graphicCreator.RegisterGraphicCreator("polygon", createPolygon);
18168
+ graphicCreator$1.RegisterGraphicCreator("polygon", createPolygon);
18169
18169
  }
18170
18170
 
18171
18171
  function registerPyramid3dGraphic() {
18172
- graphicCreator.RegisterGraphicCreator("pyramid3d", createPyramid3d);
18172
+ graphicCreator$1.RegisterGraphicCreator("pyramid3d", createPyramid3d);
18173
18173
  }
18174
18174
 
18175
18175
  function registerRectGraphic() {
18176
- graphicCreator.RegisterGraphicCreator("rect", createRect);
18176
+ graphicCreator$1.RegisterGraphicCreator("rect", createRect);
18177
18177
  }
18178
18178
 
18179
18179
  function registerRect3dGraphic() {
18180
- graphicCreator.RegisterGraphicCreator("rect3d", createRect3d);
18180
+ graphicCreator$1.RegisterGraphicCreator("rect3d", createRect3d);
18181
18181
  }
18182
18182
 
18183
18183
  function registerRichtextGraphic() {
18184
- graphicCreator.RegisterGraphicCreator("richtext", createRichText);
18184
+ graphicCreator$1.RegisterGraphicCreator("richtext", createRichText);
18185
18185
  }
18186
18186
 
18187
18187
  function registerSymbolGraphic() {
18188
- graphicCreator.RegisterGraphicCreator("symbol", createSymbol);
18188
+ graphicCreator$1.RegisterGraphicCreator("symbol", createSymbol);
18189
18189
  }
18190
18190
 
18191
18191
  function registerTextGraphic() {
18192
- graphicCreator.RegisterGraphicCreator("text", createText);
18192
+ graphicCreator$1.RegisterGraphicCreator("text", createText);
18193
18193
  }
18194
18194
 
18195
18195
  function registerShadowRootGraphic() {
18196
- graphicCreator.RegisterGraphicCreator("shadowRoot", createShadowRoot);
18196
+ graphicCreator$1.RegisterGraphicCreator("shadowRoot", createShadowRoot);
18197
18197
  }
18198
18198
 
18199
18199
  function registerWrapTextGraphic() {
18200
- graphicCreator.RegisterGraphicCreator("wrapText", createWrapText);
18200
+ graphicCreator$1.RegisterGraphicCreator("wrapText", createWrapText);
18201
18201
  }
18202
18202
 
18203
18203
  const REACT_TO_CANOPUS_EVENTS = {
@@ -18248,40 +18248,40 @@
18248
18248
  onDblClick: "dblclick"
18249
18249
  };
18250
18250
  function VArc(params) {
18251
- return graphicCreator.arc(params ? params.attribute : {});
18251
+ return graphicCreator$1.arc(params ? params.attribute : {});
18252
18252
  }
18253
18253
  function VArea(params) {
18254
- return graphicCreator.area(params ? params.attribute : {});
18254
+ return graphicCreator$1.area(params ? params.attribute : {});
18255
18255
  }
18256
18256
  function VCircle(params) {
18257
- return graphicCreator.circle(params ? params.attribute : {});
18257
+ return graphicCreator$1.circle(params ? params.attribute : {});
18258
18258
  }
18259
18259
  function VGroup(params) {
18260
- return graphicCreator.group(params ? params.attribute : {});
18260
+ return graphicCreator$1.group(params ? params.attribute : {});
18261
18261
  }
18262
18262
  function VGlyph(params) {
18263
- return graphicCreator.glyph(params ? params.attribute : {});
18263
+ return graphicCreator$1.glyph(params ? params.attribute : {});
18264
18264
  }
18265
18265
  function VImage(params) {
18266
- return graphicCreator.image(params ? params.attribute : {});
18266
+ return graphicCreator$1.image(params ? params.attribute : {});
18267
18267
  }
18268
18268
  function VLine(params) {
18269
- return graphicCreator.line(params ? params.attribute : {});
18269
+ return graphicCreator$1.line(params ? params.attribute : {});
18270
18270
  }
18271
18271
  function VPath(params) {
18272
- return graphicCreator.path(params ? params.attribute : {});
18272
+ return graphicCreator$1.path(params ? params.attribute : {});
18273
18273
  }
18274
18274
  function VPolygon(params) {
18275
- return graphicCreator.polygon(params ? params.attribute : {});
18275
+ return graphicCreator$1.polygon(params ? params.attribute : {});
18276
18276
  }
18277
18277
  function VRect(params) {
18278
- return graphicCreator.rect(params ? params.attribute : {});
18278
+ return graphicCreator$1.rect(params ? params.attribute : {});
18279
18279
  }
18280
18280
  function VSymbol(params) {
18281
- return graphicCreator.symbol(params ? params.attribute : {});
18281
+ return graphicCreator$1.symbol(params ? params.attribute : {});
18282
18282
  }
18283
18283
  function VText(params) {
18284
- return graphicCreator.text(params ? params.attribute : {});
18284
+ return graphicCreator$1.text(params ? params.attribute : {});
18285
18285
  }
18286
18286
 
18287
18287
  var __rest$4 = undefined && undefined.__rest || function (s, e) {
@@ -18306,7 +18306,7 @@
18306
18306
  } = _a,
18307
18307
  props = __rest$4(_a, ["key", "attribute", "stateProxy"]);
18308
18308
  let c = type;
18309
- isString$2(type) && (c = graphicCreator[type]);
18309
+ isString$2(type) && (c = graphicCreator$1[type]);
18310
18310
  const childrenList = [];
18311
18311
  for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
18312
18312
  children[_key - 2] = arguments[_key];
@@ -24666,7 +24666,7 @@
24666
24666
  width: 0,
24667
24667
  height: 0
24668
24668
  };
24669
- const bounds = getTextBounds({
24669
+ const bounds = getTextBounds$1({
24670
24670
  text: text,
24671
24671
  fontFamily: null !== (_a = textSpec.fontFamily) && void 0 !== _a ? _a : fontFamily,
24672
24672
  fontSize: textSpec.fontSize || 12,
@@ -25314,7 +25314,7 @@
25314
25314
  }
25315
25315
  points.forEach((point, index) => {
25316
25316
  var _a, _b;
25317
- const line = graphicCreator.line(Object.assign(Object.assign({
25317
+ const line = graphicCreator$1.line(Object.assign(Object.assign({
25318
25318
  points: point
25319
25319
  }, isArray$1(lineStyle) ? null !== (_a = lineStyle[index]) && void 0 !== _a ? _a : lineStyle[lineStyle.length - 1] : lineStyle), {
25320
25320
  fill: !1
@@ -25322,7 +25322,7 @@
25322
25322
  line.name = `${this.name}-line`, line.id = this._getNodeId("line" + index), isEmpty(null == state ? void 0 : state.line) || (line.states = isArray$1(state.line) ? null !== (_b = state.line[index]) && void 0 !== _b ? _b : state.line[state.line.length - 1] : state.line), this.add(line);
25323
25323
  });
25324
25324
  } else {
25325
- const line = graphicCreator.polygon(Object.assign(Object.assign({
25325
+ const line = graphicCreator$1.polygon(Object.assign(Object.assign({
25326
25326
  points: this._clipPoints(this.attribute.points)
25327
25327
  }, array$1(lineStyle)[0]), {
25328
25328
  fill: !1,
@@ -25361,7 +25361,7 @@
25361
25361
  }, rotate = startAngle + Math.PI / 2) : (position = {
25362
25362
  x: end.x + (isValidNumber$1(endAngle) ? refX * Math.cos(endAngle) + refY * Math.cos(endAngle - Math.PI / 2) : 0),
25363
25363
  y: end.y + (isValidNumber$1(endAngle) ? refX * Math.sin(endAngle) + refY * Math.sin(endAngle - Math.PI / 2) : 0)
25364
- }, rotate = endAngle + Math.PI / 2), symbol = graphicCreator.symbol(Object.assign(Object.assign(Object.assign({}, position), {
25364
+ }, rotate = endAngle + Math.PI / 2), symbol = graphicCreator$1.symbol(Object.assign(Object.assign(Object.assign({}, position), {
25365
25365
  symbolType: symbolType,
25366
25366
  size: size,
25367
25367
  angle: autoRotate ? rotate + refAngle : 0,
@@ -25554,14 +25554,14 @@
25554
25554
  getBoundsWithoutRender(attributes) {
25555
25555
  const currentAttribute = cloneDeep(this.attribute);
25556
25556
  merge(this.attribute, attributes);
25557
- const offscreenGroup = graphicCreator.group({
25557
+ const offscreenGroup = graphicCreator$1.group({
25558
25558
  x: this.attribute.x,
25559
25559
  y: this.attribute.y
25560
25560
  });
25561
25561
  return this.add(offscreenGroup), this._renderInner(offscreenGroup), this.removeChild(offscreenGroup), this.attribute = currentAttribute, offscreenGroup.AABBBounds;
25562
25562
  }
25563
25563
  render() {
25564
- this.removeAllChild(), this._prevInnerView = this._innerView, this._innerView = graphicCreator.group({
25564
+ this.removeAllChild(), this._prevInnerView = this._innerView, this._innerView = graphicCreator$1.group({
25565
25565
  x: 0,
25566
25566
  y: 0,
25567
25567
  pickable: !1
@@ -25583,13 +25583,13 @@
25583
25583
  line: line,
25584
25584
  items: items
25585
25585
  } = this.attribute,
25586
- axisContainer = graphicCreator.group({
25586
+ axisContainer = graphicCreator$1.group({
25587
25587
  x: 0,
25588
25588
  y: 0,
25589
25589
  zIndex: 1
25590
25590
  });
25591
25591
  if (axisContainer.name = AXIS_ELEMENT_NAME.axisContainer, axisContainer.id = this._getNodeId("container"), axisContainer.setMode(this.mode), this.axisContainer = axisContainer, container.add(axisContainer), line && line.visible && this.renderLine(axisContainer), items && items.length && (this.data = this._transformItems(items[0]), tick && tick.visible && this.renderTicks(axisContainer), label && label.visible)) {
25592
- const labelGroup = graphicCreator.group({
25592
+ const labelGroup = graphicCreator$1.group({
25593
25593
  x: 0,
25594
25594
  y: 0,
25595
25595
  pickable: !1
@@ -25622,14 +25622,14 @@
25622
25622
  }
25623
25623
  renderTicks(container) {
25624
25624
  const tickLineItems = this.getTickLineItems(),
25625
- tickLineGroup = graphicCreator.group({
25625
+ tickLineGroup = graphicCreator$1.group({
25626
25626
  x: 0,
25627
25627
  y: 0,
25628
25628
  pickable: !1
25629
25629
  });
25630
25630
  tickLineGroup.name = AXIS_ELEMENT_NAME.tickContainer, tickLineGroup.id = this._getNodeId("tick-container"), container.add(tickLineGroup), tickLineItems.forEach((item, index) => {
25631
25631
  var _a;
25632
- const line = graphicCreator.line(Object.assign({}, this._getTickLineAttribute("tick", item, index, tickLineItems)));
25632
+ const line = graphicCreator$1.line(Object.assign({}, this._getTickLineAttribute("tick", item, index, tickLineItems)));
25633
25633
  if (line.name = AXIS_ELEMENT_NAME.tick, line.id = this._getNodeId(item.id), isEmpty(null === (_a = this.attribute.tick) || void 0 === _a ? void 0 : _a.state)) line.states = DEFAULT_STATES$2;else {
25634
25634
  const data = this.data[index],
25635
25635
  tickLineState = merge({}, DEFAULT_STATES$2, this.attribute.tick.state);
@@ -25645,7 +25645,7 @@
25645
25645
  if (subTick && subTick.visible) {
25646
25646
  const subTickLineItems = this.getSubTickLineItems();
25647
25647
  subTickLineItems.length && subTickLineItems.forEach((item, index) => {
25648
- const line = graphicCreator.line(Object.assign({}, this._getTickLineAttribute("subTick", item, index, tickLineItems)));
25648
+ const line = graphicCreator$1.line(Object.assign({}, this._getTickLineAttribute("subTick", item, index, tickLineItems)));
25649
25649
  if (line.name = AXIS_ELEMENT_NAME.subTick, line.id = this._getNodeId(`${index}`), isEmpty(subTick.state)) line.states = DEFAULT_STATES$2;else {
25650
25650
  const subTickLineState = merge({}, DEFAULT_STATES$2, subTick.state);
25651
25651
  Object.keys(subTickLineState).forEach(key => {
@@ -25662,7 +25662,7 @@
25662
25662
  } = this.attribute.label;
25663
25663
  dataFilter && isFunction$1(dataFilter) && (items = dataFilter(items, layer));
25664
25664
  const data = this._transformItems(items),
25665
- labelGroup = graphicCreator.group({
25665
+ labelGroup = graphicCreator$1.group({
25666
25666
  x: 0,
25667
25667
  y: 0,
25668
25668
  pickable: !1
@@ -25671,9 +25671,9 @@
25671
25671
  var _a, _b, _c;
25672
25672
  const labelStyle = this._getLabelAttribute(item, index, data, layer);
25673
25673
  let text;
25674
- if ("rich" === labelStyle.type ? (labelStyle.textConfig = labelStyle.text, labelStyle.width = null !== (_a = labelStyle.width) && void 0 !== _a ? _a : 0, labelStyle.height = null !== (_b = labelStyle.height) && void 0 !== _b ? _b : 0, text = graphicCreator.richtext(labelStyle)) : "html" === labelStyle.type ? (labelStyle.textConfig = [], labelStyle.html = Object.assign(Object.assign({
25674
+ if ("rich" === labelStyle.type ? (labelStyle.textConfig = labelStyle.text, labelStyle.width = null !== (_a = labelStyle.width) && void 0 !== _a ? _a : 0, labelStyle.height = null !== (_b = labelStyle.height) && void 0 !== _b ? _b : 0, text = graphicCreator$1.richtext(labelStyle)) : "html" === labelStyle.type ? (labelStyle.textConfig = [], labelStyle.html = Object.assign(Object.assign({
25675
25675
  dom: labelStyle.text
25676
- }, DEFAULT_HTML_TEXT_SPEC), labelStyle), text = graphicCreator.richtext(labelStyle)) : text = graphicCreator.text(labelStyle), text.name = AXIS_ELEMENT_NAME.label, text.id = this._getNodeId(`layer${layer}-label-${item.id}`), isEmpty(null === (_c = this.attribute.label) || void 0 === _c ? void 0 : _c.state)) text.states = DEFAULT_STATES$2;else {
25676
+ }, DEFAULT_HTML_TEXT_SPEC), labelStyle), text = graphicCreator$1.richtext(labelStyle)) : text = graphicCreator$1.text(labelStyle), text.name = AXIS_ELEMENT_NAME.label, text.id = this._getNodeId(`layer${layer}-label-${item.id}`), isEmpty(null === (_c = this.attribute.label) || void 0 === _c ? void 0 : _c.state)) text.states = DEFAULT_STATES$2;else {
25677
25677
  const labelState = merge({}, DEFAULT_STATES$2, this.attribute.label.state);
25678
25678
  Object.keys(labelState).forEach(key => {
25679
25679
  isFunction$1(labelState[key]) && (labelState[key] = labelState[key](item, index, data, layer));
@@ -26129,7 +26129,7 @@
26129
26129
  if (panel && panel.visible) {
26130
26130
  const axisContainer = this.axisContainer,
26131
26131
  axisContainerBounds = axisContainer.AABBBounds,
26132
- bgRect = graphicCreator.rect(Object.assign({
26132
+ bgRect = graphicCreator$1.rect(Object.assign({
26133
26133
  x: axisContainerBounds.x1,
26134
26134
  y: axisContainerBounds.y1,
26135
26135
  width: axisContainerBounds.width(),
@@ -26386,7 +26386,7 @@
26386
26386
  const minSize = this._getAxisLabelLimitLength(verticalMinSize, layerCount);
26387
26387
  let x, y;
26388
26388
  axisLabelContainerSize = Math.max(axisLabelContainerSize, minSize), "left" === orient ? (x = axisLabelContainerBounds.x2 - axisLabelContainerSize, y = axisLabelContainerBounds.y1) : "right" === orient ? (x = axisLabelContainerBounds.x1, y = axisLabelContainerBounds.y1) : "top" === orient ? (x = axisLabelContainerBounds.x1, y = axisLabelContainerBounds.y2 - axisLabelContainerSize) : "bottom" === orient && (x = axisLabelContainerBounds.x1, y = axisLabelContainerBounds.y1);
26389
- const bgRect = graphicCreator.rect({
26389
+ const bgRect = graphicCreator$1.rect({
26390
26390
  x: x,
26391
26391
  y: y,
26392
26392
  width: isHorizontal ? axisLabelContainerBounds.width() : axisLabelContainerSize,
@@ -26491,7 +26491,7 @@
26491
26491
  this._current = defaultCurrent;
26492
26492
  const parsedPadding = normalizePadding(padding),
26493
26493
  isHorizontal = "horizontal" === layout,
26494
- container = graphicCreator.group({
26494
+ container = graphicCreator$1.group({
26495
26495
  x: 0,
26496
26496
  y: 0
26497
26497
  }),
@@ -26504,7 +26504,7 @@
26504
26504
  nextShape: nextShape
26505
26505
  } = handler;
26506
26506
  preShape || (preShape = isHorizontal ? "triangleLeft" : "triangleUp"), nextShape || (nextShape = isHorizontal ? "triangleRight" : "triangleDown");
26507
- const preHandler = graphicCreator.symbol(Object.assign(Object.assign({
26507
+ const preHandler = graphicCreator$1.symbol(Object.assign(Object.assign({
26508
26508
  strokeBoundsBuffer: 0,
26509
26509
  pickMode: "imprecise"
26510
26510
  }, handlerStyle), {
@@ -26523,7 +26523,7 @@
26523
26523
  }, textStyle), null === (_b = this.stage) || void 0 === _b ? void 0 : _b.getTheme().text.fontFamily),
26524
26524
  handlerSizeX = isNumber$3(handlerSize) ? handlerSize : handlerSize[0],
26525
26525
  handlerSizeY = isNumber$3(handlerSize) ? handlerSize : handlerSize[1],
26526
- text = graphicCreator.text(Object.assign({
26526
+ text = graphicCreator$1.text(Object.assign({
26527
26527
  x: isHorizontal ? handlerSizeX / 2 + handlerSpace + maxTextWidth / 2 : 0,
26528
26528
  y: isHorizontal ? 0 : handlerSizeY / 2 + handlerSpace + maxTextHeight / 2,
26529
26529
  text: `${defaultCurrent}/${total}`,
@@ -26532,7 +26532,7 @@
26532
26532
  lineHeight: null == textStyle ? void 0 : textStyle.fontSize
26533
26533
  }, textStyle));
26534
26534
  this.text = text, container.add(text);
26535
- const nextHandler = graphicCreator.symbol(Object.assign(Object.assign({
26535
+ const nextHandler = graphicCreator$1.symbol(Object.assign(Object.assign({
26536
26536
  strokeBoundsBuffer: 0,
26537
26537
  pickMode: "imprecise"
26538
26538
  }, handlerStyle), {
@@ -26595,7 +26595,7 @@
26595
26595
  padding = 0
26596
26596
  } = this.attribute,
26597
26597
  parsedPadding = normalizePadding(padding),
26598
- innerView = graphicCreator.group({
26598
+ innerView = graphicCreator$1.group({
26599
26599
  x: parsedPadding[3],
26600
26600
  y: parsedPadding[0],
26601
26601
  pickable: interactive,
@@ -26742,7 +26742,7 @@
26742
26742
  if (!1 === item.visible || isEmpty(items)) return;
26743
26743
  let legendItems = items;
26744
26744
  reversed && (legendItems = null == items ? void 0 : items.reverse());
26745
- const itemsContainer = graphicCreator.group({
26745
+ const itemsContainer = graphicCreator$1.group({
26746
26746
  x: 0,
26747
26747
  y: 0
26748
26748
  });
@@ -26819,15 +26819,15 @@
26819
26819
  backgroundStyle = this._handleStyle(background, item, isSelected, index, items),
26820
26820
  parsedPadding = normalizePadding(padding);
26821
26821
  let itemGroup;
26822
- !1 === background.visible ? (itemGroup = graphicCreator.group({
26822
+ !1 === background.visible ? (itemGroup = graphicCreator$1.group({
26823
26823
  x: 0,
26824
26824
  y: 0,
26825
26825
  cursor: null === (_a = backgroundStyle.style) || void 0 === _a ? void 0 : _a.cursor
26826
- }), this._appendDataToShape(itemGroup, LEGEND_ELEMENT_NAME.item, item, itemGroup)) : (itemGroup = graphicCreator.group(Object.assign({
26826
+ }), this._appendDataToShape(itemGroup, LEGEND_ELEMENT_NAME.item, item, itemGroup)) : (itemGroup = graphicCreator$1.group(Object.assign({
26827
26827
  x: 0,
26828
26828
  y: 0
26829
26829
  }, backgroundStyle.style)), this._appendDataToShape(itemGroup, LEGEND_ELEMENT_NAME.item, item, itemGroup, backgroundStyle.state)), itemGroup.id = `${null != id ? id : label}-${index}`, itemGroup.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected);
26830
- const innerGroup = graphicCreator.group({
26830
+ const innerGroup = graphicCreator$1.group({
26831
26831
  x: 0,
26832
26832
  y: 0,
26833
26833
  pickable: !1
@@ -26840,7 +26840,7 @@
26840
26840
  if (shapeAttr && !1 !== shapeAttr.visible) {
26841
26841
  const s = get$5(shapeStyle, "style.size", DEFAULT_SHAPE_SIZE);
26842
26842
  shapeSize = isArray$1(s) ? s[0] || 0 : s, shapeSpace = get$5(shapeAttr, "space", DEFAULT_SHAPE_SPACE);
26843
- const itemShape = graphicCreator.symbol(Object.assign(Object.assign({
26843
+ const itemShape = graphicCreator$1.symbol(Object.assign(Object.assign({
26844
26844
  x: 0,
26845
26845
  y: 0,
26846
26846
  symbolType: "circle",
@@ -26854,7 +26854,7 @@
26854
26854
  let focusSpace = 0;
26855
26855
  if (focus) {
26856
26856
  const focusSize = get$5(focusIconStyle, "size", DEFAULT_SHAPE_SIZE);
26857
- focusShape = graphicCreator.symbol(Object.assign(Object.assign({
26857
+ focusShape = graphicCreator$1.symbol(Object.assign(Object.assign({
26858
26858
  x: 0,
26859
26859
  y: -focusSize / 2 - 1,
26860
26860
  strokeBoundsBuffer: 0
@@ -26864,7 +26864,7 @@
26864
26864
  boundsPadding: parsedPadding
26865
26865
  })), this._appendDataToShape(focusShape, LEGEND_ELEMENT_NAME.focus, item, itemGroup), focusSpace = focusSize;
26866
26866
  }
26867
- const labelShape = graphicCreator.text(Object.assign(Object.assign({
26867
+ const labelShape = graphicCreator$1.text(Object.assign(Object.assign({
26868
26868
  x: shapeSize / 2 + shapeSpace,
26869
26869
  y: 0,
26870
26870
  textAlign: "start",
@@ -26877,7 +26877,7 @@
26877
26877
  const labelSpace = get$5(labelAttr, "space", DEFAULT_LABEL_SPACE);
26878
26878
  if (isValid$1(value)) {
26879
26879
  const valueSpace = get$5(valueAttr, "space", focus ? DEFAULT_VALUE_SPACE : 0),
26880
- valueShape = graphicCreator.text(Object.assign(Object.assign({
26880
+ valueShape = graphicCreator$1.text(Object.assign(Object.assign({
26881
26881
  x: 0,
26882
26882
  y: 0,
26883
26883
  textAlign: "start",
@@ -26984,7 +26984,7 @@
26984
26984
  });
26985
26985
  }
26986
26986
  pager.defaultCurrent > 1 && (isHorizontal ? itemsContainer.setAttribute("y", -(pager.defaultCurrent - 1) * (pageHeight + spaceRow)) : itemsContainer.setAttribute("x", -(pager.defaultCurrent - 1) * (pageWidth + spaceCol)));
26987
- const clipGroup = graphicCreator.group({
26987
+ const clipGroup = graphicCreator$1.group({
26988
26988
  x: 0,
26989
26989
  y: renderStartY,
26990
26990
  width: pageWidth,
@@ -27848,6 +27848,30 @@
27848
27848
  };
27849
27849
  }
27850
27850
  const fixPrecision = (start, stop, value) => Math.abs(stop - start) < 1 ? +value.toFixed(1) : Math.round(+value);
27851
+ const d3TicksForLog = memoize((start, stop, count, base, transformer, untransformer, options) => {
27852
+ let u = start,
27853
+ v = stop;
27854
+ const r = v < u;
27855
+ r && ([u, v] = [v, u]);
27856
+ let k,
27857
+ t,
27858
+ i = transformer(u),
27859
+ j = transformer(v),
27860
+ z = [];
27861
+ if (!(base % 1) && j - i < count) {
27862
+ if (i = Math.floor(i), j = Math.ceil(j), u > 0) {
27863
+ for (; i <= j; ++i) for (k = 1; k < base; ++k) if (t = i < 0 ? k / untransformer(-i) : k * untransformer(i), !(t < u)) {
27864
+ if (t > v) break;
27865
+ z.push(t);
27866
+ }
27867
+ } else for (; i <= j; ++i) for (k = base - 1; k >= 1; --k) if (t = i > 0 ? k / untransformer(-i) : k * untransformer(i), !(t < u)) {
27868
+ if (t > v) break;
27869
+ z.push(t);
27870
+ }
27871
+ 2 * z.length < count && (z = ticks$1(u, v, count));
27872
+ } else z = ticks$1(i, j, Math.min(j - i, count)).map(untransformer);
27873
+ return z = z.filter(t => 0 !== t), (null == options ? void 0 : options.noDecimals) && (z = Array.from(new Set(z.map(t => Math.floor(t))))), r ? z.reverse() : z;
27874
+ });
27851
27875
  const ticksBaseTransform = memoize((start, stop, count, base, transformer, untransformer) => {
27852
27876
  const ticksResult = [],
27853
27877
  ticksMap = {},
@@ -27986,29 +28010,11 @@
27986
28010
  }
27987
28011
  d3Ticks() {
27988
28012
  let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
27989
- const d = this.domain();
27990
- let u = this._limit(d[0]),
28013
+ let options = arguments.length > 1 ? arguments[1] : undefined;
28014
+ const d = this.domain(),
28015
+ u = this._limit(d[0]),
27991
28016
  v = this._limit(d[d.length - 1]);
27992
- const r = v < u;
27993
- r && ([u, v] = [v, u]);
27994
- let k,
27995
- t,
27996
- i = this._logs(u),
27997
- j = this._logs(v),
27998
- z = [];
27999
- if (!(this._base % 1) && j - i < count) {
28000
- if (i = Math.floor(i), j = Math.ceil(j), u > 0) {
28001
- for (; i <= j; ++i) for (k = 1; k < this._base; ++k) if (t = i < 0 ? k / this._pows(-i) : k * this._pows(i), !(t < u)) {
28002
- if (t > v) break;
28003
- z.push(t);
28004
- }
28005
- } else for (; i <= j; ++i) for (k = this._base - 1; k >= 1; --k) if (t = i > 0 ? k / this._pows(-i) : k * this._pows(i), !(t < u)) {
28006
- if (t > v) break;
28007
- z.push(t);
28008
- }
28009
- 2 * z.length < count && (z = ticks$1(u, v, count));
28010
- } else z = ticks$1(i, j, Math.min(j - i, count)).map(this._pows);
28011
- return z = z.filter(t => 0 !== t), r ? z.reverse() : z;
28017
+ return d3TicksForLog(u, v, count, this._base, this.transformer, this.untransformer, options);
28012
28018
  }
28013
28019
  ticks() {
28014
28020
  let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
@@ -28073,6 +28079,14 @@
28073
28079
  constant(_, slience) {
28074
28080
  return arguments.length ? (this._const = _, this.transformer = symlog(_), this.untransformer = symexp(_), this.rescale(slience)) : this._const;
28075
28081
  }
28082
+ d3Ticks() {
28083
+ let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
28084
+ let options = arguments.length > 1 ? arguments[1] : undefined;
28085
+ const d = this.domain(),
28086
+ u = d[0],
28087
+ v = d[d.length - 1];
28088
+ return d3TicksForLog(u, v, count, this._const, this.transformer, this.untransformer, options);
28089
+ }
28076
28090
  ticks() {
28077
28091
  let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
28078
28092
  const d = this.calculateVisibleDomain(this._range);
@@ -28289,7 +28303,7 @@
28289
28303
  };
28290
28304
  const isHorizontal = "horizontal" === layout;
28291
28305
  this._isHorizontal = isHorizontal;
28292
- const innerView = graphicCreator.group({
28306
+ const innerView = graphicCreator$1.group({
28293
28307
  x: 0,
28294
28308
  y: 0
28295
28309
  });
@@ -28297,7 +28311,7 @@
28297
28311
  let startTextShape,
28298
28312
  startLen = 0;
28299
28313
  if (startText && startText.visible) {
28300
- startTextShape = graphicCreator.text(Object.assign({
28314
+ startTextShape = graphicCreator$1.text(Object.assign({
28301
28315
  x: isHorizontal ? 0 : railWidth / 2,
28302
28316
  y: isHorizontal ? railHeight / 2 : 0,
28303
28317
  textAlign: isHorizontal ? "start" : "center",
@@ -28308,19 +28322,19 @@
28308
28322
  const space = isValid$1(startText.space) ? startText.space : 0;
28309
28323
  startLen += (isHorizontal ? startTextShape.AABBBounds.width() : startTextShape.AABBBounds.height()) + space;
28310
28324
  }
28311
- const mainContainer = graphicCreator.group({
28325
+ const mainContainer = graphicCreator$1.group({
28312
28326
  x: isHorizontal ? startLen : 0,
28313
28327
  y: isHorizontal ? 0 : startLen
28314
28328
  });
28315
28329
  innerView.add(mainContainer);
28316
- const railContainer = graphicCreator.group({
28330
+ const railContainer = graphicCreator$1.group({
28317
28331
  x: 0,
28318
28332
  y: 0
28319
28333
  });
28320
28334
  let endTextShape;
28321
28335
  if (railContainer.name = SLIDER_ELEMENT_NAME.railContainer, this._railContainer = railContainer, mainContainer.add(railContainer), this._renderRail(railContainer), startLen += isHorizontal ? railWidth : railHeight, endText && endText.visible) {
28322
28336
  const space = isValid$1(endText.space) ? endText.space : 0;
28323
- endTextShape = graphicCreator.text(Object.assign({
28337
+ endTextShape = graphicCreator$1.text(Object.assign({
28324
28338
  x: isHorizontal ? startLen + space : railWidth / 2,
28325
28339
  y: isHorizontal ? railHeight / 2 : startLen + space,
28326
28340
  textAlign: isHorizontal ? "start" : "center",
@@ -28340,7 +28354,7 @@
28340
28354
  } = this.attribute;
28341
28355
  let cursor = "default";
28342
28356
  !1 !== slidable && (cursor = "pointer");
28343
- const railShape = graphicCreator.rect(Object.assign({
28357
+ const railShape = graphicCreator$1.rect(Object.assign({
28344
28358
  x: 0,
28345
28359
  y: 0,
28346
28360
  width: railWidth,
@@ -28416,7 +28430,7 @@
28416
28430
  const isHorizontal = this._isHorizontal,
28417
28431
  railLen = isHorizontal ? railWidth : railHeight;
28418
28432
  range || (startValue = min);
28419
- const trackContainer = graphicCreator.group({
28433
+ const trackContainer = graphicCreator$1.group({
28420
28434
  x: 0,
28421
28435
  y: 0,
28422
28436
  width: railWidth,
@@ -28431,7 +28445,7 @@
28431
28445
  cursor = !1 === slidable ? "default" : !1 === range || !1 === draggableTrack ? "pointer" : getDefaultCursor(isHorizontal);
28432
28446
  const trackWidth = max === min ? railLen : (endValue - startValue) / (max - min) * railLen,
28433
28447
  startPos = max === min ? 0 : (startValue - min) / (max - min) * railLen,
28434
- track = graphicCreator.rect(Object.assign({
28448
+ track = graphicCreator$1.rect(Object.assign({
28435
28449
  x: isHorizontal ? startPos : 0,
28436
28450
  y: isHorizontal ? 0 : startPos,
28437
28451
  width: isHorizontal ? trackWidth : railWidth,
@@ -28441,7 +28455,7 @@
28441
28455
  track.name = SLIDER_ELEMENT_NAME.track, this._track = track, trackContainer.add(track), container.add(trackContainer);
28442
28456
  }
28443
28457
  _renderHandler(style) {
28444
- return graphicCreator.symbol(style);
28458
+ return graphicCreator$1.symbol(style);
28445
28459
  }
28446
28460
  _renderHandlerText(value, position) {
28447
28461
  var _a, _b, _c;
@@ -28465,7 +28479,7 @@
28465
28479
  cursor: !1 === slidable ? "default" : getDefaultCursor(isHorizontal)
28466
28480
  };
28467
28481
  isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = handlerStart, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = handlerStart, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = handlerStart) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = handlerStart);
28468
- return graphicCreator.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
28482
+ return graphicCreator$1.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
28469
28483
  }
28470
28484
  _bindEvents() {
28471
28485
  if (this.attribute.disableTriggerEvent) return;
@@ -28808,7 +28822,7 @@
28808
28822
  sizeBackground: sizeBackground,
28809
28823
  disableTriggerEvent: disableTriggerEvent
28810
28824
  } = this.attribute,
28811
- mainContainer = graphicCreator.group({
28825
+ mainContainer = graphicCreator$1.group({
28812
28826
  x: 0,
28813
28827
  y: 0
28814
28828
  });
@@ -28846,7 +28860,7 @@
28846
28860
  let path,
28847
28861
  start = 0;
28848
28862
  "horizontal" === layout ? "top" === align ? (path = `M0,0L${railWidth},0L${railWidth},12Z`, start = railHeight) : (path = `M0,12L${railWidth},12L${railWidth},0Z`, slider.setAttribute("y", 12)) : "left" === align ? path = `M${railWidth},0L${railWidth},0L${railWidth + 12},${railHeight}L${railWidth},${railHeight}Z` : (path = `M0,${railHeight}L12,${railHeight}L12,0Z`, slider.setAttribute("x", 12));
28849
- const background = graphicCreator.path(Object.assign(Object.assign({
28863
+ const background = graphicCreator$1.path(Object.assign(Object.assign({
28850
28864
  x: 0,
28851
28865
  y: start,
28852
28866
  path: path
@@ -29777,6 +29791,25 @@
29777
29791
 
29778
29792
  const DEFAULT_CONTINUOUS_TICK_COUNT$1 = 5;
29779
29793
 
29794
+ class GraphicCreator {
29795
+ constructor() {
29796
+ this.store = new Map();
29797
+ }
29798
+ RegisterGraphicCreator(name, cb) {
29799
+ this.store.set(name, cb), this[name] = cb;
29800
+ }
29801
+ CreateGraphic(name, params) {
29802
+ const cb = this.store.get(name);
29803
+ return cb ? cb(params) : null;
29804
+ }
29805
+ }
29806
+ const graphicCreator = new GraphicCreator();
29807
+
29808
+ let text;
29809
+ function getTextBounds(params) {
29810
+ return text || (text = graphicCreator.CreateGraphic("text", {})), text.initAttributes(params), text.AABBBounds;
29811
+ }
29812
+
29780
29813
  const initTextMeasure$1 = (textSpec, option, useNaiveCanvas, defaultFontParams) => new TextMeasure(Object.assign({
29781
29814
  defaultFontParams: Object.assign({
29782
29815
  fontFamily: "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol",
@@ -32559,12 +32592,11 @@
32559
32592
  const cellGroup = this.parent;
32560
32593
  const padding = this.attribute.cellPadding;
32561
32594
  const table = this.stage.table;
32562
- const { x1, y1, x2, y2 } = cellGroup.globalAABBBounds;
32563
32595
  return {
32564
- x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
32565
- x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
32566
- y1: Math.ceil(y1 + padding[0] + table.scrollTop + (table.options.viewBox?.y1 ?? 0)),
32567
- y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (table.options.viewBox?.y1 ?? 0))
32596
+ x1: Math.ceil(cellGroup.globalAABBBounds.x1 + padding[3] + table.scrollLeft),
32597
+ x2: Math.ceil(cellGroup.globalAABBBounds.x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft),
32598
+ y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),
32599
+ y2: Math.ceil(cellGroup.globalAABBBounds.y1 + cellGroup.attribute.height - padding[2] + table.scrollTop)
32568
32600
  };
32569
32601
  }
32570
32602
  }
@@ -32595,10 +32627,6 @@
32595
32627
  bodyBound.x1 = tableBound.x1 + table.getFrozenColsWidth();
32596
32628
  bodyBound.x2 = tableBound.x2 - table.getRightFrozenColsWidth();
32597
32629
  }
32598
- bodyBound.x1 = bodyBound.x1 + (table.options.viewBox?.x1 ?? 0);
32599
- bodyBound.x2 = bodyBound.x2 + (table.options.viewBox?.x1 ?? 0);
32600
- bodyBound.y1 = bodyBound.y1 + (table.options.viewBox?.y1 ?? 0);
32601
- bodyBound.y2 = bodyBound.y2 + (table.options.viewBox?.y1 ?? 0);
32602
32630
  return bodyBound;
32603
32631
  }
32604
32632
 
@@ -42988,7 +43016,7 @@
42988
43016
  fontFamily: DefaultTextStyle.fontFamily,
42989
43017
  fontSize: DefaultTextStyle.fontSize
42990
43018
  },
42991
- getTextBounds: useNaiveCanvas ? undefined : getTextBounds,
43019
+ getTextBounds: useNaiveCanvas ? undefined : getTextBounds$1,
42992
43020
  specialCharSet: `{}()//&-/: .,@%'"~…${TextMeasure.ALPHABET_CHAR_SET}${TextMeasure.ALPHABET_CHAR_SET.toUpperCase()}0123456789`,
42993
43021
  ...(option ?? {})
42994
43022
  }, textSpec);
@@ -43766,12 +43794,7 @@
43766
43794
  setPoptipTheme(this.table.theme.textPopTipStyle);
43767
43795
  let width;
43768
43796
  let height;
43769
- if (table.options.canvas && table.options.viewBox) {
43770
- vglobal.setEnv('browser');
43771
- width = table.options.viewBox.x2 - table.options.viewBox.x1;
43772
- height = table.options.viewBox.y2 - table.options.viewBox.y1;
43773
- }
43774
- else if (Env.mode === 'node') {
43797
+ if (Env.mode === 'node') {
43775
43798
  vglobal.setEnv('node', table.options.modeParams);
43776
43799
  width = table.canvasWidth;
43777
43800
  height = table.canvasHeight;
@@ -43791,9 +43814,7 @@
43791
43814
  enableLayout: true,
43792
43815
  afterRender: () => {
43793
43816
  this.table.fireListeners('after_render', null);
43794
- },
43795
- canvasControled: !table.options.canvas,
43796
- viewBox: table.options.viewBox
43817
+ }
43797
43818
  });
43798
43819
  this.stage.defaultLayer.setTheme({
43799
43820
  group: {
@@ -46759,8 +46780,8 @@
46759
46780
  function getCellEventArgsSet(e) {
46760
46781
  const tableEvent = {
46761
46782
  abstractPos: {
46762
- x: e.viewport.x,
46763
- y: e.viewport.y
46783
+ x: e.x,
46784
+ y: e.y
46764
46785
  }
46765
46786
  };
46766
46787
  const targetCell = getTargetCell(e.target);
@@ -47246,7 +47267,7 @@
47246
47267
  const target = e.target;
47247
47268
  if (!table.eventManager.isDraging &&
47248
47269
  target &&
47249
- target.isDescendantsOf(table.scenegraph.stage) &&
47270
+ (target.isDescendantsOf(table.scenegraph.stage) || target.stage === target) &&
47250
47271
  !target.isDescendantsOf(table.scenegraph.tableGroup)) {
47251
47272
  stateManager.updateInteractionState(InteractionState.default);
47252
47273
  eventManager.dealTableHover();
@@ -47594,10 +47615,7 @@
47594
47615
  }
47595
47616
  }
47596
47617
  else if (e.key === 'Escape') {
47597
- if (table.editorManager.editingEditor) {
47598
- table.editorManager.editingEditor.exit();
47599
- table.editorManager.editingEditor = null;
47600
- }
47618
+ table.editorManager.cancelEdit();
47601
47619
  }
47602
47620
  else if (e.key === 'Enter') {
47603
47621
  if (table.editorManager.editingEditor) {
@@ -51043,7 +51061,7 @@
51043
51061
  return TABLE_EVENT_TYPE;
51044
51062
  }
51045
51063
  options;
51046
- version = "0.18.3-alpha.0";
51064
+ version = "0.18.4";
51047
51065
  pagination;
51048
51066
  id = `VTable${Date.now()}`;
51049
51067
  headerStyleCache;
@@ -51054,7 +51072,7 @@
51054
51072
  _chartEventMap = {};
51055
51073
  constructor(container, options = {}) {
51056
51074
  super();
51057
- if (!container && options.mode !== 'node' && !options.canvas) {
51075
+ if (!container && options.mode !== 'node') {
51058
51076
  throw new Error("vtable's container is undefined");
51059
51077
  }
51060
51078
  const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, keyboardOptions, eventOptions, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth } = options;
@@ -51090,13 +51108,7 @@
51090
51108
  if (typeof allowFrozenColCount === 'number' && allowFrozenColCount <= 0) {
51091
51109
  this.showFrozenIcon = false;
51092
51110
  }
51093
- if (this.options.canvas) {
51094
- internalProps.element = this.options.canvas.parentElement;
51095
- internalProps.focusControl = new FocusInput(this, internalProps.element);
51096
- internalProps.canvas = this.options.canvas;
51097
- internalProps.context = internalProps.canvas.getContext('2d');
51098
- }
51099
- else if (Env.mode !== 'node') {
51111
+ if (Env.mode !== 'node') {
51100
51112
  internalProps.element = createRootElement(this.padding);
51101
51113
  internalProps.focusControl = new FocusInput(this, internalProps.element);
51102
51114
  internalProps.canvas = document.createElement('canvas');
@@ -51432,21 +51444,7 @@
51432
51444
  const { padding } = this;
51433
51445
  let widthP = 0;
51434
51446
  let heightP = 0;
51435
- this.tableX = 0;
51436
- this.tableY = 0;
51437
- if (this.options.canvas && this.options.viewBox) {
51438
- widthP = this.options.viewBox.x2 - this.options.viewBox.x1;
51439
- heightP = this.options.viewBox.y2 - this.options.viewBox.y1;
51440
- if (this?.scenegraph?.stage) {
51441
- if (this.options.viewBox) {
51442
- this.scenegraph.stage.setViewBox(this.options.viewBox, false);
51443
- }
51444
- else {
51445
- this.scenegraph.stage.resize(widthP, heightP);
51446
- }
51447
- }
51448
- }
51449
- else if (Env.mode === 'browser') {
51447
+ if (Env.mode === 'browser') {
51450
51448
  const element = this.getElement();
51451
51449
  const width1 = element.parentElement?.offsetWidth ?? 1 - 1;
51452
51450
  const height1 = element.parentElement?.offsetHeight ?? 1 - 1;
@@ -51476,23 +51474,13 @@
51476
51474
  if (this.internalProps.theme?.frameStyle) {
51477
51475
  const lineWidths = toBoxArray(this.internalProps.theme.frameStyle?.borderLineWidth ?? [null]);
51478
51476
  const shadowWidths = toBoxArray(this.internalProps.theme.frameStyle?.shadowBlur ?? [0]);
51479
- this.tableX += (lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0);
51480
- this.tableY += (lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0);
51477
+ this.tableX = (lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0);
51478
+ this.tableY = (lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0);
51481
51479
  this.tableNoFrameWidth =
51482
51480
  width - ((lineWidths[1] ?? 0) + (shadowWidths[1] ?? 0)) - ((lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0));
51483
51481
  this.tableNoFrameHeight =
51484
51482
  height - ((lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0)) - ((lineWidths[2] ?? 0) + (shadowWidths[2] ?? 0));
51485
51483
  }
51486
- else {
51487
- this.tableX += 0;
51488
- this.tableY += 0;
51489
- this.tableNoFrameWidth = width;
51490
- this.tableNoFrameHeight = height;
51491
- }
51492
- }
51493
- updateViewBox(newViewBox) {
51494
- this.options.viewBox = newViewBox;
51495
- this.resize();
51496
51484
  }
51497
51485
  get rowHierarchyType() {
51498
51486
  return 'grid';
@@ -51746,7 +51734,7 @@
51746
51734
  const height = this.getRowHeight(row);
51747
51735
  if (isFrozenCell && isFrozenCell.row) {
51748
51736
  if (this.isBottomFrozenRow(col, row)) {
51749
- absoluteLeft = this.tableNoFrameHeight - (this.getRowsHeight(row, this.rowCount - 1) ?? 0);
51737
+ absoluteTop = this.tableNoFrameHeight - (this.getRowsHeight(row, this.rowCount - 1) ?? 0);
51750
51738
  }
51751
51739
  else {
51752
51740
  absoluteTop = this.getRowsHeight(0, row - 1);
@@ -51767,14 +51755,54 @@
51767
51755
  return new Rect$1(Math.round(absoluteLeft), Math.round(absoluteTop), Math.round(width), Math.round(height));
51768
51756
  }
51769
51757
  getCellRelativeRect(col, row) {
51770
- return this._toRelativeRect(this.getCellRect(col, row));
51758
+ const isFrozenCell = this.isFrozenCell(col, row);
51759
+ let relativeX = true;
51760
+ let relativeY = true;
51761
+ if (isFrozenCell?.col && isFrozenCell?.row) {
51762
+ relativeX = false;
51763
+ relativeY = false;
51764
+ }
51765
+ else if (isFrozenCell?.col) {
51766
+ relativeX = false;
51767
+ }
51768
+ else if (isFrozenCell?.row) {
51769
+ relativeY = false;
51770
+ }
51771
+ const cellRect = this.getCellRect(col, row);
51772
+ return this._toRelativeRect(cellRect, relativeX, relativeY);
51771
51773
  }
51772
51774
  getCellRangeRelativeRect(range) {
51773
51775
  if (range.start) {
51774
- return this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row));
51776
+ const isFrozenCell = this.isFrozenCell(range.start.col, range.start.row);
51777
+ let relativeX = true;
51778
+ let relativeY = true;
51779
+ if (isFrozenCell?.col && isFrozenCell?.row) {
51780
+ relativeX = false;
51781
+ relativeY = false;
51782
+ }
51783
+ else if (isFrozenCell?.col) {
51784
+ relativeX = false;
51785
+ }
51786
+ else if (isFrozenCell?.row) {
51787
+ relativeY = false;
51788
+ }
51789
+ return this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
51775
51790
  }
51776
51791
  const cellRange = this.getCellRange(range.col, range.row);
51777
- return this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row));
51792
+ const isFrozenCell = this.isFrozenCell(range.col, range.row);
51793
+ let relativeX = true;
51794
+ let relativeY = true;
51795
+ if (isFrozenCell?.col && isFrozenCell?.row) {
51796
+ relativeX = false;
51797
+ relativeY = false;
51798
+ }
51799
+ else if (isFrozenCell?.col) {
51800
+ relativeX = false;
51801
+ }
51802
+ else if (isFrozenCell?.row) {
51803
+ relativeY = false;
51804
+ }
51805
+ return this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
51778
51806
  }
51779
51807
  getVisibleCellRangeRelativeRect(range) {
51780
51808
  let cellRange;
@@ -51964,11 +51992,11 @@
51964
51992
  }, 0);
51965
51993
  });
51966
51994
  }
51967
- _toRelativeRect(absoluteRect) {
51995
+ _toRelativeRect(absoluteRect, relativeX = true, relativeY = true) {
51968
51996
  const rect = absoluteRect.copy();
51969
51997
  const visibleRect = this.getVisibleRect();
51970
- rect.offsetLeft(this.tableX - visibleRect.left);
51971
- rect.offsetTop(this.tableY - visibleRect.top);
51998
+ rect.offsetLeft(this.tableX - (relativeX ? visibleRect.left : 0));
51999
+ rect.offsetTop(this.tableY - (relativeY ? visibleRect.top : 0));
51972
52000
  return rect;
51973
52001
  }
51974
52002
  getVisibleRect() {
@@ -54805,6 +54833,12 @@
54805
54833
  this.editingEditor = null;
54806
54834
  }
54807
54835
  }
54836
+ cancelEdit() {
54837
+ if (this.editingEditor) {
54838
+ this.editingEditor.exit();
54839
+ this.editingEditor = null;
54840
+ }
54841
+ }
54808
54842
  }
54809
54843
 
54810
54844
  class ListTable extends BaseTable {
@@ -62325,7 +62359,7 @@
62325
62359
  }
62326
62360
 
62327
62361
  registerForVrender();
62328
- const version = "0.18.3-alpha.0";
62362
+ const version = "0.18.4";
62329
62363
  function getIcons() {
62330
62364
  return get$1();
62331
62365
  }