handsontable 12.1.1 → 12.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
@@ -449,9 +449,9 @@ export var IndexMapper = /*#__PURE__*/function () {
|
|
449
449
|
* point when handled index is NOT hidden.
|
450
450
|
* @param {number} incrementBy We are searching for a next visible indexes by increasing (to be precise, or decreasing) indexes.
|
451
451
|
* This variable represent indexes shift. We are looking for an index:
|
452
|
-
* - for rows: from the
|
452
|
+
* - for rows: from the top to the bottom (increasing indexes, then variable should have value 1) or
|
453
453
|
* other way around (decreasing indexes, then variable should have the value -1)
|
454
|
-
* - for columns: from the
|
454
|
+
* - for columns: from the left to the right (increasing indexes, then variable should have value 1)
|
455
455
|
* or other way around (decreasing indexes, then variable should have the value -1).
|
456
456
|
* @param {boolean} searchAlsoOtherWayAround The argument determine if an additional other way around search should be
|
457
457
|
* performed, when the search in the first direction had no effect in finding visual index.
|
@@ -1,120 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
exports.__esModule = true;
|
4
|
-
exports.default = mergeSort;
|
5
|
-
|
6
|
-
require("core-js/modules/es.object.to-string.js");
|
7
|
-
|
8
|
-
require("core-js/modules/es.regexp.to-string.js");
|
9
|
-
|
10
|
-
var _linkedList = _interopRequireDefault(require("../dataStructures/linkedList"));
|
11
|
-
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
-
|
14
|
-
/**
|
15
|
-
* Refactored implementation of mergeSort (part of javascript-algorithms project) by Github users:
|
16
|
-
* mgechev, AndriiHeonia and lekkas (part of javascript-algorithms project - all project contributors
|
17
|
-
* at repository website).
|
18
|
-
*
|
19
|
-
* Link to repository: https://github.com/mgechev/javascript-algorithms.
|
20
|
-
*/
|
21
|
-
|
22
|
-
/**
|
23
|
-
* Specifies a function that defines the sort order. The array is sorted according to each
|
24
|
-
* character's Unicode code point value, according to the string conversion of each element.
|
25
|
-
*
|
26
|
-
* @param {*} a The first compared element.
|
27
|
-
* @param {*} b The second compared element.
|
28
|
-
* @returns {number}
|
29
|
-
*/
|
30
|
-
var defaultCompareFunction = function defaultCompareFunction(a, b) {
|
31
|
-
// sort lexically
|
32
|
-
var firstValue = a.toString();
|
33
|
-
var secondValue = b.toString();
|
34
|
-
|
35
|
-
if (firstValue === secondValue) {
|
36
|
-
return 0;
|
37
|
-
} else if (firstValue < secondValue) {
|
38
|
-
return -1;
|
39
|
-
}
|
40
|
-
|
41
|
-
return 1;
|
42
|
-
};
|
43
|
-
/**
|
44
|
-
* Mergesort method which is recursively called for sorting the input array.
|
45
|
-
*
|
46
|
-
* @param {Array} array The array which should be sorted.
|
47
|
-
* @param {Function} compareFunction Compares two items in an array. If compareFunction is not supplied,
|
48
|
-
* elements are sorted by converting them to strings and comparing strings in Unicode code point order.
|
49
|
-
* @param {number} startIndex Left side of the subarray.
|
50
|
-
* @param {number} endIndex Right side of the subarray.
|
51
|
-
* @returns {Array} Array with sorted subarray.
|
52
|
-
*/
|
53
|
-
|
54
|
-
|
55
|
-
function mergeSort(array) {
|
56
|
-
var compareFunction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultCompareFunction;
|
57
|
-
var startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
58
|
-
var endIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : array.length;
|
59
|
-
|
60
|
-
// eslint-disable-line max-len
|
61
|
-
if (Math.abs(endIndex - startIndex) <= 1) {
|
62
|
-
return [];
|
63
|
-
}
|
64
|
-
|
65
|
-
var middleIndex = Math.ceil((startIndex + endIndex) / 2);
|
66
|
-
mergeSort(array, compareFunction, startIndex, middleIndex);
|
67
|
-
mergeSort(array, compareFunction, middleIndex, endIndex);
|
68
|
-
return merge(array, compareFunction, startIndex, middleIndex, endIndex);
|
69
|
-
}
|
70
|
-
/**
|
71
|
-
* Devides and sort merges two subarrays of given array.
|
72
|
-
*
|
73
|
-
* @param {Array} array The array which subarrays should be sorted.
|
74
|
-
* @param {Function} compareFunction The function with comparision logic.
|
75
|
-
* @param {number} startIndex The start of the first subarray.
|
76
|
-
* This subarray is with end middle - 1.
|
77
|
-
* @param {number} middleIndex The start of the second array.
|
78
|
-
* @param {number} endIndex End - 1 is the end of the second array.
|
79
|
-
* @returns {Array} The array with sorted subarray.
|
80
|
-
*/
|
81
|
-
|
82
|
-
|
83
|
-
function merge(array, compareFunction, startIndex, middleIndex, endIndex) {
|
84
|
-
var leftElements = new _linkedList.default();
|
85
|
-
var rightElements = new _linkedList.default();
|
86
|
-
var leftSize = middleIndex - startIndex;
|
87
|
-
var rightSize = endIndex - middleIndex;
|
88
|
-
var maxSize = Math.max(leftSize, rightSize);
|
89
|
-
var size = endIndex - startIndex;
|
90
|
-
|
91
|
-
for (var _i = 0; _i < maxSize; _i += 1) {
|
92
|
-
if (_i < leftSize) {
|
93
|
-
leftElements.push(array[startIndex + _i]);
|
94
|
-
}
|
95
|
-
|
96
|
-
if (_i < rightSize) {
|
97
|
-
rightElements.push(array[middleIndex + _i]);
|
98
|
-
}
|
99
|
-
}
|
100
|
-
|
101
|
-
var i = 0;
|
102
|
-
|
103
|
-
while (i < size) {
|
104
|
-
if (leftElements.first && rightElements.first) {
|
105
|
-
if (compareFunction(leftElements.first.data, rightElements.first.data) > 0) {
|
106
|
-
array[startIndex + i] = rightElements.shift().data;
|
107
|
-
} else {
|
108
|
-
array[startIndex + i] = leftElements.shift().data;
|
109
|
-
}
|
110
|
-
} else if (leftElements.first) {
|
111
|
-
array[startIndex + i] = leftElements.shift().data;
|
112
|
-
} else {
|
113
|
-
array[startIndex + i] = rightElements.shift().data;
|
114
|
-
}
|
115
|
-
|
116
|
-
i += 1;
|
117
|
-
}
|
118
|
-
|
119
|
-
return array;
|
120
|
-
}
|
@@ -1,110 +0,0 @@
|
|
1
|
-
import "core-js/modules/es.object.to-string.js";
|
2
|
-
import "core-js/modules/es.regexp.to-string.js";
|
3
|
-
import LinkedList from "../dataStructures/linkedList.mjs";
|
4
|
-
/**
|
5
|
-
* Refactored implementation of mergeSort (part of javascript-algorithms project) by Github users:
|
6
|
-
* mgechev, AndriiHeonia and lekkas (part of javascript-algorithms project - all project contributors
|
7
|
-
* at repository website).
|
8
|
-
*
|
9
|
-
* Link to repository: https://github.com/mgechev/javascript-algorithms.
|
10
|
-
*/
|
11
|
-
|
12
|
-
/**
|
13
|
-
* Specifies a function that defines the sort order. The array is sorted according to each
|
14
|
-
* character's Unicode code point value, according to the string conversion of each element.
|
15
|
-
*
|
16
|
-
* @param {*} a The first compared element.
|
17
|
-
* @param {*} b The second compared element.
|
18
|
-
* @returns {number}
|
19
|
-
*/
|
20
|
-
|
21
|
-
var defaultCompareFunction = function defaultCompareFunction(a, b) {
|
22
|
-
// sort lexically
|
23
|
-
var firstValue = a.toString();
|
24
|
-
var secondValue = b.toString();
|
25
|
-
|
26
|
-
if (firstValue === secondValue) {
|
27
|
-
return 0;
|
28
|
-
} else if (firstValue < secondValue) {
|
29
|
-
return -1;
|
30
|
-
}
|
31
|
-
|
32
|
-
return 1;
|
33
|
-
};
|
34
|
-
/**
|
35
|
-
* Mergesort method which is recursively called for sorting the input array.
|
36
|
-
*
|
37
|
-
* @param {Array} array The array which should be sorted.
|
38
|
-
* @param {Function} compareFunction Compares two items in an array. If compareFunction is not supplied,
|
39
|
-
* elements are sorted by converting them to strings and comparing strings in Unicode code point order.
|
40
|
-
* @param {number} startIndex Left side of the subarray.
|
41
|
-
* @param {number} endIndex Right side of the subarray.
|
42
|
-
* @returns {Array} Array with sorted subarray.
|
43
|
-
*/
|
44
|
-
|
45
|
-
|
46
|
-
export default function mergeSort(array) {
|
47
|
-
var compareFunction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultCompareFunction;
|
48
|
-
var startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
49
|
-
var endIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : array.length;
|
50
|
-
|
51
|
-
// eslint-disable-line max-len
|
52
|
-
if (Math.abs(endIndex - startIndex) <= 1) {
|
53
|
-
return [];
|
54
|
-
}
|
55
|
-
|
56
|
-
var middleIndex = Math.ceil((startIndex + endIndex) / 2);
|
57
|
-
mergeSort(array, compareFunction, startIndex, middleIndex);
|
58
|
-
mergeSort(array, compareFunction, middleIndex, endIndex);
|
59
|
-
return merge(array, compareFunction, startIndex, middleIndex, endIndex);
|
60
|
-
}
|
61
|
-
/**
|
62
|
-
* Devides and sort merges two subarrays of given array.
|
63
|
-
*
|
64
|
-
* @param {Array} array The array which subarrays should be sorted.
|
65
|
-
* @param {Function} compareFunction The function with comparision logic.
|
66
|
-
* @param {number} startIndex The start of the first subarray.
|
67
|
-
* This subarray is with end middle - 1.
|
68
|
-
* @param {number} middleIndex The start of the second array.
|
69
|
-
* @param {number} endIndex End - 1 is the end of the second array.
|
70
|
-
* @returns {Array} The array with sorted subarray.
|
71
|
-
*/
|
72
|
-
|
73
|
-
function merge(array, compareFunction, startIndex, middleIndex, endIndex) {
|
74
|
-
var leftElements = new LinkedList();
|
75
|
-
var rightElements = new LinkedList();
|
76
|
-
var leftSize = middleIndex - startIndex;
|
77
|
-
var rightSize = endIndex - middleIndex;
|
78
|
-
var maxSize = Math.max(leftSize, rightSize);
|
79
|
-
var size = endIndex - startIndex;
|
80
|
-
|
81
|
-
for (var _i = 0; _i < maxSize; _i += 1) {
|
82
|
-
if (_i < leftSize) {
|
83
|
-
leftElements.push(array[startIndex + _i]);
|
84
|
-
}
|
85
|
-
|
86
|
-
if (_i < rightSize) {
|
87
|
-
rightElements.push(array[middleIndex + _i]);
|
88
|
-
}
|
89
|
-
}
|
90
|
-
|
91
|
-
var i = 0;
|
92
|
-
|
93
|
-
while (i < size) {
|
94
|
-
if (leftElements.first && rightElements.first) {
|
95
|
-
if (compareFunction(leftElements.first.data, rightElements.first.data) > 0) {
|
96
|
-
array[startIndex + i] = rightElements.shift().data;
|
97
|
-
} else {
|
98
|
-
array[startIndex + i] = leftElements.shift().data;
|
99
|
-
}
|
100
|
-
} else if (leftElements.first) {
|
101
|
-
array[startIndex + i] = leftElements.shift().data;
|
102
|
-
} else {
|
103
|
-
array[startIndex + i] = rightElements.shift().data;
|
104
|
-
}
|
105
|
-
|
106
|
-
i += 1;
|
107
|
-
}
|
108
|
-
|
109
|
-
return array;
|
110
|
-
}
|