handsontable 14.0.0-next-07c0a60-20231107 → 14.0.0-next-7ee54cb-20231108

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