handsontable 0.0.0-next-bfb0e3a-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 (280) 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/overlays.js +1 -1
  15. package/3rdparty/walkontable/src/overlays.mjs +1 -1
  16. package/3rdparty/walkontable/src/scroll.js +17 -15
  17. package/3rdparty/walkontable/src/scroll.mjs +17 -15
  18. package/3rdparty/walkontable/src/selection/manager.js +69 -48
  19. package/3rdparty/walkontable/src/selection/manager.mjs +69 -48
  20. package/3rdparty/walkontable/src/selection/scanner.js +42 -33
  21. package/3rdparty/walkontable/src/selection/scanner.mjs +42 -33
  22. package/3rdparty/walkontable/src/utils/columnStretching.js +44 -27
  23. package/3rdparty/walkontable/src/utils/columnStretching.mjs +44 -27
  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 -77
  32. package/core.mjs +22 -77
  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/metaManager/metaSchema.js +1 -1
  38. package/dataMap/metaManager/metaSchema.mjs +1 -1
  39. package/dataMap/replaceData.js +1 -1
  40. package/dataMap/replaceData.mjs +1 -1
  41. package/dist/handsontable.css +4 -4
  42. package/dist/handsontable.full.css +4 -4
  43. package/dist/handsontable.full.js +9117 -8969
  44. package/dist/handsontable.full.min.css +3 -3
  45. package/dist/handsontable.full.min.js +292 -292
  46. package/dist/handsontable.js +6569 -6874
  47. package/dist/handsontable.min.css +3 -3
  48. package/dist/handsontable.min.js +25 -25
  49. package/dist/languages/all.min.js +1 -1
  50. package/dist/languages/ar-AR.min.js +1 -1
  51. package/dist/languages/cs-CZ.min.js +1 -1
  52. package/dist/languages/de-CH.min.js +1 -1
  53. package/dist/languages/de-DE.min.js +1 -1
  54. package/dist/languages/en-US.min.js +1 -1
  55. package/dist/languages/es-MX.min.js +1 -1
  56. package/dist/languages/fr-FR.min.js +1 -1
  57. package/dist/languages/hr-HR.min.js +1 -1
  58. package/dist/languages/it-IT.min.js +1 -1
  59. package/dist/languages/ja-JP.min.js +1 -1
  60. package/dist/languages/ko-KR.min.js +1 -1
  61. package/dist/languages/lv-LV.min.js +1 -1
  62. package/dist/languages/nb-NO.min.js +1 -1
  63. package/dist/languages/nl-NL.min.js +1 -1
  64. package/dist/languages/pl-PL.min.js +1 -1
  65. package/dist/languages/pt-BR.min.js +1 -1
  66. package/dist/languages/ru-RU.min.js +1 -1
  67. package/dist/languages/sr-SP.min.js +1 -1
  68. package/dist/languages/zh-CN.min.js +1 -1
  69. package/dist/languages/zh-TW.min.js +1 -1
  70. package/editorManager.js +23 -25
  71. package/editorManager.mjs +23 -25
  72. package/editors/autocompleteEditor/autocompleteEditor.js +10 -6
  73. package/editors/autocompleteEditor/autocompleteEditor.mjs +10 -6
  74. package/editors/selectEditor/selectEditor.js +19 -20
  75. package/editors/selectEditor/selectEditor.mjs +19 -20
  76. package/eventManager.js +1 -1
  77. package/eventManager.mjs +1 -1
  78. package/focusManager.js +82 -64
  79. package/focusManager.mjs +82 -64
  80. package/helpers/dom/element.js +1 -1
  81. package/helpers/dom/element.mjs +1 -1
  82. package/helpers/mixed.js +1 -1
  83. package/helpers/mixed.mjs +1 -1
  84. package/helpers/object.js +2 -2
  85. package/helpers/object.mjs +2 -2
  86. package/index.d.ts +0 -10
  87. package/package.json +2 -7
  88. package/pluginHooks.d.ts +3 -4
  89. package/pluginHooks.js +38 -99
  90. package/pluginHooks.mjs +38 -99
  91. package/plugins/autoColumnSize/autoColumnSize.js +65 -49
  92. package/plugins/autoColumnSize/autoColumnSize.mjs +65 -49
  93. package/plugins/autoRowSize/autoRowSize.js +34 -28
  94. package/plugins/autoRowSize/autoRowSize.mjs +34 -28
  95. package/plugins/autofill/autofill.js +38 -30
  96. package/plugins/autofill/autofill.mjs +38 -30
  97. package/plugins/base/base.js +17 -12
  98. package/plugins/base/base.mjs +17 -12
  99. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
  100. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
  101. package/plugins/collapsibleColumns/collapsibleColumns.js +50 -59
  102. package/plugins/collapsibleColumns/collapsibleColumns.mjs +50 -59
  103. package/plugins/columnSorting/columnSorting.js +45 -49
  104. package/plugins/columnSorting/columnSorting.mjs +45 -49
  105. package/plugins/columnSummary/columnSummary.js +26 -22
  106. package/plugins/columnSummary/columnSummary.mjs +26 -22
  107. package/plugins/comments/comments.js +158 -116
  108. package/plugins/comments/comments.mjs +158 -116
  109. package/plugins/contextMenu/contextMenu.js +26 -20
  110. package/plugins/contextMenu/contextMenu.mjs +26 -20
  111. package/plugins/contextMenu/itemsFactory.js +1 -1
  112. package/plugins/contextMenu/itemsFactory.mjs +1 -1
  113. package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
  114. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
  115. package/plugins/contextMenu/menu/menu.js +21 -13
  116. package/plugins/contextMenu/menu/menu.mjs +21 -13
  117. package/plugins/contextMenu/menu/positioner.js +58 -41
  118. package/plugins/contextMenu/menu/positioner.mjs +58 -41
  119. package/plugins/copyPaste/copyPaste.js +157 -116
  120. package/plugins/copyPaste/copyPaste.mjs +157 -116
  121. package/plugins/copyPaste/copyableRanges.js +66 -43
  122. package/plugins/copyPaste/copyableRanges.mjs +66 -43
  123. package/plugins/customBorders/customBorders.js +13 -11
  124. package/plugins/customBorders/customBorders.mjs +13 -11
  125. package/plugins/dragToScroll/dragToScroll.js +6 -6
  126. package/plugins/dragToScroll/dragToScroll.mjs +6 -6
  127. package/plugins/dropdownMenu/dropdownMenu.js +106 -80
  128. package/plugins/dropdownMenu/dropdownMenu.mjs +106 -80
  129. package/plugins/exportFile/dataProvider.js +1 -1
  130. package/plugins/exportFile/dataProvider.mjs +1 -1
  131. package/plugins/filters/component/actionBar.js +9 -9
  132. package/plugins/filters/component/actionBar.mjs +8 -8
  133. package/plugins/filters/component/condition.js +15 -13
  134. package/plugins/filters/component/condition.mjs +15 -13
  135. package/plugins/filters/component/operators.js +6 -6
  136. package/plugins/filters/component/operators.mjs +6 -6
  137. package/plugins/filters/component/value.js +28 -24
  138. package/plugins/filters/component/value.mjs +28 -24
  139. package/plugins/filters/conditionUpdateObserver.js +24 -22
  140. package/plugins/filters/conditionUpdateObserver.mjs +24 -22
  141. package/plugins/filters/dataFilter.js +1 -1
  142. package/plugins/filters/dataFilter.mjs +1 -1
  143. package/plugins/filters/filters.js +95 -81
  144. package/plugins/filters/filters.mjs +95 -81
  145. package/plugins/filters/ui/input.js +19 -13
  146. package/plugins/filters/ui/input.mjs +19 -13
  147. package/plugins/filters/ui/link.js +13 -8
  148. package/plugins/filters/ui/link.mjs +13 -8
  149. package/plugins/filters/ui/multipleSelect.js +112 -85
  150. package/plugins/filters/ui/multipleSelect.mjs +112 -85
  151. package/plugins/filters/ui/radioInput.js +20 -12
  152. package/plugins/filters/ui/radioInput.mjs +20 -12
  153. package/plugins/filters/ui/select.js +72 -50
  154. package/plugins/filters/ui/select.mjs +71 -49
  155. package/plugins/formulas/formulas.js +326 -268
  156. package/plugins/formulas/formulas.mjs +327 -269
  157. package/plugins/formulas/indexSyncer/axisSyncer.js +61 -38
  158. package/plugins/formulas/indexSyncer/axisSyncer.mjs +61 -38
  159. package/plugins/formulas/indexSyncer/index.js +48 -25
  160. package/plugins/formulas/indexSyncer/index.mjs +48 -25
  161. package/plugins/hiddenColumns/hiddenColumns.js +83 -64
  162. package/plugins/hiddenColumns/hiddenColumns.mjs +83 -64
  163. package/plugins/hiddenRows/hiddenRows.js +82 -63
  164. package/plugins/hiddenRows/hiddenRows.mjs +82 -63
  165. package/plugins/manualColumnFreeze/manualColumnFreeze.js +32 -24
  166. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +33 -25
  167. package/plugins/manualColumnMove/manualColumnMove.js +170 -126
  168. package/plugins/manualColumnMove/manualColumnMove.mjs +170 -126
  169. package/plugins/manualColumnResize/manualColumnResize.js +230 -169
  170. package/plugins/manualColumnResize/manualColumnResize.mjs +230 -169
  171. package/plugins/manualRowMove/manualRowMove.js +128 -99
  172. package/plugins/manualRowMove/manualRowMove.mjs +128 -99
  173. package/plugins/manualRowResize/manualRowResize.js +209 -150
  174. package/plugins/manualRowResize/manualRowResize.mjs +209 -150
  175. package/plugins/mergeCells/calculations/selection.js +71 -2
  176. package/plugins/mergeCells/calculations/selection.mjs +71 -2
  177. package/plugins/mergeCells/cellsCollection.js +1 -117
  178. package/plugins/mergeCells/cellsCollection.mjs +1 -117
  179. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
  180. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
  181. package/plugins/mergeCells/mergeCells.js +397 -499
  182. package/plugins/mergeCells/mergeCells.mjs +397 -499
  183. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -8
  184. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -8
  185. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
  186. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
  187. package/plugins/nestedHeaders/nestedHeaders.js +253 -205
  188. package/plugins/nestedHeaders/nestedHeaders.mjs +254 -206
  189. package/plugins/nestedHeaders/stateManager/headersTree.js +32 -21
  190. package/plugins/nestedHeaders/stateManager/headersTree.mjs +32 -21
  191. package/plugins/nestedHeaders/stateManager/index.js +41 -30
  192. package/plugins/nestedHeaders/stateManager/index.mjs +41 -30
  193. package/plugins/nestedHeaders/stateManager/sourceSettings.js +30 -19
  194. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +30 -19
  195. package/plugins/nestedRows/data/dataManager.js +1 -1
  196. package/plugins/nestedRows/data/dataManager.mjs +1 -1
  197. package/plugins/nestedRows/nestedRows.js +182 -151
  198. package/plugins/nestedRows/nestedRows.mjs +183 -152
  199. package/plugins/nestedRows/ui/contextMenu.js +15 -11
  200. package/plugins/nestedRows/ui/contextMenu.mjs +14 -10
  201. package/plugins/nestedRows/utils/rowMoveController.js +1 -1
  202. package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
  203. package/plugins/persistentState/storage.js +2 -2
  204. package/plugins/persistentState/storage.mjs +2 -2
  205. package/plugins/search/search.js +7 -7
  206. package/plugins/search/search.mjs +7 -7
  207. package/plugins/touchScroll/touchScroll.js +19 -15
  208. package/plugins/touchScroll/touchScroll.mjs +20 -16
  209. package/plugins/trimRows/trimRows.js +6 -6
  210. package/plugins/trimRows/trimRows.mjs +6 -6
  211. package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
  212. package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
  213. package/selection/highlight/highlight.js +14 -14
  214. package/selection/highlight/highlight.mjs +13 -13
  215. package/selection/highlight/visualSelection.js +0 -2
  216. package/selection/highlight/visualSelection.mjs +0 -2
  217. package/selection/selection.js +67 -225
  218. package/selection/selection.mjs +66 -224
  219. package/selection/transformation.js +118 -149
  220. package/selection/transformation.mjs +118 -149
  221. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  222. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  223. package/shortcutContexts/commands/editor/open.js +3 -18
  224. package/shortcutContexts/commands/editor/open.mjs +3 -18
  225. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  226. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  227. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  228. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  229. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  230. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  231. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  232. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  233. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
  234. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
  235. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
  236. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
  237. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
  238. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
  239. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
  240. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
  241. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
  242. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
  243. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
  244. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
  245. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  246. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  247. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  248. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  249. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
  250. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
  251. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
  252. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
  253. package/shortcutContexts/grid.js +3 -9
  254. package/shortcutContexts/grid.mjs +3 -9
  255. package/shortcuts/context.js +1 -2
  256. package/shortcuts/context.mjs +1 -2
  257. package/tableView.js +78 -52
  258. package/tableView.mjs +78 -52
  259. package/translations/changesObservable/observable.js +38 -21
  260. package/translations/changesObservable/observable.mjs +38 -21
  261. package/translations/changesObservable/observer.js +12 -7
  262. package/translations/changesObservable/observer.mjs +11 -6
  263. package/translations/mapCollections/aggregatedCollection.js +1 -1
  264. package/translations/mapCollections/aggregatedCollection.mjs +1 -1
  265. package/translations/maps/indexMap.js +1 -1
  266. package/translations/maps/indexMap.mjs +1 -1
  267. package/utils/dataStructures/linkedList.js +1 -6
  268. package/utils/dataStructures/linkedList.mjs +1 -6
  269. package/utils/dataStructures/tree.js +1 -1
  270. package/utils/dataStructures/tree.mjs +1 -1
  271. package/utils/interval.js +44 -26
  272. package/utils/interval.mjs +44 -26
  273. package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
  274. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
  275. package/i18n/languages/ar-AR.d.ts +0 -5
  276. package/i18n/languages/cs-CZ.d.ts +0 -5
  277. package/i18n/languages/hr-HR.d.ts +0 -5
  278. package/i18n/languages/sr-SP.d.ts +0 -5
  279. package/plugins/mergeCells/focusOrder.js +0 -305
  280. package/plugins/mergeCells/focusOrder.mjs +0 -300
@@ -6,9 +6,12 @@ var _element = require("../../../../helpers/dom/element");
6
6
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
7
7
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
10
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
11
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } /* eslint-disable no-continue */
9
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
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; } } /* eslint-disable no-continue */
12
15
  /**
13
16
  * Selection scanner module scans the rendered cells and headers and if it finds an intersection with
14
17
  * the coordinates of the Selection class (highlight) it returns the DOM elements.
@@ -17,7 +20,7 @@ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.h
17
20
  */
18
21
  var _selection = /*#__PURE__*/new WeakMap();
19
22
  var _activeOverlaysWot = /*#__PURE__*/new WeakMap();
20
- var _SelectionScanner_brand = /*#__PURE__*/new WeakSet();
23
+ var _scanCellsRange = /*#__PURE__*/new WeakSet();
21
24
  class SelectionScanner {
22
25
  constructor() {
23
26
  /**
@@ -25,19 +28,25 @@ class SelectionScanner {
25
28
  *
26
29
  * @param {function(number, number): void} callback The callback function to trigger.
27
30
  */
28
- _classPrivateMethodInitSpec(this, _SelectionScanner_brand);
31
+ _classPrivateMethodInitSpec(this, _scanCellsRange);
29
32
  /**
30
33
  * Active Selection instance to process.
31
34
  *
32
35
  * @type {Selection}
33
36
  */
34
- _classPrivateFieldInitSpec(this, _selection, void 0);
37
+ _classPrivateFieldInitSpec(this, _selection, {
38
+ writable: true,
39
+ value: void 0
40
+ });
35
41
  /**
36
42
  * The Walkontable instance that the scans depends on.
37
43
  *
38
44
  * @type {Walkontable}
39
45
  */
40
- _classPrivateFieldInitSpec(this, _activeOverlaysWot, void 0);
46
+ _classPrivateFieldInitSpec(this, _activeOverlaysWot, {
47
+ writable: true,
48
+ value: void 0
49
+ });
41
50
  }
42
51
  /**
43
52
  * Sets the Walkontable instance that will be taking into account while scanning the table.
@@ -46,7 +55,7 @@ class SelectionScanner {
46
55
  * @returns {SelectionScanner}
47
56
  */
48
57
  setActiveOverlay(activeOverlaysWot) {
49
- _classPrivateFieldSet(_activeOverlaysWot, this, activeOverlaysWot);
58
+ _classPrivateFieldSet(this, _activeOverlaysWot, activeOverlaysWot);
50
59
  return this;
51
60
  }
52
61
 
@@ -57,7 +66,7 @@ class SelectionScanner {
57
66
  * @returns {SelectionScanner}
58
67
  */
59
68
  setActiveSelection(selection) {
60
- _classPrivateFieldSet(_selection, this, selection);
69
+ _classPrivateFieldSet(this, _selection, selection);
61
70
  return this;
62
71
  }
63
72
 
@@ -68,7 +77,7 @@ class SelectionScanner {
68
77
  * @returns {HTMLTableElement[]}
69
78
  */
70
79
  scan() {
71
- const selectionType = _classPrivateFieldGet(_selection, this).settings.selectionType;
80
+ const selectionType = _classPrivateFieldGet(this, _selection).settings.selectionType;
72
81
  const elements = new Set();
73
82
 
74
83
  // TODO(improvement): use heuristics from coords to detect what type of scan
@@ -104,10 +113,10 @@ class SelectionScanner {
104
113
  * @param {function(HTMLTableElement): void} callback The callback function to trigger.
105
114
  */
106
115
  scanColumnsInHeadersRange(callback) {
107
- const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(_selection, this).getCorners();
116
+ const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(this, _selection).getCorners();
108
117
  const {
109
118
  wtTable
110
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
119
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
111
120
  const renderedColumnsCount = wtTable.getRenderedColumnsCount();
112
121
  const columnHeadersCount = wtTable.getColumnHeadersCount();
113
122
  let cursor = 0;
@@ -122,8 +131,8 @@ class SelectionScanner {
122
131
  }
123
132
  const positiveBasedHeaderLevel = headerLevel + columnHeadersCount;
124
133
  let TH = wtTable.getColumnHeader(sourceColumn, positiveBasedHeaderLevel);
125
- const newSourceCol = _classPrivateFieldGet(_activeOverlaysWot, this).getSetting('onBeforeHighlightingColumnHeader', sourceColumn, positiveBasedHeaderLevel, {
126
- selectionType: _classPrivateFieldGet(_selection, this).settings.selectionType,
134
+ const newSourceCol = _classPrivateFieldGet(this, _activeOverlaysWot).getSetting('onBeforeHighlightingColumnHeader', sourceColumn, positiveBasedHeaderLevel, {
135
+ selectionType: _classPrivateFieldGet(this, _selection).settings.selectionType,
127
136
  columnCursor: cursor,
128
137
  selectionWidth: bottomColumn - topColumn + 1
129
138
  });
@@ -146,10 +155,10 @@ class SelectionScanner {
146
155
  * @param {function(HTMLTableElement): void} callback The callback function to trigger.
147
156
  */
148
157
  scanRowsInHeadersRange(callback) {
149
- const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(_selection, this).getCorners();
158
+ const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(this, _selection).getCorners();
150
159
  const {
151
160
  wtTable
152
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
161
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
153
162
  const renderedRowsCount = wtTable.getRenderedRowsCount();
154
163
  const rowHeadersCount = wtTable.getRowHeadersCount();
155
164
  let cursor = 0;
@@ -164,8 +173,8 @@ class SelectionScanner {
164
173
  }
165
174
  const positiveBasedHeaderLevel = headerLevel + rowHeadersCount;
166
175
  let TH = wtTable.getRowHeader(sourceRow, positiveBasedHeaderLevel);
167
- const newSourceRow = _classPrivateFieldGet(_activeOverlaysWot, this).getSetting('onBeforeHighlightingRowHeader', sourceRow, positiveBasedHeaderLevel, {
168
- selectionType: _classPrivateFieldGet(_selection, this).settings.selectionType,
176
+ const newSourceRow = _classPrivateFieldGet(this, _activeOverlaysWot).getSetting('onBeforeHighlightingRowHeader', sourceRow, positiveBasedHeaderLevel, {
177
+ selectionType: _classPrivateFieldGet(this, _selection).settings.selectionType,
169
178
  rowCursor: cursor,
170
179
  selectionHeight: bottomRow - topRow + 1
171
180
  });
@@ -188,16 +197,16 @@ class SelectionScanner {
188
197
  * @param {function(HTMLTableElement): void} callback The callback function to trigger.
189
198
  */
190
199
  scanCellsRange(callback) {
191
- const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(_selection, this).getCorners();
200
+ const [topRow, topColumn, bottomRow, bottomColumn] = _classPrivateFieldGet(this, _selection).getCorners();
192
201
  const {
193
202
  wtTable
194
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
195
- _assertClassBrand(_SelectionScanner_brand, this, _scanCellsRange).call(this, (sourceRow, sourceColumn) => {
203
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
204
+ _classPrivateMethodGet(this, _scanCellsRange, _scanCellsRange2).call(this, (sourceRow, sourceColumn) => {
196
205
  if (sourceRow >= topRow && sourceRow <= bottomRow && sourceColumn >= topColumn && sourceColumn <= bottomColumn) {
197
- const cell = wtTable.getCell(_classPrivateFieldGet(_activeOverlaysWot, this).createCellCoords(sourceRow, sourceColumn));
206
+ const cell = wtTable.getCell(_classPrivateFieldGet(this, _activeOverlaysWot).createCellCoords(sourceRow, sourceColumn));
198
207
 
199
208
  // support for old API
200
- const additionalSelectionClass = _classPrivateFieldGet(_activeOverlaysWot, this).getSetting('onAfterDrawSelection', sourceRow, sourceColumn, _classPrivateFieldGet(_selection, this).settings.layerLevel);
209
+ const additionalSelectionClass = _classPrivateFieldGet(this, _activeOverlaysWot).getSetting('onAfterDrawSelection', sourceRow, sourceColumn, _classPrivateFieldGet(this, _selection).settings.layerLevel);
201
210
  if (typeof additionalSelectionClass === 'string') {
202
211
  (0, _element.addClass)(cell, additionalSelectionClass);
203
212
  }
@@ -214,13 +223,13 @@ class SelectionScanner {
214
223
  */
215
224
  scanRowsInCellsRange(callback) {
216
225
  // eslint-disable-next-line comma-spacing
217
- const [topRow,, bottomRow] = _classPrivateFieldGet(_selection, this).getCorners();
226
+ const [topRow,, bottomRow] = _classPrivateFieldGet(this, _selection).getCorners();
218
227
  const {
219
228
  wtTable
220
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
221
- _assertClassBrand(_SelectionScanner_brand, this, _scanCellsRange).call(this, (sourceRow, sourceColumn) => {
229
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
230
+ _classPrivateMethodGet(this, _scanCellsRange, _scanCellsRange2).call(this, (sourceRow, sourceColumn) => {
222
231
  if (sourceRow >= topRow && sourceRow <= bottomRow) {
223
- const cell = wtTable.getCell(_classPrivateFieldGet(_activeOverlaysWot, this).createCellCoords(sourceRow, sourceColumn));
232
+ const cell = wtTable.getCell(_classPrivateFieldGet(this, _activeOverlaysWot).createCellCoords(sourceRow, sourceColumn));
224
233
  callback(cell);
225
234
  }
226
235
  });
@@ -233,23 +242,23 @@ class SelectionScanner {
233
242
  * @param {function(HTMLTableElement): void} callback The callback function to trigger.
234
243
  */
235
244
  scanColumnsInCellsRange(callback) {
236
- const [, topColumn,, bottomColumn] = _classPrivateFieldGet(_selection, this).getCorners();
245
+ const [, topColumn,, bottomColumn] = _classPrivateFieldGet(this, _selection).getCorners();
237
246
  const {
238
247
  wtTable
239
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
240
- _assertClassBrand(_SelectionScanner_brand, this, _scanCellsRange).call(this, (sourceRow, sourceColumn) => {
248
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
249
+ _classPrivateMethodGet(this, _scanCellsRange, _scanCellsRange2).call(this, (sourceRow, sourceColumn) => {
241
250
  if (sourceColumn >= topColumn && sourceColumn <= bottomColumn) {
242
- const cell = wtTable.getCell(_classPrivateFieldGet(_activeOverlaysWot, this).createCellCoords(sourceRow, sourceColumn));
251
+ const cell = wtTable.getCell(_classPrivateFieldGet(this, _activeOverlaysWot).createCellCoords(sourceRow, sourceColumn));
243
252
  callback(cell);
244
253
  }
245
254
  });
246
255
  }
247
256
  }
248
257
  exports.SelectionScanner = SelectionScanner;
249
- function _scanCellsRange(callback) {
258
+ function _scanCellsRange2(callback) {
250
259
  const {
251
260
  wtTable
252
- } = _classPrivateFieldGet(_activeOverlaysWot, this);
261
+ } = _classPrivateFieldGet(this, _activeOverlaysWot);
253
262
  const renderedRowsCount = wtTable.getRenderedRowsCount();
254
263
  const renderedColumnsCount = wtTable.getRenderedColumnsCount();
255
264
  for (let row = 0; row < renderedRowsCount; row += 1) {
@@ -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
  }