@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/dist/vtable.js CHANGED
@@ -44946,6 +44946,7 @@
44946
44946
  MOUSELEAVE_CELL: 'mouseleave_cell',
44947
44947
  CONTEXTMENU_CELL: 'contextmenu_cell',
44948
44948
  CONTEXTMENU_CANVAS: 'contextmenu_canvas',
44949
+ CONTEXT_MENU_CLICK: 'context_menu_click',
44949
44950
  RESIZE_COLUMN: 'resize_column',
44950
44951
  RESIZE_COLUMN_END: 'resize_column_end',
44951
44952
  RESIZE_ROW: 'resize_row',
@@ -58142,7 +58143,80 @@
58142
58143
  }
58143
58144
  }
58144
58145
 
58145
- function createImageCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync) {
58146
+ const CELL_MEDIA_KEY = '__vtable_cell_media__';
58147
+ const CELL_MEDIA_KIND_KEY = '__vtable_cell_media_kind__';
58148
+ function markCellMedia(graphic, kind) {
58149
+ graphic[CELL_MEDIA_KEY] = true;
58150
+ graphic[CELL_MEDIA_KIND_KEY] = kind;
58151
+ return graphic;
58152
+ }
58153
+ function isCellMedia(graphic) {
58154
+ return graphic?.[CELL_MEDIA_KEY] === true;
58155
+ }
58156
+ function getCellMediaChildren(cellGroup) {
58157
+ const mediaChildren = [];
58158
+ cellGroup.forEachChildren((child) => {
58159
+ if (isCellMedia(child)) {
58160
+ mediaChildren.push(child);
58161
+ }
58162
+ });
58163
+ return mediaChildren;
58164
+ }
58165
+ function getCellMediaByKind(cellGroup, kind) {
58166
+ let graphic;
58167
+ cellGroup.forEachChildren((child) => {
58168
+ if (isCellMedia(child) && child[CELL_MEDIA_KIND_KEY] === kind) {
58169
+ graphic = child;
58170
+ return true;
58171
+ }
58172
+ return false;
58173
+ });
58174
+ return graphic;
58175
+ }
58176
+ function getCellMediaImage(cellGroup) {
58177
+ return getCellMediaByKind(cellGroup, 'image');
58178
+ }
58179
+ function getCellMediaPlayIcon(cellGroup) {
58180
+ return getCellMediaByKind(cellGroup, 'play-icon');
58181
+ }
58182
+ function releaseVideoResource(video) {
58183
+ try {
58184
+ video.pause();
58185
+ }
58186
+ catch (err) {
58187
+ }
58188
+ video.removeAttribute('src');
58189
+ try {
58190
+ video.load();
58191
+ }
58192
+ catch (err) {
58193
+ }
58194
+ }
58195
+ function releaseGraphicMediaResource(graphic) {
58196
+ const source = graphic?.attribute?.image;
58197
+ if (typeof HTMLVideoElement !== 'undefined' && source instanceof HTMLVideoElement) {
58198
+ releaseVideoResource(source);
58199
+ }
58200
+ }
58201
+ function removeCellMediaChildren(cellGroup) {
58202
+ const mediaChildren = getCellMediaChildren(cellGroup);
58203
+ mediaChildren.forEach(child => {
58204
+ releaseGraphicMediaResource(child);
58205
+ cellGroup.removeChild(child);
58206
+ child.release?.();
58207
+ });
58208
+ }
58209
+
58210
+ function hasCellMedia(cellGroup) {
58211
+ return getCellMediaChildren(cellGroup).length > 0;
58212
+ }
58213
+ function getResizeImage(cellGroup) {
58214
+ return hasCellMedia(cellGroup) ? getCellMediaImage(cellGroup) : undefined;
58215
+ }
58216
+ function getResizePlayIcon(cellGroup) {
58217
+ return hasCellMedia(cellGroup) ? getCellMediaPlayIcon(cellGroup) : undefined;
58218
+ }
58219
+ function createImageCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, cellValue) {
58146
58220
  const headerStyle = table._getCellStyle(col, row);
58147
58221
  const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
58148
58222
  if (table.options.customConfig?.imageMargin) {
@@ -58242,18 +58316,19 @@
58242
58316
  child.setAttribute('y', padding[0]);
58243
58317
  }
58244
58318
  });
58245
- cellGroup._cellLeftIconWidth = cellLeftIconWidth;
58246
- cellGroup._cellRightIconWidth = cellRightIconWidth;
58247
58319
  }
58248
- const value = table.getCellValue(col, row);
58249
- const image = createImage({
58320
+ cellGroup._cellLeftIconWidth = cellLeftIconWidth;
58321
+ cellGroup._cellRightIconWidth = cellRightIconWidth;
58322
+ const value = arguments.length >= 18 ? cellValue : table.getCellValue(col, row);
58323
+ removeCellMediaChildren(cellGroup);
58324
+ const image = markCellMedia(createImage({
58250
58325
  x: padding[3],
58251
58326
  y: padding[0],
58252
58327
  width: width - padding[1] - padding[3] - iconWidth,
58253
58328
  height: height - padding[0] - padding[2],
58254
58329
  image: value,
58255
58330
  cursor: 'pointer'
58256
- });
58331
+ }), 'image');
58257
58332
  image.name = 'image';
58258
58333
  image.keepAspectRatio = keepAspectRatio;
58259
58334
  image.textAlign = textAlign;
@@ -58345,13 +58420,13 @@
58345
58420
  return false;
58346
58421
  }
58347
58422
  function updateImageCellContentWhileResize(cellGroup, col, row, deltaX, deltaY, table) {
58348
- const image = cellGroup.getChildByName('image');
58423
+ const image = getResizeImage(cellGroup);
58349
58424
  if (!image) {
58350
58425
  return;
58351
58426
  }
58352
58427
  const originImage = (typeof image.attribute.image !== 'string' && image.attribute.image) ||
58353
58428
  image.resources?.get(image.attribute.image).data;
58354
- if (!originImage) {
58429
+ if (!originImage && !image.isAudioIcon) {
58355
58430
  return;
58356
58431
  }
58357
58432
  const headerStyle = table._getCellStyle(col, row);
@@ -58368,16 +58443,34 @@
58368
58443
  const colStart = cellGroup.mergeStartCol ?? cellGroup.col;
58369
58444
  const rowStart = cellGroup.mergeStartRow ?? cellGroup.row;
58370
58445
  const colEnd = cellGroup.mergeEndCol ?? cellGroup.col;
58371
- const rowEnd = cellGroup.mergeEndCol ?? cellGroup.row;
58446
+ const rowEnd = cellGroup.mergeEndRow ?? cellGroup.row;
58372
58447
  const leftIconWidth = cellGroup._cellLeftIconWidth ?? 0;
58373
58448
  const rightIconWidth = cellGroup._cellRightIconWidth ?? 0;
58374
- if (image.keepAspectRatio || isDamagePic(image)) {
58449
+ if (image.isAudioIcon) {
58450
+ const availableWidth = Math.max(1, cellWidth - padding[1] - padding[3] - leftIconWidth - rightIconWidth);
58451
+ const availableHeight = Math.max(1, cellHeight - padding[0] - padding[2]);
58452
+ const iconSize = Math.max(1, Math.min(availableWidth, availableHeight, 32));
58453
+ const pos = calcStartPosition(leftIconWidth, 0, cellWidth - leftIconWidth - rightIconWidth, cellHeight, iconSize, iconSize, textAlign, textBaseline, padding);
58454
+ for (let col = colStart; col <= colEnd; col++) {
58455
+ for (let row = rowStart; row <= rowEnd; row++) {
58456
+ const cellGroup = table.scenegraph.getCell(col, row);
58457
+ const image = getResizeImage(cellGroup);
58458
+ image?.setAttributes({
58459
+ x: pos.x,
58460
+ y: pos.y,
58461
+ width: iconSize,
58462
+ height: iconSize
58463
+ });
58464
+ }
58465
+ }
58466
+ }
58467
+ else if (image.keepAspectRatio || isDamagePic(image)) {
58375
58468
  const { width: imageWidth, height: imageHeight } = calcKeepAspectRatioSize(originImage.width || originImage.videoWidth, originImage.height || originImage.videoHeight, cellWidth - (padding[1] + padding[3]), cellHeight - (padding[0] + padding[2]));
58376
58469
  const pos = calcStartPosition(0, 0, cellWidth, cellHeight, imageWidth, imageHeight, textAlign, textBaseline, padding);
58377
58470
  for (let col = colStart; col <= colEnd; col++) {
58378
58471
  for (let row = rowStart; row <= rowEnd; row++) {
58379
58472
  const cellGroup = table.scenegraph.getCell(col, row);
58380
- const image = cellGroup.getChildByName('image');
58473
+ const image = getResizeImage(cellGroup);
58381
58474
  image?.setAttributes({
58382
58475
  x: pos.x,
58383
58476
  y: pos.y,
@@ -58391,7 +58484,7 @@
58391
58484
  for (let col = colStart; col <= colEnd; col++) {
58392
58485
  for (let row = rowStart; row <= rowEnd; row++) {
58393
58486
  const cellGroup = table.scenegraph.getCell(col, row);
58394
- const image = cellGroup.getChildByName('image');
58487
+ const image = getResizeImage(cellGroup);
58395
58488
  image?.setAttributes({
58396
58489
  x: leftIconWidth + padding[3],
58397
58490
  y: padding[0],
@@ -58401,7 +58494,7 @@
58401
58494
  }
58402
58495
  }
58403
58496
  }
58404
- const playIcon = cellGroup.getChildByName('play-icon');
58497
+ const playIcon = getResizePlayIcon(cellGroup);
58405
58498
  if (playIcon) {
58406
58499
  const left = 0;
58407
58500
  const top = 0;
@@ -58412,8 +58505,8 @@
58412
58505
  for (let col = colStart; col <= colEnd; col++) {
58413
58506
  for (let row = rowStart; row <= rowEnd; row++) {
58414
58507
  const cellGroup = table.scenegraph.getCell(col, row);
58415
- const playIcon = cellGroup.getChildByName('play-icon');
58416
- playIcon.setAttributes({
58508
+ const playIcon = getResizePlayIcon(cellGroup);
58509
+ playIcon?.setAttributes({
58417
58510
  x: anchorX - iconSize / 2,
58418
58511
  y: anchorY - iconSize / 2,
58419
58512
  width: iconSize,
@@ -58470,14 +58563,14 @@
58470
58563
  for (let row = startRow; row <= endRow; row++) {
58471
58564
  const cellGroup = table.scenegraph.getCell(col, row);
58472
58565
  if (cellGroup) {
58473
- const image = cellGroup.getChildByName('image');
58566
+ const image = getResizeImage(cellGroup);
58474
58567
  if (image) {
58475
58568
  image.setAttributes({
58476
58569
  dx: -table.getColsWidth(cellGroup.mergeStartCol, col - 1),
58477
58570
  dy: -table.getRowsHeight(cellGroup.mergeStartRow, row - 1)
58478
58571
  });
58479
58572
  }
58480
- const playIcon = cellGroup.getChildByName('play-icon');
58573
+ const playIcon = getResizePlayIcon(cellGroup);
58481
58574
  if (playIcon) {
58482
58575
  playIcon.setAttributes({
58483
58576
  dx: -table.getColsWidth(cellGroup.mergeStartCol, col - 1),
@@ -58518,8 +58611,8 @@
58518
58611
 
58519
58612
  function dealPromiseData(dataPromise, tabel, callback) {
58520
58613
  dataPromise
58521
- .then(() => {
58522
- callback();
58614
+ .then(value => {
58615
+ callback(value);
58523
58616
  tabel.scenegraph.updateNextFrame();
58524
58617
  })
58525
58618
  .catch((err) => {
@@ -58539,19 +58632,34 @@
58539
58632
  }
58540
58633
  }
58541
58634
 
58542
- function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult) {
58635
+ const PROMISE_CELL_UPDATE_TOKEN_KEY = '__vtable_promise_cell_update_token__';
58636
+ function nextPromiseCellUpdateToken(cellGroup) {
58637
+ const token = (cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] ?? 0) + 1;
58638
+ cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] = token;
58639
+ return token;
58640
+ }
58641
+ function isPromiseCellUpdateCurrent(table, col, row, cellGroup, token) {
58642
+ const currentCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
58643
+ return currentCellGroup === cellGroup && cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] === token;
58644
+ }
58645
+ function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, cellValue) {
58543
58646
  let isAsync = false;
58544
58647
  let cellGroup;
58648
+ const hasCellValue = arguments.length >= 19;
58649
+ let renderValue = hasCellValue ? cellValue : value;
58545
58650
  if (isPromise(value)) {
58546
58651
  if (table.scenegraph.highPerformanceGetCell(col, row).role !== 'cell') {
58547
58652
  return cellGroup;
58548
58653
  }
58549
- value = table.getCellValue(col, row);
58654
+ if (!hasCellValue) {
58655
+ renderValue = table.getCellValue(col, row);
58656
+ }
58550
58657
  isAsync = true;
58551
58658
  }
58659
+ value = renderValue;
58552
58660
  if (type === 'checkbox' && define.tree) {
58553
58661
  const createCheckboxCellGroup = Factory.getFunction('createCheckboxCellGroup');
58554
- cellGroup = createCheckboxCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, true);
58662
+ cellGroup = createCheckboxCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, true, value);
58555
58663
  }
58556
58664
  else if (type === 'text' || type === 'link' || customResult) {
58557
58665
  if (type === 'link') {
@@ -58610,11 +58718,15 @@
58610
58718
  }
58611
58719
  else if (type === 'image') {
58612
58720
  const createImageCellGroup = Factory.getFunction('createImageCellGroup');
58613
- cellGroup = createImageCellGroup(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
58721
+ cellGroup = createImageCellGroup(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
58722
+ }
58723
+ else if (type === 'audio') {
58724
+ const createAudioCellGroup = Factory.getFunction('createAudioCellGroup');
58725
+ cellGroup = createAudioCellGroup(columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
58614
58726
  }
58615
58727
  else if (type === 'video') {
58616
58728
  const createVideoCellGroup = Factory.getFunction('createVideoCellGroup');
58617
- cellGroup = createVideoCellGroup(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
58729
+ cellGroup = createVideoCellGroup(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
58618
58730
  }
58619
58731
  else if (type === 'chart') {
58620
58732
  const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);
@@ -58638,7 +58750,7 @@
58638
58750
  }
58639
58751
  else if (type === 'sparkline') {
58640
58752
  const createSparkLineCellGroup = Factory.getFunction('createSparkLineCellGroup');
58641
- cellGroup = createSparkLineCellGroup(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
58753
+ cellGroup = createSparkLineCellGroup(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync, value);
58642
58754
  }
58643
58755
  else if (type === 'checkbox') {
58644
58756
  const isAggregation = 'isAggregation' in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row);
@@ -58648,7 +58760,7 @@
58648
58760
  }
58649
58761
  else {
58650
58762
  const createCheckboxCellGroup = Factory.getFunction('createCheckboxCellGroup');
58651
- cellGroup = createCheckboxCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, false);
58763
+ cellGroup = createCheckboxCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, false, value);
58652
58764
  }
58653
58765
  }
58654
58766
  else if (type === 'radio') {
@@ -58659,16 +58771,16 @@
58659
58771
  }
58660
58772
  else {
58661
58773
  const createRadioCellGroup = Factory.getFunction('createRadioCellGroup');
58662
- cellGroup = createRadioCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
58774
+ cellGroup = createRadioCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range, isAsync, value);
58663
58775
  }
58664
58776
  }
58665
58777
  else if (type === 'switch') {
58666
58778
  const createSwitchCellGroup = Factory.getFunction('createSwitchCellGroup');
58667
- cellGroup = createSwitchCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
58779
+ cellGroup = createSwitchCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
58668
58780
  }
58669
58781
  else if (type === 'button') {
58670
58782
  const createButtonCellGroup = Factory.getFunction('createButtonCellGroup');
58671
- cellGroup = createButtonCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
58783
+ cellGroup = createButtonCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
58672
58784
  }
58673
58785
  cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight;
58674
58786
  return cellGroup;
@@ -58880,10 +58992,11 @@
58880
58992
  cellHeight = table.getRowHeight(row);
58881
58993
  }
58882
58994
  if (isPromise(value)) {
58995
+ const updateToken = nextPromiseCellUpdateToken(oldCellGroup);
58996
+ removeCellMediaChildren(oldCellGroup);
58883
58997
  oldCellGroup.removeAllChild();
58884
58998
  dealPromiseData(value, table, callUpdateCellContentForPromiseValue.bind(null, {
58885
58999
  type,
58886
- value,
58887
59000
  define,
58888
59001
  table,
58889
59002
  col,
@@ -58898,7 +59011,9 @@
58898
59011
  addNew,
58899
59012
  range,
58900
59013
  customResult,
58901
- customStyle
59014
+ customStyle,
59015
+ promiseValue: value,
59016
+ updateToken
58902
59017
  }));
58903
59018
  }
58904
59019
  else {
@@ -58918,10 +59033,8 @@
58918
59033
  }
58919
59034
  return newCellGroup;
58920
59035
  }
58921
- function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult) {
58922
- if (isPromise(value)) {
58923
- value = table.getCellValue(col, row);
58924
- }
59036
+ function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, cellValue) {
59037
+ const hasCellValue = arguments.length >= 18;
58925
59038
  if (!addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) {
58926
59039
  return null;
58927
59040
  }
@@ -58936,10 +59049,34 @@
58936
59049
  }
58937
59050
  }
58938
59051
  }
58939
- 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);
58940
- if (!addNew && oldCellGroup.parent) {
59052
+ const createCellArgs = [
59053
+ type,
59054
+ value,
59055
+ define,
59056
+ table,
59057
+ col,
59058
+ row,
59059
+ table.getColWidth(col),
59060
+ cellWidth,
59061
+ cellHeight,
59062
+ addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent,
59063
+ addNew ? 0 : table.scenegraph.getCellGroupY(row),
59064
+ padding,
59065
+ textAlign,
59066
+ textBaseline,
59067
+ mayHaveIcon,
59068
+ cellTheme,
59069
+ range,
59070
+ customResult
59071
+ ];
59072
+ if (hasCellValue) {
59073
+ createCellArgs.push(cellValue);
59074
+ }
59075
+ const newCellGroup = createCell(...createCellArgs);
59076
+ if (!addNew && oldCellGroup.parent && newCellGroup !== oldCellGroup) {
58941
59077
  oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);
58942
59078
  oldCellGroup.parent.removeChild(oldCellGroup);
59079
+ removeCellMediaChildren(oldCellGroup);
58943
59080
  oldCellGroup.release(true);
58944
59081
  if (table.scenegraph?.proxy.cellCache.get(col)) {
58945
59082
  table.scenegraph?.proxy.cellCache.set(col, newCellGroup);
@@ -58963,12 +59100,15 @@
58963
59100
  }
58964
59101
  return false;
58965
59102
  }
58966
- function callUpdateCellContentForPromiseValue(updateCellArgs) {
58967
- const { type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, range, customResult, customStyle } = updateCellArgs;
59103
+ function callUpdateCellContentForPromiseValue(updateCellArgs, resolvedValue) {
59104
+ const { type, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, range, customResult, customStyle, promiseValue, updateToken } = updateCellArgs;
59105
+ if (!isPromiseCellUpdateCurrent(table, col, row, oldCellGroup, updateToken)) {
59106
+ return;
59107
+ }
58968
59108
  const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
58969
59109
  const cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
58970
59110
  cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
58971
- updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
59111
+ updateCellContent(type, promiseValue, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, resolvedValue);
58972
59112
  }
58973
59113
  function dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table) {
58974
59114
  for (let col = range.start.col; col <= range.end.col; col++) {
@@ -59720,11 +59860,12 @@
59720
59860
  cellRange = table.getCellRange(col, row);
59721
59861
  spanRow = cellRange.end.row - cellRange.start.row + 1;
59722
59862
  }
59863
+ const skipCellValue = shouldSkipCustomRenderCellValueForComputation$1(col, row, table);
59723
59864
  const arg = {
59724
59865
  col: cellRange?.start.col ?? col,
59725
59866
  row: cellRange?.start.row ?? row,
59726
- dataValue: table.getCellOriginValue(col, row),
59727
- value: table.getCellValue(col, row),
59867
+ dataValue: skipCellValue ? undefined : table.getCellOriginValue(col, row),
59868
+ value: skipCellValue ? undefined : table.getCellValue(col, row),
59728
59869
  rect: getCellRect$1(col, row, table),
59729
59870
  table,
59730
59871
  originCol: col,
@@ -59765,12 +59906,15 @@
59765
59906
  height += padding[0] + padding[2];
59766
59907
  }
59767
59908
  return {
59768
- height: height / spanRow,
59909
+ height: getMergedCellSingleRowHeight(height / spanRow, spanRow, table),
59769
59910
  renderDefault
59770
59911
  };
59771
59912
  }
59772
59913
  return undefined;
59773
59914
  }
59915
+ function shouldSkipCustomRenderCellValueForComputation$1(col, row, table) {
59916
+ return (table.isListTable() && !table.isHeader(col, row) && !table.internalProps.dataSource?.dataSourceObj?.records);
59917
+ }
59774
59918
  function computeTextHeight(col, row, cellType, table) {
59775
59919
  let maxHeight = 0;
59776
59920
  const cellValue = table.getCellValue(col, row);
@@ -59923,7 +60067,15 @@
59923
60067
  }
59924
60068
  }
59925
60069
  }
59926
- return (Math.max(maxHeight, iconHeight) + padding[0] + padding[2]) / spanRow;
60070
+ return getMergedCellSingleRowHeight((Math.max(maxHeight, iconHeight) + padding[0] + padding[2]) / spanRow, spanRow, table);
60071
+ }
60072
+ function getMergedCellSingleRowHeight(height, spanRow, table) {
60073
+ if (spanRow <= 1) {
60074
+ return height;
60075
+ }
60076
+ const configuredMinHeight = table.options.customConfig?.minSingleRowHeight;
60077
+ const minSingleRowHeight = isNumber$3(configuredMinHeight) && configuredMinHeight > 0 ? configuredMinHeight : 2;
60078
+ return Math.max(height, minSingleRowHeight);
59927
60079
  }
59928
60080
  function getCellRect$1(col, row, table) {
59929
60081
  return {
@@ -60019,7 +60171,7 @@
60019
60171
  const createSparkLineCellGroup = Factory.getFunction('createSparkLineCellGroup');
60020
60172
  createSparkLineCellGroup(cell, cell.parent, cell.attribute.x, cell.attribute.y, col, row, cell.attribute.width, cell.attribute.height, padding, scene.table, getStyleTheme(headerStyle, scene.table, col, row, getProp).theme, false);
60021
60173
  }
60022
- else if (type === 'image' || type === 'video') {
60174
+ else if (type === 'image' || type === 'video' || type === 'audio') {
60023
60175
  updateImageCellContentWhileResize(cell, col, row, 0, detaY, scene.table);
60024
60176
  }
60025
60177
  else if (cell.firstChild?.name === 'axis') {
@@ -60360,7 +60512,7 @@
60360
60512
  const createSparkLineCellGroup = Factory.getFunction('createSparkLineCellGroup');
60361
60513
  createSparkLineCellGroup(cellGroup, cellGroup.parent, cellGroup.attribute.x, cellGroup.attribute.y, col, row, cellGroup.attribute.width, cellGroup.attribute.height, padding, scene.table, getStyleTheme(headerStyle, scene.table, col, row, getProp).theme, false);
60362
60514
  }
60363
- else if (type === 'image' || type === 'video') {
60515
+ else if (type === 'image' || type === 'video' || type === 'audio') {
60364
60516
  updateImageCellContentWhileResize(cellGroup, col, row, detaX, 0, scene.table);
60365
60517
  }
60366
60518
  else if (cellGroup.firstChild?.name === 'axis') {
@@ -62527,11 +62679,12 @@
62527
62679
  cellRange = table.getCellRange(col, row);
62528
62680
  spanCol = cellRange.end.col - cellRange.start.col + 1;
62529
62681
  }
62682
+ const skipCellValue = shouldSkipCustomRenderCellValueForComputation(col, row, table);
62530
62683
  const arg = {
62531
62684
  col: cellRange?.start.col ?? col,
62532
62685
  row: cellRange?.start.row ?? row,
62533
- dataValue: table.getCellOriginValue(col, row),
62534
- value: table.getCellValue(col, row),
62686
+ dataValue: skipCellValue ? undefined : table.getCellOriginValue(col, row),
62687
+ value: skipCellValue ? undefined : table.getCellValue(col, row),
62535
62688
  rect: getCellRect(col, row, table),
62536
62689
  table,
62537
62690
  originCol: col,
@@ -62580,6 +62733,11 @@
62580
62733
  }
62581
62734
  return undefined;
62582
62735
  }
62736
+ function shouldSkipCustomRenderCellValueForComputation(col, row, table) {
62737
+ return (table.isListTable() &&
62738
+ !table.isHeader(col, row) &&
62739
+ !table.internalProps.dataSource?.dataSourceObj?.records);
62740
+ }
62583
62741
  function computeTextWidth(col, row, cellType, table) {
62584
62742
  let maxWidth = 0;
62585
62743
  const cellValue = table.getCellValue(col, row);
@@ -63014,10 +63172,10 @@
63014
63172
  }
63015
63173
  const type = isVtableMerge || isCustomMerge ? 'text' : table.getCellType(col, row);
63016
63174
  if (isPromise(value)) {
63017
- createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup);
63175
+ const cellGroup = createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup);
63176
+ const updateToken = nextPromiseCellUpdateToken(cellGroup);
63018
63177
  dealPromiseData(value, table, callCreateCellForPromiseValue.bind(null, {
63019
63178
  type,
63020
- value,
63021
63179
  define,
63022
63180
  table,
63023
63181
  col,
@@ -63032,7 +63190,10 @@
63032
63190
  cellLocation,
63033
63191
  range,
63034
63192
  customResult,
63035
- defaultRowHeight
63193
+ defaultRowHeight,
63194
+ promiseValue: value,
63195
+ oldCellGroup: cellGroup,
63196
+ updateToken
63036
63197
  }));
63037
63198
  columnGroup.updateColumnRowNumber(row);
63038
63199
  const height = table.getRowHeight(row);
@@ -63085,11 +63246,14 @@
63085
63246
  height: y
63086
63247
  };
63087
63248
  }
63088
- function callCreateCellForPromiseValue(createCellArgs) {
63249
+ function callCreateCellForPromiseValue(createCellArgs, resolvedValue) {
63089
63250
  let padding;
63090
63251
  let textAlign;
63091
63252
  let textBaseline;
63092
- const { type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, cellLocation, mayHaveIcon, customStyle, range, customResult, defaultRowHeight } = createCellArgs;
63253
+ const { type, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, cellLocation, mayHaveIcon, customStyle, range, customResult, defaultRowHeight, promiseValue, oldCellGroup, updateToken } = createCellArgs;
63254
+ if (!isPromiseCellUpdateCurrent(table, col, row, oldCellGroup, updateToken)) {
63255
+ return;
63256
+ }
63093
63257
  const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
63094
63258
  const cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
63095
63259
  cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
@@ -63107,7 +63271,7 @@
63107
63271
  if (cellLocation !== 'body' && !cellTheme.group.fill) {
63108
63272
  cellTheme.group.fill = '#fff';
63109
63273
  }
63110
- createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult);
63274
+ createCell(type, promiseValue, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, resolvedValue);
63111
63275
  }
63112
63276
  function dealMerge(range, mergeMap, table, forceUpdate) {
63113
63277
  let cellWidth = 0;
@@ -63145,6 +63309,7 @@
63145
63309
  cellGroup.col = col;
63146
63310
  cellGroup.row = row;
63147
63311
  columnGroup.addChild(cellGroup);
63312
+ return cellGroup;
63148
63313
  }
63149
63314
 
63150
63315
  function createColGroup(containerGroup, xOrigin, yOrigin, colStart, colEnd, rowStart, rowEnd, cellLocation, table, rowLimit) {
@@ -64072,6 +64237,7 @@
64072
64237
  await proxy.progress();
64073
64238
  }
64074
64239
 
64240
+ let stickTextUpdateId = 0;
64075
64241
  function resetTextStick(table) {
64076
64242
  const { changedCells } = table.internalProps.stick;
64077
64243
  changedCells.forEach((cellPos) => {
@@ -64088,6 +64254,8 @@
64088
64254
  }
64089
64255
  function handleTextStick(table) {
64090
64256
  const changedCells = resetTextStick(table);
64257
+ const horizontalUpdateId = ++stickTextUpdateId;
64258
+ const verticalUpdateId = ++stickTextUpdateId;
64091
64259
  const { scrollTop, scrollLeft, frozenRowCount, frozenColCount } = table;
64092
64260
  const frozenRowsHeight = table.getFrozenRowsHeight();
64093
64261
  const frozenColsWidth = table.getFrozenColsWidth();
@@ -64112,7 +64280,7 @@
64112
64280
  const style = table._getCellStyle(col, row);
64113
64281
  if (style?.textStick && style?.textStick !== 'vertical') {
64114
64282
  const cellGroup = table.scenegraph.getCell(col, row);
64115
- adjustCellContentHorizontalLayout(cellGroup, frozenColsWidth + table.tableX, table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX, changedCells, style?.textStickBaseOnAlign, table);
64283
+ adjustCellContentHorizontalLayout(cellGroup, frozenColsWidth + table.tableX, table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX, changedCells, style?.textStickBaseOnAlign, table, horizontalUpdateId, { colStart, colEnd, rowStart: row, rowEnd: row });
64116
64284
  }
64117
64285
  });
64118
64286
  }
@@ -64122,10 +64290,9 @@
64122
64290
  }
64123
64291
  [rowStart, rowEnd].forEach((row) => {
64124
64292
  const style = table._getCellStyle(col, row);
64125
- if (style?.textStick &&
64126
- style?.textStick !== 'horizontal') {
64293
+ if (style?.textStick && style?.textStick !== 'horizontal') {
64127
64294
  const cellGroup = table.scenegraph.getCell(col, row);
64128
- adjustCellContentVerticalLayout(cellGroup, frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, style?.textStickBaseOnAlign, table);
64295
+ adjustCellContentVerticalLayout(cellGroup, frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, style?.textStickBaseOnAlign, table, verticalUpdateId, { colStart: col, colEnd: col, rowStart, rowEnd });
64129
64296
  }
64130
64297
  });
64131
64298
  }
@@ -64137,7 +64304,7 @@
64137
64304
  const style = table._getCellStyle(col, row);
64138
64305
  if (style?.textStick && style?.textStick !== 'horizontal') {
64139
64306
  const cellGroup = table.scenegraph.getCell(col, row);
64140
- adjustCellContentVerticalLayout(cellGroup, frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, style?.textStickBaseOnAlign, table);
64307
+ adjustCellContentVerticalLayout(cellGroup, frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, style?.textStickBaseOnAlign, table, verticalUpdateId, { colStart: col, colEnd: col, rowStart, rowEnd });
64141
64308
  }
64142
64309
  });
64143
64310
  }
@@ -64149,30 +64316,15 @@
64149
64316
  const style = table._getCellStyle(col, row);
64150
64317
  if (style?.textStick && style?.textStick !== 'vertical') {
64151
64318
  const cellGroup = table.scenegraph.getCell(col, row);
64152
- adjustCellContentHorizontalLayout(cellGroup, frozenColsWidth + table.tableX, table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX, changedCells, style?.textStickBaseOnAlign, table);
64319
+ adjustCellContentHorizontalLayout(cellGroup, frozenColsWidth + table.tableX, table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX, changedCells, style?.textStickBaseOnAlign, table, horizontalUpdateId, { colStart, colEnd, rowStart: row, rowEnd: row });
64153
64320
  }
64154
64321
  });
64155
64322
  }
64156
64323
  }
64157
- function adjustCellContentVerticalLayout(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign, table) {
64158
- if (isNumber$3(cellGroup.mergeStartCol) &&
64159
- isNumber$3(cellGroup.mergeStartRow) &&
64160
- isNumber$3(cellGroup.mergeEndCol) &&
64161
- isNumber$3(cellGroup.mergeEndRow)) {
64162
- const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
64163
- for (let col = colStart; col <= colEnd; col++) {
64164
- for (let row = rowStart; row <= rowEnd; row++) {
64165
- const singleCellGroup = table.scenegraph.getCell(col, row);
64166
- if (singleCellGroup.role !== 'cell') {
64167
- continue;
64168
- }
64169
- dealVertical(singleCellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign);
64170
- }
64171
- }
64172
- }
64173
- else {
64174
- dealVertical(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign);
64175
- }
64324
+ function adjustCellContentVerticalLayout(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign, table, updateId, visibleRange) {
64325
+ dealMergedCellGroups(cellGroup, table, visibleRange, updateId, 'verticalStickUpdateId', singleCellGroup => {
64326
+ dealVertical(singleCellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign);
64327
+ });
64176
64328
  }
64177
64329
  function dealVertical(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign) {
64178
64330
  const graphic = cellGroup.getChildByName('text', true) || cellGroup.getChildByName('image', true);
@@ -64239,24 +64391,38 @@
64239
64391
  });
64240
64392
  }
64241
64393
  }
64242
- function adjustCellContentHorizontalLayout(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign, table) {
64394
+ function adjustCellContentHorizontalLayout(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign, table, updateId, visibleRange) {
64395
+ dealMergedCellGroups(cellGroup, table, visibleRange, updateId, 'horizontalStickUpdateId', singleCellGroup => {
64396
+ dealHorizontal(singleCellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign);
64397
+ });
64398
+ }
64399
+ function dealMergedCellGroups(cellGroup, table, visibleRange, updateId, updateIdKey, dealCell) {
64243
64400
  if (isNumber$3(cellGroup.mergeStartCol) &&
64244
64401
  isNumber$3(cellGroup.mergeStartRow) &&
64245
64402
  isNumber$3(cellGroup.mergeEndCol) &&
64246
64403
  isNumber$3(cellGroup.mergeEndRow)) {
64247
64404
  const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
64248
- for (let col = colStart; col <= colEnd; col++) {
64249
- for (let row = rowStart; row <= rowEnd; row++) {
64405
+ const visibleColStart = Math.max(colStart, visibleRange.colStart);
64406
+ const visibleColEnd = Math.min(colEnd, visibleRange.colEnd);
64407
+ const visibleRowStart = Math.max(rowStart, visibleRange.rowStart);
64408
+ const visibleRowEnd = Math.min(rowEnd, visibleRange.rowEnd);
64409
+ for (let col = visibleColStart; col <= visibleColEnd; col++) {
64410
+ for (let row = visibleRowStart; row <= visibleRowEnd; row++) {
64250
64411
  const singleCellGroup = table.scenegraph.getCell(col, row);
64251
- if (singleCellGroup.role !== 'cell') {
64412
+ if (singleCellGroup.role !== 'cell' || singleCellGroup[updateIdKey] === updateId) {
64252
64413
  continue;
64253
64414
  }
64254
- dealHorizontal(singleCellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign);
64415
+ singleCellGroup[updateIdKey] = updateId;
64416
+ dealCell(singleCellGroup);
64255
64417
  }
64256
64418
  }
64257
64419
  }
64258
64420
  else {
64259
- dealHorizontal(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign);
64421
+ if (cellGroup[updateIdKey] === updateId) {
64422
+ return;
64423
+ }
64424
+ cellGroup[updateIdKey] = updateId;
64425
+ dealCell(cellGroup);
64260
64426
  }
64261
64427
  }
64262
64428
  function dealHorizontal(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign) {
@@ -64390,12 +64556,13 @@
64390
64556
  cellCache = new Map();
64391
64557
  constructor(table) {
64392
64558
  this.table = table;
64559
+ const defaultRowHeight = this.getEstimatedRowHeightForProxy();
64393
64560
  if (this.table.isPivotChart()) {
64394
- this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));
64561
+ this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / defaultRowHeight));
64395
64562
  this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));
64396
64563
  }
64397
64564
  else if (this.table.isAutoRowHeight(table.columnHeaderLevelCount)) {
64398
- this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));
64565
+ this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / defaultRowHeight));
64399
64566
  }
64400
64567
  else if (this.table.widthMode === 'autoWidth') {
64401
64568
  this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));
@@ -64454,7 +64621,7 @@
64454
64621
  this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1;
64455
64622
  this.rowStart = this.bodyTopRow;
64456
64623
  this.rowEnd = this.totalRow;
64457
- const defaultRowHeight = this.table.defaultRowHeight;
64624
+ const defaultRowHeight = this.getEstimatedRowHeightForProxy();
64458
64625
  this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;
64459
64626
  const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;
64460
64627
  const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);
@@ -64485,12 +64652,19 @@
64485
64652
  const widthLimit = this.table.tableNoFrameWidth * 5;
64486
64653
  this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);
64487
64654
  this.firstScreenColLimit = this.bodyLeftCol + Math.min(this.colLimit, Math.ceil(widthLimit / defaultColWidth));
64488
- const defaultRowHeight = this.table.defaultRowHeight;
64655
+ const defaultRowHeight = this.getEstimatedRowHeightForProxy();
64489
64656
  this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;
64490
64657
  const heightLimit = this.table.tableNoFrameHeight * 5;
64491
64658
  this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
64492
64659
  this.firstScreenRowLimit = this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight));
64493
64660
  }
64661
+ getEstimatedRowHeightForProxy() {
64662
+ const minSingleRowHeight = this.table.options.customConfig?.minSingleRowHeight;
64663
+ if (this.table.heightMode === 'autoHeight') {
64664
+ return isNumber$3(minSingleRowHeight) && minSingleRowHeight > 0 ? minSingleRowHeight : 2;
64665
+ }
64666
+ return this.table.defaultRowHeight;
64667
+ }
64494
64668
  createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
64495
64669
  createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
64496
64670
  }
@@ -67230,6 +67404,7 @@
67230
67404
  },
67231
67405
  placement: baseIcon.tooltip.placement
67232
67406
  },
67407
+ appearDelay: baseIcon.tooltip.appearDelay,
67233
67408
  disappearDelay: baseIcon.tooltip.disappearDelay,
67234
67409
  style: Object.assign({}, scene.table.internalProps.theme?.tooltipStyle, baseIcon.tooltip?.style)
67235
67410
  };
@@ -68719,81 +68894,6 @@
68719
68894
  width: tableWidth,
68720
68895
  height: tableHeight
68721
68896
  });
68722
- if (this.tableGroup.border) {
68723
- const rectAttributes = this.tableGroup.border?.attribute;
68724
- let borderTop;
68725
- let borderRight;
68726
- let borderBottom;
68727
- let borderLeft;
68728
- if (rectAttributes?.strokeArrayWidth) {
68729
- borderTop = rectAttributes.strokeArrayWidth
68730
- ? rectAttributes.strokeArrayWidth[0]
68731
- : rectAttributes.lineWidth ?? 0;
68732
- borderRight = rectAttributes.strokeArrayWidth
68733
- ? rectAttributes.strokeArrayWidth[1]
68734
- : rectAttributes.lineWidth ?? 0;
68735
- borderBottom = rectAttributes.strokeArrayWidth
68736
- ? rectAttributes.strokeArrayWidth[2]
68737
- : rectAttributes.lineWidth ?? 0;
68738
- borderLeft = rectAttributes.strokeArrayWidth
68739
- ? rectAttributes.strokeArrayWidth[3]
68740
- : rectAttributes.lineWidth ?? 0;
68741
- }
68742
- else {
68743
- borderTop = rectAttributes?.lineWidth ?? 0;
68744
- borderRight = rectAttributes?.lineWidth ?? 0;
68745
- borderBottom = rectAttributes?.lineWidth ?? 0;
68746
- borderLeft = rectAttributes?.lineWidth ?? 0;
68747
- }
68748
- if (this.tableGroup.border.type === 'rect') {
68749
- if (this.table.theme.frameStyle?.innerBorder) {
68750
- this.tableGroup.border.setAttributes({
68751
- x: this.table.tableX + borderLeft / 2,
68752
- y: this.table.tableY + borderTop / 2,
68753
- width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
68754
- height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
68755
- });
68756
- }
68757
- else {
68758
- this.tableGroup.border.setAttributes({
68759
- x: this.table.tableX - borderLeft / 2,
68760
- y: this.table.tableY - borderTop / 2,
68761
- width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
68762
- height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
68763
- });
68764
- }
68765
- }
68766
- else if (this.tableGroup.border.type === 'group') {
68767
- if (this.table.theme.frameStyle?.innerBorder) {
68768
- this.tableGroup.border.setAttributes({
68769
- x: this.table.tableX + borderLeft / 2,
68770
- y: this.table.tableY + borderTop / 2,
68771
- width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
68772
- height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
68773
- });
68774
- this.tableGroup.border.firstChild?.setAttributes({
68775
- x: 0,
68776
- y: 0,
68777
- width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
68778
- height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
68779
- });
68780
- }
68781
- else {
68782
- this.tableGroup.border.setAttributes({
68783
- x: this.table.tableX - borderLeft / 2,
68784
- y: this.table.tableY - borderTop / 2,
68785
- width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
68786
- height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
68787
- });
68788
- this.tableGroup.border.firstChild?.setAttributes({
68789
- x: borderLeft / 2,
68790
- y: borderTop / 2,
68791
- width: this.tableGroup.attribute.width,
68792
- height: this.tableGroup.attribute.height
68793
- });
68794
- }
68795
- }
68796
- }
68797
68897
  const hasFrozenCols = this.table.frozenColCount > 0;
68798
68898
  const hasRightFrozenCols = this.table.rightFrozenColCount > 0;
68799
68899
  const hasFrozenRows = this.table.frozenRowCount > 0;
@@ -68855,8 +68955,93 @@
68855
68955
  height: 0
68856
68956
  });
68857
68957
  }
68958
+ if (hasBottomFrozenRows && !this.table.containerFit?.height) {
68959
+ const actualContentBottom = Math.max(this.colHeaderGroup.attribute.y + this.colHeaderGroup.attribute.height, this.cornerHeaderGroup.attribute.y + this.cornerHeaderGroup.attribute.height, this.rightTopCornerGroup.attribute.y + this.rightTopCornerGroup.attribute.height, this.rowHeaderGroup.attribute.y + this.rowHeaderGroup.attribute.height, this.bodyGroup.attribute.y + this.bodyGroup.attribute.height, this.rightFrozenGroup.attribute.y + this.rightFrozenGroup.attribute.height, this.leftBottomCornerGroup.attribute.y + this.leftBottomCornerGroup.attribute.height, this.bottomFrozenGroup.attribute.y + this.bottomFrozenGroup.attribute.height, this.rightBottomCornerGroup.attribute.y + this.rightBottomCornerGroup.attribute.height);
68960
+ if (actualContentBottom > 0 && actualContentBottom < this.tableGroup.attribute.height) {
68961
+ this.tableGroup.setAttribute('height', actualContentBottom);
68962
+ }
68963
+ }
68964
+ this.updateTableGroupBorder();
68858
68965
  this.updateDomContainer();
68859
68966
  }
68967
+ updateTableGroupBorder() {
68968
+ if (!this.tableGroup.border) {
68969
+ return;
68970
+ }
68971
+ const rectAttributes = this.tableGroup.border?.attribute;
68972
+ let borderTop;
68973
+ let borderRight;
68974
+ let borderBottom;
68975
+ let borderLeft;
68976
+ if (rectAttributes?.strokeArrayWidth) {
68977
+ borderTop = rectAttributes.strokeArrayWidth
68978
+ ? rectAttributes.strokeArrayWidth[0]
68979
+ : rectAttributes.lineWidth ?? 0;
68980
+ borderRight = rectAttributes.strokeArrayWidth
68981
+ ? rectAttributes.strokeArrayWidth[1]
68982
+ : rectAttributes.lineWidth ?? 0;
68983
+ borderBottom = rectAttributes.strokeArrayWidth
68984
+ ? rectAttributes.strokeArrayWidth[2]
68985
+ : rectAttributes.lineWidth ?? 0;
68986
+ borderLeft = rectAttributes.strokeArrayWidth
68987
+ ? rectAttributes.strokeArrayWidth[3]
68988
+ : rectAttributes.lineWidth ?? 0;
68989
+ }
68990
+ else {
68991
+ borderTop = rectAttributes?.lineWidth ?? 0;
68992
+ borderRight = rectAttributes?.lineWidth ?? 0;
68993
+ borderBottom = rectAttributes?.lineWidth ?? 0;
68994
+ borderLeft = rectAttributes?.lineWidth ?? 0;
68995
+ }
68996
+ if (this.tableGroup.border.type === 'rect') {
68997
+ if (this.table.theme.frameStyle?.innerBorder) {
68998
+ this.tableGroup.border.setAttributes({
68999
+ x: this.table.tableX + borderLeft / 2,
69000
+ y: this.table.tableY + borderTop / 2,
69001
+ width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
69002
+ height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
69003
+ });
69004
+ }
69005
+ else {
69006
+ this.tableGroup.border.setAttributes({
69007
+ x: this.table.tableX - borderLeft / 2,
69008
+ y: this.table.tableY - borderTop / 2,
69009
+ width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
69010
+ height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
69011
+ });
69012
+ }
69013
+ }
69014
+ else if (this.tableGroup.border.type === 'group') {
69015
+ if (this.table.theme.frameStyle?.innerBorder) {
69016
+ this.tableGroup.border.setAttributes({
69017
+ x: this.table.tableX + borderLeft / 2,
69018
+ y: this.table.tableY + borderTop / 2,
69019
+ width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
69020
+ height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
69021
+ });
69022
+ this.tableGroup.border.firstChild?.setAttributes({
69023
+ x: 0,
69024
+ y: 0,
69025
+ width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
69026
+ height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
69027
+ });
69028
+ }
69029
+ else {
69030
+ this.tableGroup.border.setAttributes({
69031
+ x: this.table.tableX - borderLeft / 2,
69032
+ y: this.table.tableY - borderTop / 2,
69033
+ width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
69034
+ height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
69035
+ });
69036
+ this.tableGroup.border.firstChild?.setAttributes({
69037
+ x: borderLeft / 2,
69038
+ y: borderTop / 2,
69039
+ width: this.tableGroup.attribute.width,
69040
+ height: this.tableGroup.attribute.height
69041
+ });
69042
+ }
69043
+ }
69044
+ }
68860
69045
  updateRowHeight(row, detaY, skipTableHeightMap) {
68861
69046
  detaY = Math.round(detaY);
68862
69047
  updateRowHeight(this, row, detaY, skipTableHeightMap);
@@ -69465,7 +69650,7 @@
69465
69650
  const isVtableMerge = this.table.getCellRawRecord(col, row)?.vtableMerge;
69466
69651
  const type = isVtableMerge ? 'text' : this.table.getCellType(col, row);
69467
69652
  const cellGroup = this.getCell(col, row);
69468
- if (type === 'image' || type === 'video') {
69653
+ if (type === 'image' || type === 'video' || type === 'audio') {
69469
69654
  updateImageCellContentWhileResize(cellGroup, col, row, 0, 0, this.table);
69470
69655
  }
69471
69656
  }
@@ -70989,11 +71174,15 @@
70989
71174
  rowMax = rowMax + moveContext.sourceSize - 1;
70990
71175
  }
70991
71176
  }
70992
- if (!state.table.transpose &&
71177
+ if (state.table.isListTable() &&
71178
+ !state.table.transpose &&
70993
71179
  (state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource) ||
70994
71180
  state.columnMove.movingColumnOrRow === 'row')) {
71181
+ const sourceRecordPath = state.table.getRecordIndexByCell(0, moveContext.sourceIndex);
71182
+ const targetRecordPath = state.table.getRecordIndexByCell(0, moveContext.targetIndex);
70995
71183
  state.table.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex);
70996
- state.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex);
71184
+ state.changeCheckboxOrder(sourceRecordPath, targetRecordPath);
71185
+ state.changeRadioOrder(sourceRecordPath, targetRecordPath);
70997
71186
  }
70998
71187
  if (moveContext.moveType === 'column') {
70999
71188
  clearWidthsAndHeightsCache(colMin, colMax, 0, -1, state.table);
@@ -71436,30 +71625,89 @@
71436
71625
  radio?._handlePointerUp();
71437
71626
  }
71438
71627
  }
71439
- function changeRadioOrder(sourceIndex, targetIndex, state) {
71440
- const { radioState, table } = state;
71441
- if (table.internalProps.transpose) {
71442
- sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0);
71443
- targetIndex = table.getRecordShowIndexByCell(targetIndex, 0);
71628
+ function normalizeRecordPath$1(recordPath) {
71629
+ return Array.isArray(recordPath) ? recordPath : [recordPath];
71630
+ }
71631
+ function parseRecordPathKey(key) {
71632
+ return isNumber$3(key) ? [key] : key.split(',').map(item => Number(item));
71633
+ }
71634
+ function isSameRecordPath$1(source, target) {
71635
+ return source.length === target.length && source.every((item, index) => item === target[index]);
71636
+ }
71637
+ function isSameParentPath$1(source, target) {
71638
+ if (source.length !== target.length) {
71639
+ return false;
71444
71640
  }
71445
- else {
71446
- sourceIndex = table.getRecordShowIndexByCell(0, sourceIndex);
71447
- targetIndex = table.getRecordShowIndexByCell(0, targetIndex);
71641
+ return source.slice(0, -1).every((item, index) => item === target[index]);
71642
+ }
71643
+ function isDescendantPath$1(path, ancestor) {
71644
+ return ancestor.length <= path.length && ancestor.every((item, index) => item === path[index]);
71645
+ }
71646
+ function getMovedRecordPath$1(path, source, target) {
71647
+ return target.concat(path.slice(source.length));
71648
+ }
71649
+ function getShiftedSiblingPath$1(path, parent, sourceIndex, targetIndex) {
71650
+ if (path.length <= parent.length || !isDescendantPath$1(path.slice(0, parent.length), parent)) {
71651
+ return path;
71448
71652
  }
71449
- if (sourceIndex > targetIndex) {
71450
- const sourceRecord = radioState[sourceIndex];
71451
- for (let i = sourceIndex; i > targetIndex; i--) {
71452
- radioState[i] = radioState[i - 1];
71453
- }
71454
- radioState[targetIndex] = sourceRecord;
71653
+ const siblingIndex = path[parent.length];
71654
+ if (sourceIndex < targetIndex && siblingIndex > sourceIndex && siblingIndex <= targetIndex) {
71655
+ const shifted = [...path];
71656
+ shifted[parent.length] = siblingIndex - 1;
71657
+ return shifted;
71455
71658
  }
71456
- else if (sourceIndex < targetIndex) {
71457
- const sourceRecord = radioState[sourceIndex];
71458
- for (let i = sourceIndex; i < targetIndex; i++) {
71459
- radioState[i] = radioState[i + 1];
71460
- }
71461
- radioState[targetIndex] = sourceRecord;
71659
+ if (sourceIndex > targetIndex && siblingIndex >= targetIndex && siblingIndex < sourceIndex) {
71660
+ const shifted = [...path];
71661
+ shifted[parent.length] = siblingIndex + 1;
71662
+ return shifted;
71663
+ }
71664
+ return path;
71665
+ }
71666
+ function getChangedRecordPath(path, sourcePath, targetPath) {
71667
+ const parentPath = sourcePath.slice(0, -1);
71668
+ const sourceIndex = sourcePath[sourcePath.length - 1];
71669
+ const targetIndex = targetPath[targetPath.length - 1];
71670
+ if (isDescendantPath$1(path, sourcePath)) {
71671
+ return getMovedRecordPath$1(path, sourcePath, targetPath);
71672
+ }
71673
+ return getShiftedSiblingPath$1(path, parentPath, sourceIndex, targetIndex);
71674
+ }
71675
+ function getRadioStateValue(recordPath) {
71676
+ return recordPath.length === 1 ? recordPath[0] : recordPath;
71677
+ }
71678
+ function getRadioStateKey(recordPath) {
71679
+ return recordPath.toString();
71680
+ }
71681
+ function changeRadioStateValue(value, sourcePath, targetPath) {
71682
+ if (isNumber$3(value)) {
71683
+ return getRadioStateValue(getChangedRecordPath([value], sourcePath, targetPath));
71684
+ }
71685
+ if (Array.isArray(value)) {
71686
+ return getRadioStateValue(getChangedRecordPath(value, sourcePath, targetPath));
71687
+ }
71688
+ if (isString$2(value)) {
71689
+ return getRadioStateKey(getChangedRecordPath(parseRecordPathKey(value), sourcePath, targetPath));
71690
+ }
71691
+ if (isObject$7(value)) {
71692
+ const nextValue = {};
71693
+ Object.keys(value).forEach(key => {
71694
+ const nextPath = getChangedRecordPath(parseRecordPathKey(key), sourcePath, targetPath);
71695
+ nextValue[getRadioStateKey(nextPath)] = value[key];
71696
+ });
71697
+ return nextValue;
71462
71698
  }
71699
+ return value;
71700
+ }
71701
+ function changeRadioOrder(sourceRecordPath, targetRecordPath, state) {
71702
+ const { radioState } = state;
71703
+ const sourcePath = normalizeRecordPath$1(sourceRecordPath);
71704
+ const targetPath = normalizeRecordPath$1(targetRecordPath);
71705
+ if (isSameRecordPath$1(sourcePath, targetPath) || !isSameParentPath$1(sourcePath, targetPath)) {
71706
+ return;
71707
+ }
71708
+ Object.keys(radioState).forEach(field => {
71709
+ radioState[field] = changeRadioStateValue(radioState[field], sourcePath, targetPath);
71710
+ });
71463
71711
  }
71464
71712
 
71465
71713
  function setCheckedState(col, row, field, checked, state) {
@@ -71730,62 +71978,73 @@
71730
71978
  }
71731
71979
  }
71732
71980
  }
71733
- function changeCheckboxOrder(sourceIndex, targetIndex, state) {
71734
- const { checkedState, table } = state;
71735
- let source;
71736
- let target;
71737
- if (table.internalProps.transpose) {
71738
- sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0);
71739
- targetIndex = table.getRecordShowIndexByCell(targetIndex, 0);
71981
+ function normalizeRecordPath(recordPath) {
71982
+ return isArray$5(recordPath) ? recordPath : [recordPath];
71983
+ }
71984
+ function parseCheckboxStateKey(key) {
71985
+ return isNumber$3(key) ? [key] : key.split(',').map(item => Number(item));
71986
+ }
71987
+ function stringifyRecordPath(recordPath) {
71988
+ return recordPath.toString();
71989
+ }
71990
+ function isSameRecordPath(source, target) {
71991
+ return source.length === target.length && source.every((item, index) => item === target[index]);
71992
+ }
71993
+ function isSameParentPath(source, target) {
71994
+ if (source.length !== target.length) {
71995
+ return false;
71740
71996
  }
71741
- else {
71742
- source = table.isPivotTable() ? undefined : table.getRecordIndexByCell(0, sourceIndex);
71743
- target = table.isPivotTable() ? undefined : table.getRecordIndexByCell(0, targetIndex);
71997
+ return source.slice(0, -1).every((item, index) => item === target[index]);
71998
+ }
71999
+ function isDescendantPath(path, ancestor) {
72000
+ return ancestor.length <= path.length && ancestor.every((item, index) => item === path[index]);
72001
+ }
72002
+ function getMovedRecordPath(path, source, target) {
72003
+ return target.concat(path.slice(source.length));
72004
+ }
72005
+ function getShiftedSiblingPath(path, parent, sourceIndex, targetIndex) {
72006
+ if (path.length <= parent.length || !isDescendantPath(path.slice(0, parent.length), parent)) {
72007
+ return path;
71744
72008
  }
71745
- if (isNumber$3(source) && isNumber$3(target)) {
71746
- sourceIndex = source;
71747
- targetIndex = target;
71748
- if (sourceIndex > targetIndex) {
71749
- const sourceRecord = checkedState.get(sourceIndex.toString());
71750
- for (let i = sourceIndex; i > targetIndex; i--) {
71751
- checkedState.set(i.toString(), checkedState.get((i - 1).toString()));
71752
- }
71753
- checkedState.set(targetIndex.toString(), sourceRecord);
71754
- }
71755
- else if (sourceIndex < targetIndex) {
71756
- const sourceRecord = checkedState.get(sourceIndex.toString());
71757
- for (let i = sourceIndex; i < targetIndex; i++) {
71758
- checkedState.set(i.toString(), checkedState.get((i + 1).toString()));
71759
- }
71760
- checkedState.set(targetIndex.toString(), sourceRecord);
71761
- }
72009
+ const siblingIndex = path[parent.length];
72010
+ if (sourceIndex < targetIndex && siblingIndex > sourceIndex && siblingIndex <= targetIndex) {
72011
+ const shifted = [...path];
72012
+ shifted[parent.length] = siblingIndex - 1;
72013
+ return shifted;
71762
72014
  }
71763
- else if (isArray$5(source) && isArray$5(target)) {
71764
- sourceIndex = source[source.length - 1];
71765
- targetIndex = target[target.length - 1];
71766
- if (sourceIndex > targetIndex) {
71767
- const sourceRecord = checkedState.get(source.toString());
71768
- for (let i = sourceIndex; i > targetIndex; i--) {
71769
- const now = [...source];
71770
- now[now.length - 1] = i;
71771
- const last = [...source];
71772
- last[last.length - 1] = i - 1;
71773
- checkedState.set(now.toString(), checkedState.get(last.toString()));
71774
- }
71775
- checkedState.set(target.toString(), sourceRecord);
72015
+ if (sourceIndex > targetIndex && siblingIndex >= targetIndex && siblingIndex < sourceIndex) {
72016
+ const shifted = [...path];
72017
+ shifted[parent.length] = siblingIndex + 1;
72018
+ return shifted;
72019
+ }
72020
+ return path;
72021
+ }
72022
+ function changeCheckboxOrder(sourceRecordPath, targetRecordPath, state) {
72023
+ const { checkedState } = state;
72024
+ const sourcePath = normalizeRecordPath(sourceRecordPath);
72025
+ const targetPath = normalizeRecordPath(targetRecordPath);
72026
+ if (isSameRecordPath(sourcePath, targetPath) || !isSameParentPath(sourcePath, targetPath)) {
72027
+ return;
72028
+ }
72029
+ const parentPath = sourcePath.slice(0, -1);
72030
+ const sourceIndex = sourcePath[sourcePath.length - 1];
72031
+ const targetIndex = targetPath[targetPath.length - 1];
72032
+ const nextCheckedState = new Map();
72033
+ checkedState.forEach((value, key) => {
72034
+ const keyPath = parseCheckboxStateKey(key);
72035
+ let nextPath;
72036
+ if (isDescendantPath(keyPath, sourcePath)) {
72037
+ nextPath = getMovedRecordPath(keyPath, sourcePath, targetPath);
71776
72038
  }
71777
- else if (sourceIndex < targetIndex) {
71778
- const sourceRecord = checkedState.get(source.toString());
71779
- for (let i = sourceIndex; i < targetIndex; i++) {
71780
- const now = [...source];
71781
- now[now.length - 1] = i;
71782
- const next = [...source];
71783
- next[next.length - 1] = i + 1;
71784
- checkedState.set(now.toString(), checkedState.get(next.toString()));
71785
- }
71786
- checkedState.set(target.toString(), sourceRecord);
72039
+ else {
72040
+ nextPath = getShiftedSiblingPath(keyPath, parentPath, sourceIndex, targetIndex);
71787
72041
  }
71788
- }
72042
+ nextCheckedState.set(stringifyRecordPath(nextPath), value);
72043
+ });
72044
+ checkedState.clear();
72045
+ nextCheckedState.forEach((value, key) => {
72046
+ checkedState.set(key, value);
72047
+ });
71789
72048
  }
71790
72049
  function getGroupCheckboxState(table) {
71791
72050
  const result = [];
@@ -72699,6 +72958,7 @@
72699
72958
  placement: inlineIcon.attribute.tooltip.placement
72700
72959
  },
72701
72960
  style: Object.assign({}, this.table.internalProps.theme?.tooltipStyle, inlineIcon.tooltip?.style, inlineIcon.attribute?.tooltip?.style),
72961
+ appearDelay: inlineIcon.attribute.tooltip.appearDelay,
72702
72962
  disappearDelay: inlineIcon.attribute.tooltip.disappearDelay
72703
72963
  };
72704
72964
  if (!this.table.internalProps.tooltipHandler.isBinded(tooltipOptions)) {
@@ -73600,12 +73860,14 @@
73600
73860
  syncRadioState(col, row, field, radioType, indexInCell, isChecked) {
73601
73861
  return syncRadioState(col, row, field, radioType, indexInCell, isChecked, this);
73602
73862
  }
73603
- changeCheckboxAndRadioOrder(sourceIndex, targetIndex) {
73863
+ changeCheckboxOrder(sourceRecordPath, targetRecordPath) {
73604
73864
  if (this.checkedState.size) {
73605
- changeCheckboxOrder(sourceIndex, targetIndex, this);
73865
+ changeCheckboxOrder(sourceRecordPath, targetRecordPath, this);
73606
73866
  }
73607
- if (this.radioState.length) {
73608
- changeRadioOrder(sourceIndex, targetIndex, this);
73867
+ }
73868
+ changeRadioOrder(sourceRecordPath, targetRecordPath) {
73869
+ if (Object.keys(this.radioState).length) {
73870
+ changeRadioOrder(sourceRecordPath, targetRecordPath, this);
73609
73871
  }
73610
73872
  }
73611
73873
  setCustomSelectRanges(customSelectRanges) {
@@ -73614,8 +73876,243 @@
73614
73876
  }
73615
73877
  }
73616
73878
 
73879
+ const AUDIO_EXTENSIONS = new Set(['mp3', 'wav', 'oga', 'm4a', 'aac', 'flac', 'opus']);
73880
+ function isAudioUrl(value) {
73881
+ if (typeof value !== 'string') {
73882
+ return false;
73883
+ }
73884
+ const trimmedValue = value.trim();
73885
+ const queryIndex = trimmedValue.indexOf('?');
73886
+ const hashIndex = trimmedValue.indexOf('#');
73887
+ let endIndex = trimmedValue.length;
73888
+ if (queryIndex >= 0) {
73889
+ endIndex = queryIndex;
73890
+ }
73891
+ if (hashIndex >= 0 && hashIndex < endIndex) {
73892
+ endIndex = hashIndex;
73893
+ }
73894
+ const path = trimmedValue.slice(0, endIndex);
73895
+ const dotIndex = path.lastIndexOf('.');
73896
+ if (dotIndex < 0 || dotIndex === path.length - 1) {
73897
+ return false;
73898
+ }
73899
+ return AUDIO_EXTENSIONS.has(path.slice(dotIndex + 1).toLowerCase());
73900
+ }
73901
+
73902
+ const MEDIA_PREVIEW_MANAGER_KEY = '__vtable_media_preview_manager__';
73903
+ function formatAudioTime(time) {
73904
+ if (!Number.isFinite(time) || time < 0) {
73905
+ return '0:00';
73906
+ }
73907
+ const minutes = Math.floor(time / 60);
73908
+ const seconds = Math.floor(time % 60);
73909
+ return `${minutes}:${seconds.toString().padStart(2, '0')}`;
73910
+ }
73911
+ function updateAudioProgressStyle(progress, value) {
73912
+ progress.style.background = `linear-gradient(
73913
+ to right,
73914
+ #2563EB 0%,
73915
+ #2563EB ${value}%,
73916
+ #D1D5DB ${value}%,
73917
+ #D1D5DB 100%
73918
+ )`;
73919
+ }
73920
+ function ensureAudioPreviewStyle() {
73921
+ const styleId = 'vtable-audio-preview-style';
73922
+ if (document.getElementById(styleId)) {
73923
+ return;
73924
+ }
73925
+ const style = document.createElement('style');
73926
+ style.id = styleId;
73927
+ style.textContent = `
73928
+ .vtable-audio-preview-progress {
73929
+ -webkit-appearance: none;
73930
+ appearance: none;
73931
+ }
73932
+ .vtable-audio-preview-progress::-webkit-slider-runnable-track {
73933
+ height: 4px;
73934
+ border-radius: 999px;
73935
+ background: transparent;
73936
+ }
73937
+ .vtable-audio-preview-progress::-webkit-slider-thumb {
73938
+ -webkit-appearance: none;
73939
+ appearance: none;
73940
+ width: 12px;
73941
+ height: 12px;
73942
+ margin-top: -4px;
73943
+ border-radius: 50%;
73944
+ border: 0;
73945
+ background: #2563EB;
73946
+ }
73947
+ .vtable-audio-preview-progress::-moz-range-track {
73948
+ height: 4px;
73949
+ border-radius: 999px;
73950
+ background: transparent;
73951
+ }
73952
+ .vtable-audio-preview-progress::-moz-range-thumb {
73953
+ width: 12px;
73954
+ height: 12px;
73955
+ border-radius: 50%;
73956
+ border: 0;
73957
+ background: #2563EB;
73958
+ }
73959
+ `;
73960
+ document.head.appendChild(style);
73961
+ }
73962
+ function createAudioPreview(cellValue) {
73963
+ ensureAudioPreviewStyle();
73964
+ const audio = document.createElement('audio');
73965
+ audio.src = cellValue;
73966
+ audio.preload = 'auto';
73967
+ let released = false;
73968
+ const wrapper = document.createElement('div');
73969
+ wrapper.style.width = '80%';
73970
+ wrapper.style.maxWidth = '640px';
73971
+ wrapper.style.height = '54px';
73972
+ wrapper.style.boxSizing = 'border-box';
73973
+ wrapper.style.padding = '0 16px';
73974
+ wrapper.style.borderRadius = '27px';
73975
+ wrapper.style.background = '#F8FAFC';
73976
+ wrapper.style.display = 'flex';
73977
+ wrapper.style.alignItems = 'center';
73978
+ wrapper.style.gap = '10px';
73979
+ wrapper.style.boxShadow = '0 8px 24px rgba(15, 23, 42, 0.16)';
73980
+ const playButton = document.createElement('button');
73981
+ playButton.type = 'button';
73982
+ playButton.textContent = '▶';
73983
+ playButton.style.width = '34px';
73984
+ playButton.style.height = '34px';
73985
+ playButton.style.border = '1px solid #CBD5E1';
73986
+ playButton.style.borderRadius = '8px';
73987
+ playButton.style.background = '#EFF6FF';
73988
+ playButton.style.color = '#0F172A';
73989
+ playButton.style.cursor = 'pointer';
73990
+ playButton.style.flex = '0 0 auto';
73991
+ playButton.style.fontSize = '14px';
73992
+ const timeLabel = document.createElement('span');
73993
+ timeLabel.textContent = '0:00 / 0:00';
73994
+ timeLabel.style.color = '#0F172A';
73995
+ timeLabel.style.font = '14px sans-serif';
73996
+ timeLabel.style.whiteSpace = 'nowrap';
73997
+ const progress = document.createElement('input');
73998
+ progress.className = 'vtable-audio-preview-progress';
73999
+ progress.type = 'range';
74000
+ progress.min = '0';
74001
+ progress.max = '100';
74002
+ progress.value = '0';
74003
+ progress.step = '0.1';
74004
+ progress.style.flex = '1 1 auto';
74005
+ progress.style.height = '4px';
74006
+ progress.style.borderRadius = '999px';
74007
+ progress.style.outline = 'none';
74008
+ progress.style.cursor = 'pointer';
74009
+ progress.style.accentColor = '#2563EB';
74010
+ updateAudioProgressStyle(progress, 0);
74011
+ const updateProgress = () => {
74012
+ const duration = Number.isFinite(audio.duration) ? audio.duration : 0;
74013
+ const currentTime = audio.currentTime || 0;
74014
+ const value = duration > 0 ? Math.min(100, (currentTime / duration) * 100) : 0;
74015
+ progress.disabled = duration <= 0;
74016
+ progress.style.cursor = duration > 0 ? 'pointer' : 'default';
74017
+ progress.value = `${value}`;
74018
+ timeLabel.textContent = `${formatAudioTime(currentTime)} / ${formatAudioTime(duration)}`;
74019
+ updateAudioProgressStyle(progress, value);
74020
+ };
74021
+ playButton.addEventListener('click', e => {
74022
+ e.stopPropagation();
74023
+ if (audio.paused) {
74024
+ const playPromise = audio.play();
74025
+ if (playPromise) {
74026
+ playPromise.catch(error => {
74027
+ if (released || error?.name === 'AbortError') {
74028
+ return;
74029
+ }
74030
+ playButton.textContent = '▶';
74031
+ });
74032
+ }
74033
+ }
74034
+ else {
74035
+ audio.pause();
74036
+ }
74037
+ });
74038
+ progress.addEventListener('click', e => {
74039
+ e.stopPropagation();
74040
+ });
74041
+ progress.addEventListener('input', () => {
74042
+ const duration = Number.isFinite(audio.duration) ? audio.duration : 0;
74043
+ const value = Number(progress.value);
74044
+ if (duration > 0 && Number.isFinite(value)) {
74045
+ audio.currentTime = (duration * value) / 100;
74046
+ }
74047
+ updateProgress();
74048
+ });
74049
+ audio.addEventListener('loadedmetadata', updateProgress);
74050
+ audio.addEventListener('durationchange', updateProgress);
74051
+ audio.addEventListener('timeupdate', updateProgress);
74052
+ audio.addEventListener('play', () => {
74053
+ playButton.textContent = '❚❚';
74054
+ });
74055
+ audio.addEventListener('pause', () => {
74056
+ playButton.textContent = '▶';
74057
+ });
74058
+ audio.addEventListener('ended', () => {
74059
+ audio.currentTime = 0;
74060
+ playButton.textContent = '▶';
74061
+ updateProgress();
74062
+ });
74063
+ wrapper.appendChild(playButton);
74064
+ wrapper.appendChild(timeLabel);
74065
+ wrapper.appendChild(progress);
74066
+ wrapper.appendChild(audio);
74067
+ return {
74068
+ element: wrapper,
74069
+ destroy: () => {
74070
+ released = true;
74071
+ audio.pause();
74072
+ audio.removeAttribute('src');
74073
+ audio.load();
74074
+ }
74075
+ };
74076
+ }
74077
+ function createMediaPreviewManager(table) {
74078
+ const manager = {
74079
+ closePreview: null,
74080
+ registered: false,
74081
+ close() {
74082
+ const closePreview = manager.closePreview;
74083
+ manager.closePreview = null;
74084
+ closePreview?.();
74085
+ },
74086
+ open(closePreview) {
74087
+ manager.close();
74088
+ manager.closePreview = closePreview;
74089
+ },
74090
+ release() {
74091
+ manager.close();
74092
+ manager.registered = false;
74093
+ },
74094
+ ensureRegistered() {
74095
+ if (manager.registered) {
74096
+ return;
74097
+ }
74098
+ table.addReleaseObj(manager);
74099
+ manager.registered = true;
74100
+ }
74101
+ };
74102
+ return manager;
74103
+ }
74104
+ function getMediaPreviewManager(table) {
74105
+ const tableWithManager = table;
74106
+ if (!tableWithManager[MEDIA_PREVIEW_MANAGER_KEY]) {
74107
+ tableWithManager[MEDIA_PREVIEW_MANAGER_KEY] = createMediaPreviewManager(table);
74108
+ }
74109
+ const manager = tableWithManager[MEDIA_PREVIEW_MANAGER_KEY];
74110
+ manager.ensureRegistered();
74111
+ return manager;
74112
+ }
73617
74113
  function bindMediaClick(table) {
73618
74114
  if (Env.mode === 'browser') {
74115
+ getMediaPreviewManager(table);
73619
74116
  table.on(TABLE_EVENT_TYPE.CLICK_CELL, (e) => {
73620
74117
  const { col, row } = e;
73621
74118
  if (e.target.type === 'image' && e.target.role && e.target.role.startsWith('icon')) {
@@ -73693,6 +74190,7 @@
73693
74190
  if (clickToPreview === false) {
73694
74191
  return;
73695
74192
  }
74193
+ const previewManager = getMediaPreviewManager(table);
73696
74194
  const overlay = document.createElement('div');
73697
74195
  overlay.style.width = '100%';
73698
74196
  overlay.style.height = '100%';
@@ -73705,9 +74203,15 @@
73705
74203
  overlay.style.alignItems = 'center';
73706
74204
  overlay.style.overflow = 'hidden';
73707
74205
  overlay.style.zIndex = '9999';
74206
+ const closeOverlay = () => {
74207
+ if (overlay.parentNode) {
74208
+ document.body.removeChild(overlay);
74209
+ }
74210
+ };
74211
+ previewManager.open(closeOverlay);
73708
74212
  overlay.addEventListener('click', e => {
73709
74213
  if (e.target === overlay) {
73710
- document.body.removeChild(overlay);
74214
+ previewManager.close();
73711
74215
  }
73712
74216
  });
73713
74217
  const image = new Image();
@@ -73718,11 +74222,12 @@
73718
74222
  overlay.appendChild(image);
73719
74223
  document.body.appendChild(overlay);
73720
74224
  }
73721
- else if (cellType === 'video') {
74225
+ else if (cellType === 'audio' || (cellType === 'video' && isAudioUrl(cellValue))) {
73722
74226
  const { clickToPreview } = columnDefine;
73723
74227
  if (clickToPreview === false) {
73724
74228
  return;
73725
74229
  }
74230
+ const previewManager = getMediaPreviewManager(table);
73726
74231
  const overlay = document.createElement('div');
73727
74232
  overlay.style.width = '100%';
73728
74233
  overlay.style.height = '100%';
@@ -73735,18 +74240,69 @@
73735
74240
  overlay.style.alignItems = 'center';
73736
74241
  overlay.style.overflow = 'hidden';
73737
74242
  overlay.style.zIndex = '9999';
74243
+ const audioPreview = createAudioPreview(cellValue);
74244
+ const closeOverlay = () => {
74245
+ audioPreview.destroy();
74246
+ if (overlay.parentNode) {
74247
+ document.body.removeChild(overlay);
74248
+ }
74249
+ };
74250
+ previewManager.open(closeOverlay);
73738
74251
  overlay.addEventListener('click', e => {
73739
74252
  if (e.target === overlay) {
73740
- document.body.removeChild(overlay);
74253
+ previewManager.close();
73741
74254
  }
73742
74255
  });
74256
+ overlay.appendChild(audioPreview.element);
74257
+ document.body.appendChild(overlay);
74258
+ }
74259
+ else if (cellType === 'video') {
74260
+ const { clickToPreview } = columnDefine;
74261
+ if (clickToPreview === false) {
74262
+ return;
74263
+ }
74264
+ const previewManager = getMediaPreviewManager(table);
74265
+ const overlay = document.createElement('div');
74266
+ overlay.style.width = '100%';
74267
+ overlay.style.height = '100%';
74268
+ overlay.style.position = 'fixed';
74269
+ overlay.style.top = '0';
74270
+ overlay.style.left = '0';
74271
+ overlay.style.backgroundColor = 'rgba(30, 30, 30, 0.4)';
74272
+ overlay.style.display = 'flex';
74273
+ overlay.style.justifyContent = 'center';
74274
+ overlay.style.alignItems = 'center';
74275
+ overlay.style.overflow = 'hidden';
74276
+ overlay.style.zIndex = '9999';
73743
74277
  const video = document.createElement('video');
73744
74278
  video.src = cellValue;
73745
74279
  video.style.maxWidth = '80%';
73746
74280
  video.style.maxHeight = '80%';
73747
74281
  video.setAttribute('preload', 'auto');
73748
74282
  video.setAttribute('controls', 'true');
74283
+ const closeOverlay = () => {
74284
+ try {
74285
+ video.pause();
74286
+ }
74287
+ catch (err) {
74288
+ }
74289
+ video.removeAttribute('src');
74290
+ try {
74291
+ video.load();
74292
+ }
74293
+ catch (err) {
74294
+ }
74295
+ if (overlay.parentNode) {
74296
+ document.body.removeChild(overlay);
74297
+ }
74298
+ };
74299
+ previewManager.open(closeOverlay);
73749
74300
  overlay.appendChild(video);
74301
+ overlay.addEventListener('click', e => {
74302
+ if (e.target === overlay) {
74303
+ previewManager.close();
74304
+ }
74305
+ });
73750
74306
  document.body.appendChild(overlay);
73751
74307
  }
73752
74308
  });
@@ -77639,8 +78195,8 @@
77639
78195
  case 'text':
77640
78196
  return TextStyle;
77641
78197
  case 'image':
77642
- return ImageStyle$1;
77643
78198
  case 'video':
78199
+ case 'audio':
77644
78200
  return ImageStyle$1;
77645
78201
  case 'link':
77646
78202
  return TextStyle;
@@ -79120,8 +79676,8 @@
79120
79676
  case 'text':
79121
79677
  return TextHeaderStyle;
79122
79678
  case 'image':
79123
- return ImageStyle;
79124
79679
  case 'video':
79680
+ case 'audio':
79125
79681
  return ImageStyle;
79126
79682
  case 'link':
79127
79683
  return TextHeaderStyle;
@@ -81368,7 +81924,7 @@
81368
81924
  return TABLE_EVENT_TYPE;
81369
81925
  }
81370
81926
  options;
81371
- version = "1.26.6";
81927
+ version = "1.26.7";
81372
81928
  pagination;
81373
81929
  id = `VTable${Date.now()}`;
81374
81930
  headerStyleCache;
@@ -83587,10 +84143,15 @@
83587
84143
  rowMax = rowMax + moveContext.sourceSize - 1;
83588
84144
  }
83589
84145
  }
83590
- if (!this.transpose &&
84146
+ if (this.isListTable() &&
84147
+ !this.transpose &&
83591
84148
  (this.isSeriesNumberInBody(args.source.col, args.source.row) || args.movingColumnOrRow === 'row')) {
84149
+ const listTable = this;
84150
+ const sourceRecordPath = listTable.getRecordIndexByCell(args.source.col, moveContext.sourceIndex);
84151
+ const targetRecordPath = listTable.getRecordIndexByCell(args.target.col, moveContext.targetIndex);
83592
84152
  this.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex);
83593
- this.stateManager.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex);
84153
+ this.stateManager.changeCheckboxOrder(sourceRecordPath, targetRecordPath);
84154
+ this.stateManager.changeRadioOrder(sourceRecordPath, targetRecordPath);
83594
84155
  }
83595
84156
  if (moveContext.moveType === 'column') {
83596
84157
  for (let col = colMin; col <= colMax; col++) {
@@ -90108,6 +90669,8 @@
90108
90669
  }
90109
90670
  typeof window !== 'undefined' ? window.performance.now() : 0;
90110
90671
  const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
90672
+ const oldScrollLeft = this.stateManager.scroll.horizontalBarPos;
90673
+ const oldScrollTop = this.stateManager.scroll.verticalBarPos;
90111
90674
  this.scenegraph.clearCells();
90112
90675
  if (sort !== undefined) {
90113
90676
  if (sort === null || (!Array.isArray(sort) && isValid$1(sort.field)) || Array.isArray(sort)) {
@@ -90140,6 +90703,8 @@
90140
90703
  }
90141
90704
  this.stateManager.initCheckedState(records);
90142
90705
  this.clearCellStyleCache();
90706
+ this.stateManager.scroll.horizontalBarPos = 0;
90707
+ this.stateManager.scroll.verticalBarPos = 0;
90143
90708
  this.scenegraph.createSceneGraph();
90144
90709
  this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
90145
90710
  this._updateSize();
@@ -90155,6 +90720,12 @@
90155
90720
  }
90156
90721
  });
90157
90722
  this.scenegraph.resize();
90723
+ if (oldScrollLeft) {
90724
+ this.stateManager.setScrollLeft(oldScrollLeft, undefined, false);
90725
+ }
90726
+ if (oldScrollTop) {
90727
+ this.stateManager.setScrollTop(oldScrollTop, undefined, false);
90728
+ }
90158
90729
  if (this.options.emptyTip) {
90159
90730
  if (this.internalProps.emptyTip) {
90160
90731
  this.internalProps.emptyTip?.resetVisible();
@@ -93577,6 +94148,7 @@
93577
94148
  _table;
93578
94149
  _tooltipInstances;
93579
94150
  _attachInfo;
94151
+ _pendingInfo;
93580
94152
  confine;
93581
94153
  constructor(table, confine) {
93582
94154
  this._table = table;
@@ -93585,14 +94157,39 @@
93585
94157
  this.confine = confine;
93586
94158
  }
93587
94159
  release() {
94160
+ this._clearPendingBind();
93588
94161
  const tooltipInstances = this._tooltipInstances;
93589
94162
  for (const k in tooltipInstances) {
93590
94163
  tooltipInstances[k]?.release?.();
93591
94164
  }
93592
94165
  delete this._tooltipInstances;
93593
94166
  this._attachInfo = null;
94167
+ this._pendingInfo = null;
93594
94168
  }
93595
94169
  _bindToCell(col, row, tooltipOptions) {
94170
+ this._clearPendingBind();
94171
+ const appearDelay = tooltipOptions?.appearDelay;
94172
+ if (tooltipOptions && appearDelay && appearDelay > 0) {
94173
+ this._unbindAttachedTooltip();
94174
+ const id = setTimeout(() => {
94175
+ this._pendingInfo = null;
94176
+ this._bindToCellImmediately(col, row, tooltipOptions);
94177
+ }, appearDelay);
94178
+ this._pendingInfo = {
94179
+ id,
94180
+ col,
94181
+ row,
94182
+ tooltipOptions
94183
+ };
94184
+ return;
94185
+ }
94186
+ this._bindToCellImmediately(col, row, tooltipOptions);
94187
+ }
94188
+ _bindToCellImmediately(col, row, tooltipOptions) {
94189
+ if (!tooltipOptions) {
94190
+ this._unbindAttachedTooltip();
94191
+ return;
94192
+ }
93596
94193
  const info = this._attachInfo;
93597
94194
  const instance = this._getTooltipInstanceInfo(col, row);
93598
94195
  if (info && (!instance || info.instance !== instance)) {
@@ -93608,6 +94205,21 @@
93608
94205
  this._attachInfo = { range, instance, tooltipOptions };
93609
94206
  }
93610
94207
  }
94208
+ _clearPendingBind() {
94209
+ if (this._pendingInfo) {
94210
+ clearTimeout(this._pendingInfo.id);
94211
+ this._pendingInfo = null;
94212
+ }
94213
+ }
94214
+ _unbindAttachedTooltip() {
94215
+ const info = this._attachInfo;
94216
+ if (!info) {
94217
+ return;
94218
+ }
94219
+ const { instance } = info;
94220
+ instance?.unbindTooltipElement();
94221
+ this._attachInfo = null;
94222
+ }
93611
94223
  _move(col, row, tooltipOptions) {
93612
94224
  const info = this._attachInfo;
93613
94225
  if (!info || !cellInRange(info.range, col, row)) {
@@ -93627,15 +94239,13 @@
93627
94239
  instance?.locateTooltipElement(col, row, position, referencePosition, this.confine);
93628
94240
  }
93629
94241
  _unbindFromCell() {
93630
- const info = this._attachInfo;
93631
- if (!info) {
93632
- return;
93633
- }
93634
- const { instance } = info;
93635
- instance?.unbindTooltipElement();
93636
- this._attachInfo = null;
94242
+ this._clearPendingBind();
94243
+ this._unbindAttachedTooltip();
93637
94244
  }
93638
94245
  _isBindCell(col, row) {
94246
+ if (this._pendingInfo && this._pendingInfo.col === col && this._pendingInfo.row === row) {
94247
+ return true;
94248
+ }
93639
94249
  const info = this._attachInfo;
93640
94250
  if (!info) {
93641
94251
  return false;
@@ -93748,7 +94358,8 @@
93748
94358
  return instance;
93749
94359
  }
93750
94360
  isBinded(tooltipOptions) {
93751
- if (JSON.stringify(tooltipOptions) === JSON.stringify(this._attachInfo?.tooltipOptions)) {
94361
+ if (JSON.stringify(tooltipOptions) === JSON.stringify(this._attachInfo?.tooltipOptions) ||
94362
+ JSON.stringify(tooltipOptions) === JSON.stringify(this._pendingInfo?.tooltipOptions)) {
93752
94363
  return true;
93753
94364
  }
93754
94365
  return false;
@@ -94113,7 +94724,7 @@
94113
94724
  }
94114
94725
  }
94115
94726
  cellGroup.AABBBounds.width();
94116
- if ((isNoChartDataRenderNothing && Array.isArray(table.getCellValue(col, row))) || !isNoChartDataRenderNothing) {
94727
+ if ((isNoChartDataRenderNothing && Array.isArray(dataValue)) || !isNoChartDataRenderNothing) {
94117
94728
  const chartGroup = new Chart(isShareChartSpec, {
94118
94729
  stroke: false,
94119
94730
  x: padding[3],
@@ -94127,7 +94738,7 @@
94127
94738
  height: height - padding[2] - padding[0],
94128
94739
  chartInstance,
94129
94740
  dataId,
94130
- data: table.getCellValue(col, row) || [],
94741
+ data: dataValue || [],
94131
94742
  cellPadding: padding,
94132
94743
  dpr: table.internalProps.pixelRatio,
94133
94744
  detectPickChartItem: table.options.customConfig?.detectPickChartItem,
@@ -94290,7 +94901,8 @@
94290
94901
  }
94291
94902
  }
94292
94903
 
94293
- function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, isCheckboxTree) {
94904
+ function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, isCheckboxTree, cellValue) {
94905
+ const value = arguments.length >= 20 ? cellValue : table.getCellValue(col, row);
94294
94906
  if (!cellGroup) {
94295
94907
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
94296
94908
  if (isAsync) {
@@ -94382,7 +94994,7 @@
94382
94994
  }
94383
94995
  });
94384
94996
  }
94385
- const checkboxComponent = createCheckbox(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table, isCheckboxTree);
94997
+ const checkboxComponent = createCheckbox(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table, isCheckboxTree, value);
94386
94998
  if (cellContentLeftIcons.length === 1 &&
94387
94999
  (cellContentLeftIcons[0].name === InternalIconName.expandIconName ||
94388
95000
  cellContentLeftIcons[0].name === InternalIconName.collapseIconName)) {
@@ -94487,7 +95099,7 @@
94487
95099
  }
94488
95100
  return cellGroup;
94489
95101
  }
94490
- function createCheckbox(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, isCheckboxTree) {
95102
+ function createCheckbox(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, isCheckboxTree, cellValue) {
94491
95103
  const style = table._getCellStyle(col, row);
94492
95104
  const size = getProp('size', style, col, row, table);
94493
95105
  const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', style, col, row, table);
@@ -94500,7 +95112,7 @@
94500
95112
  const disableCheckedStroke = getProp('disableCheckedStroke', style, col, row, table);
94501
95113
  const checkIconImage = getProp('checkIconImage', style, col, row, table);
94502
95114
  const indeterminateIconImage = getProp('indeterminateIconImage', style, col, row, table);
94503
- const value = table.getCellValue(col, row);
95115
+ const value = cellValue;
94504
95116
  const dataValue = table.getCellOriginValue(col, row);
94505
95117
  let isChecked;
94506
95118
  let isDisabled;
@@ -94608,31 +95220,55 @@
94608
95220
  return checkbox;
94609
95221
  }
94610
95222
 
94611
- function createRadioCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define, range) {
95223
+ function createRadioCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define, range, isAsync, cellValue) {
95224
+ const value = arguments.length >= 18 ? cellValue : table.getCellValue(col, row);
94612
95225
  if (!cellGroup) {
94613
95226
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
94614
- cellGroup = new Group$1({
94615
- x: xOrigin,
94616
- y: yOrigin,
94617
- width,
94618
- height,
94619
- lineWidth: cellTheme?.group?.lineWidth ?? undefined,
94620
- fill: cellTheme?.group?.fill ?? undefined,
94621
- stroke: cellTheme?.group?.stroke ?? undefined,
94622
- strokeArrayWidth: strokeArrayWidth,
94623
- strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
94624
- cursor: cellTheme?.group?.cursor ?? undefined,
94625
- lineDash: cellTheme?.group?.lineDash ?? undefined,
94626
- lineCap: 'butt',
94627
- clip: true,
94628
- cornerRadius: cellTheme.group.cornerRadius
94629
- });
94630
- cellGroup.role = 'cell';
94631
- cellGroup.col = col;
94632
- cellGroup.row = row;
94633
- cellGroup = columnGroup?.addCellGroup(cellGroup) ?? cellGroup;
95227
+ if (isAsync) {
95228
+ cellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
95229
+ if (cellGroup && cellGroup.role === 'cell') {
95230
+ cellGroup.setAttributes({
95231
+ x: xOrigin,
95232
+ y: yOrigin,
95233
+ width,
95234
+ height,
95235
+ lineWidth: cellTheme?.group?.lineWidth ?? undefined,
95236
+ fill: cellTheme?.group?.fill ?? undefined,
95237
+ stroke: cellTheme?.group?.stroke ?? undefined,
95238
+ strokeArrayWidth: strokeArrayWidth,
95239
+ strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
95240
+ cursor: cellTheme?.group?.cursor ?? undefined,
95241
+ lineDash: cellTheme?.group?.lineDash ?? undefined,
95242
+ lineCap: 'butt',
95243
+ clip: true,
95244
+ cornerRadius: cellTheme.group.cornerRadius
95245
+ });
95246
+ }
95247
+ }
95248
+ if (!cellGroup || cellGroup.role !== 'cell') {
95249
+ cellGroup = new Group$1({
95250
+ x: xOrigin,
95251
+ y: yOrigin,
95252
+ width,
95253
+ height,
95254
+ lineWidth: cellTheme?.group?.lineWidth ?? undefined,
95255
+ fill: cellTheme?.group?.fill ?? undefined,
95256
+ stroke: cellTheme?.group?.stroke ?? undefined,
95257
+ strokeArrayWidth: strokeArrayWidth,
95258
+ strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
95259
+ cursor: cellTheme?.group?.cursor ?? undefined,
95260
+ lineDash: cellTheme?.group?.lineDash ?? undefined,
95261
+ lineCap: 'butt',
95262
+ clip: true,
95263
+ cornerRadius: cellTheme.group.cornerRadius
95264
+ });
95265
+ cellGroup.role = 'cell';
95266
+ cellGroup.col = col;
95267
+ cellGroup.row = row;
95268
+ cellGroup = columnGroup?.addCellGroup(cellGroup) ?? cellGroup;
95269
+ }
94634
95270
  }
94635
- const { width: radioWidth, height: radioHeight } = createRadio(col, row, colWidth, width, height, padding, cellTheme, define, cellGroup, range, table);
95271
+ const { width: radioWidth, height: radioHeight } = createRadio(col, row, colWidth, width, height, padding, cellTheme, define, cellGroup, range, table, value);
94636
95272
  width -= padding[1] + padding[3];
94637
95273
  height -= padding[0] + padding[2];
94638
95274
  cellGroup.forEachChildren((radioComponent) => {
@@ -94657,7 +95293,7 @@
94657
95293
  });
94658
95294
  return cellGroup;
94659
95295
  }
94660
- function createRadio(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, cellGroup, range, table) {
95296
+ function createRadio(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, cellGroup, range, table, cellValue) {
94661
95297
  const style = table._getCellStyle(col, row);
94662
95298
  let size = getProp('size', style, col, row, table);
94663
95299
  let innerRadius = getProp('innerRadius', style, col, row, table);
@@ -94680,7 +95316,7 @@
94680
95316
  if (!isNumber$3(innerRadius) || innerRadius < 0) {
94681
95317
  innerRadius = Math.round((outerRadius / 7) * 3);
94682
95318
  }
94683
- const value = table.getCellValue(col, row);
95319
+ const value = cellValue;
94684
95320
  const dataValue = table.getCellOriginValue(col, row);
94685
95321
  const hierarchyOffset = getHierarchyOffset(col, row, table);
94686
95322
  const cellStyle = table._getCellStyle(col, row);
@@ -94813,7 +95449,8 @@
94813
95449
  return isDisabled ?? globalDisable ?? false;
94814
95450
  }
94815
95451
 
94816
- function createSwitchCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync) {
95452
+ function createSwitchCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, cellValue) {
95453
+ const value = arguments.length >= 19 ? cellValue : table.getCellValue(col, row);
94817
95454
  if (!cellGroup) {
94818
95455
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
94819
95456
  if (isAsync) {
@@ -94899,7 +95536,7 @@
94899
95536
  }
94900
95537
  });
94901
95538
  }
94902
- const switchComponent = createSwitch(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table);
95539
+ const switchComponent = createSwitch(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table, value);
94903
95540
  if (switchComponent) {
94904
95541
  cellGroup.appendChild(switchComponent);
94905
95542
  }
@@ -94926,7 +95563,7 @@
94926
95563
  }
94927
95564
  return cellGroup;
94928
95565
  }
94929
- function createSwitch(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table) {
95566
+ function createSwitch(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, cellValue) {
94930
95567
  const style = table._getCellStyle(col, row);
94931
95568
  const spaceBetweenTextAndCircle = getProp('spaceBetweenTextAndCircle', style, col, row, table);
94932
95569
  const circleRadius = getProp('circleRadius', style, col, row, table);
@@ -94937,7 +95574,7 @@
94937
95574
  const disableCheckedFill = getProp('disableCheckedFill', style, col, row, table);
94938
95575
  const disableUncheckedFill = getProp('disableUncheckedFill', style, col, row, table);
94939
95576
  const circleFill = getProp('circleFill', style, col, row, table);
94940
- const value = table.getCellValue(col, row);
95577
+ const value = cellValue;
94941
95578
  const dataValue = table.getCellOriginValue(col, row);
94942
95579
  let isChecked;
94943
95580
  let isDisabled;
@@ -95039,7 +95676,8 @@
95039
95676
 
95040
95677
  const xScale = new PointScale();
95041
95678
  const yScale = new LinearScale();
95042
- function createSparkLineCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, table, cellTheme, isAsync) {
95679
+ function createSparkLineCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, table, cellTheme, isAsync, cellValue) {
95680
+ const value = arguments.length >= 13 ? cellValue : table.getCellValue(col, row);
95043
95681
  if (!cellGroup) {
95044
95682
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
95045
95683
  if (isAsync) {
@@ -95086,17 +95724,17 @@
95086
95724
  cellGroup = columnGroup?.addCellGroup(cellGroup) ?? cellGroup;
95087
95725
  }
95088
95726
  }
95089
- const chartGroup = createSparkLine(col, row, width, height, padding, table);
95727
+ const chartGroup = createSparkLine(col, row, width, height, padding, table, value);
95090
95728
  if (chartGroup) {
95091
95729
  cellGroup.appendChild(chartGroup);
95092
95730
  }
95093
95731
  return cellGroup;
95094
95732
  }
95095
- function createSparkLine(col, row, width, height, padding, table) {
95733
+ function createSparkLine(col, row, width, height, padding, table, cellValue) {
95096
95734
  let sparklineSpec;
95097
95735
  let chartGroup;
95098
95736
  const chartSpecRaw = table.internalProps.layoutMap.getBody(col, row).sparklineSpec;
95099
- const dataValue = table.getCellValue(col, row);
95737
+ const dataValue = cellValue;
95100
95738
  if (!Array.isArray(dataValue)) {
95101
95739
  return undefined;
95102
95740
  }
@@ -95111,7 +95749,7 @@
95111
95749
  col,
95112
95750
  row,
95113
95751
  dataValue: table.getCellOriginValue(col, row) || '',
95114
- value: table.getCellValue(col, row) || '',
95752
+ value: dataValue || '',
95115
95753
  rect: table.getCellRangeRelativeRect(table.getCellRange(col, row)),
95116
95754
  table
95117
95755
  };
@@ -95303,18 +95941,146 @@
95303
95941
  return numbers;
95304
95942
  }
95305
95943
 
95306
- const regedIcons = get$4();
95307
- function releaseVideoResource(video) {
95308
- try {
95309
- video.pause();
95944
+ const audioIconSvg = '<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="42" height="42" rx="10" fill="#F8FAFF" fill-opacity="0.92"/><rect x="3.75" y="3.75" width="40.5" height="40.5" rx="9.25" stroke="#1D4ED8" stroke-opacity="0.22" stroke-width="1.5"/><path d="M16 30H12C10.8954 30 10 29.1046 10 28V20C10 18.8954 10.8954 18 12 18H16L26 10V38L16 30Z" fill="#EAF1FF" stroke="#0F172A" stroke-opacity="0.24" stroke-width="5.5" stroke-linejoin="round"/><path d="M31.5 18.5C33.3 21.3 33.3 26.7 31.5 29.5" stroke="#0F172A" stroke-opacity="0.24" stroke-width="5.5" stroke-linecap="round"/><path d="M36 15C39.2 20.4 39.2 27.6 36 33" stroke="#0F172A" stroke-opacity="0.24" stroke-width="5.5" stroke-linecap="round"/><path d="M16 30H12C10.8954 30 10 29.1046 10 28V20C10 18.8954 10.8954 18 12 18H16L26 10V38L16 30Z" fill="#EAF1FF" stroke="#2563EB" stroke-width="3.2" stroke-linejoin="round"/><path d="M31.5 18.5C33.3 21.3 33.3 26.7 31.5 29.5" stroke="#2563EB" stroke-width="3.2" stroke-linecap="round"/><path d="M36 15C39.2 20.4 39.2 27.6 36 33" stroke="#2563EB" stroke-width="3.2" stroke-linecap="round"/></svg>';
95945
+ function createAudioCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, _cellValue) {
95946
+ const headerStyle = table._getCellStyle(col, row);
95947
+ const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
95948
+ if (table.options.customConfig?.imageMargin) {
95949
+ padding = getQuadProps(table.options.customConfig?.imageMargin);
95310
95950
  }
95311
- catch (err) {
95951
+ else if (isValid$1(functionalPadding)) {
95952
+ padding = functionalPadding;
95312
95953
  }
95313
- video.removeAttribute('src');
95314
- try {
95315
- video.load();
95954
+ if (cellTheme?.text?.textAlign) {
95955
+ textAlign = cellTheme.text.textAlign;
95316
95956
  }
95317
- catch (err) {
95957
+ if (cellTheme?.text?.textBaseline) {
95958
+ textBaseline = cellTheme.text.textBaseline;
95959
+ }
95960
+ const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
95961
+ let cellGroup;
95962
+ if (isAsync) {
95963
+ cellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
95964
+ if (cellGroup && cellGroup.role === 'cell') {
95965
+ cellGroup.setAttributes({
95966
+ x: xOrigin,
95967
+ y: yOrigin,
95968
+ width,
95969
+ height,
95970
+ lineWidth: cellTheme?.group?.lineWidth ?? undefined,
95971
+ fill: cellTheme?.group?.fill ?? undefined,
95972
+ stroke: cellTheme?.group?.stroke ?? undefined,
95973
+ strokeArrayWidth,
95974
+ strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
95975
+ cursor: cellTheme?.group?.cursor ?? undefined,
95976
+ lineDash: cellTheme?.group?.lineDash ?? undefined,
95977
+ lineCap: 'butt',
95978
+ clip: true,
95979
+ cornerRadius: cellTheme.group.cornerRadius
95980
+ });
95981
+ }
95982
+ }
95983
+ if (!cellGroup || cellGroup.role !== 'cell') {
95984
+ cellGroup = new Group$1({
95985
+ x: xOrigin,
95986
+ y: yOrigin,
95987
+ width,
95988
+ height,
95989
+ lineWidth: cellTheme?.group?.lineWidth ?? undefined,
95990
+ fill: cellTheme?.group?.fill ?? undefined,
95991
+ stroke: cellTheme?.group?.stroke ?? undefined,
95992
+ strokeArrayWidth,
95993
+ strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
95994
+ cursor: cellTheme?.group?.cursor ?? undefined,
95995
+ lineDash: cellTheme?.group?.lineDash ?? undefined,
95996
+ lineCap: 'butt',
95997
+ clip: true,
95998
+ cornerRadius: cellTheme.group.cornerRadius
95999
+ });
96000
+ cellGroup.role = 'cell';
96001
+ cellGroup.col = col;
96002
+ cellGroup.row = row;
96003
+ cellGroup = columnGroup?.addCellGroup(cellGroup) ?? cellGroup;
96004
+ }
96005
+ let cellIcons;
96006
+ if (mayHaveIcon) {
96007
+ let iconCol = col;
96008
+ let iconRow = row;
96009
+ if (range) {
96010
+ iconCol = range.start.col;
96011
+ iconRow = range.start.row;
96012
+ }
96013
+ cellIcons = table.getCellIcons(iconCol, iconRow);
96014
+ }
96015
+ let cellLeftIconWidth = 0;
96016
+ let cellRightIconWidth = 0;
96017
+ if (Array.isArray(cellIcons) && cellIcons.length !== 0) {
96018
+ const { leftIconWidth, rightIconWidth, absoluteRightIconWidth } = dealWithIconLayout(cellIcons, cellGroup, range, table);
96019
+ cellLeftIconWidth = leftIconWidth;
96020
+ cellRightIconWidth = rightIconWidth;
96021
+ cellGroup.forEachChildren((child) => {
96022
+ if (child.role === 'icon-left') {
96023
+ child.setAttribute('x', child.attribute.x + padding[3]);
96024
+ }
96025
+ else if (child.role === 'icon-right') {
96026
+ child.setAttribute('x', child.attribute.x + width - rightIconWidth - padding[1]);
96027
+ }
96028
+ else if (child.role === 'icon-absolute-right') {
96029
+ child.setAttribute('x', child.attribute.x + width - absoluteRightIconWidth - padding[1]);
96030
+ }
96031
+ });
96032
+ cellGroup.forEachChildren((child) => {
96033
+ if (textBaseline === 'middle') {
96034
+ child.setAttribute('y', (height - child.AABBBounds.height()) / 2);
96035
+ }
96036
+ else if (textBaseline === 'bottom') {
96037
+ child.setAttribute('y', height - child.AABBBounds.height() - padding[2]);
96038
+ }
96039
+ else {
96040
+ child.setAttribute('y', padding[0]);
96041
+ }
96042
+ });
96043
+ }
96044
+ cellGroup._cellLeftIconWidth = cellLeftIconWidth;
96045
+ cellGroup._cellRightIconWidth = cellRightIconWidth;
96046
+ const availableWidth = Math.max(1, width - padding[1] - padding[3] - cellLeftIconWidth - cellRightIconWidth);
96047
+ const availableHeight = Math.max(1, height - padding[0] - padding[2]);
96048
+ const iconSize = Math.max(1, Math.min(availableWidth, availableHeight, 32));
96049
+ const pos = calcStartPosition(cellLeftIconWidth, 0, width - cellLeftIconWidth - cellRightIconWidth, height, iconSize, iconSize, textAlign, textBaseline, padding);
96050
+ removeCellMediaChildren(cellGroup);
96051
+ const image = markCellMedia(createImage({
96052
+ x: pos.x,
96053
+ y: pos.y,
96054
+ width: iconSize,
96055
+ height: iconSize,
96056
+ image: audioIconSvg,
96057
+ cursor: 'pointer'
96058
+ }), 'image');
96059
+ image.name = 'image';
96060
+ image.keepAspectRatio = true;
96061
+ image.isAudioIcon = true;
96062
+ image.textAlign = textAlign;
96063
+ image.textBaseline = textBaseline;
96064
+ cellGroup.appendChild(image);
96065
+ return cellGroup;
96066
+ }
96067
+
96068
+ const regedIcons = get$4();
96069
+ function updateVideoMediaDxDy(startCol, endCol, startRow, endRow, table) {
96070
+ for (let col = startCol; col <= endCol; col++) {
96071
+ for (let row = startRow; row <= endRow; row++) {
96072
+ const cellGroup = table.scenegraph.getCell(col, row);
96073
+ if (cellGroup) {
96074
+ cellGroup.forEachChildren((child) => {
96075
+ if (isCellMedia(child)) {
96076
+ child.setAttributes({
96077
+ dx: -table.getColsWidth(cellGroup.mergeStartCol, col - 1),
96078
+ dy: -table.getRowsHeight(cellGroup.mergeStartRow, row - 1)
96079
+ });
96080
+ }
96081
+ });
96082
+ }
96083
+ }
95318
96084
  }
95319
96085
  }
95320
96086
  function getVideoFirstFrameTimeout(table) {
@@ -95328,7 +96094,9 @@
95328
96094
  function snapshotVideoFirstFrame(video, image, table) {
95329
96095
  const displayWidth = image.attribute.width;
95330
96096
  const displayHeight = image.attribute.height;
95331
- if (typeof displayWidth !== 'number' ||
96097
+ if (video.videoWidth <= 0 ||
96098
+ video.videoHeight <= 0 ||
96099
+ typeof displayWidth !== 'number' ||
95332
96100
  typeof displayHeight !== 'number' ||
95333
96101
  displayWidth <= 0 ||
95334
96102
  displayHeight <= 0) {
@@ -95375,7 +96143,7 @@
95375
96143
  }
95376
96144
  return undefined;
95377
96145
  }
95378
- function createVideoCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync) {
96146
+ function createVideoCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, cellValue) {
95379
96147
  const headerStyle = table._getCellStyle(col, row);
95380
96148
  const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
95381
96149
  if (table.options.customConfig?.imageMargin) {
@@ -95473,10 +96241,32 @@
95473
96241
  child.setAttribute('y', padding[0]);
95474
96242
  }
95475
96243
  });
95476
- cellGroup._cellLeftIconWidth = cellLeftIconWidth;
95477
- cellGroup._cellRightIconWidth = cellRightIconWidth;
95478
96244
  }
95479
- const value = table.getCellValue(col, row);
96245
+ cellGroup._cellLeftIconWidth = cellLeftIconWidth;
96246
+ cellGroup._cellRightIconWidth = cellRightIconWidth;
96247
+ const value = arguments.length >= 18 ? cellValue : table.getCellValue(col, row);
96248
+ removeCellMediaChildren(cellGroup);
96249
+ if (isAudioUrl(value)) {
96250
+ const availableWidth = Math.max(1, width - padding[1] - padding[3] - cellLeftIconWidth - cellRightIconWidth);
96251
+ const availableHeight = Math.max(1, height - padding[0] - padding[2]);
96252
+ const iconSize = Math.max(1, Math.min(availableWidth, availableHeight, 32));
96253
+ const pos = calcStartPosition(cellLeftIconWidth, 0, width - cellLeftIconWidth - cellRightIconWidth, height, iconSize, iconSize, textAlign, textBaseline, padding);
96254
+ const image = markCellMedia(createImage({
96255
+ x: pos.x,
96256
+ y: pos.y,
96257
+ width: iconSize,
96258
+ height: iconSize,
96259
+ image: audioIconSvg,
96260
+ cursor: 'pointer'
96261
+ }), 'image');
96262
+ image.name = 'image';
96263
+ image.keepAspectRatio = true;
96264
+ image.isAudioIcon = true;
96265
+ image.textAlign = textAlign;
96266
+ image.textBaseline = textBaseline;
96267
+ cellGroup.appendChild(image);
96268
+ return cellGroup;
96269
+ }
95480
96270
  const video = document.createElement('video');
95481
96271
  video.muted = true;
95482
96272
  video.playsInline = true;
@@ -95497,7 +96287,7 @@
95497
96287
  clearVideoLoadTimer();
95498
96288
  releaseVideoResource(video);
95499
96289
  };
95500
- const isCurrentImage = () => cellGroup.getChildByName('image', true) === image;
96290
+ const isCurrentImage = () => getCellMediaImage(cellGroup) === image;
95501
96291
  const setVideoDamageImage = () => {
95502
96292
  const regedIcons = get$4();
95503
96293
  const damageIcon = regedIcons.video_damage_pic || regedIcons.damage_pic;
@@ -95522,7 +96312,7 @@
95522
96312
  height: imageHeight
95523
96313
  });
95524
96314
  if (isMerge) {
95525
- updateImageDxDy(cellGroup.mergeStartCol, cellGroup.mergeEndCol, cellGroup.mergeStartRow, cellGroup.mergeEndRow, table);
96315
+ updateVideoMediaDxDy(cellGroup.mergeStartCol, cellGroup.mergeEndCol, cellGroup.mergeStartRow, cellGroup.mergeEndRow, table);
95526
96316
  }
95527
96317
  }
95528
96318
  };
@@ -95551,6 +96341,10 @@
95551
96341
  if (!scenegraph) {
95552
96342
  return;
95553
96343
  }
96344
+ if (video.videoWidth <= 0 || video.videoHeight <= 0) {
96345
+ handleVideoLoadFail();
96346
+ return;
96347
+ }
95554
96348
  if (imageAutoSizing) {
95555
96349
  _adjustWidthHeight(col, row, video.videoWidth, video.videoHeight, scenegraph, padding, cellGroup);
95556
96350
  }
@@ -95576,7 +96370,7 @@
95576
96370
  });
95577
96371
  }
95578
96372
  if (isMerge) {
95579
- updateImageDxDy(cellGroup.mergeStartCol, cellGroup.mergeEndCol, cellGroup.mergeStartRow, cellGroup.mergeEndRow, table);
96373
+ updateVideoMediaDxDy(cellGroup.mergeStartCol, cellGroup.mergeEndCol, cellGroup.mergeStartRow, cellGroup.mergeEndRow, table);
95580
96374
  }
95581
96375
  const left = 0;
95582
96376
  const top = 0;
@@ -95584,8 +96378,7 @@
95584
96378
  const iconSize = Math.floor(Math.min(width - padding[1] - padding[3], height - padding[2] - padding[0]) / 2);
95585
96379
  const anchorX = left + (width > image.attribute.width ? image.attribute.x - left + image.attribute.width / 2 : width / 2);
95586
96380
  const anchorY = top + (height > image.attribute.height ? image.attribute.y - top + image.attribute.height / 2 : height / 2);
95587
- const imageGraphic = cellGroup.getChildByName('image', true);
95588
- const { dx, dy } = imageGraphic.attribute;
96381
+ const { dx, dy } = image.attribute;
95589
96382
  const playIcon = new Icon$1({
95590
96383
  x: anchorX - iconSize / 2,
95591
96384
  y: anchorY - iconSize / 2,
@@ -95596,6 +96389,7 @@
95596
96389
  dx,
95597
96390
  dy
95598
96391
  });
96392
+ markCellMedia(playIcon, 'play-icon');
95599
96393
  playIcon.name = 'play-icon';
95600
96394
  cellGroup.appendChild(playIcon);
95601
96395
  if (shouldSnapshot && snapshotVideoFirstFrame(video, image, table)) {
@@ -95605,14 +96399,14 @@
95605
96399
  });
95606
96400
  video.addEventListener('error', handleVideoLoadFail);
95607
96401
  video.addEventListener('abort', handleVideoLoadFail);
95608
- const image = createImage({
96402
+ const image = markCellMedia(createImage({
95609
96403
  x: padding[3],
95610
96404
  y: padding[0],
95611
- width: width - padding[1] - padding[3],
95612
- height: height - padding[2] - padding[0],
96405
+ width: Math.max(1, width - padding[1] - padding[3]),
96406
+ height: Math.max(1, height - padding[2] - padding[0]),
95613
96407
  image: video,
95614
96408
  cursor: 'pointer'
95615
- });
96409
+ }), 'image');
95616
96410
  image.name = 'image';
95617
96411
  image.keepAspectRatio = keepAspectRatio;
95618
96412
  image.textAlign = textAlign;
@@ -96445,7 +97239,8 @@
96445
97239
  scale.niceMax(target.targetTicks.length);
96446
97240
  }
96447
97241
 
96448
- function createButtonCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync) {
97242
+ function createButtonCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, cellValue) {
97243
+ const value = arguments.length >= 19 ? cellValue : table.getCellValue(col, row);
96449
97244
  if (!cellGroup) {
96450
97245
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
96451
97246
  if (isAsync) {
@@ -96531,7 +97326,7 @@
96531
97326
  }
96532
97327
  });
96533
97328
  }
96534
- const buttonComponent = createButton(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table);
97329
+ const buttonComponent = createButton(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table, value);
96535
97330
  if (buttonComponent) {
96536
97331
  cellGroup.appendChild(buttonComponent);
96537
97332
  }
@@ -96557,7 +97352,7 @@
96557
97352
  }
96558
97353
  return cellGroup;
96559
97354
  }
96560
- function createButton(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table) {
97355
+ function createButton(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, cellValue) {
96561
97356
  const style = table._getCellStyle(col, row);
96562
97357
  const buttonColor = getProp('buttonColor', style, col, row, table);
96563
97358
  const buttonBorderColor = getProp('buttonBorderColor', style, col, row, table);
@@ -96570,7 +97365,7 @@
96570
97365
  const buttonDisableColor = getProp('buttonDisableColor', style, col, row, table);
96571
97366
  const buttonDisableBorderColor = getProp('buttonDisableBorderColor', style, col, row, table);
96572
97367
  const buttonTextDisableColor = getProp('buttonTextDisableColor', style, col, row, table);
96573
- const value = table.getCellValue(col, row);
97368
+ const value = cellValue;
96574
97369
  const dataValue = table.getCellOriginValue(col, row);
96575
97370
  const hierarchyOffset = getHierarchyOffset(col, row, table);
96576
97371
  const cellStyle = table._getCellStyle(col, row);
@@ -96685,6 +97480,9 @@
96685
97480
  const registerVideoCell = () => {
96686
97481
  Factory.registerFunction('createVideoCellGroup', createVideoCellGroup);
96687
97482
  };
97483
+ const registerAudioCell = () => {
97484
+ Factory.registerFunction('createAudioCellGroup', createAudioCellGroup);
97485
+ };
96688
97486
 
96689
97487
  registerAxis();
96690
97488
  registerEmptyTip();
@@ -96695,6 +97493,7 @@
96695
97493
  registerListTreeStickCellPlugin();
96696
97494
  registerCustomCellStylePlugin();
96697
97495
  registerAnimation();
97496
+ registerAudioCell();
96698
97497
  registerChartCell();
96699
97498
  registerCheckboxCell();
96700
97499
  registerImageCell();
@@ -104399,6 +105198,7 @@
104399
105198
  registerTooltip();
104400
105199
  registerCustomCellStylePlugin();
104401
105200
  registerAnimation();
105201
+ registerAudioCell();
104402
105202
  registerCheckboxCell();
104403
105203
  registerImageCell();
104404
105204
  registerProgressBarCell();
@@ -104420,6 +105220,7 @@
104420
105220
  registerTitle();
104421
105221
  registerTooltip();
104422
105222
  registerAnimation();
105223
+ registerAudioCell();
104423
105224
  registerChartCell();
104424
105225
  registerCheckboxCell();
104425
105226
  registerImageCell();
@@ -106221,7 +107022,7 @@
106221
107022
  }
106222
107023
 
106223
107024
  registerForVrender();
106224
- const version = "1.26.6";
107025
+ const version = "1.26.7";
106225
107026
  function getIcons() {
106226
107027
  return get$4();
106227
107028
  }
@@ -106273,6 +107074,7 @@
106273
107074
  exports.pluginsDefinition = index$1;
106274
107075
  exports.register = register$1;
106275
107076
  exports.registerAnimation = registerAnimation;
107077
+ exports.registerAudioCell = registerAudioCell;
106276
107078
  exports.registerAxis = registerAxis;
106277
107079
  exports.registerButtonCell = registerButtonCell;
106278
107080
  exports.registerChartCell = registerChartCell;