handsontable 0.0.0-next-87b048b-20250409 → 0.0.0-next-ff10728-20250410

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

Potentially problematic release.


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

Files changed (106) hide show
  1. package/3rdparty/walkontable/src/cell/range.js +0 -14
  2. package/3rdparty/walkontable/src/cell/range.mjs +0 -14
  3. package/3rdparty/walkontable/src/renderer/rowHeaders.js +1 -4
  4. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +1 -4
  5. package/3rdparty/walkontable/src/selection/border/border.js +0 -5
  6. package/3rdparty/walkontable/src/selection/border/border.mjs +0 -5
  7. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +4 -3
  8. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +4 -3
  9. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +10 -8
  10. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +10 -8
  11. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +4 -3
  12. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +4 -3
  13. package/3rdparty/walkontable/src/table.js +2 -5
  14. package/3rdparty/walkontable/src/table.mjs +2 -5
  15. package/CHANGELOG.md +0 -39
  16. package/base.js +2 -2
  17. package/base.mjs +2 -2
  18. package/core/focusCatcher/focusDetector.js +1 -1
  19. package/core/focusCatcher/focusDetector.mjs +2 -2
  20. package/core/hooks/constants.js +0 -8
  21. package/core/hooks/constants.mjs +0 -8
  22. package/core/hooks/index.d.ts +0 -1
  23. package/core.d.ts +1 -0
  24. package/core.js +25 -32
  25. package/core.mjs +26 -33
  26. package/dataMap/dataMap.js +7 -0
  27. package/dataMap/dataMap.mjs +7 -0
  28. package/dataMap/metaManager/metaSchema.js +0 -1
  29. package/dataMap/metaManager/metaSchema.mjs +0 -1
  30. package/dist/handsontable.css +3 -3
  31. package/dist/handsontable.full.css +3 -3
  32. package/dist/handsontable.full.js +350 -437
  33. package/dist/handsontable.full.min.css +3 -3
  34. package/dist/handsontable.full.min.js +17 -17
  35. package/dist/handsontable.js +350 -437
  36. package/dist/handsontable.min.css +3 -3
  37. package/dist/handsontable.min.js +18 -18
  38. package/editorManager.js +7 -1
  39. package/editorManager.mjs +7 -1
  40. package/editors/autocompleteEditor/autocompleteEditor.js +4 -14
  41. package/editors/autocompleteEditor/autocompleteEditor.mjs +4 -14
  42. package/editors/textEditor/textEditor.js +1 -1
  43. package/editors/textEditor/textEditor.mjs +2 -2
  44. package/helpers/browser.js +1 -1
  45. package/helpers/browser.mjs +1 -1
  46. package/helpers/dom/element.js +2 -2
  47. package/helpers/dom/element.mjs +1 -1
  48. package/helpers/mixed.js +2 -2
  49. package/helpers/mixed.mjs +2 -2
  50. package/helpers/object.js +0 -3
  51. package/helpers/object.mjs +0 -3
  52. package/package.json +1 -1
  53. package/plugins/autoColumnSize/autoColumnSize.js +1 -1
  54. package/plugins/autoColumnSize/autoColumnSize.mjs +1 -1
  55. package/plugins/autoRowSize/autoRowSize.js +6 -1
  56. package/plugins/autoRowSize/autoRowSize.mjs +6 -1
  57. package/plugins/columnSorting/columnSorting.js +4 -0
  58. package/plugins/columnSorting/columnSorting.mjs +4 -0
  59. package/plugins/comments/comments.js +0 -1
  60. package/plugins/comments/comments.mjs +0 -1
  61. package/plugins/contextMenu/menu/defaultShortcutsList.js +2 -2
  62. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +2 -2
  63. package/plugins/contextMenu/menu/menu.js +0 -1
  64. package/plugins/contextMenu/menu/menu.mjs +0 -1
  65. package/plugins/contextMenu/menu/positioner.js +2 -10
  66. package/plugins/contextMenu/menu/positioner.mjs +2 -10
  67. package/plugins/copyPaste/copyPaste.js +15 -12
  68. package/plugins/copyPaste/copyPaste.mjs +16 -13
  69. package/plugins/copyPaste/pasteEvent.js +0 -3
  70. package/plugins/copyPaste/pasteEvent.mjs +0 -3
  71. package/plugins/filters/filters.js +24 -25
  72. package/plugins/filters/filters.mjs +24 -25
  73. package/plugins/filters/ui/multipleSelect.js +1 -7
  74. package/plugins/filters/ui/multipleSelect.mjs +1 -7
  75. package/plugins/hiddenColumns/hiddenColumns.js +1 -1
  76. package/plugins/hiddenColumns/hiddenColumns.mjs +1 -1
  77. package/plugins/hiddenRows/hiddenRows.js +1 -1
  78. package/plugins/hiddenRows/hiddenRows.mjs +1 -1
  79. package/plugins/manualColumnResize/manualColumnResize.js +6 -4
  80. package/plugins/manualColumnResize/manualColumnResize.mjs +6 -4
  81. package/plugins/manualRowResize/manualRowResize.js +6 -4
  82. package/plugins/manualRowResize/manualRowResize.mjs +6 -4
  83. package/plugins/mergeCells/mergeCells.js +29 -8
  84. package/plugins/mergeCells/mergeCells.mjs +29 -8
  85. package/plugins/mergeCells/renderer.js +0 -15
  86. package/plugins/mergeCells/renderer.mjs +0 -15
  87. package/plugins/nestedRows/data/dataManager.js +2 -2
  88. package/plugins/nestedRows/data/dataManager.mjs +2 -2
  89. package/plugins/undoRedo/actions/removeColumn.js +14 -19
  90. package/plugins/undoRedo/actions/removeColumn.mjs +14 -19
  91. package/plugins/undoRedo/actions/removeRow.js +4 -12
  92. package/plugins/undoRedo/actions/removeRow.mjs +4 -12
  93. package/selection/selection.js +1 -3
  94. package/selection/selection.mjs +1 -3
  95. package/styles/handsontable.css +15 -14
  96. package/styles/handsontable.min.css +3 -3
  97. package/styles/ht-theme-horizon.css +2 -2
  98. package/styles/ht-theme-horizon.min.css +2 -2
  99. package/styles/ht-theme-main.css +2 -2
  100. package/styles/ht-theme-main.min.css +2 -2
  101. package/tableView.js +8 -5
  102. package/tableView.mjs +8 -5
  103. package/utils/ghostTable.js +0 -3
  104. package/utils/ghostTable.mjs +0 -3
  105. package/plugins/mergeCells/utils.js +0 -31
  106. package/plugins/mergeCells/utils.mjs +0 -27
package/core.mjs CHANGED
@@ -14,7 +14,7 @@ import "core-js/modules/esnext.iterator.map.js";
14
14
  import "core-js/modules/web.immediate.js";
15
15
  import { addClass, empty, observeVisibilityChangeOnce, removeClass } from "./helpers/dom/element.mjs";
16
16
  import { isFunction } from "./helpers/function.mjs";
17
- import { isDefined, isUndefined, isRegExp, _injectProductInfo, isEmpty, stringify } from "./helpers/mixed.mjs";
17
+ import { isDefined, isUndefined, isRegExp, _injectProductInfo, isEmpty } from "./helpers/mixed.mjs";
18
18
  import { isMobileBrowser, isIpadOS } from "./helpers/browser.mjs";
19
19
  import EditorManager from "./editorManager.mjs";
20
20
  import EventManager from "./eventManager.mjs";
@@ -226,6 +226,7 @@ export default function Core(rootElement, userSettings) {
226
226
  const globalMeta = metaManager.getGlobalMeta();
227
227
  const pluginsRegistry = createUniqueMap();
228
228
  this.container = this.rootDocument.createElement('div');
229
+ this.renderCall = false;
229
230
  rootElement.insertBefore(this.container, rootElement.firstChild);
230
231
  if (isRootInstance(this)) {
231
232
  _injectProductInfo(userSettings.licenseKey, rootElement);
@@ -257,9 +258,6 @@ export default function Core(rootElement, userSettings) {
257
258
  this.rowIndexMapper.addLocalHook('indexesSequenceChange', source => {
258
259
  instance.runHooks('afterRowSequenceChange', source);
259
260
  });
260
- eventManager.addEventListener(this.rootDocument.documentElement, 'compositionstart', event => {
261
- instance.runHooks('beforeCompositionStart', event);
262
- });
263
261
  dataSource = new DataSource(instance);
264
262
  if (!this.rootElement.id || this.rootElement.id.substring(0, 3) === 'ht_') {
265
263
  this.rootElement.id = this.guid; // if root element does not have an id, assign a random id
@@ -339,7 +337,6 @@ export default function Core(rootElement, userSettings) {
339
337
  let {
340
338
  hiddenIndexesChanged
341
339
  } = _ref;
342
- this.forceFullRender = true;
343
340
  if (hiddenIndexesChanged) {
344
341
  this.selection.commit();
345
342
  }
@@ -623,6 +620,13 @@ export default function Core(rootElement, userSettings) {
623
620
  }
624
621
  }
625
622
  const totalRows = instance.countRows();
623
+ if (totalRows === 0) {
624
+ selection.deselect();
625
+ } else if (source === 'ContextMenu.removeRow') {
626
+ selection.refresh();
627
+ } else {
628
+ selection.shiftRows(groupIndex, -groupAmount);
629
+ }
626
630
  const fixedRowsTop = tableMeta.fixedRowsTop;
627
631
  if (fixedRowsTop >= calcIndex + 1) {
628
632
  tableMeta.fixedRowsTop -= Math.min(groupAmount, fixedRowsTop - calcIndex);
@@ -631,13 +635,6 @@ export default function Core(rootElement, userSettings) {
631
635
  if (fixedRowsBottom && calcIndex >= totalRows - fixedRowsBottom) {
632
636
  tableMeta.fixedRowsBottom -= Math.min(groupAmount, fixedRowsBottom);
633
637
  }
634
- if (totalRows === 0) {
635
- selection.deselect();
636
- } else if (source === 'ContextMenu.removeRow') {
637
- selection.refresh();
638
- } else {
639
- selection.shiftRows(groupIndex, -groupAmount);
640
- }
641
638
  offset += groupAmount;
642
639
  });
643
640
  };
@@ -1047,7 +1044,8 @@ export default function Core(rootElement, userSettings) {
1047
1044
  installFocusCatcher(instance);
1048
1045
  }
1049
1046
  instance.runHooks('init');
1050
- this.render();
1047
+ this.forceFullRender = true; // used when data was changed
1048
+ this.view.render();
1051
1049
 
1052
1050
  // Run the logic only if it's the table's initialization and the root element is not visible.
1053
1051
  if (!!firstRun && instance.rootElement.offsetParent === null) {
@@ -1220,11 +1218,13 @@ export default function Core(rootElement, userSettings) {
1220
1218
  datamap.set(changes[i][0], changes[i][1], changes[i][3]);
1221
1219
  }
1222
1220
  const hasChanges = changes.length > 0;
1221
+ instance.forceFullRender = true; // used when data was changed or when all cells need to be re-rendered
1222
+
1223
1223
  if (hasChanges) {
1224
1224
  grid.adjustRowsAndCols();
1225
1225
  instance.runHooks('beforeChangeRender', changes, source);
1226
1226
  editorManager.closeEditor();
1227
- instance.render();
1227
+ instance.view.render();
1228
1228
  editorManager.prepareEditor();
1229
1229
  instance.view.adjustElementsSize();
1230
1230
  instance.runHooks('afterChange', changes, source || 'edit');
@@ -1233,7 +1233,7 @@ export default function Core(rootElement, userSettings) {
1233
1233
  activeEditor.refreshValue();
1234
1234
  }
1235
1235
  } else {
1236
- instance.render();
1236
+ instance.view.render();
1237
1237
  }
1238
1238
  }
1239
1239
 
@@ -1383,22 +1383,9 @@ export default function Core(rootElement, userSettings) {
1383
1383
  ...tableMeta
1384
1384
  };
1385
1385
  }
1386
- const {
1387
- type,
1388
- checkedTemplate,
1389
- uncheckedTemplate
1390
- } = cellProperties;
1391
- if (type === 'numeric' && typeof newValue === 'string' && isNumericLike(newValue)) {
1386
+ if (cellProperties.type === 'numeric' && typeof newValue === 'string' && isNumericLike(newValue)) {
1392
1387
  filteredChanges[i][3] = getParsedNumber(newValue);
1393
1388
  }
1394
- if (type === 'checkbox') {
1395
- const stringifiedValue = stringify(newValue);
1396
- const isChecked = stringifiedValue === stringify(checkedTemplate);
1397
- const isUnchecked = stringifiedValue === stringify(uncheckedTemplate);
1398
- if (isChecked || isUnchecked) {
1399
- filteredChanges[i][3] = isChecked ? checkedTemplate : uncheckedTemplate;
1400
- }
1401
- }
1402
1389
  }
1403
1390
  return filteredChanges;
1404
1391
  }
@@ -1800,7 +1787,11 @@ export default function Core(rootElement, userSettings) {
1800
1787
  const nextValue = this.renderSuspendedCounter - 1;
1801
1788
  this.renderSuspendedCounter = Math.max(nextValue, 0);
1802
1789
  if (!this.isRenderSuspended() && nextValue === this.renderSuspendedCounter) {
1803
- instance.view.render();
1790
+ if (this.renderCall) {
1791
+ this.render();
1792
+ } else {
1793
+ instance.view.render();
1794
+ }
1804
1795
  }
1805
1796
  };
1806
1797
 
@@ -1816,8 +1807,9 @@ export default function Core(rootElement, userSettings) {
1816
1807
  */
1817
1808
  this.render = function () {
1818
1809
  if (this.view) {
1819
- // used when data was changed or when all cells need to be re-rendered (slow render)
1820
- this.forceFullRender = true;
1810
+ this.renderCall = true;
1811
+ this.forceFullRender = true; // used when data was changed or when all cells need to be re-rendered
1812
+
1821
1813
  if (!this.isRenderSuspended()) {
1822
1814
  instance.view.render();
1823
1815
  }
@@ -2430,7 +2422,8 @@ export default function Core(rootElement, userSettings) {
2430
2422
  }
2431
2423
  grid.adjustRowsAndCols();
2432
2424
  if (instance.view && !firstRun) {
2433
- instance.render();
2425
+ instance.forceFullRender = true; // used when data was changed
2426
+ instance.view.render();
2434
2427
  instance.view._wt.wtOverlays.adjustElementsSize();
2435
2428
  }
2436
2429
  if (!init && instance.view && (currentHeight === '' || height === '' || height === undefined) && currentHeight !== height) {
@@ -357,6 +357,8 @@ class DataMap {
357
357
  }
358
358
  }
359
359
  this.hot.runHooks('afterCreateRow', newVisualRowIndex, numberOfCreatedRows, source);
360
+ this.hot.forceFullRender = true; // used when data was changed
361
+
360
362
  return {
361
363
  delta: numberOfCreatedRows,
362
364
  startPhysicalIndex: physicalRowIndex
@@ -442,6 +444,8 @@ class DataMap {
442
444
  }
443
445
  const newVisualColumnIndex = this.hot.toVisualColumn(startPhysicalIndex);
444
446
  this.hot.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
447
+ this.hot.forceFullRender = true; // used when data was changed
448
+
445
449
  this.refreshDuckSchema();
446
450
  return {
447
451
  delta: numberOfCreatedCols,
@@ -488,6 +492,8 @@ class DataMap {
488
492
  this.metaManager.removeRow(rowPhysicalIndex, 1);
489
493
  });
490
494
  this.hot.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
495
+ this.hot.forceFullRender = true; // used when data was changed
496
+
491
497
  return true;
492
498
  }
493
499
 
@@ -547,6 +553,7 @@ class DataMap {
547
553
  }
548
554
  }
549
555
  this.hot.runHooks('afterRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
556
+ this.hot.forceFullRender = true; // used when data was changed
550
557
  this.refreshDuckSchema();
551
558
  return true;
552
559
  }
@@ -353,6 +353,8 @@ class DataMap {
353
353
  }
354
354
  }
355
355
  this.hot.runHooks('afterCreateRow', newVisualRowIndex, numberOfCreatedRows, source);
356
+ this.hot.forceFullRender = true; // used when data was changed
357
+
356
358
  return {
357
359
  delta: numberOfCreatedRows,
358
360
  startPhysicalIndex: physicalRowIndex
@@ -438,6 +440,8 @@ class DataMap {
438
440
  }
439
441
  const newVisualColumnIndex = this.hot.toVisualColumn(startPhysicalIndex);
440
442
  this.hot.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
443
+ this.hot.forceFullRender = true; // used when data was changed
444
+
441
445
  this.refreshDuckSchema();
442
446
  return {
443
447
  delta: numberOfCreatedCols,
@@ -484,6 +488,8 @@ class DataMap {
484
488
  this.metaManager.removeRow(rowPhysicalIndex, 1);
485
489
  });
486
490
  this.hot.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
491
+ this.hot.forceFullRender = true; // used when data was changed
492
+
487
493
  return true;
488
494
  }
489
495
 
@@ -543,6 +549,7 @@ class DataMap {
543
549
  }
544
550
  }
545
551
  this.hot.runHooks('afterRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
552
+ this.hot.forceFullRender = true; // used when data was changed
546
553
  this.refreshDuckSchema();
547
554
  return true;
548
555
  }
@@ -2649,7 +2649,6 @@ var _default = () => {
2649
2649
  * | `'de-CH'` | German - Switzerland |
2650
2650
  * | `'de-DE'` | German - Germany |
2651
2651
  * | `'es-MX'` | Spanish - Mexico |
2652
- * | `'fa-IR'` | Persian - Iran |
2653
2652
  * | `'fr-FR'` | French - France |
2654
2653
  * | `'hr-HR'` | Croatian - Croatia |
2655
2654
  * | `'it-IT'` | Italian - Italy |
@@ -2646,7 +2646,6 @@ export default () => {
2646
2646
  * | `'de-CH'` | German - Switzerland |
2647
2647
  * | `'de-DE'` | German - Germany |
2648
2648
  * | `'es-MX'` | Spanish - Mexico |
2649
- * | `'fa-IR'` | Persian - Iran |
2650
2649
  * | `'fr-FR'` | French - France |
2651
2650
  * | `'hr-HR'` | Croatian - Croatia |
2652
2651
  * | `'it-IT'` | Italian - Italy |
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 0.0.0-next-87b048b-20250409
29
- * Release date: 19/03/2025 (built at 09/04/2025 06:01:09)
28
+ * Version: 0.0.0-next-ff10728-20250410
29
+ * Release date: 20/02/2025 (built at 10/04/2025 06:44:13)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles
@@ -1458,7 +1458,7 @@ textarea.HandsontableCopyPaste {
1458
1458
  }
1459
1459
 
1460
1460
  .htUIMultipleSelect .ht_master .wtHolder {
1461
- overflow: auto;
1461
+ overflow-y: scroll;
1462
1462
  }
1463
1463
 
1464
1464
  .handsontable .htFiltersActive .changeType {
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 0.0.0-next-87b048b-20250409
29
- * Release date: 19/03/2025 (built at 09/04/2025 06:01:09)
28
+ * Version: 0.0.0-next-ff10728-20250410
29
+ * Release date: 20/02/2025 (built at 10/04/2025 06:44:13)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles
@@ -1458,7 +1458,7 @@ textarea.HandsontableCopyPaste {
1458
1458
  }
1459
1459
 
1460
1460
  .htUIMultipleSelect .ht_master .wtHolder {
1461
- overflow: auto;
1461
+ overflow-y: scroll;
1462
1462
  }
1463
1463
 
1464
1464
  .handsontable .htFiltersActive .changeType {