@visactor/vtable 1.23.1-alpha.2 → 1.23.2

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 (189) hide show
  1. package/cjs/ListTable.d.ts +34 -7
  2. package/cjs/ListTable.js +138 -18
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/body-helper/body-helper.js +1 -2
  5. package/cjs/body-helper/style.js +2 -1
  6. package/cjs/core/BaseTable.js +1 -1
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
  9. package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
  10. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  11. package/cjs/core/index.d.ts +1 -0
  12. package/cjs/core/index.js +30 -0
  13. package/cjs/core/index.js.map +1 -0
  14. package/cjs/core/record-helper.d.ts +4 -2
  15. package/cjs/core/record-helper.js +120 -47
  16. package/cjs/core/record-helper.js.map +1 -1
  17. package/cjs/core/style-helper.js +1 -1
  18. package/cjs/core/style-helper.js.map +1 -1
  19. package/cjs/data/DataSource.d.ts +13 -4
  20. package/cjs/data/DataSource.js +174 -60
  21. package/cjs/data/DataSource.js.map +1 -1
  22. package/cjs/dataset/dataset-pivot-table.js +2 -1
  23. package/cjs/dataset/dataset.js +0 -1
  24. package/cjs/edit/edit-manager.js +2 -2
  25. package/cjs/edit/edit-manager.js.map +1 -1
  26. package/cjs/event/event.d.ts +2 -1
  27. package/cjs/event/event.js +20 -9
  28. package/cjs/event/event.js.map +1 -1
  29. package/cjs/event/listener/container-dom.js +1 -1
  30. package/cjs/event/listener/container-dom.js.map +1 -1
  31. package/cjs/event/listener/table-group.js +8 -7
  32. package/cjs/event/listener/table-group.js.map +1 -1
  33. package/cjs/event/media-click.js +5 -5
  34. package/cjs/event/media-click.js.map +1 -1
  35. package/cjs/header-helper/header-helper.d.ts +2 -2
  36. package/cjs/header-helper/header-helper.js.map +1 -1
  37. package/cjs/header-helper/style.js +1 -2
  38. package/cjs/icons.js +2 -2
  39. package/cjs/icons.js.map +1 -1
  40. package/cjs/index.d.ts +1 -1
  41. package/cjs/index.js +1 -1
  42. package/cjs/index.js.map +1 -1
  43. package/cjs/layout/index.js +2 -1
  44. package/cjs/plugins/custom-cell-style.d.ts +5 -0
  45. package/cjs/plugins/custom-cell-style.js +10 -1
  46. package/cjs/plugins/custom-cell-style.js.map +1 -1
  47. package/cjs/plugins/index.js +1 -1
  48. package/cjs/scenegraph/group-creater/cell-helper.js +2 -2
  49. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  50. package/cjs/scenegraph/group-creater/cell-type/image-cell.d.ts +3 -1
  51. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +12 -6
  52. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  53. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +6 -2
  54. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  55. package/cjs/scenegraph/group-creater/column-helper.js +1 -2
  56. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  57. package/cjs/scenegraph/layout/compute-col-width.js +5 -5
  58. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  59. package/cjs/scenegraph/layout/compute-row-height.js +1 -2
  60. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  61. package/cjs/scenegraph/layout/update-height.js +3 -3
  62. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  63. package/cjs/scenegraph/layout/update-width.js +5 -5
  64. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  65. package/cjs/scenegraph/scenegraph.js +2 -2
  66. package/cjs/scenegraph/scenegraph.js.map +1 -1
  67. package/cjs/themes/themes.d.ts +3 -1
  68. package/cjs/themes/themes.js +30 -1
  69. package/cjs/themes/themes.js.map +1 -1
  70. package/cjs/themes.d.ts +2 -0
  71. package/cjs/themes.js +11 -2
  72. package/cjs/themes.js.map +1 -1
  73. package/cjs/ts-types/base-table.d.ts +2 -2
  74. package/cjs/ts-types/base-table.js.map +1 -1
  75. package/cjs/ts-types/events.d.ts +15 -0
  76. package/cjs/ts-types/events.js.map +1 -1
  77. package/cjs/ts-types/icon.d.ts +2 -0
  78. package/cjs/ts-types/icon.js +4 -3
  79. package/cjs/ts-types/icon.js.map +1 -1
  80. package/cjs/ts-types/list-table/layout-map/api.d.ts +3 -3
  81. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  82. package/cjs/ts-types/pivot-table/dimension/composite-dimension.d.ts +17 -0
  83. package/cjs/ts-types/pivot-table/dimension/composite-dimension.js +6 -0
  84. package/cjs/ts-types/pivot-table/dimension/composite-dimension.js.map +1 -0
  85. package/cjs/ts-types/pivot-table/dimension/index.d.ts +3 -2
  86. package/cjs/ts-types/pivot-table/dimension/index.js.map +1 -1
  87. package/cjs/ts-types/pivot-table/indicator/composite-indicator.d.ts +14 -2
  88. package/cjs/ts-types/pivot-table/indicator/composite-indicator.js.map +1 -1
  89. package/cjs/ts-types/pivot-table/indicator/index.d.ts +2 -2
  90. package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
  91. package/cjs/ts-types/table-engine.d.ts +33 -6
  92. package/cjs/ts-types/table-engine.js.map +1 -1
  93. package/cjs/vrender.js.map +1 -1
  94. package/dist/vtable.js +784 -194
  95. package/dist/vtable.min.js +2 -2
  96. package/es/ListTable.d.ts +34 -7
  97. package/es/ListTable.js +134 -18
  98. package/es/ListTable.js.map +1 -1
  99. package/es/body-helper/body-helper.js +1 -2
  100. package/es/body-helper/style.js +2 -1
  101. package/es/core/BaseTable.js +1 -1
  102. package/es/core/BaseTable.js.map +1 -1
  103. package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
  104. package/es/core/TABLE_EVENT_TYPE.js +1 -0
  105. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  106. package/es/core/index.d.ts +1 -0
  107. package/es/core/index.js +2 -0
  108. package/es/core/index.js.map +1 -0
  109. package/es/core/record-helper.d.ts +4 -2
  110. package/es/core/record-helper.js +114 -43
  111. package/es/core/record-helper.js.map +1 -1
  112. package/es/core/style-helper.js +1 -1
  113. package/es/core/style-helper.js.map +1 -1
  114. package/es/data/DataSource.d.ts +13 -4
  115. package/es/data/DataSource.js +174 -60
  116. package/es/data/DataSource.js.map +1 -1
  117. package/es/dataset/dataset-pivot-table.js +2 -1
  118. package/es/dataset/dataset.js +1 -2
  119. package/es/edit/edit-manager.js +2 -2
  120. package/es/edit/edit-manager.js.map +1 -1
  121. package/es/event/event.d.ts +2 -1
  122. package/es/event/event.js +20 -9
  123. package/es/event/event.js.map +1 -1
  124. package/es/event/listener/container-dom.js +1 -1
  125. package/es/event/listener/container-dom.js.map +1 -1
  126. package/es/event/listener/table-group.js +8 -7
  127. package/es/event/listener/table-group.js.map +1 -1
  128. package/es/event/media-click.js +5 -5
  129. package/es/event/media-click.js.map +1 -1
  130. package/es/header-helper/header-helper.d.ts +2 -2
  131. package/es/header-helper/header-helper.js.map +1 -1
  132. package/es/header-helper/style.js +1 -2
  133. package/es/icons.js +1 -3
  134. package/es/icons.js.map +1 -1
  135. package/es/index.d.ts +1 -1
  136. package/es/index.js +1 -1
  137. package/es/index.js.map +1 -1
  138. package/es/layout/index.js +2 -1
  139. package/es/plugins/custom-cell-style.d.ts +5 -0
  140. package/es/plugins/custom-cell-style.js +10 -1
  141. package/es/plugins/custom-cell-style.js.map +1 -1
  142. package/es/plugins/index.js +1 -1
  143. package/es/scenegraph/group-creater/cell-helper.js +2 -2
  144. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  145. package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +3 -1
  146. package/es/scenegraph/group-creater/cell-type/image-cell.js +11 -7
  147. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  148. package/es/scenegraph/group-creater/cell-type/video-cell.js +7 -3
  149. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  150. package/es/scenegraph/group-creater/column-helper.js +1 -2
  151. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  152. package/es/scenegraph/layout/compute-col-width.js +5 -5
  153. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  154. package/es/scenegraph/layout/compute-row-height.js +1 -2
  155. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  156. package/es/scenegraph/layout/update-height.js +3 -3
  157. package/es/scenegraph/layout/update-height.js.map +1 -1
  158. package/es/scenegraph/layout/update-width.js +5 -5
  159. package/es/scenegraph/layout/update-width.js.map +1 -1
  160. package/es/scenegraph/scenegraph.js +2 -2
  161. package/es/scenegraph/scenegraph.js.map +1 -1
  162. package/es/themes/themes.d.ts +3 -1
  163. package/es/themes/themes.js +27 -0
  164. package/es/themes/themes.js.map +1 -1
  165. package/es/themes.d.ts +2 -0
  166. package/es/themes.js +3 -1
  167. package/es/themes.js.map +1 -1
  168. package/es/ts-types/base-table.d.ts +2 -2
  169. package/es/ts-types/base-table.js.map +1 -1
  170. package/es/ts-types/events.d.ts +15 -0
  171. package/es/ts-types/events.js.map +1 -1
  172. package/es/ts-types/icon.d.ts +2 -0
  173. package/es/ts-types/icon.js +4 -3
  174. package/es/ts-types/icon.js.map +1 -1
  175. package/es/ts-types/list-table/layout-map/api.d.ts +3 -3
  176. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  177. package/es/ts-types/pivot-table/dimension/composite-dimension.d.ts +17 -0
  178. package/es/ts-types/pivot-table/dimension/composite-dimension.js +2 -0
  179. package/es/ts-types/pivot-table/dimension/composite-dimension.js.map +1 -0
  180. package/es/ts-types/pivot-table/dimension/index.d.ts +3 -2
  181. package/es/ts-types/pivot-table/dimension/index.js.map +1 -1
  182. package/es/ts-types/pivot-table/indicator/composite-indicator.d.ts +14 -2
  183. package/es/ts-types/pivot-table/indicator/composite-indicator.js.map +1 -1
  184. package/es/ts-types/pivot-table/indicator/index.d.ts +2 -2
  185. package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
  186. package/es/ts-types/table-engine.d.ts +33 -6
  187. package/es/ts-types/table-engine.js.map +1 -1
  188. package/es/vrender.js.map +1 -1
  189. package/package.json +3 -3
@@ -60,6 +60,7 @@ export interface TableEvents {
60
60
  AFTER_UPDATE_CELL_CONTENT_WIDTH: 'after_update_cell_content_width';
61
61
  AFTER_UPDATE_SELECT_BORDER_HEIGHT: 'after_update_select_border_height';
62
62
  CHANGE_CELL_VALUE: 'change_cell_value';
63
+ CHANGE_CELL_VALUES: 'change_cell_values';
63
64
  MOUSEDOWN_FILL_HANDLE: 'mousedown_fill_handle';
64
65
  DRAG_FILL_HANDLE_END: 'drag_fill_handle_end';
65
66
  DBLCLICK_FILL_HANDLE: 'dblclick_fill_handle';
@@ -64,6 +64,7 @@ Object.defineProperty(exports, "__esModule", {
64
64
  AFTER_UPDATE_CELL_CONTENT_WIDTH: "after_update_cell_content_width",
65
65
  AFTER_UPDATE_SELECT_BORDER_HEIGHT: "after_update_select_border_height",
66
66
  CHANGE_CELL_VALUE: "change_cell_value",
67
+ CHANGE_CELL_VALUES: "change_cell_values",
67
68
  DRAG_FILL_HANDLE_END: "drag_fill_handle_end",
68
69
  MOUSEDOWN_FILL_HANDLE: "mousedown_fill_handle",
69
70
  DBLCLICK_FILL_HANDLE: "dblclick_fill_handle",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/TABLE_EVENT_TYPE.ts"],"names":[],"mappings":";;;AAqQa,QAAA,gBAAgB,GAAgB;IAC3C,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAClC,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAClC,gBAAgB,EAAE,kBAAkB;IACpC,kBAAkB,EAAE,oBAAoB;IACxC,aAAa,EAAE,eAAe;IAC9B,iBAAiB,EAAE,mBAAmB;IACtC,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,4BAA4B,EAAE,8BAA8B;IAC5D,sBAAsB,EAAE,wBAAwB;IAChD,wBAAwB,EAAE,0BAA0B;IACpD,2BAA2B,EAAE,6BAA6B;IAC1D,UAAU,EAAE,YAAY;IAIxB,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,qBAAqB,EAAE,uBAAuB;IAC9C,mBAAmB,EAAE,qBAAqB;IAC1C,mBAAmB,EAAE,qBAAqB;IAC1C,sBAAsB,EAAE,wBAAwB;IAChD,eAAe,EAAE,iBAAiB;IAClC,gBAAgB,EAAE,kBAAkB;IACpC,SAAS,EAAE,WAAW;IACtB,mBAAmB,EAAE,qBAAqB;IAC1C,mBAAmB,EAAE,qBAAqB;IAE1C,2BAA2B,EAAE,6BAA6B;IAE1D,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IAEtB,UAAU,EAAE,YAAY;IAExB,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,aAAa,EAAE,eAAe;IAE9B,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAElC,qBAAqB,EAAE,uBAAuB;IAC9C,kBAAkB,EAAE,oBAAoB;IACxC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,aAAa;IAC1B,oBAAoB,EAAE,sBAAsB;IAC5C,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAClB,+BAA+B,EAAE,iCAAiC;IAClE,iCAAiC,EAAE,mCAAmC;IACtE,iBAAiB,EAAE,mBAAmB;IACtC,oBAAoB,EAAE,sBAAsB;IAC5C,qBAAqB,EAAE,uBAAuB;IAC9C,oBAAoB,EAAE,sBAAsB;IAE5C,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,oBAAoB;IAExC,YAAY,EAAE,cAAc;IAC5B,wBAAwB,EAAE,0BAA0B;IACpD,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAE5B,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAE9B,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;CACtB,CAAC","file":"TABLE_EVENT_TYPE.js","sourcesContent":["export interface TableEvents {\n /**\n * 鼠标点击单元格事件\n */\n CLICK_CELL: 'click_cell';\n /**\n * 鼠标双击单元格事件\n */\n DBLCLICK_CELL: 'dblclick_cell';\n /**\n * 单元格上鼠标按下事件\n */\n MOUSEDOWN_CELL: 'mousedown_cell';\n /**\n * 单元格鼠标松开事件\n */\n MOUSEUP_CELL: 'mouseup_cell';\n\n /**\n * 单元格选中状态改变事件\n */\n SELECTED_CELL: 'selected_cell';\n\n /**\n * 单元格选中状态改变事件\n */\n SELECTED_CLEAR: 'selected_clear';\n\n /** 键盘按下事件 内部逻辑处理前 */\n BEFORE_KEYDOWN: 'before_keydown';\n /**\n * 键盘按下事件 触发时机是在内部处理keydown逻辑之后\n */\n KEYDOWN: 'keydown';\n /**\n * 鼠标进入表格事件\n */\n MOUSEENTER_TABLE: 'mouseenter_table';\n /**\n * 鼠标离开表格事件\n */\n MOUSELEAVE_TABLE: 'mouseleave_table';\n /**\n * 鼠标点击表格事件\n */\n MOUSEDOWN_TABLE: 'mousedown_table';\n /**\n * 鼠标在表格上移动事件\n */\n MOUSEMOVE_TABLE: 'mousemove_table';\n /**\n * 鼠标在某个单元格上移动事件\n */\n MOUSEMOVE_CELL: 'mousemove_cell';\n /**\n * 鼠标进入单元格事件\n */\n MOUSEENTER_CELL: 'mouseenter_cell';\n /**\n * 鼠标离开单元格事件\n */\n MOUSELEAVE_CELL: 'mouseleave_cell';\n /**\n * 单元格右键事件\n */\n CONTEXTMENU_CELL: 'contextmenu_cell';\n /**\n * 画布右键事件\n */\n CONTEXTMENU_CANVAS: 'contextmenu_canvas';\n /**\n * 列宽调整事件\n */\n RESIZE_COLUMN: 'resize_column';\n /**\n * 列宽调整结束事件\n */\n RESIZE_COLUMN_END: 'resize_column_end';\n /**\n * 行高调整事件\n */\n RESIZE_ROW: 'resize_row';\n /**\n * 行高调整结束事件\n */\n RESIZE_ROW_END: 'resize_row_end';\n /**\n * 拖拽表头移动位置的事件\n */\n CHANGE_HEADER_POSITION: 'change_header_position';\n CHANGE_HEADER_POSITION_START: 'change_header_position_start';\n CHANGING_HEADER_POSITION: 'changing_header_position';\n CHANGE_HEADER_POSITION_FAIL: 'change_header_position_fail';\n /**\n * 点击排序图标事件\n */\n SORT_CLICK: 'sort_click';\n /**\n * 执行完排序\n */\n AFTER_SORT: 'after_sort';\n /**\n * 点击固定列图标 冻结或者解冻事件\n */\n FREEZE_CLICK: 'freeze_click';\n /**\n * 滚动表格事件\n */\n SCROLL: 'scroll';\n CAN_SCROLL: 'can_scroll';\n /**\n * 横向滚动条滚动到结束位\n */\n SCROLL_HORIZONTAL_END: 'scroll_horizontal_end';\n /**\n * 竖向滚动条滚动到结束位\n */\n SCROLL_VERTICAL_END: 'scroll_vertical_end';\n /**\n * 点击下拉菜单图标事件\n */\n DROPDOWN_MENU_CLICK: 'dropdown_menu_click';\n /**\n * 鼠标经过迷你图标记事件\n */\n MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol';\n\n /**\n * 拖拽框选单元格鼠标松开事件\n */\n DRAG_SELECT_END: 'drag_select_end';\n /**\n * 拖拽框选单元格鼠标移动事件\n */\n SELECTED_CHANGED: 'selected_changed';\n /** 复制完成 */\n COPY_DATA: 'copy_data';\n /**\n * 点击下拉菜单按钮\n */\n DROPDOWN_ICON_CLICK: 'dropdown_icon_click';\n /**\n * 清空下拉菜单事件(菜单显示时点击其他区域)\n */\n DROPDOWN_MENU_CLEAR: 'dropdown_menu_clear';\n\n /**\n * 树形结构展开收起的点击事件\n */\n TREE_HIERARCHY_STATE_CHANGE: 'tree_hierarchy_state_change';\n\n SHOW_MENU: 'show_menu';\n HIDE_MENU: 'hide_menu';\n /**\n * icon图标点击事件\n */\n ICON_CLICK: 'icon_click';\n\n // legend component\n LEGEND_ITEM_CLICK: 'legend_item_click';\n LEGEND_ITEM_HOVER: 'legend_item_hover';\n LEGEND_ITEM_UNHOVER: 'legend_item_unHover';\n LEGEND_CHANGE: 'legend_change';\n\n MOUSEENTER_AXIS: 'mouseenter_axis';\n MOUSELEAVE_AXIS: 'mouseleave_axis';\n\n CHECKBOX_STATE_CHANGE: 'checkbox_state_change';\n RADIO_STATE_CHANGE: 'radio_state_change';\n SWITCH_STATE_CHANGE: 'switch_state_change';\n //#region lifecircle\n /** 表格实例初始化前触发 */\n BEFORE_INIT: 'before_init';\n /** 更新表格选项前触发 */\n BEFORE_UPDATE_OPTION: 'before_update_option';\n /** 设置表格大小前触发 */\n BEFORE_SET_SIZE: 'before_set_size';\n /** 每次渲染完成触发 */\n AFTER_RENDER: 'after_render';\n /** 表格实例初始化完成 */\n INITIALIZED: 'initialized';\n /** 表格更新完成 */\n UPDATED: 'updated';\n /** 单元格内容宽度更新后触发 */\n AFTER_UPDATE_CELL_CONTENT_WIDTH: 'after_update_cell_content_width';\n\n /** 选择边框高度更新后触发 */\n AFTER_UPDATE_SELECT_BORDER_HEIGHT: 'after_update_select_border_height';\n //#endregion\n\n /** 编辑单元格 */\n CHANGE_CELL_VALUE: 'change_cell_value';\n\n /**\n * 鼠标按下填充柄事件\n */\n MOUSEDOWN_FILL_HANDLE: 'mousedown_fill_handle';\n /**\n * 拖拽填充柄结束事件\n */\n DRAG_FILL_HANDLE_END: 'drag_fill_handle_end';\n /**\n * 双击填充柄事件\n */\n DBLCLICK_FILL_HANDLE: 'dblclick_fill_handle';\n\n /**\n * 空数据提示点击事件\n */\n EMPTY_TIP_CLICK: 'empty_tip_click';\n /**\n * 空数据提示双击事件\n */\n EMPTY_TIP_DBLCLICK: 'empty_tip_dblclick';\n\n /**\n * 按钮点击事件\n */\n BUTTON_CLICK: 'button_click';\n /**\n * 缓存图表事件\n */\n BEFORE_CACHE_CHART_IMAGE: 'before_cache_chart_image';\n /**\n * 粘贴数据事件\n */\n PASTED_DATA: 'pasted_data';\n PLUGIN_EVENT: 'plugin_event';\n\n /**\n * 添加数据记录事件\n */\n ADD_RECORD: 'add_record';\n /**\n * 删除数据记录事件\n */\n DELETE_RECORD: 'delete_record';\n /**\n * 更新数据记录事件\n */\n UPDATE_RECORD: 'update_record';\n /**\n * 添加列事件\n */\n ADD_COLUMN: 'add_column';\n /**\n * 删除列事件\n */\n DELETE_COLUMN: 'delete_column';\n /**\n * 筛选菜单显示事件\n */\n FILTER_MENU_SHOW: 'filter_menu_show';\n /**\n * 筛选菜单隐藏事件\n */\n FILTER_MENU_HIDE: 'filter_menu_hide';\n}\n/**\n * Table event types\n */\nexport const TABLE_EVENT_TYPE: TableEvents = {\n CLICK_CELL: 'click_cell',\n DBLCLICK_CELL: 'dblclick_cell',\n MOUSEDOWN_CELL: 'mousedown_cell',\n MOUSEUP_CELL: 'mouseup_cell',\n SELECTED_CELL: 'selected_cell',\n SELECTED_CLEAR: 'selected_clear',\n BEFORE_KEYDOWN: 'before_keydown',\n KEYDOWN: 'keydown',\n MOUSEENTER_TABLE: 'mouseenter_table',\n MOUSELEAVE_TABLE: 'mouseleave_table',\n MOUSEDOWN_TABLE: 'mousedown_table',\n MOUSEMOVE_TABLE: 'mousemove_table',\n MOUSEMOVE_CELL: 'mousemove_cell',\n MOUSEENTER_CELL: 'mouseenter_cell',\n MOUSELEAVE_CELL: 'mouseleave_cell',\n CONTEXTMENU_CELL: 'contextmenu_cell',\n CONTEXTMENU_CANVAS: 'contextmenu_canvas',\n RESIZE_COLUMN: 'resize_column',\n RESIZE_COLUMN_END: 'resize_column_end',\n RESIZE_ROW: 'resize_row',\n RESIZE_ROW_END: 'resize_row_end',\n CHANGE_HEADER_POSITION_START: 'change_header_position_start',\n CHANGE_HEADER_POSITION: 'change_header_position',\n CHANGING_HEADER_POSITION: 'changing_header_position',\n CHANGE_HEADER_POSITION_FAIL: 'change_header_position_fail',\n SORT_CLICK: 'sort_click',\n /**\n * 执行完排序\n */\n AFTER_SORT: 'after_sort',\n FREEZE_CLICK: 'freeze_click',\n SCROLL: 'scroll',\n CAN_SCROLL: 'can_scroll',\n SCROLL_HORIZONTAL_END: 'scroll_horizontal_end',\n SCROLL_VERTICAL_END: 'scroll_vertical_end',\n DROPDOWN_MENU_CLICK: 'dropdown_menu_click',\n MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol',\n DRAG_SELECT_END: 'drag_select_end',\n SELECTED_CHANGED: 'selected_changed',\n COPY_DATA: 'copy_data',\n DROPDOWN_ICON_CLICK: 'dropdown_icon_click', // 点击下拉菜单按钮\n DROPDOWN_MENU_CLEAR: 'dropdown_menu_clear', // 清空下拉菜单事件(菜单显示时点击其他区域)\n\n TREE_HIERARCHY_STATE_CHANGE: 'tree_hierarchy_state_change', //树形结构展开收起的点击事件\n\n SHOW_MENU: 'show_menu',\n HIDE_MENU: 'hide_menu',\n\n ICON_CLICK: 'icon_click',\n\n LEGEND_ITEM_CLICK: 'legend_item_click',\n LEGEND_ITEM_HOVER: 'legend_item_hover',\n LEGEND_ITEM_UNHOVER: 'legend_item_unHover',\n LEGEND_CHANGE: 'legend_change',\n\n MOUSEENTER_AXIS: 'mouseenter_axis',\n MOUSELEAVE_AXIS: 'mouseleave_axis',\n\n CHECKBOX_STATE_CHANGE: 'checkbox_state_change',\n RADIO_STATE_CHANGE: 'radio_state_change',\n SWITCH_STATE_CHANGE: 'switch_state_change',\n BEFORE_SET_SIZE: 'before_set_size',\n BEFORE_INIT: 'before_init',\n BEFORE_UPDATE_OPTION: 'before_update_option',\n AFTER_RENDER: 'after_render',\n INITIALIZED: 'initialized',\n UPDATED: 'updated',\n AFTER_UPDATE_CELL_CONTENT_WIDTH: 'after_update_cell_content_width',\n AFTER_UPDATE_SELECT_BORDER_HEIGHT: 'after_update_select_border_height',\n CHANGE_CELL_VALUE: 'change_cell_value',\n DRAG_FILL_HANDLE_END: 'drag_fill_handle_end',\n MOUSEDOWN_FILL_HANDLE: 'mousedown_fill_handle',\n DBLCLICK_FILL_HANDLE: 'dblclick_fill_handle',\n\n EMPTY_TIP_CLICK: 'empty_tip_click',\n EMPTY_TIP_DBLCLICK: 'empty_tip_dblclick',\n\n BUTTON_CLICK: 'button_click',\n BEFORE_CACHE_CHART_IMAGE: 'before_cache_chart_image',\n PASTED_DATA: 'pasted_data',\n PLUGIN_EVENT: 'plugin_event',\n\n ADD_RECORD: 'add_record',\n DELETE_RECORD: 'delete_record',\n UPDATE_RECORD: 'update_record',\n ADD_COLUMN: 'add_column',\n DELETE_COLUMN: 'delete_column',\n\n FILTER_MENU_SHOW: 'filter_menu_show',\n FILTER_MENU_HIDE: 'filter_menu_hide'\n} as TableEvents;\n"]}
1
+ {"version":3,"sources":["../src/core/TABLE_EVENT_TYPE.ts"],"names":[],"mappings":";;;AAuQa,QAAA,gBAAgB,GAAgB;IAC3C,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAClC,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAClC,gBAAgB,EAAE,kBAAkB;IACpC,kBAAkB,EAAE,oBAAoB;IACxC,aAAa,EAAE,eAAe;IAC9B,iBAAiB,EAAE,mBAAmB;IACtC,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,4BAA4B,EAAE,8BAA8B;IAC5D,sBAAsB,EAAE,wBAAwB;IAChD,wBAAwB,EAAE,0BAA0B;IACpD,2BAA2B,EAAE,6BAA6B;IAC1D,UAAU,EAAE,YAAY;IAIxB,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,qBAAqB,EAAE,uBAAuB;IAC9C,mBAAmB,EAAE,qBAAqB;IAC1C,mBAAmB,EAAE,qBAAqB;IAC1C,sBAAsB,EAAE,wBAAwB;IAChD,eAAe,EAAE,iBAAiB;IAClC,gBAAgB,EAAE,kBAAkB;IACpC,SAAS,EAAE,WAAW;IACtB,mBAAmB,EAAE,qBAAqB;IAC1C,mBAAmB,EAAE,qBAAqB;IAE1C,2BAA2B,EAAE,6BAA6B;IAE1D,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IAEtB,UAAU,EAAE,YAAY;IAExB,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,aAAa,EAAE,eAAe;IAE9B,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAElC,qBAAqB,EAAE,uBAAuB;IAC9C,kBAAkB,EAAE,oBAAoB;IACxC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,aAAa;IAC1B,oBAAoB,EAAE,sBAAsB;IAC5C,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAClB,+BAA+B,EAAE,iCAAiC;IAClE,iCAAiC,EAAE,mCAAmC;IACtE,iBAAiB,EAAE,mBAAmB;IACtC,kBAAkB,EAAE,oBAAoB;IACxC,oBAAoB,EAAE,sBAAsB;IAC5C,qBAAqB,EAAE,uBAAuB;IAC9C,oBAAoB,EAAE,sBAAsB;IAE5C,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,oBAAoB;IAExC,YAAY,EAAE,cAAc;IAC5B,wBAAwB,EAAE,0BAA0B;IACpD,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAE5B,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAE9B,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;CACtB,CAAC","file":"TABLE_EVENT_TYPE.js","sourcesContent":["export interface TableEvents {\n /**\n * 鼠标点击单元格事件\n */\n CLICK_CELL: 'click_cell';\n /**\n * 鼠标双击单元格事件\n */\n DBLCLICK_CELL: 'dblclick_cell';\n /**\n * 单元格上鼠标按下事件\n */\n MOUSEDOWN_CELL: 'mousedown_cell';\n /**\n * 单元格鼠标松开事件\n */\n MOUSEUP_CELL: 'mouseup_cell';\n\n /**\n * 单元格选中状态改变事件\n */\n SELECTED_CELL: 'selected_cell';\n\n /**\n * 单元格选中状态改变事件\n */\n SELECTED_CLEAR: 'selected_clear';\n\n /** 键盘按下事件 内部逻辑处理前 */\n BEFORE_KEYDOWN: 'before_keydown';\n /**\n * 键盘按下事件 触发时机是在内部处理keydown逻辑之后\n */\n KEYDOWN: 'keydown';\n /**\n * 鼠标进入表格事件\n */\n MOUSEENTER_TABLE: 'mouseenter_table';\n /**\n * 鼠标离开表格事件\n */\n MOUSELEAVE_TABLE: 'mouseleave_table';\n /**\n * 鼠标点击表格事件\n */\n MOUSEDOWN_TABLE: 'mousedown_table';\n /**\n * 鼠标在表格上移动事件\n */\n MOUSEMOVE_TABLE: 'mousemove_table';\n /**\n * 鼠标在某个单元格上移动事件\n */\n MOUSEMOVE_CELL: 'mousemove_cell';\n /**\n * 鼠标进入单元格事件\n */\n MOUSEENTER_CELL: 'mouseenter_cell';\n /**\n * 鼠标离开单元格事件\n */\n MOUSELEAVE_CELL: 'mouseleave_cell';\n /**\n * 单元格右键事件\n */\n CONTEXTMENU_CELL: 'contextmenu_cell';\n /**\n * 画布右键事件\n */\n CONTEXTMENU_CANVAS: 'contextmenu_canvas';\n /**\n * 列宽调整事件\n */\n RESIZE_COLUMN: 'resize_column';\n /**\n * 列宽调整结束事件\n */\n RESIZE_COLUMN_END: 'resize_column_end';\n /**\n * 行高调整事件\n */\n RESIZE_ROW: 'resize_row';\n /**\n * 行高调整结束事件\n */\n RESIZE_ROW_END: 'resize_row_end';\n /**\n * 拖拽表头移动位置的事件\n */\n CHANGE_HEADER_POSITION: 'change_header_position';\n CHANGE_HEADER_POSITION_START: 'change_header_position_start';\n CHANGING_HEADER_POSITION: 'changing_header_position';\n CHANGE_HEADER_POSITION_FAIL: 'change_header_position_fail';\n /**\n * 点击排序图标事件\n */\n SORT_CLICK: 'sort_click';\n /**\n * 执行完排序\n */\n AFTER_SORT: 'after_sort';\n /**\n * 点击固定列图标 冻结或者解冻事件\n */\n FREEZE_CLICK: 'freeze_click';\n /**\n * 滚动表格事件\n */\n SCROLL: 'scroll';\n CAN_SCROLL: 'can_scroll';\n /**\n * 横向滚动条滚动到结束位\n */\n SCROLL_HORIZONTAL_END: 'scroll_horizontal_end';\n /**\n * 竖向滚动条滚动到结束位\n */\n SCROLL_VERTICAL_END: 'scroll_vertical_end';\n /**\n * 点击下拉菜单图标事件\n */\n DROPDOWN_MENU_CLICK: 'dropdown_menu_click';\n /**\n * 鼠标经过迷你图标记事件\n */\n MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol';\n\n /**\n * 拖拽框选单元格鼠标松开事件\n */\n DRAG_SELECT_END: 'drag_select_end';\n /**\n * 拖拽框选单元格鼠标移动事件\n */\n SELECTED_CHANGED: 'selected_changed';\n /** 复制完成 */\n COPY_DATA: 'copy_data';\n /**\n * 点击下拉菜单按钮\n */\n DROPDOWN_ICON_CLICK: 'dropdown_icon_click';\n /**\n * 清空下拉菜单事件(菜单显示时点击其他区域)\n */\n DROPDOWN_MENU_CLEAR: 'dropdown_menu_clear';\n\n /**\n * 树形结构展开收起的点击事件\n */\n TREE_HIERARCHY_STATE_CHANGE: 'tree_hierarchy_state_change';\n\n SHOW_MENU: 'show_menu';\n HIDE_MENU: 'hide_menu';\n /**\n * icon图标点击事件\n */\n ICON_CLICK: 'icon_click';\n\n // legend component\n LEGEND_ITEM_CLICK: 'legend_item_click';\n LEGEND_ITEM_HOVER: 'legend_item_hover';\n LEGEND_ITEM_UNHOVER: 'legend_item_unHover';\n LEGEND_CHANGE: 'legend_change';\n\n MOUSEENTER_AXIS: 'mouseenter_axis';\n MOUSELEAVE_AXIS: 'mouseleave_axis';\n\n CHECKBOX_STATE_CHANGE: 'checkbox_state_change';\n RADIO_STATE_CHANGE: 'radio_state_change';\n SWITCH_STATE_CHANGE: 'switch_state_change';\n //#region lifecircle\n /** 表格实例初始化前触发 */\n BEFORE_INIT: 'before_init';\n /** 更新表格选项前触发 */\n BEFORE_UPDATE_OPTION: 'before_update_option';\n /** 设置表格大小前触发 */\n BEFORE_SET_SIZE: 'before_set_size';\n /** 每次渲染完成触发 */\n AFTER_RENDER: 'after_render';\n /** 表格实例初始化完成 */\n INITIALIZED: 'initialized';\n /** 表格更新完成 */\n UPDATED: 'updated';\n /** 单元格内容宽度更新后触发 */\n AFTER_UPDATE_CELL_CONTENT_WIDTH: 'after_update_cell_content_width';\n\n /** 选择边框高度更新后触发 */\n AFTER_UPDATE_SELECT_BORDER_HEIGHT: 'after_update_select_border_height';\n //#endregion\n\n /** 编辑单元格 */\n CHANGE_CELL_VALUE: 'change_cell_value';\n /** 批量编辑单元格 */\n CHANGE_CELL_VALUES: 'change_cell_values';\n\n /**\n * 鼠标按下填充柄事件\n */\n MOUSEDOWN_FILL_HANDLE: 'mousedown_fill_handle';\n /**\n * 拖拽填充柄结束事件\n */\n DRAG_FILL_HANDLE_END: 'drag_fill_handle_end';\n /**\n * 双击填充柄事件\n */\n DBLCLICK_FILL_HANDLE: 'dblclick_fill_handle';\n\n /**\n * 空数据提示点击事件\n */\n EMPTY_TIP_CLICK: 'empty_tip_click';\n /**\n * 空数据提示双击事件\n */\n EMPTY_TIP_DBLCLICK: 'empty_tip_dblclick';\n\n /**\n * 按钮点击事件\n */\n BUTTON_CLICK: 'button_click';\n /**\n * 缓存图表事件\n */\n BEFORE_CACHE_CHART_IMAGE: 'before_cache_chart_image';\n /**\n * 粘贴数据事件\n */\n PASTED_DATA: 'pasted_data';\n PLUGIN_EVENT: 'plugin_event';\n\n /**\n * 添加数据记录事件\n */\n ADD_RECORD: 'add_record';\n /**\n * 删除数据记录事件\n */\n DELETE_RECORD: 'delete_record';\n /**\n * 更新数据记录事件\n */\n UPDATE_RECORD: 'update_record';\n /**\n * 添加列事件\n */\n ADD_COLUMN: 'add_column';\n /**\n * 删除列事件\n */\n DELETE_COLUMN: 'delete_column';\n /**\n * 筛选菜单显示事件\n */\n FILTER_MENU_SHOW: 'filter_menu_show';\n /**\n * 筛选菜单隐藏事件\n */\n FILTER_MENU_HIDE: 'filter_menu_hide';\n}\n/**\n * Table event types\n */\nexport const TABLE_EVENT_TYPE: TableEvents = {\n CLICK_CELL: 'click_cell',\n DBLCLICK_CELL: 'dblclick_cell',\n MOUSEDOWN_CELL: 'mousedown_cell',\n MOUSEUP_CELL: 'mouseup_cell',\n SELECTED_CELL: 'selected_cell',\n SELECTED_CLEAR: 'selected_clear',\n BEFORE_KEYDOWN: 'before_keydown',\n KEYDOWN: 'keydown',\n MOUSEENTER_TABLE: 'mouseenter_table',\n MOUSELEAVE_TABLE: 'mouseleave_table',\n MOUSEDOWN_TABLE: 'mousedown_table',\n MOUSEMOVE_TABLE: 'mousemove_table',\n MOUSEMOVE_CELL: 'mousemove_cell',\n MOUSEENTER_CELL: 'mouseenter_cell',\n MOUSELEAVE_CELL: 'mouseleave_cell',\n CONTEXTMENU_CELL: 'contextmenu_cell',\n CONTEXTMENU_CANVAS: 'contextmenu_canvas',\n RESIZE_COLUMN: 'resize_column',\n RESIZE_COLUMN_END: 'resize_column_end',\n RESIZE_ROW: 'resize_row',\n RESIZE_ROW_END: 'resize_row_end',\n CHANGE_HEADER_POSITION_START: 'change_header_position_start',\n CHANGE_HEADER_POSITION: 'change_header_position',\n CHANGING_HEADER_POSITION: 'changing_header_position',\n CHANGE_HEADER_POSITION_FAIL: 'change_header_position_fail',\n SORT_CLICK: 'sort_click',\n /**\n * 执行完排序\n */\n AFTER_SORT: 'after_sort',\n FREEZE_CLICK: 'freeze_click',\n SCROLL: 'scroll',\n CAN_SCROLL: 'can_scroll',\n SCROLL_HORIZONTAL_END: 'scroll_horizontal_end',\n SCROLL_VERTICAL_END: 'scroll_vertical_end',\n DROPDOWN_MENU_CLICK: 'dropdown_menu_click',\n MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol',\n DRAG_SELECT_END: 'drag_select_end',\n SELECTED_CHANGED: 'selected_changed',\n COPY_DATA: 'copy_data',\n DROPDOWN_ICON_CLICK: 'dropdown_icon_click', // 点击下拉菜单按钮\n DROPDOWN_MENU_CLEAR: 'dropdown_menu_clear', // 清空下拉菜单事件(菜单显示时点击其他区域)\n\n TREE_HIERARCHY_STATE_CHANGE: 'tree_hierarchy_state_change', //树形结构展开收起的点击事件\n\n SHOW_MENU: 'show_menu',\n HIDE_MENU: 'hide_menu',\n\n ICON_CLICK: 'icon_click',\n\n LEGEND_ITEM_CLICK: 'legend_item_click',\n LEGEND_ITEM_HOVER: 'legend_item_hover',\n LEGEND_ITEM_UNHOVER: 'legend_item_unHover',\n LEGEND_CHANGE: 'legend_change',\n\n MOUSEENTER_AXIS: 'mouseenter_axis',\n MOUSELEAVE_AXIS: 'mouseleave_axis',\n\n CHECKBOX_STATE_CHANGE: 'checkbox_state_change',\n RADIO_STATE_CHANGE: 'radio_state_change',\n SWITCH_STATE_CHANGE: 'switch_state_change',\n BEFORE_SET_SIZE: 'before_set_size',\n BEFORE_INIT: 'before_init',\n BEFORE_UPDATE_OPTION: 'before_update_option',\n AFTER_RENDER: 'after_render',\n INITIALIZED: 'initialized',\n UPDATED: 'updated',\n AFTER_UPDATE_CELL_CONTENT_WIDTH: 'after_update_cell_content_width',\n AFTER_UPDATE_SELECT_BORDER_HEIGHT: 'after_update_select_border_height',\n CHANGE_CELL_VALUE: 'change_cell_value',\n CHANGE_CELL_VALUES: 'change_cell_values',\n DRAG_FILL_HANDLE_END: 'drag_fill_handle_end',\n MOUSEDOWN_FILL_HANDLE: 'mousedown_fill_handle',\n DBLCLICK_FILL_HANDLE: 'dblclick_fill_handle',\n\n EMPTY_TIP_CLICK: 'empty_tip_click',\n EMPTY_TIP_DBLCLICK: 'empty_tip_dblclick',\n\n BUTTON_CLICK: 'button_click',\n BEFORE_CACHE_CHART_IMAGE: 'before_cache_chart_image',\n PASTED_DATA: 'pasted_data',\n PLUGIN_EVENT: 'plugin_event',\n\n ADD_RECORD: 'add_record',\n DELETE_RECORD: 'delete_record',\n UPDATE_RECORD: 'update_record',\n ADD_COLUMN: 'add_column',\n DELETE_COLUMN: 'delete_column',\n\n FILTER_MENU_SHOW: 'filter_menu_show',\n FILTER_MENU_HIDE: 'filter_menu_hide'\n} as TableEvents;\n"]}
@@ -0,0 +1 @@
1
+ export { listTableChangeCellValue, listTableChangeCellValues, listTableChangeCellValuesByRanges, listTableDeleteRecords } from './record-helper';
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.listTableDeleteRecords = exports.listTableChangeCellValuesByRanges = exports.listTableChangeCellValues = exports.listTableChangeCellValue = void 0;
6
+
7
+ var record_helper_1 = require("./record-helper");
8
+
9
+ Object.defineProperty(exports, "listTableChangeCellValue", {
10
+ enumerable: !0,
11
+ get: function() {
12
+ return record_helper_1.listTableChangeCellValue;
13
+ }
14
+ }), Object.defineProperty(exports, "listTableChangeCellValues", {
15
+ enumerable: !0,
16
+ get: function() {
17
+ return record_helper_1.listTableChangeCellValues;
18
+ }
19
+ }), Object.defineProperty(exports, "listTableChangeCellValuesByRanges", {
20
+ enumerable: !0,
21
+ get: function() {
22
+ return record_helper_1.listTableChangeCellValuesByRanges;
23
+ }
24
+ }), Object.defineProperty(exports, "listTableDeleteRecords", {
25
+ enumerable: !0,
26
+ get: function() {
27
+ return record_helper_1.listTableDeleteRecords;
28
+ }
29
+ });
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/index.ts"],"names":[],"mappings":";;;AAAA,iDAKyB;AAJvB,yHAAA,wBAAwB,OAAA;AACxB,0HAAA,yBAAyB,OAAA;AACzB,kIAAA,iCAAiC,OAAA;AACjC,uHAAA,sBAAsB,OAAA","file":"index.js","sourcesContent":["export {\n listTableChangeCellValue,\n listTableChangeCellValues,\n listTableChangeCellValuesByRanges,\n listTableDeleteRecords\n} from './record-helper';\n"]}
@@ -1,6 +1,8 @@
1
1
  import type { ListTable } from '../ListTable';
2
- export declare function listTableChangeCellValue(col: number, row: number, value: string | number | null, workOnEditableCell: boolean, triggerEvent: boolean, table: ListTable): void;
3
- export declare function listTableChangeCellValues(startCol: number, startRow: number, values: (string | number)[][], workOnEditableCell: boolean, triggerEvent: boolean, table: ListTable): Promise<boolean[][]>;
2
+ import type { CellRange } from '../ts-types';
3
+ export declare function listTableChangeCellValue(col: number, row: number, value: string | number | null, workOnEditableCell: boolean, triggerEvent: boolean, table: ListTable, noTriggerChangeCellValuesEvent?: boolean): void;
4
+ export declare function listTableChangeCellValues(startCol: number, startRow: number, values: (string | number)[][], workOnEditableCell: boolean, triggerEvent: boolean, table: ListTable, noTriggerChangeCellValuesEvent?: boolean): Promise<boolean[][]>;
5
+ export declare function listTableChangeCellValuesByRanges(ranges: CellRange[], value: string | number | null, workOnEditableCell: boolean, triggerEvent: boolean, table: ListTable, noTriggerChangeCellValuesEvent?: boolean): Promise<void>;
4
6
  export declare function sortRecords(table: ListTable): void;
5
7
  export declare function listTableAddRecord(record: any, recordIndex: number | number[], table: ListTable): boolean;
6
8
  export declare function listTableAddRecords(records: any[], recordIndex: number | number[], table: ListTable): boolean;
@@ -28,14 +28,14 @@ var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, gener
28
28
 
29
29
  Object.defineProperty(exports, "__esModule", {
30
30
  value: !0
31
- }), exports.listTableUpdateRecords = exports.listTableDeleteRecords = exports.listTableAddRecords = exports.listTableAddRecord = exports.sortRecords = exports.listTableChangeCellValues = exports.listTableChangeCellValue = void 0;
31
+ }), exports.listTableUpdateRecords = exports.listTableDeleteRecords = exports.listTableAddRecords = exports.listTableAddRecord = exports.sortRecords = exports.listTableChangeCellValuesByRanges = exports.listTableChangeCellValues = exports.listTableChangeCellValue = void 0;
32
32
 
33
33
  const compute_col_width_1 = require("../scenegraph/layout/compute-col-width"), compute_row_height_1 = require("../scenegraph/layout/compute-row-height"), helper_1 = require("../tools/helper"), util_1 = require("../tools/util"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), vutils_1 = require("@visactor/vutils");
34
34
 
35
- function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table) {
35
+ function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table, noTriggerChangeCellValuesEvent) {
36
36
  if (workOnEditableCell && table.isHasEditorDefine(col, row) || !1 === workOnEditableCell) {
37
- const recordIndex = table.getRecordShowIndexByCell(col, row), {field: field} = table.internalProps.layoutMap.getBody(col, row), beforeChangeValue = table.getCellRawValue(col, row), oldValue = table.getCellOriginValue(col, row);
38
- table.isHeader(col, row) ? table.internalProps.layoutMap.updateColumnTitle(col, row, value) : table.dataSource.changeFieldValue(value, recordIndex, field, col, row, table);
37
+ const recordShowIndex = table.getRecordShowIndexByCell(col, row), recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0, {field: field} = table.internalProps.layoutMap.getBody(col, row), beforeChangeValue = table.getCellRawValue(col, row), oldValue = table.getCellOriginValue(col, row);
38
+ table.isHeader(col, row) ? table.internalProps.layoutMap.updateColumnTitle(col, row, value) : table.dataSource.changeFieldValue(value, recordShowIndex, field, col, row, table);
39
39
  const range = table.getCellRange(col, row), aggregators = table.internalProps.layoutMap.getAggregatorsByCell(col, row);
40
40
  if (aggregators) {
41
41
  if (Array.isArray(aggregators)) for (let i = 0; i < (null == aggregators ? void 0 : aggregators.length); i++) aggregators[i].recalculate(); else aggregators.recalculate();
@@ -55,17 +55,26 @@ function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEv
55
55
  table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
56
56
  }
57
57
  const changedValue = table.getCellOriginValue(col, row);
58
- oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
59
- col: col,
60
- row: row,
61
- rawValue: beforeChangeValue,
62
- currentValue: oldValue,
63
- changedValue: changedValue
64
- }), table.scenegraph.updateNextFrame();
58
+ if (oldValue !== changedValue && triggerEvent) {
59
+ const changeValue = {
60
+ col: col,
61
+ row: row,
62
+ recordIndex: recordIndex,
63
+ field: field,
64
+ rawValue: beforeChangeValue,
65
+ currentValue: oldValue,
66
+ changedValue: changedValue
67
+ };
68
+ table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue),
69
+ noTriggerChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
70
+ values: [ changeValue ]
71
+ });
72
+ }
73
+ table.scenegraph.updateNextFrame();
65
74
  }
66
75
  }
67
76
 
68
- function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table) {
77
+ function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table, noTriggerChangeCellValuesEvent) {
69
78
  var _a, _b;
70
79
  return __awaiter(this, void 0, void 0, (function*() {
71
80
  const changedCellResults = [];
@@ -83,6 +92,7 @@ function listTableChangeCellValues(startCol, startRow, values, workOnEditableCel
83
92
  oldRowValues.push(oldValue);
84
93
  }
85
94
  }
95
+ const resultChangeValues = [];
86
96
  for (let i = 0; i < values.length && !(startRow + i > table.rowCount - 1); i++) {
87
97
  changedCellResults[i] = [], pasteRowEnd = startRow + i;
88
98
  const rowValues = values[i];
@@ -102,20 +112,29 @@ function listTableChangeCellValues(startCol, startRow, values, workOnEditableCel
102
112
  }
103
113
  if (isCanChange) {
104
114
  changedCellResults[i][j] = !0;
105
- const value = rowValues[j], recordIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i), {field: field} = table.internalProps.layoutMap.getBody(startCol + j, startRow + i), beforeChangeValue = beforeChangeValues[i][j], oldValue = oldValues[i][j];
106
- table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value, recordIndex, field, startCol + j, startRow + i, table);
115
+ const value = rowValues[j], recordShowIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i), recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0, {field: field} = table.internalProps.layoutMap.getBody(startCol + j, startRow + i), beforeChangeValue = beforeChangeValues[i][j], oldValue = oldValues[i][j];
116
+ table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value, recordShowIndex, field, startCol + j, startRow + i, table);
107
117
  const changedValue = table.getCellOriginValue(startCol + j, startRow + i);
108
- oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
109
- col: startCol + j,
110
- row: startRow + i,
111
- rawValue: beforeChangeValue,
112
- currentValue: oldValue,
113
- changedValue: changedValue
114
- });
118
+ if (oldValue !== changedValue && triggerEvent) {
119
+ const changeValue = {
120
+ col: startCol + j,
121
+ row: startRow + i,
122
+ recordIndex: recordIndex,
123
+ field: field,
124
+ rawValue: beforeChangeValue,
125
+ currentValue: oldValue,
126
+ changedValue: changedValue
127
+ };
128
+ table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue),
129
+ resultChangeValues.push(changeValue);
130
+ }
115
131
  } else changedCellResults[i][j] = !1;
116
132
  }
117
133
  pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);
118
134
  }
135
+ noTriggerChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
136
+ values: resultChangeValues
137
+ });
119
138
  const startRange = table.getCellRange(startCol, startRow), range = table.getCellRange(pasteColEnd, pasteRowEnd), aggregators = table.internalProps.layoutMap.getAggregatorsByCellRange(startRange.start.col, startRange.start.row, range.end.col, range.end.row);
120
139
  if (aggregators) {
121
140
  for (let i = 0; i < (null == aggregators ? void 0 : aggregators.length); i++) aggregators[i].recalculate();
@@ -148,6 +167,44 @@ function listTableChangeCellValues(startCol, startRow, values, workOnEditableCel
148
167
  }));
149
168
  }
150
169
 
170
+ function listTableChangeCellValuesByRanges(ranges, value, workOnEditableCell, triggerEvent, table, noTriggerChangeCellValuesEvent) {
171
+ var _a, _b;
172
+ return __awaiter(this, void 0, void 0, (function*() {
173
+ const resultChangeValues = [], processed = new Set, nextValue = null != value ? value : "";
174
+ for (let i = 0; i < (null !== (_a = null == ranges ? void 0 : ranges.length) && void 0 !== _a ? _a : 0); i++) {
175
+ const range = ranges[i], startCol = Math.min(range.start.col, range.end.col), endCol = Math.max(range.start.col, range.end.col), startRow = Math.min(range.start.row, range.end.row), endRow = Math.max(range.start.row, range.end.row);
176
+ if (startCol > endCol || startRow > endRow) continue;
177
+ const values = [], oldValues = [];
178
+ for (let row = startRow; row <= endRow; row++) {
179
+ const rowValues = [], rowOldValues = [];
180
+ for (let col = startCol; col <= endCol; col++) rowValues.push(nextValue), rowOldValues.push(table.getCellOriginValue(col, row));
181
+ values.push(rowValues), oldValues.push(rowOldValues);
182
+ }
183
+ const changedCellResults = yield listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table, !0);
184
+ for (let r = 0; r < values.length; r++) for (let c = 0; c < values[r].length; c++) {
185
+ const col = startCol + c, row = startRow + r, key = `${col},${row}`;
186
+ if (processed.has(key)) continue;
187
+ if (processed.add(key), !triggerEvent || !(null === (_b = null == changedCellResults ? void 0 : changedCellResults[r]) || void 0 === _b ? void 0 : _b[c])) continue;
188
+ const oldValue = oldValues[r][c], changedValue = table.getCellOriginValue(col, row);
189
+ if (oldValue === changedValue) continue;
190
+ const recordShowIndex = table.getRecordShowIndexByCell(col, row), recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0, {field: field} = table.internalProps.layoutMap.getBody(col, row);
191
+ resultChangeValues.push({
192
+ col: col,
193
+ row: row,
194
+ recordIndex: recordIndex,
195
+ field: field,
196
+ rawValue: oldValue,
197
+ currentValue: oldValue,
198
+ changedValue: changedValue
199
+ });
200
+ }
201
+ }
202
+ !noTriggerChangeCellValuesEvent && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
203
+ values: resultChangeValues
204
+ });
205
+ }));
206
+ }
207
+
151
208
  function getCellUpdateType(col, row, table, oldCellUpdateType) {
152
209
  if ("group" === oldCellUpdateType) return oldCellUpdateType;
153
210
  if ("sort" === oldCellUpdateType && !table.internalProps.groupBy) return oldCellUpdateType;
@@ -169,7 +226,7 @@ function sortRecords(table) {
169
226
  }
170
227
 
171
228
  function listTableAddRecord(record, recordIndex, table) {
172
- var _a, _b, _c, _d;
229
+ var _a, _b, _c, _d, _e, _f;
173
230
  try {
174
231
  if (!record) return !1;
175
232
  if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, [ record ], recordIndex),
@@ -177,12 +234,16 @@ function listTableAddRecord(record, recordIndex, table) {
177
234
  table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, [ record ], recordIndex),
178
235
  adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1), table.refreshRowColCount(),
179
236
  table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table),
180
- table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else if (table.sortState) table.dataSource.addRecordForSorted(record),
181
- table.stateManager.checkedState.clear(), sortRecords(table), table.refreshRowColCount(),
182
- table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else {
237
+ table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else if (table.sortState) {
238
+ !!(null === (_e = table.options) || void 0 === _e ? void 0 : _e.syncRecordOperationsToSourceRecords) ? table.dataSource.addRecord(record, table.dataSource.records.length, !0) : table.dataSource.addRecordForSorted(record),
239
+ table.stateManager.checkedState.clear(), sortRecords(table), table.refreshRowColCount(),
240
+ table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
241
+ } else {
183
242
  (void 0 === recordIndex || recordIndex > table.dataSource.sourceLength) && (recordIndex = table.dataSource.sourceLength);
184
- const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
185
- table.dataSource.addRecord(record, recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1);
243
+ const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount, syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords);
244
+ if (table.dataSource.addRecord(record, recordIndex, syncToOriginalRecords), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1),
245
+ syncToOriginalRecords) return table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(),
246
+ table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(), !0;
186
247
  const oldRowCount = table.rowCount;
187
248
  if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(),
188
249
  table.scenegraph.createSceneGraph(), !0;
@@ -248,7 +309,7 @@ function listTableAddRecord(record, recordIndex, table) {
248
309
  }
249
310
 
250
311
  function listTableAddRecords(records, recordIndex, table) {
251
- var _a, _b, _c, _d;
312
+ var _a, _b, _c, _d, _e, _f;
252
313
  try {
253
314
  if (!records || 0 === records.length) return !1;
254
315
  if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndex),
@@ -256,11 +317,15 @@ function listTableAddRecords(records, recordIndex, table) {
256
317
  table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, records, recordIndex),
257
318
  adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length), table.refreshRowColCount(),
258
319
  table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table),
259
- table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else if (table.sortState) table.dataSource.addRecordsForSorted(records),
260
- sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else {
320
+ table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else if (table.sortState) {
321
+ !!(null === (_e = table.options) || void 0 === _e ? void 0 : _e.syncRecordOperationsToSourceRecords) ? table.dataSource.addRecords(records, table.dataSource.records.length, !0) : table.dataSource.addRecordsForSorted(records),
322
+ sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
323
+ } else {
261
324
  void 0 === recordIndex || recordIndex > table.dataSource.sourceLength ? recordIndex = table.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
262
- const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
263
- table.dataSource.addRecords(records, recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length);
325
+ const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount, syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords);
326
+ if (table.dataSource.addRecords(records, recordIndex, syncToOriginalRecords), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length),
327
+ syncToOriginalRecords) return table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(),
328
+ table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(), !0;
264
329
  const oldRowCount = table.transpose ? table.colCount : table.rowCount;
265
330
  if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(),
266
331
  table.scenegraph.createSceneGraph(), !0;
@@ -326,7 +391,7 @@ function listTableAddRecords(records, recordIndex, table) {
326
391
  }
327
392
 
328
393
  function listTableDeleteRecords(recordIndexs, table) {
329
- var _a, _b, _c, _d, _e, _f, _g, _h;
394
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
330
395
  if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).deleteRecordsForGroup) || void 0 === _b || _b.call(_a, recordIndexs),
331
396
  table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table),
332
397
  table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else if ("tree" === table.dataSource.rowHierarchyType) {
@@ -335,11 +400,15 @@ function listTableDeleteRecords(recordIndexs, table) {
335
400
  for (let index = 0; index < deletedRecordIndexs.length; index++) adjustCheckBoxStateMapWithDeleteRecordIndex(table, deletedRecordIndexs[index], 1);
336
401
  table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table),
337
402
  table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
338
- } else if (table.sortState) table.dataSource.deleteRecordsForSorted(recordIndexs),
339
- sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else {
340
- const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);
403
+ } else if (table.sortState) {
404
+ !!(null === (_e = table.options) || void 0 === _e ? void 0 : _e.syncRecordOperationsToSourceRecords) ? table.dataSource.deleteRecords(recordIndexs, !0) : table.dataSource.deleteRecordsForSorted(recordIndexs),
405
+ sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
406
+ } else {
407
+ const syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords), deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs, syncToOriginalRecords);
341
408
  if (0 === deletedRecordIndexs.length) return;
342
409
  for (let index = 0; index < deletedRecordIndexs.length; index++) adjustCheckBoxStateMapWithDeleteRecordIndex(table, deletedRecordIndexs[index], 1);
410
+ if (syncToOriginalRecords) return table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(),
411
+ table.scenegraph.clearCells(), void table.scenegraph.createSceneGraph();
343
412
  const oldRowCount = table.transpose ? table.colCount : table.rowCount;
344
413
  table.refreshRowColCount();
345
414
  const newRowCount = table.transpose ? table.colCount : table.rowCount, recordIndexsMinToMax = deletedRecordIndexs.sort(((a, b) => a - b)), minRecordIndex = recordIndexsMinToMax[0];
@@ -369,8 +438,8 @@ function listTableDeleteRecords(recordIndexs, table) {
369
438
  col: 0,
370
439
  row: row
371
440
  });
372
- null === (_e = table.reactCustomLayout) || void 0 === _e || _e.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows),
373
- null === (_f = table.reactCustomLayout) || void 0 === _f || _f.updateAllCustomCell();
441
+ null === (_g = table.reactCustomLayout) || void 0 === _g || _g.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows),
442
+ null === (_h = table.reactCustomLayout) || void 0 === _h || _h.updateAllCustomCell();
374
443
  }
375
444
  } else {
376
445
  const delRows = [], headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount, topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount, bottomAggregationCount = table.internalProps.layoutMap.hasAggregationOnBottomCount;
@@ -399,22 +468,26 @@ function listTableDeleteRecords(recordIndexs, table) {
399
468
  col: 0,
400
469
  row: row
401
470
  });
402
- null === (_g = table.reactCustomLayout) || void 0 === _g || _g.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows),
403
- null === (_h = table.reactCustomLayout) || void 0 === _h || _h.updateAllCustomCell();
471
+ null === (_j = table.reactCustomLayout) || void 0 === _j || _j.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows),
472
+ null === (_k = table.reactCustomLayout) || void 0 === _k || _k.updateAllCustomCell();
404
473
  }
405
474
  }
406
475
  }
407
476
 
408
477
  function listTableUpdateRecords(records, recordIndexs, table) {
409
- var _a, _b, _c, _d;
478
+ var _a, _b, _c, _d, _e, _f;
410
479
  if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).updateRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndexs),
411
480
  table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table),
412
481
  table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).updateRecordsForTree) || void 0 === _d || _d.call(_c, records, recordIndexs),
413
482
  table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table),
414
- table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else if (table.sortState) table.dataSource.updateRecordsForSorted(records, recordIndexs),
415
- sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else {
416
- const updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs);
483
+ table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else if (table.sortState) {
484
+ !!(null === (_e = table.options) || void 0 === _e ? void 0 : _e.syncRecordOperationsToSourceRecords) ? table.dataSource.updateRecords(records, recordIndexs, !0) : table.dataSource.updateRecordsForSorted(records, recordIndexs),
485
+ sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
486
+ } else {
487
+ const syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords), updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs, syncToOriginalRecords);
417
488
  if (0 === updateRecordIndexs.length) return;
489
+ if (syncToOriginalRecords) return table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(),
490
+ table.scenegraph.clearCells(), void table.scenegraph.createSceneGraph();
418
491
  const recordIndexsMinToMax = updateRecordIndexs.map((index => table.getBodyRowIndexByRecordIndex(index))).sort(((a, b) => a - b));
419
492
  if (table.pagination) {
420
493
  const {perPageCount: perPageCount, currentPage: currentPage} = table.pagination, headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount, topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount, endIndex = perPageCount * (currentPage || 0) + perPageCount, updateRows = [];
@@ -583,6 +656,6 @@ function adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, count) {
583
656
 
584
657
  //# sourceMappingURL=record-helper.js.map
585
658
  exports.listTableChangeCellValue = listTableChangeCellValue, exports.listTableChangeCellValues = listTableChangeCellValues,
586
- exports.sortRecords = sortRecords, exports.listTableAddRecord = listTableAddRecord,
587
- exports.listTableAddRecords = listTableAddRecords, exports.listTableDeleteRecords = listTableDeleteRecords,
588
- exports.listTableUpdateRecords = listTableUpdateRecords;
659
+ exports.listTableChangeCellValuesByRanges = listTableChangeCellValuesByRanges, exports.sortRecords = sortRecords,
660
+ exports.listTableAddRecord = listTableAddRecord, exports.listTableAddRecords = listTableAddRecords,
661
+ exports.listTableDeleteRecords = listTableDeleteRecords, exports.listTableUpdateRecords = listTableUpdateRecords;