handsontable 12.1.2 → 12.1.3

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 (93) hide show
  1. package/3rdparty/walkontable/src/border.js +43 -28
  2. package/3rdparty/walkontable/src/border.mjs +43 -28
  3. package/3rdparty/walkontable/src/table.js +13 -10
  4. package/3rdparty/walkontable/src/table.mjs +13 -10
  5. package/CHANGELOG.md +27 -4
  6. package/base.js +2 -2
  7. package/base.mjs +2 -2
  8. package/core.d.ts +1 -3
  9. package/core.js +9 -1
  10. package/core.mjs +9 -1
  11. package/dataMap/dataMap.js +35 -16
  12. package/dataMap/dataMap.mjs +30 -13
  13. package/dataMap/metaManager/lazyFactoryMap.js +24 -5
  14. package/dataMap/metaManager/lazyFactoryMap.mjs +19 -4
  15. package/dataMap/metaManager/metaSchema.js +112 -80
  16. package/dataMap/metaManager/metaSchema.mjs +112 -80
  17. package/dist/handsontable.css +2 -2
  18. package/dist/handsontable.full.css +2 -2
  19. package/dist/handsontable.full.js +40800 -57808
  20. package/dist/handsontable.full.min.css +2 -2
  21. package/dist/handsontable.full.min.js +527 -284
  22. package/dist/handsontable.js +3046 -3279
  23. package/dist/handsontable.min.css +2 -2
  24. package/dist/handsontable.min.js +3 -3
  25. package/editorManager.js +69 -35
  26. package/editorManager.mjs +69 -35
  27. package/editors/baseEditor/baseEditor.js +1 -1
  28. package/editors/baseEditor/baseEditor.mjs +1 -1
  29. package/editors/dateEditor/dateEditor.js +17 -2
  30. package/editors/dateEditor/dateEditor.mjs +16 -0
  31. package/editors/textEditor/caretPositioner.js +0 -4
  32. package/editors/textEditor/caretPositioner.mjs +0 -2
  33. package/helpers/dom/element.js +2 -4
  34. package/helpers/dom/element.mjs +1 -2
  35. package/helpers/mixed.js +2 -4
  36. package/helpers/mixed.mjs +2 -3
  37. package/helpers/object.js +0 -4
  38. package/helpers/object.mjs +0 -2
  39. package/helpers/unicode.js +0 -4
  40. package/helpers/unicode.mjs +0 -2
  41. package/package.json +1 -1
  42. package/pluginHooks.d.ts +0 -1
  43. package/pluginHooks.js +17 -14
  44. package/pluginHooks.mjs +17 -14
  45. package/plugins/base/base.js +2 -4
  46. package/plugins/base/base.mjs +1 -2
  47. package/plugins/columnSorting/sortService/engine.js +2 -6
  48. package/plugins/columnSorting/sortService/engine.mjs +2 -2
  49. package/plugins/columnSummary/columnSummary.js +17 -11
  50. package/plugins/columnSummary/columnSummary.mjs +15 -9
  51. package/plugins/columnSummary/utils.js +14 -0
  52. package/plugins/columnSummary/utils.mjs +9 -0
  53. package/plugins/contextMenu/commandExecutor.js +0 -4
  54. package/plugins/contextMenu/commandExecutor.mjs +0 -2
  55. package/plugins/contextMenu/contextMenu.js +5 -1
  56. package/plugins/contextMenu/contextMenu.mjs +5 -1
  57. package/plugins/contextMenu/menu.js +4 -0
  58. package/plugins/contextMenu/menu.mjs +4 -0
  59. package/plugins/copyPaste/copyPaste.js +2 -0
  60. package/plugins/copyPaste/copyPaste.mjs +2 -0
  61. package/plugins/dropdownMenu/dropdownMenu.js +4 -0
  62. package/plugins/dropdownMenu/dropdownMenu.mjs +4 -0
  63. package/plugins/filters/component/condition.js +11 -29
  64. package/plugins/filters/component/condition.mjs +6 -21
  65. package/plugins/filters/component/value.js +12 -5
  66. package/plugins/filters/component/value.mjs +12 -5
  67. package/plugins/filters/filters.d.ts +1 -1
  68. package/plugins/filters/filters.js +62 -82
  69. package/plugins/filters/filters.mjs +63 -83
  70. package/plugins/hiddenColumns/hiddenColumns.js +0 -4
  71. package/plugins/hiddenColumns/hiddenColumns.mjs +0 -2
  72. package/plugins/hiddenRows/hiddenRows.js +0 -4
  73. package/plugins/hiddenRows/hiddenRows.mjs +0 -2
  74. package/plugins/multiColumnSorting/domHelpers.js +2 -4
  75. package/plugins/multiColumnSorting/domHelpers.mjs +1 -2
  76. package/plugins/nestedRows/nestedRows.js +1 -1
  77. package/plugins/nestedRows/nestedRows.mjs +1 -1
  78. package/plugins/search/search.js +0 -2
  79. package/plugins/search/search.mjs +0 -1
  80. package/plugins/trimRows/trimRows.js +3 -3
  81. package/plugins/trimRows/trimRows.mjs +3 -3
  82. package/renderers/numericRenderer/numericRenderer.js +0 -2
  83. package/renderers/numericRenderer/numericRenderer.mjs +0 -1
  84. package/renderers/textRenderer/textRenderer.js +1 -1
  85. package/renderers/textRenderer/textRenderer.mjs +1 -1
  86. package/shortcuts/recorder.js +14 -10
  87. package/shortcuts/recorder.mjs +13 -10
  88. package/shortcuts/utils.js +0 -4
  89. package/shortcuts/utils.mjs +0 -2
  90. package/translations/indexMapper.js +2 -2
  91. package/translations/indexMapper.mjs +2 -2
  92. package/utils/sortingAlgorithms/mergeSort.js +0 -120
  93. package/utils/sortingAlgorithms/mergeSort.mjs +0 -110
package/editorManager.js CHANGED
@@ -147,7 +147,7 @@ var EditorManager = /*#__PURE__*/function () {
147
147
  }); // Open editor when text composition is started (IME editor)
148
148
 
149
149
  this.eventManager.addEventListener(this.instance.rootDocument.documentElement, 'compositionstart', function (event) {
150
- if (!_this.destroyed && _this.activeEditor && !_this.activeEditor.isOpened() && _this.instance.isListening()) {
150
+ if (!_this.destroyed && _this.instance.isListening()) {
151
151
  _this.openEditor('', event);
152
152
  }
153
153
  });
@@ -192,11 +192,7 @@ var EditorManager = /*#__PURE__*/function () {
192
192
  gridContext.addShortcuts([{
193
193
  keys: [['F2']],
194
194
  callback: function callback(event) {
195
- if (_this2.activeEditor) {
196
- _this2.activeEditor.enableFullEditMode();
197
- }
198
-
199
- _this2.openEditor(null, event);
195
+ _this2.openEditor(null, event, true);
200
196
  }
201
197
  }, {
202
198
  keys: [['Backspace'], ['Delete']],
@@ -211,10 +207,8 @@ var EditorManager = /*#__PURE__*/function () {
211
207
  if (_this2.instance.getSettings().enterBeginsEditing) {
212
208
  if (_this2.cellProperties.readOnly) {
213
209
  _this2.moveSelectionAfterEnter();
214
- } else if (_this2.activeEditor) {
215
- _this2.activeEditor.enableFullEditMode();
216
-
217
- _this2.openEditor(null, event);
210
+ } else {
211
+ _this2.openEditor(null, event, true);
218
212
  }
219
213
  } else {
220
214
  _this2.moveSelectionAfterEnter(keys.includes('shift'));
@@ -291,9 +285,9 @@ var EditorManager = /*#__PURE__*/function () {
291
285
  return;
292
286
  }
293
287
 
294
- var _this$instance$select = this.instance.selection.selectedRange.current().highlight,
295
- row = _this$instance$select.row,
296
- col = _this$instance$select.col;
288
+ var _this$instance$getSel = this.instance.getSelectedRangeLast().highlight,
289
+ row = _this$instance$getSel.row,
290
+ col = _this$instance$getSel.col;
297
291
  var modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);
298
292
  var visualRowToCheck = row;
299
293
  var visualColumnToCheck = col;
@@ -310,30 +304,28 @@ var EditorManager = /*#__PURE__*/function () {
310
304
  var activeElement = this.instance.rootDocument.activeElement;
311
305
 
312
306
  if (activeElement) {
313
- // Bluring the activeElement removes unwanted border around the focusable element
307
+ // Blurring the activeElement removes unwanted border around the focusable element
314
308
  // (and resets activeElement prop). Without blurring the activeElement points to the
315
309
  // previously focusable element after clicking onto the cell (#6877).
316
310
  activeElement.blur();
317
311
  }
318
312
 
319
- if (this.cellProperties.readOnly) {
313
+ if (!this.isCellEditable()) {
320
314
  this.clearActiveEditor();
321
315
  return;
322
316
  }
323
317
 
324
- var editorClass = this.instance.getCellEditor(this.cellProperties); // Getting element using coordinates from the selection.
318
+ var td = this.instance.getCell(row, col, true); // Skip the preparation when the cell is not rendered in the DOM. The cell is scrolled out of
319
+ // the table's viewport.
325
320
 
326
- var td = this.instance.getCell(row, col, true);
327
-
328
- if (editorClass && td) {
321
+ if (td) {
322
+ var editorClass = this.instance.getCellEditor(this.cellProperties);
329
323
  var prop = this.instance.colToProp(visualColumnToCheck);
330
324
  var originalValue = this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(visualRowToCheck), visualColumnToCheck);
331
325
  this.activeEditor = (0, _registry.getEditorInstance)(editorClass, this.instance); // Using not modified coordinates, as we need to get the table element using selection coordinates.
332
326
  // There is an extra translation in the editor for saving value.
333
327
 
334
328
  this.activeEditor.prepare(row, col, prop, td, originalValue, this.cellProperties);
335
- } else {
336
- this.clearActiveEditor();
337
329
  }
338
330
  }
339
331
  /**
@@ -352,16 +344,38 @@ var EditorManager = /*#__PURE__*/function () {
352
344
  *
353
345
  * @param {null|string} newInitialValue New value from which editor will start if handled property it's not the `null`.
354
346
  * @param {Event} event The event object.
347
+ * @param {boolean} [enableFullEditMode=false] When true, an editor works in full editing mode. Mode disallows closing an editor
348
+ * when arrow keys are pressed.
355
349
  */
356
350
 
357
351
  }, {
358
352
  key: "openEditor",
359
353
  value: function openEditor(newInitialValue, event) {
360
- if (!this.activeEditor) {
354
+ var enableFullEditMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
355
+
356
+ if (!this.isCellEditable()) {
357
+ this.clearActiveEditor();
361
358
  return;
362
359
  }
363
360
 
364
- this.activeEditor.beginEditing(newInitialValue, event);
361
+ if (!this.activeEditor) {
362
+ var _this$instance$getSel2 = this.instance.getSelectedRangeLast().highlight,
363
+ row = _this$instance$getSel2.row,
364
+ col = _this$instance$getSel2.col;
365
+ var renderableRowIndex = this.instance.rowIndexMapper.getRenderableFromVisualIndex(row);
366
+ var renderableColumnIndex = this.instance.columnIndexMapper.getRenderableFromVisualIndex(col);
367
+ this.instance.view.scrollViewport(this.instance._createCellCoords(renderableRowIndex, renderableColumnIndex));
368
+ this.instance.view.render();
369
+ this.prepareEditor();
370
+ }
371
+
372
+ if (this.activeEditor) {
373
+ if (enableFullEditMode) {
374
+ this.activeEditor.enableFullEditMode();
375
+ }
376
+
377
+ this.activeEditor.beginEditing(newInitialValue, event);
378
+ }
365
379
  }
366
380
  /**
367
381
  * Close editor, finish editing cell.
@@ -413,6 +427,35 @@ var EditorManager = /*#__PURE__*/function () {
413
427
  value: function clearActiveEditor() {
414
428
  this.activeEditor = void 0;
415
429
  }
430
+ /**
431
+ * Checks if the currently selected cell (pointed by selection highlight coords) is editable.
432
+ * Editable cell is when:
433
+ * - the cell has defined an editor type;
434
+ * - the cell is not marked as read-only;
435
+ * - the cell is not hidden.
436
+ *
437
+ * @private
438
+ * @returns {boolean}
439
+ */
440
+
441
+ }, {
442
+ key: "isCellEditable",
443
+ value: function isCellEditable() {
444
+ var editorClass = this.instance.getCellEditor(this.cellProperties);
445
+ var _this$instance$getSel3 = this.instance.getSelectedRangeLast().highlight,
446
+ row = _this$instance$getSel3.row,
447
+ col = _this$instance$getSel3.col;
448
+ var _this$instance = this.instance,
449
+ rowIndexMapper = _this$instance.rowIndexMapper,
450
+ columnIndexMapper = _this$instance.columnIndexMapper;
451
+ var isCellHidden = rowIndexMapper.isHidden(this.instance.toPhysicalRow(row)) || columnIndexMapper.isHidden(this.instance.toPhysicalColumn(col));
452
+
453
+ if (this.cellProperties.readOnly || !editorClass || isCellHidden) {
454
+ return false;
455
+ }
456
+
457
+ return true;
458
+ }
416
459
  /**
417
460
  * Controls selection's behaviour after clicking `Enter`.
418
461
  *
@@ -449,12 +492,7 @@ var EditorManager = /*#__PURE__*/function () {
449
492
  return;
450
493
  }
451
494
 
452
- var keyCode = event.keyCode; // keyCode 229 aka 'uninitialized' doesn't take into account with editors. This key code is produced when unfinished
453
- // character is entering (using IME editor). It is fired mainly on linux (ubuntu) with installed ibus-pinyin package.
454
-
455
- if (keyCode === 229) {
456
- return;
457
- }
495
+ var keyCode = event.keyCode;
458
496
 
459
497
  if (!this.selection.isSelected()) {
460
498
  return;
@@ -463,7 +501,7 @@ var EditorManager = /*#__PURE__*/function () {
463
501
 
464
502
  var isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
465
503
 
466
- if (this.activeEditor && !this.activeEditor.isWaiting()) {
504
+ if (!this.activeEditor || this.activeEditor && !this.activeEditor.isWaiting()) {
467
505
  if (!(0, _unicode.isFunctionKey)(keyCode) && !(0, _unicode.isCtrlMetaKey)(keyCode) && !isCtrlPressed && !this.isEditorOpened()) {
468
506
  var shortcutManager = this.instance.getShortcutManager();
469
507
  var editorContext = shortcutManager.getContext('editor');
@@ -512,11 +550,7 @@ var EditorManager = /*#__PURE__*/function () {
512
550
  value: function onCellDblClick(event, coords, elem) {
513
551
  // may be TD or TH
514
552
  if (elem.nodeName === 'TD') {
515
- if (this.activeEditor) {
516
- this.activeEditor.enableFullEditMode();
517
- }
518
-
519
- this.openEditor(null, event);
553
+ this.openEditor(null, event, true);
520
554
  }
521
555
  }
522
556
  /**
package/editorManager.mjs CHANGED
@@ -120,7 +120,7 @@ var EditorManager = /*#__PURE__*/function () {
120
120
  }); // Open editor when text composition is started (IME editor)
121
121
 
122
122
  this.eventManager.addEventListener(this.instance.rootDocument.documentElement, 'compositionstart', function (event) {
123
- if (!_this.destroyed && _this.activeEditor && !_this.activeEditor.isOpened() && _this.instance.isListening()) {
123
+ if (!_this.destroyed && _this.instance.isListening()) {
124
124
  _this.openEditor('', event);
125
125
  }
126
126
  });
@@ -165,11 +165,7 @@ var EditorManager = /*#__PURE__*/function () {
165
165
  gridContext.addShortcuts([{
166
166
  keys: [['F2']],
167
167
  callback: function callback(event) {
168
- if (_this2.activeEditor) {
169
- _this2.activeEditor.enableFullEditMode();
170
- }
171
-
172
- _this2.openEditor(null, event);
168
+ _this2.openEditor(null, event, true);
173
169
  }
174
170
  }, {
175
171
  keys: [['Backspace'], ['Delete']],
@@ -184,10 +180,8 @@ var EditorManager = /*#__PURE__*/function () {
184
180
  if (_this2.instance.getSettings().enterBeginsEditing) {
185
181
  if (_this2.cellProperties.readOnly) {
186
182
  _this2.moveSelectionAfterEnter();
187
- } else if (_this2.activeEditor) {
188
- _this2.activeEditor.enableFullEditMode();
189
-
190
- _this2.openEditor(null, event);
183
+ } else {
184
+ _this2.openEditor(null, event, true);
191
185
  }
192
186
  } else {
193
187
  _this2.moveSelectionAfterEnter(keys.includes('shift'));
@@ -264,9 +258,9 @@ var EditorManager = /*#__PURE__*/function () {
264
258
  return;
265
259
  }
266
260
 
267
- var _this$instance$select = this.instance.selection.selectedRange.current().highlight,
268
- row = _this$instance$select.row,
269
- col = _this$instance$select.col;
261
+ var _this$instance$getSel = this.instance.getSelectedRangeLast().highlight,
262
+ row = _this$instance$getSel.row,
263
+ col = _this$instance$getSel.col;
270
264
  var modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);
271
265
  var visualRowToCheck = row;
272
266
  var visualColumnToCheck = col;
@@ -283,30 +277,28 @@ var EditorManager = /*#__PURE__*/function () {
283
277
  var activeElement = this.instance.rootDocument.activeElement;
284
278
 
285
279
  if (activeElement) {
286
- // Bluring the activeElement removes unwanted border around the focusable element
280
+ // Blurring the activeElement removes unwanted border around the focusable element
287
281
  // (and resets activeElement prop). Without blurring the activeElement points to the
288
282
  // previously focusable element after clicking onto the cell (#6877).
289
283
  activeElement.blur();
290
284
  }
291
285
 
292
- if (this.cellProperties.readOnly) {
286
+ if (!this.isCellEditable()) {
293
287
  this.clearActiveEditor();
294
288
  return;
295
289
  }
296
290
 
297
- var editorClass = this.instance.getCellEditor(this.cellProperties); // Getting element using coordinates from the selection.
291
+ var td = this.instance.getCell(row, col, true); // Skip the preparation when the cell is not rendered in the DOM. The cell is scrolled out of
292
+ // the table's viewport.
298
293
 
299
- var td = this.instance.getCell(row, col, true);
300
-
301
- if (editorClass && td) {
294
+ if (td) {
295
+ var editorClass = this.instance.getCellEditor(this.cellProperties);
302
296
  var prop = this.instance.colToProp(visualColumnToCheck);
303
297
  var originalValue = this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(visualRowToCheck), visualColumnToCheck);
304
298
  this.activeEditor = getEditorInstance(editorClass, this.instance); // Using not modified coordinates, as we need to get the table element using selection coordinates.
305
299
  // There is an extra translation in the editor for saving value.
306
300
 
307
301
  this.activeEditor.prepare(row, col, prop, td, originalValue, this.cellProperties);
308
- } else {
309
- this.clearActiveEditor();
310
302
  }
311
303
  }
312
304
  /**
@@ -325,16 +317,38 @@ var EditorManager = /*#__PURE__*/function () {
325
317
  *
326
318
  * @param {null|string} newInitialValue New value from which editor will start if handled property it's not the `null`.
327
319
  * @param {Event} event The event object.
320
+ * @param {boolean} [enableFullEditMode=false] When true, an editor works in full editing mode. Mode disallows closing an editor
321
+ * when arrow keys are pressed.
328
322
  */
329
323
 
330
324
  }, {
331
325
  key: "openEditor",
332
326
  value: function openEditor(newInitialValue, event) {
333
- if (!this.activeEditor) {
327
+ var enableFullEditMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
328
+
329
+ if (!this.isCellEditable()) {
330
+ this.clearActiveEditor();
334
331
  return;
335
332
  }
336
333
 
337
- this.activeEditor.beginEditing(newInitialValue, event);
334
+ if (!this.activeEditor) {
335
+ var _this$instance$getSel2 = this.instance.getSelectedRangeLast().highlight,
336
+ row = _this$instance$getSel2.row,
337
+ col = _this$instance$getSel2.col;
338
+ var renderableRowIndex = this.instance.rowIndexMapper.getRenderableFromVisualIndex(row);
339
+ var renderableColumnIndex = this.instance.columnIndexMapper.getRenderableFromVisualIndex(col);
340
+ this.instance.view.scrollViewport(this.instance._createCellCoords(renderableRowIndex, renderableColumnIndex));
341
+ this.instance.view.render();
342
+ this.prepareEditor();
343
+ }
344
+
345
+ if (this.activeEditor) {
346
+ if (enableFullEditMode) {
347
+ this.activeEditor.enableFullEditMode();
348
+ }
349
+
350
+ this.activeEditor.beginEditing(newInitialValue, event);
351
+ }
338
352
  }
339
353
  /**
340
354
  * Close editor, finish editing cell.
@@ -386,6 +400,35 @@ var EditorManager = /*#__PURE__*/function () {
386
400
  value: function clearActiveEditor() {
387
401
  this.activeEditor = void 0;
388
402
  }
403
+ /**
404
+ * Checks if the currently selected cell (pointed by selection highlight coords) is editable.
405
+ * Editable cell is when:
406
+ * - the cell has defined an editor type;
407
+ * - the cell is not marked as read-only;
408
+ * - the cell is not hidden.
409
+ *
410
+ * @private
411
+ * @returns {boolean}
412
+ */
413
+
414
+ }, {
415
+ key: "isCellEditable",
416
+ value: function isCellEditable() {
417
+ var editorClass = this.instance.getCellEditor(this.cellProperties);
418
+ var _this$instance$getSel3 = this.instance.getSelectedRangeLast().highlight,
419
+ row = _this$instance$getSel3.row,
420
+ col = _this$instance$getSel3.col;
421
+ var _this$instance = this.instance,
422
+ rowIndexMapper = _this$instance.rowIndexMapper,
423
+ columnIndexMapper = _this$instance.columnIndexMapper;
424
+ var isCellHidden = rowIndexMapper.isHidden(this.instance.toPhysicalRow(row)) || columnIndexMapper.isHidden(this.instance.toPhysicalColumn(col));
425
+
426
+ if (this.cellProperties.readOnly || !editorClass || isCellHidden) {
427
+ return false;
428
+ }
429
+
430
+ return true;
431
+ }
389
432
  /**
390
433
  * Controls selection's behaviour after clicking `Enter`.
391
434
  *
@@ -422,12 +465,7 @@ var EditorManager = /*#__PURE__*/function () {
422
465
  return;
423
466
  }
424
467
 
425
- var keyCode = event.keyCode; // keyCode 229 aka 'uninitialized' doesn't take into account with editors. This key code is produced when unfinished
426
- // character is entering (using IME editor). It is fired mainly on linux (ubuntu) with installed ibus-pinyin package.
427
-
428
- if (keyCode === 229) {
429
- return;
430
- }
468
+ var keyCode = event.keyCode;
431
469
 
432
470
  if (!this.selection.isSelected()) {
433
471
  return;
@@ -436,7 +474,7 @@ var EditorManager = /*#__PURE__*/function () {
436
474
 
437
475
  var isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
438
476
 
439
- if (this.activeEditor && !this.activeEditor.isWaiting()) {
477
+ if (!this.activeEditor || this.activeEditor && !this.activeEditor.isWaiting()) {
440
478
  if (!isFunctionKey(keyCode) && !isCtrlMetaKey(keyCode) && !isCtrlPressed && !this.isEditorOpened()) {
441
479
  var shortcutManager = this.instance.getShortcutManager();
442
480
  var editorContext = shortcutManager.getContext('editor');
@@ -485,11 +523,7 @@ var EditorManager = /*#__PURE__*/function () {
485
523
  value: function onCellDblClick(event, coords, elem) {
486
524
  // may be TD or TH
487
525
  if (elem.nodeName === 'TD') {
488
- if (this.activeEditor) {
489
- this.activeEditor.enableFullEditMode();
490
- }
491
-
492
- this.openEditor(null, event);
526
+ this.openEditor(null, event, true);
493
527
  }
494
528
  }
495
529
  /**
@@ -472,7 +472,7 @@ var BaseEditor = /*#__PURE__*/function () {
472
472
 
473
473
  var value = this.getValue();
474
474
 
475
- if (this.hot.getSettings().trimWhitespace) {
475
+ if (this.cellProperties.trimWhitespace) {
476
476
  // We trim only string values
477
477
  val = [[typeof value === 'string' ? String.prototype.trim.call(value || '') : value]];
478
478
  } else {
@@ -439,7 +439,7 @@ export var BaseEditor = /*#__PURE__*/function () {
439
439
 
440
440
  var value = this.getValue();
441
441
 
442
- if (this.hot.getSettings().trimWhitespace) {
442
+ if (this.cellProperties.trimWhitespace) {
443
443
  // We trim only string values
444
444
  val = [[typeof value === 'string' ? String.prototype.trim.call(value || '') : value]];
445
445
  } else {
@@ -70,13 +70,13 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
70
70
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
71
71
 
72
72
  var EDITOR_TYPE = 'date';
73
+ exports.EDITOR_TYPE = EDITOR_TYPE;
74
+ var SHORTCUTS_GROUP_EDITOR = 'dateEditor';
73
75
  /**
74
76
  * @private
75
77
  * @class DateEditor
76
78
  */
77
79
 
78
- exports.EDITOR_TYPE = EDITOR_TYPE;
79
-
80
80
  var DateEditor = /*#__PURE__*/function (_TextEditor) {
81
81
  _inherits(DateEditor, _TextEditor);
82
82
 
@@ -191,10 +191,21 @@ var DateEditor = /*#__PURE__*/function (_TextEditor) {
191
191
  key: "open",
192
192
  value: function open() {
193
193
  var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
194
+ var shortcutManager = this.hot.getShortcutManager();
195
+ var editorContext = shortcutManager.getContext('editor');
194
196
 
195
197
  _get(_getPrototypeOf(DateEditor.prototype), "open", this).call(this);
196
198
 
197
199
  this.showDatepicker(event);
200
+ editorContext.addShortcut({
201
+ keys: [['Enter']],
202
+ callback: function callback(keyboardEvent) {
203
+ // Extra Pikaday's `onchange` listener captures events and performing extra `setDate` method call which causes
204
+ // flickering quite often.
205
+ keyboardEvent.stopPropagation();
206
+ },
207
+ group: SHORTCUTS_GROUP_EDITOR
208
+ });
198
209
  }
199
210
  /**
200
211
  * Close editor.
@@ -216,6 +227,10 @@ var DateEditor = /*#__PURE__*/function (_TextEditor) {
216
227
  _this3.instance._refreshBorders();
217
228
  });
218
229
 
230
+ var shortcutManager = this.hot.getShortcutManager();
231
+ var editorContext = shortcutManager.getContext('editor');
232
+ editorContext.removeShortcutsByGroup(SHORTCUTS_GROUP_EDITOR);
233
+
219
234
  _get(_getPrototypeOf(DateEditor.prototype), "close", this).call(this);
220
235
  }
221
236
  /**
@@ -45,6 +45,7 @@ import { addClass, outerHeight, outerWidth } from "../../helpers/dom/element.mjs
45
45
  import { deepExtend } from "../../helpers/object.mjs";
46
46
  import { isFunctionKey } from "../../helpers/unicode.mjs";
47
47
  export var EDITOR_TYPE = 'date';
48
+ var SHORTCUTS_GROUP_EDITOR = 'dateEditor';
48
49
  /**
49
50
  * @private
50
51
  * @class DateEditor
@@ -164,10 +165,21 @@ export var DateEditor = /*#__PURE__*/function (_TextEditor) {
164
165
  key: "open",
165
166
  value: function open() {
166
167
  var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
168
+ var shortcutManager = this.hot.getShortcutManager();
169
+ var editorContext = shortcutManager.getContext('editor');
167
170
 
168
171
  _get(_getPrototypeOf(DateEditor.prototype), "open", this).call(this);
169
172
 
170
173
  this.showDatepicker(event);
174
+ editorContext.addShortcut({
175
+ keys: [['Enter']],
176
+ callback: function callback(keyboardEvent) {
177
+ // Extra Pikaday's `onchange` listener captures events and performing extra `setDate` method call which causes
178
+ // flickering quite often.
179
+ keyboardEvent.stopPropagation();
180
+ },
181
+ group: SHORTCUTS_GROUP_EDITOR
182
+ });
171
183
  }
172
184
  /**
173
185
  * Close editor.
@@ -189,6 +201,10 @@ export var DateEditor = /*#__PURE__*/function (_TextEditor) {
189
201
  _this3.instance._refreshBorders();
190
202
  });
191
203
 
204
+ var shortcutManager = this.hot.getShortcutManager();
205
+ var editorContext = shortcutManager.getContext('editor');
206
+ editorContext.removeShortcutsByGroup(SHORTCUTS_GROUP_EDITOR);
207
+
192
208
  _get(_getPrototypeOf(DateEditor.prototype), "close", this).call(this);
193
209
  }
194
210
  /**
@@ -3,10 +3,6 @@
3
3
  exports.__esModule = true;
4
4
  exports.updateCaretPosition = updateCaretPosition;
5
5
 
6
- require("core-js/modules/es.regexp.exec.js");
7
-
8
- require("core-js/modules/es.string.split.js");
9
-
10
6
  var _element = require("../../helpers/dom/element");
11
7
 
12
8
  /**
@@ -1,5 +1,3 @@
1
- import "core-js/modules/es.regexp.exec.js";
2
- import "core-js/modules/es.string.split.js";
3
1
  import { getCaretPosition, setCaretPosition } from "../../helpers/dom/element.mjs";
4
2
  /**
5
3
  * Updates the textarea caret position depends on the action executed on that element.
@@ -81,12 +81,10 @@ require("core-js/modules/es.array.filter.js");
81
81
 
82
82
  require("core-js/modules/es.object.to-string.js");
83
83
 
84
- require("core-js/modules/es.regexp.exec.js");
85
-
86
- require("core-js/modules/es.string.split.js");
87
-
88
84
  require("core-js/modules/es.regexp.constructor.js");
89
85
 
86
+ require("core-js/modules/es.regexp.exec.js");
87
+
90
88
  require("core-js/modules/es.regexp.to-string.js");
91
89
 
92
90
  require("core-js/modules/es.array.join.js");
@@ -17,9 +17,8 @@ import "core-js/modules/es.array.slice.js";
17
17
  import "core-js/modules/es.array.index-of.js";
18
18
  import "core-js/modules/es.array.filter.js";
19
19
  import "core-js/modules/es.object.to-string.js";
20
- import "core-js/modules/es.regexp.exec.js";
21
- import "core-js/modules/es.string.split.js";
22
20
  import "core-js/modules/es.regexp.constructor.js";
21
+ import "core-js/modules/es.regexp.exec.js";
23
22
  import "core-js/modules/es.regexp.to-string.js";
24
23
  import "core-js/modules/es.array.join.js";
25
24
  import "core-js/modules/es.string.trim.js";
package/helpers/mixed.js CHANGED
@@ -22,8 +22,6 @@ require("core-js/modules/es.regexp.exec.js");
22
22
 
23
23
  require("core-js/modules/es.string.replace.js");
24
24
 
25
- require("core-js/modules/es.string.split.js");
26
-
27
25
  require("core-js/modules/es.string.pad-start.js");
28
26
 
29
27
  require("core-js/modules/es.symbol.js");
@@ -194,7 +192,7 @@ var domMessages = {
194
192
  function _injectProductInfo(key, element) {
195
193
  var hasValidType = !isEmpty(key);
196
194
  var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
197
- var hotVersion = "12.1.2";
195
+ var hotVersion = "12.1.3";
198
196
  var keyValidityDate;
199
197
  var consoleMessageState = 'invalid';
200
198
  var domMessageState = 'invalid';
@@ -204,7 +202,7 @@ function _injectProductInfo(key, element) {
204
202
 
205
203
  if (hasValidType || isNonCommercial || schemaValidity) {
206
204
  if (schemaValidity) {
207
- var releaseDate = (0, _moment.default)("08/07/2022", 'DD/MM/YYYY');
205
+ var releaseDate = (0, _moment.default)("22/09/2022", 'DD/MM/YYYY');
208
206
  var releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
209
207
 
210
208
  var keyValidityDays = _extractTime(key);
package/helpers/mixed.mjs CHANGED
@@ -10,7 +10,6 @@ import "core-js/modules/es.regexp.to-string.js";
10
10
  import "core-js/modules/es.string.code-point-at.js";
11
11
  import "core-js/modules/es.regexp.exec.js";
12
12
  import "core-js/modules/es.string.replace.js";
13
- import "core-js/modules/es.string.split.js";
14
13
  import "core-js/modules/es.string.pad-start.js";
15
14
  import "core-js/modules/es.symbol.js";
16
15
  import "core-js/modules/es.symbol.description.js";
@@ -162,7 +161,7 @@ var domMessages = {
162
161
  export function _injectProductInfo(key, element) {
163
162
  var hasValidType = !isEmpty(key);
164
163
  var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
165
- var hotVersion = "12.1.2";
164
+ var hotVersion = "12.1.3";
166
165
  var keyValidityDate;
167
166
  var consoleMessageState = 'invalid';
168
167
  var domMessageState = 'invalid';
@@ -172,7 +171,7 @@ export function _injectProductInfo(key, element) {
172
171
 
173
172
  if (hasValidType || isNonCommercial || schemaValidity) {
174
173
  if (schemaValidity) {
175
- var releaseDate = moment("08/07/2022", 'DD/MM/YYYY');
174
+ var releaseDate = moment("22/09/2022", 'DD/MM/YYYY');
176
175
  var releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
177
176
 
178
177
  var keyValidityDays = _extractTime(key);
package/helpers/object.js CHANGED
@@ -24,10 +24,6 @@ require("core-js/modules/es.string.includes.js");
24
24
 
25
25
  require("core-js/modules/es.object.to-string.js");
26
26
 
27
- require("core-js/modules/es.regexp.exec.js");
28
-
29
- require("core-js/modules/es.string.split.js");
30
-
31
27
  require("core-js/modules/web.dom-collections.for-each.js");
32
28
 
33
29
  require("core-js/modules/es.symbol.js");
@@ -3,8 +3,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
3
3
  import "core-js/modules/es.array.includes.js";
4
4
  import "core-js/modules/es.string.includes.js";
5
5
  import "core-js/modules/es.object.to-string.js";
6
- import "core-js/modules/es.regexp.exec.js";
7
- import "core-js/modules/es.string.split.js";
8
6
  import "core-js/modules/web.dom-collections.for-each.js";
9
7
  import "core-js/modules/es.symbol.js";
10
8
  import "core-js/modules/es.symbol.description.js";
@@ -12,10 +12,6 @@ require("core-js/modules/es.array.includes.js");
12
12
 
13
13
  require("core-js/modules/es.string.includes.js");
14
14
 
15
- require("core-js/modules/es.regexp.exec.js");
16
-
17
- require("core-js/modules/es.string.split.js");
18
-
19
15
  var _array = require("./array");
20
16
 
21
17
  var _browser = require("./browser");
@@ -1,7 +1,5 @@
1
1
  import "core-js/modules/es.array.includes.js";
2
2
  import "core-js/modules/es.string.includes.js";
3
- import "core-js/modules/es.regexp.exec.js";
4
- import "core-js/modules/es.string.split.js";
5
3
  import { arrayEach } from "./array.mjs";
6
4
  import { isMacOS, isFirefox } from "./browser.mjs";
7
5
  export var KEY_CODES = {
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": "12.1.2",
13
+ "version": "12.1.3",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
package/pluginHooks.d.ts CHANGED
@@ -231,7 +231,6 @@ export interface Events {
231
231
  modifyRowHeader?: (row: number) => void;
232
232
  modifyRowHeaderWidth?: (rowHeaderWidth: number) => void;
233
233
  modifyRowHeight?: (height: number, row: number) => void;
234
- modifyRowSourceData?: (row: number) => void;
235
234
  modifySourceData?: (row: number, column: number, valueHolder: { value: CellValue }, ioMode: 'get' | 'set') => void;
236
235
  modifyTransformEnd?: (delta: CellCoords) => void;
237
236
  modifyTransformStart?: (delta: CellCoords) => void;