handsontable 0.0.0-next-3d099da-20231208 → 0.0.0-next-51d3397-20231211

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 (129) 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 +1 -122
  8. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +2 -124
  9. package/3rdparty/walkontable/src/calculator/viewportRows.js +1 -1
  10. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +2 -3
  11. package/3rdparty/walkontable/src/core/_base.js +0 -12
  12. package/3rdparty/walkontable/src/core/_base.mjs +0 -12
  13. package/3rdparty/walkontable/src/core/core.js +0 -2
  14. package/3rdparty/walkontable/src/core/core.mjs +0 -2
  15. package/3rdparty/walkontable/src/facade/core.js +0 -9
  16. package/3rdparty/walkontable/src/facade/core.mjs +0 -9
  17. package/3rdparty/walkontable/src/index.js +3 -4
  18. package/3rdparty/walkontable/src/index.mjs +1 -2
  19. package/3rdparty/walkontable/src/overlays.js +0 -3
  20. package/3rdparty/walkontable/src/overlays.mjs +0 -4
  21. package/3rdparty/walkontable/src/renderer/colGroup.js +10 -0
  22. package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
  23. package/3rdparty/walkontable/src/renderer/rows.js +4 -3
  24. package/3rdparty/walkontable/src/renderer/rows.mjs +4 -3
  25. package/3rdparty/walkontable/src/selection/manager.js +0 -1
  26. package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
  27. package/3rdparty/walkontable/src/settings.js +3 -0
  28. package/3rdparty/walkontable/src/settings.mjs +2 -0
  29. package/3rdparty/walkontable/src/table.js +0 -1
  30. package/3rdparty/walkontable/src/table.mjs +0 -1
  31. package/3rdparty/walkontable/src/utils/column.js +27 -12
  32. package/3rdparty/walkontable/src/utils/column.mjs +27 -12
  33. package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
  34. package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
  35. package/3rdparty/walkontable/src/viewport.js +22 -17
  36. package/3rdparty/walkontable/src/viewport.mjs +23 -18
  37. package/base.js +4 -2
  38. package/base.mjs +2 -2
  39. package/core/focusCatcher/index.js +44 -6
  40. package/core/focusCatcher/index.mjs +44 -6
  41. package/core.js +0 -11
  42. package/core.mjs +0 -11
  43. package/dataMap/dataMap.js +1 -0
  44. package/dataMap/metaManager/metaSchema.js +28 -2
  45. package/dataMap/metaManager/metaSchema.mjs +28 -2
  46. package/dataMap/metaManager/mods/extendMetaProperties.js +12 -0
  47. package/dataMap/metaManager/mods/extendMetaProperties.mjs +12 -0
  48. package/dist/handsontable.css +2 -2
  49. package/dist/handsontable.full.css +3 -3
  50. package/dist/handsontable.full.js +3979 -5577
  51. package/dist/handsontable.full.min.css +3 -3
  52. package/dist/handsontable.full.min.js +66 -71
  53. package/dist/handsontable.js +3058 -4305
  54. package/dist/handsontable.min.css +2 -2
  55. package/dist/handsontable.min.js +35 -39
  56. package/editorManager.js +3 -4
  57. package/editorManager.mjs +3 -4
  58. package/editors/autocompleteEditor/autocompleteEditor.js +0 -2
  59. package/editors/autocompleteEditor/autocompleteEditor.mjs +0 -2
  60. package/editors/dateEditor/dateEditor.d.ts +1 -1
  61. package/editors/dateEditor/dateEditor.js +4 -1
  62. package/editors/dateEditor/dateEditor.mjs +4 -1
  63. package/editors/handsontableEditor/handsontableEditor.js +0 -1
  64. package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
  65. package/editors/textEditor/textEditor.js +0 -4
  66. package/editors/textEditor/textEditor.mjs +0 -4
  67. package/helpers/browser.js +5 -2
  68. package/helpers/browser.mjs +5 -2
  69. package/helpers/feature.js +10 -0
  70. package/helpers/feature.mjs +9 -0
  71. package/helpers/mixed.js +1 -1
  72. package/helpers/mixed.mjs +1 -1
  73. package/package.json +3 -4
  74. package/pluginHooks.d.ts +6 -29
  75. package/pluginHooks.js +65 -123
  76. package/pluginHooks.mjs +62 -122
  77. package/plugins/copyPaste/clipboardData.js +18 -0
  78. package/plugins/copyPaste/clipboardData.mjs +14 -0
  79. package/plugins/copyPaste/copyPaste.js +129 -51
  80. package/plugins/copyPaste/copyPaste.mjs +132 -54
  81. package/plugins/copyPaste/copyableRanges.js +43 -7
  82. package/plugins/copyPaste/copyableRanges.mjs +42 -7
  83. package/plugins/copyPaste/pasteEvent.mjs +1 -1
  84. package/plugins/customBorders/customBorders.js +0 -5
  85. package/plugins/customBorders/customBorders.mjs +0 -5
  86. package/plugins/customBorders/utils.js +0 -1
  87. package/plugins/customBorders/utils.mjs +0 -1
  88. package/plugins/filters/ui/radioInput.js +1 -1
  89. package/plugins/filters/ui/radioInput.mjs +1 -1
  90. package/plugins/formulas/formulas.js +0 -2
  91. package/plugins/formulas/formulas.mjs +0 -2
  92. package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
  93. package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
  94. package/plugins/manualColumnResize/manualColumnResize.js +0 -1
  95. package/plugins/manualColumnResize/manualColumnResize.mjs +0 -1
  96. package/plugins/mergeCells/mergeCells.js +1 -127
  97. package/plugins/mergeCells/mergeCells.mjs +1 -127
  98. package/plugins/nestedHeaders/nestedHeaders.js +41 -87
  99. package/plugins/nestedHeaders/nestedHeaders.mjs +42 -88
  100. package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
  101. package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
  102. package/plugins/undoRedo/undoRedo.js +0 -2
  103. package/plugins/undoRedo/undoRedo.mjs +0 -2
  104. package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -1
  105. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +0 -1
  106. package/renderers/checkboxRenderer/checkboxRenderer.js +0 -2
  107. package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -2
  108. package/selection/highlight/highlight.js +0 -1
  109. package/selection/highlight/highlight.mjs +0 -1
  110. package/selection/index.js +1 -3
  111. package/selection/index.mjs +2 -2
  112. package/selection/utils.js +0 -34
  113. package/selection/utils.mjs +0 -33
  114. package/settings.d.ts +2 -1
  115. package/tableView.js +1 -2
  116. package/tableView.mjs +1 -2
  117. package/translations/indexMapper.js +2 -1
  118. package/utils/parseTable.js +84 -538
  119. package/utils/parseTable.mjs +83 -534
  120. package/validators/timeValidator/timeValidator.js +0 -1
  121. package/validators/timeValidator/timeValidator.mjs +0 -1
  122. package/plugins/copyPaste/clipboardData/clipboardData.js +0 -588
  123. package/plugins/copyPaste/clipboardData/clipboardData.mjs +0 -584
  124. package/plugins/copyPaste/clipboardData/copyClipboardData.js +0 -69
  125. package/plugins/copyPaste/clipboardData/copyClipboardData.mjs +0 -65
  126. package/plugins/copyPaste/clipboardData/index.js +0 -9
  127. package/plugins/copyPaste/clipboardData/index.mjs +0 -4
  128. package/plugins/copyPaste/clipboardData/pasteClipboardData.js +0 -81
  129. package/plugins/copyPaste/clipboardData/pasteClipboardData.mjs +0 -77
@@ -17,11 +17,10 @@ import { isNumeric, clamp } from "../../helpers/number.mjs";
17
17
  import { toSingleLine } from "../../helpers/templateLiteralTag.mjs";
18
18
  import { isLeftClick, isRightClick } from "../../helpers/dom/event.mjs";
19
19
  import { warn } from "../../helpers/console.mjs";
20
- import { ACTIVE_HEADER_TYPE, HEADER_TYPE, transformRangeLikeToIndexes } from "../../selection/index.mjs";
20
+ import { ACTIVE_HEADER_TYPE, HEADER_TYPE } from "../../selection/index.mjs";
21
21
  import { BasePlugin } from "../base/index.mjs";
22
22
  import StateManager from "./stateManager/index.mjs";
23
23
  import GhostTable from "./utils/ghostTable.mjs";
24
- import { arrayEach } from "../../helpers/array.mjs";
25
24
  export const PLUGIN_KEY = 'nestedHeaders';
26
25
  export const PLUGIN_PRIORITY = 280;
27
26
 
@@ -98,7 +97,6 @@ export class NestedHeaders extends BasePlugin {
98
97
  /**
99
98
  * Updates the plugin state after new dataset load.
100
99
  *
101
- * @private
102
100
  * @param {Array[]} sourceData Array of arrays or array of objects containing data.
103
101
  * @param {boolean} initialLoad Flag that determines whether the data has been loaded
104
102
  * during the initialization.
@@ -106,14 +104,11 @@ export class NestedHeaders extends BasePlugin {
106
104
  _classPrivateMethodInitSpec(this, _onAfterLoadData);
107
105
  /**
108
106
  * Updates the plugin state after HoT initialization.
109
- *
110
- * @private
111
107
  */
112
108
  _classPrivateMethodInitSpec(this, _onInit);
113
109
  /**
114
110
  * `modifyFocusedElement` hook callback.
115
111
  *
116
- * @private
117
112
  * @param {number} row Row index.
118
113
  * @param {number} column Column index.
119
114
  * @returns {HTMLTableCellElement} The `TH` element to be focused.
@@ -123,7 +118,6 @@ export class NestedHeaders extends BasePlugin {
123
118
  * Listens the `modifyColumnHeaderValue` hook that overwrites the column headers values based on
124
119
  * the internal state and settings of the plugin.
125
120
  *
126
- * @private
127
121
  * @param {string} value The column header value.
128
122
  * @param {number} visualColumnIndex The visual column index.
129
123
  * @param {number} headerLevel The index of header level. The header level accepts positive (0 to N)
@@ -136,7 +130,6 @@ export class NestedHeaders extends BasePlugin {
136
130
  /**
137
131
  * `modifyColWidth` hook callback - returns width from cache, when is greater than incoming from hook.
138
132
  *
139
- * @private
140
133
  * @param {number} width Width from hook.
141
134
  * @param {number} column Visual index of an column.
142
135
  * @returns {number}
@@ -145,14 +138,12 @@ export class NestedHeaders extends BasePlugin {
145
138
  /**
146
139
  * Make the renderer render the first nested column in its entirety.
147
140
  *
148
- * @private
149
141
  * @param {object} calc Viewport column calculator.
150
142
  */
151
143
  _classPrivateMethodInitSpec(this, _onAfterViewportColumnCalculatorOverride);
152
144
  /**
153
145
  * `afterGetColumnHeader` hook callback - prepares the header structure.
154
146
  *
155
- * @private
156
147
  * @param {Array} renderersArray Array of renderers.
157
148
  */
158
149
  _classPrivateMethodInitSpec(this, _onAfterGetColumnHeaderRenderers);
@@ -160,7 +151,6 @@ export class NestedHeaders extends BasePlugin {
160
151
  * The hook observes the column selection from the Selection API and modifies the column range to
161
152
  * ensure that the whole nested column will be covered.
162
153
  *
163
- * @private
164
154
  * @param {CellCoords} from The coords object where the selection starts.
165
155
  * @param {CellCoords} to The coords object where the selection ends.
166
156
  */
@@ -168,27 +158,21 @@ export class NestedHeaders extends BasePlugin {
168
158
  /**
169
159
  * `modifyTransformStart` hook is called every time the keyboard navigation is used.
170
160
  *
171
- * @private
172
161
  * @param {object} delta The transformation delta.
173
162
  */
174
163
  _classPrivateMethodInitSpec(this, _onModifyTransformStart);
175
164
  /**
176
165
  * The hook checks and ensures that the focus position that depends on the selected columns
177
166
  * range is always positioned within the range.
178
- *
179
- * @private
180
167
  */
181
168
  _classPrivateMethodInitSpec(this, _onBeforeSelectionHighlightSet);
182
169
  /**
183
170
  * Switches internal flag about selection progress to `false`.
184
- *
185
- * @private
186
171
  */
187
172
  _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseUp);
188
173
  /**
189
174
  * Makes the header-selection properly select the nested headers.
190
175
  *
191
- * @private
192
176
  * @param {MouseEvent} event Mouse event.
193
177
  * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
194
178
  * @param {HTMLElement} TD The cell element.
@@ -199,7 +183,6 @@ export class NestedHeaders extends BasePlugin {
199
183
  /**
200
184
  * Allows to control how the column selection based on the coordinates and the nested headers is made.
201
185
  *
202
- * @private
203
186
  * @param {MouseEvent} event Mouse event.
204
187
  * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
205
188
  */
@@ -207,7 +190,6 @@ export class NestedHeaders extends BasePlugin {
207
190
  /**
208
191
  * Allows blocking the column selection that is controlled by the core Selection module.
209
192
  *
210
- * @private
211
193
  * @param {MouseEvent} event Mouse event.
212
194
  * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
213
195
  * @param {CellCoords} TD The table cell or header element.
@@ -221,23 +203,16 @@ export class NestedHeaders extends BasePlugin {
221
203
  * of the column.
222
204
  *
223
205
  * @private
224
- * @param {object} clipboardData Information about already performed copy action.
225
- * @param {Function} clipboardData.removeRow Remove row from the copied/pasted dataset.
226
- * @param {Function} clipboardData.removeColumn Remove column from the copied/pasted dataset.
227
- * @param {Function} clipboardData.insertAtRow Insert values at row index.
228
- * @param {Function} clipboardData.insertAtColumn Insert values at column index.
229
- * @param {Function} clipboardData.setCellAt Change headers or cells in the copied/pasted dataset.
230
- * @param {Function} clipboardData.getCellAt Get headers or cells from the copied/pasted dataset.
231
- * @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
232
- * @param {Function} clipboardData.getMetaInfo Gets grid settings for copied data.
233
- * @param {Function} clipboardData.setMetaInfo Sets grid settings for copied data.
234
- * @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
206
+ * @param {Array[]} data An array of arrays which contains data to copied.
207
+ * @param {object[]} copyableRanges An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
208
+ * which will copied.
209
+ * @param {{ columnHeadersCount: number }} copiedHeadersCount An object with keys that holds information with
210
+ * the number of copied headers.
235
211
  */
236
212
  _classPrivateMethodInitSpec(this, _onBeforeCopy);
237
213
  /**
238
214
  * Allows to control which header DOM element will be used to highlight.
239
215
  *
240
- * @private
241
216
  * @param {number} visualColumn A visual column index of the highlighted row header.
242
217
  * @param {number} headerLevel A row header level that is currently highlighted.
243
218
  * @param {object} highlightMeta An object with meta data that describes the highlight state.
@@ -249,7 +224,6 @@ export class NestedHeaders extends BasePlugin {
249
224
  * is scrolled to the correct column for the nested header the most left and the most right visual column
250
225
  * indexes are used.
251
226
  *
252
- * @private
253
227
  * @param {number} visualColumn A visual column index to which the viewport will be scrolled.
254
228
  * @returns {number}
255
229
  */
@@ -257,8 +231,6 @@ export class NestedHeaders extends BasePlugin {
257
231
  /**
258
232
  * Updates the selection focus highlight position to point to the nested header root element (TH)
259
233
  * even when the logical coordinates point in-between the header.
260
- *
261
- * @private
262
234
  */
263
235
  _classPrivateMethodInitSpec(this, _updateFocusHighlightPosition);
264
236
  /**
@@ -749,60 +721,42 @@ function _onBeforeHighlightingColumnHeader2(visualColumn, headerLevel, highlight
749
721
  }
750
722
  return visualColumn;
751
723
  }
752
- function _onBeforeCopy2(clipboardData) {
753
- const {
754
- rows,
755
- columns
756
- } = transformRangeLikeToIndexes(clipboardData.getRanges());
757
- const headers = rows.filter(row => row < 0);
758
- const nestedHeaders = [];
759
- headers.forEach(header => {
760
- const headersForLevel = [];
761
- arrayEach(columns, (column, index) => {
762
- const headerSettings = this.getHeaderSettings(header, column);
763
- if (headerSettings === null) {
764
- headersForLevel.push(this.hot.getColHeader(column, header));
765
- return;
766
- }
767
- const {
768
- isPlaceholder
769
- } = headerSettings;
770
- const columnsToEnd = columns.slice(index).length;
771
- const headerTreeNodeData = this.getStateManager().getHeaderTreeNodeData(header, column);
772
- if (index === 0 && isPlaceholder === true) {
773
- const {
774
- label,
775
- origColspan: colspan,
776
- columnIndex
777
- } = headerTreeNodeData;
778
- const columnFromStart = column - columnIndex;
779
- const reducedColspan = Math.min(colspan - columnFromStart, columnsToEnd);
780
- if (reducedColspan > 1) {
781
- headersForLevel.push({
782
- label,
783
- colspan: reducedColspan
784
- });
785
- } else {
786
- headersForLevel.push(label);
724
+ function _onBeforeCopy2(data, copyableRanges, _ref2) {
725
+ let {
726
+ columnHeadersCount
727
+ } = _ref2;
728
+ if (columnHeadersCount === 0) {
729
+ return;
730
+ }
731
+ for (let rangeIndex = 0; rangeIndex < copyableRanges.length; rangeIndex++) {
732
+ const {
733
+ startRow,
734
+ startCol,
735
+ endRow,
736
+ endCol
737
+ } = copyableRanges[rangeIndex];
738
+ const rowsCount = endRow - startRow + 1;
739
+ const columnsCount = startCol - endCol + 1;
740
+
741
+ // do not process dataset ranges and column headers where only one column is copied
742
+ if (startRow >= 0 || columnsCount === 1) {
743
+ break;
744
+ }
745
+ for (let column = startCol; column <= endCol; column++) {
746
+ for (let row = startRow; row <= endRow; row++) {
747
+ var _classPrivateFieldGet4;
748
+ const zeroBasedColumnHeaderLevel = rowsCount + row;
749
+ const zeroBasedColumnIndex = column - startCol;
750
+ if (zeroBasedColumnIndex === 0) {
751
+ continue; // eslint-disable-line no-continue
752
+ }
753
+ const isRoot = (_classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(row, column)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.isRoot;
754
+ if (isRoot === false) {
755
+ data[zeroBasedColumnHeaderLevel][zeroBasedColumnIndex] = '';
787
756
  }
788
- } else if (isPlaceholder === false) {
789
- const {
790
- label,
791
- origColspan: colspan,
792
- columnIndex
793
- } = headerTreeNodeData;
794
- const columnFromStart = column - columnIndex;
795
- const reducedColspan = Math.min(colspan - columnFromStart, columnsToEnd);
796
- headersForLevel.push(reducedColspan > 1 ? {
797
- label,
798
- colspan: reducedColspan
799
- } : label);
800
757
  }
801
- });
802
- nestedHeaders.push(headersForLevel);
803
- });
804
- clipboardData.setMetaInfo('colHeaders', null);
805
- clipboardData.setMetaInfo('nestedHeaders', nestedHeaders);
758
+ }
759
+ }
806
760
  }
807
761
  function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
808
762
  const headerNodeData = this._getHeaderTreeNodeDataByCoords(coords);
@@ -1005,10 +959,10 @@ function _onModifyColWidth2(width, column) {
1005
959
  return width > cachedWidth ? width : cachedWidth;
1006
960
  }
1007
961
  function _onModifyColumnHeaderValue2(value, visualColumnIndex, headerLevel) {
1008
- var _classPrivateFieldGet4;
962
+ var _classPrivateFieldGet5;
1009
963
  const {
1010
964
  label
1011
- } = (_classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet4 !== void 0 ? _classPrivateFieldGet4 : {
965
+ } = (_classPrivateFieldGet5 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet5 !== void 0 ? _classPrivateFieldGet5 : {
1012
966
  label: ''
1013
967
  };
1014
968
  return label;
@@ -144,7 +144,6 @@ class HeadersTree {
144
144
  treeNode.data.isRoot = columnIndex === treeNode.data.columnIndex;
145
145
  return false; // Cancel tree traversing.
146
146
  }
147
-
148
147
  columnCursor += origColspan;
149
148
  }
150
149
  });
@@ -140,7 +140,6 @@ export default class HeadersTree {
140
140
  treeNode.data.isRoot = columnIndex === treeNode.data.columnIndex;
141
141
  return false; // Cancel tree traversing.
142
142
  }
143
-
144
143
  columnCursor += origColspan;
145
144
  }
146
145
  });
@@ -396,7 +396,6 @@ UndoRedo.CreateRowAction.prototype.undo = function (instance, undoneCallback) {
396
396
  if (this.index >= rowCount && this.index - minSpareRows < rowCount) {
397
397
  this.index -= minSpareRows; // work around the situation where the needed row was removed due to an 'undo' of a made change
398
398
  }
399
-
400
399
  instance.addHookOnce('afterRemoveRow', undoneCallback);
401
400
  instance.alter('remove_row', this.index, this.amount, 'UndoRedo.undo');
402
401
  };
@@ -716,7 +715,6 @@ UndoRedo.prototype.registerShortcuts = function () {
716
715
  const runOnlyIf = event => {
717
716
  return !event.altKey; // right ALT in some systems triggers ALT+CTR
718
717
  };
719
-
720
718
  const config = {
721
719
  runOnlyIf,
722
720
  group: SHORTCUTS_GROUP
@@ -392,7 +392,6 @@ UndoRedo.CreateRowAction.prototype.undo = function (instance, undoneCallback) {
392
392
  if (this.index >= rowCount && this.index - minSpareRows < rowCount) {
393
393
  this.index -= minSpareRows; // work around the situation where the needed row was removed due to an 'undo' of a made change
394
394
  }
395
-
396
395
  instance.addHookOnce('afterRemoveRow', undoneCallback);
397
396
  instance.alter('remove_row', this.index, this.amount, 'UndoRedo.undo');
398
397
  };
@@ -712,7 +711,6 @@ UndoRedo.prototype.registerShortcuts = function () {
712
711
  const runOnlyIf = event => {
713
712
  return !event.altKey; // right ALT in some systems triggers ALT+CTR
714
713
  };
715
-
716
714
  const config = {
717
715
  runOnlyIf,
718
716
  group: SHORTCUTS_GROUP
@@ -41,7 +41,6 @@ function autocompleteRenderer(hotInstance, TD, row, col, prop, value, cellProper
41
41
  TD.appendChild(rootDocument.createTextNode(String.fromCharCode(160))); // workaround for https://github.com/handsontable/handsontable/issues/1946
42
42
  // this is faster than innerHTML. See: https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips
43
43
  }
44
-
45
44
  TD.insertBefore(ARROW, TD.firstChild);
46
45
  (0, _element.addClass)(TD, 'htAutocomplete');
47
46
  if (!hotInstance.acArrowListener) {
@@ -36,7 +36,6 @@ export function autocompleteRenderer(hotInstance, TD, row, col, prop, value, cel
36
36
  TD.appendChild(rootDocument.createTextNode(String.fromCharCode(160))); // workaround for https://github.com/handsontable/handsontable/issues/1946
37
37
  // this is faster than innerHTML. See: https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips
38
38
  }
39
-
40
39
  TD.insertBefore(ARROW, TD.firstChild);
41
40
  addClass(TD, 'htAutocomplete');
42
41
  if (!hotInstance.acArrowListener) {
@@ -153,7 +153,6 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
153
153
  changeSelectedCheckboxesState();
154
154
  return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
155
155
  },
156
-
157
156
  runOnlyIf: () => hotInstance.getSettings().enterBeginsEditing
158
157
  }, {
159
158
  keys: [['delete'], ['backspace']],
@@ -161,7 +160,6 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
161
160
  changeSelectedCheckboxesState(true);
162
161
  return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
163
162
  },
164
-
165
163
  relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
166
164
  position: 'before'
167
165
  }], config);
@@ -148,7 +148,6 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
148
148
  changeSelectedCheckboxesState();
149
149
  return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
150
150
  },
151
-
152
151
  runOnlyIf: () => hotInstance.getSettings().enterBeginsEditing
153
152
  }, {
154
153
  keys: [['delete'], ['backspace']],
@@ -156,7 +155,6 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
156
155
  changeSelectedCheckboxesState(true);
157
156
  return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
158
157
  },
159
-
160
158
  relativeToGroup: SHORTCUTS_GROUP_EDITOR,
161
159
  position: 'before'
162
160
  }], config);
@@ -178,7 +178,6 @@ class Highlight {
178
178
  if (highlightType === _src.HIGHLIGHT_FOCUS_TYPE) {
179
179
  type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
180
180
  }
181
-
182
181
  let disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
183
182
  if (typeof disableHighlight === 'string') {
184
183
  disableHighlight = [disableHighlight];
@@ -169,7 +169,6 @@ class Highlight {
169
169
  if (highlightType === HIGHLIGHT_FOCUS_TYPE) {
170
170
  type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
171
171
  }
172
-
173
172
  let disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
174
173
  if (typeof disableHighlight === 'string') {
175
174
  disableHighlight = [disableHighlight];
@@ -5,8 +5,7 @@ var _exportNames = {
5
5
  Selection: true,
6
6
  handleMouseEvent: true,
7
7
  detectSelectionType: true,
8
- normalizeSelectionFactory: true,
9
- transformRangeLikeToIndexes: true
8
+ normalizeSelectionFactory: true
10
9
  };
11
10
  var _selection = _interopRequireDefault(require("./selection"));
12
11
  exports.Selection = _selection.default;
@@ -15,7 +14,6 @@ exports.handleMouseEvent = _mouseEventHandler.handleMouseEvent;
15
14
  var _utils = require("./utils");
16
15
  exports.detectSelectionType = _utils.detectSelectionType;
17
16
  exports.normalizeSelectionFactory = _utils.normalizeSelectionFactory;
18
- exports.transformRangeLikeToIndexes = _utils.transformRangeLikeToIndexes;
19
17
  var _highlight = require("./highlight/highlight");
20
18
  Object.keys(_highlight).forEach(function (key) {
21
19
  if (key === "default" || key === "__esModule") return;
@@ -1,5 +1,5 @@
1
1
  import Selection from "./selection.mjs";
2
2
  import { handleMouseEvent } from "./mouseEventHandler.mjs";
3
- import { detectSelectionType, normalizeSelectionFactory, transformRangeLikeToIndexes } from "./utils.mjs";
3
+ import { detectSelectionType, normalizeSelectionFactory } from "./utils.mjs";
4
4
  export * from "./highlight/highlight.mjs";
5
- export { handleMouseEvent, Selection, detectSelectionType, normalizeSelectionFactory, transformRangeLikeToIndexes };
5
+ export { handleMouseEvent, Selection, detectSelectionType, normalizeSelectionFactory };
@@ -3,7 +3,6 @@
3
3
  exports.__esModule = true;
4
4
  exports.detectSelectionType = detectSelectionType;
5
5
  exports.normalizeSelectionFactory = normalizeSelectionFactory;
6
- exports.transformRangeLikeToIndexes = transformRangeLikeToIndexes;
7
6
  exports.transformSelectionToColumnDistance = transformSelectionToColumnDistance;
8
7
  exports.transformSelectionToRowDistance = transformSelectionToRowDistance;
9
8
  require("core-js/modules/es.error.cause.js");
@@ -11,7 +10,6 @@ require("core-js/modules/es.array.push.js");
11
10
  var _src = require("./../3rdparty/walkontable/src");
12
11
  var _array = require("./../helpers/array");
13
12
  var _mixed = require("./../helpers/mixed");
14
- var _number = require("../helpers/number");
15
13
  const SELECTION_TYPE_UNRECOGNIZED = exports.SELECTION_TYPE_UNRECOGNIZED = 0;
16
14
  const SELECTION_TYPE_EMPTY = exports.SELECTION_TYPE_EMPTY = 1;
17
15
  const SELECTION_TYPE_ARRAY = exports.SELECTION_TYPE_ARRAY = 2;
@@ -217,36 +215,4 @@ function transformSelectionToRowDistance(hotInstance) {
217
215
  return acc;
218
216
  }, []);
219
217
  return normalizedRowRanges;
220
- }
221
-
222
- /**
223
- * Returns an object with `rows` and `columns` keys. The arrays contains sorted indexes
224
- * generated according to the given `ranges` array.
225
- *
226
- * @param {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>} ranges The range to process.
227
- * @returns {{rows: number[], columns: number[]}}
228
- */
229
- function transformRangeLikeToIndexes(ranges) {
230
- const rows = [];
231
- const columns = [];
232
- (0, _array.arrayEach)(ranges, range => {
233
- const minRow = Math.min(range.startRow, range.endRow);
234
- const maxRow = Math.max(range.startRow, range.endRow);
235
- (0, _number.rangeEach)(minRow, maxRow, row => {
236
- if (rows.indexOf(row) === -1) {
237
- rows.push(row);
238
- }
239
- });
240
- const minColumn = Math.min(range.startCol, range.endCol);
241
- const maxColumn = Math.max(range.startCol, range.endCol);
242
- (0, _number.rangeEach)(minColumn, maxColumn, column => {
243
- if (columns.indexOf(column) === -1) {
244
- columns.push(column);
245
- }
246
- });
247
- });
248
- return {
249
- rows,
250
- columns
251
- };
252
218
  }
@@ -3,7 +3,6 @@ import "core-js/modules/es.array.push.js";
3
3
  import { CellRange } from "./../3rdparty/walkontable/src/index.mjs";
4
4
  import { arrayEach, arrayReduce } from "./../helpers/array.mjs";
5
5
  import { isUndefined } from "./../helpers/mixed.mjs";
6
- import { rangeEach } from "../helpers/number.mjs";
7
6
  export const SELECTION_TYPE_UNRECOGNIZED = 0;
8
7
  export const SELECTION_TYPE_EMPTY = 1;
9
8
  export const SELECTION_TYPE_ARRAY = 2;
@@ -209,36 +208,4 @@ export function transformSelectionToRowDistance(hotInstance) {
209
208
  return acc;
210
209
  }, []);
211
210
  return normalizedRowRanges;
212
- }
213
-
214
- /**
215
- * Returns an object with `rows` and `columns` keys. The arrays contains sorted indexes
216
- * generated according to the given `ranges` array.
217
- *
218
- * @param {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>} ranges The range to process.
219
- * @returns {{rows: number[], columns: number[]}}
220
- */
221
- export function transformRangeLikeToIndexes(ranges) {
222
- const rows = [];
223
- const columns = [];
224
- arrayEach(ranges, range => {
225
- const minRow = Math.min(range.startRow, range.endRow);
226
- const maxRow = Math.max(range.startRow, range.endRow);
227
- rangeEach(minRow, maxRow, row => {
228
- if (rows.indexOf(row) === -1) {
229
- rows.push(row);
230
- }
231
- });
232
- const minColumn = Math.min(range.startCol, range.endCol);
233
- const maxColumn = Math.max(range.startCol, range.endCol);
234
- rangeEach(minColumn, maxColumn, column => {
235
- if (columns.indexOf(column) === -1) {
236
- columns.push(column);
237
- }
238
- });
239
- });
240
- return {
241
- rows,
242
- columns
243
- };
244
211
  }
package/settings.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PikadayOptions } from 'pikaday';
1
+ import { PikadayOptions } from '@handsontable/pikaday';
2
2
  import Core from './core';
3
3
  import { Events } from './pluginHooks';
4
4
  import {
@@ -181,6 +181,7 @@ export interface GridSettings extends Events {
181
181
  preventWheel?: boolean;
182
182
  readOnly?: boolean;
183
183
  readOnlyCellClassName?: string;
184
+ renderAllColumns?: boolean;
184
185
  renderAllRows?: boolean;
185
186
  renderer?: RendererType | string | BaseRenderer;
186
187
  rowHeaders?: boolean | string[] | ((index: number) => string);
package/tableView.js CHANGED
@@ -280,7 +280,6 @@ class TableView {
280
280
  if (originalStyle) {
281
281
  rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions
282
282
  }
283
-
284
283
  (0, _element.addClass)(rootElement, 'handsontable');
285
284
  _classPrivateFieldSet(this, _table, rootDocument.createElement('TABLE'));
286
285
  (0, _element.addClass)(_classPrivateFieldGet(this, _table), 'htCore');
@@ -322,7 +321,6 @@ class TableView {
322
321
  rootWindow.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.
323
322
  }
324
323
  });
325
-
326
324
  this.eventManager.addEventListener(rootElement, 'mouseup', () => {
327
325
  _classPrivateFieldSet(this, _selectionMouseDown, false);
328
326
  });
@@ -670,6 +668,7 @@ class TableView {
670
668
  },
671
669
  minSpareRows: () => this.settings.minSpareRows,
672
670
  renderAllRows: this.settings.renderAllRows,
671
+ renderAllColumns: this.settings.renderAllColumns,
673
672
  rowHeaders: () => {
674
673
  const headerRenderers = [];
675
674
  if (this.hot.hasRowHeaders()) {
package/tableView.mjs CHANGED
@@ -276,7 +276,6 @@ class TableView {
276
276
  if (originalStyle) {
277
277
  rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions
278
278
  }
279
-
280
279
  addClass(rootElement, 'handsontable');
281
280
  _classPrivateFieldSet(this, _table, rootDocument.createElement('TABLE'));
282
281
  addClass(_classPrivateFieldGet(this, _table), 'htCore');
@@ -318,7 +317,6 @@ class TableView {
318
317
  rootWindow.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.
319
318
  }
320
319
  });
321
-
322
320
  this.eventManager.addEventListener(rootElement, 'mouseup', () => {
323
321
  _classPrivateFieldSet(this, _selectionMouseDown, false);
324
322
  });
@@ -666,6 +664,7 @@ class TableView {
666
664
  },
667
665
  minSpareRows: () => this.settings.minSpareRows,
668
666
  renderAllRows: this.settings.renderAllRows,
667
+ renderAllColumns: this.settings.renderAllColumns,
669
668
  rowHeaders: () => {
670
669
  const headerRenderers = [];
671
670
  if (this.hot.hasRowHeaders()) {
@@ -17,7 +17,8 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
17
17
  * A set of deprecated feature names.
18
18
  *
19
19
  * @type {Set<string>}
20
- */ // eslint-disable-next-line no-unused-vars
20
+ */
21
+ // eslint-disable-next-line no-unused-vars
21
22
  const deprecationWarns = new Set();
22
23
 
23
24
  /**