@visactor/vtable 1.4.0-alpha.0 → 1.4.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 (251) hide show
  1. package/cjs/ListTable.js +38 -26
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotChart.d.ts +1 -3
  4. package/cjs/PivotChart.js +5 -15
  5. package/cjs/PivotChart.js.map +1 -1
  6. package/cjs/PivotTable.d.ts +1 -1
  7. package/cjs/PivotTable.js +40 -18
  8. package/cjs/PivotTable.js.map +1 -1
  9. package/cjs/components/axis/axis.js +2 -3
  10. package/cjs/components/axis/axis.js.map +1 -1
  11. package/cjs/components/empty-tip/empty-tip.js +2 -2
  12. package/cjs/components/empty-tip/empty-tip.js.map +1 -1
  13. package/cjs/components/legend/discrete-legend/discrete-legend.js +1 -2
  14. package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
  15. package/cjs/components/react/react-custom-layout.d.ts +21 -0
  16. package/cjs/components/react/react-custom-layout.js +48 -0
  17. package/cjs/components/react/react-custom-layout.js.map +1 -0
  18. package/cjs/components/tooltip/TooltipHandler.js +1 -3
  19. package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
  20. package/cjs/components/tooltip/logic/BubbleTooltipElement.js +7 -3
  21. package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
  22. package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
  23. package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
  24. package/cjs/core/BaseTable.d.ts +10 -28
  25. package/cjs/core/BaseTable.js +88 -75
  26. package/cjs/core/BaseTable.js.map +1 -1
  27. package/cjs/core/FouseInput.d.ts +0 -1
  28. package/cjs/core/FouseInput.js +2 -5
  29. package/cjs/core/FouseInput.js.map +1 -1
  30. package/cjs/core/style.js +1 -1
  31. package/cjs/core/style.js.map +1 -1
  32. package/cjs/data/DataSource.d.ts +6 -1
  33. package/cjs/data/DataSource.js +12 -2
  34. package/cjs/data/DataSource.js.map +1 -1
  35. package/cjs/dataset/dataset.d.ts +17 -2
  36. package/cjs/dataset/dataset.js +195 -79
  37. package/cjs/dataset/dataset.js.map +1 -1
  38. package/cjs/dataset/statistics-helper.d.ts +43 -3
  39. package/cjs/dataset/statistics-helper.js +61 -26
  40. package/cjs/dataset/statistics-helper.js.map +1 -1
  41. package/cjs/event/event.js +1 -2
  42. package/cjs/event/event.js.map +1 -1
  43. package/cjs/event/listener/container-dom.js +4 -3
  44. package/cjs/event/listener/container-dom.js.map +1 -1
  45. package/cjs/event/listener/table-group.js +7 -5
  46. package/cjs/event/listener/table-group.js.map +1 -1
  47. package/cjs/event/util.js +2 -2
  48. package/cjs/event/util.js.map +1 -1
  49. package/cjs/index.d.ts +3 -1
  50. package/cjs/index.js +13 -4
  51. package/cjs/index.js.map +1 -1
  52. package/cjs/layout/layout-helper.js.map +1 -1
  53. package/cjs/layout/pivot-header-layout.d.ts +1 -0
  54. package/cjs/layout/pivot-header-layout.js +66 -39
  55. package/cjs/layout/pivot-header-layout.js.map +1 -1
  56. package/cjs/layout/row-height-map.js +1 -0
  57. package/cjs/layout/row-height-map.js.map +1 -1
  58. package/cjs/scenegraph/component/custom.js +6 -4
  59. package/cjs/scenegraph/component/custom.js.map +1 -1
  60. package/cjs/scenegraph/debug-tool/debug-tool.js +1 -4
  61. package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
  62. package/cjs/scenegraph/graphic/chart.d.ts +0 -1
  63. package/cjs/scenegraph/graphic/chart.js +20 -34
  64. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  65. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +8 -20
  66. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  67. package/cjs/scenegraph/graphic/contributions/chart-render.d.ts +1 -2
  68. package/cjs/scenegraph/graphic/contributions/chart-render.js +24 -40
  69. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  70. package/cjs/scenegraph/group-creater/cell-helper.js +6 -2
  71. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  72. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
  73. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  74. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +3 -2
  75. package/cjs/scenegraph/group-creater/progress/proxy.js +10 -10
  76. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  77. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +2 -1
  78. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -3
  79. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  80. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +3 -2
  81. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +15 -14
  82. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  83. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js +7 -5
  84. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  85. package/cjs/scenegraph/layout/compute-col-width.js +2 -2
  86. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  87. package/cjs/scenegraph/layout/compute-row-height.js +7 -4
  88. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  89. package/cjs/scenegraph/layout/frozen.js +12 -4
  90. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  91. package/cjs/scenegraph/layout/update-width.js +3 -0
  92. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  93. package/cjs/scenegraph/refresh-node/update-chart.d.ts +0 -1
  94. package/cjs/scenegraph/refresh-node/update-chart.js +2 -9
  95. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  96. package/cjs/scenegraph/scenegraph.d.ts +2 -1
  97. package/cjs/scenegraph/scenegraph.js +18 -15
  98. package/cjs/scenegraph/scenegraph.js.map +1 -1
  99. package/cjs/state/cell-move/index.js +1 -1
  100. package/cjs/state/cell-move/index.js.map +1 -1
  101. package/cjs/state/sort/index.js +2 -2
  102. package/cjs/state/sort/index.js.map +1 -1
  103. package/cjs/themes/theme.js +6 -0
  104. package/cjs/themes/theme.js.map +1 -1
  105. package/cjs/ts-types/base-table.d.ts +20 -40
  106. package/cjs/ts-types/base-table.js.map +1 -1
  107. package/cjs/ts-types/customLayout.d.ts +1 -1
  108. package/cjs/ts-types/customLayout.js.map +1 -1
  109. package/cjs/ts-types/icon.d.ts +2 -0
  110. package/cjs/ts-types/icon.js.map +1 -1
  111. package/cjs/ts-types/new-data-set.d.ts +9 -1
  112. package/cjs/ts-types/new-data-set.js +1 -1
  113. package/cjs/ts-types/new-data-set.js.map +1 -1
  114. package/cjs/ts-types/pivot-table/corner.d.ts +12 -0
  115. package/cjs/ts-types/pivot-table/corner.js.map +1 -1
  116. package/cjs/ts-types/table-engine.d.ts +12 -0
  117. package/cjs/ts-types/table-engine.js.map +1 -1
  118. package/cjs/ts-types/theme.d.ts +2 -0
  119. package/cjs/ts-types/theme.js.map +1 -1
  120. package/cjs/ts-types/tooltip.d.ts +2 -0
  121. package/cjs/ts-types/tooltip.js.map +1 -1
  122. package/cjs/vrender.d.ts +4 -0
  123. package/cjs/vrender.js +39 -11
  124. package/cjs/vrender.js.map +1 -1
  125. package/dist/vtable.js +25679 -9801
  126. package/dist/vtable.min.js +2 -2
  127. package/es/ListTable.js +34 -23
  128. package/es/ListTable.js.map +1 -1
  129. package/es/PivotChart.d.ts +1 -3
  130. package/es/PivotChart.js +8 -17
  131. package/es/PivotChart.js.map +1 -1
  132. package/es/PivotTable.d.ts +1 -1
  133. package/es/PivotTable.js +41 -19
  134. package/es/PivotTable.js.map +1 -1
  135. package/es/components/axis/axis.js +1 -3
  136. package/es/components/axis/axis.js.map +1 -1
  137. package/es/components/empty-tip/empty-tip.js +2 -2
  138. package/es/components/empty-tip/empty-tip.js.map +1 -1
  139. package/es/components/legend/discrete-legend/discrete-legend.js +1 -2
  140. package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
  141. package/es/components/react/react-custom-layout.d.ts +21 -0
  142. package/es/components/react/react-custom-layout.js +38 -0
  143. package/es/components/react/react-custom-layout.js.map +1 -0
  144. package/es/components/tooltip/TooltipHandler.js +1 -3
  145. package/es/components/tooltip/TooltipHandler.js.map +1 -1
  146. package/es/components/tooltip/logic/BubbleTooltipElement.js +7 -3
  147. package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
  148. package/es/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
  149. package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
  150. package/es/core/BaseTable.d.ts +10 -28
  151. package/es/core/BaseTable.js +90 -74
  152. package/es/core/BaseTable.js.map +1 -1
  153. package/es/core/FouseInput.d.ts +0 -1
  154. package/es/core/FouseInput.js +2 -5
  155. package/es/core/FouseInput.js.map +1 -1
  156. package/es/core/style.js +1 -1
  157. package/es/core/style.js.map +1 -1
  158. package/es/data/DataSource.d.ts +6 -1
  159. package/es/data/DataSource.js +12 -2
  160. package/es/data/DataSource.js.map +1 -1
  161. package/es/dataset/dataset.d.ts +17 -2
  162. package/es/dataset/dataset.js +195 -80
  163. package/es/dataset/dataset.js.map +1 -1
  164. package/es/dataset/statistics-helper.d.ts +43 -3
  165. package/es/dataset/statistics-helper.js +55 -23
  166. package/es/dataset/statistics-helper.js.map +1 -1
  167. package/es/event/event.js +1 -2
  168. package/es/event/event.js.map +1 -1
  169. package/es/event/listener/container-dom.js +4 -3
  170. package/es/event/listener/container-dom.js.map +1 -1
  171. package/es/event/listener/table-group.js +7 -5
  172. package/es/event/listener/table-group.js.map +1 -1
  173. package/es/event/util.js +2 -2
  174. package/es/event/util.js.map +1 -1
  175. package/es/index.d.ts +3 -1
  176. package/es/index.js +5 -1
  177. package/es/index.js.map +1 -1
  178. package/es/layout/layout-helper.js.map +1 -1
  179. package/es/layout/pivot-header-layout.d.ts +1 -0
  180. package/es/layout/pivot-header-layout.js +65 -37
  181. package/es/layout/pivot-header-layout.js.map +1 -1
  182. package/es/layout/row-height-map.js +1 -0
  183. package/es/layout/row-height-map.js.map +1 -1
  184. package/es/scenegraph/component/custom.js +7 -3
  185. package/es/scenegraph/component/custom.js.map +1 -1
  186. package/es/scenegraph/debug-tool/debug-tool.js +1 -4
  187. package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
  188. package/es/scenegraph/graphic/chart.d.ts +0 -1
  189. package/es/scenegraph/graphic/chart.js +21 -33
  190. package/es/scenegraph/graphic/chart.js.map +1 -1
  191. package/es/scenegraph/graphic/contributions/chart-render-helper.js +8 -20
  192. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  193. package/es/scenegraph/graphic/contributions/chart-render.d.ts +1 -2
  194. package/es/scenegraph/graphic/contributions/chart-render.js +25 -41
  195. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  196. package/es/scenegraph/group-creater/cell-helper.js +6 -2
  197. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  198. package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
  199. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  200. package/es/scenegraph/group-creater/progress/proxy.d.ts +3 -2
  201. package/es/scenegraph/group-creater/progress/proxy.js +10 -10
  202. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  203. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +2 -1
  204. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -3
  205. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  206. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +3 -2
  207. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +15 -13
  208. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  209. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js +7 -5
  210. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  211. package/es/scenegraph/layout/compute-col-width.js +3 -3
  212. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  213. package/es/scenegraph/layout/compute-row-height.js +8 -5
  214. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  215. package/es/scenegraph/layout/frozen.js +12 -4
  216. package/es/scenegraph/layout/frozen.js.map +1 -1
  217. package/es/scenegraph/layout/update-width.js +3 -0
  218. package/es/scenegraph/layout/update-width.js.map +1 -1
  219. package/es/scenegraph/refresh-node/update-chart.d.ts +0 -1
  220. package/es/scenegraph/refresh-node/update-chart.js +0 -6
  221. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  222. package/es/scenegraph/scenegraph.d.ts +2 -1
  223. package/es/scenegraph/scenegraph.js +18 -15
  224. package/es/scenegraph/scenegraph.js.map +1 -1
  225. package/es/state/cell-move/index.js +1 -1
  226. package/es/state/cell-move/index.js.map +1 -1
  227. package/es/state/sort/index.js +2 -2
  228. package/es/state/sort/index.js.map +1 -1
  229. package/es/themes/theme.js +6 -0
  230. package/es/themes/theme.js.map +1 -1
  231. package/es/ts-types/base-table.d.ts +20 -40
  232. package/es/ts-types/base-table.js.map +1 -1
  233. package/es/ts-types/customLayout.d.ts +1 -1
  234. package/es/ts-types/customLayout.js.map +1 -1
  235. package/es/ts-types/icon.d.ts +2 -0
  236. package/es/ts-types/icon.js.map +1 -1
  237. package/es/ts-types/new-data-set.d.ts +9 -1
  238. package/es/ts-types/new-data-set.js +1 -1
  239. package/es/ts-types/new-data-set.js.map +1 -1
  240. package/es/ts-types/pivot-table/corner.d.ts +12 -0
  241. package/es/ts-types/pivot-table/corner.js.map +1 -1
  242. package/es/ts-types/table-engine.d.ts +12 -0
  243. package/es/ts-types/table-engine.js.map +1 -1
  244. package/es/ts-types/theme.d.ts +2 -0
  245. package/es/ts-types/theme.js.map +1 -1
  246. package/es/ts-types/tooltip.d.ts +2 -0
  247. package/es/ts-types/tooltip.js.map +1 -1
  248. package/es/vrender.d.ts +4 -0
  249. package/es/vrender.js +9 -3
  250. package/es/vrender.js.map +1 -1
  251. package/package.json +7 -7
@@ -33,7 +33,7 @@ Object.defineProperty(exports, "__esModule", {
33
33
  value: !0
34
34
  }), exports.BaseTable = void 0;
35
35
 
36
- const columnStyleContents = __importStar(require("../body-helper/style")), headerStyleContents = __importStar(require("../header-helper/style")), style_1 = require("./style"), style = __importStar(require("../tools/style")), ts_types_1 = require("../ts-types"), helper_1 = require("../tools/helper"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), EventHandler_1 = require("../event/EventHandler"), EventTarget_1 = require("../event/EventTarget"), NumberMap_1 = require("../tools/NumberMap"), Rect_1 = require("../tools/Rect"), util_1 = require("../tools/util"), themes_1 = __importDefault(require("../themes")), env_1 = require("../tools/env"), scenegraph_1 = require("../scenegraph/scenegraph"), state_1 = require("../state/state"), event_1 = require("../event/event"), body_helper_1 = require("../body-helper/body-helper"), header_helper_1 = require("../header-helper/header-helper"), TooltipHandler_1 = require("../components/tooltip/TooltipHandler"), vutils_1 = require("@visactor/vutils"), text_measure_1 = require("../scenegraph/utils/text-measure"), get_prop_1 = require("../scenegraph/utils/get-prop"), icons_1 = require("../plugins/icons"), tableHelper_1 = require("./tableHelper"), MenuHandler_1 = require("../components/menu/dom/MenuHandler"), FouseInput_1 = require("./FouseInput"), pixel_ratio_1 = require("../tools/pixel-ratio"), create_legend_1 = require("../components/legend/create-legend"), vdataset_1 = require("@visactor/vdataset"), chart_render_helper_1 = require("../scenegraph/graphic/contributions/chart-render-helper"), get_axis_config_1 = require("../layout/chart-helper/get-axis-config"), row_height_map_1 = require("../layout/row-height-map"), row_series_number_helper_1 = require("./row-series-number-helper"), custom_cell_style_1 = require("../plugins/custom-cell-style"), update_select_border_1 = require("../scenegraph/select/update-select-border"), layout_helper_1 = require("../layout/layout-helper"), {toBoxArray: toBoxArray} = helper_1.style, {isTouchEvent: isTouchEvent} = helper_1.event, rangeReg = /^\$(\d+)\$(\d+)$/;
36
+ const columnStyleContents = __importStar(require("../body-helper/style")), headerStyleContents = __importStar(require("../header-helper/style")), style_1 = require("./style"), style = __importStar(require("../tools/style")), ts_types_1 = require("../ts-types"), helper_1 = require("../tools/helper"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), EventHandler_1 = require("../event/EventHandler"), EventTarget_1 = require("../event/EventTarget"), NumberMap_1 = require("../tools/NumberMap"), Rect_1 = require("../tools/Rect"), util_1 = require("../tools/util"), themes_1 = __importDefault(require("../themes")), env_1 = require("../tools/env"), scenegraph_1 = require("../scenegraph/scenegraph"), state_1 = require("../state/state"), event_1 = require("../event/event"), body_helper_1 = require("../body-helper/body-helper"), header_helper_1 = require("../header-helper/header-helper"), TooltipHandler_1 = require("../components/tooltip/TooltipHandler"), vutils_1 = require("@visactor/vutils"), text_measure_1 = require("../scenegraph/utils/text-measure"), get_prop_1 = require("../scenegraph/utils/get-prop"), icons_1 = require("../plugins/icons"), tableHelper_1 = require("./tableHelper"), MenuHandler_1 = require("../components/menu/dom/MenuHandler"), FouseInput_1 = require("./FouseInput"), pixel_ratio_1 = require("../tools/pixel-ratio"), create_legend_1 = require("../components/legend/create-legend"), vdataset_1 = require("@visactor/vdataset"), chart_render_helper_1 = require("../scenegraph/graphic/contributions/chart-render-helper"), get_axis_config_1 = require("../layout/chart-helper/get-axis-config"), row_height_map_1 = require("../layout/row-height-map"), row_series_number_helper_1 = require("./row-series-number-helper"), custom_cell_style_1 = require("../plugins/custom-cell-style"), update_select_border_1 = require("../scenegraph/select/update-select-border"), react_custom_layout_1 = require("../components/react/react-custom-layout"), layout_helper_1 = require("../layout/layout-helper"), {toBoxArray: toBoxArray} = helper_1.style, {isTouchEvent: isTouchEvent} = helper_1.event, rangeReg = /^\$(\d+)\$(\d+)$/;
37
37
 
38
38
  (0, style_1.importStyle)();
39
39
 
@@ -44,10 +44,10 @@ class BaseTable extends EventTarget_1.EventTarget {
44
44
  return TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE;
45
45
  }
46
46
  constructor(container, options = {}) {
47
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
48
- if (super(), this.showFrozenIcon = !0, this.version = "1.4.0-alpha.0", this.id = `VTable${Date.now()}`,
47
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
48
+ if (super(), this.showFrozenIcon = !0, this.version = "1.4.0", this.id = `VTable${Date.now()}`,
49
49
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
50
- !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
50
+ !container && "node" !== options.mode) throw new Error("vtable's container is undefined");
51
51
  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 = 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;
52
52
  this.container = container, this.options = options, this._widthMode = widthMode,
53
53
  this._heightMode = heightMode, this._widthAdaptiveMode = widthAdaptiveMode, this._heightAdaptiveMode = heightAdaptiveMode,
@@ -65,12 +65,13 @@ class BaseTable extends EventTarget_1.EventTarget {
65
65
  this.columnWidthComputeMode = null !== (_a = options.columnWidthComputeMode) && void 0 !== _a ? _a : "normal";
66
66
  const internalProps = this.internalProps = {};
67
67
  if (void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1),
68
- this.options.canvas ? (internalProps.element = this.options.canvas.parentElement,
69
- internalProps.element.style.position = "relative", internalProps.focusControl = new FouseInput_1.FocusInput(this, internalProps.element),
70
- internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== env_1.Env.mode && (internalProps.element = (0,
71
- tableHelper_1.createRootElement)(this.padding), internalProps.focusControl = new FouseInput_1.FocusInput(this, internalProps.element),
68
+ "node" !== env_1.Env.mode && (internalProps.element = (0, tableHelper_1.createRootElement)(this.padding),
69
+ internalProps.focusControl = new FouseInput_1.FocusInput(this, internalProps.element),
72
70
  internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas),
73
- internalProps.context = internalProps.canvas.getContext("2d")), internalProps.handler = new EventHandler_1.EventHandler,
71
+ internalProps.context = internalProps.canvas.getContext("2d"), (null === (_b = options.customConfig) || void 0 === _b ? void 0 : _b.createReactContainer) && (internalProps.bodyDomContainer = document.createElement("div"),
72
+ internalProps.bodyDomContainer.classList.add("table-component-container"), internalProps.element.appendChild(internalProps.bodyDomContainer),
73
+ internalProps.headerDomContainer = document.createElement("div"), internalProps.headerDomContainer.classList.add("table-component-container"),
74
+ internalProps.element.appendChild(internalProps.headerDomContainer))), internalProps.handler = new EventHandler_1.EventHandler,
74
75
  (0, vutils_1.isNumber)(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime),
75
76
  internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount,
76
77
  internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight,
@@ -90,15 +91,15 @@ class BaseTable extends EventTarget_1.EventTarget {
90
91
  var _a;
91
92
  return "node" === env_1.Env.mode ? canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
92
93
  }
93
- }, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes_1.default.of(null !== (_b = options.theme) && void 0 !== _b ? _b : themes_1.default.DEFAULT),
94
+ }, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes_1.default.of(null !== (_c = options.theme) && void 0 !== _c ? _c : themes_1.default.DEFAULT),
94
95
  internalProps.theme.isPivot = this.isPivotTable(), container ? (clearDOM && (container.innerHTML = ""),
95
96
  container.appendChild(internalProps.element), this._updateSize()) : this._updateSize(),
96
- this.options = options, internalProps.theme = themes_1.default.of(null !== (_c = options.theme) && void 0 !== _c ? _c : themes_1.default.DEFAULT),
97
+ this.options = options, internalProps.theme = themes_1.default.of(null !== (_d = options.theme) && void 0 !== _d ? _d : themes_1.default.DEFAULT),
97
98
  internalProps.theme.isPivot = this.isPivotTable(), internalProps.bodyHelper = new body_helper_1.BodyHelper(this),
98
99
  internalProps.headerHelper = new header_helper_1.HeaderHelper(this), internalProps.rowSeriesNumberHelper = new row_series_number_helper_1.RowSeriesNumberHelper(this),
99
100
  internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak,
100
- internalProps.allowFrozenColCount = null !== (_d = options.allowFrozenColCount) && void 0 !== _d ? _d : 0,
101
- internalProps.limitMaxAutoWidth = null !== (_e = options.limitMaxAutoWidth) && void 0 !== _e ? _e : 450,
101
+ internalProps.allowFrozenColCount = null !== (_e = options.allowFrozenColCount) && void 0 !== _e ? _e : 0,
102
+ internalProps.limitMaxAutoWidth = null !== (_f = options.limitMaxAutoWidth) && void 0 !== _f ? _f : 450,
102
103
  internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
103
104
  internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10,
104
105
  this._vDataSet = new vdataset_1.DataSet, this.scenegraph = new scenegraph_1.Scenegraph(this),
@@ -122,13 +123,13 @@ class BaseTable extends EventTarget_1.EventTarget {
122
123
  }, options.tooltip), "html" === internalProps.tooltip.renderMode && (internalProps.tooltipHandler = new TooltipHandler_1.TooltipHandler(this, internalProps.tooltip.confine)),
123
124
  internalProps.menu = Object.assign({
124
125
  renderMode: "html"
125
- }, options.menu), Array.isArray(null === (_f = options.menu) || void 0 === _f ? void 0 : _f.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_g = options.menu) || void 0 === _g ? void 0 : _g.dropDownMenuHighlight),
126
- Array.isArray(null === (_h = options.menu) || void 0 === _h ? void 0 : _h.defaultHeaderMenuItems) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems),
126
+ }, options.menu), Array.isArray(null === (_g = options.menu) || void 0 === _g ? void 0 : _g.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_h = options.menu) || void 0 === _h ? void 0 : _h.dropDownMenuHighlight),
127
+ Array.isArray(null === (_j = options.menu) || void 0 === _j ? void 0 : _j.defaultHeaderMenuItems) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems),
127
128
  "html" === internalProps.menu.renderMode && (internalProps.menuHandler = new MenuHandler_1.MenuHandler(this)),
128
129
  this.headerStyleCache = new Map, this.bodyStyleCache = new Map, this.bodyBottomStyleCache = new Map,
129
130
  internalProps.stick = {
130
131
  changedCells: new Map
131
- }, internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin = new custom_cell_style_1.CustomCellStylePlugin(this, null !== (_j = options.customCellStyle) && void 0 !== _j ? _j : [], null !== (_k = options.customCellStyleArrangement) && void 0 !== _k ? _k : []);
132
+ }, internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin = new custom_cell_style_1.CustomCellStylePlugin(this, null !== (_k = options.customCellStyle) && void 0 !== _k ? _k : [], null !== (_l = options.customCellStyleArrangement) && void 0 !== _l ? _l : []);
132
133
  }
133
134
  getContainer() {
134
135
  return this.container;
@@ -160,8 +161,8 @@ class BaseTable extends EventTarget_1.EventTarget {
160
161
  this.internalProps.colCount = colCount;
161
162
  }
162
163
  get frozenColCount() {
163
- var _a, _b, _c;
164
- return null !== (_c = null !== (_b = null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.frozenColCount) && void 0 !== _b ? _b : this.internalProps.frozenColCount) && void 0 !== _c ? _c : 0;
164
+ var _a, _b, _c, _d, _e;
165
+ return null !== (_e = null !== (_c = null === (_b = null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.layoutMap) || void 0 === _b ? void 0 : _b.frozenColCount) && void 0 !== _c ? _c : null === (_d = this.internalProps) || void 0 === _d ? void 0 : _d.frozenColCount) && void 0 !== _e ? _e : 0;
165
166
  }
166
167
  set frozenColCount(frozenColCount) {
167
168
  frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
@@ -180,22 +181,22 @@ class BaseTable extends EventTarget_1.EventTarget {
180
181
  this.options.frozenColCount && (this.tableNoFrameWidth - this.getColsWidth(0, this.options.frozenColCount - 1) <= 120 ? this._setFrozenColCount(0) : this.frozenColCount !== this.options.frozenColCount && this._setFrozenColCount(this.options.frozenColCount));
181
182
  }
182
183
  get frozenRowCount() {
183
- var _a, _b, _c;
184
- return null !== (_c = null !== (_b = null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.frozenRowCount) && void 0 !== _b ? _b : this.internalProps.frozenRowCount) && void 0 !== _c ? _c : 0;
184
+ var _a, _b, _c, _d, _e;
185
+ return null !== (_e = null !== (_c = null === (_b = null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.layoutMap) || void 0 === _b ? void 0 : _b.frozenRowCount) && void 0 !== _c ? _c : null === (_d = this.internalProps) || void 0 === _d ? void 0 : _d.frozenRowCount) && void 0 !== _e ? _e : 0;
185
186
  }
186
187
  set frozenRowCount(frozenRowCount) {
187
188
  this.internalProps.frozenRowCount = frozenRowCount;
188
189
  }
189
190
  get rightFrozenColCount() {
190
- var _a, _b, _c;
191
- return null !== (_c = null !== (_b = null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.rightFrozenColCount) && void 0 !== _b ? _b : this.internalProps.rightFrozenColCount) && void 0 !== _c ? _c : 0;
191
+ var _a, _b, _c, _d, _e;
192
+ return null !== (_e = null !== (_c = null === (_b = null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.layoutMap) || void 0 === _b ? void 0 : _b.rightFrozenColCount) && void 0 !== _c ? _c : null === (_d = this.internalProps) || void 0 === _d ? void 0 : _d.rightFrozenColCount) && void 0 !== _e ? _e : 0;
192
193
  }
193
194
  set rightFrozenColCount(rightFrozenColCount) {
194
195
  this.scenegraph.dealWidthRightFrozen(rightFrozenColCount);
195
196
  }
196
197
  get bottomFrozenRowCount() {
197
- var _a, _b, _c;
198
- return null !== (_c = null !== (_b = null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.bottomFrozenRowCount) && void 0 !== _b ? _b : this.internalProps.bottomFrozenRowCount) && void 0 !== _c ? _c : 0;
198
+ var _a, _b, _c, _d, _e;
199
+ return null !== (_e = null !== (_c = null === (_b = null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.layoutMap) || void 0 === _b ? void 0 : _b.bottomFrozenRowCount) && void 0 !== _c ? _c : null === (_d = this.internalProps) || void 0 === _d ? void 0 : _d.bottomFrozenRowCount) && void 0 !== _e ? _e : 0;
199
200
  }
200
201
  set bottomFrozenRowCount(bottomFrozenRowCount) {
201
202
  this.scenegraph.dealWidthBottomFrozen(bottomFrozenRowCount);
@@ -339,11 +340,10 @@ class BaseTable extends EventTarget_1.EventTarget {
339
340
  }
340
341
  }
341
342
  _updateSize() {
342
- 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;
343
+ 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;
343
344
  const {padding: padding} = this;
344
345
  let widthP = 0, heightP = 0;
345
- if (this.tableX = 0, this.tableY = 0, this.options.canvas && this.options.viewBox) widthP = this.options.viewBox.x2 - this.options.viewBox.x1,
346
- heightP = this.options.viewBox.y2 - this.options.viewBox.y1, (null === (_a = null == this ? void 0 : this.scenegraph) || void 0 === _a ? void 0 : _a.stage) && (this.options.viewBox ? this.scenegraph.stage.setViewBox(this.options.viewBox, !1) : this.scenegraph.stage.resize(widthP, heightP)); else if ("browser" === env_1.Env.mode) {
346
+ if ("browser" === env_1.Env.mode) {
347
347
  const element = this.getElement();
348
348
  let widthWithoutPadding = 0, heightWithoutPadding = 0;
349
349
  if (element.parentElement) {
@@ -355,31 +355,25 @@ class BaseTable extends EventTarget_1.EventTarget {
355
355
  element.style.width = width1 && width1 - padding.left - padding.right + "px" || "0px",
356
356
  element.style.height = height1 && height1 - padding.top - padding.bottom + "px" || "0px";
357
357
  const {canvas: canvas} = this.internalProps;
358
- widthP = null !== (_c = null === (_b = canvas.parentElement) || void 0 === _b ? void 0 : _b.offsetWidth) && void 0 !== _c ? _c : 0,
359
- heightP = null !== (_e = null === (_d = canvas.parentElement) || void 0 === _d ? void 0 : _d.offsetHeight) && void 0 !== _e ? _e : 0,
360
- (null === (_f = null == this ? void 0 : this.scenegraph) || void 0 === _f ? void 0 : _f.stage) ? this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "",
358
+ widthP = null !== (_b = null === (_a = canvas.parentElement) || void 0 === _a ? void 0 : _a.offsetWidth) && void 0 !== _b ? _b : 0,
359
+ heightP = null !== (_d = null === (_c = canvas.parentElement) || void 0 === _c ? void 0 : _c.offsetHeight) && void 0 !== _d ? _d : 0,
360
+ (null === (_e = null == this ? void 0 : this.scenegraph) || void 0 === _e ? void 0 : _e.stage) ? this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "",
361
361
  canvas.style.height = "", canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`,
362
- canvas.style.height = `${heightP}px`);
362
+ canvas.style.height = `${heightP}px`), this.internalProps.bodyDomContainer && (this.internalProps.bodyDomContainer.style.width = `${widthP}px`,
363
+ this.internalProps.bodyDomContainer.style.height = `${heightP}px`), this.internalProps.headerDomContainer && (this.internalProps.headerDomContainer.style.width = `${widthP}px`,
364
+ this.internalProps.headerDomContainer.style.height = `${heightP}px`);
363
365
  } else "node" === env_1.Env.mode && (widthP = this.canvasWidth - 1, heightP = this.canvasHeight - 1);
364
366
  const width = Math.floor(widthP - style.getScrollBarSize(this.getTheme().scrollStyle)), height = Math.floor(heightP - style.getScrollBarSize(this.getTheme().scrollStyle));
365
- if (null === (_g = this.internalProps.theme) || void 0 === _g ? void 0 : _g.frameStyle) {
366
- const lineWidths = toBoxArray(null !== (_j = null === (_h = this.internalProps.theme.frameStyle) || void 0 === _h ? void 0 : _h.borderLineWidth) && void 0 !== _j ? _j : [ null ]), shadowWidths = toBoxArray(null !== (_l = null === (_k = this.internalProps.theme.frameStyle) || void 0 === _k ? void 0 : _k.shadowBlur) && void 0 !== _l ? _l : [ 0 ]);
367
- (null === (_m = this.theme.frameStyle) || void 0 === _m ? void 0 : _m.innerBorder) ? (this.tableX = 0,
368
- this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_o = shadowWidths[1]) && void 0 !== _o ? _o : 0),
369
- this.tableNoFrameHeight = height - (null !== (_p = shadowWidths[2]) && void 0 !== _p ? _p : 0)) : (this.tableX = (null !== (_q = lineWidths[3]) && void 0 !== _q ? _q : 0) + (null !== (_r = shadowWidths[3]) && void 0 !== _r ? _r : 0),
370
- this.tableY = (null !== (_s = lineWidths[0]) && void 0 !== _s ? _s : 0) + (null !== (_t = shadowWidths[0]) && void 0 !== _t ? _t : 0),
371
- this.tableNoFrameWidth = width - ((null !== (_u = lineWidths[1]) && void 0 !== _u ? _u : 0) + (null !== (_v = shadowWidths[1]) && void 0 !== _v ? _v : 0)) - ((null !== (_w = lineWidths[3]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[3]) && void 0 !== _x ? _x : 0)),
372
- this.tableNoFrameHeight = height - ((null !== (_y = lineWidths[0]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[0]) && void 0 !== _z ? _z : 0)) - ((null !== (_0 = lineWidths[2]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[2]) && void 0 !== _1 ? _1 : 0)));
367
+ if (null === (_f = this.internalProps.theme) || void 0 === _f ? void 0 : _f.frameStyle) {
368
+ 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 ]);
369
+ (null === (_l = this.theme.frameStyle) || void 0 === _l ? void 0 : _l.innerBorder) ? (this.tableX = 0,
370
+ this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_m = shadowWidths[1]) && void 0 !== _m ? _m : 0),
371
+ 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),
372
+ this.tableY = (null !== (_r = lineWidths[0]) && void 0 !== _r ? _r : 0) + (null !== (_s = shadowWidths[0]) && void 0 !== _s ? _s : 0),
373
+ 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)),
374
+ 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)));
373
375
  }
374
376
  }
375
- updateViewBox(newViewBox) {
376
- var _a, _b, _c, _d, _e, _f, _g, _h;
377
- const oldWidth = null !== (_d = null !== (_b = null === (_a = this.options) || void 0 === _a ? void 0 : _a.viewBox.x2) && void 0 !== _b ? _b : 0 - (null === (_c = this.options) || void 0 === _c ? void 0 : _c.viewBox.x1)) && void 0 !== _d ? _d : 0, oldHeight = null !== (_h = null !== (_f = null === (_e = this.options) || void 0 === _e ? void 0 : _e.viewBox.y2) && void 0 !== _f ? _f : 0 - (null === (_g = this.options) || void 0 === _g ? void 0 : _g.viewBox.y1)) && void 0 !== _h ? _h : 0, newWidth = newViewBox.x2 - newViewBox.x1, newHeight = newViewBox.y2 - newViewBox.y1;
378
- this.options.viewBox = newViewBox, oldWidth !== newWidth || oldHeight !== newHeight ? this.resize() : this.scenegraph.stage.setViewBox(this.options.viewBox, !0);
379
- }
380
- setViewBoxTransform(a, b, c, d, e, f) {
381
- this.internalProps.modifiedViewBoxTransform = !0, this.scenegraph.stage.window.setViewBoxTransform(a, b, c, d, e, f);
382
- }
383
377
  get rowHierarchyType() {
384
378
  return "grid";
385
379
  }
@@ -531,9 +525,9 @@ class BaseTable extends EventTarget_1.EventTarget {
531
525
  let absoluteLeft;
532
526
  const width = this.getColWidth(col);
533
527
  let absoluteTop;
534
- absoluteLeft = isFrozenCell && isFrozenCell.col && this.isRightFrozenColumn(col, row) ? this.tableNoFrameWidth - (null !== (_a = this.getColsWidth(col, this.colCount - 1)) && void 0 !== _a ? _a : 0) : this.getColsWidth(0, col - 1) || 0;
528
+ absoluteLeft = isFrozenCell && isFrozenCell.col && this.isRightFrozenColumn(col, row) ? this.getAllColsWidth() <= this.tableNoFrameWidth ? this.getColsWidth(0, col - 1) || 0 : this.tableNoFrameWidth - (null !== (_a = this.getColsWidth(col, this.colCount - 1)) && void 0 !== _a ? _a : 0) : this.getColsWidth(0, col - 1) || 0;
535
529
  const height = this.getRowHeight(row);
536
- return absoluteTop = isFrozenCell && isFrozenCell.row && this.isBottomFrozenRow(col, row) ? this.tableNoFrameHeight - (null !== (_b = this.getRowsHeight(row, this.rowCount - 1)) && void 0 !== _b ? _b : 0) : this.getRowsHeight(0, row - 1),
530
+ return absoluteTop = isFrozenCell && isFrozenCell.row && this.isBottomFrozenRow(col, row) ? this.getAllRowsHeight() <= this.tableNoFrameHeight ? this.getRowsHeight(0, row - 1) : this.tableNoFrameHeight - (null !== (_b = this.getRowsHeight(row, this.rowCount - 1)) && void 0 !== _b ? _b : 0) : this.getRowsHeight(0, row - 1),
537
531
  new Rect_1.Rect(Math.round(absoluteLeft), Math.round(absoluteTop), Math.round(width), Math.round(height));
538
532
  }
539
533
  getMergeCellRect(col, row) {
@@ -672,11 +666,8 @@ class BaseTable extends EventTarget_1.EventTarget {
672
666
  }));
673
667
  }
674
668
  _toRelativeRect(absoluteRect, relativeX = !0, relativeY = !0) {
675
- var _a, _b, _c, _d;
676
669
  const rect = absoluteRect.copy(), visibleRect = this.getVisibleRect();
677
670
  return rect.offsetLeft(this.tableX - (relativeX ? visibleRect.left : 0)), rect.offsetTop(this.tableY - (relativeY ? visibleRect.top : 0)),
678
- rect.offsetLeft(null !== (_b = null === (_a = this.options.viewBox) || void 0 === _a ? void 0 : _a.x1) && void 0 !== _b ? _b : 0),
679
- rect.offsetTop(null !== (_d = null === (_c = this.options.viewBox) || void 0 === _c ? void 0 : _c.y1) && void 0 !== _d ? _d : 0),
680
671
  rect;
681
672
  }
682
673
  getVisibleRect() {
@@ -781,11 +772,9 @@ class BaseTable extends EventTarget_1.EventTarget {
781
772
  internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach((releaseObj => {
782
773
  var _a;
783
774
  return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
784
- })), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release(),
785
- internalProps.focusControl.release();
775
+ })), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release();
786
776
  const {parentElement: parentElement} = internalProps.element;
787
- parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element),
788
- null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p),
777
+ parentElement && parentElement.removeChild(internalProps.element), null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p),
789
778
  this.isReleased = !0, this.scenegraph = null, this.internalProps = null;
790
779
  }
791
780
  fireListeners(type, event) {
@@ -864,8 +853,8 @@ class BaseTable extends EventTarget_1.EventTarget {
864
853
  col: this.stateManager.hover.cellPos.col,
865
854
  row: this.stateManager.hover.cellPos.row
866
855
  };
867
- this.refreshHeader(), this.scenegraph.clearCells(), this.clearCellStyleCache(),
868
- this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row),
856
+ this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.scenegraph.clearCells(),
857
+ this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row),
869
858
  this.render();
870
859
  }
871
860
  getFrozenRowsHeight() {
@@ -895,7 +884,6 @@ class BaseTable extends EventTarget_1.EventTarget {
895
884
  return new Rect_1.Rect(this.tableX, this.tableY, width, height);
896
885
  }
897
886
  _getMouseAbstractPoint(evt, isAddScroll = !0) {
898
- var _a, _b, _c, _d;
899
887
  let e;
900
888
  if (!evt) return {
901
889
  inTable: !1,
@@ -906,15 +894,12 @@ class BaseTable extends EventTarget_1.EventTarget {
906
894
  const clientX = e.clientX || e.pageX + window.scrollX, clientY = e.clientY || e.pageY + window.scrollY, rect = this.internalProps.canvas.getBoundingClientRect();
907
895
  let inTable = !0;
908
896
  rect.right <= clientX && (inTable = !1), rect.bottom <= clientY && (inTable = !1);
909
- const currentWidth = rect.width, widthRatio = currentWidth / (this.canvas.offsetWidth || currentWidth), currentHeight = rect.height, heightRatio = currentHeight / (this.canvas.offsetHeight || currentHeight), point = {
910
- x: (clientX - rect.left) / widthRatio + (isAddScroll ? this.scrollLeft : 0) - (null !== (_b = null === (_a = this.options.viewBox) || void 0 === _a ? void 0 : _a.x1) && void 0 !== _b ? _b : 0),
911
- y: (clientY - rect.top) / heightRatio + (isAddScroll ? this.scrollTop : 0) - (null !== (_d = null === (_c = this.options.viewBox) || void 0 === _c ? void 0 : _c.y1) && void 0 !== _d ? _d : 0),
897
+ const currentWidth = rect.width, widthRatio = currentWidth / (this.canvas.offsetWidth || currentWidth), currentHeight = rect.height, heightRatio = currentHeight / (this.canvas.offsetHeight || currentHeight);
898
+ return {
899
+ x: (clientX - rect.left) / widthRatio + (isAddScroll ? this.scrollLeft : 0),
900
+ y: (clientY - rect.top) / heightRatio + (isAddScroll ? this.scrollTop : 0),
912
901
  inTable: inTable
913
902
  };
914
- if (this.internalProps.modifiedViewBoxTransform && this.scenegraph.stage.window.getViewBoxTransform()) {
915
- this.scenegraph.stage.window.getViewBoxTransform().transformPoint(point, point);
916
- }
917
- return point;
918
903
  }
919
904
  getTheme() {
920
905
  return this.internalProps.theme;
@@ -1184,7 +1169,7 @@ class BaseTable extends EventTarget_1.EventTarget {
1184
1169
  var _a;
1185
1170
  if (this.internalProps.customMergeCell) {
1186
1171
  const customMerge = this.internalProps.customMergeCell(col, row, this);
1187
- if (customMerge && customMerge.range && customMerge.text) return customMerge.range;
1172
+ if (customMerge && customMerge.range && (customMerge.text || customMerge.customLayout || customMerge.customRender)) return customMerge.range;
1188
1173
  }
1189
1174
  return null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.getCellRange(col, row);
1190
1175
  }
@@ -1664,30 +1649,49 @@ class BaseTable extends EventTarget_1.EventTarget {
1664
1649
  return "chart" === (null === (_f = null === (_e = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _e ? void 0 : _e[0]) || void 0 === _f ? void 0 : _f.type) ? cellGroup.getChildren()[0].activeChartInstance : null;
1665
1650
  }
1666
1651
  cellIsInVisualView(col, row) {
1652
+ var _a, _b, _c, _d;
1667
1653
  const drawRange = this.getDrawRange(), rect = this.getCellRelativeRect(col, row);
1668
1654
  if (col < this.frozenColCount && row < this.frozenRowCount) return !0;
1669
- const colHeaderRangeRect = this.getCellRangeRelativeRect({
1655
+ let colHeaderRangeRect, rowHeaderRangeRect, bottomFrozenRangeRect, rightFrozenRangeRect;
1656
+ if (this.frozenRowCount >= 1 && (colHeaderRangeRect = this.getCellRangeRelativeRect({
1670
1657
  start: {
1671
1658
  col: 0,
1672
1659
  row: 0
1673
1660
  },
1674
1661
  end: {
1675
1662
  col: this.colCount - 1,
1676
- row: this.columnHeaderLevelCount
1663
+ row: this.frozenRowCount - 1
1677
1664
  }
1678
- }), rowHeaderRangeRect = this.getCellRangeRelativeRect({
1665
+ })), this.frozenColCount >= 1 && (rowHeaderRangeRect = this.getCellRangeRelativeRect({
1679
1666
  start: {
1680
1667
  col: 0,
1681
1668
  row: 0
1682
1669
  },
1683
1670
  end: {
1684
- col: this.rowHeaderLevelCount,
1671
+ col: this.frozenColCount - 1,
1685
1672
  row: this.rowCount - 1
1686
1673
  }
1687
- });
1688
- if (rect.top >= drawRange.top && rect.bottom <= drawRange.bottom && rect.left >= drawRange.left && rect.right <= drawRange.right) {
1689
- if (this.isHeader(col, row)) return !0;
1690
- if (drawRange.top >= colHeaderRangeRect.bottom && drawRange.left >= rowHeaderRangeRect.right) return !0;
1674
+ })), this.bottomFrozenRowCount >= 1 && (bottomFrozenRangeRect = this.getCellRangeRelativeRect({
1675
+ start: {
1676
+ col: 0,
1677
+ row: this.rowCount - this.bottomFrozenRowCount
1678
+ },
1679
+ end: {
1680
+ col: this.colCount - 1,
1681
+ row: this.rowCount - 1
1682
+ }
1683
+ })), this.rightFrozenColCount >= 1 && (rightFrozenRangeRect = this.getCellRangeRelativeRect({
1684
+ start: {
1685
+ col: this.colCount - this.rightFrozenColCount,
1686
+ row: 0
1687
+ },
1688
+ end: {
1689
+ col: this.colCount - 1,
1690
+ row: this.rowCount - 1
1691
+ }
1692
+ })), rect.top >= drawRange.top && rect.bottom <= drawRange.bottom && rect.left >= drawRange.left && rect.right <= drawRange.right) {
1693
+ if (this.isFrozenCell(col, row)) return !0;
1694
+ if (rect.top >= (null !== (_a = null == colHeaderRangeRect ? void 0 : colHeaderRangeRect.bottom) && void 0 !== _a ? _a : rect.top) && rect.left >= (null !== (_b = null == rowHeaderRangeRect ? void 0 : rowHeaderRangeRect.right) && void 0 !== _b ? _b : rect.left) && rect.bottom <= (null !== (_c = null == bottomFrozenRangeRect ? void 0 : bottomFrozenRangeRect.top) && void 0 !== _c ? _c : rect.bottom) && rect.right <= (null !== (_d = null == rightFrozenRangeRect ? void 0 : rightFrozenRangeRect.left) && void 0 !== _d ? _d : rect.right)) return !0;
1691
1695
  }
1692
1696
  return !1;
1693
1697
  }
@@ -1848,6 +1852,15 @@ class BaseTable extends EventTarget_1.EventTarget {
1848
1852
  var _a;
1849
1853
  null === (_a = this.dataSource) || void 0 === _a || _a.setSortedIndexMap(field, filedMap);
1850
1854
  }
1855
+ checkReactCustomLayout() {
1856
+ this.reactCustomLayout || (this.reactCustomLayout = new react_custom_layout_1.ReactCustomLayout(this));
1857
+ }
1858
+ get bodyDomContainer() {
1859
+ return this.internalProps.bodyDomContainer;
1860
+ }
1861
+ get headerDomContainer() {
1862
+ return this.internalProps.headerDomContainer;
1863
+ }
1851
1864
  }
1852
1865
 
1853
1866
  exports.BaseTable = BaseTable;