handsontable 0.0.0-next-7026906-20231107 → 0.0.0-next-7b93b7d-20231107

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.

Potentially problematic release.


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

Files changed (316) hide show
  1. package/3rdparty/SheetClip/SheetClip.js +2 -2
  2. package/3rdparty/SheetClip/SheetClip.mjs +2 -2
  3. package/3rdparty/autoResize/autoResize.js +2 -2
  4. package/3rdparty/autoResize/autoResize.mjs +2 -2
  5. package/3rdparty/walkontable/src/calculator/viewportColumns.js +108 -85
  6. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +108 -85
  7. package/3rdparty/walkontable/src/calculator/viewportRows.js +60 -52
  8. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +60 -52
  9. package/3rdparty/walkontable/src/core/clone.js +6 -0
  10. package/3rdparty/walkontable/src/core/clone.mjs +6 -0
  11. package/3rdparty/walkontable/src/event.js +125 -74
  12. package/3rdparty/walkontable/src/event.mjs +125 -74
  13. package/3rdparty/walkontable/src/filter/column.js +16 -0
  14. package/3rdparty/walkontable/src/filter/column.mjs +16 -0
  15. package/3rdparty/walkontable/src/filter/row.js +16 -0
  16. package/3rdparty/walkontable/src/filter/row.mjs +16 -0
  17. package/3rdparty/walkontable/src/overlay/bottom.js +1 -1
  18. package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
  19. package/3rdparty/walkontable/src/overlay/top.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
  21. package/3rdparty/walkontable/src/renderer/_base.js +12 -5
  22. package/3rdparty/walkontable/src/renderer/_base.mjs +12 -5
  23. package/3rdparty/walkontable/src/renderer/cells.js +6 -2
  24. package/3rdparty/walkontable/src/renderer/cells.mjs +6 -2
  25. package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -2
  26. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +6 -2
  27. package/3rdparty/walkontable/src/renderer/rows.js +5 -0
  28. package/3rdparty/walkontable/src/renderer/rows.mjs +5 -0
  29. package/3rdparty/walkontable/src/renderer/table.js +24 -17
  30. package/3rdparty/walkontable/src/renderer/table.mjs +24 -17
  31. package/3rdparty/walkontable/src/scroll.js +2 -2
  32. package/3rdparty/walkontable/src/scroll.mjs +2 -2
  33. package/3rdparty/walkontable/src/selection/border/border.js +1 -1
  34. package/3rdparty/walkontable/src/selection/border/border.mjs +1 -1
  35. package/3rdparty/walkontable/src/settings.js +10 -10
  36. package/3rdparty/walkontable/src/settings.mjs +10 -10
  37. package/3rdparty/walkontable/src/table.js +3 -3
  38. package/3rdparty/walkontable/src/table.mjs +3 -3
  39. package/3rdparty/walkontable/src/utils/column.js +19 -4
  40. package/3rdparty/walkontable/src/utils/column.mjs +19 -4
  41. package/3rdparty/walkontable/src/utils/nodesPool.js +5 -0
  42. package/3rdparty/walkontable/src/utils/nodesPool.mjs +5 -0
  43. package/3rdparty/walkontable/src/utils/orderView/view.js +13 -6
  44. package/3rdparty/walkontable/src/utils/orderView/view.mjs +13 -6
  45. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +9 -6
  46. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +9 -6
  47. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +7 -4
  48. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +7 -4
  49. package/3rdparty/walkontable/src/utils/row.js +14 -2
  50. package/3rdparty/walkontable/src/utils/row.mjs +14 -2
  51. package/3rdparty/walkontable/src/viewport.js +9 -9
  52. package/3rdparty/walkontable/src/viewport.mjs +9 -9
  53. package/base.js +2 -2
  54. package/base.mjs +2 -2
  55. package/core.js +25 -25
  56. package/core.mjs +25 -25
  57. package/dataMap/dataMap.js +99 -90
  58. package/dataMap/dataMap.mjs +99 -90
  59. package/dataMap/dataSource.js +14 -8
  60. package/dataMap/dataSource.mjs +14 -8
  61. package/dataMap/metaManager/lazyFactoryMap.js +19 -7
  62. package/dataMap/metaManager/lazyFactoryMap.mjs +19 -7
  63. package/dataMap/metaManager/metaLayers/cellMeta.js +8 -3
  64. package/dataMap/metaManager/metaLayers/cellMeta.mjs +8 -3
  65. package/dataMap/metaManager/metaLayers/columnMeta.js +7 -1
  66. package/dataMap/metaManager/metaLayers/columnMeta.mjs +7 -1
  67. package/dataMap/metaManager/metaLayers/globalMeta.js +6 -1
  68. package/dataMap/metaManager/metaLayers/globalMeta.mjs +6 -1
  69. package/dataMap/metaManager/metaLayers/tableMeta.js +6 -2
  70. package/dataMap/metaManager/metaLayers/tableMeta.mjs +6 -2
  71. package/dataMap/metaManager/metaSchema.js +55 -55
  72. package/dataMap/metaManager/metaSchema.mjs +55 -55
  73. package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -2
  74. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -2
  75. package/dataMap/metaManager/mods/extendMetaProperties.js +8 -4
  76. package/dataMap/metaManager/mods/extendMetaProperties.mjs +8 -4
  77. package/dataMap/metaManager/utils.js +2 -2
  78. package/dataMap/metaManager/utils.mjs +2 -2
  79. package/dist/handsontable.css +2 -2
  80. package/dist/handsontable.full.css +2 -2
  81. package/dist/handsontable.full.js +7244 -6347
  82. package/dist/handsontable.full.min.css +2 -2
  83. package/dist/handsontable.full.min.js +120 -120
  84. package/dist/handsontable.js +7243 -6346
  85. package/dist/handsontable.min.css +2 -2
  86. package/dist/handsontable.min.js +28 -28
  87. package/editorManager.js +105 -95
  88. package/editorManager.mjs +105 -95
  89. package/editors/autocompleteEditor/autocompleteEditor.js +47 -46
  90. package/editors/autocompleteEditor/autocompleteEditor.mjs +46 -45
  91. package/editors/baseEditor/baseEditor.js +23 -26
  92. package/editors/baseEditor/baseEditor.mjs +23 -26
  93. package/editors/dateEditor/dateEditor.js +24 -15
  94. package/editors/dateEditor/dateEditor.mjs +24 -15
  95. package/editors/dropdownEditor/dropdownEditor.js +1 -1
  96. package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
  97. package/editors/handsontableEditor/handsontableEditor.js +4 -4
  98. package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
  99. package/editors/textEditor/textEditor.js +23 -17
  100. package/editors/textEditor/textEditor.mjs +24 -18
  101. package/eventManager.js +8 -0
  102. package/eventManager.mjs +8 -0
  103. package/helpers/array.js +2 -2
  104. package/helpers/array.mjs +2 -2
  105. package/helpers/dom/element.js +7 -7
  106. package/helpers/dom/element.mjs +7 -7
  107. package/helpers/function.js +1 -1
  108. package/helpers/function.mjs +1 -1
  109. package/helpers/mixed.js +1 -1
  110. package/helpers/mixed.mjs +1 -1
  111. package/helpers/object.js +4 -4
  112. package/helpers/object.mjs +4 -4
  113. package/helpers/string.js +1 -1
  114. package/helpers/string.mjs +1 -1
  115. package/package.json +1 -1
  116. package/pluginHooks.d.ts +0 -2
  117. package/pluginHooks.js +12 -3
  118. package/pluginHooks.mjs +12 -3
  119. package/plugins/autoColumnSize/autoColumnSize.js +141 -130
  120. package/plugins/autoColumnSize/autoColumnSize.mjs +140 -129
  121. package/plugins/autoRowSize/autoRowSize.js +112 -125
  122. package/plugins/autoRowSize/autoRowSize.mjs +110 -123
  123. package/plugins/autofill/autofill.js +97 -102
  124. package/plugins/autofill/autofill.mjs +96 -101
  125. package/plugins/base/base.js +57 -22
  126. package/plugins/base/base.mjs +56 -22
  127. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +29 -24
  128. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +28 -23
  129. package/plugins/collapsibleColumns/collapsibleColumns.js +104 -107
  130. package/plugins/collapsibleColumns/collapsibleColumns.mjs +102 -104
  131. package/plugins/columnSorting/columnSorting.js +105 -98
  132. package/plugins/columnSorting/columnSorting.mjs +104 -97
  133. package/plugins/columnSorting/columnStatesManager.js +12 -6
  134. package/plugins/columnSorting/columnStatesManager.mjs +12 -6
  135. package/plugins/columnSummary/columnSummary.js +71 -58
  136. package/plugins/columnSummary/columnSummary.mjs +70 -57
  137. package/plugins/columnSummary/endpoints.js +20 -14
  138. package/plugins/columnSummary/endpoints.mjs +20 -14
  139. package/plugins/comments/commentEditor.js +30 -2
  140. package/plugins/comments/commentEditor.mjs +30 -2
  141. package/plugins/comments/comments.js +158 -169
  142. package/plugins/comments/comments.mjs +157 -168
  143. package/plugins/comments/displaySwitch.js +7 -3
  144. package/plugins/comments/displaySwitch.mjs +7 -3
  145. package/plugins/contextMenu/commandExecutor.js +15 -2
  146. package/plugins/contextMenu/commandExecutor.mjs +15 -2
  147. package/plugins/contextMenu/contextMenu.js +91 -101
  148. package/plugins/contextMenu/contextMenu.mjs +90 -100
  149. package/plugins/contextMenu/itemsFactory.js +19 -4
  150. package/plugins/contextMenu/itemsFactory.mjs +19 -4
  151. package/plugins/contextMenu/menu/cursor.js +36 -0
  152. package/plugins/contextMenu/menu/cursor.mjs +36 -0
  153. package/plugins/contextMenu/menu/menu.js +57 -5
  154. package/plugins/contextMenu/menu/menu.mjs +57 -5
  155. package/plugins/copyPaste/copyPaste.js +74 -75
  156. package/plugins/copyPaste/copyPaste.mjs +74 -75
  157. package/plugins/customBorders/customBorders.js +49 -48
  158. package/plugins/customBorders/customBorders.mjs +48 -47
  159. package/plugins/dragToScroll/dragToScroll.js +50 -54
  160. package/plugins/dragToScroll/dragToScroll.mjs +49 -52
  161. package/plugins/dropdownMenu/dropdownMenu.js +132 -129
  162. package/plugins/dropdownMenu/dropdownMenu.mjs +132 -129
  163. package/plugins/exportFile/dataProvider.js +7 -2
  164. package/plugins/exportFile/dataProvider.mjs +7 -2
  165. package/plugins/exportFile/exportFile.js +1 -1
  166. package/plugins/exportFile/exportFile.mjs +1 -1
  167. package/plugins/exportFile/types/_base.js +14 -6
  168. package/plugins/exportFile/types/_base.mjs +14 -6
  169. package/plugins/filters/component/actionBar.js +9 -0
  170. package/plugins/filters/component/actionBar.mjs +9 -0
  171. package/plugins/filters/component/condition.js +13 -0
  172. package/plugins/filters/component/condition.mjs +13 -0
  173. package/plugins/filters/component/operators.js +9 -0
  174. package/plugins/filters/component/operators.mjs +9 -0
  175. package/plugins/filters/component/value.js +9 -0
  176. package/plugins/filters/component/value.mjs +9 -0
  177. package/plugins/filters/conditionCollection.js +9 -4
  178. package/plugins/filters/conditionCollection.mjs +9 -4
  179. package/plugins/filters/conditionUpdateObserver.js +53 -42
  180. package/plugins/filters/conditionUpdateObserver.mjs +53 -42
  181. package/plugins/filters/dataFilter.js +9 -3
  182. package/plugins/filters/dataFilter.mjs +9 -3
  183. package/plugins/filters/filters.js +184 -189
  184. package/plugins/filters/filters.mjs +182 -187
  185. package/plugins/filters/ui/_base.js +1 -1
  186. package/plugins/filters/ui/_base.mjs +1 -1
  187. package/plugins/filters/utils.js +1 -1
  188. package/plugins/filters/utils.mjs +1 -1
  189. package/plugins/formulas/engine/settings.js +1 -1
  190. package/plugins/formulas/engine/settings.mjs +1 -1
  191. package/plugins/formulas/formulas.js +684 -602
  192. package/plugins/formulas/formulas.mjs +682 -600
  193. package/plugins/hiddenColumns/hiddenColumns.js +174 -169
  194. package/plugins/hiddenColumns/hiddenColumns.mjs +173 -168
  195. package/plugins/hiddenRows/hiddenRows.js +170 -165
  196. package/plugins/hiddenRows/hiddenRows.mjs +169 -164
  197. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
  198. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
  199. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
  200. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
  201. package/plugins/manualColumnFreeze/manualColumnFreeze.js +67 -54
  202. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +64 -51
  203. package/plugins/manualColumnMove/manualColumnMove.js +287 -232
  204. package/plugins/manualColumnMove/manualColumnMove.mjs +286 -231
  205. package/plugins/manualColumnMove/ui/_base.js +9 -3
  206. package/plugins/manualColumnMove/ui/_base.mjs +9 -3
  207. package/plugins/manualColumnResize/manualColumnResize.js +291 -246
  208. package/plugins/manualColumnResize/manualColumnResize.mjs +290 -244
  209. package/plugins/manualRowMove/manualRowMove.js +223 -208
  210. package/plugins/manualRowMove/manualRowMove.mjs +222 -207
  211. package/plugins/manualRowMove/ui/_base.js +10 -5
  212. package/plugins/manualRowMove/ui/_base.mjs +10 -5
  213. package/plugins/manualRowResize/manualRowResize.js +254 -209
  214. package/plugins/manualRowResize/manualRowResize.mjs +253 -207
  215. package/plugins/mergeCells/calculations/autofill.js +9 -3
  216. package/plugins/mergeCells/calculations/autofill.mjs +9 -3
  217. package/plugins/mergeCells/calculations/selection.js +10 -4
  218. package/plugins/mergeCells/calculations/selection.mjs +10 -4
  219. package/plugins/mergeCells/cellCoords.js +16 -6
  220. package/plugins/mergeCells/cellCoords.mjs +16 -6
  221. package/plugins/mergeCells/cellsCollection.js +10 -4
  222. package/plugins/mergeCells/cellsCollection.mjs +10 -4
  223. package/plugins/mergeCells/mergeCells.js +582 -502
  224. package/plugins/mergeCells/mergeCells.mjs +580 -500
  225. package/plugins/multiColumnSorting/multiColumnSorting.js +13 -10
  226. package/plugins/multiColumnSorting/multiColumnSorting.mjs +13 -10
  227. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +16 -28
  228. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +16 -27
  229. package/plugins/nestedHeaders/nestedHeaders.js +542 -499
  230. package/plugins/nestedHeaders/nestedHeaders.mjs +554 -511
  231. package/plugins/nestedHeaders/stateManager/index.js +1 -1
  232. package/plugins/nestedHeaders/stateManager/index.mjs +1 -1
  233. package/plugins/nestedRows/data/dataManager.js +21 -15
  234. package/plugins/nestedRows/data/dataManager.mjs +21 -15
  235. package/plugins/nestedRows/nestedRows.js +326 -278
  236. package/plugins/nestedRows/nestedRows.mjs +325 -277
  237. package/plugins/nestedRows/ui/_base.js +7 -1
  238. package/plugins/nestedRows/ui/_base.mjs +7 -1
  239. package/plugins/nestedRows/ui/collapsing.js +2 -2
  240. package/plugins/nestedRows/ui/collapsing.mjs +2 -2
  241. package/plugins/nestedRows/ui/contextMenu.js +28 -18
  242. package/plugins/nestedRows/ui/contextMenu.mjs +28 -18
  243. package/plugins/nestedRows/utils/rowMoveController.js +12 -4
  244. package/plugins/nestedRows/utils/rowMoveController.mjs +12 -4
  245. package/plugins/persistentState/persistentState.js +14 -11
  246. package/plugins/persistentState/persistentState.mjs +14 -11
  247. package/plugins/persistentState/storage.js +11 -6
  248. package/plugins/persistentState/storage.mjs +11 -6
  249. package/plugins/registry.js +2 -2
  250. package/plugins/registry.mjs +2 -2
  251. package/plugins/search/search.js +57 -46
  252. package/plugins/search/search.mjs +56 -45
  253. package/plugins/touchScroll/touchScroll.js +102 -100
  254. package/plugins/touchScroll/touchScroll.mjs +100 -98
  255. package/plugins/trimRows/trimRows.js +33 -28
  256. package/plugins/trimRows/trimRows.mjs +32 -27
  257. package/plugins/undoRedo/undoRedo.js +2 -2
  258. package/plugins/undoRedo/undoRedo.mjs +2 -2
  259. package/renderers/autocompleteRenderer/autocompleteRenderer.js +11 -11
  260. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +11 -11
  261. package/renderers/baseRenderer/baseRenderer.js +2 -2
  262. package/renderers/baseRenderer/baseRenderer.mjs +2 -2
  263. package/renderers/checkboxRenderer/checkboxRenderer.js +23 -23
  264. package/renderers/checkboxRenderer/checkboxRenderer.mjs +23 -23
  265. package/renderers/dateRenderer/dateRenderer.js +4 -4
  266. package/renderers/dateRenderer/dateRenderer.mjs +4 -4
  267. package/renderers/handsontableRenderer/handsontableRenderer.js +4 -4
  268. package/renderers/handsontableRenderer/handsontableRenderer.mjs +4 -4
  269. package/renderers/htmlRenderer/htmlRenderer.js +4 -4
  270. package/renderers/htmlRenderer/htmlRenderer.mjs +4 -4
  271. package/renderers/numericRenderer/numericRenderer.js +3 -3
  272. package/renderers/numericRenderer/numericRenderer.mjs +3 -3
  273. package/renderers/passwordRenderer/passwordRenderer.js +3 -3
  274. package/renderers/passwordRenderer/passwordRenderer.mjs +3 -3
  275. package/renderers/selectRenderer/selectRenderer.js +4 -4
  276. package/renderers/selectRenderer/selectRenderer.mjs +4 -4
  277. package/renderers/textRenderer/textRenderer.js +5 -5
  278. package/renderers/textRenderer/textRenderer.mjs +5 -5
  279. package/renderers/timeRenderer/timeRenderer.js +3 -3
  280. package/renderers/timeRenderer/timeRenderer.mjs +3 -3
  281. package/selection/range.js +12 -2
  282. package/selection/range.mjs +12 -2
  283. package/selection/selection.js +3 -3
  284. package/selection/selection.mjs +3 -3
  285. package/tableView.js +208 -200
  286. package/tableView.mjs +208 -200
  287. package/translations/changesObservable/utils.js +2 -2
  288. package/translations/changesObservable/utils.mjs +2 -2
  289. package/translations/indexMapper.js +25 -22
  290. package/translations/indexMapper.mjs +25 -22
  291. package/translations/mapCollections/aggregatedCollection.js +8 -2
  292. package/translations/mapCollections/aggregatedCollection.mjs +8 -2
  293. package/translations/mapCollections/mapCollection.js +5 -2
  294. package/translations/mapCollections/mapCollection.mjs +5 -2
  295. package/translations/maps/indexMap.js +6 -1
  296. package/translations/maps/indexMap.mjs +6 -1
  297. package/translations/maps/utils/physicallyIndexed.js +2 -2
  298. package/translations/maps/utils/physicallyIndexed.mjs +2 -2
  299. package/utils/dataStructures/linkedList.js +10 -6
  300. package/utils/dataStructures/linkedList.mjs +10 -6
  301. package/utils/dataStructures/queue.js +1 -1
  302. package/utils/dataStructures/queue.mjs +1 -1
  303. package/utils/dataStructures/stack.js +1 -1
  304. package/utils/dataStructures/stack.mjs +1 -1
  305. package/utils/ghostTable.js +2 -2
  306. package/utils/ghostTable.mjs +2 -2
  307. package/utils/interval.js +73 -36
  308. package/utils/interval.mjs +73 -36
  309. package/utils/parseTable.js +1 -1
  310. package/utils/parseTable.mjs +1 -1
  311. package/validators/autocompleteValidator/autocompleteValidator.js +1 -1
  312. package/validators/autocompleteValidator/autocompleteValidator.mjs +1 -1
  313. package/validators/dateValidator/dateValidator.js +1 -1
  314. package/validators/dateValidator/dateValidator.mjs +1 -1
  315. package/validators/numericValidator/numericValidator.js +1 -1
  316. package/validators/numericValidator/numericValidator.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ require("core-js/modules/es.error.cause.js");
4
5
  require("core-js/modules/es.array.push.js");
5
6
  var _base = require("../base");
6
7
  var _dataManager = _interopRequireDefault(require("./data/dataManager"));
@@ -12,12 +13,23 @@ var _data = require("../../helpers/data");
12
13
  var _translations = require("../../translations");
13
14
  var _rowMoveController = _interopRequireDefault(require("./utils/rowMoveController"));
14
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
17
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
18
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
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); }
22
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
23
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
24
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
25
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
26
+ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
27
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
15
28
  const PLUGIN_KEY = 'nestedRows';
16
29
  exports.PLUGIN_KEY = PLUGIN_KEY;
17
30
  const PLUGIN_PRIORITY = 300;
18
31
  exports.PLUGIN_PRIORITY = PLUGIN_PRIORITY;
19
32
  const SHORTCUTS_GROUP = PLUGIN_KEY;
20
- const privatePool = new WeakMap();
21
33
 
22
34
  /* eslint-disable jsdoc/require-description-complete-sentence */
23
35
 
@@ -33,44 +45,184 @@ const WRONG_DATA_TYPE_ERROR = 'The Nested Rows plugin requires an Array of Objec
33
45
  * @description
34
46
  * Plugin responsible for displaying and operating on data sources with nested structures.
35
47
  */
48
+ var _skipRender = /*#__PURE__*/new WeakMap();
49
+ var _skipCoreAPIModifiers = /*#__PURE__*/new WeakMap();
50
+ var _onBeforeRowMove = /*#__PURE__*/new WeakSet();
51
+ var _onBeforeOnCellMouseDown = /*#__PURE__*/new WeakSet();
52
+ var _onFilterData = /*#__PURE__*/new WeakSet();
53
+ var _onAfterContextMenuDefaultOptions = /*#__PURE__*/new WeakSet();
54
+ var _onAfterGetRowHeader = /*#__PURE__*/new WeakSet();
55
+ var _onModifyRowHeaderWidth = /*#__PURE__*/new WeakSet();
56
+ var _onAfterRemoveRow = /*#__PURE__*/new WeakSet();
57
+ var _onBeforeRemoveRow = /*#__PURE__*/new WeakSet();
58
+ var _onBeforeAddChild = /*#__PURE__*/new WeakSet();
59
+ var _onAfterAddChild = /*#__PURE__*/new WeakSet();
60
+ var _onBeforeDetachChild = /*#__PURE__*/new WeakSet();
61
+ var _onAfterDetachChild = /*#__PURE__*/new WeakSet();
62
+ var _onAfterCreateRow = /*#__PURE__*/new WeakSet();
63
+ var _onAfterInit = /*#__PURE__*/new WeakSet();
64
+ var _onBeforeViewRender = /*#__PURE__*/new WeakSet();
65
+ var _onBeforeLoadData = /*#__PURE__*/new WeakSet();
36
66
  class NestedRows extends _base.BasePlugin {
37
- static get PLUGIN_KEY() {
38
- return PLUGIN_KEY;
39
- }
40
- static get PLUGIN_PRIORITY() {
41
- return PLUGIN_PRIORITY;
42
- }
43
- constructor(hotInstance) {
44
- super(hotInstance);
67
+ constructor() {
68
+ super(...arguments);
69
+ /**
70
+ * `beforeLoadData` hook callback.
71
+ *
72
+ * @param {Array} data The source data.
73
+ */
74
+ _classPrivateMethodInitSpec(this, _onBeforeLoadData);
75
+ /**
76
+ * `beforeViewRender` hook callback.
77
+ *
78
+ * @param {boolean} force Indicates if the render call was triggered by a change of settings or data.
79
+ * @param {object} skipRender An object, holder for skipRender functionality.
80
+ */
81
+ _classPrivateMethodInitSpec(this, _onBeforeViewRender);
82
+ /**
83
+ * `afterInit` hook callback.
84
+ */
85
+ _classPrivateMethodInitSpec(this, _onAfterInit);
86
+ /**
87
+ * `afterCreateRow` hook callback.
88
+ */
89
+ _classPrivateMethodInitSpec(this, _onAfterCreateRow);
90
+ /**
91
+ * `afterDetachChild` hook callback.
92
+ *
93
+ * @param {object} parent Parent element.
94
+ * @param {object} element New child element.
95
+ * @param {number} finalElementRowIndex The final row index of the detached element.
96
+ */
97
+ _classPrivateMethodInitSpec(this, _onAfterDetachChild);
98
+ /**
99
+ * `beforeDetachChild` hook callback.
100
+ */
101
+ _classPrivateMethodInitSpec(this, _onBeforeDetachChild);
102
+ /**
103
+ * `afterAddChild` hook callback.
104
+ *
105
+ * @param {object} parent Parent element.
106
+ * @param {object} element New child element.
107
+ */
108
+ _classPrivateMethodInitSpec(this, _onAfterAddChild);
109
+ /**
110
+ * `beforeAddChild` hook callback.
111
+ */
112
+ _classPrivateMethodInitSpec(this, _onBeforeAddChild);
113
+ /**
114
+ * Callback for the `beforeRemoveRow` change list of removed physical indexes by reference. Removing parent node
115
+ * has effect in removing children nodes.
116
+ *
117
+ * @param {number} index Visual index of starter row.
118
+ * @param {number} amount Amount of rows to be removed.
119
+ * @param {Array} physicalRows List of physical indexes.
120
+ */
121
+ _classPrivateMethodInitSpec(this, _onBeforeRemoveRow);
122
+ /**
123
+ * `onAfterRemoveRow` hook callback.
124
+ *
125
+ * @param {number} index Removed row.
126
+ * @param {number} amount Amount of removed rows.
127
+ * @param {Array} logicRows An array of the removed physical rows.
128
+ * @param {string} source Source of action.
129
+ */
130
+ _classPrivateMethodInitSpec(this, _onAfterRemoveRow);
131
+ /**
132
+ * `modifyRowHeaderWidth` hook callback.
133
+ *
134
+ * @param {number} rowHeaderWidth The initial row header width(s).
135
+ * @returns {number}
136
+ */
137
+ _classPrivateMethodInitSpec(this, _onModifyRowHeaderWidth);
138
+ /**
139
+ * `afterGetRowHeader` hook callback.
140
+ *
141
+ * @param {number} row Row index.
142
+ * @param {HTMLElement} TH Row header element.
143
+ */
144
+ _classPrivateMethodInitSpec(this, _onAfterGetRowHeader);
145
+ /**
146
+ * `afterContextMenuDefaultOptions` hook callback.
147
+ *
148
+ * @param {object} defaultOptions The default context menu items order.
149
+ * @returns {boolean}
150
+ */
151
+ _classPrivateMethodInitSpec(this, _onAfterContextMenuDefaultOptions);
152
+ /**
153
+ * Provide custom source data filtering. It's handled by core method and replaces the native filtering.
154
+ *
155
+ * @param {number} index The index where the data filtering starts.
156
+ * @param {number} amount An amount of rows which filtering applies to.
157
+ * @param {number} physicalRows Physical row indexes.
158
+ * @returns {Array}
159
+ */
160
+ _classPrivateMethodInitSpec(this, _onFilterData);
161
+ /**
162
+ * `beforeOnCellMousedown` hook callback.
163
+ *
164
+ * @param {MouseEvent} event Mousedown event.
165
+ * @param {object} coords Cell coords.
166
+ * @param {HTMLElement} TD Clicked cell.
167
+ */
168
+ _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseDown);
169
+ /**
170
+ * `beforeRowMove` hook callback.
171
+ *
172
+ * @param {Array} rows Array of visual row indexes to be moved.
173
+ * @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements
174
+ * will be placed after the moving action. To check the visualization of the final index, please take a look at
175
+ * [documentation](@/guides/rows/row-summary.md).
176
+ * @param {undefined|number} dropIndex Visual row index, being a drop index for the moved rows. Points to where we
177
+ * are going to drop the moved elements. To check visualization of drop index please take a look at
178
+ * [documentation](@/guides/rows/row-summary.md).
179
+ * @param {boolean} movePossible Indicates if it's possible to move rows to the desired position.
180
+ * @fires Hooks#afterRowMove
181
+ * @returns {boolean}
182
+ */
183
+ _classPrivateMethodInitSpec(this, _onBeforeRowMove);
45
184
  /**
46
185
  * Reference to the DataManager instance.
47
186
  *
48
187
  * @private
49
188
  * @type {object}
50
189
  */
51
- this.dataManager = null;
52
-
190
+ _defineProperty(this, "dataManager", null);
53
191
  /**
54
192
  * Reference to the HeadersUI instance.
55
193
  *
56
194
  * @private
57
195
  * @type {object}
58
196
  */
59
- this.headersUI = null;
197
+ _defineProperty(this, "headersUI", null);
60
198
  /**
61
199
  * Map of skipped rows by plugin.
62
200
  *
63
201
  * @private
64
202
  * @type {null|TrimmingMap}
65
203
  */
66
- this.collapsedRowsMap = null;
67
- privatePool.set(this, {
68
- movedToCollapsed: false,
69
- skipRender: null,
70
- skipCoreAPIModifiers: false
204
+ _defineProperty(this, "collapsedRowsMap", null);
205
+ /**
206
+ * @type {boolean}
207
+ */
208
+ _classPrivateFieldInitSpec(this, _skipRender, {
209
+ writable: true,
210
+ value: false
211
+ });
212
+ /**
213
+ * @type {boolean}
214
+ */
215
+ _classPrivateFieldInitSpec(this, _skipCoreAPIModifiers, {
216
+ writable: true,
217
+ value: false
71
218
  });
72
219
  }
73
-
220
+ static get PLUGIN_KEY() {
221
+ return PLUGIN_KEY;
222
+ }
223
+ static get PLUGIN_PRIORITY() {
224
+ return PLUGIN_PRIORITY;
225
+ }
74
226
  /**
75
227
  * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
76
228
  * hook and if it returns `true` then the {@link NestedRows#enablePlugin} method is called.
@@ -96,10 +248,16 @@ class NestedRows extends _base.BasePlugin {
96
248
  this.contextMenuUI = new _contextMenu.default(this, this.hot);
97
249
  this.rowMoveController = new _rowMoveController.default(this);
98
250
  this.addHook('afterInit', function () {
99
- return _this.onAfterInit(...arguments);
251
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
252
+ args[_key] = arguments[_key];
253
+ }
254
+ return _classPrivateMethodGet(_this, _onAfterInit, _onAfterInit2).call(_this, ...args);
100
255
  });
101
256
  this.addHook('beforeViewRender', function () {
102
- return _this.onBeforeViewRender(...arguments);
257
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
258
+ args[_key2] = arguments[_key2];
259
+ }
260
+ return _classPrivateMethodGet(_this, _onBeforeViewRender, _onBeforeViewRender2).call(_this, ...args);
103
261
  });
104
262
  this.addHook('modifyRowData', function () {
105
263
  return _this.onModifyRowData(...arguments);
@@ -111,46 +269,85 @@ class NestedRows extends _base.BasePlugin {
111
269
  return _this.onBeforeDataSplice(...arguments);
112
270
  });
113
271
  this.addHook('filterData', function () {
114
- return _this.onFilterData(...arguments);
272
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
273
+ args[_key3] = arguments[_key3];
274
+ }
275
+ return _classPrivateMethodGet(_this, _onFilterData, _onFilterData2).call(_this, ...args);
115
276
  });
116
277
  this.addHook('afterContextMenuDefaultOptions', function () {
117
- return _this.onAfterContextMenuDefaultOptions(...arguments);
278
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
279
+ args[_key4] = arguments[_key4];
280
+ }
281
+ return _classPrivateMethodGet(_this, _onAfterContextMenuDefaultOptions, _onAfterContextMenuDefaultOptions2).call(_this, ...args);
118
282
  });
119
283
  this.addHook('afterGetRowHeader', function () {
120
- return _this.onAfterGetRowHeader(...arguments);
284
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
285
+ args[_key5] = arguments[_key5];
286
+ }
287
+ return _classPrivateMethodGet(_this, _onAfterGetRowHeader, _onAfterGetRowHeader2).call(_this, ...args);
121
288
  });
122
289
  this.addHook('beforeOnCellMouseDown', function () {
123
- return _this.onBeforeOnCellMouseDown(...arguments);
290
+ for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
291
+ args[_key6] = arguments[_key6];
292
+ }
293
+ return _classPrivateMethodGet(_this, _onBeforeOnCellMouseDown, _onBeforeOnCellMouseDown2).call(_this, ...args);
124
294
  });
125
295
  this.addHook('beforeRemoveRow', function () {
126
- return _this.onBeforeRemoveRow(...arguments);
296
+ for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
297
+ args[_key7] = arguments[_key7];
298
+ }
299
+ return _classPrivateMethodGet(_this, _onBeforeRemoveRow, _onBeforeRemoveRow2).call(_this, ...args);
127
300
  });
128
301
  this.addHook('afterRemoveRow', function () {
129
- return _this.onAfterRemoveRow(...arguments);
302
+ for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
303
+ args[_key8] = arguments[_key8];
304
+ }
305
+ return _classPrivateMethodGet(_this, _onAfterRemoveRow, _onAfterRemoveRow2).call(_this, ...args);
130
306
  });
131
307
  this.addHook('beforeAddChild', function () {
132
- return _this.onBeforeAddChild(...arguments);
308
+ for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
309
+ args[_key9] = arguments[_key9];
310
+ }
311
+ return _classPrivateMethodGet(_this, _onBeforeAddChild, _onBeforeAddChild2).call(_this, ...args);
133
312
  });
134
313
  this.addHook('afterAddChild', function () {
135
- return _this.onAfterAddChild(...arguments);
314
+ for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
315
+ args[_key10] = arguments[_key10];
316
+ }
317
+ return _classPrivateMethodGet(_this, _onAfterAddChild, _onAfterAddChild2).call(_this, ...args);
136
318
  });
137
319
  this.addHook('beforeDetachChild', function () {
138
- return _this.onBeforeDetachChild(...arguments);
320
+ for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
321
+ args[_key11] = arguments[_key11];
322
+ }
323
+ return _classPrivateMethodGet(_this, _onBeforeDetachChild, _onBeforeDetachChild2).call(_this, ...args);
139
324
  });
140
325
  this.addHook('afterDetachChild', function () {
141
- return _this.onAfterDetachChild(...arguments);
326
+ for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
327
+ args[_key12] = arguments[_key12];
328
+ }
329
+ return _classPrivateMethodGet(_this, _onAfterDetachChild, _onAfterDetachChild2).call(_this, ...args);
142
330
  });
143
331
  this.addHook('modifyRowHeaderWidth', function () {
144
- return _this.onModifyRowHeaderWidth(...arguments);
332
+ for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
333
+ args[_key13] = arguments[_key13];
334
+ }
335
+ return _classPrivateMethodGet(_this, _onModifyRowHeaderWidth, _onModifyRowHeaderWidth2).call(_this, ...args);
145
336
  });
146
337
  this.addHook('afterCreateRow', function () {
147
- return _this.onAfterCreateRow(...arguments);
338
+ for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
339
+ args[_key14] = arguments[_key14];
340
+ }
341
+ return _classPrivateMethodGet(_this, _onAfterCreateRow, _onAfterCreateRow2).call(_this, ...args);
148
342
  });
149
343
  this.addHook('beforeRowMove', function () {
150
- return _this.onBeforeRowMove(...arguments);
344
+ for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
345
+ args[_key15] = arguments[_key15];
346
+ }
347
+ return _classPrivateMethodGet(_this, _onBeforeRowMove, _onBeforeRowMove2).call(_this, ...args);
151
348
  });
152
- this.addHook('beforeLoadData', data => this.onBeforeLoadData(data));
153
- this.addHook('beforeUpdateData', data => this.onBeforeLoadData(data));
349
+ this.addHook('beforeLoadData', data => _classPrivateMethodGet(this, _onBeforeLoadData, _onBeforeLoadData2).call(this, data));
350
+ this.addHook('beforeUpdateData', data => _classPrivateMethodGet(this, _onBeforeLoadData, _onBeforeLoadData2).call(this, data));
154
351
  this.registerShortcuts();
155
352
  super.enablePlugin();
156
353
  }
@@ -220,65 +417,28 @@ class NestedRows extends _base.BasePlugin {
220
417
  unregisterShortcuts() {
221
418
  this.hot.getShortcutManager().getContext('grid').removeShortcutsByGroup(SHORTCUTS_GROUP);
222
419
  }
223
-
224
- /**
225
- * `beforeRowMove` hook callback.
226
- *
227
- * @private
228
- * @param {Array} rows Array of visual row indexes to be moved.
229
- * @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements
230
- * will be placed after the moving action. To check the visualization of the final index, please take a look at
231
- * [documentation](@/guides/rows/row-summary.md).
232
- * @param {undefined|number} dropIndex Visual row index, being a drop index for the moved rows. Points to where we
233
- * are going to drop the moved elements. To check visualization of drop index please take a look at
234
- * [documentation](@/guides/rows/row-summary.md).
235
- * @param {boolean} movePossible Indicates if it's possible to move rows to the desired position.
236
- * @fires Hooks#afterRowMove
237
- * @returns {boolean}
238
- */
239
- onBeforeRowMove(rows, finalIndex, dropIndex, movePossible) {
240
- return this.rowMoveController.onBeforeRowMove(rows, finalIndex, dropIndex, movePossible);
241
- }
242
-
243
420
  /**
244
421
  * Enable the modify hook skipping flag - allows retrieving the data from Handsontable without this plugin's
245
422
  * modifications.
246
423
  */
247
424
  disableCoreAPIModifiers() {
248
- const priv = privatePool.get(this);
249
- priv.skipCoreAPIModifiers = true;
425
+ _classPrivateFieldSet(this, _skipCoreAPIModifiers, true);
250
426
  }
251
427
 
252
428
  /**
253
429
  * Disable the modify hook skipping flag.
254
430
  */
255
431
  enableCoreAPIModifiers() {
256
- const priv = privatePool.get(this);
257
- priv.skipCoreAPIModifiers = false;
258
- }
259
-
260
- /**
261
- * `beforeOnCellMousedown` hook callback.
262
- *
263
- * @private
264
- * @param {MouseEvent} event Mousedown event.
265
- * @param {object} coords Cell coords.
266
- * @param {HTMLElement} TD Clicked cell.
267
- */
268
- onBeforeOnCellMouseDown(event, coords, TD) {
269
- this.collapsingUI.toggleState(event, coords, TD);
432
+ _classPrivateFieldSet(this, _skipCoreAPIModifiers, false);
270
433
  }
271
-
272
434
  /**
273
435
  * The modifyRowData hook callback.
274
436
  *
275
- * @private
276
437
  * @param {number} row Visual row index.
277
438
  * @returns {boolean}
278
439
  */
279
440
  onModifyRowData(row) {
280
- const priv = privatePool.get(this);
281
- if (priv.skipCoreAPIModifiers) {
441
+ if (_classPrivateFieldGet(this, _skipCoreAPIModifiers)) {
282
442
  return;
283
443
  }
284
444
  return this.dataManager.getDataObject(row);
@@ -287,237 +447,125 @@ class NestedRows extends _base.BasePlugin {
287
447
  /**
288
448
  * Modify the source data length to match the length of the nested structure.
289
449
  *
290
- * @private
291
450
  * @returns {number}
292
451
  */
293
452
  onModifySourceLength() {
294
- const priv = privatePool.get(this);
295
- if (priv.skipCoreAPIModifiers) {
453
+ if (_classPrivateFieldGet(this, _skipCoreAPIModifiers)) {
296
454
  return;
297
455
  }
298
456
  return this.dataManager.countAllRows();
299
457
  }
300
458
 
301
459
  /**
302
- * @private
303
460
  * @param {number} index The index where the data was spliced.
304
461
  * @param {number} amount An amount of items to remove.
305
462
  * @param {object} element An element to add.
306
463
  * @returns {boolean}
307
464
  */
308
465
  onBeforeDataSplice(index, amount, element) {
309
- const priv = privatePool.get(this);
310
- if (priv.skipCoreAPIModifiers || this.dataManager.isRowHighestLevel(index)) {
466
+ if (_classPrivateFieldGet(this, _skipCoreAPIModifiers) || this.dataManager.isRowHighestLevel(index)) {
311
467
  return true;
312
468
  }
313
469
  this.dataManager.spliceData(index, amount, element);
314
470
  return false;
315
471
  }
316
-
317
472
  /**
318
- * Provide custom source data filtering. It's handled by core method and replaces the native filtering.
319
- *
320
- * @private
321
- * @param {number} index The index where the data filtering starts.
322
- * @param {number} amount An amount of rows which filtering applies to.
323
- * @param {number} physicalRows Physical row indexes.
324
- * @returns {Array}
325
- */
326
- onFilterData(index, amount, physicalRows) {
327
- const priv = privatePool.get(this);
328
- this.collapsingUI.collapsedRowsStash.stash();
329
- this.collapsingUI.collapsedRowsStash.trimStash(physicalRows[0], amount);
330
- this.collapsingUI.collapsedRowsStash.shiftStash(physicalRows[0], null, -1 * amount);
331
- this.dataManager.filterData(index, amount, physicalRows);
332
- priv.skipRender = true;
333
- return this.dataManager.getData().slice(); // Data contains reference sometimes.
334
- }
335
-
336
- /**
337
- * `afterContextMenuDefaultOptions` hook callback.
338
- *
339
- * @private
340
- * @param {object} defaultOptions The default context menu items order.
341
- * @returns {boolean}
342
- */
343
- onAfterContextMenuDefaultOptions(defaultOptions) {
344
- return this.contextMenuUI.appendOptions(defaultOptions);
345
- }
346
-
347
- /**
348
- * `afterGetRowHeader` hook callback.
349
- *
350
- * @private
351
- * @param {number} row Row index.
352
- * @param {HTMLElement} TH Row header element.
353
- */
354
- onAfterGetRowHeader(row, TH) {
355
- this.headersUI.appendLevelIndicators(row, TH);
356
- }
357
-
358
- /**
359
- * `modifyRowHeaderWidth` hook callback.
360
- *
361
- * @private
362
- * @param {number} rowHeaderWidth The initial row header width(s).
363
- * @returns {number}
364
- */
365
- onModifyRowHeaderWidth(rowHeaderWidth) {
366
- return this.headersUI.rowHeaderWidthCache || rowHeaderWidth;
367
- }
368
-
369
- /**
370
- * `onAfterRemoveRow` hook callback.
371
- *
372
- * @private
373
- * @param {number} index Removed row.
374
- * @param {number} amount Amount of removed rows.
375
- * @param {Array} logicRows An array of the removed physical rows.
376
- * @param {string} source Source of action.
377
- */
378
- onAfterRemoveRow(index, amount, logicRows, source) {
379
- if (source === this.pluginName) {
380
- return;
381
- }
382
- const priv = privatePool.get(this);
383
- setTimeout(() => {
384
- priv.skipRender = null;
385
- this.headersUI.updateRowHeaderWidth();
386
- this.collapsingUI.collapsedRowsStash.applyStash();
387
- }, 0);
388
- }
389
-
390
- /**
391
- * Callback for the `beforeRemoveRow` change list of removed physical indexes by reference. Removing parent node
392
- * has effect in removing children nodes.
393
- *
394
- * @private
395
- * @param {number} index Visual index of starter row.
396
- * @param {number} amount Amount of rows to be removed.
397
- * @param {Array} physicalRows List of physical indexes.
473
+ * Destroys the plugin instance.
398
474
  */
399
- onBeforeRemoveRow(index, amount, physicalRows) {
400
- const modifiedPhysicalRows = Array.from(physicalRows.reduce((removedRows, physicalIndex) => {
401
- if (this.dataManager.isParent(physicalIndex)) {
402
- const children = this.dataManager.getDataObject(physicalIndex).__children;
403
-
404
- // Preserve a parent in the list of removed rows.
405
- removedRows.add(physicalIndex);
406
- if (Array.isArray(children)) {
407
- // Add a children to the list of removed rows.
408
- children.forEach(child => removedRows.add(this.dataManager.getRowIndex(child)));
409
- }
410
- return removedRows;
411
- }
412
-
413
- // Don't modify list of removed rows when already checked element isn't a parent.
414
- return removedRows.add(physicalIndex);
415
- }, new Set()));
416
-
417
- // Modifying hook's argument by the reference.
418
- physicalRows.length = 0;
419
- physicalRows.push(...modifiedPhysicalRows);
475
+ destroy() {
476
+ super.destroy();
420
477
  }
421
-
422
- /**
423
- * `beforeAddChild` hook callback.
424
- *
425
- * @private
426
- */
427
- onBeforeAddChild() {
428
- this.collapsingUI.collapsedRowsStash.stash();
478
+ }
479
+ exports.NestedRows = NestedRows;
480
+ function _onBeforeRowMove2(rows, finalIndex, dropIndex, movePossible) {
481
+ return this.rowMoveController.onBeforeRowMove(rows, finalIndex, dropIndex, movePossible);
482
+ }
483
+ function _onBeforeOnCellMouseDown2(event, coords, TD) {
484
+ this.collapsingUI.toggleState(event, coords, TD);
485
+ }
486
+ function _onFilterData2(index, amount, physicalRows) {
487
+ this.collapsingUI.collapsedRowsStash.stash();
488
+ this.collapsingUI.collapsedRowsStash.trimStash(physicalRows[0], amount);
489
+ this.collapsingUI.collapsedRowsStash.shiftStash(physicalRows[0], null, -1 * amount);
490
+ this.dataManager.filterData(index, amount, physicalRows);
491
+ _classPrivateFieldSet(this, _skipRender, true);
492
+ return this.dataManager.getData().slice(); // Data contains reference sometimes.
493
+ }
494
+ function _onAfterContextMenuDefaultOptions2(defaultOptions) {
495
+ return this.contextMenuUI.appendOptions(defaultOptions);
496
+ }
497
+ function _onAfterGetRowHeader2(row, TH) {
498
+ this.headersUI.appendLevelIndicators(row, TH);
499
+ }
500
+ function _onModifyRowHeaderWidth2(rowHeaderWidth) {
501
+ return this.headersUI.rowHeaderWidthCache || rowHeaderWidth;
502
+ }
503
+ function _onAfterRemoveRow2(index, amount, logicRows, source) {
504
+ if (source === this.pluginName) {
505
+ return;
429
506
  }
430
-
431
- /**
432
- * `afterAddChild` hook callback.
433
- *
434
- * @private
435
- * @param {object} parent Parent element.
436
- * @param {object} element New child element.
437
- */
438
- onAfterAddChild(parent, element) {
439
- this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(element));
440
- this.collapsingUI.collapsedRowsStash.applyStash();
507
+ this.hot._registerTimeout(() => {
508
+ _classPrivateFieldSet(this, _skipRender, false);
441
509
  this.headersUI.updateRowHeaderWidth();
442
- }
443
-
444
- /**
445
- * `beforeDetachChild` hook callback.
446
- *
447
- * @private
448
- */
449
- onBeforeDetachChild() {
450
- this.collapsingUI.collapsedRowsStash.stash();
451
- }
452
-
453
- /**
454
- * `afterDetachChild` hook callback.
455
- *
456
- * @private
457
- * @param {object} parent Parent element.
458
- * @param {object} element New child element.
459
- * @param {number} finalElementRowIndex The final row index of the detached element.
460
- */
461
- onAfterDetachChild(parent, element, finalElementRowIndex) {
462
- this.collapsingUI.collapsedRowsStash.shiftStash(finalElementRowIndex, null, -1);
463
510
  this.collapsingUI.collapsedRowsStash.applyStash();
464
- this.headersUI.updateRowHeaderWidth();
465
- }
466
-
467
- /**
468
- * `afterCreateRow` hook callback.
469
- *
470
- * @private
471
- */
472
- onAfterCreateRow() {
473
- this.dataManager.rewriteCache();
474
- }
475
-
476
- /**
477
- * `afterInit` hook callback.
478
- *
479
- * @private
480
- */
481
- onAfterInit() {
482
- this.headersUI.updateRowHeaderWidth();
483
- }
484
-
485
- /**
486
- * `beforeViewRender` hook callback.
487
- *
488
- * @param {boolean} force Indicates if the render call was triggered by a change of settings or data.
489
- * @param {object} skipRender An object, holder for skipRender functionality.
490
- * @private
491
- */
492
- onBeforeViewRender(force, skipRender) {
493
- const priv = privatePool.get(this);
494
- if (priv.skipRender) {
495
- skipRender.skipRender = true;
511
+ }, 0);
512
+ }
513
+ function _onBeforeRemoveRow2(index, amount, physicalRows) {
514
+ const modifiedPhysicalRows = Array.from(physicalRows.reduce((removedRows, physicalIndex) => {
515
+ if (this.dataManager.isParent(physicalIndex)) {
516
+ const children = this.dataManager.getDataObject(physicalIndex).__children;
517
+
518
+ // Preserve a parent in the list of removed rows.
519
+ removedRows.add(physicalIndex);
520
+ if (Array.isArray(children)) {
521
+ // Add a children to the list of removed rows.
522
+ children.forEach(child => removedRows.add(this.dataManager.getRowIndex(child)));
523
+ }
524
+ return removedRows;
496
525
  }
497
- }
498
526
 
499
- /**
500
- * Destroys the plugin instance.
501
- */
502
- destroy() {
503
- super.destroy();
504
- }
527
+ // Don't modify list of removed rows when already checked element isn't a parent.
528
+ return removedRows.add(physicalIndex);
529
+ }, new Set()));
505
530
 
506
- /**
507
- * `beforeLoadData` hook callback.
508
- *
509
- * @param {Array} data The source data.
510
- * @private
511
- */
512
- onBeforeLoadData(data) {
513
- if (!(0, _data.isArrayOfObjects)(data)) {
514
- (0, _console.error)(WRONG_DATA_TYPE_ERROR);
515
- this.hot.getSettings()[PLUGIN_KEY] = false;
516
- this.disablePlugin();
517
- return;
518
- }
519
- this.dataManager.setData(data);
520
- this.dataManager.rewriteCache();
531
+ // Modifying hook's argument by the reference.
532
+ physicalRows.length = 0;
533
+ physicalRows.push(...modifiedPhysicalRows);
534
+ }
535
+ function _onBeforeAddChild2() {
536
+ this.collapsingUI.collapsedRowsStash.stash();
537
+ }
538
+ function _onAfterAddChild2(parent, element) {
539
+ this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(element));
540
+ this.collapsingUI.collapsedRowsStash.applyStash();
541
+ this.headersUI.updateRowHeaderWidth();
542
+ }
543
+ function _onBeforeDetachChild2() {
544
+ this.collapsingUI.collapsedRowsStash.stash();
545
+ }
546
+ function _onAfterDetachChild2(parent, element, finalElementRowIndex) {
547
+ this.collapsingUI.collapsedRowsStash.shiftStash(finalElementRowIndex, null, -1);
548
+ this.collapsingUI.collapsedRowsStash.applyStash();
549
+ this.headersUI.updateRowHeaderWidth();
550
+ }
551
+ function _onAfterCreateRow2() {
552
+ this.dataManager.rewriteCache();
553
+ }
554
+ function _onAfterInit2() {
555
+ this.headersUI.updateRowHeaderWidth();
556
+ }
557
+ function _onBeforeViewRender2(force, skipRender) {
558
+ if (_classPrivateFieldGet(this, _skipRender)) {
559
+ skipRender.skipRender = true;
521
560
  }
522
561
  }
523
- exports.NestedRows = NestedRows;
562
+ function _onBeforeLoadData2(data) {
563
+ if (!(0, _data.isArrayOfObjects)(data)) {
564
+ (0, _console.error)(WRONG_DATA_TYPE_ERROR);
565
+ this.hot.getSettings()[PLUGIN_KEY] = false;
566
+ this.disablePlugin();
567
+ return;
568
+ }
569
+ this.dataManager.setData(data);
570
+ this.dataManager.rewriteCache();
571
+ }