handsontable 0.0.0-next-3d099da-20231208 → 0.0.0-next-16c18c1-20231212

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 (313) hide show
  1. package/3rdparty/walkontable/src/calculator/index.js +11 -6
  2. package/3rdparty/walkontable/src/calculator/index.mjs +5 -3
  3. package/3rdparty/walkontable/src/calculator/renderAllColumns.js +50 -0
  4. package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +46 -0
  5. package/3rdparty/walkontable/src/calculator/renderAllRows.js +50 -0
  6. package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +46 -0
  7. package/3rdparty/walkontable/src/calculator/viewportColumns.js +3 -124
  8. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +4 -126
  9. package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
  10. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +4 -5
  11. package/3rdparty/walkontable/src/cell/coords.js +2 -2
  12. package/3rdparty/walkontable/src/cell/coords.mjs +2 -2
  13. package/3rdparty/walkontable/src/cell/range.js +2 -2
  14. package/3rdparty/walkontable/src/cell/range.mjs +2 -2
  15. package/3rdparty/walkontable/src/core/_base.js +2 -14
  16. package/3rdparty/walkontable/src/core/_base.mjs +2 -14
  17. package/3rdparty/walkontable/src/core/clone.js +2 -2
  18. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  19. package/3rdparty/walkontable/src/core/core.js +0 -2
  20. package/3rdparty/walkontable/src/core/core.mjs +0 -2
  21. package/3rdparty/walkontable/src/facade/core.js +0 -9
  22. package/3rdparty/walkontable/src/facade/core.mjs +0 -9
  23. package/3rdparty/walkontable/src/filter/column.js +2 -2
  24. package/3rdparty/walkontable/src/filter/column.mjs +2 -2
  25. package/3rdparty/walkontable/src/filter/row.js +2 -2
  26. package/3rdparty/walkontable/src/filter/row.mjs +2 -2
  27. package/3rdparty/walkontable/src/index.js +3 -4
  28. package/3rdparty/walkontable/src/index.mjs +1 -2
  29. package/3rdparty/walkontable/src/overlay/_base.js +2 -2
  30. package/3rdparty/walkontable/src/overlay/_base.mjs +2 -2
  31. package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
  32. package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
  33. package/3rdparty/walkontable/src/overlay/top.js +2 -2
  34. package/3rdparty/walkontable/src/overlay/top.mjs +2 -2
  35. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +2 -2
  36. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +2 -2
  37. package/3rdparty/walkontable/src/overlays.js +2 -5
  38. package/3rdparty/walkontable/src/overlays.mjs +2 -6
  39. package/3rdparty/walkontable/src/renderer/_base.js +2 -2
  40. package/3rdparty/walkontable/src/renderer/_base.mjs +2 -2
  41. package/3rdparty/walkontable/src/renderer/cells.js +2 -2
  42. package/3rdparty/walkontable/src/renderer/cells.mjs +2 -2
  43. package/3rdparty/walkontable/src/renderer/colGroup.js +10 -0
  44. package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
  45. package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
  46. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +2 -2
  47. package/3rdparty/walkontable/src/renderer/rows.js +6 -5
  48. package/3rdparty/walkontable/src/renderer/rows.mjs +6 -5
  49. package/3rdparty/walkontable/src/renderer/table.js +2 -2
  50. package/3rdparty/walkontable/src/renderer/table.mjs +2 -2
  51. package/3rdparty/walkontable/src/scroll.js +2 -2
  52. package/3rdparty/walkontable/src/scroll.mjs +2 -2
  53. package/3rdparty/walkontable/src/selection/manager.js +0 -1
  54. package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
  55. package/3rdparty/walkontable/src/settings.js +5 -2
  56. package/3rdparty/walkontable/src/settings.mjs +4 -2
  57. package/3rdparty/walkontable/src/table.js +2 -3
  58. package/3rdparty/walkontable/src/table.mjs +2 -3
  59. package/3rdparty/walkontable/src/utils/column.js +29 -14
  60. package/3rdparty/walkontable/src/utils/column.mjs +29 -14
  61. package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
  62. package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
  63. package/3rdparty/walkontable/src/utils/nodesPool.js +2 -2
  64. package/3rdparty/walkontable/src/utils/nodesPool.mjs +2 -2
  65. package/3rdparty/walkontable/src/utils/orderView/view.js +2 -2
  66. package/3rdparty/walkontable/src/utils/orderView/view.mjs +2 -2
  67. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +2 -2
  68. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +2 -2
  69. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +2 -2
  70. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +2 -2
  71. package/3rdparty/walkontable/src/utils/row.js +2 -2
  72. package/3rdparty/walkontable/src/utils/row.mjs +2 -2
  73. package/3rdparty/walkontable/src/viewport.js +22 -17
  74. package/3rdparty/walkontable/src/viewport.mjs +23 -18
  75. package/base.js +4 -2
  76. package/base.mjs +2 -2
  77. package/core/focusCatcher/index.js +44 -6
  78. package/core/focusCatcher/index.mjs +44 -6
  79. package/core.js +0 -11
  80. package/core.mjs +0 -11
  81. package/dataMap/dataMap.js +3 -2
  82. package/dataMap/dataMap.mjs +2 -2
  83. package/dataMap/dataSource.js +2 -2
  84. package/dataMap/dataSource.mjs +2 -2
  85. package/dataMap/metaManager/lazyFactoryMap.js +2 -2
  86. package/dataMap/metaManager/lazyFactoryMap.mjs +2 -2
  87. package/dataMap/metaManager/metaLayers/cellMeta.js +2 -2
  88. package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -2
  89. package/dataMap/metaManager/metaLayers/columnMeta.js +2 -2
  90. package/dataMap/metaManager/metaLayers/columnMeta.mjs +2 -2
  91. package/dataMap/metaManager/metaLayers/globalMeta.js +2 -2
  92. package/dataMap/metaManager/metaLayers/globalMeta.mjs +2 -2
  93. package/dataMap/metaManager/metaLayers/tableMeta.js +2 -2
  94. package/dataMap/metaManager/metaLayers/tableMeta.mjs +2 -2
  95. package/dataMap/metaManager/metaSchema.js +28 -2
  96. package/dataMap/metaManager/metaSchema.mjs +28 -2
  97. package/dataMap/metaManager/mods/dynamicCellMeta.js +2 -2
  98. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +2 -2
  99. package/dataMap/metaManager/mods/extendMetaProperties.js +14 -2
  100. package/dataMap/metaManager/mods/extendMetaProperties.mjs +14 -2
  101. package/dist/handsontable.css +2 -2
  102. package/dist/handsontable.full.css +3 -3
  103. package/dist/handsontable.full.js +3991 -5589
  104. package/dist/handsontable.full.min.css +3 -3
  105. package/dist/handsontable.full.min.js +66 -71
  106. package/dist/handsontable.js +3070 -4317
  107. package/dist/handsontable.min.css +2 -2
  108. package/dist/handsontable.min.js +35 -39
  109. package/editorManager.js +5 -6
  110. package/editorManager.mjs +5 -6
  111. package/editors/autocompleteEditor/autocompleteEditor.js +2 -4
  112. package/editors/autocompleteEditor/autocompleteEditor.mjs +2 -4
  113. package/editors/baseEditor/baseEditor.js +2 -2
  114. package/editors/baseEditor/baseEditor.mjs +2 -2
  115. package/editors/dateEditor/dateEditor.d.ts +1 -1
  116. package/editors/dateEditor/dateEditor.js +6 -3
  117. package/editors/dateEditor/dateEditor.mjs +6 -3
  118. package/editors/handsontableEditor/handsontableEditor.js +0 -1
  119. package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
  120. package/editors/textEditor/textEditor.js +2 -6
  121. package/editors/textEditor/textEditor.mjs +2 -6
  122. package/eventManager.js +2 -2
  123. package/eventManager.mjs +2 -2
  124. package/helpers/browser.js +5 -2
  125. package/helpers/browser.mjs +5 -2
  126. package/helpers/feature.js +10 -0
  127. package/helpers/feature.mjs +9 -0
  128. package/helpers/mixed.js +1 -1
  129. package/helpers/mixed.mjs +1 -1
  130. package/package.json +3 -4
  131. package/pluginHooks.d.ts +6 -29
  132. package/pluginHooks.js +67 -125
  133. package/pluginHooks.mjs +64 -124
  134. package/plugins/autoColumnSize/autoColumnSize.js +2 -2
  135. package/plugins/autoColumnSize/autoColumnSize.mjs +2 -2
  136. package/plugins/autoRowSize/autoRowSize.js +2 -2
  137. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  138. package/plugins/autofill/autofill.js +2 -2
  139. package/plugins/autofill/autofill.mjs +2 -2
  140. package/plugins/base/base.js +2 -2
  141. package/plugins/base/base.mjs +2 -2
  142. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +2 -2
  143. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +2 -2
  144. package/plugins/collapsibleColumns/collapsibleColumns.js +2 -2
  145. package/plugins/collapsibleColumns/collapsibleColumns.mjs +2 -2
  146. package/plugins/columnSorting/columnSorting.js +2 -2
  147. package/plugins/columnSorting/columnSorting.mjs +2 -2
  148. package/plugins/columnSorting/columnStatesManager.js +2 -2
  149. package/plugins/columnSorting/columnStatesManager.mjs +2 -2
  150. package/plugins/columnSummary/columnSummary.js +2 -2
  151. package/plugins/columnSummary/columnSummary.mjs +2 -2
  152. package/plugins/columnSummary/endpoints.js +2 -2
  153. package/plugins/columnSummary/endpoints.mjs +2 -2
  154. package/plugins/comments/commentEditor.js +2 -2
  155. package/plugins/comments/commentEditor.mjs +2 -2
  156. package/plugins/comments/comments.js +2 -2
  157. package/plugins/comments/comments.mjs +2 -2
  158. package/plugins/comments/displaySwitch.js +2 -2
  159. package/plugins/comments/displaySwitch.mjs +2 -2
  160. package/plugins/contextMenu/commandExecutor.js +2 -2
  161. package/plugins/contextMenu/commandExecutor.mjs +2 -2
  162. package/plugins/contextMenu/contextMenu.js +2 -2
  163. package/plugins/contextMenu/contextMenu.mjs +2 -2
  164. package/plugins/contextMenu/itemsFactory.js +2 -2
  165. package/plugins/contextMenu/itemsFactory.mjs +2 -2
  166. package/plugins/contextMenu/menu/cursor.js +2 -2
  167. package/plugins/contextMenu/menu/cursor.mjs +2 -2
  168. package/plugins/contextMenu/menu/menu.js +2 -2
  169. package/plugins/contextMenu/menu/menu.mjs +2 -2
  170. package/plugins/copyPaste/clipboardData.js +18 -0
  171. package/plugins/copyPaste/clipboardData.mjs +14 -0
  172. package/plugins/copyPaste/copyPaste.js +131 -53
  173. package/plugins/copyPaste/copyPaste.mjs +134 -56
  174. package/plugins/copyPaste/copyableRanges.js +43 -7
  175. package/plugins/copyPaste/copyableRanges.mjs +42 -7
  176. package/plugins/copyPaste/pasteEvent.mjs +1 -1
  177. package/plugins/customBorders/customBorders.js +2 -7
  178. package/plugins/customBorders/customBorders.mjs +2 -7
  179. package/plugins/customBorders/utils.js +0 -1
  180. package/plugins/customBorders/utils.mjs +0 -1
  181. package/plugins/dragToScroll/dragToScroll.js +2 -2
  182. package/plugins/dragToScroll/dragToScroll.mjs +2 -2
  183. package/plugins/dropdownMenu/dropdownMenu.js +2 -2
  184. package/plugins/dropdownMenu/dropdownMenu.mjs +2 -2
  185. package/plugins/exportFile/dataProvider.js +2 -2
  186. package/plugins/exportFile/dataProvider.mjs +2 -2
  187. package/plugins/exportFile/types/_base.js +2 -2
  188. package/plugins/exportFile/types/_base.mjs +2 -2
  189. package/plugins/filters/component/_base.js +2 -2
  190. package/plugins/filters/component/_base.mjs +2 -2
  191. package/plugins/filters/component/actionBar.js +2 -2
  192. package/plugins/filters/component/actionBar.mjs +2 -2
  193. package/plugins/filters/component/condition.js +2 -2
  194. package/plugins/filters/component/condition.mjs +2 -2
  195. package/plugins/filters/component/operators.js +2 -2
  196. package/plugins/filters/component/operators.mjs +2 -2
  197. package/plugins/filters/component/value.js +2 -2
  198. package/plugins/filters/component/value.mjs +2 -2
  199. package/plugins/filters/conditionCollection.js +2 -2
  200. package/plugins/filters/conditionCollection.mjs +2 -2
  201. package/plugins/filters/conditionUpdateObserver.js +2 -2
  202. package/plugins/filters/conditionUpdateObserver.mjs +2 -2
  203. package/plugins/filters/dataFilter.js +2 -2
  204. package/plugins/filters/dataFilter.mjs +2 -2
  205. package/plugins/filters/filters.js +2 -2
  206. package/plugins/filters/filters.mjs +2 -2
  207. package/plugins/filters/ui/_base.js +2 -2
  208. package/plugins/filters/ui/_base.mjs +2 -2
  209. package/plugins/filters/ui/radioInput.js +1 -1
  210. package/plugins/filters/ui/radioInput.mjs +1 -1
  211. package/plugins/formulas/formulas.js +2 -4
  212. package/plugins/formulas/formulas.mjs +2 -4
  213. package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
  214. package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
  215. package/plugins/manualColumnMove/ui/_base.js +2 -2
  216. package/plugins/manualColumnMove/ui/_base.mjs +2 -2
  217. package/plugins/manualColumnResize/manualColumnResize.js +0 -1
  218. package/plugins/manualColumnResize/manualColumnResize.mjs +0 -1
  219. package/plugins/manualRowMove/ui/_base.js +2 -2
  220. package/plugins/manualRowMove/ui/_base.mjs +2 -2
  221. package/plugins/mergeCells/calculations/autofill.js +2 -2
  222. package/plugins/mergeCells/calculations/autofill.mjs +2 -2
  223. package/plugins/mergeCells/calculations/selection.js +2 -2
  224. package/plugins/mergeCells/calculations/selection.mjs +2 -2
  225. package/plugins/mergeCells/cellCoords.js +2 -2
  226. package/plugins/mergeCells/cellCoords.mjs +2 -2
  227. package/plugins/mergeCells/cellsCollection.js +2 -2
  228. package/plugins/mergeCells/cellsCollection.mjs +2 -2
  229. package/plugins/mergeCells/mergeCells.js +3 -129
  230. package/plugins/mergeCells/mergeCells.mjs +3 -129
  231. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -2
  232. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -2
  233. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +2 -2
  234. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +2 -2
  235. package/plugins/nestedHeaders/nestedHeaders.js +43 -89
  236. package/plugins/nestedHeaders/nestedHeaders.mjs +44 -90
  237. package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
  238. package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
  239. package/plugins/nestedHeaders/utils/ghostTable.js +2 -2
  240. package/plugins/nestedHeaders/utils/ghostTable.mjs +2 -2
  241. package/plugins/nestedRows/data/dataManager.js +2 -2
  242. package/plugins/nestedRows/data/dataManager.mjs +2 -2
  243. package/plugins/nestedRows/nestedRows.js +2 -2
  244. package/plugins/nestedRows/nestedRows.mjs +2 -2
  245. package/plugins/nestedRows/ui/_base.js +2 -2
  246. package/plugins/nestedRows/ui/_base.mjs +2 -2
  247. package/plugins/nestedRows/ui/contextMenu.js +2 -2
  248. package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
  249. package/plugins/nestedRows/utils/rowMoveController.js +2 -2
  250. package/plugins/nestedRows/utils/rowMoveController.mjs +2 -2
  251. package/plugins/persistentState/persistentState.js +2 -2
  252. package/plugins/persistentState/persistentState.mjs +2 -2
  253. package/plugins/persistentState/storage.js +2 -2
  254. package/plugins/persistentState/storage.mjs +2 -2
  255. package/plugins/search/search.js +2 -2
  256. package/plugins/search/search.mjs +2 -2
  257. package/plugins/touchScroll/touchScroll.js +2 -2
  258. package/plugins/touchScroll/touchScroll.mjs +2 -2
  259. package/plugins/trimRows/trimRows.js +2 -2
  260. package/plugins/trimRows/trimRows.mjs +2 -2
  261. package/plugins/undoRedo/undoRedo.js +0 -2
  262. package/plugins/undoRedo/undoRedo.mjs +0 -2
  263. package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -1
  264. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +0 -1
  265. package/renderers/checkboxRenderer/checkboxRenderer.js +0 -2
  266. package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -2
  267. package/selection/highlight/highlight.js +2 -3
  268. package/selection/highlight/highlight.mjs +2 -3
  269. package/selection/highlight/visualSelection.js +2 -2
  270. package/selection/highlight/visualSelection.mjs +2 -2
  271. package/selection/index.js +1 -3
  272. package/selection/index.mjs +2 -2
  273. package/selection/range.js +2 -2
  274. package/selection/range.mjs +2 -2
  275. package/selection/selection.js +2 -2
  276. package/selection/selection.mjs +2 -2
  277. package/selection/utils.js +0 -34
  278. package/selection/utils.mjs +0 -33
  279. package/settings.d.ts +2 -1
  280. package/tableView.js +3 -4
  281. package/tableView.mjs +3 -4
  282. package/translations/indexMapper.js +4 -3
  283. package/translations/indexMapper.mjs +2 -2
  284. package/translations/mapCollections/aggregatedCollection.js +2 -2
  285. package/translations/mapCollections/aggregatedCollection.mjs +2 -2
  286. package/translations/mapCollections/mapCollection.js +2 -2
  287. package/translations/mapCollections/mapCollection.mjs +2 -2
  288. package/translations/maps/indexMap.js +2 -2
  289. package/translations/maps/indexMap.mjs +2 -2
  290. package/translations/maps/linkedPhysicalIndexToValueMap.js +2 -2
  291. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +2 -2
  292. package/utils/dataStructures/linkedList.js +2 -2
  293. package/utils/dataStructures/linkedList.mjs +2 -2
  294. package/utils/dataStructures/tree.js +2 -2
  295. package/utils/dataStructures/tree.mjs +2 -2
  296. package/utils/ghostTable.js +2 -2
  297. package/utils/ghostTable.mjs +2 -2
  298. package/utils/interval.js +2 -2
  299. package/utils/interval.mjs +2 -2
  300. package/utils/parseTable.js +84 -538
  301. package/utils/parseTable.mjs +83 -534
  302. package/utils/samplesGenerator.js +2 -2
  303. package/utils/samplesGenerator.mjs +2 -2
  304. package/validators/timeValidator/timeValidator.js +0 -1
  305. package/validators/timeValidator/timeValidator.mjs +0 -1
  306. package/plugins/copyPaste/clipboardData/clipboardData.js +0 -588
  307. package/plugins/copyPaste/clipboardData/clipboardData.mjs +0 -584
  308. package/plugins/copyPaste/clipboardData/copyClipboardData.js +0 -69
  309. package/plugins/copyPaste/clipboardData/copyClipboardData.mjs +0 -65
  310. package/plugins/copyPaste/clipboardData/index.js +0 -9
  311. package/plugins/copyPaste/clipboardData/index.mjs +0 -4
  312. package/plugins/copyPaste/clipboardData/pasteClipboardData.js +0 -81
  313. package/plugins/copyPaste/clipboardData/pasteClipboardData.mjs +0 -77
package/editorManager.js CHANGED
@@ -11,8 +11,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
11
11
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
12
12
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
13
13
  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; }
14
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
15
- 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); }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
15
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
16
  function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
17
17
  const SHORTCUTS_GROUP_NAVIGATION = exports.SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
18
18
  var _onAfterDocumentKeyDown = /*#__PURE__*/new WeakSet();
@@ -149,6 +149,7 @@ class EditorManager {
149
149
  * Prepare text input to be displayed at given grid cell.
150
150
  */
151
151
  prepareEditor() {
152
+ var _this$hot$getSelected;
152
153
  if (this.lock) {
153
154
  return;
154
155
  }
@@ -160,10 +161,8 @@ class EditorManager {
160
161
  });
161
162
  return;
162
163
  }
163
- const {
164
- highlight
165
- } = this.hot.getSelectedRangeLast();
166
- if (highlight.isHeader()) {
164
+ const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
165
+ if (!highlight || highlight.isHeader()) {
167
166
  return;
168
167
  }
169
168
  const {
package/editorManager.mjs CHANGED
@@ -2,8 +2,8 @@ import "core-js/modules/es.error.cause.js";
2
2
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
3
3
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
4
4
  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; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
6
- 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); }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
8
8
  import { isFunctionKey, isCtrlMetaKey } from "./helpers/unicode.mjs";
9
9
  import { isImmediatePropagationStopped } from "./helpers/dom/event.mjs";
@@ -145,6 +145,7 @@ class EditorManager {
145
145
  * Prepare text input to be displayed at given grid cell.
146
146
  */
147
147
  prepareEditor() {
148
+ var _this$hot$getSelected;
148
149
  if (this.lock) {
149
150
  return;
150
151
  }
@@ -156,10 +157,8 @@ class EditorManager {
156
157
  });
157
158
  return;
158
159
  }
159
- const {
160
- highlight
161
- } = this.hot.getSelectedRangeLast();
162
- if (highlight.isHeader()) {
160
+ const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
161
+ if (!highlight || highlight.isHeader()) {
163
162
  return;
164
163
  }
165
164
  const {
@@ -15,8 +15,8 @@ var _a11y = require("../../helpers/a11y");
15
15
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
16
16
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
17
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; }
18
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
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); }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
19
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
20
  function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
21
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
22
  function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
@@ -191,7 +191,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
191
191
  if (scrollbarWidth === 0 && (0, _browser.isMacOS)()) {
192
192
  scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling
193
193
  }
194
-
195
194
  this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
196
195
  this.htEditor.updateSettings({
197
196
  colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] : undefined,
@@ -391,7 +390,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
391
390
  if (this.htEditor.flipped) {
392
391
  this.htEditor.rootElement.style.top = `${parseInt(this.htEditor.rootElement.style.top, 10) + dropdownHeight - height}px`; // eslint-disable-line max-len
393
392
  }
394
-
395
393
  this.setDropdownHeight(tempHeight - lastRowHeight);
396
394
  }
397
395
  }
@@ -3,8 +3,8 @@ import "core-js/modules/es.error.cause.js";
3
3
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
4
4
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
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); }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
8
  function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
9
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
10
  function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
@@ -188,7 +188,6 @@ export class AutocompleteEditor extends HandsontableEditor {
188
188
  if (scrollbarWidth === 0 && isMacOS()) {
189
189
  scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling
190
190
  }
191
-
192
191
  this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
193
192
  this.htEditor.updateSettings({
194
193
  colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] : undefined,
@@ -388,7 +387,6 @@ export class AutocompleteEditor extends HandsontableEditor {
388
387
  if (this.htEditor.flipped) {
389
388
  this.htEditor.rootElement.style.top = `${parseInt(this.htEditor.rootElement.style.top, 10) + dropdownHeight - height}px`; // eslint-disable-line max-len
390
389
  }
391
-
392
390
  this.setDropdownHeight(tempHeight - lastRowHeight);
393
391
  }
394
392
  }
@@ -9,8 +9,8 @@ var _hooksRefRegisterer = _interopRequireDefault(require("../../mixins/hooksRefR
9
9
  var _element = require("../../helpers/dom/element");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
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); }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
13
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
14
  const EDITOR_TYPE = exports.EDITOR_TYPE = 'base';
15
15
  const EDITOR_STATE = exports.EDITOR_STATE = Object.freeze({
16
16
  VIRGIN: 'STATE_VIRGIN',
@@ -1,7 +1,7 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
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); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import { isDefined, stringify } from "../../helpers/mixed.mjs";
6
6
  import { mixin } from "../../helpers/object.mjs";
7
7
  import { SHORTCUTS_GROUP_NAVIGATION } from "../../editorManager.mjs";
@@ -1,4 +1,4 @@
1
- import { PikadayOptions } from 'pikaday';
1
+ import { PikadayOptions } from '@handsontable/pikaday';
2
2
  import Core from '../../core';
3
3
  import { TextEditor } from '../textEditor';
4
4
 
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  require("core-js/modules/es.error.cause.js");
5
5
  var _moment = _interopRequireDefault(require("moment"));
6
- var _pikaday = _interopRequireDefault(require("pikaday"));
6
+ var _pikaday = _interopRequireDefault(require("@handsontable/pikaday"));
7
7
  var _textEditor = require("../textEditor");
8
8
  var _eventManager = _interopRequireDefault(require("../../eventManager"));
9
9
  var _element = require("../../helpers/dom/element");
@@ -11,8 +11,8 @@ var _object = require("../../helpers/object");
11
11
  var _unicode = require("../../helpers/unicode");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  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; }
14
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
15
- 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); }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
15
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
16
  const EDITOR_TYPE = exports.EDITOR_TYPE = 'date';
17
17
  const SHORTCUTS_GROUP_EDITOR = 'dateEditor';
18
18
 
@@ -195,6 +195,9 @@ class DateEditor extends _textEditor.TextEditor {
195
195
  let dateStr;
196
196
  this.datePicker.style.display = 'block';
197
197
  this.$datePicker = new _pikaday.default(this.getDatePickerConfig());
198
+ if (typeof this.$datePicker.useMoment === 'function') {
199
+ this.$datePicker.useMoment(_moment.default);
200
+ }
198
201
  this.$datePicker._onInputFocus = function () {};
199
202
  this.datePickerStyle.top = `${this.hot.rootWindow.pageYOffset + offset.top + (0, _element.outerHeight)(this.TD)}px`;
200
203
  let pickerLeftPosition = this.hot.rootWindow.pageXOffset;
@@ -1,9 +1,9 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
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); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import moment from 'moment';
6
- import Pikaday from 'pikaday';
6
+ import Pikaday from '@handsontable/pikaday';
7
7
  import { TextEditor } from "../textEditor/index.mjs";
8
8
  import EventManager from "../../eventManager.mjs";
9
9
  import { addClass, hasClass, outerHeight, outerWidth } from "../../helpers/dom/element.mjs";
@@ -191,6 +191,9 @@ export class DateEditor extends TextEditor {
191
191
  let dateStr;
192
192
  this.datePicker.style.display = 'block';
193
193
  this.$datePicker = new Pikaday(this.getDatePickerConfig());
194
+ if (typeof this.$datePicker.useMoment === 'function') {
195
+ this.$datePicker.useMoment(moment);
196
+ }
194
197
  this.$datePicker._onInputFocus = function () {};
195
198
  this.datePickerStyle.top = `${this.hot.rootWindow.pageYOffset + offset.top + outerHeight(this.TD)}px`;
196
199
  let pickerLeftPosition = this.hot.rootWindow.pageXOffset;
@@ -137,7 +137,6 @@ class HandsontableEditor extends _textEditor.TextEditor {
137
137
  // if focus is still in the HOT editor
138
138
  this.hot.listen(); // return the focus to the parent HOT instance
139
139
  }
140
-
141
140
  if (this.htEditor && this.htEditor.getSelectedLast()) {
142
141
  const value = this.htEditor.getValue();
143
142
  if (value !== undefined) {
@@ -134,7 +134,6 @@ export class HandsontableEditor extends TextEditor {
134
134
  // if focus is still in the HOT editor
135
135
  this.hot.listen(); // return the focus to the parent HOT instance
136
136
  }
137
-
138
137
  if (this.htEditor && this.htEditor.getSelectedLast()) {
139
138
  const value = this.htEditor.getValue();
140
139
  if (value !== undefined) {
@@ -15,8 +15,8 @@ var _caretPositioner = require("./caretPositioner");
15
15
  var _a11y = require("../../helpers/a11y");
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
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; }
18
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
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); }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
19
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
20
  const EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';
21
21
  const EDITOR_HIDDEN_CLASS_NAME = 'ht_editor_hidden';
22
22
  const SHORTCUTS_GROUP = 'textEditor';
@@ -128,7 +128,6 @@ class TextEditor extends _baseEditor.BaseEditor {
128
128
  if ((0, _element.isThisHotChild)(this.hot.rootDocument.activeElement, this.hot.rootElement)) {
129
129
  this.hot.listen(); // don't refocus the table if user focused some cell outside of HT on purpose
130
130
  }
131
-
132
131
  this.hideEditableElement();
133
132
  this.unregisterShortcuts();
134
133
  }
@@ -299,7 +298,6 @@ class TextEditor extends _baseEditor.BaseEditor {
299
298
  if (!force) {
300
299
  this.close(); // TODO shouldn't it be this.finishEditing() ?
301
300
  }
302
-
303
301
  return;
304
302
  }
305
303
  const {
@@ -402,7 +400,6 @@ class TextEditor extends _baseEditor.BaseEditor {
402
400
  insertNewLine();
403
401
  return false; // Will block closing editor.
404
402
  },
405
-
406
403
  runOnlyIf: event => !this.hot.selection.isMultiple() &&
407
404
  // We trigger a data population for multiple selection.
408
405
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
@@ -413,7 +410,6 @@ class TextEditor extends _baseEditor.BaseEditor {
413
410
  insertNewLine();
414
411
  return false; // Will block closing editor.
415
412
  },
416
-
417
413
  runOnlyIf: () => !this.hot.selection.isMultiple() // We trigger a data population for multiple selection.
418
414
  }, {
419
415
  keys: [['Alt', 'Enter']],
@@ -1,7 +1,7 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
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); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import { BaseEditor, EDITOR_STATE } from "../baseEditor/index.mjs";
6
6
  import EventManager from "../../eventManager.mjs";
7
7
  import { isEdge, isIOS } from "../../helpers/browser.mjs";
@@ -124,7 +124,6 @@ export class TextEditor extends BaseEditor {
124
124
  if (isThisHotChild(this.hot.rootDocument.activeElement, this.hot.rootElement)) {
125
125
  this.hot.listen(); // don't refocus the table if user focused some cell outside of HT on purpose
126
126
  }
127
-
128
127
  this.hideEditableElement();
129
128
  this.unregisterShortcuts();
130
129
  }
@@ -295,7 +294,6 @@ export class TextEditor extends BaseEditor {
295
294
  if (!force) {
296
295
  this.close(); // TODO shouldn't it be this.finishEditing() ?
297
296
  }
298
-
299
297
  return;
300
298
  }
301
299
  const {
@@ -398,7 +396,6 @@ export class TextEditor extends BaseEditor {
398
396
  insertNewLine();
399
397
  return false; // Will block closing editor.
400
398
  },
401
-
402
399
  runOnlyIf: event => !this.hot.selection.isMultiple() &&
403
400
  // We trigger a data population for multiple selection.
404
401
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
@@ -409,7 +406,6 @@ export class TextEditor extends BaseEditor {
409
406
  insertNewLine();
410
407
  return false; // Will block closing editor.
411
408
  },
412
-
413
409
  runOnlyIf: () => !this.hot.selection.isMultiple() // We trigger a data population for multiple selection.
414
410
  }, {
415
411
  keys: [['Alt', 'Enter']],
package/eventManager.js CHANGED
@@ -6,8 +6,8 @@ require("core-js/modules/es.array.push.js");
6
6
  require("core-js/modules/es.error.cause.js");
7
7
  var _event = require("./helpers/dom/event");
8
8
  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; }
9
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
10
- 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); }
9
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
10
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
11
  /**
12
12
  * Counter which tracks unregistered listeners (useful for detecting memory leaks).
13
13
  *
package/eventManager.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import "core-js/modules/es.array.push.js";
2
2
  import "core-js/modules/es.error.cause.js";
3
3
  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
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- 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); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  import { stopImmediatePropagation as _stopImmediatePropagation } from "./helpers/dom/event.mjs";
7
7
  /**
8
8
  * Counter which tracks unregistered listeners (useful for detecting memory leaks).
@@ -17,6 +17,7 @@ exports.isWindowsOS = isWindowsOS;
17
17
  exports.setBrowserMeta = setBrowserMeta;
18
18
  exports.setPlatformMeta = setPlatformMeta;
19
19
  var _object = require("./object");
20
+ var _feature = require("./feature");
20
21
  const tester = testerFunc => {
21
22
  const result = {
22
23
  value: false
@@ -76,8 +77,10 @@ function setPlatformMeta() {
76
77
  return void test(platform);
77
78
  });
78
79
  }
79
- setBrowserMeta();
80
- setPlatformMeta();
80
+ if ((0, _feature.isCSR)()) {
81
+ setBrowserMeta();
82
+ setPlatformMeta();
83
+ }
81
84
 
82
85
  /**
83
86
  * @returns {boolean}
@@ -1,4 +1,5 @@
1
1
  import { objectEach } from "./object.mjs";
2
+ import { isCSR } from "./feature.mjs";
2
3
  const tester = testerFunc => {
3
4
  const result = {
4
5
  value: false
@@ -58,8 +59,10 @@ export function setPlatformMeta() {
58
59
  return void test(platform);
59
60
  });
60
61
  }
61
- setBrowserMeta();
62
- setPlatformMeta();
62
+ if (isCSR()) {
63
+ setBrowserMeta();
64
+ setPlatformMeta();
65
+ }
63
66
 
64
67
  /**
65
68
  * @returns {boolean}
@@ -3,6 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.cancelAnimationFrame = cancelAnimationFrame;
5
5
  exports.getComparisonFunction = getComparisonFunction;
6
+ exports.isCSR = isCSR;
6
7
  exports.isTouchSupported = isTouchSupported;
7
8
  exports.requestAnimationFrame = requestAnimationFrame;
8
9
  /* eslint-disable no-restricted-globals */
@@ -31,6 +32,15 @@ function cancelAnimationFrame(id) {
31
32
  function isTouchSupported() {
32
33
  return 'ontouchstart' in window;
33
34
  }
35
+
36
+ /**
37
+ * Checks if the environment that the code runs in is a browser.
38
+ *
39
+ * @returns {boolean}
40
+ */
41
+ function isCSR() {
42
+ return typeof window !== 'undefined';
43
+ }
34
44
  let comparisonFunction;
35
45
 
36
46
  /**
@@ -24,6 +24,15 @@ export function cancelAnimationFrame(id) {
24
24
  export function isTouchSupported() {
25
25
  return 'ontouchstart' in window;
26
26
  }
27
+
28
+ /**
29
+ * Checks if the environment that the code runs in is a browser.
30
+ *
31
+ * @returns {boolean}
32
+ */
33
+ export function isCSR() {
34
+ return typeof window !== 'undefined';
35
+ }
27
36
  let comparisonFunction;
28
37
 
29
38
  /**
package/helpers/mixed.js CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
134
134
  function _injectProductInfo(key, element) {
135
135
  const hasValidType = !isEmpty(key);
136
136
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
137
- const hotVersion = "0.0.0-next-3d099da-20231208";
137
+ const hotVersion = "0.0.0-next-16c18c1-20231212";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
package/helpers/mixed.mjs CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
124
124
  export function _injectProductInfo(key, element) {
125
125
  const hasValidType = !isEmpty(key);
126
126
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
127
- const hotVersion = "0.0.0-next-3d099da-20231208";
127
+ const hotVersion = "0.0.0-next-16c18c1-20231212";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/handsontable/handsontable/issues"
11
11
  },
12
12
  "author": "Handsoncode <hello@handsontable.com>",
13
- "version": "0.0.0-next-3d099da-20231208",
13
+ "version": "0.0.0-next-16c18c1-20231212",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -32,12 +32,11 @@
32
32
  "data-spreadsheet"
33
33
  ],
34
34
  "dependencies": {
35
- "@types/pikaday": "1.7.4",
35
+ "@handsontable/pikaday": "^1.0.0",
36
36
  "core-js": "^3.31.1",
37
37
  "dompurify": "^2.1.1",
38
38
  "moment": "2.29.4",
39
- "numbro": "2.1.2",
40
- "pikaday": "1.8.2"
39
+ "numbro": "2.1.2"
41
40
  },
42
41
  "devDependencies": {
43
42
  "@babel/cli": "^7.8.3",
package/pluginHooks.d.ts CHANGED
@@ -48,35 +48,12 @@ interface HookHighlightRowHeaderMeta {
48
48
  rowCursor: number;
49
49
  selectionHeight: number;
50
50
  }
51
-
52
51
  interface HookHighlightColumnHeaderMeta {
53
52
  selectionType: string;
54
53
  columnCursor: number;
55
54
  selectionWidth: number;
56
55
  }
57
56
 
58
- interface ClipboardData {
59
- removeRows: (rows: number[]) => void;
60
- removeColumns: (columns: number[]) => void;
61
- insertAtRow: (rowIndex: number, values: any[]) => void;
62
- insertAtColumn: (columnIndex: number, values: any[]) => void;
63
- getCellAt: (row: number, col: number) => string;
64
- setCellAt: (row: number, column: number, value: any) => void;
65
- getData: () => any[][];
66
- getMetaInfo: () => GridSettings;
67
- setMetaInfo: (property: 'colHeaders' | 'nestedHeaders' | 'mergeCells' | 'data', value: any) => void;
68
- getType: () => 'handsontable' | 'table' | 'unrecognizable';
69
- }
70
-
71
- interface PasteClipboardData extends ClipboardData {
72
- getType: () => 'handsontable' | 'table' | 'unrecognizable';
73
- }
74
-
75
- interface CopyClipboardData extends ClipboardData {
76
- getRanges: () => RangeType[];
77
- getType: () => 'handsontable';
78
- }
79
-
80
57
  export interface Events {
81
58
  afterAddChild?: (parent: RowObject, element: RowObject | undefined, index: number | undefined) => void;
82
59
  afterAutofill?: (fillData: CellValue[][], sourceRange: CellRange, targetRange: CellRange, direction: 'up' | 'down' | 'left' | 'right') => void;
@@ -95,11 +72,11 @@ export interface Events {
95
72
  afterContextMenuDefaultOptions?: (predefinedItems: Array<ContextMenuPredefinedMenuItemKey | ContextMenuMenuItemConfig>) => void;
96
73
  afterContextMenuHide?: (context: ContextMenu) => void;
97
74
  afterContextMenuShow?: (context: ContextMenu) => void;
98
- afterCopy?: (clipboardData: CopyClipboardData) => void;
75
+ afterCopy?: (data: CellValue[][], coords: RangeType[], copiedHeadersCount: { columnHeadersCount: number }) => void;
99
76
  afterCopyLimit?: (selectedRows: number, selectedColumns: number, copyRowsLimit: number, copyColumnsLimit: number) => void;
100
77
  afterCreateCol?: (index: number, amount: number, source?: ChangeSource) => void;
101
78
  afterCreateRow?: (index: number, amount: number, source?: ChangeSource) => void;
102
- afterCut?: (clipboardData: CopyClipboardData) => void;
79
+ afterCut?: (data: CellValue[][], coords: RangeType[]) => void;
103
80
  afterDeselect?: () => void;
104
81
  afterDestroy?: () => void;
105
82
  afterDetachChild?: (parent: RowObject, element: RowObject) => void;
@@ -134,7 +111,7 @@ export interface Events {
134
111
  afterOnCellMouseOut?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
135
112
  afterOnCellMouseOver?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
136
113
  afterOnCellMouseUp?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
137
- afterPaste?: (clipboardData: PasteClipboardData) => void;
114
+ afterPaste?: (data: CellValue[][], coords: RangeType[]) => void;
138
115
  afterPluginsInitialized?: () => void;
139
116
  afterRedo?: (action: UndoRedoAction) => void;
140
117
  afterRedoStackChange?: (undoneActionsBefore: UndoRedoAction[], undoneActionsAfter: UndoRedoAction[]) => void;
@@ -193,10 +170,10 @@ export interface Events {
193
170
  beforeColumnUnfreeze?: (columnIndex: number, isUnfreezingPerformed: boolean) => void | boolean;
194
171
  beforeContextMenuSetItems?: (menuItems: ContextMenuMenuItemConfig[]) => void;
195
172
  beforeContextMenuShow?: (context: ContextMenu) => void;
196
- beforeCopy?: (clipboardData: CopyClipboardData) => void | boolean;
173
+ beforeCopy?: (data: CellValue[][], coords: RangeType[], copiedHeadersCount: { columnHeadersCount: number }) => void | boolean;
197
174
  beforeCreateCol?: (index: number, amount: number, source?: ChangeSource) => void | boolean;
198
175
  beforeCreateRow?: (index: number, amount: number, source?: ChangeSource) => void | boolean;
199
- beforeCut?: (clipboardData: CopyClipboardData) => void | boolean;
176
+ beforeCut?: (data: CellValue[][], coords: RangeType[]) => void | boolean;
200
177
  beforeDetachChild?: (parent: RowObject, element: RowObject) => void;
201
178
  beforeDrawBorders?: (corners: number[], borderClassName: 'current' | 'area' | 'highlight' | undefined) => void;
202
179
  beforeDropdownMenuSetItems?: (menuItems: ContextMenuMenuItemConfig[]) => void;
@@ -218,7 +195,7 @@ export interface Events {
218
195
  beforeOnCellMouseOut?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
219
196
  beforeOnCellMouseOver?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement, controller: SelectionController) => void;
220
197
  beforeOnCellMouseUp?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
221
- beforePaste?: (clipboardData: PasteClipboardData) => boolean | void;
198
+ beforePaste?: (data: CellValue[][], coords: RangeType[]) => void | boolean;
222
199
  beforeRedo?: (action: UndoRedoAction) => void;
223
200
  beforeRedoStackChange?: (undoneActions: UndoRedoAction[]) => void;
224
201
  beforeRefreshDimensions?: (previousDimensions: object, currentDimensions: object, actionPossible: boolean) => boolean | void;