@visactor/vtable 0.26.0-alpha.2 → 1.0.0

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 (193) hide show
  1. package/cjs/ListTable.js +13 -16
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotChart.js +17 -7
  4. package/cjs/PivotChart.js.map +1 -1
  5. package/cjs/PivotTable.js +20 -9
  6. package/cjs/PivotTable.js.map +1 -1
  7. package/cjs/core/BaseTable.d.ts +4 -1
  8. package/cjs/core/BaseTable.js +69 -25
  9. package/cjs/core/BaseTable.js.map +1 -1
  10. package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
  11. package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
  12. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  13. package/cjs/edit/edit-manager.js +8 -7
  14. package/cjs/edit/edit-manager.js.map +1 -1
  15. package/cjs/event/listener/scroll-bar.js +6 -2
  16. package/cjs/event/listener/scroll-bar.js.map +1 -1
  17. package/cjs/event/listener/table-group.js +29 -19
  18. package/cjs/event/listener/table-group.js.map +1 -1
  19. package/cjs/event/util.d.ts +2 -0
  20. package/cjs/event/util.js +18 -4
  21. package/cjs/event/util.js.map +1 -1
  22. package/cjs/header-helper/header-helper.d.ts +1 -0
  23. package/cjs/header-helper/header-helper.js +8 -0
  24. package/cjs/header-helper/header-helper.js.map +1 -1
  25. package/cjs/index.d.ts +1 -1
  26. package/cjs/index.js +2 -2
  27. package/cjs/index.js.map +1 -1
  28. package/cjs/layout/layout-helper.d.ts +0 -2
  29. package/cjs/layout/layout-helper.js +12 -16
  30. package/cjs/layout/layout-helper.js.map +1 -1
  31. package/cjs/layout/pivot-header-layout.d.ts +5 -0
  32. package/cjs/layout/pivot-header-layout.js +89 -47
  33. package/cjs/layout/pivot-header-layout.js.map +1 -1
  34. package/cjs/scenegraph/component/table-component.js +26 -22
  35. package/cjs/scenegraph/component/table-component.js.map +1 -1
  36. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +8 -7
  37. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  38. package/cjs/scenegraph/graphic/group.d.ts +1 -1
  39. package/cjs/scenegraph/graphic/group.js.map +1 -1
  40. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +24 -18
  41. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  42. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +1 -1
  43. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  44. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +18 -16
  45. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  46. package/cjs/scenegraph/group-creater/column-helper.js +1 -1
  47. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  48. package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
  49. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  50. package/cjs/scenegraph/layout/compute-col-width.js +2 -1
  51. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  52. package/cjs/scenegraph/layout/frozen.js +1 -1
  53. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  54. package/cjs/scenegraph/layout/update-height.js +2 -2
  55. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  56. package/cjs/scenegraph/scenegraph.d.ts +4 -2
  57. package/cjs/scenegraph/scenegraph.js +13 -6
  58. package/cjs/scenegraph/scenegraph.js.map +1 -1
  59. package/cjs/scenegraph/select/update-select-border.d.ts +4 -1
  60. package/cjs/scenegraph/select/update-select-border.js +6 -1
  61. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  62. package/cjs/scenegraph/utils/break-string.js +1 -1
  63. package/cjs/scenegraph/utils/break-string.js.map +1 -1
  64. package/cjs/scenegraph/utils/text-icon-layout.js +4 -4
  65. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  66. package/cjs/scenegraph/utils/text-measure.js +3 -1
  67. package/cjs/scenegraph/utils/text-measure.js.map +1 -1
  68. package/cjs/state/cell-move/index.js +2 -1
  69. package/cjs/state/cell-move/index.js.map +1 -1
  70. package/cjs/state/checkbox/checkbox.d.ts +1 -0
  71. package/cjs/state/checkbox/checkbox.js +12 -2
  72. package/cjs/state/checkbox/checkbox.js.map +1 -1
  73. package/cjs/state/radio/radio.d.ts +1 -0
  74. package/cjs/state/radio/radio.js +13 -2
  75. package/cjs/state/radio/radio.js.map +1 -1
  76. package/cjs/state/select/update-position.js +12 -8
  77. package/cjs/state/select/update-position.js.map +1 -1
  78. package/cjs/state/state.d.ts +4 -1
  79. package/cjs/state/state.js +5 -1
  80. package/cjs/state/state.js.map +1 -1
  81. package/cjs/themes/theme.js +3 -0
  82. package/cjs/themes/theme.js.map +1 -1
  83. package/cjs/tools/helper.js +2 -2
  84. package/cjs/tools/helper.js.map +1 -1
  85. package/cjs/ts-types/base-table.d.ts +9 -0
  86. package/cjs/ts-types/base-table.js.map +1 -1
  87. package/cjs/ts-types/common.d.ts +6 -0
  88. package/cjs/ts-types/common.js.map +1 -1
  89. package/cjs/ts-types/events.d.ts +4 -1
  90. package/cjs/ts-types/events.js.map +1 -1
  91. package/cjs/ts-types/table-engine.d.ts +1 -0
  92. package/cjs/ts-types/table-engine.js.map +1 -1
  93. package/cjs/ts-types/theme.d.ts +1 -0
  94. package/cjs/ts-types/theme.js.map +1 -1
  95. package/cjs/vrender.js.map +1 -1
  96. package/dist/vtable.js +513 -173
  97. package/dist/vtable.min.js +2 -2
  98. package/es/ListTable.js +8 -12
  99. package/es/ListTable.js.map +1 -1
  100. package/es/PivotChart.js +9 -5
  101. package/es/PivotChart.js.map +1 -1
  102. package/es/PivotTable.js +17 -10
  103. package/es/PivotTable.js.map +1 -1
  104. package/es/core/BaseTable.d.ts +4 -1
  105. package/es/core/BaseTable.js +70 -25
  106. package/es/core/BaseTable.js.map +1 -1
  107. package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
  108. package/es/core/TABLE_EVENT_TYPE.js +1 -0
  109. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  110. package/es/edit/edit-manager.js +8 -7
  111. package/es/edit/edit-manager.js.map +1 -1
  112. package/es/event/listener/scroll-bar.js +6 -2
  113. package/es/event/listener/scroll-bar.js.map +1 -1
  114. package/es/event/listener/table-group.js +29 -19
  115. package/es/event/listener/table-group.js.map +1 -1
  116. package/es/event/util.d.ts +2 -0
  117. package/es/event/util.js +12 -0
  118. package/es/event/util.js.map +1 -1
  119. package/es/header-helper/header-helper.d.ts +1 -0
  120. package/es/header-helper/header-helper.js +8 -0
  121. package/es/header-helper/header-helper.js.map +1 -1
  122. package/es/index.d.ts +1 -1
  123. package/es/index.js +1 -1
  124. package/es/index.js.map +1 -1
  125. package/es/layout/layout-helper.d.ts +0 -2
  126. package/es/layout/layout-helper.js +11 -17
  127. package/es/layout/layout-helper.js.map +1 -1
  128. package/es/layout/pivot-header-layout.d.ts +5 -0
  129. package/es/layout/pivot-header-layout.js +90 -46
  130. package/es/layout/pivot-header-layout.js.map +1 -1
  131. package/es/scenegraph/component/table-component.js +27 -21
  132. package/es/scenegraph/component/table-component.js.map +1 -1
  133. package/es/scenegraph/graphic/contributions/group-contribution-render.js +8 -7
  134. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  135. package/es/scenegraph/graphic/group.d.ts +1 -1
  136. package/es/scenegraph/graphic/group.js.map +1 -1
  137. package/es/scenegraph/group-creater/cell-type/image-cell.js +21 -17
  138. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  139. package/es/scenegraph/group-creater/cell-type/text-cell.js +1 -1
  140. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  141. package/es/scenegraph/group-creater/cell-type/video-cell.js +18 -15
  142. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  143. package/es/scenegraph/group-creater/column-helper.js +1 -1
  144. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  145. package/es/scenegraph/group-creater/progress/proxy.js +4 -2
  146. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  147. package/es/scenegraph/layout/compute-col-width.js +2 -1
  148. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  149. package/es/scenegraph/layout/frozen.js +1 -1
  150. package/es/scenegraph/layout/frozen.js.map +1 -1
  151. package/es/scenegraph/layout/update-height.js +2 -2
  152. package/es/scenegraph/layout/update-height.js.map +1 -1
  153. package/es/scenegraph/scenegraph.d.ts +4 -2
  154. package/es/scenegraph/scenegraph.js +13 -6
  155. package/es/scenegraph/scenegraph.js.map +1 -1
  156. package/es/scenegraph/select/update-select-border.d.ts +4 -1
  157. package/es/scenegraph/select/update-select-border.js +6 -1
  158. package/es/scenegraph/select/update-select-border.js.map +1 -1
  159. package/es/scenegraph/utils/break-string.js +1 -1
  160. package/es/scenegraph/utils/break-string.js.map +1 -1
  161. package/es/scenegraph/utils/text-icon-layout.js +4 -4
  162. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  163. package/es/scenegraph/utils/text-measure.js +3 -1
  164. package/es/scenegraph/utils/text-measure.js.map +1 -1
  165. package/es/state/cell-move/index.js +2 -1
  166. package/es/state/cell-move/index.js.map +1 -1
  167. package/es/state/checkbox/checkbox.d.ts +1 -0
  168. package/es/state/checkbox/checkbox.js +10 -0
  169. package/es/state/checkbox/checkbox.js.map +1 -1
  170. package/es/state/radio/radio.d.ts +1 -0
  171. package/es/state/radio/radio.js +10 -0
  172. package/es/state/radio/radio.js.map +1 -1
  173. package/es/state/select/update-position.js +12 -8
  174. package/es/state/select/update-position.js.map +1 -1
  175. package/es/state/state.d.ts +4 -1
  176. package/es/state/state.js +7 -3
  177. package/es/state/state.js.map +1 -1
  178. package/es/themes/theme.js +3 -0
  179. package/es/themes/theme.js.map +1 -1
  180. package/es/tools/helper.js +2 -2
  181. package/es/tools/helper.js.map +1 -1
  182. package/es/ts-types/base-table.d.ts +9 -0
  183. package/es/ts-types/base-table.js.map +1 -1
  184. package/es/ts-types/common.d.ts +6 -0
  185. package/es/ts-types/common.js.map +1 -1
  186. package/es/ts-types/events.d.ts +4 -1
  187. package/es/ts-types/events.js.map +1 -1
  188. package/es/ts-types/table-engine.d.ts +1 -0
  189. package/es/ts-types/table-engine.js.map +1 -1
  190. package/es/ts-types/theme.d.ts +1 -0
  191. package/es/ts-types/theme.js.map +1 -1
  192. package/es/vrender.js.map +1 -1
  193. package/package.json +5 -5
@@ -82,7 +82,7 @@ export class BaseTable extends EventTarget {
82
82
  }
83
83
  constructor(container, options = {}) {
84
84
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
85
- if (super(), this.showFrozenIcon = !0, this.version = "0.26.0-alpha.2", this.id = `VTable${Date.now()}`,
85
+ if (super(), this.showFrozenIcon = !0, this.version = "1.0.0", this.id = `VTable${Date.now()}`,
86
86
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
87
87
  !container && "node" !== options.mode) throw new Error("vtable's container is undefined");
88
88
  const {frozenColCount: frozenColCount = 0, 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 = defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
@@ -350,29 +350,36 @@ export class BaseTable extends EventTarget {
350
350
  this.internalProps.pixelRatio = pixelRatio, this.scenegraph.setPixelRatio(pixelRatio);
351
351
  }
352
352
  _updateSize() {
353
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
353
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
354
354
  const {padding: padding} = this;
355
355
  let widthP = 0, heightP = 0;
356
356
  if ("browser" === Env.mode) {
357
- const element = this.getElement(), width1 = null !== (_b = null === (_a = element.parentElement) || void 0 === _a ? void 0 : _a.offsetWidth) && void 0 !== _b ? _b : 0, height1 = null !== (_d = null === (_c = element.parentElement) || void 0 === _c ? void 0 : _c.offsetHeight) && void 0 !== _d ? _d : 0;
357
+ const element = this.getElement();
358
+ let widthWithoutPadding = 0, heightWithoutPadding = 0;
359
+ if (element.parentElement) {
360
+ const computedStyle = element.parentElement.style || window.getComputedStyle(element.parentElement);
361
+ widthWithoutPadding = element.parentElement.offsetWidth - parseInt(computedStyle.paddingLeft || "0px", 10) - parseInt(computedStyle.paddingRight || "0px", 10),
362
+ heightWithoutPadding = element.parentElement.offsetHeight - parseInt(computedStyle.paddingTop || "0px", 10) - parseInt(computedStyle.paddingBottom || "0px", 20);
363
+ }
364
+ const width1 = null != widthWithoutPadding ? widthWithoutPadding : 0, height1 = null != heightWithoutPadding ? heightWithoutPadding : 0;
358
365
  element.style.width = width1 && width1 - padding.left - padding.right + "px" || "0px",
359
366
  element.style.height = height1 && height1 - padding.top - padding.bottom + "px" || "0px";
360
367
  const {canvas: canvas} = this.internalProps;
361
- widthP = null !== (_f = null === (_e = canvas.parentElement) || void 0 === _e ? void 0 : _e.offsetWidth) && void 0 !== _f ? _f : 0,
362
- heightP = null !== (_h = null === (_g = canvas.parentElement) || void 0 === _g ? void 0 : _g.offsetHeight) && void 0 !== _h ? _h : 0,
363
- (null === (_j = null == this ? void 0 : this.scenegraph) || void 0 === _j ? void 0 : _j.stage) ? this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "",
368
+ widthP = null !== (_b = null === (_a = canvas.parentElement) || void 0 === _a ? void 0 : _a.offsetWidth) && void 0 !== _b ? _b : 0,
369
+ heightP = null !== (_d = null === (_c = canvas.parentElement) || void 0 === _c ? void 0 : _c.offsetHeight) && void 0 !== _d ? _d : 0,
370
+ (null === (_e = null == this ? void 0 : this.scenegraph) || void 0 === _e ? void 0 : _e.stage) ? this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "",
364
371
  canvas.style.height = "", canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`,
365
372
  canvas.style.height = `${heightP}px`);
366
373
  } else "node" === Env.mode && (widthP = this.canvasWidth - 1, heightP = this.canvasHeight - 1);
367
374
  const width = Math.floor(widthP - style.getScrollBarSize(this.getTheme().scrollStyle)), height = Math.floor(heightP - style.getScrollBarSize(this.getTheme().scrollStyle));
368
- if (null === (_k = this.internalProps.theme) || void 0 === _k ? void 0 : _k.frameStyle) {
369
- const lineWidths = toBoxArray(null !== (_m = null === (_l = this.internalProps.theme.frameStyle) || void 0 === _l ? void 0 : _l.borderLineWidth) && void 0 !== _m ? _m : [ null ]), shadowWidths = toBoxArray(null !== (_p = null === (_o = this.internalProps.theme.frameStyle) || void 0 === _o ? void 0 : _o.shadowBlur) && void 0 !== _p ? _p : [ 0 ]);
370
- (null === (_q = this.theme.frameStyle) || void 0 === _q ? void 0 : _q.innerBorder) ? (this.tableX = 0,
371
- this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_r = shadowWidths[1]) && void 0 !== _r ? _r : 0),
372
- this.tableNoFrameHeight = height - (null !== (_s = shadowWidths[2]) && void 0 !== _s ? _s : 0)) : (this.tableX = (null !== (_t = lineWidths[3]) && void 0 !== _t ? _t : 0) + (null !== (_u = shadowWidths[3]) && void 0 !== _u ? _u : 0),
373
- this.tableY = (null !== (_v = lineWidths[0]) && void 0 !== _v ? _v : 0) + (null !== (_w = shadowWidths[0]) && void 0 !== _w ? _w : 0),
374
- this.tableNoFrameWidth = width - ((null !== (_x = lineWidths[1]) && void 0 !== _x ? _x : 0) + (null !== (_y = shadowWidths[1]) && void 0 !== _y ? _y : 0)) - ((null !== (_z = lineWidths[3]) && void 0 !== _z ? _z : 0) + (null !== (_0 = shadowWidths[3]) && void 0 !== _0 ? _0 : 0)),
375
- this.tableNoFrameHeight = height - ((null !== (_1 = lineWidths[0]) && void 0 !== _1 ? _1 : 0) + (null !== (_2 = shadowWidths[0]) && void 0 !== _2 ? _2 : 0)) - ((null !== (_3 = lineWidths[2]) && void 0 !== _3 ? _3 : 0) + (null !== (_4 = shadowWidths[2]) && void 0 !== _4 ? _4 : 0)));
375
+ if (null === (_f = this.internalProps.theme) || void 0 === _f ? void 0 : _f.frameStyle) {
376
+ const lineWidths = toBoxArray(null !== (_h = null === (_g = this.internalProps.theme.frameStyle) || void 0 === _g ? void 0 : _g.borderLineWidth) && void 0 !== _h ? _h : [ null ]), shadowWidths = toBoxArray(null !== (_k = null === (_j = this.internalProps.theme.frameStyle) || void 0 === _j ? void 0 : _j.shadowBlur) && void 0 !== _k ? _k : [ 0 ]);
377
+ (null === (_l = this.theme.frameStyle) || void 0 === _l ? void 0 : _l.innerBorder) ? (this.tableX = 0,
378
+ this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_m = shadowWidths[1]) && void 0 !== _m ? _m : 0),
379
+ this.tableNoFrameHeight = height - (null !== (_o = shadowWidths[2]) && void 0 !== _o ? _o : 0)) : (this.tableX = (null !== (_p = lineWidths[3]) && void 0 !== _p ? _p : 0) + (null !== (_q = shadowWidths[3]) && void 0 !== _q ? _q : 0),
380
+ this.tableY = (null !== (_r = lineWidths[0]) && void 0 !== _r ? _r : 0) + (null !== (_s = shadowWidths[0]) && void 0 !== _s ? _s : 0),
381
+ this.tableNoFrameWidth = width - ((null !== (_t = lineWidths[1]) && void 0 !== _t ? _t : 0) + (null !== (_u = shadowWidths[1]) && void 0 !== _u ? _u : 0)) - ((null !== (_v = lineWidths[3]) && void 0 !== _v ? _v : 0) + (null !== (_w = shadowWidths[3]) && void 0 !== _w ? _w : 0)),
382
+ this.tableNoFrameHeight = height - ((null !== (_x = lineWidths[0]) && void 0 !== _x ? _x : 0) + (null !== (_y = shadowWidths[0]) && void 0 !== _y ? _y : 0)) - ((null !== (_z = lineWidths[2]) && void 0 !== _z ? _z : 0) + (null !== (_0 = shadowWidths[2]) && void 0 !== _0 ? _0 : 0)));
376
383
  }
377
384
  }
378
385
  get rowHierarchyType() {
@@ -396,7 +403,16 @@ export class BaseTable extends EventTarget {
396
403
  Math.round(w);
397
404
  }
398
405
  getRowHeight(row) {
399
- if (isValid(this.rowHeightsMap.get(row))) return this.rowHeightsMap.get(row);
406
+ var _a;
407
+ if (isValid(this.rowHeightsMap.get(row))) {
408
+ if (null === (_a = this.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) {
409
+ const height = this.rowHeightsMap.get(row);
410
+ let heightRange;
411
+ return heightRange = row < this.frozenRowCount ? this.rowHeightsMap.getSumInRange(0, row) : row >= this.rowCount - this.bottomFrozenRowCount ? this.rowHeightsMap.getSumInRange(row, this.rowCount - 1) : this.rowHeightsMap.getSumInRange(this.frozenRowCount, row),
412
+ heightRange = Number(heightRange.toFixed(2)), Number.isInteger(heightRange) ? Math.ceil(height) : Math.floor(height);
413
+ }
414
+ return this.rowHeightsMap.get(row);
415
+ }
400
416
  const defaultHeight = this.getDefaultRowHeight(row);
401
417
  return isNumber(defaultHeight) ? defaultHeight : this.defaultRowHeight;
402
418
  }
@@ -409,14 +425,24 @@ export class BaseTable extends EventTarget {
409
425
  return this.isColumnHeader(0, row) || this.isCornerHeader(0, row) || this.isSeriesNumberInHeader(0, row) ? Array.isArray(this.defaultHeaderRowHeight) ? null !== (_a = this.defaultHeaderRowHeight[row]) && void 0 !== _a ? _a : this.internalProps.defaultRowHeight : this.defaultHeaderRowHeight : this.isBottomFrozenRow(row) ? Array.isArray(this.defaultHeaderRowHeight) ? null !== (_b = this.defaultHeaderRowHeight[this.columnHeaderLevelCount > 0 ? this.columnHeaderLevelCount - this.bottomFrozenRowCount : 0]) && void 0 !== _b ? _b : this.internalProps.defaultRowHeight : this.defaultHeaderRowHeight : this.internalProps.defaultRowHeight;
410
426
  }
411
427
  _setRowHeight(row, height, clearCache) {
412
- this.rowHeightsMap.put(row, Math.round(height)), clearCache && this._clearRowRangeHeightsMap(row);
428
+ var _a;
429
+ this.rowHeightsMap.put(row, (null === (_a = this.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? height : Math.round(height)),
430
+ clearCache && this._clearRowRangeHeightsMap(row);
413
431
  }
414
432
  getRowsHeight(startRow, endRow) {
415
- var _a;
433
+ var _a, _b;
416
434
  if (startRow > endRow || 0 === this.rowCount) return 0;
417
435
  startRow = Math.max(startRow, 0), endRow = Math.min(endRow, (null !== (_a = this.rowCount) && void 0 !== _a ? _a : 1 / 0) - 1);
418
436
  let h = 0;
419
- if ("standard" !== this.heightMode || this.autoFillHeight || !this.internalProps.layoutMap || this.hasAutoImageColumn() || 0 !== this.internalProps._heightResizedRowMap.size) h = this.rowHeightsMap.getSumInRange(startRow, endRow); else {
437
+ if ("standard" !== this.heightMode || this.autoFillHeight || !this.internalProps.layoutMap || this.hasAutoImageColumn() || 0 !== this.internalProps._heightResizedRowMap.size) {
438
+ if (null === (_b = this.options.customConfig) || void 0 === _b ? void 0 : _b._disableColumnAndRowSizeRound) {
439
+ const tempH = this.rowHeightsMap.getSumInRange(startRow, endRow);
440
+ let heightRange;
441
+ return heightRange = endRow < this.frozenRowCount ? this.rowHeightsMap.getSumInRange(0, endRow) : endRow >= this.rowCount - this.bottomFrozenRowCount ? this.rowHeightsMap.getSumInRange(endRow, this.rowCount - 1) : this.rowHeightsMap.getSumInRange(this.frozenRowCount, endRow),
442
+ heightRange = Number(heightRange.toFixed(2)), Number.isInteger(heightRange) ? Math.ceil(tempH) : Math.floor(tempH);
443
+ }
444
+ h = this.rowHeightsMap.getSumInRange(startRow, endRow);
445
+ } else {
420
446
  for (let i = startRow; i < Math.min(endRow + 1, this.columnHeaderLevelCount); i++) h += this.getRowHeight(i);
421
447
  endRow >= this.columnHeaderLevelCount && (h += this.defaultRowHeight * (Math.min(endRow, this.rowCount - this.bottomFrozenRowCount - 1) - Math.max(this.columnHeaderLevelCount, startRow) + 1));
422
448
  for (let i = this.rowCount - this.bottomFrozenRowCount; i < endRow + 1; i++) h += this.getRowHeight(i);
@@ -1643,7 +1669,7 @@ export class BaseTable extends EventTarget {
1643
1669
  exportImg() {
1644
1670
  return this.scenegraph.stage.toCanvas().toDataURL();
1645
1671
  }
1646
- exportCellImg(col, row) {
1672
+ exportCellImg(col, row, options) {
1647
1673
  var _a, _b, _c, _d;
1648
1674
  const isInView = this.cellIsInVisualView(col, row), {scrollTop: scrollTop, scrollLeft: scrollLeft} = this;
1649
1675
  isInView || this.scrollToCell({
@@ -1653,12 +1679,31 @@ export class BaseTable extends EventTarget {
1653
1679
  const cellRect = this.getCellRelativeRect(col, row);
1654
1680
  (null === (_b = null === (_a = this.stateManager.select) || void 0 === _a ? void 0 : _a.ranges) || void 0 === _b ? void 0 : _b.length) > 0 && hideCellSelectBorder(this.scenegraph);
1655
1681
  const {col: hoverCol, row: hoverRow} = this.stateManager.hover.cellPos;
1656
- this.stateManager.updateHoverPos(-1, -1), this.scenegraph.component.hideVerticalScrollBar(),
1657
- this.scenegraph.component.hideHorizontalScrollBar(), this.scenegraph.renderSceneGraph();
1658
- const c = this.scenegraph.stage.toCanvas(!1, (new AABBBounds).set(cellRect.left + this.tableX + 1, cellRect.top + this.tableY + 1, cellRect.right + this.tableX, cellRect.bottom + this.tableY));
1659
- return isInView || (this.setScrollTop(scrollTop), this.setScrollLeft(scrollLeft)),
1660
- (null === (_d = null === (_c = this.stateManager.select) || void 0 === _c ? void 0 : _c.ranges) || void 0 === _d ? void 0 : _d.length) > 0 && restoreCellSelectBorder(this.scenegraph),
1661
- this.stateManager.updateHoverPos(hoverCol, hoverRow), c.toDataURL();
1682
+ let oldFill, oldStroke;
1683
+ if (this.stateManager.updateHoverPos(-1, -1), this.scenegraph.component.hideVerticalScrollBar(),
1684
+ this.scenegraph.component.hideHorizontalScrollBar(), this.scenegraph.tableGroup.border.setAttribute("visible", !1),
1685
+ null == options ? void 0 : options.disableBackground) {
1686
+ const cellGroup = this.scenegraph.getCell(col, row);
1687
+ oldFill = cellGroup.attribute.fill, cellGroup.setAttribute("fill", "transparent");
1688
+ }
1689
+ if (null == options ? void 0 : options.disableBorder) {
1690
+ const cellGroup = this.scenegraph.getCell(col, row);
1691
+ oldStroke = cellGroup.attribute.stroke, cellGroup.setAttribute("stroke", !1);
1692
+ }
1693
+ this.scenegraph.renderSceneGraph();
1694
+ let sizeOffset = 0;
1695
+ "bottom-right" === this.theme.cellBorderClipDirection && (sizeOffset = 1);
1696
+ const c = this.scenegraph.stage.toCanvas(!1, (new AABBBounds).set(cellRect.left + this.tableX + 1, cellRect.top + this.tableY + 1, cellRect.right + this.tableX - sizeOffset, cellRect.bottom + this.tableY - sizeOffset));
1697
+ if (isInView || (this.setScrollTop(scrollTop), this.setScrollLeft(scrollLeft)),
1698
+ this.scenegraph.tableGroup.border.setAttribute("visible", !0), oldFill) {
1699
+ this.scenegraph.getCell(col, row).setAttribute("fill", oldFill);
1700
+ }
1701
+ if (oldStroke) {
1702
+ this.scenegraph.getCell(col, row).setAttribute("stroke", oldStroke);
1703
+ }
1704
+ return (null === (_d = null === (_c = this.stateManager.select) || void 0 === _c ? void 0 : _c.ranges) || void 0 === _d ? void 0 : _d.length) > 0 && restoreCellSelectBorder(this.scenegraph),
1705
+ this.stateManager.updateHoverPos(hoverCol, hoverRow), this.scenegraph.updateNextFrame(),
1706
+ c.toDataURL();
1662
1707
  }
1663
1708
  exportCellRangeImg(cellRange) {
1664
1709
  var _a, _b, _c, _d;