handsontable 0.0.0-next-7026906-20231107 → 0.0.0-next-7b93b7d-20231107

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

Files changed (316) hide show
  1. package/3rdparty/SheetClip/SheetClip.js +2 -2
  2. package/3rdparty/SheetClip/SheetClip.mjs +2 -2
  3. package/3rdparty/autoResize/autoResize.js +2 -2
  4. package/3rdparty/autoResize/autoResize.mjs +2 -2
  5. package/3rdparty/walkontable/src/calculator/viewportColumns.js +108 -85
  6. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +108 -85
  7. package/3rdparty/walkontable/src/calculator/viewportRows.js +60 -52
  8. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +60 -52
  9. package/3rdparty/walkontable/src/core/clone.js +6 -0
  10. package/3rdparty/walkontable/src/core/clone.mjs +6 -0
  11. package/3rdparty/walkontable/src/event.js +125 -74
  12. package/3rdparty/walkontable/src/event.mjs +125 -74
  13. package/3rdparty/walkontable/src/filter/column.js +16 -0
  14. package/3rdparty/walkontable/src/filter/column.mjs +16 -0
  15. package/3rdparty/walkontable/src/filter/row.js +16 -0
  16. package/3rdparty/walkontable/src/filter/row.mjs +16 -0
  17. package/3rdparty/walkontable/src/overlay/bottom.js +1 -1
  18. package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
  19. package/3rdparty/walkontable/src/overlay/top.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
  21. package/3rdparty/walkontable/src/renderer/_base.js +12 -5
  22. package/3rdparty/walkontable/src/renderer/_base.mjs +12 -5
  23. package/3rdparty/walkontable/src/renderer/cells.js +6 -2
  24. package/3rdparty/walkontable/src/renderer/cells.mjs +6 -2
  25. package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -2
  26. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +6 -2
  27. package/3rdparty/walkontable/src/renderer/rows.js +5 -0
  28. package/3rdparty/walkontable/src/renderer/rows.mjs +5 -0
  29. package/3rdparty/walkontable/src/renderer/table.js +24 -17
  30. package/3rdparty/walkontable/src/renderer/table.mjs +24 -17
  31. package/3rdparty/walkontable/src/scroll.js +2 -2
  32. package/3rdparty/walkontable/src/scroll.mjs +2 -2
  33. package/3rdparty/walkontable/src/selection/border/border.js +1 -1
  34. package/3rdparty/walkontable/src/selection/border/border.mjs +1 -1
  35. package/3rdparty/walkontable/src/settings.js +10 -10
  36. package/3rdparty/walkontable/src/settings.mjs +10 -10
  37. package/3rdparty/walkontable/src/table.js +3 -3
  38. package/3rdparty/walkontable/src/table.mjs +3 -3
  39. package/3rdparty/walkontable/src/utils/column.js +19 -4
  40. package/3rdparty/walkontable/src/utils/column.mjs +19 -4
  41. package/3rdparty/walkontable/src/utils/nodesPool.js +5 -0
  42. package/3rdparty/walkontable/src/utils/nodesPool.mjs +5 -0
  43. package/3rdparty/walkontable/src/utils/orderView/view.js +13 -6
  44. package/3rdparty/walkontable/src/utils/orderView/view.mjs +13 -6
  45. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +9 -6
  46. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +9 -6
  47. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +7 -4
  48. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +7 -4
  49. package/3rdparty/walkontable/src/utils/row.js +14 -2
  50. package/3rdparty/walkontable/src/utils/row.mjs +14 -2
  51. package/3rdparty/walkontable/src/viewport.js +9 -9
  52. package/3rdparty/walkontable/src/viewport.mjs +9 -9
  53. package/base.js +2 -2
  54. package/base.mjs +2 -2
  55. package/core.js +25 -25
  56. package/core.mjs +25 -25
  57. package/dataMap/dataMap.js +99 -90
  58. package/dataMap/dataMap.mjs +99 -90
  59. package/dataMap/dataSource.js +14 -8
  60. package/dataMap/dataSource.mjs +14 -8
  61. package/dataMap/metaManager/lazyFactoryMap.js +19 -7
  62. package/dataMap/metaManager/lazyFactoryMap.mjs +19 -7
  63. package/dataMap/metaManager/metaLayers/cellMeta.js +8 -3
  64. package/dataMap/metaManager/metaLayers/cellMeta.mjs +8 -3
  65. package/dataMap/metaManager/metaLayers/columnMeta.js +7 -1
  66. package/dataMap/metaManager/metaLayers/columnMeta.mjs +7 -1
  67. package/dataMap/metaManager/metaLayers/globalMeta.js +6 -1
  68. package/dataMap/metaManager/metaLayers/globalMeta.mjs +6 -1
  69. package/dataMap/metaManager/metaLayers/tableMeta.js +6 -2
  70. package/dataMap/metaManager/metaLayers/tableMeta.mjs +6 -2
  71. package/dataMap/metaManager/metaSchema.js +55 -55
  72. package/dataMap/metaManager/metaSchema.mjs +55 -55
  73. package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -2
  74. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -2
  75. package/dataMap/metaManager/mods/extendMetaProperties.js +8 -4
  76. package/dataMap/metaManager/mods/extendMetaProperties.mjs +8 -4
  77. package/dataMap/metaManager/utils.js +2 -2
  78. package/dataMap/metaManager/utils.mjs +2 -2
  79. package/dist/handsontable.css +2 -2
  80. package/dist/handsontable.full.css +2 -2
  81. package/dist/handsontable.full.js +7244 -6347
  82. package/dist/handsontable.full.min.css +2 -2
  83. package/dist/handsontable.full.min.js +120 -120
  84. package/dist/handsontable.js +7243 -6346
  85. package/dist/handsontable.min.css +2 -2
  86. package/dist/handsontable.min.js +28 -28
  87. package/editorManager.js +105 -95
  88. package/editorManager.mjs +105 -95
  89. package/editors/autocompleteEditor/autocompleteEditor.js +47 -46
  90. package/editors/autocompleteEditor/autocompleteEditor.mjs +46 -45
  91. package/editors/baseEditor/baseEditor.js +23 -26
  92. package/editors/baseEditor/baseEditor.mjs +23 -26
  93. package/editors/dateEditor/dateEditor.js +24 -15
  94. package/editors/dateEditor/dateEditor.mjs +24 -15
  95. package/editors/dropdownEditor/dropdownEditor.js +1 -1
  96. package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
  97. package/editors/handsontableEditor/handsontableEditor.js +4 -4
  98. package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
  99. package/editors/textEditor/textEditor.js +23 -17
  100. package/editors/textEditor/textEditor.mjs +24 -18
  101. package/eventManager.js +8 -0
  102. package/eventManager.mjs +8 -0
  103. package/helpers/array.js +2 -2
  104. package/helpers/array.mjs +2 -2
  105. package/helpers/dom/element.js +7 -7
  106. package/helpers/dom/element.mjs +7 -7
  107. package/helpers/function.js +1 -1
  108. package/helpers/function.mjs +1 -1
  109. package/helpers/mixed.js +1 -1
  110. package/helpers/mixed.mjs +1 -1
  111. package/helpers/object.js +4 -4
  112. package/helpers/object.mjs +4 -4
  113. package/helpers/string.js +1 -1
  114. package/helpers/string.mjs +1 -1
  115. package/package.json +1 -1
  116. package/pluginHooks.d.ts +0 -2
  117. package/pluginHooks.js +12 -3
  118. package/pluginHooks.mjs +12 -3
  119. package/plugins/autoColumnSize/autoColumnSize.js +141 -130
  120. package/plugins/autoColumnSize/autoColumnSize.mjs +140 -129
  121. package/plugins/autoRowSize/autoRowSize.js +112 -125
  122. package/plugins/autoRowSize/autoRowSize.mjs +110 -123
  123. package/plugins/autofill/autofill.js +97 -102
  124. package/plugins/autofill/autofill.mjs +96 -101
  125. package/plugins/base/base.js +57 -22
  126. package/plugins/base/base.mjs +56 -22
  127. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +29 -24
  128. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +28 -23
  129. package/plugins/collapsibleColumns/collapsibleColumns.js +104 -107
  130. package/plugins/collapsibleColumns/collapsibleColumns.mjs +102 -104
  131. package/plugins/columnSorting/columnSorting.js +105 -98
  132. package/plugins/columnSorting/columnSorting.mjs +104 -97
  133. package/plugins/columnSorting/columnStatesManager.js +12 -6
  134. package/plugins/columnSorting/columnStatesManager.mjs +12 -6
  135. package/plugins/columnSummary/columnSummary.js +71 -58
  136. package/plugins/columnSummary/columnSummary.mjs +70 -57
  137. package/plugins/columnSummary/endpoints.js +20 -14
  138. package/plugins/columnSummary/endpoints.mjs +20 -14
  139. package/plugins/comments/commentEditor.js +30 -2
  140. package/plugins/comments/commentEditor.mjs +30 -2
  141. package/plugins/comments/comments.js +158 -169
  142. package/plugins/comments/comments.mjs +157 -168
  143. package/plugins/comments/displaySwitch.js +7 -3
  144. package/plugins/comments/displaySwitch.mjs +7 -3
  145. package/plugins/contextMenu/commandExecutor.js +15 -2
  146. package/plugins/contextMenu/commandExecutor.mjs +15 -2
  147. package/plugins/contextMenu/contextMenu.js +91 -101
  148. package/plugins/contextMenu/contextMenu.mjs +90 -100
  149. package/plugins/contextMenu/itemsFactory.js +19 -4
  150. package/plugins/contextMenu/itemsFactory.mjs +19 -4
  151. package/plugins/contextMenu/menu/cursor.js +36 -0
  152. package/plugins/contextMenu/menu/cursor.mjs +36 -0
  153. package/plugins/contextMenu/menu/menu.js +57 -5
  154. package/plugins/contextMenu/menu/menu.mjs +57 -5
  155. package/plugins/copyPaste/copyPaste.js +74 -75
  156. package/plugins/copyPaste/copyPaste.mjs +74 -75
  157. package/plugins/customBorders/customBorders.js +49 -48
  158. package/plugins/customBorders/customBorders.mjs +48 -47
  159. package/plugins/dragToScroll/dragToScroll.js +50 -54
  160. package/plugins/dragToScroll/dragToScroll.mjs +49 -52
  161. package/plugins/dropdownMenu/dropdownMenu.js +132 -129
  162. package/plugins/dropdownMenu/dropdownMenu.mjs +132 -129
  163. package/plugins/exportFile/dataProvider.js +7 -2
  164. package/plugins/exportFile/dataProvider.mjs +7 -2
  165. package/plugins/exportFile/exportFile.js +1 -1
  166. package/plugins/exportFile/exportFile.mjs +1 -1
  167. package/plugins/exportFile/types/_base.js +14 -6
  168. package/plugins/exportFile/types/_base.mjs +14 -6
  169. package/plugins/filters/component/actionBar.js +9 -0
  170. package/plugins/filters/component/actionBar.mjs +9 -0
  171. package/plugins/filters/component/condition.js +13 -0
  172. package/plugins/filters/component/condition.mjs +13 -0
  173. package/plugins/filters/component/operators.js +9 -0
  174. package/plugins/filters/component/operators.mjs +9 -0
  175. package/plugins/filters/component/value.js +9 -0
  176. package/plugins/filters/component/value.mjs +9 -0
  177. package/plugins/filters/conditionCollection.js +9 -4
  178. package/plugins/filters/conditionCollection.mjs +9 -4
  179. package/plugins/filters/conditionUpdateObserver.js +53 -42
  180. package/plugins/filters/conditionUpdateObserver.mjs +53 -42
  181. package/plugins/filters/dataFilter.js +9 -3
  182. package/plugins/filters/dataFilter.mjs +9 -3
  183. package/plugins/filters/filters.js +184 -189
  184. package/plugins/filters/filters.mjs +182 -187
  185. package/plugins/filters/ui/_base.js +1 -1
  186. package/plugins/filters/ui/_base.mjs +1 -1
  187. package/plugins/filters/utils.js +1 -1
  188. package/plugins/filters/utils.mjs +1 -1
  189. package/plugins/formulas/engine/settings.js +1 -1
  190. package/plugins/formulas/engine/settings.mjs +1 -1
  191. package/plugins/formulas/formulas.js +684 -602
  192. package/plugins/formulas/formulas.mjs +682 -600
  193. package/plugins/hiddenColumns/hiddenColumns.js +174 -169
  194. package/plugins/hiddenColumns/hiddenColumns.mjs +173 -168
  195. package/plugins/hiddenRows/hiddenRows.js +170 -165
  196. package/plugins/hiddenRows/hiddenRows.mjs +169 -164
  197. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
  198. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
  199. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
  200. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
  201. package/plugins/manualColumnFreeze/manualColumnFreeze.js +67 -54
  202. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +64 -51
  203. package/plugins/manualColumnMove/manualColumnMove.js +287 -232
  204. package/plugins/manualColumnMove/manualColumnMove.mjs +286 -231
  205. package/plugins/manualColumnMove/ui/_base.js +9 -3
  206. package/plugins/manualColumnMove/ui/_base.mjs +9 -3
  207. package/plugins/manualColumnResize/manualColumnResize.js +291 -246
  208. package/plugins/manualColumnResize/manualColumnResize.mjs +290 -244
  209. package/plugins/manualRowMove/manualRowMove.js +223 -208
  210. package/plugins/manualRowMove/manualRowMove.mjs +222 -207
  211. package/plugins/manualRowMove/ui/_base.js +10 -5
  212. package/plugins/manualRowMove/ui/_base.mjs +10 -5
  213. package/plugins/manualRowResize/manualRowResize.js +254 -209
  214. package/plugins/manualRowResize/manualRowResize.mjs +253 -207
  215. package/plugins/mergeCells/calculations/autofill.js +9 -3
  216. package/plugins/mergeCells/calculations/autofill.mjs +9 -3
  217. package/plugins/mergeCells/calculations/selection.js +10 -4
  218. package/plugins/mergeCells/calculations/selection.mjs +10 -4
  219. package/plugins/mergeCells/cellCoords.js +16 -6
  220. package/plugins/mergeCells/cellCoords.mjs +16 -6
  221. package/plugins/mergeCells/cellsCollection.js +10 -4
  222. package/plugins/mergeCells/cellsCollection.mjs +10 -4
  223. package/plugins/mergeCells/mergeCells.js +582 -502
  224. package/plugins/mergeCells/mergeCells.mjs +580 -500
  225. package/plugins/multiColumnSorting/multiColumnSorting.js +13 -10
  226. package/plugins/multiColumnSorting/multiColumnSorting.mjs +13 -10
  227. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +16 -28
  228. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +16 -27
  229. package/plugins/nestedHeaders/nestedHeaders.js +542 -499
  230. package/plugins/nestedHeaders/nestedHeaders.mjs +554 -511
  231. package/plugins/nestedHeaders/stateManager/index.js +1 -1
  232. package/plugins/nestedHeaders/stateManager/index.mjs +1 -1
  233. package/plugins/nestedRows/data/dataManager.js +21 -15
  234. package/plugins/nestedRows/data/dataManager.mjs +21 -15
  235. package/plugins/nestedRows/nestedRows.js +326 -278
  236. package/plugins/nestedRows/nestedRows.mjs +325 -277
  237. package/plugins/nestedRows/ui/_base.js +7 -1
  238. package/plugins/nestedRows/ui/_base.mjs +7 -1
  239. package/plugins/nestedRows/ui/collapsing.js +2 -2
  240. package/plugins/nestedRows/ui/collapsing.mjs +2 -2
  241. package/plugins/nestedRows/ui/contextMenu.js +28 -18
  242. package/plugins/nestedRows/ui/contextMenu.mjs +28 -18
  243. package/plugins/nestedRows/utils/rowMoveController.js +12 -4
  244. package/plugins/nestedRows/utils/rowMoveController.mjs +12 -4
  245. package/plugins/persistentState/persistentState.js +14 -11
  246. package/plugins/persistentState/persistentState.mjs +14 -11
  247. package/plugins/persistentState/storage.js +11 -6
  248. package/plugins/persistentState/storage.mjs +11 -6
  249. package/plugins/registry.js +2 -2
  250. package/plugins/registry.mjs +2 -2
  251. package/plugins/search/search.js +57 -46
  252. package/plugins/search/search.mjs +56 -45
  253. package/plugins/touchScroll/touchScroll.js +102 -100
  254. package/plugins/touchScroll/touchScroll.mjs +100 -98
  255. package/plugins/trimRows/trimRows.js +33 -28
  256. package/plugins/trimRows/trimRows.mjs +32 -27
  257. package/plugins/undoRedo/undoRedo.js +2 -2
  258. package/plugins/undoRedo/undoRedo.mjs +2 -2
  259. package/renderers/autocompleteRenderer/autocompleteRenderer.js +11 -11
  260. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +11 -11
  261. package/renderers/baseRenderer/baseRenderer.js +2 -2
  262. package/renderers/baseRenderer/baseRenderer.mjs +2 -2
  263. package/renderers/checkboxRenderer/checkboxRenderer.js +23 -23
  264. package/renderers/checkboxRenderer/checkboxRenderer.mjs +23 -23
  265. package/renderers/dateRenderer/dateRenderer.js +4 -4
  266. package/renderers/dateRenderer/dateRenderer.mjs +4 -4
  267. package/renderers/handsontableRenderer/handsontableRenderer.js +4 -4
  268. package/renderers/handsontableRenderer/handsontableRenderer.mjs +4 -4
  269. package/renderers/htmlRenderer/htmlRenderer.js +4 -4
  270. package/renderers/htmlRenderer/htmlRenderer.mjs +4 -4
  271. package/renderers/numericRenderer/numericRenderer.js +3 -3
  272. package/renderers/numericRenderer/numericRenderer.mjs +3 -3
  273. package/renderers/passwordRenderer/passwordRenderer.js +3 -3
  274. package/renderers/passwordRenderer/passwordRenderer.mjs +3 -3
  275. package/renderers/selectRenderer/selectRenderer.js +4 -4
  276. package/renderers/selectRenderer/selectRenderer.mjs +4 -4
  277. package/renderers/textRenderer/textRenderer.js +5 -5
  278. package/renderers/textRenderer/textRenderer.mjs +5 -5
  279. package/renderers/timeRenderer/timeRenderer.js +3 -3
  280. package/renderers/timeRenderer/timeRenderer.mjs +3 -3
  281. package/selection/range.js +12 -2
  282. package/selection/range.mjs +12 -2
  283. package/selection/selection.js +3 -3
  284. package/selection/selection.mjs +3 -3
  285. package/tableView.js +208 -200
  286. package/tableView.mjs +208 -200
  287. package/translations/changesObservable/utils.js +2 -2
  288. package/translations/changesObservable/utils.mjs +2 -2
  289. package/translations/indexMapper.js +25 -22
  290. package/translations/indexMapper.mjs +25 -22
  291. package/translations/mapCollections/aggregatedCollection.js +8 -2
  292. package/translations/mapCollections/aggregatedCollection.mjs +8 -2
  293. package/translations/mapCollections/mapCollection.js +5 -2
  294. package/translations/mapCollections/mapCollection.mjs +5 -2
  295. package/translations/maps/indexMap.js +6 -1
  296. package/translations/maps/indexMap.mjs +6 -1
  297. package/translations/maps/utils/physicallyIndexed.js +2 -2
  298. package/translations/maps/utils/physicallyIndexed.mjs +2 -2
  299. package/utils/dataStructures/linkedList.js +10 -6
  300. package/utils/dataStructures/linkedList.mjs +10 -6
  301. package/utils/dataStructures/queue.js +1 -1
  302. package/utils/dataStructures/queue.mjs +1 -1
  303. package/utils/dataStructures/stack.js +1 -1
  304. package/utils/dataStructures/stack.mjs +1 -1
  305. package/utils/ghostTable.js +2 -2
  306. package/utils/ghostTable.mjs +2 -2
  307. package/utils/interval.js +73 -36
  308. package/utils/interval.mjs +73 -36
  309. package/utils/parseTable.js +1 -1
  310. package/utils/parseTable.mjs +1 -1
  311. package/validators/autocompleteValidator/autocompleteValidator.js +1 -1
  312. package/validators/autocompleteValidator/autocompleteValidator.mjs +1 -1
  313. package/validators/dateValidator/dateValidator.js +1 -1
  314. package/validators/dateValidator/dateValidator.mjs +1 -1
  315. package/validators/numericValidator/numericValidator.js +1 -1
  316. package/validators/numericValidator/numericValidator.mjs +1 -1
@@ -1,20 +1,25 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.error.cause.js");
3
4
  exports.__esModule = true;
4
5
  require("core-js/modules/es.array.push.js");
5
- require("core-js/modules/es.error.cause.js");
6
6
  var _handsontableEditor = require("../handsontableEditor");
7
7
  var _array = require("../../helpers/array");
8
8
  var _element = require("../../helpers/dom/element");
9
9
  var _mixed = require("../../helpers/mixed");
10
10
  var _string = require("../../helpers/string");
11
11
  var _unicode = require("../../helpers/unicode");
12
+ var _browser = require("../../helpers/browser");
12
13
  var _textRenderer = require("../../renderers/textRenderer");
13
14
  var _a11y = require("../../helpers/a11y");
15
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
16
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
14
17
  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; }
15
18
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
19
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
- const privatePool = new WeakMap();
20
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
21
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
22
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
18
23
  const EDITOR_TYPE = 'autocomplete';
19
24
 
20
25
  /**
@@ -22,17 +27,37 @@ const EDITOR_TYPE = 'autocomplete';
22
27
  * @class AutocompleteEditor
23
28
  */
24
29
  exports.EDITOR_TYPE = EDITOR_TYPE;
30
+ var _idPrefix = /*#__PURE__*/new WeakMap();
25
31
  class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
26
- static get EDITOR_TYPE() {
27
- return EDITOR_TYPE;
28
- }
29
- constructor(instance) {
30
- super(instance);
32
+ constructor() {
33
+ super(...arguments);
31
34
  /**
32
35
  * Query string to turn available values over.
33
36
  *
34
37
  * @type {string}
35
38
  */
39
+ _defineProperty(this, "query", null);
40
+ /**
41
+ * Contains stripped choices.
42
+ *
43
+ * @type {string[]}
44
+ */
45
+ _defineProperty(this, "strippedChoices", []);
46
+ /**
47
+ * Contains raw choices.
48
+ *
49
+ * @type {Array}
50
+ */
51
+ _defineProperty(this, "rawChoices", []);
52
+ /**
53
+ * Holds the prefix of the editor's id.
54
+ *
55
+ * @type {string}
56
+ */
57
+ _classPrivateFieldInitSpec(this, _idPrefix, {
58
+ writable: true,
59
+ value: this.hot.guid.slice(0, 9)
60
+ });
36
61
  /**
37
62
  * Filters and sorts by relevance.
38
63
  *
@@ -99,26 +124,10 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
99
124
  }
100
125
  return result;
101
126
  });
102
- this.query = null;
103
- /**
104
- * Contains stripped choices.
105
- *
106
- * @type {string[]}
107
- */
108
- this.strippedChoices = [];
109
- /**
110
- * Contains raw choices.
111
- *
112
- * @type {Array}
113
- */
114
- this.rawChoices = [];
115
- privatePool.set(this, {
116
- skipOne: false,
117
- isMacOS: this.hot.rootWindow.navigator.platform.indexOf('Mac') > -1,
118
- idPrefix: instance.guid.slice(0, 9)
119
- });
120
127
  }
121
-
128
+ static get EDITOR_TYPE() {
129
+ return EDITOR_TYPE;
130
+ }
122
131
  /**
123
132
  * Gets current value from editable element.
124
133
  *
@@ -158,10 +167,9 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
158
167
  * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).
159
168
  */
160
169
  prepare(row, col, prop, td, value, cellProperties) {
161
- const priv = privatePool.get(this);
162
170
  super.prepare(row, col, prop, td, value, cellProperties);
163
171
  if (this.hot.getSettings().ariaTags) {
164
- (0, _element.setAttribute)(this.TEXTAREA, [(0, _a11y.A11Y_EXPANDED)('false'), (0, _a11y.A11Y_CONTROLS)(`${priv.idPrefix}-listbox-${row}-${col}`)]);
172
+ (0, _element.setAttribute)(this.TEXTAREA, [(0, _a11y.A11Y_EXPANDED)('false'), (0, _a11y.A11Y_CONTROLS)(`${_classPrivateFieldGet(this, _idPrefix)}-listbox-${row}-${col}`)]);
165
173
  }
166
174
  }
167
175
 
@@ -169,9 +177,8 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
169
177
  * Opens the editor and adjust its size and internal Handsontable's instance.
170
178
  */
171
179
  open() {
172
- const priv = privatePool.get(this);
173
180
  super.open();
174
- const trimDropdown = this.cellProperties.trimDropdown === void 0 ? true : this.cellProperties.trimDropdown;
181
+ const trimDropdown = this.cellProperties.trimDropdown === undefined ? true : this.cellProperties.trimDropdown;
175
182
  const rootInstanceAriaTagsEnabled = this.hot.getSettings().ariaTags;
176
183
  const sourceArray = Array.isArray(this.cellProperties.source) ? this.cellProperties.source : null;
177
184
  const sourceSize = sourceArray === null || sourceArray === void 0 ? void 0 : sourceArray.length;
@@ -182,17 +189,17 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
182
189
  this.showEditableElement();
183
190
  this.focus();
184
191
  let scrollbarWidth = (0, _element.getScrollbarWidth)();
185
- if (scrollbarWidth === 0 && priv.isMacOS) {
192
+ if (scrollbarWidth === 0 && (0, _browser.isMacOS)()) {
186
193
  scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling
187
194
  }
188
195
 
189
196
  this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
190
197
  this.htEditor.updateSettings({
191
- colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] : void 0,
192
- width: trimDropdown ? (0, _element.outerWidth)(this.TEXTAREA) + scrollbarWidth : void 0,
198
+ colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] : undefined,
199
+ width: trimDropdown ? (0, _element.outerWidth)(this.TEXTAREA) + scrollbarWidth : undefined,
193
200
  autoColumnSize: true,
194
- renderer: (instance, TD, row, col, prop, value, cellProperties) => {
195
- (0, _textRenderer.textRenderer)(instance, TD, row, col, prop, value, cellProperties);
201
+ renderer: (hotInstance, TD, row, col, prop, value, cellProperties) => {
202
+ (0, _textRenderer.textRenderer)(hotInstance, TD, row, col, prop, value, cellProperties);
196
203
  const {
197
204
  filteringCaseSensitive,
198
205
  allowHtml,
@@ -227,12 +234,9 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
227
234
  if (rootInstanceAriaTagsEnabled) {
228
235
  // Add `role=presentation` to the main table to prevent the readers from treating the option list as a table.
229
236
  (0, _element.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE, ...(0, _a11y.A11Y_PRESENTATION)());
230
- (0, _element.setAttribute)(this.htEditor.rootElement, [(0, _a11y.A11Y_LISTBOX)(), (0, _a11y.A11Y_LIVE)('polite'), (0, _a11y.A11Y_RELEVANT)('text'), ['id', `${priv.idPrefix}-listbox-${rowIndex}-${colIndex}`]]);
237
+ (0, _element.setAttribute)(this.htEditor.rootElement, [(0, _a11y.A11Y_LISTBOX)(), (0, _a11y.A11Y_LIVE)('polite'), (0, _a11y.A11Y_RELEVANT)('text'), ['id', `${_classPrivateFieldGet(this, _idPrefix)}-listbox-${rowIndex}-${colIndex}`]]);
231
238
  (0, _element.setAttribute)(this.TEXTAREA, ...(0, _a11y.A11Y_EXPANDED)('true'));
232
239
  }
233
- if (priv.skipOne) {
234
- priv.skipOne = false;
235
- }
236
240
  this.hot._registerTimeout(() => {
237
241
  this.queryChoices(this.TEXTAREA.value);
238
242
  });
@@ -332,7 +336,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
332
336
  }
333
337
  }
334
338
  this.hot.listen();
335
- (0, _element.setCaretPosition)(this.TEXTAREA, pos, pos === endPos ? void 0 : endPos);
339
+ (0, _element.setCaretPosition)(this.TEXTAREA, pos, pos === endPos ? undefined : endPos);
336
340
  }
337
341
 
338
342
  /**
@@ -415,7 +419,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
415
419
  const dropdownStyle = this.htEditor.rootElement.style;
416
420
  dropdownStyle.position = 'absolute';
417
421
  dropdownStyle.top = '';
418
- this.htEditor.flipped = void 0;
422
+ this.htEditor.flipped = undefined;
419
423
  }
420
424
 
421
425
  /**
@@ -428,7 +432,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
428
432
  const trimDropdown = this.cellProperties.trimDropdown;
429
433
  this.htEditor.updateSettings({
430
434
  height: this.getDropdownHeight(),
431
- width: trimDropdown ? void 0 : currentDropdownWidth
435
+ width: trimDropdown ? undefined : currentDropdownWidth
432
436
  });
433
437
  this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer();
434
438
  }
@@ -453,7 +457,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
453
457
  */
454
458
  highlightBestMatchingChoice(index) {
455
459
  if (typeof index === 'number') {
456
- this.htEditor.selectCell(index, 0, void 0, void 0, void 0, false);
460
+ this.htEditor.selectCell(index, 0, undefined, undefined, undefined, false);
457
461
  } else {
458
462
  this.htEditor.deselectCell();
459
463
  }
@@ -527,8 +531,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
527
531
  * @param {KeyboardEvent} event The keyboard event object.
528
532
  */
529
533
  onBeforeKeyDown(event) {
530
- const priv = privatePool.get(this);
531
- priv.skipOne = false;
532
534
  if ((0, _unicode.isPrintableChar)(event.keyCode) || event.keyCode === _unicode.KEY_CODES.BACKSPACE || event.keyCode === _unicode.KEY_CODES.DELETE || event.keyCode === _unicode.KEY_CODES.INSERT) {
533
535
  // for Windows 10 + FF86 there is need to add delay to make sure that the value taken from
534
536
  // the textarea is the freshest value. Otherwise the list of choices does not update correctly (see #7570).
@@ -546,7 +548,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
546
548
  if (this.htEditor) {
547
549
  this.hot._registerTimeout(() => {
548
550
  this.queryChoices(this.TEXTAREA.value);
549
- priv.skipOne = true;
550
551
  }, timeOffset);
551
552
  }
552
553
  }
@@ -1,34 +1,59 @@
1
1
  import "core-js/modules/es.array.push.js";
2
2
  import "core-js/modules/es.error.cause.js";
3
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
4
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
3
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; }
4
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
7
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
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 _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
6
11
  import { HandsontableEditor } from "../handsontableEditor/index.mjs";
7
12
  import { arrayMap, pivot } from "../../helpers/array.mjs";
8
13
  import { addClass, getCaretPosition, getScrollbarWidth, getSelectionEndPosition, getTrimmingContainer, offset, outerHeight, outerWidth, setAttribute, setCaretPosition } from "../../helpers/dom/element.mjs";
9
14
  import { isDefined, stringify } from "../../helpers/mixed.mjs";
10
15
  import { stripTags } from "../../helpers/string.mjs";
11
16
  import { KEY_CODES, isPrintableChar } from "../../helpers/unicode.mjs";
17
+ import { isMacOS } from "../../helpers/browser.mjs";
12
18
  import { textRenderer } from "../../renderers/textRenderer/index.mjs";
13
19
  import { A11Y_ACTIVEDESCENDANT, A11Y_AUTOCOMPLETE, A11Y_COMBOBOX, A11Y_CONTROLS, A11Y_EXPANDED, A11Y_HASPOPUP, A11Y_LISTBOX, A11Y_LIVE, A11Y_OPTION, A11Y_POSINSET, A11Y_PRESENTATION, A11Y_RELEVANT, A11Y_SELECTED, A11Y_SETSIZE, A11Y_TEXT } from "../../helpers/a11y.mjs";
14
- const privatePool = new WeakMap();
15
20
  export const EDITOR_TYPE = 'autocomplete';
16
21
 
17
22
  /**
18
23
  * @private
19
24
  * @class AutocompleteEditor
20
25
  */
26
+ var _idPrefix = /*#__PURE__*/new WeakMap();
21
27
  export class AutocompleteEditor extends HandsontableEditor {
22
- static get EDITOR_TYPE() {
23
- return EDITOR_TYPE;
24
- }
25
- constructor(instance) {
26
- super(instance);
28
+ constructor() {
29
+ super(...arguments);
27
30
  /**
28
31
  * Query string to turn available values over.
29
32
  *
30
33
  * @type {string}
31
34
  */
35
+ _defineProperty(this, "query", null);
36
+ /**
37
+ * Contains stripped choices.
38
+ *
39
+ * @type {string[]}
40
+ */
41
+ _defineProperty(this, "strippedChoices", []);
42
+ /**
43
+ * Contains raw choices.
44
+ *
45
+ * @type {Array}
46
+ */
47
+ _defineProperty(this, "rawChoices", []);
48
+ /**
49
+ * Holds the prefix of the editor's id.
50
+ *
51
+ * @type {string}
52
+ */
53
+ _classPrivateFieldInitSpec(this, _idPrefix, {
54
+ writable: true,
55
+ value: this.hot.guid.slice(0, 9)
56
+ });
32
57
  /**
33
58
  * Filters and sorts by relevance.
34
59
  *
@@ -95,26 +120,10 @@ export class AutocompleteEditor extends HandsontableEditor {
95
120
  }
96
121
  return result;
97
122
  });
98
- this.query = null;
99
- /**
100
- * Contains stripped choices.
101
- *
102
- * @type {string[]}
103
- */
104
- this.strippedChoices = [];
105
- /**
106
- * Contains raw choices.
107
- *
108
- * @type {Array}
109
- */
110
- this.rawChoices = [];
111
- privatePool.set(this, {
112
- skipOne: false,
113
- isMacOS: this.hot.rootWindow.navigator.platform.indexOf('Mac') > -1,
114
- idPrefix: instance.guid.slice(0, 9)
115
- });
116
123
  }
117
-
124
+ static get EDITOR_TYPE() {
125
+ return EDITOR_TYPE;
126
+ }
118
127
  /**
119
128
  * Gets current value from editable element.
120
129
  *
@@ -154,10 +163,9 @@ export class AutocompleteEditor extends HandsontableEditor {
154
163
  * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).
155
164
  */
156
165
  prepare(row, col, prop, td, value, cellProperties) {
157
- const priv = privatePool.get(this);
158
166
  super.prepare(row, col, prop, td, value, cellProperties);
159
167
  if (this.hot.getSettings().ariaTags) {
160
- setAttribute(this.TEXTAREA, [A11Y_EXPANDED('false'), A11Y_CONTROLS(`${priv.idPrefix}-listbox-${row}-${col}`)]);
168
+ setAttribute(this.TEXTAREA, [A11Y_EXPANDED('false'), A11Y_CONTROLS(`${_classPrivateFieldGet(this, _idPrefix)}-listbox-${row}-${col}`)]);
161
169
  }
162
170
  }
163
171
 
@@ -165,9 +173,8 @@ export class AutocompleteEditor extends HandsontableEditor {
165
173
  * Opens the editor and adjust its size and internal Handsontable's instance.
166
174
  */
167
175
  open() {
168
- const priv = privatePool.get(this);
169
176
  super.open();
170
- const trimDropdown = this.cellProperties.trimDropdown === void 0 ? true : this.cellProperties.trimDropdown;
177
+ const trimDropdown = this.cellProperties.trimDropdown === undefined ? true : this.cellProperties.trimDropdown;
171
178
  const rootInstanceAriaTagsEnabled = this.hot.getSettings().ariaTags;
172
179
  const sourceArray = Array.isArray(this.cellProperties.source) ? this.cellProperties.source : null;
173
180
  const sourceSize = sourceArray === null || sourceArray === void 0 ? void 0 : sourceArray.length;
@@ -178,17 +185,17 @@ export class AutocompleteEditor extends HandsontableEditor {
178
185
  this.showEditableElement();
179
186
  this.focus();
180
187
  let scrollbarWidth = getScrollbarWidth();
181
- if (scrollbarWidth === 0 && priv.isMacOS) {
188
+ if (scrollbarWidth === 0 && isMacOS()) {
182
189
  scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling
183
190
  }
184
191
 
185
192
  this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
186
193
  this.htEditor.updateSettings({
187
- colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] : void 0,
188
- width: trimDropdown ? outerWidth(this.TEXTAREA) + scrollbarWidth : void 0,
194
+ colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] : undefined,
195
+ width: trimDropdown ? outerWidth(this.TEXTAREA) + scrollbarWidth : undefined,
189
196
  autoColumnSize: true,
190
- renderer: (instance, TD, row, col, prop, value, cellProperties) => {
191
- textRenderer(instance, TD, row, col, prop, value, cellProperties);
197
+ renderer: (hotInstance, TD, row, col, prop, value, cellProperties) => {
198
+ textRenderer(hotInstance, TD, row, col, prop, value, cellProperties);
192
199
  const {
193
200
  filteringCaseSensitive,
194
201
  allowHtml,
@@ -223,12 +230,9 @@ export class AutocompleteEditor extends HandsontableEditor {
223
230
  if (rootInstanceAriaTagsEnabled) {
224
231
  // Add `role=presentation` to the main table to prevent the readers from treating the option list as a table.
225
232
  setAttribute(this.htEditor.view._wt.wtOverlays.wtTable.TABLE, ...A11Y_PRESENTATION());
226
- setAttribute(this.htEditor.rootElement, [A11Y_LISTBOX(), A11Y_LIVE('polite'), A11Y_RELEVANT('text'), ['id', `${priv.idPrefix}-listbox-${rowIndex}-${colIndex}`]]);
233
+ setAttribute(this.htEditor.rootElement, [A11Y_LISTBOX(), A11Y_LIVE('polite'), A11Y_RELEVANT('text'), ['id', `${_classPrivateFieldGet(this, _idPrefix)}-listbox-${rowIndex}-${colIndex}`]]);
227
234
  setAttribute(this.TEXTAREA, ...A11Y_EXPANDED('true'));
228
235
  }
229
- if (priv.skipOne) {
230
- priv.skipOne = false;
231
- }
232
236
  this.hot._registerTimeout(() => {
233
237
  this.queryChoices(this.TEXTAREA.value);
234
238
  });
@@ -328,7 +332,7 @@ export class AutocompleteEditor extends HandsontableEditor {
328
332
  }
329
333
  }
330
334
  this.hot.listen();
331
- setCaretPosition(this.TEXTAREA, pos, pos === endPos ? void 0 : endPos);
335
+ setCaretPosition(this.TEXTAREA, pos, pos === endPos ? undefined : endPos);
332
336
  }
333
337
 
334
338
  /**
@@ -411,7 +415,7 @@ export class AutocompleteEditor extends HandsontableEditor {
411
415
  const dropdownStyle = this.htEditor.rootElement.style;
412
416
  dropdownStyle.position = 'absolute';
413
417
  dropdownStyle.top = '';
414
- this.htEditor.flipped = void 0;
418
+ this.htEditor.flipped = undefined;
415
419
  }
416
420
 
417
421
  /**
@@ -424,7 +428,7 @@ export class AutocompleteEditor extends HandsontableEditor {
424
428
  const trimDropdown = this.cellProperties.trimDropdown;
425
429
  this.htEditor.updateSettings({
426
430
  height: this.getDropdownHeight(),
427
- width: trimDropdown ? void 0 : currentDropdownWidth
431
+ width: trimDropdown ? undefined : currentDropdownWidth
428
432
  });
429
433
  this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer();
430
434
  }
@@ -449,7 +453,7 @@ export class AutocompleteEditor extends HandsontableEditor {
449
453
  */
450
454
  highlightBestMatchingChoice(index) {
451
455
  if (typeof index === 'number') {
452
- this.htEditor.selectCell(index, 0, void 0, void 0, void 0, false);
456
+ this.htEditor.selectCell(index, 0, undefined, undefined, undefined, false);
453
457
  } else {
454
458
  this.htEditor.deselectCell();
455
459
  }
@@ -523,8 +527,6 @@ export class AutocompleteEditor extends HandsontableEditor {
523
527
  * @param {KeyboardEvent} event The keyboard event object.
524
528
  */
525
529
  onBeforeKeyDown(event) {
526
- const priv = privatePool.get(this);
527
- priv.skipOne = false;
528
530
  if (isPrintableChar(event.keyCode) || event.keyCode === KEY_CODES.BACKSPACE || event.keyCode === KEY_CODES.DELETE || event.keyCode === KEY_CODES.INSERT) {
529
531
  // for Windows 10 + FF86 there is need to add delay to make sure that the value taken from
530
532
  // the textarea is the freshest value. Otherwise the list of choices does not update correctly (see #7570).
@@ -542,7 +544,6 @@ export class AutocompleteEditor extends HandsontableEditor {
542
544
  if (this.htEditor) {
543
545
  this.hot._registerTimeout(() => {
544
546
  this.queryChoices(this.TEXTAREA.value);
545
- priv.skipOne = true;
546
547
  }, timeOffset);
547
548
  }
548
549
  }
@@ -8,6 +8,9 @@ var _editorManager = require("../../editorManager");
8
8
  var _hooksRefRegisterer = _interopRequireDefault(require("../../mixins/hooksRefRegisterer"));
9
9
  var _element = require("../../helpers/dom/element");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ 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; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
14
  const EDITOR_TYPE = 'base';
12
15
  exports.EDITOR_TYPE = EDITOR_TYPE;
13
16
  const EDITOR_STATE = Object.freeze({
@@ -31,29 +34,22 @@ class BaseEditor {
31
34
  }
32
35
 
33
36
  /**
34
- * @param {Handsontable} instance A reference to the source instance of the Handsontable.
37
+ * A reference to the source instance of the Handsontable.
38
+ *
39
+ * @type {Handsontable}
35
40
  */
36
- constructor(instance) {
37
- /**
38
- * A reference to the source instance of the Handsontable.
39
- *
40
- * @type {Handsontable}
41
- */
42
- this.hot = instance;
43
- /**
44
- * A reference to the source instance of the Handsontable.
45
- *
46
- * @deprecated
47
- *
48
- * @type {Handsontable}
49
- */
50
- this.instance = instance;
41
+
42
+ /**
43
+ * @param {Handsontable} hotInstance A reference to the source instance of the Handsontable.
44
+ */
45
+ constructor(hotInstance) {
46
+ _defineProperty(this, "hot", void 0);
51
47
  /**
52
48
  * Editor's state.
53
49
  *
54
50
  * @type {string}
55
51
  */
56
- this.state = EDITOR_STATE.VIRGIN;
52
+ _defineProperty(this, "state", EDITOR_STATE.VIRGIN);
57
53
  /**
58
54
  * Flag to store information about editor's opening status.
59
55
  *
@@ -61,7 +57,7 @@ class BaseEditor {
61
57
  *
62
58
  * @type {boolean}
63
59
  */
64
- this._opened = false;
60
+ _defineProperty(this, "_opened", false);
65
61
  /**
66
62
  * Defines the editor's editing mode. When false, then an editor works in fast editing mode.
67
63
  *
@@ -69,49 +65,50 @@ class BaseEditor {
69
65
  *
70
66
  * @type {boolean}
71
67
  */
72
- this._fullEditMode = false;
68
+ _defineProperty(this, "_fullEditMode", false);
73
69
  /**
74
70
  * Callback to call after closing editor.
75
71
  *
76
72
  * @type {Function}
77
73
  */
78
- this._closeCallback = null;
74
+ _defineProperty(this, "_closeCallback", null);
79
75
  /**
80
76
  * Currently rendered cell's TD element.
81
77
  *
82
78
  * @type {HTMLTableCellElement}
83
79
  */
84
- this.TD = null;
80
+ _defineProperty(this, "TD", null);
85
81
  /**
86
82
  * Visual row index.
87
83
  *
88
84
  * @type {number}
89
85
  */
90
- this.row = null;
86
+ _defineProperty(this, "row", null);
91
87
  /**
92
88
  * Visual column index.
93
89
  *
94
90
  * @type {number}
95
91
  */
96
- this.col = null;
92
+ _defineProperty(this, "col", null);
97
93
  /**
98
94
  * Column property name or a column index, if datasource is an array of arrays.
99
95
  *
100
96
  * @type {number|string}
101
97
  */
102
- this.prop = null;
98
+ _defineProperty(this, "prop", null);
103
99
  /**
104
100
  * Original cell's value.
105
101
  *
106
102
  * @type {*}
107
103
  */
108
- this.originalValue = null;
104
+ _defineProperty(this, "originalValue", null);
109
105
  /**
110
106
  * Object containing the cell's properties.
111
107
  *
112
108
  * @type {object}
113
109
  */
114
- this.cellProperties = null;
110
+ _defineProperty(this, "cellProperties", null);
111
+ this.hot = hotInstance;
115
112
  this.init();
116
113
  }
117
114
 
@@ -1,4 +1,7 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
+ 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; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2
5
  import { isDefined, stringify } from "../../helpers/mixed.mjs";
3
6
  import { mixin } from "../../helpers/object.mjs";
4
7
  import { SHORTCUTS_GROUP_NAVIGATION } from "../../editorManager.mjs";
@@ -24,29 +27,22 @@ export class BaseEditor {
24
27
  }
25
28
 
26
29
  /**
27
- * @param {Handsontable} instance A reference to the source instance of the Handsontable.
30
+ * A reference to the source instance of the Handsontable.
31
+ *
32
+ * @type {Handsontable}
28
33
  */
29
- constructor(instance) {
30
- /**
31
- * A reference to the source instance of the Handsontable.
32
- *
33
- * @type {Handsontable}
34
- */
35
- this.hot = instance;
36
- /**
37
- * A reference to the source instance of the Handsontable.
38
- *
39
- * @deprecated
40
- *
41
- * @type {Handsontable}
42
- */
43
- this.instance = instance;
34
+
35
+ /**
36
+ * @param {Handsontable} hotInstance A reference to the source instance of the Handsontable.
37
+ */
38
+ constructor(hotInstance) {
39
+ _defineProperty(this, "hot", void 0);
44
40
  /**
45
41
  * Editor's state.
46
42
  *
47
43
  * @type {string}
48
44
  */
49
- this.state = EDITOR_STATE.VIRGIN;
45
+ _defineProperty(this, "state", EDITOR_STATE.VIRGIN);
50
46
  /**
51
47
  * Flag to store information about editor's opening status.
52
48
  *
@@ -54,7 +50,7 @@ export class BaseEditor {
54
50
  *
55
51
  * @type {boolean}
56
52
  */
57
- this._opened = false;
53
+ _defineProperty(this, "_opened", false);
58
54
  /**
59
55
  * Defines the editor's editing mode. When false, then an editor works in fast editing mode.
60
56
  *
@@ -62,49 +58,50 @@ export class BaseEditor {
62
58
  *
63
59
  * @type {boolean}
64
60
  */
65
- this._fullEditMode = false;
61
+ _defineProperty(this, "_fullEditMode", false);
66
62
  /**
67
63
  * Callback to call after closing editor.
68
64
  *
69
65
  * @type {Function}
70
66
  */
71
- this._closeCallback = null;
67
+ _defineProperty(this, "_closeCallback", null);
72
68
  /**
73
69
  * Currently rendered cell's TD element.
74
70
  *
75
71
  * @type {HTMLTableCellElement}
76
72
  */
77
- this.TD = null;
73
+ _defineProperty(this, "TD", null);
78
74
  /**
79
75
  * Visual row index.
80
76
  *
81
77
  * @type {number}
82
78
  */
83
- this.row = null;
79
+ _defineProperty(this, "row", null);
84
80
  /**
85
81
  * Visual column index.
86
82
  *
87
83
  * @type {number}
88
84
  */
89
- this.col = null;
85
+ _defineProperty(this, "col", null);
90
86
  /**
91
87
  * Column property name or a column index, if datasource is an array of arrays.
92
88
  *
93
89
  * @type {number|string}
94
90
  */
95
- this.prop = null;
91
+ _defineProperty(this, "prop", null);
96
92
  /**
97
93
  * Original cell's value.
98
94
  *
99
95
  * @type {*}
100
96
  */
101
- this.originalValue = null;
97
+ _defineProperty(this, "originalValue", null);
102
98
  /**
103
99
  * Object containing the cell's properties.
104
100
  *
105
101
  * @type {object}
106
102
  */
107
- this.cellProperties = null;
103
+ _defineProperty(this, "cellProperties", null);
104
+ this.hot = hotInstance;
108
105
  this.init();
109
106
  }
110
107