handsontable 0.0.0-next-53a190b-20240403 → 0.0.0-next-5a535ed-20240403

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 (284) hide show
  1. package/3rdparty/walkontable/src/calculator/viewportColumns.js +17 -12
  2. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +17 -12
  3. package/3rdparty/walkontable/src/calculator/viewportRows.js +15 -10
  4. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +15 -10
  5. package/3rdparty/walkontable/src/cell/coords.js +17 -12
  6. package/3rdparty/walkontable/src/cell/coords.mjs +17 -12
  7. package/3rdparty/walkontable/src/cell/range.d.ts +1 -2
  8. package/3rdparty/walkontable/src/cell/range.js +28 -40
  9. package/3rdparty/walkontable/src/cell/range.mjs +28 -40
  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 +104 -72
  13. package/3rdparty/walkontable/src/event.mjs +104 -72
  14. package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -15
  15. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -16
  16. package/3rdparty/walkontable/src/overlay/top.js +0 -11
  17. package/3rdparty/walkontable/src/overlay/top.mjs +1 -12
  18. package/3rdparty/walkontable/src/overlays.js +4 -46
  19. package/3rdparty/walkontable/src/overlays.mjs +4 -46
  20. package/3rdparty/walkontable/src/scroll.js +17 -15
  21. package/3rdparty/walkontable/src/scroll.mjs +17 -15
  22. package/3rdparty/walkontable/src/selection/manager.js +69 -48
  23. package/3rdparty/walkontable/src/selection/manager.mjs +69 -48
  24. package/3rdparty/walkontable/src/selection/scanner.js +42 -33
  25. package/3rdparty/walkontable/src/selection/scanner.mjs +42 -33
  26. package/3rdparty/walkontable/src/utils/columnStretching.js +44 -27
  27. package/3rdparty/walkontable/src/utils/columnStretching.mjs +44 -27
  28. package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
  29. package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
  30. package/base.js +2 -2
  31. package/base.mjs +2 -2
  32. package/core/viewportScroll/index.js +1 -4
  33. package/core/viewportScroll/index.mjs +1 -4
  34. package/core.d.ts +3 -4
  35. package/core.js +22 -77
  36. package/core.mjs +22 -77
  37. package/dataMap/dataSource.js +1 -1
  38. package/dataMap/dataSource.mjs +1 -1
  39. package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
  40. package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
  41. package/dataMap/metaManager/metaSchema.js +1 -1
  42. package/dataMap/metaManager/metaSchema.mjs +1 -1
  43. package/dataMap/replaceData.js +1 -1
  44. package/dataMap/replaceData.mjs +1 -1
  45. package/dist/handsontable.css +4 -4
  46. package/dist/handsontable.full.css +4 -4
  47. package/dist/handsontable.full.js +9121 -9062
  48. package/dist/handsontable.full.min.css +3 -3
  49. package/dist/handsontable.full.min.js +292 -292
  50. package/dist/handsontable.js +6573 -6967
  51. package/dist/handsontable.min.css +3 -3
  52. package/dist/handsontable.min.js +25 -25
  53. package/dist/languages/all.min.js +1 -1
  54. package/dist/languages/ar-AR.min.js +1 -1
  55. package/dist/languages/cs-CZ.min.js +1 -1
  56. package/dist/languages/de-CH.min.js +1 -1
  57. package/dist/languages/de-DE.min.js +1 -1
  58. package/dist/languages/en-US.min.js +1 -1
  59. package/dist/languages/es-MX.min.js +1 -1
  60. package/dist/languages/fr-FR.min.js +1 -1
  61. package/dist/languages/hr-HR.min.js +1 -1
  62. package/dist/languages/it-IT.min.js +1 -1
  63. package/dist/languages/ja-JP.min.js +1 -1
  64. package/dist/languages/ko-KR.min.js +1 -1
  65. package/dist/languages/lv-LV.min.js +1 -1
  66. package/dist/languages/nb-NO.min.js +1 -1
  67. package/dist/languages/nl-NL.min.js +1 -1
  68. package/dist/languages/pl-PL.min.js +1 -1
  69. package/dist/languages/pt-BR.min.js +1 -1
  70. package/dist/languages/ru-RU.min.js +1 -1
  71. package/dist/languages/sr-SP.min.js +1 -1
  72. package/dist/languages/zh-CN.min.js +1 -1
  73. package/dist/languages/zh-TW.min.js +1 -1
  74. package/editorManager.js +23 -25
  75. package/editorManager.mjs +23 -25
  76. package/editors/autocompleteEditor/autocompleteEditor.js +10 -6
  77. package/editors/autocompleteEditor/autocompleteEditor.mjs +10 -6
  78. package/editors/selectEditor/selectEditor.js +19 -20
  79. package/editors/selectEditor/selectEditor.mjs +19 -20
  80. package/eventManager.js +1 -1
  81. package/eventManager.mjs +1 -1
  82. package/focusManager.js +82 -64
  83. package/focusManager.mjs +82 -64
  84. package/helpers/dom/element.js +1 -23
  85. package/helpers/dom/element.mjs +1 -21
  86. package/helpers/mixed.js +1 -1
  87. package/helpers/mixed.mjs +1 -1
  88. package/helpers/object.js +2 -2
  89. package/helpers/object.mjs +2 -2
  90. package/index.d.ts +0 -10
  91. package/package.json +2 -7
  92. package/pluginHooks.d.ts +3 -4
  93. package/pluginHooks.js +38 -99
  94. package/pluginHooks.mjs +38 -99
  95. package/plugins/autoColumnSize/autoColumnSize.js +65 -49
  96. package/plugins/autoColumnSize/autoColumnSize.mjs +65 -49
  97. package/plugins/autoRowSize/autoRowSize.js +34 -28
  98. package/plugins/autoRowSize/autoRowSize.mjs +34 -28
  99. package/plugins/autofill/autofill.js +38 -30
  100. package/plugins/autofill/autofill.mjs +38 -30
  101. package/plugins/base/base.js +17 -12
  102. package/plugins/base/base.mjs +17 -12
  103. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
  104. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
  105. package/plugins/collapsibleColumns/collapsibleColumns.js +50 -59
  106. package/plugins/collapsibleColumns/collapsibleColumns.mjs +50 -59
  107. package/plugins/columnSorting/columnSorting.js +45 -49
  108. package/plugins/columnSorting/columnSorting.mjs +45 -49
  109. package/plugins/columnSummary/columnSummary.js +26 -22
  110. package/plugins/columnSummary/columnSummary.mjs +26 -22
  111. package/plugins/comments/comments.js +158 -116
  112. package/plugins/comments/comments.mjs +158 -116
  113. package/plugins/contextMenu/contextMenu.js +26 -20
  114. package/plugins/contextMenu/contextMenu.mjs +26 -20
  115. package/plugins/contextMenu/itemsFactory.js +1 -1
  116. package/plugins/contextMenu/itemsFactory.mjs +1 -1
  117. package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
  118. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
  119. package/plugins/contextMenu/menu/menu.js +21 -13
  120. package/plugins/contextMenu/menu/menu.mjs +21 -13
  121. package/plugins/contextMenu/menu/positioner.js +58 -41
  122. package/plugins/contextMenu/menu/positioner.mjs +58 -41
  123. package/plugins/copyPaste/copyPaste.js +157 -116
  124. package/plugins/copyPaste/copyPaste.mjs +157 -116
  125. package/plugins/copyPaste/copyableRanges.js +66 -43
  126. package/plugins/copyPaste/copyableRanges.mjs +66 -43
  127. package/plugins/customBorders/customBorders.js +13 -11
  128. package/plugins/customBorders/customBorders.mjs +13 -11
  129. package/plugins/dragToScroll/dragToScroll.js +6 -6
  130. package/plugins/dragToScroll/dragToScroll.mjs +6 -6
  131. package/plugins/dropdownMenu/dropdownMenu.js +106 -80
  132. package/plugins/dropdownMenu/dropdownMenu.mjs +106 -80
  133. package/plugins/exportFile/dataProvider.js +1 -1
  134. package/plugins/exportFile/dataProvider.mjs +1 -1
  135. package/plugins/filters/component/actionBar.js +9 -9
  136. package/plugins/filters/component/actionBar.mjs +8 -8
  137. package/plugins/filters/component/condition.js +15 -13
  138. package/plugins/filters/component/condition.mjs +15 -13
  139. package/plugins/filters/component/operators.js +6 -6
  140. package/plugins/filters/component/operators.mjs +6 -6
  141. package/plugins/filters/component/value.js +28 -24
  142. package/plugins/filters/component/value.mjs +28 -24
  143. package/plugins/filters/conditionUpdateObserver.js +24 -22
  144. package/plugins/filters/conditionUpdateObserver.mjs +24 -22
  145. package/plugins/filters/dataFilter.js +1 -1
  146. package/plugins/filters/dataFilter.mjs +1 -1
  147. package/plugins/filters/filters.js +95 -81
  148. package/plugins/filters/filters.mjs +95 -81
  149. package/plugins/filters/ui/input.js +19 -13
  150. package/plugins/filters/ui/input.mjs +19 -13
  151. package/plugins/filters/ui/link.js +13 -8
  152. package/plugins/filters/ui/link.mjs +13 -8
  153. package/plugins/filters/ui/multipleSelect.js +112 -85
  154. package/plugins/filters/ui/multipleSelect.mjs +112 -85
  155. package/plugins/filters/ui/radioInput.js +20 -12
  156. package/plugins/filters/ui/radioInput.mjs +20 -12
  157. package/plugins/filters/ui/select.js +72 -50
  158. package/plugins/filters/ui/select.mjs +71 -49
  159. package/plugins/formulas/formulas.js +326 -268
  160. package/plugins/formulas/formulas.mjs +327 -269
  161. package/plugins/formulas/indexSyncer/axisSyncer.js +61 -38
  162. package/plugins/formulas/indexSyncer/axisSyncer.mjs +61 -38
  163. package/plugins/formulas/indexSyncer/index.js +48 -25
  164. package/plugins/formulas/indexSyncer/index.mjs +48 -25
  165. package/plugins/hiddenColumns/hiddenColumns.js +83 -64
  166. package/plugins/hiddenColumns/hiddenColumns.mjs +83 -64
  167. package/plugins/hiddenRows/hiddenRows.js +82 -63
  168. package/plugins/hiddenRows/hiddenRows.mjs +82 -63
  169. package/plugins/manualColumnFreeze/manualColumnFreeze.js +32 -24
  170. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +33 -25
  171. package/plugins/manualColumnMove/manualColumnMove.js +170 -126
  172. package/plugins/manualColumnMove/manualColumnMove.mjs +170 -126
  173. package/plugins/manualColumnResize/manualColumnResize.js +230 -169
  174. package/plugins/manualColumnResize/manualColumnResize.mjs +230 -169
  175. package/plugins/manualRowMove/manualRowMove.js +128 -99
  176. package/plugins/manualRowMove/manualRowMove.mjs +128 -99
  177. package/plugins/manualRowResize/manualRowResize.js +209 -150
  178. package/plugins/manualRowResize/manualRowResize.mjs +209 -150
  179. package/plugins/mergeCells/calculations/selection.js +71 -2
  180. package/plugins/mergeCells/calculations/selection.mjs +71 -2
  181. package/plugins/mergeCells/cellsCollection.js +1 -117
  182. package/plugins/mergeCells/cellsCollection.mjs +1 -117
  183. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
  184. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
  185. package/plugins/mergeCells/mergeCells.js +397 -499
  186. package/plugins/mergeCells/mergeCells.mjs +397 -499
  187. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -8
  188. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -8
  189. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
  190. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
  191. package/plugins/nestedHeaders/nestedHeaders.js +253 -205
  192. package/plugins/nestedHeaders/nestedHeaders.mjs +254 -206
  193. package/plugins/nestedHeaders/stateManager/headersTree.js +32 -21
  194. package/plugins/nestedHeaders/stateManager/headersTree.mjs +32 -21
  195. package/plugins/nestedHeaders/stateManager/index.js +41 -30
  196. package/plugins/nestedHeaders/stateManager/index.mjs +41 -30
  197. package/plugins/nestedHeaders/stateManager/sourceSettings.js +30 -19
  198. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +30 -19
  199. package/plugins/nestedRows/data/dataManager.js +1 -1
  200. package/plugins/nestedRows/data/dataManager.mjs +1 -1
  201. package/plugins/nestedRows/nestedRows.js +182 -151
  202. package/plugins/nestedRows/nestedRows.mjs +183 -152
  203. package/plugins/nestedRows/ui/contextMenu.js +15 -11
  204. package/plugins/nestedRows/ui/contextMenu.mjs +14 -10
  205. package/plugins/nestedRows/utils/rowMoveController.js +1 -1
  206. package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
  207. package/plugins/persistentState/storage.js +2 -2
  208. package/plugins/persistentState/storage.mjs +2 -2
  209. package/plugins/search/search.js +7 -7
  210. package/plugins/search/search.mjs +7 -7
  211. package/plugins/touchScroll/touchScroll.js +19 -15
  212. package/plugins/touchScroll/touchScroll.mjs +20 -16
  213. package/plugins/trimRows/trimRows.js +6 -6
  214. package/plugins/trimRows/trimRows.mjs +6 -6
  215. package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
  216. package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
  217. package/selection/highlight/highlight.js +14 -14
  218. package/selection/highlight/highlight.mjs +13 -13
  219. package/selection/highlight/visualSelection.js +0 -2
  220. package/selection/highlight/visualSelection.mjs +0 -2
  221. package/selection/selection.js +67 -225
  222. package/selection/selection.mjs +66 -224
  223. package/selection/transformation.js +118 -149
  224. package/selection/transformation.mjs +118 -149
  225. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  226. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  227. package/shortcutContexts/commands/editor/open.js +3 -18
  228. package/shortcutContexts/commands/editor/open.mjs +3 -18
  229. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  230. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  231. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  232. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  233. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  234. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  235. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  236. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  237. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
  238. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
  239. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
  240. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
  241. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
  242. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
  243. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
  244. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
  245. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
  246. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
  247. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
  248. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
  249. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  250. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  251. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  252. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  253. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
  254. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
  255. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
  256. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
  257. package/shortcutContexts/grid.js +3 -9
  258. package/shortcutContexts/grid.mjs +3 -9
  259. package/shortcuts/context.js +1 -2
  260. package/shortcuts/context.mjs +1 -2
  261. package/tableView.js +78 -52
  262. package/tableView.mjs +78 -52
  263. package/translations/changesObservable/observable.js +38 -21
  264. package/translations/changesObservable/observable.mjs +38 -21
  265. package/translations/changesObservable/observer.js +12 -7
  266. package/translations/changesObservable/observer.mjs +11 -6
  267. package/translations/mapCollections/aggregatedCollection.js +1 -1
  268. package/translations/mapCollections/aggregatedCollection.mjs +1 -1
  269. package/translations/maps/indexMap.js +1 -1
  270. package/translations/maps/indexMap.mjs +1 -1
  271. package/utils/dataStructures/linkedList.js +1 -6
  272. package/utils/dataStructures/linkedList.mjs +1 -6
  273. package/utils/dataStructures/tree.js +1 -1
  274. package/utils/dataStructures/tree.mjs +1 -1
  275. package/utils/interval.js +44 -26
  276. package/utils/interval.mjs +44 -26
  277. package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
  278. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
  279. package/i18n/languages/ar-AR.d.ts +0 -5
  280. package/i18n/languages/cs-CZ.d.ts +0 -5
  281. package/i18n/languages/hr-HR.d.ts +0 -5
  282. package/i18n/languages/sr-SP.d.ts +0 -5
  283. package/plugins/mergeCells/focusOrder.js +0 -305
  284. package/plugins/mergeCells/focusOrder.mjs +0 -300
@@ -4,7 +4,7 @@ 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 _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"); }
7
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
8
8
  import { BasePlugin } from "../base/index.mjs";
9
9
  import { isRightClick } from "../../helpers/dom/event.mjs";
10
10
  import { getParentWindow } from "../../helpers/dom/element.mjs";
@@ -21,7 +21,7 @@ export const PLUGIN_PRIORITY = 100;
21
21
  * @class DragToScroll
22
22
  * @plugin DragToScroll
23
23
  */
24
- var _DragToScroll_brand = /*#__PURE__*/new WeakSet();
24
+ var _setupListening = /*#__PURE__*/new WeakSet();
25
25
  export class DragToScroll extends BasePlugin {
26
26
  constructor() {
27
27
  super(...arguments);
@@ -30,7 +30,7 @@ export class DragToScroll extends BasePlugin {
30
30
  *
31
31
  * @param {MouseEvent} event The mouse event object.
32
32
  */
33
- _classPrivateMethodInitSpec(this, _DragToScroll_brand);
33
+ _classPrivateMethodInitSpec(this, _setupListening);
34
34
  /**
35
35
  * Size of an element and its position relative to the viewport,
36
36
  * e.g. {bottom: 449, height: 441, left: 8, right: 814, top: 8, width: 806, x: 8, y:8}.
@@ -76,8 +76,8 @@ export class DragToScroll extends BasePlugin {
76
76
  if (this.enabled) {
77
77
  return;
78
78
  }
79
- this.addHook('afterOnCellMouseDown', event => _assertClassBrand(_DragToScroll_brand, this, _setupListening).call(this, event));
80
- this.addHook('afterOnCellCornerMouseDown', event => _assertClassBrand(_DragToScroll_brand, this, _setupListening).call(this, event));
79
+ this.addHook('afterOnCellMouseDown', event => _classPrivateMethodGet(this, _setupListening, _setupListening2).call(this, event));
80
+ this.addHook('afterOnCellCornerMouseDown', event => _classPrivateMethodGet(this, _setupListening, _setupListening2).call(this, event));
81
81
  this.registerEvents();
82
82
  super.enablePlugin();
83
83
  }
@@ -228,7 +228,7 @@ export class DragToScroll extends BasePlugin {
228
228
  super.destroy();
229
229
  }
230
230
  }
231
- function _setupListening(event) {
231
+ function _setupListening2(event) {
232
232
  if (isRightClick(event)) {
233
233
  return;
234
234
  }
@@ -20,9 +20,12 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
20
20
  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; }
21
21
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
22
22
  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); }
23
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
24
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
25
- 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"); }
23
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
24
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
25
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
26
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
27
+ 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; } }
28
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
26
29
  _pluginHooks.default.getSingleton().register('afterDropdownMenuDefaultOptions');
27
30
  _pluginHooks.default.getSingleton().register('beforeDropdownMenuShow');
28
31
  _pluginHooks.default.getSingleton().register('afterDropdownMenuShow');
@@ -39,14 +42,15 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
39
42
  * @class DropdownMenu
40
43
  *
41
44
  * @description
42
- * This plugin creates the Handsontable Dropdown Menu. It allows to create a new column at any place in the grid
45
+ * This plugin creates the Handsontable Dropdown Menu. It allows to create a new row or column at any place in the grid
43
46
  * among [other features](@/guides/accessories-and-menus/context-menu/context-menu.md#context-menu-with-specific-options).
44
47
  * Possible values:
45
48
  * * `true` (to enable default options),
46
49
  * * `false` (to disable completely).
47
50
  *
48
51
  * or array of any available strings:
49
- * * `["col_left", "col_right", "remove_col", "---------", "undo", "redo"]`.
52
+ * * `["row_above", "row_below", "col_left", "col_right",
53
+ * "remove_row", "remove_col", "---------", "undo", "redo"]`.
50
54
  *
51
55
  * See [the dropdown menu demo](@/guides/columns/column-menu/column-menu.md) for examples.
52
56
  *
@@ -83,7 +87,15 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
83
87
  * :::
84
88
  */
85
89
  var _isButtonClicked = /*#__PURE__*/new WeakMap();
86
- var _DropdownMenu_brand = /*#__PURE__*/new WeakSet();
90
+ var _addCustomShortcuts = /*#__PURE__*/new WeakSet();
91
+ var _onTableClick = /*#__PURE__*/new WeakSet();
92
+ var _onAfterGetColHeader = /*#__PURE__*/new WeakSet();
93
+ var _onMenuBeforeOpen = /*#__PURE__*/new WeakSet();
94
+ var _onMenuAfterOpen = /*#__PURE__*/new WeakSet();
95
+ var _onSubMenuAfterOpen = /*#__PURE__*/new WeakSet();
96
+ var _onMenuAfterClose = /*#__PURE__*/new WeakSet();
97
+ var _onBeforeViewportScrollHorizontally = /*#__PURE__*/new WeakSet();
98
+ var _onBeforeOnCellMouseDown = /*#__PURE__*/new WeakSet();
87
99
  class DropdownMenu extends _base.BasePlugin {
88
100
  static get PLUGIN_KEY() {
89
101
  return PLUGIN_KEY;
@@ -115,12 +127,70 @@ class DropdownMenu extends _base.BasePlugin {
115
127
  super(hotInstance);
116
128
 
117
129
  // One listener for enable/disable functionality
130
+ /**
131
+ * Hook sets the internal flag to `true` when the button is clicked.
132
+ *
133
+ * @param {MouseEvent} event The mouse event object.
134
+ */
135
+ _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseDown);
136
+ /**
137
+ * Hook allows blocking horizontal scroll when the menu is opened by clicking on
138
+ * the column header button. This prevents from scrolling the viewport (jump effect) when
139
+ * the button is clicked.
140
+ *
141
+ * @param {number} visualColumn Visual column index.
142
+ * @returns {number | null}
143
+ */
144
+ _classPrivateMethodInitSpec(this, _onBeforeViewportScrollHorizontally);
145
+ /**
146
+ * On menu after close listener.
147
+ *
148
+ * @private
149
+ * @fires Hooks#afterDropdownMenuHide
150
+ */
151
+ _classPrivateMethodInitSpec(this, _onMenuAfterClose);
152
+ /**
153
+ * Listener for the `afterSubmenuOpen` hook.
154
+ *
155
+ * @private
156
+ * @param {Menu} subMenuInstance The opened sub menu instance.
157
+ */
158
+ _classPrivateMethodInitSpec(this, _onSubMenuAfterOpen);
159
+ /**
160
+ * On menu after open listener.
161
+ *
162
+ * @private
163
+ * @fires Hooks#afterDropdownMenuShow
164
+ */
165
+ _classPrivateMethodInitSpec(this, _onMenuAfterOpen);
166
+ /**
167
+ * On menu before open listener.
168
+ *
169
+ * @private
170
+ * @fires Hooks#beforeDropdownMenuShow
171
+ */
172
+ _classPrivateMethodInitSpec(this, _onMenuBeforeOpen);
173
+ /**
174
+ * On after get column header listener.
175
+ *
176
+ * @private
177
+ * @param {number} col Visual column index.
178
+ * @param {HTMLTableCellElement} TH Header's TH element.
179
+ */
180
+ _classPrivateMethodInitSpec(this, _onAfterGetColHeader);
181
+ /**
182
+ * Table click listener.
183
+ *
184
+ * @private
185
+ * @param {Event} event The mouse event object.
186
+ */
187
+ _classPrivateMethodInitSpec(this, _onTableClick);
118
188
  /**
119
189
  * Add custom shortcuts to the provided menu instance.
120
190
  *
121
191
  * @param {Menu} menuInstance The menu instance.
122
192
  */
123
- _classPrivateMethodInitSpec(this, _DropdownMenu_brand);
193
+ _classPrivateMethodInitSpec(this, _addCustomShortcuts);
124
194
  _defineProperty(this, "commandExecutor", new _commandExecutor.CommandExecutor(this.hot));
125
195
  /**
126
196
  * Instance of {@link ItemsFactory}.
@@ -141,8 +211,11 @@ class DropdownMenu extends _base.BasePlugin {
141
211
  *
142
212
  * @type {boolean}
143
213
  */
144
- _classPrivateFieldInitSpec(this, _isButtonClicked, false);
145
- this.hot.addHook('afterGetColHeader', (col, TH) => _assertClassBrand(_DropdownMenu_brand, this, _onAfterGetColHeader).call(this, col, TH));
214
+ _classPrivateFieldInitSpec(this, _isButtonClicked, {
215
+ writable: true,
216
+ value: false
217
+ });
218
+ this.hot.addHook('afterGetColHeader', (col, TH) => _classPrivateMethodGet(this, _onAfterGetColHeader, _onAfterGetColHeader2).call(this, col, TH));
146
219
  }
147
220
 
148
221
  /**
@@ -171,13 +244,13 @@ class DropdownMenu extends _base.BasePlugin {
171
244
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
172
245
  args[_key] = arguments[_key];
173
246
  }
174
- return _assertClassBrand(_DropdownMenu_brand, _this, _onBeforeOnCellMouseDown).call(_this, ...args);
247
+ return _classPrivateMethodGet(_this, _onBeforeOnCellMouseDown, _onBeforeOnCellMouseDown2).call(_this, ...args);
175
248
  });
176
249
  this.addHook('beforeViewportScrollHorizontally', function () {
177
250
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
178
251
  args[_key2] = arguments[_key2];
179
252
  }
180
- return _assertClassBrand(_DropdownMenu_brand, _this, _onBeforeViewportScrollHorizontally).call(_this, ...args);
253
+ return _classPrivateMethodGet(_this, _onBeforeViewportScrollHorizontally, _onBeforeViewportScrollHorizontally2).call(_this, ...args);
181
254
  });
182
255
  const settings = this.hot.getSettings()[PLUGIN_KEY];
183
256
  const predefinedItems = {
@@ -203,10 +276,10 @@ class DropdownMenu extends _base.BasePlugin {
203
276
  });
204
277
  this.hot.runHooks('beforeDropdownMenuSetItems', menuItems);
205
278
  this.menu.setMenuItems(menuItems);
206
- this.menu.addLocalHook('beforeOpen', () => _assertClassBrand(_DropdownMenu_brand, this, _onMenuBeforeOpen).call(this));
207
- this.menu.addLocalHook('afterOpen', () => _assertClassBrand(_DropdownMenu_brand, this, _onMenuAfterOpen).call(this));
208
- this.menu.addLocalHook('afterSubmenuOpen', subMenuInstance => _assertClassBrand(_DropdownMenu_brand, this, _onSubMenuAfterOpen).call(this, subMenuInstance));
209
- this.menu.addLocalHook('afterClose', () => _assertClassBrand(_DropdownMenu_brand, this, _onMenuAfterClose).call(this));
279
+ this.menu.addLocalHook('beforeOpen', () => _classPrivateMethodGet(this, _onMenuBeforeOpen, _onMenuBeforeOpen2).call(this));
280
+ this.menu.addLocalHook('afterOpen', () => _classPrivateMethodGet(this, _onMenuAfterOpen, _onMenuAfterOpen2).call(this));
281
+ this.menu.addLocalHook('afterSubmenuOpen', subMenuInstance => _classPrivateMethodGet(this, _onSubMenuAfterOpen, _onSubMenuAfterOpen2).call(this, subMenuInstance));
282
+ this.menu.addLocalHook('afterClose', () => _classPrivateMethodGet(this, _onMenuAfterClose, _onMenuAfterClose2).call(this));
210
283
  this.menu.addLocalHook('executeCommand', function () {
211
284
  for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
212
285
  params[_key3] = arguments[_key3];
@@ -310,7 +383,7 @@ class DropdownMenu extends _base.BasePlugin {
310
383
  * @private
311
384
  */
312
385
  registerEvents() {
313
- this.eventManager.addEventListener(this.hot.rootElement, 'click', event => _assertClassBrand(_DropdownMenu_brand, this, _onTableClick).call(this, event));
386
+ this.eventManager.addEventListener(this.hot.rootElement, 'click', event => _classPrivateMethodGet(this, _onTableClick, _onTableClick2).call(this, event));
314
387
  }
315
388
 
316
389
  /**
@@ -359,9 +432,12 @@ class DropdownMenu extends _base.BasePlugin {
359
432
  * When no cells are selected, `executeCommand()` doesn't do anything.
360
433
  *
361
434
  * You can execute all predefined commands:
435
+ * * `'row_above'` - Insert row above
436
+ * * `'row_below'` - Insert row below
362
437
  * * `'col_left'` - Insert column left
363
438
  * * `'col_right'` - Insert column right
364
439
  * * `'clear_column'` - Clear selected column
440
+ * * `'remove_row'` - Remove row
365
441
  * * `'remove_col'` - Remove column
366
442
  * * `'undo'` - Undo last action
367
443
  * * `'redo'` - Redo last action
@@ -413,24 +489,18 @@ class DropdownMenu extends _base.BasePlugin {
413
489
  }
414
490
  }
415
491
  exports.DropdownMenu = DropdownMenu;
416
- function _addCustomShortcuts(menuInstance) {
492
+ function _addCustomShortcuts2(menuInstance) {
417
493
  menuInstance.getKeyboardShortcutsCtrl().addCustomShortcuts([{
418
494
  keys: [['Control/Meta', 'A']],
419
495
  callback: () => false
420
496
  }]);
421
497
  }
422
- /**
423
- * Table click listener.
424
- *
425
- * @private
426
- * @param {Event} event The mouse event object.
427
- */
428
- function _onTableClick(event) {
498
+ function _onTableClick2(event) {
429
499
  event.stopPropagation();
430
500
  if ((0, _element.hasClass)(event.target, BUTTON_CLASS_NAME)) {
431
501
  const offset = (0, _utils.getDocumentOffsetByElement)(this.menu.container, this.hot.rootDocument);
432
502
  const rect = event.target.getBoundingClientRect();
433
- _classPrivateFieldSet(_isButtonClicked, this, false);
503
+ _classPrivateFieldSet(this, _isButtonClicked, false);
434
504
  this.open({
435
505
  left: rect.left + offset.left,
436
506
  top: rect.top + event.target.offsetHeight + 3 + offset.top
@@ -439,14 +509,7 @@ function _onTableClick(event) {
439
509
  });
440
510
  }
441
511
  }
442
- /**
443
- * On after get column header listener.
444
- *
445
- * @private
446
- * @param {number} col Visual column index.
447
- * @param {HTMLTableCellElement} TH Header's TH element.
448
- */
449
- function _onAfterGetColHeader(col, TH) {
512
+ function _onAfterGetColHeader2(col, TH) {
450
513
  // Corner or a higher-level header
451
514
  const headerRow = TH.parentNode;
452
515
  if (!headerRow) {
@@ -485,63 +548,26 @@ function _onAfterGetColHeader(col, TH) {
485
548
  };
486
549
  TH.firstChild.insertBefore(button, TH.firstChild.firstChild);
487
550
  }
488
- /**
489
- * On menu before open listener.
490
- *
491
- * @private
492
- * @fires Hooks#beforeDropdownMenuShow
493
- */
494
- function _onMenuBeforeOpen() {
551
+ function _onMenuBeforeOpen2() {
495
552
  this.hot.runHooks('beforeDropdownMenuShow', this);
496
553
  }
497
- /**
498
- * On menu after open listener.
499
- *
500
- * @private
501
- * @fires Hooks#afterDropdownMenuShow
502
- */
503
- function _onMenuAfterOpen() {
554
+ function _onMenuAfterOpen2() {
504
555
  this.hot.runHooks('afterDropdownMenuShow', this);
505
- _assertClassBrand(_DropdownMenu_brand, this, _addCustomShortcuts).call(this, this.menu);
556
+ _classPrivateMethodGet(this, _addCustomShortcuts, _addCustomShortcuts2).call(this, this.menu);
506
557
  }
507
- /**
508
- * Listener for the `afterSubmenuOpen` hook.
509
- *
510
- * @private
511
- * @param {Menu} subMenuInstance The opened sub menu instance.
512
- */
513
- function _onSubMenuAfterOpen(subMenuInstance) {
514
- _assertClassBrand(_DropdownMenu_brand, this, _addCustomShortcuts).call(this, subMenuInstance);
558
+ function _onSubMenuAfterOpen2(subMenuInstance) {
559
+ _classPrivateMethodGet(this, _addCustomShortcuts, _addCustomShortcuts2).call(this, subMenuInstance);
515
560
  }
516
- /**
517
- * On menu after close listener.
518
- *
519
- * @private
520
- * @fires Hooks#afterDropdownMenuHide
521
- */
522
- function _onMenuAfterClose() {
561
+ function _onMenuAfterClose2() {
523
562
  this.hot.listen();
524
563
  this.hot.runHooks('afterDropdownMenuHide', this);
525
564
  }
526
- /**
527
- * Hook allows blocking horizontal scroll when the menu is opened by clicking on
528
- * the column header button. This prevents from scrolling the viewport (jump effect) when
529
- * the button is clicked.
530
- *
531
- * @param {number} visualColumn Visual column index.
532
- * @returns {number | null}
533
- */
534
- function _onBeforeViewportScrollHorizontally(visualColumn) {
535
- return _classPrivateFieldGet(_isButtonClicked, this) ? null : visualColumn;
565
+ function _onBeforeViewportScrollHorizontally2(visualColumn) {
566
+ return _classPrivateFieldGet(this, _isButtonClicked) ? null : visualColumn;
536
567
  }
537
- /**
538
- * Hook sets the internal flag to `true` when the button is clicked.
539
- *
540
- * @param {MouseEvent} event The mouse event object.
541
- */
542
- function _onBeforeOnCellMouseDown(event) {
568
+ function _onBeforeOnCellMouseDown2(event) {
543
569
  if ((0, _element.hasClass)(event.target, BUTTON_CLASS_NAME)) {
544
- _classPrivateFieldSet(_isButtonClicked, this, true);
570
+ _classPrivateFieldSet(this, _isButtonClicked, true);
545
571
  }
546
572
  }
547
573
  DropdownMenu.SEPARATOR = {
@@ -5,9 +5,12 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
5
5
  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; }
6
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
7
7
  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); }
8
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
9
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
10
- 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"); }
8
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
9
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
10
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
11
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
12
+ 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; } }
13
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
11
14
  import { BasePlugin } from "../base/index.mjs";
12
15
  import { arrayEach } from "../../helpers/array.mjs";
13
16
  import { objectEach } from "../../helpers/object.mjs";
@@ -35,14 +38,15 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
35
38
  * @class DropdownMenu
36
39
  *
37
40
  * @description
38
- * This plugin creates the Handsontable Dropdown Menu. It allows to create a new column at any place in the grid
41
+ * This plugin creates the Handsontable Dropdown Menu. It allows to create a new row or column at any place in the grid
39
42
  * among [other features](@/guides/accessories-and-menus/context-menu/context-menu.md#context-menu-with-specific-options).
40
43
  * Possible values:
41
44
  * * `true` (to enable default options),
42
45
  * * `false` (to disable completely).
43
46
  *
44
47
  * or array of any available strings:
45
- * * `["col_left", "col_right", "remove_col", "---------", "undo", "redo"]`.
48
+ * * `["row_above", "row_below", "col_left", "col_right",
49
+ * "remove_row", "remove_col", "---------", "undo", "redo"]`.
46
50
  *
47
51
  * See [the dropdown menu demo](@/guides/columns/column-menu/column-menu.md) for examples.
48
52
  *
@@ -79,7 +83,15 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
79
83
  * :::
80
84
  */
81
85
  var _isButtonClicked = /*#__PURE__*/new WeakMap();
82
- var _DropdownMenu_brand = /*#__PURE__*/new WeakSet();
86
+ var _addCustomShortcuts = /*#__PURE__*/new WeakSet();
87
+ var _onTableClick = /*#__PURE__*/new WeakSet();
88
+ var _onAfterGetColHeader = /*#__PURE__*/new WeakSet();
89
+ var _onMenuBeforeOpen = /*#__PURE__*/new WeakSet();
90
+ var _onMenuAfterOpen = /*#__PURE__*/new WeakSet();
91
+ var _onSubMenuAfterOpen = /*#__PURE__*/new WeakSet();
92
+ var _onMenuAfterClose = /*#__PURE__*/new WeakSet();
93
+ var _onBeforeViewportScrollHorizontally = /*#__PURE__*/new WeakSet();
94
+ var _onBeforeOnCellMouseDown = /*#__PURE__*/new WeakSet();
83
95
  export class DropdownMenu extends BasePlugin {
84
96
  static get PLUGIN_KEY() {
85
97
  return PLUGIN_KEY;
@@ -111,12 +123,70 @@ export class DropdownMenu extends BasePlugin {
111
123
  super(hotInstance);
112
124
 
113
125
  // One listener for enable/disable functionality
126
+ /**
127
+ * Hook sets the internal flag to `true` when the button is clicked.
128
+ *
129
+ * @param {MouseEvent} event The mouse event object.
130
+ */
131
+ _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseDown);
132
+ /**
133
+ * Hook allows blocking horizontal scroll when the menu is opened by clicking on
134
+ * the column header button. This prevents from scrolling the viewport (jump effect) when
135
+ * the button is clicked.
136
+ *
137
+ * @param {number} visualColumn Visual column index.
138
+ * @returns {number | null}
139
+ */
140
+ _classPrivateMethodInitSpec(this, _onBeforeViewportScrollHorizontally);
141
+ /**
142
+ * On menu after close listener.
143
+ *
144
+ * @private
145
+ * @fires Hooks#afterDropdownMenuHide
146
+ */
147
+ _classPrivateMethodInitSpec(this, _onMenuAfterClose);
148
+ /**
149
+ * Listener for the `afterSubmenuOpen` hook.
150
+ *
151
+ * @private
152
+ * @param {Menu} subMenuInstance The opened sub menu instance.
153
+ */
154
+ _classPrivateMethodInitSpec(this, _onSubMenuAfterOpen);
155
+ /**
156
+ * On menu after open listener.
157
+ *
158
+ * @private
159
+ * @fires Hooks#afterDropdownMenuShow
160
+ */
161
+ _classPrivateMethodInitSpec(this, _onMenuAfterOpen);
162
+ /**
163
+ * On menu before open listener.
164
+ *
165
+ * @private
166
+ * @fires Hooks#beforeDropdownMenuShow
167
+ */
168
+ _classPrivateMethodInitSpec(this, _onMenuBeforeOpen);
169
+ /**
170
+ * On after get column header listener.
171
+ *
172
+ * @private
173
+ * @param {number} col Visual column index.
174
+ * @param {HTMLTableCellElement} TH Header's TH element.
175
+ */
176
+ _classPrivateMethodInitSpec(this, _onAfterGetColHeader);
177
+ /**
178
+ * Table click listener.
179
+ *
180
+ * @private
181
+ * @param {Event} event The mouse event object.
182
+ */
183
+ _classPrivateMethodInitSpec(this, _onTableClick);
114
184
  /**
115
185
  * Add custom shortcuts to the provided menu instance.
116
186
  *
117
187
  * @param {Menu} menuInstance The menu instance.
118
188
  */
119
- _classPrivateMethodInitSpec(this, _DropdownMenu_brand);
189
+ _classPrivateMethodInitSpec(this, _addCustomShortcuts);
120
190
  _defineProperty(this, "commandExecutor", new CommandExecutor(this.hot));
121
191
  /**
122
192
  * Instance of {@link ItemsFactory}.
@@ -137,8 +207,11 @@ export class DropdownMenu extends BasePlugin {
137
207
  *
138
208
  * @type {boolean}
139
209
  */
140
- _classPrivateFieldInitSpec(this, _isButtonClicked, false);
141
- this.hot.addHook('afterGetColHeader', (col, TH) => _assertClassBrand(_DropdownMenu_brand, this, _onAfterGetColHeader).call(this, col, TH));
210
+ _classPrivateFieldInitSpec(this, _isButtonClicked, {
211
+ writable: true,
212
+ value: false
213
+ });
214
+ this.hot.addHook('afterGetColHeader', (col, TH) => _classPrivateMethodGet(this, _onAfterGetColHeader, _onAfterGetColHeader2).call(this, col, TH));
142
215
  }
143
216
 
144
217
  /**
@@ -167,13 +240,13 @@ export class DropdownMenu extends BasePlugin {
167
240
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
168
241
  args[_key] = arguments[_key];
169
242
  }
170
- return _assertClassBrand(_DropdownMenu_brand, _this, _onBeforeOnCellMouseDown).call(_this, ...args);
243
+ return _classPrivateMethodGet(_this, _onBeforeOnCellMouseDown, _onBeforeOnCellMouseDown2).call(_this, ...args);
171
244
  });
172
245
  this.addHook('beforeViewportScrollHorizontally', function () {
173
246
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
174
247
  args[_key2] = arguments[_key2];
175
248
  }
176
- return _assertClassBrand(_DropdownMenu_brand, _this, _onBeforeViewportScrollHorizontally).call(_this, ...args);
249
+ return _classPrivateMethodGet(_this, _onBeforeViewportScrollHorizontally, _onBeforeViewportScrollHorizontally2).call(_this, ...args);
177
250
  });
178
251
  const settings = this.hot.getSettings()[PLUGIN_KEY];
179
252
  const predefinedItems = {
@@ -199,10 +272,10 @@ export class DropdownMenu extends BasePlugin {
199
272
  });
200
273
  this.hot.runHooks('beforeDropdownMenuSetItems', menuItems);
201
274
  this.menu.setMenuItems(menuItems);
202
- this.menu.addLocalHook('beforeOpen', () => _assertClassBrand(_DropdownMenu_brand, this, _onMenuBeforeOpen).call(this));
203
- this.menu.addLocalHook('afterOpen', () => _assertClassBrand(_DropdownMenu_brand, this, _onMenuAfterOpen).call(this));
204
- this.menu.addLocalHook('afterSubmenuOpen', subMenuInstance => _assertClassBrand(_DropdownMenu_brand, this, _onSubMenuAfterOpen).call(this, subMenuInstance));
205
- this.menu.addLocalHook('afterClose', () => _assertClassBrand(_DropdownMenu_brand, this, _onMenuAfterClose).call(this));
275
+ this.menu.addLocalHook('beforeOpen', () => _classPrivateMethodGet(this, _onMenuBeforeOpen, _onMenuBeforeOpen2).call(this));
276
+ this.menu.addLocalHook('afterOpen', () => _classPrivateMethodGet(this, _onMenuAfterOpen, _onMenuAfterOpen2).call(this));
277
+ this.menu.addLocalHook('afterSubmenuOpen', subMenuInstance => _classPrivateMethodGet(this, _onSubMenuAfterOpen, _onSubMenuAfterOpen2).call(this, subMenuInstance));
278
+ this.menu.addLocalHook('afterClose', () => _classPrivateMethodGet(this, _onMenuAfterClose, _onMenuAfterClose2).call(this));
206
279
  this.menu.addLocalHook('executeCommand', function () {
207
280
  for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
208
281
  params[_key3] = arguments[_key3];
@@ -306,7 +379,7 @@ export class DropdownMenu extends BasePlugin {
306
379
  * @private
307
380
  */
308
381
  registerEvents() {
309
- this.eventManager.addEventListener(this.hot.rootElement, 'click', event => _assertClassBrand(_DropdownMenu_brand, this, _onTableClick).call(this, event));
382
+ this.eventManager.addEventListener(this.hot.rootElement, 'click', event => _classPrivateMethodGet(this, _onTableClick, _onTableClick2).call(this, event));
310
383
  }
311
384
 
312
385
  /**
@@ -355,9 +428,12 @@ export class DropdownMenu extends BasePlugin {
355
428
  * When no cells are selected, `executeCommand()` doesn't do anything.
356
429
  *
357
430
  * You can execute all predefined commands:
431
+ * * `'row_above'` - Insert row above
432
+ * * `'row_below'` - Insert row below
358
433
  * * `'col_left'` - Insert column left
359
434
  * * `'col_right'` - Insert column right
360
435
  * * `'clear_column'` - Clear selected column
436
+ * * `'remove_row'` - Remove row
361
437
  * * `'remove_col'` - Remove column
362
438
  * * `'undo'` - Undo last action
363
439
  * * `'redo'` - Redo last action
@@ -408,24 +484,18 @@ export class DropdownMenu extends BasePlugin {
408
484
  super.destroy();
409
485
  }
410
486
  }
411
- function _addCustomShortcuts(menuInstance) {
487
+ function _addCustomShortcuts2(menuInstance) {
412
488
  menuInstance.getKeyboardShortcutsCtrl().addCustomShortcuts([{
413
489
  keys: [['Control/Meta', 'A']],
414
490
  callback: () => false
415
491
  }]);
416
492
  }
417
- /**
418
- * Table click listener.
419
- *
420
- * @private
421
- * @param {Event} event The mouse event object.
422
- */
423
- function _onTableClick(event) {
493
+ function _onTableClick2(event) {
424
494
  event.stopPropagation();
425
495
  if (hasClass(event.target, BUTTON_CLASS_NAME)) {
426
496
  const offset = getDocumentOffsetByElement(this.menu.container, this.hot.rootDocument);
427
497
  const rect = event.target.getBoundingClientRect();
428
- _classPrivateFieldSet(_isButtonClicked, this, false);
498
+ _classPrivateFieldSet(this, _isButtonClicked, false);
429
499
  this.open({
430
500
  left: rect.left + offset.left,
431
501
  top: rect.top + event.target.offsetHeight + 3 + offset.top
@@ -434,14 +504,7 @@ function _onTableClick(event) {
434
504
  });
435
505
  }
436
506
  }
437
- /**
438
- * On after get column header listener.
439
- *
440
- * @private
441
- * @param {number} col Visual column index.
442
- * @param {HTMLTableCellElement} TH Header's TH element.
443
- */
444
- function _onAfterGetColHeader(col, TH) {
507
+ function _onAfterGetColHeader2(col, TH) {
445
508
  // Corner or a higher-level header
446
509
  const headerRow = TH.parentNode;
447
510
  if (!headerRow) {
@@ -480,63 +543,26 @@ function _onAfterGetColHeader(col, TH) {
480
543
  };
481
544
  TH.firstChild.insertBefore(button, TH.firstChild.firstChild);
482
545
  }
483
- /**
484
- * On menu before open listener.
485
- *
486
- * @private
487
- * @fires Hooks#beforeDropdownMenuShow
488
- */
489
- function _onMenuBeforeOpen() {
546
+ function _onMenuBeforeOpen2() {
490
547
  this.hot.runHooks('beforeDropdownMenuShow', this);
491
548
  }
492
- /**
493
- * On menu after open listener.
494
- *
495
- * @private
496
- * @fires Hooks#afterDropdownMenuShow
497
- */
498
- function _onMenuAfterOpen() {
549
+ function _onMenuAfterOpen2() {
499
550
  this.hot.runHooks('afterDropdownMenuShow', this);
500
- _assertClassBrand(_DropdownMenu_brand, this, _addCustomShortcuts).call(this, this.menu);
551
+ _classPrivateMethodGet(this, _addCustomShortcuts, _addCustomShortcuts2).call(this, this.menu);
501
552
  }
502
- /**
503
- * Listener for the `afterSubmenuOpen` hook.
504
- *
505
- * @private
506
- * @param {Menu} subMenuInstance The opened sub menu instance.
507
- */
508
- function _onSubMenuAfterOpen(subMenuInstance) {
509
- _assertClassBrand(_DropdownMenu_brand, this, _addCustomShortcuts).call(this, subMenuInstance);
553
+ function _onSubMenuAfterOpen2(subMenuInstance) {
554
+ _classPrivateMethodGet(this, _addCustomShortcuts, _addCustomShortcuts2).call(this, subMenuInstance);
510
555
  }
511
- /**
512
- * On menu after close listener.
513
- *
514
- * @private
515
- * @fires Hooks#afterDropdownMenuHide
516
- */
517
- function _onMenuAfterClose() {
556
+ function _onMenuAfterClose2() {
518
557
  this.hot.listen();
519
558
  this.hot.runHooks('afterDropdownMenuHide', this);
520
559
  }
521
- /**
522
- * Hook allows blocking horizontal scroll when the menu is opened by clicking on
523
- * the column header button. This prevents from scrolling the viewport (jump effect) when
524
- * the button is clicked.
525
- *
526
- * @param {number} visualColumn Visual column index.
527
- * @returns {number | null}
528
- */
529
- function _onBeforeViewportScrollHorizontally(visualColumn) {
530
- return _classPrivateFieldGet(_isButtonClicked, this) ? null : visualColumn;
560
+ function _onBeforeViewportScrollHorizontally2(visualColumn) {
561
+ return _classPrivateFieldGet(this, _isButtonClicked) ? null : visualColumn;
531
562
  }
532
- /**
533
- * Hook sets the internal flag to `true` when the button is clicked.
534
- *
535
- * @param {MouseEvent} event The mouse event object.
536
- */
537
- function _onBeforeOnCellMouseDown(event) {
563
+ function _onBeforeOnCellMouseDown2(event) {
538
564
  if (hasClass(event.target, BUTTON_CLASS_NAME)) {
539
- _classPrivateFieldSet(_isButtonClicked, this, true);
565
+ _classPrivateFieldSet(this, _isButtonClicked, true);
540
566
  }
541
567
  }
542
568
  DropdownMenu.SEPARATOR = {