handsontable 0.0.0-next-d4ae6d7-20221205 → 0.0.0-next-0c2e6f8-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 +137 -133
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +7 -7
- package/dist/handsontable.js +137 -133
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/editorManager.js +7 -4
- package/editorManager.mjs +7 -4
- 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
package/dist/handsontable.js
CHANGED
@@ -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-0c2e6f8-20221206
|
29
|
+
* Release date: 25/10/2022 (built at 06/12/2022 11:00:58)
|
30
30
|
*/
|
31
31
|
(function webpackUniversalModuleDefinition(root, factory) {
|
32
32
|
if(typeof exports === 'object' && typeof module === 'object')
|
@@ -2846,7 +2846,7 @@ var domMessages = {
|
|
2846
2846
|
function _injectProductInfo(key, element) {
|
2847
2847
|
var hasValidType = !isEmpty(key);
|
2848
2848
|
var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
2849
|
-
var hotVersion = "0.0.0-next-
|
2849
|
+
var hotVersion = "0.0.0-next-0c2e6f8-20221206";
|
2850
2850
|
var keyValidityDate;
|
2851
2851
|
var consoleMessageState = 'invalid';
|
2852
2852
|
var domMessageState = 'invalid';
|
@@ -12968,6 +12968,7 @@ var _classCallCheck2 = _interopRequireDefault(__webpack_require__(2));
|
|
12968
12968
|
var _createClass2 = _interopRequireDefault(__webpack_require__(3));
|
12969
12969
|
var _unicode = __webpack_require__(90);
|
12970
12970
|
var _event = __webpack_require__(65);
|
12971
|
+
var _element = __webpack_require__(16);
|
12971
12972
|
var _registry = __webpack_require__(106);
|
12972
12973
|
var _eventManager = _interopRequireDefault(__webpack_require__(42));
|
12973
12974
|
var _mixed = __webpack_require__(23);
|
@@ -13191,10 +13192,12 @@ var EditorManager = /*#__PURE__*/function () {
|
|
13191
13192
|
// Getting values using the modified coordinates.
|
13192
13193
|
this.cellProperties = this.instance.getCellMeta(visualRowToCheck, visualColumnToCheck);
|
13193
13194
|
var activeElement = this.instance.rootDocument.activeElement;
|
13194
|
-
|
13195
|
-
|
13196
|
-
|
13197
|
-
|
13195
|
+
|
13196
|
+
// Blurring the `activeElement` removes the unwanted border around the focusable element (#6877)
|
13197
|
+
// and resets the `document.activeElement` property. The blurring should happen only when the
|
13198
|
+
// previously selected input element has not belonged to the Handsontable editor. If blurring is
|
13199
|
+
// triggered for all elements, there is a problem with the disappearing IME editor (#9672).
|
13200
|
+
if (activeElement && (0, _element.isOutsideInput)(activeElement)) {
|
13198
13201
|
activeElement.blur();
|
13199
13202
|
}
|
13200
13203
|
if (!this.isCellEditable()) {
|
@@ -21101,7 +21104,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
21101
21104
|
* @private
|
21102
21105
|
* @param {Array[]} changes An array of changes in format [[row, prop, oldValue, value], ...].
|
21103
21106
|
* @param {string} [source] String that identifies source of hook call
|
21104
|
-
* ([list of all available sources]{@link
|
21107
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
21105
21108
|
*/
|
21106
21109
|
}, {
|
21107
21110
|
key: "onAfterSetDataAtCell",
|
@@ -21162,7 +21165,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
21162
21165
|
* @private
|
21163
21166
|
* @param {Array[]} changes An array of changes in format [[row, column, oldValue, value], ...].
|
21164
21167
|
* @param {string} [source] String that identifies source of hook call
|
21165
|
-
* ([list of all available sources]{@link
|
21168
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
21166
21169
|
*/
|
21167
21170
|
}, {
|
21168
21171
|
key: "onAfterSetSourceDataAtCell",
|
@@ -21277,7 +21280,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
21277
21280
|
* @param {number} row Represents the visual index of first newly created row in the data source array.
|
21278
21281
|
* @param {number} amount Number of newly created rows in the data source array.
|
21279
21282
|
* @param {string} [source] String that identifies source of hook call
|
21280
|
-
* ([list of all available sources]{@link
|
21283
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
21281
21284
|
*/
|
21282
21285
|
}, {
|
21283
21286
|
key: "onAfterCreateRow",
|
@@ -21296,7 +21299,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
21296
21299
|
* @param {number} col Represents the visual index of first newly created column in the data source.
|
21297
21300
|
* @param {number} amount Number of newly created columns in the data source.
|
21298
21301
|
* @param {string} [source] String that identifies source of hook call
|
21299
|
-
* ([list of all available sources]{@link
|
21302
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
21300
21303
|
*/
|
21301
21304
|
}, {
|
21302
21305
|
key: "onAfterCreateCol",
|
@@ -21316,7 +21319,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
21316
21319
|
* @param {number} amount An amount of removed rows.
|
21317
21320
|
* @param {number[]} physicalRows An array of physical rows removed from the data source.
|
21318
21321
|
* @param {string} [source] String that identifies source of hook call
|
21319
|
-
* ([list of all available sources]{@link
|
21322
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
21320
21323
|
*/
|
21321
21324
|
}, {
|
21322
21325
|
key: "onAfterRemoveRow",
|
@@ -21342,7 +21345,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
|
|
21342
21345
|
* @param {number} amount An amount of removed columns.
|
21343
21346
|
* @param {number[]} physicalColumns An array of physical columns removed from the data source.
|
21344
21347
|
* @param {string} [source] String that identifies source of hook call
|
21345
|
-
* ([list of all available sources]{@link
|
21348
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
21346
21349
|
*/
|
21347
21350
|
}, {
|
21348
21351
|
key: "onAfterRemoveCol",
|
@@ -22642,7 +22645,7 @@ var deprecationWarns = new Set();
|
|
22642
22645
|
*
|
22643
22646
|
* ::: only-for react
|
22644
22647
|
* To use these methods, associate a Handsontable instance with your instance
|
22645
|
-
* of the [`HotTable` component](@/guides/getting-started/installation.md#hottable-component),
|
22648
|
+
* of the [`HotTable` component](@/guides/getting-started/installation.md#use-the-hottable-component),
|
22646
22649
|
* by using React's `ref` feature (read more on the [Instance methods](@/guides/getting-started/react-methods.md) page).
|
22647
22650
|
* :::
|
22648
22651
|
*
|
@@ -23079,6 +23082,7 @@ function Core(rootElement, userSettings) {
|
|
23079
23082
|
rowDelta = _datamap$createRow.delta,
|
23080
23083
|
startRowPhysicalIndex = _datamap$createRow.startPhysicalIndex;
|
23081
23084
|
if (rowDelta) {
|
23085
|
+
metaManager.createRow(startRowPhysicalIndex, amount);
|
23082
23086
|
var currentSelectedRange = selection.selectedRange.current();
|
23083
23087
|
var currentFromRange = currentSelectedRange === null || currentSelectedRange === void 0 ? void 0 : currentSelectedRange.from;
|
23084
23088
|
var currentFromRow = currentFromRange === null || currentFromRange === void 0 ? void 0 : currentFromRange.row;
|
@@ -23134,6 +23138,7 @@ function Core(rootElement, userSettings) {
|
|
23134
23138
|
colDelta = _datamap$createCol.delta,
|
23135
23139
|
startColumnPhysicalIndex = _datamap$createCol.startPhysicalIndex;
|
23136
23140
|
if (colDelta) {
|
23141
|
+
metaManager.createColumn(startColumnPhysicalIndex, amount);
|
23137
23142
|
if (Array.isArray(tableMeta.colHeaders)) {
|
23138
23143
|
var spliceArray = [instance.toVisualColumn(startColumnPhysicalIndex), 0];
|
23139
23144
|
spliceArray.length += colDelta; // inserts empty (undefined) elements at the end of an array
|
@@ -23196,6 +23201,7 @@ function Core(rootElement, userSettings) {
|
|
23196
23201
|
if (!wasRemoved) {
|
23197
23202
|
return;
|
23198
23203
|
}
|
23204
|
+
metaManager.removeRow(instance.toPhysicalRow(calcIndex), groupAmount);
|
23199
23205
|
var totalRows = instance.countRows();
|
23200
23206
|
var fixedRowsTop = tableMeta.fixedRowsTop;
|
23201
23207
|
if (fixedRowsTop >= calcIndex + 1) {
|
@@ -23241,6 +23247,7 @@ function Core(rootElement, userSettings) {
|
|
23241
23247
|
if (!wasRemoved) {
|
23242
23248
|
return;
|
23243
23249
|
}
|
23250
|
+
metaManager.removeColumn(physicalColumnIndex, groupAmount);
|
23244
23251
|
var fixedColumnsStart = tableMeta.fixedColumnsStart;
|
23245
23252
|
if (fixedColumnsStart >= calcIndex + 1) {
|
23246
23253
|
tableMeta.fixedColumnsStart -= Math.min(groupAmount, fixedColumnsStart - calcIndex);
|
@@ -23822,7 +23829,9 @@ function Core(rootElement, userSettings) {
|
|
23822
23829
|
source: source
|
23823
23830
|
}),
|
23824
23831
|
numberOfCreatedRows = _datamap$createRow2.delta;
|
23825
|
-
if (numberOfCreatedRows
|
23832
|
+
if (numberOfCreatedRows >= 1) {
|
23833
|
+
metaManager.createRow(null, numberOfCreatedRows);
|
23834
|
+
} else {
|
23826
23835
|
skipThisChange = true;
|
23827
23836
|
break;
|
23828
23837
|
}
|
@@ -23834,7 +23843,9 @@ function Core(rootElement, userSettings) {
|
|
23834
23843
|
source: source
|
23835
23844
|
}),
|
23836
23845
|
numberOfCreatedColumns = _datamap$createCol2.delta;
|
23837
|
-
if (numberOfCreatedColumns
|
23846
|
+
if (numberOfCreatedColumns >= 1) {
|
23847
|
+
metaManager.createColumn(null, numberOfCreatedColumns);
|
23848
|
+
} else {
|
23838
23849
|
skipThisChange = true;
|
23839
23850
|
break;
|
23840
23851
|
}
|
@@ -24659,7 +24670,6 @@ function Core(rootElement, userSettings) {
|
|
24659
24670
|
dataSource: dataSource,
|
24660
24671
|
internalSource: 'updateData',
|
24661
24672
|
source: source,
|
24662
|
-
metaManager: metaManager,
|
24663
24673
|
firstRun: firstRun
|
24664
24674
|
});
|
24665
24675
|
};
|
@@ -24702,7 +24712,6 @@ function Core(rootElement, userSettings) {
|
|
24702
24712
|
dataSource: dataSource,
|
24703
24713
|
internalSource: 'loadData',
|
24704
24714
|
source: source,
|
24705
|
-
metaManager: metaManager,
|
24706
24715
|
firstRun: firstRun
|
24707
24716
|
});
|
24708
24717
|
};
|
@@ -31583,8 +31592,8 @@ __webpack_require__(63);
|
|
31583
31592
|
__webpack_require__(46);
|
31584
31593
|
__webpack_require__(77);
|
31585
31594
|
__webpack_require__(34);
|
31586
|
-
__webpack_require__(22);
|
31587
31595
|
__webpack_require__(19);
|
31596
|
+
__webpack_require__(22);
|
31588
31597
|
__webpack_require__(31);
|
31589
31598
|
__webpack_require__(21);
|
31590
31599
|
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(29));
|
@@ -31631,9 +31640,9 @@ var DataMap = /*#__PURE__*/function () {
|
|
31631
31640
|
/**
|
31632
31641
|
* @param {object} instance Instance of Handsontable.
|
31633
31642
|
* @param {Array} data Array of arrays or array of objects containing data.
|
31634
|
-
* @param {
|
31643
|
+
* @param {TableMeta} tableMeta The table meta instance.
|
31635
31644
|
*/
|
31636
|
-
function DataMap(instance, data,
|
31645
|
+
function DataMap(instance, data, tableMeta) {
|
31637
31646
|
(0, _classCallCheck2.default)(this, DataMap);
|
31638
31647
|
/**
|
31639
31648
|
* Instance of {@link Handsontable}.
|
@@ -31643,12 +31652,12 @@ var DataMap = /*#__PURE__*/function () {
|
|
31643
31652
|
*/
|
31644
31653
|
this.instance = instance;
|
31645
31654
|
/**
|
31646
|
-
* Instance of {@link
|
31655
|
+
* Instance of {@link TableMeta}.
|
31647
31656
|
*
|
31648
31657
|
* @private
|
31649
|
-
* @type {
|
31658
|
+
* @type {TableMeta}
|
31650
31659
|
*/
|
31651
|
-
this.
|
31660
|
+
this.tableMeta = tableMeta;
|
31652
31661
|
/**
|
31653
31662
|
* Reference to the original dataset.
|
31654
31663
|
*
|
@@ -31686,7 +31695,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
31686
31695
|
if (typeof schema === 'undefined') {
|
31687
31696
|
throw new Error('trying to create `columns` definition but you didn\'t provide `schema` nor `data`');
|
31688
31697
|
}
|
31689
|
-
var columns = this.
|
31698
|
+
var columns = this.tableMeta.columns;
|
31690
31699
|
var i;
|
31691
31700
|
this.colToPropCache = [];
|
31692
31701
|
this.propToColCache = new Map();
|
@@ -31699,7 +31708,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
31699
31708
|
columnsLen = schemaLen > 0 ? schemaLen : this.countFirstRowKeys();
|
31700
31709
|
columnsAsFunc = true;
|
31701
31710
|
} else {
|
31702
|
-
var maxCols = this.
|
31711
|
+
var maxCols = this.tableMeta.maxCols;
|
31703
31712
|
columnsLen = Math.min(maxCols, columns.length);
|
31704
31713
|
}
|
31705
31714
|
for (i = 0; i < columnsLen; i++) {
|
@@ -31821,7 +31830,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
31821
31830
|
}, {
|
31822
31831
|
key: "getSchema",
|
31823
31832
|
value: function getSchema() {
|
31824
|
-
var schema = this.
|
31833
|
+
var schema = this.tableMeta.dataSchema;
|
31825
31834
|
if (schema) {
|
31826
31835
|
if (typeof schema === 'function') {
|
31827
31836
|
return schema();
|
@@ -31883,17 +31892,15 @@ var DataMap = /*#__PURE__*/function () {
|
|
31883
31892
|
}
|
31884
31893
|
var continueProcess = this.instance.runHooks('beforeCreateRow', rowIndex, amount, source);
|
31885
31894
|
if (continueProcess === false || physicalRowIndex === null) {
|
31886
|
-
return
|
31887
|
-
delta: 0
|
31888
|
-
};
|
31895
|
+
return 0;
|
31889
31896
|
}
|
31890
|
-
var maxRows = this.
|
31897
|
+
var maxRows = this.tableMeta.maxRows;
|
31891
31898
|
var columnCount = this.getSchema().length;
|
31892
31899
|
var rowsToAdd = [];
|
31893
31900
|
var _loop = function _loop() {
|
31894
31901
|
var row = null;
|
31895
31902
|
if (_this2.instance.dataType === 'array') {
|
31896
|
-
if (_this2.
|
31903
|
+
if (_this2.tableMeta.dataSchema) {
|
31897
31904
|
// Clone template array
|
31898
31905
|
row = (0, _object.deepClone)(_this2.getSchema());
|
31899
31906
|
} else {
|
@@ -31904,7 +31911,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
31904
31911
|
});
|
31905
31912
|
}
|
31906
31913
|
} else if (_this2.instance.dataType === 'function') {
|
31907
|
-
row = _this2.
|
31914
|
+
row = _this2.tableMeta.dataSchema(rowIndex + numberOfCreatedRows);
|
31908
31915
|
} else {
|
31909
31916
|
row = {};
|
31910
31917
|
(0, _object.deepExtend)(row, _this2.getSchema());
|
@@ -31927,14 +31934,6 @@ var DataMap = /*#__PURE__*/function () {
|
|
31927
31934
|
if (this.instance.countSourceRows() === rowsToAdd.length) {
|
31928
31935
|
this.instance.columnIndexMapper.initToLength(this.instance.getInitialColumnCount());
|
31929
31936
|
}
|
31930
|
-
if (numberOfCreatedRows > 0) {
|
31931
|
-
if (index === void 0 || index === null) {
|
31932
|
-
// Creates the meta rows at the end of the rows collection.
|
31933
|
-
this.metaManager.createRow(null, numberOfCreatedRows);
|
31934
|
-
} else if (source !== 'auto') {
|
31935
|
-
this.metaManager.createRow(physicalRowIndex, amount);
|
31936
|
-
}
|
31937
|
-
}
|
31938
31937
|
this.instance.runHooks('afterCreateRow', newVisualRowIndex, numberOfCreatedRows, source);
|
31939
31938
|
this.instance.forceFullRender = true; // used when data was changed
|
31940
31939
|
|
@@ -31968,7 +31967,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
31968
31967
|
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.');
|
31969
31968
|
}
|
31970
31969
|
var dataSource = this.dataSource;
|
31971
|
-
var maxCols = this.
|
31970
|
+
var maxCols = this.tableMeta.maxCols;
|
31972
31971
|
var countSourceCols = this.instance.countSourceCols();
|
31973
31972
|
var columnIndex = index;
|
31974
31973
|
if (typeof columnIndex !== 'number' || columnIndex >= countSourceCols) {
|
@@ -31976,9 +31975,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
31976
31975
|
}
|
31977
31976
|
var continueProcess = this.instance.runHooks('beforeCreateCol', columnIndex, amount, source);
|
31978
31977
|
if (continueProcess === false) {
|
31979
|
-
return
|
31980
|
-
delta: 0
|
31981
|
-
};
|
31978
|
+
return 0;
|
31982
31979
|
}
|
31983
31980
|
var physicalColumnIndex = countSourceCols;
|
31984
31981
|
if (columnIndex < this.instance.countCols()) {
|
@@ -32014,14 +32011,6 @@ var DataMap = /*#__PURE__*/function () {
|
|
32014
32011
|
nrOfColumns += 1;
|
32015
32012
|
}
|
32016
32013
|
this.instance.columnIndexMapper.insertIndexes(columnIndex, numberOfCreatedCols);
|
32017
|
-
if (numberOfCreatedCols > 0) {
|
32018
|
-
if (index === void 0 || index === null) {
|
32019
|
-
// Creates the meta columns at the end of the columns collection.
|
32020
|
-
this.metaManager.createColumn(null, numberOfCreatedCols);
|
32021
|
-
} else if (source !== 'auto') {
|
32022
|
-
this.metaManager.createColumn(startPhysicalIndex, amount);
|
32023
|
-
}
|
32024
|
-
}
|
32025
32014
|
var newVisualColumnIndex = this.instance.toVisualColumn(startPhysicalIndex);
|
32026
32015
|
this.instance.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
|
32027
32016
|
this.instance.forceFullRender = true; // used when data was changed
|
@@ -32046,7 +32035,6 @@ var DataMap = /*#__PURE__*/function () {
|
|
32046
32035
|
}, {
|
32047
32036
|
key: "removeRow",
|
32048
32037
|
value: function removeRow(index) {
|
32049
|
-
var _this3 = this;
|
32050
32038
|
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
32051
32039
|
var source = arguments.length > 2 ? arguments[2] : undefined;
|
32052
32040
|
var rowIndex = Number.isInteger(index) ? index : -amount; // -amount = taking indexes from the end.
|
@@ -32067,19 +32055,13 @@ var DataMap = /*#__PURE__*/function () {
|
|
32067
32055
|
// TODO: Function `removeRow` should validate fully, probably above.
|
32068
32056
|
if (rowIndex < this.instance.countRows()) {
|
32069
32057
|
this.instance.rowIndexMapper.removeIndexes(removedPhysicalIndexes);
|
32070
|
-
var customDefinedColumns = (0, _mixed.isDefined)(this.
|
32058
|
+
var customDefinedColumns = (0, _mixed.isDefined)(this.tableMeta.columns) || (0, _mixed.isDefined)(this.tableMeta.dataSchema);
|
32071
32059
|
|
32072
32060
|
// All rows have been removed. There shouldn't be any columns.
|
32073
32061
|
if (this.instance.rowIndexMapper.getNotTrimmedIndexesLength() === 0 && customDefinedColumns === false) {
|
32074
32062
|
this.instance.columnIndexMapper.setIndexesSequence([]);
|
32075
32063
|
}
|
32076
32064
|
}
|
32077
|
-
var descendingPhysicalRows = removedPhysicalIndexes.slice(0).sort(function (a, b) {
|
32078
|
-
return b - a;
|
32079
|
-
});
|
32080
|
-
descendingPhysicalRows.forEach(function (rowPhysicalIndex) {
|
32081
|
-
_this3.metaManager.removeRow(rowPhysicalIndex, 1);
|
32082
|
-
});
|
32083
32065
|
this.instance.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
|
32084
32066
|
this.instance.forceFullRender = true; // used when data was changed
|
32085
32067
|
|
@@ -32101,56 +32083,51 @@ var DataMap = /*#__PURE__*/function () {
|
|
32101
32083
|
value: function removeCol(index) {
|
32102
32084
|
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
32103
32085
|
var source = arguments.length > 2 ? arguments[2] : undefined;
|
32104
|
-
if (this.instance.dataType === 'object' || this.
|
32086
|
+
if (this.instance.dataType === 'object' || this.tableMeta.columns) {
|
32105
32087
|
throw new Error('cannot remove column with object data source or columns option specified');
|
32106
32088
|
}
|
32107
32089
|
var columnIndex = typeof index !== 'number' ? -amount : index;
|
32108
32090
|
columnIndex = (this.instance.countCols() + columnIndex) % this.instance.countCols();
|
32109
|
-
var
|
32110
|
-
var
|
32091
|
+
var logicColumns = this.visualColumnsToPhysical(columnIndex, amount);
|
32092
|
+
var descendingLogicColumns = logicColumns.slice(0).sort(function (a, b) {
|
32111
32093
|
return b - a;
|
32112
32094
|
});
|
32113
|
-
var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', columnIndex, amount,
|
32095
|
+
var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', columnIndex, amount, logicColumns, source);
|
32114
32096
|
if (actionWasNotCancelled === false) {
|
32115
32097
|
return false;
|
32116
32098
|
}
|
32117
32099
|
var isTableUniform = true;
|
32118
|
-
var removedColumnsCount =
|
32100
|
+
var removedColumnsCount = descendingLogicColumns.length;
|
32119
32101
|
var data = this.dataSource;
|
32120
32102
|
for (var c = 0; c < removedColumnsCount; c++) {
|
32121
|
-
if (isTableUniform &&
|
32103
|
+
if (isTableUniform && logicColumns[0] !== logicColumns[c] - c) {
|
32122
32104
|
isTableUniform = false;
|
32123
32105
|
}
|
32124
32106
|
}
|
32125
32107
|
if (isTableUniform) {
|
32126
32108
|
for (var r = 0, rlen = this.instance.countSourceRows(); r < rlen; r++) {
|
32127
|
-
data[r].splice(
|
32128
|
-
if (r === 0) {
|
32129
|
-
this.metaManager.removeColumn(removedPhysicalIndexes[0], amount);
|
32130
|
-
}
|
32109
|
+
data[r].splice(logicColumns[0], amount);
|
32131
32110
|
}
|
32132
32111
|
} else {
|
32133
32112
|
for (var _r = 0, _rlen = this.instance.countSourceRows(); _r < _rlen; _r++) {
|
32134
32113
|
for (var _c = 0; _c < removedColumnsCount; _c++) {
|
32135
|
-
data[_r].splice(
|
32136
|
-
if (_r === 0) {
|
32137
|
-
this.metaManager.removeColumn(descendingPhysicalColumns[_c], 1);
|
32138
|
-
}
|
32114
|
+
data[_r].splice(descendingLogicColumns[_c], 1);
|
32139
32115
|
}
|
32140
32116
|
}
|
32141
32117
|
}
|
32142
32118
|
|
32143
32119
|
// TODO: Function `removeCol` should validate fully, probably above.
|
32144
32120
|
if (columnIndex < this.instance.countCols()) {
|
32145
|
-
this.instance.columnIndexMapper.removeIndexes(
|
32121
|
+
this.instance.columnIndexMapper.removeIndexes(logicColumns);
|
32146
32122
|
|
32147
32123
|
// All columns have been removed. There shouldn't be any rows.
|
32148
32124
|
if (this.instance.columnIndexMapper.getNotTrimmedIndexesLength() === 0) {
|
32149
32125
|
this.instance.rowIndexMapper.setIndexesSequence([]);
|
32150
32126
|
}
|
32151
32127
|
}
|
32152
|
-
this.instance.runHooks('afterRemoveCol', columnIndex, amount,
|
32128
|
+
this.instance.runHooks('afterRemoveCol', columnIndex, amount, logicColumns, source);
|
32153
32129
|
this.instance.forceFullRender = true; // used when data was changed
|
32130
|
+
|
32154
32131
|
this.refreshDuckSchema();
|
32155
32132
|
return true;
|
32156
32133
|
}
|
@@ -32222,7 +32199,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
32222
32199
|
}, {
|
32223
32200
|
key: "spliceData",
|
32224
32201
|
value: function spliceData(index, deleteCount, elements) {
|
32225
|
-
var
|
32202
|
+
var _this3 = this;
|
32226
32203
|
var continueSplicing = this.instance.runHooks('beforeDataSplice', index, deleteCount, elements);
|
32227
32204
|
if (continueSplicing !== false) {
|
32228
32205
|
var newData = [].concat((0, _toConsumableArray2.default)(this.dataSource.slice(0, index)), (0, _toConsumableArray2.default)(elements), (0, _toConsumableArray2.default)(this.dataSource.slice(index)));
|
@@ -32233,7 +32210,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
32233
32210
|
// Pushing to array instead of using `splice`, because Babel changes the code to one that uses the `apply` method.
|
32234
32211
|
// The used method was cause of the problem described within #7840.
|
32235
32212
|
newData.forEach(function (row) {
|
32236
|
-
return
|
32213
|
+
return _this3.dataSource.push(row);
|
32237
32214
|
});
|
32238
32215
|
}
|
32239
32216
|
}
|
@@ -32442,7 +32419,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
32442
32419
|
}, {
|
32443
32420
|
key: "getLength",
|
32444
32421
|
value: function getLength() {
|
32445
|
-
var maxRowsFromSettings = this.
|
32422
|
+
var maxRowsFromSettings = this.tableMeta.maxRows;
|
32446
32423
|
var maxRows;
|
32447
32424
|
if (maxRowsFromSettings < 0 || maxRowsFromSettings === 0) {
|
32448
32425
|
maxRows = 0;
|
@@ -32501,8 +32478,8 @@ var DataMap = /*#__PURE__*/function () {
|
|
32501
32478
|
var r;
|
32502
32479
|
var c;
|
32503
32480
|
var row;
|
32504
|
-
var maxRows = this.
|
32505
|
-
var maxCols = this.
|
32481
|
+
var maxRows = this.tableMeta.maxRows;
|
32482
|
+
var maxCols = this.tableMeta.maxCols;
|
32506
32483
|
if (maxRows === 0 || maxCols === 0) {
|
32507
32484
|
return [];
|
32508
32485
|
}
|
@@ -32559,7 +32536,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
32559
32536
|
key: "destroy",
|
32560
32537
|
value: function destroy() {
|
32561
32538
|
this.instance = null;
|
32562
|
-
this.
|
32539
|
+
this.tableMeta = null;
|
32563
32540
|
this.dataSource = null;
|
32564
32541
|
this.duckSchema = null;
|
32565
32542
|
this.colToPropCache.length = 0;
|
@@ -32667,7 +32644,7 @@ var _object = __webpack_require__(12);
|
|
32667
32644
|
* ::: only-for react
|
32668
32645
|
*
|
32669
32646
|
* To apply configuration options, pass them as individual props
|
32670
|
-
* of the [`HotTable`](@/guides/getting-started/installation.md
|
32647
|
+
* of the [`HotTable`](@/guides/getting-started/installation.md#use-the-hottable-component)
|
32671
32648
|
* or [`HotColumn`](@/guides/columns/react-hot-column.md) components.
|
32672
32649
|
*
|
32673
32650
|
* Read more on the [Configuration options](@/guides/getting-started/configuration-options.md) page.
|
@@ -32697,10 +32674,10 @@ var _object = __webpack_require__(12);
|
|
32697
32674
|
* :::
|
32698
32675
|
*
|
32699
32676
|
* Depending on your needs, you can apply [configuration options](@/api/options.md) to different elements of your grid:
|
32700
|
-
* - [The entire grid](@/guides/getting-started/configuration-options.md#
|
32701
|
-
* - [Individual columns](@/guides/getting-started/configuration-options.md#
|
32702
|
-
* - [Individual rows](@/guides/getting-started/configuration-options.md#
|
32703
|
-
* - [Individual cells](@/guides/getting-started/configuration-options.md#
|
32677
|
+
* - [The entire grid](@/guides/getting-started/configuration-options.md#set-grid-options)
|
32678
|
+
* - [Individual columns](@/guides/getting-started/configuration-options.md#set-column-options)
|
32679
|
+
* - [Individual rows](@/guides/getting-started/configuration-options.md#set-row-options)
|
32680
|
+
* - [Individual cells](@/guides/getting-started/configuration-options.md#set-cell-options)
|
32704
32681
|
* - [Individual grid elements, based on any logic you implement](@/guides/getting-started/configuration-options.md#implementing-custom-logic)
|
32705
32682
|
*
|
32706
32683
|
* Read more:
|
@@ -33021,14 +32998,16 @@ var _default = function _default() {
|
|
33021
32998
|
*/
|
33022
32999
|
autoRowSize: void 0,
|
33023
33000
|
/**
|
33024
|
-
*
|
33001
|
+
* With [`autoWrapCol`](#autowrapcol) enabled:
|
33002
|
+
* - When you select a bottom-most cell, pressing <kbd>**↓**</kbd> takes you to the top-most cell of the next column.
|
33003
|
+
* - When you select a top-most cell, pressing <kbd>**↑**</kbd> takes you to the bottom-most cell of the previous column.
|
33025
33004
|
*
|
33026
|
-
* You can set the `autoWrapCol` option to one of the following:
|
33005
|
+
* You can set the [`autoWrapCol`](#autowrapcol) option to one of the following:
|
33027
33006
|
*
|
33028
|
-
* | Setting | Description
|
33029
|
-
* | ----------------- |
|
33030
|
-
* | `true` |
|
33031
|
-
* | `false` (default) |
|
33007
|
+
* | Setting | Description |
|
33008
|
+
* | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
33009
|
+
* | `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. |
|
33010
|
+
* | `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. |
|
33032
33011
|
*
|
33033
33012
|
* @memberof Options#
|
33034
33013
|
* @type {boolean}
|
@@ -33037,20 +33016,29 @@ var _default = function _default() {
|
|
33037
33016
|
*
|
33038
33017
|
* @example
|
33039
33018
|
* ```js
|
33040
|
-
* //
|
33019
|
+
* // when you select a bottom-most cell, pressing ⬇ doesn't do anything
|
33020
|
+
* // when you select a top-most cell, pressing ⬆ doesn't do anything
|
33021
|
+
* autoWrapCol: false, // default setting
|
33022
|
+
*
|
33023
|
+
* // when you select a bottom-most cell, pressing ⬇ takes you to the top-most cell of the next column
|
33024
|
+
* // when you select a top-most cell, pressing ⬆ takes you to the bottom-most cell of the previous column
|
33041
33025
|
* autoWrapCol: true,
|
33042
33026
|
* ```
|
33043
33027
|
*/
|
33044
33028
|
autoWrapCol: false,
|
33045
33029
|
/**
|
33046
|
-
*
|
33030
|
+
* With [`autoWrapRow`](#autoWrapRow) enabled:
|
33031
|
+
* - When you select the first cell of a row, pressing <kbd>**←**</kbd>* takes you to the last cell of the row above.
|
33032
|
+
* - When you select the last cell of a row, pressing <kbd>**→**</kbd>* takes you to the first cell of the row below.
|
33033
|
+
*
|
33034
|
+
* You can set the [`autoWrapRow`](#autoWrapRow) option to one of the following:
|
33047
33035
|
*
|
33048
|
-
*
|
33036
|
+
* | Setting | Description |
|
33037
|
+
* | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
33038
|
+
* | `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. |
|
33039
|
+
* | `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. |
|
33049
33040
|
*
|
33050
|
-
*
|
33051
|
-
* | ----------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
33052
|
-
* | `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 |
|
33053
|
-
* | `false` (default) | On reaching the grid's left or right edge, stop |
|
33041
|
+
* \* The exact key depends on your [`layoutDirection`](#layoutdirection) configuration.
|
33054
33042
|
*
|
33055
33043
|
* @memberof Options#
|
33056
33044
|
* @type {boolean}
|
@@ -33059,7 +33047,12 @@ var _default = function _default() {
|
|
33059
33047
|
*
|
33060
33048
|
* @example
|
33061
33049
|
* ```js
|
33062
|
-
* //
|
33050
|
+
* // when you select the first cell of a row, pressing ⬅ doesn't do anything
|
33051
|
+
* // when you select the last cell of a row, pressing ➡️ doesn't do anything
|
33052
|
+
* autoWrapRow: false, // default setting
|
33053
|
+
*
|
33054
|
+
* // when you select the first cell of a row, pressing ⬅ takes you to the last cell of the row above
|
33055
|
+
* // when you select the last cell of a row, pressing ➡️ takes you to the first cell of the row below
|
33063
33056
|
* autoWrapRow: true,
|
33064
33057
|
* ```
|
33065
33058
|
*/
|
@@ -33093,11 +33086,11 @@ var _default = function _default() {
|
|
33093
33086
|
/**
|
33094
33087
|
* The `cell` option lets you apply [configuration options](@/guides/getting-started/configuration-options.md) to individual cells.
|
33095
33088
|
*
|
33096
|
-
* The `cell` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#
|
33089
|
+
* The `cell` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#set-grid-options),
|
33097
33090
|
* and the [`columns`](#columns) options.
|
33098
33091
|
*
|
33099
33092
|
* Read more:
|
33100
|
-
* - [Configuration options: Setting cell options](@/guides/getting-started/configuration-options.md#
|
33093
|
+
* - [Configuration options: Setting cell options](@/guides/getting-started/configuration-options.md#set-cell-options)
|
33101
33094
|
* - [`columns`](#columns)
|
33102
33095
|
*
|
33103
33096
|
* @memberof Options#
|
@@ -33134,8 +33127,8 @@ var _default = function _default() {
|
|
33134
33127
|
* | `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. |
|
33135
33128
|
*
|
33136
33129
|
* Read more:
|
33137
|
-
* - [Configuration options: Implementing custom logic](@/guides/getting-started/configuration-options.md#
|
33138
|
-
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#
|
33130
|
+
* - [Configuration options: Implementing custom logic](@/guides/getting-started/configuration-options.md#implement-custom-logic)
|
33131
|
+
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#set-row-options)
|
33139
33132
|
* - [`columns`](#columns)
|
33140
33133
|
* - [`cell`](#cell)
|
33141
33134
|
*
|
@@ -33352,12 +33345,12 @@ var _default = function _default() {
|
|
33352
33345
|
* - An array of objects (each object represents one column)
|
33353
33346
|
* - A function that returns an array of objects
|
33354
33347
|
*
|
33355
|
-
* The `columns` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#
|
33348
|
+
* The `columns` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#set-grid-options).
|
33356
33349
|
*
|
33357
33350
|
* When you use `columns`, the [`startCols`](#startCols), [`minCols`](#minCols), and [`maxCols`](#maxCols) options are ignored.
|
33358
33351
|
*
|
33359
33352
|
* Read more:
|
33360
|
-
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#
|
33353
|
+
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#set-column-options)
|
33361
33354
|
* - [`startCols`](#startCols)
|
33362
33355
|
* - [`minCols`](#minCols)
|
33363
33356
|
* - [`maxCols`](#maxCols)
|
@@ -33490,12 +33483,12 @@ var _default = function _default() {
|
|
33490
33483
|
* | `type` | `'sum'` \| `'min'` \| `'max'` \| `'count'` \| `'average'` \| `'custom'` | [Summary function](@/guides/columns/column-summary.md#step-3-calculate-your-summary) |
|
33491
33484
|
* | `destinationRow` | A number | [Destination cell's row coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
33492
33485
|
* | `destinationColumn` | A number | [Destination cell's column coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
33493
|
-
* | `forceNumeric` | `true` \| `false` | [Treat non-numerics as numerics](@/guides/columns/column-summary.md#
|
33486
|
+
* | `forceNumeric` | `true` \| `false` | [Treat non-numerics as numerics](@/guides/columns/column-summary.md#force-numeric-values) |
|
33494
33487
|
* | `reversedRowCoords` | `true` \| `false` | [Reverse row coordinates](@/guides/columns/column-summary.md#step-5-make-room-for-the-destination-cell) |
|
33495
|
-
* | `suppressDataTypeErrors` | `true` \| `false` | [Suppress data type errors](@/guides/columns/column-summary.md#
|
33488
|
+
* | `suppressDataTypeErrors` | `true` \| `false` | [Suppress data type errors](@/guides/columns/column-summary.md#throw-data-type-errors) |
|
33496
33489
|
* | `readOnly` | `true` \| `false` | Make summary cell read-only |
|
33497
|
-
* | `roundFloat` | `true` \| `false` | [Round summary result](@/guides/columns/column-summary.md#
|
33498
|
-
* | `customFunction` | A function | [Custom summary function](@/guides/columns/column-summary.md#
|
33490
|
+
* | `roundFloat` | `true` \| `false` | [Round summary result](@/guides/columns/column-summary.md#round-a-column-summary-result) |
|
33491
|
+
* | `customFunction` | A function | [Custom summary function](@/guides/columns/column-summary.md#implement-a-custom-summary-function) |
|
33499
33492
|
*
|
33500
33493
|
* Read more:
|
33501
33494
|
* - [Column summary](@/guides/columns/column-summary.md)
|
@@ -33673,13 +33666,13 @@ var _default = function _default() {
|
|
33673
33666
|
* | `false` | Disable the [`ContextMenu`](@/api/contextMenu.md) plugin |
|
33674
33667
|
* | `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) |
|
33675
33668
|
* | 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) |
|
33676
|
-
* | 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) |
|
33669
|
+
* | 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) |
|
33677
33670
|
*
|
33678
33671
|
* Read more:
|
33679
33672
|
* - [Context menu](@/guides/accessories-and-menus/context-menu.md)
|
33680
33673
|
* - [Context menu: Context menu with default options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options)
|
33681
33674
|
* - [Context menu: Context menu with specific options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options)
|
33682
|
-
* - [Context menu: Context menu with fully custom configuration options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-fully-custom-configuration)
|
33675
|
+
* - [Context menu: Context menu with fully custom configuration options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-a-fully-custom-configuration)
|
33683
33676
|
* - [Plugins: `ContextMenu`](@/api/contextMenu.md)
|
33684
33677
|
*
|
33685
33678
|
* @memberof Options#
|
@@ -35176,7 +35169,7 @@ var _default = function _default() {
|
|
35176
35169
|
*
|
35177
35170
|
* 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.
|
35178
35171
|
*
|
35179
|
-
* You can set the `layoutDirection` option only [for the entire grid](@/guides/getting-started/configuration-options.md#
|
35172
|
+
* You can set the `layoutDirection` option only [for the entire grid](@/guides/getting-started/configuration-options.md#set-grid-options).
|
35180
35173
|
* You can't set it for individual columns, rows, or cells.
|
35181
35174
|
*
|
35182
35175
|
* You can set the `layoutDirection` option to one of the following strings:
|
@@ -35248,8 +35241,8 @@ var _default = function _default() {
|
|
35248
35241
|
* The `locale` option configures Handsontable's [locale](@/guides/internationalization/locale.md) settings.
|
35249
35242
|
*
|
35250
35243
|
* You can set the `locale` option to any valid and canonicalized Unicode BCP 47 locale tag,
|
35251
|
-
* both for the [entire grid](@/guides/internationalization/locale.md#
|
35252
|
-
* and for [individual columns](@/guides/internationalization/locale.md#
|
35244
|
+
* both for the [entire grid](@/guides/internationalization/locale.md#set-the-grid-s-locale),
|
35245
|
+
* and for [individual columns](@/guides/internationalization/locale.md#set-a-column-s-locale).
|
35253
35246
|
*
|
35254
35247
|
* Read more:
|
35255
35248
|
* - [Locale](@/guides/internationalization/locale.md)
|
@@ -35902,7 +35895,7 @@ var _default = function _default() {
|
|
35902
35895
|
* | `true` | Enable the [`PersistentState`](@/api/persistentState.md) plugin |
|
35903
35896
|
*
|
35904
35897
|
* Read more:
|
35905
|
-
* - [Saving data: Saving data locally](@/guides/getting-started/saving-data.md#
|
35898
|
+
* - [Saving data: Saving data locally](@/guides/getting-started/saving-data.md#save-data-locally)
|
35906
35899
|
* - [Plugins: `PersistentState`](@/api/persistentState.md)
|
35907
35900
|
*
|
35908
35901
|
* @memberof Options#
|
@@ -36345,7 +36338,7 @@ var _default = function _default() {
|
|
36345
36338
|
* | `'multiple'` | Allow the user to select multiple ranges of cells at a time. |
|
36346
36339
|
*
|
36347
36340
|
* Read more:
|
36348
|
-
* - [Selection: Selecting ranges](@/guides/cell-features/selection.md#
|
36341
|
+
* - [Selection: Selecting ranges](@/guides/cell-features/selection.md#select-ranges)
|
36349
36342
|
*
|
36350
36343
|
* @memberof Options#
|
36351
36344
|
* @type {string}
|
@@ -36436,7 +36429,7 @@ var _default = function _default() {
|
|
36436
36429
|
* | `true` | - Disable pasting data into this column<br>- On pasting, paste data into the next column to the right |
|
36437
36430
|
*
|
36438
36431
|
* Read more:
|
36439
|
-
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#
|
36432
|
+
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#set-column-options)
|
36440
36433
|
*
|
36441
36434
|
* @memberof Options#
|
36442
36435
|
* @type {boolean}
|
@@ -36469,7 +36462,7 @@ var _default = function _default() {
|
|
36469
36462
|
* | `true` | - Disable pasting data into this row<br>- On pasting, paste data into the row below |
|
36470
36463
|
*
|
36471
36464
|
* Read more:
|
36472
|
-
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#
|
36465
|
+
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#set-row-options)
|
36473
36466
|
*
|
36474
36467
|
* @memberof Options#
|
36475
36468
|
* @type {boolean}
|
@@ -41570,8 +41563,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
|
|
41570
41563
|
Handsontable.CellCoords = _src.CellCoords;
|
41571
41564
|
Handsontable.CellRange = _src.CellRange;
|
41572
41565
|
Handsontable.packageName = 'handsontable';
|
41573
|
-
Handsontable.buildDate = "
|
41574
|
-
Handsontable.version = "0.0.0-next-
|
41566
|
+
Handsontable.buildDate = "06/12/2022 11:00:58";
|
41567
|
+
Handsontable.version = "0.0.0-next-0c2e6f8-20221206";
|
41575
41568
|
Handsontable.languages = {
|
41576
41569
|
dictionaryKeys: _registry.dictionaryKeys,
|
41577
41570
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
@@ -56241,7 +56234,6 @@ function replaceData(data, setDataMapFunction, callbackFunction, config) {
|
|
56241
56234
|
dataSource = config.dataSource,
|
56242
56235
|
internalSource = config.internalSource,
|
56243
56236
|
source = config.source,
|
56244
|
-
metaManager = config.metaManager,
|
56245
56237
|
firstRun = config.firstRun;
|
56246
56238
|
var capitalizedInternalSource = (0, _string.toUpperCaseFirst)(internalSource);
|
56247
56239
|
var tableMeta = hotInstance.getSettings();
|
@@ -56256,7 +56248,7 @@ function replaceData(data, setDataMapFunction, callbackFunction, config) {
|
|
56256
56248
|
dataMap.destroy();
|
56257
56249
|
}
|
56258
56250
|
data = hotInstance.runHooks("before".concat(capitalizedInternalSource), data, firstRun, source);
|
56259
|
-
var newDataMap = new _dataMap.default(hotInstance, data,
|
56251
|
+
var newDataMap = new _dataMap.default(hotInstance, data, tableMeta);
|
56260
56252
|
|
56261
56253
|
// We need to apply the new dataMap immediately, because of some asynchronous logic in the
|
56262
56254
|
// `autoRowSize`/`autoColumnSize` plugins.
|
@@ -56576,7 +56568,7 @@ var _recorder = __webpack_require__(497);
|
|
56576
56568
|
* @param {object} options The manager's options
|
56577
56569
|
* @param {EventTarget} options.ownerWindow A starting `window` element
|
56578
56570
|
* @param {Function} options.handleEvent A condition on which `event` is handled.
|
56579
|
-
* @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#
|
56571
|
+
* @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).
|
56580
56572
|
* @param {Function} options.afterKeyDown A hook fired after the `keydown` event is handled
|
56581
56573
|
*/
|
56582
56574
|
var createShortcutManager = function createShortcutManager(_ref) {
|
@@ -66752,7 +66744,7 @@ var PLUGIN_PRIORITY = 220;
|
|
66752
66744
|
* The `ColumnSummary` plugin lets you [easily summarize your columns](@/guides/columns/column-summary.md).
|
66753
66745
|
*
|
66754
66746
|
* You can use the [built-in summary functions](@/guides/columns/column-summary.md#built-in-summary-functions),
|
66755
|
-
* or implement a [custom summary function](@/guides/columns/column-summary.md#
|
66747
|
+
* or implement a [custom summary function](@/guides/columns/column-summary.md#implement-a-custom-summary-function).
|
66756
66748
|
*
|
66757
66749
|
* For each column summary, you can set the following configuration options:
|
66758
66750
|
*
|
@@ -66763,12 +66755,12 @@ var PLUGIN_PRIORITY = 220;
|
|
66763
66755
|
* | `type` | Yes | String | - | [Sets a summary function](@/guides/columns/column-summary.md#step-3-calculate-your-summary) |
|
66764
66756
|
* | `destinationRow` | Yes | Number | - | [Sets the destination cell's row coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
66765
66757
|
* | `destinationColumn` | Yes | Number | - | [Sets the destination cell's column coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
66766
|
-
* | `forceNumeric` | No | Boolean | `false` | [Forces the summary to treat non-numerics as numerics](@/guides/columns/column-summary.md#
|
66758
|
+
* | `forceNumeric` | No | Boolean | `false` | [Forces the summary to treat non-numerics as numerics](@/guides/columns/column-summary.md#force-numeric-values) |
|
66767
66759
|
* | `reversedRowCoords` | No | Boolean | `false` | [Reverses row coordinates](@/guides/columns/column-summary.md#step-5-make-room-for-the-destination-cell) |
|
66768
|
-
* | `suppressDataTypeErrors` | No | Boolean | `true` | [Suppresses data type errors](@/guides/columns/column-summary.md#
|
66760
|
+
* | `suppressDataTypeErrors` | No | Boolean | `true` | [Suppresses data type errors](@/guides/columns/column-summary.md#throw-data-type-errors) |
|
66769
66761
|
* | `readOnly` | No | Boolean | `true` | Makes summary cell read-only |
|
66770
|
-
* | `roundFloat` | No | Number | - | [Rounds summary result](@/guides/columns/column-summary.md#
|
66771
|
-
* | `customFunction` | No | Function | - | [Lets you add a custom summary function](@/guides/columns/column-summary.md#
|
66762
|
+
* | `roundFloat` | No | Number | - | [Rounds summary result](@/guides/columns/column-summary.md#round-a-column-summary-result) |
|
66763
|
+
* | `customFunction` | No | Function | - | [Lets you add a custom summary function](@/guides/columns/column-summary.md#implement-a-custom-summary-function) |
|
66772
66764
|
*
|
66773
66765
|
* @example
|
66774
66766
|
* ::: only-for javascript
|
@@ -67738,6 +67730,15 @@ var Endpoints = /*#__PURE__*/function () {
|
|
67738
67730
|
var useOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
67739
67731
|
var alterRowOffset = endpoint.alterRowOffset || 0;
|
67740
67732
|
var alterColOffset = endpoint.alterColumnOffset || 0;
|
67733
|
+
var _ref = [this.hot.toVisualRow(endpoint.destinationRow), this.hot.toVisualColumn(endpoint.destinationColumn)],
|
67734
|
+
visualRowIndex = _ref[0],
|
67735
|
+
visualColumnIndex = _ref[1];
|
67736
|
+
if (visualColumnIndex !== null && visualRowIndex !== null) {
|
67737
|
+
// Clear the meta on the "old" indexes
|
67738
|
+
var cellMeta = this.hot.getCellMeta(visualRowIndex, visualColumnIndex);
|
67739
|
+
cellMeta.readOnly = false;
|
67740
|
+
cellMeta.className = '';
|
67741
|
+
}
|
67741
67742
|
this.cellsToSetCache.push([this.hot.toVisualRow(endpoint.destinationRow + (useOffset ? alterRowOffset : 0)), this.hot.toVisualColumn(endpoint.destinationColumn + (useOffset ? alterColOffset : 0)), '']);
|
67742
67743
|
}
|
67743
67744
|
|
@@ -67752,14 +67753,17 @@ var Endpoints = /*#__PURE__*/function () {
|
|
67752
67753
|
key: "setEndpointValue",
|
67753
67754
|
value: function setEndpointValue(endpoint, source) {
|
67754
67755
|
var render = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
67756
|
+
// We'll need the reversed offset values, because cellMeta will be shifted AGAIN afterwards.
|
67757
|
+
var reverseRowOffset = -1 * endpoint.alterRowOffset || 0;
|
67758
|
+
var reverseColOffset = -1 * endpoint.alterColumnOffset || 0;
|
67755
67759
|
var visualEndpointRowIndex = this.hot.toVisualRow(endpoint.destinationRow);
|
67756
67760
|
if (endpoint.destinationRow >= this.hot.countRows() || endpoint.destinationColumn >= this.hot.countCols()) {
|
67757
67761
|
this.throwOutOfBoundsWarning();
|
67758
67762
|
return;
|
67759
67763
|
}
|
67760
|
-
var destinationVisualRow = this.hot.toVisualRow(endpoint.destinationRow);
|
67764
|
+
var destinationVisualRow = this.hot.toVisualRow(endpoint.destinationRow + reverseRowOffset);
|
67761
67765
|
if (destinationVisualRow !== null) {
|
67762
|
-
var cellMeta = this.hot.getCellMeta(destinationVisualRow, endpoint.destinationColumn);
|
67766
|
+
var cellMeta = this.hot.getCellMeta(destinationVisualRow, endpoint.destinationColumn + reverseColOffset);
|
67763
67767
|
if (source === 'init' || cellMeta.readOnly !== endpoint.readOnly) {
|
67764
67768
|
cellMeta.readOnly = endpoint.readOnly;
|
67765
67769
|
cellMeta.className = 'columnSummaryResult';
|