handsontable 0.0.0-next-ff10728-20250410 → 0.0.0-next-9410a76-20250416

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 +14 -0
  2. package/3rdparty/walkontable/src/cell/range.mjs +14 -0
  3. package/3rdparty/walkontable/src/renderer/rowHeaders.js +4 -1
  4. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +4 -1
  5. package/3rdparty/walkontable/src/selection/border/border.js +5 -0
  6. package/3rdparty/walkontable/src/selection/border/border.mjs +5 -0
  7. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +3 -4
  8. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +3 -4
  9. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +8 -10
  10. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +8 -10
  11. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +3 -4
  12. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +3 -4
  13. package/3rdparty/walkontable/src/table.js +5 -2
  14. package/3rdparty/walkontable/src/table.mjs +5 -2
  15. package/CHANGELOG.md +39 -0
  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 +8 -0
  21. package/core/hooks/constants.mjs +8 -0
  22. package/core/hooks/index.d.ts +1 -0
  23. package/core.d.ts +0 -1
  24. package/core.js +32 -25
  25. package/core.mjs +33 -26
  26. package/dataMap/dataMap.js +0 -7
  27. package/dataMap/dataMap.mjs +0 -7
  28. package/dataMap/metaManager/metaSchema.js +1 -0
  29. package/dataMap/metaManager/metaSchema.mjs +1 -0
  30. package/dist/handsontable.css +3 -3
  31. package/dist/handsontable.full.css +3 -3
  32. package/dist/handsontable.full.js +437 -350
  33. package/dist/handsontable.full.min.css +3 -3
  34. package/dist/handsontable.full.min.js +17 -17
  35. package/dist/handsontable.js +437 -350
  36. package/dist/handsontable.min.css +3 -3
  37. package/dist/handsontable.min.js +18 -18
  38. package/editorManager.js +1 -7
  39. package/editorManager.mjs +1 -7
  40. package/editors/autocompleteEditor/autocompleteEditor.js +14 -4
  41. package/editors/autocompleteEditor/autocompleteEditor.mjs +14 -4
  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 +3 -0
  51. package/helpers/object.mjs +3 -0
  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 +1 -6
  56. package/plugins/autoRowSize/autoRowSize.mjs +1 -6
  57. package/plugins/columnSorting/columnSorting.js +0 -4
  58. package/plugins/columnSorting/columnSorting.mjs +0 -4
  59. package/plugins/comments/comments.js +1 -0
  60. package/plugins/comments/comments.mjs +1 -0
  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 +1 -0
  64. package/plugins/contextMenu/menu/menu.mjs +1 -0
  65. package/plugins/contextMenu/menu/positioner.js +10 -2
  66. package/plugins/contextMenu/menu/positioner.mjs +10 -2
  67. package/plugins/copyPaste/copyPaste.js +12 -15
  68. package/plugins/copyPaste/copyPaste.mjs +13 -16
  69. package/plugins/copyPaste/pasteEvent.js +3 -0
  70. package/plugins/copyPaste/pasteEvent.mjs +3 -0
  71. package/plugins/filters/filters.js +25 -24
  72. package/plugins/filters/filters.mjs +25 -24
  73. package/plugins/filters/ui/multipleSelect.js +7 -1
  74. package/plugins/filters/ui/multipleSelect.mjs +7 -1
  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 +4 -6
  80. package/plugins/manualColumnResize/manualColumnResize.mjs +4 -6
  81. package/plugins/manualRowResize/manualRowResize.js +4 -6
  82. package/plugins/manualRowResize/manualRowResize.mjs +4 -6
  83. package/plugins/mergeCells/mergeCells.js +8 -29
  84. package/plugins/mergeCells/mergeCells.mjs +8 -29
  85. package/plugins/mergeCells/renderer.js +15 -0
  86. package/plugins/mergeCells/renderer.mjs +15 -0
  87. package/plugins/mergeCells/utils.js +31 -0
  88. package/plugins/mergeCells/utils.mjs +27 -0
  89. package/plugins/nestedRows/data/dataManager.js +2 -2
  90. package/plugins/nestedRows/data/dataManager.mjs +2 -2
  91. package/plugins/undoRedo/actions/removeColumn.js +19 -14
  92. package/plugins/undoRedo/actions/removeColumn.mjs +19 -14
  93. package/plugins/undoRedo/actions/removeRow.js +12 -4
  94. package/plugins/undoRedo/actions/removeRow.mjs +12 -4
  95. package/selection/selection.js +3 -1
  96. package/selection/selection.mjs +3 -1
  97. package/styles/handsontable.css +14 -15
  98. package/styles/handsontable.min.css +3 -3
  99. package/styles/ht-theme-horizon.css +2 -2
  100. package/styles/ht-theme-horizon.min.css +2 -2
  101. package/styles/ht-theme-main.css +2 -2
  102. package/styles/ht-theme-main.min.css +2 -2
  103. package/tableView.js +5 -8
  104. package/tableView.mjs +5 -8
  105. package/utils/ghostTable.js +3 -0
  106. package/utils/ghostTable.mjs +3 -0
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 } from "./helpers/mixed.mjs";
17
+ import { isDefined, isUndefined, isRegExp, _injectProductInfo, isEmpty, stringify } 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,7 +226,6 @@ 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;
230
229
  rootElement.insertBefore(this.container, rootElement.firstChild);
231
230
  if (isRootInstance(this)) {
232
231
  _injectProductInfo(userSettings.licenseKey, rootElement);
@@ -258,6 +257,9 @@ export default function Core(rootElement, userSettings) {
258
257
  this.rowIndexMapper.addLocalHook('indexesSequenceChange', source => {
259
258
  instance.runHooks('afterRowSequenceChange', source);
260
259
  });
260
+ eventManager.addEventListener(this.rootDocument.documentElement, 'compositionstart', event => {
261
+ instance.runHooks('beforeCompositionStart', event);
262
+ });
261
263
  dataSource = new DataSource(instance);
262
264
  if (!this.rootElement.id || this.rootElement.id.substring(0, 3) === 'ht_') {
263
265
  this.rootElement.id = this.guid; // if root element does not have an id, assign a random id
@@ -337,6 +339,7 @@ export default function Core(rootElement, userSettings) {
337
339
  let {
338
340
  hiddenIndexesChanged
339
341
  } = _ref;
342
+ this.forceFullRender = true;
340
343
  if (hiddenIndexesChanged) {
341
344
  this.selection.commit();
342
345
  }
@@ -620,13 +623,6 @@ export default function Core(rootElement, userSettings) {
620
623
  }
621
624
  }
622
625
  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
- }
630
626
  const fixedRowsTop = tableMeta.fixedRowsTop;
631
627
  if (fixedRowsTop >= calcIndex + 1) {
632
628
  tableMeta.fixedRowsTop -= Math.min(groupAmount, fixedRowsTop - calcIndex);
@@ -635,6 +631,13 @@ export default function Core(rootElement, userSettings) {
635
631
  if (fixedRowsBottom && calcIndex >= totalRows - fixedRowsBottom) {
636
632
  tableMeta.fixedRowsBottom -= Math.min(groupAmount, fixedRowsBottom);
637
633
  }
634
+ if (totalRows === 0) {
635
+ selection.deselect();
636
+ } else if (source === 'ContextMenu.removeRow') {
637
+ selection.refresh();
638
+ } else {
639
+ selection.shiftRows(groupIndex, -groupAmount);
640
+ }
638
641
  offset += groupAmount;
639
642
  });
640
643
  };
@@ -1044,8 +1047,7 @@ export default function Core(rootElement, userSettings) {
1044
1047
  installFocusCatcher(instance);
1045
1048
  }
1046
1049
  instance.runHooks('init');
1047
- this.forceFullRender = true; // used when data was changed
1048
- this.view.render();
1050
+ this.render();
1049
1051
 
1050
1052
  // Run the logic only if it's the table's initialization and the root element is not visible.
1051
1053
  if (!!firstRun && instance.rootElement.offsetParent === null) {
@@ -1218,13 +1220,11 @@ export default function Core(rootElement, userSettings) {
1218
1220
  datamap.set(changes[i][0], changes[i][1], changes[i][3]);
1219
1221
  }
1220
1222
  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.view.render();
1227
+ instance.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.view.render();
1236
+ instance.render();
1237
1237
  }
1238
1238
  }
1239
1239
 
@@ -1383,9 +1383,22 @@ export default function Core(rootElement, userSettings) {
1383
1383
  ...tableMeta
1384
1384
  };
1385
1385
  }
1386
- if (cellProperties.type === 'numeric' && typeof newValue === 'string' && isNumericLike(newValue)) {
1386
+ const {
1387
+ type,
1388
+ checkedTemplate,
1389
+ uncheckedTemplate
1390
+ } = cellProperties;
1391
+ if (type === 'numeric' && typeof newValue === 'string' && isNumericLike(newValue)) {
1387
1392
  filteredChanges[i][3] = getParsedNumber(newValue);
1388
1393
  }
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
+ }
1389
1402
  }
1390
1403
  return filteredChanges;
1391
1404
  }
@@ -1787,11 +1800,7 @@ export default function Core(rootElement, userSettings) {
1787
1800
  const nextValue = this.renderSuspendedCounter - 1;
1788
1801
  this.renderSuspendedCounter = Math.max(nextValue, 0);
1789
1802
  if (!this.isRenderSuspended() && nextValue === this.renderSuspendedCounter) {
1790
- if (this.renderCall) {
1791
- this.render();
1792
- } else {
1793
- instance.view.render();
1794
- }
1803
+ instance.view.render();
1795
1804
  }
1796
1805
  };
1797
1806
 
@@ -1807,9 +1816,8 @@ export default function Core(rootElement, userSettings) {
1807
1816
  */
1808
1817
  this.render = function () {
1809
1818
  if (this.view) {
1810
- this.renderCall = true;
1811
- this.forceFullRender = true; // used when data was changed or when all cells need to be re-rendered
1812
-
1819
+ // used when data was changed or when all cells need to be re-rendered (slow render)
1820
+ this.forceFullRender = true;
1813
1821
  if (!this.isRenderSuspended()) {
1814
1822
  instance.view.render();
1815
1823
  }
@@ -2422,8 +2430,7 @@ export default function Core(rootElement, userSettings) {
2422
2430
  }
2423
2431
  grid.adjustRowsAndCols();
2424
2432
  if (instance.view && !firstRun) {
2425
- instance.forceFullRender = true; // used when data was changed
2426
- instance.view.render();
2433
+ instance.render();
2427
2434
  instance.view._wt.wtOverlays.adjustElementsSize();
2428
2435
  }
2429
2436
  if (!init && instance.view && (currentHeight === '' || height === '' || height === undefined) && currentHeight !== height) {
@@ -357,8 +357,6 @@ 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
-
362
360
  return {
363
361
  delta: numberOfCreatedRows,
364
362
  startPhysicalIndex: physicalRowIndex
@@ -444,8 +442,6 @@ class DataMap {
444
442
  }
445
443
  const newVisualColumnIndex = this.hot.toVisualColumn(startPhysicalIndex);
446
444
  this.hot.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
447
- this.hot.forceFullRender = true; // used when data was changed
448
-
449
445
  this.refreshDuckSchema();
450
446
  return {
451
447
  delta: numberOfCreatedCols,
@@ -492,8 +488,6 @@ class DataMap {
492
488
  this.metaManager.removeRow(rowPhysicalIndex, 1);
493
489
  });
494
490
  this.hot.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
495
- this.hot.forceFullRender = true; // used when data was changed
496
-
497
491
  return true;
498
492
  }
499
493
 
@@ -553,7 +547,6 @@ class DataMap {
553
547
  }
554
548
  }
555
549
  this.hot.runHooks('afterRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
556
- this.hot.forceFullRender = true; // used when data was changed
557
550
  this.refreshDuckSchema();
558
551
  return true;
559
552
  }
@@ -353,8 +353,6 @@ 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
-
358
356
  return {
359
357
  delta: numberOfCreatedRows,
360
358
  startPhysicalIndex: physicalRowIndex
@@ -440,8 +438,6 @@ class DataMap {
440
438
  }
441
439
  const newVisualColumnIndex = this.hot.toVisualColumn(startPhysicalIndex);
442
440
  this.hot.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
443
- this.hot.forceFullRender = true; // used when data was changed
444
-
445
441
  this.refreshDuckSchema();
446
442
  return {
447
443
  delta: numberOfCreatedCols,
@@ -488,8 +484,6 @@ class DataMap {
488
484
  this.metaManager.removeRow(rowPhysicalIndex, 1);
489
485
  });
490
486
  this.hot.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
491
- this.hot.forceFullRender = true; // used when data was changed
492
-
493
487
  return true;
494
488
  }
495
489
 
@@ -549,7 +543,6 @@ class DataMap {
549
543
  }
550
544
  }
551
545
  this.hot.runHooks('afterRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
552
- this.hot.forceFullRender = true; // used when data was changed
553
546
  this.refreshDuckSchema();
554
547
  return true;
555
548
  }
@@ -2649,6 +2649,7 @@ 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 |
2652
2653
  * | `'fr-FR'` | French - France |
2653
2654
  * | `'hr-HR'` | Croatian - Croatia |
2654
2655
  * | `'it-IT'` | Italian - Italy |
@@ -2646,6 +2646,7 @@ 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 |
2649
2650
  * | `'fr-FR'` | French - France |
2650
2651
  * | `'hr-HR'` | Croatian - Croatia |
2651
2652
  * | `'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-ff10728-20250410
29
- * Release date: 20/02/2025 (built at 10/04/2025 06:44:13)
28
+ * Version: 0.0.0-next-9410a76-20250416
29
+ * Release date: 19/03/2025 (built at 16/04/2025 06:18:34)
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-y: scroll;
1461
+ overflow: auto;
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-ff10728-20250410
29
- * Release date: 20/02/2025 (built at 10/04/2025 06:44:13)
28
+ * Version: 0.0.0-next-9410a76-20250416
29
+ * Release date: 19/03/2025 (built at 16/04/2025 06:18:34)
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-y: scroll;
1461
+ overflow: auto;
1462
1462
  }
1463
1463
 
1464
1464
  .handsontable .htFiltersActive .changeType {