@visactor/vtable 1.6.0-alpha.1 → 1.6.0-alpha.3

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 (247) hide show
  1. package/cjs/ListTable-all.js +5 -5
  2. package/cjs/ListTable-all.js.map +1 -1
  3. package/cjs/ListTable.d.ts +0 -5
  4. package/cjs/ListTable.js +278 -34
  5. package/cjs/ListTable.js.map +1 -1
  6. package/cjs/PivotTable.d.ts +0 -2
  7. package/cjs/PivotTable.js +1 -1
  8. package/cjs/PivotTable.js.map +1 -1
  9. package/cjs/components/legend/discrete-legend/discrete-legend.js +7 -1
  10. package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
  11. package/cjs/components/react/react-custom-layout.d.ts +3 -1
  12. package/cjs/components/react/react-custom-layout.js +7 -3
  13. package/cjs/components/react/react-custom-layout.js.map +1 -1
  14. package/cjs/core/BaseTable.d.ts +8 -6
  15. package/cjs/core/BaseTable.js +93 -15
  16. package/cjs/core/BaseTable.js.map +1 -1
  17. package/cjs/core/style.js +1 -1
  18. package/cjs/core/style.js.map +1 -1
  19. package/cjs/core/tableHelper.d.ts +3 -1
  20. package/cjs/core/tableHelper.js +22 -12
  21. package/cjs/core/tableHelper.js.map +1 -1
  22. package/cjs/data/CachedDataSource.d.ts +1 -10
  23. package/cjs/data/CachedDataSource.js +3 -102
  24. package/cjs/data/CachedDataSource.js.map +1 -1
  25. package/cjs/dataset/dataset-pivot-table.js +1 -0
  26. package/cjs/dataset/dataset-pivot-table.js.map +1 -1
  27. package/cjs/dataset/dataset.js +1 -0
  28. package/cjs/edit/edit-manager.js +5 -9
  29. package/cjs/edit/edit-manager.js.map +1 -1
  30. package/cjs/event/event.js +4 -6
  31. package/cjs/event/event.js.map +1 -1
  32. package/cjs/event/listener/container-dom.js +43 -19
  33. package/cjs/event/listener/container-dom.js.map +1 -1
  34. package/cjs/event/listener/table-group.js +6 -4
  35. package/cjs/event/listener/table-group.js.map +1 -1
  36. package/cjs/index.d.ts +3 -3
  37. package/cjs/index.js +1 -1
  38. package/cjs/index.js.map +1 -1
  39. package/cjs/layout/layout-helper.js +2 -2
  40. package/cjs/layout/layout-helper.js.map +1 -1
  41. package/cjs/layout/pivot-header-layout.js +11 -5
  42. package/cjs/layout/pivot-header-layout.js.map +1 -1
  43. package/cjs/layout/row-height-map.js +0 -1
  44. package/cjs/layout/simple-header-layout.d.ts +2 -1
  45. package/cjs/layout/simple-header-layout.js +88 -2
  46. package/cjs/layout/simple-header-layout.js.map +1 -1
  47. package/cjs/plugins/icons.js +1 -1
  48. package/cjs/plugins/themes.js +1 -1
  49. package/cjs/scenegraph/component/table-component.js +18 -14
  50. package/cjs/scenegraph/component/table-component.js.map +1 -1
  51. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +26 -10
  52. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  53. package/cjs/scenegraph/graphic/group.js +1 -1
  54. package/cjs/scenegraph/graphic/group.js.map +1 -1
  55. package/cjs/scenegraph/group-creater/cell-helper.d.ts +1 -2
  56. package/cjs/scenegraph/group-creater/cell-helper.js +10 -29
  57. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  58. package/cjs/scenegraph/group-creater/column-helper.js +2 -9
  59. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  60. package/cjs/scenegraph/group-creater/init-scenegraph.js +2 -2
  61. package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  62. package/cjs/scenegraph/layout/update-height.js +1 -1
  63. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  64. package/cjs/scenegraph/layout/update-width.js +1 -1
  65. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  66. package/cjs/scenegraph/refresh-node/update-chart.d.ts +2 -1
  67. package/cjs/scenegraph/refresh-node/update-chart.js +18 -4
  68. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  69. package/cjs/scenegraph/scenegraph.d.ts +2 -1
  70. package/cjs/scenegraph/scenegraph.js +13 -8
  71. package/cjs/scenegraph/scenegraph.js.map +1 -1
  72. package/cjs/scenegraph/select/create-select-border.js +2 -2
  73. package/cjs/scenegraph/select/create-select-border.js.map +1 -1
  74. package/cjs/scenegraph/utils/cell-border-stroke-width.js +9 -14
  75. package/cjs/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
  76. package/cjs/scenegraph/utils/get-cell-merge.js +1 -1
  77. package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
  78. package/cjs/scenegraph/utils/get-hierarchy-offset.js +8 -6
  79. package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  80. package/cjs/scenegraph/utils/text-icon-layout.js +6 -5
  81. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  82. package/cjs/state/cell-move/index.js +14 -11
  83. package/cjs/state/cell-move/index.js.map +1 -1
  84. package/cjs/state/select/is-cell-select-highlight.js +6 -0
  85. package/cjs/state/select/is-cell-select-highlight.js.map +1 -1
  86. package/cjs/state/state.d.ts +2 -2
  87. package/cjs/state/state.js +12 -10
  88. package/cjs/state/state.js.map +1 -1
  89. package/cjs/themes/theme.d.ts +0 -2
  90. package/cjs/themes/theme.js +18 -13
  91. package/cjs/themes/theme.js.map +1 -1
  92. package/cjs/tools/helper.js.map +1 -1
  93. package/cjs/tools/style.d.ts +2 -1
  94. package/cjs/tools/style.js +9 -3
  95. package/cjs/tools/style.js.map +1 -1
  96. package/cjs/ts-types/base-table.d.ts +5 -10
  97. package/cjs/ts-types/base-table.js.map +1 -1
  98. package/cjs/ts-types/new-data-set.d.ts +0 -1
  99. package/cjs/ts-types/new-data-set.js.map +1 -1
  100. package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -0
  101. package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
  102. package/cjs/ts-types/table-engine.d.ts +48 -12
  103. package/cjs/ts-types/table-engine.js.map +1 -1
  104. package/cjs/ts-types/theme.d.ts +4 -1
  105. package/cjs/ts-types/theme.js.map +1 -1
  106. package/cjs/vrender.js +1 -2
  107. package/cjs/vrender.js.map +1 -1
  108. package/dist/vtable.js +3421 -3838
  109. package/dist/vtable.min.js +2 -2
  110. package/es/ListTable-all.js +3 -5
  111. package/es/ListTable-all.js.map +1 -1
  112. package/es/ListTable.d.ts +0 -5
  113. package/es/ListTable.js +280 -37
  114. package/es/ListTable.js.map +1 -1
  115. package/es/PivotTable.d.ts +0 -2
  116. package/es/PivotTable.js +1 -1
  117. package/es/PivotTable.js.map +1 -1
  118. package/es/components/legend/discrete-legend/discrete-legend.js +7 -1
  119. package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
  120. package/es/components/react/react-custom-layout.d.ts +3 -1
  121. package/es/components/react/react-custom-layout.js +7 -3
  122. package/es/components/react/react-custom-layout.js.map +1 -1
  123. package/es/core/BaseTable.d.ts +8 -6
  124. package/es/core/BaseTable.js +98 -20
  125. package/es/core/BaseTable.js.map +1 -1
  126. package/es/core/style.js +1 -1
  127. package/es/core/style.js.map +1 -1
  128. package/es/core/tableHelper.d.ts +3 -1
  129. package/es/core/tableHelper.js +21 -9
  130. package/es/core/tableHelper.js.map +1 -1
  131. package/es/data/CachedDataSource.d.ts +1 -10
  132. package/es/data/CachedDataSource.js +0 -103
  133. package/es/data/CachedDataSource.js.map +1 -1
  134. package/es/dataset/dataset-pivot-table.js +1 -0
  135. package/es/dataset/dataset-pivot-table.js.map +1 -1
  136. package/es/dataset/dataset.js +2 -1
  137. package/es/edit/edit-manager.js +5 -9
  138. package/es/edit/edit-manager.js.map +1 -1
  139. package/es/event/event.js +4 -6
  140. package/es/event/event.js.map +1 -1
  141. package/es/event/listener/container-dom.js +39 -18
  142. package/es/event/listener/container-dom.js.map +1 -1
  143. package/es/event/listener/table-group.js +6 -4
  144. package/es/event/listener/table-group.js.map +1 -1
  145. package/es/index.d.ts +3 -3
  146. package/es/index.js +1 -1
  147. package/es/index.js.map +1 -1
  148. package/es/layout/layout-helper.js +2 -2
  149. package/es/layout/layout-helper.js.map +1 -1
  150. package/es/layout/pivot-header-layout.js +11 -5
  151. package/es/layout/pivot-header-layout.js.map +1 -1
  152. package/es/layout/row-height-map.js +1 -2
  153. package/es/layout/simple-header-layout.d.ts +2 -1
  154. package/es/layout/simple-header-layout.js +87 -3
  155. package/es/layout/simple-header-layout.js.map +1 -1
  156. package/es/plugins/icons.js +1 -1
  157. package/es/plugins/themes.js +1 -1
  158. package/es/scenegraph/component/table-component.js +18 -14
  159. package/es/scenegraph/component/table-component.js.map +1 -1
  160. package/es/scenegraph/graphic/contributions/chart-render-helper.js +26 -10
  161. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  162. package/es/scenegraph/graphic/group.js +1 -1
  163. package/es/scenegraph/graphic/group.js.map +1 -1
  164. package/es/scenegraph/group-creater/cell-helper.d.ts +1 -2
  165. package/es/scenegraph/group-creater/cell-helper.js +8 -23
  166. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  167. package/es/scenegraph/group-creater/column-helper.js +2 -8
  168. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  169. package/es/scenegraph/group-creater/init-scenegraph.js +2 -2
  170. package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  171. package/es/scenegraph/layout/update-height.js +1 -1
  172. package/es/scenegraph/layout/update-height.js.map +1 -1
  173. package/es/scenegraph/layout/update-width.js +1 -1
  174. package/es/scenegraph/layout/update-width.js.map +1 -1
  175. package/es/scenegraph/refresh-node/update-chart.d.ts +2 -1
  176. package/es/scenegraph/refresh-node/update-chart.js +14 -1
  177. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  178. package/es/scenegraph/scenegraph.d.ts +2 -1
  179. package/es/scenegraph/scenegraph.js +15 -10
  180. package/es/scenegraph/scenegraph.js.map +1 -1
  181. package/es/scenegraph/select/create-select-border.js +2 -2
  182. package/es/scenegraph/select/create-select-border.js.map +1 -1
  183. package/es/scenegraph/utils/cell-border-stroke-width.js +6 -9
  184. package/es/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
  185. package/es/scenegraph/utils/get-cell-merge.js +1 -1
  186. package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
  187. package/es/scenegraph/utils/get-hierarchy-offset.js +9 -7
  188. package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  189. package/es/scenegraph/utils/text-icon-layout.js +7 -4
  190. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  191. package/es/state/cell-move/index.js +14 -11
  192. package/es/state/cell-move/index.js.map +1 -1
  193. package/es/state/select/is-cell-select-highlight.js +6 -0
  194. package/es/state/select/is-cell-select-highlight.js.map +1 -1
  195. package/es/state/state.d.ts +2 -2
  196. package/es/state/state.js +12 -10
  197. package/es/state/state.js.map +1 -1
  198. package/es/themes/theme.d.ts +0 -2
  199. package/es/themes/theme.js +18 -13
  200. package/es/themes/theme.js.map +1 -1
  201. package/es/tools/helper.js.map +1 -1
  202. package/es/tools/style.d.ts +2 -1
  203. package/es/tools/style.js +7 -2
  204. package/es/tools/style.js.map +1 -1
  205. package/es/ts-types/base-table.d.ts +5 -10
  206. package/es/ts-types/base-table.js.map +1 -1
  207. package/es/ts-types/new-data-set.d.ts +0 -1
  208. package/es/ts-types/new-data-set.js.map +1 -1
  209. package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -0
  210. package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
  211. package/es/ts-types/table-engine.d.ts +48 -12
  212. package/es/ts-types/table-engine.js.map +1 -1
  213. package/es/ts-types/theme.d.ts +4 -1
  214. package/es/ts-types/theme.js.map +1 -1
  215. package/es/vrender.js +2 -3
  216. package/es/vrender.js.map +1 -1
  217. package/package.json +3 -3
  218. package/cjs/core/group-helper.d.ts +0 -6
  219. package/cjs/core/group-helper.js +0 -22
  220. package/cjs/core/group-helper.js.map +0 -1
  221. package/cjs/core/record-helper.d.ts +0 -8
  222. package/cjs/core/record-helper.js +0 -337
  223. package/cjs/core/record-helper.js.map +0 -1
  224. package/cjs/core/style-helper.d.ts +0 -3
  225. package/cjs/core/style-helper.js +0 -110
  226. package/cjs/core/style-helper.js.map +0 -1
  227. package/cjs/layout/cell-range/simple-cell-range.d.ts +0 -4
  228. package/cjs/layout/cell-range/simple-cell-range.js +0 -106
  229. package/cjs/layout/cell-range/simple-cell-range.js.map +0 -1
  230. package/cjs/plugins/list-tree-stick-cell.d.ts +0 -16
  231. package/cjs/plugins/list-tree-stick-cell.js +0 -171
  232. package/cjs/plugins/list-tree-stick-cell.js.map +0 -1
  233. package/es/core/group-helper.d.ts +0 -6
  234. package/es/core/group-helper.js +0 -14
  235. package/es/core/group-helper.js.map +0 -1
  236. package/es/core/record-helper.d.ts +0 -8
  237. package/es/core/record-helper.js +0 -332
  238. package/es/core/record-helper.js.map +0 -1
  239. package/es/core/style-helper.d.ts +0 -3
  240. package/es/core/style-helper.js +0 -86
  241. package/es/core/style-helper.js.map +0 -1
  242. package/es/layout/cell-range/simple-cell-range.d.ts +0 -4
  243. package/es/layout/cell-range/simple-cell-range.js +0 -99
  244. package/es/layout/cell-range/simple-cell-range.js.map +0 -1
  245. package/es/plugins/list-tree-stick-cell.d.ts +0 -16
  246. package/es/plugins/list-tree-stick-cell.js +0 -169
  247. package/es/plugins/list-tree-stick-cell.js.map +0 -1
@@ -4,14 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.ListTableAll = void 0;
6
6
 
7
- const ListTable_1 = require("./ListTable"), components_1 = require("./components"), list_tree_stick_cell_1 = require("./plugins/list-tree-stick-cell"), cell_type_1 = require("./scenegraph/group-creater/cell-type");
7
+ const ListTable_1 = require("./ListTable"), components_1 = require("./components"), cell_type_1 = require("./scenegraph/group-creater/cell-type");
8
8
 
9
9
  (0, components_1.registerAxis)(), (0, components_1.registerEmptyTip)(), (0, components_1.registerLegend)(),
10
10
  (0, components_1.registerMenu)(), (0, components_1.registerTitle)(), (0, components_1.registerTooltip)(),
11
- (0, list_tree_stick_cell_1.registerListTreeStickCellPlugin)(), (0, cell_type_1.registerChartCell)(),
12
- (0, cell_type_1.registerCheckboxCell)(), (0, cell_type_1.registerImageCell)(), (0,
13
- cell_type_1.registerProgressBarCell)(), (0, cell_type_1.registerRadioCell)(), (0,
14
- cell_type_1.registerSparkLineCell)(), (0, cell_type_1.registerTextCell)(), (0, cell_type_1.registerVideoCell)();
11
+ (0, cell_type_1.registerChartCell)(), (0, cell_type_1.registerCheckboxCell)(), (0,
12
+ cell_type_1.registerImageCell)(), (0, cell_type_1.registerProgressBarCell)(), (0,
13
+ cell_type_1.registerRadioCell)(), (0, cell_type_1.registerSparkLineCell)(), (0,
14
+ cell_type_1.registerTextCell)(), (0, cell_type_1.registerVideoCell)();
15
15
 
16
16
  class ListTableAll extends ListTable_1.ListTable {}
17
17
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ListTable-all.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,6CAOsB;AACtB,yEAAiF;AACjF,oEAS8C;AAE9C,IAAA,yBAAY,GAAE,CAAC;AACf,IAAA,6BAAgB,GAAE,CAAC;AACnB,IAAA,2BAAc,GAAE,CAAC;AACjB,IAAA,yBAAY,GAAE,CAAC;AACf,IAAA,0BAAa,GAAE,CAAC;AAChB,IAAA,4BAAe,GAAE,CAAC;AAClB,IAAA,sDAA+B,GAAE,CAAC;AAElC,IAAA,6BAAiB,GAAE,CAAC;AACpB,IAAA,gCAAoB,GAAE,CAAC;AACvB,IAAA,6BAAiB,GAAE,CAAC;AACpB,IAAA,mCAAuB,GAAE,CAAC;AAC1B,IAAA,6BAAiB,GAAE,CAAC;AACpB,IAAA,iCAAqB,GAAE,CAAC;AACxB,IAAA,4BAAgB,GAAE,CAAC;AACnB,IAAA,6BAAiB,GAAE,CAAC;AACpB,MAAa,YAAa,SAAQ,qBAAS;CAAG;AAA9C,oCAA8C","file":"ListTable-all.js","sourcesContent":["import { ListTable } from './ListTable';\nimport {\n registerAxis,\n registerEmptyTip,\n registerLegend,\n registerMenu,\n registerTitle,\n registerTooltip\n} from './components';\nimport { registerListTreeStickCellPlugin } from './plugins/list-tree-stick-cell';\nimport {\n registerChartCell,\n registerCheckboxCell,\n registerImageCell,\n registerProgressBarCell,\n registerRadioCell,\n registerSparkLineCell,\n registerTextCell,\n registerVideoCell\n} from './scenegraph/group-creater/cell-type';\n\nregisterAxis();\nregisterEmptyTip();\nregisterLegend();\nregisterMenu();\nregisterTitle();\nregisterTooltip();\nregisterListTreeStickCellPlugin();\n\nregisterChartCell();\nregisterCheckboxCell();\nregisterImageCell();\nregisterProgressBarCell();\nregisterRadioCell();\nregisterSparkLineCell();\nregisterTextCell();\nregisterVideoCell();\nexport class ListTableAll extends ListTable {}\n"]}
1
+ {"version":3,"sources":["../src/ListTable-all.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,6CAOsB;AACtB,oEAS8C;AAE9C,IAAA,yBAAY,GAAE,CAAC;AACf,IAAA,6BAAgB,GAAE,CAAC;AACnB,IAAA,2BAAc,GAAE,CAAC;AACjB,IAAA,yBAAY,GAAE,CAAC;AACf,IAAA,0BAAa,GAAE,CAAC;AAChB,IAAA,4BAAe,GAAE,CAAC;AAElB,IAAA,6BAAiB,GAAE,CAAC;AACpB,IAAA,gCAAoB,GAAE,CAAC;AACvB,IAAA,6BAAiB,GAAE,CAAC;AACpB,IAAA,mCAAuB,GAAE,CAAC;AAC1B,IAAA,6BAAiB,GAAE,CAAC;AACpB,IAAA,iCAAqB,GAAE,CAAC;AACxB,IAAA,4BAAgB,GAAE,CAAC;AACnB,IAAA,6BAAiB,GAAE,CAAC;AACpB,MAAa,YAAa,SAAQ,qBAAS;CAAG;AAA9C,oCAA8C","file":"ListTable-all.js","sourcesContent":["import { ListTable } from './ListTable';\nimport {\n registerAxis,\n registerEmptyTip,\n registerLegend,\n registerMenu,\n registerTitle,\n registerTooltip\n} from './components';\nimport {\n registerChartCell,\n registerCheckboxCell,\n registerImageCell,\n registerProgressBarCell,\n registerRadioCell,\n registerSparkLineCell,\n registerTextCell,\n registerVideoCell\n} from './scenegraph/group-creater/cell-type';\n\nregisterAxis();\nregisterEmptyTip();\nregisterLegend();\nregisterMenu();\nregisterTitle();\nregisterTooltip();\n\nregisterChartCell();\nregisterCheckboxCell();\nregisterImageCell();\nregisterProgressBarCell();\nregisterRadioCell();\nregisterSparkLineCell();\nregisterTextCell();\nregisterVideoCell();\nexport class ListTableAll extends ListTable {}\n"]}
@@ -2,15 +2,11 @@ import type { AggregationType, CellAddress, CellRange, ColumnsDefine, DropDownMe
2
2
  import { HierarchyState } from './ts-types';
3
3
  import { BaseTable } from './core';
4
4
  import type { ListTableProtected } from './ts-types/base-table';
5
- import { EditManeger } from './edit/edit-manager';
6
5
  import type { IEditor } from '@visactor/vtable-editors';
7
- import type { ListTreeStickCellPlugin } from './plugins/list-tree-stick-cell';
8
6
  export declare class ListTable extends BaseTable implements ListTableAPI {
9
7
  internalProps: ListTableProtected;
10
8
  options: ListTableConstructorOptions;
11
9
  showHeader: boolean;
12
- editorManager: EditManeger;
13
- listTreeStickCellPlugin?: ListTreeStickCellPlugin;
14
10
  constructor(options: ListTableConstructorOptions);
15
11
  constructor(container: HTMLElement, options: ListTableConstructorOptions);
16
12
  isListTable(): true;
@@ -89,5 +85,4 @@ export declare class ListTable extends BaseTable implements ListTableAPI {
89
85
  }[];
90
86
  }[];
91
87
  isAggregation(col: number, row: number): boolean;
92
- getGroupTitleLevel(col: number, row: number): number | undefined;
93
88
  }
package/cjs/ListTable.js CHANGED
@@ -29,22 +29,20 @@ Object.defineProperty(exports, "__esModule", {
29
29
  value: !0
30
30
  }), exports.ListTable = void 0;
31
31
 
32
- const ts_types_1 = require("./ts-types"), layout_1 = require("./layout"), vutils_1 = require("@visactor/vutils"), tableHelper_1 = require("./core/tableHelper"), core_1 = require("./core"), TABLE_EVENT_TYPE_1 = require("./core/TABLE_EVENT_TYPE"), env_1 = require("./tools/env"), editors = __importStar(require("./edit/editors")), edit_manager_1 = require("./edit/edit-manager"), util_1 = require("./tools/util"), radio_1 = require("./state/radio/radio"), vutils_extension_1 = require("@visactor/vutils-extension"), checkbox_1 = require("./state/checkbox/checkbox"), factory_1 = require("./core/factory"), group_helper_1 = require("./core/group-helper"), record_helper_1 = require("./core/record-helper");
32
+ const ts_types_1 = require("./ts-types"), layout_1 = require("./layout"), vutils_1 = require("@visactor/vutils"), tableHelper_1 = require("./core/tableHelper"), core_1 = require("./core"), TABLE_EVENT_TYPE_1 = require("./core/TABLE_EVENT_TYPE"), env_1 = require("./tools/env"), editors = __importStar(require("./edit/editors")), edit_manager_1 = require("./edit/edit-manager"), compute_col_width_1 = require("./scenegraph/layout/compute-col-width"), compute_row_height_1 = require("./scenegraph/layout/compute-row-height"), util_1 = require("./tools/util"), radio_1 = require("./state/radio/radio"), vutils_extension_1 = require("@visactor/vutils-extension"), checkbox_1 = require("./state/checkbox/checkbox"), factory_1 = require("./core/factory");
33
33
 
34
34
  class ListTable extends core_1.BaseTable {
35
35
  constructor(container, options) {
36
- var _a, _b, _c, _d;
36
+ var _a, _b;
37
37
  "node" === env_1.Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
38
38
  container = container.container ? container.container : null), super(container, options),
39
39
  this.showHeader = !0;
40
40
  const internalProps = this.internalProps;
41
41
  if (internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination,
42
- internalProps.sortState = options.sortState, internalProps.dataConfig = options.groupBy ? (0,
43
- group_helper_1.getGroupByDataConfig)(options.groupBy) : {}, internalProps.columns = options.columns ? (0,
42
+ internalProps.sortState = options.sortState, internalProps.dataConfig = {}, internalProps.columns = options.columns ? (0,
44
43
  vutils_extension_1.cloneDeepSpec)(options.columns, [ "children" ]) : options.header ? (0,
45
- vutils_extension_1.cloneDeepSpec)(options.header, [ "children" ]) : [], internalProps.enableTreeNodeMerge = null !== (_b = null !== (_a = options.enableTreeNodeMerge) && void 0 !== _a ? _a : (0,
46
- vutils_1.isValid)(options.groupBy)) && void 0 !== _b && _b, this.internalProps.headerHelper.setTableColumnsEditor(),
47
- this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d,
44
+ vutils_extension_1.cloneDeepSpec)(options.header, [ "children" ]) : [], this.internalProps.headerHelper.setTableColumnsEditor(),
45
+ this.showHeader = null === (_a = options.showHeader) || void 0 === _a || _a, this.transpose = null !== (_b = options.transpose) && void 0 !== _b && _b,
48
46
  "node" !== env_1.Env.mode && (this.editorManager = new edit_manager_1.EditManeger(this)),
49
47
  this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? (0,
50
48
  tableHelper_1._setDataSource)(this, options.dataSource) : options.records ? this.setRecords(options.records, {
@@ -57,10 +55,6 @@ class ListTable extends core_1.BaseTable {
57
55
  const EmptyTip = factory_1.Factory.getComponent("emptyTip");
58
56
  this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
59
57
  }
60
- if (options.enableTreeStickCell) {
61
- const ListTreeStickCellPlugin = factory_1.Factory.getComponent("listTreeStickCellPlugin");
62
- this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
63
- }
64
58
  setTimeout((() => {
65
59
  this.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.INITIALIZED, null);
66
60
  }), 0);
@@ -231,9 +225,8 @@ class ListTable extends core_1.BaseTable {
231
225
  const internalProps = this.internalProps;
232
226
  if (super.updateOption(options), internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode,
233
227
  this.pagination = options.pagination, internalProps.sortState = options.sortState,
234
- internalProps.dataConfig = options.groupBy ? (0, group_helper_1.getGroupByDataConfig)(options.groupBy) : {},
235
- this.showHeader = null === (_a = options.showHeader) || void 0 === _a || _a, internalProps.columns = options.columns ? (0,
236
- vutils_extension_1.cloneDeepSpec)(options.columns, [ "children" ]) : options.header ? (0,
228
+ internalProps.dataConfig = {}, this.showHeader = null === (_a = options.showHeader) || void 0 === _a || _a,
229
+ internalProps.columns = options.columns ? (0, vutils_extension_1.cloneDeepSpec)(options.columns, [ "children" ]) : options.header ? (0,
237
230
  vutils_extension_1.cloneDeepSpec)(options.header, [ "children" ]) : [], this.internalProps.headerHelper.setTableColumnsEditor(),
238
231
  this.transpose = null !== (_b = options.transpose) && void 0 !== _b && _b, this.refreshHeader(),
239
232
  this.internalProps.useOneRowHeightFillAll = !1, internalProps.releaseList && (internalProps.releaseList.forEach((releaseObj => {
@@ -356,9 +349,7 @@ class ListTable extends core_1.BaseTable {
356
349
  return null;
357
350
  }
358
351
  getHierarchyState(col, row) {
359
- if (!this.options.groupBy) {
360
- if (!this.getBodyColumnDefine(col, row).tree) return ts_types_1.HierarchyState.none;
361
- }
352
+ if (!this.getBodyColumnDefine(col, row).tree) return ts_types_1.HierarchyState.none;
362
353
  const index = this.getRecordShowIndexByCell(col, row);
363
354
  return this.dataSource.getHierarchyState(index);
364
355
  }
@@ -391,7 +382,7 @@ class ListTable extends core_1.BaseTable {
391
382
  this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions),
392
383
  checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth),
393
384
  this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight),
394
- ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSize(0));
385
+ ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(0));
395
386
  }
396
387
  _hasHierarchyTreeHeader() {
397
388
  var _a, _b;
@@ -429,7 +420,7 @@ class ListTable extends core_1.BaseTable {
429
420
  }
430
421
  updateFilterRules(filterRules) {
431
422
  this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules),
432
- (0, record_helper_1.sortRecords)(this)) : this.dataSource.updateFilterRules(filterRules),
423
+ (0, tableHelper_1.sortRecords)(this)) : this.dataSource.updateFilterRules(filterRules),
433
424
  this.refreshRowColCount(), this.scenegraph.createSceneGraph();
434
425
  }
435
426
  getCheckboxState(field) {
@@ -486,7 +477,8 @@ class ListTable extends core_1.BaseTable {
486
477
  this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
487
478
  }
488
479
  this.render(), (0, vutils_1.isValid)(oldHoverState.col) && (0, vutils_1.isValid)(oldHoverState.row) && oldHoverState.col >= 0 && oldHoverState.row >= 0 && setTimeout((() => {
489
- this.internalProps.tooltipHandler.showTooltip(oldHoverState.col, oldHoverState.row);
480
+ var _a;
481
+ null === (_a = this.internalProps) || void 0 === _a || _a.tooltipHandler.showTooltip(oldHoverState.col, oldHoverState.row);
490
482
  }), 0);
491
483
  }
492
484
  setRecordChildren(records, col, row) {
@@ -537,22 +529,282 @@ class ListTable extends core_1.BaseTable {
537
529
  return (0, vutils_1.isValid)(editorDefine);
538
530
  }
539
531
  changeCellValue(col, row, value, workOnEditableCell = !1) {
540
- return (0, record_helper_1.listTableChangeCellValue)(col, row, value, workOnEditableCell, this);
532
+ if (workOnEditableCell && this.isHasEditorDefine(col, row) || !1 === workOnEditableCell) {
533
+ const recordIndex = this.getRecordShowIndexByCell(col, row), {field: field} = this.internalProps.layoutMap.getBody(col, row), beforeChangeValue = this.getCellRawValue(col, row), oldValue = this.getCellOriginValue(col, row);
534
+ this.isHeader(col, row) ? this.internalProps.layoutMap.updateColumnTitle(col, row, value) : this.dataSource.changeFieldValue(value, recordIndex, field, col, row, this);
535
+ const range = this.getCellRange(col, row), aggregators = this.internalProps.layoutMap.getAggregatorsByCell(col, row);
536
+ if (aggregators) {
537
+ if (Array.isArray(aggregators)) for (let i = 0; i < (null == aggregators ? void 0 : aggregators.length); i++) aggregators[i].recalculate(); else aggregators.recalculate();
538
+ const aggregatorCells = this.internalProps.layoutMap.getAggregatorCellAddress(range.start.col, range.start.row, range.end.col, range.end.row);
539
+ for (let i = 0; i < aggregatorCells.length; i++) {
540
+ const range = this.getCellRange(aggregatorCells[i].col, aggregatorCells[i].row);
541
+ for (let sCol = range.start.col; sCol <= range.end.col; sCol++) for (let sRow = range.start.row; sRow <= range.end.row; sRow++) this.scenegraph.updateCellContent(sCol, sRow);
542
+ }
543
+ }
544
+ for (let sCol = range.start.col; sCol <= range.end.col; sCol++) for (let sRow = range.start.row; sRow <= range.end.row; sRow++) this.scenegraph.updateCellContent(sCol, sRow);
545
+ if ("adaptive" === this.widthMode || this.autoFillWidth && this.getAllColsWidth() <= this.tableNoFrameWidth) 0 === this.internalProps._widthResizedColMap.size && this.scenegraph.recalculateColWidths(); else if (!this.internalProps._widthResizedColMap.has(col)) {
546
+ const oldWidth = this.getColWidth(col), newWidth = (0, compute_col_width_1.computeColWidth)(col, 0, this.rowCount - 1, this, !1);
547
+ newWidth !== oldWidth && this.scenegraph.updateColWidth(col, newWidth - oldWidth);
548
+ }
549
+ if ("adaptive" === this.heightMode || this.autoFillHeight && this.getAllRowsHeight() <= this.tableNoFrameHeight) 0 === this.internalProps._heightResizedRowMap.size && this.scenegraph.recalculateRowHeights(); else if ("autoHeight" === this.heightMode && !this.internalProps._heightResizedRowMap.has(row)) {
550
+ const oldHeight = this.getRowHeight(row), newHeight = (0, compute_row_height_1.computeRowHeight)(row, 0, this.colCount - 1, this);
551
+ this.scenegraph.updateRowHeight(row, newHeight - oldHeight);
552
+ }
553
+ this.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
554
+ col: col,
555
+ row: row,
556
+ rawValue: beforeChangeValue,
557
+ currentValue: oldValue,
558
+ changedValue: this.getCellOriginValue(col, row)
559
+ }), this.scenegraph.updateNextFrame();
560
+ }
541
561
  }
542
562
  changeCellValues(startCol, startRow, values, workOnEditableCell = !1) {
543
- return (0, record_helper_1.listTableChangeCellValues)(startCol, startRow, values, workOnEditableCell, this);
563
+ let pasteColEnd = startCol, pasteRowEnd = startRow;
564
+ const beforeChangeValues = [], oldValues = [];
565
+ for (let i = 0; i < values.length && !(startRow + i > this.rowCount - 1); i++) {
566
+ const rowValues = values[i], rawRowValues = [], oldRowValues = [];
567
+ beforeChangeValues.push(rawRowValues), oldValues.push(oldRowValues);
568
+ for (let j = 0; j < rowValues.length && !(startCol + j > this.colCount - 1); j++) {
569
+ const beforeChangeValue = this.getCellRawValue(startCol + j, startRow + i);
570
+ rawRowValues.push(beforeChangeValue);
571
+ const oldValue = this.getCellOriginValue(startCol + j, startRow + i);
572
+ oldRowValues.push(oldValue);
573
+ }
574
+ }
575
+ for (let i = 0; i < values.length && !(startRow + i > this.rowCount - 1); i++) {
576
+ pasteRowEnd = startRow + i;
577
+ const rowValues = values[i];
578
+ let thisRowPasteColEnd = startCol;
579
+ for (let j = 0; j < rowValues.length && !(startCol + j > this.colCount - 1); j++) if (thisRowPasteColEnd = startCol + j,
580
+ workOnEditableCell && this.isHasEditorDefine(startCol + j, startRow + i) || !1 === workOnEditableCell) {
581
+ const value = rowValues[j], recordIndex = this.getRecordShowIndexByCell(startCol + j, startRow + i), {field: field} = this.internalProps.layoutMap.getBody(startCol + j, startRow + i), beforeChangeValue = beforeChangeValues[i][j], oldValue = oldValues[i][j];
582
+ this.isHeader(startCol + j, startRow + i) ? this.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : this.dataSource.changeFieldValue(value, recordIndex, field, startCol + j, startRow + i, this),
583
+ this.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
584
+ col: startCol + j,
585
+ row: startRow + i,
586
+ rawValue: beforeChangeValue,
587
+ currentValue: oldValue,
588
+ changedValue: this.getCellOriginValue(startCol + j, startRow + i)
589
+ });
590
+ }
591
+ pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);
592
+ }
593
+ const startRange = this.getCellRange(startCol, startRow), range = this.getCellRange(pasteColEnd, pasteRowEnd), aggregators = this.internalProps.layoutMap.getAggregatorsByCellRange(startRange.start.col, startRange.start.row, range.end.col, range.end.row);
594
+ if (aggregators) {
595
+ for (let i = 0; i < (null == aggregators ? void 0 : aggregators.length); i++) aggregators[i].recalculate();
596
+ const aggregatorCells = this.internalProps.layoutMap.getAggregatorCellAddress(startRange.start.col, startRange.start.row, range.end.col, range.end.row);
597
+ for (let i = 0; i < aggregatorCells.length; i++) {
598
+ const range = this.getCellRange(aggregatorCells[i].col, aggregatorCells[i].row);
599
+ for (let sCol = range.start.col; sCol <= range.end.col; sCol++) for (let sRow = range.start.row; sRow <= range.end.row; sRow++) this.scenegraph.updateCellContent(sCol, sRow);
600
+ }
601
+ }
602
+ for (let sCol = startRange.start.col; sCol <= range.end.col; sCol++) for (let sRow = startRange.start.row; sRow <= range.end.row; sRow++) this.scenegraph.updateCellContent(sCol, sRow);
603
+ if ("adaptive" === this.widthMode || this.autoFillWidth && this.getAllColsWidth() <= this.tableNoFrameWidth) 0 === this.internalProps._widthResizedColMap.size && this.scenegraph.recalculateColWidths(); else for (let sCol = startCol; sCol <= range.end.col; sCol++) if (!this.internalProps._widthResizedColMap.has(sCol)) {
604
+ const oldWidth = this.getColWidth(sCol), newWidth = (0, compute_col_width_1.computeColWidth)(sCol, 0, this.rowCount - 1, this, !1);
605
+ newWidth !== oldWidth && this.scenegraph.updateColWidth(sCol, newWidth - oldWidth);
606
+ }
607
+ if ("adaptive" === this.heightMode || this.autoFillHeight && this.getAllRowsHeight() <= this.tableNoFrameHeight) this.scenegraph.recalculateRowHeights(); else if ("autoHeight" === this.heightMode) {
608
+ const rows = [], deltaYs = [];
609
+ for (let sRow = startRow; sRow <= range.end.row; sRow++) if (this.rowHeightsMap.get(sRow)) {
610
+ const oldHeight = this.getRowHeight(sRow), newHeight = (0, compute_row_height_1.computeRowHeight)(sRow, 0, this.colCount - 1, this);
611
+ rows.push(sRow), deltaYs.push(newHeight - oldHeight);
612
+ }
613
+ this.scenegraph.updateRowsHeight(rows, deltaYs);
614
+ }
615
+ this.scenegraph.updateNextFrame();
544
616
  }
545
617
  addRecord(record, recordIndex) {
546
- (0, record_helper_1.listTableAddRecord)(record, recordIndex, this);
618
+ if (this.sortState) this.dataSource.addRecordForSorted(record), (0, tableHelper_1.sortRecords)(this),
619
+ this.refreshRowColCount(), this.scenegraph.clearCells(), this.scenegraph.createSceneGraph(); else {
620
+ (void 0 === recordIndex || recordIndex > this.dataSource.sourceLength) && (recordIndex = this.dataSource.sourceLength);
621
+ const headerCount = this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount;
622
+ this.dataSource.addRecord(record, recordIndex);
623
+ const oldRowCount = this.rowCount;
624
+ if (this.refreshRowColCount(), 0 === this.scenegraph.proxy.totalActualBodyRowCount) return this.scenegraph.clearCells(),
625
+ void this.scenegraph.createSceneGraph();
626
+ const newRowCount = this.transpose ? this.colCount : this.rowCount;
627
+ if (this.pagination) {
628
+ const {perPageCount: perPageCount, currentPage: currentPage} = this.pagination, endIndex = perPageCount * (currentPage || 0) + perPageCount;
629
+ if (recordIndex < endIndex) if (recordIndex < endIndex - perPageCount) this.scenegraph.clearCells(),
630
+ this.scenegraph.createSceneGraph(); else {
631
+ const rowNum = recordIndex - (endIndex - perPageCount) + headerCount;
632
+ if (oldRowCount - headerCount === this.pagination.perPageCount) {
633
+ const updateRows = [];
634
+ for (let row = rowNum; row < newRowCount; row++) this.transpose ? updateRows.push({
635
+ col: row,
636
+ row: 0
637
+ }) : updateRows.push({
638
+ col: 0,
639
+ row: row
640
+ });
641
+ this.transpose ? this.scenegraph.updateCol([], [], updateRows) : this.scenegraph.updateRow([], [], updateRows);
642
+ } else {
643
+ const addRows = [];
644
+ for (let row = rowNum; row < Math.min(newRowCount, rowNum + 1); row++) this.transpose ? addRows.push({
645
+ col: row,
646
+ row: 0
647
+ }) : addRows.push({
648
+ col: 0,
649
+ row: row
650
+ });
651
+ this.transpose ? this.scenegraph.updateCol([], addRows, []) : this.scenegraph.updateRow([], addRows, []);
652
+ }
653
+ }
654
+ } else {
655
+ const addRows = [];
656
+ for (let row = recordIndex + headerCount; row < recordIndex + headerCount + 1; row++) this.transpose ? addRows.push({
657
+ col: row,
658
+ row: 0
659
+ }) : addRows.push({
660
+ col: 0,
661
+ row: row
662
+ });
663
+ this.transpose ? this.scenegraph.updateCol([], addRows, []) : this.scenegraph.updateRow([], addRows, []);
664
+ }
665
+ }
547
666
  }
548
667
  addRecords(records, recordIndex) {
549
- (0, record_helper_1.listTableAddRecords)(records, recordIndex, this);
668
+ if (this.sortState) this.dataSource.addRecordsForSorted(records), (0, tableHelper_1.sortRecords)(this),
669
+ this.refreshRowColCount(), this.scenegraph.clearCells(), this.scenegraph.createSceneGraph(); else {
670
+ void 0 === recordIndex || recordIndex > this.dataSource.sourceLength ? recordIndex = this.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
671
+ const headerCount = this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount;
672
+ this.dataSource.addRecords(records, recordIndex);
673
+ const oldRowCount = this.transpose ? this.colCount : this.rowCount;
674
+ if (this.refreshRowColCount(), 0 === this.scenegraph.proxy.totalActualBodyRowCount) return this.scenegraph.clearCells(),
675
+ void this.scenegraph.createSceneGraph();
676
+ const newRowCount = this.transpose ? this.colCount : this.rowCount;
677
+ if (this.pagination) {
678
+ const {perPageCount: perPageCount, currentPage: currentPage} = this.pagination, endIndex = perPageCount * (currentPage || 0) + perPageCount;
679
+ if (recordIndex < endIndex) if (recordIndex < endIndex - perPageCount) this.scenegraph.clearCells(),
680
+ this.scenegraph.createSceneGraph(); else {
681
+ const rowNum = recordIndex - (endIndex - perPageCount) + headerCount;
682
+ if (oldRowCount - headerCount === this.pagination.perPageCount) {
683
+ const updateRows = [];
684
+ for (let row = rowNum; row < newRowCount; row++) this.transpose ? updateRows.push({
685
+ col: row,
686
+ row: 0
687
+ }) : updateRows.push({
688
+ col: 0,
689
+ row: row
690
+ });
691
+ this.transpose ? this.scenegraph.updateCol([], [], updateRows) : this.scenegraph.updateRow([], [], updateRows);
692
+ } else {
693
+ const addRows = [];
694
+ for (let row = rowNum; row < Math.min(newRowCount, rowNum + (Array.isArray(records) ? records.length : 1)); row++) this.transpose ? addRows.push({
695
+ col: row,
696
+ row: 0
697
+ }) : addRows.push({
698
+ col: 0,
699
+ row: row
700
+ });
701
+ this.transpose ? this.scenegraph.updateCol([], addRows, []) : this.scenegraph.updateRow([], addRows, []);
702
+ }
703
+ }
704
+ } else {
705
+ const addRows = [];
706
+ for (let row = recordIndex + headerCount; row < recordIndex + headerCount + (Array.isArray(records) ? records.length : 1); row++) this.transpose ? addRows.push({
707
+ col: row,
708
+ row: 0
709
+ }) : addRows.push({
710
+ col: 0,
711
+ row: row
712
+ });
713
+ this.transpose ? this.scenegraph.updateCol([], addRows, []) : this.scenegraph.updateRow([], addRows, []);
714
+ }
715
+ }
550
716
  }
551
717
  deleteRecords(recordIndexs) {
552
- (0, record_helper_1.listTableDeleteRecords)(recordIndexs, this);
718
+ if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (this.sortState) this.dataSource.deleteRecordsForSorted(recordIndexs),
719
+ (0, tableHelper_1.sortRecords)(this), this.refreshRowColCount(), this.scenegraph.clearCells(),
720
+ this.scenegraph.createSceneGraph(); else {
721
+ const deletedRecordIndexs = this.dataSource.deleteRecords(recordIndexs);
722
+ if (0 === deletedRecordIndexs.length) return;
723
+ const oldRowCount = this.transpose ? this.colCount : this.rowCount;
724
+ this.refreshRowColCount();
725
+ const newRowCount = this.transpose ? this.colCount : this.rowCount, recordIndexsMinToMax = deletedRecordIndexs.sort(((a, b) => a - b)), minRecordIndex = recordIndexsMinToMax[0];
726
+ if (this.pagination) {
727
+ const {perPageCount: perPageCount, currentPage: currentPage} = this.pagination, endIndex = perPageCount * (currentPage || 0) + perPageCount;
728
+ if (minRecordIndex < endIndex) if (minRecordIndex < endIndex - perPageCount) this.scenegraph.clearCells(),
729
+ this.scenegraph.createSceneGraph(); else {
730
+ const updateRows = [], delRows = [];
731
+ for (let row = minRecordIndex - (endIndex - perPageCount) + (this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount); row < newRowCount; row++) this.transpose ? updateRows.push({
732
+ col: row,
733
+ row: 0
734
+ }) : updateRows.push({
735
+ col: 0,
736
+ row: row
737
+ });
738
+ if (newRowCount < oldRowCount) for (let row = newRowCount; row < oldRowCount; row++) this.transpose ? delRows.push({
739
+ col: row,
740
+ row: 0
741
+ }) : delRows.push({
742
+ col: 0,
743
+ row: row
744
+ });
745
+ this.transpose ? this.scenegraph.updateCol(delRows, [], updateRows) : this.scenegraph.updateRow(delRows, [], updateRows);
746
+ }
747
+ } else {
748
+ const delRows = [];
749
+ for (let index = 0; index < recordIndexsMinToMax.length; index++) {
750
+ const rowNum = recordIndexsMinToMax[index] + (this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount);
751
+ this.transpose ? delRows.push({
752
+ col: rowNum,
753
+ row: 0
754
+ }) : delRows.push({
755
+ col: 0,
756
+ row: rowNum
757
+ });
758
+ }
759
+ this.transpose ? this.scenegraph.updateCol(delRows, [], []) : this.scenegraph.updateRow(delRows, [], []);
760
+ }
761
+ }
553
762
  }
554
763
  updateRecords(records, recordIndexs) {
555
- (0, record_helper_1.listTableUpdateRecords)(records, recordIndexs, this);
764
+ if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (this.sortState) this.dataSource.updateRecordsForSorted(records, recordIndexs),
765
+ (0, tableHelper_1.sortRecords)(this), this.refreshRowColCount(), this.scenegraph.clearCells(),
766
+ this.scenegraph.createSceneGraph(); else {
767
+ const updateRecordIndexs = this.dataSource.updateRecords(records, recordIndexs);
768
+ if (0 === updateRecordIndexs.length) return;
769
+ const recordIndexsMinToMax = updateRecordIndexs.sort(((a, b) => a - b));
770
+ if (this.pagination) {
771
+ const {perPageCount: perPageCount, currentPage: currentPage} = this.pagination, endIndex = perPageCount * (currentPage || 0) + perPageCount, updateRows = [];
772
+ for (let index = 0; index < recordIndexsMinToMax.length; index++) {
773
+ const recordIndex = recordIndexsMinToMax[index];
774
+ if (recordIndex < endIndex && recordIndex >= endIndex - perPageCount) {
775
+ const rowNum = recordIndex - (endIndex - perPageCount) + (this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount);
776
+ updateRows.push(rowNum);
777
+ }
778
+ }
779
+ if (updateRows.length >= 1) {
780
+ const updateRowCells = [];
781
+ for (let index = 0; index < updateRows.length; index++) {
782
+ const updateRow = updateRows[index];
783
+ this.transpose ? updateRowCells.push({
784
+ col: updateRow,
785
+ row: 0
786
+ }) : updateRowCells.push({
787
+ col: 0,
788
+ row: updateRow
789
+ });
790
+ }
791
+ this.transpose ? this.scenegraph.updateCol([], [], updateRowCells) : this.scenegraph.updateRow([], [], updateRowCells);
792
+ }
793
+ } else {
794
+ const updateRows = [];
795
+ for (let index = 0; index < recordIndexsMinToMax.length; index++) {
796
+ const rowNum = recordIndexsMinToMax[index] + (this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount);
797
+ this.transpose ? updateRows.push({
798
+ col: rowNum,
799
+ row: 0
800
+ }) : updateRows.push({
801
+ col: 0,
802
+ row: rowNum
803
+ });
804
+ }
805
+ this.transpose ? this.scenegraph.updateCol([], [], updateRows) : this.scenegraph.updateRow([], [], updateRows);
806
+ }
807
+ }
556
808
  }
557
809
  _hasCustomRenderOrLayout() {
558
810
  var _a, _b, _c, _d;
@@ -588,14 +840,6 @@ class ListTable extends core_1.BaseTable {
588
840
  isAggregation(col, row) {
589
841
  return this.internalProps.layoutMap.isAggregation(col, row);
590
842
  }
591
- getGroupTitleLevel(col, row) {
592
- var _a;
593
- if (!this.options.groupBy) return;
594
- const indexArr = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row)), groupLength = null !== (_a = this.dataSource.getGroupLength()) && void 0 !== _a ? _a : 0;
595
- let indexArrLngth = (0, vutils_1.isArray)(indexArr) ? indexArr.length - 1 : 0;
596
- return groupLength > 0 && indexArrLngth === groupLength && (indexArrLngth = void 0),
597
- indexArrLngth;
598
- }
599
843
  }
600
844
 
601
845
  exports.ListTable = ListTable;