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
@@ -1,9 +1,11 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
2
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
3
3
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
4
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
5
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
6
- 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"); }
4
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
5
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
6
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
7
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
8
+ 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; } }
7
9
  import AxisSyncer from "./axisSyncer.mjs";
8
10
  /**
9
11
  * @private
@@ -29,52 +31,73 @@ class IndexSyncer {
29
31
  * @private
30
32
  * @type {AxisSyncer}
31
33
  */
32
- _classPrivateFieldInitSpec(this, _rowIndexSyncer, void 0);
34
+ _classPrivateFieldInitSpec(this, _rowIndexSyncer, {
35
+ writable: true,
36
+ value: void 0
37
+ });
33
38
  /**
34
39
  * Indexes synchronizer for the axis of the columns.
35
40
  *
36
41
  * @private
37
42
  * @type {AxisSyncer}
38
43
  */
39
- _classPrivateFieldInitSpec(this, _columnIndexSyncer, void 0);
44
+ _classPrivateFieldInitSpec(this, _columnIndexSyncer, {
45
+ writable: true,
46
+ value: void 0
47
+ });
40
48
  /**
41
49
  * Method which will postpone execution of some action (needed when synchronization endpoint isn't setup yet).
42
50
  *
43
51
  * @private
44
52
  * @type {Function}
45
53
  */
46
- _classPrivateFieldInitSpec(this, _postponeAction, void 0);
54
+ _classPrivateFieldInitSpec(this, _postponeAction, {
55
+ writable: true,
56
+ value: void 0
57
+ });
47
58
  /**
48
59
  * Flag informing whether undo is already performed (we don't perform synchronization in such case).
49
60
  *
50
61
  * @private
51
62
  * @type {boolean}
52
63
  */
53
- _classPrivateFieldInitSpec(this, _isPerformingUndo, false);
64
+ _classPrivateFieldInitSpec(this, _isPerformingUndo, {
65
+ writable: true,
66
+ value: false
67
+ });
54
68
  /**
55
69
  * Flag informing whether redo is already performed (we don't perform synchronization in such case).
56
70
  *
57
71
  * @private
58
72
  * @type {boolean}
59
73
  */
60
- _classPrivateFieldInitSpec(this, _isPerformingRedo, false);
74
+ _classPrivateFieldInitSpec(this, _isPerformingRedo, {
75
+ writable: true,
76
+ value: false
77
+ });
61
78
  /**
62
79
  * The HF's engine instance which will be synced.
63
80
  *
64
81
  * @private
65
82
  * @type {HyperFormula|null}
66
83
  */
67
- _classPrivateFieldInitSpec(this, _engine, null);
84
+ _classPrivateFieldInitSpec(this, _engine, {
85
+ writable: true,
86
+ value: null
87
+ });
68
88
  /**
69
89
  * HyperFormula's sheet name.
70
90
  *
71
91
  * @private
72
92
  * @type {string|null}
73
93
  */
74
- _classPrivateFieldInitSpec(this, _sheetId, null);
75
- _classPrivateFieldSet(_rowIndexSyncer, this, new AxisSyncer('row', rowIndexMapper, this));
76
- _classPrivateFieldSet(_columnIndexSyncer, this, new AxisSyncer('column', columnIndexMapper, this));
77
- _classPrivateFieldSet(_postponeAction, this, postponeAction);
94
+ _classPrivateFieldInitSpec(this, _sheetId, {
95
+ writable: true,
96
+ value: null
97
+ });
98
+ _classPrivateFieldSet(this, _rowIndexSyncer, new AxisSyncer('row', rowIndexMapper, this));
99
+ _classPrivateFieldSet(this, _columnIndexSyncer, new AxisSyncer('column', columnIndexMapper, this));
100
+ _classPrivateFieldSet(this, _postponeAction, postponeAction);
78
101
  }
79
102
 
80
103
  /**
@@ -85,9 +108,9 @@ class IndexSyncer {
85
108
  */
86
109
  getForAxis(indexType) {
87
110
  if (indexType === 'row') {
88
- return _classPrivateFieldGet(_rowIndexSyncer, this);
111
+ return _classPrivateFieldGet(this, _rowIndexSyncer);
89
112
  }
90
- return _classPrivateFieldGet(_columnIndexSyncer, this);
113
+ return _classPrivateFieldGet(this, _columnIndexSyncer);
91
114
  }
92
115
 
93
116
  /**
@@ -96,7 +119,7 @@ class IndexSyncer {
96
119
  * @param {boolean} flagValue Boolean value for the flag.
97
120
  */
98
121
  setPerformUndo(flagValue) {
99
- _classPrivateFieldSet(_isPerformingUndo, this, flagValue);
122
+ _classPrivateFieldSet(this, _isPerformingUndo, flagValue);
100
123
  }
101
124
 
102
125
  /**
@@ -105,7 +128,7 @@ class IndexSyncer {
105
128
  * @param {boolean} flagValue Boolean value for the flag.
106
129
  */
107
130
  setPerformRedo(flagValue) {
108
- _classPrivateFieldSet(_isPerformingRedo, this, flagValue);
131
+ _classPrivateFieldSet(this, _isPerformingRedo, flagValue);
109
132
  }
110
133
 
111
134
  /**
@@ -115,7 +138,7 @@ class IndexSyncer {
115
138
  * @returns {boolean}
116
139
  */
117
140
  isPerformingUndoRedo() {
118
- return _classPrivateFieldGet(_isPerformingUndo, this) || _classPrivateFieldGet(_isPerformingRedo, this);
141
+ return _classPrivateFieldGet(this, _isPerformingUndo) || _classPrivateFieldGet(this, _isPerformingRedo);
119
142
  }
120
143
 
121
144
  /**
@@ -124,7 +147,7 @@ class IndexSyncer {
124
147
  * @returns {string|null}
125
148
  */
126
149
  getSheetId() {
127
- return _classPrivateFieldGet(_sheetId, this);
150
+ return _classPrivateFieldGet(this, _sheetId);
128
151
  }
129
152
 
130
153
  /**
@@ -133,7 +156,7 @@ class IndexSyncer {
133
156
  * @type {HyperFormula|null}
134
157
  */
135
158
  getEngine() {
136
- return _classPrivateFieldGet(_engine, this);
159
+ return _classPrivateFieldGet(this, _engine);
137
160
  }
138
161
 
139
162
  /**
@@ -142,7 +165,7 @@ class IndexSyncer {
142
165
  * @returns {Function}
143
166
  */
144
167
  getPostponeAction() {
145
- return _classPrivateFieldGet(_postponeAction, this);
168
+ return _classPrivateFieldGet(this, _postponeAction);
146
169
  }
147
170
 
148
171
  /**
@@ -152,10 +175,10 @@ class IndexSyncer {
152
175
  * @param {string|null} sheetId HyperFormula's sheet name.
153
176
  */
154
177
  setupSyncEndpoint(engine, sheetId) {
155
- _classPrivateFieldSet(_engine, this, engine);
156
- _classPrivateFieldSet(_sheetId, this, sheetId);
157
- _classPrivateFieldGet(_rowIndexSyncer, this).init();
158
- _classPrivateFieldGet(_columnIndexSyncer, this).init();
178
+ _classPrivateFieldSet(this, _engine, engine);
179
+ _classPrivateFieldSet(this, _sheetId, sheetId);
180
+ _classPrivateFieldGet(this, _rowIndexSyncer).init();
181
+ _classPrivateFieldGet(this, _columnIndexSyncer).init();
159
182
  }
160
183
  }
161
184
  export default IndexSyncer;
@@ -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 _element = require("../../helpers/dom/element");
8
8
  var _number = require("../../helpers/number");
@@ -18,9 +18,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
18
18
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
19
19
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
20
20
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
21
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
22
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
23
- 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
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
23
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
24
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
25
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
26
+ 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; } }
24
27
  _pluginHooks.default.getSingleton().register('beforeHideColumns');
25
28
  _pluginHooks.default.getSingleton().register('afterHideColumns');
26
29
  _pluginHooks.default.getSingleton().register('beforeUnhideColumns');
@@ -136,10 +139,47 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 310;
136
139
  */
137
140
  var _settings = /*#__PURE__*/new WeakMap();
138
141
  var _hiddenColumnsMap = /*#__PURE__*/new WeakMap();
139
- var _HiddenColumns_brand = /*#__PURE__*/new WeakSet();
142
+ var _onModifyColWidth = /*#__PURE__*/new WeakSet();
143
+ var _onAfterGetCellMeta = /*#__PURE__*/new WeakSet();
144
+ var _onModifyCopyableRange = /*#__PURE__*/new WeakSet();
145
+ var _onAfterGetColHeader = /*#__PURE__*/new WeakSet();
146
+ var _onAfterContextMenuDefaultOptions = /*#__PURE__*/new WeakSet();
147
+ var _onMapInit = /*#__PURE__*/new WeakSet();
140
148
  class HiddenColumns extends _base.BasePlugin {
141
149
  constructor() {
142
150
  super(...arguments);
151
+ /**
152
+ * On map initialized hook callback.
153
+ */
154
+ _classPrivateMethodInitSpec(this, _onMapInit);
155
+ /**
156
+ * Add Show-hide columns to context menu.
157
+ *
158
+ * @param {object} options An array of objects containing information about the pre-defined Context Menu items.
159
+ */
160
+ _classPrivateMethodInitSpec(this, _onAfterContextMenuDefaultOptions);
161
+ /**
162
+ * Adds the needed classes to the headers.
163
+ *
164
+ * @param {number} column Visual column index.
165
+ * @param {HTMLElement} TH Header's TH element.
166
+ */
167
+ _classPrivateMethodInitSpec(this, _onAfterGetColHeader);
168
+ /**
169
+ * Modifies the copyable range, accordingly to the provided config.
170
+ *
171
+ * @param {Array} ranges An array of objects defining copyable cells.
172
+ * @returns {Array}
173
+ */
174
+ _classPrivateMethodInitSpec(this, _onModifyCopyableRange);
175
+ /**
176
+ * Sets the copy-related cell meta.
177
+ *
178
+ * @param {number} row Visual row index.
179
+ * @param {number} column Visual column index.
180
+ * @param {object} cellProperties Object containing the cell properties.
181
+ */
182
+ _classPrivateMethodInitSpec(this, _onAfterGetCellMeta);
143
183
  /**
144
184
  * Adds the additional column width for the hidden column indicators.
145
185
  *
@@ -147,21 +187,27 @@ class HiddenColumns extends _base.BasePlugin {
147
187
  * @param {number} column Visual column index.
148
188
  * @returns {number}
149
189
  */
150
- _classPrivateMethodInitSpec(this, _HiddenColumns_brand);
190
+ _classPrivateMethodInitSpec(this, _onModifyColWidth);
151
191
  /**
152
192
  * Cached plugin settings.
153
193
  *
154
194
  * @private
155
195
  * @type {object}
156
196
  */
157
- _classPrivateFieldInitSpec(this, _settings, {});
197
+ _classPrivateFieldInitSpec(this, _settings, {
198
+ writable: true,
199
+ value: {}
200
+ });
158
201
  /**
159
202
  * Map of hidden columns by the plugin.
160
203
  *
161
204
  * @private
162
205
  * @type {null|HidingMap}
163
206
  */
164
- _classPrivateFieldInitSpec(this, _hiddenColumnsMap, null);
207
+ _classPrivateFieldInitSpec(this, _hiddenColumnsMap, {
208
+ writable: true,
209
+ value: null
210
+ });
165
211
  }
166
212
  static get PLUGIN_KEY() {
167
213
  return PLUGIN_KEY;
@@ -189,29 +235,29 @@ class HiddenColumns extends _base.BasePlugin {
189
235
  }
190
236
  const pluginSettings = this.hot.getSettings()[PLUGIN_KEY];
191
237
  if ((0, _object.isObject)(pluginSettings)) {
192
- _classPrivateFieldSet(_settings, this, pluginSettings);
238
+ _classPrivateFieldSet(this, _settings, pluginSettings);
193
239
  if ((0, _mixed.isUndefined)(pluginSettings.copyPasteEnabled)) {
194
240
  pluginSettings.copyPasteEnabled = true;
195
241
  }
196
242
  }
197
- _classPrivateFieldSet(_hiddenColumnsMap, this, new _translations.HidingMap());
198
- _classPrivateFieldGet(_hiddenColumnsMap, this).addLocalHook('init', () => _assertClassBrand(_HiddenColumns_brand, this, _onMapInit).call(this));
199
- this.hot.columnIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(_hiddenColumnsMap, this));
243
+ _classPrivateFieldSet(this, _hiddenColumnsMap, new _translations.HidingMap());
244
+ _classPrivateFieldGet(this, _hiddenColumnsMap).addLocalHook('init', () => _classPrivateMethodGet(this, _onMapInit, _onMapInit2).call(this));
245
+ this.hot.columnIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(this, _hiddenColumnsMap));
200
246
  this.addHook('afterContextMenuDefaultOptions', function () {
201
247
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
202
248
  args[_key] = arguments[_key];
203
249
  }
204
- return _assertClassBrand(_HiddenColumns_brand, _this, _onAfterContextMenuDefaultOptions).call(_this, ...args);
250
+ return _classPrivateMethodGet(_this, _onAfterContextMenuDefaultOptions, _onAfterContextMenuDefaultOptions2).call(_this, ...args);
205
251
  });
206
- this.addHook('afterGetCellMeta', (row, col, cellProperties) => _assertClassBrand(_HiddenColumns_brand, this, _onAfterGetCellMeta).call(this, row, col, cellProperties));
207
- this.addHook('modifyColWidth', (width, col) => _assertClassBrand(_HiddenColumns_brand, this, _onModifyColWidth).call(this, width, col));
252
+ this.addHook('afterGetCellMeta', (row, col, cellProperties) => _classPrivateMethodGet(this, _onAfterGetCellMeta, _onAfterGetCellMeta2).call(this, row, col, cellProperties));
253
+ this.addHook('modifyColWidth', (width, col) => _classPrivateMethodGet(this, _onModifyColWidth, _onModifyColWidth2).call(this, width, col));
208
254
  this.addHook('afterGetColHeader', function () {
209
255
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
210
256
  args[_key2] = arguments[_key2];
211
257
  }
212
- return _assertClassBrand(_HiddenColumns_brand, _this, _onAfterGetColHeader).call(_this, ...args);
258
+ return _classPrivateMethodGet(_this, _onAfterGetColHeader, _onAfterGetColHeader2).call(_this, ...args);
213
259
  });
214
- this.addHook('modifyCopyableRange', ranges => _assertClassBrand(_HiddenColumns_brand, this, _onModifyCopyableRange).call(this, ranges));
260
+ this.addHook('modifyCopyableRange', ranges => _classPrivateMethodGet(this, _onModifyCopyableRange, _onModifyCopyableRange2).call(this, ranges));
215
261
  super.enablePlugin();
216
262
  }
217
263
 
@@ -232,7 +278,7 @@ class HiddenColumns extends _base.BasePlugin {
232
278
  */
233
279
  disablePlugin() {
234
280
  this.hot.columnIndexMapper.unregisterMap(this.pluginName);
235
- _classPrivateFieldSet(_settings, this, {});
281
+ _classPrivateFieldSet(this, _settings, {});
236
282
  super.disablePlugin();
237
283
  this.resetCellsMeta();
238
284
  }
@@ -246,7 +292,7 @@ class HiddenColumns extends _base.BasePlugin {
246
292
  const currentHideConfig = this.getHiddenColumns();
247
293
  const isValidConfig = this.isValidConfig(columns);
248
294
  let destinationHideConfig = currentHideConfig;
249
- const hidingMapValues = _classPrivateFieldGet(_hiddenColumnsMap, this).getValues().slice();
295
+ const hidingMapValues = _classPrivateFieldGet(this, _hiddenColumnsMap).getValues().slice();
250
296
  const isAnyColumnShowed = columns.length > 0;
251
297
  if (isValidConfig && isAnyColumnShowed) {
252
298
  const physicalColumns = columns.map(visualColumn => this.hot.toPhysicalColumn(visualColumn));
@@ -269,7 +315,7 @@ class HiddenColumns extends _base.BasePlugin {
269
315
  return;
270
316
  }
271
317
  if (isValidConfig && isAnyColumnShowed) {
272
- _classPrivateFieldGet(_hiddenColumnsMap, this).setValues(hidingMapValues);
318
+ _classPrivateFieldGet(this, _hiddenColumnsMap).setValues(hidingMapValues);
273
319
  }
274
320
 
275
321
  // @TODO Should call once per render cycle, currently fired separately in different plugins
@@ -308,7 +354,7 @@ class HiddenColumns extends _base.BasePlugin {
308
354
  if (isConfigValid) {
309
355
  this.hot.batchExecution(() => {
310
356
  (0, _array.arrayEach)(columns, visualColumn => {
311
- _classPrivateFieldGet(_hiddenColumnsMap, this).setValueAtIndex(this.hot.toPhysicalColumn(visualColumn), true);
357
+ _classPrivateFieldGet(this, _hiddenColumnsMap).setValueAtIndex(this.hot.toPhysicalColumn(visualColumn), true);
312
358
  });
313
359
  }, true);
314
360
  }
@@ -333,7 +379,7 @@ class HiddenColumns extends _base.BasePlugin {
333
379
  * @returns {number[]}
334
380
  */
335
381
  getHiddenColumns() {
336
- return (0, _array.arrayMap)(_classPrivateFieldGet(_hiddenColumnsMap, this).getHiddenIndexes(), physicalColumnIndex => {
382
+ return (0, _array.arrayMap)(_classPrivateFieldGet(this, _hiddenColumnsMap).getHiddenIndexes(), physicalColumnIndex => {
337
383
  return this.hot.toVisualColumn(physicalColumnIndex);
338
384
  });
339
385
  }
@@ -345,7 +391,7 @@ class HiddenColumns extends _base.BasePlugin {
345
391
  * @returns {boolean}
346
392
  */
347
393
  isHidden(column) {
348
- return _classPrivateFieldGet(_hiddenColumnsMap, this).getValueAtIndex(this.hot.toPhysicalColumn(column)) || false;
394
+ return _classPrivateFieldGet(this, _hiddenColumnsMap).getValueAtIndex(this.hot.toPhysicalColumn(column)) || false;
349
395
  }
350
396
 
351
397
  /**
@@ -378,34 +424,27 @@ class HiddenColumns extends _base.BasePlugin {
378
424
  * Destroys the plugin instance.
379
425
  */
380
426
  destroy() {
381
- _classPrivateFieldSet(_settings, this, null);
382
- _classPrivateFieldSet(_hiddenColumnsMap, this, null);
427
+ _classPrivateFieldSet(this, _settings, null);
428
+ _classPrivateFieldSet(this, _hiddenColumnsMap, null);
383
429
  super.destroy();
384
430
  }
385
431
  }
386
432
  exports.HiddenColumns = HiddenColumns;
387
- function _onModifyColWidth(width, column) {
433
+ function _onModifyColWidth2(width, column) {
388
434
  // Hook is triggered internally only for the visible columns. Conditional will be handled for the API
389
435
  // calls of the `getColWidth` function on not visible indexes.
390
436
  if (this.isHidden(column)) {
391
437
  return 0;
392
438
  }
393
- if (_classPrivateFieldGet(_settings, this).indicators && (this.isHidden(column + 1) || this.isHidden(column - 1))) {
439
+ if (_classPrivateFieldGet(this, _settings).indicators && (this.isHidden(column + 1) || this.isHidden(column - 1))) {
394
440
  // Add additional space for hidden column indicator.
395
441
  if (typeof width === 'number' && this.hot.hasColHeaders()) {
396
442
  return width + 15;
397
443
  }
398
444
  }
399
445
  }
400
- /**
401
- * Sets the copy-related cell meta.
402
- *
403
- * @param {number} row Visual row index.
404
- * @param {number} column Visual column index.
405
- * @param {object} cellProperties Object containing the cell properties.
406
- */
407
- function _onAfterGetCellMeta(row, column, cellProperties) {
408
- if (_classPrivateFieldGet(_settings, this).copyPasteEnabled === false && this.isHidden(column)) {
446
+ function _onAfterGetCellMeta2(row, column, cellProperties) {
447
+ if (_classPrivateFieldGet(this, _settings).copyPasteEnabled === false && this.isHidden(column)) {
409
448
  // Cell property handled by the `Autofill` and the `CopyPaste` plugins.
410
449
  cellProperties.skipColumnOnPaste = true;
411
450
  }
@@ -425,15 +464,9 @@ function _onAfterGetCellMeta(row, column, cellProperties) {
425
464
  }
426
465
  }
427
466
  }
428
- /**
429
- * Modifies the copyable range, accordingly to the provided config.
430
- *
431
- * @param {Array} ranges An array of objects defining copyable cells.
432
- * @returns {Array}
433
- */
434
- function _onModifyCopyableRange(ranges) {
467
+ function _onModifyCopyableRange2(ranges) {
435
468
  // Ranges shouldn't be modified when `copyPasteEnabled` option is set to `true` (by default).
436
- if (_classPrivateFieldGet(_settings, this).copyPasteEnabled) {
469
+ if (_classPrivateFieldGet(this, _settings).copyPasteEnabled) {
437
470
  return ranges;
438
471
  }
439
472
  const newRanges = [];
@@ -467,14 +500,8 @@ function _onModifyCopyableRange(ranges) {
467
500
  });
468
501
  return newRanges;
469
502
  }
470
- /**
471
- * Adds the needed classes to the headers.
472
- *
473
- * @param {number} column Visual column index.
474
- * @param {HTMLElement} TH Header's TH element.
475
- */
476
- function _onAfterGetColHeader(column, TH) {
477
- if (!_classPrivateFieldGet(_settings, this).indicators || column < 0) {
503
+ function _onAfterGetColHeader2(column, TH) {
504
+ if (!_classPrivateFieldGet(this, _settings).indicators || column < 0) {
478
505
  return;
479
506
  }
480
507
  const classList = [];
@@ -486,21 +513,13 @@ function _onAfterGetColHeader(column, TH) {
486
513
  }
487
514
  (0, _element.addClass)(TH, classList);
488
515
  }
489
- /**
490
- * Add Show-hide columns to context menu.
491
- *
492
- * @param {object} options An array of objects containing information about the pre-defined Context Menu items.
493
- */
494
- function _onAfterContextMenuDefaultOptions(options) {
516
+ function _onAfterContextMenuDefaultOptions2(options) {
495
517
  options.items.push({
496
518
  name: _predefinedItems.SEPARATOR
497
519
  }, (0, _hideColumn.default)(this), (0, _showColumn.default)(this));
498
520
  }
499
- /**
500
- * On map initialized hook callback.
501
- */
502
- function _onMapInit() {
503
- if (Array.isArray(_classPrivateFieldGet(_settings, this).columns)) {
504
- this.hideColumns(_classPrivateFieldGet(_settings, this).columns);
521
+ function _onMapInit2() {
522
+ if (Array.isArray(_classPrivateFieldGet(this, _settings).columns)) {
523
+ this.hideColumns(_classPrivateFieldGet(this, _settings).columns);
505
524
  }
506
525
  }