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
@@ -2,9 +2,12 @@ import "core-js/modules/es.error.cause.js";
2
2
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
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
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
6
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
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"); }
5
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
6
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
7
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
8
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
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 _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; } }
8
11
  /* eslint-disable no-continue */
9
12
  import { addClass } from "../../../../helpers/dom/element.mjs";
10
13
  /**
@@ -15,7 +18,7 @@ import { addClass } from "../../../../helpers/dom/element.mjs";
15
18
  */
16
19
  var _selection = /*#__PURE__*/new WeakMap();
17
20
  var _activeOverlaysWot = /*#__PURE__*/new WeakMap();
18
- var _SelectionScanner_brand = /*#__PURE__*/new WeakSet();
21
+ var _scanCellsRange = /*#__PURE__*/new WeakSet();
19
22
  export class SelectionScanner {
20
23
  constructor() {
21
24
  /**
@@ -23,19 +26,25 @@ export class SelectionScanner {
23
26
  *
24
27
  * @param {function(number, number): void} callback The callback function to trigger.
25
28
  */
26
- _classPrivateMethodInitSpec(this, _SelectionScanner_brand);
29
+ _classPrivateMethodInitSpec(this, _scanCellsRange);
27
30
  /**
28
31
  * Active Selection instance to process.
29
32
  *
30
33
  * @type {Selection}
31
34
  */
32
- _classPrivateFieldInitSpec(this, _selection, void 0);
35
+ _classPrivateFieldInitSpec(this, _selection, {
36
+ writable: true,
37
+ value: void 0
38
+ });
33
39
  /**
34
40
  * The Walkontable instance that the scans depends on.
35
41
  *
36
42
  * @type {Walkontable}
37
43
  */
38
- _classPrivateFieldInitSpec(this, _activeOverlaysWot, void 0);
44
+ _classPrivateFieldInitSpec(this, _activeOverlaysWot, {
45
+ writable: true,
46
+ value: void 0
47
+ });
39
48
  }
40
49
  /**
41
50
  * Sets the Walkontable instance that will be taking into account while scanning the table.
@@ -44,7 +53,7 @@ export class SelectionScanner {
44
53
  * @returns {SelectionScanner}
45
54
  */
46
55
  setActiveOverlay(activeOverlaysWot) {
47
- _classPrivateFieldSet(_activeOverlaysWot, this, activeOverlaysWot);
56
+ _classPrivateFieldSet(this, _activeOverlaysWot, activeOverlaysWot);
48
57
  return this;
49
58
  }
50
59
 
@@ -55,7 +64,7 @@ export class SelectionScanner {
55
64
  * @returns {SelectionScanner}
56
65
  */
57
66
  setActiveSelection(selection) {
58
- _classPrivateFieldSet(_selection, this, selection);
67
+ _classPrivateFieldSet(this, _selection, selection);
59
68
  return this;
60
69
  }
61
70
 
@@ -66,7 +75,7 @@ export class SelectionScanner {
66
75
  * @returns {HTMLTableElement[]}
67
76
  */
68
77
  scan() {
69
- const selectionType = _classPrivateFieldGet(_selection, this).settings.selectionType;
78
+ const selectionType = _classPrivateFieldGet(this, _selection).settings.selectionType;
70
79
  const elements = new Set();
71
80
 
72
81
  // TODO(improvement): use heuristics from coords to detect what type of scan
@@ -102,10 +111,10 @@ export class SelectionScanner {
102
111
  * @param {function(HTMLTableElement): void} callback The callback function to trigger.
103
112
  */
104
113
  scanColumnsInHeadersRange(callback) {
105
- const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(_selection, this).getCorners();
114
+ const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(this, _selection).getCorners();
106
115
  const {
107
116
  wtTable
108
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
117
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
109
118
  const renderedColumnsCount = wtTable.getRenderedColumnsCount();
110
119
  const columnHeadersCount = wtTable.getColumnHeadersCount();
111
120
  let cursor = 0;
@@ -120,8 +129,8 @@ export class SelectionScanner {
120
129
  }
121
130
  const positiveBasedHeaderLevel = headerLevel + columnHeadersCount;
122
131
  let TH = wtTable.getColumnHeader(sourceColumn, positiveBasedHeaderLevel);
123
- const newSourceCol = _classPrivateFieldGet(_activeOverlaysWot, this).getSetting('onBeforeHighlightingColumnHeader', sourceColumn, positiveBasedHeaderLevel, {
124
- selectionType: _classPrivateFieldGet(_selection, this).settings.selectionType,
132
+ const newSourceCol = _classPrivateFieldGet(this, _activeOverlaysWot).getSetting('onBeforeHighlightingColumnHeader', sourceColumn, positiveBasedHeaderLevel, {
133
+ selectionType: _classPrivateFieldGet(this, _selection).settings.selectionType,
125
134
  columnCursor: cursor,
126
135
  selectionWidth: bottomColumn - topColumn + 1
127
136
  });
@@ -144,10 +153,10 @@ export class SelectionScanner {
144
153
  * @param {function(HTMLTableElement): void} callback The callback function to trigger.
145
154
  */
146
155
  scanRowsInHeadersRange(callback) {
147
- const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(_selection, this).getCorners();
156
+ const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(this, _selection).getCorners();
148
157
  const {
149
158
  wtTable
150
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
159
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
151
160
  const renderedRowsCount = wtTable.getRenderedRowsCount();
152
161
  const rowHeadersCount = wtTable.getRowHeadersCount();
153
162
  let cursor = 0;
@@ -162,8 +171,8 @@ export class SelectionScanner {
162
171
  }
163
172
  const positiveBasedHeaderLevel = headerLevel + rowHeadersCount;
164
173
  let TH = wtTable.getRowHeader(sourceRow, positiveBasedHeaderLevel);
165
- const newSourceRow = _classPrivateFieldGet(_activeOverlaysWot, this).getSetting('onBeforeHighlightingRowHeader', sourceRow, positiveBasedHeaderLevel, {
166
- selectionType: _classPrivateFieldGet(_selection, this).settings.selectionType,
174
+ const newSourceRow = _classPrivateFieldGet(this, _activeOverlaysWot).getSetting('onBeforeHighlightingRowHeader', sourceRow, positiveBasedHeaderLevel, {
175
+ selectionType: _classPrivateFieldGet(this, _selection).settings.selectionType,
167
176
  rowCursor: cursor,
168
177
  selectionHeight: bottomRow - topRow + 1
169
178
  });
@@ -186,16 +195,16 @@ export class SelectionScanner {
186
195
  * @param {function(HTMLTableElement): void} callback The callback function to trigger.
187
196
  */
188
197
  scanCellsRange(callback) {
189
- const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(_selection, this).getCorners();
198
+ const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(this, _selection).getCorners();
190
199
  const {
191
200
  wtTable
192
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
193
- _assertClassBrand(_SelectionScanner_brand, this, _scanCellsRange).call(this, (sourceRow, sourceColumn) => {
201
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
202
+ _classPrivateMethodGet(this, _scanCellsRange, _scanCellsRange2).call(this, (sourceRow, sourceColumn) => {
194
203
  if (sourceRow >= topRow && sourceRow <= bottomRow && sourceColumn >= topColumn && sourceColumn <= bottomColumn) {
195
- const cell = wtTable.getCell(_classPrivateFieldGet(_activeOverlaysWot, this).createCellCoords(sourceRow, sourceColumn));
204
+ const cell = wtTable.getCell(_classPrivateFieldGet(this, _activeOverlaysWot).createCellCoords(sourceRow, sourceColumn));
196
205
 
197
206
  // support for old API
198
- const additionalSelectionClass = _classPrivateFieldGet(_activeOverlaysWot, this).getSetting('onAfterDrawSelection', sourceRow, sourceColumn, _classPrivateFieldGet(_selection, this).settings.layerLevel);
207
+ const additionalSelectionClass = _classPrivateFieldGet(this, _activeOverlaysWot).getSetting('onAfterDrawSelection', sourceRow, sourceColumn, _classPrivateFieldGet(this, _selection).settings.layerLevel);
199
208
  if (typeof additionalSelectionClass === 'string') {
200
209
  addClass(cell, additionalSelectionClass);
201
210
  }
@@ -212,13 +221,13 @@ export class SelectionScanner {
212
221
  */
213
222
  scanRowsInCellsRange(callback) {
214
223
  // eslint-disable-next-line comma-spacing
215
- const [topRow,, bottomRow] = _classPrivateFieldGet(_selection, this).getCorners();
224
+ const [topRow,, bottomRow] = _classPrivateFieldGet(this, _selection).getCorners();
216
225
  const {
217
226
  wtTable
218
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
219
- _assertClassBrand(_SelectionScanner_brand, this, _scanCellsRange).call(this, (sourceRow, sourceColumn) => {
227
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
228
+ _classPrivateMethodGet(this, _scanCellsRange, _scanCellsRange2).call(this, (sourceRow, sourceColumn) => {
220
229
  if (sourceRow >= topRow && sourceRow <= bottomRow) {
221
- const cell = wtTable.getCell(_classPrivateFieldGet(_activeOverlaysWot, this).createCellCoords(sourceRow, sourceColumn));
230
+ const cell = wtTable.getCell(_classPrivateFieldGet(this, _activeOverlaysWot).createCellCoords(sourceRow, sourceColumn));
222
231
  callback(cell);
223
232
  }
224
233
  });
@@ -231,22 +240,22 @@ export class SelectionScanner {
231
240
  * @param {function(HTMLTableElement): void} callback The callback function to trigger.
232
241
  */
233
242
  scanColumnsInCellsRange(callback) {
234
- const [, topColumn,, bottomColumn] = _classPrivateFieldGet(_selection, this).getCorners();
243
+ const [, topColumn,, bottomColumn] = _classPrivateFieldGet(this, _selection).getCorners();
235
244
  const {
236
245
  wtTable
237
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
238
- _assertClassBrand(_SelectionScanner_brand, this, _scanCellsRange).call(this, (sourceRow, sourceColumn) => {
246
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
247
+ _classPrivateMethodGet(this, _scanCellsRange, _scanCellsRange2).call(this, (sourceRow, sourceColumn) => {
239
248
  if (sourceColumn >= topColumn && sourceColumn <= bottomColumn) {
240
- const cell = wtTable.getCell(_classPrivateFieldGet(_activeOverlaysWot, this).createCellCoords(sourceRow, sourceColumn));
249
+ const cell = wtTable.getCell(_classPrivateFieldGet(this, _activeOverlaysWot).createCellCoords(sourceRow, sourceColumn));
241
250
  callback(cell);
242
251
  }
243
252
  });
244
253
  }
245
254
  }
246
- function _scanCellsRange(callback) {
255
+ function _scanCellsRange2(callback) {
247
256
  const {
248
257
  wtTable
249
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
258
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
250
259
  const renderedRowsCount = wtTable.getRenderedRowsCount();
251
260
  const renderedColumnsCount = wtTable.getRenderedColumnsCount();
252
261
  for (let row = 0; row < renderedRowsCount; row += 1) {
@@ -7,9 +7,11 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
7
7
  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; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
9
9
  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); }
10
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
11
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
12
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
10
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
11
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
12
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
13
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
14
+ 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
15
  var _totalTargetWidth = /*#__PURE__*/new WeakMap();
14
16
  var _totalColumns = /*#__PURE__*/new WeakMap();
15
17
  var _stretchingColumnWidthFn = /*#__PURE__*/new WeakMap();
@@ -61,7 +63,10 @@ class ColumnStretching {
61
63
  /**
62
64
  * @type {number}
63
65
  */
64
- _classPrivateFieldInitSpec(this, _totalTargetWidth, 0);
66
+ _classPrivateFieldInitSpec(this, _totalTargetWidth, {
67
+ writable: true,
68
+ value: 0
69
+ });
65
70
  /**
66
71
  * @type {boolean}
67
72
  */
@@ -71,29 +76,41 @@ class ColumnStretching {
71
76
  *
72
77
  * @type {function(): number}
73
78
  */
74
- _classPrivateFieldInitSpec(this, _totalColumns, () => 0);
79
+ _classPrivateFieldInitSpec(this, _totalColumns, {
80
+ writable: true,
81
+ value: () => 0
82
+ });
75
83
  /**
76
84
  * Function that returns the width of the stretched column at a given index (in px).
77
85
  *
78
86
  * @type {function(): number}
79
87
  */
80
- _classPrivateFieldInitSpec(this, _stretchingColumnWidthFn, width => width);
88
+ _classPrivateFieldInitSpec(this, _stretchingColumnWidthFn, {
89
+ writable: true,
90
+ value: width => width
91
+ });
81
92
  /**
82
93
  * Function that returns the width of the column at a given index (in px).
83
94
  *
84
95
  * @type {function(): number}
85
96
  */
86
- _classPrivateFieldInitSpec(this, _columnWidthFn, width => width);
97
+ _classPrivateFieldInitSpec(this, _columnWidthFn, {
98
+ writable: true,
99
+ value: width => width
100
+ });
87
101
  /**
88
102
  * Stretch mode.
89
103
  *
90
104
  * @type {function(): 'all' | 'last' | 'none'}
91
105
  */
92
- _classPrivateFieldInitSpec(this, _stretchMode, () => 'none');
93
- _classPrivateFieldSet(_totalColumns, this, totalColumns);
94
- _classPrivateFieldSet(_stretchMode, this, stretchMode);
95
- _classPrivateFieldSet(_stretchingColumnWidthFn, this, stretchingColumnWidthFn !== null && stretchingColumnWidthFn !== void 0 ? stretchingColumnWidthFn : _classPrivateFieldGet(_stretchingColumnWidthFn, this));
96
- _classPrivateFieldSet(_columnWidthFn, this, columnWidthFn !== null && columnWidthFn !== void 0 ? columnWidthFn : _classPrivateFieldGet(_columnWidthFn, this));
106
+ _classPrivateFieldInitSpec(this, _stretchMode, {
107
+ writable: true,
108
+ value: () => 'none'
109
+ });
110
+ _classPrivateFieldSet(this, _totalColumns, totalColumns);
111
+ _classPrivateFieldSet(this, _stretchMode, stretchMode);
112
+ _classPrivateFieldSet(this, _stretchingColumnWidthFn, stretchingColumnWidthFn !== null && stretchingColumnWidthFn !== void 0 ? stretchingColumnWidthFn : _classPrivateFieldGet(this, _stretchingColumnWidthFn));
113
+ _classPrivateFieldSet(this, _columnWidthFn, columnWidthFn !== null && columnWidthFn !== void 0 ? columnWidthFn : _classPrivateFieldGet(this, _columnWidthFn));
97
114
  }
98
115
 
99
116
  /**
@@ -102,14 +119,14 @@ class ColumnStretching {
102
119
  * @param {number} totalWidth The total width of the table.
103
120
  */
104
121
  refreshStretching(totalWidth) {
105
- if (_classPrivateFieldGet(_stretchMode, this).call(this) === 'none') {
122
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'none') {
106
123
  return;
107
124
  }
108
- _classPrivateFieldSet(_totalTargetWidth, this, totalWidth);
125
+ _classPrivateFieldSet(this, _totalTargetWidth, totalWidth);
109
126
  let sumAll = 0;
110
- for (let i = 0; i < _classPrivateFieldGet(_totalColumns, this).call(this); i++) {
127
+ for (let i = 0; i < _classPrivateFieldGet(this, _totalColumns).call(this); i++) {
111
128
  const columnWidth = this._getColumnWidth(i);
112
- const permanentColumnWidth = _classPrivateFieldGet(_stretchingColumnWidthFn, this).call(this, undefined, i);
129
+ const permanentColumnWidth = _classPrivateFieldGet(this, _stretchingColumnWidthFn).call(this, undefined, i);
113
130
  if (typeof permanentColumnWidth === 'number') {
114
131
  totalWidth -= permanentColumnWidth;
115
132
  } else {
@@ -117,12 +134,12 @@ class ColumnStretching {
117
134
  }
118
135
  }
119
136
  const remainingSize = totalWidth - sumAll;
120
- if (_classPrivateFieldGet(_stretchMode, this).call(this) === 'all' && remainingSize > 0) {
137
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'all' && remainingSize > 0) {
121
138
  this.stretchAllRatio = totalWidth / sumAll;
122
139
  this.stretchAllColumnsWidth = [];
123
140
  this.needVerifyLastColumnWidth = true;
124
- } else if (_classPrivateFieldGet(_stretchMode, this).call(this) === 'last' && totalWidth !== Infinity) {
125
- const columnWidth = this._getColumnWidth(_classPrivateFieldGet(_totalColumns, this).call(this) - 1);
141
+ } else if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'last' && totalWidth !== Infinity) {
142
+ const columnWidth = this._getColumnWidth(_classPrivateFieldGet(this, _totalColumns).call(this) - 1);
126
143
  const lastColumnWidth = remainingSize + columnWidth;
127
144
  this.stretchLastWidth = lastColumnWidth >= 0 ? lastColumnWidth : columnWidth;
128
145
  }
@@ -137,9 +154,9 @@ class ColumnStretching {
137
154
  */
138
155
  getStretchedColumnWidth(column, baseWidth) {
139
156
  let result = null;
140
- if (_classPrivateFieldGet(_stretchMode, this).call(this) === 'all' && this.stretchAllRatio !== 0) {
157
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'all' && this.stretchAllRatio !== 0) {
141
158
  result = this._getStretchedAllColumnWidth(column, baseWidth);
142
- } else if (_classPrivateFieldGet(_stretchMode, this).call(this) === 'last' && this.stretchLastWidth !== 0) {
159
+ } else if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'last' && this.stretchLastWidth !== 0) {
143
160
  result = this._getStretchedLastColumnWidth(column);
144
161
  }
145
162
  return result;
@@ -155,20 +172,20 @@ class ColumnStretching {
155
172
  let sumRatioWidth = 0;
156
173
  if (!this.stretchAllColumnsWidth[column]) {
157
174
  const stretchedWidth = Math.round(baseWidth * this.stretchAllRatio);
158
- const newStretchedWidth = _classPrivateFieldGet(_stretchingColumnWidthFn, this).call(this, stretchedWidth, column);
175
+ const newStretchedWidth = _classPrivateFieldGet(this, _stretchingColumnWidthFn).call(this, stretchedWidth, column);
159
176
  if (newStretchedWidth === undefined) {
160
177
  this.stretchAllColumnsWidth[column] = stretchedWidth;
161
178
  } else {
162
179
  this.stretchAllColumnsWidth[column] = isNaN(newStretchedWidth) ? this._getColumnWidth(column) : newStretchedWidth;
163
180
  }
164
181
  }
165
- if (this.stretchAllColumnsWidth.length === _classPrivateFieldGet(_totalColumns, this).call(this) && this.needVerifyLastColumnWidth) {
182
+ if (this.stretchAllColumnsWidth.length === _classPrivateFieldGet(this, _totalColumns).call(this) && this.needVerifyLastColumnWidth) {
166
183
  this.needVerifyLastColumnWidth = false;
167
184
  for (let i = 0; i < this.stretchAllColumnsWidth.length; i++) {
168
185
  sumRatioWidth += this.stretchAllColumnsWidth[i];
169
186
  }
170
- if (sumRatioWidth !== _classPrivateFieldGet(_totalTargetWidth, this)) {
171
- this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += _classPrivateFieldGet(_totalTargetWidth, this) - sumRatioWidth;
187
+ if (sumRatioWidth !== _classPrivateFieldGet(this, _totalTargetWidth)) {
188
+ this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += _classPrivateFieldGet(this, _totalTargetWidth) - sumRatioWidth;
172
189
  }
173
190
  }
174
191
  return this.stretchAllColumnsWidth[column];
@@ -180,7 +197,7 @@ class ColumnStretching {
180
197
  * @private
181
198
  */
182
199
  _getStretchedLastColumnWidth(column) {
183
- if (column === _classPrivateFieldGet(_totalColumns, this).call(this) - 1) {
200
+ if (column === _classPrivateFieldGet(this, _totalColumns).call(this) - 1) {
184
201
  return this.stretchLastWidth;
185
202
  }
186
203
  return null;
@@ -192,7 +209,7 @@ class ColumnStretching {
192
209
  * @private
193
210
  */
194
211
  _getColumnWidth(column) {
195
- let width = _classPrivateFieldGet(_columnWidthFn, this).call(this, column);
212
+ let width = _classPrivateFieldGet(this, _columnWidthFn).call(this, column);
196
213
  if (isNaN(width)) {
197
214
  width = ColumnStretching.DEFAULT_WIDTH;
198
215
  }
@@ -4,9 +4,11 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
8
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
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"); }
7
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
8
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
9
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
10
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
11
+ 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; } }
10
12
  var _totalTargetWidth = /*#__PURE__*/new WeakMap();
11
13
  var _totalColumns = /*#__PURE__*/new WeakMap();
12
14
  var _stretchingColumnWidthFn = /*#__PURE__*/new WeakMap();
@@ -58,7 +60,10 @@ export class ColumnStretching {
58
60
  /**
59
61
  * @type {number}
60
62
  */
61
- _classPrivateFieldInitSpec(this, _totalTargetWidth, 0);
63
+ _classPrivateFieldInitSpec(this, _totalTargetWidth, {
64
+ writable: true,
65
+ value: 0
66
+ });
62
67
  /**
63
68
  * @type {boolean}
64
69
  */
@@ -68,29 +73,41 @@ export class ColumnStretching {
68
73
  *
69
74
  * @type {function(): number}
70
75
  */
71
- _classPrivateFieldInitSpec(this, _totalColumns, () => 0);
76
+ _classPrivateFieldInitSpec(this, _totalColumns, {
77
+ writable: true,
78
+ value: () => 0
79
+ });
72
80
  /**
73
81
  * Function that returns the width of the stretched column at a given index (in px).
74
82
  *
75
83
  * @type {function(): number}
76
84
  */
77
- _classPrivateFieldInitSpec(this, _stretchingColumnWidthFn, width => width);
85
+ _classPrivateFieldInitSpec(this, _stretchingColumnWidthFn, {
86
+ writable: true,
87
+ value: width => width
88
+ });
78
89
  /**
79
90
  * Function that returns the width of the column at a given index (in px).
80
91
  *
81
92
  * @type {function(): number}
82
93
  */
83
- _classPrivateFieldInitSpec(this, _columnWidthFn, width => width);
94
+ _classPrivateFieldInitSpec(this, _columnWidthFn, {
95
+ writable: true,
96
+ value: width => width
97
+ });
84
98
  /**
85
99
  * Stretch mode.
86
100
  *
87
101
  * @type {function(): 'all' | 'last' | 'none'}
88
102
  */
89
- _classPrivateFieldInitSpec(this, _stretchMode, () => 'none');
90
- _classPrivateFieldSet(_totalColumns, this, totalColumns);
91
- _classPrivateFieldSet(_stretchMode, this, stretchMode);
92
- _classPrivateFieldSet(_stretchingColumnWidthFn, this, stretchingColumnWidthFn !== null && stretchingColumnWidthFn !== void 0 ? stretchingColumnWidthFn : _classPrivateFieldGet(_stretchingColumnWidthFn, this));
93
- _classPrivateFieldSet(_columnWidthFn, this, columnWidthFn !== null && columnWidthFn !== void 0 ? columnWidthFn : _classPrivateFieldGet(_columnWidthFn, this));
103
+ _classPrivateFieldInitSpec(this, _stretchMode, {
104
+ writable: true,
105
+ value: () => 'none'
106
+ });
107
+ _classPrivateFieldSet(this, _totalColumns, totalColumns);
108
+ _classPrivateFieldSet(this, _stretchMode, stretchMode);
109
+ _classPrivateFieldSet(this, _stretchingColumnWidthFn, stretchingColumnWidthFn !== null && stretchingColumnWidthFn !== void 0 ? stretchingColumnWidthFn : _classPrivateFieldGet(this, _stretchingColumnWidthFn));
110
+ _classPrivateFieldSet(this, _columnWidthFn, columnWidthFn !== null && columnWidthFn !== void 0 ? columnWidthFn : _classPrivateFieldGet(this, _columnWidthFn));
94
111
  }
95
112
 
96
113
  /**
@@ -99,14 +116,14 @@ export class ColumnStretching {
99
116
  * @param {number} totalWidth The total width of the table.
100
117
  */
101
118
  refreshStretching(totalWidth) {
102
- if (_classPrivateFieldGet(_stretchMode, this).call(this) === 'none') {
119
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'none') {
103
120
  return;
104
121
  }
105
- _classPrivateFieldSet(_totalTargetWidth, this, totalWidth);
122
+ _classPrivateFieldSet(this, _totalTargetWidth, totalWidth);
106
123
  let sumAll = 0;
107
- for (let i = 0; i < _classPrivateFieldGet(_totalColumns, this).call(this); i++) {
124
+ for (let i = 0; i < _classPrivateFieldGet(this, _totalColumns).call(this); i++) {
108
125
  const columnWidth = this._getColumnWidth(i);
109
- const permanentColumnWidth = _classPrivateFieldGet(_stretchingColumnWidthFn, this).call(this, undefined, i);
126
+ const permanentColumnWidth = _classPrivateFieldGet(this, _stretchingColumnWidthFn).call(this, undefined, i);
110
127
  if (typeof permanentColumnWidth === 'number') {
111
128
  totalWidth -= permanentColumnWidth;
112
129
  } else {
@@ -114,12 +131,12 @@ export class ColumnStretching {
114
131
  }
115
132
  }
116
133
  const remainingSize = totalWidth - sumAll;
117
- if (_classPrivateFieldGet(_stretchMode, this).call(this) === 'all' && remainingSize > 0) {
134
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'all' && remainingSize > 0) {
118
135
  this.stretchAllRatio = totalWidth / sumAll;
119
136
  this.stretchAllColumnsWidth = [];
120
137
  this.needVerifyLastColumnWidth = true;
121
- } else if (_classPrivateFieldGet(_stretchMode, this).call(this) === 'last' && totalWidth !== Infinity) {
122
- const columnWidth = this._getColumnWidth(_classPrivateFieldGet(_totalColumns, this).call(this) - 1);
138
+ } else if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'last' && totalWidth !== Infinity) {
139
+ const columnWidth = this._getColumnWidth(_classPrivateFieldGet(this, _totalColumns).call(this) - 1);
123
140
  const lastColumnWidth = remainingSize + columnWidth;
124
141
  this.stretchLastWidth = lastColumnWidth >= 0 ? lastColumnWidth : columnWidth;
125
142
  }
@@ -134,9 +151,9 @@ export class ColumnStretching {
134
151
  */
135
152
  getStretchedColumnWidth(column, baseWidth) {
136
153
  let result = null;
137
- if (_classPrivateFieldGet(_stretchMode, this).call(this) === 'all' && this.stretchAllRatio !== 0) {
154
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'all' && this.stretchAllRatio !== 0) {
138
155
  result = this._getStretchedAllColumnWidth(column, baseWidth);
139
- } else if (_classPrivateFieldGet(_stretchMode, this).call(this) === 'last' && this.stretchLastWidth !== 0) {
156
+ } else if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'last' && this.stretchLastWidth !== 0) {
140
157
  result = this._getStretchedLastColumnWidth(column);
141
158
  }
142
159
  return result;
@@ -152,20 +169,20 @@ export class ColumnStretching {
152
169
  let sumRatioWidth = 0;
153
170
  if (!this.stretchAllColumnsWidth[column]) {
154
171
  const stretchedWidth = Math.round(baseWidth * this.stretchAllRatio);
155
- const newStretchedWidth = _classPrivateFieldGet(_stretchingColumnWidthFn, this).call(this, stretchedWidth, column);
172
+ const newStretchedWidth = _classPrivateFieldGet(this, _stretchingColumnWidthFn).call(this, stretchedWidth, column);
156
173
  if (newStretchedWidth === undefined) {
157
174
  this.stretchAllColumnsWidth[column] = stretchedWidth;
158
175
  } else {
159
176
  this.stretchAllColumnsWidth[column] = isNaN(newStretchedWidth) ? this._getColumnWidth(column) : newStretchedWidth;
160
177
  }
161
178
  }
162
- if (this.stretchAllColumnsWidth.length === _classPrivateFieldGet(_totalColumns, this).call(this) && this.needVerifyLastColumnWidth) {
179
+ if (this.stretchAllColumnsWidth.length === _classPrivateFieldGet(this, _totalColumns).call(this) && this.needVerifyLastColumnWidth) {
163
180
  this.needVerifyLastColumnWidth = false;
164
181
  for (let i = 0; i < this.stretchAllColumnsWidth.length; i++) {
165
182
  sumRatioWidth += this.stretchAllColumnsWidth[i];
166
183
  }
167
- if (sumRatioWidth !== _classPrivateFieldGet(_totalTargetWidth, this)) {
168
- this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += _classPrivateFieldGet(_totalTargetWidth, this) - sumRatioWidth;
184
+ if (sumRatioWidth !== _classPrivateFieldGet(this, _totalTargetWidth)) {
185
+ this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += _classPrivateFieldGet(this, _totalTargetWidth) - sumRatioWidth;
169
186
  }
170
187
  }
171
188
  return this.stretchAllColumnsWidth[column];
@@ -177,7 +194,7 @@ export class ColumnStretching {
177
194
  * @private
178
195
  */
179
196
  _getStretchedLastColumnWidth(column) {
180
- if (column === _classPrivateFieldGet(_totalColumns, this).call(this) - 1) {
197
+ if (column === _classPrivateFieldGet(this, _totalColumns).call(this) - 1) {
181
198
  return this.stretchLastWidth;
182
199
  }
183
200
  return null;
@@ -189,7 +206,7 @@ export class ColumnStretching {
189
206
  * @private
190
207
  */
191
208
  _getColumnWidth(column) {
192
- let width = _classPrivateFieldGet(_columnWidthFn, this).call(this, column);
209
+ let width = _classPrivateFieldGet(this, _columnWidthFn).call(this, column);
193
210
  if (isNaN(width)) {
194
211
  width = ColumnStretching.DEFAULT_WIDTH;
195
212
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- require("core-js/modules/es.error.cause.js");
5
4
  require("core-js/modules/es.array.push.js");
5
+ require("core-js/modules/es.error.cause.js");
6
6
  var _constants = require("./constants");
7
7
  var _viewSizeSet = _interopRequireDefault(require("./viewSizeSet"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,5 +1,5 @@
1
- import "core-js/modules/es.error.cause.js";
2
1
  import "core-js/modules/es.array.push.js";
2
+ import "core-js/modules/es.error.cause.js";
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
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/base.js CHANGED
@@ -45,8 +45,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
45
45
  Handsontable.CellCoords = _src.CellCoords;
46
46
  Handsontable.CellRange = _src.CellRange;
47
47
  Handsontable.packageName = 'handsontable';
48
- Handsontable.buildDate = "03/04/2024 11:36:00";
49
- Handsontable.version = "0.0.0-next-53a190b-20240403";
48
+ Handsontable.buildDate = "03/04/2024 12:33:47";
49
+ Handsontable.version = "0.0.0-next-5a535ed-20240403";
50
50
  Handsontable.languages = {
51
51
  dictionaryKeys: _registry.dictionaryKeys,
52
52
  getLanguageDictionary: _registry.getLanguageDictionary,
package/base.mjs CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
35
35
  Handsontable.CellCoords = CellCoords;
36
36
  Handsontable.CellRange = CellRange;
37
37
  Handsontable.packageName = 'handsontable';
38
- Handsontable.buildDate = "03/04/2024 11:36:05";
39
- Handsontable.version = "0.0.0-next-53a190b-20240403";
38
+ Handsontable.buildDate = "03/04/2024 12:33:52";
39
+ Handsontable.version = "0.0.0-next-5a535ed-20240403";
40
40
  Handsontable.languages = {
41
41
  dictionaryKeys,
42
42
  getLanguageDictionary,
@@ -4,7 +4,6 @@ exports.__esModule = true;
4
4
  exports.createViewportScroller = createViewportScroller;
5
5
  var _columnHeaderScroll = require("./scrollStrategies/columnHeaderScroll");
6
6
  var _cornerHeaderScroll = require("./scrollStrategies/cornerHeaderScroll");
7
- var _focusScroll = require("./scrollStrategies/focusScroll");
8
7
  var _multipleScroll = require("./scrollStrategies/multipleScroll");
9
8
  var _noncontiguousScroll = require("./scrollStrategies/noncontiguousScroll");
10
9
  var _rowHeaderScroll = require("./scrollStrategies/rowHeaderScroll");
@@ -47,9 +46,7 @@ function createViewportScroller(hot) {
47
46
  return;
48
47
  }
49
48
  let scrollStrategy;
50
- if (selection.isFocusSelectionChanged()) {
51
- scrollStrategy = (0, _focusScroll.focusScrollStrategy)(hot);
52
- } else if (selection.isSelectedByCorner()) {
49
+ if (selection.isSelectedByCorner()) {
53
50
  scrollStrategy = (0, _cornerHeaderScroll.cornerHeaderScrollStrategy)(hot);
54
51
  } else if (selection.isSelectedByRowHeader()) {
55
52
  scrollStrategy = (0, _rowHeaderScroll.rowHeaderScrollStrategy)(hot);
@@ -1,6 +1,5 @@
1
1
  import { columnHeaderScrollStrategy } from "./scrollStrategies/columnHeaderScroll.mjs";
2
2
  import { cornerHeaderScrollStrategy } from "./scrollStrategies/cornerHeaderScroll.mjs";
3
- import { focusScrollStrategy } from "./scrollStrategies/focusScroll.mjs";
4
3
  import { multipleScrollStrategy } from "./scrollStrategies/multipleScroll.mjs";
5
4
  import { noncontiguousScrollStrategy } from "./scrollStrategies/noncontiguousScroll.mjs";
6
5
  import { rowHeaderScrollStrategy } from "./scrollStrategies/rowHeaderScroll.mjs";
@@ -43,9 +42,7 @@ export function createViewportScroller(hot) {
43
42
  return;
44
43
  }
45
44
  let scrollStrategy;
46
- if (selection.isFocusSelectionChanged()) {
47
- scrollStrategy = focusScrollStrategy(hot);
48
- } else if (selection.isSelectedByCorner()) {
45
+ if (selection.isSelectedByCorner()) {
49
46
  scrollStrategy = cornerHeaderScrollStrategy(hot);
50
47
  } else if (selection.isSelectedByRowHeader()) {
51
48
  scrollStrategy = rowHeaderScrollStrategy(hot);