handsontable 0.0.0-next-bfb0e3a-20240403 → 0.0.0-next-5a535ed-20240403

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (280) hide show
  1. package/3rdparty/walkontable/src/calculator/viewportColumns.js +17 -12
  2. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +17 -12
  3. package/3rdparty/walkontable/src/calculator/viewportRows.js +15 -10
  4. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +15 -10
  5. package/3rdparty/walkontable/src/cell/coords.js +17 -12
  6. package/3rdparty/walkontable/src/cell/coords.mjs +17 -12
  7. package/3rdparty/walkontable/src/cell/range.d.ts +1 -2
  8. package/3rdparty/walkontable/src/cell/range.js +28 -40
  9. package/3rdparty/walkontable/src/cell/range.mjs +28 -40
  10. package/3rdparty/walkontable/src/core/_base.js +1 -1
  11. package/3rdparty/walkontable/src/core/_base.mjs +1 -1
  12. package/3rdparty/walkontable/src/event.js +104 -72
  13. package/3rdparty/walkontable/src/event.mjs +104 -72
  14. package/3rdparty/walkontable/src/overlays.js +1 -1
  15. package/3rdparty/walkontable/src/overlays.mjs +1 -1
  16. package/3rdparty/walkontable/src/scroll.js +17 -15
  17. package/3rdparty/walkontable/src/scroll.mjs +17 -15
  18. package/3rdparty/walkontable/src/selection/manager.js +69 -48
  19. package/3rdparty/walkontable/src/selection/manager.mjs +69 -48
  20. package/3rdparty/walkontable/src/selection/scanner.js +42 -33
  21. package/3rdparty/walkontable/src/selection/scanner.mjs +42 -33
  22. package/3rdparty/walkontable/src/utils/columnStretching.js +44 -27
  23. package/3rdparty/walkontable/src/utils/columnStretching.mjs +44 -27
  24. package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
  25. package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
  26. package/base.js +2 -2
  27. package/base.mjs +2 -2
  28. package/core/viewportScroll/index.js +1 -4
  29. package/core/viewportScroll/index.mjs +1 -4
  30. package/core.d.ts +3 -4
  31. package/core.js +22 -77
  32. package/core.mjs +22 -77
  33. package/dataMap/dataSource.js +1 -1
  34. package/dataMap/dataSource.mjs +1 -1
  35. package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
  36. package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
  37. package/dataMap/metaManager/metaSchema.js +1 -1
  38. package/dataMap/metaManager/metaSchema.mjs +1 -1
  39. package/dataMap/replaceData.js +1 -1
  40. package/dataMap/replaceData.mjs +1 -1
  41. package/dist/handsontable.css +4 -4
  42. package/dist/handsontable.full.css +4 -4
  43. package/dist/handsontable.full.js +9117 -8969
  44. package/dist/handsontable.full.min.css +3 -3
  45. package/dist/handsontable.full.min.js +292 -292
  46. package/dist/handsontable.js +6569 -6874
  47. package/dist/handsontable.min.css +3 -3
  48. package/dist/handsontable.min.js +25 -25
  49. package/dist/languages/all.min.js +1 -1
  50. package/dist/languages/ar-AR.min.js +1 -1
  51. package/dist/languages/cs-CZ.min.js +1 -1
  52. package/dist/languages/de-CH.min.js +1 -1
  53. package/dist/languages/de-DE.min.js +1 -1
  54. package/dist/languages/en-US.min.js +1 -1
  55. package/dist/languages/es-MX.min.js +1 -1
  56. package/dist/languages/fr-FR.min.js +1 -1
  57. package/dist/languages/hr-HR.min.js +1 -1
  58. package/dist/languages/it-IT.min.js +1 -1
  59. package/dist/languages/ja-JP.min.js +1 -1
  60. package/dist/languages/ko-KR.min.js +1 -1
  61. package/dist/languages/lv-LV.min.js +1 -1
  62. package/dist/languages/nb-NO.min.js +1 -1
  63. package/dist/languages/nl-NL.min.js +1 -1
  64. package/dist/languages/pl-PL.min.js +1 -1
  65. package/dist/languages/pt-BR.min.js +1 -1
  66. package/dist/languages/ru-RU.min.js +1 -1
  67. package/dist/languages/sr-SP.min.js +1 -1
  68. package/dist/languages/zh-CN.min.js +1 -1
  69. package/dist/languages/zh-TW.min.js +1 -1
  70. package/editorManager.js +23 -25
  71. package/editorManager.mjs +23 -25
  72. package/editors/autocompleteEditor/autocompleteEditor.js +10 -6
  73. package/editors/autocompleteEditor/autocompleteEditor.mjs +10 -6
  74. package/editors/selectEditor/selectEditor.js +19 -20
  75. package/editors/selectEditor/selectEditor.mjs +19 -20
  76. package/eventManager.js +1 -1
  77. package/eventManager.mjs +1 -1
  78. package/focusManager.js +82 -64
  79. package/focusManager.mjs +82 -64
  80. package/helpers/dom/element.js +1 -1
  81. package/helpers/dom/element.mjs +1 -1
  82. package/helpers/mixed.js +1 -1
  83. package/helpers/mixed.mjs +1 -1
  84. package/helpers/object.js +2 -2
  85. package/helpers/object.mjs +2 -2
  86. package/index.d.ts +0 -10
  87. package/package.json +2 -7
  88. package/pluginHooks.d.ts +3 -4
  89. package/pluginHooks.js +38 -99
  90. package/pluginHooks.mjs +38 -99
  91. package/plugins/autoColumnSize/autoColumnSize.js +65 -49
  92. package/plugins/autoColumnSize/autoColumnSize.mjs +65 -49
  93. package/plugins/autoRowSize/autoRowSize.js +34 -28
  94. package/plugins/autoRowSize/autoRowSize.mjs +34 -28
  95. package/plugins/autofill/autofill.js +38 -30
  96. package/plugins/autofill/autofill.mjs +38 -30
  97. package/plugins/base/base.js +17 -12
  98. package/plugins/base/base.mjs +17 -12
  99. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
  100. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
  101. package/plugins/collapsibleColumns/collapsibleColumns.js +50 -59
  102. package/plugins/collapsibleColumns/collapsibleColumns.mjs +50 -59
  103. package/plugins/columnSorting/columnSorting.js +45 -49
  104. package/plugins/columnSorting/columnSorting.mjs +45 -49
  105. package/plugins/columnSummary/columnSummary.js +26 -22
  106. package/plugins/columnSummary/columnSummary.mjs +26 -22
  107. package/plugins/comments/comments.js +158 -116
  108. package/plugins/comments/comments.mjs +158 -116
  109. package/plugins/contextMenu/contextMenu.js +26 -20
  110. package/plugins/contextMenu/contextMenu.mjs +26 -20
  111. package/plugins/contextMenu/itemsFactory.js +1 -1
  112. package/plugins/contextMenu/itemsFactory.mjs +1 -1
  113. package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
  114. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
  115. package/plugins/contextMenu/menu/menu.js +21 -13
  116. package/plugins/contextMenu/menu/menu.mjs +21 -13
  117. package/plugins/contextMenu/menu/positioner.js +58 -41
  118. package/plugins/contextMenu/menu/positioner.mjs +58 -41
  119. package/plugins/copyPaste/copyPaste.js +157 -116
  120. package/plugins/copyPaste/copyPaste.mjs +157 -116
  121. package/plugins/copyPaste/copyableRanges.js +66 -43
  122. package/plugins/copyPaste/copyableRanges.mjs +66 -43
  123. package/plugins/customBorders/customBorders.js +13 -11
  124. package/plugins/customBorders/customBorders.mjs +13 -11
  125. package/plugins/dragToScroll/dragToScroll.js +6 -6
  126. package/plugins/dragToScroll/dragToScroll.mjs +6 -6
  127. package/plugins/dropdownMenu/dropdownMenu.js +106 -80
  128. package/plugins/dropdownMenu/dropdownMenu.mjs +106 -80
  129. package/plugins/exportFile/dataProvider.js +1 -1
  130. package/plugins/exportFile/dataProvider.mjs +1 -1
  131. package/plugins/filters/component/actionBar.js +9 -9
  132. package/plugins/filters/component/actionBar.mjs +8 -8
  133. package/plugins/filters/component/condition.js +15 -13
  134. package/plugins/filters/component/condition.mjs +15 -13
  135. package/plugins/filters/component/operators.js +6 -6
  136. package/plugins/filters/component/operators.mjs +6 -6
  137. package/plugins/filters/component/value.js +28 -24
  138. package/plugins/filters/component/value.mjs +28 -24
  139. package/plugins/filters/conditionUpdateObserver.js +24 -22
  140. package/plugins/filters/conditionUpdateObserver.mjs +24 -22
  141. package/plugins/filters/dataFilter.js +1 -1
  142. package/plugins/filters/dataFilter.mjs +1 -1
  143. package/plugins/filters/filters.js +95 -81
  144. package/plugins/filters/filters.mjs +95 -81
  145. package/plugins/filters/ui/input.js +19 -13
  146. package/plugins/filters/ui/input.mjs +19 -13
  147. package/plugins/filters/ui/link.js +13 -8
  148. package/plugins/filters/ui/link.mjs +13 -8
  149. package/plugins/filters/ui/multipleSelect.js +112 -85
  150. package/plugins/filters/ui/multipleSelect.mjs +112 -85
  151. package/plugins/filters/ui/radioInput.js +20 -12
  152. package/plugins/filters/ui/radioInput.mjs +20 -12
  153. package/plugins/filters/ui/select.js +72 -50
  154. package/plugins/filters/ui/select.mjs +71 -49
  155. package/plugins/formulas/formulas.js +326 -268
  156. package/plugins/formulas/formulas.mjs +327 -269
  157. package/plugins/formulas/indexSyncer/axisSyncer.js +61 -38
  158. package/plugins/formulas/indexSyncer/axisSyncer.mjs +61 -38
  159. package/plugins/formulas/indexSyncer/index.js +48 -25
  160. package/plugins/formulas/indexSyncer/index.mjs +48 -25
  161. package/plugins/hiddenColumns/hiddenColumns.js +83 -64
  162. package/plugins/hiddenColumns/hiddenColumns.mjs +83 -64
  163. package/plugins/hiddenRows/hiddenRows.js +82 -63
  164. package/plugins/hiddenRows/hiddenRows.mjs +82 -63
  165. package/plugins/manualColumnFreeze/manualColumnFreeze.js +32 -24
  166. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +33 -25
  167. package/plugins/manualColumnMove/manualColumnMove.js +170 -126
  168. package/plugins/manualColumnMove/manualColumnMove.mjs +170 -126
  169. package/plugins/manualColumnResize/manualColumnResize.js +230 -169
  170. package/plugins/manualColumnResize/manualColumnResize.mjs +230 -169
  171. package/plugins/manualRowMove/manualRowMove.js +128 -99
  172. package/plugins/manualRowMove/manualRowMove.mjs +128 -99
  173. package/plugins/manualRowResize/manualRowResize.js +209 -150
  174. package/plugins/manualRowResize/manualRowResize.mjs +209 -150
  175. package/plugins/mergeCells/calculations/selection.js +71 -2
  176. package/plugins/mergeCells/calculations/selection.mjs +71 -2
  177. package/plugins/mergeCells/cellsCollection.js +1 -117
  178. package/plugins/mergeCells/cellsCollection.mjs +1 -117
  179. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
  180. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
  181. package/plugins/mergeCells/mergeCells.js +397 -499
  182. package/plugins/mergeCells/mergeCells.mjs +397 -499
  183. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -8
  184. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -8
  185. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
  186. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
  187. package/plugins/nestedHeaders/nestedHeaders.js +253 -205
  188. package/plugins/nestedHeaders/nestedHeaders.mjs +254 -206
  189. package/plugins/nestedHeaders/stateManager/headersTree.js +32 -21
  190. package/plugins/nestedHeaders/stateManager/headersTree.mjs +32 -21
  191. package/plugins/nestedHeaders/stateManager/index.js +41 -30
  192. package/plugins/nestedHeaders/stateManager/index.mjs +41 -30
  193. package/plugins/nestedHeaders/stateManager/sourceSettings.js +30 -19
  194. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +30 -19
  195. package/plugins/nestedRows/data/dataManager.js +1 -1
  196. package/plugins/nestedRows/data/dataManager.mjs +1 -1
  197. package/plugins/nestedRows/nestedRows.js +182 -151
  198. package/plugins/nestedRows/nestedRows.mjs +183 -152
  199. package/plugins/nestedRows/ui/contextMenu.js +15 -11
  200. package/plugins/nestedRows/ui/contextMenu.mjs +14 -10
  201. package/plugins/nestedRows/utils/rowMoveController.js +1 -1
  202. package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
  203. package/plugins/persistentState/storage.js +2 -2
  204. package/plugins/persistentState/storage.mjs +2 -2
  205. package/plugins/search/search.js +7 -7
  206. package/plugins/search/search.mjs +7 -7
  207. package/plugins/touchScroll/touchScroll.js +19 -15
  208. package/plugins/touchScroll/touchScroll.mjs +20 -16
  209. package/plugins/trimRows/trimRows.js +6 -6
  210. package/plugins/trimRows/trimRows.mjs +6 -6
  211. package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
  212. package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
  213. package/selection/highlight/highlight.js +14 -14
  214. package/selection/highlight/highlight.mjs +13 -13
  215. package/selection/highlight/visualSelection.js +0 -2
  216. package/selection/highlight/visualSelection.mjs +0 -2
  217. package/selection/selection.js +67 -225
  218. package/selection/selection.mjs +66 -224
  219. package/selection/transformation.js +118 -149
  220. package/selection/transformation.mjs +118 -149
  221. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  222. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  223. package/shortcutContexts/commands/editor/open.js +3 -18
  224. package/shortcutContexts/commands/editor/open.mjs +3 -18
  225. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  226. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  227. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  228. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  229. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  230. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  231. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  232. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  233. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
  234. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
  235. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
  236. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
  237. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
  238. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
  239. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
  240. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
  241. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
  242. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
  243. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
  244. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
  245. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  246. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  247. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  248. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  249. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
  250. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
  251. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
  252. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
  253. package/shortcutContexts/grid.js +3 -9
  254. package/shortcutContexts/grid.mjs +3 -9
  255. package/shortcuts/context.js +1 -2
  256. package/shortcuts/context.mjs +1 -2
  257. package/tableView.js +78 -52
  258. package/tableView.mjs +78 -52
  259. package/translations/changesObservable/observable.js +38 -21
  260. package/translations/changesObservable/observable.mjs +38 -21
  261. package/translations/changesObservable/observer.js +12 -7
  262. package/translations/changesObservable/observer.mjs +11 -6
  263. package/translations/mapCollections/aggregatedCollection.js +1 -1
  264. package/translations/mapCollections/aggregatedCollection.mjs +1 -1
  265. package/translations/maps/indexMap.js +1 -1
  266. package/translations/maps/indexMap.mjs +1 -1
  267. package/utils/dataStructures/linkedList.js +1 -6
  268. package/utils/dataStructures/linkedList.mjs +1 -6
  269. package/utils/dataStructures/tree.js +1 -1
  270. package/utils/dataStructures/tree.mjs +1 -1
  271. package/utils/interval.js +44 -26
  272. package/utils/interval.mjs +44 -26
  273. package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
  274. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
  275. package/i18n/languages/ar-AR.d.ts +0 -5
  276. package/i18n/languages/cs-CZ.d.ts +0 -5
  277. package/i18n/languages/hr-HR.d.ts +0 -5
  278. package/i18n/languages/sr-SP.d.ts +0 -5
  279. package/plugins/mergeCells/focusOrder.js +0 -305
  280. package/plugins/mergeCells/focusOrder.mjs +0 -300
@@ -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 { BasePlugin } from "../base/index.mjs";
10
13
  import { addClass } from "../../helpers/dom/element.mjs";
11
14
  import { rangeEach } from "../../helpers/number.mjs";
@@ -132,10 +135,47 @@ export const PLUGIN_PRIORITY = 320;
132
135
  */
133
136
  var _settings = /*#__PURE__*/new WeakMap();
134
137
  var _hiddenRowsMap = /*#__PURE__*/new WeakMap();
135
- var _HiddenRows_brand = /*#__PURE__*/new WeakSet();
138
+ var _onModifyRowHeight = /*#__PURE__*/new WeakSet();
139
+ var _onAfterGetCellMeta = /*#__PURE__*/new WeakSet();
140
+ var _onModifyCopyableRange = /*#__PURE__*/new WeakSet();
141
+ var _onAfterGetRowHeader = /*#__PURE__*/new WeakSet();
142
+ var _onAfterContextMenuDefaultOptions = /*#__PURE__*/new WeakSet();
143
+ var _onMapInit = /*#__PURE__*/new WeakSet();
136
144
  export class HiddenRows extends BasePlugin {
137
145
  constructor() {
138
146
  super(...arguments);
147
+ /**
148
+ * On map initialized hook callback.
149
+ */
150
+ _classPrivateMethodInitSpec(this, _onMapInit);
151
+ /**
152
+ * Add Show-hide rows to context menu.
153
+ *
154
+ * @param {object} options An array of objects containing information about the pre-defined Context Menu items.
155
+ */
156
+ _classPrivateMethodInitSpec(this, _onAfterContextMenuDefaultOptions);
157
+ /**
158
+ * Adds the needed classes to the headers.
159
+ *
160
+ * @param {number} row Visual row index.
161
+ * @param {HTMLElement} TH Header's TH element.
162
+ */
163
+ _classPrivateMethodInitSpec(this, _onAfterGetRowHeader);
164
+ /**
165
+ * Modifies the copyable range, accordingly to the provided config.
166
+ *
167
+ * @param {Array} ranges An array of objects defining copyable cells.
168
+ * @returns {Array}
169
+ */
170
+ _classPrivateMethodInitSpec(this, _onModifyCopyableRange);
171
+ /**
172
+ * Sets the copy-related cell meta.
173
+ *
174
+ * @param {number} row Visual row index.
175
+ * @param {number} column Visual column index.
176
+ * @param {object} cellProperties Object containing the cell properties.
177
+ */
178
+ _classPrivateMethodInitSpec(this, _onAfterGetCellMeta);
139
179
  /**
140
180
  * Adds the additional row height for the hidden row indicators.
141
181
  *
@@ -143,21 +183,27 @@ export class HiddenRows extends BasePlugin {
143
183
  * @param {number} row Visual row index.
144
184
  * @returns {number}
145
185
  */
146
- _classPrivateMethodInitSpec(this, _HiddenRows_brand);
186
+ _classPrivateMethodInitSpec(this, _onModifyRowHeight);
147
187
  /**
148
188
  * Cached settings from Handsontable settings.
149
189
  *
150
190
  * @private
151
191
  * @type {object}
152
192
  */
153
- _classPrivateFieldInitSpec(this, _settings, {});
193
+ _classPrivateFieldInitSpec(this, _settings, {
194
+ writable: true,
195
+ value: {}
196
+ });
154
197
  /**
155
198
  * Map of hidden rows by the plugin.
156
199
  *
157
200
  * @private
158
201
  * @type {HidingMap|null}
159
202
  */
160
- _classPrivateFieldInitSpec(this, _hiddenRowsMap, null);
203
+ _classPrivateFieldInitSpec(this, _hiddenRowsMap, {
204
+ writable: true,
205
+ value: null
206
+ });
161
207
  }
162
208
  static get PLUGIN_KEY() {
163
209
  return PLUGIN_KEY;
@@ -185,29 +231,29 @@ export class HiddenRows extends BasePlugin {
185
231
  }
186
232
  const pluginSettings = this.hot.getSettings()[PLUGIN_KEY];
187
233
  if (isObject(pluginSettings)) {
188
- _classPrivateFieldSet(_settings, this, pluginSettings);
234
+ _classPrivateFieldSet(this, _settings, pluginSettings);
189
235
  if (isUndefined(pluginSettings.copyPasteEnabled)) {
190
236
  pluginSettings.copyPasteEnabled = true;
191
237
  }
192
238
  }
193
- _classPrivateFieldSet(_hiddenRowsMap, this, new HidingMap());
194
- _classPrivateFieldGet(_hiddenRowsMap, this).addLocalHook('init', () => _assertClassBrand(_HiddenRows_brand, this, _onMapInit).call(this));
195
- this.hot.rowIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(_hiddenRowsMap, this));
239
+ _classPrivateFieldSet(this, _hiddenRowsMap, new HidingMap());
240
+ _classPrivateFieldGet(this, _hiddenRowsMap).addLocalHook('init', () => _classPrivateMethodGet(this, _onMapInit, _onMapInit2).call(this));
241
+ this.hot.rowIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(this, _hiddenRowsMap));
196
242
  this.addHook('afterContextMenuDefaultOptions', function () {
197
243
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
198
244
  args[_key] = arguments[_key];
199
245
  }
200
- return _assertClassBrand(_HiddenRows_brand, _this, _onAfterContextMenuDefaultOptions).call(_this, ...args);
246
+ return _classPrivateMethodGet(_this, _onAfterContextMenuDefaultOptions, _onAfterContextMenuDefaultOptions2).call(_this, ...args);
201
247
  });
202
- this.addHook('afterGetCellMeta', (row, col, cellProperties) => _assertClassBrand(_HiddenRows_brand, this, _onAfterGetCellMeta).call(this, row, col, cellProperties));
203
- this.addHook('modifyRowHeight', (height, row) => _assertClassBrand(_HiddenRows_brand, this, _onModifyRowHeight).call(this, height, row));
248
+ this.addHook('afterGetCellMeta', (row, col, cellProperties) => _classPrivateMethodGet(this, _onAfterGetCellMeta, _onAfterGetCellMeta2).call(this, row, col, cellProperties));
249
+ this.addHook('modifyRowHeight', (height, row) => _classPrivateMethodGet(this, _onModifyRowHeight, _onModifyRowHeight2).call(this, height, row));
204
250
  this.addHook('afterGetRowHeader', function () {
205
251
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
206
252
  args[_key2] = arguments[_key2];
207
253
  }
208
- return _assertClassBrand(_HiddenRows_brand, _this, _onAfterGetRowHeader).call(_this, ...args);
254
+ return _classPrivateMethodGet(_this, _onAfterGetRowHeader, _onAfterGetRowHeader2).call(_this, ...args);
209
255
  });
210
- this.addHook('modifyCopyableRange', ranges => _assertClassBrand(_HiddenRows_brand, this, _onModifyCopyableRange).call(this, ranges));
256
+ this.addHook('modifyCopyableRange', ranges => _classPrivateMethodGet(this, _onModifyCopyableRange, _onModifyCopyableRange2).call(this, ranges));
211
257
  super.enablePlugin();
212
258
  }
213
259
 
@@ -228,7 +274,7 @@ export class HiddenRows extends BasePlugin {
228
274
  */
229
275
  disablePlugin() {
230
276
  this.hot.rowIndexMapper.unregisterMap(this.pluginName);
231
- _classPrivateFieldSet(_settings, this, {});
277
+ _classPrivateFieldSet(this, _settings, {});
232
278
  super.disablePlugin();
233
279
  this.resetCellsMeta();
234
280
  }
@@ -242,7 +288,7 @@ export class HiddenRows extends BasePlugin {
242
288
  const currentHideConfig = this.getHiddenRows();
243
289
  const isValidConfig = this.isValidConfig(rows);
244
290
  let destinationHideConfig = currentHideConfig;
245
- const hidingMapValues = _classPrivateFieldGet(_hiddenRowsMap, this).getValues().slice();
291
+ const hidingMapValues = _classPrivateFieldGet(this, _hiddenRowsMap).getValues().slice();
246
292
  const isAnyRowShowed = rows.length > 0;
247
293
  if (isValidConfig && isAnyRowShowed) {
248
294
  const physicalRows = rows.map(visualRow => this.hot.toPhysicalRow(visualRow));
@@ -265,7 +311,7 @@ export class HiddenRows extends BasePlugin {
265
311
  return;
266
312
  }
267
313
  if (isValidConfig && isAnyRowShowed) {
268
- _classPrivateFieldGet(_hiddenRowsMap, this).setValues(hidingMapValues);
314
+ _classPrivateFieldGet(this, _hiddenRowsMap).setValues(hidingMapValues);
269
315
  }
270
316
  this.hot.runHooks('afterUnhideRows', currentHideConfig, destinationHideConfig, isValidConfig && isAnyRowShowed, isValidConfig && destinationHideConfig.length < currentHideConfig.length);
271
317
  }
@@ -301,7 +347,7 @@ export class HiddenRows extends BasePlugin {
301
347
  if (isConfigValid) {
302
348
  this.hot.batchExecution(() => {
303
349
  arrayEach(rows, visualRow => {
304
- _classPrivateFieldGet(_hiddenRowsMap, this).setValueAtIndex(this.hot.toPhysicalRow(visualRow), true);
350
+ _classPrivateFieldGet(this, _hiddenRowsMap).setValueAtIndex(this.hot.toPhysicalRow(visualRow), true);
305
351
  });
306
352
  }, true);
307
353
  }
@@ -326,7 +372,7 @@ export class HiddenRows extends BasePlugin {
326
372
  * @returns {number[]}
327
373
  */
328
374
  getHiddenRows() {
329
- return arrayMap(_classPrivateFieldGet(_hiddenRowsMap, this).getHiddenIndexes(), physicalRowIndex => {
375
+ return arrayMap(_classPrivateFieldGet(this, _hiddenRowsMap).getHiddenIndexes(), physicalRowIndex => {
330
376
  return this.hot.toVisualRow(physicalRowIndex);
331
377
  });
332
378
  }
@@ -338,7 +384,7 @@ export class HiddenRows extends BasePlugin {
338
384
  * @returns {boolean}
339
385
  */
340
386
  isHidden(row) {
341
- return _classPrivateFieldGet(_hiddenRowsMap, this).getValueAtIndex(this.hot.toPhysicalRow(row)) || false;
387
+ return _classPrivateFieldGet(this, _hiddenRowsMap).getValueAtIndex(this.hot.toPhysicalRow(row)) || false;
342
388
  }
343
389
 
344
390
  /**
@@ -371,12 +417,12 @@ export class HiddenRows extends BasePlugin {
371
417
  * Destroys the plugin instance.
372
418
  */
373
419
  destroy() {
374
- _classPrivateFieldSet(_settings, this, null);
375
- _classPrivateFieldSet(_hiddenRowsMap, this, null);
420
+ _classPrivateFieldSet(this, _settings, null);
421
+ _classPrivateFieldSet(this, _hiddenRowsMap, null);
376
422
  super.destroy();
377
423
  }
378
424
  }
379
- function _onModifyRowHeight(height, row) {
425
+ function _onModifyRowHeight2(height, row) {
380
426
  // Hook is triggered internally only for the visible rows. Conditional will be handled for the API
381
427
  // calls of the `getRowHeight` function on not visible indexes.
382
428
  if (this.isHidden(row)) {
@@ -384,15 +430,8 @@ function _onModifyRowHeight(height, row) {
384
430
  }
385
431
  return height;
386
432
  }
387
- /**
388
- * Sets the copy-related cell meta.
389
- *
390
- * @param {number} row Visual row index.
391
- * @param {number} column Visual column index.
392
- * @param {object} cellProperties Object containing the cell properties.
393
- */
394
- function _onAfterGetCellMeta(row, column, cellProperties) {
395
- if (_classPrivateFieldGet(_settings, this).copyPasteEnabled === false && this.isHidden(row)) {
433
+ function _onAfterGetCellMeta2(row, column, cellProperties) {
434
+ if (_classPrivateFieldGet(this, _settings).copyPasteEnabled === false && this.isHidden(row)) {
396
435
  // Cell property handled by the `Autofill` and the `CopyPaste` plugins.
397
436
  cellProperties.skipRowOnPaste = true;
398
437
  }
@@ -412,15 +451,9 @@ function _onAfterGetCellMeta(row, column, cellProperties) {
412
451
  }
413
452
  }
414
453
  }
415
- /**
416
- * Modifies the copyable range, accordingly to the provided config.
417
- *
418
- * @param {Array} ranges An array of objects defining copyable cells.
419
- * @returns {Array}
420
- */
421
- function _onModifyCopyableRange(ranges) {
454
+ function _onModifyCopyableRange2(ranges) {
422
455
  // Ranges shouldn't be modified when `copyPasteEnabled` option is set to `true` (by default).
423
- if (_classPrivateFieldGet(_settings, this).copyPasteEnabled) {
456
+ if (_classPrivateFieldGet(this, _settings).copyPasteEnabled) {
424
457
  return ranges;
425
458
  }
426
459
  const newRanges = [];
@@ -454,14 +487,8 @@ function _onModifyCopyableRange(ranges) {
454
487
  });
455
488
  return newRanges;
456
489
  }
457
- /**
458
- * Adds the needed classes to the headers.
459
- *
460
- * @param {number} row Visual row index.
461
- * @param {HTMLElement} TH Header's TH element.
462
- */
463
- function _onAfterGetRowHeader(row, TH) {
464
- if (!_classPrivateFieldGet(_settings, this).indicators || row < 0) {
490
+ function _onAfterGetRowHeader2(row, TH) {
491
+ if (!_classPrivateFieldGet(this, _settings).indicators || row < 0) {
465
492
  return;
466
493
  }
467
494
  const classList = [];
@@ -473,21 +500,13 @@ function _onAfterGetRowHeader(row, TH) {
473
500
  }
474
501
  addClass(TH, classList);
475
502
  }
476
- /**
477
- * Add Show-hide rows to context menu.
478
- *
479
- * @param {object} options An array of objects containing information about the pre-defined Context Menu items.
480
- */
481
- function _onAfterContextMenuDefaultOptions(options) {
503
+ function _onAfterContextMenuDefaultOptions2(options) {
482
504
  options.items.push({
483
505
  name: SEPARATOR
484
506
  }, hideRowItem(this), showRowItem(this));
485
507
  }
486
- /**
487
- * On map initialized hook callback.
488
- */
489
- function _onMapInit() {
490
- if (Array.isArray(_classPrivateFieldGet(_settings, this).rows)) {
491
- this.hideRows(_classPrivateFieldGet(_settings, this).rows);
508
+ function _onMapInit2() {
509
+ if (Array.isArray(_classPrivateFieldGet(this, _settings).rows)) {
510
+ this.hideRows(_classPrivateFieldGet(this, _settings).rows);
492
511
  }
493
512
  }
@@ -11,9 +11,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
11
11
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
12
12
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
13
13
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
14
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
15
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
16
- 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"); }
14
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
15
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
16
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
17
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
18
+ 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; } }
19
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
17
20
  _pluginHooks.default.getSingleton().register('beforeColumnFreeze');
18
21
  _pluginHooks.default.getSingleton().register('afterColumnFreeze');
19
22
  _pluginHooks.default.getSingleton().register('beforeColumnUnfreeze');
@@ -38,23 +41,36 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 110;
38
41
  * ```
39
42
  */
40
43
  var _afterFirstUse = /*#__PURE__*/new WeakMap();
41
- var _ManualColumnFreeze_brand = /*#__PURE__*/new WeakSet();
44
+ var _addContextMenuEntry = /*#__PURE__*/new WeakSet();
45
+ var _onBeforeColumnMove = /*#__PURE__*/new WeakSet();
42
46
  class ManualColumnFreeze extends _base.BasePlugin {
43
47
  constructor() {
44
48
  super(...arguments);
49
+ /**
50
+ * Prevents moving the columns from/to fixed area.
51
+ *
52
+ * @private
53
+ * @param {Array} columns Array of visual column indexes to be moved.
54
+ * @param {number} finalIndex Visual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action.
55
+ * @returns {boolean|undefined}
56
+ */
57
+ _classPrivateMethodInitSpec(this, _onBeforeColumnMove);
45
58
  /**
46
59
  * Adds the manualColumnFreeze context menu entries.
47
60
  *
48
61
  * @private
49
62
  * @param {object} options Context menu options.
50
63
  */
51
- _classPrivateMethodInitSpec(this, _ManualColumnFreeze_brand);
64
+ _classPrivateMethodInitSpec(this, _addContextMenuEntry);
52
65
  /**
53
66
  * Determines when the moving operation is allowed.
54
67
  *
55
68
  * @type {boolean}
56
69
  */
57
- _classPrivateFieldInitSpec(this, _afterFirstUse, false);
70
+ _classPrivateFieldInitSpec(this, _afterFirstUse, {
71
+ writable: true,
72
+ value: false
73
+ });
58
74
  }
59
75
  static get PLUGIN_KEY() {
60
76
  return PLUGIN_KEY;
@@ -79,8 +95,8 @@ class ManualColumnFreeze extends _base.BasePlugin {
79
95
  if (this.enabled) {
80
96
  return;
81
97
  }
82
- this.addHook('afterContextMenuDefaultOptions', options => _assertClassBrand(_ManualColumnFreeze_brand, this, _addContextMenuEntry).call(this, options));
83
- this.addHook('beforeColumnMove', (columns, finalIndex) => _assertClassBrand(_ManualColumnFreeze_brand, this, _onBeforeColumnMove).call(this, columns, finalIndex));
98
+ this.addHook('afterContextMenuDefaultOptions', options => _classPrivateMethodGet(this, _addContextMenuEntry, _addContextMenuEntry2).call(this, options));
99
+ this.addHook('beforeColumnMove', (columns, finalIndex) => _classPrivateMethodGet(this, _onBeforeColumnMove, _onBeforeColumnMove2).call(this, columns, finalIndex));
84
100
  super.enablePlugin();
85
101
  }
86
102
 
@@ -88,7 +104,7 @@ class ManualColumnFreeze extends _base.BasePlugin {
88
104
  * Disables the plugin functionality for this Handsontable instance.
89
105
  */
90
106
  disablePlugin() {
91
- _classPrivateFieldSet(_afterFirstUse, this, false);
107
+ _classPrivateFieldSet(this, _afterFirstUse, false);
92
108
  super.disablePlugin();
93
109
  }
94
110
 
@@ -116,8 +132,8 @@ class ManualColumnFreeze extends _base.BasePlugin {
116
132
  const settings = this.hot.getSettings();
117
133
  // columns are already fixed (frozen)
118
134
  const freezePerformed = settings.fixedColumnsStart < this.hot.countCols() && column > settings.fixedColumnsStart - 1;
119
- if (!_classPrivateFieldGet(_afterFirstUse, this)) {
120
- _classPrivateFieldSet(_afterFirstUse, this, true);
135
+ if (!_classPrivateFieldGet(this, _afterFirstUse)) {
136
+ _classPrivateFieldSet(this, _afterFirstUse, true);
121
137
  }
122
138
  const beforeColumnFreezeHook = this.hot.runHooks('beforeColumnFreeze', column, freezePerformed);
123
139
  if (beforeColumnFreezeHook === false) {
@@ -144,8 +160,8 @@ class ManualColumnFreeze extends _base.BasePlugin {
144
160
  const settings = this.hot.getSettings();
145
161
  // columns are not fixed (not frozen)
146
162
  const unfreezePerformed = settings.fixedColumnsStart > 0 && column <= settings.fixedColumnsStart - 1;
147
- if (!_classPrivateFieldGet(_afterFirstUse, this)) {
148
- _classPrivateFieldSet(_afterFirstUse, this, true);
163
+ if (!_classPrivateFieldGet(this, _afterFirstUse)) {
164
+ _classPrivateFieldSet(this, _afterFirstUse, true);
149
165
  }
150
166
  const beforeColumnUnfreezeHook = this.hot.runHooks('beforeColumnUnfreeze', column, unfreezePerformed);
151
167
  if (beforeColumnUnfreezeHook === false) {
@@ -163,21 +179,13 @@ class ManualColumnFreeze extends _base.BasePlugin {
163
179
  }
164
180
  }
165
181
  exports.ManualColumnFreeze = ManualColumnFreeze;
166
- function _addContextMenuEntry(options) {
182
+ function _addContextMenuEntry2(options) {
167
183
  options.items.push({
168
184
  name: '---------'
169
185
  }, (0, _freezeColumn.default)(this), (0, _unfreezeColumn.default)(this));
170
186
  }
171
- /**
172
- * Prevents moving the columns from/to fixed area.
173
- *
174
- * @private
175
- * @param {Array} columns Array of visual column indexes to be moved.
176
- * @param {number} finalIndex Visual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action.
177
- * @returns {boolean|undefined}
178
- */
179
- function _onBeforeColumnMove(columns, finalIndex) {
180
- if (_classPrivateFieldGet(_afterFirstUse, this)) {
187
+ function _onBeforeColumnMove2(columns, finalIndex) {
188
+ if (_classPrivateFieldGet(this, _afterFirstUse)) {
181
189
  const freezeLine = this.hot.getSettings().fixedColumnsStart;
182
190
 
183
191
  // Moving any column before the "freeze line" isn't possible.
@@ -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 _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
7
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
8
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
9
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
10
+ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
11
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
9
12
  import { BasePlugin } from "../base/index.mjs";
10
13
  import Hooks from "../../pluginHooks.mjs";
11
14
  import freezeColumnItem from "./contextMenuItem/freezeColumn.mjs";
@@ -34,23 +37,36 @@ export const PLUGIN_PRIORITY = 110;
34
37
  * ```
35
38
  */
36
39
  var _afterFirstUse = /*#__PURE__*/new WeakMap();
37
- var _ManualColumnFreeze_brand = /*#__PURE__*/new WeakSet();
40
+ var _addContextMenuEntry = /*#__PURE__*/new WeakSet();
41
+ var _onBeforeColumnMove = /*#__PURE__*/new WeakSet();
38
42
  export class ManualColumnFreeze extends BasePlugin {
39
43
  constructor() {
40
44
  super(...arguments);
45
+ /**
46
+ * Prevents moving the columns from/to fixed area.
47
+ *
48
+ * @private
49
+ * @param {Array} columns Array of visual column indexes to be moved.
50
+ * @param {number} finalIndex Visual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action.
51
+ * @returns {boolean|undefined}
52
+ */
53
+ _classPrivateMethodInitSpec(this, _onBeforeColumnMove);
41
54
  /**
42
55
  * Adds the manualColumnFreeze context menu entries.
43
56
  *
44
57
  * @private
45
58
  * @param {object} options Context menu options.
46
59
  */
47
- _classPrivateMethodInitSpec(this, _ManualColumnFreeze_brand);
60
+ _classPrivateMethodInitSpec(this, _addContextMenuEntry);
48
61
  /**
49
62
  * Determines when the moving operation is allowed.
50
63
  *
51
64
  * @type {boolean}
52
65
  */
53
- _classPrivateFieldInitSpec(this, _afterFirstUse, false);
66
+ _classPrivateFieldInitSpec(this, _afterFirstUse, {
67
+ writable: true,
68
+ value: false
69
+ });
54
70
  }
55
71
  static get PLUGIN_KEY() {
56
72
  return PLUGIN_KEY;
@@ -75,8 +91,8 @@ export class ManualColumnFreeze extends BasePlugin {
75
91
  if (this.enabled) {
76
92
  return;
77
93
  }
78
- this.addHook('afterContextMenuDefaultOptions', options => _assertClassBrand(_ManualColumnFreeze_brand, this, _addContextMenuEntry).call(this, options));
79
- this.addHook('beforeColumnMove', (columns, finalIndex) => _assertClassBrand(_ManualColumnFreeze_brand, this, _onBeforeColumnMove).call(this, columns, finalIndex));
94
+ this.addHook('afterContextMenuDefaultOptions', options => _classPrivateMethodGet(this, _addContextMenuEntry, _addContextMenuEntry2).call(this, options));
95
+ this.addHook('beforeColumnMove', (columns, finalIndex) => _classPrivateMethodGet(this, _onBeforeColumnMove, _onBeforeColumnMove2).call(this, columns, finalIndex));
80
96
  super.enablePlugin();
81
97
  }
82
98
 
@@ -84,7 +100,7 @@ export class ManualColumnFreeze extends BasePlugin {
84
100
  * Disables the plugin functionality for this Handsontable instance.
85
101
  */
86
102
  disablePlugin() {
87
- _classPrivateFieldSet(_afterFirstUse, this, false);
103
+ _classPrivateFieldSet(this, _afterFirstUse, false);
88
104
  super.disablePlugin();
89
105
  }
90
106
 
@@ -112,8 +128,8 @@ export class ManualColumnFreeze extends BasePlugin {
112
128
  const settings = this.hot.getSettings();
113
129
  // columns are already fixed (frozen)
114
130
  const freezePerformed = settings.fixedColumnsStart < this.hot.countCols() && column > settings.fixedColumnsStart - 1;
115
- if (!_classPrivateFieldGet(_afterFirstUse, this)) {
116
- _classPrivateFieldSet(_afterFirstUse, this, true);
131
+ if (!_classPrivateFieldGet(this, _afterFirstUse)) {
132
+ _classPrivateFieldSet(this, _afterFirstUse, true);
117
133
  }
118
134
  const beforeColumnFreezeHook = this.hot.runHooks('beforeColumnFreeze', column, freezePerformed);
119
135
  if (beforeColumnFreezeHook === false) {
@@ -140,8 +156,8 @@ export class ManualColumnFreeze extends BasePlugin {
140
156
  const settings = this.hot.getSettings();
141
157
  // columns are not fixed (not frozen)
142
158
  const unfreezePerformed = settings.fixedColumnsStart > 0 && column <= settings.fixedColumnsStart - 1;
143
- if (!_classPrivateFieldGet(_afterFirstUse, this)) {
144
- _classPrivateFieldSet(_afterFirstUse, this, true);
159
+ if (!_classPrivateFieldGet(this, _afterFirstUse)) {
160
+ _classPrivateFieldSet(this, _afterFirstUse, true);
145
161
  }
146
162
  const beforeColumnUnfreezeHook = this.hot.runHooks('beforeColumnUnfreeze', column, unfreezePerformed);
147
163
  if (beforeColumnUnfreezeHook === false) {
@@ -158,21 +174,13 @@ export class ManualColumnFreeze extends BasePlugin {
158
174
  this.hot.runHooks('afterColumnUnfreeze', column, unfreezePerformed);
159
175
  }
160
176
  }
161
- function _addContextMenuEntry(options) {
177
+ function _addContextMenuEntry2(options) {
162
178
  options.items.push({
163
179
  name: '---------'
164
180
  }, freezeColumnItem(this), unfreezeColumnItem(this));
165
181
  }
166
- /**
167
- * Prevents moving the columns from/to fixed area.
168
- *
169
- * @private
170
- * @param {Array} columns Array of visual column indexes to be moved.
171
- * @param {number} finalIndex Visual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action.
172
- * @returns {boolean|undefined}
173
- */
174
- function _onBeforeColumnMove(columns, finalIndex) {
175
- if (_classPrivateFieldGet(_afterFirstUse, this)) {
182
+ function _onBeforeColumnMove2(columns, finalIndex) {
183
+ if (_classPrivateFieldGet(this, _afterFirstUse)) {
176
184
  const freezeLine = this.hot.getSettings().fixedColumnsStart;
177
185
 
178
186
  // Moving any column before the "freeze line" isn't possible.