@visactor/vtable 0.9.2 → 0.9.3-alpha.1

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 (664) hide show
  1. package/README.md +15 -15
  2. package/cjs/ListTable.d.ts +2 -1
  3. package/cjs/ListTable.js +17 -13
  4. package/cjs/ListTable.js.map +1 -1
  5. package/cjs/PivotChart.d.ts +69 -0
  6. package/cjs/PivotChart.js +445 -0
  7. package/cjs/PivotChart.js.map +1 -0
  8. package/cjs/PivotTable.d.ts +2 -1
  9. package/cjs/PivotTable.js +18 -13
  10. package/cjs/PivotTable.js.map +1 -1
  11. package/cjs/body-helper/style/MultilineTextStyle.js +2 -2
  12. package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -1
  13. package/cjs/body-helper/style/ProgressBarStyle.js +15 -15
  14. package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
  15. package/cjs/body-helper/style/Style.d.ts +0 -1
  16. package/cjs/body-helper/style/Style.js +25 -28
  17. package/cjs/body-helper/style/Style.js.map +1 -1
  18. package/cjs/chartModule.js +14 -0
  19. package/cjs/chartModule.js.map +1 -0
  20. package/cjs/components/axis/axis.d.ts +45 -0
  21. package/cjs/components/axis/axis.js +146 -0
  22. package/cjs/components/axis/axis.js.map +1 -0
  23. package/cjs/components/axis/band-scale.d.ts +18 -0
  24. package/cjs/components/axis/band-scale.js +54 -0
  25. package/cjs/components/axis/band-scale.js.map +1 -0
  26. package/cjs/components/axis/get-axis-attributes.d.ts +136 -0
  27. package/cjs/components/axis/get-axis-attributes.js +169 -0
  28. package/cjs/components/axis/get-axis-attributes.js.map +1 -0
  29. package/cjs/components/axis/label-overlap.d.ts +3 -0
  30. package/cjs/components/axis/label-overlap.js +46 -0
  31. package/cjs/components/axis/label-overlap.js.map +1 -0
  32. package/cjs/components/axis/linear-scale.d.ts +45 -0
  33. package/cjs/components/axis/linear-scale.js +120 -0
  34. package/cjs/components/axis/linear-scale.js.map +1 -0
  35. package/cjs/components/legend/get-legend-attributes.d.ts +5 -0
  36. package/cjs/components/legend/get-legend-attributes.js +90 -0
  37. package/cjs/components/legend/get-legend-attributes.js.map +1 -0
  38. package/cjs/components/legend/legend.d.ts +23 -0
  39. package/cjs/components/legend/legend.js +94 -0
  40. package/cjs/components/legend/legend.js.map +1 -0
  41. package/{es → cjs/components}/menu/dom/BaseMenu.d.ts +2 -2
  42. package/cjs/components/menu/dom/BaseMenu.js.map +1 -0
  43. package/cjs/components/menu/dom/Menu.js.map +1 -0
  44. package/cjs/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
  45. package/cjs/{menu → components/menu}/dom/MenuHandler.js +1 -1
  46. package/cjs/components/menu/dom/MenuHandler.js.map +1 -0
  47. package/cjs/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
  48. package/cjs/{menu → components/menu}/dom/logic/MenuContainer.js +2 -2
  49. package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -0
  50. package/cjs/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
  51. package/cjs/{menu → components/menu}/dom/logic/MenuElement.js +4 -4
  52. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -0
  53. package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
  54. package/cjs/components/title/title.d.ts +12 -0
  55. package/cjs/components/title/title.js +66 -0
  56. package/cjs/components/title/title.js.map +1 -0
  57. package/{es → cjs/components}/tooltip/BaseTooltip.d.ts +3 -3
  58. package/cjs/components/tooltip/BaseTooltip.js.map +1 -0
  59. package/cjs/components/tooltip/Tooltip.js.map +1 -0
  60. package/cjs/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
  61. package/cjs/{tooltip → components/tooltip}/TooltipHandler.js +1 -1
  62. package/cjs/components/tooltip/TooltipHandler.js.map +1 -0
  63. package/{es → cjs/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
  64. package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +1 -1
  65. package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
  66. package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
  67. package/cjs/components/util/orient.d.ts +3 -0
  68. package/cjs/components/util/orient.js +14 -0
  69. package/cjs/components/util/orient.js.map +1 -0
  70. package/cjs/components/util/register.d.ts +3 -0
  71. package/cjs/components/util/register.js +15 -0
  72. package/cjs/components/util/register.js.map +1 -0
  73. package/cjs/components/util/tick-data/config.d.ts +1 -0
  74. package/cjs/components/util/tick-data/config.js +6 -0
  75. package/cjs/components/util/tick-data/config.js.map +1 -0
  76. package/cjs/components/util/tick-data/continuous.d.ts +2 -0
  77. package/cjs/components/util/tick-data/continuous.js +39 -0
  78. package/cjs/components/util/tick-data/continuous.js.map +1 -0
  79. package/cjs/components/util/tick-data/discrete/linear.d.ts +2 -0
  80. package/cjs/components/util/tick-data/discrete/linear.js +66 -0
  81. package/cjs/components/util/tick-data/discrete/linear.js.map +1 -0
  82. package/cjs/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
  83. package/cjs/components/util/tick-data/discrete/polar-angle.js +46 -0
  84. package/cjs/components/util/tick-data/discrete/polar-angle.js.map +1 -0
  85. package/cjs/components/util/tick-data/index.d.ts +2 -0
  86. package/cjs/components/util/tick-data/index.js +17 -0
  87. package/cjs/components/util/tick-data/index.js.map +1 -0
  88. package/cjs/components/util/tick-data/util.d.ts +21 -0
  89. package/cjs/components/util/tick-data/util.js +115 -0
  90. package/cjs/components/util/tick-data/util.js.map +1 -0
  91. package/cjs/components/util/transform.d.ts +5 -0
  92. package/cjs/components/util/transform.js +45 -0
  93. package/cjs/components/util/transform.js.map +1 -0
  94. package/cjs/core/BaseTable.d.ts +18 -5
  95. package/cjs/core/BaseTable.js +115 -41
  96. package/cjs/core/BaseTable.js.map +1 -1
  97. package/cjs/core/TABLE_EVENT_TYPE.d.ts +5 -0
  98. package/cjs/core/TABLE_EVENT_TYPE.js +6 -1
  99. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  100. package/cjs/core/style.js +1 -1
  101. package/cjs/core/style.js.map +1 -1
  102. package/cjs/core/tableHelper.js +1 -2
  103. package/cjs/data/CachedDataSource.js +2 -1
  104. package/cjs/data/DataSource.js +2 -2
  105. package/cjs/data/DataSource.js.map +1 -1
  106. package/cjs/dataset/dataset-pivot-table.d.ts +60 -0
  107. package/cjs/dataset/dataset-pivot-table.js +387 -0
  108. package/cjs/dataset/dataset-pivot-table.js.map +1 -0
  109. package/cjs/dataset/dataset.d.ts +15 -19
  110. package/cjs/dataset/dataset.js +191 -200
  111. package/cjs/dataset/dataset.js.map +1 -1
  112. package/cjs/dataset/statistics-helper.d.ts +67 -0
  113. package/cjs/dataset/statistics-helper.js +173 -0
  114. package/cjs/dataset/statistics-helper.js.map +1 -0
  115. package/cjs/dataset/util/zero-align.d.ts +10 -0
  116. package/cjs/dataset/util/zero-align.js +119 -0
  117. package/cjs/dataset/util/zero-align.js.map +1 -0
  118. package/cjs/event/EventHandler.js.map +1 -1
  119. package/cjs/event/EventTarget.d.ts +5 -5
  120. package/cjs/event/EventTarget.js +2 -2
  121. package/cjs/event/EventTarget.js.map +1 -1
  122. package/cjs/event/VChartEventProxy.d.ts +1 -0
  123. package/cjs/event/VChartEventProxy.js +1 -0
  124. package/cjs/event/VChartEventProxy.js.map +1 -0
  125. package/cjs/event/event.js +7 -4
  126. package/cjs/event/event.js.map +1 -1
  127. package/cjs/event/listener/table-group.js +8 -6
  128. package/cjs/event/listener/table-group.js.map +1 -1
  129. package/cjs/event/pivot-chart/axis-click.d.ts +2 -0
  130. package/cjs/event/pivot-chart/axis-click.js +42 -0
  131. package/cjs/event/pivot-chart/axis-click.js.map +1 -0
  132. package/cjs/event/pivot-chart/axis-hover.d.ts +2 -0
  133. package/cjs/event/pivot-chart/axis-hover.js +41 -0
  134. package/cjs/event/pivot-chart/axis-hover.js.map +1 -0
  135. package/cjs/event/scroll.js +4 -3
  136. package/cjs/event/scroll.js.map +1 -1
  137. package/cjs/event/sparkline-event.js +1 -2
  138. package/cjs/event/sparkline-event.js.map +1 -1
  139. package/cjs/header-helper/header-helper.js +1 -1
  140. package/cjs/header-helper/header-helper.js.map +1 -1
  141. package/cjs/header-helper/style/MultilineTextHeaderStyle.js +2 -2
  142. package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
  143. package/cjs/header-helper/style/Style.d.ts +0 -1
  144. package/cjs/header-helper/style/Style.js +25 -28
  145. package/cjs/header-helper/style/Style.js.map +1 -1
  146. package/cjs/index.d.ts +4 -3
  147. package/cjs/index.js +11 -2
  148. package/cjs/index.js.map +1 -1
  149. package/cjs/layout/chart-helper/get-axis-config.d.ts +2 -0
  150. package/cjs/layout/chart-helper/get-axis-config.js +128 -0
  151. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -0
  152. package/cjs/layout/chart-helper/get-chart-spec.d.ts +7 -0
  153. package/cjs/layout/chart-helper/get-chart-spec.js +141 -0
  154. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -0
  155. package/cjs/layout/index.js +2 -1
  156. package/cjs/layout/pivot-header-layout.d.ts +13 -5
  157. package/cjs/layout/pivot-header-layout.js +50 -14
  158. package/cjs/layout/pivot-header-layout.js.map +1 -1
  159. package/cjs/layout/pivot-layout.d.ts +55 -8
  160. package/cjs/layout/pivot-layout.js +406 -92
  161. package/cjs/layout/pivot-layout.js.map +1 -1
  162. package/cjs/layout/simple-header-layout.d.ts +10 -0
  163. package/cjs/layout/simple-header-layout.js +43 -2
  164. package/cjs/layout/simple-header-layout.js.map +1 -1
  165. package/cjs/plugins/{chartTypes.js → chartModules.js} +1 -1
  166. package/cjs/plugins/chartModules.js.map +1 -0
  167. package/cjs/register.d.ts +1 -1
  168. package/cjs/register.js +6 -6
  169. package/cjs/register.js.map +1 -1
  170. package/cjs/render/layout/text.d.ts +33 -4
  171. package/cjs/render/layout/text.js +9 -3
  172. package/cjs/render/layout/text.js.map +1 -1
  173. package/cjs/scenegraph/component/custom.js +17 -16
  174. package/cjs/scenegraph/component/custom.js.map +1 -1
  175. package/cjs/scenegraph/component/menu.d.ts +41 -0
  176. package/cjs/scenegraph/component/table-component.js +3 -3
  177. package/cjs/scenegraph/component/table-component.js.map +1 -1
  178. package/cjs/scenegraph/graphic/chart.d.ts +4 -1
  179. package/cjs/scenegraph/graphic/chart.js +29 -17
  180. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  181. package/cjs/scenegraph/graphic/contributions/chart-render.js +22 -3
  182. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  183. package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
  184. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
  185. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  186. package/cjs/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
  187. package/cjs/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
  188. package/cjs/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
  189. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
  190. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
  191. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  192. package/cjs/scenegraph/graphic/text.d.ts +15 -0
  193. package/cjs/scenegraph/group-creater/cell-helper.js +9 -3
  194. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  195. package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  196. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
  197. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  198. package/cjs/scenegraph/group-creater/column-helper.js +1 -1
  199. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  200. package/cjs/scenegraph/group-creater/column.js.map +1 -1
  201. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
  202. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +71 -0
  203. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
  204. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +2 -2
  205. package/cjs/scenegraph/group-creater/progress/proxy.js +45 -55
  206. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  207. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +1 -0
  208. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +60 -26
  209. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  210. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +1 -0
  211. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +94 -40
  212. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  213. package/cjs/scenegraph/layout/compute-col-width.js +23 -15
  214. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  215. package/cjs/scenegraph/layout/compute-row-height.js +20 -9
  216. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  217. package/cjs/scenegraph/layout/move-cell.js +1 -1
  218. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  219. package/cjs/scenegraph/layout/update-cell.js +3 -2
  220. package/cjs/scenegraph/layout/update-cell.js.map +1 -1
  221. package/cjs/scenegraph/layout/update-height.js +1 -1
  222. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  223. package/cjs/scenegraph/layout/update-row.js +1 -1
  224. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  225. package/cjs/scenegraph/layout/update-width.js +34 -3
  226. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  227. package/cjs/scenegraph/refresh-node/update-chart.d.ts +3 -0
  228. package/cjs/scenegraph/refresh-node/update-chart.js +76 -7
  229. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  230. package/cjs/scenegraph/scenegraph.d.ts +8 -0
  231. package/cjs/scenegraph/scenegraph.js +118 -21
  232. package/cjs/scenegraph/scenegraph.js.map +1 -1
  233. package/cjs/scenegraph/stick-text/index.js +10 -8
  234. package/cjs/scenegraph/stick-text/index.js.map +1 -1
  235. package/cjs/scenegraph/style/corner-cell.d.ts +3 -0
  236. package/cjs/scenegraph/style/corner-cell.js +29 -0
  237. package/cjs/scenegraph/style/corner-cell.js.map +1 -0
  238. package/cjs/scenegraph/style/frame-border.d.ts +1 -0
  239. package/cjs/scenegraph/style/frame-border.js +3 -7
  240. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  241. package/cjs/scenegraph/utils/get-cell-merge.js +2 -1
  242. package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
  243. package/cjs/scenegraph/utils/text-icon-layout.js +1 -1
  244. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  245. package/cjs/state/state.js +1 -1
  246. package/cjs/state/state.js.map +1 -1
  247. package/cjs/themes/DARK.js +1 -2
  248. package/cjs/themes/theme.d.ts +10 -0
  249. package/cjs/themes/theme.js +50 -4
  250. package/cjs/themes/theme.js.map +1 -1
  251. package/cjs/tools/LimitPromiseQueue.js +2 -1
  252. package/cjs/tools/calc.d.ts +3 -0
  253. package/cjs/tools/calc.js +11 -3
  254. package/cjs/tools/calc.js.map +1 -1
  255. package/cjs/tools/debounce.js +1 -1
  256. package/cjs/tools/diff-cell.js +2 -2
  257. package/cjs/tools/dom.js +1 -1
  258. package/cjs/tools/env.js +1 -1
  259. package/cjs/ts-types/base-table.d.ts +29 -12
  260. package/cjs/ts-types/base-table.js.map +1 -1
  261. package/cjs/ts-types/column/style.d.ts +0 -1
  262. package/cjs/ts-types/column/style.js.map +1 -1
  263. package/cjs/ts-types/component/axis.d.ts +12 -0
  264. package/cjs/ts-types/component/axis.js +6 -0
  265. package/cjs/ts-types/component/axis.js.map +1 -0
  266. package/cjs/ts-types/component/legend.d.ts +5 -0
  267. package/cjs/ts-types/component/legend.js +6 -0
  268. package/cjs/ts-types/component/legend.js.map +1 -0
  269. package/cjs/ts-types/component/title.d.ts +47 -0
  270. package/cjs/ts-types/component/title.js +6 -0
  271. package/cjs/ts-types/component/title.js.map +1 -0
  272. package/cjs/ts-types/component/util.d.ts +1 -0
  273. package/cjs/ts-types/component/util.js +6 -0
  274. package/cjs/ts-types/component/util.js.map +1 -0
  275. package/cjs/ts-types/customElement.d.ts +2 -0
  276. package/cjs/ts-types/customElement.js.map +1 -1
  277. package/cjs/ts-types/events.d.ts +108 -83
  278. package/cjs/ts-types/events.js.map +1 -1
  279. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  280. package/cjs/ts-types/list-table/define/chart-define.d.ts +1 -1
  281. package/cjs/ts-types/list-table/define/chart-define.js.map +1 -1
  282. package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -2
  283. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  284. package/cjs/ts-types/new-data-set.d.ts +21 -7
  285. package/cjs/ts-types/new-data-set.js +2 -2
  286. package/cjs/ts-types/new-data-set.js.map +1 -1
  287. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
  288. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +3 -1
  289. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
  290. package/cjs/ts-types/pivot-table/corner.d.ts +3 -3
  291. package/cjs/ts-types/pivot-table/corner.js.map +1 -1
  292. package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  293. package/cjs/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
  294. package/cjs/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
  295. package/cjs/ts-types/pivot-table/indicator/index.d.ts +1 -0
  296. package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
  297. package/cjs/ts-types/pivot-table/title.d.ts +1 -1
  298. package/cjs/ts-types/pivot-table/title.js.map +1 -1
  299. package/cjs/ts-types/table-engine.d.ts +27 -3
  300. package/cjs/ts-types/table-engine.js.map +1 -1
  301. package/cjs/ts-types/theme.d.ts +5 -0
  302. package/cjs/ts-types/theme.js.map +1 -1
  303. package/dist/vtable.js +37485 -24091
  304. package/dist/vtable.min.js +4 -2
  305. package/es/ListTable.d.ts +2 -1
  306. package/es/ListTable.js +17 -13
  307. package/es/ListTable.js.map +1 -1
  308. package/es/PivotChart.d.ts +69 -0
  309. package/es/PivotChart.js +455 -0
  310. package/es/PivotChart.js.map +1 -0
  311. package/es/PivotTable.d.ts +2 -1
  312. package/es/PivotTable.js +19 -14
  313. package/es/PivotTable.js.map +1 -1
  314. package/es/body-helper/style/MultilineTextStyle.js +2 -2
  315. package/es/body-helper/style/MultilineTextStyle.js.map +1 -1
  316. package/es/body-helper/style/ProgressBarStyle.js +15 -15
  317. package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
  318. package/es/body-helper/style/Style.d.ts +0 -1
  319. package/es/body-helper/style/Style.js +25 -28
  320. package/es/body-helper/style/Style.js.map +1 -1
  321. package/es/{chartType.js → chartModule.js} +2 -2
  322. package/es/chartModule.js.map +1 -0
  323. package/es/components/axis/axis.d.ts +45 -0
  324. package/es/components/axis/axis.js +155 -0
  325. package/es/components/axis/axis.js.map +1 -0
  326. package/es/components/axis/band-scale.d.ts +18 -0
  327. package/es/components/axis/band-scale.js +46 -0
  328. package/es/components/axis/band-scale.js.map +1 -0
  329. package/es/components/axis/get-axis-attributes.d.ts +136 -0
  330. package/es/components/axis/get-axis-attributes.js +166 -0
  331. package/es/components/axis/get-axis-attributes.js.map +1 -0
  332. package/es/components/axis/label-overlap.d.ts +3 -0
  333. package/es/components/axis/label-overlap.js +39 -0
  334. package/es/components/axis/label-overlap.js.map +1 -0
  335. package/es/components/axis/linear-scale.d.ts +45 -0
  336. package/es/components/axis/linear-scale.js +104 -0
  337. package/es/components/axis/linear-scale.js.map +1 -0
  338. package/es/components/legend/get-legend-attributes.d.ts +5 -0
  339. package/es/components/legend/get-legend-attributes.js +84 -0
  340. package/es/components/legend/get-legend-attributes.js.map +1 -0
  341. package/es/components/legend/legend.d.ts +23 -0
  342. package/es/components/legend/legend.js +93 -0
  343. package/es/components/legend/legend.js.map +1 -0
  344. package/{cjs → es/components}/menu/dom/BaseMenu.d.ts +2 -2
  345. package/es/components/menu/dom/BaseMenu.js.map +1 -0
  346. package/es/components/menu/dom/Menu.js.map +1 -0
  347. package/es/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
  348. package/es/{menu → components/menu}/dom/MenuHandler.js +2 -2
  349. package/es/components/menu/dom/MenuHandler.js.map +1 -0
  350. package/es/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
  351. package/es/{menu → components/menu}/dom/logic/MenuContainer.js +4 -4
  352. package/es/components/menu/dom/logic/MenuContainer.js.map +1 -0
  353. package/es/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
  354. package/es/{menu → components/menu}/dom/logic/MenuElement.js +9 -9
  355. package/es/components/menu/dom/logic/MenuElement.js.map +1 -0
  356. package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
  357. package/es/components/title/title.d.ts +12 -0
  358. package/es/components/title/title.js +61 -0
  359. package/es/components/title/title.js.map +1 -0
  360. package/{cjs → es/components}/tooltip/BaseTooltip.d.ts +3 -3
  361. package/es/components/tooltip/BaseTooltip.js.map +1 -0
  362. package/es/components/tooltip/Tooltip.js.map +1 -0
  363. package/es/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
  364. package/es/{tooltip → components/tooltip}/TooltipHandler.js +4 -4
  365. package/es/components/tooltip/TooltipHandler.js.map +1 -0
  366. package/{cjs → es/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
  367. package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +4 -4
  368. package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
  369. package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
  370. package/es/components/util/orient.d.ts +3 -0
  371. package/es/components/util/orient.js +8 -0
  372. package/es/components/util/orient.js.map +1 -0
  373. package/es/components/util/register.d.ts +3 -0
  374. package/es/components/util/register.js +8 -0
  375. package/es/components/util/register.js.map +1 -0
  376. package/es/components/util/tick-data/config.d.ts +1 -0
  377. package/es/components/util/tick-data/config.js +2 -0
  378. package/es/components/util/tick-data/config.js.map +1 -0
  379. package/es/components/util/tick-data/continuous.d.ts +2 -0
  380. package/es/components/util/tick-data/continuous.js +38 -0
  381. package/es/components/util/tick-data/continuous.js.map +1 -0
  382. package/es/components/util/tick-data/discrete/linear.d.ts +2 -0
  383. package/es/components/util/tick-data/discrete/linear.js +59 -0
  384. package/es/components/util/tick-data/discrete/linear.js.map +1 -0
  385. package/es/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
  386. package/es/components/util/tick-data/discrete/polar-angle.js +39 -0
  387. package/es/components/util/tick-data/discrete/polar-angle.js.map +1 -0
  388. package/es/components/util/tick-data/index.d.ts +2 -0
  389. package/es/components/util/tick-data/index.js +19 -0
  390. package/es/components/util/tick-data/index.js.map +1 -0
  391. package/es/components/util/tick-data/util.d.ts +21 -0
  392. package/es/components/util/tick-data/util.js +104 -0
  393. package/es/components/util/tick-data/util.js.map +1 -0
  394. package/es/components/util/transform.d.ts +5 -0
  395. package/es/components/util/transform.js +34 -0
  396. package/es/components/util/transform.js.map +1 -0
  397. package/es/core/BaseTable.d.ts +18 -5
  398. package/es/core/BaseTable.js +119 -43
  399. package/es/core/BaseTable.js.map +1 -1
  400. package/es/core/TABLE_EVENT_TYPE.d.ts +5 -0
  401. package/es/core/TABLE_EVENT_TYPE.js +6 -1
  402. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  403. package/es/core/style.js +1 -1
  404. package/es/core/style.js.map +1 -1
  405. package/es/core/tableHelper.js +1 -2
  406. package/es/data/CachedDataSource.js +2 -1
  407. package/es/data/DataSource.js +2 -2
  408. package/es/data/DataSource.js.map +1 -1
  409. package/es/dataset/dataset-pivot-table.d.ts +60 -0
  410. package/es/dataset/dataset-pivot-table.js +378 -0
  411. package/es/dataset/dataset-pivot-table.js.map +1 -0
  412. package/es/dataset/dataset.d.ts +15 -19
  413. package/es/dataset/dataset.js +183 -190
  414. package/es/dataset/dataset.js.map +1 -1
  415. package/es/dataset/statistics-helper.d.ts +67 -0
  416. package/es/dataset/statistics-helper.js +152 -0
  417. package/es/dataset/statistics-helper.js.map +1 -0
  418. package/es/dataset/util/zero-align.d.ts +10 -0
  419. package/es/dataset/util/zero-align.js +111 -0
  420. package/es/dataset/util/zero-align.js.map +1 -0
  421. package/es/event/EventHandler.js.map +1 -1
  422. package/es/event/EventTarget.d.ts +5 -5
  423. package/es/event/EventTarget.js +2 -2
  424. package/es/event/EventTarget.js.map +1 -1
  425. package/es/event/VChartEventProxy.d.ts +1 -0
  426. package/es/event/VChartEventProxy.js +1 -0
  427. package/es/event/VChartEventProxy.js.map +1 -0
  428. package/es/event/event.js +10 -3
  429. package/es/event/event.js.map +1 -1
  430. package/es/event/listener/table-group.js +8 -6
  431. package/es/event/listener/table-group.js.map +1 -1
  432. package/es/event/pivot-chart/axis-click.d.ts +2 -0
  433. package/es/event/pivot-chart/axis-click.js +36 -0
  434. package/es/event/pivot-chart/axis-click.js.map +1 -0
  435. package/es/event/pivot-chart/axis-hover.d.ts +2 -0
  436. package/es/event/pivot-chart/axis-hover.js +33 -0
  437. package/es/event/pivot-chart/axis-hover.js.map +1 -0
  438. package/es/event/scroll.js +4 -3
  439. package/es/event/scroll.js.map +1 -1
  440. package/es/event/sparkline-event.js +1 -2
  441. package/es/event/sparkline-event.js.map +1 -1
  442. package/es/header-helper/header-helper.js +1 -1
  443. package/es/header-helper/header-helper.js.map +1 -1
  444. package/es/header-helper/style/MultilineTextHeaderStyle.js +2 -2
  445. package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
  446. package/es/header-helper/style/Style.d.ts +0 -1
  447. package/es/header-helper/style/Style.js +25 -28
  448. package/es/header-helper/style/Style.js.map +1 -1
  449. package/es/index.d.ts +4 -3
  450. package/es/index.js +4 -2
  451. package/es/index.js.map +1 -1
  452. package/es/layout/chart-helper/get-axis-config.d.ts +2 -0
  453. package/es/layout/chart-helper/get-axis-config.js +120 -0
  454. package/es/layout/chart-helper/get-axis-config.js.map +1 -0
  455. package/es/layout/chart-helper/get-chart-spec.d.ts +7 -0
  456. package/es/layout/chart-helper/get-chart-spec.js +132 -0
  457. package/es/layout/chart-helper/get-chart-spec.js.map +1 -0
  458. package/es/layout/index.js +2 -1
  459. package/es/layout/pivot-header-layout.d.ts +13 -5
  460. package/es/layout/pivot-header-layout.js +50 -12
  461. package/es/layout/pivot-header-layout.js.map +1 -1
  462. package/es/layout/pivot-layout.d.ts +55 -8
  463. package/es/layout/pivot-layout.js +409 -90
  464. package/es/layout/pivot-layout.js.map +1 -1
  465. package/es/layout/simple-header-layout.d.ts +10 -0
  466. package/es/layout/simple-header-layout.js +44 -1
  467. package/es/layout/simple-header-layout.js.map +1 -1
  468. package/es/plugins/chartModules.js +2 -0
  469. package/es/plugins/chartModules.js.map +1 -0
  470. package/es/register.d.ts +1 -1
  471. package/es/register.js +3 -3
  472. package/es/register.js.map +1 -1
  473. package/es/render/layout/text.d.ts +33 -4
  474. package/es/render/layout/text.js +9 -3
  475. package/es/render/layout/text.js.map +1 -1
  476. package/es/scenegraph/component/custom.js +17 -16
  477. package/es/scenegraph/component/custom.js.map +1 -1
  478. package/es/scenegraph/component/menu.d.ts +41 -0
  479. package/es/scenegraph/component/table-component.js +3 -3
  480. package/es/scenegraph/component/table-component.js.map +1 -1
  481. package/es/scenegraph/graphic/chart.d.ts +4 -1
  482. package/es/scenegraph/graphic/chart.js +29 -15
  483. package/es/scenegraph/graphic/chart.js.map +1 -1
  484. package/es/scenegraph/graphic/contributions/chart-render.js +22 -3
  485. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  486. package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
  487. package/es/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
  488. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  489. package/es/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
  490. package/es/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
  491. package/es/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
  492. package/es/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
  493. package/es/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
  494. package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  495. package/es/scenegraph/graphic/text.d.ts +15 -0
  496. package/es/scenegraph/group-creater/cell-helper.js +10 -2
  497. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  498. package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  499. package/es/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
  500. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  501. package/es/scenegraph/group-creater/column-helper.js +1 -1
  502. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  503. package/es/scenegraph/group-creater/column.js.map +1 -1
  504. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
  505. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +65 -0
  506. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
  507. package/es/scenegraph/group-creater/progress/proxy.d.ts +2 -2
  508. package/es/scenegraph/group-creater/progress/proxy.js +42 -55
  509. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  510. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +1 -0
  511. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +59 -23
  512. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  513. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +1 -0
  514. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +94 -37
  515. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  516. package/es/scenegraph/layout/compute-col-width.js +23 -15
  517. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  518. package/es/scenegraph/layout/compute-row-height.js +20 -9
  519. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  520. package/es/scenegraph/layout/move-cell.js +1 -1
  521. package/es/scenegraph/layout/move-cell.js.map +1 -1
  522. package/es/scenegraph/layout/update-cell.js +3 -1
  523. package/es/scenegraph/layout/update-cell.js.map +1 -1
  524. package/es/scenegraph/layout/update-height.js +1 -1
  525. package/es/scenegraph/layout/update-height.js.map +1 -1
  526. package/es/scenegraph/layout/update-row.js +1 -1
  527. package/es/scenegraph/layout/update-row.js.map +1 -1
  528. package/es/scenegraph/layout/update-width.js +35 -2
  529. package/es/scenegraph/layout/update-width.js.map +1 -1
  530. package/es/scenegraph/refresh-node/update-chart.d.ts +3 -0
  531. package/es/scenegraph/refresh-node/update-chart.js +70 -4
  532. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  533. package/es/scenegraph/scenegraph.d.ts +8 -0
  534. package/es/scenegraph/scenegraph.js +120 -21
  535. package/es/scenegraph/scenegraph.js.map +1 -1
  536. package/es/scenegraph/stick-text/index.js +10 -8
  537. package/es/scenegraph/stick-text/index.js.map +1 -1
  538. package/es/scenegraph/style/corner-cell.d.ts +3 -0
  539. package/es/scenegraph/style/corner-cell.js +25 -0
  540. package/es/scenegraph/style/corner-cell.js.map +1 -0
  541. package/es/scenegraph/style/frame-border.d.ts +1 -0
  542. package/es/scenegraph/style/frame-border.js +2 -6
  543. package/es/scenegraph/style/frame-border.js.map +1 -1
  544. package/es/scenegraph/utils/get-cell-merge.js +2 -1
  545. package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
  546. package/es/scenegraph/utils/text-icon-layout.js +1 -1
  547. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  548. package/es/state/state.js +1 -1
  549. package/es/state/state.js.map +1 -1
  550. package/es/themes/DARK.js +1 -2
  551. package/es/themes/theme.d.ts +10 -0
  552. package/es/themes/theme.js +50 -4
  553. package/es/themes/theme.js.map +1 -1
  554. package/es/tools/LimitPromiseQueue.js +2 -1
  555. package/es/tools/calc.d.ts +3 -0
  556. package/es/tools/calc.js +10 -0
  557. package/es/tools/calc.js.map +1 -1
  558. package/es/tools/debounce.js +1 -1
  559. package/es/tools/diff-cell.js +1 -1
  560. package/es/tools/dom.js +1 -1
  561. package/es/tools/env.js +1 -1
  562. package/es/ts-types/base-table.d.ts +29 -12
  563. package/es/ts-types/base-table.js.map +1 -1
  564. package/es/ts-types/column/style.d.ts +0 -1
  565. package/es/ts-types/column/style.js.map +1 -1
  566. package/es/ts-types/component/axis.d.ts +12 -0
  567. package/es/ts-types/component/axis.js +2 -0
  568. package/es/ts-types/component/axis.js.map +1 -0
  569. package/es/ts-types/component/legend.d.ts +5 -0
  570. package/es/ts-types/component/legend.js +2 -0
  571. package/es/ts-types/component/legend.js.map +1 -0
  572. package/es/ts-types/component/title.d.ts +47 -0
  573. package/es/ts-types/component/title.js +2 -0
  574. package/es/ts-types/component/title.js.map +1 -0
  575. package/es/ts-types/component/util.d.ts +1 -0
  576. package/es/ts-types/component/util.js +2 -0
  577. package/es/ts-types/component/util.js.map +1 -0
  578. package/es/ts-types/customElement.d.ts +2 -0
  579. package/es/ts-types/customElement.js.map +1 -1
  580. package/es/ts-types/events.d.ts +108 -83
  581. package/es/ts-types/events.js.map +1 -1
  582. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  583. package/es/ts-types/list-table/define/chart-define.d.ts +1 -1
  584. package/es/ts-types/list-table/define/chart-define.js.map +1 -1
  585. package/es/ts-types/list-table/layout-map/api.d.ts +4 -2
  586. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  587. package/es/ts-types/new-data-set.d.ts +21 -7
  588. package/es/ts-types/new-data-set.js +2 -2
  589. package/es/ts-types/new-data-set.js.map +1 -1
  590. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
  591. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +4 -0
  592. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
  593. package/es/ts-types/pivot-table/corner.d.ts +3 -3
  594. package/es/ts-types/pivot-table/corner.js.map +1 -1
  595. package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  596. package/es/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
  597. package/es/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
  598. package/es/ts-types/pivot-table/indicator/index.d.ts +1 -0
  599. package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
  600. package/es/ts-types/pivot-table/title.d.ts +1 -1
  601. package/es/ts-types/pivot-table/title.js.map +1 -1
  602. package/es/ts-types/table-engine.d.ts +27 -3
  603. package/es/ts-types/table-engine.js.map +1 -1
  604. package/es/ts-types/theme.d.ts +5 -0
  605. package/es/ts-types/theme.js.map +1 -1
  606. package/package.json +14 -8
  607. package/cjs/chartType.js +0 -14
  608. package/cjs/chartType.js.map +0 -1
  609. package/cjs/menu/dom/BaseMenu.js.map +0 -1
  610. package/cjs/menu/dom/Menu.js.map +0 -1
  611. package/cjs/menu/dom/MenuHandler.js.map +0 -1
  612. package/cjs/menu/dom/logic/MenuContainer.js.map +0 -1
  613. package/cjs/menu/dom/logic/MenuElement.js.map +0 -1
  614. package/cjs/menu/dom/logic/MenuElementStyle.js.map +0 -1
  615. package/cjs/plugins/chartTypes.js.map +0 -1
  616. package/cjs/scenegraph/layout/auto-width.d.ts +0 -2
  617. package/cjs/scenegraph/layout/auto-width.js +0 -85
  618. package/cjs/scenegraph/layout/auto-width.js.map +0 -1
  619. package/cjs/tooltip/BaseTooltip.js.map +0 -1
  620. package/cjs/tooltip/Tooltip.js.map +0 -1
  621. package/cjs/tooltip/TooltipHandler.js.map +0 -1
  622. package/cjs/tooltip/logic/BubbleTooltipElement.js.map +0 -1
  623. package/cjs/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
  624. package/es/chartType.js.map +0 -1
  625. package/es/menu/dom/BaseMenu.js.map +0 -1
  626. package/es/menu/dom/Menu.js.map +0 -1
  627. package/es/menu/dom/MenuHandler.js.map +0 -1
  628. package/es/menu/dom/logic/MenuContainer.js.map +0 -1
  629. package/es/menu/dom/logic/MenuElement.js.map +0 -1
  630. package/es/menu/dom/logic/MenuElementStyle.js.map +0 -1
  631. package/es/plugins/chartTypes.js +0 -2
  632. package/es/plugins/chartTypes.js.map +0 -1
  633. package/es/scenegraph/layout/auto-width.d.ts +0 -2
  634. package/es/scenegraph/layout/auto-width.js +0 -82
  635. package/es/scenegraph/layout/auto-width.js.map +0 -1
  636. package/es/tooltip/BaseTooltip.js.map +0 -1
  637. package/es/tooltip/Tooltip.js.map +0 -1
  638. package/es/tooltip/TooltipHandler.js.map +0 -1
  639. package/es/tooltip/logic/BubbleTooltipElement.js.map +0 -1
  640. package/es/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
  641. /package/cjs/{chartType.d.ts → chartModule.d.ts} +0 -0
  642. /package/cjs/{menu → components/menu}/dom/BaseMenu.js +0 -0
  643. /package/cjs/{menu → components/menu}/dom/Menu.d.ts +0 -0
  644. /package/cjs/{menu → components/menu}/dom/Menu.js +0 -0
  645. /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
  646. /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
  647. /package/cjs/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
  648. /package/cjs/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
  649. /package/cjs/{tooltip → components/tooltip}/Tooltip.js +0 -0
  650. /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
  651. /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
  652. /package/cjs/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
  653. /package/es/{chartType.d.ts → chartModule.d.ts} +0 -0
  654. /package/es/{menu → components/menu}/dom/BaseMenu.js +0 -0
  655. /package/es/{menu → components/menu}/dom/Menu.d.ts +0 -0
  656. /package/es/{menu → components/menu}/dom/Menu.js +0 -0
  657. /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
  658. /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
  659. /package/es/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
  660. /package/es/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
  661. /package/es/{tooltip → components/tooltip}/Tooltip.js +0 -0
  662. /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
  663. /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
  664. /package/es/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
@@ -30,7 +30,7 @@ Object.defineProperty(exports, "__esModule", {
30
30
  value: !0
31
31
  }), exports.SceneProxy = void 0;
32
32
 
33
- const group_1 = require("../../graphic/group"), compute_col_width_1 = require("../../layout/compute-col-width"), compute_row_height_1 = require("../../layout/compute-row-height"), empty_group_1 = require("../../utils/empty-group"), column_1 = require("../column"), column_helper_1 = require("../column-helper"), dynamic_set_x_1 = require("./update-position/dynamic-set-x"), dynamic_set_y_1 = require("./update-position/dynamic-set-y"), update_auto_row_1 = require("./update-position/update-auto-row");
33
+ const group_1 = require("../../graphic/group"), compute_col_width_1 = require("../../layout/compute-col-width"), compute_row_height_1 = require("../../layout/compute-row-height"), empty_group_1 = require("../../utils/empty-group"), column_1 = require("../column"), column_helper_1 = require("../column-helper"), create_group_for_first_screen_1 = require("./create-group-for-first-screen"), dynamic_set_x_1 = require("./update-position/dynamic-set-x"), dynamic_set_y_1 = require("./update-position/dynamic-set-y"), update_auto_row_1 = require("./update-position/update-auto-row");
34
34
 
35
35
  class SceneProxy {
36
36
  constructor(table) {
@@ -40,7 +40,7 @@ class SceneProxy {
40
40
  this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount);
41
41
  }
42
42
  setParamsForColumn() {
43
- this.bodyLeftCol = this.table.rowHeaderLevelCount, this.bodyRightCol = this.table.colCount - 1;
43
+ this.bodyLeftCol = this.table.rowHeaderLevelCount, this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;
44
44
  const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
45
45
  this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1, this.colStart = this.bodyLeftCol;
46
46
  const defaultColWidth = this.table.defaultColWidth;
@@ -53,8 +53,7 @@ class SceneProxy {
53
53
  this.colUpdatePos = this.bodyRightCol;
54
54
  }
55
55
  setParamsForRow() {
56
- this.bodyTopRow = this.table.columnHeaderLevelCount, this.bodyBottomRow = this.table.rowCount - 1,
57
- this.bodyLeftCol = 0, this.bodyRightCol = this.table.colCount - 1;
56
+ this.bodyTopRow = this.table.columnHeaderLevelCount, this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
58
57
  const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
59
58
  this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1, this.rowStart = this.bodyTopRow;
60
59
  const defaultRowHeight = this.table.defaultRowHeight;
@@ -66,30 +65,9 @@ class SceneProxy {
66
65
  this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight),
67
66
  this.rowUpdatePos = this.bodyBottomRow;
68
67
  }
69
- createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, bodyGroup, xOrigin, yOrigin) {
70
- var _a, _b, _c, _d;
68
+ createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
71
69
  return __awaiter(this, void 0, void 0, (function*() {
72
- this.setParamsForRow(), this.setParamsForColumn(), this.table.internalProps._colWidthsMap.clear(),
73
- this.table._clearColRangeWidthsMap(), (0, compute_col_width_1.computeColsWidth)(this.table, 0, Math.min(this.firstScreenColLimit, this.table.colCount - 1)),
74
- this.table.internalProps._rowHeightsMap.clear(), this.table._clearRowRangeHeightsMap(),
75
- (0, compute_row_height_1.computeRowsHeight)(this.table, 0, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1)),
76
- this.table.scenegraph.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth()),
77
- this.table.scenegraph.rowHeaderGroup.setAttribute("y", this.table.getFrozenRowsHeight()),
78
- this.table.scenegraph.bodyGroup.setAttributes({
79
- x: this.table.getFrozenColsWidth(),
80
- y: this.table.getFrozenRowsHeight()
81
- }), (0, column_1.createColGroup)(cornerHeaderGroup, xOrigin, yOrigin, 0, this.table.rowHeaderLevelCount - 1, 0, this.table.columnHeaderLevelCount - 1, "cornerHeader", this.table),
82
- (0, column_1.createColGroup)(colHeaderGroup, xOrigin, yOrigin, this.table.rowHeaderLevelCount, Math.min(this.firstScreenColLimit, this.table.colCount - 1), 0, this.table.columnHeaderLevelCount - 1, "columnHeader", this.table),
83
- (0, column_1.createColGroup)(rowHeaderGroup, xOrigin, yOrigin, 0, this.table.rowHeaderLevelCount - 1, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1), "rowHeader", this.table),
84
- (0, column_1.createColGroup)(bodyGroup, xOrigin, yOrigin, this.table.rowHeaderLevelCount, Math.min(this.firstScreenColLimit, this.table.colCount - 1), this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1), "body", this.table),
85
- bodyGroup.firstChild ? (this.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : this.totalRow,
86
- this.rowEnd = this.currentRow, this.rowUpdatePos = this.rowEnd, this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2),
87
- this.currentCol = null !== (_d = null === (_c = bodyGroup.lastChild) || void 0 === _c ? void 0 : _c.col) && void 0 !== _d ? _d : this.totalCol,
88
- this.colEnd = this.currentCol, this.colUpdatePos = this.colEnd, this.referenceCol = this.colStart + Math.floor((this.colEnd - this.colStart) / 2),
89
- yield this.progress()) : (this.currentRow = this.totalRow, this.rowEnd = this.currentRow,
90
- this.rowUpdatePos = this.rowEnd, this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2),
91
- this.currentCol = this.totalCol, this.colEnd = this.currentCol, this.colUpdatePos = this.colEnd,
92
- this.referenceCol = this.colStart + Math.floor((this.colEnd - this.colStart) / 2));
70
+ yield (0, create_group_for_first_screen_1.createGroupForFirstScreen)(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
93
71
  }));
94
72
  }
95
73
  createColGroupForFirstScreen(rowHeaderGroup, bodyGroup, xOrigin, yOrigin, table) {
@@ -130,10 +108,26 @@ class SceneProxy {
130
108
  }
131
109
  createRowCellGroup(onceCount) {
132
110
  const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
133
- (0, compute_row_height_1.computeRowsHeight)(this.table, this.currentRow + 1, endRow);
111
+ if ((0, compute_row_height_1.computeRowsHeight)(this.table, this.currentRow + 1, endRow),
112
+ this.table.rowHeaderLevelCount) {
113
+ let maxHeight = 0;
114
+ for (let col = 0; col < this.table.rowHeaderLevelCount; col++) {
115
+ const colGroup = this.table.scenegraph.getColGroup(col), cellType = "rowHeader", {height: height} = (0,
116
+ column_helper_1.createComplexColumn)(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
117
+ maxHeight = Math.max(maxHeight, height), this.table.scenegraph.rowHeaderGroup.setAttribute("height", maxHeight);
118
+ }
119
+ }
120
+ if (this.table.rightFrozenColCount) {
121
+ let maxHeight = 0;
122
+ for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {
123
+ const colGroup = this.table.scenegraph.getColGroup(col), cellType = "rowHeader", {height: height} = (0,
124
+ column_helper_1.createComplexColumn)(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
125
+ maxHeight = Math.max(maxHeight, height), this.table.scenegraph.rightFrozenGroup.setAttribute("height", maxHeight);
126
+ }
127
+ }
134
128
  let maxHeight = 0;
135
129
  for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {
136
- const colGroup = this.table.scenegraph.getColGroup(col), cellType = col < this.table.rowHeaderLevelCount ? "rowHeader" : "body", {height: height} = (0,
130
+ const colGroup = this.table.scenegraph.getColGroup(col), cellType = "body", {height: height} = (0,
137
131
  column_helper_1.createComplexColumn)(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
138
132
  maxHeight = Math.max(maxHeight, height);
139
133
  }
@@ -143,7 +137,15 @@ class SceneProxy {
143
137
  }
144
138
  createColGroup(onceCount) {
145
139
  const endCol = Math.min(this.totalCol, this.currentCol + onceCount);
146
- (0, compute_col_width_1.computeColsWidth)(this.table, this.currentCol + 1, endCol);
140
+ if ((0, compute_col_width_1.computeColsWidth)(this.table, this.currentCol + 1, endCol),
141
+ this.table.columnHeaderLevelCount) {
142
+ const lastColumnGroup = this.table.scenegraph.colHeaderGroup.lastChild instanceof group_1.Group ? this.table.scenegraph.colHeaderGroup.lastChild : this.table.scenegraph.colHeaderGroup.lastChild._prev, xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width, yOrigin = lastColumnGroup.attribute.y;
143
+ (0, column_1.createColGroup)(this.table.scenegraph.colHeaderGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, 0, this.table.columnHeaderLevelCount - 1, "columnHeader", this.table);
144
+ }
145
+ if (this.table.bottomFrozenRowCount) {
146
+ const lastColumnGroup = this.table.scenegraph.bottomFrozenGroup.lastChild instanceof group_1.Group ? this.table.scenegraph.bottomFrozenGroup.lastChild : this.table.scenegraph.bottomFrozenGroup.lastChild._prev, xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width, yOrigin = lastColumnGroup.attribute.y;
147
+ (0, column_1.createColGroup)(this.table.scenegraph.bottomFrozenGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.table.rowCount - this.table.bottomFrozenRowCount, this.table.rowCount - 1, "columnHeader", this.table);
148
+ }
147
149
  const lastColumnGroup = this.table.scenegraph.bodyGroup.lastChild instanceof group_1.Group ? this.table.scenegraph.bodyGroup.lastChild : this.table.scenegraph.bodyGroup.lastChild._prev, xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width, yOrigin = lastColumnGroup.attribute.y;
148
150
  (0, column_1.createColGroup)(this.table.scenegraph.bodyGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.rowStart, this.rowEnd, "body", this.table),
149
151
  this.currentCol = endCol, this.colEnd = endCol, this.colUpdatePos = this.colEnd,
@@ -180,12 +182,9 @@ class SceneProxy {
180
182
  }
181
183
  updateCellGroups(count) {
182
184
  const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
183
- this.table.internalProps.autoRowHeight && (0, compute_row_height_1.computeRowsHeight)(this.table, this.rowUpdatePos, distRow);
184
- for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = this.rowUpdatePos; row <= distRow; row++) {
185
- const cellGroup = this.highPerformanceGetCell(col, row);
186
- this.updateCellGroupContent(cellGroup);
187
- }
188
- this.table.internalProps.autoRowHeight && (0, update_auto_row_1.updateAutoRow)(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection),
185
+ "autoHeight" === this.table.heightMode && (0, compute_row_height_1.computeRowsHeight)(this.table, this.rowUpdatePos, distRow),
186
+ (0, dynamic_set_y_1.updateRowContent)(this.rowUpdatePos, distRow, this), "autoHeight" === this.table.heightMode && (0,
187
+ update_auto_row_1.updateAutoRow)(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection),
189
188
  this.rowUpdatePos = distRow + 1;
190
189
  }
191
190
  updateColCellGroupsAsync() {
@@ -195,17 +194,8 @@ class SceneProxy {
195
194
  }
196
195
  updateColGroups(count) {
197
196
  const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);
198
- for (let col = this.colUpdatePos; col <= distCol; col++) {
199
- const colGroup = this.table.scenegraph.getColGroup(col);
200
- if (colGroup) {
201
- let cellGroup = colGroup.firstChild;
202
- for (;cellGroup; ) {
203
- cellGroup = this.updateCellGroupContent(cellGroup)._next;
204
- }
205
- colGroup.needUpdate = !1;
206
- }
207
- }
208
- this.colUpdatePos = distCol + 1;
197
+ (0, compute_col_width_1.computeColsWidth)(this.table, this.colUpdatePos, distCol),
198
+ (0, dynamic_set_x_1.updateColContent)(this.colUpdatePos, distCol, this), this.colUpdatePos = distCol + 1;
209
199
  }
210
200
  updateCellGroupPosition(cellGroup, newRow, y) {
211
201
  cellGroup.row = newRow, cellGroup.setAttribute("y", y), cellGroup.needUpdate = !0,
@@ -222,32 +212,32 @@ class SceneProxy {
222
212
  this.highPerformanceGetCell(col, row).needUpdate = !0;
223
213
  }
224
214
  let syncTopRow, syncBottomRow;
225
- this.table.internalProps.autoRowHeight ? (syncTopRow = this.rowStart, syncBottomRow = this.rowEnd) : (syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - 2 * this.screenRowCount),
215
+ "autoHeight" === this.table.heightMode ? (syncTopRow = this.rowStart, syncBottomRow = this.rowEnd) : (syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - 2 * this.screenRowCount),
226
216
  syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + 3 * this.screenRowCount)),
227
- console.log("sort更新同步范围", syncTopRow, syncBottomRow), this.table.internalProps.autoRowHeight && (0,
217
+ console.log("sort更新同步范围", syncTopRow, syncBottomRow), "autoHeight" === this.table.heightMode && (0,
228
218
  compute_row_height_1.computeRowsHeight)(this.table, syncTopRow, syncBottomRow);
229
219
  for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
230
220
  const cellGroup = this.highPerformanceGetCell(col, row);
231
221
  this.updateCellGroupContent(cellGroup);
232
222
  }
233
223
  if (console.log("updateAutoRow", this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
234
- this.table.internalProps.autoRowHeight && (0, update_auto_row_1.updateAutoRow)(this.bodyLeftCol, this.bodyRightCol, syncTopRow, syncBottomRow, this.table, this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
224
+ "autoHeight" === this.table.heightMode && (0, update_auto_row_1.updateAutoRow)(this.bodyLeftCol, this.bodyRightCol, syncTopRow, syncBottomRow, this.table, this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
235
225
  this.rowUpdatePos = this.rowStart, this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up",
236
226
  this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow && this.rowStart === this.table.scenegraph.proxy.bodyTopRow) ; else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {
237
227
  const top = this.table.getAllRowsHeight() - this.table.scenegraph.height;
238
228
  this.updateBody(top);
239
229
  } else this.rowStart === this.table.scenegraph.proxy.bodyTopRow && this.updateBody(0);
240
- this.table.internalProps.autoRowHeight || (yield this.progress());
230
+ "autoHeight" !== this.table.heightMode && (yield this.progress());
241
231
  }));
242
232
  }
243
- highPerformanceGetCell(col, row, rowStart = this.rowStart, rowEnd = this.rowEnd, getShadow) {
244
- if (row < rowStart || row > rowEnd) return empty_group_1.emptyGroup;
245
- if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) return empty_group_1.emptyGroup;
233
+ highPerformanceGetCell(col, row, getShadow) {
234
+ if (row >= this.table.columnHeaderLevelCount && row < this.table.rowCount - this.table.bottomFrozenRowCount && (row < this.rowStart || row > this.rowEnd)) return empty_group_1.emptyGroup;
235
+ if (col >= this.table.rowHeaderLevelCount && col < this.table.colCount - this.table.rightFrozenColCount && (col < this.colStart || col > this.colEnd)) return empty_group_1.emptyGroup;
246
236
  if (this.cellCache.get(col)) {
247
237
  const cacheCellGoup = this.cellCache.get(col);
248
238
  if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {
249
239
  let cellGroup = getCellByCache(cacheCellGoup, row);
250
- return cellGroup || (cellGroup = this.table.scenegraph.getCell(col, row, getShadow)),
240
+ return cellGroup && (getShadow || "shadow-cell" !== cellGroup.role) || (cellGroup = this.table.scenegraph.getCell(col, row, getShadow)),
251
241
  cellGroup.row && this.cellCache.set(col, cellGroup), cellGroup;
252
242
  }
253
243
  const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);
@@ -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;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,cA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,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 getC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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, updateColContent } from './update-position/dynamic-set-x';\nimport { dynamicSetY, updateRowContent } 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 if (this.table.columnHeaderLevelCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create colHeaderGroup\n createColGroup(\n this.table.scenegraph.colHeaderGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n if (this.table.bottomFrozenRowCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group\n ? this.table.scenegraph.bottomFrozenGroup.lastChild\n : this.table.scenegraph.bottomFrozenGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bottomFrozenGroup\n createColGroup(\n this.table.scenegraph.bottomFrozenGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.table.rowCount - this.table.bottomFrozenRowCount, // rowStart\n this.table.rowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\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\n updateRowContent(this.rowUpdatePos, distRow, this);\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 computeColsWidth(this.table, this.colUpdatePos, distCol);\n updateColContent(this.colUpdatePos, distCol, this);\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\n if (\n row >= this.table.columnHeaderLevelCount && // not column header\n row < this.table.rowCount - this.table.bottomFrozenRowCount && // not bottom frozen\n (row < this.rowStart || row > this.rowEnd) // not in proxy row range\n ) {\n return emptyGroup;\n }\n\n if (\n col >= this.table.rowHeaderLevelCount && // not row header\n col < this.table.colCount - this.table.rightFrozenColCount && // not right frozen\n (col < this.colStart || col > this.colEnd) // not in proxy col range\n ) {\n return emptyGroup;\n }\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 || (!getShadow && cellGroup.role === 'shadow-cell')) {\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,2 +1,3 @@
1
1
  import type { SceneProxy } from '../proxy';
2
2
  export declare function dynamicSetX(x: number, proxy: SceneProxy): Promise<void>;
3
+ export declare function updateColContent(syncLeftCol: number, syncRightCol: number, proxy: SceneProxy): void;
@@ -28,9 +28,9 @@ var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, gener
28
28
 
29
29
  Object.defineProperty(exports, "__esModule", {
30
30
  value: !0
31
- }), exports.dynamicSetX = void 0;
31
+ }), exports.updateColContent = exports.dynamicSetX = void 0;
32
32
 
33
- const compute_col_width_1 = require("../../../layout/compute-col-width");
33
+ const compute_col_width_1 = require("../../../layout/compute-col-width"), get_cell_merge_1 = require("../../../utils/get-cell-merge"), cell_helper_1 = require("../../cell-helper");
34
34
 
35
35
  function dynamicSetX(x, proxy) {
36
36
  return __awaiter(this, void 0, void 0, (function*() {
@@ -47,25 +47,15 @@ function dynamicSetX(x, proxy) {
47
47
  function moveColumn(count, direction, screenLeftCol, proxy) {
48
48
  return __awaiter(this, void 0, void 0, (function*() {
49
49
  "left" === direction && proxy.colEnd + count > proxy.bodyRightCol ? count = proxy.bodyRightCol - proxy.colEnd : "right" === direction && proxy.colStart - count < proxy.bodyLeftCol && (count = proxy.colStart - proxy.bodyLeftCol);
50
- const bodyGroup = proxy.table.scenegraph.bodyGroup;
50
+ proxy.table.scenegraph.bodyGroup;
51
51
  if (count < proxy.colEnd - proxy.colStart) {
52
52
  const startCol = "left" === direction ? proxy.colStart : proxy.colEnd - count + 1, endCol = "left" === direction ? proxy.colStart + count - 1 : proxy.colEnd, distStartCol = "left" === direction ? proxy.colEnd + 1 : proxy.colStart - count, distEndCol = "left" === direction ? proxy.colEnd + count : proxy.colStart - 1;
53
- (0, compute_col_width_1.computeColsWidth)(proxy.table, distStartCol, distEndCol);
54
- for (let col = startCol; col <= endCol; col++) if ("left" === direction) {
55
- const colGroup = bodyGroup.firstChild;
56
- updateColGroupPosition(colGroup, bodyGroup.lastChild.col + 1, bodyGroup.lastChild.attribute.x + bodyGroup.lastChild.attribute.width),
57
- bodyGroup.appendChild(colGroup);
58
- } else {
59
- const colGroup = bodyGroup.lastChild;
60
- updateColGroupPosition(colGroup, bodyGroup.firstChild.col - 1, bodyGroup.firstChild.attribute.x - proxy.table.getColWidth(bodyGroup.firstChild.col - 1)),
61
- bodyGroup.insertBefore(colGroup, bodyGroup.firstChild);
62
- }
53
+ (0, compute_col_width_1.computeColsWidth)(proxy.table, distStartCol, distEndCol),
54
+ updatePartColPosition(startCol, endCol, direction, proxy);
63
55
  const syncLeftCol = Math.max(proxy.bodyLeftCol, screenLeftCol - 1 * proxy.screenColCount), syncRightCol = Math.min(proxy.bodyRightCol, screenLeftCol + 2 * proxy.screenColCount);
64
- for (let col = syncLeftCol; col <= syncRightCol; col++) {
65
- updateColGroupContent(proxy.table.scenegraph.getColGroup(col), proxy);
66
- }
67
56
  proxy.colStart = "left" === direction ? proxy.colStart + count : proxy.colStart - count,
68
57
  proxy.colEnd = "left" === direction ? proxy.colEnd + count : proxy.colEnd - count,
58
+ checkFirstColMerge(distStartCol, proxy), updateColContent(syncLeftCol, syncRightCol, proxy),
69
59
  proxy.currentCol = "left" === direction ? proxy.currentCol + count : proxy.currentCol - count,
70
60
  proxy.totalCol = "left" === direction ? proxy.totalCol + count : proxy.totalCol - count,
71
61
  proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2),
@@ -76,16 +66,10 @@ function moveColumn(count, direction, screenLeftCol, proxy) {
76
66
  (0, compute_col_width_1.computeColsWidth)(proxy.table, distStartCol, distEndCol);
77
67
  const distStartColY = proxy.table.getColsWidth(proxy.bodyLeftCol, distStartCol - 1);
78
68
  console.log("distStartColY", proxy.bodyLeftCol, distStartCol - 1, distStartColY),
79
- bodyGroup.forEachChildren(((colGroup, index) => {
80
- "group" === colGroup.type && updateColGroupPosition(colGroup, "left" === direction ? colGroup.col + count : colGroup.col - count, 0 === index ? distStartColY : colGroup._prev.attribute.x + proxy.table.getColWidth(colGroup._prev.col));
81
- }));
69
+ updateAllColPosition(distStartColY, count, direction, proxy);
82
70
  const syncLeftCol = Math.max(proxy.bodyLeftCol, screenLeftCol - 1 * proxy.screenRowCount), syncRightCol = Math.min(proxy.bodyRightCol, screenLeftCol + 2 * proxy.screenRowCount);
83
- for (let col = syncLeftCol; col <= syncRightCol; col++) {
84
- updateColGroupContent(proxy.table.scenegraph.getColGroup(col), proxy);
85
- }
86
- const cellGroup = proxy.table.scenegraph.getCell(screenLeftCol, 0);
87
- cellGroup.AABBBounds.width(), console.log("leftCell", cellGroup.col, cellGroup.globalAABBBounds, cellGroup),
88
- proxy.colStart = distStartCol, proxy.colEnd = distEndCol, proxy.currentCol = "left" === direction ? proxy.currentCol + count : proxy.currentCol - count,
71
+ proxy.colStart = distStartCol, proxy.colEnd = distEndCol, checkFirstColMerge(distStartCol, proxy),
72
+ updateColContent(syncLeftCol, syncRightCol, proxy), proxy.currentCol = "left" === direction ? proxy.currentCol + count : proxy.currentCol - count,
89
73
  proxy.totalCol = "left" === direction ? proxy.totalCol + count : proxy.totalCol - count,
90
74
  proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2),
91
75
  proxy.colUpdatePos = proxy.colStart, proxy.colUpdateDirection = distEndCol > proxy.bodyRightCol - (proxy.colEnd - proxy.colStart + 1) ? "right" : "left",
@@ -108,5 +92,55 @@ function updateColGroupContent(colGroup, proxy) {
108
92
  colGroup.needUpdate = !1;
109
93
  }
110
94
 
111
- exports.dynamicSetX = dynamicSetX;
95
+ function updatePartColPosition(startCol, endCol, direction, proxy) {
96
+ for (let col = startCol; col <= endCol; col++) proxy.table.scenegraph.bodyGroup.childrenCount > 0 && updateColPosition(proxy.table.scenegraph.bodyGroup, direction, proxy),
97
+ proxy.table.scenegraph.colHeaderGroup.childrenCount > 0 && updateColPosition(proxy.table.scenegraph.bodyGroup, direction, proxy),
98
+ proxy.table.scenegraph.bottomFrozenGroup.childrenCount > 0 && updateColPosition(proxy.table.scenegraph.bodyGroup, direction, proxy);
99
+ }
100
+
101
+ function updateColPosition(containerGroup, direction, proxy) {
102
+ if ("left" === direction) {
103
+ const colGroup = containerGroup.firstChild;
104
+ updateColGroupPosition(colGroup, containerGroup.lastChild.col + 1, containerGroup.lastChild.attribute.x + containerGroup.lastChild.attribute.width),
105
+ containerGroup.appendChild(colGroup);
106
+ } else {
107
+ const colGroup = containerGroup.lastChild;
108
+ updateColGroupPosition(colGroup, containerGroup.firstChild.col - 1, containerGroup.firstChild.attribute.x - proxy.table.getColWidth(containerGroup.firstChild.col - 1)),
109
+ containerGroup.insertBefore(colGroup, containerGroup.firstChild);
110
+ }
111
+ }
112
+
113
+ function updateColContent(syncLeftCol, syncRightCol, proxy) {
114
+ for (let col = syncLeftCol; col <= syncRightCol; col++) {
115
+ updateColGroupContent(proxy.table.scenegraph.getColGroup(col), proxy);
116
+ updateColGroupContent(proxy.table.scenegraph.getColGroup(col, !0), proxy);
117
+ updateColGroupContent(proxy.table.scenegraph.getColGroupInBottom(col), proxy);
118
+ }
119
+ }
120
+
121
+ function updateAllColPosition(distStartColY, count, direction, proxy) {
122
+ proxy.table.scenegraph.colHeaderGroup.forEachChildren(((colGroup, index) => {
123
+ "group" === colGroup.type && updateColGroupPosition(colGroup, "left" === direction ? colGroup.col + count : colGroup.col - count, 0 === index ? distStartColY : colGroup._prev.attribute.x + proxy.table.getColWidth(colGroup._prev.col));
124
+ })), proxy.table.scenegraph.bottomFrozenGroup.forEachChildren(((colGroup, index) => {
125
+ "group" === colGroup.type && updateColGroupPosition(colGroup, "left" === direction ? colGroup.col + count : colGroup.col - count, 0 === index ? distStartColY : colGroup._prev.attribute.x + proxy.table.getColWidth(colGroup._prev.col));
126
+ })), proxy.table.scenegraph.bodyGroup.forEachChildren(((colGroup, index) => {
127
+ "group" === colGroup.type && updateColGroupPosition(colGroup, "left" === direction ? colGroup.col + count : colGroup.col - count, 0 === index ? distStartColY : colGroup._prev.attribute.x + proxy.table.getColWidth(colGroup._prev.col));
128
+ }));
129
+ }
130
+
131
+ function checkFirstColMerge(col, proxy) {
132
+ for (let row = 0; row < proxy.table.rowCount; row++) {
133
+ if (row >= proxy.table.columnHeaderLevelCount && row < proxy.rowStart || row > proxy.rowEnd && row < proxy.table.rowCount - proxy.table.bottomFrozenRowCount) continue;
134
+ const range = (0, get_cell_merge_1.getCellMergeInfo)(proxy.table, col, row);
135
+ if (range && range.start.row !== row) {
136
+ const oldCellGroup = proxy.highPerformanceGetCell(col, row, !0), newCellGroup = (0,
137
+ cell_helper_1.updateCell)(range.start.col, range.start.row, proxy.table, !0);
138
+ newCellGroup.col = col, newCellGroup.row = row, newCellGroup.setAttribute("x", proxy.table.getColsWidth(proxy.table.rowHeaderLevelCount, range.start.col - 1)),
139
+ oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup), oldCellGroup.parent.removeChild(oldCellGroup),
140
+ oldCellGroup.needUpdate = !1, newCellGroup.needUpdate = !1, proxy.cellCache.get(col) && proxy.cellCache.set(col, newCellGroup);
141
+ }
142
+ }
143
+ }
144
+
145
+ exports.dynamicSetX = dynamicSetX, exports.updateColContent = updateColContent;
112
146
  //# sourceMappingURL=dynamic-set-x.js.map