handsontable 0.0.0-next-4cc87d6-20240319 → 0.0.0-next-e5dbebc-20240319

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 (98) hide show
  1. package/3rdparty/walkontable/src/cell/range.d.ts +2 -1
  2. package/3rdparty/walkontable/src/cell/range.js +22 -5
  3. package/3rdparty/walkontable/src/cell/range.mjs +22 -5
  4. package/base.js +2 -2
  5. package/base.mjs +2 -2
  6. package/core/viewportScroll/index.js +4 -1
  7. package/core/viewportScroll/index.mjs +4 -1
  8. package/core/viewportScroll/scrollStrategies/focusScroll.js +15 -0
  9. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +11 -0
  10. package/core.d.ts +4 -3
  11. package/core.js +76 -21
  12. package/core.mjs +76 -21
  13. package/dist/handsontable.css +2 -2
  14. package/dist/handsontable.full.css +2 -2
  15. package/dist/handsontable.full.js +2618 -1353
  16. package/dist/handsontable.full.min.css +2 -2
  17. package/dist/handsontable.full.min.js +71 -71
  18. package/dist/handsontable.js +2622 -1357
  19. package/dist/handsontable.min.css +2 -2
  20. package/dist/handsontable.min.js +19 -19
  21. package/editorManager.js +12 -8
  22. package/editorManager.mjs +12 -8
  23. package/focusManager.js +7 -1
  24. package/focusManager.mjs +7 -1
  25. package/helpers/mixed.js +1 -1
  26. package/helpers/mixed.mjs +1 -1
  27. package/package.json +1 -1
  28. package/pluginHooks.d.ts +4 -0
  29. package/pluginHooks.js +69 -1
  30. package/pluginHooks.mjs +69 -1
  31. package/plugins/collapsibleColumns/collapsibleColumns.js +9 -3
  32. package/plugins/collapsibleColumns/collapsibleColumns.mjs +9 -3
  33. package/plugins/columnSorting/columnSorting.js +8 -2
  34. package/plugins/columnSorting/columnSorting.mjs +8 -2
  35. package/plugins/contextMenu/menu/defaultShortcutsList.js +26 -10
  36. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +26 -10
  37. package/plugins/mergeCells/calculations/selection.js +1 -70
  38. package/plugins/mergeCells/calculations/selection.mjs +1 -70
  39. package/plugins/mergeCells/cellsCollection.js +116 -0
  40. package/plugins/mergeCells/cellsCollection.mjs +116 -0
  41. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +11 -1
  42. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +11 -1
  43. package/plugins/mergeCells/focusOrder.js +303 -0
  44. package/plugins/mergeCells/focusOrder.mjs +298 -0
  45. package/plugins/mergeCells/mergeCells.js +336 -192
  46. package/plugins/mergeCells/mergeCells.mjs +336 -192
  47. package/plugins/multiColumnSorting/multiColumnSorting.js +8 -2
  48. package/plugins/multiColumnSorting/multiColumnSorting.mjs +8 -2
  49. package/plugins/nestedHeaders/nestedHeaders.js +1 -0
  50. package/plugins/nestedHeaders/nestedHeaders.mjs +1 -0
  51. package/plugins/nestedRows/nestedRows.js +9 -3
  52. package/plugins/nestedRows/nestedRows.mjs +9 -3
  53. package/renderers/checkboxRenderer/checkboxRenderer.js +8 -5
  54. package/renderers/checkboxRenderer/checkboxRenderer.mjs +8 -5
  55. package/selection/highlight/visualSelection.js +2 -0
  56. package/selection/highlight/visualSelection.mjs +2 -0
  57. package/selection/selection.js +209 -40
  58. package/selection/selection.mjs +208 -39
  59. package/selection/transformation.js +83 -32
  60. package/selection/transformation.mjs +83 -32
  61. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  62. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  63. package/shortcutContexts/commands/editor/open.js +18 -3
  64. package/shortcutContexts/commands/editor/open.mjs +18 -3
  65. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  66. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  67. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  68. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  69. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  70. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  71. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  72. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  73. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +3 -1
  74. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +3 -1
  75. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +9 -3
  76. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +9 -3
  77. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +10 -3
  78. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +10 -3
  79. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +3 -1
  80. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +3 -1
  81. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +3 -1
  82. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +3 -1
  83. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +3 -1
  84. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +3 -1
  85. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  86. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  87. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  88. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  89. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +6 -1
  90. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +6 -1
  91. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +6 -1
  92. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +6 -1
  93. package/shortcutContexts/grid.js +2 -2
  94. package/shortcutContexts/grid.mjs +2 -2
  95. package/shortcuts/context.js +2 -1
  96. package/shortcuts/context.mjs +2 -1
  97. package/utils/dataStructures/linkedList.js +6 -1
  98. package/utils/dataStructures/linkedList.mjs +6 -1
@@ -163,12 +163,12 @@ function shortcutsGridContext(hot) {
163
163
  keys: [['Tab']],
164
164
  // The property value is controlled by focusCatcher module (https://github.com/handsontable/handsontable/blob/master/handsontable/src/core/focusCatcher/index.js)
165
165
  preventDefault: false,
166
- callback: () => commandsPool.moveCellSelectionInlineStart()
166
+ callback: event => commandsPool.moveCellSelectionInlineStart(event)
167
167
  }, {
168
168
  keys: [['Shift', 'Tab']],
169
169
  // The property value is controlled by focusCatcher module (https://github.com/handsontable/handsontable/blob/master/handsontable/src/core/focusCatcher/index.js)
170
170
  preventDefault: false,
171
- callback: () => commandsPool.moveCellSelectionInlineEnd()
171
+ callback: event => commandsPool.moveCellSelectionInlineEnd(event)
172
172
  }, {
173
173
  keys: [['Control/Meta', 'Backspace']],
174
174
  callback: () => commandsPool.scrollToFocusedCell()
@@ -159,12 +159,12 @@ export function shortcutsGridContext(hot) {
159
159
  keys: [['Tab']],
160
160
  // The property value is controlled by focusCatcher module (https://github.com/handsontable/handsontable/blob/master/handsontable/src/core/focusCatcher/index.js)
161
161
  preventDefault: false,
162
- callback: () => commandsPool.moveCellSelectionInlineStart()
162
+ callback: event => commandsPool.moveCellSelectionInlineStart(event)
163
163
  }, {
164
164
  keys: [['Shift', 'Tab']],
165
165
  // The property value is controlled by focusCatcher module (https://github.com/handsontable/handsontable/blob/master/handsontable/src/core/focusCatcher/index.js)
166
166
  preventDefault: false,
167
- callback: () => commandsPool.moveCellSelectionInlineEnd()
167
+ callback: event => commandsPool.moveCellSelectionInlineEnd(event)
168
168
  }, {
169
169
  keys: [['Control/Meta', 'Backspace']],
170
170
  callback: () => commandsPool.scrollToFocusedCell()
@@ -90,7 +90,8 @@ const createContext = name => {
90
90
  stopPropagation
91
91
  };
92
92
  if ((0, _mixed.isDefined)(relativeToGroup)) {
93
- [newShortcut.relativeToGroup, newShortcut.position] = [relativeToGroup, position];
93
+ newShortcut.relativeToGroup = relativeToGroup;
94
+ newShortcut.position = position;
94
95
  }
95
96
  if (isContextObject(forwardToContext)) {
96
97
  newShortcut.forwardToContext = forwardToContext;
@@ -86,7 +86,8 @@ export const createContext = name => {
86
86
  stopPropagation
87
87
  };
88
88
  if (isDefined(relativeToGroup)) {
89
- [newShortcut.relativeToGroup, newShortcut.position] = [relativeToGroup, position];
89
+ newShortcut.relativeToGroup = relativeToGroup;
90
+ newShortcut.position = position;
90
91
  }
91
92
  if (isContextObject(forwardToContext)) {
92
93
  newShortcut.forwardToContext = forwardToContext;
@@ -59,6 +59,7 @@ class LinkedList {
59
59
  * Add data to the end of linked list.
60
60
  *
61
61
  * @param {object} data Data which should be added.
62
+ * @returns {NodeStructure} Returns the node which has been added.
62
63
  */
63
64
  push(data) {
64
65
  const node = new NodeStructure(data);
@@ -71,6 +72,7 @@ class LinkedList {
71
72
  node.prev = temp;
72
73
  temp.next = node;
73
74
  }
75
+ return node;
74
76
  }
75
77
 
76
78
  /**
@@ -99,7 +101,10 @@ class LinkedList {
99
101
  inorder(callback) {
100
102
  let temp = this.first;
101
103
  while (temp) {
102
- callback(temp);
104
+ const interrupt = callback(temp);
105
+ if (temp === this.last || interrupt === true) {
106
+ break;
107
+ }
103
108
  temp = temp.next;
104
109
  }
105
110
  }
@@ -55,6 +55,7 @@ class LinkedList {
55
55
  * Add data to the end of linked list.
56
56
  *
57
57
  * @param {object} data Data which should be added.
58
+ * @returns {NodeStructure} Returns the node which has been added.
58
59
  */
59
60
  push(data) {
60
61
  const node = new NodeStructure(data);
@@ -67,6 +68,7 @@ class LinkedList {
67
68
  node.prev = temp;
68
69
  temp.next = node;
69
70
  }
71
+ return node;
70
72
  }
71
73
 
72
74
  /**
@@ -95,7 +97,10 @@ class LinkedList {
95
97
  inorder(callback) {
96
98
  let temp = this.first;
97
99
  while (temp) {
98
- callback(temp);
100
+ const interrupt = callback(temp);
101
+ if (temp === this.last || interrupt === true) {
102
+ break;
103
+ }
99
104
  temp = temp.next;
100
105
  }
101
106
  }