@visactor/vtable 1.26.6 → 1.26.7

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 (289) 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 +1 -1
  4. package/cjs/ListTable.js +5 -3
  5. package/cjs/ListTable.js.map +1 -1
  6. package/cjs/PivotChart.js +5 -4
  7. package/cjs/PivotChart.js.map +1 -1
  8. package/cjs/PivotTable-all.js +4 -3
  9. package/cjs/PivotTable-all.js.map +1 -1
  10. package/cjs/body-helper/body-helper.d.ts +1 -1
  11. package/cjs/body-helper/body-helper.js +1 -0
  12. package/cjs/body-helper/body-helper.js.map +1 -1
  13. package/cjs/components/tooltip/TooltipHandler.d.ts +4 -0
  14. package/cjs/components/tooltip/TooltipHandler.js +32 -7
  15. package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
  16. package/cjs/core/BaseTable.js +7 -4
  17. package/cjs/core/BaseTable.js.map +1 -1
  18. package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
  19. package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
  20. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  21. package/cjs/core/tableHelper.js +1 -2
  22. package/cjs/data/DataSource.js +2 -1
  23. package/cjs/event/event.js +1 -1
  24. package/cjs/event/helper.js +1 -1
  25. package/cjs/event/media-click.js +145 -13
  26. package/cjs/event/media-click.js.map +1 -1
  27. package/cjs/event/scroll.js +1 -1
  28. package/cjs/event/sparkline-event.js +1 -1
  29. package/cjs/event/util.js +1 -1
  30. package/cjs/header-helper/header-helper.js +3 -1
  31. package/cjs/header-helper/header-helper.js.map +1 -1
  32. package/cjs/index.d.ts +3 -3
  33. package/cjs/index.js +1 -1
  34. package/cjs/index.js.map +1 -1
  35. package/cjs/plugins/custom-cell-style.js +1 -1
  36. package/cjs/plugins/index.js +1 -2
  37. package/cjs/plugins/interface.js +1 -1
  38. package/cjs/plugins/invert-highlight.js +1 -1
  39. package/cjs/plugins/list-tree-stick-cell.js +1 -1
  40. package/cjs/plugins/plugin-manager.js +1 -1
  41. package/cjs/scenegraph/group-creater/cell-helper.d.ts +4 -2
  42. package/cjs/scenegraph/group-creater/cell-helper.js +67 -42
  43. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  44. package/cjs/scenegraph/group-creater/cell-type/audio-cell.d.ts +7 -0
  45. package/cjs/scenegraph/group-creater/cell-type/audio-cell.js +83 -0
  46. package/cjs/scenegraph/group-creater/cell-type/audio-cell.js.map +1 -0
  47. package/cjs/scenegraph/group-creater/cell-type/button-cell.d.ts +1 -1
  48. package/cjs/scenegraph/group-creater/cell-type/button-cell.js +5 -4
  49. package/cjs/scenegraph/group-creater/cell-type/button-cell.js.map +1 -1
  50. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -2
  51. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  52. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +1 -1
  53. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +5 -4
  54. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  55. package/cjs/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
  56. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +43 -15
  57. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  58. package/cjs/scenegraph/group-creater/cell-type/index.d.ts +1 -0
  59. package/cjs/scenegraph/group-creater/cell-type/index.js +8 -2
  60. package/cjs/scenegraph/group-creater/cell-type/index.js.map +1 -1
  61. package/cjs/scenegraph/group-creater/cell-type/media-cell-helper.d.ts +13 -0
  62. package/cjs/scenegraph/group-creater/cell-type/media-cell-helper.js +64 -0
  63. package/cjs/scenegraph/group-creater/cell-type/media-cell-helper.js.map +1 -0
  64. package/cjs/scenegraph/group-creater/cell-type/radio-cell.d.ts +1 -1
  65. package/cjs/scenegraph/group-creater/cell-type/radio-cell.js +23 -7
  66. package/cjs/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
  67. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +1 -1
  68. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +6 -5
  69. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  70. package/cjs/scenegraph/group-creater/cell-type/switch-cell.d.ts +1 -1
  71. package/cjs/scenegraph/group-creater/cell-type/switch-cell.js +5 -4
  72. package/cjs/scenegraph/group-creater/cell-type/switch-cell.js.map +1 -1
  73. package/cjs/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
  74. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +44 -23
  75. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  76. package/cjs/scenegraph/group-creater/column-helper.js +14 -7
  77. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  78. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -0
  79. package/cjs/scenegraph/group-creater/progress/proxy.js +11 -5
  80. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  81. package/cjs/scenegraph/icon/icon-update.js +1 -0
  82. package/cjs/scenegraph/icon/icon-update.js.map +1 -1
  83. package/cjs/scenegraph/layout/compute-col-width.js +8 -3
  84. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  85. package/cjs/scenegraph/layout/compute-row-height.js +18 -5
  86. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  87. package/cjs/scenegraph/layout/update-height.js +1 -1
  88. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  89. package/cjs/scenegraph/layout/update-width.js +1 -1
  90. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  91. package/cjs/scenegraph/scenegraph.d.ts +1 -0
  92. package/cjs/scenegraph/scenegraph.js +53 -46
  93. package/cjs/scenegraph/scenegraph.js.map +1 -1
  94. package/cjs/scenegraph/stick-text/index.js +46 -20
  95. package/cjs/scenegraph/stick-text/index.js.map +1 -1
  96. package/cjs/scenegraph/utils/deal-promise-data.d.ts +1 -1
  97. package/cjs/scenegraph/utils/deal-promise-data.js +2 -2
  98. package/cjs/scenegraph/utils/deal-promise-data.js.map +1 -1
  99. package/cjs/state/cell-move/index.js +6 -3
  100. package/cjs/state/cell-move/index.js.map +1 -1
  101. package/cjs/state/checkbox/checkbox.d.ts +3 -1
  102. package/cjs/state/checkbox/checkbox.js +53 -34
  103. package/cjs/state/checkbox/checkbox.js.map +1 -1
  104. package/cjs/state/radio/radio.d.ts +3 -1
  105. package/cjs/state/radio/radio.js +69 -12
  106. package/cjs/state/radio/radio.js.map +1 -1
  107. package/cjs/state/state.d.ts +3 -2
  108. package/cjs/state/state.js +6 -3
  109. package/cjs/state/state.js.map +1 -1
  110. package/cjs/tools/media.d.ts +1 -0
  111. package/cjs/tools/media.js +19 -0
  112. package/cjs/tools/media.js.map +1 -0
  113. package/cjs/ts-types/base-table.d.ts +1 -0
  114. package/cjs/ts-types/base-table.js.map +1 -1
  115. package/cjs/ts-types/column/type.d.ts +2 -2
  116. package/cjs/ts-types/column/type.js.map +1 -1
  117. package/cjs/ts-types/events.d.ts +3 -1
  118. package/cjs/ts-types/events.js.map +1 -1
  119. package/cjs/ts-types/icon.d.ts +1 -0
  120. package/cjs/ts-types/icon.js.map +1 -1
  121. package/cjs/ts-types/list-table/define/image-define.d.ts +10 -0
  122. package/cjs/ts-types/list-table/define/image-define.js.map +1 -1
  123. package/cjs/ts-types/list-table/define/index.d.ts +5 -4
  124. package/cjs/ts-types/list-table/define/index.js.map +1 -1
  125. package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -4
  126. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  127. package/cjs/ts-types/list-table/layout-map/index.d.ts +1 -1
  128. package/cjs/ts-types/list-table/layout-map/index.js.map +1 -1
  129. package/cjs/ts-types/menu.d.ts +12 -0
  130. package/cjs/ts-types/menu.js.map +1 -1
  131. package/cjs/ts-types/pivot-table/dimension/image-dimension.d.ts +5 -0
  132. package/cjs/ts-types/pivot-table/dimension/image-dimension.js.map +1 -1
  133. package/cjs/ts-types/pivot-table/dimension/index.d.ts +5 -3
  134. package/cjs/ts-types/pivot-table/dimension/index.js.map +1 -1
  135. package/cjs/ts-types/pivot-table/indicator/image-indicator.d.ts +10 -0
  136. package/cjs/ts-types/pivot-table/indicator/image-indicator.js.map +1 -1
  137. package/cjs/ts-types/pivot-table/indicator/index.d.ts +3 -3
  138. package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
  139. package/cjs/ts-types/table-engine.d.ts +6 -3
  140. package/cjs/ts-types/table-engine.js.map +1 -1
  141. package/cjs/ts-types/tooltip.d.ts +1 -0
  142. package/cjs/ts-types/tooltip.js.map +1 -1
  143. package/cjs/vrender.js.map +1 -1
  144. package/dist/vtable.js +1127 -325
  145. package/dist/vtable.min.js +1 -1
  146. package/es/ListTable-all.js +4 -4
  147. package/es/ListTable-all.js.map +1 -1
  148. package/es/ListTable.d.ts +1 -1
  149. package/es/ListTable.js +5 -3
  150. package/es/ListTable.js.map +1 -1
  151. package/es/PivotChart.js +4 -4
  152. package/es/PivotChart.js.map +1 -1
  153. package/es/PivotTable-all.js +4 -4
  154. package/es/PivotTable-all.js.map +1 -1
  155. package/es/body-helper/body-helper.d.ts +1 -1
  156. package/es/body-helper/body-helper.js +1 -0
  157. package/es/body-helper/body-helper.js.map +1 -1
  158. package/es/components/tooltip/TooltipHandler.d.ts +4 -0
  159. package/es/components/tooltip/TooltipHandler.js +32 -7
  160. package/es/components/tooltip/TooltipHandler.js.map +1 -1
  161. package/es/core/BaseTable.js +7 -4
  162. package/es/core/BaseTable.js.map +1 -1
  163. package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
  164. package/es/core/TABLE_EVENT_TYPE.js +1 -0
  165. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  166. package/es/core/tableHelper.js +1 -2
  167. package/es/data/DataSource.js +2 -1
  168. package/es/event/event.js +1 -1
  169. package/es/event/helper.js +1 -1
  170. package/es/event/media-click.js +148 -12
  171. package/es/event/media-click.js.map +1 -1
  172. package/es/event/scroll.js +1 -1
  173. package/es/event/sparkline-event.js +1 -1
  174. package/es/event/util.js +1 -1
  175. package/es/header-helper/header-helper.js +3 -1
  176. package/es/header-helper/header-helper.js.map +1 -1
  177. package/es/index.d.ts +3 -3
  178. package/es/index.js +1 -1
  179. package/es/index.js.map +1 -1
  180. package/es/plugins/custom-cell-style.js +1 -1
  181. package/es/plugins/index.js +1 -2
  182. package/es/plugins/interface.js +1 -1
  183. package/es/plugins/invert-highlight.js +1 -1
  184. package/es/plugins/list-tree-stick-cell.js +1 -1
  185. package/es/plugins/plugin-manager.js +1 -1
  186. package/es/scenegraph/group-creater/cell-helper.d.ts +4 -2
  187. package/es/scenegraph/group-creater/cell-helper.js +67 -40
  188. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  189. package/es/scenegraph/group-creater/cell-type/audio-cell.d.ts +7 -0
  190. package/es/scenegraph/group-creater/cell-type/audio-cell.js +89 -0
  191. package/es/scenegraph/group-creater/cell-type/audio-cell.js.map +1 -0
  192. package/es/scenegraph/group-creater/cell-type/button-cell.d.ts +1 -1
  193. package/es/scenegraph/group-creater/cell-type/button-cell.js +5 -4
  194. package/es/scenegraph/group-creater/cell-type/button-cell.js.map +1 -1
  195. package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -2
  196. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  197. package/es/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +1 -1
  198. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +5 -4
  199. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  200. package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
  201. package/es/scenegraph/group-creater/cell-type/image-cell.js +43 -14
  202. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  203. package/es/scenegraph/group-creater/cell-type/index.d.ts +1 -0
  204. package/es/scenegraph/group-creater/cell-type/index.js +6 -0
  205. package/es/scenegraph/group-creater/cell-type/index.js.map +1 -1
  206. package/es/scenegraph/group-creater/cell-type/media-cell-helper.d.ts +13 -0
  207. package/es/scenegraph/group-creater/cell-type/media-cell-helper.js +56 -0
  208. package/es/scenegraph/group-creater/cell-type/media-cell-helper.js.map +1 -0
  209. package/es/scenegraph/group-creater/cell-type/radio-cell.d.ts +1 -1
  210. package/es/scenegraph/group-creater/cell-type/radio-cell.js +23 -7
  211. package/es/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
  212. package/es/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +1 -1
  213. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +6 -5
  214. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  215. package/es/scenegraph/group-creater/cell-type/switch-cell.d.ts +1 -1
  216. package/es/scenegraph/group-creater/cell-type/switch-cell.js +5 -4
  217. package/es/scenegraph/group-creater/cell-type/switch-cell.js.map +1 -1
  218. package/es/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
  219. package/es/scenegraph/group-creater/cell-type/video-cell.js +47 -22
  220. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  221. package/es/scenegraph/group-creater/column-helper.js +14 -8
  222. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  223. package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -0
  224. package/es/scenegraph/group-creater/progress/proxy.js +11 -5
  225. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  226. package/es/scenegraph/icon/icon-update.js +1 -0
  227. package/es/scenegraph/icon/icon-update.js.map +1 -1
  228. package/es/scenegraph/layout/compute-col-width.js +8 -3
  229. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  230. package/es/scenegraph/layout/compute-row-height.js +17 -5
  231. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  232. package/es/scenegraph/layout/update-height.js +1 -1
  233. package/es/scenegraph/layout/update-height.js.map +1 -1
  234. package/es/scenegraph/layout/update-width.js +1 -1
  235. package/es/scenegraph/layout/update-width.js.map +1 -1
  236. package/es/scenegraph/scenegraph.d.ts +1 -0
  237. package/es/scenegraph/scenegraph.js +53 -46
  238. package/es/scenegraph/scenegraph.js.map +1 -1
  239. package/es/scenegraph/stick-text/index.js +46 -18
  240. package/es/scenegraph/stick-text/index.js.map +1 -1
  241. package/es/scenegraph/utils/deal-promise-data.d.ts +1 -1
  242. package/es/scenegraph/utils/deal-promise-data.js +2 -2
  243. package/es/scenegraph/utils/deal-promise-data.js.map +1 -1
  244. package/es/state/cell-move/index.js +6 -3
  245. package/es/state/cell-move/index.js.map +1 -1
  246. package/es/state/checkbox/checkbox.d.ts +3 -1
  247. package/es/state/checkbox/checkbox.js +53 -34
  248. package/es/state/checkbox/checkbox.js.map +1 -1
  249. package/es/state/radio/radio.d.ts +3 -1
  250. package/es/state/radio/radio.js +70 -13
  251. package/es/state/radio/radio.js.map +1 -1
  252. package/es/state/state.d.ts +3 -2
  253. package/es/state/state.js +6 -2
  254. package/es/state/state.js.map +1 -1
  255. package/es/tools/media.d.ts +1 -0
  256. package/es/tools/media.js +11 -0
  257. package/es/tools/media.js.map +1 -0
  258. package/es/ts-types/base-table.d.ts +1 -0
  259. package/es/ts-types/base-table.js.map +1 -1
  260. package/es/ts-types/column/type.d.ts +2 -2
  261. package/es/ts-types/column/type.js.map +1 -1
  262. package/es/ts-types/events.d.ts +3 -1
  263. package/es/ts-types/events.js.map +1 -1
  264. package/es/ts-types/icon.d.ts +1 -0
  265. package/es/ts-types/icon.js.map +1 -1
  266. package/es/ts-types/list-table/define/image-define.d.ts +10 -0
  267. package/es/ts-types/list-table/define/image-define.js.map +1 -1
  268. package/es/ts-types/list-table/define/index.d.ts +5 -4
  269. package/es/ts-types/list-table/define/index.js.map +1 -1
  270. package/es/ts-types/list-table/layout-map/api.d.ts +4 -4
  271. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  272. package/es/ts-types/list-table/layout-map/index.d.ts +1 -1
  273. package/es/ts-types/list-table/layout-map/index.js.map +1 -1
  274. package/es/ts-types/menu.d.ts +12 -0
  275. package/es/ts-types/menu.js.map +1 -1
  276. package/es/ts-types/pivot-table/dimension/image-dimension.d.ts +5 -0
  277. package/es/ts-types/pivot-table/dimension/image-dimension.js.map +1 -1
  278. package/es/ts-types/pivot-table/dimension/index.d.ts +5 -3
  279. package/es/ts-types/pivot-table/dimension/index.js.map +1 -1
  280. package/es/ts-types/pivot-table/indicator/image-indicator.d.ts +10 -0
  281. package/es/ts-types/pivot-table/indicator/image-indicator.js.map +1 -1
  282. package/es/ts-types/pivot-table/indicator/index.d.ts +3 -3
  283. package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
  284. package/es/ts-types/table-engine.d.ts +6 -3
  285. package/es/ts-types/table-engine.js.map +1 -1
  286. package/es/ts-types/tooltip.d.ts +1 -0
  287. package/es/ts-types/tooltip.js.map +1 -1
  288. package/es/vrender.js.map +1 -1
  289. package/package.json +4 -3
package/cjs/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import * as register from './register';
5
5
  import * as themes from './themes';
6
6
  import * as DataStatistics from './dataset/DataStatistics';
7
7
  import * as pluginsDefinition from './plugins';
8
- import type { ColumnDefine, ColumnsDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, ListTableConstructorOptions, PivotTableConstructorOptions, PivotChartConstructorOptions, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, TextAlignType, TextBaselineType } from './ts-types';
8
+ import type { ColumnDefine, ColumnsDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, AudioColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, ListTableConstructorOptions, PivotTableConstructorOptions, PivotChartConstructorOptions, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, TextAlignType, TextBaselineType } from './ts-types';
9
9
  import { ListTableAll as ListTable } from './ListTable-all';
10
10
  import { ListTableSimple } from './ListTable-simple';
11
11
  import { PivotTableAll as PivotTable } from './PivotTable-all';
@@ -24,8 +24,8 @@ export { toBoxArray } from './tools/helper';
24
24
  export { Icon } from './scenegraph/graphic/icon';
25
25
  export { CUSTOM_MERGE_PRE_NAME, CUSTOM_CONTAINER_NAME } from './scenegraph/component/custom';
26
26
  export { matrixAllocate, transformPointForCanvas, mapToCanvasPointForCanvas, registerGlobalEventTransformer, registerWindowEventTransformer, vglobal, Group, graphicUtil } from './vrender';
27
- export declare const version = "1.26.6";
28
- export { TYPES, core, ListTable, ListTableSimple, BaseTableAPI, ListTableConstructorOptions, PivotTable, PivotTableSimple, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, textMeasure, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, setCustomAlphabetCharSet, restoreMeasureText, pluginsDefinition };
27
+ export declare const version = "1.26.7";
28
+ export { TYPES, core, ListTable, ListTableSimple, BaseTableAPI, ListTableConstructorOptions, PivotTable, PivotTableSimple, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, AudioColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, textMeasure, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, setCustomAlphabetCharSet, restoreMeasureText, pluginsDefinition };
29
29
  declare function getIcons(): {
30
30
  [key: string]: TYPES.ColumnIconOption;
31
31
  };
package/cjs/index.js CHANGED
@@ -249,7 +249,7 @@ Object.defineProperty(exports, "matrixAllocate", {
249
249
  get: function() {
250
250
  return vrender_2.graphicUtil;
251
251
  }
252
- }), exports.version = "1.26.6", exports.getIcons = getIcons, exports.clearGlobal = clearGlobal,
252
+ }), exports.version = "1.26.7", exports.getIcons = getIcons, exports.clearGlobal = clearGlobal,
253
253
  TYPES.AggregationType, __exportStar(require("./components"), exports), __exportStar(require("./scenegraph/group-creater/cell-type"), exports);
254
254
 
255
255
  var TABLE_EVENT_TYPE_1 = require("./core/TABLE_EVENT_TYPE");
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAA+C;AAC/C,IAAA,4BAAkB,GAAE,CAAC;AAErB,kDAAoC;AA4ElC,sBAAK;AA3EP,6CAA+B;AA4E7B,oBAAI;AA3EN,6CAA+B;AAuG7B,oBAAI;AAtGN,+CAAiC;AACjC,qDAAuC;AA0GrC,4BAAQ;AAzGV,iDAAmC;AAmGjC,wBAAM;AAlGR,yEAA2D;AA4GzD,wCAAc;AA3GhB,6DAA+C;AAiH7C,8CAAiB;AA3FnB,mDAA4D;AAiD1D,0FAjDuB,4BAAS,OAiDvB;AAhDX,yDAAqD;AAiDnD,gGAjDO,kCAAe,OAiDP;AA/CjB,qDAA+D;AAkD7D,2FAlDwB,8BAAU,OAkDxB;AAjDZ,2DAAuD;AAkDrD,iGAlDO,oCAAgB,OAkDP;AAjDlB,6CAA0C;AAoDxC,2FApDO,uBAAU,OAoDP;AAlDZ,8DAAgD;AA+E9C,oCAAY;AA7Ed,wEAAoE;AA8ElE,2FA9EO,wBAAU,OA8EP;AA7EZ,gGAAqF;AA8EnF,4FA9EO,iCAAW,OA8EP;AA7Eb,kEAA4G;AA+E1G,mGA/EO,iCAAkB,OA+EP;AADlB,yGA9E2B,uCAAwB,OA8E3B;AAfxB,4FA/DqD,0BAAW,OA+DrD;AAzDb,uDAAwD;AAA/C,gHAAA,eAAe,OAAA;AACxB,+CAA6B;AAC7B,qCAA6C;AAApC,qGAAA,aAAa,OAAA;AACtB,yCAA4C;AAAnC,oGAAA,UAAU,OAAA;AACnB,kDAAiD;AAAxC,4FAAA,IAAI,OAAA;AACb,wDAA6F;AAApF,+GAAA,qBAAqB,OAAA;AAAE,+GAAA,qBAAqB,OAAA;AAErD,qCASmB;AARjB,yGAAA,cAAc,OAAA;AACd,kHAAA,uBAAuB,OAAA;AACvB,oHAAA,yBAAyB,OAAA;AACzB,yHAAA,8BAA8B,OAAA;AAC9B,yHAAA,8BAA8B,OAAA;AAC9B,kGAAA,OAAO,OAAA;AACP,gGAAA,KAAK,OAAA;AACL,sGAAA,WAAW,OAAA;AAMA,QAAA,OAAO,GAAG,QAAQ,CAAC;AAyDhC,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AArBC,4BAAQ;AAuBV,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AA1BC,kCAAW;AA2Bb,KAAK,CAAC,eAAe,CAAC;AAEtB,+CAA6B;AAC7B,uEAAqD;AAErD,4DAA2D;AAAlD,oHAAA,gBAAgB,OAAA;AACzB,wFAA+G;AAAtG,gIAAA,sBAAsB,OAAA;AAAE,gIAAA,sBAAsB,OAAA;AAEvD,mDAAkD;AAAzC,0GAAA,WAAW,OAAA","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport * as pluginsDefinition from './plugins';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTableAll as ListTable } from './ListTable-all';\nimport { ListTableSimple } from './ListTable-simple';\n// import { PivotTable } from './PivotTable';\nimport { PivotTableAll as PivotTable } from './PivotTable-all';\nimport { PivotTableSimple } from './PivotTable-simple';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet, textMeasure } from './scenegraph/utils/text-measure';\nimport type { BaseTableAPI } from './ts-types/base-table';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\nexport { getTargetCell } from './event/util';\nexport { toBoxArray } from './tools/helper';\nexport { Icon } from './scenegraph/graphic/icon';\nexport { CUSTOM_MERGE_PRE_NAME, CUSTOM_CONTAINER_NAME } from './scenegraph/component/custom';\n// 为插件等场景提供必要的 vrender 能力:只导出用到的符号,避免与 render/jsx 的导出成员发生命名冲突。\nexport {\n matrixAllocate,\n transformPointForCanvas,\n mapToCanvasPointForCanvas,\n registerGlobalEventTransformer,\n registerWindowEventTransformer,\n vglobal,\n Group,\n graphicUtil\n} from './vrender';\n\n// export * as VRender from './vrender';\n// import * as VRender from './vrender';\n\nexport const version = \"1.26.6\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n BaseTableAPI,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n textMeasure,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n setCustomAlphabetCharSet,\n restoreMeasureText,\n pluginsDefinition\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n\nexport * from './components';\nexport * from './scenegraph/group-creater/cell-type';\n\nexport { TABLE_EVENT_TYPE } from './core/TABLE_EVENT_TYPE';\nexport { PIVOT_CHART_EVENT_TYPE, PIVOT_TABLE_EVENT_TYPE } from './ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE';\n\nexport { EventTarget } from './event/EventTarget';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAA+C;AAC/C,IAAA,4BAAkB,GAAE,CAAC;AAErB,kDAAoC;AA6ElC,sBAAK;AA5EP,6CAA+B;AA6E7B,oBAAI;AA5EN,6CAA+B;AAyG7B,oBAAI;AAxGN,+CAAiC;AACjC,qDAAuC;AA4GrC,4BAAQ;AA3GV,iDAAmC;AAqGjC,wBAAM;AApGR,yEAA2D;AA8GzD,wCAAc;AA7GhB,6DAA+C;AAmH7C,8CAAiB;AA5FnB,mDAA4D;AAiD1D,0FAjDuB,4BAAS,OAiDvB;AAhDX,yDAAqD;AAiDnD,gGAjDO,kCAAe,OAiDP;AA/CjB,qDAA+D;AAkD7D,2FAlDwB,8BAAU,OAkDxB;AAjDZ,2DAAuD;AAkDrD,iGAlDO,oCAAgB,OAkDP;AAjDlB,6CAA0C;AAoDxC,2FApDO,uBAAU,OAoDP;AAlDZ,8DAAgD;AAgF9C,oCAAY;AA9Ed,wEAAoE;AA+ElE,2FA/EO,wBAAU,OA+EP;AA9EZ,gGAAqF;AA+EnF,4FA/EO,iCAAW,OA+EP;AA9Eb,kEAA4G;AAgF1G,mGAhFO,iCAAkB,OAgFP;AADlB,yGA/E2B,uCAAwB,OA+E3B;AAfxB,4FAhEqD,0BAAW,OAgErD;AA1Db,uDAAwD;AAA/C,gHAAA,eAAe,OAAA;AACxB,+CAA6B;AAC7B,qCAA6C;AAApC,qGAAA,aAAa,OAAA;AACtB,yCAA4C;AAAnC,oGAAA,UAAU,OAAA;AACnB,kDAAiD;AAAxC,4FAAA,IAAI,OAAA;AACb,wDAA6F;AAApF,+GAAA,qBAAqB,OAAA;AAAE,+GAAA,qBAAqB,OAAA;AAErD,qCASmB;AARjB,yGAAA,cAAc,OAAA;AACd,kHAAA,uBAAuB,OAAA;AACvB,oHAAA,yBAAyB,OAAA;AACzB,yHAAA,8BAA8B,OAAA;AAC9B,yHAAA,8BAA8B,OAAA;AAC9B,kGAAA,OAAO,OAAA;AACP,gGAAA,KAAK,OAAA;AACL,sGAAA,WAAW,OAAA;AAMA,QAAA,OAAO,GAAG,QAAQ,CAAC;AA0DhC,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AArBC,4BAAQ;AAuBV,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AA1BC,kCAAW;AA2Bb,KAAK,CAAC,eAAe,CAAC;AAEtB,+CAA6B;AAC7B,uEAAqD;AAErD,4DAA2D;AAAlD,oHAAA,gBAAgB,OAAA;AACzB,wFAA+G;AAAtG,gIAAA,sBAAsB,OAAA;AAAE,gIAAA,sBAAsB,OAAA;AAEvD,mDAAkD;AAAzC,0GAAA,WAAW,OAAA","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport * as pluginsDefinition from './plugins';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n AudioColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTableAll as ListTable } from './ListTable-all';\nimport { ListTableSimple } from './ListTable-simple';\n// import { PivotTable } from './PivotTable';\nimport { PivotTableAll as PivotTable } from './PivotTable-all';\nimport { PivotTableSimple } from './PivotTable-simple';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet, textMeasure } from './scenegraph/utils/text-measure';\nimport type { BaseTableAPI } from './ts-types/base-table';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\nexport { getTargetCell } from './event/util';\nexport { toBoxArray } from './tools/helper';\nexport { Icon } from './scenegraph/graphic/icon';\nexport { CUSTOM_MERGE_PRE_NAME, CUSTOM_CONTAINER_NAME } from './scenegraph/component/custom';\n// 为插件等场景提供必要的 vrender 能力:只导出用到的符号,避免与 render/jsx 的导出成员发生命名冲突。\nexport {\n matrixAllocate,\n transformPointForCanvas,\n mapToCanvasPointForCanvas,\n registerGlobalEventTransformer,\n registerWindowEventTransformer,\n vglobal,\n Group,\n graphicUtil\n} from './vrender';\n\n// export * as VRender from './vrender';\n// import * as VRender from './vrender';\n\nexport const version = \"1.26.7\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n BaseTableAPI,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n AudioColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n textMeasure,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n setCustomAlphabetCharSet,\n restoreMeasureText,\n pluginsDefinition\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n\nexport * from './components';\nexport * from './scenegraph/group-creater/cell-type';\n\nexport { TABLE_EVENT_TYPE } from './core/TABLE_EVENT_TYPE';\nexport { PIVOT_CHART_EVENT_TYPE, PIVOT_TABLE_EVENT_TYPE } from './ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE';\n\nexport { EventTarget } from './event/EventTarget';\n"]}
@@ -167,4 +167,4 @@ const registerCustomCellStylePlugin = () => {
167
167
  };
168
168
 
169
169
  exports.registerCustomCellStylePlugin = registerCustomCellStylePlugin;
170
- //# sourceMappingURL=custom-cell-style.js.map
170
+ //# sourceMappingURL=custom-cell-style.js.map
@@ -20,5 +20,4 @@ Object.defineProperty(exports, "CustomCellStylePlugin", {
20
20
  get: function() {
21
21
  return custom_cell_style_1.CustomCellStylePlugin;
22
22
  }
23
- });
24
- //# sourceMappingURL=index.js.map
23
+ });
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
- //# sourceMappingURL=interface.js.map
6
+ //# sourceMappingURL=interface.js.map
@@ -20,4 +20,4 @@ function onBeforeAttributeUpdateForInvertHighlight(val, attribute) {
20
20
  }
21
21
 
22
22
  exports.onBeforeAttributeUpdateForInvertHighlight = onBeforeAttributeUpdateForInvertHighlight;
23
- //# sourceMappingURL=invert-highlight.js.map
23
+ //# sourceMappingURL=invert-highlight.js.map
@@ -203,4 +203,4 @@ const registerListTreeStickCellPlugin = () => {
203
203
  };
204
204
 
205
205
  exports.registerListTreeStickCellPlugin = registerListTreeStickCellPlugin;
206
- //# sourceMappingURL=list-tree-stick-cell.js.map
206
+ //# sourceMappingURL=list-tree-stick-cell.js.map
@@ -64,4 +64,4 @@ class PluginManager {
64
64
  }
65
65
 
66
66
  exports.PluginManager = PluginManager;
67
- //# sourceMappingURL=plugin-manager.js.map
67
+ //# sourceMappingURL=plugin-manager.js.map
@@ -2,10 +2,12 @@ import type { IThemeSpec, Group as VGroup } from './../../vrender';
2
2
  import type { CellRange, ColumnDefine, ColumnTypeOption } from '../../ts-types';
3
3
  import type { Group } from '../graphic/group';
4
4
  import type { BaseTableAPI } from '../../ts-types/base-table';
5
- export declare function createCell(type: ColumnTypeOption, value: string, define: ColumnDefine, table: BaseTableAPI, col: number, row: number, colWidth: number, cellWidth: number, cellHeight: number, columnGroup: Group, y: number, padding: [number, number, number, number], textAlign: CanvasTextAlign, textBaseline: CanvasTextBaseline, mayHaveIcon: boolean, cellTheme: IThemeSpec, range: CellRange | undefined, customResult?: {
5
+ export declare function nextPromiseCellUpdateToken(cellGroup: Group): number;
6
+ export declare function isPromiseCellUpdateCurrent(table: BaseTableAPI, col: number, row: number, cellGroup: Group, token: number): boolean;
7
+ export declare function createCell(type: ColumnTypeOption, value: any, define: ColumnDefine, table: BaseTableAPI, col: number, row: number, colWidth: number, cellWidth: number, cellHeight: number, columnGroup: Group, y: number, padding: [number, number, number, number], textAlign: CanvasTextAlign, textBaseline: CanvasTextBaseline, mayHaveIcon: boolean, cellTheme: IThemeSpec, range: CellRange | undefined, customResult?: {
6
8
  elementsGroup?: VGroup;
7
9
  renderDefault: boolean;
8
- }): Group;
10
+ }, cellValue?: any): Group;
9
11
  export declare function updateCell(col: number, row: number, table: BaseTableAPI, addNew?: boolean, isShadow?: boolean, forceFastUpdate?: boolean): Group;
10
12
  export declare function dealWithMergeCellSize(range: CellRange, cellWidth: number, cellHeight: number, padding: [number, number, number, number], textAlign: CanvasTextAlign, textBaseline: CanvasTextBaseline, table: BaseTableAPI): void;
11
13
  export declare function dealWithMergeCellSizeForShadow(range: CellRange, cellWidth: number, cellHeight: number, padding: [number, number, number, number], textAlign: CanvasTextAlign, textBaseline: CanvasTextBaseline, table: BaseTableAPI, cellGroup: Group): void;
@@ -2,19 +2,31 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.getCustomCellMergeCustom = exports.resizeCellGroup = exports.dealWithMergeCellSizeForShadow = exports.dealWithMergeCellSize = exports.updateCell = exports.createCell = void 0;
5
+ }), exports.getCustomCellMergeCustom = exports.resizeCellGroup = exports.dealWithMergeCellSizeForShadow = exports.dealWithMergeCellSize = exports.updateCell = exports.createCell = exports.isPromiseCellUpdateCurrent = exports.nextPromiseCellUpdateToken = void 0;
6
6
 
7
- const global_1 = require("../../tools/global"), custom_1 = require("../component/custom"), get_prop_1 = require("../utils/get-prop"), tableHelper_1 = require("../../core/tableHelper"), helper_1 = require("../../tools/helper"), deal_promise_data_1 = require("../utils/deal-promise-data"), factory_1 = require("../../core/factory"), get_hierarchy_offset_1 = require("../utils/get-hierarchy-offset"), padding_1 = require("../utils/padding"), text_icon_layout_1 = require("../utils/text-icon-layout"), vutils_1 = require("@visactor/vutils"), break_string_1 = require("../utils/break-string"), invert_highlight_1 = require("../../plugins/invert-highlight"), cell_border_stroke_width_1 = require("../utils/cell-border-stroke-width");
7
+ const global_1 = require("../../tools/global"), custom_1 = require("../component/custom"), get_prop_1 = require("../utils/get-prop"), media_cell_helper_1 = require("./cell-type/media-cell-helper"), tableHelper_1 = require("../../core/tableHelper"), helper_1 = require("../../tools/helper"), deal_promise_data_1 = require("../utils/deal-promise-data"), factory_1 = require("../../core/factory"), get_hierarchy_offset_1 = require("../utils/get-hierarchy-offset"), padding_1 = require("../utils/padding"), text_icon_layout_1 = require("../utils/text-icon-layout"), vutils_1 = require("@visactor/vutils"), break_string_1 = require("../utils/break-string"), invert_highlight_1 = require("../../plugins/invert-highlight"), cell_border_stroke_width_1 = require("../utils/cell-border-stroke-width"), PROMISE_CELL_UPDATE_TOKEN_KEY = "__vtable_promise_cell_update_token__";
8
8
 
9
- function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult) {
9
+ function nextPromiseCellUpdateToken(cellGroup) {
10
+ var _a;
11
+ const token = (null !== (_a = cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY]) && void 0 !== _a ? _a : 0) + 1;
12
+ return cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] = token, token;
13
+ }
14
+
15
+ function isPromiseCellUpdateCurrent(table, col, row, cellGroup, token) {
16
+ return table.scenegraph.highPerformanceGetCell(col, row, !0) === cellGroup && cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] === token;
17
+ }
18
+
19
+ function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, cellValue) {
10
20
  var _a, _b;
11
21
  let cellGroup, isAsync = !1;
22
+ const hasCellValue = arguments.length >= 19;
23
+ let renderValue = hasCellValue ? cellValue : value;
12
24
  if ((0, helper_1.isPromise)(value)) {
13
25
  if ("cell" !== table.scenegraph.highPerformanceGetCell(col, row).role) return cellGroup;
14
- value = table.getCellValue(col, row), isAsync = !0;
26
+ hasCellValue || (renderValue = table.getCellValue(col, row)), isAsync = !0;
15
27
  }
16
- if ("checkbox" === type && define.tree) {
17
- cellGroup = factory_1.Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !0);
28
+ if (value = renderValue, "checkbox" === type && define.tree) {
29
+ cellGroup = factory_1.Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !0, value);
18
30
  } else if ("text" === type || "link" === type || customResult) {
19
31
  if ("link" === type) {
20
32
  const cellValue = value, cellOriginValue = table.getCellOriginValue(col, row), headerStyle = table._getCellStyle(col, row);
@@ -47,9 +59,11 @@ function createCell(type, value, define, table, col, row, colWidth, cellWidth, c
47
59
  stroke: !1
48
60
  }), cellGroup.clear()) : table.internalProps.layoutMap.isAxisCell(col, row) && cellGroup.clear();
49
61
  } else if ("image" === type) {
50
- cellGroup = factory_1.Factory.getFunction("createImageCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
62
+ cellGroup = factory_1.Factory.getFunction("createImageCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
63
+ } else if ("audio" === type) {
64
+ cellGroup = factory_1.Factory.getFunction("createAudioCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
51
65
  } else if ("video" === type) {
52
- cellGroup = factory_1.Factory.getFunction("createVideoCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
66
+ cellGroup = factory_1.Factory.getFunction("createVideoCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
53
67
  } else if ("chart" === type) {
54
68
  const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);
55
69
  cellGroup = factory_1.Factory.getFunction("createChartCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, value, define.chartModule, table.internalProps.layoutMap.getChartSpec(col, row), chartInstance, null !== (_b = table.internalProps.layoutMap.getChartDataId(col, row)) && void 0 !== _b ? _b : "data", table, cellTheme, table.internalProps.layoutMap.isShareChartSpec(col, row), isAsync, table.internalProps.layoutMap.isNoChartDataRenderNothing(col, row));
@@ -59,23 +73,23 @@ function createCell(type, value, define, table, col, row, colWidth, cellWidth, c
59
73
  const progressBarGroup = factory_1.Factory.getFunction("createProgressBarCell")(define, style, colWidth, value, dataValue, col, row, padding, table, range);
60
74
  cellGroup.firstChild ? cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild) : cellGroup.appendChild(progressBarGroup);
61
75
  } else if ("sparkline" === type) {
62
- cellGroup = factory_1.Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
76
+ cellGroup = factory_1.Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync, value);
63
77
  } else if ("checkbox" === type) {
64
78
  if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
65
79
  cellGroup = factory_1.Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
66
80
  } else {
67
- cellGroup = factory_1.Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1);
81
+ cellGroup = factory_1.Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1, value);
68
82
  }
69
83
  } else if ("radio" === type) {
70
84
  if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
71
85
  cellGroup = factory_1.Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
72
86
  } else {
73
- cellGroup = factory_1.Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
87
+ cellGroup = factory_1.Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range, isAsync, value);
74
88
  }
75
89
  } else if ("switch" === type) {
76
- cellGroup = factory_1.Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
90
+ cellGroup = factory_1.Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
77
91
  } else if ("button" === type) {
78
- cellGroup = factory_1.Factory.getFunction("createButtonCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
92
+ cellGroup = factory_1.Factory.getFunction("createButtonCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
79
93
  }
80
94
  return cellGroup.onBeforeAttributeUpdate = invert_highlight_1.onBeforeAttributeUpdateForInvertHighlight,
81
95
  cellGroup;
@@ -195,27 +209,31 @@ function updateCell(col, row, table, addNew, isShadow, forceFastUpdate) {
195
209
  const type = isVtableMerge || isCustomMerge ? "text" : table.getCellType(col, row), padding = cellTheme._vtable.padding, textAlign = cellTheme.text.textAlign, textBaseline = cellTheme.text.textBaseline;
196
210
  let newCellGroup, cellWidth, cellHeight;
197
211
  if (range ? (cellWidth = table.getColsWidth(range.start.col, range.end.col), cellHeight = table.getRowsHeight(range.start.row, range.end.row)) : (cellWidth = table.getColWidth(col),
198
- cellHeight = table.getRowHeight(row)), (0, helper_1.isPromise)(value) ? (oldCellGroup.removeAllChild(),
199
- (0, deal_promise_data_1.dealPromiseData)(value, table, callUpdateCellContentForPromiseValue.bind(null, {
200
- type: type,
201
- value: value,
202
- define: define,
203
- table: table,
204
- col: col,
205
- row: row,
206
- cellWidth: cellWidth,
207
- cellHeight: cellHeight,
208
- oldCellGroup: oldCellGroup,
209
- padding: padding,
210
- textAlign: textAlign,
211
- textBaseline: textBaseline,
212
- mayHaveIcon: mayHaveIcon,
213
- addNew: addNew,
214
- range: range,
215
- customResult: customResult,
216
- customStyle: customStyle
217
- }))) : newCellGroup = updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult),
218
- isMerge) {
212
+ cellHeight = table.getRowHeight(row)), (0, helper_1.isPromise)(value)) {
213
+ const updateToken = nextPromiseCellUpdateToken(oldCellGroup);
214
+ (0, media_cell_helper_1.removeCellMediaChildren)(oldCellGroup), oldCellGroup.removeAllChild(),
215
+ (0, deal_promise_data_1.dealPromiseData)(value, table, callUpdateCellContentForPromiseValue.bind(null, {
216
+ type: type,
217
+ define: define,
218
+ table: table,
219
+ col: col,
220
+ row: row,
221
+ cellWidth: cellWidth,
222
+ cellHeight: cellHeight,
223
+ oldCellGroup: oldCellGroup,
224
+ padding: padding,
225
+ textAlign: textAlign,
226
+ textBaseline: textBaseline,
227
+ mayHaveIcon: mayHaveIcon,
228
+ addNew: addNew,
229
+ range: range,
230
+ customResult: customResult,
231
+ customStyle: customStyle,
232
+ promiseValue: value,
233
+ updateToken: updateToken
234
+ }));
235
+ } else newCellGroup = updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
236
+ if (isMerge) {
219
237
  const {width: contentWidth} = newCellGroup.attribute, {height: contentHeight} = newCellGroup.attribute;
220
238
  newCellGroup.contentWidth = contentWidth, newCellGroup.contentHeight = contentHeight,
221
239
  isShadow ? dealWithMergeCellSizeForShadow(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table, newCellGroup) : dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table);
@@ -223,9 +241,10 @@ function updateCell(col, row, table, addNew, isShadow, forceFastUpdate) {
223
241
  return newCellGroup;
224
242
  }
225
243
 
226
- function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult) {
244
+ function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, cellValue) {
227
245
  var _a, _b;
228
- if ((0, helper_1.isPromise)(value) && (value = table.getCellValue(col, row)), !addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) return null;
246
+ const hasCellValue = arguments.length >= 18;
247
+ if (!addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) return null;
229
248
  if (!addNew && oldCellGroup.parent && table.reactCustomLayout) {
230
249
  const reactGroup = oldCellGroup.getChildByName(custom_1.CUSTOM_CONTAINER_NAME);
231
250
  if (reactGroup) {
@@ -233,9 +252,12 @@ function updateCellContent(type, value, define, table, col, row, cellWidth, cell
233
252
  (0, vutils_1.isNumber)(col) && (0, vutils_1.isNumber)(row) && table.reactCustomLayout.removeCustomCell(col, row);
234
253
  }
235
254
  }
236
- const newCellGroup = createCell(type, value, define, table, col, row, table.getColWidth(col), cellWidth, cellHeight, addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent, addNew ? 0 : table.scenegraph.getCellGroupY(row), padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult);
237
- return !addNew && oldCellGroup.parent && (oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup),
238
- oldCellGroup.parent.removeChild(oldCellGroup), oldCellGroup.release(!0), (null === (_a = table.scenegraph) || void 0 === _a ? void 0 : _a.proxy.cellCache.get(col)) && (null === (_b = table.scenegraph) || void 0 === _b || _b.proxy.cellCache.set(col, newCellGroup))),
255
+ const createCellArgs = [ type, value, define, table, col, row, table.getColWidth(col), cellWidth, cellHeight, addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent, addNew ? 0 : table.scenegraph.getCellGroupY(row), padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult ];
256
+ hasCellValue && createCellArgs.push(cellValue);
257
+ const newCellGroup = createCell(...createCellArgs);
258
+ return !addNew && oldCellGroup.parent && newCellGroup !== oldCellGroup && (oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup),
259
+ oldCellGroup.parent.removeChild(oldCellGroup), (0, media_cell_helper_1.removeCellMediaChildren)(oldCellGroup),
260
+ oldCellGroup.release(!0), (null === (_a = table.scenegraph) || void 0 === _a ? void 0 : _a.proxy.cellCache.get(col)) && (null === (_b = table.scenegraph) || void 0 === _b || _b.proxy.cellCache.set(col, newCellGroup))),
239
261
  newCellGroup;
240
262
  }
241
263
 
@@ -246,11 +268,13 @@ function canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, tab
246
268
  helper_1.isPromise)(value));
247
269
  }
248
270
 
249
- function callUpdateCellContentForPromiseValue(updateCellArgs) {
250
- const {type: type, value: value, define: define, table: table, col: col, row: row, cellWidth: cellWidth, cellHeight: cellHeight, oldCellGroup: oldCellGroup, padding: padding, textAlign: textAlign, textBaseline: textBaseline, mayHaveIcon: mayHaveIcon, addNew: addNew, range: range, customResult: customResult, customStyle: customStyle} = updateCellArgs, cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row), cellTheme = (0,
271
+ function callUpdateCellContentForPromiseValue(updateCellArgs, resolvedValue) {
272
+ const {type: type, define: define, table: table, col: col, row: row, cellWidth: cellWidth, cellHeight: cellHeight, oldCellGroup: oldCellGroup, padding: padding, textAlign: textAlign, textBaseline: textBaseline, mayHaveIcon: mayHaveIcon, addNew: addNew, range: range, customResult: customResult, customStyle: customStyle, promiseValue: promiseValue, updateToken: updateToken} = updateCellArgs;
273
+ if (!isPromiseCellUpdateCurrent(table, col, row, oldCellGroup, updateToken)) return;
274
+ const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row), cellTheme = (0,
251
275
  tableHelper_1.getStyleTheme)(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, get_prop_1.getProp).theme;
252
276
  cellTheme.group.cornerRadius = (0, tableHelper_1.getCellCornerRadius)(col, row, table),
253
- updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
277
+ updateCellContent(type, promiseValue, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, resolvedValue);
254
278
  }
255
279
 
256
280
  function dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table) {
@@ -332,6 +356,7 @@ function getCustomCellMergeCustom(col, row, cellGroup, table) {
332
356
  }
333
357
  }
334
358
 
359
+ exports.nextPromiseCellUpdateToken = nextPromiseCellUpdateToken, exports.isPromiseCellUpdateCurrent = isPromiseCellUpdateCurrent,
335
360
  exports.createCell = createCell, exports.updateCell = updateCell, exports.dealWithMergeCellSize = dealWithMergeCellSize,
336
361
  exports.dealWithMergeCellSizeForShadow = dealWithMergeCellSizeForShadow, exports.resizeCellGroup = resizeCellGroup,
337
362
  exports.getCustomCellMergeCustom = getCustomCellMergeCustom;