handsontable 0.0.0-next-3d099da-20231208 → 0.0.0-next-16c18c1-20231212

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (313) hide show
  1. package/3rdparty/walkontable/src/calculator/index.js +11 -6
  2. package/3rdparty/walkontable/src/calculator/index.mjs +5 -3
  3. package/3rdparty/walkontable/src/calculator/renderAllColumns.js +50 -0
  4. package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +46 -0
  5. package/3rdparty/walkontable/src/calculator/renderAllRows.js +50 -0
  6. package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +46 -0
  7. package/3rdparty/walkontable/src/calculator/viewportColumns.js +3 -124
  8. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +4 -126
  9. package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
  10. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +4 -5
  11. package/3rdparty/walkontable/src/cell/coords.js +2 -2
  12. package/3rdparty/walkontable/src/cell/coords.mjs +2 -2
  13. package/3rdparty/walkontable/src/cell/range.js +2 -2
  14. package/3rdparty/walkontable/src/cell/range.mjs +2 -2
  15. package/3rdparty/walkontable/src/core/_base.js +2 -14
  16. package/3rdparty/walkontable/src/core/_base.mjs +2 -14
  17. package/3rdparty/walkontable/src/core/clone.js +2 -2
  18. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  19. package/3rdparty/walkontable/src/core/core.js +0 -2
  20. package/3rdparty/walkontable/src/core/core.mjs +0 -2
  21. package/3rdparty/walkontable/src/facade/core.js +0 -9
  22. package/3rdparty/walkontable/src/facade/core.mjs +0 -9
  23. package/3rdparty/walkontable/src/filter/column.js +2 -2
  24. package/3rdparty/walkontable/src/filter/column.mjs +2 -2
  25. package/3rdparty/walkontable/src/filter/row.js +2 -2
  26. package/3rdparty/walkontable/src/filter/row.mjs +2 -2
  27. package/3rdparty/walkontable/src/index.js +3 -4
  28. package/3rdparty/walkontable/src/index.mjs +1 -2
  29. package/3rdparty/walkontable/src/overlay/_base.js +2 -2
  30. package/3rdparty/walkontable/src/overlay/_base.mjs +2 -2
  31. package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
  32. package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
  33. package/3rdparty/walkontable/src/overlay/top.js +2 -2
  34. package/3rdparty/walkontable/src/overlay/top.mjs +2 -2
  35. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +2 -2
  36. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +2 -2
  37. package/3rdparty/walkontable/src/overlays.js +2 -5
  38. package/3rdparty/walkontable/src/overlays.mjs +2 -6
  39. package/3rdparty/walkontable/src/renderer/_base.js +2 -2
  40. package/3rdparty/walkontable/src/renderer/_base.mjs +2 -2
  41. package/3rdparty/walkontable/src/renderer/cells.js +2 -2
  42. package/3rdparty/walkontable/src/renderer/cells.mjs +2 -2
  43. package/3rdparty/walkontable/src/renderer/colGroup.js +10 -0
  44. package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
  45. package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
  46. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +2 -2
  47. package/3rdparty/walkontable/src/renderer/rows.js +6 -5
  48. package/3rdparty/walkontable/src/renderer/rows.mjs +6 -5
  49. package/3rdparty/walkontable/src/renderer/table.js +2 -2
  50. package/3rdparty/walkontable/src/renderer/table.mjs +2 -2
  51. package/3rdparty/walkontable/src/scroll.js +2 -2
  52. package/3rdparty/walkontable/src/scroll.mjs +2 -2
  53. package/3rdparty/walkontable/src/selection/manager.js +0 -1
  54. package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
  55. package/3rdparty/walkontable/src/settings.js +5 -2
  56. package/3rdparty/walkontable/src/settings.mjs +4 -2
  57. package/3rdparty/walkontable/src/table.js +2 -3
  58. package/3rdparty/walkontable/src/table.mjs +2 -3
  59. package/3rdparty/walkontable/src/utils/column.js +29 -14
  60. package/3rdparty/walkontable/src/utils/column.mjs +29 -14
  61. package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
  62. package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
  63. package/3rdparty/walkontable/src/utils/nodesPool.js +2 -2
  64. package/3rdparty/walkontable/src/utils/nodesPool.mjs +2 -2
  65. package/3rdparty/walkontable/src/utils/orderView/view.js +2 -2
  66. package/3rdparty/walkontable/src/utils/orderView/view.mjs +2 -2
  67. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +2 -2
  68. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +2 -2
  69. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +2 -2
  70. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +2 -2
  71. package/3rdparty/walkontable/src/utils/row.js +2 -2
  72. package/3rdparty/walkontable/src/utils/row.mjs +2 -2
  73. package/3rdparty/walkontable/src/viewport.js +22 -17
  74. package/3rdparty/walkontable/src/viewport.mjs +23 -18
  75. package/base.js +4 -2
  76. package/base.mjs +2 -2
  77. package/core/focusCatcher/index.js +44 -6
  78. package/core/focusCatcher/index.mjs +44 -6
  79. package/core.js +0 -11
  80. package/core.mjs +0 -11
  81. package/dataMap/dataMap.js +3 -2
  82. package/dataMap/dataMap.mjs +2 -2
  83. package/dataMap/dataSource.js +2 -2
  84. package/dataMap/dataSource.mjs +2 -2
  85. package/dataMap/metaManager/lazyFactoryMap.js +2 -2
  86. package/dataMap/metaManager/lazyFactoryMap.mjs +2 -2
  87. package/dataMap/metaManager/metaLayers/cellMeta.js +2 -2
  88. package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -2
  89. package/dataMap/metaManager/metaLayers/columnMeta.js +2 -2
  90. package/dataMap/metaManager/metaLayers/columnMeta.mjs +2 -2
  91. package/dataMap/metaManager/metaLayers/globalMeta.js +2 -2
  92. package/dataMap/metaManager/metaLayers/globalMeta.mjs +2 -2
  93. package/dataMap/metaManager/metaLayers/tableMeta.js +2 -2
  94. package/dataMap/metaManager/metaLayers/tableMeta.mjs +2 -2
  95. package/dataMap/metaManager/metaSchema.js +28 -2
  96. package/dataMap/metaManager/metaSchema.mjs +28 -2
  97. package/dataMap/metaManager/mods/dynamicCellMeta.js +2 -2
  98. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +2 -2
  99. package/dataMap/metaManager/mods/extendMetaProperties.js +14 -2
  100. package/dataMap/metaManager/mods/extendMetaProperties.mjs +14 -2
  101. package/dist/handsontable.css +2 -2
  102. package/dist/handsontable.full.css +3 -3
  103. package/dist/handsontable.full.js +3991 -5589
  104. package/dist/handsontable.full.min.css +3 -3
  105. package/dist/handsontable.full.min.js +66 -71
  106. package/dist/handsontable.js +3070 -4317
  107. package/dist/handsontable.min.css +2 -2
  108. package/dist/handsontable.min.js +35 -39
  109. package/editorManager.js +5 -6
  110. package/editorManager.mjs +5 -6
  111. package/editors/autocompleteEditor/autocompleteEditor.js +2 -4
  112. package/editors/autocompleteEditor/autocompleteEditor.mjs +2 -4
  113. package/editors/baseEditor/baseEditor.js +2 -2
  114. package/editors/baseEditor/baseEditor.mjs +2 -2
  115. package/editors/dateEditor/dateEditor.d.ts +1 -1
  116. package/editors/dateEditor/dateEditor.js +6 -3
  117. package/editors/dateEditor/dateEditor.mjs +6 -3
  118. package/editors/handsontableEditor/handsontableEditor.js +0 -1
  119. package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
  120. package/editors/textEditor/textEditor.js +2 -6
  121. package/editors/textEditor/textEditor.mjs +2 -6
  122. package/eventManager.js +2 -2
  123. package/eventManager.mjs +2 -2
  124. package/helpers/browser.js +5 -2
  125. package/helpers/browser.mjs +5 -2
  126. package/helpers/feature.js +10 -0
  127. package/helpers/feature.mjs +9 -0
  128. package/helpers/mixed.js +1 -1
  129. package/helpers/mixed.mjs +1 -1
  130. package/package.json +3 -4
  131. package/pluginHooks.d.ts +6 -29
  132. package/pluginHooks.js +67 -125
  133. package/pluginHooks.mjs +64 -124
  134. package/plugins/autoColumnSize/autoColumnSize.js +2 -2
  135. package/plugins/autoColumnSize/autoColumnSize.mjs +2 -2
  136. package/plugins/autoRowSize/autoRowSize.js +2 -2
  137. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  138. package/plugins/autofill/autofill.js +2 -2
  139. package/plugins/autofill/autofill.mjs +2 -2
  140. package/plugins/base/base.js +2 -2
  141. package/plugins/base/base.mjs +2 -2
  142. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +2 -2
  143. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +2 -2
  144. package/plugins/collapsibleColumns/collapsibleColumns.js +2 -2
  145. package/plugins/collapsibleColumns/collapsibleColumns.mjs +2 -2
  146. package/plugins/columnSorting/columnSorting.js +2 -2
  147. package/plugins/columnSorting/columnSorting.mjs +2 -2
  148. package/plugins/columnSorting/columnStatesManager.js +2 -2
  149. package/plugins/columnSorting/columnStatesManager.mjs +2 -2
  150. package/plugins/columnSummary/columnSummary.js +2 -2
  151. package/plugins/columnSummary/columnSummary.mjs +2 -2
  152. package/plugins/columnSummary/endpoints.js +2 -2
  153. package/plugins/columnSummary/endpoints.mjs +2 -2
  154. package/plugins/comments/commentEditor.js +2 -2
  155. package/plugins/comments/commentEditor.mjs +2 -2
  156. package/plugins/comments/comments.js +2 -2
  157. package/plugins/comments/comments.mjs +2 -2
  158. package/plugins/comments/displaySwitch.js +2 -2
  159. package/plugins/comments/displaySwitch.mjs +2 -2
  160. package/plugins/contextMenu/commandExecutor.js +2 -2
  161. package/plugins/contextMenu/commandExecutor.mjs +2 -2
  162. package/plugins/contextMenu/contextMenu.js +2 -2
  163. package/plugins/contextMenu/contextMenu.mjs +2 -2
  164. package/plugins/contextMenu/itemsFactory.js +2 -2
  165. package/plugins/contextMenu/itemsFactory.mjs +2 -2
  166. package/plugins/contextMenu/menu/cursor.js +2 -2
  167. package/plugins/contextMenu/menu/cursor.mjs +2 -2
  168. package/plugins/contextMenu/menu/menu.js +2 -2
  169. package/plugins/contextMenu/menu/menu.mjs +2 -2
  170. package/plugins/copyPaste/clipboardData.js +18 -0
  171. package/plugins/copyPaste/clipboardData.mjs +14 -0
  172. package/plugins/copyPaste/copyPaste.js +131 -53
  173. package/plugins/copyPaste/copyPaste.mjs +134 -56
  174. package/plugins/copyPaste/copyableRanges.js +43 -7
  175. package/plugins/copyPaste/copyableRanges.mjs +42 -7
  176. package/plugins/copyPaste/pasteEvent.mjs +1 -1
  177. package/plugins/customBorders/customBorders.js +2 -7
  178. package/plugins/customBorders/customBorders.mjs +2 -7
  179. package/plugins/customBorders/utils.js +0 -1
  180. package/plugins/customBorders/utils.mjs +0 -1
  181. package/plugins/dragToScroll/dragToScroll.js +2 -2
  182. package/plugins/dragToScroll/dragToScroll.mjs +2 -2
  183. package/plugins/dropdownMenu/dropdownMenu.js +2 -2
  184. package/plugins/dropdownMenu/dropdownMenu.mjs +2 -2
  185. package/plugins/exportFile/dataProvider.js +2 -2
  186. package/plugins/exportFile/dataProvider.mjs +2 -2
  187. package/plugins/exportFile/types/_base.js +2 -2
  188. package/plugins/exportFile/types/_base.mjs +2 -2
  189. package/plugins/filters/component/_base.js +2 -2
  190. package/plugins/filters/component/_base.mjs +2 -2
  191. package/plugins/filters/component/actionBar.js +2 -2
  192. package/plugins/filters/component/actionBar.mjs +2 -2
  193. package/plugins/filters/component/condition.js +2 -2
  194. package/plugins/filters/component/condition.mjs +2 -2
  195. package/plugins/filters/component/operators.js +2 -2
  196. package/plugins/filters/component/operators.mjs +2 -2
  197. package/plugins/filters/component/value.js +2 -2
  198. package/plugins/filters/component/value.mjs +2 -2
  199. package/plugins/filters/conditionCollection.js +2 -2
  200. package/plugins/filters/conditionCollection.mjs +2 -2
  201. package/plugins/filters/conditionUpdateObserver.js +2 -2
  202. package/plugins/filters/conditionUpdateObserver.mjs +2 -2
  203. package/plugins/filters/dataFilter.js +2 -2
  204. package/plugins/filters/dataFilter.mjs +2 -2
  205. package/plugins/filters/filters.js +2 -2
  206. package/plugins/filters/filters.mjs +2 -2
  207. package/plugins/filters/ui/_base.js +2 -2
  208. package/plugins/filters/ui/_base.mjs +2 -2
  209. package/plugins/filters/ui/radioInput.js +1 -1
  210. package/plugins/filters/ui/radioInput.mjs +1 -1
  211. package/plugins/formulas/formulas.js +2 -4
  212. package/plugins/formulas/formulas.mjs +2 -4
  213. package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
  214. package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
  215. package/plugins/manualColumnMove/ui/_base.js +2 -2
  216. package/plugins/manualColumnMove/ui/_base.mjs +2 -2
  217. package/plugins/manualColumnResize/manualColumnResize.js +0 -1
  218. package/plugins/manualColumnResize/manualColumnResize.mjs +0 -1
  219. package/plugins/manualRowMove/ui/_base.js +2 -2
  220. package/plugins/manualRowMove/ui/_base.mjs +2 -2
  221. package/plugins/mergeCells/calculations/autofill.js +2 -2
  222. package/plugins/mergeCells/calculations/autofill.mjs +2 -2
  223. package/plugins/mergeCells/calculations/selection.js +2 -2
  224. package/plugins/mergeCells/calculations/selection.mjs +2 -2
  225. package/plugins/mergeCells/cellCoords.js +2 -2
  226. package/plugins/mergeCells/cellCoords.mjs +2 -2
  227. package/plugins/mergeCells/cellsCollection.js +2 -2
  228. package/plugins/mergeCells/cellsCollection.mjs +2 -2
  229. package/plugins/mergeCells/mergeCells.js +3 -129
  230. package/plugins/mergeCells/mergeCells.mjs +3 -129
  231. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -2
  232. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -2
  233. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +2 -2
  234. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +2 -2
  235. package/plugins/nestedHeaders/nestedHeaders.js +43 -89
  236. package/plugins/nestedHeaders/nestedHeaders.mjs +44 -90
  237. package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
  238. package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
  239. package/plugins/nestedHeaders/utils/ghostTable.js +2 -2
  240. package/plugins/nestedHeaders/utils/ghostTable.mjs +2 -2
  241. package/plugins/nestedRows/data/dataManager.js +2 -2
  242. package/plugins/nestedRows/data/dataManager.mjs +2 -2
  243. package/plugins/nestedRows/nestedRows.js +2 -2
  244. package/plugins/nestedRows/nestedRows.mjs +2 -2
  245. package/plugins/nestedRows/ui/_base.js +2 -2
  246. package/plugins/nestedRows/ui/_base.mjs +2 -2
  247. package/plugins/nestedRows/ui/contextMenu.js +2 -2
  248. package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
  249. package/plugins/nestedRows/utils/rowMoveController.js +2 -2
  250. package/plugins/nestedRows/utils/rowMoveController.mjs +2 -2
  251. package/plugins/persistentState/persistentState.js +2 -2
  252. package/plugins/persistentState/persistentState.mjs +2 -2
  253. package/plugins/persistentState/storage.js +2 -2
  254. package/plugins/persistentState/storage.mjs +2 -2
  255. package/plugins/search/search.js +2 -2
  256. package/plugins/search/search.mjs +2 -2
  257. package/plugins/touchScroll/touchScroll.js +2 -2
  258. package/plugins/touchScroll/touchScroll.mjs +2 -2
  259. package/plugins/trimRows/trimRows.js +2 -2
  260. package/plugins/trimRows/trimRows.mjs +2 -2
  261. package/plugins/undoRedo/undoRedo.js +0 -2
  262. package/plugins/undoRedo/undoRedo.mjs +0 -2
  263. package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -1
  264. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +0 -1
  265. package/renderers/checkboxRenderer/checkboxRenderer.js +0 -2
  266. package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -2
  267. package/selection/highlight/highlight.js +2 -3
  268. package/selection/highlight/highlight.mjs +2 -3
  269. package/selection/highlight/visualSelection.js +2 -2
  270. package/selection/highlight/visualSelection.mjs +2 -2
  271. package/selection/index.js +1 -3
  272. package/selection/index.mjs +2 -2
  273. package/selection/range.js +2 -2
  274. package/selection/range.mjs +2 -2
  275. package/selection/selection.js +2 -2
  276. package/selection/selection.mjs +2 -2
  277. package/selection/utils.js +0 -34
  278. package/selection/utils.mjs +0 -33
  279. package/settings.d.ts +2 -1
  280. package/tableView.js +3 -4
  281. package/tableView.mjs +3 -4
  282. package/translations/indexMapper.js +4 -3
  283. package/translations/indexMapper.mjs +2 -2
  284. package/translations/mapCollections/aggregatedCollection.js +2 -2
  285. package/translations/mapCollections/aggregatedCollection.mjs +2 -2
  286. package/translations/mapCollections/mapCollection.js +2 -2
  287. package/translations/mapCollections/mapCollection.mjs +2 -2
  288. package/translations/maps/indexMap.js +2 -2
  289. package/translations/maps/indexMap.mjs +2 -2
  290. package/translations/maps/linkedPhysicalIndexToValueMap.js +2 -2
  291. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +2 -2
  292. package/utils/dataStructures/linkedList.js +2 -2
  293. package/utils/dataStructures/linkedList.mjs +2 -2
  294. package/utils/dataStructures/tree.js +2 -2
  295. package/utils/dataStructures/tree.mjs +2 -2
  296. package/utils/ghostTable.js +2 -2
  297. package/utils/ghostTable.mjs +2 -2
  298. package/utils/interval.js +2 -2
  299. package/utils/interval.mjs +2 -2
  300. package/utils/parseTable.js +84 -538
  301. package/utils/parseTable.mjs +83 -534
  302. package/utils/samplesGenerator.js +2 -2
  303. package/utils/samplesGenerator.mjs +2 -2
  304. package/validators/timeValidator/timeValidator.js +0 -1
  305. package/validators/timeValidator/timeValidator.mjs +0 -1
  306. package/plugins/copyPaste/clipboardData/clipboardData.js +0 -588
  307. package/plugins/copyPaste/clipboardData/clipboardData.mjs +0 -584
  308. package/plugins/copyPaste/clipboardData/copyClipboardData.js +0 -69
  309. package/plugins/copyPaste/clipboardData/copyClipboardData.mjs +0 -65
  310. package/plugins/copyPaste/clipboardData/index.js +0 -9
  311. package/plugins/copyPaste/clipboardData/index.mjs +0 -4
  312. package/plugins/copyPaste/clipboardData/pasteClipboardData.js +0 -81
  313. package/plugins/copyPaste/clipboardData/pasteClipboardData.mjs +0 -77
@@ -12,12 +12,11 @@ var _selection = require("../../selection");
12
12
  var _base = require("../base");
13
13
  var _stateManager2 = _interopRequireDefault(require("./stateManager"));
14
14
  var _ghostTable = _interopRequireDefault(require("./utils/ghostTable"));
15
- var _array = require("../../helpers/array");
16
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
16
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
18
17
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
20
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
19
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
20
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
22
21
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
23
22
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
@@ -102,7 +101,6 @@ class NestedHeaders extends _base.BasePlugin {
102
101
  /**
103
102
  * Updates the plugin state after new dataset load.
104
103
  *
105
- * @private
106
104
  * @param {Array[]} sourceData Array of arrays or array of objects containing data.
107
105
  * @param {boolean} initialLoad Flag that determines whether the data has been loaded
108
106
  * during the initialization.
@@ -110,14 +108,11 @@ class NestedHeaders extends _base.BasePlugin {
110
108
  _classPrivateMethodInitSpec(this, _onAfterLoadData);
111
109
  /**
112
110
  * Updates the plugin state after HoT initialization.
113
- *
114
- * @private
115
111
  */
116
112
  _classPrivateMethodInitSpec(this, _onInit);
117
113
  /**
118
114
  * `modifyFocusedElement` hook callback.
119
115
  *
120
- * @private
121
116
  * @param {number} row Row index.
122
117
  * @param {number} column Column index.
123
118
  * @returns {HTMLTableCellElement} The `TH` element to be focused.
@@ -127,7 +122,6 @@ class NestedHeaders extends _base.BasePlugin {
127
122
  * Listens the `modifyColumnHeaderValue` hook that overwrites the column headers values based on
128
123
  * the internal state and settings of the plugin.
129
124
  *
130
- * @private
131
125
  * @param {string} value The column header value.
132
126
  * @param {number} visualColumnIndex The visual column index.
133
127
  * @param {number} headerLevel The index of header level. The header level accepts positive (0 to N)
@@ -140,7 +134,6 @@ class NestedHeaders extends _base.BasePlugin {
140
134
  /**
141
135
  * `modifyColWidth` hook callback - returns width from cache, when is greater than incoming from hook.
142
136
  *
143
- * @private
144
137
  * @param {number} width Width from hook.
145
138
  * @param {number} column Visual index of an column.
146
139
  * @returns {number}
@@ -149,14 +142,12 @@ class NestedHeaders extends _base.BasePlugin {
149
142
  /**
150
143
  * Make the renderer render the first nested column in its entirety.
151
144
  *
152
- * @private
153
145
  * @param {object} calc Viewport column calculator.
154
146
  */
155
147
  _classPrivateMethodInitSpec(this, _onAfterViewportColumnCalculatorOverride);
156
148
  /**
157
149
  * `afterGetColumnHeader` hook callback - prepares the header structure.
158
150
  *
159
- * @private
160
151
  * @param {Array} renderersArray Array of renderers.
161
152
  */
162
153
  _classPrivateMethodInitSpec(this, _onAfterGetColumnHeaderRenderers);
@@ -164,7 +155,6 @@ class NestedHeaders extends _base.BasePlugin {
164
155
  * The hook observes the column selection from the Selection API and modifies the column range to
165
156
  * ensure that the whole nested column will be covered.
166
157
  *
167
- * @private
168
158
  * @param {CellCoords} from The coords object where the selection starts.
169
159
  * @param {CellCoords} to The coords object where the selection ends.
170
160
  */
@@ -172,27 +162,21 @@ class NestedHeaders extends _base.BasePlugin {
172
162
  /**
173
163
  * `modifyTransformStart` hook is called every time the keyboard navigation is used.
174
164
  *
175
- * @private
176
165
  * @param {object} delta The transformation delta.
177
166
  */
178
167
  _classPrivateMethodInitSpec(this, _onModifyTransformStart);
179
168
  /**
180
169
  * The hook checks and ensures that the focus position that depends on the selected columns
181
170
  * range is always positioned within the range.
182
- *
183
- * @private
184
171
  */
185
172
  _classPrivateMethodInitSpec(this, _onBeforeSelectionHighlightSet);
186
173
  /**
187
174
  * Switches internal flag about selection progress to `false`.
188
- *
189
- * @private
190
175
  */
191
176
  _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseUp);
192
177
  /**
193
178
  * Makes the header-selection properly select the nested headers.
194
179
  *
195
- * @private
196
180
  * @param {MouseEvent} event Mouse event.
197
181
  * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
198
182
  * @param {HTMLElement} TD The cell element.
@@ -203,7 +187,6 @@ class NestedHeaders extends _base.BasePlugin {
203
187
  /**
204
188
  * Allows to control how the column selection based on the coordinates and the nested headers is made.
205
189
  *
206
- * @private
207
190
  * @param {MouseEvent} event Mouse event.
208
191
  * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
209
192
  */
@@ -211,7 +194,6 @@ class NestedHeaders extends _base.BasePlugin {
211
194
  /**
212
195
  * Allows blocking the column selection that is controlled by the core Selection module.
213
196
  *
214
- * @private
215
197
  * @param {MouseEvent} event Mouse event.
216
198
  * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
217
199
  * @param {CellCoords} TD The table cell or header element.
@@ -225,23 +207,16 @@ class NestedHeaders extends _base.BasePlugin {
225
207
  * of the column.
226
208
  *
227
209
  * @private
228
- * @param {object} clipboardData Information about already performed copy action.
229
- * @param {Function} clipboardData.removeRow Remove row from the copied/pasted dataset.
230
- * @param {Function} clipboardData.removeColumn Remove column from the copied/pasted dataset.
231
- * @param {Function} clipboardData.insertAtRow Insert values at row index.
232
- * @param {Function} clipboardData.insertAtColumn Insert values at column index.
233
- * @param {Function} clipboardData.setCellAt Change headers or cells in the copied/pasted dataset.
234
- * @param {Function} clipboardData.getCellAt Get headers or cells from the copied/pasted dataset.
235
- * @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
236
- * @param {Function} clipboardData.getMetaInfo Gets grid settings for copied data.
237
- * @param {Function} clipboardData.setMetaInfo Sets grid settings for copied data.
238
- * @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
210
+ * @param {Array[]} data An array of arrays which contains data to copied.
211
+ * @param {object[]} copyableRanges An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
212
+ * which will copied.
213
+ * @param {{ columnHeadersCount: number }} copiedHeadersCount An object with keys that holds information with
214
+ * the number of copied headers.
239
215
  */
240
216
  _classPrivateMethodInitSpec(this, _onBeforeCopy);
241
217
  /**
242
218
  * Allows to control which header DOM element will be used to highlight.
243
219
  *
244
- * @private
245
220
  * @param {number} visualColumn A visual column index of the highlighted row header.
246
221
  * @param {number} headerLevel A row header level that is currently highlighted.
247
222
  * @param {object} highlightMeta An object with meta data that describes the highlight state.
@@ -253,7 +228,6 @@ class NestedHeaders extends _base.BasePlugin {
253
228
  * is scrolled to the correct column for the nested header the most left and the most right visual column
254
229
  * indexes are used.
255
230
  *
256
- * @private
257
231
  * @param {number} visualColumn A visual column index to which the viewport will be scrolled.
258
232
  * @returns {number}
259
233
  */
@@ -261,8 +235,6 @@ class NestedHeaders extends _base.BasePlugin {
261
235
  /**
262
236
  * Updates the selection focus highlight position to point to the nested header root element (TH)
263
237
  * even when the logical coordinates point in-between the header.
264
- *
265
- * @private
266
238
  */
267
239
  _classPrivateMethodInitSpec(this, _updateFocusHighlightPosition);
268
240
  /**
@@ -754,60 +726,42 @@ function _onBeforeHighlightingColumnHeader2(visualColumn, headerLevel, highlight
754
726
  }
755
727
  return visualColumn;
756
728
  }
757
- function _onBeforeCopy2(clipboardData) {
758
- const {
759
- rows,
760
- columns
761
- } = (0, _selection.transformRangeLikeToIndexes)(clipboardData.getRanges());
762
- const headers = rows.filter(row => row < 0);
763
- const nestedHeaders = [];
764
- headers.forEach(header => {
765
- const headersForLevel = [];
766
- (0, _array.arrayEach)(columns, (column, index) => {
767
- const headerSettings = this.getHeaderSettings(header, column);
768
- if (headerSettings === null) {
769
- headersForLevel.push(this.hot.getColHeader(column, header));
770
- return;
771
- }
772
- const {
773
- isPlaceholder
774
- } = headerSettings;
775
- const columnsToEnd = columns.slice(index).length;
776
- const headerTreeNodeData = this.getStateManager().getHeaderTreeNodeData(header, column);
777
- if (index === 0 && isPlaceholder === true) {
778
- const {
779
- label,
780
- origColspan: colspan,
781
- columnIndex
782
- } = headerTreeNodeData;
783
- const columnFromStart = column - columnIndex;
784
- const reducedColspan = Math.min(colspan - columnFromStart, columnsToEnd);
785
- if (reducedColspan > 1) {
786
- headersForLevel.push({
787
- label,
788
- colspan: reducedColspan
789
- });
790
- } else {
791
- headersForLevel.push(label);
729
+ function _onBeforeCopy2(data, copyableRanges, _ref2) {
730
+ let {
731
+ columnHeadersCount
732
+ } = _ref2;
733
+ if (columnHeadersCount === 0) {
734
+ return;
735
+ }
736
+ for (let rangeIndex = 0; rangeIndex < copyableRanges.length; rangeIndex++) {
737
+ const {
738
+ startRow,
739
+ startCol,
740
+ endRow,
741
+ endCol
742
+ } = copyableRanges[rangeIndex];
743
+ const rowsCount = endRow - startRow + 1;
744
+ const columnsCount = startCol - endCol + 1;
745
+
746
+ // do not process dataset ranges and column headers where only one column is copied
747
+ if (startRow >= 0 || columnsCount === 1) {
748
+ break;
749
+ }
750
+ for (let column = startCol; column <= endCol; column++) {
751
+ for (let row = startRow; row <= endRow; row++) {
752
+ var _classPrivateFieldGet4;
753
+ const zeroBasedColumnHeaderLevel = rowsCount + row;
754
+ const zeroBasedColumnIndex = column - startCol;
755
+ if (zeroBasedColumnIndex === 0) {
756
+ continue; // eslint-disable-line no-continue
757
+ }
758
+ const isRoot = (_classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(row, column)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.isRoot;
759
+ if (isRoot === false) {
760
+ data[zeroBasedColumnHeaderLevel][zeroBasedColumnIndex] = '';
792
761
  }
793
- } else if (isPlaceholder === false) {
794
- const {
795
- label,
796
- origColspan: colspan,
797
- columnIndex
798
- } = headerTreeNodeData;
799
- const columnFromStart = column - columnIndex;
800
- const reducedColspan = Math.min(colspan - columnFromStart, columnsToEnd);
801
- headersForLevel.push(reducedColspan > 1 ? {
802
- label,
803
- colspan: reducedColspan
804
- } : label);
805
762
  }
806
- });
807
- nestedHeaders.push(headersForLevel);
808
- });
809
- clipboardData.setMetaInfo('colHeaders', null);
810
- clipboardData.setMetaInfo('nestedHeaders', nestedHeaders);
763
+ }
764
+ }
811
765
  }
812
766
  function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
813
767
  const headerNodeData = this._getHeaderTreeNodeDataByCoords(coords);
@@ -1010,10 +964,10 @@ function _onModifyColWidth2(width, column) {
1010
964
  return width > cachedWidth ? width : cachedWidth;
1011
965
  }
1012
966
  function _onModifyColumnHeaderValue2(value, visualColumnIndex, headerLevel) {
1013
- var _classPrivateFieldGet4;
967
+ var _classPrivateFieldGet5;
1014
968
  const {
1015
969
  label
1016
- } = (_classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet4 !== void 0 ? _classPrivateFieldGet4 : {
970
+ } = (_classPrivateFieldGet5 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet5 !== void 0 ? _classPrivateFieldGet5 : {
1017
971
  label: ''
1018
972
  };
1019
973
  return label;
@@ -2,8 +2,8 @@ import "core-js/modules/es.array.push.js";
2
2
  import "core-js/modules/es.error.cause.js";
3
3
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
@@ -17,11 +17,10 @@ import { isNumeric, clamp } from "../../helpers/number.mjs";
17
17
  import { toSingleLine } from "../../helpers/templateLiteralTag.mjs";
18
18
  import { isLeftClick, isRightClick } from "../../helpers/dom/event.mjs";
19
19
  import { warn } from "../../helpers/console.mjs";
20
- import { ACTIVE_HEADER_TYPE, HEADER_TYPE, transformRangeLikeToIndexes } from "../../selection/index.mjs";
20
+ import { ACTIVE_HEADER_TYPE, HEADER_TYPE } from "../../selection/index.mjs";
21
21
  import { BasePlugin } from "../base/index.mjs";
22
22
  import StateManager from "./stateManager/index.mjs";
23
23
  import GhostTable from "./utils/ghostTable.mjs";
24
- import { arrayEach } from "../../helpers/array.mjs";
25
24
  export const PLUGIN_KEY = 'nestedHeaders';
26
25
  export const PLUGIN_PRIORITY = 280;
27
26
 
@@ -98,7 +97,6 @@ export class NestedHeaders extends BasePlugin {
98
97
  /**
99
98
  * Updates the plugin state after new dataset load.
100
99
  *
101
- * @private
102
100
  * @param {Array[]} sourceData Array of arrays or array of objects containing data.
103
101
  * @param {boolean} initialLoad Flag that determines whether the data has been loaded
104
102
  * during the initialization.
@@ -106,14 +104,11 @@ export class NestedHeaders extends BasePlugin {
106
104
  _classPrivateMethodInitSpec(this, _onAfterLoadData);
107
105
  /**
108
106
  * Updates the plugin state after HoT initialization.
109
- *
110
- * @private
111
107
  */
112
108
  _classPrivateMethodInitSpec(this, _onInit);
113
109
  /**
114
110
  * `modifyFocusedElement` hook callback.
115
111
  *
116
- * @private
117
112
  * @param {number} row Row index.
118
113
  * @param {number} column Column index.
119
114
  * @returns {HTMLTableCellElement} The `TH` element to be focused.
@@ -123,7 +118,6 @@ export class NestedHeaders extends BasePlugin {
123
118
  * Listens the `modifyColumnHeaderValue` hook that overwrites the column headers values based on
124
119
  * the internal state and settings of the plugin.
125
120
  *
126
- * @private
127
121
  * @param {string} value The column header value.
128
122
  * @param {number} visualColumnIndex The visual column index.
129
123
  * @param {number} headerLevel The index of header level. The header level accepts positive (0 to N)
@@ -136,7 +130,6 @@ export class NestedHeaders extends BasePlugin {
136
130
  /**
137
131
  * `modifyColWidth` hook callback - returns width from cache, when is greater than incoming from hook.
138
132
  *
139
- * @private
140
133
  * @param {number} width Width from hook.
141
134
  * @param {number} column Visual index of an column.
142
135
  * @returns {number}
@@ -145,14 +138,12 @@ export class NestedHeaders extends BasePlugin {
145
138
  /**
146
139
  * Make the renderer render the first nested column in its entirety.
147
140
  *
148
- * @private
149
141
  * @param {object} calc Viewport column calculator.
150
142
  */
151
143
  _classPrivateMethodInitSpec(this, _onAfterViewportColumnCalculatorOverride);
152
144
  /**
153
145
  * `afterGetColumnHeader` hook callback - prepares the header structure.
154
146
  *
155
- * @private
156
147
  * @param {Array} renderersArray Array of renderers.
157
148
  */
158
149
  _classPrivateMethodInitSpec(this, _onAfterGetColumnHeaderRenderers);
@@ -160,7 +151,6 @@ export class NestedHeaders extends BasePlugin {
160
151
  * The hook observes the column selection from the Selection API and modifies the column range to
161
152
  * ensure that the whole nested column will be covered.
162
153
  *
163
- * @private
164
154
  * @param {CellCoords} from The coords object where the selection starts.
165
155
  * @param {CellCoords} to The coords object where the selection ends.
166
156
  */
@@ -168,27 +158,21 @@ export class NestedHeaders extends BasePlugin {
168
158
  /**
169
159
  * `modifyTransformStart` hook is called every time the keyboard navigation is used.
170
160
  *
171
- * @private
172
161
  * @param {object} delta The transformation delta.
173
162
  */
174
163
  _classPrivateMethodInitSpec(this, _onModifyTransformStart);
175
164
  /**
176
165
  * The hook checks and ensures that the focus position that depends on the selected columns
177
166
  * range is always positioned within the range.
178
- *
179
- * @private
180
167
  */
181
168
  _classPrivateMethodInitSpec(this, _onBeforeSelectionHighlightSet);
182
169
  /**
183
170
  * Switches internal flag about selection progress to `false`.
184
- *
185
- * @private
186
171
  */
187
172
  _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseUp);
188
173
  /**
189
174
  * Makes the header-selection properly select the nested headers.
190
175
  *
191
- * @private
192
176
  * @param {MouseEvent} event Mouse event.
193
177
  * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
194
178
  * @param {HTMLElement} TD The cell element.
@@ -199,7 +183,6 @@ export class NestedHeaders extends BasePlugin {
199
183
  /**
200
184
  * Allows to control how the column selection based on the coordinates and the nested headers is made.
201
185
  *
202
- * @private
203
186
  * @param {MouseEvent} event Mouse event.
204
187
  * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
205
188
  */
@@ -207,7 +190,6 @@ export class NestedHeaders extends BasePlugin {
207
190
  /**
208
191
  * Allows blocking the column selection that is controlled by the core Selection module.
209
192
  *
210
- * @private
211
193
  * @param {MouseEvent} event Mouse event.
212
194
  * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
213
195
  * @param {CellCoords} TD The table cell or header element.
@@ -221,23 +203,16 @@ export class NestedHeaders extends BasePlugin {
221
203
  * of the column.
222
204
  *
223
205
  * @private
224
- * @param {object} clipboardData Information about already performed copy action.
225
- * @param {Function} clipboardData.removeRow Remove row from the copied/pasted dataset.
226
- * @param {Function} clipboardData.removeColumn Remove column from the copied/pasted dataset.
227
- * @param {Function} clipboardData.insertAtRow Insert values at row index.
228
- * @param {Function} clipboardData.insertAtColumn Insert values at column index.
229
- * @param {Function} clipboardData.setCellAt Change headers or cells in the copied/pasted dataset.
230
- * @param {Function} clipboardData.getCellAt Get headers or cells from the copied/pasted dataset.
231
- * @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
232
- * @param {Function} clipboardData.getMetaInfo Gets grid settings for copied data.
233
- * @param {Function} clipboardData.setMetaInfo Sets grid settings for copied data.
234
- * @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
206
+ * @param {Array[]} data An array of arrays which contains data to copied.
207
+ * @param {object[]} copyableRanges An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
208
+ * which will copied.
209
+ * @param {{ columnHeadersCount: number }} copiedHeadersCount An object with keys that holds information with
210
+ * the number of copied headers.
235
211
  */
236
212
  _classPrivateMethodInitSpec(this, _onBeforeCopy);
237
213
  /**
238
214
  * Allows to control which header DOM element will be used to highlight.
239
215
  *
240
- * @private
241
216
  * @param {number} visualColumn A visual column index of the highlighted row header.
242
217
  * @param {number} headerLevel A row header level that is currently highlighted.
243
218
  * @param {object} highlightMeta An object with meta data that describes the highlight state.
@@ -249,7 +224,6 @@ export class NestedHeaders extends BasePlugin {
249
224
  * is scrolled to the correct column for the nested header the most left and the most right visual column
250
225
  * indexes are used.
251
226
  *
252
- * @private
253
227
  * @param {number} visualColumn A visual column index to which the viewport will be scrolled.
254
228
  * @returns {number}
255
229
  */
@@ -257,8 +231,6 @@ export class NestedHeaders extends BasePlugin {
257
231
  /**
258
232
  * Updates the selection focus highlight position to point to the nested header root element (TH)
259
233
  * even when the logical coordinates point in-between the header.
260
- *
261
- * @private
262
234
  */
263
235
  _classPrivateMethodInitSpec(this, _updateFocusHighlightPosition);
264
236
  /**
@@ -749,60 +721,42 @@ function _onBeforeHighlightingColumnHeader2(visualColumn, headerLevel, highlight
749
721
  }
750
722
  return visualColumn;
751
723
  }
752
- function _onBeforeCopy2(clipboardData) {
753
- const {
754
- rows,
755
- columns
756
- } = transformRangeLikeToIndexes(clipboardData.getRanges());
757
- const headers = rows.filter(row => row < 0);
758
- const nestedHeaders = [];
759
- headers.forEach(header => {
760
- const headersForLevel = [];
761
- arrayEach(columns, (column, index) => {
762
- const headerSettings = this.getHeaderSettings(header, column);
763
- if (headerSettings === null) {
764
- headersForLevel.push(this.hot.getColHeader(column, header));
765
- return;
766
- }
767
- const {
768
- isPlaceholder
769
- } = headerSettings;
770
- const columnsToEnd = columns.slice(index).length;
771
- const headerTreeNodeData = this.getStateManager().getHeaderTreeNodeData(header, column);
772
- if (index === 0 && isPlaceholder === true) {
773
- const {
774
- label,
775
- origColspan: colspan,
776
- columnIndex
777
- } = headerTreeNodeData;
778
- const columnFromStart = column - columnIndex;
779
- const reducedColspan = Math.min(colspan - columnFromStart, columnsToEnd);
780
- if (reducedColspan > 1) {
781
- headersForLevel.push({
782
- label,
783
- colspan: reducedColspan
784
- });
785
- } else {
786
- headersForLevel.push(label);
724
+ function _onBeforeCopy2(data, copyableRanges, _ref2) {
725
+ let {
726
+ columnHeadersCount
727
+ } = _ref2;
728
+ if (columnHeadersCount === 0) {
729
+ return;
730
+ }
731
+ for (let rangeIndex = 0; rangeIndex < copyableRanges.length; rangeIndex++) {
732
+ const {
733
+ startRow,
734
+ startCol,
735
+ endRow,
736
+ endCol
737
+ } = copyableRanges[rangeIndex];
738
+ const rowsCount = endRow - startRow + 1;
739
+ const columnsCount = startCol - endCol + 1;
740
+
741
+ // do not process dataset ranges and column headers where only one column is copied
742
+ if (startRow >= 0 || columnsCount === 1) {
743
+ break;
744
+ }
745
+ for (let column = startCol; column <= endCol; column++) {
746
+ for (let row = startRow; row <= endRow; row++) {
747
+ var _classPrivateFieldGet4;
748
+ const zeroBasedColumnHeaderLevel = rowsCount + row;
749
+ const zeroBasedColumnIndex = column - startCol;
750
+ if (zeroBasedColumnIndex === 0) {
751
+ continue; // eslint-disable-line no-continue
752
+ }
753
+ const isRoot = (_classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(row, column)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.isRoot;
754
+ if (isRoot === false) {
755
+ data[zeroBasedColumnHeaderLevel][zeroBasedColumnIndex] = '';
787
756
  }
788
- } else if (isPlaceholder === false) {
789
- const {
790
- label,
791
- origColspan: colspan,
792
- columnIndex
793
- } = headerTreeNodeData;
794
- const columnFromStart = column - columnIndex;
795
- const reducedColspan = Math.min(colspan - columnFromStart, columnsToEnd);
796
- headersForLevel.push(reducedColspan > 1 ? {
797
- label,
798
- colspan: reducedColspan
799
- } : label);
800
757
  }
801
- });
802
- nestedHeaders.push(headersForLevel);
803
- });
804
- clipboardData.setMetaInfo('colHeaders', null);
805
- clipboardData.setMetaInfo('nestedHeaders', nestedHeaders);
758
+ }
759
+ }
806
760
  }
807
761
  function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
808
762
  const headerNodeData = this._getHeaderTreeNodeDataByCoords(coords);
@@ -1005,10 +959,10 @@ function _onModifyColWidth2(width, column) {
1005
959
  return width > cachedWidth ? width : cachedWidth;
1006
960
  }
1007
961
  function _onModifyColumnHeaderValue2(value, visualColumnIndex, headerLevel) {
1008
- var _classPrivateFieldGet4;
962
+ var _classPrivateFieldGet5;
1009
963
  const {
1010
964
  label
1011
- } = (_classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet4 !== void 0 ? _classPrivateFieldGet4 : {
965
+ } = (_classPrivateFieldGet5 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet5 !== void 0 ? _classPrivateFieldGet5 : {
1012
966
  label: ''
1013
967
  };
1014
968
  return label;
@@ -144,7 +144,6 @@ class HeadersTree {
144
144
  treeNode.data.isRoot = columnIndex === treeNode.data.columnIndex;
145
145
  return false; // Cancel tree traversing.
146
146
  }
147
-
148
147
  columnCursor += origColspan;
149
148
  }
150
149
  });
@@ -140,7 +140,6 @@ export default class HeadersTree {
140
140
  treeNode.data.isRoot = columnIndex === treeNode.data.columnIndex;
141
141
  return false; // Cancel tree traversing.
142
142
  }
143
-
144
143
  columnCursor += origColspan;
145
144
  }
146
145
  });
@@ -4,8 +4,8 @@ exports.__esModule = true;
4
4
  require("core-js/modules/es.error.cause.js");
5
5
  var _element = require("../../../helpers/dom/element");
6
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
8
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
8
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
9
  /**
10
10
  * The class generates the nested headers structure in the DOM and reads the column width for
11
11
  * each column. The hierarchy is built only for visible, non-hidden columns. Each time the
@@ -1,7 +1,7 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import { fastInnerHTML } from "../../../helpers/dom/element.mjs";
6
6
  /**
7
7
  * The class generates the nested headers structure in the DOM and reads the column width for
@@ -7,8 +7,8 @@ var _number = require("../../../helpers/number");
7
7
  var _object = require("../../../helpers/object");
8
8
  var _array = require("../../../helpers/array");
9
9
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
11
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
11
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  /**
13
13
  * Class responsible for making data operations.
14
14
  *
@@ -1,8 +1,8 @@
1
1
  import "core-js/modules/es.array.push.js";
2
2
  import "core-js/modules/es.error.cause.js";
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  import { rangeEach } from "../../../helpers/number.mjs";
7
7
  import { objectEach } from "../../../helpers/object.mjs";
8
8
  import { arrayEach } from "../../../helpers/array.mjs";
@@ -17,8 +17,8 @@ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclarati
17
17
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
18
18
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
19
19
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
21
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
20
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
21
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
22
22
  function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
23
23
  function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
24
24
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }