handsontable 0.0.0-next-2becb78-20240313 → 0.0.0-next-bff5041-20240315

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 (272) hide show
  1. package/3rdparty/walkontable/src/calculator/viewportColumns.js +12 -17
  2. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +12 -17
  3. package/3rdparty/walkontable/src/calculator/viewportRows.js +10 -15
  4. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +10 -15
  5. package/3rdparty/walkontable/src/cell/coords.js +12 -17
  6. package/3rdparty/walkontable/src/cell/coords.mjs +12 -17
  7. package/3rdparty/walkontable/src/cell/range.d.ts +0 -1
  8. package/3rdparty/walkontable/src/cell/range.js +23 -45
  9. package/3rdparty/walkontable/src/cell/range.mjs +23 -45
  10. package/3rdparty/walkontable/src/core/_base.js +1 -1
  11. package/3rdparty/walkontable/src/core/_base.mjs +1 -1
  12. package/3rdparty/walkontable/src/event.js +72 -104
  13. package/3rdparty/walkontable/src/event.mjs +72 -104
  14. package/3rdparty/walkontable/src/overlays.js +1 -1
  15. package/3rdparty/walkontable/src/overlays.mjs +1 -1
  16. package/3rdparty/walkontable/src/scroll.js +15 -17
  17. package/3rdparty/walkontable/src/scroll.mjs +15 -17
  18. package/3rdparty/walkontable/src/selection/manager.js +48 -69
  19. package/3rdparty/walkontable/src/selection/manager.mjs +48 -69
  20. package/3rdparty/walkontable/src/selection/scanner.js +33 -42
  21. package/3rdparty/walkontable/src/selection/scanner.mjs +33 -42
  22. package/3rdparty/walkontable/src/utils/columnStretching.js +27 -44
  23. package/3rdparty/walkontable/src/utils/columnStretching.mjs +27 -44
  24. package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
  25. package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
  26. package/base.js +2 -2
  27. package/base.mjs +2 -2
  28. package/core/viewportScroll/index.js +1 -4
  29. package/core/viewportScroll/index.mjs +1 -4
  30. package/core.d.ts +3 -4
  31. package/core.js +22 -82
  32. package/core.mjs +22 -82
  33. package/dataMap/dataSource.js +1 -1
  34. package/dataMap/dataSource.mjs +1 -1
  35. package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
  36. package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
  37. package/dataMap/replaceData.js +1 -1
  38. package/dataMap/replaceData.mjs +1 -1
  39. package/dist/handsontable.css +2 -2
  40. package/dist/handsontable.full.css +2 -2
  41. package/dist/handsontable.full.js +7619 -10404
  42. package/dist/handsontable.full.min.css +2 -2
  43. package/dist/handsontable.full.min.js +277 -277
  44. package/dist/handsontable.js +5525 -7857
  45. package/dist/handsontable.min.css +2 -2
  46. package/dist/handsontable.min.js +33 -33
  47. package/dist/languages/all.min.js +1 -1
  48. package/dist/languages/ar-AR.min.js +1 -1
  49. package/dist/languages/cs-CZ.min.js +1 -1
  50. package/dist/languages/de-CH.min.js +1 -1
  51. package/dist/languages/de-DE.min.js +1 -1
  52. package/dist/languages/en-US.min.js +1 -1
  53. package/dist/languages/es-MX.min.js +1 -1
  54. package/dist/languages/fr-FR.min.js +1 -1
  55. package/dist/languages/hr-HR.min.js +1 -1
  56. package/dist/languages/it-IT.min.js +1 -1
  57. package/dist/languages/ja-JP.min.js +1 -1
  58. package/dist/languages/ko-KR.min.js +1 -1
  59. package/dist/languages/lv-LV.min.js +1 -1
  60. package/dist/languages/nb-NO.min.js +1 -1
  61. package/dist/languages/nl-NL.min.js +1 -1
  62. package/dist/languages/pl-PL.min.js +1 -1
  63. package/dist/languages/pt-BR.min.js +1 -1
  64. package/dist/languages/ru-RU.min.js +1 -1
  65. package/dist/languages/sr-SP.min.js +1 -1
  66. package/dist/languages/zh-CN.min.js +1 -1
  67. package/dist/languages/zh-TW.min.js +1 -1
  68. package/editorManager.js +21 -27
  69. package/editorManager.mjs +21 -27
  70. package/editors/autocompleteEditor/autocompleteEditor.js +6 -10
  71. package/editors/autocompleteEditor/autocompleteEditor.mjs +6 -10
  72. package/eventManager.js +1 -1
  73. package/eventManager.mjs +1 -1
  74. package/focusManager.js +58 -82
  75. package/focusManager.mjs +58 -82
  76. package/helpers/dom/element.js +1 -1
  77. package/helpers/dom/element.mjs +1 -1
  78. package/helpers/mixed.js +1 -1
  79. package/helpers/mixed.mjs +1 -1
  80. package/helpers/object.js +2 -2
  81. package/helpers/object.mjs +2 -2
  82. package/index.d.ts +10 -0
  83. package/package.json +2 -1
  84. package/pluginHooks.d.ts +0 -4
  85. package/pluginHooks.js +2 -44
  86. package/pluginHooks.mjs +2 -44
  87. package/plugins/autoColumnSize/autoColumnSize.js +49 -65
  88. package/plugins/autoColumnSize/autoColumnSize.mjs +49 -65
  89. package/plugins/autoRowSize/autoRowSize.js +28 -34
  90. package/plugins/autoRowSize/autoRowSize.mjs +28 -34
  91. package/plugins/autofill/autofill.js +30 -38
  92. package/plugins/autofill/autofill.mjs +30 -38
  93. package/plugins/base/base.js +12 -17
  94. package/plugins/base/base.mjs +12 -17
  95. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
  96. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
  97. package/plugins/collapsibleColumns/collapsibleColumns.js +36 -54
  98. package/plugins/collapsibleColumns/collapsibleColumns.mjs +36 -54
  99. package/plugins/columnSorting/columnSorting.js +40 -46
  100. package/plugins/columnSorting/columnSorting.mjs +40 -46
  101. package/plugins/columnSummary/columnSummary.js +22 -26
  102. package/plugins/columnSummary/columnSummary.mjs +22 -26
  103. package/plugins/comments/comments.js +116 -158
  104. package/plugins/comments/comments.mjs +116 -158
  105. package/plugins/contextMenu/contextMenu.js +20 -26
  106. package/plugins/contextMenu/contextMenu.mjs +20 -26
  107. package/plugins/contextMenu/itemsFactory.js +1 -1
  108. package/plugins/contextMenu/itemsFactory.mjs +1 -1
  109. package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
  110. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
  111. package/plugins/contextMenu/menu/menu.js +13 -21
  112. package/plugins/contextMenu/menu/menu.mjs +13 -21
  113. package/plugins/contextMenu/menu/positioner.js +41 -58
  114. package/plugins/contextMenu/menu/positioner.mjs +41 -58
  115. package/plugins/copyPaste/copyPaste.js +113 -154
  116. package/plugins/copyPaste/copyPaste.mjs +113 -154
  117. package/plugins/copyPaste/copyableRanges.js +43 -66
  118. package/plugins/copyPaste/copyableRanges.mjs +43 -66
  119. package/plugins/customBorders/customBorders.js +11 -13
  120. package/plugins/customBorders/customBorders.mjs +11 -13
  121. package/plugins/dragToScroll/dragToScroll.js +6 -6
  122. package/plugins/dragToScroll/dragToScroll.mjs +6 -6
  123. package/plugins/dropdownMenu/dropdownMenu.js +78 -100
  124. package/plugins/dropdownMenu/dropdownMenu.mjs +78 -100
  125. package/plugins/exportFile/dataProvider.js +1 -1
  126. package/plugins/exportFile/dataProvider.mjs +1 -1
  127. package/plugins/filters/component/actionBar.js +9 -9
  128. package/plugins/filters/component/actionBar.mjs +8 -8
  129. package/plugins/filters/component/condition.js +13 -15
  130. package/plugins/filters/component/condition.mjs +13 -15
  131. package/plugins/filters/component/operators.js +6 -6
  132. package/plugins/filters/component/operators.mjs +6 -6
  133. package/plugins/filters/component/value.js +24 -28
  134. package/plugins/filters/component/value.mjs +24 -28
  135. package/plugins/filters/conditionUpdateObserver.js +22 -24
  136. package/plugins/filters/conditionUpdateObserver.mjs +22 -24
  137. package/plugins/filters/dataFilter.js +1 -1
  138. package/plugins/filters/dataFilter.mjs +1 -1
  139. package/plugins/filters/filters.js +81 -95
  140. package/plugins/filters/filters.mjs +81 -95
  141. package/plugins/filters/ui/input.js +13 -19
  142. package/plugins/filters/ui/input.mjs +13 -19
  143. package/plugins/filters/ui/link.js +8 -13
  144. package/plugins/filters/ui/link.mjs +8 -13
  145. package/plugins/filters/ui/multipleSelect.js +85 -112
  146. package/plugins/filters/ui/multipleSelect.mjs +85 -112
  147. package/plugins/filters/ui/radioInput.js +12 -20
  148. package/plugins/filters/ui/radioInput.mjs +12 -20
  149. package/plugins/filters/ui/select.js +50 -72
  150. package/plugins/filters/ui/select.mjs +49 -71
  151. package/plugins/formulas/formulas.js +268 -326
  152. package/plugins/formulas/formulas.mjs +269 -327
  153. package/plugins/formulas/indexSyncer/axisSyncer.js +38 -61
  154. package/plugins/formulas/indexSyncer/axisSyncer.mjs +38 -61
  155. package/plugins/formulas/indexSyncer/index.js +25 -48
  156. package/plugins/formulas/indexSyncer/index.mjs +25 -48
  157. package/plugins/hiddenColumns/hiddenColumns.js +64 -83
  158. package/plugins/hiddenColumns/hiddenColumns.mjs +64 -83
  159. package/plugins/hiddenRows/hiddenRows.js +63 -82
  160. package/plugins/hiddenRows/hiddenRows.mjs +63 -82
  161. package/plugins/manualColumnFreeze/manualColumnFreeze.js +24 -32
  162. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +25 -33
  163. package/plugins/manualColumnMove/manualColumnMove.js +126 -170
  164. package/plugins/manualColumnMove/manualColumnMove.mjs +126 -170
  165. package/plugins/manualColumnResize/manualColumnResize.js +169 -230
  166. package/plugins/manualColumnResize/manualColumnResize.mjs +169 -230
  167. package/plugins/manualRowMove/manualRowMove.js +99 -128
  168. package/plugins/manualRowMove/manualRowMove.mjs +99 -128
  169. package/plugins/manualRowResize/manualRowResize.js +150 -209
  170. package/plugins/manualRowResize/manualRowResize.mjs +150 -209
  171. package/plugins/mergeCells/calculations/selection.js +71 -2
  172. package/plugins/mergeCells/calculations/selection.mjs +71 -2
  173. package/plugins/mergeCells/cellsCollection.js +1 -117
  174. package/plugins/mergeCells/cellsCollection.mjs +1 -117
  175. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
  176. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
  177. package/plugins/mergeCells/mergeCells.js +353 -593
  178. package/plugins/mergeCells/mergeCells.mjs +353 -593
  179. package/plugins/multiColumnSorting/multiColumnSorting.js +0 -6
  180. package/plugins/multiColumnSorting/multiColumnSorting.mjs +0 -6
  181. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
  182. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
  183. package/plugins/nestedHeaders/nestedHeaders.js +204 -254
  184. package/plugins/nestedHeaders/nestedHeaders.mjs +205 -255
  185. package/plugins/nestedHeaders/stateManager/headersTree.js +21 -32
  186. package/plugins/nestedHeaders/stateManager/headersTree.mjs +21 -32
  187. package/plugins/nestedHeaders/stateManager/index.js +30 -41
  188. package/plugins/nestedHeaders/stateManager/index.mjs +30 -41
  189. package/plugins/nestedHeaders/stateManager/sourceSettings.js +19 -30
  190. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +19 -30
  191. package/plugins/nestedRows/data/dataManager.js +1 -1
  192. package/plugins/nestedRows/data/dataManager.mjs +1 -1
  193. package/plugins/nestedRows/nestedRows.js +138 -179
  194. package/plugins/nestedRows/nestedRows.mjs +139 -180
  195. package/plugins/nestedRows/ui/contextMenu.js +11 -15
  196. package/plugins/nestedRows/ui/contextMenu.mjs +10 -14
  197. package/plugins/nestedRows/utils/rowMoveController.js +1 -1
  198. package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
  199. package/plugins/persistentState/storage.js +2 -2
  200. package/plugins/persistentState/storage.mjs +2 -2
  201. package/plugins/search/search.js +7 -7
  202. package/plugins/search/search.mjs +7 -7
  203. package/plugins/touchScroll/touchScroll.js +15 -19
  204. package/plugins/touchScroll/touchScroll.mjs +16 -20
  205. package/plugins/trimRows/trimRows.js +6 -6
  206. package/plugins/trimRows/trimRows.mjs +6 -6
  207. package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
  208. package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
  209. package/selection/highlight/highlight.js +14 -14
  210. package/selection/highlight/highlight.mjs +13 -13
  211. package/selection/highlight/visualSelection.js +2 -16
  212. package/selection/highlight/visualSelection.mjs +2 -16
  213. package/selection/selection.js +60 -255
  214. package/selection/selection.mjs +59 -254
  215. package/selection/transformation.js +101 -175
  216. package/selection/transformation.mjs +101 -175
  217. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  218. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  219. package/shortcutContexts/commands/editor/open.js +3 -18
  220. package/shortcutContexts/commands/editor/open.mjs +3 -18
  221. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  222. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  223. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  224. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  225. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  226. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  227. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  228. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  229. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
  230. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
  231. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
  232. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
  233. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
  234. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
  235. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
  236. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
  237. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
  238. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
  239. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
  240. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
  241. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  242. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  243. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  244. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  245. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
  246. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
  247. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
  248. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
  249. package/shortcutContexts/grid.js +2 -2
  250. package/shortcutContexts/grid.mjs +2 -2
  251. package/shortcuts/context.js +1 -2
  252. package/shortcuts/context.mjs +1 -2
  253. package/tableView.js +52 -98
  254. package/tableView.mjs +52 -98
  255. package/translations/changesObservable/observable.js +21 -38
  256. package/translations/changesObservable/observable.mjs +21 -38
  257. package/translations/changesObservable/observer.js +7 -12
  258. package/translations/changesObservable/observer.mjs +6 -11
  259. package/translations/mapCollections/aggregatedCollection.js +1 -1
  260. package/translations/mapCollections/aggregatedCollection.mjs +1 -1
  261. package/translations/maps/indexMap.js +1 -1
  262. package/translations/maps/indexMap.mjs +1 -1
  263. package/utils/dataStructures/linkedList.js +1 -6
  264. package/utils/dataStructures/linkedList.mjs +1 -6
  265. package/utils/dataStructures/tree.js +1 -1
  266. package/utils/dataStructures/tree.mjs +1 -1
  267. package/utils/interval.js +26 -44
  268. package/utils/interval.mjs +26 -44
  269. package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
  270. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
  271. package/plugins/mergeCells/focusOrder.js +0 -327
  272. package/plugins/mergeCells/focusOrder.mjs +0 -322
@@ -1,17 +1,14 @@
1
- import "core-js/modules/es.array.push.js";
2
1
  import "core-js/modules/es.error.cause.js";
2
+ import "core-js/modules/es.array.push.js";
3
3
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
4
4
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
5
5
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
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
7
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
8
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
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
10
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
11
- function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
12
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
13
- 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; } }
14
- function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
9
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
10
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
11
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
15
12
  import { BasePlugin } from "../base/index.mjs";
16
13
  import DataManager from "./data/dataManager.mjs";
17
14
  import CollapsingUI from "./ui/collapsing.mjs";
@@ -20,7 +17,6 @@ import ContextMenuUI from "./ui/contextMenu.mjs";
20
17
  import { error } from "../../helpers/console.mjs";
21
18
  import { isArrayOfObjects } from "../../helpers/data.mjs";
22
19
  import { TrimmingMap } from "../../translations/index.mjs";
23
- import { EDITOR_EDIT_GROUP as SHORTCUTS_GROUP_EDITOR } from "../../shortcutContexts/index.mjs";
24
20
  import RowMoveController from "./utils/rowMoveController.mjs";
25
21
  export const PLUGIN_KEY = 'nestedRows';
26
22
  export const PLUGIN_PRIORITY = 300;
@@ -41,125 +37,10 @@ const WRONG_DATA_TYPE_ERROR = 'The Nested Rows plugin requires an Array of Objec
41
37
  */
42
38
  var _skipRender = /*#__PURE__*/new WeakMap();
43
39
  var _skipCoreAPIModifiers = /*#__PURE__*/new WeakMap();
44
- var _onBeforeRowMove = /*#__PURE__*/new WeakSet();
45
- var _onBeforeOnCellMouseDown = /*#__PURE__*/new WeakSet();
46
- var _onFilterData = /*#__PURE__*/new WeakSet();
47
- var _onAfterContextMenuDefaultOptions = /*#__PURE__*/new WeakSet();
48
- var _onAfterGetRowHeader = /*#__PURE__*/new WeakSet();
49
- var _onModifyRowHeaderWidth = /*#__PURE__*/new WeakSet();
50
- var _onAfterRemoveRow = /*#__PURE__*/new WeakSet();
51
- var _onBeforeRemoveRow = /*#__PURE__*/new WeakSet();
52
- var _onBeforeAddChild = /*#__PURE__*/new WeakSet();
53
- var _onAfterAddChild = /*#__PURE__*/new WeakSet();
54
- var _onBeforeDetachChild = /*#__PURE__*/new WeakSet();
55
- var _onAfterDetachChild = /*#__PURE__*/new WeakSet();
56
- var _onAfterCreateRow = /*#__PURE__*/new WeakSet();
57
- var _onAfterInit = /*#__PURE__*/new WeakSet();
58
- var _onBeforeViewRender = /*#__PURE__*/new WeakSet();
59
- var _onBeforeLoadData = /*#__PURE__*/new WeakSet();
40
+ var _NestedRows_brand = /*#__PURE__*/new WeakSet();
60
41
  export class NestedRows extends BasePlugin {
61
42
  constructor() {
62
43
  super(...arguments);
63
- /**
64
- * `beforeLoadData` hook callback.
65
- *
66
- * @param {Array} data The source data.
67
- */
68
- _classPrivateMethodInitSpec(this, _onBeforeLoadData);
69
- /**
70
- * `beforeViewRender` hook callback.
71
- *
72
- * @param {boolean} force Indicates if the render call was triggered by a change of settings or data.
73
- * @param {object} skipRender An object, holder for skipRender functionality.
74
- */
75
- _classPrivateMethodInitSpec(this, _onBeforeViewRender);
76
- /**
77
- * `afterInit` hook callback.
78
- */
79
- _classPrivateMethodInitSpec(this, _onAfterInit);
80
- /**
81
- * `afterCreateRow` hook callback.
82
- */
83
- _classPrivateMethodInitSpec(this, _onAfterCreateRow);
84
- /**
85
- * `afterDetachChild` hook callback.
86
- *
87
- * @param {object} parent Parent element.
88
- * @param {object} element New child element.
89
- * @param {number} finalElementRowIndex The final row index of the detached element.
90
- */
91
- _classPrivateMethodInitSpec(this, _onAfterDetachChild);
92
- /**
93
- * `beforeDetachChild` hook callback.
94
- */
95
- _classPrivateMethodInitSpec(this, _onBeforeDetachChild);
96
- /**
97
- * `afterAddChild` hook callback.
98
- *
99
- * @param {object} parent Parent element.
100
- * @param {object} element New child element.
101
- */
102
- _classPrivateMethodInitSpec(this, _onAfterAddChild);
103
- /**
104
- * `beforeAddChild` hook callback.
105
- */
106
- _classPrivateMethodInitSpec(this, _onBeforeAddChild);
107
- /**
108
- * Callback for the `beforeRemoveRow` change list of removed physical indexes by reference. Removing parent node
109
- * has effect in removing children nodes.
110
- *
111
- * @param {number} index Visual index of starter row.
112
- * @param {number} amount Amount of rows to be removed.
113
- * @param {Array} physicalRows List of physical indexes.
114
- */
115
- _classPrivateMethodInitSpec(this, _onBeforeRemoveRow);
116
- /**
117
- * `onAfterRemoveRow` hook callback.
118
- *
119
- * @param {number} index Removed row.
120
- * @param {number} amount Amount of removed rows.
121
- * @param {Array} logicRows An array of the removed physical rows.
122
- * @param {string} source Source of action.
123
- */
124
- _classPrivateMethodInitSpec(this, _onAfterRemoveRow);
125
- /**
126
- * `modifyRowHeaderWidth` hook callback.
127
- *
128
- * @param {number} rowHeaderWidth The initial row header width(s).
129
- * @returns {number}
130
- */
131
- _classPrivateMethodInitSpec(this, _onModifyRowHeaderWidth);
132
- /**
133
- * `afterGetRowHeader` hook callback.
134
- *
135
- * @param {number} row Row index.
136
- * @param {HTMLElement} TH Row header element.
137
- */
138
- _classPrivateMethodInitSpec(this, _onAfterGetRowHeader);
139
- /**
140
- * `afterContextMenuDefaultOptions` hook callback.
141
- *
142
- * @param {object} defaultOptions The default context menu items order.
143
- * @returns {boolean}
144
- */
145
- _classPrivateMethodInitSpec(this, _onAfterContextMenuDefaultOptions);
146
- /**
147
- * Provide custom source data filtering. It's handled by core method and replaces the native filtering.
148
- *
149
- * @param {number} index The index where the data filtering starts.
150
- * @param {number} amount An amount of rows which filtering applies to.
151
- * @param {number} physicalRows Physical row indexes.
152
- * @returns {Array}
153
- */
154
- _classPrivateMethodInitSpec(this, _onFilterData);
155
- /**
156
- * `beforeOnCellMousedown` hook callback.
157
- *
158
- * @param {MouseEvent} event Mousedown event.
159
- * @param {object} coords Cell coords.
160
- * @param {HTMLElement} TD Clicked cell.
161
- */
162
- _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseDown);
163
44
  /**
164
45
  * `beforeRowMove` hook callback.
165
46
  *
@@ -174,7 +55,7 @@ export class NestedRows extends BasePlugin {
174
55
  * @fires Hooks#afterRowMove
175
56
  * @returns {boolean}
176
57
  */
177
- _classPrivateMethodInitSpec(this, _onBeforeRowMove);
58
+ _classPrivateMethodInitSpec(this, _NestedRows_brand);
178
59
  /**
179
60
  * Reference to the DataManager instance.
180
61
  *
@@ -201,19 +82,13 @@ export class NestedRows extends BasePlugin {
201
82
  *
202
83
  * @type {boolean}
203
84
  */
204
- _classPrivateFieldInitSpec(this, _skipRender, {
205
- writable: true,
206
- value: false
207
- });
85
+ _classPrivateFieldInitSpec(this, _skipRender, false);
208
86
  /**
209
87
  * Allows skipping the internal Core methods call if set as `true`.
210
88
  *
211
89
  * @type {boolean}
212
90
  */
213
- _classPrivateFieldInitSpec(this, _skipCoreAPIModifiers, {
214
- writable: true,
215
- value: false
216
- });
91
+ _classPrivateFieldInitSpec(this, _skipCoreAPIModifiers, false);
217
92
  }
218
93
  static get PLUGIN_KEY() {
219
94
  return PLUGIN_KEY;
@@ -249,13 +124,13 @@ export class NestedRows extends BasePlugin {
249
124
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
250
125
  args[_key] = arguments[_key];
251
126
  }
252
- return _classPrivateMethodGet(_this, _onAfterInit, _onAfterInit2).call(_this, ...args);
127
+ return _assertClassBrand(_NestedRows_brand, _this, _onAfterInit).call(_this, ...args);
253
128
  });
254
129
  this.addHook('beforeViewRender', function () {
255
130
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
256
131
  args[_key2] = arguments[_key2];
257
132
  }
258
- return _classPrivateMethodGet(_this, _onBeforeViewRender, _onBeforeViewRender2).call(_this, ...args);
133
+ return _assertClassBrand(_NestedRows_brand, _this, _onBeforeViewRender).call(_this, ...args);
259
134
  });
260
135
  this.addHook('modifyRowData', function () {
261
136
  return _this.onModifyRowData(...arguments);
@@ -270,82 +145,82 @@ export class NestedRows extends BasePlugin {
270
145
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
271
146
  args[_key3] = arguments[_key3];
272
147
  }
273
- return _classPrivateMethodGet(_this, _onFilterData, _onFilterData2).call(_this, ...args);
148
+ return _assertClassBrand(_NestedRows_brand, _this, _onFilterData).call(_this, ...args);
274
149
  });
275
150
  this.addHook('afterContextMenuDefaultOptions', function () {
276
151
  for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
277
152
  args[_key4] = arguments[_key4];
278
153
  }
279
- return _classPrivateMethodGet(_this, _onAfterContextMenuDefaultOptions, _onAfterContextMenuDefaultOptions2).call(_this, ...args);
154
+ return _assertClassBrand(_NestedRows_brand, _this, _onAfterContextMenuDefaultOptions).call(_this, ...args);
280
155
  });
281
156
  this.addHook('afterGetRowHeader', function () {
282
157
  for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
283
158
  args[_key5] = arguments[_key5];
284
159
  }
285
- return _classPrivateMethodGet(_this, _onAfterGetRowHeader, _onAfterGetRowHeader2).call(_this, ...args);
160
+ return _assertClassBrand(_NestedRows_brand, _this, _onAfterGetRowHeader).call(_this, ...args);
286
161
  });
287
162
  this.addHook('beforeOnCellMouseDown', function () {
288
163
  for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
289
164
  args[_key6] = arguments[_key6];
290
165
  }
291
- return _classPrivateMethodGet(_this, _onBeforeOnCellMouseDown, _onBeforeOnCellMouseDown2).call(_this, ...args);
166
+ return _assertClassBrand(_NestedRows_brand, _this, _onBeforeOnCellMouseDown).call(_this, ...args);
292
167
  });
293
168
  this.addHook('beforeRemoveRow', function () {
294
169
  for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
295
170
  args[_key7] = arguments[_key7];
296
171
  }
297
- return _classPrivateMethodGet(_this, _onBeforeRemoveRow, _onBeforeRemoveRow2).call(_this, ...args);
172
+ return _assertClassBrand(_NestedRows_brand, _this, _onBeforeRemoveRow).call(_this, ...args);
298
173
  });
299
174
  this.addHook('afterRemoveRow', function () {
300
175
  for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
301
176
  args[_key8] = arguments[_key8];
302
177
  }
303
- return _classPrivateMethodGet(_this, _onAfterRemoveRow, _onAfterRemoveRow2).call(_this, ...args);
178
+ return _assertClassBrand(_NestedRows_brand, _this, _onAfterRemoveRow).call(_this, ...args);
304
179
  });
305
180
  this.addHook('beforeAddChild', function () {
306
181
  for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
307
182
  args[_key9] = arguments[_key9];
308
183
  }
309
- return _classPrivateMethodGet(_this, _onBeforeAddChild, _onBeforeAddChild2).call(_this, ...args);
184
+ return _assertClassBrand(_NestedRows_brand, _this, _onBeforeAddChild).call(_this, ...args);
310
185
  });
311
186
  this.addHook('afterAddChild', function () {
312
187
  for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
313
188
  args[_key10] = arguments[_key10];
314
189
  }
315
- return _classPrivateMethodGet(_this, _onAfterAddChild, _onAfterAddChild2).call(_this, ...args);
190
+ return _assertClassBrand(_NestedRows_brand, _this, _onAfterAddChild).call(_this, ...args);
316
191
  });
317
192
  this.addHook('beforeDetachChild', function () {
318
193
  for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
319
194
  args[_key11] = arguments[_key11];
320
195
  }
321
- return _classPrivateMethodGet(_this, _onBeforeDetachChild, _onBeforeDetachChild2).call(_this, ...args);
196
+ return _assertClassBrand(_NestedRows_brand, _this, _onBeforeDetachChild).call(_this, ...args);
322
197
  });
323
198
  this.addHook('afterDetachChild', function () {
324
199
  for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
325
200
  args[_key12] = arguments[_key12];
326
201
  }
327
- return _classPrivateMethodGet(_this, _onAfterDetachChild, _onAfterDetachChild2).call(_this, ...args);
202
+ return _assertClassBrand(_NestedRows_brand, _this, _onAfterDetachChild).call(_this, ...args);
328
203
  });
329
204
  this.addHook('modifyRowHeaderWidth', function () {
330
205
  for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
331
206
  args[_key13] = arguments[_key13];
332
207
  }
333
- return _classPrivateMethodGet(_this, _onModifyRowHeaderWidth, _onModifyRowHeaderWidth2).call(_this, ...args);
208
+ return _assertClassBrand(_NestedRows_brand, _this, _onModifyRowHeaderWidth).call(_this, ...args);
334
209
  });
335
210
  this.addHook('afterCreateRow', function () {
336
211
  for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
337
212
  args[_key14] = arguments[_key14];
338
213
  }
339
- return _classPrivateMethodGet(_this, _onAfterCreateRow, _onAfterCreateRow2).call(_this, ...args);
214
+ return _assertClassBrand(_NestedRows_brand, _this, _onAfterCreateRow).call(_this, ...args);
340
215
  });
341
216
  this.addHook('beforeRowMove', function () {
342
217
  for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
343
218
  args[_key15] = arguments[_key15];
344
219
  }
345
- return _classPrivateMethodGet(_this, _onBeforeRowMove, _onBeforeRowMove2).call(_this, ...args);
220
+ return _assertClassBrand(_NestedRows_brand, _this, _onBeforeRowMove).call(_this, ...args);
346
221
  });
347
- this.addHook('beforeLoadData', data => _classPrivateMethodGet(this, _onBeforeLoadData, _onBeforeLoadData2).call(this, data));
348
- this.addHook('beforeUpdateData', data => _classPrivateMethodGet(this, _onBeforeLoadData, _onBeforeLoadData2).call(this, data));
222
+ this.addHook('beforeLoadData', data => _assertClassBrand(_NestedRows_brand, this, _onBeforeLoadData).call(this, data));
223
+ this.addHook('beforeUpdateData', data => _assertClassBrand(_NestedRows_brand, this, _onBeforeLoadData).call(this, data));
349
224
  this.registerShortcuts();
350
225
  super.enablePlugin();
351
226
  }
@@ -397,18 +272,13 @@ export class NestedRows extends BasePlugin {
397
272
  this.collapsingUI.collapseChildren(row);
398
273
  }
399
274
  }
400
-
401
- // prevent default Enter behavior (move to the next row within a selection range)
402
- return false;
403
275
  },
404
276
  runOnlyIf: () => {
405
277
  var _this$hot$getSelected;
406
278
  const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
407
279
  return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
408
280
  },
409
- group: SHORTCUTS_GROUP,
410
- relativeToGroup: SHORTCUTS_GROUP_EDITOR,
411
- position: 'before'
281
+ group: SHORTCUTS_GROUP
412
282
  });
413
283
  }
414
284
 
@@ -427,7 +297,7 @@ export class NestedRows extends BasePlugin {
427
297
  * @private
428
298
  */
429
299
  disableCoreAPIModifiers() {
430
- _classPrivateFieldSet(this, _skipCoreAPIModifiers, true);
300
+ _classPrivateFieldSet(_skipCoreAPIModifiers, this, true);
431
301
  }
432
302
 
433
303
  /**
@@ -436,8 +306,17 @@ export class NestedRows extends BasePlugin {
436
306
  * @private
437
307
  */
438
308
  enableCoreAPIModifiers() {
439
- _classPrivateFieldSet(this, _skipCoreAPIModifiers, false);
309
+ _classPrivateFieldSet(_skipCoreAPIModifiers, this, false);
440
310
  }
311
+
312
+ /**
313
+ * `beforeOnCellMousedown` hook callback.
314
+ *
315
+ * @param {MouseEvent} event Mousedown event.
316
+ * @param {object} coords Cell coords.
317
+ * @param {HTMLElement} TD Clicked cell.
318
+ */
319
+
441
320
  /**
442
321
  * The modifyRowData hook callback.
443
322
  *
@@ -446,7 +325,7 @@ export class NestedRows extends BasePlugin {
446
325
  * @returns {boolean}
447
326
  */
448
327
  onModifyRowData(row) {
449
- if (_classPrivateFieldGet(this, _skipCoreAPIModifiers)) {
328
+ if (_classPrivateFieldGet(_skipCoreAPIModifiers, this)) {
450
329
  return;
451
330
  }
452
331
  return this.dataManager.getDataObject(row);
@@ -459,7 +338,7 @@ export class NestedRows extends BasePlugin {
459
338
  * @returns {number}
460
339
  */
461
340
  onModifySourceLength() {
462
- if (_classPrivateFieldGet(this, _skipCoreAPIModifiers)) {
341
+ if (_classPrivateFieldGet(_skipCoreAPIModifiers, this)) {
463
342
  return;
464
343
  }
465
344
  return this.dataManager.countAllRows();
@@ -473,12 +352,22 @@ export class NestedRows extends BasePlugin {
473
352
  * @returns {boolean}
474
353
  */
475
354
  onBeforeDataSplice(index, amount, element) {
476
- if (_classPrivateFieldGet(this, _skipCoreAPIModifiers) || this.dataManager.isRowHighestLevel(index)) {
355
+ if (_classPrivateFieldGet(_skipCoreAPIModifiers, this) || this.dataManager.isRowHighestLevel(index)) {
477
356
  return true;
478
357
  }
479
358
  this.dataManager.spliceData(index, amount, element);
480
359
  return false;
481
360
  }
361
+
362
+ /**
363
+ * Provide custom source data filtering. It's handled by core method and replaces the native filtering.
364
+ *
365
+ * @param {number} index The index where the data filtering starts.
366
+ * @param {number} amount An amount of rows which filtering applies to.
367
+ * @param {number} physicalRows Physical row indexes.
368
+ * @returns {Array}
369
+ */
370
+
482
371
  /**
483
372
  * Destroys the plugin instance.
484
373
  */
@@ -486,40 +375,74 @@ export class NestedRows extends BasePlugin {
486
375
  super.destroy();
487
376
  }
488
377
  }
489
- function _onBeforeRowMove2(rows, finalIndex, dropIndex, movePossible) {
378
+ function _onBeforeRowMove(rows, finalIndex, dropIndex, movePossible) {
490
379
  return this.rowMoveController.onBeforeRowMove(rows, finalIndex, dropIndex, movePossible);
491
380
  }
492
- function _onBeforeOnCellMouseDown2(event, coords, TD) {
381
+ function _onBeforeOnCellMouseDown(event, coords, TD) {
493
382
  this.collapsingUI.toggleState(event, coords, TD);
494
383
  }
495
- function _onFilterData2(index, amount, physicalRows) {
384
+ function _onFilterData(index, amount, physicalRows) {
496
385
  this.collapsingUI.collapsedRowsStash.stash();
497
386
  this.collapsingUI.collapsedRowsStash.trimStash(physicalRows[0], amount);
498
387
  this.collapsingUI.collapsedRowsStash.shiftStash(physicalRows[0], null, -1 * amount);
499
388
  this.dataManager.filterData(index, amount, physicalRows);
500
- _classPrivateFieldSet(this, _skipRender, true);
389
+ _classPrivateFieldSet(_skipRender, this, true);
501
390
  return this.dataManager.getData().slice(); // Data contains reference sometimes.
502
391
  }
503
- function _onAfterContextMenuDefaultOptions2(defaultOptions) {
392
+ /**
393
+ * `afterContextMenuDefaultOptions` hook callback.
394
+ *
395
+ * @param {object} defaultOptions The default context menu items order.
396
+ * @returns {boolean}
397
+ */
398
+ function _onAfterContextMenuDefaultOptions(defaultOptions) {
504
399
  return this.contextMenuUI.appendOptions(defaultOptions);
505
400
  }
506
- function _onAfterGetRowHeader2(row, TH) {
401
+ /**
402
+ * `afterGetRowHeader` hook callback.
403
+ *
404
+ * @param {number} row Row index.
405
+ * @param {HTMLElement} TH Row header element.
406
+ */
407
+ function _onAfterGetRowHeader(row, TH) {
507
408
  this.headersUI.appendLevelIndicators(row, TH);
508
409
  }
509
- function _onModifyRowHeaderWidth2(rowHeaderWidth) {
410
+ /**
411
+ * `modifyRowHeaderWidth` hook callback.
412
+ *
413
+ * @param {number} rowHeaderWidth The initial row header width(s).
414
+ * @returns {number}
415
+ */
416
+ function _onModifyRowHeaderWidth(rowHeaderWidth) {
510
417
  return Math.max(this.headersUI.rowHeaderWidthCache, rowHeaderWidth);
511
418
  }
512
- function _onAfterRemoveRow2(index, amount, logicRows, source) {
419
+ /**
420
+ * `onAfterRemoveRow` hook callback.
421
+ *
422
+ * @param {number} index Removed row.
423
+ * @param {number} amount Amount of removed rows.
424
+ * @param {Array} logicRows An array of the removed physical rows.
425
+ * @param {string} source Source of action.
426
+ */
427
+ function _onAfterRemoveRow(index, amount, logicRows, source) {
513
428
  if (source === this.pluginName) {
514
429
  return;
515
430
  }
516
431
  this.hot._registerTimeout(() => {
517
- _classPrivateFieldSet(this, _skipRender, false);
432
+ _classPrivateFieldSet(_skipRender, this, false);
518
433
  this.headersUI.updateRowHeaderWidth();
519
434
  this.collapsingUI.collapsedRowsStash.applyStash();
520
435
  });
521
436
  }
522
- function _onBeforeRemoveRow2(index, amount, physicalRows) {
437
+ /**
438
+ * Callback for the `beforeRemoveRow` change list of removed physical indexes by reference. Removing parent node
439
+ * has effect in removing children nodes.
440
+ *
441
+ * @param {number} index Visual index of starter row.
442
+ * @param {number} amount Amount of rows to be removed.
443
+ * @param {Array} physicalRows List of physical indexes.
444
+ */
445
+ function _onBeforeRemoveRow(index, amount, physicalRows) {
523
446
  const modifiedPhysicalRows = Array.from(physicalRows.reduce((removedRows, physicalIndex) => {
524
447
  if (this.dataManager.isParent(physicalIndex)) {
525
448
  const children = this.dataManager.getDataObject(physicalIndex).__children;
@@ -541,34 +464,70 @@ function _onBeforeRemoveRow2(index, amount, physicalRows) {
541
464
  physicalRows.length = 0;
542
465
  physicalRows.push(...modifiedPhysicalRows);
543
466
  }
544
- function _onBeforeAddChild2() {
467
+ /**
468
+ * `beforeAddChild` hook callback.
469
+ */
470
+ function _onBeforeAddChild() {
545
471
  this.collapsingUI.collapsedRowsStash.stash();
546
472
  }
547
- function _onAfterAddChild2(parent, element) {
473
+ /**
474
+ * `afterAddChild` hook callback.
475
+ *
476
+ * @param {object} parent Parent element.
477
+ * @param {object} element New child element.
478
+ */
479
+ function _onAfterAddChild(parent, element) {
548
480
  this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(element));
549
481
  this.collapsingUI.collapsedRowsStash.applyStash();
550
482
  this.headersUI.updateRowHeaderWidth();
551
483
  }
552
- function _onBeforeDetachChild2() {
484
+ /**
485
+ * `beforeDetachChild` hook callback.
486
+ */
487
+ function _onBeforeDetachChild() {
553
488
  this.collapsingUI.collapsedRowsStash.stash();
554
489
  }
555
- function _onAfterDetachChild2(parent, element, finalElementRowIndex) {
490
+ /**
491
+ * `afterDetachChild` hook callback.
492
+ *
493
+ * @param {object} parent Parent element.
494
+ * @param {object} element New child element.
495
+ * @param {number} finalElementRowIndex The final row index of the detached element.
496
+ */
497
+ function _onAfterDetachChild(parent, element, finalElementRowIndex) {
556
498
  this.collapsingUI.collapsedRowsStash.shiftStash(finalElementRowIndex, null, -1);
557
499
  this.collapsingUI.collapsedRowsStash.applyStash();
558
500
  this.headersUI.updateRowHeaderWidth();
559
501
  }
560
- function _onAfterCreateRow2() {
502
+ /**
503
+ * `afterCreateRow` hook callback.
504
+ */
505
+ function _onAfterCreateRow() {
561
506
  this.dataManager.rewriteCache();
562
507
  }
563
- function _onAfterInit2() {
508
+ /**
509
+ * `afterInit` hook callback.
510
+ */
511
+ function _onAfterInit() {
564
512
  this.headersUI.updateRowHeaderWidth();
565
513
  }
566
- function _onBeforeViewRender2(force, skipRender) {
567
- if (_classPrivateFieldGet(this, _skipRender)) {
514
+ /**
515
+ * `beforeViewRender` hook callback.
516
+ *
517
+ * @param {boolean} force Indicates if the render call was triggered by a change of settings or data.
518
+ * @param {object} skipRender An object, holder for skipRender functionality.
519
+ */
520
+ function _onBeforeViewRender(force, skipRender) {
521
+ if (_classPrivateFieldGet(_skipRender, this)) {
568
522
  skipRender.skipRender = true;
569
523
  }
570
524
  }
571
- function _onBeforeLoadData2(data) {
525
+ /**
526
+ * `beforeLoadData` hook callback.
527
+ *
528
+ * @param {Array} data The source data.
529
+ */
530
+ function _onBeforeLoadData(data) {
572
531
  if (!isArrayOfObjects(data)) {
573
532
  error(WRONG_DATA_TYPE_ERROR);
574
533
  this.hot.getSettings()[PLUGIN_KEY] = false;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.error.cause.js");
4
3
  exports.__esModule = true;
4
+ require("core-js/modules/es.error.cause.js");
5
5
  var _number = require("../../../helpers/number");
6
6
  var _array = require("../../../helpers/array");
7
7
  var C = _interopRequireWildcard(require("../../../i18n/constants"));
@@ -14,9 +14,8 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
14
14
  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; }
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
16
16
  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); }
17
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
18
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
19
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
17
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
18
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
20
19
  /**
21
20
  * Class responsible for the Context Menu entries for the Nested Rows plugin.
22
21
  *
@@ -35,16 +34,13 @@ class ContextMenuUI extends _base.default {
35
34
  */
36
35
  _defineProperty(this, "dataManager", this.plugin.dataManager);
37
36
  _classPrivateFieldInitSpec(this, _menuEntries, {
38
- writable: true,
39
- value: {
40
- row_above: (key, selection) => {
41
- const lastSelection = selection[selection.length - 1];
42
- this.dataManager.addSibling(lastSelection.start.row, 'above');
43
- },
44
- row_below: (key, selection) => {
45
- const lastSelection = selection[selection.length - 1];
46
- this.dataManager.addSibling(lastSelection.start.row, 'below');
47
- }
37
+ row_above: (key, selection) => {
38
+ const lastSelection = selection[selection.length - 1];
39
+ this.dataManager.addSibling(lastSelection.start.row, 'above');
40
+ },
41
+ row_below: (key, selection) => {
42
+ const lastSelection = selection[selection.length - 1];
43
+ this.dataManager.addSibling(lastSelection.start.row, 'below');
48
44
  }
49
45
  });
50
46
  }
@@ -108,7 +104,7 @@ class ContextMenuUI extends _base.default {
108
104
  */
109
105
  modifyRowInsertingOptions(defaultOptions) {
110
106
  (0, _number.rangeEach)(0, defaultOptions.items.length - 1, i => {
111
- const option = _classPrivateFieldGet(this, _menuEntries)[defaultOptions.items[i].key];
107
+ const option = _classPrivateFieldGet(_menuEntries, this)[defaultOptions.items[i].key];
112
108
  if (option !== null && option !== undefined) {
113
109
  defaultOptions.items[i].callback = option;
114
110
  }
@@ -4,9 +4,8 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
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
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
6
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
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
8
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
9
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
7
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
8
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
10
9
  import { rangeEach } from "../../../helpers/number.mjs";
11
10
  import { arrayEach } from "../../../helpers/array.mjs";
12
11
  import * as C from "../../../i18n/constants.mjs";
@@ -29,16 +28,13 @@ class ContextMenuUI extends BaseUI {
29
28
  */
30
29
  _defineProperty(this, "dataManager", this.plugin.dataManager);
31
30
  _classPrivateFieldInitSpec(this, _menuEntries, {
32
- writable: true,
33
- value: {
34
- row_above: (key, selection) => {
35
- const lastSelection = selection[selection.length - 1];
36
- this.dataManager.addSibling(lastSelection.start.row, 'above');
37
- },
38
- row_below: (key, selection) => {
39
- const lastSelection = selection[selection.length - 1];
40
- this.dataManager.addSibling(lastSelection.start.row, 'below');
41
- }
31
+ row_above: (key, selection) => {
32
+ const lastSelection = selection[selection.length - 1];
33
+ this.dataManager.addSibling(lastSelection.start.row, 'above');
34
+ },
35
+ row_below: (key, selection) => {
36
+ const lastSelection = selection[selection.length - 1];
37
+ this.dataManager.addSibling(lastSelection.start.row, 'below');
42
38
  }
43
39
  });
44
40
  }
@@ -102,7 +98,7 @@ class ContextMenuUI extends BaseUI {
102
98
  */
103
99
  modifyRowInsertingOptions(defaultOptions) {
104
100
  rangeEach(0, defaultOptions.items.length - 1, i => {
105
- const option = _classPrivateFieldGet(this, _menuEntries)[defaultOptions.items[i].key];
101
+ const option = _classPrivateFieldGet(_menuEntries, this)[defaultOptions.items[i].key];
106
102
  if (option !== null && option !== undefined) {
107
103
  defaultOptions.items[i].callback = option;
108
104
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- require("core-js/modules/es.array.push.js");
5
4
  require("core-js/modules/es.error.cause.js");
5
+ require("core-js/modules/es.array.push.js");
6
6
  var _mixed = require("../../../helpers/mixed");
7
7
  var _console = require("../../../helpers/console");
8
8
  var _templateLiteralTag = require("../../../helpers/templateLiteralTag");