@visactor/vtable 0.9.1 → 0.9.2-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 (611) hide show
  1. package/cjs/ListTable.d.ts +2 -1
  2. package/cjs/ListTable.js +17 -13
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +68 -0
  5. package/cjs/PivotChart.js +427 -0
  6. package/cjs/PivotChart.js.map +1 -0
  7. package/cjs/PivotTable.d.ts +2 -1
  8. package/cjs/PivotTable.js +18 -13
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/body-helper/style/MultilineTextStyle.js +2 -2
  11. package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -1
  12. package/cjs/body-helper/style/ProgressBarStyle.js +15 -15
  13. package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
  14. package/cjs/body-helper/style/Style.d.ts +0 -1
  15. package/cjs/body-helper/style/Style.js +25 -28
  16. package/cjs/body-helper/style/Style.js.map +1 -1
  17. package/cjs/components/axis/axis.d.ts +45 -0
  18. package/cjs/components/axis/axis.js +146 -0
  19. package/cjs/components/axis/axis.js.map +1 -0
  20. package/cjs/components/axis/band-scale.d.ts +18 -0
  21. package/cjs/components/axis/band-scale.js +54 -0
  22. package/cjs/components/axis/band-scale.js.map +1 -0
  23. package/cjs/components/axis/get-axis-attributes.d.ts +136 -0
  24. package/cjs/components/axis/get-axis-attributes.js +169 -0
  25. package/cjs/components/axis/get-axis-attributes.js.map +1 -0
  26. package/cjs/components/axis/label-overlap.d.ts +3 -0
  27. package/cjs/components/axis/label-overlap.js +46 -0
  28. package/cjs/components/axis/label-overlap.js.map +1 -0
  29. package/cjs/components/axis/linear-scale.d.ts +45 -0
  30. package/cjs/components/axis/linear-scale.js +120 -0
  31. package/cjs/components/axis/linear-scale.js.map +1 -0
  32. package/cjs/components/legend/get-legend-attributes.d.ts +5 -0
  33. package/cjs/components/legend/get-legend-attributes.js +90 -0
  34. package/cjs/components/legend/get-legend-attributes.js.map +1 -0
  35. package/cjs/components/legend/legend.d.ts +23 -0
  36. package/cjs/components/legend/legend.js +94 -0
  37. package/cjs/components/legend/legend.js.map +1 -0
  38. package/cjs/{menu → components/menu}/dom/BaseMenu.d.ts +2 -2
  39. package/cjs/components/menu/dom/BaseMenu.js.map +1 -0
  40. package/cjs/components/menu/dom/Menu.js.map +1 -0
  41. package/{es → cjs/components}/menu/dom/MenuHandler.d.ts +2 -2
  42. package/cjs/{menu → components/menu}/dom/MenuHandler.js +1 -1
  43. package/cjs/components/menu/dom/MenuHandler.js.map +1 -0
  44. package/cjs/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
  45. package/cjs/{menu → components/menu}/dom/logic/MenuContainer.js +2 -2
  46. package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -0
  47. package/cjs/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
  48. package/cjs/{menu → components/menu}/dom/logic/MenuElement.js +4 -4
  49. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -0
  50. package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
  51. package/cjs/components/title/title.d.ts +12 -0
  52. package/cjs/components/title/title.js +66 -0
  53. package/cjs/components/title/title.js.map +1 -0
  54. package/cjs/{tooltip → components/tooltip}/BaseTooltip.d.ts +3 -3
  55. package/cjs/components/tooltip/BaseTooltip.js.map +1 -0
  56. package/cjs/components/tooltip/Tooltip.js.map +1 -0
  57. package/{es → cjs/components}/tooltip/TooltipHandler.d.ts +4 -4
  58. package/cjs/{tooltip → components/tooltip}/TooltipHandler.js +1 -1
  59. package/cjs/components/tooltip/TooltipHandler.js.map +1 -0
  60. package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElement.d.ts +4 -4
  61. package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +1 -1
  62. package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
  63. package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
  64. package/cjs/components/util/orient.d.ts +3 -0
  65. package/cjs/components/util/orient.js +14 -0
  66. package/cjs/components/util/orient.js.map +1 -0
  67. package/cjs/components/util/register.d.ts +3 -0
  68. package/cjs/components/util/register.js +15 -0
  69. package/cjs/components/util/register.js.map +1 -0
  70. package/cjs/components/util/tick-data/config.d.ts +1 -0
  71. package/cjs/components/util/tick-data/config.js +6 -0
  72. package/cjs/components/util/tick-data/config.js.map +1 -0
  73. package/cjs/components/util/tick-data/continuous.d.ts +2 -0
  74. package/cjs/components/util/tick-data/continuous.js +39 -0
  75. package/cjs/components/util/tick-data/continuous.js.map +1 -0
  76. package/cjs/components/util/tick-data/discrete/linear.d.ts +2 -0
  77. package/cjs/components/util/tick-data/discrete/linear.js +66 -0
  78. package/cjs/components/util/tick-data/discrete/linear.js.map +1 -0
  79. package/cjs/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
  80. package/cjs/components/util/tick-data/discrete/polar-angle.js +46 -0
  81. package/cjs/components/util/tick-data/discrete/polar-angle.js.map +1 -0
  82. package/cjs/components/util/tick-data/index.d.ts +2 -0
  83. package/cjs/components/util/tick-data/index.js +17 -0
  84. package/cjs/components/util/tick-data/index.js.map +1 -0
  85. package/cjs/components/util/tick-data/util.d.ts +21 -0
  86. package/cjs/components/util/tick-data/util.js +115 -0
  87. package/cjs/components/util/tick-data/util.js.map +1 -0
  88. package/cjs/components/util/transform.d.ts +5 -0
  89. package/cjs/components/util/transform.js +45 -0
  90. package/cjs/components/util/transform.js.map +1 -0
  91. package/cjs/core/BaseTable.d.ts +19 -6
  92. package/cjs/core/BaseTable.js +103 -44
  93. package/cjs/core/BaseTable.js.map +1 -1
  94. package/cjs/core/TABLE_EVENT_TYPE.d.ts +3 -0
  95. package/cjs/core/TABLE_EVENT_TYPE.js +4 -1
  96. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  97. package/cjs/core/style.js +1 -1
  98. package/cjs/core/style.js.map +1 -1
  99. package/cjs/core/tableHelper.js +1 -2
  100. package/cjs/data/CachedDataSource.js +2 -1
  101. package/cjs/data/DataSource.js +2 -2
  102. package/cjs/data/DataSource.js.map +1 -1
  103. package/cjs/dataset/dataset.d.ts +12 -19
  104. package/cjs/dataset/dataset.js +168 -196
  105. package/cjs/dataset/dataset.js.map +1 -1
  106. package/cjs/dataset/statistics-helper.d.ts +68 -0
  107. package/cjs/dataset/statistics-helper.js +173 -0
  108. package/cjs/dataset/statistics-helper.js.map +1 -0
  109. package/cjs/dataset/util/zero-align.d.ts +10 -0
  110. package/cjs/dataset/util/zero-align.js +119 -0
  111. package/cjs/dataset/util/zero-align.js.map +1 -0
  112. package/cjs/event/EventHandler.js.map +1 -1
  113. package/cjs/event/EventTarget.d.ts +5 -5
  114. package/cjs/event/EventTarget.js +2 -2
  115. package/cjs/event/EventTarget.js.map +1 -1
  116. package/cjs/event/VChartEventProxy.d.ts +1 -0
  117. package/cjs/event/VChartEventProxy.js +1 -0
  118. package/cjs/event/VChartEventProxy.js.map +1 -0
  119. package/cjs/event/event.js +8 -5
  120. package/cjs/event/event.js.map +1 -1
  121. package/cjs/event/listener/table-group.js +8 -6
  122. package/cjs/event/listener/table-group.js.map +1 -1
  123. package/cjs/event/pivot-chart/axis-click.d.ts +2 -0
  124. package/cjs/event/pivot-chart/axis-click.js +42 -0
  125. package/cjs/event/pivot-chart/axis-click.js.map +1 -0
  126. package/cjs/event/sparkline-event.js.map +1 -1
  127. package/cjs/event/util.js +0 -1
  128. package/cjs/header-helper/header-helper.js +1 -1
  129. package/cjs/header-helper/header-helper.js.map +1 -1
  130. package/cjs/header-helper/style/MultilineTextHeaderStyle.js +2 -2
  131. package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
  132. package/cjs/header-helper/style/Style.d.ts +0 -1
  133. package/cjs/header-helper/style/Style.js +25 -28
  134. package/cjs/header-helper/style/Style.js.map +1 -1
  135. package/cjs/index.d.ts +4 -3
  136. package/cjs/index.js +11 -2
  137. package/cjs/index.js.map +1 -1
  138. package/cjs/layout/index.js +2 -1
  139. package/cjs/layout/pivot-chart/get-axis-config.d.ts +2 -0
  140. package/cjs/layout/pivot-chart/get-axis-config.js +118 -0
  141. package/cjs/layout/pivot-chart/get-axis-config.js.map +1 -0
  142. package/cjs/layout/pivot-chart/get-chart-spec.d.ts +4 -0
  143. package/cjs/layout/pivot-chart/get-chart-spec.js +118 -0
  144. package/cjs/layout/pivot-chart/get-chart-spec.js.map +1 -0
  145. package/cjs/layout/pivot-header-layout.d.ts +13 -5
  146. package/cjs/layout/pivot-header-layout.js +68 -12
  147. package/cjs/layout/pivot-header-layout.js.map +1 -1
  148. package/cjs/layout/pivot-layout.d.ts +55 -8
  149. package/cjs/layout/pivot-layout.js +419 -89
  150. package/cjs/layout/pivot-layout.js.map +1 -1
  151. package/cjs/layout/simple-header-layout.d.ts +10 -0
  152. package/cjs/layout/simple-header-layout.js +40 -0
  153. package/cjs/layout/simple-header-layout.js.map +1 -1
  154. package/cjs/render/layout/container.js +13 -0
  155. package/cjs/render/layout/container.js.map +1 -1
  156. package/cjs/scenegraph/component/table-component.js +3 -3
  157. package/cjs/scenegraph/component/table-component.js.map +1 -1
  158. package/cjs/scenegraph/graphic/chart.d.ts +3 -0
  159. package/cjs/scenegraph/graphic/chart.js +21 -6
  160. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  161. package/cjs/scenegraph/graphic/contributions/chart-render.js +15 -3
  162. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  163. package/cjs/scenegraph/graphic/text.js +5 -5
  164. package/cjs/scenegraph/graphic/text.js.map +1 -1
  165. package/cjs/scenegraph/group-creater/cell-helper.d.ts +1 -1
  166. package/cjs/scenegraph/group-creater/cell-helper.js +21 -12
  167. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  168. package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +2 -1
  169. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
  170. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  171. package/cjs/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
  172. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +1 -2
  173. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  174. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +2 -1
  175. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -3
  176. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  177. package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -2
  178. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +6 -18
  179. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  180. package/cjs/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
  181. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +1 -2
  182. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  183. package/cjs/scenegraph/group-creater/column-helper.js +9 -30
  184. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  185. package/cjs/scenegraph/group-creater/column.js.map +1 -1
  186. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
  187. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +71 -0
  188. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
  189. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +31 -12
  190. package/cjs/scenegraph/group-creater/progress/proxy.js +117 -128
  191. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  192. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +2 -0
  193. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +112 -0
  194. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -0
  195. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +2 -0
  196. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +109 -0
  197. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -0
  198. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.d.ts +2 -0
  199. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js +24 -0
  200. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -0
  201. package/cjs/scenegraph/layout/compute-col-width.d.ts +9 -1
  202. package/cjs/scenegraph/layout/compute-col-width.js +33 -23
  203. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  204. package/cjs/scenegraph/layout/compute-row-height.d.ts +3 -0
  205. package/cjs/scenegraph/layout/compute-row-height.js +173 -0
  206. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -0
  207. package/cjs/scenegraph/layout/move-cell.js +1 -1
  208. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  209. package/cjs/scenegraph/layout/update-cell.js +3 -2
  210. package/cjs/scenegraph/layout/update-cell.js.map +1 -1
  211. package/cjs/scenegraph/layout/update-height.js +4 -3
  212. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  213. package/cjs/scenegraph/layout/update-row.js +1 -1
  214. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  215. package/cjs/scenegraph/layout/update-width.js +4 -3
  216. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  217. package/cjs/scenegraph/refresh-node/update-chart.d.ts +3 -0
  218. package/cjs/scenegraph/refresh-node/update-chart.js +48 -5
  219. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  220. package/cjs/scenegraph/scenegraph.d.ts +13 -5
  221. package/cjs/scenegraph/scenegraph.js +163 -56
  222. package/cjs/scenegraph/scenegraph.js.map +1 -1
  223. package/cjs/scenegraph/stick-text/index.d.ts +1 -0
  224. package/cjs/scenegraph/stick-text/index.js +23 -7
  225. package/cjs/scenegraph/stick-text/index.js.map +1 -1
  226. package/cjs/scenegraph/style/frame-border.js +1 -5
  227. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  228. package/cjs/scenegraph/utils/text-icon-layout.d.ts +2 -1
  229. package/cjs/scenegraph/utils/text-icon-layout.js +6 -5
  230. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  231. package/cjs/state/hover/col.js +4 -4
  232. package/cjs/state/hover/col.js.map +1 -1
  233. package/cjs/state/state.js +1 -1
  234. package/cjs/state/state.js.map +1 -1
  235. package/cjs/themes/DEFAULT.js +1 -2
  236. package/cjs/tools/LimitPromiseQueue.js +2 -1
  237. package/cjs/tools/NumberMap.d.ts +1 -0
  238. package/cjs/tools/NumberMap.js +3 -0
  239. package/cjs/tools/NumberMap.js.map +1 -1
  240. package/cjs/tools/calc.d.ts +3 -0
  241. package/cjs/tools/calc.js +11 -3
  242. package/cjs/tools/calc.js.map +1 -1
  243. package/cjs/tools/diff-cell.js +2 -2
  244. package/cjs/tools/dom.js +1 -1
  245. package/cjs/tools/env.js +1 -1
  246. package/cjs/ts-types/base-table.d.ts +41 -12
  247. package/cjs/ts-types/base-table.js.map +1 -1
  248. package/cjs/ts-types/column/style.d.ts +0 -1
  249. package/cjs/ts-types/column/style.js.map +1 -1
  250. package/cjs/ts-types/component/axis.d.ts +12 -0
  251. package/cjs/ts-types/component/axis.js +6 -0
  252. package/cjs/ts-types/component/axis.js.map +1 -0
  253. package/cjs/ts-types/component/legend.d.ts +5 -0
  254. package/cjs/ts-types/component/legend.js +6 -0
  255. package/cjs/ts-types/component/legend.js.map +1 -0
  256. package/cjs/ts-types/component/title.d.ts +47 -0
  257. package/cjs/ts-types/component/title.js +6 -0
  258. package/cjs/ts-types/component/title.js.map +1 -0
  259. package/cjs/ts-types/component/util.d.ts +1 -0
  260. package/cjs/ts-types/component/util.js +6 -0
  261. package/cjs/ts-types/component/util.js.map +1 -0
  262. package/cjs/ts-types/events.d.ts +100 -83
  263. package/cjs/ts-types/events.js.map +1 -1
  264. package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -0
  265. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  266. package/cjs/ts-types/new-data-set.d.ts +18 -5
  267. package/cjs/ts-types/new-data-set.js +2 -2
  268. package/cjs/ts-types/new-data-set.js.map +1 -1
  269. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
  270. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +3 -1
  271. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
  272. package/cjs/ts-types/pivot-table/corner.d.ts +3 -3
  273. package/cjs/ts-types/pivot-table/corner.js.map +1 -1
  274. package/cjs/ts-types/pivot-table/indicator/index.d.ts +1 -0
  275. package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
  276. package/cjs/ts-types/pivot-table/title.d.ts +1 -1
  277. package/cjs/ts-types/pivot-table/title.js.map +1 -1
  278. package/cjs/ts-types/table-engine.d.ts +27 -3
  279. package/cjs/ts-types/table-engine.js.map +1 -1
  280. package/dist/vtable.js +29113 -17684
  281. package/dist/vtable.min.js +4 -2
  282. package/es/ListTable.d.ts +2 -1
  283. package/es/ListTable.js +17 -13
  284. package/es/ListTable.js.map +1 -1
  285. package/es/PivotChart.d.ts +68 -0
  286. package/es/PivotChart.js +437 -0
  287. package/es/PivotChart.js.map +1 -0
  288. package/es/PivotTable.d.ts +2 -1
  289. package/es/PivotTable.js +19 -14
  290. package/es/PivotTable.js.map +1 -1
  291. package/es/body-helper/style/MultilineTextStyle.js +2 -2
  292. package/es/body-helper/style/MultilineTextStyle.js.map +1 -1
  293. package/es/body-helper/style/ProgressBarStyle.js +15 -15
  294. package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
  295. package/es/body-helper/style/Style.d.ts +0 -1
  296. package/es/body-helper/style/Style.js +25 -28
  297. package/es/body-helper/style/Style.js.map +1 -1
  298. package/es/components/axis/axis.d.ts +45 -0
  299. package/es/components/axis/axis.js +155 -0
  300. package/es/components/axis/axis.js.map +1 -0
  301. package/es/components/axis/band-scale.d.ts +18 -0
  302. package/es/components/axis/band-scale.js +46 -0
  303. package/es/components/axis/band-scale.js.map +1 -0
  304. package/es/components/axis/get-axis-attributes.d.ts +136 -0
  305. package/es/components/axis/get-axis-attributes.js +166 -0
  306. package/es/components/axis/get-axis-attributes.js.map +1 -0
  307. package/es/components/axis/label-overlap.d.ts +3 -0
  308. package/es/components/axis/label-overlap.js +39 -0
  309. package/es/components/axis/label-overlap.js.map +1 -0
  310. package/es/components/axis/linear-scale.d.ts +45 -0
  311. package/es/components/axis/linear-scale.js +104 -0
  312. package/es/components/axis/linear-scale.js.map +1 -0
  313. package/es/components/legend/get-legend-attributes.d.ts +5 -0
  314. package/es/components/legend/get-legend-attributes.js +84 -0
  315. package/es/components/legend/get-legend-attributes.js.map +1 -0
  316. package/es/components/legend/legend.d.ts +23 -0
  317. package/es/components/legend/legend.js +93 -0
  318. package/es/components/legend/legend.js.map +1 -0
  319. package/es/{menu → components/menu}/dom/BaseMenu.d.ts +2 -2
  320. package/es/components/menu/dom/BaseMenu.js.map +1 -0
  321. package/es/components/menu/dom/Menu.js.map +1 -0
  322. package/{cjs → es/components}/menu/dom/MenuHandler.d.ts +2 -2
  323. package/es/{menu → components/menu}/dom/MenuHandler.js +2 -2
  324. package/es/components/menu/dom/MenuHandler.js.map +1 -0
  325. package/es/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
  326. package/es/{menu → components/menu}/dom/logic/MenuContainer.js +4 -4
  327. package/es/components/menu/dom/logic/MenuContainer.js.map +1 -0
  328. package/es/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
  329. package/es/{menu → components/menu}/dom/logic/MenuElement.js +9 -9
  330. package/es/components/menu/dom/logic/MenuElement.js.map +1 -0
  331. package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
  332. package/es/components/title/title.d.ts +12 -0
  333. package/es/components/title/title.js +61 -0
  334. package/es/components/title/title.js.map +1 -0
  335. package/es/{tooltip → components/tooltip}/BaseTooltip.d.ts +3 -3
  336. package/es/components/tooltip/BaseTooltip.js.map +1 -0
  337. package/es/components/tooltip/Tooltip.js.map +1 -0
  338. package/{cjs → es/components}/tooltip/TooltipHandler.d.ts +4 -4
  339. package/es/{tooltip → components/tooltip}/TooltipHandler.js +4 -4
  340. package/es/components/tooltip/TooltipHandler.js.map +1 -0
  341. package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElement.d.ts +4 -4
  342. package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +4 -4
  343. package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
  344. package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
  345. package/es/components/util/orient.d.ts +3 -0
  346. package/es/components/util/orient.js +8 -0
  347. package/es/components/util/orient.js.map +1 -0
  348. package/es/components/util/register.d.ts +3 -0
  349. package/es/components/util/register.js +8 -0
  350. package/es/components/util/register.js.map +1 -0
  351. package/es/components/util/tick-data/config.d.ts +1 -0
  352. package/es/components/util/tick-data/config.js +2 -0
  353. package/es/components/util/tick-data/config.js.map +1 -0
  354. package/es/components/util/tick-data/continuous.d.ts +2 -0
  355. package/es/components/util/tick-data/continuous.js +38 -0
  356. package/es/components/util/tick-data/continuous.js.map +1 -0
  357. package/es/components/util/tick-data/discrete/linear.d.ts +2 -0
  358. package/es/components/util/tick-data/discrete/linear.js +59 -0
  359. package/es/components/util/tick-data/discrete/linear.js.map +1 -0
  360. package/es/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
  361. package/es/components/util/tick-data/discrete/polar-angle.js +39 -0
  362. package/es/components/util/tick-data/discrete/polar-angle.js.map +1 -0
  363. package/es/components/util/tick-data/index.d.ts +2 -0
  364. package/es/components/util/tick-data/index.js +19 -0
  365. package/es/components/util/tick-data/index.js.map +1 -0
  366. package/es/components/util/tick-data/util.d.ts +21 -0
  367. package/es/components/util/tick-data/util.js +104 -0
  368. package/es/components/util/tick-data/util.js.map +1 -0
  369. package/es/components/util/transform.d.ts +5 -0
  370. package/es/components/util/transform.js +34 -0
  371. package/es/components/util/transform.js.map +1 -0
  372. package/es/core/BaseTable.d.ts +19 -6
  373. package/es/core/BaseTable.js +107 -46
  374. package/es/core/BaseTable.js.map +1 -1
  375. package/es/core/TABLE_EVENT_TYPE.d.ts +3 -0
  376. package/es/core/TABLE_EVENT_TYPE.js +4 -1
  377. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  378. package/es/core/style.js +1 -1
  379. package/es/core/style.js.map +1 -1
  380. package/es/core/tableHelper.js +1 -2
  381. package/es/data/CachedDataSource.js +2 -1
  382. package/es/data/DataSource.js +2 -2
  383. package/es/data/DataSource.js.map +1 -1
  384. package/es/dataset/dataset.d.ts +12 -19
  385. package/es/dataset/dataset.js +161 -187
  386. package/es/dataset/dataset.js.map +1 -1
  387. package/es/dataset/statistics-helper.d.ts +68 -0
  388. package/es/dataset/statistics-helper.js +152 -0
  389. package/es/dataset/statistics-helper.js.map +1 -0
  390. package/es/dataset/util/zero-align.d.ts +10 -0
  391. package/es/dataset/util/zero-align.js +111 -0
  392. package/es/dataset/util/zero-align.js.map +1 -0
  393. package/es/event/EventHandler.js.map +1 -1
  394. package/es/event/EventTarget.d.ts +5 -5
  395. package/es/event/EventTarget.js +2 -2
  396. package/es/event/EventTarget.js.map +1 -1
  397. package/es/event/VChartEventProxy.d.ts +1 -0
  398. package/es/event/VChartEventProxy.js +1 -0
  399. package/es/event/VChartEventProxy.js.map +1 -0
  400. package/es/event/event.js +10 -5
  401. package/es/event/event.js.map +1 -1
  402. package/es/event/listener/table-group.js +8 -6
  403. package/es/event/listener/table-group.js.map +1 -1
  404. package/es/event/pivot-chart/axis-click.d.ts +2 -0
  405. package/es/event/pivot-chart/axis-click.js +36 -0
  406. package/es/event/pivot-chart/axis-click.js.map +1 -0
  407. package/es/event/sparkline-event.js.map +1 -1
  408. package/es/event/util.js +1 -2
  409. package/es/header-helper/header-helper.js +1 -1
  410. package/es/header-helper/header-helper.js.map +1 -1
  411. package/es/header-helper/style/MultilineTextHeaderStyle.js +2 -2
  412. package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
  413. package/es/header-helper/style/Style.d.ts +0 -1
  414. package/es/header-helper/style/Style.js +25 -28
  415. package/es/header-helper/style/Style.js.map +1 -1
  416. package/es/index.d.ts +4 -3
  417. package/es/index.js +4 -2
  418. package/es/index.js.map +1 -1
  419. package/es/layout/index.js +2 -1
  420. package/es/layout/pivot-chart/get-axis-config.d.ts +2 -0
  421. package/es/layout/pivot-chart/get-axis-config.js +110 -0
  422. package/es/layout/pivot-chart/get-axis-config.js.map +1 -0
  423. package/es/layout/pivot-chart/get-chart-spec.d.ts +4 -0
  424. package/es/layout/pivot-chart/get-chart-spec.js +109 -0
  425. package/es/layout/pivot-chart/get-chart-spec.js.map +1 -0
  426. package/es/layout/pivot-header-layout.d.ts +13 -5
  427. package/es/layout/pivot-header-layout.js +67 -11
  428. package/es/layout/pivot-header-layout.js.map +1 -1
  429. package/es/layout/pivot-layout.d.ts +55 -8
  430. package/es/layout/pivot-layout.js +422 -87
  431. package/es/layout/pivot-layout.js.map +1 -1
  432. package/es/layout/simple-header-layout.d.ts +10 -0
  433. package/es/layout/simple-header-layout.js +40 -0
  434. package/es/layout/simple-header-layout.js.map +1 -1
  435. package/es/render/layout/container.js +13 -0
  436. package/es/render/layout/container.js.map +1 -1
  437. package/es/scenegraph/component/table-component.js +3 -3
  438. package/es/scenegraph/component/table-component.js.map +1 -1
  439. package/es/scenegraph/graphic/chart.d.ts +3 -0
  440. package/es/scenegraph/graphic/chart.js +22 -5
  441. package/es/scenegraph/graphic/chart.js.map +1 -1
  442. package/es/scenegraph/graphic/contributions/chart-render.js +15 -3
  443. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  444. package/es/scenegraph/graphic/text.js +5 -5
  445. package/es/scenegraph/graphic/text.js.map +1 -1
  446. package/es/scenegraph/group-creater/cell-helper.d.ts +1 -1
  447. package/es/scenegraph/group-creater/cell-helper.js +22 -10
  448. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  449. package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +2 -1
  450. package/es/scenegraph/group-creater/cell-type/chart-cell.js +5 -6
  451. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  452. package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
  453. package/es/scenegraph/group-creater/cell-type/image-cell.js +0 -3
  454. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  455. package/es/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +2 -1
  456. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -4
  457. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  458. package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -2
  459. package/es/scenegraph/group-creater/cell-type/text-cell.js +3 -17
  460. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  461. package/es/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
  462. package/es/scenegraph/group-creater/cell-type/video-cell.js +0 -3
  463. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  464. package/es/scenegraph/group-creater/column-helper.js +8 -29
  465. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  466. package/es/scenegraph/group-creater/column.js.map +1 -1
  467. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
  468. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +65 -0
  469. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
  470. package/es/scenegraph/group-creater/progress/proxy.d.ts +31 -12
  471. package/es/scenegraph/group-creater/progress/proxy.js +124 -130
  472. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  473. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +2 -0
  474. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +104 -0
  475. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -0
  476. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +2 -0
  477. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +102 -0
  478. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -0
  479. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.d.ts +2 -0
  480. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js +18 -0
  481. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -0
  482. package/es/scenegraph/layout/compute-col-width.d.ts +9 -1
  483. package/es/scenegraph/layout/compute-col-width.js +31 -22
  484. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  485. package/es/scenegraph/layout/compute-row-height.d.ts +3 -0
  486. package/es/scenegraph/layout/compute-row-height.js +175 -0
  487. package/es/scenegraph/layout/compute-row-height.js.map +1 -0
  488. package/es/scenegraph/layout/move-cell.js +1 -1
  489. package/es/scenegraph/layout/move-cell.js.map +1 -1
  490. package/es/scenegraph/layout/update-cell.js +3 -1
  491. package/es/scenegraph/layout/update-cell.js.map +1 -1
  492. package/es/scenegraph/layout/update-height.js +4 -2
  493. package/es/scenegraph/layout/update-height.js.map +1 -1
  494. package/es/scenegraph/layout/update-row.js +1 -1
  495. package/es/scenegraph/layout/update-row.js.map +1 -1
  496. package/es/scenegraph/layout/update-width.js +4 -2
  497. package/es/scenegraph/layout/update-width.js.map +1 -1
  498. package/es/scenegraph/refresh-node/update-chart.d.ts +3 -0
  499. package/es/scenegraph/refresh-node/update-chart.js +45 -4
  500. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  501. package/es/scenegraph/scenegraph.d.ts +13 -5
  502. package/es/scenegraph/scenegraph.js +165 -58
  503. package/es/scenegraph/scenegraph.js.map +1 -1
  504. package/es/scenegraph/stick-text/index.d.ts +1 -0
  505. package/es/scenegraph/stick-text/index.js +21 -5
  506. package/es/scenegraph/stick-text/index.js.map +1 -1
  507. package/es/scenegraph/style/frame-border.js +1 -5
  508. package/es/scenegraph/style/frame-border.js.map +1 -1
  509. package/es/scenegraph/utils/text-icon-layout.d.ts +2 -1
  510. package/es/scenegraph/utils/text-icon-layout.js +4 -4
  511. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  512. package/es/state/hover/col.js +4 -4
  513. package/es/state/hover/col.js.map +1 -1
  514. package/es/state/state.js +1 -1
  515. package/es/state/state.js.map +1 -1
  516. package/es/themes/DEFAULT.js +1 -2
  517. package/es/tools/LimitPromiseQueue.js +2 -1
  518. package/es/tools/NumberMap.d.ts +1 -0
  519. package/es/tools/NumberMap.js +3 -0
  520. package/es/tools/NumberMap.js.map +1 -1
  521. package/es/tools/calc.d.ts +3 -0
  522. package/es/tools/calc.js +10 -0
  523. package/es/tools/calc.js.map +1 -1
  524. package/es/tools/diff-cell.js +1 -1
  525. package/es/tools/dom.js +1 -1
  526. package/es/tools/env.js +1 -1
  527. package/es/ts-types/base-table.d.ts +41 -12
  528. package/es/ts-types/base-table.js.map +1 -1
  529. package/es/ts-types/column/style.d.ts +0 -1
  530. package/es/ts-types/column/style.js.map +1 -1
  531. package/es/ts-types/component/axis.d.ts +12 -0
  532. package/es/ts-types/component/axis.js +2 -0
  533. package/es/ts-types/component/axis.js.map +1 -0
  534. package/es/ts-types/component/legend.d.ts +5 -0
  535. package/es/ts-types/component/legend.js +2 -0
  536. package/es/ts-types/component/legend.js.map +1 -0
  537. package/es/ts-types/component/title.d.ts +47 -0
  538. package/es/ts-types/component/title.js +2 -0
  539. package/es/ts-types/component/title.js.map +1 -0
  540. package/es/ts-types/component/util.d.ts +1 -0
  541. package/es/ts-types/component/util.js +2 -0
  542. package/es/ts-types/component/util.js.map +1 -0
  543. package/es/ts-types/events.d.ts +100 -83
  544. package/es/ts-types/events.js.map +1 -1
  545. package/es/ts-types/list-table/layout-map/api.d.ts +4 -0
  546. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  547. package/es/ts-types/new-data-set.d.ts +18 -5
  548. package/es/ts-types/new-data-set.js +2 -2
  549. package/es/ts-types/new-data-set.js.map +1 -1
  550. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
  551. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +4 -0
  552. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
  553. package/es/ts-types/pivot-table/corner.d.ts +3 -3
  554. package/es/ts-types/pivot-table/corner.js.map +1 -1
  555. package/es/ts-types/pivot-table/indicator/index.d.ts +1 -0
  556. package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
  557. package/es/ts-types/pivot-table/title.d.ts +1 -1
  558. package/es/ts-types/pivot-table/title.js.map +1 -1
  559. package/es/ts-types/table-engine.d.ts +27 -3
  560. package/es/ts-types/table-engine.js.map +1 -1
  561. package/package.json +13 -7
  562. package/cjs/menu/dom/BaseMenu.js.map +0 -1
  563. package/cjs/menu/dom/Menu.js.map +0 -1
  564. package/cjs/menu/dom/MenuHandler.js.map +0 -1
  565. package/cjs/menu/dom/logic/MenuContainer.js.map +0 -1
  566. package/cjs/menu/dom/logic/MenuElement.js.map +0 -1
  567. package/cjs/menu/dom/logic/MenuElementStyle.js.map +0 -1
  568. package/cjs/scenegraph/layout/auto-width.d.ts +0 -2
  569. package/cjs/scenegraph/layout/auto-width.js +0 -85
  570. package/cjs/scenegraph/layout/auto-width.js.map +0 -1
  571. package/cjs/tooltip/BaseTooltip.js.map +0 -1
  572. package/cjs/tooltip/Tooltip.js.map +0 -1
  573. package/cjs/tooltip/TooltipHandler.js.map +0 -1
  574. package/cjs/tooltip/logic/BubbleTooltipElement.js.map +0 -1
  575. package/cjs/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
  576. package/dist/vtable.es5.js +0 -53155
  577. package/dist/vtable.es5.min.js +0 -3
  578. package/es/menu/dom/BaseMenu.js.map +0 -1
  579. package/es/menu/dom/Menu.js.map +0 -1
  580. package/es/menu/dom/MenuHandler.js.map +0 -1
  581. package/es/menu/dom/logic/MenuContainer.js.map +0 -1
  582. package/es/menu/dom/logic/MenuElement.js.map +0 -1
  583. package/es/menu/dom/logic/MenuElementStyle.js.map +0 -1
  584. package/es/scenegraph/layout/auto-width.d.ts +0 -2
  585. package/es/scenegraph/layout/auto-width.js +0 -82
  586. package/es/scenegraph/layout/auto-width.js.map +0 -1
  587. package/es/tooltip/BaseTooltip.js.map +0 -1
  588. package/es/tooltip/Tooltip.js.map +0 -1
  589. package/es/tooltip/TooltipHandler.js.map +0 -1
  590. package/es/tooltip/logic/BubbleTooltipElement.js.map +0 -1
  591. package/es/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
  592. /package/cjs/{menu → components/menu}/dom/BaseMenu.js +0 -0
  593. /package/cjs/{menu → components/menu}/dom/Menu.d.ts +0 -0
  594. /package/cjs/{menu → components/menu}/dom/Menu.js +0 -0
  595. /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
  596. /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
  597. /package/cjs/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
  598. /package/cjs/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
  599. /package/cjs/{tooltip → components/tooltip}/Tooltip.js +0 -0
  600. /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
  601. /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
  602. /package/es/{menu → components/menu}/dom/BaseMenu.js +0 -0
  603. /package/es/{menu → components/menu}/dom/Menu.d.ts +0 -0
  604. /package/es/{menu → components/menu}/dom/Menu.js +0 -0
  605. /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
  606. /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
  607. /package/es/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
  608. /package/es/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
  609. /package/es/{tooltip → components/tooltip}/Tooltip.js +0 -0
  610. /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
  611. /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
@@ -0,0 +1,65 @@
1
+ var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
2
+ return new (P || (P = Promise))((function(resolve, reject) {
3
+ function fulfilled(value) {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ }
10
+ function rejected(value) {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ }
17
+ function step(result) {
18
+ var value;
19
+ result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function(resolve) {
20
+ resolve(value);
21
+ }))).then(fulfilled, rejected);
22
+ }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ }));
25
+ };
26
+
27
+ import { computeColsWidth } from "../../layout/compute-col-width";
28
+
29
+ import { computeRowsHeight } from "../../layout/compute-row-height";
30
+
31
+ import { createColGroup } from "../column";
32
+
33
+ export function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, proxy) {
34
+ var _a, _b, _c, _d;
35
+ return __awaiter(this, void 0, void 0, (function*() {
36
+ proxy.setParamsForRow(), proxy.setParamsForColumn(), proxy.table.internalProps._colWidthsMap.clear(),
37
+ proxy.table._clearColRangeWidthsMap(), computeColsWidth(proxy.table, 0, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1)),
38
+ proxy.table.internalProps._rowHeightsMap.clear(), proxy.table._clearRowRangeHeightsMap(),
39
+ computeRowsHeight(proxy.table, 0, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1)),
40
+ proxy.table.rightFrozenColCount > 0 && proxy.table.colCount - 1 > proxy.firstScreenColLimit && computeColsWidth(proxy.table, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, proxy.table.colCount - 1),
41
+ proxy.table.bottomFrozenRowCount > 0 && proxy.table.rowCount - 1 > proxy.firstScreenRowLimit && computeColsWidth(proxy.table, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, proxy.table.rowCount - 1),
42
+ proxy.table.scenegraph.colHeaderGroup.setAttribute("x", proxy.table.getFrozenColsWidth()),
43
+ proxy.table.scenegraph.rowHeaderGroup.setAttribute("y", proxy.table.getFrozenRowsHeight()),
44
+ proxy.table.scenegraph.bottomFrozenGroup.setAttribute("x", proxy.table.getFrozenColsWidth()),
45
+ proxy.table.scenegraph.rightFrozenGroup.setAttribute("y", proxy.table.getFrozenRowsHeight()),
46
+ proxy.table.scenegraph.bodyGroup.setAttributes({
47
+ x: proxy.table.getFrozenColsWidth(),
48
+ y: proxy.table.getFrozenRowsHeight()
49
+ }), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, proxy.table.rowHeaderLevelCount - 1, 0, proxy.table.columnHeaderLevelCount - 1, "cornerHeader", proxy.table),
50
+ createColGroup(colHeaderGroup, xOrigin, yOrigin, proxy.table.rowHeaderLevelCount, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), 0, proxy.table.columnHeaderLevelCount - 1, "columnHeader", proxy.table),
51
+ createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, proxy.table.rowHeaderLevelCount - 1, proxy.table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), "rowHeader", proxy.table),
52
+ proxy.table.bottomFrozenRowCount > 0 && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, proxy.table.rowHeaderLevelCount, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, proxy.table.rowCount - 1, "body", proxy.table),
53
+ proxy.table.rightFrozenColCount > 0 && createColGroup(rightFrozenGroup, xOrigin, yOrigin, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, proxy.table.colCount - 1, proxy.table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), "body", proxy.table),
54
+ createColGroup(bodyGroup, xOrigin, yOrigin, proxy.table.rowHeaderLevelCount, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), proxy.table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), "body", proxy.table),
55
+ bodyGroup.firstChild ? (proxy.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : proxy.totalRow,
56
+ proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
57
+ proxy.currentCol = null !== (_d = null === (_c = bodyGroup.lastChild) || void 0 === _c ? void 0 : _c.col) && void 0 !== _d ? _d : proxy.totalCol,
58
+ proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2),
59
+ yield proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow,
60
+ proxy.rowUpdatePos = proxy.rowEnd, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
61
+ proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd,
62
+ proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
63
+ }));
64
+ }
65
+ //# sourceMappingURL=create-group-for-first-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Q,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YAGtF,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;SACxB;;CACF","file":"create-group-for-first-screen.js","sourcesContent":["import type { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { createColGroup } from '../column';\nimport type { SceneProxy } from './proxy';\n\nexport async function 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 proxy: SceneProxy\n) {\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n // compute colums width in first screen\n proxy.table.internalProps._colWidthsMap.clear();\n proxy.table._clearColRangeWidthsMap();\n computeColsWidth(proxy.table, 0, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1));\n\n // compute rows height in first screen\n proxy.table.internalProps._rowHeightsMap.clear();\n proxy.table._clearRowRangeHeightsMap();\n computeRowsHeight(proxy.table, 0, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1));\n\n if (proxy.table.rightFrozenColCount > 0 && proxy.table.colCount - 1 > proxy.firstScreenColLimit) {\n // compute right frozen row height\n computeColsWidth(\n proxy.table,\n proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1,\n proxy.table.colCount - 1\n );\n }\n if (proxy.table.bottomFrozenRowCount > 0 && proxy.table.rowCount - 1 > proxy.firstScreenRowLimit) {\n // compute bottom frozen row height\n computeColsWidth(\n proxy.table,\n proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1,\n proxy.table.rowCount - 1\n );\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n proxy.table.scenegraph.colHeaderGroup.setAttribute('x', proxy.table.getFrozenColsWidth());\n proxy.table.scenegraph.rowHeaderGroup.setAttribute('y', proxy.table.getFrozenRowsHeight());\n proxy.table.scenegraph.bottomFrozenGroup.setAttribute('x', proxy.table.getFrozenColsWidth());\n proxy.table.scenegraph.rightFrozenGroup.setAttribute('y', proxy.table.getFrozenRowsHeight());\n proxy.table.scenegraph.bodyGroup.setAttributes({\n x: proxy.table.getFrozenColsWidth(),\n y: proxy.table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n proxy.table.rowHeaderLevelCount - 1, // colEnd\n 0, // rowStart\n proxy.table.columnHeaderLevelCount - 1, // rowEnd\n 'cornerHeader', // CellType\n proxy.table\n );\n\n // create colHeaderGroup\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n 0, // rowStart\n proxy.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n proxy.table\n );\n\n // create rowHeaderGroup\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n proxy.table.rowHeaderLevelCount - 1, // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'rowHeader', // isHeader\n proxy.table\n );\n\n if (proxy.table.bottomFrozenRowCount > 0) {\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, // rowStart\n proxy.table.rowCount - 1, // rowEnd\n 'body', // isHeader\n proxy.table\n );\n // proxy.table.scenegraph.bottomFrozenGroup.setAttribute(\n // 'y',\n // proxy.table.tableNoFrameHeight - proxy.table.scenegraph.bottomFrozenGroup.attribute.height\n // );\n // proxy.table.scenegraph.leftBottomCellGroup.setAttributes({\n // visible: true,\n // y: proxy.table.tableNoFrameHeight - proxy.table.scenegraph.bottomFrozenGroup.attribute.height,\n // height: proxy.table.scenegraph.bottomFrozenGroup.attribute.height,\n // width: proxy.table.getFrozenColsWidth()\n // });\n // proxy.table.scenegraph.rightBottomCellGroup.setAttributes({\n // visible: true,\n // y: proxy.table.tableNoFrameHeight - proxy.table.scenegraph.bottomFrozenGroup.attribute.height,\n // height: proxy.table.scenegraph.bottomFrozenGroup.attribute.height\n // });\n }\n\n if (proxy.table.rightFrozenColCount > 0) {\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, // colStart\n proxy.table.colCount - 1, // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'body', // isHeader\n proxy.table\n );\n // proxy.table.scenegraph.rightFrozenGroup.setAttribute(\n // 'x',\n // proxy.table.tableNoFrameWidth - proxy.table.scenegraph.rightFrozenGroup.attribute.width\n // );\n // proxy.table.scenegraph.rightTopCellGroup.setAttributes({\n // visible: true,\n // x: proxy.table.tableNoFrameWidth - proxy.table.scenegraph.rightFrozenGroup.attribute.width,\n // width: proxy.table.scenegraph.rightFrozenGroup.attribute.width,\n // height: proxy.table.getFrozenRowsHeight()\n // });\n // proxy.table.scenegraph.rightBottomCellGroup.setAttributes({\n // visible: true,\n // x: proxy.table.tableNoFrameWidth - proxy.table.scenegraph.rightFrozenGroup.attribute.width,\n // width: proxy.table.scenegraph.rightFrozenGroup.attribute.width\n // });\n }\n\n // create bodyGroup\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'body', // isHeader\n proxy.table\n );\n\n // update progress information\n if (!bodyGroup.firstChild) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = (bodyGroup.lastChild as Group)?.col ?? proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n await proxy.progress();\n }\n}\n"]}
@@ -1,43 +1,62 @@
1
1
  import type { BaseTableAPI } from '../../../ts-types/base-table';
2
- import type { Group } from '../../graphic/group';
2
+ import { Group } from '../../graphic/group';
3
3
  export declare class SceneProxy {
4
4
  table: BaseTableAPI;
5
+ mode: 'column' | 'row' | 'pivot';
6
+ rowLimit: number;
5
7
  currentRow: number;
6
8
  totalRow: number;
7
- rowLimit: number;
8
9
  yLimitTop: number;
9
10
  yLimitBottom: number;
10
- accurateY: number;
11
11
  rowStart: number;
12
12
  rowEnd: number;
13
13
  referenceRow: number;
14
14
  bodyTopRow: number;
15
15
  bodyBottomRow: number;
16
- bodyLeftCol: number;
17
- bodyRightCol: number;
18
16
  screenRowCount: number;
19
17
  firstScreenRowLimit: number;
20
18
  taskRowCount: number;
21
19
  rowUpdatePos: number;
22
20
  rowUpdateDirection: 'up' | 'down';
23
21
  screenTopRow: number;
24
- screenTopRowDeltaY: number;
25
- y: number;
22
+ colLimit: number;
23
+ bodyLeftCol: number;
24
+ bodyRightCol: number;
25
+ totalCol: number;
26
+ colStart: number;
27
+ colEnd: number;
28
+ taskColCount: number;
29
+ xLimitLeft: number;
30
+ xLimitRight: number;
31
+ screenColCount: number;
32
+ firstScreenColLimit: number;
33
+ colUpdatePos: number;
34
+ currentCol: number;
35
+ referenceCol: number;
36
+ screenLeftCol: number;
37
+ colUpdateDirection: 'left' | 'right';
26
38
  cellCache: Map<number, Group>;
27
39
  constructor(table: BaseTableAPI);
28
- setParams(): void;
40
+ setParamsForColumn(): void;
41
+ setParamsForRow(): void;
42
+ createGroupForFirstScreen(cornerHeaderGroup: Group, colHeaderGroup: Group, rowHeaderGroup: Group, rightFrozenGroup: Group, bottomFrozenGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number): Promise<void>;
29
43
  createColGroupForFirstScreen(rowHeaderGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number, table: BaseTableAPI): Promise<void>;
30
44
  progress(): Promise<void>;
31
45
  createRow(): Promise<void>;
46
+ createCol(): Promise<void>;
32
47
  createRowCellGroup(onceCount: number): void;
48
+ createColGroup(onceCount: number): void;
33
49
  setY(y: number): Promise<void>;
50
+ setX(x: number): Promise<void>;
34
51
  dynamicSetY(y: number): Promise<void>;
52
+ dynamicSetX(x: number): Promise<void>;
35
53
  updateBody(y: number): void;
36
- moveCell(count: number, direction: 'up' | 'down', screenTopRow: number): Promise<void>;
37
- updateCellGroupsAsync(): Promise<void>;
54
+ updateRowCellGroupsAsync(): Promise<void>;
38
55
  updateCellGroups(count: number): void;
56
+ updateColCellGroupsAsync(): Promise<void>;
57
+ updateColGroups(count: number): void;
39
58
  updateCellGroupPosition(cellGroup: Group, newRow: number, y: number): void;
40
- updateCellGroupContent(cellGroup: Group): void;
59
+ updateCellGroupContent(cellGroup: Group): Group;
41
60
  sortCell(): Promise<void>;
42
- highPerformanceGetCell(col: number, row: number, rowStart?: number, rowEnd?: number): Group;
61
+ highPerformanceGetCell(col: number, row: number, rowStart?: number, rowEnd?: number, getShadow?: boolean): Group;
43
62
  }
@@ -24,31 +24,52 @@ var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, gener
24
24
  }));
25
25
  };
26
26
 
27
- import { updateCellHeightForColumn } from "../../layout/update-height";
27
+ import { Group } from "../../graphic/group";
28
28
 
29
- import { emptyGroup } from "../../utils/empty-group";
29
+ import { computeColsWidth } from "../../layout/compute-col-width";
30
30
 
31
- import { getProp } from "../../utils/get-prop";
31
+ import { computeRowsHeight } from "../../layout/compute-row-height";
32
32
 
33
- import { getQuadProps } from "../../utils/padding";
33
+ import { emptyGroup } from "../../utils/empty-group";
34
34
 
35
35
  import { createColGroup } from "../column";
36
36
 
37
37
  import { createComplexColumn } from "../column-helper";
38
38
 
39
+ import { createGroupForFirstScreen } from "./create-group-for-first-screen";
40
+
41
+ import { dynamicSetX } from "./update-position/dynamic-set-x";
42
+
43
+ import { dynamicSetY } from "./update-position/dynamic-set-y";
44
+
45
+ import { updateAutoRow } from "./update-position/update-auto-row";
46
+
39
47
  export class SceneProxy {
40
48
  constructor(table) {
41
- this.currentRow = 0, this.rowLimit = 1e3, this.accurateY = 0, this.rowStart = 0,
42
- this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.cellCache = new Map,
43
- this.table = table, this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount);
49
+ this.mode = "column", this.rowLimit = 1e3, this.currentRow = 0, this.rowStart = 0,
50
+ this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.colLimit = 1e3,
51
+ this.screenLeftCol = 0, this.cellCache = new Map, this.table = table, this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"),
52
+ this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount);
44
53
  }
45
- setParams() {
46
- this.bodyTopRow = this.table.columnHeaderLevelCount, this.bodyBottomRow = this.table.rowCount - 1,
47
- this.bodyLeftCol = 0, this.bodyRightCol = this.table.colCount - 1;
54
+ setParamsForColumn() {
55
+ this.bodyLeftCol = this.table.rowHeaderLevelCount, this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;
56
+ const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
57
+ this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1, this.colStart = this.bodyLeftCol;
58
+ const defaultColWidth = this.table.defaultColWidth;
59
+ this.taskColCount = 1 * Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);
60
+ const totalBodyWidth = defaultColWidth * totalActualBodyColCount, totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);
61
+ this.xLimitLeft = totalBodyWidth / 2, this.xLimitRight = totalWidth - totalBodyWidth / 2;
62
+ const widthLimit = 5 * this.table.tableNoFrameWidth;
63
+ this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth),
64
+ this.firstScreenColLimit = this.bodyLeftCol + Math.ceil(widthLimit / defaultColWidth),
65
+ this.colUpdatePos = this.bodyRightCol;
66
+ }
67
+ setParamsForRow() {
68
+ this.bodyTopRow = this.table.columnHeaderLevelCount, this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
48
69
  const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
49
70
  this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1, this.rowStart = this.bodyTopRow;
50
71
  const defaultRowHeight = this.table.defaultRowHeight;
51
- this.taskRowCount = 5 * Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
72
+ this.taskRowCount = 1 * Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
52
73
  const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount, totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);
53
74
  this.yLimitTop = totalBodyHeight / 2, this.yLimitBottom = totalHeight - totalBodyHeight / 2;
54
75
  const heightLimit = 5 * this.table.tableNoFrameHeight;
@@ -56,10 +77,16 @@ export class SceneProxy {
56
77
  this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight),
57
78
  this.rowUpdatePos = this.bodyBottomRow;
58
79
  }
80
+ createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
81
+ return __awaiter(this, void 0, void 0, (function*() {
82
+ yield createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
83
+ }));
84
+ }
59
85
  createColGroupForFirstScreen(rowHeaderGroup, bodyGroup, xOrigin, yOrigin, table) {
60
86
  var _a, _b;
61
87
  return __awaiter(this, void 0, void 0, (function*() {
62
- this.setParams(), createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.rowHeaderLevelCount - 1, table.columnHeaderLevelCount, table.rowCount - 1, "rowHeader", table, this.firstScreenRowLimit),
88
+ this.setParamsForRow(), this.setParamsForColumn(), computeRowsHeight(table, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, table.rowCount - 1)),
89
+ createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.rowHeaderLevelCount - 1, table.columnHeaderLevelCount, table.rowCount - 1, "rowHeader", table, this.firstScreenRowLimit),
63
90
  createColGroup(bodyGroup, xOrigin, yOrigin, table.rowHeaderLevelCount, table.colCount - 1, table.columnHeaderLevelCount, table.rowCount - 1, "body", table, this.firstScreenRowLimit),
64
91
  bodyGroup.firstChild ? (this.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : this.totalRow,
65
92
  this.rowEnd = this.currentRow, this.rowUpdatePos = this.rowEnd, this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2),
@@ -70,10 +97,12 @@ export class SceneProxy {
70
97
  progress() {
71
98
  return __awaiter(this, void 0, void 0, (function*() {
72
99
  return new Promise(((resolve, reject) => {
73
- setTimeout((() => {
74
- this.rowUpdatePos < this.rowEnd ? (this.updateCellGroupsAsync(), this.progress()) : this.currentRow < this.totalRow && (this.createRow(),
75
- this.progress()), resolve();
76
- }), 0);
100
+ setTimeout((() => __awaiter(this, void 0, void 0, (function*() {
101
+ this.colUpdatePos < this.colEnd ? (yield this.updateColCellGroupsAsync(), yield this.progress()) : this.rowUpdatePos < this.rowEnd ? (yield this.updateRowCellGroupsAsync(),
102
+ yield this.progress()) : this.currentCol < this.totalCol ? (yield this.createCol(),
103
+ yield this.progress()) : this.currentRow < this.totalRow && (yield this.createRow(),
104
+ yield this.progress()), resolve();
105
+ }))), 0);
77
106
  }));
78
107
  }));
79
108
  }
@@ -83,115 +112,111 @@ export class SceneProxy {
83
112
  this.createRowCellGroup(this.taskRowCount));
84
113
  }));
85
114
  }
115
+ createCol() {
116
+ return __awaiter(this, void 0, void 0, (function*() {
117
+ this.taskColCount && (console.log("createCol", this.currentCol, this.currentCol + this.taskColCount),
118
+ this.createColGroup(this.taskRowCount));
119
+ }));
120
+ }
86
121
  createRowCellGroup(onceCount) {
87
122
  const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
123
+ if (computeRowsHeight(this.table, this.currentRow + 1, endRow), this.table.rowHeaderLevelCount) {
124
+ let maxHeight = 0;
125
+ for (let col = 0; col < this.table.rowHeaderLevelCount; col++) {
126
+ const colGroup = this.table.scenegraph.getColGroup(col), cellType = "rowHeader", {height: height} = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
127
+ maxHeight = Math.max(maxHeight, height), this.table.scenegraph.rowHeaderGroup.setAttribute("height", maxHeight);
128
+ }
129
+ }
130
+ if (this.table.rightFrozenColCount) {
131
+ let maxHeight = 0;
132
+ for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {
133
+ const colGroup = this.table.scenegraph.getColGroup(col), cellType = "rowHeader", {height: height} = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
134
+ maxHeight = Math.max(maxHeight, height), this.table.scenegraph.rightFrozenGroup.setAttribute("height", maxHeight);
135
+ }
136
+ }
88
137
  let maxHeight = 0;
89
138
  for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {
90
- const colGroup = this.table.scenegraph.getColGroup(col), cellType = col < this.table.rowHeaderLevelCount ? "rowHeader" : "body", {height: height} = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
139
+ const colGroup = this.table.scenegraph.getColGroup(col), cellType = "body", {height: height} = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
91
140
  maxHeight = Math.max(maxHeight, height);
92
141
  }
93
- this.table.scenegraph.bodyGroup.setAttribute("height", maxHeight), this.table.internalProps.autoRowHeight && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.currentRow + 1, endRow, this.table),
94
- this.currentRow = endRow, this.rowEnd = endRow, this.rowUpdatePos = this.rowEnd,
95
- this.referenceRow = Math.floor((endRow - this.rowStart) / 2), this.table.scenegraph.updateContainer(),
96
- this.table.scenegraph.updateBorderSizeAndPosition();
142
+ this.table.scenegraph.bodyGroup.setAttribute("height", maxHeight), this.currentRow = endRow,
143
+ this.rowEnd = endRow, this.rowUpdatePos = this.rowEnd, this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2),
144
+ this.table.scenegraph.updateContainer(), this.table.scenegraph.updateBorderSizeAndPosition();
145
+ }
146
+ createColGroup(onceCount) {
147
+ const endCol = Math.min(this.totalCol, this.currentCol + onceCount);
148
+ computeColsWidth(this.table, this.currentCol + 1, endCol);
149
+ const lastColumnGroup = this.table.scenegraph.bodyGroup.lastChild instanceof Group ? this.table.scenegraph.bodyGroup.lastChild : this.table.scenegraph.bodyGroup.lastChild._prev, xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width, yOrigin = lastColumnGroup.attribute.y;
150
+ createColGroup(this.table.scenegraph.bodyGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.rowStart, this.rowEnd, "body", this.table),
151
+ this.currentCol = endCol, this.colEnd = endCol, this.colUpdatePos = this.colEnd,
152
+ this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2), console.log("async", this.referenceCol, this.colStart, this.colEnd),
153
+ this.table.scenegraph.updateContainer(), this.table.scenegraph.updateBorderSizeAndPosition();
97
154
  }
98
155
  setY(y) {
99
156
  return __awaiter(this, void 0, void 0, (function*() {
100
157
  y < this.yLimitTop && this.rowStart === this.bodyTopRow || y > this.yLimitBottom && this.rowEnd === this.bodyBottomRow ? this.table.scenegraph.setBodyAndRowHeaderY(-y) : this.dynamicSetY(y);
101
158
  }));
102
159
  }
103
- dynamicSetY(y) {
160
+ setX(x) {
104
161
  return __awaiter(this, void 0, void 0, (function*() {
105
- const screenTop = this.table.getTargetRowAt(y + this.table.scenegraph.colHeaderGroup.attribute.height);
106
- if (!screenTop) return;
107
- const screenTopRow = screenTop.row;
108
- this.y = y, this.screenTopRow = screenTopRow;
109
- const deltaRow = screenTopRow - this.referenceRow;
110
- deltaRow > 0 ? (this.moveCell(deltaRow, "up", screenTopRow), this.updateBody(y)) : deltaRow < 0 ? (this.moveCell(-deltaRow, "down", screenTopRow),
111
- this.updateBody(y)) : this.updateBody(y), this.table.scenegraph.updateNextFrame();
162
+ x < this.xLimitLeft && this.colStart === this.bodyLeftCol || x > this.xLimitRight && this.colEnd === this.bodyRightCol ? this.table.scenegraph.setBodyAndColHeaderX(-x) : this.dynamicSetX(x);
112
163
  }));
113
164
  }
114
- updateBody(y) {
115
- this.table.scenegraph.setBodyAndRowHeaderY(-y);
165
+ dynamicSetY(y) {
166
+ return __awaiter(this, void 0, void 0, (function*() {
167
+ dynamicSetY(y, this);
168
+ }));
116
169
  }
117
- moveCell(count, direction, screenTopRow) {
170
+ dynamicSetX(x) {
118
171
  return __awaiter(this, void 0, void 0, (function*() {
119
- if ("up" === direction && this.rowEnd + count > this.bodyBottomRow ? count = this.bodyBottomRow - this.rowEnd : "down" === direction && this.rowStart - count < this.bodyTopRow && (count = this.rowStart - this.bodyTopRow),
120
- count < this.rowEnd - this.rowStart) {
121
- const startRow = "up" === direction ? this.rowStart : this.rowEnd - count + 1, endRow = "up" === direction ? this.rowStart + count - 1 : this.rowEnd;
122
- for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {
123
- const colGroup = this.table.scenegraph.getColGroup(col);
124
- for (let row = startRow; row <= endRow; row++) if ("up" === direction) {
125
- const cellGroup = colGroup.firstChild;
126
- this.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + colGroup.lastChild.attribute.height),
127
- colGroup.appendChild(cellGroup);
128
- } else {
129
- const cellGroup = colGroup.lastChild;
130
- this.updateCellGroupPosition(cellGroup, colGroup.firstChild.row - 1, colGroup.firstChild.attribute.y - cellGroup.attribute.height),
131
- colGroup.insertBefore(cellGroup, colGroup.firstChild);
132
- }
133
- }
134
- const distStartRow = "up" === direction ? this.rowEnd + 1 : this.rowStart - count, distEndRow = "up" === direction ? this.rowEnd + count : this.rowStart - 1, syncTopRow = Math.max(this.bodyTopRow, screenTopRow - 2 * this.screenRowCount), syncBottomRow = Math.min(this.bodyBottomRow, screenTopRow + 3 * this.screenRowCount);
135
- for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
136
- const cellGroup = this.highPerformanceGetCell(col, row, distStartRow, distEndRow);
137
- this.updateCellGroupContent(cellGroup);
138
- }
139
- this.table.internalProps.autoRowHeight && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, syncTopRow, syncBottomRow, this.table, direction),
140
- this.rowStart = "up" === direction ? this.rowStart + count : this.rowStart - count,
141
- this.rowEnd = "up" === direction ? this.rowEnd + count : this.rowEnd - count, this.currentRow = "up" === direction ? this.currentRow + count : this.currentRow - count,
142
- this.totalRow = "up" === direction ? this.totalRow + count : this.totalRow - count,
143
- this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2),
144
- this.rowUpdatePos = distStartRow, this.rowUpdateDirection = direction, console.log("move end proxy", this.rowStart, this.rowEnd),
145
- console.log("move end cell", this.table.scenegraph.bodyGroup.firstChild.firstChild.row, this.table.scenegraph.bodyGroup.firstChild.lastChild.row),
146
- this.table.scenegraph.stage.render(), yield this.progress();
147
- } else {
148
- const distStartRow = "up" === direction ? this.rowStart + count : this.rowStart - count, distEndRow = "up" === direction ? this.rowEnd + count : this.rowEnd - count, distStartRowY = this.table.getRowsHeight(this.bodyTopRow, distStartRow - 1);
149
- for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {
150
- this.table.scenegraph.getColGroup(col).forEachChildren(((cellGroup, index) => {
151
- this.updateCellGroupPosition(cellGroup, "up" === direction ? cellGroup.row + count : cellGroup.row - count, 0 === index ? distStartRowY : cellGroup._prev.attribute.y + cellGroup._prev.attribute.height);
152
- }));
153
- }
154
- let syncTopRow, syncBottomRow;
155
- this.table.internalProps.autoRowHeight ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(this.bodyTopRow, screenTopRow - 2 * this.screenRowCount),
156
- syncBottomRow = Math.min(this.bodyBottomRow, screenTopRow + 3 * this.screenRowCount)),
157
- console.log("更新同步范围", syncTopRow, syncBottomRow);
158
- for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
159
- const cellGroup = this.highPerformanceGetCell(col, row, distStartRow, distEndRow);
160
- this.updateCellGroupContent(cellGroup);
161
- }
162
- console.log("updateAutoRow", distEndRow > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
163
- this.table.internalProps.autoRowHeight && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, syncTopRow, syncBottomRow, this.table, distEndRow > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
164
- this.rowStart = distStartRow, this.rowEnd = distEndRow, this.currentRow = "up" === direction ? this.currentRow + count : this.currentRow - count,
165
- this.totalRow = "up" === direction ? this.totalRow + count : this.totalRow - count,
166
- this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2),
167
- this.rowUpdatePos = this.rowStart, this.rowUpdateDirection = distEndRow > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up",
168
- console.log("move total end proxy", this.rowStart, this.rowEnd), console.log("move total end cell", this.table.scenegraph.bodyGroup.firstChild.firstChild.row, this.table.scenegraph.bodyGroup.firstChild.lastChild.row),
169
- this.table.internalProps.autoRowHeight || (yield this.progress());
170
- }
172
+ dynamicSetX(x, this);
171
173
  }));
172
174
  }
173
- updateCellGroupsAsync() {
175
+ updateBody(y) {
176
+ this.table.scenegraph.setBodyAndRowHeaderY(-y);
177
+ }
178
+ updateRowCellGroupsAsync() {
174
179
  return __awaiter(this, void 0, void 0, (function*() {
175
180
  this.updateCellGroups(this.taskRowCount);
176
181
  }));
177
182
  }
178
183
  updateCellGroups(count) {
179
184
  const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
180
- console.log("updateCellGroups", this.rowUpdatePos, distRow);
185
+ "autoHeight" === this.table.heightMode && computeRowsHeight(this.table, this.rowUpdatePos, distRow);
181
186
  for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = this.rowUpdatePos; row <= distRow; row++) {
182
187
  const cellGroup = this.highPerformanceGetCell(col, row);
183
188
  this.updateCellGroupContent(cellGroup);
184
189
  }
185
- this.table.internalProps.autoRowHeight && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection),
190
+ "autoHeight" === this.table.heightMode && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection),
186
191
  this.rowUpdatePos = distRow + 1;
187
192
  }
193
+ updateColCellGroupsAsync() {
194
+ return __awaiter(this, void 0, void 0, (function*() {
195
+ this.updateColGroups(this.taskRowCount);
196
+ }));
197
+ }
198
+ updateColGroups(count) {
199
+ const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);
200
+ for (let col = this.colUpdatePos; col <= distCol; col++) {
201
+ const colGroup = this.table.scenegraph.getColGroup(col);
202
+ if (colGroup) {
203
+ let cellGroup = colGroup.firstChild;
204
+ for (;cellGroup; ) {
205
+ cellGroup = this.updateCellGroupContent(cellGroup)._next;
206
+ }
207
+ colGroup.needUpdate = !1;
208
+ }
209
+ }
210
+ this.colUpdatePos = distCol + 1;
211
+ }
188
212
  updateCellGroupPosition(cellGroup, newRow, y) {
189
213
  cellGroup.row = newRow, cellGroup.setAttribute("y", y), cellGroup.needUpdate = !0,
190
214
  cellGroup.needUpdateForAutoRowHeight = !0;
191
215
  }
192
216
  updateCellGroupContent(cellGroup) {
193
- cellGroup.needUpdate && (this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row),
194
- cellGroup.needUpdate = !1);
217
+ if (!cellGroup.needUpdate) return cellGroup;
218
+ const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);
219
+ return cellGroup.needUpdate = !1, newCellGroup || cellGroup;
195
220
  }
196
221
  sortCell() {
197
222
  return __awaiter(this, void 0, void 0, (function*() {
@@ -199,72 +224,41 @@ export class SceneProxy {
199
224
  this.highPerformanceGetCell(col, row).needUpdate = !0;
200
225
  }
201
226
  let syncTopRow, syncBottomRow;
202
- this.table.internalProps.autoRowHeight ? (syncTopRow = this.rowStart, syncBottomRow = this.rowEnd) : (syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - 2 * this.screenRowCount),
227
+ "autoHeight" === this.table.heightMode ? (syncTopRow = this.rowStart, syncBottomRow = this.rowEnd) : (syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - 2 * this.screenRowCount),
203
228
  syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + 3 * this.screenRowCount)),
204
- console.log("sort更新同步范围", syncTopRow, syncBottomRow);
229
+ console.log("sort更新同步范围", syncTopRow, syncBottomRow), "autoHeight" === this.table.heightMode && computeRowsHeight(this.table, syncTopRow, syncBottomRow);
205
230
  for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
206
231
  const cellGroup = this.highPerformanceGetCell(col, row);
207
232
  this.updateCellGroupContent(cellGroup);
208
233
  }
209
234
  if (console.log("updateAutoRow", this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
210
- this.table.internalProps.autoRowHeight && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, syncTopRow, syncBottomRow, this.table, this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
235
+ "autoHeight" === this.table.heightMode && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, syncTopRow, syncBottomRow, this.table, this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
211
236
  this.rowUpdatePos = this.rowStart, this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up",
212
237
  this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow && this.rowStart === this.table.scenegraph.proxy.bodyTopRow) ; else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {
213
238
  const top = this.table.getAllRowsHeight() - this.table.scenegraph.height;
214
239
  this.updateBody(top);
215
240
  } else this.rowStart === this.table.scenegraph.proxy.bodyTopRow && this.updateBody(0);
216
- this.table.internalProps.autoRowHeight || (yield this.progress());
241
+ "autoHeight" !== this.table.heightMode && (yield this.progress());
217
242
  }));
218
243
  }
219
- highPerformanceGetCell(col, row, rowStart = this.rowStart, rowEnd = this.rowEnd) {
244
+ highPerformanceGetCell(col, row, rowStart = this.rowStart, rowEnd = this.rowEnd, getShadow) {
220
245
  if (row < rowStart || row > rowEnd) return emptyGroup;
246
+ if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) return emptyGroup;
221
247
  if (this.cellCache.get(col)) {
222
248
  const cacheCellGoup = this.cellCache.get(col);
223
249
  if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {
224
250
  let cellGroup = getCellByCache(cacheCellGoup, row);
225
- return cellGroup || (cellGroup = this.table.scenegraph.getCell(col, row)), cellGroup.row && this.cellCache.set(col, cellGroup),
226
- cellGroup;
251
+ return cellGroup || (cellGroup = this.table.scenegraph.getCell(col, row, getShadow)),
252
+ cellGroup.row && this.cellCache.set(col, cellGroup), cellGroup;
227
253
  }
228
- const cellGroup = this.table.scenegraph.getCell(col, row);
254
+ const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);
229
255
  return cellGroup.row && this.cellCache.set(col, cellGroup), cellGroup;
230
256
  }
231
- const cellGroup = this.table.scenegraph.getCell(col, row);
257
+ const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);
232
258
  return cellGroup.row && this.cellCache.set(col, cellGroup), cellGroup;
233
259
  }
234
260
  }
235
261
 
236
- function updateAutoRow(colStart, colEnd, rowStart, rowEnd, table, direction = "up") {
237
- var _a, _b, _c, _d, _e, _f, _g, _h;
238
- for (let row = rowStart; row <= rowEnd; row++) {
239
- let maxRowHeight = 0;
240
- for (let col = colStart; col <= colEnd; col++) {
241
- const cellGroup = table.scenegraph.getCell(col, row);
242
- if (!cellGroup.row) continue;
243
- const text = cellGroup.getChildByName("text") || cellGroup.getChildByName("content"), headerStyle = table._getCellStyle(col, row), padding = getQuadProps(getProp("padding", headerStyle, col, row, table)), height = text.AABBBounds.height() + (padding[0] + padding[2]);
244
- maxRowHeight = Math.max(maxRowHeight, height), cellGroup.needUpdateForAutoRowHeight = !1;
245
- }
246
- for (let col = colStart; col <= colEnd; col++) {
247
- const cellGroup = table.scenegraph.getCell(col, row);
248
- updateCellHeightForColumn(table.scenegraph, cellGroup, col, row, maxRowHeight, 0, !1);
249
- }
250
- table.setRowHeight(row, maxRowHeight, !0);
251
- }
252
- if ("up" === direction) for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
253
- const cellGroup = table.scenegraph.getCell(col, row);
254
- if (!cellGroup.row) continue;
255
- let y;
256
- y = cellGroup._prev ? (null !== (_b = null === (_a = cellGroup._prev) || void 0 === _a ? void 0 : _a.attribute.y) && void 0 !== _b ? _b : 0) + (null !== (_d = null === (_c = cellGroup._prev) || void 0 === _c ? void 0 : _c.attribute.height) && void 0 !== _d ? _d : 0) : table.getRowsHeight(table.columnHeaderLevelCount, cellGroup.row - 1),
257
- cellGroup.setAttribute("y", y);
258
- } else for (let col = colStart; col <= colEnd; col++) for (let row = rowEnd; row >= rowStart; row--) {
259
- const cellGroup = table.scenegraph.getCell(col, row);
260
- if (!cellGroup.row) continue;
261
- let y;
262
- cellGroup._next ? y = (null !== (_f = null === (_e = cellGroup._next) || void 0 === _e ? void 0 : _e.attribute.y) && void 0 !== _f ? _f : 0) - (null !== (_g = cellGroup.attribute.height) && void 0 !== _g ? _g : 0) : (y = table.getRowsHeight(table.columnHeaderLevelCount, cellGroup.row) - (null !== (_h = cellGroup.attribute.height) && void 0 !== _h ? _h : 0),
263
- console.log("估计位置", table.getRowsHeight(table.columnHeaderLevelCount, cellGroup.row))),
264
- cellGroup.setAttribute("y", y);
265
- }
266
- }
267
-
268
262
  function getCellByCache(cacheCellGroup, row) {
269
263
  return cacheCellGroup ? cacheCellGroup.row === row ? cacheCellGroup : cacheCellGroup.row > row ? getCellByCache(cacheCellGroup._prev, row) : getCellByCache(cacheCellGroup._next, row) : null;
270
264
  }