handsontable 0.0.0-next-d4ae6d7-20221205 → 0.0.0-next-21b8f14-20221206
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/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +11 -5
- package/core.mjs +11 -5
- package/dataMap/dataMap.js +33 -65
- package/dataMap/dataMap.mjs +33 -65
- package/dataMap/metaManager/metaSchema.js +54 -38
- package/dataMap/metaManager/metaSchema.mjs +54 -38
- package/dataMap/replaceData.js +1 -2
- package/dataMap/replaceData.mjs +1 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +130 -129
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +6 -6
- package/dist/handsontable.js +130 -129
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/columnSummary/columnSummary.js +5 -5
- package/plugins/columnSummary/columnSummary.mjs +5 -5
- package/plugins/columnSummary/endpoints.js +14 -2
- package/plugins/columnSummary/endpoints.mjs +14 -2
- package/plugins/formulas/formulas.js +6 -6
- package/plugins/formulas/formulas.mjs +6 -6
- package/shortcuts/manager.js +1 -1
- package/shortcuts/manager.mjs +1 -1
@@ -25,8 +25,8 @@
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
27
27
|
*
|
28
|
-
* Version: 0.0.0-next-
|
29
|
-
* Release date: 25/10/2022 (built at
|
28
|
+
* Version: 0.0.0-next-21b8f14-20221206
|
29
|
+
* Release date: 25/10/2022 (built at 06/12/2022 11:15:30)
|
30
30
|
*/
|
31
31
|
(function webpackUniversalModuleDefinition(root, factory) {
|
32
32
|
if(typeof exports === 'object' && typeof module === 'object')
|
@@ -3075,7 +3075,7 @@ var domMessages = {
|
|
3075
3075
|
function _injectProductInfo(key, element) {
|
3076
3076
|
var hasValidType = !isEmpty(key);
|
3077
3077
|
var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
3078
|
-
var hotVersion = "0.0.0-next-
|
3078
|
+
var hotVersion = "0.0.0-next-21b8f14-20221206";
|
3079
3079
|
var keyValidityDate;
|
3080
3080
|
var consoleMessageState = 'invalid';
|
3081
3081
|
var domMessageState = 'invalid';
|
@@ -49170,7 +49170,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
49170
49170
|
* @private
|
49171
49171
|
* @param {Array[]} changes An array of changes in format [[row, prop, oldValue, value], ...].
|
49172
49172
|
* @param {string} [source] String that identifies source of hook call
|
49173
|
-
* ([list of all available sources]{@link
|
49173
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
49174
49174
|
*/
|
49175
49175
|
}, {
|
49176
49176
|
key: "onAfterSetDataAtCell",
|
@@ -49231,7 +49231,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
49231
49231
|
* @private
|
49232
49232
|
* @param {Array[]} changes An array of changes in format [[row, column, oldValue, value], ...].
|
49233
49233
|
* @param {string} [source] String that identifies source of hook call
|
49234
|
-
* ([list of all available sources]{@link
|
49234
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
49235
49235
|
*/
|
49236
49236
|
}, {
|
49237
49237
|
key: "onAfterSetSourceDataAtCell",
|
@@ -49346,7 +49346,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
49346
49346
|
* @param {number} row Represents the visual index of first newly created row in the data source array.
|
49347
49347
|
* @param {number} amount Number of newly created rows in the data source array.
|
49348
49348
|
* @param {string} [source] String that identifies source of hook call
|
49349
|
-
* ([list of all available sources]{@link
|
49349
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
49350
49350
|
*/
|
49351
49351
|
}, {
|
49352
49352
|
key: "onAfterCreateRow",
|
@@ -49365,7 +49365,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
49365
49365
|
* @param {number} col Represents the visual index of first newly created column in the data source.
|
49366
49366
|
* @param {number} amount Number of newly created columns in the data source.
|
49367
49367
|
* @param {string} [source] String that identifies source of hook call
|
49368
|
-
* ([list of all available sources]{@link
|
49368
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
49369
49369
|
*/
|
49370
49370
|
}, {
|
49371
49371
|
key: "onAfterCreateCol",
|
@@ -49385,7 +49385,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
49385
49385
|
* @param {number} amount An amount of removed rows.
|
49386
49386
|
* @param {number[]} physicalRows An array of physical rows removed from the data source.
|
49387
49387
|
* @param {string} [source] String that identifies source of hook call
|
49388
|
-
* ([list of all available sources]{@link
|
49388
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
49389
49389
|
*/
|
49390
49390
|
}, {
|
49391
49391
|
key: "onAfterRemoveRow",
|
@@ -49411,7 +49411,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
49411
49411
|
* @param {number} amount An amount of removed columns.
|
49412
49412
|
* @param {number[]} physicalColumns An array of physical columns removed from the data source.
|
49413
49413
|
* @param {string} [source] String that identifies source of hook call
|
49414
|
-
* ([list of all available sources]{@link
|
49414
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
49415
49415
|
*/
|
49416
49416
|
}, {
|
49417
49417
|
key: "onAfterRemoveCol",
|
@@ -66480,7 +66480,7 @@ var deprecationWarns = new Set();
|
|
66480
66480
|
*
|
66481
66481
|
* ::: only-for react
|
66482
66482
|
* To use these methods, associate a Handsontable instance with your instance
|
66483
|
-
* of the [`HotTable` component](@/guides/getting-started/installation.md#hottable-component),
|
66483
|
+
* of the [`HotTable` component](@/guides/getting-started/installation.md#use-the-hottable-component),
|
66484
66484
|
* by using React's `ref` feature (read more on the [Instance methods](@/guides/getting-started/react-methods.md) page).
|
66485
66485
|
* :::
|
66486
66486
|
*
|
@@ -66917,6 +66917,7 @@ function Core(rootElement, userSettings) {
|
|
66917
66917
|
rowDelta = _datamap$createRow.delta,
|
66918
66918
|
startRowPhysicalIndex = _datamap$createRow.startPhysicalIndex;
|
66919
66919
|
if (rowDelta) {
|
66920
|
+
metaManager.createRow(startRowPhysicalIndex, amount);
|
66920
66921
|
var currentSelectedRange = selection.selectedRange.current();
|
66921
66922
|
var currentFromRange = currentSelectedRange === null || currentSelectedRange === void 0 ? void 0 : currentSelectedRange.from;
|
66922
66923
|
var currentFromRow = currentFromRange === null || currentFromRange === void 0 ? void 0 : currentFromRange.row;
|
@@ -66972,6 +66973,7 @@ function Core(rootElement, userSettings) {
|
|
66972
66973
|
colDelta = _datamap$createCol.delta,
|
66973
66974
|
startColumnPhysicalIndex = _datamap$createCol.startPhysicalIndex;
|
66974
66975
|
if (colDelta) {
|
66976
|
+
metaManager.createColumn(startColumnPhysicalIndex, amount);
|
66975
66977
|
if (Array.isArray(tableMeta.colHeaders)) {
|
66976
66978
|
var spliceArray = [instance.toVisualColumn(startColumnPhysicalIndex), 0];
|
66977
66979
|
spliceArray.length += colDelta; // inserts empty (undefined) elements at the end of an array
|
@@ -67034,6 +67036,7 @@ function Core(rootElement, userSettings) {
|
|
67034
67036
|
if (!wasRemoved) {
|
67035
67037
|
return;
|
67036
67038
|
}
|
67039
|
+
metaManager.removeRow(instance.toPhysicalRow(calcIndex), groupAmount);
|
67037
67040
|
var totalRows = instance.countRows();
|
67038
67041
|
var fixedRowsTop = tableMeta.fixedRowsTop;
|
67039
67042
|
if (fixedRowsTop >= calcIndex + 1) {
|
@@ -67079,6 +67082,7 @@ function Core(rootElement, userSettings) {
|
|
67079
67082
|
if (!wasRemoved) {
|
67080
67083
|
return;
|
67081
67084
|
}
|
67085
|
+
metaManager.removeColumn(physicalColumnIndex, groupAmount);
|
67082
67086
|
var fixedColumnsStart = tableMeta.fixedColumnsStart;
|
67083
67087
|
if (fixedColumnsStart >= calcIndex + 1) {
|
67084
67088
|
tableMeta.fixedColumnsStart -= Math.min(groupAmount, fixedColumnsStart - calcIndex);
|
@@ -67660,7 +67664,9 @@ function Core(rootElement, userSettings) {
|
|
67660
67664
|
source: source
|
67661
67665
|
}),
|
67662
67666
|
numberOfCreatedRows = _datamap$createRow2.delta;
|
67663
|
-
if (numberOfCreatedRows
|
67667
|
+
if (numberOfCreatedRows >= 1) {
|
67668
|
+
metaManager.createRow(null, numberOfCreatedRows);
|
67669
|
+
} else {
|
67664
67670
|
skipThisChange = true;
|
67665
67671
|
break;
|
67666
67672
|
}
|
@@ -67672,7 +67678,9 @@ function Core(rootElement, userSettings) {
|
|
67672
67678
|
source: source
|
67673
67679
|
}),
|
67674
67680
|
numberOfCreatedColumns = _datamap$createCol2.delta;
|
67675
|
-
if (numberOfCreatedColumns
|
67681
|
+
if (numberOfCreatedColumns >= 1) {
|
67682
|
+
metaManager.createColumn(null, numberOfCreatedColumns);
|
67683
|
+
} else {
|
67676
67684
|
skipThisChange = true;
|
67677
67685
|
break;
|
67678
67686
|
}
|
@@ -68497,7 +68505,6 @@ function Core(rootElement, userSettings) {
|
|
68497
68505
|
dataSource: dataSource,
|
68498
68506
|
internalSource: 'updateData',
|
68499
68507
|
source: source,
|
68500
|
-
metaManager: metaManager,
|
68501
68508
|
firstRun: firstRun
|
68502
68509
|
});
|
68503
68510
|
};
|
@@ -68540,7 +68547,6 @@ function Core(rootElement, userSettings) {
|
|
68540
68547
|
dataSource: dataSource,
|
68541
68548
|
internalSource: 'loadData',
|
68542
68549
|
source: source,
|
68543
|
-
metaManager: metaManager,
|
68544
68550
|
firstRun: firstRun
|
68545
68551
|
});
|
68546
68552
|
};
|
@@ -77918,8 +77924,8 @@ __webpack_require__(73);
|
|
77918
77924
|
__webpack_require__(53);
|
77919
77925
|
__webpack_require__(89);
|
77920
77926
|
__webpack_require__(40);
|
77921
|
-
__webpack_require__(23);
|
77922
77927
|
__webpack_require__(20);
|
77928
|
+
__webpack_require__(23);
|
77923
77929
|
__webpack_require__(35);
|
77924
77930
|
__webpack_require__(22);
|
77925
77931
|
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(32));
|
@@ -77966,9 +77972,9 @@ var DataMap = /*#__PURE__*/function () {
|
|
77966
77972
|
/**
|
77967
77973
|
* @param {object} instance Instance of Handsontable.
|
77968
77974
|
* @param {Array} data Array of arrays or array of objects containing data.
|
77969
|
-
* @param {
|
77975
|
+
* @param {TableMeta} tableMeta The table meta instance.
|
77970
77976
|
*/
|
77971
|
-
function DataMap(instance, data,
|
77977
|
+
function DataMap(instance, data, tableMeta) {
|
77972
77978
|
(0, _classCallCheck2.default)(this, DataMap);
|
77973
77979
|
/**
|
77974
77980
|
* Instance of {@link Handsontable}.
|
@@ -77978,12 +77984,12 @@ var DataMap = /*#__PURE__*/function () {
|
|
77978
77984
|
*/
|
77979
77985
|
this.instance = instance;
|
77980
77986
|
/**
|
77981
|
-
* Instance of {@link
|
77987
|
+
* Instance of {@link TableMeta}.
|
77982
77988
|
*
|
77983
77989
|
* @private
|
77984
|
-
* @type {
|
77990
|
+
* @type {TableMeta}
|
77985
77991
|
*/
|
77986
|
-
this.
|
77992
|
+
this.tableMeta = tableMeta;
|
77987
77993
|
/**
|
77988
77994
|
* Reference to the original dataset.
|
77989
77995
|
*
|
@@ -78021,7 +78027,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
78021
78027
|
if (typeof schema === 'undefined') {
|
78022
78028
|
throw new Error('trying to create `columns` definition but you didn\'t provide `schema` nor `data`');
|
78023
78029
|
}
|
78024
|
-
var columns = this.
|
78030
|
+
var columns = this.tableMeta.columns;
|
78025
78031
|
var i;
|
78026
78032
|
this.colToPropCache = [];
|
78027
78033
|
this.propToColCache = new Map();
|
@@ -78034,7 +78040,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
78034
78040
|
columnsLen = schemaLen > 0 ? schemaLen : this.countFirstRowKeys();
|
78035
78041
|
columnsAsFunc = true;
|
78036
78042
|
} else {
|
78037
|
-
var maxCols = this.
|
78043
|
+
var maxCols = this.tableMeta.maxCols;
|
78038
78044
|
columnsLen = Math.min(maxCols, columns.length);
|
78039
78045
|
}
|
78040
78046
|
for (i = 0; i < columnsLen; i++) {
|
@@ -78156,7 +78162,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
78156
78162
|
}, {
|
78157
78163
|
key: "getSchema",
|
78158
78164
|
value: function getSchema() {
|
78159
|
-
var schema = this.
|
78165
|
+
var schema = this.tableMeta.dataSchema;
|
78160
78166
|
if (schema) {
|
78161
78167
|
if (typeof schema === 'function') {
|
78162
78168
|
return schema();
|
@@ -78218,17 +78224,15 @@ var DataMap = /*#__PURE__*/function () {
|
|
78218
78224
|
}
|
78219
78225
|
var continueProcess = this.instance.runHooks('beforeCreateRow', rowIndex, amount, source);
|
78220
78226
|
if (continueProcess === false || physicalRowIndex === null) {
|
78221
|
-
return
|
78222
|
-
delta: 0
|
78223
|
-
};
|
78227
|
+
return 0;
|
78224
78228
|
}
|
78225
|
-
var maxRows = this.
|
78229
|
+
var maxRows = this.tableMeta.maxRows;
|
78226
78230
|
var columnCount = this.getSchema().length;
|
78227
78231
|
var rowsToAdd = [];
|
78228
78232
|
var _loop = function _loop() {
|
78229
78233
|
var row = null;
|
78230
78234
|
if (_this2.instance.dataType === 'array') {
|
78231
|
-
if (_this2.
|
78235
|
+
if (_this2.tableMeta.dataSchema) {
|
78232
78236
|
// Clone template array
|
78233
78237
|
row = (0, _object.deepClone)(_this2.getSchema());
|
78234
78238
|
} else {
|
@@ -78239,7 +78243,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
78239
78243
|
});
|
78240
78244
|
}
|
78241
78245
|
} else if (_this2.instance.dataType === 'function') {
|
78242
|
-
row = _this2.
|
78246
|
+
row = _this2.tableMeta.dataSchema(rowIndex + numberOfCreatedRows);
|
78243
78247
|
} else {
|
78244
78248
|
row = {};
|
78245
78249
|
(0, _object.deepExtend)(row, _this2.getSchema());
|
@@ -78262,14 +78266,6 @@ var DataMap = /*#__PURE__*/function () {
|
|
78262
78266
|
if (this.instance.countSourceRows() === rowsToAdd.length) {
|
78263
78267
|
this.instance.columnIndexMapper.initToLength(this.instance.getInitialColumnCount());
|
78264
78268
|
}
|
78265
|
-
if (numberOfCreatedRows > 0) {
|
78266
|
-
if (index === void 0 || index === null) {
|
78267
|
-
// Creates the meta rows at the end of the rows collection.
|
78268
|
-
this.metaManager.createRow(null, numberOfCreatedRows);
|
78269
|
-
} else if (source !== 'auto') {
|
78270
|
-
this.metaManager.createRow(physicalRowIndex, amount);
|
78271
|
-
}
|
78272
|
-
}
|
78273
78269
|
this.instance.runHooks('afterCreateRow', newVisualRowIndex, numberOfCreatedRows, source);
|
78274
78270
|
this.instance.forceFullRender = true; // used when data was changed
|
78275
78271
|
|
@@ -78303,7 +78299,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
78303
78299
|
throw new Error('Cannot create new column. When data source in an object, ' + 'you can only have as much columns as defined in first data row, data schema or in the \'columns\' setting.' + 'If you want to be able to add new columns, you have to use array datasource.');
|
78304
78300
|
}
|
78305
78301
|
var dataSource = this.dataSource;
|
78306
|
-
var maxCols = this.
|
78302
|
+
var maxCols = this.tableMeta.maxCols;
|
78307
78303
|
var countSourceCols = this.instance.countSourceCols();
|
78308
78304
|
var columnIndex = index;
|
78309
78305
|
if (typeof columnIndex !== 'number' || columnIndex >= countSourceCols) {
|
@@ -78311,9 +78307,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
78311
78307
|
}
|
78312
78308
|
var continueProcess = this.instance.runHooks('beforeCreateCol', columnIndex, amount, source);
|
78313
78309
|
if (continueProcess === false) {
|
78314
|
-
return
|
78315
|
-
delta: 0
|
78316
|
-
};
|
78310
|
+
return 0;
|
78317
78311
|
}
|
78318
78312
|
var physicalColumnIndex = countSourceCols;
|
78319
78313
|
if (columnIndex < this.instance.countCols()) {
|
@@ -78349,14 +78343,6 @@ var DataMap = /*#__PURE__*/function () {
|
|
78349
78343
|
nrOfColumns += 1;
|
78350
78344
|
}
|
78351
78345
|
this.instance.columnIndexMapper.insertIndexes(columnIndex, numberOfCreatedCols);
|
78352
|
-
if (numberOfCreatedCols > 0) {
|
78353
|
-
if (index === void 0 || index === null) {
|
78354
|
-
// Creates the meta columns at the end of the columns collection.
|
78355
|
-
this.metaManager.createColumn(null, numberOfCreatedCols);
|
78356
|
-
} else if (source !== 'auto') {
|
78357
|
-
this.metaManager.createColumn(startPhysicalIndex, amount);
|
78358
|
-
}
|
78359
|
-
}
|
78360
78346
|
var newVisualColumnIndex = this.instance.toVisualColumn(startPhysicalIndex);
|
78361
78347
|
this.instance.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
|
78362
78348
|
this.instance.forceFullRender = true; // used when data was changed
|
@@ -78381,7 +78367,6 @@ var DataMap = /*#__PURE__*/function () {
|
|
78381
78367
|
}, {
|
78382
78368
|
key: "removeRow",
|
78383
78369
|
value: function removeRow(index) {
|
78384
|
-
var _this3 = this;
|
78385
78370
|
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
78386
78371
|
var source = arguments.length > 2 ? arguments[2] : undefined;
|
78387
78372
|
var rowIndex = Number.isInteger(index) ? index : -amount; // -amount = taking indexes from the end.
|
@@ -78402,19 +78387,13 @@ var DataMap = /*#__PURE__*/function () {
|
|
78402
78387
|
// TODO: Function `removeRow` should validate fully, probably above.
|
78403
78388
|
if (rowIndex < this.instance.countRows()) {
|
78404
78389
|
this.instance.rowIndexMapper.removeIndexes(removedPhysicalIndexes);
|
78405
|
-
var customDefinedColumns = (0, _mixed.isDefined)(this.
|
78390
|
+
var customDefinedColumns = (0, _mixed.isDefined)(this.tableMeta.columns) || (0, _mixed.isDefined)(this.tableMeta.dataSchema);
|
78406
78391
|
|
78407
78392
|
// All rows have been removed. There shouldn't be any columns.
|
78408
78393
|
if (this.instance.rowIndexMapper.getNotTrimmedIndexesLength() === 0 && customDefinedColumns === false) {
|
78409
78394
|
this.instance.columnIndexMapper.setIndexesSequence([]);
|
78410
78395
|
}
|
78411
78396
|
}
|
78412
|
-
var descendingPhysicalRows = removedPhysicalIndexes.slice(0).sort(function (a, b) {
|
78413
|
-
return b - a;
|
78414
|
-
});
|
78415
|
-
descendingPhysicalRows.forEach(function (rowPhysicalIndex) {
|
78416
|
-
_this3.metaManager.removeRow(rowPhysicalIndex, 1);
|
78417
|
-
});
|
78418
78397
|
this.instance.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
|
78419
78398
|
this.instance.forceFullRender = true; // used when data was changed
|
78420
78399
|
|
@@ -78436,56 +78415,51 @@ var DataMap = /*#__PURE__*/function () {
|
|
78436
78415
|
value: function removeCol(index) {
|
78437
78416
|
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
78438
78417
|
var source = arguments.length > 2 ? arguments[2] : undefined;
|
78439
|
-
if (this.instance.dataType === 'object' || this.
|
78418
|
+
if (this.instance.dataType === 'object' || this.tableMeta.columns) {
|
78440
78419
|
throw new Error('cannot remove column with object data source or columns option specified');
|
78441
78420
|
}
|
78442
78421
|
var columnIndex = typeof index !== 'number' ? -amount : index;
|
78443
78422
|
columnIndex = (this.instance.countCols() + columnIndex) % this.instance.countCols();
|
78444
|
-
var
|
78445
|
-
var
|
78423
|
+
var logicColumns = this.visualColumnsToPhysical(columnIndex, amount);
|
78424
|
+
var descendingLogicColumns = logicColumns.slice(0).sort(function (a, b) {
|
78446
78425
|
return b - a;
|
78447
78426
|
});
|
78448
|
-
var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', columnIndex, amount,
|
78427
|
+
var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', columnIndex, amount, logicColumns, source);
|
78449
78428
|
if (actionWasNotCancelled === false) {
|
78450
78429
|
return false;
|
78451
78430
|
}
|
78452
78431
|
var isTableUniform = true;
|
78453
|
-
var removedColumnsCount =
|
78432
|
+
var removedColumnsCount = descendingLogicColumns.length;
|
78454
78433
|
var data = this.dataSource;
|
78455
78434
|
for (var c = 0; c < removedColumnsCount; c++) {
|
78456
|
-
if (isTableUniform &&
|
78435
|
+
if (isTableUniform && logicColumns[0] !== logicColumns[c] - c) {
|
78457
78436
|
isTableUniform = false;
|
78458
78437
|
}
|
78459
78438
|
}
|
78460
78439
|
if (isTableUniform) {
|
78461
78440
|
for (var r = 0, rlen = this.instance.countSourceRows(); r < rlen; r++) {
|
78462
|
-
data[r].splice(
|
78463
|
-
if (r === 0) {
|
78464
|
-
this.metaManager.removeColumn(removedPhysicalIndexes[0], amount);
|
78465
|
-
}
|
78441
|
+
data[r].splice(logicColumns[0], amount);
|
78466
78442
|
}
|
78467
78443
|
} else {
|
78468
78444
|
for (var _r = 0, _rlen = this.instance.countSourceRows(); _r < _rlen; _r++) {
|
78469
78445
|
for (var _c = 0; _c < removedColumnsCount; _c++) {
|
78470
|
-
data[_r].splice(
|
78471
|
-
if (_r === 0) {
|
78472
|
-
this.metaManager.removeColumn(descendingPhysicalColumns[_c], 1);
|
78473
|
-
}
|
78446
|
+
data[_r].splice(descendingLogicColumns[_c], 1);
|
78474
78447
|
}
|
78475
78448
|
}
|
78476
78449
|
}
|
78477
78450
|
|
78478
78451
|
// TODO: Function `removeCol` should validate fully, probably above.
|
78479
78452
|
if (columnIndex < this.instance.countCols()) {
|
78480
|
-
this.instance.columnIndexMapper.removeIndexes(
|
78453
|
+
this.instance.columnIndexMapper.removeIndexes(logicColumns);
|
78481
78454
|
|
78482
78455
|
// All columns have been removed. There shouldn't be any rows.
|
78483
78456
|
if (this.instance.columnIndexMapper.getNotTrimmedIndexesLength() === 0) {
|
78484
78457
|
this.instance.rowIndexMapper.setIndexesSequence([]);
|
78485
78458
|
}
|
78486
78459
|
}
|
78487
|
-
this.instance.runHooks('afterRemoveCol', columnIndex, amount,
|
78460
|
+
this.instance.runHooks('afterRemoveCol', columnIndex, amount, logicColumns, source);
|
78488
78461
|
this.instance.forceFullRender = true; // used when data was changed
|
78462
|
+
|
78489
78463
|
this.refreshDuckSchema();
|
78490
78464
|
return true;
|
78491
78465
|
}
|
@@ -78557,7 +78531,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
78557
78531
|
}, {
|
78558
78532
|
key: "spliceData",
|
78559
78533
|
value: function spliceData(index, deleteCount, elements) {
|
78560
|
-
var
|
78534
|
+
var _this3 = this;
|
78561
78535
|
var continueSplicing = this.instance.runHooks('beforeDataSplice', index, deleteCount, elements);
|
78562
78536
|
if (continueSplicing !== false) {
|
78563
78537
|
var newData = [].concat((0, _toConsumableArray2.default)(this.dataSource.slice(0, index)), (0, _toConsumableArray2.default)(elements), (0, _toConsumableArray2.default)(this.dataSource.slice(index)));
|
@@ -78568,7 +78542,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
78568
78542
|
// Pushing to array instead of using `splice`, because Babel changes the code to one that uses the `apply` method.
|
78569
78543
|
// The used method was cause of the problem described within #7840.
|
78570
78544
|
newData.forEach(function (row) {
|
78571
|
-
return
|
78545
|
+
return _this3.dataSource.push(row);
|
78572
78546
|
});
|
78573
78547
|
}
|
78574
78548
|
}
|
@@ -78777,7 +78751,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
78777
78751
|
}, {
|
78778
78752
|
key: "getLength",
|
78779
78753
|
value: function getLength() {
|
78780
|
-
var maxRowsFromSettings = this.
|
78754
|
+
var maxRowsFromSettings = this.tableMeta.maxRows;
|
78781
78755
|
var maxRows;
|
78782
78756
|
if (maxRowsFromSettings < 0 || maxRowsFromSettings === 0) {
|
78783
78757
|
maxRows = 0;
|
@@ -78836,8 +78810,8 @@ var DataMap = /*#__PURE__*/function () {
|
|
78836
78810
|
var r;
|
78837
78811
|
var c;
|
78838
78812
|
var row;
|
78839
|
-
var maxRows = this.
|
78840
|
-
var maxCols = this.
|
78813
|
+
var maxRows = this.tableMeta.maxRows;
|
78814
|
+
var maxCols = this.tableMeta.maxCols;
|
78841
78815
|
if (maxRows === 0 || maxCols === 0) {
|
78842
78816
|
return [];
|
78843
78817
|
}
|
@@ -78894,7 +78868,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
78894
78868
|
key: "destroy",
|
78895
78869
|
value: function destroy() {
|
78896
78870
|
this.instance = null;
|
78897
|
-
this.
|
78871
|
+
this.tableMeta = null;
|
78898
78872
|
this.dataSource = null;
|
78899
78873
|
this.duckSchema = null;
|
78900
78874
|
this.colToPropCache.length = 0;
|
@@ -79002,7 +78976,7 @@ var _object = __webpack_require__(12);
|
|
79002
78976
|
* ::: only-for react
|
79003
78977
|
*
|
79004
78978
|
* To apply configuration options, pass them as individual props
|
79005
|
-
* of the [`HotTable`](@/guides/getting-started/installation.md
|
78979
|
+
* of the [`HotTable`](@/guides/getting-started/installation.md#use-the-hottable-component)
|
79006
78980
|
* or [`HotColumn`](@/guides/columns/react-hot-column.md) components.
|
79007
78981
|
*
|
79008
78982
|
* Read more on the [Configuration options](@/guides/getting-started/configuration-options.md) page.
|
@@ -79032,10 +79006,10 @@ var _object = __webpack_require__(12);
|
|
79032
79006
|
* :::
|
79033
79007
|
*
|
79034
79008
|
* Depending on your needs, you can apply [configuration options](@/api/options.md) to different elements of your grid:
|
79035
|
-
* - [The entire grid](@/guides/getting-started/configuration-options.md#
|
79036
|
-
* - [Individual columns](@/guides/getting-started/configuration-options.md#
|
79037
|
-
* - [Individual rows](@/guides/getting-started/configuration-options.md#
|
79038
|
-
* - [Individual cells](@/guides/getting-started/configuration-options.md#
|
79009
|
+
* - [The entire grid](@/guides/getting-started/configuration-options.md#set-grid-options)
|
79010
|
+
* - [Individual columns](@/guides/getting-started/configuration-options.md#set-column-options)
|
79011
|
+
* - [Individual rows](@/guides/getting-started/configuration-options.md#set-row-options)
|
79012
|
+
* - [Individual cells](@/guides/getting-started/configuration-options.md#set-cell-options)
|
79039
79013
|
* - [Individual grid elements, based on any logic you implement](@/guides/getting-started/configuration-options.md#implementing-custom-logic)
|
79040
79014
|
*
|
79041
79015
|
* Read more:
|
@@ -79356,14 +79330,16 @@ var _default = function _default() {
|
|
79356
79330
|
*/
|
79357
79331
|
autoRowSize: void 0,
|
79358
79332
|
/**
|
79359
|
-
*
|
79333
|
+
* With [`autoWrapCol`](#autowrapcol) enabled:
|
79334
|
+
* - When you select a bottom-most cell, pressing <kbd>**↓**</kbd> takes you to the top-most cell of the next column.
|
79335
|
+
* - When you select a top-most cell, pressing <kbd>**↑**</kbd> takes you to the bottom-most cell of the previous column.
|
79360
79336
|
*
|
79361
|
-
* You can set the `autoWrapCol` option to one of the following:
|
79337
|
+
* You can set the [`autoWrapCol`](#autowrapcol) option to one of the following:
|
79362
79338
|
*
|
79363
|
-
* | Setting | Description
|
79364
|
-
* | ----------------- |
|
79365
|
-
* | `true` |
|
79366
|
-
* | `false` (default) |
|
79339
|
+
* | Setting | Description |
|
79340
|
+
* | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
79341
|
+
* | `true` | When you select a bottom-most cell, pressing <kbd>**↓**</kbd> takes you to the top-most cell of the next column.<br><br>When you select a top-most cell, pressing <kbd>**↑**</kbd> takes you to the bottom-most cell of the previous column. |
|
79342
|
+
* | `false` (default) | When you select a bottom-most cell, pressing <kbd>**↓**</kbd> doesn't do anything.<br><br>When you select a top-most cell, pressing <kbd>**↑**</kbd> doesn't do anything. |
|
79367
79343
|
*
|
79368
79344
|
* @memberof Options#
|
79369
79345
|
* @type {boolean}
|
@@ -79372,20 +79348,29 @@ var _default = function _default() {
|
|
79372
79348
|
*
|
79373
79349
|
* @example
|
79374
79350
|
* ```js
|
79375
|
-
* //
|
79351
|
+
* // when you select a bottom-most cell, pressing ⬇ doesn't do anything
|
79352
|
+
* // when you select a top-most cell, pressing ⬆ doesn't do anything
|
79353
|
+
* autoWrapCol: false, // default setting
|
79354
|
+
*
|
79355
|
+
* // when you select a bottom-most cell, pressing ⬇ takes you to the top-most cell of the next column
|
79356
|
+
* // when you select a top-most cell, pressing ⬆ takes you to the bottom-most cell of the previous column
|
79376
79357
|
* autoWrapCol: true,
|
79377
79358
|
* ```
|
79378
79359
|
*/
|
79379
79360
|
autoWrapCol: false,
|
79380
79361
|
/**
|
79381
|
-
*
|
79362
|
+
* With [`autoWrapRow`](#autoWrapRow) enabled:
|
79363
|
+
* - When you select the first cell of a row, pressing <kbd>**←**</kbd>* takes you to the last cell of the row above.
|
79364
|
+
* - When you select the last cell of a row, pressing <kbd>**→**</kbd>* takes you to the first cell of the row below.
|
79365
|
+
*
|
79366
|
+
* You can set the [`autoWrapRow`](#autoWrapRow) option to one of the following:
|
79382
79367
|
*
|
79383
|
-
*
|
79368
|
+
* | Setting | Description |
|
79369
|
+
* | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
79370
|
+
* | `true` | When you select the first cell of a row, pressing <kbd>**←**</kbd>* takes you to the last cell of the row above.<br><br>When you select the last cell of a row, pressing <kbd>**→**</kbd>* takes you to the first cell of the row below. |
|
79371
|
+
* | `false` (default) | When you select the first cell of a row, pressing <kbd>**←**</kbd>* doesn't do anything.<br><br>When you select the last cell of a row, pressing <kbd>**→**</kbd>* doesn't do anything. |
|
79384
79372
|
*
|
79385
|
-
*
|
79386
|
-
* | ----------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
79387
|
-
* | `true` | On reaching the grid's left or right edge:<br>- Jump to the grid's opposite edge<br>- Select a cell in the previous/next row |
|
79388
|
-
* | `false` (default) | On reaching the grid's left or right edge, stop |
|
79373
|
+
* \* The exact key depends on your [`layoutDirection`](#layoutdirection) configuration.
|
79389
79374
|
*
|
79390
79375
|
* @memberof Options#
|
79391
79376
|
* @type {boolean}
|
@@ -79394,7 +79379,12 @@ var _default = function _default() {
|
|
79394
79379
|
*
|
79395
79380
|
* @example
|
79396
79381
|
* ```js
|
79397
|
-
* //
|
79382
|
+
* // when you select the first cell of a row, pressing ⬅ doesn't do anything
|
79383
|
+
* // when you select the last cell of a row, pressing ➡️ doesn't do anything
|
79384
|
+
* autoWrapRow: false, // default setting
|
79385
|
+
*
|
79386
|
+
* // when you select the first cell of a row, pressing ⬅ takes you to the last cell of the row above
|
79387
|
+
* // when you select the last cell of a row, pressing ➡️ takes you to the first cell of the row below
|
79398
79388
|
* autoWrapRow: true,
|
79399
79389
|
* ```
|
79400
79390
|
*/
|
@@ -79428,11 +79418,11 @@ var _default = function _default() {
|
|
79428
79418
|
/**
|
79429
79419
|
* The `cell` option lets you apply [configuration options](@/guides/getting-started/configuration-options.md) to individual cells.
|
79430
79420
|
*
|
79431
|
-
* The `cell` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#
|
79421
|
+
* The `cell` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#set-grid-options),
|
79432
79422
|
* and the [`columns`](#columns) options.
|
79433
79423
|
*
|
79434
79424
|
* Read more:
|
79435
|
-
* - [Configuration options: Setting cell options](@/guides/getting-started/configuration-options.md#
|
79425
|
+
* - [Configuration options: Setting cell options](@/guides/getting-started/configuration-options.md#set-cell-options)
|
79436
79426
|
* - [`columns`](#columns)
|
79437
79427
|
*
|
79438
79428
|
* @memberof Options#
|
@@ -79469,8 +79459,8 @@ var _default = function _default() {
|
|
79469
79459
|
* | `prop` | No | String \| Number | If [`data`](#data) is set to an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays), `prop` is the same number as `column`.<br><br>If [`data`](#data) is set to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects), `prop` is a property name for the column's data object. |
|
79470
79460
|
*
|
79471
79461
|
* Read more:
|
79472
|
-
* - [Configuration options: Implementing custom logic](@/guides/getting-started/configuration-options.md#
|
79473
|
-
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#
|
79462
|
+
* - [Configuration options: Implementing custom logic](@/guides/getting-started/configuration-options.md#implement-custom-logic)
|
79463
|
+
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#set-row-options)
|
79474
79464
|
* - [`columns`](#columns)
|
79475
79465
|
* - [`cell`](#cell)
|
79476
79466
|
*
|
@@ -79687,12 +79677,12 @@ var _default = function _default() {
|
|
79687
79677
|
* - An array of objects (each object represents one column)
|
79688
79678
|
* - A function that returns an array of objects
|
79689
79679
|
*
|
79690
|
-
* The `columns` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#
|
79680
|
+
* The `columns` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#set-grid-options).
|
79691
79681
|
*
|
79692
79682
|
* When you use `columns`, the [`startCols`](#startCols), [`minCols`](#minCols), and [`maxCols`](#maxCols) options are ignored.
|
79693
79683
|
*
|
79694
79684
|
* Read more:
|
79695
|
-
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#
|
79685
|
+
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#set-column-options)
|
79696
79686
|
* - [`startCols`](#startCols)
|
79697
79687
|
* - [`minCols`](#minCols)
|
79698
79688
|
* - [`maxCols`](#maxCols)
|
@@ -79825,12 +79815,12 @@ var _default = function _default() {
|
|
79825
79815
|
* | `type` | `'sum'` \| `'min'` \| `'max'` \| `'count'` \| `'average'` \| `'custom'` | [Summary function](@/guides/columns/column-summary.md#step-3-calculate-your-summary) |
|
79826
79816
|
* | `destinationRow` | A number | [Destination cell's row coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
79827
79817
|
* | `destinationColumn` | A number | [Destination cell's column coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
79828
|
-
* | `forceNumeric` | `true` \| `false` | [Treat non-numerics as numerics](@/guides/columns/column-summary.md#
|
79818
|
+
* | `forceNumeric` | `true` \| `false` | [Treat non-numerics as numerics](@/guides/columns/column-summary.md#force-numeric-values) |
|
79829
79819
|
* | `reversedRowCoords` | `true` \| `false` | [Reverse row coordinates](@/guides/columns/column-summary.md#step-5-make-room-for-the-destination-cell) |
|
79830
|
-
* | `suppressDataTypeErrors` | `true` \| `false` | [Suppress data type errors](@/guides/columns/column-summary.md#
|
79820
|
+
* | `suppressDataTypeErrors` | `true` \| `false` | [Suppress data type errors](@/guides/columns/column-summary.md#throw-data-type-errors) |
|
79831
79821
|
* | `readOnly` | `true` \| `false` | Make summary cell read-only |
|
79832
|
-
* | `roundFloat` | `true` \| `false` | [Round summary result](@/guides/columns/column-summary.md#
|
79833
|
-
* | `customFunction` | A function | [Custom summary function](@/guides/columns/column-summary.md#
|
79822
|
+
* | `roundFloat` | `true` \| `false` | [Round summary result](@/guides/columns/column-summary.md#round-a-column-summary-result) |
|
79823
|
+
* | `customFunction` | A function | [Custom summary function](@/guides/columns/column-summary.md#implement-a-custom-summary-function) |
|
79834
79824
|
*
|
79835
79825
|
* Read more:
|
79836
79826
|
* - [Column summary](@/guides/columns/column-summary.md)
|
@@ -80008,13 +79998,13 @@ var _default = function _default() {
|
|
80008
79998
|
* | `false` | Disable the [`ContextMenu`](@/api/contextMenu.md) plugin |
|
80009
79999
|
* | `true` | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Use the [default context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options) |
|
80010
80000
|
* | An array | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Modify [individual context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options) |
|
80011
|
-
* | An object | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Apply a [custom context menu configuration](@/guides/accessories-and-menus/context-menu.md#context-menu-with-fully-custom-configuration) |
|
80001
|
+
* | An object | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Apply a [custom context menu configuration](@/guides/accessories-and-menus/context-menu.md#context-menu-with-a-fully-custom-configuration) |
|
80012
80002
|
*
|
80013
80003
|
* Read more:
|
80014
80004
|
* - [Context menu](@/guides/accessories-and-menus/context-menu.md)
|
80015
80005
|
* - [Context menu: Context menu with default options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options)
|
80016
80006
|
* - [Context menu: Context menu with specific options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options)
|
80017
|
-
* - [Context menu: Context menu with fully custom configuration options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-fully-custom-configuration)
|
80007
|
+
* - [Context menu: Context menu with fully custom configuration options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-a-fully-custom-configuration)
|
80018
80008
|
* - [Plugins: `ContextMenu`](@/api/contextMenu.md)
|
80019
80009
|
*
|
80020
80010
|
* @memberof Options#
|
@@ -81511,7 +81501,7 @@ var _default = function _default() {
|
|
81511
81501
|
*
|
81512
81502
|
* You can set the layout direction only at Handsontable's [initialization](@/guides/getting-started/installation.md#initialize-handsontable). Any change of the `layoutDirection` option after the initialization (e.g. using the [`updateSettings()`](@/api/core.md#updatesettings) method) is ignored.
|
81513
81503
|
*
|
81514
|
-
* You can set the `layoutDirection` option only [for the entire grid](@/guides/getting-started/configuration-options.md#
|
81504
|
+
* You can set the `layoutDirection` option only [for the entire grid](@/guides/getting-started/configuration-options.md#set-grid-options).
|
81515
81505
|
* You can't set it for individual columns, rows, or cells.
|
81516
81506
|
*
|
81517
81507
|
* You can set the `layoutDirection` option to one of the following strings:
|
@@ -81583,8 +81573,8 @@ var _default = function _default() {
|
|
81583
81573
|
* The `locale` option configures Handsontable's [locale](@/guides/internationalization/locale.md) settings.
|
81584
81574
|
*
|
81585
81575
|
* You can set the `locale` option to any valid and canonicalized Unicode BCP 47 locale tag,
|
81586
|
-
* both for the [entire grid](@/guides/internationalization/locale.md#
|
81587
|
-
* and for [individual columns](@/guides/internationalization/locale.md#
|
81576
|
+
* both for the [entire grid](@/guides/internationalization/locale.md#set-the-grid-s-locale),
|
81577
|
+
* and for [individual columns](@/guides/internationalization/locale.md#set-a-column-s-locale).
|
81588
81578
|
*
|
81589
81579
|
* Read more:
|
81590
81580
|
* - [Locale](@/guides/internationalization/locale.md)
|
@@ -82237,7 +82227,7 @@ var _default = function _default() {
|
|
82237
82227
|
* | `true` | Enable the [`PersistentState`](@/api/persistentState.md) plugin |
|
82238
82228
|
*
|
82239
82229
|
* Read more:
|
82240
|
-
* - [Saving data: Saving data locally](@/guides/getting-started/saving-data.md#
|
82230
|
+
* - [Saving data: Saving data locally](@/guides/getting-started/saving-data.md#save-data-locally)
|
82241
82231
|
* - [Plugins: `PersistentState`](@/api/persistentState.md)
|
82242
82232
|
*
|
82243
82233
|
* @memberof Options#
|
@@ -82680,7 +82670,7 @@ var _default = function _default() {
|
|
82680
82670
|
* | `'multiple'` | Allow the user to select multiple ranges of cells at a time. |
|
82681
82671
|
*
|
82682
82672
|
* Read more:
|
82683
|
-
* - [Selection: Selecting ranges](@/guides/cell-features/selection.md#
|
82673
|
+
* - [Selection: Selecting ranges](@/guides/cell-features/selection.md#select-ranges)
|
82684
82674
|
*
|
82685
82675
|
* @memberof Options#
|
82686
82676
|
* @type {string}
|
@@ -82771,7 +82761,7 @@ var _default = function _default() {
|
|
82771
82761
|
* | `true` | - Disable pasting data into this column<br>- On pasting, paste data into the next column to the right |
|
82772
82762
|
*
|
82773
82763
|
* Read more:
|
82774
|
-
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#
|
82764
|
+
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#set-column-options)
|
82775
82765
|
*
|
82776
82766
|
* @memberof Options#
|
82777
82767
|
* @type {boolean}
|
@@ -82804,7 +82794,7 @@ var _default = function _default() {
|
|
82804
82794
|
* | `true` | - Disable pasting data into this row<br>- On pasting, paste data into the row below |
|
82805
82795
|
*
|
82806
82796
|
* Read more:
|
82807
|
-
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#
|
82797
|
+
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#set-row-options)
|
82808
82798
|
*
|
82809
82799
|
* @memberof Options#
|
82810
82800
|
* @type {boolean}
|
@@ -96288,8 +96278,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
|
|
96288
96278
|
Handsontable.CellCoords = _src.CellCoords;
|
96289
96279
|
Handsontable.CellRange = _src.CellRange;
|
96290
96280
|
Handsontable.packageName = 'handsontable';
|
96291
|
-
Handsontable.buildDate = "
|
96292
|
-
Handsontable.version = "0.0.0-next-
|
96281
|
+
Handsontable.buildDate = "06/12/2022 11:15:30";
|
96282
|
+
Handsontable.version = "0.0.0-next-21b8f14-20221206";
|
96293
96283
|
Handsontable.languages = {
|
96294
96284
|
dictionaryKeys: _registry.dictionaryKeys,
|
96295
96285
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
@@ -111278,7 +111268,6 @@ function replaceData(data, setDataMapFunction, callbackFunction, config) {
|
|
111278
111268
|
dataSource = config.dataSource,
|
111279
111269
|
internalSource = config.internalSource,
|
111280
111270
|
source = config.source,
|
111281
|
-
metaManager = config.metaManager,
|
111282
111271
|
firstRun = config.firstRun;
|
111283
111272
|
var capitalizedInternalSource = (0, _string.toUpperCaseFirst)(internalSource);
|
111284
111273
|
var tableMeta = hotInstance.getSettings();
|
@@ -111293,7 +111282,7 @@ function replaceData(data, setDataMapFunction, callbackFunction, config) {
|
|
111293
111282
|
dataMap.destroy();
|
111294
111283
|
}
|
111295
111284
|
data = hotInstance.runHooks("before".concat(capitalizedInternalSource), data, firstRun, source);
|
111296
|
-
var newDataMap = new _dataMap.default(hotInstance, data,
|
111285
|
+
var newDataMap = new _dataMap.default(hotInstance, data, tableMeta);
|
111297
111286
|
|
111298
111287
|
// We need to apply the new dataMap immediately, because of some asynchronous logic in the
|
111299
111288
|
// `autoRowSize`/`autoColumnSize` plugins.
|
@@ -111613,7 +111602,7 @@ var _recorder = __webpack_require__(825);
|
|
111613
111602
|
* @param {object} options The manager's options
|
111614
111603
|
* @param {EventTarget} options.ownerWindow A starting `window` element
|
111615
111604
|
* @param {Function} options.handleEvent A condition on which `event` is handled.
|
111616
|
-
* @param {Function} options.beforeKeyDown A hook fired before the `keydown` event is handled. You can use it to [block a keyboard shortcut's actions](@/guides/accessories-and-menus/keyboard-shortcuts.md#
|
111605
|
+
* @param {Function} options.beforeKeyDown A hook fired before the `keydown` event is handled. You can use it to [block a keyboard shortcut's actions](@/guides/accessories-and-menus/keyboard-shortcuts.md#block-a-keyboard-shortcut-s-actions).
|
111617
111606
|
* @param {Function} options.afterKeyDown A hook fired after the `keydown` event is handled
|
111618
111607
|
*/
|
111619
111608
|
var createShortcutManager = function createShortcutManager(_ref) {
|
@@ -123070,7 +123059,7 @@ var PLUGIN_PRIORITY = 220;
|
|
123070
123059
|
* The `ColumnSummary` plugin lets you [easily summarize your columns](@/guides/columns/column-summary.md).
|
123071
123060
|
*
|
123072
123061
|
* You can use the [built-in summary functions](@/guides/columns/column-summary.md#built-in-summary-functions),
|
123073
|
-
* or implement a [custom summary function](@/guides/columns/column-summary.md#
|
123062
|
+
* or implement a [custom summary function](@/guides/columns/column-summary.md#implement-a-custom-summary-function).
|
123074
123063
|
*
|
123075
123064
|
* For each column summary, you can set the following configuration options:
|
123076
123065
|
*
|
@@ -123081,12 +123070,12 @@ var PLUGIN_PRIORITY = 220;
|
|
123081
123070
|
* | `type` | Yes | String | - | [Sets a summary function](@/guides/columns/column-summary.md#step-3-calculate-your-summary) |
|
123082
123071
|
* | `destinationRow` | Yes | Number | - | [Sets the destination cell's row coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
123083
123072
|
* | `destinationColumn` | Yes | Number | - | [Sets the destination cell's column coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
123084
|
-
* | `forceNumeric` | No | Boolean | `false` | [Forces the summary to treat non-numerics as numerics](@/guides/columns/column-summary.md#
|
123073
|
+
* | `forceNumeric` | No | Boolean | `false` | [Forces the summary to treat non-numerics as numerics](@/guides/columns/column-summary.md#force-numeric-values) |
|
123085
123074
|
* | `reversedRowCoords` | No | Boolean | `false` | [Reverses row coordinates](@/guides/columns/column-summary.md#step-5-make-room-for-the-destination-cell) |
|
123086
|
-
* | `suppressDataTypeErrors` | No | Boolean | `true` | [Suppresses data type errors](@/guides/columns/column-summary.md#
|
123075
|
+
* | `suppressDataTypeErrors` | No | Boolean | `true` | [Suppresses data type errors](@/guides/columns/column-summary.md#throw-data-type-errors) |
|
123087
123076
|
* | `readOnly` | No | Boolean | `true` | Makes summary cell read-only |
|
123088
|
-
* | `roundFloat` | No | Number | - | [Rounds summary result](@/guides/columns/column-summary.md#
|
123089
|
-
* | `customFunction` | No | Function | - | [Lets you add a custom summary function](@/guides/columns/column-summary.md#
|
123077
|
+
* | `roundFloat` | No | Number | - | [Rounds summary result](@/guides/columns/column-summary.md#round-a-column-summary-result) |
|
123078
|
+
* | `customFunction` | No | Function | - | [Lets you add a custom summary function](@/guides/columns/column-summary.md#implement-a-custom-summary-function) |
|
123090
123079
|
*
|
123091
123080
|
* @example
|
123092
123081
|
* ::: only-for javascript
|
@@ -124056,6 +124045,15 @@ var Endpoints = /*#__PURE__*/function () {
|
|
124056
124045
|
var useOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
124057
124046
|
var alterRowOffset = endpoint.alterRowOffset || 0;
|
124058
124047
|
var alterColOffset = endpoint.alterColumnOffset || 0;
|
124048
|
+
var _ref = [this.hot.toVisualRow(endpoint.destinationRow), this.hot.toVisualColumn(endpoint.destinationColumn)],
|
124049
|
+
visualRowIndex = _ref[0],
|
124050
|
+
visualColumnIndex = _ref[1];
|
124051
|
+
if (visualColumnIndex !== null && visualRowIndex !== null) {
|
124052
|
+
// Clear the meta on the "old" indexes
|
124053
|
+
var cellMeta = this.hot.getCellMeta(visualRowIndex, visualColumnIndex);
|
124054
|
+
cellMeta.readOnly = false;
|
124055
|
+
cellMeta.className = '';
|
124056
|
+
}
|
124059
124057
|
this.cellsToSetCache.push([this.hot.toVisualRow(endpoint.destinationRow + (useOffset ? alterRowOffset : 0)), this.hot.toVisualColumn(endpoint.destinationColumn + (useOffset ? alterColOffset : 0)), '']);
|
124060
124058
|
}
|
124061
124059
|
|
@@ -124070,14 +124068,17 @@ var Endpoints = /*#__PURE__*/function () {
|
|
124070
124068
|
key: "setEndpointValue",
|
124071
124069
|
value: function setEndpointValue(endpoint, source) {
|
124072
124070
|
var render = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
124071
|
+
// We'll need the reversed offset values, because cellMeta will be shifted AGAIN afterwards.
|
124072
|
+
var reverseRowOffset = -1 * endpoint.alterRowOffset || 0;
|
124073
|
+
var reverseColOffset = -1 * endpoint.alterColumnOffset || 0;
|
124073
124074
|
var visualEndpointRowIndex = this.hot.toVisualRow(endpoint.destinationRow);
|
124074
124075
|
if (endpoint.destinationRow >= this.hot.countRows() || endpoint.destinationColumn >= this.hot.countCols()) {
|
124075
124076
|
this.throwOutOfBoundsWarning();
|
124076
124077
|
return;
|
124077
124078
|
}
|
124078
|
-
var destinationVisualRow = this.hot.toVisualRow(endpoint.destinationRow);
|
124079
|
+
var destinationVisualRow = this.hot.toVisualRow(endpoint.destinationRow + reverseRowOffset);
|
124079
124080
|
if (destinationVisualRow !== null) {
|
124080
|
-
var cellMeta = this.hot.getCellMeta(destinationVisualRow, endpoint.destinationColumn);
|
124081
|
+
var cellMeta = this.hot.getCellMeta(destinationVisualRow, endpoint.destinationColumn + reverseColOffset);
|
124081
124082
|
if (source === 'init' || cellMeta.readOnly !== endpoint.readOnly) {
|
124082
124083
|
cellMeta.readOnly = endpoint.readOnly;
|
124083
124084
|
cellMeta.className = 'columnSummaryResult';
|