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,16 +2,19 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.normalizeRanges = normalizeRanges;
5
- require("core-js/modules/es.error.cause.js");
6
5
  require("core-js/modules/es.array.push.js");
6
+ require("core-js/modules/es.error.cause.js");
7
7
  var _array = require("../../helpers/array");
8
8
  var _number = require("../../helpers/number");
9
9
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
10
10
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
11
11
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
12
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
13
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
14
- 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"); }
12
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
13
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
14
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
15
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
16
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
17
+ 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; } }
15
18
  /**
16
19
  * The utils class produces the selection ranges in the `{startRow, startCol, endRow, endCol}` format
17
20
  * based on the current table selection. The CopyPaste plugin consumes that ranges to generate
@@ -25,7 +28,8 @@ var _countColumns = /*#__PURE__*/new WeakMap();
25
28
  var _rowsLimit = /*#__PURE__*/new WeakMap();
26
29
  var _columnsLimit = /*#__PURE__*/new WeakMap();
27
30
  var _countColumnHeaders = /*#__PURE__*/new WeakMap();
28
- var _CopyableRangesFactory_brand = /*#__PURE__*/new WeakSet();
31
+ var _trimColumnsRange = /*#__PURE__*/new WeakSet();
32
+ var _trimRowsRange = /*#__PURE__*/new WeakSet();
29
33
  class CopyableRangesFactory {
30
34
  /* eslint-disable jsdoc/require-description-complete-sentence */
31
35
  /**
@@ -45,6 +49,14 @@ class CopyableRangesFactory {
45
49
  columnsLimit,
46
50
  countColumnHeaders
47
51
  } = _ref;
52
+ /**
53
+ * Trimmed the rows range to the limit.
54
+ *
55
+ * @param {*} startRow The lowest row index in the range.
56
+ * @param {*} endRow The highest row index in the range.
57
+ * @returns {number} Returns trimmed row index if it exceeds the limit.
58
+ */
59
+ _classPrivateMethodInitSpec(this, _trimRowsRange);
48
60
  /**
49
61
  * Trimmed the columns range to the limit.
50
62
  *
@@ -52,36 +64,54 @@ class CopyableRangesFactory {
52
64
  * @param {*} endColumn The highest column index in the range.
53
65
  * @returns {number} Returns trimmed column index if it exceeds the limit.
54
66
  */
55
- _classPrivateMethodInitSpec(this, _CopyableRangesFactory_brand);
67
+ _classPrivateMethodInitSpec(this, _trimColumnsRange);
56
68
  /**
57
69
  * @type {CellRange}
58
70
  */
59
- _classPrivateFieldInitSpec(this, _selectedRange, void 0);
71
+ _classPrivateFieldInitSpec(this, _selectedRange, {
72
+ writable: true,
73
+ value: void 0
74
+ });
60
75
  /**
61
76
  * @type {function(): number}
62
77
  */
63
- _classPrivateFieldInitSpec(this, _countRows, void 0);
78
+ _classPrivateFieldInitSpec(this, _countRows, {
79
+ writable: true,
80
+ value: void 0
81
+ });
64
82
  /**
65
83
  * @type {function(): number}
66
84
  */
67
- _classPrivateFieldInitSpec(this, _countColumns, void 0);
85
+ _classPrivateFieldInitSpec(this, _countColumns, {
86
+ writable: true,
87
+ value: void 0
88
+ });
68
89
  /**
69
90
  * @type {function(): number}
70
91
  */
71
- _classPrivateFieldInitSpec(this, _rowsLimit, void 0);
92
+ _classPrivateFieldInitSpec(this, _rowsLimit, {
93
+ writable: true,
94
+ value: void 0
95
+ });
72
96
  /**
73
97
  * @type {function(): number}
74
98
  */
75
- _classPrivateFieldInitSpec(this, _columnsLimit, void 0);
99
+ _classPrivateFieldInitSpec(this, _columnsLimit, {
100
+ writable: true,
101
+ value: void 0
102
+ });
76
103
  /**
77
104
  * @type {function(): number}
78
105
  */
79
- _classPrivateFieldInitSpec(this, _countColumnHeaders, void 0);
80
- _classPrivateFieldSet(_countRows, this, countRows);
81
- _classPrivateFieldSet(_countColumns, this, countColumns);
82
- _classPrivateFieldSet(_rowsLimit, this, rowsLimit);
83
- _classPrivateFieldSet(_columnsLimit, this, columnsLimit);
84
- _classPrivateFieldSet(_countColumnHeaders, this, countColumnHeaders);
106
+ _classPrivateFieldInitSpec(this, _countColumnHeaders, {
107
+ writable: true,
108
+ value: void 0
109
+ });
110
+ _classPrivateFieldSet(this, _countRows, countRows);
111
+ _classPrivateFieldSet(this, _countColumns, countColumns);
112
+ _classPrivateFieldSet(this, _rowsLimit, rowsLimit);
113
+ _classPrivateFieldSet(this, _columnsLimit, columnsLimit);
114
+ _classPrivateFieldSet(this, _countColumnHeaders, countColumnHeaders);
85
115
  }
86
116
  /* eslint-enable jsdoc/require-description-complete-sentence */
87
117
 
@@ -91,7 +121,7 @@ class CopyableRangesFactory {
91
121
  * @param {CellRange} selectedRange The selection range represented by the CellRange class.
92
122
  */
93
123
  setSelectedRange(selectedRange) {
94
- _classPrivateFieldSet(_selectedRange, this, selectedRange);
124
+ _classPrivateFieldSet(this, _selectedRange, selectedRange);
95
125
  }
96
126
 
97
127
  /**
@@ -101,19 +131,19 @@ class CopyableRangesFactory {
101
131
  * @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
102
132
  */
103
133
  getCellsRange() {
104
- if (_classPrivateFieldGet(_countRows, this).call(this) === 0 || _classPrivateFieldGet(_countColumns, this).call(this) === 0) {
134
+ if (_classPrivateFieldGet(this, _countRows).call(this) === 0 || _classPrivateFieldGet(this, _countColumns).call(this) === 0) {
105
135
  return null;
106
136
  }
107
137
  const {
108
138
  row: startRow,
109
139
  col: startCol
110
- } = _classPrivateFieldGet(_selectedRange, this).getTopStartCorner();
140
+ } = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner();
111
141
  const {
112
142
  row: endRow,
113
143
  col: endCol
114
- } = _classPrivateFieldGet(_selectedRange, this).getBottomEndCorner();
115
- const finalEndRow = _assertClassBrand(_CopyableRangesFactory_brand, this, _trimRowsRange).call(this, startRow, endRow);
116
- const finalEndCol = _assertClassBrand(_CopyableRangesFactory_brand, this, _trimColumnsRange).call(this, startCol, endCol);
144
+ } = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner();
145
+ const finalEndRow = _classPrivateMethodGet(this, _trimRowsRange, _trimRowsRange2).call(this, startRow, endRow);
146
+ const finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
117
147
  const isRangeTrimmed = endRow !== finalEndRow || endCol !== finalEndCol;
118
148
  return {
119
149
  isRangeTrimmed,
@@ -131,16 +161,16 @@ class CopyableRangesFactory {
131
161
  * @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
132
162
  */
133
163
  getMostBottomColumnHeadersRange() {
134
- if (_classPrivateFieldGet(_countColumns, this).call(this) === 0 || _classPrivateFieldGet(_countColumnHeaders, this).call(this) === 0) {
164
+ if (_classPrivateFieldGet(this, _countColumns).call(this) === 0 || _classPrivateFieldGet(this, _countColumnHeaders).call(this) === 0) {
135
165
  return null;
136
166
  }
137
167
  const {
138
168
  col: startCol
139
- } = _classPrivateFieldGet(_selectedRange, this).getTopStartCorner();
169
+ } = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner();
140
170
  const {
141
171
  col: endCol
142
- } = _classPrivateFieldGet(_selectedRange, this).getBottomEndCorner();
143
- const finalEndCol = _assertClassBrand(_CopyableRangesFactory_brand, this, _trimColumnsRange).call(this, startCol, endCol);
172
+ } = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner();
173
+ const finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
144
174
  const isRangeTrimmed = endCol !== finalEndCol;
145
175
  return {
146
176
  isRangeTrimmed,
@@ -158,20 +188,20 @@ class CopyableRangesFactory {
158
188
  * @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
159
189
  */
160
190
  getAllColumnHeadersRange() {
161
- if (_classPrivateFieldGet(_countColumns, this).call(this) === 0 || _classPrivateFieldGet(_countColumnHeaders, this).call(this) === 0) {
191
+ if (_classPrivateFieldGet(this, _countColumns).call(this) === 0 || _classPrivateFieldGet(this, _countColumnHeaders).call(this) === 0) {
162
192
  return null;
163
193
  }
164
194
  const {
165
195
  col: startCol
166
- } = _classPrivateFieldGet(_selectedRange, this).getTopStartCorner();
196
+ } = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner();
167
197
  const {
168
198
  col: endCol
169
- } = _classPrivateFieldGet(_selectedRange, this).getBottomEndCorner();
170
- const finalEndCol = _assertClassBrand(_CopyableRangesFactory_brand, this, _trimColumnsRange).call(this, startCol, endCol);
199
+ } = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner();
200
+ const finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
171
201
  const isRangeTrimmed = endCol !== finalEndCol;
172
202
  return {
173
203
  isRangeTrimmed,
174
- startRow: -_classPrivateFieldGet(_countColumnHeaders, this).call(this),
204
+ startRow: -_classPrivateFieldGet(this, _countColumnHeaders).call(this),
175
205
  startCol,
176
206
  endRow: -1,
177
207
  endCol: finalEndCol
@@ -187,18 +217,11 @@ class CopyableRangesFactory {
187
217
  * @returns {{rows: number[], columns: number[]}}
188
218
  */
189
219
  exports.CopyableRangesFactory = CopyableRangesFactory;
190
- function _trimColumnsRange(startColumn, endColumn) {
191
- return Math.min(endColumn, Math.max(startColumn + _classPrivateFieldGet(_columnsLimit, this).call(this) - 1, startColumn));
220
+ function _trimColumnsRange2(startColumn, endColumn) {
221
+ return Math.min(endColumn, Math.max(startColumn + _classPrivateFieldGet(this, _columnsLimit).call(this) - 1, startColumn));
192
222
  }
193
- /**
194
- * Trimmed the rows range to the limit.
195
- *
196
- * @param {*} startRow The lowest row index in the range.
197
- * @param {*} endRow The highest row index in the range.
198
- * @returns {number} Returns trimmed row index if it exceeds the limit.
199
- */
200
- function _trimRowsRange(startRow, endRow) {
201
- return Math.min(endRow, Math.max(startRow + _classPrivateFieldGet(_rowsLimit, this).call(this) - 1, startRow));
223
+ function _trimRowsRange2(startRow, endRow) {
224
+ return Math.min(endRow, Math.max(startRow + _classPrivateFieldGet(this, _rowsLimit).call(this) - 1, startRow));
202
225
  }
203
226
  function normalizeRanges(ranges) {
204
227
  const rows = [];
@@ -1,11 +1,14 @@
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 _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
4
4
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
5
5
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
6
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
7
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
8
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
6
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
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; } }
9
12
  import { arrayEach } from "../../helpers/array.mjs";
10
13
  import { rangeEach } from "../../helpers/number.mjs";
11
14
  /**
@@ -21,7 +24,8 @@ var _countColumns = /*#__PURE__*/new WeakMap();
21
24
  var _rowsLimit = /*#__PURE__*/new WeakMap();
22
25
  var _columnsLimit = /*#__PURE__*/new WeakMap();
23
26
  var _countColumnHeaders = /*#__PURE__*/new WeakMap();
24
- var _CopyableRangesFactory_brand = /*#__PURE__*/new WeakSet();
27
+ var _trimColumnsRange = /*#__PURE__*/new WeakSet();
28
+ var _trimRowsRange = /*#__PURE__*/new WeakSet();
25
29
  export class CopyableRangesFactory {
26
30
  /* eslint-disable jsdoc/require-description-complete-sentence */
27
31
  /**
@@ -41,6 +45,14 @@ export class CopyableRangesFactory {
41
45
  columnsLimit,
42
46
  countColumnHeaders
43
47
  } = _ref;
48
+ /**
49
+ * Trimmed the rows range to the limit.
50
+ *
51
+ * @param {*} startRow The lowest row index in the range.
52
+ * @param {*} endRow The highest row index in the range.
53
+ * @returns {number} Returns trimmed row index if it exceeds the limit.
54
+ */
55
+ _classPrivateMethodInitSpec(this, _trimRowsRange);
44
56
  /**
45
57
  * Trimmed the columns range to the limit.
46
58
  *
@@ -48,36 +60,54 @@ export class CopyableRangesFactory {
48
60
  * @param {*} endColumn The highest column index in the range.
49
61
  * @returns {number} Returns trimmed column index if it exceeds the limit.
50
62
  */
51
- _classPrivateMethodInitSpec(this, _CopyableRangesFactory_brand);
63
+ _classPrivateMethodInitSpec(this, _trimColumnsRange);
52
64
  /**
53
65
  * @type {CellRange}
54
66
  */
55
- _classPrivateFieldInitSpec(this, _selectedRange, void 0);
67
+ _classPrivateFieldInitSpec(this, _selectedRange, {
68
+ writable: true,
69
+ value: void 0
70
+ });
56
71
  /**
57
72
  * @type {function(): number}
58
73
  */
59
- _classPrivateFieldInitSpec(this, _countRows, void 0);
74
+ _classPrivateFieldInitSpec(this, _countRows, {
75
+ writable: true,
76
+ value: void 0
77
+ });
60
78
  /**
61
79
  * @type {function(): number}
62
80
  */
63
- _classPrivateFieldInitSpec(this, _countColumns, void 0);
81
+ _classPrivateFieldInitSpec(this, _countColumns, {
82
+ writable: true,
83
+ value: void 0
84
+ });
64
85
  /**
65
86
  * @type {function(): number}
66
87
  */
67
- _classPrivateFieldInitSpec(this, _rowsLimit, void 0);
88
+ _classPrivateFieldInitSpec(this, _rowsLimit, {
89
+ writable: true,
90
+ value: void 0
91
+ });
68
92
  /**
69
93
  * @type {function(): number}
70
94
  */
71
- _classPrivateFieldInitSpec(this, _columnsLimit, void 0);
95
+ _classPrivateFieldInitSpec(this, _columnsLimit, {
96
+ writable: true,
97
+ value: void 0
98
+ });
72
99
  /**
73
100
  * @type {function(): number}
74
101
  */
75
- _classPrivateFieldInitSpec(this, _countColumnHeaders, void 0);
76
- _classPrivateFieldSet(_countRows, this, countRows);
77
- _classPrivateFieldSet(_countColumns, this, countColumns);
78
- _classPrivateFieldSet(_rowsLimit, this, rowsLimit);
79
- _classPrivateFieldSet(_columnsLimit, this, columnsLimit);
80
- _classPrivateFieldSet(_countColumnHeaders, this, countColumnHeaders);
102
+ _classPrivateFieldInitSpec(this, _countColumnHeaders, {
103
+ writable: true,
104
+ value: void 0
105
+ });
106
+ _classPrivateFieldSet(this, _countRows, countRows);
107
+ _classPrivateFieldSet(this, _countColumns, countColumns);
108
+ _classPrivateFieldSet(this, _rowsLimit, rowsLimit);
109
+ _classPrivateFieldSet(this, _columnsLimit, columnsLimit);
110
+ _classPrivateFieldSet(this, _countColumnHeaders, countColumnHeaders);
81
111
  }
82
112
  /* eslint-enable jsdoc/require-description-complete-sentence */
83
113
 
@@ -87,7 +117,7 @@ export class CopyableRangesFactory {
87
117
  * @param {CellRange} selectedRange The selection range represented by the CellRange class.
88
118
  */
89
119
  setSelectedRange(selectedRange) {
90
- _classPrivateFieldSet(_selectedRange, this, selectedRange);
120
+ _classPrivateFieldSet(this, _selectedRange, selectedRange);
91
121
  }
92
122
 
93
123
  /**
@@ -97,19 +127,19 @@ export class CopyableRangesFactory {
97
127
  * @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
98
128
  */
99
129
  getCellsRange() {
100
- if (_classPrivateFieldGet(_countRows, this).call(this) === 0 || _classPrivateFieldGet(_countColumns, this).call(this) === 0) {
130
+ if (_classPrivateFieldGet(this, _countRows).call(this) === 0 || _classPrivateFieldGet(this, _countColumns).call(this) === 0) {
101
131
  return null;
102
132
  }
103
133
  const {
104
134
  row: startRow,
105
135
  col: startCol
106
- } = _classPrivateFieldGet(_selectedRange, this).getTopStartCorner();
136
+ } = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner();
107
137
  const {
108
138
  row: endRow,
109
139
  col: endCol
110
- } = _classPrivateFieldGet(_selectedRange, this).getBottomEndCorner();
111
- const finalEndRow = _assertClassBrand(_CopyableRangesFactory_brand, this, _trimRowsRange).call(this, startRow, endRow);
112
- const finalEndCol = _assertClassBrand(_CopyableRangesFactory_brand, this, _trimColumnsRange).call(this, startCol, endCol);
140
+ } = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner();
141
+ const finalEndRow = _classPrivateMethodGet(this, _trimRowsRange, _trimRowsRange2).call(this, startRow, endRow);
142
+ const finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
113
143
  const isRangeTrimmed = endRow !== finalEndRow || endCol !== finalEndCol;
114
144
  return {
115
145
  isRangeTrimmed,
@@ -127,16 +157,16 @@ export class CopyableRangesFactory {
127
157
  * @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
128
158
  */
129
159
  getMostBottomColumnHeadersRange() {
130
- if (_classPrivateFieldGet(_countColumns, this).call(this) === 0 || _classPrivateFieldGet(_countColumnHeaders, this).call(this) === 0) {
160
+ if (_classPrivateFieldGet(this, _countColumns).call(this) === 0 || _classPrivateFieldGet(this, _countColumnHeaders).call(this) === 0) {
131
161
  return null;
132
162
  }
133
163
  const {
134
164
  col: startCol
135
- } = _classPrivateFieldGet(_selectedRange, this).getTopStartCorner();
165
+ } = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner();
136
166
  const {
137
167
  col: endCol
138
- } = _classPrivateFieldGet(_selectedRange, this).getBottomEndCorner();
139
- const finalEndCol = _assertClassBrand(_CopyableRangesFactory_brand, this, _trimColumnsRange).call(this, startCol, endCol);
168
+ } = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner();
169
+ const finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
140
170
  const isRangeTrimmed = endCol !== finalEndCol;
141
171
  return {
142
172
  isRangeTrimmed,
@@ -154,20 +184,20 @@ export class CopyableRangesFactory {
154
184
  * @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
155
185
  */
156
186
  getAllColumnHeadersRange() {
157
- if (_classPrivateFieldGet(_countColumns, this).call(this) === 0 || _classPrivateFieldGet(_countColumnHeaders, this).call(this) === 0) {
187
+ if (_classPrivateFieldGet(this, _countColumns).call(this) === 0 || _classPrivateFieldGet(this, _countColumnHeaders).call(this) === 0) {
158
188
  return null;
159
189
  }
160
190
  const {
161
191
  col: startCol
162
- } = _classPrivateFieldGet(_selectedRange, this).getTopStartCorner();
192
+ } = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner();
163
193
  const {
164
194
  col: endCol
165
- } = _classPrivateFieldGet(_selectedRange, this).getBottomEndCorner();
166
- const finalEndCol = _assertClassBrand(_CopyableRangesFactory_brand, this, _trimColumnsRange).call(this, startCol, endCol);
195
+ } = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner();
196
+ const finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
167
197
  const isRangeTrimmed = endCol !== finalEndCol;
168
198
  return {
169
199
  isRangeTrimmed,
170
- startRow: -_classPrivateFieldGet(_countColumnHeaders, this).call(this),
200
+ startRow: -_classPrivateFieldGet(this, _countColumnHeaders).call(this),
171
201
  startCol,
172
202
  endRow: -1,
173
203
  endCol: finalEndCol
@@ -182,18 +212,11 @@ export class CopyableRangesFactory {
182
212
  * @param {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>} ranges The range to process.
183
213
  * @returns {{rows: number[], columns: number[]}}
184
214
  */
185
- function _trimColumnsRange(startColumn, endColumn) {
186
- return Math.min(endColumn, Math.max(startColumn + _classPrivateFieldGet(_columnsLimit, this).call(this) - 1, startColumn));
215
+ function _trimColumnsRange2(startColumn, endColumn) {
216
+ return Math.min(endColumn, Math.max(startColumn + _classPrivateFieldGet(this, _columnsLimit).call(this) - 1, startColumn));
187
217
  }
188
- /**
189
- * Trimmed the rows range to the limit.
190
- *
191
- * @param {*} startRow The lowest row index in the range.
192
- * @param {*} endRow The highest row index in the range.
193
- * @returns {number} Returns trimmed row index if it exceeds the limit.
194
- */
195
- function _trimRowsRange(startRow, endRow) {
196
- return Math.min(endRow, Math.max(startRow + _classPrivateFieldGet(_rowsLimit, this).call(this) - 1, startRow));
218
+ function _trimRowsRange2(startRow, endRow) {
219
+ return Math.min(endRow, Math.max(startRow + _classPrivateFieldGet(this, _rowsLimit).call(this) - 1, startRow));
197
220
  }
198
221
  export function normalizeRanges(ranges) {
199
222
  const rows = [];
@@ -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 _base = require("../base");
7
7
  var _object = require("../../helpers/object");
8
8
  var _number = require("../../helpers/number");
@@ -18,7 +18,7 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
18
18
  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; }
19
19
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
20
20
  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); }
21
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
21
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
22
22
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'customBorders';
23
23
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 90;
24
24
 
@@ -77,16 +77,21 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 90;
77
77
  * ],
78
78
  * ```
79
79
  */
80
- var _CustomBorders_brand = /*#__PURE__*/new WeakSet();
80
+ var _onAfterContextMenuDefaultOptions = /*#__PURE__*/new WeakSet();
81
+ var _onAfterInit = /*#__PURE__*/new WeakSet();
81
82
  class CustomBorders extends _base.BasePlugin {
82
83
  constructor() {
83
84
  super(...arguments);
85
+ /**
86
+ * `afterInit` hook callback.
87
+ */
88
+ _classPrivateMethodInitSpec(this, _onAfterInit);
84
89
  /**
85
90
  * Add border options to context menu.
86
91
  *
87
92
  * @param {object} defaultOptions Context menu items.
88
93
  */
89
- _classPrivateMethodInitSpec(this, _CustomBorders_brand);
94
+ _classPrivateMethodInitSpec(this, _onAfterContextMenuDefaultOptions);
90
95
  /**
91
96
  * Saved borders.
92
97
  *
@@ -118,8 +123,8 @@ class CustomBorders extends _base.BasePlugin {
118
123
  if (this.enabled) {
119
124
  return;
120
125
  }
121
- this.addHook('afterContextMenuDefaultOptions', options => _assertClassBrand(_CustomBorders_brand, this, _onAfterContextMenuDefaultOptions).call(this, options));
122
- this.addHook('init', () => _assertClassBrand(_CustomBorders_brand, this, _onAfterInit).call(this));
126
+ this.addHook('afterContextMenuDefaultOptions', options => _classPrivateMethodGet(this, _onAfterContextMenuDefaultOptions, _onAfterContextMenuDefaultOptions2).call(this, options));
127
+ this.addHook('init', () => _classPrivateMethodGet(this, _onAfterInit, _onAfterInit2).call(this));
123
128
  super.enablePlugin();
124
129
  }
125
130
 
@@ -710,7 +715,7 @@ class CustomBorders extends _base.BasePlugin {
710
715
  }
711
716
  }
712
717
  exports.CustomBorders = CustomBorders;
713
- function _onAfterContextMenuDefaultOptions(defaultOptions) {
718
+ function _onAfterContextMenuDefaultOptions2(defaultOptions) {
714
719
  if (!this.hot.getSettings()[PLUGIN_KEY]) {
715
720
  return;
716
721
  }
@@ -736,9 +741,6 @@ function _onAfterContextMenuDefaultOptions(defaultOptions) {
736
741
  }
737
742
  });
738
743
  }
739
- /**
740
- * `afterInit` hook callback.
741
- */
742
- function _onAfterInit() {
744
+ function _onAfterInit2() {
743
745
  this.changeBorderSettings();
744
746
  }
@@ -1,11 +1,11 @@
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 _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
4
4
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
7
7
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
8
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
9
9
  import { BasePlugin } from "../base/index.mjs";
10
10
  import { hasOwnProperty, deepClone } from "../../helpers/object.mjs";
11
11
  import { rangeEach } from "../../helpers/number.mjs";
@@ -72,16 +72,21 @@ export const PLUGIN_PRIORITY = 90;
72
72
  * ],
73
73
  * ```
74
74
  */
75
- var _CustomBorders_brand = /*#__PURE__*/new WeakSet();
75
+ var _onAfterContextMenuDefaultOptions = /*#__PURE__*/new WeakSet();
76
+ var _onAfterInit = /*#__PURE__*/new WeakSet();
76
77
  export class CustomBorders extends BasePlugin {
77
78
  constructor() {
78
79
  super(...arguments);
80
+ /**
81
+ * `afterInit` hook callback.
82
+ */
83
+ _classPrivateMethodInitSpec(this, _onAfterInit);
79
84
  /**
80
85
  * Add border options to context menu.
81
86
  *
82
87
  * @param {object} defaultOptions Context menu items.
83
88
  */
84
- _classPrivateMethodInitSpec(this, _CustomBorders_brand);
89
+ _classPrivateMethodInitSpec(this, _onAfterContextMenuDefaultOptions);
85
90
  /**
86
91
  * Saved borders.
87
92
  *
@@ -113,8 +118,8 @@ export class CustomBorders extends BasePlugin {
113
118
  if (this.enabled) {
114
119
  return;
115
120
  }
116
- this.addHook('afterContextMenuDefaultOptions', options => _assertClassBrand(_CustomBorders_brand, this, _onAfterContextMenuDefaultOptions).call(this, options));
117
- this.addHook('init', () => _assertClassBrand(_CustomBorders_brand, this, _onAfterInit).call(this));
121
+ this.addHook('afterContextMenuDefaultOptions', options => _classPrivateMethodGet(this, _onAfterContextMenuDefaultOptions, _onAfterContextMenuDefaultOptions2).call(this, options));
122
+ this.addHook('init', () => _classPrivateMethodGet(this, _onAfterInit, _onAfterInit2).call(this));
118
123
  super.enablePlugin();
119
124
  }
120
125
 
@@ -704,7 +709,7 @@ export class CustomBorders extends BasePlugin {
704
709
  super.destroy();
705
710
  }
706
711
  }
707
- function _onAfterContextMenuDefaultOptions(defaultOptions) {
712
+ function _onAfterContextMenuDefaultOptions2(defaultOptions) {
708
713
  if (!this.hot.getSettings()[PLUGIN_KEY]) {
709
714
  return;
710
715
  }
@@ -730,9 +735,6 @@ function _onAfterContextMenuDefaultOptions(defaultOptions) {
730
735
  }
731
736
  });
732
737
  }
733
- /**
734
- * `afterInit` hook callback.
735
- */
736
- function _onAfterInit() {
738
+ function _onAfterInit2() {
737
739
  this.changeBorderSettings();
738
740
  }
@@ -10,7 +10,7 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
10
10
  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; }
11
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
12
12
  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); }
13
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
13
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
14
14
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'dragToScroll';
15
15
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 100;
16
16
 
@@ -24,7 +24,7 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 100;
24
24
  * @class DragToScroll
25
25
  * @plugin DragToScroll
26
26
  */
27
- var _DragToScroll_brand = /*#__PURE__*/new WeakSet();
27
+ var _setupListening = /*#__PURE__*/new WeakSet();
28
28
  class DragToScroll extends _base.BasePlugin {
29
29
  constructor() {
30
30
  super(...arguments);
@@ -33,7 +33,7 @@ class DragToScroll extends _base.BasePlugin {
33
33
  *
34
34
  * @param {MouseEvent} event The mouse event object.
35
35
  */
36
- _classPrivateMethodInitSpec(this, _DragToScroll_brand);
36
+ _classPrivateMethodInitSpec(this, _setupListening);
37
37
  /**
38
38
  * Size of an element and its position relative to the viewport,
39
39
  * e.g. {bottom: 449, height: 441, left: 8, right: 814, top: 8, width: 806, x: 8, y:8}.
@@ -79,8 +79,8 @@ class DragToScroll extends _base.BasePlugin {
79
79
  if (this.enabled) {
80
80
  return;
81
81
  }
82
- this.addHook('afterOnCellMouseDown', event => _assertClassBrand(_DragToScroll_brand, this, _setupListening).call(this, event));
83
- this.addHook('afterOnCellCornerMouseDown', event => _assertClassBrand(_DragToScroll_brand, this, _setupListening).call(this, event));
82
+ this.addHook('afterOnCellMouseDown', event => _classPrivateMethodGet(this, _setupListening, _setupListening2).call(this, event));
83
+ this.addHook('afterOnCellCornerMouseDown', event => _classPrivateMethodGet(this, _setupListening, _setupListening2).call(this, event));
84
84
  this.registerEvents();
85
85
  super.enablePlugin();
86
86
  }
@@ -232,7 +232,7 @@ class DragToScroll extends _base.BasePlugin {
232
232
  }
233
233
  }
234
234
  exports.DragToScroll = DragToScroll;
235
- function _setupListening(event) {
235
+ function _setupListening2(event) {
236
236
  if ((0, _event.isRightClick)(event)) {
237
237
  return;
238
238
  }