handsontable 0.0.0-next-4d6ac27-20240226 → 0.0.0-next-810eb21-20240227

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.

package/helpers/mixed.js CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
134
134
  function _injectProductInfo(key, element) {
135
135
  const hasValidType = !isEmpty(key);
136
136
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
137
- const hotVersion = "0.0.0-next-4d6ac27-20240226";
137
+ const hotVersion = "0.0.0-next-810eb21-20240227";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
package/helpers/mixed.mjs CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
124
124
  export function _injectProductInfo(key, element) {
125
125
  const hasValidType = !isEmpty(key);
126
126
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
127
- const hotVersion = "0.0.0-next-4d6ac27-20240226";
127
+ const hotVersion = "0.0.0-next-810eb21-20240227";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
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": "0.0.0-next-4d6ac27-20240226",
13
+ "version": "0.0.0-next-810eb21-20240227",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -174,6 +174,9 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
174
174
  function changeSelectedCheckboxesState() {
175
175
  let uncheckCheckbox = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
176
176
  const selRange = hotInstance.getSelectedRange();
177
+ const changesPerSubSelection = [];
178
+ let changes = [];
179
+ let changeCounter = 0;
177
180
  if (!selRange) {
178
181
  return;
179
182
  }
@@ -186,7 +189,6 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
186
189
  row: endRow,
187
190
  col: endColumn
188
191
  } = selRange[key].getBottomEndCorner();
189
- let changes = [];
190
192
  for (let visualRow = startRow; visualRow <= endRow; visualRow += 1) {
191
193
  for (let visualColumn = startColumn; visualColumn <= endColumn; visualColumn += 1) {
192
194
  const cachedCellProperties = hotInstance.getCellMeta(visualRow, visualColumn);
@@ -220,25 +222,33 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
220
222
  } else {
221
223
  changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate, templates]);
222
224
  }
225
+ changeCounter += 1;
223
226
  }
224
227
  }
225
- if (!changes.every(_ref => {
226
- let [,, cellValue] = _ref;
227
- return cellValue === changes[0][2];
228
- })) {
229
- changes = changes.map(_ref2 => {
230
- let [visualRow, visualColumn,, templates] = _ref2;
231
- return [visualRow, visualColumn, templates.checkedTemplate];
232
- });
233
- } else {
234
- changes = changes.map(_ref3 => {
235
- let [visualRow, visualColumn, cellValue] = _ref3;
236
- return [visualRow, visualColumn, cellValue];
237
- });
238
- }
239
- if (changes.length > 0) {
240
- hotInstance.setDataAtCell(changes);
241
- }
228
+ changesPerSubSelection.push(changeCounter);
229
+ changeCounter = 0;
230
+ }
231
+ if (!changes.every(_ref => {
232
+ let [,, cellValue] = _ref;
233
+ return cellValue === changes[0][2];
234
+ })) {
235
+ changes = changes.map(_ref2 => {
236
+ let [visualRow, visualColumn,, templates] = _ref2;
237
+ return [visualRow, visualColumn, templates.checkedTemplate];
238
+ });
239
+ } else {
240
+ changes = changes.map(_ref3 => {
241
+ let [visualRow, visualColumn, cellValue] = _ref3;
242
+ return [visualRow, visualColumn, cellValue];
243
+ });
244
+ }
245
+ if (changes.length > 0) {
246
+ // TODO: This is workaround for handsontable/dev-handsontable#1747 not being a breaking change.
247
+ // Technically, the changes don't need to be split into chunks when sent to `setDataAtCell`.
248
+ changesPerSubSelection.forEach(changesCount => {
249
+ const changesChunk = changes.splice(0, changesCount);
250
+ hotInstance.setDataAtCell(changesChunk);
251
+ });
242
252
  }
243
253
  }
244
254
 
@@ -169,6 +169,9 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
169
169
  function changeSelectedCheckboxesState() {
170
170
  let uncheckCheckbox = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
171
171
  const selRange = hotInstance.getSelectedRange();
172
+ const changesPerSubSelection = [];
173
+ let changes = [];
174
+ let changeCounter = 0;
172
175
  if (!selRange) {
173
176
  return;
174
177
  }
@@ -181,7 +184,6 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
181
184
  row: endRow,
182
185
  col: endColumn
183
186
  } = selRange[key].getBottomEndCorner();
184
- let changes = [];
185
187
  for (let visualRow = startRow; visualRow <= endRow; visualRow += 1) {
186
188
  for (let visualColumn = startColumn; visualColumn <= endColumn; visualColumn += 1) {
187
189
  const cachedCellProperties = hotInstance.getCellMeta(visualRow, visualColumn);
@@ -215,25 +217,33 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
215
217
  } else {
216
218
  changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate, templates]);
217
219
  }
220
+ changeCounter += 1;
218
221
  }
219
222
  }
220
- if (!changes.every(_ref => {
221
- let [,, cellValue] = _ref;
222
- return cellValue === changes[0][2];
223
- })) {
224
- changes = changes.map(_ref2 => {
225
- let [visualRow, visualColumn,, templates] = _ref2;
226
- return [visualRow, visualColumn, templates.checkedTemplate];
227
- });
228
- } else {
229
- changes = changes.map(_ref3 => {
230
- let [visualRow, visualColumn, cellValue] = _ref3;
231
- return [visualRow, visualColumn, cellValue];
232
- });
233
- }
234
- if (changes.length > 0) {
235
- hotInstance.setDataAtCell(changes);
236
- }
223
+ changesPerSubSelection.push(changeCounter);
224
+ changeCounter = 0;
225
+ }
226
+ if (!changes.every(_ref => {
227
+ let [,, cellValue] = _ref;
228
+ return cellValue === changes[0][2];
229
+ })) {
230
+ changes = changes.map(_ref2 => {
231
+ let [visualRow, visualColumn,, templates] = _ref2;
232
+ return [visualRow, visualColumn, templates.checkedTemplate];
233
+ });
234
+ } else {
235
+ changes = changes.map(_ref3 => {
236
+ let [visualRow, visualColumn, cellValue] = _ref3;
237
+ return [visualRow, visualColumn, cellValue];
238
+ });
239
+ }
240
+ if (changes.length > 0) {
241
+ // TODO: This is workaround for handsontable/dev-handsontable#1747 not being a breaking change.
242
+ // Technically, the changes don't need to be split into chunks when sent to `setDataAtCell`.
243
+ changesPerSubSelection.forEach(changesCount => {
244
+ const changesChunk = changes.splice(0, changesCount);
245
+ hotInstance.setDataAtCell(changesChunk);
246
+ });
237
247
  }
238
248
  }
239
249