handsontable 12.1.1 → 12.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/border.js +43 -28
- package/3rdparty/walkontable/src/border.mjs +43 -28
- package/3rdparty/walkontable/src/table.js +13 -10
- package/3rdparty/walkontable/src/table.mjs +13 -10
- package/CHANGELOG.md +31 -0
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +1 -3
- package/core.js +9 -1
- package/core.mjs +9 -1
- package/dataMap/dataMap.js +35 -16
- package/dataMap/dataMap.mjs +30 -13
- package/dataMap/metaManager/lazyFactoryMap.js +24 -5
- package/dataMap/metaManager/lazyFactoryMap.mjs +19 -4
- package/dataMap/metaManager/metaSchema.js +112 -80
- package/dataMap/metaManager/metaSchema.mjs +112 -80
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +35200 -52208
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +527 -284
- package/dist/handsontable.js +3046 -3279
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/editorManager.js +69 -35
- package/editorManager.mjs +69 -35
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +17 -2
- package/editors/dateEditor/dateEditor.mjs +16 -0
- package/editors/textEditor/caretPositioner.js +0 -4
- package/editors/textEditor/caretPositioner.mjs +0 -2
- package/helpers/dom/element.js +2 -4
- package/helpers/dom/element.mjs +1 -2
- package/helpers/mixed.js +2 -4
- package/helpers/mixed.mjs +2 -3
- package/helpers/object.js +0 -4
- package/helpers/object.mjs +0 -2
- package/helpers/unicode.js +0 -4
- package/helpers/unicode.mjs +0 -2
- package/package.json +2 -2
- package/pluginHooks.d.ts +0 -1
- package/pluginHooks.js +17 -14
- package/pluginHooks.mjs +17 -14
- package/plugins/base/base.js +2 -4
- package/plugins/base/base.mjs +1 -2
- package/plugins/columnSorting/sortService/engine.js +2 -6
- package/plugins/columnSorting/sortService/engine.mjs +2 -2
- package/plugins/columnSummary/columnSummary.js +17 -11
- package/plugins/columnSummary/columnSummary.mjs +15 -9
- package/plugins/columnSummary/utils.js +14 -0
- package/plugins/columnSummary/utils.mjs +9 -0
- package/plugins/contextMenu/commandExecutor.js +0 -4
- package/plugins/contextMenu/commandExecutor.mjs +0 -2
- package/plugins/contextMenu/contextMenu.js +5 -1
- package/plugins/contextMenu/contextMenu.mjs +5 -1
- package/plugins/contextMenu/menu.js +4 -0
- package/plugins/contextMenu/menu.mjs +4 -0
- package/plugins/copyPaste/copyPaste.js +2 -0
- package/plugins/copyPaste/copyPaste.mjs +2 -0
- package/plugins/dropdownMenu/dropdownMenu.js +4 -0
- package/plugins/dropdownMenu/dropdownMenu.mjs +4 -0
- package/plugins/filters/component/condition.js +11 -29
- package/plugins/filters/component/condition.mjs +6 -21
- package/plugins/filters/component/value.js +12 -5
- package/plugins/filters/component/value.mjs +12 -5
- package/plugins/filters/filters.d.ts +1 -1
- package/plugins/filters/filters.js +62 -82
- package/plugins/filters/filters.mjs +63 -83
- package/plugins/hiddenColumns/hiddenColumns.js +0 -4
- package/plugins/hiddenColumns/hiddenColumns.mjs +0 -2
- package/plugins/hiddenRows/hiddenRows.js +0 -4
- package/plugins/hiddenRows/hiddenRows.mjs +0 -2
- package/plugins/multiColumnSorting/domHelpers.js +2 -4
- package/plugins/multiColumnSorting/domHelpers.mjs +1 -2
- package/plugins/nestedRows/nestedRows.js +1 -1
- package/plugins/nestedRows/nestedRows.mjs +1 -1
- package/plugins/search/search.js +0 -2
- package/plugins/search/search.mjs +0 -1
- package/plugins/trimRows/trimRows.js +3 -3
- package/plugins/trimRows/trimRows.mjs +3 -3
- package/renderers/numericRenderer/numericRenderer.js +0 -2
- package/renderers/numericRenderer/numericRenderer.mjs +0 -1
- package/renderers/textRenderer/textRenderer.js +1 -1
- package/renderers/textRenderer/textRenderer.mjs +1 -1
- package/shortcuts/recorder.js +14 -10
- package/shortcuts/recorder.mjs +13 -10
- package/shortcuts/utils.js +0 -4
- package/shortcuts/utils.mjs +0 -2
- package/translations/indexMapper.js +2 -2
- package/translations/indexMapper.mjs +2 -2
- package/utils/sortingAlgorithms/mergeSort.js +0 -120
- package/utils/sortingAlgorithms/mergeSort.mjs +0 -110
package/dataMap/dataMap.mjs
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
|
+
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
4
|
+
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
6
|
+
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
8
|
+
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
10
|
+
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
12
|
+
|
1
13
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
14
|
|
3
15
|
import "core-js/modules/es.array.iterator.js";
|
@@ -7,17 +19,19 @@ import "core-js/modules/es.string.iterator.js";
|
|
7
19
|
import "core-js/modules/web.dom-collections.iterator.js";
|
8
20
|
import "core-js/modules/es.number.is-integer.js";
|
9
21
|
import "core-js/modules/es.number.constructor.js";
|
10
|
-
import "core-js/modules/es.array.concat.js";
|
11
22
|
import "core-js/modules/es.array.splice.js";
|
12
23
|
import "core-js/modules/es.array.sort.js";
|
13
24
|
import "core-js/modules/es.array.slice.js";
|
25
|
+
import "core-js/modules/es.array.concat.js";
|
26
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
14
27
|
import "core-js/modules/es.array.filter.js";
|
15
28
|
import "core-js/modules/es.array.index-of.js";
|
16
|
-
import "core-js/modules/es.regexp.exec.js";
|
17
|
-
import "core-js/modules/es.string.split.js";
|
18
29
|
import "core-js/modules/es.symbol.js";
|
19
30
|
import "core-js/modules/es.symbol.description.js";
|
20
31
|
import "core-js/modules/es.symbol.iterator.js";
|
32
|
+
import "core-js/modules/es.array.from.js";
|
33
|
+
import "core-js/modules/es.function.name.js";
|
34
|
+
import "core-js/modules/es.regexp.exec.js";
|
21
35
|
|
22
36
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
23
37
|
|
@@ -366,7 +380,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
366
380
|
}
|
367
381
|
|
368
382
|
this.instance.rowIndexMapper.insertIndexes(rowIndex, numberOfCreatedRows);
|
369
|
-
this.spliceData
|
383
|
+
this.spliceData(physicalRowIndex, 0, rowsToAdd);
|
370
384
|
this.instance.runHooks('afterCreateRow', rowIndex, numberOfCreatedRows, source);
|
371
385
|
this.instance.forceFullRender = true; // used when data was changed
|
372
386
|
|
@@ -633,23 +647,26 @@ var DataMap = /*#__PURE__*/function () {
|
|
633
647
|
* Add/remove row(s) to/from the data source.
|
634
648
|
*
|
635
649
|
* @param {number} index Physical index of the element to add/remove.
|
636
|
-
* @param {number}
|
637
|
-
* @param {
|
650
|
+
* @param {number} deleteCount Number of rows to remove.
|
651
|
+
* @param {Array<object>} elements Row elements to be added.
|
638
652
|
*/
|
639
653
|
|
640
654
|
}, {
|
641
655
|
key: "spliceData",
|
642
|
-
value: function spliceData(index,
|
643
|
-
|
644
|
-
elements[_key3 - 2] = arguments[_key3];
|
645
|
-
}
|
656
|
+
value: function spliceData(index, deleteCount, elements) {
|
657
|
+
var _this3 = this;
|
646
658
|
|
647
|
-
var continueSplicing = this.instance.runHooks('beforeDataSplice', index,
|
659
|
+
var continueSplicing = this.instance.runHooks('beforeDataSplice', index, deleteCount, elements);
|
648
660
|
|
649
661
|
if (continueSplicing !== false) {
|
650
|
-
var
|
662
|
+
var newData = [].concat(_toConsumableArray(this.dataSource.slice(0, index)), _toConsumableArray(elements), _toConsumableArray(this.dataSource.slice(index))); // We try not to change the reference.
|
663
|
+
|
664
|
+
this.dataSource.length = 0; // Pushing to array instead of using `splice`, because Babel changes the code to one that uses the `apply` method.
|
665
|
+
// The used method was cause of the problem described within #7840.
|
651
666
|
|
652
|
-
|
667
|
+
newData.forEach(function (row) {
|
668
|
+
return _this3.dataSource.push(row);
|
669
|
+
});
|
653
670
|
}
|
654
671
|
}
|
655
672
|
/**
|
@@ -1,5 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
require("core-js/modules/es.array.from.js");
|
4
|
+
|
5
|
+
require("core-js/modules/es.function.name.js");
|
6
|
+
|
7
|
+
require("core-js/modules/es.regexp.exec.js");
|
8
|
+
|
3
9
|
exports.__esModule = true;
|
4
10
|
exports.default = void 0;
|
5
11
|
|
@@ -13,10 +19,12 @@ require("core-js/modules/es.string.iterator.js");
|
|
13
19
|
|
14
20
|
require("core-js/modules/web.dom-collections.iterator.js");
|
15
21
|
|
16
|
-
require("core-js/modules/es.array.splice.js");
|
17
|
-
|
18
22
|
require("core-js/modules/es.array.concat.js");
|
19
23
|
|
24
|
+
require("core-js/modules/es.array.slice.js");
|
25
|
+
|
26
|
+
require("core-js/modules/es.array.splice.js");
|
27
|
+
|
20
28
|
require("core-js/modules/es.symbol.iterator.js");
|
21
29
|
|
22
30
|
require("core-js/modules/es.symbol.js");
|
@@ -29,6 +37,18 @@ var _array = require("../../helpers/array");
|
|
29
37
|
|
30
38
|
var _utils = require("./utils");
|
31
39
|
|
40
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
41
|
+
|
42
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
43
|
+
|
44
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
45
|
+
|
46
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
47
|
+
|
48
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
49
|
+
|
50
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
51
|
+
|
32
52
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
33
53
|
|
34
54
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
@@ -245,8 +265,6 @@ var LazyFactoryMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
245
265
|
}, {
|
246
266
|
key: "insert",
|
247
267
|
value: function insert(key) {
|
248
|
-
var _this$index;
|
249
|
-
|
250
268
|
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
251
269
|
(0, _utils.assert)(function () {
|
252
270
|
return (0, _utils.isUnsignedNumber)(key) || (0, _utils.isNullish)(key);
|
@@ -259,7 +277,8 @@ var LazyFactoryMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
259
277
|
this.data.push(void 0);
|
260
278
|
}
|
261
279
|
|
262
|
-
|
280
|
+
var insertionIndex = (0, _utils.isNullish)(key) ? this.index.length : key;
|
281
|
+
this.index = [].concat(_toConsumableArray(this.index.slice(0, insertionIndex)), newIndexes, _toConsumableArray(this.index.slice(insertionIndex)));
|
263
282
|
}
|
264
283
|
/**
|
265
284
|
* Removes (soft remove) data from "index" and according to the amount of data.
|
@@ -1,14 +1,30 @@
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
|
+
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
4
|
+
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
6
|
+
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
8
|
+
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
10
|
+
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
12
|
+
|
1
13
|
import "core-js/modules/es.array.iterator.js";
|
2
14
|
import "core-js/modules/es.object.to-string.js";
|
3
15
|
import "core-js/modules/es.set.js";
|
4
16
|
import "core-js/modules/es.string.iterator.js";
|
5
17
|
import "core-js/modules/web.dom-collections.iterator.js";
|
6
|
-
import "core-js/modules/es.array.splice.js";
|
7
18
|
import "core-js/modules/es.array.concat.js";
|
19
|
+
import "core-js/modules/es.array.slice.js";
|
20
|
+
import "core-js/modules/es.array.splice.js";
|
8
21
|
import "core-js/modules/es.symbol.iterator.js";
|
9
22
|
import "core-js/modules/es.symbol.js";
|
10
23
|
import "core-js/modules/es.symbol.description.js";
|
11
24
|
import "core-js/modules/es.array.index-of.js";
|
25
|
+
import "core-js/modules/es.array.from.js";
|
26
|
+
import "core-js/modules/es.function.name.js";
|
27
|
+
import "core-js/modules/es.regexp.exec.js";
|
12
28
|
|
13
29
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
14
30
|
|
@@ -229,8 +245,6 @@ var LazyFactoryMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
229
245
|
}, {
|
230
246
|
key: "insert",
|
231
247
|
value: function insert(key) {
|
232
|
-
var _this$index;
|
233
|
-
|
234
248
|
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
235
249
|
assert(function () {
|
236
250
|
return isUnsignedNumber(key) || isNullish(key);
|
@@ -243,7 +257,8 @@ var LazyFactoryMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
243
257
|
this.data.push(void 0);
|
244
258
|
}
|
245
259
|
|
246
|
-
|
260
|
+
var insertionIndex = isNullish(key) ? this.index.length : key;
|
261
|
+
this.index = [].concat(_toConsumableArray(this.index.slice(0, insertionIndex)), newIndexes, _toConsumableArray(this.index.slice(insertionIndex)));
|
247
262
|
}
|
248
263
|
/**
|
249
264
|
* Removes (soft remove) data from "index" and according to the amount of data.
|