handsontable 0.0.0-next-200799f-20240311 → 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 -79
  32. package/core.mjs +22 -79
  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 +7620 -10327
  42. package/dist/handsontable.full.min.css +2 -2
  43. package/dist/handsontable.full.min.js +277 -277
  44. package/dist/handsontable.js +5525 -7779
  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 +355 -595
  178. package/plugins/mergeCells/mergeCells.mjs +355 -595
  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 +4 -4
  208. package/renderers/checkboxRenderer/checkboxRenderer.mjs +4 -4
  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 -252
  214. package/selection/selection.mjs +59 -251
  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 -258
  272. package/plugins/mergeCells/focusOrder.mjs +0 -253
package/editorManager.mjs CHANGED
@@ -4,15 +4,14 @@ 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 _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
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"); }
8
8
  import { isFunctionKey, isCtrlMetaKey } from "./helpers/unicode.mjs";
9
9
  import { isImmediatePropagationStopped } from "./helpers/dom/event.mjs";
10
10
  import { getEditorInstance } from "./editors/registry.mjs";
11
11
  import EventManager from "./eventManager.mjs";
12
12
  import { isDefined } from "./helpers/mixed.mjs";
13
13
  export const SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
14
- var _onAfterDocumentKeyDown = /*#__PURE__*/new WeakSet();
15
- var _onCellDblClick = /*#__PURE__*/new WeakSet();
14
+ var _EditorManager_brand = /*#__PURE__*/new WeakSet();
16
15
  class EditorManager {
17
16
  /**
18
17
  * @param {Core} hotInstance The Handsontable instance.
@@ -20,19 +19,12 @@ class EditorManager {
20
19
  * @param {Selection} selection The selection instance.
21
20
  */
22
21
  constructor(hotInstance, tableMeta, _selection) {
23
- /**
24
- * OnCellDblClick callback.
25
- *
26
- * @param {MouseEvent} event The mouse event object.
27
- * @param {object} coords The cell coordinates.
28
- */
29
- _classPrivateMethodInitSpec(this, _onCellDblClick);
30
22
  /**
31
23
  * OnAfterDocumentKeyDown callback.
32
24
  *
33
25
  * @param {KeyboardEvent} event The keyboard event object.
34
26
  */
35
- _classPrivateMethodInitSpec(this, _onAfterDocumentKeyDown);
27
+ _classPrivateMethodInitSpec(this, _EditorManager_brand);
36
28
  /**
37
29
  * Instance of {@link Handsontable}.
38
30
  *
@@ -92,7 +84,7 @@ class EditorManager {
92
84
  this.tableMeta = tableMeta;
93
85
  this.selection = _selection;
94
86
  this.eventManager = new EventManager(hotInstance);
95
- this.hot.addHook('afterDocumentKeyDown', event => _classPrivateMethodGet(this, _onAfterDocumentKeyDown, _onAfterDocumentKeyDown2).call(this, event));
87
+ this.hot.addHook('afterDocumentKeyDown', event => _assertClassBrand(_EditorManager_brand, this, _onAfterDocumentKeyDown).call(this, event));
96
88
 
97
89
  // Open editor when text composition is started (IME editor)
98
90
  this.eventManager.addEventListener(this.hot.rootDocument.documentElement, 'compositionstart', event => {
@@ -100,7 +92,7 @@ class EditorManager {
100
92
  this.openEditor('', event);
101
93
  }
102
94
  });
103
- this.hot.view._wt.update('onCellDblClick', (event, coords, elem) => _classPrivateMethodGet(this, _onCellDblClick, _onCellDblClick2).call(this, event, coords, elem));
95
+ this.hot.view._wt.update('onCellDblClick', (event, coords, elem) => _assertClassBrand(_EditorManager_brand, this, _onCellDblClick).call(this, event, coords, elem));
104
96
  }
105
97
 
106
98
  /**
@@ -314,22 +306,18 @@ class EditorManager {
314
306
  }
315
307
 
316
308
  /**
317
- * Controls selection's behavior after clicking `Enter`.
309
+ * Controls selection's behaviour after clicking `Enter`.
318
310
  *
319
311
  * @private
320
- * @param {KeyboardEvent} event The keyboard event object.
312
+ * @param {boolean} isShiftPressed If `true`, then the selection will move up after hit enter.
321
313
  */
322
- moveSelectionAfterEnter(event) {
323
- const enterMoves = {
324
- ...(typeof this.tableMeta.enterMoves === 'function' ? this.tableMeta.enterMoves(event) : this.tableMeta.enterMoves)
325
- };
326
- if (event.shiftKey) {
327
- enterMoves.row = -enterMoves.row;
328
- enterMoves.col = -enterMoves.col;
329
- }
330
- if (this.hot.selection.isMultiple()) {
331
- this.selection.transformFocus(enterMoves.row, enterMoves.col);
314
+ moveSelectionAfterEnter(isShiftPressed) {
315
+ const enterMoves = typeof this.tableMeta.enterMoves === 'function' ? this.tableMeta.enterMoves(event) : this.tableMeta.enterMoves;
316
+ if (isShiftPressed) {
317
+ // move selection up
318
+ this.selection.transformStart(-enterMoves.row, -enterMoves.col);
332
319
  } else {
320
+ // move selection down (add a new row if needed)
333
321
  this.selection.transformStart(enterMoves.row, enterMoves.col, true);
334
322
  }
335
323
  }
@@ -341,7 +329,7 @@ class EditorManager {
341
329
  this.eventManager.destroy();
342
330
  }
343
331
  }
344
- function _onAfterDocumentKeyDown2(event) {
332
+ function _onAfterDocumentKeyDown(event) {
345
333
  const selection = this.hot.getSelectedRangeLast();
346
334
  if (!this.hot.isListening() || !selection || selection.highlight.isHeader() || isImmediatePropagationStopped(event)) {
347
335
  return;
@@ -385,7 +373,13 @@ function _onAfterDocumentKeyDown2(event) {
385
373
  }
386
374
  }
387
375
  }
388
- function _onCellDblClick2(event, coords) {
376
+ /**
377
+ * OnCellDblClick callback.
378
+ *
379
+ * @param {MouseEvent} event The mouse event object.
380
+ * @param {object} coords The cell coordinates.
381
+ */
382
+ function _onCellDblClick(event, coords) {
389
383
  if (coords.isCell()) {
390
384
  this.openEditor(null, event, true);
391
385
  }
@@ -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
  require("core-js/modules/es.array.push.js");
6
6
  var _handsontableEditor = require("../handsontableEditor");
7
7
  var _array = require("../../helpers/array");
@@ -17,9 +17,8 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
17
17
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
19
19
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
21
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
22
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
20
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
21
+ 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
22
  const EDITOR_TYPE = exports.EDITOR_TYPE = 'autocomplete';
24
23
 
25
24
  /**
@@ -53,10 +52,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
53
52
  *
54
53
  * @type {string}
55
54
  */
56
- _classPrivateFieldInitSpec(this, _idPrefix, {
57
- writable: true,
58
- value: this.hot.guid.slice(0, 9)
59
- });
55
+ _classPrivateFieldInitSpec(this, _idPrefix, this.hot.guid.slice(0, 9));
60
56
  /**
61
57
  * Filters and sorts by relevance.
62
58
  *
@@ -168,7 +164,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
168
164
  prepare(row, col, prop, td, value, cellProperties) {
169
165
  super.prepare(row, col, prop, td, value, cellProperties);
170
166
  if (this.hot.getSettings().ariaTags) {
171
- (0, _element.setAttribute)(this.TEXTAREA, [(0, _a11y.A11Y_EXPANDED)('false'), (0, _a11y.A11Y_CONTROLS)(`${_classPrivateFieldGet(this, _idPrefix)}-listbox-${row}-${col}`)]);
167
+ (0, _element.setAttribute)(this.TEXTAREA, [(0, _a11y.A11Y_EXPANDED)('false'), (0, _a11y.A11Y_CONTROLS)(`${_classPrivateFieldGet(_idPrefix, this)}-listbox-${row}-${col}`)]);
172
168
  }
173
169
  }
174
170
 
@@ -232,7 +228,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
232
228
  if (rootInstanceAriaTagsEnabled) {
233
229
  // Add `role=presentation` to the main table to prevent the readers from treating the option list as a table.
234
230
  (0, _element.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE, ...(0, _a11y.A11Y_PRESENTATION)());
235
- (0, _element.setAttribute)(this.htEditor.rootElement, [(0, _a11y.A11Y_LISTBOX)(), (0, _a11y.A11Y_LIVE)('polite'), (0, _a11y.A11Y_RELEVANT)('text'), ['id', `${_classPrivateFieldGet(this, _idPrefix)}-listbox-${rowIndex}-${colIndex}`]]);
231
+ (0, _element.setAttribute)(this.htEditor.rootElement, [(0, _a11y.A11Y_LISTBOX)(), (0, _a11y.A11Y_LIVE)('polite'), (0, _a11y.A11Y_RELEVANT)('text'), ['id', `${_classPrivateFieldGet(_idPrefix, this)}-listbox-${rowIndex}-${colIndex}`]]);
236
232
  (0, _element.setAttribute)(this.TEXTAREA, ...(0, _a11y.A11Y_EXPANDED)('true'));
237
233
  }
238
234
  this.hot._registerTimeout(() => {
@@ -1,13 +1,12 @@
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 _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
4
4
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
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(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
9
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
10
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
8
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
9
+ 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"); }
11
10
  import { HandsontableEditor } from "../handsontableEditor/index.mjs";
12
11
  import { arrayMap, pivot } from "../../helpers/array.mjs";
13
12
  import { addClass, getCaretPosition, getScrollbarWidth, getSelectionEndPosition, getTrimmingContainer, offset, outerHeight, outerWidth, setAttribute, setCaretPosition } from "../../helpers/dom/element.mjs";
@@ -50,10 +49,7 @@ export class AutocompleteEditor extends HandsontableEditor {
50
49
  *
51
50
  * @type {string}
52
51
  */
53
- _classPrivateFieldInitSpec(this, _idPrefix, {
54
- writable: true,
55
- value: this.hot.guid.slice(0, 9)
56
- });
52
+ _classPrivateFieldInitSpec(this, _idPrefix, this.hot.guid.slice(0, 9));
57
53
  /**
58
54
  * Filters and sorts by relevance.
59
55
  *
@@ -165,7 +161,7 @@ export class AutocompleteEditor extends HandsontableEditor {
165
161
  prepare(row, col, prop, td, value, cellProperties) {
166
162
  super.prepare(row, col, prop, td, value, cellProperties);
167
163
  if (this.hot.getSettings().ariaTags) {
168
- setAttribute(this.TEXTAREA, [A11Y_EXPANDED('false'), A11Y_CONTROLS(`${_classPrivateFieldGet(this, _idPrefix)}-listbox-${row}-${col}`)]);
164
+ setAttribute(this.TEXTAREA, [A11Y_EXPANDED('false'), A11Y_CONTROLS(`${_classPrivateFieldGet(_idPrefix, this)}-listbox-${row}-${col}`)]);
169
165
  }
170
166
  }
171
167
 
@@ -229,7 +225,7 @@ export class AutocompleteEditor extends HandsontableEditor {
229
225
  if (rootInstanceAriaTagsEnabled) {
230
226
  // Add `role=presentation` to the main table to prevent the readers from treating the option list as a table.
231
227
  setAttribute(this.htEditor.view._wt.wtOverlays.wtTable.TABLE, ...A11Y_PRESENTATION());
232
- setAttribute(this.htEditor.rootElement, [A11Y_LISTBOX(), A11Y_LIVE('polite'), A11Y_RELEVANT('text'), ['id', `${_classPrivateFieldGet(this, _idPrefix)}-listbox-${rowIndex}-${colIndex}`]]);
228
+ setAttribute(this.htEditor.rootElement, [A11Y_LISTBOX(), A11Y_LIVE('polite'), A11Y_RELEVANT('text'), ['id', `${_classPrivateFieldGet(_idPrefix, this)}-listbox-${rowIndex}-${colIndex}`]]);
233
229
  setAttribute(this.TEXTAREA, ...A11Y_EXPANDED('true'));
234
230
  }
235
231
  this.hot._registerTimeout(() => {
package/eventManager.js CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.getListenersCounter = getListenersCounter;
5
- require("core-js/modules/es.array.push.js");
6
5
  require("core-js/modules/es.error.cause.js");
6
+ require("core-js/modules/es.array.push.js");
7
7
  var _event = require("./helpers/dom/event");
8
8
  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; }
9
9
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
package/eventManager.mjs CHANGED
@@ -1,5 +1,5 @@
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 _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
5
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
package/focusManager.js CHANGED
@@ -8,12 +8,9 @@ var _function = require("./helpers/function");
8
8
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
9
9
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
10
10
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
11
- function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
12
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
13
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
14
- function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
15
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
16
- 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; } }
11
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
12
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
13
+ 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"); }
17
14
  /**
18
15
  * Possible focus modes.
19
16
  * - CELL - The browser's focus stays on the lastly selected cell element.
@@ -35,40 +32,20 @@ var _focusMode = /*#__PURE__*/new WeakMap();
35
32
  var _refocusDelay = /*#__PURE__*/new WeakMap();
36
33
  var _refocusElementGetter = /*#__PURE__*/new WeakMap();
37
34
  var _debouncedSelect = /*#__PURE__*/new WeakMap();
38
- var _getSelectedCell = /*#__PURE__*/new WeakSet();
39
- var _focusCell = /*#__PURE__*/new WeakSet();
40
- var _focusEditorElement = /*#__PURE__*/new WeakSet();
41
- var _onUpdateSettings = /*#__PURE__*/new WeakSet();
35
+ var _FocusManager_brand = /*#__PURE__*/new WeakSet();
42
36
  class FocusManager {
43
37
  constructor(hotInstance) {
44
38
  var _this = this;
45
- /**
46
- * Update the manager configuration after calling `updateSettings`.
47
- *
48
- * @param {object} newSettings The new settings passed to the `updateSettings` method.
49
- */
50
- _classPrivateMethodInitSpec(this, _onUpdateSettings);
51
- /**
52
- * Manage the browser's focus after cell selection end.
53
- */
54
- _classPrivateMethodInitSpec(this, _focusEditorElement);
55
- /**
56
- * Manage the browser's focus after each cell selection change.
57
- */
58
- _classPrivateMethodInitSpec(this, _focusCell);
59
39
  /**
60
40
  * Get and return the currently selected and highlighted cell/header element.
61
41
  *
62
42
  * @param {Function} callback Callback function to be called after the cell element is retrieved.
63
43
  */
64
- _classPrivateMethodInitSpec(this, _getSelectedCell);
44
+ _classPrivateMethodInitSpec(this, _FocusManager_brand);
65
45
  /**
66
46
  * The Handsontable instance.
67
47
  */
68
- _classPrivateFieldInitSpec(this, _hot, {
69
- writable: true,
70
- value: void 0
71
- });
48
+ _classPrivateFieldInitSpec(this, _hot, void 0);
72
49
  /**
73
50
  * The currently enabled focus mode.
74
51
  * Can be either:
@@ -79,59 +56,47 @@ class FocusManager {
79
56
  *
80
57
  * @type {'cell' | 'mixed'}
81
58
  */
82
- _classPrivateFieldInitSpec(this, _focusMode, {
83
- writable: true,
84
- value: void 0
85
- });
59
+ _classPrivateFieldInitSpec(this, _focusMode, void 0);
86
60
  /**
87
61
  * The delay after which the focus switches from the lastly selected cell to the active editor's `TEXTAREA`
88
62
  * element if the focus mode is set to 'mixed'.
89
63
  *
90
64
  * @type {number}
91
65
  */
92
- _classPrivateFieldInitSpec(this, _refocusDelay, {
93
- writable: true,
94
- value: 50
95
- });
66
+ _classPrivateFieldInitSpec(this, _refocusDelay, 50);
96
67
  /**
97
68
  * Getter function for the element to be used when refocusing the browser after a delay. If `null`, the active
98
69
  * editor's `TEXTAREA` element will be used.
99
70
  *
100
71
  * @type {null|Function}
101
72
  */
102
- _classPrivateFieldInitSpec(this, _refocusElementGetter, {
103
- writable: true,
104
- value: null
105
- });
73
+ _classPrivateFieldInitSpec(this, _refocusElementGetter, null);
106
74
  /**
107
75
  * Map of the debounced `select` functions.
108
76
  *
109
77
  * @type {Map<number, Function>}
110
78
  */
111
- _classPrivateFieldInitSpec(this, _debouncedSelect, {
112
- writable: true,
113
- value: new Map()
114
- });
79
+ _classPrivateFieldInitSpec(this, _debouncedSelect, new Map());
115
80
  const hotSettings = hotInstance.getSettings();
116
- _classPrivateFieldSet(this, _hot, hotInstance);
117
- _classPrivateFieldSet(this, _focusMode, hotSettings.imeFastEdit ? FOCUS_MODES.MIXED : FOCUS_MODES.CELL);
118
- _classPrivateFieldGet(this, _hot).addHook('afterUpdateSettings', function () {
81
+ _classPrivateFieldSet(_hot, this, hotInstance);
82
+ _classPrivateFieldSet(_focusMode, this, hotSettings.imeFastEdit ? FOCUS_MODES.MIXED : FOCUS_MODES.CELL);
83
+ _classPrivateFieldGet(_hot, this).addHook('afterUpdateSettings', function () {
119
84
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
120
85
  args[_key] = arguments[_key];
121
86
  }
122
- return _classPrivateMethodGet(_this, _onUpdateSettings, _onUpdateSettings2).call(_this, ...args);
87
+ return _assertClassBrand(_FocusManager_brand, _this, _onUpdateSettings).call(_this, ...args);
123
88
  });
124
- _classPrivateFieldGet(this, _hot).addHook('afterSelection', function () {
89
+ _classPrivateFieldGet(_hot, this).addHook('afterSelection', function () {
125
90
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
126
91
  args[_key2] = arguments[_key2];
127
92
  }
128
- return _classPrivateMethodGet(_this, _focusCell, _focusCell2).call(_this, ...args);
93
+ return _assertClassBrand(_FocusManager_brand, _this, _focusCell).call(_this, ...args);
129
94
  });
130
- _classPrivateFieldGet(this, _hot).addHook('afterSelectionEnd', function () {
95
+ _classPrivateFieldGet(_hot, this).addHook('afterSelectionEnd', function () {
131
96
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
132
97
  args[_key3] = arguments[_key3];
133
98
  }
134
- return _classPrivateMethodGet(_this, _focusEditorElement, _focusEditorElement2).call(_this, ...args);
99
+ return _assertClassBrand(_FocusManager_brand, _this, _focusEditorElement).call(_this, ...args);
135
100
  });
136
101
  }
137
102
 
@@ -141,7 +106,7 @@ class FocusManager {
141
106
  * @returns {'cell' | 'mixed'}
142
107
  */
143
108
  getFocusMode() {
144
- return _classPrivateFieldGet(this, _focusMode);
109
+ return _classPrivateFieldGet(_focusMode, this);
145
110
  }
146
111
 
147
112
  /**
@@ -151,7 +116,7 @@ class FocusManager {
151
116
  */
152
117
  setFocusMode(focusMode) {
153
118
  if (Object.values(FOCUS_MODES).includes(focusMode)) {
154
- _classPrivateFieldSet(this, _focusMode, focusMode);
119
+ _classPrivateFieldSet(_focusMode, this, focusMode);
155
120
  } else {
156
121
  (0, _console.warn)(`"${focusMode}" is not a valid focus mode.`);
157
122
  }
@@ -164,7 +129,7 @@ class FocusManager {
164
129
  * @returns {number} Delay in milliseconds.
165
130
  */
166
131
  getRefocusDelay() {
167
- return _classPrivateFieldGet(this, _refocusDelay);
132
+ return _classPrivateFieldGet(_refocusDelay, this);
168
133
  }
169
134
 
170
135
  /**
@@ -174,7 +139,7 @@ class FocusManager {
174
139
  * @param {number} delay Delay in milliseconds.
175
140
  */
176
141
  setRefocusDelay(delay) {
177
- _classPrivateFieldSet(this, _refocusDelay, delay);
142
+ _classPrivateFieldSet(_refocusDelay, this, delay);
178
143
  }
179
144
 
180
145
  /**
@@ -183,7 +148,7 @@ class FocusManager {
183
148
  * @param {Function} getRefocusElementFunction The refocus element getter.
184
149
  */
185
150
  setRefocusElementGetter(getRefocusElementFunction) {
186
- _classPrivateFieldSet(this, _refocusElementGetter, getRefocusElementFunction);
151
+ _classPrivateFieldSet(_refocusElementGetter, this, getRefocusElementFunction);
187
152
  }
188
153
 
189
154
  /**
@@ -192,11 +157,11 @@ class FocusManager {
192
157
  * @returns {HTMLTextAreaElement|HTMLElement|undefined}
193
158
  */
194
159
  getRefocusElement() {
195
- if (typeof _classPrivateFieldGet(this, _refocusElementGetter) === 'function') {
196
- return _classPrivateFieldGet(this, _refocusElementGetter).call(this);
160
+ if (typeof _classPrivateFieldGet(_refocusElementGetter, this) === 'function') {
161
+ return _classPrivateFieldGet(_refocusElementGetter, this).call(this);
197
162
  } else {
198
163
  var _classPrivateFieldGet2;
199
- return (_classPrivateFieldGet2 = _classPrivateFieldGet(this, _hot).getActiveEditor()) === null || _classPrivateFieldGet2 === void 0 ? void 0 : _classPrivateFieldGet2.TEXTAREA;
164
+ return (_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getActiveEditor()) === null || _classPrivateFieldGet2 === void 0 ? void 0 : _classPrivateFieldGet2.TEXTAREA;
200
165
  }
201
166
  }
202
167
 
@@ -208,15 +173,15 @@ class FocusManager {
208
173
  focusOnHighlightedCell(selectedCell) {
209
174
  const focusElement = element => {
210
175
  var _classPrivateFieldGet3, _classPrivateFieldGet4;
211
- const currentHighlightCoords = (_classPrivateFieldGet3 = _classPrivateFieldGet(this, _hot).getSelectedRangeLast()) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.highlight;
176
+ const currentHighlightCoords = (_classPrivateFieldGet3 = _classPrivateFieldGet(_hot, this).getSelectedRangeLast()) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.highlight;
212
177
  if (!currentHighlightCoords) {
213
178
  return;
214
179
  }
215
- let elementToBeFocused = _classPrivateFieldGet(this, _hot).runHooks('modifyFocusedElement', currentHighlightCoords.row, currentHighlightCoords.col, element);
180
+ let elementToBeFocused = _classPrivateFieldGet(_hot, this).runHooks('modifyFocusedElement', currentHighlightCoords.row, currentHighlightCoords.col, element);
216
181
  if (!(elementToBeFocused instanceof HTMLElement)) {
217
182
  elementToBeFocused = element;
218
183
  }
219
- if (elementToBeFocused && !((_classPrivateFieldGet4 = _classPrivateFieldGet(this, _hot).getActiveEditor()) !== null && _classPrivateFieldGet4 !== void 0 && _classPrivateFieldGet4.isOpened())) {
184
+ if (elementToBeFocused && !((_classPrivateFieldGet4 = _classPrivateFieldGet(_hot, this).getActiveEditor()) !== null && _classPrivateFieldGet4 !== void 0 && _classPrivateFieldGet4.isOpened())) {
220
185
  elementToBeFocused.focus({
221
186
  preventScroll: true
222
187
  });
@@ -225,7 +190,7 @@ class FocusManager {
225
190
  if (selectedCell) {
226
191
  focusElement(selectedCell);
227
192
  } else {
228
- _classPrivateMethodGet(this, _getSelectedCell, _getSelectedCell2).call(this, element => focusElement(element));
193
+ _assertClassBrand(_FocusManager_brand, this, _getSelectedCell).call(this, element => focusElement(element));
229
194
  }
230
195
  }
231
196
 
@@ -237,42 +202,45 @@ class FocusManager {
237
202
  */
238
203
  refocusToEditorTextarea() {
239
204
  var _classPrivateFieldGet5;
240
- let delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _classPrivateFieldGet(this, _refocusDelay);
205
+ let delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _classPrivateFieldGet(_refocusDelay, this);
241
206
  const refocusElement = this.getRefocusElement();
242
207
 
243
208
  // Re-focus on the editor's `TEXTAREA` element (or a predefined element) if the `imeFastEdit` option is enabled.
244
- if (_classPrivateFieldGet(this, _hot).getSettings().imeFastEdit && !((_classPrivateFieldGet5 = _classPrivateFieldGet(this, _hot).getActiveEditor()) !== null && _classPrivateFieldGet5 !== void 0 && _classPrivateFieldGet5.isOpened()) && !!refocusElement) {
245
- if (!_classPrivateFieldGet(this, _debouncedSelect).has(delay)) {
246
- _classPrivateFieldGet(this, _debouncedSelect).set(delay, (0, _function.debounce)(() => {
209
+ if (_classPrivateFieldGet(_hot, this).getSettings().imeFastEdit && !((_classPrivateFieldGet5 = _classPrivateFieldGet(_hot, this).getActiveEditor()) !== null && _classPrivateFieldGet5 !== void 0 && _classPrivateFieldGet5.isOpened()) && !!refocusElement) {
210
+ if (!_classPrivateFieldGet(_debouncedSelect, this).has(delay)) {
211
+ _classPrivateFieldGet(_debouncedSelect, this).set(delay, (0, _function.debounce)(() => {
247
212
  refocusElement.select();
248
213
  }, delay));
249
214
  }
250
- _classPrivateFieldGet(this, _debouncedSelect).get(delay)();
215
+ _classPrivateFieldGet(_debouncedSelect, this).get(delay)();
251
216
  }
252
217
  }
253
218
  }
254
219
  exports.FocusManager = FocusManager;
255
- function _getSelectedCell2(callback) {
220
+ function _getSelectedCell(callback) {
256
221
  var _classPrivateFieldGet6;
257
- const highlight = (_classPrivateFieldGet6 = _classPrivateFieldGet(this, _hot).getSelectedRangeLast()) === null || _classPrivateFieldGet6 === void 0 ? void 0 : _classPrivateFieldGet6.highlight;
258
- if (!highlight || !_classPrivateFieldGet(this, _hot).selection.isCellVisible(highlight)) {
222
+ const highlight = (_classPrivateFieldGet6 = _classPrivateFieldGet(_hot, this).getSelectedRangeLast()) === null || _classPrivateFieldGet6 === void 0 ? void 0 : _classPrivateFieldGet6.highlight;
223
+ if (!highlight || !_classPrivateFieldGet(_hot, this).selection.isCellVisible(highlight)) {
259
224
  callback(null);
260
225
  return;
261
226
  }
262
- const cell = _classPrivateFieldGet(this, _hot).getCell(highlight.row, highlight.col, true);
227
+ const cell = _classPrivateFieldGet(_hot, this).getCell(highlight.row, highlight.col, true);
263
228
  if (cell === null) {
264
- _classPrivateFieldGet(this, _hot).addHookOnce('afterScroll', () => {
265
- callback(_classPrivateFieldGet(this, _hot).getCell(highlight.row, highlight.col, true));
229
+ _classPrivateFieldGet(_hot, this).addHookOnce('afterScroll', () => {
230
+ callback(_classPrivateFieldGet(_hot, this).getCell(highlight.row, highlight.col, true));
266
231
  });
267
232
  } else {
268
233
  callback(cell);
269
234
  }
270
235
  }
271
- function _focusCell2() {
272
- _classPrivateMethodGet(this, _getSelectedCell, _getSelectedCell2).call(this, selectedCell => {
236
+ /**
237
+ * Manage the browser's focus after each cell selection change.
238
+ */
239
+ function _focusCell() {
240
+ _assertClassBrand(_FocusManager_brand, this, _getSelectedCell).call(this, selectedCell => {
273
241
  const {
274
242
  activeElement
275
- } = _classPrivateFieldGet(this, _hot).rootDocument;
243
+ } = _classPrivateFieldGet(_hot, this).rootDocument;
276
244
 
277
245
  // Blurring the `activeElement` removes the unwanted border around the focusable element (#6877)
278
246
  // and resets the `document.activeElement` property. The blurring should happen only when the
@@ -284,14 +252,22 @@ function _focusCell2() {
284
252
  this.focusOnHighlightedCell(selectedCell);
285
253
  });
286
254
  }
287
- function _focusEditorElement2() {
288
- _classPrivateMethodGet(this, _getSelectedCell, _getSelectedCell2).call(this, selectedCell => {
255
+ /**
256
+ * Manage the browser's focus after cell selection end.
257
+ */
258
+ function _focusEditorElement() {
259
+ _assertClassBrand(_FocusManager_brand, this, _getSelectedCell).call(this, selectedCell => {
289
260
  if (this.getFocusMode() === FOCUS_MODES.MIXED && selectedCell.nodeName === 'TD') {
290
261
  this.refocusToEditorTextarea();
291
262
  }
292
263
  });
293
264
  }
294
- function _onUpdateSettings2(newSettings) {
265
+ /**
266
+ * Update the manager configuration after calling `updateSettings`.
267
+ *
268
+ * @param {object} newSettings The new settings passed to the `updateSettings` method.
269
+ */
270
+ function _onUpdateSettings(newSettings) {
295
271
  if (newSettings.imeFastEdit && this.getFocusMode() !== FOCUS_MODES.MIXED) {
296
272
  this.setFocusMode(FOCUS_MODES.MIXED);
297
273
  } else if (!newSettings.imeFastEdit && this.getFocusMode() !== FOCUS_MODES.CELL) {