handsontable 0.0.0-next-dd75280-20240429 → 0.0.0-next-9daae4b-20240507
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.
- package/3rdparty/walkontable/src/utils/columnStretching.js +4 -0
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +4 -0
- 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 +51 -19
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +6 -6
- package/dist/handsontable.js +51 -19
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +6 -6
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/columnSummary/columnSummary.js +27 -10
- package/plugins/columnSummary/columnSummary.mjs +27 -10
- package/plugins/columnSummary/endpoints.js +15 -0
- package/plugins/columnSummary/endpoints.mjs +15 -0
- package/utils/ghostTable.js +0 -4
- package/utils/ghostTable.mjs +0 -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-9daae4b-20240507";
|
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-9daae4b-20240507";
|
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-9daae4b-20240507",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
@@ -159,37 +159,43 @@ class ColumnSummary extends _base.BasePlugin {
|
|
159
159
|
}
|
160
160
|
return _assertClassBrand(_ColumnSummary_brand, _this, _onAfterChange).call(_this, ...args);
|
161
161
|
});
|
162
|
+
this.addHook('afterUpdateSettings', function () {
|
163
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
164
|
+
args[_key3] = arguments[_key3];
|
165
|
+
}
|
166
|
+
return _assertClassBrand(_ColumnSummary_brand, _this, _onAfterUpdateSettings).call(_this, ...args);
|
167
|
+
});
|
162
168
|
this.addHook('beforeCreateRow', (index, amount, source) => this.endpoints.resetSetupBeforeStructureAlteration('insert_row', index, amount, null, source)); // eslint-disable-line max-len
|
163
169
|
this.addHook('beforeCreateCol', (index, amount, source) => this.endpoints.resetSetupBeforeStructureAlteration('insert_col', index, amount, null, source)); // eslint-disable-line max-len
|
164
170
|
this.addHook('beforeRemoveRow', function () {
|
165
|
-
for (var
|
166
|
-
args[
|
171
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
172
|
+
args[_key4] = arguments[_key4];
|
167
173
|
}
|
168
174
|
return _this.endpoints.resetSetupBeforeStructureAlteration('remove_row', ...args);
|
169
175
|
});
|
170
176
|
this.addHook('beforeRemoveCol', function () {
|
171
|
-
for (var
|
172
|
-
args[
|
177
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
178
|
+
args[_key5] = arguments[_key5];
|
173
179
|
}
|
174
180
|
return _this.endpoints.resetSetupBeforeStructureAlteration('remove_col', ...args);
|
175
181
|
});
|
176
182
|
this.addHook('afterCreateRow', (index, amount, source) => this.endpoints.resetSetupAfterStructureAlteration('insert_row', index, amount, null, source)); // eslint-disable-line max-len
|
177
183
|
this.addHook('afterCreateCol', (index, amount, source) => this.endpoints.resetSetupAfterStructureAlteration('insert_col', index, amount, null, source)); // eslint-disable-line max-len
|
178
184
|
this.addHook('afterRemoveRow', function () {
|
179
|
-
for (var
|
180
|
-
args[
|
185
|
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
186
|
+
args[_key6] = arguments[_key6];
|
181
187
|
}
|
182
188
|
return _this.endpoints.resetSetupAfterStructureAlteration('remove_row', ...args);
|
183
189
|
});
|
184
190
|
this.addHook('afterRemoveCol', function () {
|
185
|
-
for (var
|
186
|
-
args[
|
191
|
+
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
192
|
+
args[_key7] = arguments[_key7];
|
187
193
|
}
|
188
194
|
return _this.endpoints.resetSetupAfterStructureAlteration('remove_col', ...args);
|
189
195
|
});
|
190
196
|
this.addHook('afterRowMove', function () {
|
191
|
-
for (var
|
192
|
-
args[
|
197
|
+
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
198
|
+
args[_key8] = arguments[_key8];
|
193
199
|
}
|
194
200
|
return _assertClassBrand(_ColumnSummary_brand, _this, _onAfterRowMove).call(_this, ...args);
|
195
201
|
});
|
@@ -454,6 +460,17 @@ exports.ColumnSummary = ColumnSummary;
|
|
454
460
|
function _onAfterInit() {
|
455
461
|
this.endpoints.initEndpoints();
|
456
462
|
}
|
463
|
+
/**
|
464
|
+
* Called after the settings were updated. There is a need to refresh cell metas after the settings update with
|
465
|
+
* the `columns` property as the Core resets the cell metas to their initial state.
|
466
|
+
*
|
467
|
+
* @param {object} settings The settings object.
|
468
|
+
*/
|
469
|
+
function _onAfterUpdateSettings(settings) {
|
470
|
+
if (settings.columns !== undefined) {
|
471
|
+
this.endpoints.refreshCellMetas();
|
472
|
+
}
|
473
|
+
}
|
457
474
|
/**
|
458
475
|
* `afterChange` hook callback.
|
459
476
|
*
|
@@ -155,37 +155,43 @@ export class ColumnSummary extends BasePlugin {
|
|
155
155
|
}
|
156
156
|
return _assertClassBrand(_ColumnSummary_brand, _this, _onAfterChange).call(_this, ...args);
|
157
157
|
});
|
158
|
+
this.addHook('afterUpdateSettings', function () {
|
159
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
160
|
+
args[_key3] = arguments[_key3];
|
161
|
+
}
|
162
|
+
return _assertClassBrand(_ColumnSummary_brand, _this, _onAfterUpdateSettings).call(_this, ...args);
|
163
|
+
});
|
158
164
|
this.addHook('beforeCreateRow', (index, amount, source) => this.endpoints.resetSetupBeforeStructureAlteration('insert_row', index, amount, null, source)); // eslint-disable-line max-len
|
159
165
|
this.addHook('beforeCreateCol', (index, amount, source) => this.endpoints.resetSetupBeforeStructureAlteration('insert_col', index, amount, null, source)); // eslint-disable-line max-len
|
160
166
|
this.addHook('beforeRemoveRow', function () {
|
161
|
-
for (var
|
162
|
-
args[
|
167
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
168
|
+
args[_key4] = arguments[_key4];
|
163
169
|
}
|
164
170
|
return _this.endpoints.resetSetupBeforeStructureAlteration('remove_row', ...args);
|
165
171
|
});
|
166
172
|
this.addHook('beforeRemoveCol', function () {
|
167
|
-
for (var
|
168
|
-
args[
|
173
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
174
|
+
args[_key5] = arguments[_key5];
|
169
175
|
}
|
170
176
|
return _this.endpoints.resetSetupBeforeStructureAlteration('remove_col', ...args);
|
171
177
|
});
|
172
178
|
this.addHook('afterCreateRow', (index, amount, source) => this.endpoints.resetSetupAfterStructureAlteration('insert_row', index, amount, null, source)); // eslint-disable-line max-len
|
173
179
|
this.addHook('afterCreateCol', (index, amount, source) => this.endpoints.resetSetupAfterStructureAlteration('insert_col', index, amount, null, source)); // eslint-disable-line max-len
|
174
180
|
this.addHook('afterRemoveRow', function () {
|
175
|
-
for (var
|
176
|
-
args[
|
181
|
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
182
|
+
args[_key6] = arguments[_key6];
|
177
183
|
}
|
178
184
|
return _this.endpoints.resetSetupAfterStructureAlteration('remove_row', ...args);
|
179
185
|
});
|
180
186
|
this.addHook('afterRemoveCol', function () {
|
181
|
-
for (var
|
182
|
-
args[
|
187
|
+
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
188
|
+
args[_key7] = arguments[_key7];
|
183
189
|
}
|
184
190
|
return _this.endpoints.resetSetupAfterStructureAlteration('remove_col', ...args);
|
185
191
|
});
|
186
192
|
this.addHook('afterRowMove', function () {
|
187
|
-
for (var
|
188
|
-
args[
|
193
|
+
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
194
|
+
args[_key8] = arguments[_key8];
|
189
195
|
}
|
190
196
|
return _assertClassBrand(_ColumnSummary_brand, _this, _onAfterRowMove).call(_this, ...args);
|
191
197
|
});
|
@@ -449,6 +455,17 @@ export class ColumnSummary extends BasePlugin {
|
|
449
455
|
function _onAfterInit() {
|
450
456
|
this.endpoints.initEndpoints();
|
451
457
|
}
|
458
|
+
/**
|
459
|
+
* Called after the settings were updated. There is a need to refresh cell metas after the settings update with
|
460
|
+
* the `columns` property as the Core resets the cell metas to their initial state.
|
461
|
+
*
|
462
|
+
* @param {object} settings The settings object.
|
463
|
+
*/
|
464
|
+
function _onAfterUpdateSettings(settings) {
|
465
|
+
if (settings.columns !== undefined) {
|
466
|
+
this.endpoints.refreshCellMetas();
|
467
|
+
}
|
468
|
+
}
|
452
469
|
/**
|
453
470
|
* `afterChange` hook callback.
|
454
471
|
*
|
@@ -440,6 +440,21 @@ class Endpoints {
|
|
440
440
|
this.cellsToSetCache = [];
|
441
441
|
}
|
442
442
|
|
443
|
+
/**
|
444
|
+
* Refreshes the cell meta information for the all endpoints after the `updateSettings` method call which in some
|
445
|
+
* cases (call with `columns` option) can reset the cell metas to the initial state.
|
446
|
+
*/
|
447
|
+
refreshCellMetas() {
|
448
|
+
this.endpoints.forEach(endpoint => {
|
449
|
+
const destinationVisualRow = this.hot.toVisualRow(endpoint.destinationRow);
|
450
|
+
if (destinationVisualRow !== null) {
|
451
|
+
const cellMeta = this.hot.getCellMeta(destinationVisualRow, endpoint.destinationColumn);
|
452
|
+
cellMeta.readOnly = endpoint.readOnly;
|
453
|
+
cellMeta.className = 'columnSummaryResult';
|
454
|
+
}
|
455
|
+
});
|
456
|
+
}
|
457
|
+
|
443
458
|
/**
|
444
459
|
* Calculate and refresh a single endpoint.
|
445
460
|
*
|
@@ -437,6 +437,21 @@ class Endpoints {
|
|
437
437
|
this.cellsToSetCache = [];
|
438
438
|
}
|
439
439
|
|
440
|
+
/**
|
441
|
+
* Refreshes the cell meta information for the all endpoints after the `updateSettings` method call which in some
|
442
|
+
* cases (call with `columns` option) can reset the cell metas to the initial state.
|
443
|
+
*/
|
444
|
+
refreshCellMetas() {
|
445
|
+
this.endpoints.forEach(endpoint => {
|
446
|
+
const destinationVisualRow = this.hot.toVisualRow(endpoint.destinationRow);
|
447
|
+
if (destinationVisualRow !== null) {
|
448
|
+
const cellMeta = this.hot.getCellMeta(destinationVisualRow, endpoint.destinationColumn);
|
449
|
+
cellMeta.readOnly = endpoint.readOnly;
|
450
|
+
cellMeta.className = 'columnSummaryResult';
|
451
|
+
}
|
452
|
+
});
|
453
|
+
}
|
454
|
+
|
440
455
|
/**
|
441
456
|
* Calculate and refresh a single endpoint.
|
442
457
|
*
|
package/utils/ghostTable.js
CHANGED
@@ -261,8 +261,6 @@ class GhostTable {
|
|
261
261
|
(0, _array.arrayEach)(sample.strings, string => {
|
262
262
|
const column = string.col;
|
263
263
|
const cellProperties = this.hot.getCellMeta(row, column);
|
264
|
-
cellProperties.col = column;
|
265
|
-
cellProperties.row = row;
|
266
264
|
const renderer = this.hot.getCellRenderer(cellProperties);
|
267
265
|
const td = rootDocument.createElement('td');
|
268
266
|
|
@@ -324,8 +322,6 @@ class GhostTable {
|
|
324
322
|
(0, _array.arrayEach)(sample.strings, string => {
|
325
323
|
const row = string.row;
|
326
324
|
const cellProperties = this.hot.getCellMeta(row, column);
|
327
|
-
cellProperties.col = column;
|
328
|
-
cellProperties.row = row;
|
329
325
|
const renderer = this.hot.getCellRenderer(cellProperties);
|
330
326
|
const td = rootDocument.createElement('td');
|
331
327
|
const tr = rootDocument.createElement('tr');
|
package/utils/ghostTable.mjs
CHANGED
@@ -258,8 +258,6 @@ class GhostTable {
|
|
258
258
|
arrayEach(sample.strings, string => {
|
259
259
|
const column = string.col;
|
260
260
|
const cellProperties = this.hot.getCellMeta(row, column);
|
261
|
-
cellProperties.col = column;
|
262
|
-
cellProperties.row = row;
|
263
261
|
const renderer = this.hot.getCellRenderer(cellProperties);
|
264
262
|
const td = rootDocument.createElement('td');
|
265
263
|
|
@@ -321,8 +319,6 @@ class GhostTable {
|
|
321
319
|
arrayEach(sample.strings, string => {
|
322
320
|
const row = string.row;
|
323
321
|
const cellProperties = this.hot.getCellMeta(row, column);
|
324
|
-
cellProperties.col = column;
|
325
|
-
cellProperties.row = row;
|
326
322
|
const renderer = this.hot.getCellRenderer(cellProperties);
|
327
323
|
const td = rootDocument.createElement('td');
|
328
324
|
const tr = rootDocument.createElement('tr');
|