handsontable 0.0.0-next-bb2f966-20240222 → 0.0.0-next-4832dd2-20240223
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/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +27 -9
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +4 -4
- package/dist/handsontable.js +27 -9
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +4 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +22 -4
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +22 -4
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-
|
137
|
+
const hotVersion = "0.0.0-next-4832dd2-20240223";
|
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-
|
127
|
+
const hotVersion = "0.0.0-next-4832dd2-20240223";
|
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-
|
13
|
+
"version": "0.0.0-next-4832dd2-20240223",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
@@ -186,10 +186,14 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
|
|
186
186
|
row: endRow,
|
187
187
|
col: endColumn
|
188
188
|
} = selRange[key].getBottomEndCorner();
|
189
|
-
|
189
|
+
let changes = [];
|
190
190
|
for (let visualRow = startRow; visualRow <= endRow; visualRow += 1) {
|
191
191
|
for (let visualColumn = startColumn; visualColumn <= endColumn; visualColumn += 1) {
|
192
192
|
const cachedCellProperties = hotInstance.getCellMeta(visualRow, visualColumn);
|
193
|
+
const templates = {
|
194
|
+
checkedTemplate: cachedCellProperties.checkedTemplate,
|
195
|
+
uncheckedTemplate: cachedCellProperties.uncheckedTemplate
|
196
|
+
};
|
193
197
|
if (cachedCellProperties.type !== 'checkbox') {
|
194
198
|
return;
|
195
199
|
}
|
@@ -208,16 +212,30 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
|
|
208
212
|
if (uncheckCheckbox === false) {
|
209
213
|
if ([cachedCellProperties.checkedTemplate, cachedCellProperties.checkedTemplate.toString()].includes(dataAtCell)) {
|
210
214
|
// eslint-disable-line max-len
|
211
|
-
changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate]);
|
215
|
+
changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate, templates]);
|
212
216
|
} else if ([cachedCellProperties.uncheckedTemplate, cachedCellProperties.uncheckedTemplate.toString(), null, undefined].includes(dataAtCell)) {
|
213
217
|
// eslint-disable-line max-len
|
214
|
-
changes.push([visualRow, visualColumn, cachedCellProperties.checkedTemplate]);
|
218
|
+
changes.push([visualRow, visualColumn, cachedCellProperties.checkedTemplate, templates]);
|
215
219
|
}
|
216
220
|
} else {
|
217
|
-
changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate]);
|
221
|
+
changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate, templates]);
|
218
222
|
}
|
219
223
|
}
|
220
224
|
}
|
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
|
+
}
|
221
239
|
if (changes.length > 0) {
|
222
240
|
hotInstance.setDataAtCell(changes);
|
223
241
|
}
|
@@ -181,10 +181,14 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
|
|
181
181
|
row: endRow,
|
182
182
|
col: endColumn
|
183
183
|
} = selRange[key].getBottomEndCorner();
|
184
|
-
|
184
|
+
let changes = [];
|
185
185
|
for (let visualRow = startRow; visualRow <= endRow; visualRow += 1) {
|
186
186
|
for (let visualColumn = startColumn; visualColumn <= endColumn; visualColumn += 1) {
|
187
187
|
const cachedCellProperties = hotInstance.getCellMeta(visualRow, visualColumn);
|
188
|
+
const templates = {
|
189
|
+
checkedTemplate: cachedCellProperties.checkedTemplate,
|
190
|
+
uncheckedTemplate: cachedCellProperties.uncheckedTemplate
|
191
|
+
};
|
188
192
|
if (cachedCellProperties.type !== 'checkbox') {
|
189
193
|
return;
|
190
194
|
}
|
@@ -203,16 +207,30 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
|
|
203
207
|
if (uncheckCheckbox === false) {
|
204
208
|
if ([cachedCellProperties.checkedTemplate, cachedCellProperties.checkedTemplate.toString()].includes(dataAtCell)) {
|
205
209
|
// eslint-disable-line max-len
|
206
|
-
changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate]);
|
210
|
+
changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate, templates]);
|
207
211
|
} else if ([cachedCellProperties.uncheckedTemplate, cachedCellProperties.uncheckedTemplate.toString(), null, undefined].includes(dataAtCell)) {
|
208
212
|
// eslint-disable-line max-len
|
209
|
-
changes.push([visualRow, visualColumn, cachedCellProperties.checkedTemplate]);
|
213
|
+
changes.push([visualRow, visualColumn, cachedCellProperties.checkedTemplate, templates]);
|
210
214
|
}
|
211
215
|
} else {
|
212
|
-
changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate]);
|
216
|
+
changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate, templates]);
|
213
217
|
}
|
214
218
|
}
|
215
219
|
}
|
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
|
+
}
|
216
234
|
if (changes.length > 0) {
|
217
235
|
hotInstance.setDataAtCell(changes);
|
218
236
|
}
|