@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/es/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/es/index.js CHANGED
@@ -50,7 +50,7 @@ export { CUSTOM_MERGE_PRE_NAME, CUSTOM_CONTAINER_NAME } from "./scenegraph/compo
50
50
 
51
51
  export { matrixAllocate, transformPointForCanvas, mapToCanvasPointForCanvas, registerGlobalEventTransformer, registerWindowEventTransformer, vglobal, Group, graphicUtil } from "./vrender";
52
52
 
53
- export const version = "1.26.6";
53
+ export const version = "1.26.7";
54
54
 
55
55
  export { TYPES, core, ListTable, ListTableSimple, PivotTable, PivotTableSimple, PivotChart, textMeasure, themes, data, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, setCustomAlphabetCharSet, restoreMeasureText, pluginsDefinition };
56
56
 
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,iBAAiB,MAAM,WAAW,CAAC;AAsB/C,OAAO,EAAE,YAAY,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAM5G,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE7F,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,EAC9B,8BAA8B,EAC9B,OAAO,EACP,KAAK,EACL,WAAW,EACZ,MAAM,WAAW,CAAC;AAKnB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAIhC,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EACT,eAAe,EAGf,UAAU,EACV,gBAAgB,EAGhB,UAAU,EAiBV,WAAW,EACX,MAAM,EACN,IAAI,EAEJ,QAAQ,EACR,WAAW,EAEX,QAAQ,EAIR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EAClB,CAAC;AAGF,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AACD,KAAK,CAAC,eAAe,CAAC;AAEtB,cAAc,cAAc,CAAC;AAC7B,cAAc,sCAAsC,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAE/G,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC","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,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,iBAAiB,MAAM,WAAW,CAAC;AAuB/C,OAAO,EAAE,YAAY,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAM5G,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE7F,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,EAC9B,8BAA8B,EAC9B,OAAO,EACP,KAAK,EACL,WAAW,EACZ,MAAM,WAAW,CAAC;AAKnB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAIhC,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EACT,eAAe,EAGf,UAAU,EACV,gBAAgB,EAGhB,UAAU,EAkBV,WAAW,EACX,MAAM,EACN,IAAI,EAEJ,QAAQ,EACR,WAAW,EAEX,QAAQ,EAIR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EAClB,CAAC;AAGF,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AACD,KAAK,CAAC,eAAe,CAAC;AAEtB,cAAc,cAAc,CAAC;AAC7B,cAAc,sCAAsC,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAE/G,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC","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"]}
@@ -159,4 +159,4 @@ export function mergeStyle(cacheStyle, customCellStyle) {
159
159
  export const registerCustomCellStylePlugin = () => {
160
160
  Factory.registerComponent("customCellStylePlugin", CustomCellStylePlugin);
161
161
  };
162
- //# sourceMappingURL=custom-cell-style.js.map
162
+ //# sourceMappingURL=custom-cell-style.js.map
@@ -1,4 +1,3 @@
1
1
  export { PluginManager } from "./plugin-manager";
2
2
 
3
- export { CustomCellStylePlugin } from "./custom-cell-style";
4
- //# sourceMappingURL=index.js.map
3
+ export { CustomCellStylePlugin } from "./custom-cell-style";
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=interface.js.map
2
+ //# sourceMappingURL=interface.js.map
@@ -11,4 +11,4 @@ export function onBeforeAttributeUpdateForInvertHighlight(val, attribute) {
11
11
  });
12
12
  }
13
13
  }
14
- //# sourceMappingURL=invert-highlight.js.map
14
+ //# sourceMappingURL=invert-highlight.js.map
@@ -205,4 +205,4 @@ function keepRowAtVisiblePosition(col, row, visibleTop, table) {
205
205
  export const registerListTreeStickCellPlugin = () => {
206
206
  Factory.registerComponent("listTreeStickCellPlugin", ListTreeStickCellPlugin);
207
207
  };
208
- //# sourceMappingURL=list-tree-stick-cell.js.map
208
+ //# sourceMappingURL=list-tree-stick-cell.js.map
@@ -56,4 +56,4 @@ export class PluginManager {
56
56
  }));
57
57
  }
58
58
  }
59
- //# sourceMappingURL=plugin-manager.js.map
59
+ //# 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;
@@ -4,6 +4,8 @@ import { CUSTOM_CONTAINER_NAME, dealWithCustom } from "../component/custom";
4
4
 
5
5
  import { getProp } from "../utils/get-prop";
6
6
 
7
+ import { removeCellMediaChildren } from "./cell-type/media-cell-helper";
8
+
7
9
  import { getCellCornerRadius, getStyleTheme } from "../../core/tableHelper";
8
10
 
9
11
  import { getOrApply, isPromise } from "../../tools/helper";
@@ -26,15 +28,29 @@ import { onBeforeAttributeUpdateForInvertHighlight } from "../../plugins/invert-
26
28
 
27
29
  import { getCellBorderStrokeWidth } from "../utils/cell-border-stroke-width";
28
30
 
29
- export function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult) {
31
+ const PROMISE_CELL_UPDATE_TOKEN_KEY = "__vtable_promise_cell_update_token__";
32
+
33
+ export function nextPromiseCellUpdateToken(cellGroup) {
34
+ var _a;
35
+ const token = (null !== (_a = cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY]) && void 0 !== _a ? _a : 0) + 1;
36
+ return cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] = token, token;
37
+ }
38
+
39
+ export function isPromiseCellUpdateCurrent(table, col, row, cellGroup, token) {
40
+ return table.scenegraph.highPerformanceGetCell(col, row, !0) === cellGroup && cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] === token;
41
+ }
42
+
43
+ export function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, cellValue) {
30
44
  var _a, _b;
31
45
  let cellGroup, isAsync = !1;
46
+ const hasCellValue = arguments.length >= 19;
47
+ let renderValue = hasCellValue ? cellValue : value;
32
48
  if (isPromise(value)) {
33
49
  if ("cell" !== table.scenegraph.highPerformanceGetCell(col, row).role) return cellGroup;
34
- value = table.getCellValue(col, row), isAsync = !0;
50
+ hasCellValue || (renderValue = table.getCellValue(col, row)), isAsync = !0;
35
51
  }
36
- if ("checkbox" === type && define.tree) {
37
- cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !0);
52
+ if (value = renderValue, "checkbox" === type && define.tree) {
53
+ cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !0, value);
38
54
  } else if ("text" === type || "link" === type || customResult) {
39
55
  if ("link" === type) {
40
56
  const cellValue = value, cellOriginValue = table.getCellOriginValue(col, row), headerStyle = table._getCellStyle(col, row);
@@ -66,9 +82,11 @@ export function createCell(type, value, define, table, col, row, colWidth, cellW
66
82
  stroke: !1
67
83
  }), cellGroup.clear()) : table.internalProps.layoutMap.isAxisCell(col, row) && cellGroup.clear();
68
84
  } else if ("image" === type) {
69
- cellGroup = Factory.getFunction("createImageCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
85
+ cellGroup = Factory.getFunction("createImageCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
86
+ } else if ("audio" === type) {
87
+ cellGroup = Factory.getFunction("createAudioCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
70
88
  } else if ("video" === type) {
71
- cellGroup = Factory.getFunction("createVideoCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
89
+ cellGroup = Factory.getFunction("createVideoCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
72
90
  } else if ("chart" === type) {
73
91
  const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);
74
92
  cellGroup = 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));
@@ -78,23 +96,23 @@ export function createCell(type, value, define, table, col, row, colWidth, cellW
78
96
  const progressBarGroup = Factory.getFunction("createProgressBarCell")(define, style, colWidth, value, dataValue, col, row, padding, table, range);
79
97
  cellGroup.firstChild ? cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild) : cellGroup.appendChild(progressBarGroup);
80
98
  } else if ("sparkline" === type) {
81
- cellGroup = Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
99
+ cellGroup = Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync, value);
82
100
  } else if ("checkbox" === type) {
83
101
  if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
84
102
  cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
85
103
  } else {
86
- cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1);
104
+ cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1, value);
87
105
  }
88
106
  } else if ("radio" === type) {
89
107
  if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
90
108
  cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
91
109
  } else {
92
- cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
110
+ cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range, isAsync, value);
93
111
  }
94
112
  } else if ("switch" === type) {
95
- cellGroup = Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
113
+ cellGroup = Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
96
114
  } else if ("button" === type) {
97
- cellGroup = Factory.getFunction("createButtonCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
115
+ cellGroup = Factory.getFunction("createButtonCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
98
116
  }
99
117
  return cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight,
100
118
  cellGroup;
@@ -207,27 +225,30 @@ export function updateCell(col, row, table, addNew, isShadow, forceFastUpdate) {
207
225
  const type = isVtableMerge || isCustomMerge ? "text" : table.getCellType(col, row), padding = cellTheme._vtable.padding, textAlign = cellTheme.text.textAlign, textBaseline = cellTheme.text.textBaseline;
208
226
  let newCellGroup, cellWidth, cellHeight;
209
227
  if (range ? (cellWidth = table.getColsWidth(range.start.col, range.end.col), cellHeight = table.getRowsHeight(range.start.row, range.end.row)) : (cellWidth = table.getColWidth(col),
210
- cellHeight = table.getRowHeight(row)), isPromise(value) ? (oldCellGroup.removeAllChild(),
211
- dealPromiseData(value, table, callUpdateCellContentForPromiseValue.bind(null, {
212
- type: type,
213
- value: value,
214
- define: define,
215
- table: table,
216
- col: col,
217
- row: row,
218
- cellWidth: cellWidth,
219
- cellHeight: cellHeight,
220
- oldCellGroup: oldCellGroup,
221
- padding: padding,
222
- textAlign: textAlign,
223
- textBaseline: textBaseline,
224
- mayHaveIcon: mayHaveIcon,
225
- addNew: addNew,
226
- range: range,
227
- customResult: customResult,
228
- customStyle: customStyle
229
- }))) : newCellGroup = updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult),
230
- isMerge) {
228
+ cellHeight = table.getRowHeight(row)), isPromise(value)) {
229
+ const updateToken = nextPromiseCellUpdateToken(oldCellGroup);
230
+ removeCellMediaChildren(oldCellGroup), oldCellGroup.removeAllChild(), dealPromiseData(value, table, callUpdateCellContentForPromiseValue.bind(null, {
231
+ type: type,
232
+ define: define,
233
+ table: table,
234
+ col: col,
235
+ row: row,
236
+ cellWidth: cellWidth,
237
+ cellHeight: cellHeight,
238
+ oldCellGroup: oldCellGroup,
239
+ padding: padding,
240
+ textAlign: textAlign,
241
+ textBaseline: textBaseline,
242
+ mayHaveIcon: mayHaveIcon,
243
+ addNew: addNew,
244
+ range: range,
245
+ customResult: customResult,
246
+ customStyle: customStyle,
247
+ promiseValue: value,
248
+ updateToken: updateToken
249
+ }));
250
+ } else newCellGroup = updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
251
+ if (isMerge) {
231
252
  const {width: contentWidth} = newCellGroup.attribute, {height: contentHeight} = newCellGroup.attribute;
232
253
  newCellGroup.contentWidth = contentWidth, newCellGroup.contentHeight = contentHeight,
233
254
  isShadow ? dealWithMergeCellSizeForShadow(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table, newCellGroup) : dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table);
@@ -235,9 +256,10 @@ export function updateCell(col, row, table, addNew, isShadow, forceFastUpdate) {
235
256
  return newCellGroup;
236
257
  }
237
258
 
238
- function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult) {
259
+ function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, cellValue) {
239
260
  var _a, _b;
240
- if (isPromise(value) && (value = table.getCellValue(col, row)), !addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) return null;
261
+ const hasCellValue = arguments.length >= 18;
262
+ if (!addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) return null;
241
263
  if (!addNew && oldCellGroup.parent && table.reactCustomLayout) {
242
264
  const reactGroup = oldCellGroup.getChildByName(CUSTOM_CONTAINER_NAME);
243
265
  if (reactGroup) {
@@ -245,9 +267,12 @@ function updateCellContent(type, value, define, table, col, row, cellWidth, cell
245
267
  isNumber(col) && isNumber(row) && table.reactCustomLayout.removeCustomCell(col, row);
246
268
  }
247
269
  }
248
- 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);
249
- return !addNew && oldCellGroup.parent && (oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup),
250
- 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))),
270
+ 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 ];
271
+ hasCellValue && createCellArgs.push(cellValue);
272
+ const newCellGroup = createCell(...createCellArgs);
273
+ return !addNew && oldCellGroup.parent && newCellGroup !== oldCellGroup && (oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup),
274
+ oldCellGroup.parent.removeChild(oldCellGroup), removeCellMediaChildren(oldCellGroup),
275
+ 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))),
251
276
  newCellGroup;
252
277
  }
253
278
 
@@ -257,9 +282,11 @@ function canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, tab
257
282
  return !(table.isHeader(col, row) || "cell" !== oldCellGroup.role || "text" !== cellType || autoWrapText || autoRowHeight || mayHaveIcon || "text" !== (null === (_a = oldCellGroup.firstChild) || void 0 === _a ? void 0 : _a.type) || isPromise(value));
258
283
  }
259
284
 
260
- function callUpdateCellContentForPromiseValue(updateCellArgs) {
261
- 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 = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
262
- cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
285
+ function callUpdateCellContentForPromiseValue(updateCellArgs, resolvedValue) {
286
+ 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;
287
+ if (!isPromiseCellUpdateCurrent(table, col, row, oldCellGroup, updateToken)) return;
288
+ const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row), cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
289
+ cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), updateCellContent(type, promiseValue, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, resolvedValue);
263
290
  }
264
291
 
265
292
  export function dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table) {