@visactor/vtable 0.9.2 → 0.9.3-alpha.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 (647) hide show
  1. package/cjs/ListTable.d.ts +2 -1
  2. package/cjs/ListTable.js +17 -13
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +69 -0
  5. package/cjs/PivotChart.js +435 -0
  6. package/cjs/PivotChart.js.map +1 -0
  7. package/cjs/PivotTable.d.ts +2 -1
  8. package/cjs/PivotTable.js +18 -13
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/body-helper/style/MultilineTextStyle.js +2 -2
  11. package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -1
  12. package/cjs/body-helper/style/ProgressBarStyle.js +15 -15
  13. package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
  14. package/cjs/body-helper/style/Style.d.ts +0 -1
  15. package/cjs/body-helper/style/Style.js +25 -28
  16. package/cjs/body-helper/style/Style.js.map +1 -1
  17. package/cjs/chartModule.js +14 -0
  18. package/cjs/chartModule.js.map +1 -0
  19. package/cjs/components/axis/axis.d.ts +45 -0
  20. package/cjs/components/axis/axis.js +146 -0
  21. package/cjs/components/axis/axis.js.map +1 -0
  22. package/cjs/components/axis/band-scale.d.ts +18 -0
  23. package/cjs/components/axis/band-scale.js +54 -0
  24. package/cjs/components/axis/band-scale.js.map +1 -0
  25. package/cjs/components/axis/get-axis-attributes.d.ts +136 -0
  26. package/cjs/components/axis/get-axis-attributes.js +169 -0
  27. package/cjs/components/axis/get-axis-attributes.js.map +1 -0
  28. package/cjs/components/axis/label-overlap.d.ts +3 -0
  29. package/cjs/components/axis/label-overlap.js +46 -0
  30. package/cjs/components/axis/label-overlap.js.map +1 -0
  31. package/cjs/components/axis/linear-scale.d.ts +45 -0
  32. package/cjs/components/axis/linear-scale.js +120 -0
  33. package/cjs/components/axis/linear-scale.js.map +1 -0
  34. package/cjs/components/legend/get-legend-attributes.d.ts +5 -0
  35. package/cjs/components/legend/get-legend-attributes.js +90 -0
  36. package/cjs/components/legend/get-legend-attributes.js.map +1 -0
  37. package/cjs/components/legend/legend.d.ts +23 -0
  38. package/cjs/components/legend/legend.js +94 -0
  39. package/cjs/components/legend/legend.js.map +1 -0
  40. package/{es → cjs/components}/menu/dom/BaseMenu.d.ts +2 -2
  41. package/cjs/components/menu/dom/BaseMenu.js.map +1 -0
  42. package/cjs/components/menu/dom/Menu.js.map +1 -0
  43. package/cjs/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
  44. package/cjs/{menu → components/menu}/dom/MenuHandler.js +1 -1
  45. package/cjs/components/menu/dom/MenuHandler.js.map +1 -0
  46. package/cjs/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
  47. package/cjs/{menu → components/menu}/dom/logic/MenuContainer.js +2 -2
  48. package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -0
  49. package/cjs/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
  50. package/cjs/{menu → components/menu}/dom/logic/MenuElement.js +4 -4
  51. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -0
  52. package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
  53. package/cjs/components/title/title.d.ts +12 -0
  54. package/cjs/components/title/title.js +66 -0
  55. package/cjs/components/title/title.js.map +1 -0
  56. package/{es → cjs/components}/tooltip/BaseTooltip.d.ts +3 -3
  57. package/cjs/components/tooltip/BaseTooltip.js.map +1 -0
  58. package/cjs/components/tooltip/Tooltip.js.map +1 -0
  59. package/cjs/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
  60. package/cjs/{tooltip → components/tooltip}/TooltipHandler.js +1 -1
  61. package/cjs/components/tooltip/TooltipHandler.js.map +1 -0
  62. package/{es → cjs/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
  63. package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +1 -1
  64. package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
  65. package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
  66. package/cjs/components/util/orient.d.ts +3 -0
  67. package/cjs/components/util/orient.js +14 -0
  68. package/cjs/components/util/orient.js.map +1 -0
  69. package/cjs/components/util/register.d.ts +3 -0
  70. package/cjs/components/util/register.js +15 -0
  71. package/cjs/components/util/register.js.map +1 -0
  72. package/cjs/components/util/tick-data/config.d.ts +1 -0
  73. package/cjs/components/util/tick-data/config.js +6 -0
  74. package/cjs/components/util/tick-data/config.js.map +1 -0
  75. package/cjs/components/util/tick-data/continuous.d.ts +2 -0
  76. package/cjs/components/util/tick-data/continuous.js +39 -0
  77. package/cjs/components/util/tick-data/continuous.js.map +1 -0
  78. package/cjs/components/util/tick-data/discrete/linear.d.ts +2 -0
  79. package/cjs/components/util/tick-data/discrete/linear.js +66 -0
  80. package/cjs/components/util/tick-data/discrete/linear.js.map +1 -0
  81. package/cjs/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
  82. package/cjs/components/util/tick-data/discrete/polar-angle.js +46 -0
  83. package/cjs/components/util/tick-data/discrete/polar-angle.js.map +1 -0
  84. package/cjs/components/util/tick-data/index.d.ts +2 -0
  85. package/cjs/components/util/tick-data/index.js +17 -0
  86. package/cjs/components/util/tick-data/index.js.map +1 -0
  87. package/cjs/components/util/tick-data/util.d.ts +21 -0
  88. package/cjs/components/util/tick-data/util.js +115 -0
  89. package/cjs/components/util/tick-data/util.js.map +1 -0
  90. package/cjs/components/util/transform.d.ts +5 -0
  91. package/cjs/components/util/transform.js +45 -0
  92. package/cjs/components/util/transform.js.map +1 -0
  93. package/cjs/core/BaseTable.d.ts +18 -5
  94. package/cjs/core/BaseTable.js +115 -41
  95. package/cjs/core/BaseTable.js.map +1 -1
  96. package/cjs/core/TABLE_EVENT_TYPE.d.ts +5 -0
  97. package/cjs/core/TABLE_EVENT_TYPE.js +6 -1
  98. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  99. package/cjs/core/style.js +1 -1
  100. package/cjs/core/style.js.map +1 -1
  101. package/cjs/core/tableHelper.js +1 -2
  102. package/cjs/data/CachedDataSource.js +2 -1
  103. package/cjs/data/DataSource.js +2 -2
  104. package/cjs/data/DataSource.js.map +1 -1
  105. package/cjs/dataset/dataset-pivot-table.d.ts +60 -0
  106. package/cjs/dataset/dataset-pivot-table.js +387 -0
  107. package/cjs/dataset/dataset-pivot-table.js.map +1 -0
  108. package/cjs/dataset/dataset.d.ts +14 -19
  109. package/cjs/dataset/dataset.js +183 -200
  110. package/cjs/dataset/dataset.js.map +1 -1
  111. package/cjs/dataset/statistics-helper.d.ts +68 -0
  112. package/cjs/dataset/statistics-helper.js +173 -0
  113. package/cjs/dataset/statistics-helper.js.map +1 -0
  114. package/cjs/dataset/util/zero-align.d.ts +10 -0
  115. package/cjs/dataset/util/zero-align.js +119 -0
  116. package/cjs/dataset/util/zero-align.js.map +1 -0
  117. package/cjs/event/EventHandler.js.map +1 -1
  118. package/cjs/event/EventTarget.d.ts +5 -5
  119. package/cjs/event/EventTarget.js +2 -2
  120. package/cjs/event/EventTarget.js.map +1 -1
  121. package/cjs/event/VChartEventProxy.d.ts +1 -0
  122. package/cjs/event/VChartEventProxy.js +1 -0
  123. package/cjs/event/VChartEventProxy.js.map +1 -0
  124. package/cjs/event/event.js +7 -4
  125. package/cjs/event/event.js.map +1 -1
  126. package/cjs/event/listener/table-group.js +8 -6
  127. package/cjs/event/listener/table-group.js.map +1 -1
  128. package/cjs/event/pivot-chart/axis-click.d.ts +2 -0
  129. package/cjs/event/pivot-chart/axis-click.js +42 -0
  130. package/cjs/event/pivot-chart/axis-click.js.map +1 -0
  131. package/cjs/event/pivot-chart/axis-hover.d.ts +2 -0
  132. package/cjs/event/pivot-chart/axis-hover.js +41 -0
  133. package/cjs/event/pivot-chart/axis-hover.js.map +1 -0
  134. package/cjs/event/scroll.js +4 -3
  135. package/cjs/event/scroll.js.map +1 -1
  136. package/cjs/event/sparkline-event.js +1 -2
  137. package/cjs/event/sparkline-event.js.map +1 -1
  138. package/cjs/header-helper/header-helper.js +1 -1
  139. package/cjs/header-helper/header-helper.js.map +1 -1
  140. package/cjs/header-helper/style/MultilineTextHeaderStyle.js +2 -2
  141. package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
  142. package/cjs/header-helper/style/Style.d.ts +0 -1
  143. package/cjs/header-helper/style/Style.js +25 -28
  144. package/cjs/header-helper/style/Style.js.map +1 -1
  145. package/cjs/index.d.ts +4 -3
  146. package/cjs/index.js +11 -2
  147. package/cjs/index.js.map +1 -1
  148. package/cjs/layout/chart-helper/get-axis-config.d.ts +2 -0
  149. package/cjs/layout/chart-helper/get-axis-config.js +118 -0
  150. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -0
  151. package/cjs/layout/chart-helper/get-chart-spec.d.ts +7 -0
  152. package/cjs/layout/chart-helper/get-chart-spec.js +135 -0
  153. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -0
  154. package/cjs/layout/index.js +2 -1
  155. package/cjs/layout/pivot-header-layout.d.ts +13 -5
  156. package/cjs/layout/pivot-header-layout.js +50 -14
  157. package/cjs/layout/pivot-header-layout.js.map +1 -1
  158. package/cjs/layout/pivot-layout.d.ts +54 -8
  159. package/cjs/layout/pivot-layout.js +399 -91
  160. package/cjs/layout/pivot-layout.js.map +1 -1
  161. package/cjs/layout/simple-header-layout.d.ts +10 -0
  162. package/cjs/layout/simple-header-layout.js +43 -2
  163. package/cjs/layout/simple-header-layout.js.map +1 -1
  164. package/cjs/plugins/{chartTypes.js → chartModules.js} +1 -1
  165. package/cjs/plugins/chartModules.js.map +1 -0
  166. package/cjs/register.d.ts +1 -1
  167. package/cjs/register.js +6 -6
  168. package/cjs/register.js.map +1 -1
  169. package/cjs/render/layout/text.d.ts +33 -4
  170. package/cjs/render/layout/text.js +9 -3
  171. package/cjs/render/layout/text.js.map +1 -1
  172. package/cjs/scenegraph/component/custom.js +17 -16
  173. package/cjs/scenegraph/component/custom.js.map +1 -1
  174. package/cjs/scenegraph/component/menu.d.ts +41 -0
  175. package/cjs/scenegraph/component/table-component.js +3 -3
  176. package/cjs/scenegraph/component/table-component.js.map +1 -1
  177. package/cjs/scenegraph/graphic/chart.d.ts +4 -1
  178. package/cjs/scenegraph/graphic/chart.js +29 -17
  179. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  180. package/cjs/scenegraph/graphic/contributions/chart-render.js +22 -3
  181. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  182. package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
  183. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
  184. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  185. package/cjs/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
  186. package/cjs/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
  187. package/cjs/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
  188. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
  189. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
  190. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  191. package/cjs/scenegraph/graphic/text.d.ts +15 -0
  192. package/cjs/scenegraph/group-creater/cell-helper.js +9 -3
  193. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  194. package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  195. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
  196. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  197. package/cjs/scenegraph/group-creater/column.js.map +1 -1
  198. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
  199. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +71 -0
  200. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
  201. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  202. package/cjs/scenegraph/group-creater/progress/proxy.js +29 -35
  203. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  204. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
  205. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  206. package/cjs/scenegraph/layout/compute-col-width.js +23 -15
  207. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  208. package/cjs/scenegraph/layout/compute-row-height.js +20 -9
  209. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  210. package/cjs/scenegraph/layout/move-cell.js +1 -1
  211. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  212. package/cjs/scenegraph/layout/update-cell.js +3 -2
  213. package/cjs/scenegraph/layout/update-cell.js.map +1 -1
  214. package/cjs/scenegraph/layout/update-height.js +1 -1
  215. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  216. package/cjs/scenegraph/layout/update-row.js +1 -1
  217. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  218. package/cjs/scenegraph/layout/update-width.js +33 -3
  219. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  220. package/cjs/scenegraph/refresh-node/update-chart.d.ts +3 -0
  221. package/cjs/scenegraph/refresh-node/update-chart.js +76 -7
  222. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  223. package/cjs/scenegraph/scenegraph.d.ts +8 -0
  224. package/cjs/scenegraph/scenegraph.js +115 -19
  225. package/cjs/scenegraph/scenegraph.js.map +1 -1
  226. package/cjs/scenegraph/stick-text/index.js +10 -8
  227. package/cjs/scenegraph/stick-text/index.js.map +1 -1
  228. package/cjs/scenegraph/style/corner-cell.d.ts +3 -0
  229. package/cjs/scenegraph/style/corner-cell.js +29 -0
  230. package/cjs/scenegraph/style/corner-cell.js.map +1 -0
  231. package/cjs/scenegraph/style/frame-border.d.ts +1 -0
  232. package/cjs/scenegraph/style/frame-border.js +3 -7
  233. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  234. package/cjs/scenegraph/utils/get-cell-merge.js +2 -1
  235. package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
  236. package/cjs/state/state.js +1 -1
  237. package/cjs/state/state.js.map +1 -1
  238. package/cjs/themes/DARK.js +1 -2
  239. package/cjs/themes/theme.d.ts +10 -0
  240. package/cjs/themes/theme.js +50 -4
  241. package/cjs/themes/theme.js.map +1 -1
  242. package/cjs/tools/LimitPromiseQueue.js +2 -1
  243. package/cjs/tools/calc.d.ts +3 -0
  244. package/cjs/tools/calc.js +11 -3
  245. package/cjs/tools/calc.js.map +1 -1
  246. package/cjs/tools/debounce.js +1 -1
  247. package/cjs/tools/diff-cell.js +2 -2
  248. package/cjs/tools/dom.js +1 -1
  249. package/cjs/tools/env.js +1 -1
  250. package/cjs/ts-types/base-table.d.ts +29 -12
  251. package/cjs/ts-types/base-table.js.map +1 -1
  252. package/cjs/ts-types/column/style.d.ts +0 -1
  253. package/cjs/ts-types/column/style.js.map +1 -1
  254. package/cjs/ts-types/component/axis.d.ts +12 -0
  255. package/cjs/ts-types/component/axis.js +6 -0
  256. package/cjs/ts-types/component/axis.js.map +1 -0
  257. package/cjs/ts-types/component/legend.d.ts +5 -0
  258. package/cjs/ts-types/component/legend.js +6 -0
  259. package/cjs/ts-types/component/legend.js.map +1 -0
  260. package/cjs/ts-types/component/title.d.ts +47 -0
  261. package/cjs/ts-types/component/title.js +6 -0
  262. package/cjs/ts-types/component/title.js.map +1 -0
  263. package/cjs/ts-types/component/util.d.ts +1 -0
  264. package/cjs/ts-types/component/util.js +6 -0
  265. package/cjs/ts-types/component/util.js.map +1 -0
  266. package/cjs/ts-types/customElement.d.ts +2 -0
  267. package/cjs/ts-types/customElement.js.map +1 -1
  268. package/cjs/ts-types/events.d.ts +108 -83
  269. package/cjs/ts-types/events.js.map +1 -1
  270. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  271. package/cjs/ts-types/list-table/define/chart-define.d.ts +1 -1
  272. package/cjs/ts-types/list-table/define/chart-define.js.map +1 -1
  273. package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -2
  274. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  275. package/cjs/ts-types/new-data-set.d.ts +19 -5
  276. package/cjs/ts-types/new-data-set.js +2 -2
  277. package/cjs/ts-types/new-data-set.js.map +1 -1
  278. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
  279. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +3 -1
  280. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
  281. package/cjs/ts-types/pivot-table/corner.d.ts +3 -3
  282. package/cjs/ts-types/pivot-table/corner.js.map +1 -1
  283. package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  284. package/cjs/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
  285. package/cjs/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
  286. package/cjs/ts-types/pivot-table/indicator/index.d.ts +1 -0
  287. package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
  288. package/cjs/ts-types/pivot-table/title.d.ts +1 -1
  289. package/cjs/ts-types/pivot-table/title.js.map +1 -1
  290. package/cjs/ts-types/table-engine.d.ts +27 -3
  291. package/cjs/ts-types/table-engine.js.map +1 -1
  292. package/cjs/ts-types/theme.d.ts +5 -0
  293. package/cjs/ts-types/theme.js.map +1 -1
  294. package/dist/vtable.js +37522 -24362
  295. package/dist/vtable.min.js +4 -2
  296. package/es/ListTable.d.ts +2 -1
  297. package/es/ListTable.js +17 -13
  298. package/es/ListTable.js.map +1 -1
  299. package/es/PivotChart.d.ts +69 -0
  300. package/es/PivotChart.js +445 -0
  301. package/es/PivotChart.js.map +1 -0
  302. package/es/PivotTable.d.ts +2 -1
  303. package/es/PivotTable.js +19 -14
  304. package/es/PivotTable.js.map +1 -1
  305. package/es/body-helper/style/MultilineTextStyle.js +2 -2
  306. package/es/body-helper/style/MultilineTextStyle.js.map +1 -1
  307. package/es/body-helper/style/ProgressBarStyle.js +15 -15
  308. package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
  309. package/es/body-helper/style/Style.d.ts +0 -1
  310. package/es/body-helper/style/Style.js +25 -28
  311. package/es/body-helper/style/Style.js.map +1 -1
  312. package/es/{chartType.js → chartModule.js} +2 -2
  313. package/es/chartModule.js.map +1 -0
  314. package/es/components/axis/axis.d.ts +45 -0
  315. package/es/components/axis/axis.js +155 -0
  316. package/es/components/axis/axis.js.map +1 -0
  317. package/es/components/axis/band-scale.d.ts +18 -0
  318. package/es/components/axis/band-scale.js +46 -0
  319. package/es/components/axis/band-scale.js.map +1 -0
  320. package/es/components/axis/get-axis-attributes.d.ts +136 -0
  321. package/es/components/axis/get-axis-attributes.js +166 -0
  322. package/es/components/axis/get-axis-attributes.js.map +1 -0
  323. package/es/components/axis/label-overlap.d.ts +3 -0
  324. package/es/components/axis/label-overlap.js +39 -0
  325. package/es/components/axis/label-overlap.js.map +1 -0
  326. package/es/components/axis/linear-scale.d.ts +45 -0
  327. package/es/components/axis/linear-scale.js +104 -0
  328. package/es/components/axis/linear-scale.js.map +1 -0
  329. package/es/components/legend/get-legend-attributes.d.ts +5 -0
  330. package/es/components/legend/get-legend-attributes.js +84 -0
  331. package/es/components/legend/get-legend-attributes.js.map +1 -0
  332. package/es/components/legend/legend.d.ts +23 -0
  333. package/es/components/legend/legend.js +93 -0
  334. package/es/components/legend/legend.js.map +1 -0
  335. package/{cjs → es/components}/menu/dom/BaseMenu.d.ts +2 -2
  336. package/es/components/menu/dom/BaseMenu.js.map +1 -0
  337. package/es/components/menu/dom/Menu.js.map +1 -0
  338. package/es/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
  339. package/es/{menu → components/menu}/dom/MenuHandler.js +2 -2
  340. package/es/components/menu/dom/MenuHandler.js.map +1 -0
  341. package/es/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
  342. package/es/{menu → components/menu}/dom/logic/MenuContainer.js +4 -4
  343. package/es/components/menu/dom/logic/MenuContainer.js.map +1 -0
  344. package/es/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
  345. package/es/{menu → components/menu}/dom/logic/MenuElement.js +9 -9
  346. package/es/components/menu/dom/logic/MenuElement.js.map +1 -0
  347. package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
  348. package/es/components/title/title.d.ts +12 -0
  349. package/es/components/title/title.js +61 -0
  350. package/es/components/title/title.js.map +1 -0
  351. package/{cjs → es/components}/tooltip/BaseTooltip.d.ts +3 -3
  352. package/es/components/tooltip/BaseTooltip.js.map +1 -0
  353. package/es/components/tooltip/Tooltip.js.map +1 -0
  354. package/es/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
  355. package/es/{tooltip → components/tooltip}/TooltipHandler.js +4 -4
  356. package/es/components/tooltip/TooltipHandler.js.map +1 -0
  357. package/{cjs → es/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
  358. package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +4 -4
  359. package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
  360. package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
  361. package/es/components/util/orient.d.ts +3 -0
  362. package/es/components/util/orient.js +8 -0
  363. package/es/components/util/orient.js.map +1 -0
  364. package/es/components/util/register.d.ts +3 -0
  365. package/es/components/util/register.js +8 -0
  366. package/es/components/util/register.js.map +1 -0
  367. package/es/components/util/tick-data/config.d.ts +1 -0
  368. package/es/components/util/tick-data/config.js +2 -0
  369. package/es/components/util/tick-data/config.js.map +1 -0
  370. package/es/components/util/tick-data/continuous.d.ts +2 -0
  371. package/es/components/util/tick-data/continuous.js +38 -0
  372. package/es/components/util/tick-data/continuous.js.map +1 -0
  373. package/es/components/util/tick-data/discrete/linear.d.ts +2 -0
  374. package/es/components/util/tick-data/discrete/linear.js +59 -0
  375. package/es/components/util/tick-data/discrete/linear.js.map +1 -0
  376. package/es/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
  377. package/es/components/util/tick-data/discrete/polar-angle.js +39 -0
  378. package/es/components/util/tick-data/discrete/polar-angle.js.map +1 -0
  379. package/es/components/util/tick-data/index.d.ts +2 -0
  380. package/es/components/util/tick-data/index.js +19 -0
  381. package/es/components/util/tick-data/index.js.map +1 -0
  382. package/es/components/util/tick-data/util.d.ts +21 -0
  383. package/es/components/util/tick-data/util.js +104 -0
  384. package/es/components/util/tick-data/util.js.map +1 -0
  385. package/es/components/util/transform.d.ts +5 -0
  386. package/es/components/util/transform.js +34 -0
  387. package/es/components/util/transform.js.map +1 -0
  388. package/es/core/BaseTable.d.ts +18 -5
  389. package/es/core/BaseTable.js +119 -43
  390. package/es/core/BaseTable.js.map +1 -1
  391. package/es/core/TABLE_EVENT_TYPE.d.ts +5 -0
  392. package/es/core/TABLE_EVENT_TYPE.js +6 -1
  393. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  394. package/es/core/style.js +1 -1
  395. package/es/core/style.js.map +1 -1
  396. package/es/core/tableHelper.js +1 -2
  397. package/es/data/CachedDataSource.js +2 -1
  398. package/es/data/DataSource.js +2 -2
  399. package/es/data/DataSource.js.map +1 -1
  400. package/es/dataset/dataset-pivot-table.d.ts +60 -0
  401. package/es/dataset/dataset-pivot-table.js +378 -0
  402. package/es/dataset/dataset-pivot-table.js.map +1 -0
  403. package/es/dataset/dataset.d.ts +14 -19
  404. package/es/dataset/dataset.js +175 -190
  405. package/es/dataset/dataset.js.map +1 -1
  406. package/es/dataset/statistics-helper.d.ts +68 -0
  407. package/es/dataset/statistics-helper.js +152 -0
  408. package/es/dataset/statistics-helper.js.map +1 -0
  409. package/es/dataset/util/zero-align.d.ts +10 -0
  410. package/es/dataset/util/zero-align.js +111 -0
  411. package/es/dataset/util/zero-align.js.map +1 -0
  412. package/es/event/EventHandler.js.map +1 -1
  413. package/es/event/EventTarget.d.ts +5 -5
  414. package/es/event/EventTarget.js +2 -2
  415. package/es/event/EventTarget.js.map +1 -1
  416. package/es/event/VChartEventProxy.d.ts +1 -0
  417. package/es/event/VChartEventProxy.js +1 -0
  418. package/es/event/VChartEventProxy.js.map +1 -0
  419. package/es/event/event.js +10 -3
  420. package/es/event/event.js.map +1 -1
  421. package/es/event/listener/table-group.js +8 -6
  422. package/es/event/listener/table-group.js.map +1 -1
  423. package/es/event/pivot-chart/axis-click.d.ts +2 -0
  424. package/es/event/pivot-chart/axis-click.js +36 -0
  425. package/es/event/pivot-chart/axis-click.js.map +1 -0
  426. package/es/event/pivot-chart/axis-hover.d.ts +2 -0
  427. package/es/event/pivot-chart/axis-hover.js +33 -0
  428. package/es/event/pivot-chart/axis-hover.js.map +1 -0
  429. package/es/event/scroll.js +4 -3
  430. package/es/event/scroll.js.map +1 -1
  431. package/es/event/sparkline-event.js +1 -2
  432. package/es/event/sparkline-event.js.map +1 -1
  433. package/es/header-helper/header-helper.js +1 -1
  434. package/es/header-helper/header-helper.js.map +1 -1
  435. package/es/header-helper/style/MultilineTextHeaderStyle.js +2 -2
  436. package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
  437. package/es/header-helper/style/Style.d.ts +0 -1
  438. package/es/header-helper/style/Style.js +25 -28
  439. package/es/header-helper/style/Style.js.map +1 -1
  440. package/es/index.d.ts +4 -3
  441. package/es/index.js +4 -2
  442. package/es/index.js.map +1 -1
  443. package/es/layout/chart-helper/get-axis-config.d.ts +2 -0
  444. package/es/layout/chart-helper/get-axis-config.js +110 -0
  445. package/es/layout/chart-helper/get-axis-config.js.map +1 -0
  446. package/es/layout/chart-helper/get-chart-spec.d.ts +7 -0
  447. package/es/layout/chart-helper/get-chart-spec.js +126 -0
  448. package/es/layout/chart-helper/get-chart-spec.js.map +1 -0
  449. package/es/layout/index.js +2 -1
  450. package/es/layout/pivot-header-layout.d.ts +13 -5
  451. package/es/layout/pivot-header-layout.js +50 -12
  452. package/es/layout/pivot-header-layout.js.map +1 -1
  453. package/es/layout/pivot-layout.d.ts +54 -8
  454. package/es/layout/pivot-layout.js +402 -89
  455. package/es/layout/pivot-layout.js.map +1 -1
  456. package/es/layout/simple-header-layout.d.ts +10 -0
  457. package/es/layout/simple-header-layout.js +44 -1
  458. package/es/layout/simple-header-layout.js.map +1 -1
  459. package/es/plugins/chartModules.js +2 -0
  460. package/es/plugins/chartModules.js.map +1 -0
  461. package/es/register.d.ts +1 -1
  462. package/es/register.js +3 -3
  463. package/es/register.js.map +1 -1
  464. package/es/render/layout/text.d.ts +33 -4
  465. package/es/render/layout/text.js +9 -3
  466. package/es/render/layout/text.js.map +1 -1
  467. package/es/scenegraph/component/custom.js +17 -16
  468. package/es/scenegraph/component/custom.js.map +1 -1
  469. package/es/scenegraph/component/menu.d.ts +41 -0
  470. package/es/scenegraph/component/table-component.js +3 -3
  471. package/es/scenegraph/component/table-component.js.map +1 -1
  472. package/es/scenegraph/graphic/chart.d.ts +4 -1
  473. package/es/scenegraph/graphic/chart.js +29 -15
  474. package/es/scenegraph/graphic/chart.js.map +1 -1
  475. package/es/scenegraph/graphic/contributions/chart-render.js +22 -3
  476. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  477. package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
  478. package/es/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
  479. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  480. package/es/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
  481. package/es/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
  482. package/es/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
  483. package/es/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
  484. package/es/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
  485. package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  486. package/es/scenegraph/graphic/text.d.ts +15 -0
  487. package/es/scenegraph/group-creater/cell-helper.js +10 -2
  488. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  489. package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  490. package/es/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
  491. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  492. package/es/scenegraph/group-creater/column.js.map +1 -1
  493. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
  494. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +65 -0
  495. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
  496. package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  497. package/es/scenegraph/group-creater/progress/proxy.js +27 -34
  498. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  499. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
  500. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  501. package/es/scenegraph/layout/compute-col-width.js +23 -15
  502. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  503. package/es/scenegraph/layout/compute-row-height.js +20 -9
  504. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  505. package/es/scenegraph/layout/move-cell.js +1 -1
  506. package/es/scenegraph/layout/move-cell.js.map +1 -1
  507. package/es/scenegraph/layout/update-cell.js +3 -1
  508. package/es/scenegraph/layout/update-cell.js.map +1 -1
  509. package/es/scenegraph/layout/update-height.js +1 -1
  510. package/es/scenegraph/layout/update-height.js.map +1 -1
  511. package/es/scenegraph/layout/update-row.js +1 -1
  512. package/es/scenegraph/layout/update-row.js.map +1 -1
  513. package/es/scenegraph/layout/update-width.js +34 -2
  514. package/es/scenegraph/layout/update-width.js.map +1 -1
  515. package/es/scenegraph/refresh-node/update-chart.d.ts +3 -0
  516. package/es/scenegraph/refresh-node/update-chart.js +70 -4
  517. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  518. package/es/scenegraph/scenegraph.d.ts +8 -0
  519. package/es/scenegraph/scenegraph.js +117 -19
  520. package/es/scenegraph/scenegraph.js.map +1 -1
  521. package/es/scenegraph/stick-text/index.js +10 -8
  522. package/es/scenegraph/stick-text/index.js.map +1 -1
  523. package/es/scenegraph/style/corner-cell.d.ts +3 -0
  524. package/es/scenegraph/style/corner-cell.js +25 -0
  525. package/es/scenegraph/style/corner-cell.js.map +1 -0
  526. package/es/scenegraph/style/frame-border.d.ts +1 -0
  527. package/es/scenegraph/style/frame-border.js +2 -6
  528. package/es/scenegraph/style/frame-border.js.map +1 -1
  529. package/es/scenegraph/utils/get-cell-merge.js +2 -1
  530. package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
  531. package/es/state/state.js +1 -1
  532. package/es/state/state.js.map +1 -1
  533. package/es/themes/DARK.js +1 -2
  534. package/es/themes/theme.d.ts +10 -0
  535. package/es/themes/theme.js +50 -4
  536. package/es/themes/theme.js.map +1 -1
  537. package/es/tools/LimitPromiseQueue.js +2 -1
  538. package/es/tools/calc.d.ts +3 -0
  539. package/es/tools/calc.js +10 -0
  540. package/es/tools/calc.js.map +1 -1
  541. package/es/tools/debounce.js +1 -1
  542. package/es/tools/diff-cell.js +1 -1
  543. package/es/tools/dom.js +1 -1
  544. package/es/tools/env.js +1 -1
  545. package/es/ts-types/base-table.d.ts +29 -12
  546. package/es/ts-types/base-table.js.map +1 -1
  547. package/es/ts-types/column/style.d.ts +0 -1
  548. package/es/ts-types/column/style.js.map +1 -1
  549. package/es/ts-types/component/axis.d.ts +12 -0
  550. package/es/ts-types/component/axis.js +2 -0
  551. package/es/ts-types/component/axis.js.map +1 -0
  552. package/es/ts-types/component/legend.d.ts +5 -0
  553. package/es/ts-types/component/legend.js +2 -0
  554. package/es/ts-types/component/legend.js.map +1 -0
  555. package/es/ts-types/component/title.d.ts +47 -0
  556. package/es/ts-types/component/title.js +2 -0
  557. package/es/ts-types/component/title.js.map +1 -0
  558. package/es/ts-types/component/util.d.ts +1 -0
  559. package/es/ts-types/component/util.js +2 -0
  560. package/es/ts-types/component/util.js.map +1 -0
  561. package/es/ts-types/customElement.d.ts +2 -0
  562. package/es/ts-types/customElement.js.map +1 -1
  563. package/es/ts-types/events.d.ts +108 -83
  564. package/es/ts-types/events.js.map +1 -1
  565. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  566. package/es/ts-types/list-table/define/chart-define.d.ts +1 -1
  567. package/es/ts-types/list-table/define/chart-define.js.map +1 -1
  568. package/es/ts-types/list-table/layout-map/api.d.ts +4 -2
  569. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  570. package/es/ts-types/new-data-set.d.ts +19 -5
  571. package/es/ts-types/new-data-set.js +2 -2
  572. package/es/ts-types/new-data-set.js.map +1 -1
  573. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
  574. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +4 -0
  575. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
  576. package/es/ts-types/pivot-table/corner.d.ts +3 -3
  577. package/es/ts-types/pivot-table/corner.js.map +1 -1
  578. package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  579. package/es/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
  580. package/es/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
  581. package/es/ts-types/pivot-table/indicator/index.d.ts +1 -0
  582. package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
  583. package/es/ts-types/pivot-table/title.d.ts +1 -1
  584. package/es/ts-types/pivot-table/title.js.map +1 -1
  585. package/es/ts-types/table-engine.d.ts +27 -3
  586. package/es/ts-types/table-engine.js.map +1 -1
  587. package/es/ts-types/theme.d.ts +5 -0
  588. package/es/ts-types/theme.js.map +1 -1
  589. package/package.json +16 -10
  590. package/cjs/chartType.js +0 -14
  591. package/cjs/chartType.js.map +0 -1
  592. package/cjs/menu/dom/BaseMenu.js.map +0 -1
  593. package/cjs/menu/dom/Menu.js.map +0 -1
  594. package/cjs/menu/dom/MenuHandler.js.map +0 -1
  595. package/cjs/menu/dom/logic/MenuContainer.js.map +0 -1
  596. package/cjs/menu/dom/logic/MenuElement.js.map +0 -1
  597. package/cjs/menu/dom/logic/MenuElementStyle.js.map +0 -1
  598. package/cjs/plugins/chartTypes.js.map +0 -1
  599. package/cjs/scenegraph/layout/auto-width.d.ts +0 -2
  600. package/cjs/scenegraph/layout/auto-width.js +0 -85
  601. package/cjs/scenegraph/layout/auto-width.js.map +0 -1
  602. package/cjs/tooltip/BaseTooltip.js.map +0 -1
  603. package/cjs/tooltip/Tooltip.js.map +0 -1
  604. package/cjs/tooltip/TooltipHandler.js.map +0 -1
  605. package/cjs/tooltip/logic/BubbleTooltipElement.js.map +0 -1
  606. package/cjs/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
  607. package/es/chartType.js.map +0 -1
  608. package/es/menu/dom/BaseMenu.js.map +0 -1
  609. package/es/menu/dom/Menu.js.map +0 -1
  610. package/es/menu/dom/MenuHandler.js.map +0 -1
  611. package/es/menu/dom/logic/MenuContainer.js.map +0 -1
  612. package/es/menu/dom/logic/MenuElement.js.map +0 -1
  613. package/es/menu/dom/logic/MenuElementStyle.js.map +0 -1
  614. package/es/plugins/chartTypes.js +0 -2
  615. package/es/plugins/chartTypes.js.map +0 -1
  616. package/es/scenegraph/layout/auto-width.d.ts +0 -2
  617. package/es/scenegraph/layout/auto-width.js +0 -82
  618. package/es/scenegraph/layout/auto-width.js.map +0 -1
  619. package/es/tooltip/BaseTooltip.js.map +0 -1
  620. package/es/tooltip/Tooltip.js.map +0 -1
  621. package/es/tooltip/TooltipHandler.js.map +0 -1
  622. package/es/tooltip/logic/BubbleTooltipElement.js.map +0 -1
  623. package/es/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
  624. /package/cjs/{chartType.d.ts → chartModule.d.ts} +0 -0
  625. /package/cjs/{menu → components/menu}/dom/BaseMenu.js +0 -0
  626. /package/cjs/{menu → components/menu}/dom/Menu.d.ts +0 -0
  627. /package/cjs/{menu → components/menu}/dom/Menu.js +0 -0
  628. /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
  629. /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
  630. /package/cjs/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
  631. /package/cjs/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
  632. /package/cjs/{tooltip → components/tooltip}/Tooltip.js +0 -0
  633. /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
  634. /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
  635. /package/cjs/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
  636. /package/es/{chartType.d.ts → chartModule.d.ts} +0 -0
  637. /package/es/{menu → components/menu}/dom/BaseMenu.js +0 -0
  638. /package/es/{menu → components/menu}/dom/Menu.d.ts +0 -0
  639. /package/es/{menu → components/menu}/dom/Menu.js +0 -0
  640. /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
  641. /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
  642. /package/es/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
  643. /package/es/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
  644. /package/es/{tooltip → components/tooltip}/Tooltip.js +0 -0
  645. /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
  646. /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
  647. /package/es/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+CAA4C;AAC5C,sEAAkE;AAClE,wEAAoE;AACpE,yDAAqD;AACrD,sCAA2C;AAC3C,oDAAuD;AACvD,mEAA8D;AAC9D,mEAA8D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,GAAG,EAAE,SAAS,CAAC,CAAC;iBAChE;gBACD,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;gBACpD,OAAO,SAAS,CAAC;aAClB;YACD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;YACrE,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;YACpD,OAAO,SAAS,CAAC;SAClB;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QACrE,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACpD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAlnBD,gCAknBC;AAED,SAAS,cAAc,CAAC,cAAqB,EAAE,GAAW;IACxD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,cAAc,CAAC,GAAG,KAAK,GAAG,EAAE;QAC9B,OAAO,cAAc,CAAC;KACvB;SAAM,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,EAAE;QACnC,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;KAC3D;IACD,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC","file":"proxy.js","sourcesContent":["import type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { emptyGroup } from '../../utils/empty-group';\nimport { createColGroup } from '../column';\nimport { createComplexColumn } from '../column-helper';\nimport { dynamicSetX } from './update-position/dynamic-set-x';\nimport { dynamicSetY } from './update-position/dynamic-set-y';\nimport { updateAutoRow } from './update-position/update-auto-row';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n mode: 'column' | 'row' | 'pivot' = 'column';\n\n rowLimit = 1000;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n\n colLimit = 1000;\n bodyLeftCol: number; // table body部分的第一列col number\n bodyRightCol: number; // table body部分的最后一列col number\n totalCol: number; // 渐进完成最后一列的col number\n colStart: number; // 当前维护的部分第一列的col number\n colEnd: number; // 当前维护的部分最后一列的col number\n taskColCount: number; // 一次任务生成/更新的col count\n xLimitLeft: number; // x > xLimitLeft动态更新,否则直接修改xy\n xLimitRight: number; // x < xLimitRight动态更新,否则直接修改xy\n screenColCount: number; // 预计屏幕范围内显示的col count\n firstScreenColLimit: number; // 首屏同步加载部分最后一列的col number\n colUpdatePos: number; // 异步任务目前更新到的列的col number\n currentCol: number; // 目前渐进生成的col number\n referenceCol: number; // 当前维护的部分中间一列的col number,认为referenceCol对应当前屏幕显示范围的第一列\n screenLeftCol: number = 0; // 当前屏幕范围内显示的第一列的col number\n colUpdateDirection: 'left' | 'right'; // 当前列更新方向\n\n cellCache: Map<number, Group> = new Map(); // 单元格位置快速查找缓存\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n\n if (this.table.internalProps.transpose) {\n this.mode = 'row';\n } else if (this.table.isPivotTable()) {\n this.mode = 'pivot';\n }\n if (this.table.options.maintainedDataCount) {\n this.rowLimit = this.table.options.maintainedDataCount;\n }\n }\n\n setParamsForColumn() {\n this.bodyLeftCol = this.table.rowHeaderLevelCount;\n this.bodyRightCol = this.table.colCount - 1;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\n\n // 确定动态更新限制\n const totalBodyWidth = defaultColWidth * totalActualBodyColCount;\n const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);\n this.xLimitLeft = totalBodyWidth / 2;\n this.xLimitRight = totalWidth - totalBodyWidth / 2;\n\n // 确定首屏高度范围\n const widthLimit = this.table.tableNoFrameWidth * 5;\n this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);\n this.firstScreenColLimit = this.bodyLeftCol + Math.ceil(widthLimit / defaultColWidth);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.colUpdatePos = this.bodyRightCol;\n }\n\n setParamsForRow() {\n this.bodyTopRow = this.table.columnHeaderLevelCount;\n this.bodyBottomRow = this.table.rowCount - 1;\n this.bodyLeftCol = 0;\n this.bodyRightCol = this.table.colCount - 1;\n\n // 计算渐进加载数量\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n this.rowStart = this.bodyTopRow;\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\n\n // 确定动态更新限制\n const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;\n const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);\n this.yLimitTop = totalBodyHeight / 2;\n this.yLimitBottom = totalHeight - totalBodyHeight / 2;\n // this.bottomOffset = totalHeight - totalBodyHeight / 2;\n\n // 确定首屏高度范围\n const heightLimit = this.table.tableNoFrameHeight * 5;\n this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);\n this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.rowUpdatePos = this.bodyBottomRow;\n }\n\n async createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number\n ) {\n // compute parameters\n this.setParamsForRow();\n this.setParamsForColumn();\n\n // compute colums width in first screen\n this.table.internalProps._colWidthsMap.clear();\n this.table._clearColRangeWidthsMap();\n computeColsWidth(this.table, 0, Math.min(this.firstScreenColLimit, this.table.colCount - 1));\n\n // compute rows height in first screen\n this.table.internalProps._rowHeightsMap.clear();\n this.table._clearRowRangeHeightsMap();\n computeRowsHeight(this.table, 0, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1));\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n this.table.scenegraph.colHeaderGroup.setAttribute('x', this.table.getFrozenColsWidth());\n this.table.scenegraph.rowHeaderGroup.setAttribute('y', this.table.getFrozenRowsHeight());\n this.table.scenegraph.bodyGroup.setAttributes({\n x: this.table.getFrozenColsWidth(),\n y: this.table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n this.table.rowHeaderLevelCount - 1, // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'cornerHeader', // CellType\n this.table\n );\n\n // create colHeaderGroup\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n this.table.rowHeaderLevelCount, // colStart\n Math.min(this.firstScreenColLimit, this.table.colCount - 1), // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n\n // create rowHeaderGroup\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n this.table.rowHeaderLevelCount - 1, // colEnd\n this.table.columnHeaderLevelCount, // rowStart\n Math.min(this.firstScreenRowLimit, this.table.rowCount - 1), // rowEnd\n 'rowHeader', // isHeader\n this.table\n );\n\n // create bodyGroup\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n this.table.rowHeaderLevelCount, // colStart\n Math.min(this.firstScreenColLimit, this.table.colCount - 1), // colEnd\n this.table.columnHeaderLevelCount, // rowStart\n Math.min(this.firstScreenRowLimit, this.table.rowCount - 1), // rowEnd\n 'body', // isHeader\n this.table\n );\n\n // update progress information\n if (!bodyGroup.firstChild) {\n // 无数据\n this.currentRow = this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2);\n\n this.currentCol = this.totalCol;\n this.colEnd = this.currentCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((this.colEnd - this.colStart) / 2);\n } else {\n this.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2);\n\n this.currentCol = (bodyGroup.lastChild as Group)?.col ?? this.totalCol;\n this.colEnd = this.currentCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((this.colEnd - this.colStart) / 2);\n\n // 开始异步任务\n await this.progress();\n }\n }\n\n async createColGroupForFirstScreen(\n rowHeaderGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n table: BaseTableAPI\n ) {\n this.setParamsForRow();\n this.setParamsForColumn();\n\n // compute row height in first screen\n computeRowsHeight(table, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, table.rowCount - 1));\n\n // 生成首屏单元格\n // rowHeader\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.rowHeaderLevelCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table,\n this.firstScreenRowLimit\n );\n // body\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount, // colStart\n table.colCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table,\n this.firstScreenRowLimit\n );\n\n // 更新row信息\n if (!bodyGroup.firstChild) {\n // 无数据\n this.currentRow = this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);\n } else {\n this.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);\n // 开始异步任务\n await this.progress();\n }\n }\n\n // async progress() {\n // if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // // 先更新\n // await this.updateCellGroupsAsync();\n // await this.progress();\n // } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // // 先更新没有需要更新的节点,在生成新节点\n // await this.createRow();\n // await this.progress();\n // }\n // }\n async progress() {\n return new Promise<void>((resolve, reject) => {\n setTimeout(async () => {\n if (this.colUpdatePos < this.colEnd) {\n await this.updateColCellGroupsAsync();\n await this.progress();\n } else if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // 先更新\n await this.updateRowCellGroupsAsync();\n await this.progress();\n } else if (this.currentCol < this.totalCol) {\n await this.createCol();\n await this.progress();\n } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // 先更新没有需要更新的节点,在生成新节点\n await this.createRow();\n await this.progress();\n }\n resolve();\n }, 0);\n });\n }\n\n async createRow() {\n if (!this.taskRowCount) {\n return;\n }\n console.log('createRow', this.currentRow, this.currentRow + this.taskRowCount);\n this.createRowCellGroup(this.taskRowCount);\n }\n\n async createCol() {\n if (!this.taskColCount) {\n return;\n }\n console.log('createCol', this.currentCol, this.currentCol + this.taskColCount);\n this.createColGroup(this.taskRowCount);\n }\n\n createRowCellGroup(onceCount: number) {\n const endRow = Math.min(this.totalRow, this.currentRow + onceCount);\n // compute rows height\n computeRowsHeight(this.table, this.currentRow + 1, endRow);\n\n // create row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = col < this.table.rowHeaderLevelCount ? 'rowHeader' : 'body';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.rowEnd = endRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n createColGroup(onceCount: number) {\n // compute rows height\n const endCol = Math.min(this.totalCol, this.currentCol + onceCount);\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bodyGroup\n createColGroup(\n this.table.scenegraph.bodyGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.rowStart, // rowStart\n this.rowEnd, // rowEnd\n 'body', // isHeader\n this.table\n );\n\n this.currentCol = endCol;\n this.colEnd = endCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);\n console.log('async', this.referenceCol, this.colStart, this.colEnd);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n if (y < this.yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > this.yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y);\n }\n }\n\n async setX(x: number) {\n if (x < this.xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > this.xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x);\n }\n }\n\n async dynamicSetY(y: number) {\n dynamicSetY(y, this);\n }\n async dynamicSetX(x: number) {\n dynamicSetX(x, this);\n }\n\n updateBody(y: number) {\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n }\n\n async updateRowCellGroupsAsync() {\n this.updateCellGroups(this.taskRowCount);\n }\n\n updateCellGroups(count: number) {\n const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);\n // console.log('updateCellGroups', this.rowUpdatePos, distRow);\n if (this.table.internalProps.autoRowHeight) {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow);\n }\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = this.rowUpdatePos; row <= distRow; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n this.updateCellGroupContent(cellGroup);\n }\n }\n\n if (this.table.internalProps.autoRowHeight) {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n }\n\n this.rowUpdatePos = distRow + 1;\n }\n\n async updateColCellGroupsAsync() {\n this.updateColGroups(this.taskRowCount);\n }\n\n updateColGroups(count: number) {\n const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);\n // console.log('updateCellGroups', this.colUpdatePos, distCol);\n for (let col = this.colUpdatePos; col <= distCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n if (colGroup) {\n // colGroup.forEachChildren((cellGroup: Group) => {\n // this.updateCellGroupContent(cellGroup);\n // });\n // for (let row = (colGroup.firstChild as Group).row; row <= (colGroup.lastChild as Group).row; row++) {\n // const cellGroup = this.highPerformanceGetCell(colGroup.col, row);\n // this.updateCellGroupContent(cellGroup);\n // }\n let cellGroup = colGroup.firstChild;\n while (cellGroup) {\n // this.updateCellGroupContent(cellGroup as Group);\n // cellGroup = cellGroup._next;\n const newCellGroup = this.updateCellGroupContent(cellGroup as Group);\n cellGroup = newCellGroup._next;\n }\n colGroup.needUpdate = false;\n }\n }\n this.colUpdatePos = distCol + 1;\n }\n\n updateCellGroupPosition(cellGroup: Group, newRow: number, y: number) {\n // 更新位置&row\n cellGroup.row = newRow;\n cellGroup.setAttribute('y', y);\n (cellGroup as any).needUpdate = true;\n (cellGroup as any).needUpdateForAutoRowHeight = true;\n }\n\n updateCellGroupContent(cellGroup: Group) {\n if (!cellGroup.needUpdate) {\n return cellGroup;\n }\n\n const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n // 更新内容\n // const textMark = cellGroup.firstChild as WrapText;\n // const autoWrapText = Array.isArray(textMark.attribute.text);\n // const textStr: string = this.table.getCellValue(cellGroup.col, cellGroup.row);\n // let text;\n // if (autoWrapText) {\n // text = String(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n // } else {\n // text = textStr;\n // }\n\n // textMark.setAttribute('text', text);\n\n cellGroup.needUpdate = false;\n return newCellGroup || cellGroup;\n }\n\n async sortCell() {\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = this.rowStart; row <= this.rowEnd; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n cellGroup.needUpdate = true;\n }\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (this.table.internalProps.autoRowHeight) {\n syncTopRow = this.rowStart;\n syncBottomRow = this.rowEnd;\n } else {\n syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - this.screenRowCount * 2);\n syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + this.screenRowCount * 3);\n }\n console.log('sort更新同步范围', syncTopRow, syncBottomRow);\n if (this.table.internalProps.autoRowHeight) {\n computeRowsHeight(this.table, syncTopRow, syncBottomRow);\n }\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n this.updateCellGroupContent(cellGroup);\n }\n }\n console.log('updateAutoRow', this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up');\n if (this.table.internalProps.autoRowHeight) {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n this.table,\n this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n this.rowUpdatePos = this.rowStart;\n this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up';\n\n if (\n this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow &&\n this.rowStart === this.table.scenegraph.proxy.bodyTopRow\n ) {\n // 全量更新,do nothing\n } else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {\n const totalHeight = this.table.getAllRowsHeight();\n const top = totalHeight - this.table.scenegraph.height;\n this.updateBody(top);\n } else if (this.rowStart === this.table.scenegraph.proxy.bodyTopRow) {\n this.updateBody(0);\n }\n\n if (!this.table.internalProps.autoRowHeight) {\n await this.progress();\n }\n }\n\n highPerformanceGetCell(\n col: number,\n row: number,\n rowStart: number = this.rowStart,\n rowEnd: number = this.rowEnd,\n getShadow?: boolean\n ) {\n if (row < rowStart || row > rowEnd) {\n return emptyGroup;\n }\n if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) {\n return emptyGroup;\n }\n if (this.cellCache.get(col)) {\n const cacheCellGoup = this.cellCache.get(col);\n if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {\n // 由缓存单元格向前后查找要快于从头查找\n let cellGroup = getCellByCache(cacheCellGoup, row);\n if (!cellGroup) {\n cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n }\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n}\n\nfunction getCellByCache(cacheCellGroup: Group, row: number): Group | null {\n if (!cacheCellGroup) {\n return null;\n }\n if (cacheCellGroup.row === row) {\n return cacheCellGroup;\n } else if (cacheCellGroup.row > row) {\n return getCellByCache(cacheCellGroup._prev as Group, row);\n }\n return getCellByCache(cacheCellGroup._next as Group, row);\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+CAA4C;AAC5C,sEAAkE;AAClE,wEAAoE;AACpE,yDAAqD;AACrD,sCAA2C;AAC3C,oDAAuD;AACvD,mFAA4E;AAC5E,mEAA8D;AAC9D,mEAA8D;AAC9D,uEAAkE;AAElE,MAAa,UAAU;IAwCrB,YAAY,KAAmB;QAtC/B,SAAI,GAA+B,QAAQ,CAAC;QAE5C,aAAQ,GAAG,IAAI,CAAC;QAChB,eAAU,GAAG,CAAC,CAAC;QAIf,aAAQ,GAAG,CAAC,CAAC;QACb,WAAM,GAAG,CAAC,CAAC;QACX,iBAAY,GAAG,CAAC,CAAC;QAQjB,iBAAY,GAAW,CAAC,CAAC;QAEzB,aAAQ,GAAG,IAAI,CAAC;QAchB,kBAAa,GAAW,CAAC,CAAC;QAG1B,cAAS,GAAuB,IAAI,GAAG,EAAE,CAAC;QAGxC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE;YACtC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;SACnB;aAAM,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE;YACpC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;SACrB;QAC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IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;YACpD,OAAO,SAAS,CAAC;SAClB;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QACrE,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACpD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAxkBD,gCAwkBC;AAED,SAAS,cAAc,CAAC,cAAqB,EAAE,GAAW;IACxD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,cAAc,CAAC,GAAG,KAAK,GAAG,EAAE;QAC9B,OAAO,cAAc,CAAC;KACvB;SAAM,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,EAAE;QACnC,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;KAC3D;IACD,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC","file":"proxy.js","sourcesContent":["import type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { emptyGroup } from '../../utils/empty-group';\nimport { createColGroup } from '../column';\nimport { createComplexColumn } from '../column-helper';\nimport { createGroupForFirstScreen } from './create-group-for-first-screen';\nimport { dynamicSetX } from './update-position/dynamic-set-x';\nimport { dynamicSetY } from './update-position/dynamic-set-y';\nimport { updateAutoRow } from './update-position/update-auto-row';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n mode: 'column' | 'row' | 'pivot' = 'column';\n\n rowLimit = 1000;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n\n colLimit = 1000;\n bodyLeftCol: number; // table body部分的第一列col number\n bodyRightCol: number; // table body部分的最后一列col number\n totalCol: number; // 渐进完成最后一列的col number\n colStart: number; // 当前维护的部分第一列的col number\n colEnd: number; // 当前维护的部分最后一列的col number\n taskColCount: number; // 一次任务生成/更新的col count\n xLimitLeft: number; // x > xLimitLeft动态更新,否则直接修改xy\n xLimitRight: number; // x < xLimitRight动态更新,否则直接修改xy\n screenColCount: number; // 预计屏幕范围内显示的col count\n firstScreenColLimit: number; // 首屏同步加载部分最后一列的col number\n colUpdatePos: number; // 异步任务目前更新到的列的col number\n currentCol: number; // 目前渐进生成的col number\n referenceCol: number; // 当前维护的部分中间一列的col number,认为referenceCol对应当前屏幕显示范围的第一列\n screenLeftCol: number = 0; // 当前屏幕范围内显示的第一列的col number\n colUpdateDirection: 'left' | 'right'; // 当前列更新方向\n\n cellCache: Map<number, Group> = new Map(); // 单元格位置快速查找缓存\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n\n if (this.table.internalProps.transpose) {\n this.mode = 'row';\n } else if (this.table.isPivotTable()) {\n this.mode = 'pivot';\n }\n if (this.table.options.maintainedDataCount) {\n this.rowLimit = this.table.options.maintainedDataCount;\n }\n }\n\n setParamsForColumn() {\n this.bodyLeftCol = this.table.rowHeaderLevelCount;\n // this.bodyRightCol = this.table.colCount - 1;\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\n\n // 确定动态更新限制\n const totalBodyWidth = defaultColWidth * totalActualBodyColCount;\n const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);\n this.xLimitLeft = totalBodyWidth / 2;\n this.xLimitRight = totalWidth - totalBodyWidth / 2;\n\n // 确定首屏高度范围\n const widthLimit = this.table.tableNoFrameWidth * 5;\n this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);\n this.firstScreenColLimit = this.bodyLeftCol + Math.ceil(widthLimit / defaultColWidth);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.colUpdatePos = this.bodyRightCol;\n }\n\n setParamsForRow() {\n this.bodyTopRow = this.table.columnHeaderLevelCount;\n this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;\n // this.bodyLeftCol = 0;\n // this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // 计算渐进加载数量\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n this.rowStart = this.bodyTopRow;\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\n\n // 确定动态更新限制\n const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;\n const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);\n this.yLimitTop = totalBodyHeight / 2;\n this.yLimitBottom = totalHeight - totalBodyHeight / 2;\n // this.bottomOffset = totalHeight - totalBodyHeight / 2;\n\n // 确定首屏高度范围\n const heightLimit = this.table.tableNoFrameHeight * 5;\n this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);\n this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.rowUpdatePos = this.bodyBottomRow;\n }\n\n async createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number\n ) {\n await createGroupForFirstScreen(\n cornerHeaderGroup,\n colHeaderGroup,\n rowHeaderGroup,\n rightFrozenGroup,\n bottomFrozenGroup,\n bodyGroup,\n xOrigin,\n yOrigin,\n this\n );\n }\n\n async createColGroupForFirstScreen(\n rowHeaderGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n table: BaseTableAPI\n ) {\n this.setParamsForRow();\n this.setParamsForColumn();\n\n // compute row height in first screen\n computeRowsHeight(table, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, table.rowCount - 1));\n\n // 生成首屏单元格\n // rowHeader\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.rowHeaderLevelCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table,\n this.firstScreenRowLimit\n );\n // body\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount, // colStart\n table.colCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table,\n this.firstScreenRowLimit\n );\n\n // 更新row信息\n if (!bodyGroup.firstChild) {\n // 无数据\n this.currentRow = this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);\n } else {\n this.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);\n // 开始异步任务\n await this.progress();\n }\n }\n\n // async progress() {\n // if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // // 先更新\n // await this.updateCellGroupsAsync();\n // await this.progress();\n // } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // // 先更新没有需要更新的节点,在生成新节点\n // await this.createRow();\n // await this.progress();\n // }\n // }\n async progress() {\n return new Promise<void>((resolve, reject) => {\n setTimeout(async () => {\n if (this.colUpdatePos < this.colEnd) {\n await this.updateColCellGroupsAsync();\n await this.progress();\n } else if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // 先更新\n await this.updateRowCellGroupsAsync();\n await this.progress();\n } else if (this.currentCol < this.totalCol) {\n await this.createCol();\n await this.progress();\n } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // 先更新没有需要更新的节点,在生成新节点\n await this.createRow();\n await this.progress();\n }\n resolve();\n }, 0);\n });\n }\n\n async createRow() {\n if (!this.taskRowCount) {\n return;\n }\n console.log('createRow', this.currentRow, this.currentRow + this.taskRowCount);\n this.createRowCellGroup(this.taskRowCount);\n }\n\n async createCol() {\n if (!this.taskColCount) {\n return;\n }\n console.log('createCol', this.currentCol, this.currentCol + this.taskColCount);\n this.createColGroup(this.taskRowCount);\n }\n\n createRowCellGroup(onceCount: number) {\n const endRow = Math.min(this.totalRow, this.currentRow + onceCount);\n // compute rows height\n computeRowsHeight(this.table, this.currentRow + 1, endRow);\n\n if (this.table.rowHeaderLevelCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = 0; col < this.table.rowHeaderLevelCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);\n }\n }\n\n if (this.table.rightFrozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);\n }\n }\n\n // create body row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'body';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.rowEnd = endRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n createColGroup(onceCount: number) {\n // compute rows height\n const endCol = Math.min(this.totalCol, this.currentCol + onceCount);\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bodyGroup\n createColGroup(\n this.table.scenegraph.bodyGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.rowStart, // rowStart\n this.rowEnd, // rowEnd\n 'body', // isHeader\n this.table\n );\n\n this.currentCol = endCol;\n this.colEnd = endCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);\n console.log('async', this.referenceCol, this.colStart, this.colEnd);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n if (y < this.yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > this.yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y);\n }\n }\n\n async setX(x: number) {\n if (x < this.xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > this.xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x);\n }\n }\n\n async dynamicSetY(y: number) {\n dynamicSetY(y, this);\n }\n async dynamicSetX(x: number) {\n dynamicSetX(x, this);\n }\n\n updateBody(y: number) {\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n }\n\n async updateRowCellGroupsAsync() {\n this.updateCellGroups(this.taskRowCount);\n }\n\n updateCellGroups(count: number) {\n const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);\n // console.log('updateCellGroups', this.rowUpdatePos, distRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow);\n }\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = this.rowUpdatePos; row <= distRow; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n this.updateCellGroupContent(cellGroup);\n }\n }\n\n if (this.table.heightMode === 'autoHeight') {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n }\n\n this.rowUpdatePos = distRow + 1;\n }\n\n async updateColCellGroupsAsync() {\n this.updateColGroups(this.taskRowCount);\n }\n\n updateColGroups(count: number) {\n const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);\n // console.log('updateCellGroups', this.colUpdatePos, distCol);\n for (let col = this.colUpdatePos; col <= distCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n if (colGroup) {\n // colGroup.forEachChildren((cellGroup: Group) => {\n // this.updateCellGroupContent(cellGroup);\n // });\n // for (let row = (colGroup.firstChild as Group).row; row <= (colGroup.lastChild as Group).row; row++) {\n // const cellGroup = this.highPerformanceGetCell(colGroup.col, row);\n // this.updateCellGroupContent(cellGroup);\n // }\n let cellGroup = colGroup.firstChild;\n while (cellGroup) {\n // this.updateCellGroupContent(cellGroup as Group);\n // cellGroup = cellGroup._next;\n const newCellGroup = this.updateCellGroupContent(cellGroup as Group);\n cellGroup = newCellGroup._next;\n }\n colGroup.needUpdate = false;\n }\n }\n this.colUpdatePos = distCol + 1;\n }\n\n updateCellGroupPosition(cellGroup: Group, newRow: number, y: number) {\n // 更新位置&row\n cellGroup.row = newRow;\n cellGroup.setAttribute('y', y);\n (cellGroup as any).needUpdate = true;\n (cellGroup as any).needUpdateForAutoRowHeight = true;\n }\n\n updateCellGroupContent(cellGroup: Group) {\n if (!cellGroup.needUpdate) {\n return cellGroup;\n }\n\n const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n // 更新内容\n // const textMark = cellGroup.firstChild as WrapText;\n // const autoWrapText = Array.isArray(textMark.attribute.text);\n // const textStr: string = this.table.getCellValue(cellGroup.col, cellGroup.row);\n // let text;\n // if (autoWrapText) {\n // text = String(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n // } else {\n // text = textStr;\n // }\n\n // textMark.setAttribute('text', text);\n\n cellGroup.needUpdate = false;\n return newCellGroup || cellGroup;\n }\n\n async sortCell() {\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = this.rowStart; row <= this.rowEnd; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n cellGroup.needUpdate = true;\n }\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (this.table.heightMode === 'autoHeight') {\n syncTopRow = this.rowStart;\n syncBottomRow = this.rowEnd;\n } else {\n syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - this.screenRowCount * 2);\n syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + this.screenRowCount * 3);\n }\n console.log('sort更新同步范围', syncTopRow, syncBottomRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, syncTopRow, syncBottomRow);\n }\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n this.updateCellGroupContent(cellGroup);\n }\n }\n console.log('updateAutoRow', this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up');\n if (this.table.heightMode === 'autoHeight') {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n this.table,\n this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n this.rowUpdatePos = this.rowStart;\n this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up';\n\n if (\n this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow &&\n this.rowStart === this.table.scenegraph.proxy.bodyTopRow\n ) {\n // 全量更新,do nothing\n } else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {\n const totalHeight = this.table.getAllRowsHeight();\n const top = totalHeight - this.table.scenegraph.height;\n this.updateBody(top);\n } else if (this.rowStart === this.table.scenegraph.proxy.bodyTopRow) {\n this.updateBody(0);\n }\n\n if (this.table.heightMode !== 'autoHeight') {\n await this.progress();\n }\n }\n\n highPerformanceGetCell(\n col: number,\n row: number,\n rowStart: number = this.rowStart,\n rowEnd: number = this.rowEnd,\n getShadow?: boolean\n ) {\n if (row < rowStart || row > rowEnd) {\n return emptyGroup;\n }\n if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) {\n return emptyGroup;\n }\n if (this.cellCache.get(col)) {\n const cacheCellGoup = this.cellCache.get(col);\n if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {\n // 由缓存单元格向前后查找要快于从头查找\n let cellGroup = getCellByCache(cacheCellGoup, row);\n if (!cellGroup) {\n cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n }\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n}\n\nfunction getCellByCache(cacheCellGroup: Group, row: number): Group | null {\n if (!cacheCellGroup) {\n return null;\n }\n if (cacheCellGroup.row === row) {\n return cacheCellGroup;\n } else if (cacheCellGroup.row > row) {\n return getCellByCache(cacheCellGroup._prev as Group, row);\n }\n return getCellByCache(cacheCellGroup._next as Group, row);\n}\n"]}
@@ -62,12 +62,12 @@ function moveCell(count, direction, screenTopRow, proxy) {
62
62
  }
63
63
  }
64
64
  const distStartRow = "up" === direction ? proxy.rowEnd + 1 : proxy.rowStart - count, distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowStart - 1, syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount);
65
- proxy.table.internalProps.autoRowHeight && (0, compute_row_height_1.computeRowsHeight)(proxy.table, syncTopRow, syncBottomRow);
65
+ "autoHeight" === proxy.table.heightMode && (0, compute_row_height_1.computeRowsHeight)(proxy.table, syncTopRow, syncBottomRow);
66
66
  for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
67
67
  const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);
68
68
  proxy.updateCellGroupContent(cellGroup);
69
69
  }
70
- proxy.table.internalProps.autoRowHeight && (0, update_auto_row_1.updateAutoRow)(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, direction),
70
+ "autoHeight" === proxy.table.heightMode && (0, update_auto_row_1.updateAutoRow)(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, direction),
71
71
  proxy.rowStart = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count,
72
72
  proxy.rowEnd = "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count,
73
73
  proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count,
@@ -85,9 +85,9 @@ function moveCell(count, direction, screenTopRow, proxy) {
85
85
  }));
86
86
  }
87
87
  let syncTopRow, syncBottomRow;
88
- proxy.table.internalProps.autoRowHeight ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount),
88
+ "autoHeight" === proxy.table.heightMode ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount),
89
89
  syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount)),
90
- console.log("更新同步范围", syncTopRow, syncBottomRow), proxy.table.internalProps.autoRowHeight && (0,
90
+ console.log("更新同步范围", syncTopRow, syncBottomRow), "autoHeight" === proxy.table.heightMode && (0,
91
91
  compute_row_height_1.computeRowsHeight)(proxy.table, syncTopRow, syncBottomRow),
92
92
  proxy.rowStart = distStartRow, proxy.rowEnd = distEndRow;
93
93
  for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
@@ -95,13 +95,13 @@ function moveCell(count, direction, screenTopRow, proxy) {
95
95
  proxy.updateCellGroupContent(cellGroup);
96
96
  }
97
97
  console.log("updateAutoRow", distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"),
98
- proxy.table.internalProps.autoRowHeight && (0, update_auto_row_1.updateAutoRow)(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"),
98
+ "autoHeight" === proxy.table.heightMode && (0, update_auto_row_1.updateAutoRow)(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"),
99
99
  proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count,
100
100
  proxy.totalRow = "up" === direction ? proxy.totalRow + count : proxy.totalRow - count,
101
101
  proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
102
102
  proxy.rowUpdatePos = proxy.rowStart, proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up",
103
103
  console.log("move total end proxy", proxy.rowStart, proxy.rowEnd), console.log("move total end cell", proxy.table.scenegraph.bodyGroup.firstChild.firstChild.row, proxy.table.scenegraph.bodyGroup.firstChild.lastChild.row),
104
- proxy.table.scenegraph.updateNextFrame(), proxy.table.internalProps.autoRowHeight || (yield proxy.progress());
104
+ proxy.table.scenegraph.updateNextFrame(), "autoHeight" !== proxy.table.heightMode && (yield proxy.progress());
105
105
  }
106
106
  }));
107
107
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/group-creater/progress/update-position/dynamic-set-y.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2EAAuE;AAEvE,uDAAkD;AAElD,SAAsB,WAAW,CAAC,CAAS,EAAE,KAAiB;;QAG5D,MAAM,SAAS,GAAI,KAAK,CAAC,KAAa,CAAC,cAAc,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAClH,IAAI,CAAC,SAAS,EAAE;YACd,OAAO;SACR;QACD,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC;QACnC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;QAClC,MAAM,QAAQ,GAAG,YAAY,GAAG,KAAK,CAAC,YAA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zC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE;gBAC5C,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;aACxB;SACF;IACH,CAAC;CAAA","file":"dynamic-set-y.js","sourcesContent":["import type { Group } from '../../../graphic/group';\nimport { computeRowsHeight } from '../../../layout/compute-row-height';\nimport type { SceneProxy } from '../proxy';\nimport { updateAutoRow } from './update-auto-row';\n\nexport async function dynamicSetY(y: number, proxy: SceneProxy) {\n // 计算变动row range\n // const screenTopRow = proxy.table.getRowAt(y).row;\n const screenTop = (proxy.table as any).getTargetRowAt(y + proxy.table.scenegraph.colHeaderGroup.attribute.height);\n if (!screenTop) {\n return;\n }\n const screenTopRow = screenTop.row;\n proxy.screenTopRow = screenTopRow;\n const deltaRow = screenTopRow - proxy.referenceRow;\n if (deltaRow > 0) {\n // 向下滚动,顶部cell group移到底部\n moveCell(deltaRow, 'up', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowEnd === proxy.table.scenegraph.proxy.bodyBottomRow) {\n // const totalHeight = proxy.table.getAllRowsHeight();\n // const top = totalHeight - proxy.table.scenegraph.height;\n // proxy.updateBody(top);\n // } else {\n // proxy.updateBody(y);\n // }\n } else if (deltaRow < 0) {\n // 向上滚动,底部cell group移到顶部\n moveCell(-deltaRow, 'down', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowStart === proxy.bodyTopRow) {\n // proxy.updateBody(0);\n // } else {\n // proxy.updateBody(y);\n // }\n } else {\n // 不改变row,更新body group范围\n proxy.updateBody(y);\n }\n\n proxy.table.scenegraph.updateNextFrame();\n}\n\nasync function moveCell(count: number, direction: 'up' | 'down', screenTopRow: number, proxy: SceneProxy) {\n // 限制count范围\n if (direction === 'up' && proxy.rowEnd + count > proxy.bodyBottomRow) {\n count = proxy.bodyBottomRow - proxy.rowEnd;\n } else if (direction === 'down' && proxy.rowStart - count < proxy.bodyTopRow) {\n count = proxy.rowStart - proxy.bodyTopRow;\n }\n\n // 两种更新模式\n // 1. count < rowEnd - rowStart:从顶/底部移动count数量的单元格到底/顶部\n // 2. count >= rowEnd - rowStart:整体移动到目标位置\n if (count < proxy.rowEnd - proxy.rowStart) {\n // 计算更新区域\n const startRow = direction === 'up' ? proxy.rowStart : proxy.rowEnd - count + 1;\n const endRow = direction === 'up' ? proxy.rowStart + count - 1 : proxy.rowEnd;\n // console.log('move', startRow, endRow, direction);\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n for (let row = startRow; row <= endRow; row++) {\n if (direction === 'up') {\n const cellGroup = colGroup.firstChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.lastChild as Group).row + 1,\n (colGroup.lastChild as Group).attribute.y + (colGroup.lastChild as Group).attribute.height\n );\n colGroup.appendChild(cellGroup);\n } else {\n const cellGroup = colGroup.lastChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.firstChild as Group).row - 1,\n (colGroup.firstChild as Group).attribute.y - cellGroup.attribute.height\n );\n colGroup.insertBefore(cellGroup, colGroup.firstChild);\n }\n }\n }\n const distStartRow = direction === 'up' ? proxy.rowEnd + 1 : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowStart - 1;\n\n // 更新同步范围\n const syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n const syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n if (proxy.table.internalProps.autoRowHeight) {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n if (proxy.table.internalProps.autoRowHeight) {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n direction\n );\n }\n\n proxy.rowStart = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n proxy.rowEnd = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = distStartRow;\n proxy.rowUpdateDirection = direction;\n console.log('move end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n await proxy.progress();\n } else {\n const distStartRow = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n const distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n colGroup?.forEachChildren((cellGroup: Group, index) => {\n // 这里使用colGroup变量而不是for proxy.rowStart to proxy.rowEndproxy.rowEnd是因为在更新内可能出现row号码重复的情况\n proxy.updateCellGroupPosition(\n cellGroup,\n direction === 'up' ? cellGroup.row + count : cellGroup.row - count,\n index === 0 // row === proxy.rowStart\n ? distStartRowY\n : (cellGroup._prev as Group).attribute.y + (cellGroup._prev as Group).attribute.height\n );\n });\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (proxy.table.internalProps.autoRowHeight) {\n syncTopRow = distStartRow;\n syncBottomRow = distEndRow;\n } else {\n syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n }\n console.log('更新同步范围', syncTopRow, syncBottomRow);\n if (proxy.table.internalProps.autoRowHeight) {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n proxy.rowStart = distStartRow;\n proxy.rowEnd = distEndRow;\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n console.log(\n 'updateAutoRow',\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up'\n );\n\n if (proxy.table.internalProps.autoRowHeight) {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = proxy.rowStart;\n proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up';\n console.log('move total end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move total end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n if (!proxy.table.internalProps.autoRowHeight) {\n await proxy.progress();\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/group-creater/progress/update-position/dynamic-set-y.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2EAAuE;AAEvE,uDAAkD;AAElD,SAAsB,WAAW,CAAC,CAAS,EAAE,KAAiB;;QAG5D,MAAM,SAAS,GAAI,KAAK,CAAC,KAAa,CAAC,cAAc,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAClH,IAAI,CAAC,SAAS,EAAE;YACd,OAAO;SACR;QACD,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC;QACnC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;QAClC,MAAM,QAAQ,GAAG,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QACnD,IAAI,QAAQ,GAAG,CAAC,EAAE;YAEhB,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;YAC9C,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAQrB;aAAM,IAAI,QAAQ,GAAG,CAAC,EAAE;YAEvB,QAAQ,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;YACjD,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAMrB;aAAM;YAEL,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SACrB;QAED,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;IAC3C,CAAC;CAAA;AApCD,kCAoCC;AAED,SAAe,QAAQ,CAAC,KAAa,EAAE,SAAwB,EAAE,YAAoB,EAAE,KAAiB;;QAEtG,IAAI,SAAS,KAAK,IAAI,IAAI,KAAK,CAAC,MAAM,GAAG,K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AK,CAAC,QAAQ,CAAC;YACpC,KAAK,CAAC,kBAAkB,GAAG,UAAU,GAAG,KAAK,CAAC,aAAa,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;YAClH,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAClE,OAAO,CAAC,GAAG,CACT,qBAAqB,EACpB,KAAK,CAAC,KAAa,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,EAClE,KAAK,CAAC,KAAa,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CACnE,CAAC;YAEF,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;YACzC,IAAI,KAAK,CAAC,KAAK,CAAC,UAAU,KAAK,YAAY,EAAE;gBAC3C,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;aACxB;SACF;IACH,CAAC;CAAA","file":"dynamic-set-y.js","sourcesContent":["import type { Group } from '../../../graphic/group';\nimport { computeRowsHeight } from '../../../layout/compute-row-height';\nimport type { SceneProxy } from '../proxy';\nimport { updateAutoRow } from './update-auto-row';\n\nexport async function dynamicSetY(y: number, proxy: SceneProxy) {\n // 计算变动row range\n // const screenTopRow = proxy.table.getRowAt(y).row;\n const screenTop = (proxy.table as any).getTargetRowAt(y + proxy.table.scenegraph.colHeaderGroup.attribute.height);\n if (!screenTop) {\n return;\n }\n const screenTopRow = screenTop.row;\n proxy.screenTopRow = screenTopRow;\n const deltaRow = screenTopRow - proxy.referenceRow;\n if (deltaRow > 0) {\n // 向下滚动,顶部cell group移到底部\n moveCell(deltaRow, 'up', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowEnd === proxy.table.scenegraph.proxy.bodyBottomRow) {\n // const totalHeight = proxy.table.getAllRowsHeight();\n // const top = totalHeight - proxy.table.scenegraph.height;\n // proxy.updateBody(top);\n // } else {\n // proxy.updateBody(y);\n // }\n } else if (deltaRow < 0) {\n // 向上滚动,底部cell group移到顶部\n moveCell(-deltaRow, 'down', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowStart === proxy.bodyTopRow) {\n // proxy.updateBody(0);\n // } else {\n // proxy.updateBody(y);\n // }\n } else {\n // 不改变row,更新body group范围\n proxy.updateBody(y);\n }\n\n proxy.table.scenegraph.updateNextFrame();\n}\n\nasync function moveCell(count: number, direction: 'up' | 'down', screenTopRow: number, proxy: SceneProxy) {\n // 限制count范围\n if (direction === 'up' && proxy.rowEnd + count > proxy.bodyBottomRow) {\n count = proxy.bodyBottomRow - proxy.rowEnd;\n } else if (direction === 'down' && proxy.rowStart - count < proxy.bodyTopRow) {\n count = proxy.rowStart - proxy.bodyTopRow;\n }\n\n // 两种更新模式\n // 1. count < rowEnd - rowStart:从顶/底部移动count数量的单元格到底/顶部\n // 2. count >= rowEnd - rowStart:整体移动到目标位置\n if (count < proxy.rowEnd - proxy.rowStart) {\n // 计算更新区域\n const startRow = direction === 'up' ? proxy.rowStart : proxy.rowEnd - count + 1;\n const endRow = direction === 'up' ? proxy.rowStart + count - 1 : proxy.rowEnd;\n // console.log('move', startRow, endRow, direction);\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n for (let row = startRow; row <= endRow; row++) {\n if (direction === 'up') {\n const cellGroup = colGroup.firstChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.lastChild as Group).row + 1,\n (colGroup.lastChild as Group).attribute.y + (colGroup.lastChild as Group).attribute.height\n );\n colGroup.appendChild(cellGroup);\n } else {\n const cellGroup = colGroup.lastChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.firstChild as Group).row - 1,\n (colGroup.firstChild as Group).attribute.y - cellGroup.attribute.height\n );\n colGroup.insertBefore(cellGroup, colGroup.firstChild);\n }\n }\n }\n const distStartRow = direction === 'up' ? proxy.rowEnd + 1 : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowStart - 1;\n\n // 更新同步范围\n const syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n const syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n if (proxy.table.heightMode === 'autoHeight') {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n if (proxy.table.heightMode === 'autoHeight') {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n direction\n );\n }\n\n proxy.rowStart = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n proxy.rowEnd = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = distStartRow;\n proxy.rowUpdateDirection = direction;\n console.log('move end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n await proxy.progress();\n } else {\n const distStartRow = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n const distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n colGroup?.forEachChildren((cellGroup: Group, index) => {\n // 这里使用colGroup变量而不是for proxy.rowStart to proxy.rowEndproxy.rowEnd是因为在更新内可能出现row号码重复的情况\n proxy.updateCellGroupPosition(\n cellGroup,\n direction === 'up' ? cellGroup.row + count : cellGroup.row - count,\n index === 0 // row === proxy.rowStart\n ? distStartRowY\n : (cellGroup._prev as Group).attribute.y + (cellGroup._prev as Group).attribute.height\n );\n });\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (proxy.table.heightMode === 'autoHeight') {\n syncTopRow = distStartRow;\n syncBottomRow = distEndRow;\n } else {\n syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n }\n console.log('更新同步范围', syncTopRow, syncBottomRow);\n if (proxy.table.heightMode === 'autoHeight') {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n proxy.rowStart = distStartRow;\n proxy.rowEnd = distEndRow;\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n console.log(\n 'updateAutoRow',\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up'\n );\n\n if (proxy.table.heightMode === 'autoHeight') {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = proxy.rowStart;\n proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up';\n console.log('move total end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move total end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n if (proxy.table.heightMode !== 'autoHeight') {\n await proxy.progress();\n }\n }\n}\n"]}
@@ -33,7 +33,6 @@ const ts_types_1 = require("../../ts-types"), calc = __importStar(require("../..
33
33
 
34
34
  function computeColsWidth(table, colStart, colEnd, update) {
35
35
  var _a, _b, _c, _d;
36
- "undefined" != typeof window && window.performance.now();
37
36
  colStart = null != colStart ? colStart : 0, colEnd = null != colEnd ? colEnd : table.colCount - 1,
38
37
  0 === colStart && colEnd === table.colCount - 1 && table._clearColRangeWidthsMap();
39
38
  const oldColWidths = [];
@@ -59,7 +58,7 @@ function computeColsWidth(table, colStart, colEnd, update) {
59
58
  colWidth = col === table.colCount - 1 ? totalDrawWidth - table.getColsWidth(0, table.colCount - 2) : Math.round(table.getColWidth(col) * factor),
60
59
  table.setColWidth(col, colWidth, !1, !0);
61
60
  }
62
- } else if ("standard-aeolus" === table.widthMode && table.internalProps.transpose) {
61
+ } else if (table.autoFillWidth) {
63
62
  table._clearColRangeWidthsMap();
64
63
  const canvasWidth = table.tableNoFrameWidth;
65
64
  let actualWidth = 0, actualHeaderWidth = 0;
@@ -80,33 +79,42 @@ function computeColsWidth(table, colStart, colEnd, update) {
80
79
 
81
80
  function computeColWidth(col, startRow, endRow, table, forceCompute) {
82
81
  var _a, _b;
83
- const {layoutMap: layoutMap, transpose: transpose} = table.internalProps, {width: width} = (null === (_a = layoutMap.columnWidths) || void 0 === _a ? void 0 : _a[col]) || {};
82
+ const {layoutMap: layoutMap, transpose: transpose} = table.internalProps, {width: width} = null !== (_a = null == layoutMap ? void 0 : layoutMap.getColumnWidthDefined(col)) && void 0 !== _a ? _a : {};
84
83
  if (transpose) {
85
- if ("standard" === table.widthMode) return table.isRowHeader(col, 0) || table.isCornerHeader(col, 0) ? Array.isArray(table.defaultHeaderColWidth) ? null !== (_b = table.defaultHeaderColWidth[col]) && void 0 !== _b ? _b : table.defaultColWidth : table.defaultHeaderColWidth : table.defaultColWidth;
86
- if (("standard-aeolus" === table.widthMode || "adaptive" === table.widthMode) && 0 === col && "auto" !== width && ((null == layoutMap ? void 0 : layoutMap.showColumnHeader) || (null == layoutMap ? void 0 : layoutMap.showHeader))) {
84
+ if ("standard" === table.widthMode) {
85
+ if (table.isRowHeader(col, 0) || table.isCornerHeader(col, 0)) return Array.isArray(table.defaultHeaderColWidth) ? null !== (_b = table.defaultHeaderColWidth[col]) && void 0 !== _b ? _b : table.defaultColWidth : table.defaultHeaderColWidth;
86
+ if ("auto" !== width) return "string" == typeof width ? calc.toPx(width, table.internalProps.calcWidthContext) : width || table.defaultColWidth;
87
+ } else if ("adaptive" === table.widthMode && 0 === col && "auto" !== width && (null == layoutMap ? void 0 : layoutMap.showHeader)) {
87
88
  if ("string" == typeof width) return calc.toPx(width, table.internalProps.calcWidthContext);
88
89
  if (width) return width;
89
90
  }
90
91
  } else if ("auto" !== width && "autoWidth" !== table.widthMode && !forceCompute) return "string" == typeof width ? calc.toPx(width, table.internalProps.calcWidthContext) : width || table.getColWidth(col);
91
- return computeAutoColWidth(col, startRow, endRow, forceCompute, table);
92
+ return computeAutoColWidth(width, col, startRow, endRow, forceCompute, table);
92
93
  }
93
94
 
94
- function computeAutoColWidth(col, startRow, endRow, forceCompute, table) {
95
- var _a, _b, _c, _d;
95
+ function computeAutoColWidth(widthDeifne, col, startRow, endRow, forceCompute, table) {
96
+ var _a, _b, _c, _d, _e;
96
97
  let maxWidth = 0, deltaRow = 1;
97
- endRow - startRow > 5e3 && (deltaRow = Math.ceil((endRow - startRow) / 5e3));
98
+ if (endRow - startRow > 5e3 && (deltaRow = Math.ceil((endRow - startRow) / 5e3)),
99
+ table.isPivotChart() && col >= table.rowHeaderLevelCount) {
100
+ if (table.internalProps.layoutMap.indicatorsAsCol) return table.defaultColWidth;
101
+ {
102
+ const optimunWidth = table.internalProps.layoutMap.getOptimunWidthForChart(col);
103
+ if (optimunWidth > 0) return optimunWidth;
104
+ }
105
+ }
98
106
  for (let row = startRow; row <= endRow; row += deltaRow) {
99
107
  const customWidth = computeCustomRenderWidth(col, row, table);
100
108
  if ("number" == typeof customWidth) {
101
109
  maxWidth = Math.max(customWidth, maxWidth);
102
110
  continue;
103
111
  }
104
- const indicatorWidth = computeIndicatorWidth(col, row, forceCompute, table);
105
- if ("number" == typeof indicatorWidth) {
112
+ const indicatorWidth = widthDeifne;
113
+ if ("number" == typeof indicatorWidth && "standard" === table.widthMode) {
106
114
  maxWidth = Math.max(indicatorWidth, maxWidth);
107
115
  continue;
108
116
  }
109
- const cellType = table.isHeader(col, row) ? table._getHeaderLayoutMap(col, row).headerType : table.getBodyColumnType(col, row);
117
+ const cellType = table.isHeader(col, row) ? null === (_a = table._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.headerType : table.getBodyColumnType(col, row);
110
118
  if ("text" !== cellType && "link" !== cellType && "progressbar" !== cellType) {
111
119
  maxWidth = Math.max(maxWidth, table.getColWidth(col) || 0);
112
120
  continue;
@@ -115,13 +123,13 @@ function computeAutoColWidth(col, startRow, endRow, forceCompute, table) {
115
123
  const layoutMap = table.internalProps.layoutMap;
116
124
  if (layoutMap.isHeader(col, row)) {
117
125
  const hd = layoutMap.getHeader(col, row);
118
- if ("only-body" === (null === (_a = null == hd ? void 0 : hd.define) || void 0 === _a ? void 0 : _a.columnWidthComputeMode)) continue;
119
- (null == hd ? void 0 : hd.hierarchyLevel) && (cellHierarchyIndent = (null !== (_b = hd.hierarchyLevel) && void 0 !== _b ? _b : 0) * (null !== (_c = layoutMap.rowHierarchyIndent) && void 0 !== _c ? _c : 0));
126
+ if ("only-body" === (null === (_b = null == hd ? void 0 : hd.define) || void 0 === _b ? void 0 : _b.columnWidthComputeMode)) continue;
127
+ (null == hd ? void 0 : hd.hierarchyLevel) && (cellHierarchyIndent = (null !== (_c = hd.hierarchyLevel) && void 0 !== _c ? _c : 0) * (null !== (_d = layoutMap.rowHierarchyIndent) && void 0 !== _d ? _d : 0));
120
128
  } else {
121
129
  const define = table.getBodyColumnDefine(col, row);
122
130
  if (null == define ? void 0 : define.tree) {
123
131
  const indexArr = table.dataSource.getIndexKey(table.getRecordIndexByRow(col, row));
124
- cellHierarchyIndent = Array.isArray(indexArr) && table.getHierarchyState(col, row) !== ts_types_1.HierarchyState.none ? (indexArr.length - 1) * (null !== (_d = layoutMap.hierarchyIndent) && void 0 !== _d ? _d : 0) : 0;
132
+ cellHierarchyIndent = Array.isArray(indexArr) && table.getHierarchyState(col, row) !== ts_types_1.HierarchyState.none ? (indexArr.length - 1) * (null !== (_e = layoutMap.hierarchyIndent) && void 0 !== _e ? _e : 0) : 0;
125
133
  }
126
134
  }
127
135
  const textWidth = computeTextWidth(col, row, table);
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/layout/compute-col-width.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,6CAA8D;AAC9D,uDAAyC;AACzC,2CAA0D;AAC1D,8CAAgD;AAChD,gDAA4C;AAG5C,SAAgB,gBAAgB,CAAC,KAAmB,EA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E;gBACvF,QAAQ;gBACR,UAAU;aACX,CAAC,CAAC,KAAK,CAAC;YACT,QAAQ,GAAG,IAAI,CAAC,GAAG,CAEjB,CAAC,KAAK,GAAG,YAAY,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,EAChD,QAAQ,CACT,CAAC;QACJ,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,QAAQ,GAAG,IAAI,CAAC,GAAG,CAEjB,CAAC,YAAY,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,EACxC,QAAQ,CACT,CAAC;KACH;IAED,IAAI,KAAK,CAAC,aAAa,CAAC,iBAAiB,KAAK,KAAK,EAAE;QACnD,QAAQ,GAAG,IAAI,CAAC,GAAG,CACjB,OAAO,KAAK,CAAC,aAAa,CAAC,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,EACvG,QAAQ,CACT,CAAC;KACH;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAgB,WAAW,CAAC,GAAW,EAAE,GAAW,EAAE,KAAmB;IACvE,OAAO;QACL,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;QAC7B,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;QAC/B,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;QAC7B,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;KAChC,CAAC;AACJ,CAAC;AATD,kCASC","file":"compute-col-width.js","sourcesContent":["import type { SimpleHeaderLayoutMap } from '../../layout';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport type { TextColumnDefine } from '../../ts-types';\nimport { HierarchyState, IconPosition } from '../../ts-types';\nimport * as calc from '../../tools/calc';\nimport { toFixed, validToString } from '../../tools/util';\nimport { getQuadProps } from '../utils/padding';\nimport { getProp } from '../utils/get-prop';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\nexport function computeColsWidth(table: BaseTableAPI, colStart?: number, colEnd?: number, update?: boolean): void {\n const time = typeof window !== 'undefined' ? window.performance.now() : 0;\n colStart = colStart ?? 0;\n colEnd = colEnd ?? table.colCount - 1;\n // table._clearColRangeWidthsMap();\n // clear colRangeWidthsMap\n if (colStart === 0 && colEnd === table.colCount - 1) {\n table._clearColRangeWidthsMap();\n // } else {\n // for (let col = colStart; col <= colEnd; col++) {\n // table._clearColRangeWidthsMap(col);\n // }\n }\n\n const oldColWidths = [];\n if (update) {\n for (let col = 0; col < table.colCount; col++) {\n oldColWidths.push(table.getColWidth(col));\n }\n }\n for (let col = colStart; col <= colEnd; col++) {\n let maxWidth;\n if (\n !table.internalProps.transpose &&\n table.internalProps.layoutMap.columnWidths?.[col]?.columnWidthComputeMode === 'only-header' &&\n 'showHeader' in table.internalProps.layoutMap\n ) {\n const temp = table.internalProps.layoutMap.showHeader;\n table.internalProps.layoutMap.showHeader = true;\n maxWidth = computeColWidth(col, 0, table.internalProps.layoutMap.headerLevelCount, table, false);\n table.internalProps.layoutMap.showHeader = temp;\n } else if (\n !table.internalProps.transpose &&\n table.internalProps.layoutMap.columnWidths?.[col]?.columnWidthComputeMode === 'only-body'\n ) {\n maxWidth = computeColWidth(\n col,\n table.internalProps.layoutMap.getBodyRange().start.row,\n table.internalProps.layoutMap.getBodyRange().end.row,\n table,\n false\n );\n } else {\n maxWidth = computeColWidth(col, 0, table.rowCount - 1, table, false);\n }\n\n table._setColContentWidth(col, maxWidth);\n\n const oldWidth = table.getColWidth(col);\n if (oldWidth !== maxWidth) {\n table._clearColRangeWidthsMap(col);\n }\n table.setColWidth(col, maxWidth, false, true);\n }\n // 处理adaptive宽度\n if (table.widthMode === 'adaptive') {\n table._clearColRangeWidthsMap();\n // const canvasWidth = table.internalProps.canvas.width;\n const totalDrawWidth = table.tableNoFrameWidth;\n let actualWidth = 0;\n for (let col = 0; col < table.colCount; col++) {\n actualWidth += table.getColWidth(col);\n }\n const factor = totalDrawWidth / actualWidth;\n for (let col = 0; col < table.colCount; col++) {\n let colWidth;\n if (col === table.colCount - 1) {\n colWidth = totalDrawWidth - table.getColsWidth(0, table.colCount - 2);\n } else {\n colWidth = Math.round(table.getColWidth(col) * factor);\n }\n table.setColWidth(col, colWidth, false, true);\n }\n } else if (table.widthMode === 'standard-aeolus' && table.internalProps.transpose) {\n // 处理风神列宽特殊逻辑\n table._clearColRangeWidthsMap();\n const canvasWidth = table.tableNoFrameWidth;\n let actualWidth = 0;\n let actualHeaderWidth = 0;\n for (let col = 0; col < table.colCount; col++) {\n const colWidth = table.getColWidth(col);\n if (col < table.frozenColCount) {\n actualHeaderWidth += colWidth;\n }\n\n actualWidth += colWidth;\n }\n\n // 如果内容宽度小于canvas宽度,执行adaptive放大\n if (actualWidth < canvasWidth && actualWidth - actualHeaderWidth > 0) {\n const factor = (canvasWidth - actualHeaderWidth) / (actualWidth - actualHeaderWidth);\n for (let col = table.frozenColCount; col < table.colCount; col++) {\n table.setColWidth(col, table.getColWidth(col) * factor, false, true);\n }\n }\n }\n // console.log('computeColsWidth time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time);\n\n if (update) {\n for (let col = 0; col < table.colCount; col++) {\n const newColWidth = table.getColWidth(col);\n if (newColWidth !== oldColWidths[col]) {\n // update the column width in scenegraph\n table.scenegraph.updateColWidth(col, newColWidth - oldColWidths[col]);\n }\n }\n }\n}\n\n/**\n * @description: 计算列宽\n * @param {number} col\n * @param {number} startRow\n * @param {number} endRow\n * @param {BaseTableAPI} table\n * @param {boolean} forceCompute\n * @return {*}\n */\nexport function computeColWidth(\n col: number,\n startRow: number,\n endRow: number,\n table: BaseTableAPI,\n forceCompute: boolean\n): number {\n const { layoutMap, transpose } = table.internalProps;\n // const ctx = _getInitContext.call(table);\n const { width } = layoutMap.columnWidths?.[col] || {};\n\n if (transpose) {\n // 转置模式\n if (table.widthMode === 'standard') {\n // return table.getColWidth(col);\n // standard模式使用默认值\n if (table.isRowHeader(col, 0) || table.isCornerHeader(col, 0)) {\n return Array.isArray(table.defaultHeaderColWidth)\n ? table.defaultHeaderColWidth[col] ?? table.defaultColWidth\n : table.defaultHeaderColWidth;\n }\n return table.defaultColWidth;\n } else if (\n (table.widthMode === 'standard-aeolus' || table.widthMode === 'adaptive') &&\n col === 0 &&\n width !== 'auto' &&\n ((layoutMap as PivotHeaderLayoutMap)?.showColumnHeader || (layoutMap as SimpleHeaderLayoutMap)?.showHeader)\n ) {\n // ToBeFixed hack逻辑,转置第一列列宽为header[0]\n if (typeof width === 'string') {\n return calc.toPx(width, table.internalProps.calcWidthContext);\n } else if (width) {\n return width;\n }\n }\n // autoWidth adaptive standard-aeolus 需要计算内容宽度\n // do nothing\n } else if (width !== 'auto' && table.widthMode !== 'autoWidth' && !forceCompute) {\n // if (width && (typeof width === 'string' || width > 0)) return width;\n if (typeof width === 'string') {\n return calc.toPx(width, table.internalProps.calcWidthContext);\n } else if (width) {\n return width;\n }\n //是透视表的行表头部分 则宽度按defaultHeaderColWidth设置\n return table.getColWidth(col);\n }\n\n return computeAutoColWidth(col, startRow, endRow, forceCompute, table);\n}\n\n/**\n * @description: 计算width: auto情况下的列宽\n * @param {number} col\n * @param {number} startRow\n * @param {number} endRow\n * @param {boolean} forceCompute\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeAutoColWidth(\n col: number,\n startRow: number,\n endRow: number,\n forceCompute: boolean,\n table: BaseTableAPI\n): number {\n // 处理 auto width\n let maxWidth = 0;\n let deltaRow = 1;\n if (endRow - startRow > 5000) {\n // 超过5000行启动列宽自动计算采样\n deltaRow = Math.ceil((endRow - startRow) / 5000);\n }\n for (let row = startRow; row <= endRow; row += deltaRow) {\n // 先判断CustomRender\n const customWidth = computeCustomRenderWidth(col, row, table);\n if (typeof customWidth === 'number') {\n maxWidth = Math.max(customWidth, maxWidth);\n continue;\n }\n\n // 判断透视表如果在指标\n const indicatorWidth = computeIndicatorWidth(col, row, forceCompute, table);\n if (typeof indicatorWidth === 'number') {\n maxWidth = Math.max(indicatorWidth, maxWidth);\n continue;\n }\n\n const cellType = table.isHeader(col, row)\n ? table._getHeaderLayoutMap(col, row).headerType\n : table.getBodyColumnType(col, row);\n if (cellType !== 'text' && cellType !== 'link' && cellType !== 'progressbar') {\n // text&link&progressbar测量文字宽度\n // image&video&sparkline使用默认宽度\n maxWidth = Math.max(maxWidth, table.getColWidth(col) || 0);\n continue;\n }\n\n // 处理树形展开\n let cellHierarchyIndent = 0;\n const layoutMap = table.internalProps.layoutMap;\n //判断是否为表头\n if (layoutMap.isHeader(col, row)) {\n const hd = layoutMap.getHeader(col, row);\n // 如果某级表头设置了only-body,在计算表头内容宽度时跳过改级表头\n if (hd?.define?.columnWidthComputeMode === 'only-body') {\n continue;\n }\n if (hd?.hierarchyLevel) {\n cellHierarchyIndent = (hd.hierarchyLevel ?? 0) * ((layoutMap as PivotHeaderLayoutMap).rowHierarchyIndent ?? 0);\n }\n } else {\n // 基本表格表身body单元格 如果是树形展开 需要考虑缩进值\n // const cellHierarchyState = table.getHierarchyState(col, row);\n // if (cellHierarchyState === HierarchyState.expand || cellHierarchyState === HierarchyState.collapse) {\n const define = table.getBodyColumnDefine(col, row);\n if (define?.tree) {\n const indexArr = table.dataSource.getIndexKey(table.getRecordIndexByRow(col, row));\n cellHierarchyIndent =\n Array.isArray(indexArr) && table.getHierarchyState(col, row) !== HierarchyState.none\n ? (indexArr.length - 1) * ((layoutMap as SimpleHeaderLayoutMap).hierarchyIndent ?? 0)\n : 0;\n }\n }\n\n // 测量文字宽度\n const textWidth = computeTextWidth(col, row, table);\n maxWidth = Math.max(textWidth + cellHierarchyIndent, maxWidth);\n }\n\n // 处理宽度限制\n const colMinWidth = table.getMinColWidth(col);\n const colMaxWidth = table.getMaxColWidth(col);\n if (maxWidth < colMinWidth) {\n return colMinWidth;\n } else if (maxWidth > colMaxWidth) {\n return colMaxWidth;\n }\n return maxWidth;\n}\n\n/**\n * @description: 计算customRender相关列宽\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeCustomRenderWidth(col: number, row: number, table: BaseTableAPI): number | undefined {\n const customRender = table.getCustomRender(col, row);\n const customLayout = table.getCustomLayout(col, row);\n if (customRender || customLayout) {\n let spanCol = 1;\n let width = 0;\n if (table.isHeader(col, row) || (table.getBodyColumnDefine(col, row) as TextColumnDefine).mergeCell) {\n const cellRange = table.getCellRange(col, row);\n spanCol = cellRange.end.col - cellRange.start.col + 1;\n }\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: getCellRect(col, row, table),\n table\n };\n if (customLayout) {\n // 处理customLayout\n const customLayoutObj = customLayout(arg);\n customLayoutObj.rootContainer.isRoot = true;\n const size = customLayoutObj.rootContainer.getContentSize();\n width = size.width ?? 0;\n } else if (typeof customRender === 'function') {\n // 处理customRender\n const customRenderObj = customRender(arg);\n width = customRenderObj?.expectedWidth ?? 0;\n } else {\n width = customRender?.expectedWidth ?? 0;\n }\n return width / spanCol;\n }\n return undefined;\n}\n\n/**\n * @description: 计算指标相关列宽\n * @param {number} col\n * @param {number} row\n * @param {boolean} forceCompute\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeIndicatorWidth(\n col: number,\n row: number,\n forceCompute: boolean,\n table: BaseTableAPI\n): number | undefined {\n const { layoutMap } = table.internalProps;\n if (table.isPivotTable() && (layoutMap as PivotHeaderLayoutMap).isColumnIndicatorHeader(col, row)) {\n // 透视表如果在指标中配置了宽度,使用该宽度作为指标单元格及下面内容单元格的列宽\n const body = layoutMap.getBody(col, row);\n if (body && body.width && body.width !== 'auto' && !forceCompute) {\n const width = Math.round(calc.toPx(body.width, table.internalProps.calcWidthContext));\n return width;\n }\n }\n return undefined;\n}\n\n/**\n * @description: 计算文字宽度\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeTextWidth(col: number, row: number, table: BaseTableAPI): number {\n let maxWidth = 0;\n const cellValue = table.getCellValue(col, row);\n // const dataValue = table.getCellOriginValue(col, row);\n const actStyle = table._getCellStyle(col, row);\n let iconWidth = 0;\n const define = table.getBodyColumnDefine(col, row);\n const mayHaveIcon = table.getCellType(col, row) !== 'body' ? true : !!define?.icon || !!define?.tree;\n if (mayHaveIcon) {\n const icons = table.getCellIcons(col, row);\n icons?.forEach(icon => {\n if (icon.positionType !== IconPosition.absoluteRight) {\n iconWidth += (icon.width ?? 0) + (icon.marginLeft ?? 0) + (icon.marginRight ?? 0);\n }\n });\n }\n let spanCol = 1;\n if (table.isHeader(col, row) || (table.getBodyColumnDefine(col, row) as TextColumnDefine).mergeCell) {\n const cellRange = table.getCellRange(col, row);\n spanCol = cellRange.end.col - cellRange.start.col + 1;\n }\n\n const padding = getQuadProps(getProp('padding', actStyle, col, row, table));\n const paddingWidth = padding[1] + padding[3]; // + cellHierarchyIndent\n\n const fontSize = getProp('fontSize', actStyle, col, row, table);\n const fontFamily = getProp('fontFamily', actStyle, col, row, table);\n\n const lines = validToString(cellValue).split('\\n') || [];\n if (lines.length >= 1) {\n // eslint-disable-next-line no-loop-func\n lines.forEach((line: string) => {\n const width = table.measureText(line.slice(0, table.options.maxCharactersNumber || 200), {\n fontSize,\n fontFamily\n }).width;\n maxWidth = Math.max(\n // 最大字符上限控制测量的字符\n (width + paddingWidth + 4 + iconWidth) / spanCol, // 这里+4为列宽测量结果的buffer\n maxWidth\n );\n });\n } else {\n maxWidth = Math.max(\n // 最大字符上限控制测量的字符\n (paddingWidth + 4 + iconWidth) / spanCol,\n maxWidth\n );\n }\n // 判断是否需要限制最大宽度 之前写死的450 需要使用配置来判断\n if (table.internalProps.limitMaxAutoWidth !== false) {\n maxWidth = Math.min(\n typeof table.internalProps.limitMaxAutoWidth === 'number' ? table.internalProps.limitMaxAutoWidth : 450,\n maxWidth\n );\n }\n\n return maxWidth;\n}\n\nexport function getCellRect(col: number, row: number, table: BaseTableAPI) {\n return {\n left: 0,\n top: 0,\n right: table.getColWidth(col),\n bottom: table.getRowHeight(row),\n width: table.getColWidth(col),\n height: table.getRowHeight(row)\n };\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/layout/compute-col-width.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,6CAA8D;AAC9D,uDAAyC;AACzC,2CAA0D;AAC1D,8CAAgD;AAChD,gDAA4C;AAI5C,SAAgB,gBAAgB,CAAC,KAAmB,EAAE,QAAiB,EAAE,MAAe,EAAE,MAAgB;;IACxG,QAAQ,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,CAAC,CAAC;IACzB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;IAGtC,IAAI,QAAQ,KAAK,CAAC,IAAI,MAAM,KAAK,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE;QACnD,KAAK,CAAC,uBAAuB,EAAE,CAAC;KAKjC;IAED,MAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAI,MAAM,EAAE;QACV,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;YAC7C,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;SAC3C;KACF;IACD,KAAK,IAAI,GAAG,GAAG,QAAQ,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE;QAC7C,IAAI,QAAQ,CAAC;QACb,IACE,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS;YAC9B,CAAA,MAAA,MAAA,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,YAAY,0CAAG,GAAG,CAAC,0CAAE,sBAAsB,MAAK,aAAa;YAC3F,YAAY,IAAI,KAAK,CAAC,a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Aa,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,EACvG,QAAQ,CACT,CAAC;KACH;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAgB,WAAW,CAAC,GAAW,EAAE,GAAW,EAAE,KAAmB;IACvE,OAAO;QACL,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;QAC7B,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;QAC/B,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;QAC7B,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;KAChC,CAAC;AACJ,CAAC;AATD,kCASC","file":"compute-col-width.js","sourcesContent":["import type { SimpleHeaderLayoutMap } from '../../layout';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport type { TextColumnDefine } from '../../ts-types';\nimport { HierarchyState, IconPosition } from '../../ts-types';\nimport * as calc from '../../tools/calc';\nimport { toFixed, validToString } from '../../tools/util';\nimport { getQuadProps } from '../utils/padding';\nimport { getProp } from '../utils/get-prop';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { PivotLayoutMap } from '../../layout/pivot-layout';\n\nexport function computeColsWidth(table: BaseTableAPI, colStart?: number, colEnd?: number, update?: boolean): void {\n colStart = colStart ?? 0;\n colEnd = colEnd ?? table.colCount - 1;\n // table._clearColRangeWidthsMap();\n // clear colRangeWidthsMap\n if (colStart === 0 && colEnd === table.colCount - 1) {\n table._clearColRangeWidthsMap();\n // } else {\n // for (let col = colStart; col <= colEnd; col++) {\n // table._clearColRangeWidthsMap(col);\n // }\n }\n\n const oldColWidths = [];\n if (update) {\n for (let col = 0; col < table.colCount; col++) {\n oldColWidths.push(table.getColWidth(col));\n }\n }\n for (let col = colStart; col <= colEnd; col++) {\n let maxWidth;\n if (\n !table.internalProps.transpose &&\n table.internalProps.layoutMap.columnWidths?.[col]?.columnWidthComputeMode === 'only-header' &&\n 'showHeader' in table.internalProps.layoutMap\n ) {\n const temp = table.internalProps.layoutMap.showHeader;\n table.internalProps.layoutMap.showHeader = true;\n maxWidth = computeColWidth(col, 0, table.internalProps.layoutMap.headerLevelCount, table, false);\n table.internalProps.layoutMap.showHeader = temp;\n } else if (\n !table.internalProps.transpose &&\n table.internalProps.layoutMap.columnWidths?.[col]?.columnWidthComputeMode === 'only-body'\n ) {\n maxWidth = computeColWidth(\n col,\n table.internalProps.layoutMap.getBodyRange().start.row,\n table.internalProps.layoutMap.getBodyRange().end.row,\n table,\n false\n );\n } else {\n maxWidth = computeColWidth(col, 0, table.rowCount - 1, table, false);\n }\n\n table._setColContentWidth(col, maxWidth);\n\n const oldWidth = table.getColWidth(col);\n if (oldWidth !== maxWidth) {\n table._clearColRangeWidthsMap(col);\n }\n table.setColWidth(col, maxWidth, false, true);\n }\n // 处理adaptive宽度\n if (table.widthMode === 'adaptive') {\n table._clearColRangeWidthsMap();\n // const canvasWidth = table.internalProps.canvas.width;\n const totalDrawWidth = table.tableNoFrameWidth;\n let actualWidth = 0;\n for (let col = 0; col < table.colCount; col++) {\n actualWidth += table.getColWidth(col);\n }\n const factor = totalDrawWidth / actualWidth;\n for (let col = 0; col < table.colCount; col++) {\n let colWidth;\n if (col === table.colCount - 1) {\n colWidth = totalDrawWidth - table.getColsWidth(0, table.colCount - 2);\n } else {\n colWidth = Math.round(table.getColWidth(col) * factor);\n }\n table.setColWidth(col, colWidth, false, true);\n }\n } else if (table.autoFillWidth) {\n // 处理风神列宽特殊逻辑\n table._clearColRangeWidthsMap();\n const canvasWidth = table.tableNoFrameWidth;\n let actualWidth = 0;\n let actualHeaderWidth = 0;\n for (let col = 0; col < table.colCount; col++) {\n const colWidth = table.getColWidth(col);\n if (col < table.frozenColCount) {\n actualHeaderWidth += colWidth;\n }\n\n actualWidth += colWidth;\n }\n\n // 如果内容宽度小于canvas宽度,执行adaptive放大\n if (actualWidth < canvasWidth && actualWidth - actualHeaderWidth > 0) {\n const factor = (canvasWidth - actualHeaderWidth) / (actualWidth - actualHeaderWidth);\n for (let col = table.frozenColCount; col < table.colCount; col++) {\n table.setColWidth(col, table.getColWidth(col) * factor, false, true);\n }\n }\n }\n // console.log('computeColsWidth time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time);\n\n if (update) {\n for (let col = 0; col < table.colCount; col++) {\n const newColWidth = table.getColWidth(col);\n if (newColWidth !== oldColWidths[col]) {\n // update the column width in scenegraph\n table.scenegraph.updateColWidth(col, newColWidth - oldColWidths[col]);\n }\n }\n }\n}\n\n/**\n * @description: 计算列宽\n * @param {number} col\n * @param {number} startRow\n * @param {number} endRow\n * @param {BaseTableAPI} table\n * @param {boolean} forceCompute\n * @return {*}\n */\nexport function computeColWidth(\n col: number,\n startRow: number,\n endRow: number,\n table: BaseTableAPI,\n forceCompute: boolean\n): number {\n const { layoutMap, transpose } = table.internalProps;\n // const ctx = _getInitContext.call(table);\n const { width } = layoutMap?.getColumnWidthDefined(col) ?? {};\n\n if (transpose) {\n // 转置模式\n if (table.widthMode === 'standard') {\n // return table.getColWidth(col);\n // standard模式使用默认值\n if (table.isRowHeader(col, 0) || table.isCornerHeader(col, 0)) {\n return Array.isArray(table.defaultHeaderColWidth)\n ? table.defaultHeaderColWidth[col] ?? table.defaultColWidth\n : table.defaultHeaderColWidth;\n }\n\n if (width !== 'auto') {\n // if (width && (typeof width === 'string' || width > 0)) return width;\n if (typeof width === 'string') {\n return calc.toPx(width, table.internalProps.calcWidthContext);\n } else if (width) {\n return width;\n }\n return table.defaultColWidth;\n }\n } else if (\n table.widthMode === 'adaptive' &&\n col === 0 &&\n width !== 'auto' &&\n (layoutMap as SimpleHeaderLayoutMap)?.showHeader\n ) {\n // ToBeFixed hack逻辑,转置第一列列宽为header[0]\n if (typeof width === 'string') {\n return calc.toPx(width, table.internalProps.calcWidthContext);\n } else if (width) {\n return width;\n }\n }\n // autoWidth adaptive 需要计算内容宽度\n // do nothing\n } else if (width !== 'auto' && table.widthMode !== 'autoWidth' && !forceCompute) {\n // if (width && (typeof width === 'string' || width > 0)) return width;\n if (typeof width === 'string') {\n return calc.toPx(width, table.internalProps.calcWidthContext);\n } else if (width) {\n return width;\n }\n //是透视表的行表头部分 则宽度按defaultHeaderColWidth设置\n return table.getColWidth(col);\n }\n\n return computeAutoColWidth(width, col, startRow, endRow, forceCompute, table);\n}\n\n/**\n * @description: 计算width: auto情况下的列宽\n * @param {number} col\n * @param {number} startRow\n * @param {number} endRow\n * @param {boolean} forceCompute\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeAutoColWidth(\n widthDeifne: string | number,\n col: number,\n startRow: number,\n endRow: number,\n forceCompute: boolean,\n table: BaseTableAPI\n): number {\n // 处理 auto width\n let maxWidth = 0;\n let deltaRow = 1;\n if (endRow - startRow > 5000) {\n // 超过5000行启动列宽自动计算采样\n deltaRow = Math.ceil((endRow - startRow) / 5000);\n }\n // 如果是透视图\n if (table.isPivotChart() && col >= table.rowHeaderLevelCount) {\n if (!(table.internalProps.layoutMap as PivotLayoutMap).indicatorsAsCol) {\n //并且指标是以行展示 计算列宽需要根据x轴的值域范围\n const optimunWidth = (table.internalProps.layoutMap as PivotLayoutMap).getOptimunWidthForChart(col);\n if (optimunWidth > 0) {\n return optimunWidth;\n }\n } else {\n //直接拿表头的默认列宽\n return table.defaultColWidth;\n }\n }\n\n for (let row = startRow; row <= endRow; row += deltaRow) {\n // 先判断CustomRender\n const customWidth = computeCustomRenderWidth(col, row, table);\n if (typeof customWidth === 'number') {\n maxWidth = Math.max(customWidth, maxWidth);\n continue;\n }\n\n // 判断透视表如果在指标\n // const indicatorWidth = computeIndicatorWidth(col, row, forceCompute, table);\n // const indicatorWidth = table.internalProps.layoutMap.getColumnWidthDefined(col);\n const indicatorWidth = widthDeifne;\n if (typeof indicatorWidth === 'number' && table.widthMode === 'standard') {\n maxWidth = Math.max(indicatorWidth, maxWidth);\n continue;\n }\n\n const cellType = table.isHeader(col, row)\n ? table._getHeaderLayoutMap(col, row)?.headerType\n : table.getBodyColumnType(col, row);\n if (cellType !== 'text' && cellType !== 'link' && cellType !== 'progressbar') {\n // text&link&progressbar测量文字宽度\n // image&video&sparkline使用默认宽度\n maxWidth = Math.max(maxWidth, table.getColWidth(col) || 0);\n continue;\n }\n\n // 处理树形展开\n let cellHierarchyIndent = 0;\n const layoutMap = table.internalProps.layoutMap;\n //判断是否为表头\n if (layoutMap.isHeader(col, row)) {\n const hd = layoutMap.getHeader(col, row);\n // 如果某级表头设置了only-body,在计算表头内容宽度时跳过改级表头\n if (hd?.define?.columnWidthComputeMode === 'only-body') {\n continue;\n }\n if (hd?.hierarchyLevel) {\n cellHierarchyIndent = (hd.hierarchyLevel ?? 0) * ((layoutMap as PivotHeaderLayoutMap).rowHierarchyIndent ?? 0);\n }\n } else {\n // 基本表格表身body单元格 如果是树形展开 需要考虑缩进值\n // const cellHierarchyState = table.getHierarchyState(col, row);\n // if (cellHierarchyState === HierarchyState.expand || cellHierarchyState === HierarchyState.collapse) {\n const define = table.getBodyColumnDefine(col, row);\n if (define?.tree) {\n const indexArr = table.dataSource.getIndexKey(table.getRecordIndexByRow(col, row));\n cellHierarchyIndent =\n Array.isArray(indexArr) && table.getHierarchyState(col, row) !== HierarchyState.none\n ? (indexArr.length - 1) * ((layoutMap as SimpleHeaderLayoutMap).hierarchyIndent ?? 0)\n : 0;\n }\n }\n\n // 测量文字宽度\n const textWidth = computeTextWidth(col, row, table);\n maxWidth = Math.max(textWidth + cellHierarchyIndent, maxWidth);\n }\n\n // 处理宽度限制\n const colMinWidth = table.getMinColWidth(col);\n const colMaxWidth = table.getMaxColWidth(col);\n if (maxWidth < colMinWidth) {\n return colMinWidth;\n } else if (maxWidth > colMaxWidth) {\n return colMaxWidth;\n }\n return maxWidth;\n}\n\n/**\n * @description: 计算customRender相关列宽\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeCustomRenderWidth(col: number, row: number, table: BaseTableAPI): number | undefined {\n const customRender = table.getCustomRender(col, row);\n const customLayout = table.getCustomLayout(col, row);\n if (customRender || customLayout) {\n let spanCol = 1;\n let width = 0;\n if (table.isHeader(col, row) || (table.getBodyColumnDefine(col, row) as TextColumnDefine).mergeCell) {\n const cellRange = table.getCellRange(col, row);\n spanCol = cellRange.end.col - cellRange.start.col + 1;\n }\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: getCellRect(col, row, table),\n table\n };\n if (customLayout) {\n // 处理customLayout\n const customLayoutObj = customLayout(arg);\n customLayoutObj.rootContainer.isRoot = true;\n const size = customLayoutObj.rootContainer.getContentSize();\n width = size.width ?? 0;\n } else if (typeof customRender === 'function') {\n // 处理customRender\n const customRenderObj = customRender(arg);\n width = customRenderObj?.expectedWidth ?? 0;\n } else {\n width = customRender?.expectedWidth ?? 0;\n }\n return width / spanCol;\n }\n return undefined;\n}\n\n/**\n * @description: 计算指标相关列宽\n * @param {number} col\n * @param {number} row\n * @param {boolean} forceCompute\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeIndicatorWidth(\n col: number,\n row: number,\n forceCompute: boolean,\n table: BaseTableAPI\n): number | undefined {\n const { layoutMap } = table.internalProps;\n if (table.isPivotTable() && (layoutMap as PivotHeaderLayoutMap).isColumnIndicatorHeader(col, row)) {\n // 透视表如果在指标中配置了宽度,使用该宽度作为指标单元格及下面内容单元格的列宽\n const body = layoutMap.getBody(col, row);\n if (body && body.width && body.width !== 'auto' && !forceCompute) {\n const width = Math.round(calc.toPx(body.width, table.internalProps.calcWidthContext));\n return width;\n }\n }\n return undefined;\n}\n\n/**\n * @description: 计算文字宽度\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeTextWidth(col: number, row: number, table: BaseTableAPI): number {\n let maxWidth = 0;\n const cellValue = table.getCellValue(col, row);\n // const dataValue = table.getCellOriginValue(col, row);\n const actStyle = table._getCellStyle(col, row);\n let iconWidth = 0;\n const define = table.getBodyColumnDefine(col, row);\n const mayHaveIcon = table.getCellType(col, row) !== 'body' ? true : !!define?.icon || !!define?.tree;\n if (mayHaveIcon) {\n const icons = table.getCellIcons(col, row);\n icons?.forEach(icon => {\n if (icon.positionType !== IconPosition.absoluteRight) {\n iconWidth += (icon.width ?? 0) + (icon.marginLeft ?? 0) + (icon.marginRight ?? 0);\n }\n });\n }\n let spanCol = 1;\n if (table.isHeader(col, row) || (table.getBodyColumnDefine(col, row) as TextColumnDefine).mergeCell) {\n const cellRange = table.getCellRange(col, row);\n spanCol = cellRange.end.col - cellRange.start.col + 1;\n }\n\n const padding = getQuadProps(getProp('padding', actStyle, col, row, table));\n const paddingWidth = padding[1] + padding[3]; // + cellHierarchyIndent\n\n const fontSize = getProp('fontSize', actStyle, col, row, table);\n const fontFamily = getProp('fontFamily', actStyle, col, row, table);\n\n const lines = validToString(cellValue).split('\\n') || [];\n if (lines.length >= 1) {\n // eslint-disable-next-line no-loop-func\n lines.forEach((line: string) => {\n const width = table.measureText(line.slice(0, table.options.maxCharactersNumber || 200), {\n fontSize,\n fontFamily\n }).width;\n maxWidth = Math.max(\n // 最大字符上限控制测量的字符\n (width + paddingWidth + 4 + iconWidth) / spanCol, // 这里+4为列宽测量结果的buffer\n maxWidth\n );\n });\n } else {\n maxWidth = Math.max(\n // 最大字符上限控制测量的字符\n (paddingWidth + 4 + iconWidth) / spanCol,\n maxWidth\n );\n }\n // 判断是否需要限制最大宽度 之前写死的450 需要使用配置来判断\n if (table.internalProps.limitMaxAutoWidth !== false) {\n maxWidth = Math.min(\n typeof table.internalProps.limitMaxAutoWidth === 'number' ? table.internalProps.limitMaxAutoWidth : 450,\n maxWidth\n );\n }\n\n return maxWidth;\n}\n\nexport function getCellRect(col: number, row: number, table: BaseTableAPI) {\n return {\n left: 0,\n top: 0,\n right: table.getColWidth(col),\n bottom: table.getRowHeight(row),\n width: table.getColWidth(col),\n height: table.getRowHeight(row)\n };\n}\n"]}