handsontable 12.1.2 → 12.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. package/3rdparty/walkontable/src/border.js +43 -28
  2. package/3rdparty/walkontable/src/border.mjs +43 -28
  3. package/3rdparty/walkontable/src/table.js +13 -10
  4. package/3rdparty/walkontable/src/table.mjs +13 -10
  5. package/CHANGELOG.md +27 -4
  6. package/base.js +2 -2
  7. package/base.mjs +2 -2
  8. package/core.d.ts +1 -3
  9. package/core.js +9 -1
  10. package/core.mjs +9 -1
  11. package/dataMap/dataMap.js +35 -16
  12. package/dataMap/dataMap.mjs +30 -13
  13. package/dataMap/metaManager/lazyFactoryMap.js +24 -5
  14. package/dataMap/metaManager/lazyFactoryMap.mjs +19 -4
  15. package/dataMap/metaManager/metaSchema.js +112 -80
  16. package/dataMap/metaManager/metaSchema.mjs +112 -80
  17. package/dist/handsontable.css +2 -2
  18. package/dist/handsontable.full.css +2 -2
  19. package/dist/handsontable.full.js +40800 -57808
  20. package/dist/handsontable.full.min.css +2 -2
  21. package/dist/handsontable.full.min.js +527 -284
  22. package/dist/handsontable.js +3046 -3279
  23. package/dist/handsontable.min.css +2 -2
  24. package/dist/handsontable.min.js +3 -3
  25. package/editorManager.js +69 -35
  26. package/editorManager.mjs +69 -35
  27. package/editors/baseEditor/baseEditor.js +1 -1
  28. package/editors/baseEditor/baseEditor.mjs +1 -1
  29. package/editors/dateEditor/dateEditor.js +17 -2
  30. package/editors/dateEditor/dateEditor.mjs +16 -0
  31. package/editors/textEditor/caretPositioner.js +0 -4
  32. package/editors/textEditor/caretPositioner.mjs +0 -2
  33. package/helpers/dom/element.js +2 -4
  34. package/helpers/dom/element.mjs +1 -2
  35. package/helpers/mixed.js +2 -4
  36. package/helpers/mixed.mjs +2 -3
  37. package/helpers/object.js +0 -4
  38. package/helpers/object.mjs +0 -2
  39. package/helpers/unicode.js +0 -4
  40. package/helpers/unicode.mjs +0 -2
  41. package/package.json +1 -1
  42. package/pluginHooks.d.ts +0 -1
  43. package/pluginHooks.js +17 -14
  44. package/pluginHooks.mjs +17 -14
  45. package/plugins/base/base.js +2 -4
  46. package/plugins/base/base.mjs +1 -2
  47. package/plugins/columnSorting/sortService/engine.js +2 -6
  48. package/plugins/columnSorting/sortService/engine.mjs +2 -2
  49. package/plugins/columnSummary/columnSummary.js +17 -11
  50. package/plugins/columnSummary/columnSummary.mjs +15 -9
  51. package/plugins/columnSummary/utils.js +14 -0
  52. package/plugins/columnSummary/utils.mjs +9 -0
  53. package/plugins/contextMenu/commandExecutor.js +0 -4
  54. package/plugins/contextMenu/commandExecutor.mjs +0 -2
  55. package/plugins/contextMenu/contextMenu.js +5 -1
  56. package/plugins/contextMenu/contextMenu.mjs +5 -1
  57. package/plugins/contextMenu/menu.js +4 -0
  58. package/plugins/contextMenu/menu.mjs +4 -0
  59. package/plugins/copyPaste/copyPaste.js +2 -0
  60. package/plugins/copyPaste/copyPaste.mjs +2 -0
  61. package/plugins/dropdownMenu/dropdownMenu.js +4 -0
  62. package/plugins/dropdownMenu/dropdownMenu.mjs +4 -0
  63. package/plugins/filters/component/condition.js +11 -29
  64. package/plugins/filters/component/condition.mjs +6 -21
  65. package/plugins/filters/component/value.js +12 -5
  66. package/plugins/filters/component/value.mjs +12 -5
  67. package/plugins/filters/filters.d.ts +1 -1
  68. package/plugins/filters/filters.js +62 -82
  69. package/plugins/filters/filters.mjs +63 -83
  70. package/plugins/hiddenColumns/hiddenColumns.js +0 -4
  71. package/plugins/hiddenColumns/hiddenColumns.mjs +0 -2
  72. package/plugins/hiddenRows/hiddenRows.js +0 -4
  73. package/plugins/hiddenRows/hiddenRows.mjs +0 -2
  74. package/plugins/multiColumnSorting/domHelpers.js +2 -4
  75. package/plugins/multiColumnSorting/domHelpers.mjs +1 -2
  76. package/plugins/nestedRows/nestedRows.js +1 -1
  77. package/plugins/nestedRows/nestedRows.mjs +1 -1
  78. package/plugins/search/search.js +0 -2
  79. package/plugins/search/search.mjs +0 -1
  80. package/plugins/trimRows/trimRows.js +3 -3
  81. package/plugins/trimRows/trimRows.mjs +3 -3
  82. package/renderers/numericRenderer/numericRenderer.js +0 -2
  83. package/renderers/numericRenderer/numericRenderer.mjs +0 -1
  84. package/renderers/textRenderer/textRenderer.js +1 -1
  85. package/renderers/textRenderer/textRenderer.mjs +1 -1
  86. package/shortcuts/recorder.js +14 -10
  87. package/shortcuts/recorder.mjs +13 -10
  88. package/shortcuts/utils.js +0 -4
  89. package/shortcuts/utils.mjs +0 -2
  90. package/translations/indexMapper.js +2 -2
  91. package/translations/indexMapper.mjs +2 -2
  92. package/utils/sortingAlgorithms/mergeSort.js +0 -120
  93. 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 left to the right (increasing indexes, then variable should have value 1) or
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 top to the bottom (increasing indexes, then variable should have value 1)
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
- }