@visactor/vtable 1.7.0-alpha.2 → 1.7.0-alpha.6

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 (49) hide show
  1. package/cjs/core/BaseTable.js +6 -4
  2. package/cjs/core/BaseTable.js.map +1 -1
  3. package/cjs/event/listener/table-group.js +1 -1
  4. package/cjs/event/listener/table-group.js.map +1 -1
  5. package/cjs/index.d.ts +2 -3
  6. package/cjs/index.js +8 -13
  7. package/cjs/index.js.map +1 -1
  8. package/cjs/layout/layout-helper.js +1 -2
  9. package/cjs/layout/row-height-map.js +1 -1
  10. package/cjs/layout/simple-header-layout.js +1 -1
  11. package/cjs/layout/tree-helper.js +2 -2
  12. package/cjs/plugins/custom-cell-style.js +2 -1
  13. package/cjs/plugins/icons.js +1 -1
  14. package/cjs/plugins/list-tree-stick-cell.js +1 -1
  15. package/cjs/plugins/themes.js +1 -1
  16. package/cjs/scenegraph/scenegraph.js +9 -4
  17. package/cjs/scenegraph/scenegraph.js.map +1 -1
  18. package/cjs/themes.d.ts +1 -1
  19. package/cjs/themes.js +7 -2
  20. package/cjs/themes.js.map +1 -1
  21. package/cjs/ts-types/base-table.d.ts +1 -0
  22. package/cjs/ts-types/base-table.js.map +1 -1
  23. package/cjs/vrender.js.map +1 -1
  24. package/dist/vtable.js +3964 -20730
  25. package/dist/vtable.min.js +2 -2
  26. package/es/core/BaseTable.js +6 -4
  27. package/es/core/BaseTable.js.map +1 -1
  28. package/es/event/listener/table-group.js +1 -1
  29. package/es/event/listener/table-group.js.map +1 -1
  30. package/es/index.d.ts +2 -3
  31. package/es/index.js +2 -4
  32. package/es/index.js.map +1 -1
  33. package/es/layout/layout-helper.js +1 -2
  34. package/es/layout/row-height-map.js +1 -1
  35. package/es/layout/simple-header-layout.js +1 -1
  36. package/es/layout/tree-helper.js +1 -1
  37. package/es/plugins/custom-cell-style.js +2 -1
  38. package/es/plugins/icons.js +1 -1
  39. package/es/plugins/list-tree-stick-cell.js +1 -1
  40. package/es/plugins/themes.js +1 -1
  41. package/es/scenegraph/scenegraph.js +9 -4
  42. package/es/scenegraph/scenegraph.js.map +1 -1
  43. package/es/themes.d.ts +1 -1
  44. package/es/themes.js +2 -0
  45. package/es/themes.js.map +1 -1
  46. package/es/ts-types/base-table.d.ts +1 -0
  47. package/es/ts-types/base-table.js.map +1 -1
  48. package/es/vrender.js.map +1 -1
  49. package/package.json +4 -4
@@ -43,7 +43,7 @@ class BaseTable extends EventTarget_1.EventTarget {
43
43
  }
44
44
  constructor(container, options = {}) {
45
45
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
46
- if (super(), this.showFrozenIcon = !0, this.version = "1.7.0-alpha.2", this.id = `VTable${Date.now()}`,
46
+ if (super(), this.showFrozenIcon = !0, this.version = "1.7.0-alpha.6", this.id = `VTable${Date.now()}`,
47
47
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
48
48
  !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
49
49
  const {frozenColCount: frozenColCount = 0, frozenRowCount: frozenRowCount, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, widthAdaptiveMode: widthAdaptiveMode = "only-body", heightAdaptiveMode: heightAdaptiveMode = "only-body", keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = pixel_ratio_1.defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
@@ -150,7 +150,8 @@ class BaseTable extends EventTarget_1.EventTarget {
150
150
  return this.internalProps.canvas;
151
151
  }
152
152
  setCanvasSize(canvasWidth, canvasHeight) {
153
- this.canvasWidth = canvasWidth, this.canvasHeight = canvasHeight, this.resize();
153
+ this.canvasWidth = canvasWidth, this.canvasHeight = canvasHeight, this.options.canvasHeight = canvasHeight,
154
+ this.options.canvasWidth = canvasWidth, this.resize();
154
155
  }
155
156
  resize() {
156
157
  var _a;
@@ -1340,7 +1341,7 @@ class BaseTable extends EventTarget_1.EventTarget {
1340
1341
  this.render();
1341
1342
  }
1342
1343
  getCopyValue() {
1343
- var _a, _b;
1344
+ var _a, _b, _c;
1344
1345
  if ((null === (_b = null === (_a = this.stateManager.select) || void 0 === _a ? void 0 : _a.ranges) || void 0 === _b ? void 0 : _b.length) > 0) {
1345
1346
  const ranges = this.stateManager.select.ranges;
1346
1347
  let minCol = Math.min(ranges[0].start.col, ranges[0].end.col), maxCol = Math.max(ranges[0].start.col, ranges[0].end.col), minRow = Math.min(ranges[0].start.row, ranges[0].end.row), maxRow = Math.max(ranges[0].start.row, ranges[0].end.row);
@@ -1395,7 +1396,8 @@ class BaseTable extends EventTarget_1.EventTarget {
1395
1396
  r < maxRow && (copyValue += "\r\n");
1396
1397
  }
1397
1398
  }
1398
- return copyValue;
1399
+ return (null === (_c = this.options) || void 0 === _c ? void 0 : _c.formatCopyValue) && (copyValue = this.options.formatCopyValue(copyValue)),
1400
+ copyValue;
1399
1401
  }
1400
1402
  return "";
1401
1403
  }