handsontable 12.4.0-next-e18d05a-20230523 → 13.0.0-next-900887e-20230613

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. package/3rdparty/walkontable/src/border.js +1 -0
  2. package/3rdparty/walkontable/src/border.mjs +1 -0
  3. package/3rdparty/walkontable/src/selection.js +1 -0
  4. package/3rdparty/walkontable/src/selection.mjs +1 -0
  5. package/3rdparty/walkontable/src/table.js +1 -0
  6. package/3rdparty/walkontable/src/table.mjs +1 -0
  7. package/CHANGELOG.md +14 -0
  8. package/base.js +2 -2
  9. package/base.mjs +2 -2
  10. package/core.d.ts +3 -4
  11. package/core.js +90 -107
  12. package/core.mjs +94 -111
  13. package/dataMap/dataMap.js +1 -0
  14. package/dataMap/dataMap.mjs +1 -0
  15. package/dataMap/metaManager/lazyFactoryMap.js +1 -0
  16. package/dataMap/metaManager/lazyFactoryMap.mjs +1 -0
  17. package/dataMap/metaManager/metaLayers/cellMeta.js +1 -0
  18. package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -0
  19. package/dataMap/metaManager/metaSchema.js +6 -6
  20. package/dataMap/metaManager/metaSchema.mjs +6 -6
  21. package/dist/handsontable.css +24 -2
  22. package/dist/handsontable.full.css +24 -2
  23. package/dist/handsontable.full.js +3294 -3169
  24. package/dist/handsontable.full.min.css +4 -4
  25. package/dist/handsontable.full.min.js +96 -92
  26. package/dist/handsontable.js +856 -952
  27. package/dist/handsontable.min.css +4 -4
  28. package/dist/handsontable.min.js +4 -4
  29. package/editorManager.js +1 -0
  30. package/editorManager.mjs +1 -0
  31. package/editors/baseEditor/baseEditor.js +1 -0
  32. package/editors/baseEditor/baseEditor.mjs +1 -0
  33. package/editors/textEditor/textEditor.js +1 -0
  34. package/editors/textEditor/textEditor.mjs +1 -0
  35. package/helpers/mixed.js +2 -2
  36. package/helpers/mixed.mjs +2 -2
  37. package/helpers/object.js +2 -0
  38. package/helpers/object.mjs +2 -0
  39. package/package.json +1 -1
  40. package/pluginHooks.d.ts +0 -1
  41. package/pluginHooks.js +1 -12
  42. package/pluginHooks.mjs +1 -12
  43. package/plugins/autoColumnSize/autoColumnSize.js +1 -0
  44. package/plugins/autoColumnSize/autoColumnSize.mjs +1 -0
  45. package/plugins/autoRowSize/autoRowSize.js +1 -0
  46. package/plugins/autoRowSize/autoRowSize.mjs +1 -0
  47. package/plugins/autofill/autofill.js +2 -2
  48. package/plugins/autofill/autofill.mjs +3 -3
  49. package/plugins/autofill/utils.js +1 -39
  50. package/plugins/autofill/utils.mjs +0 -37
  51. package/plugins/base/base.js +1 -0
  52. package/plugins/base/base.mjs +1 -0
  53. package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +1 -0
  54. package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +1 -0
  55. package/plugins/collapsibleColumns/collapsibleColumns.js +1 -0
  56. package/plugins/collapsibleColumns/collapsibleColumns.mjs +1 -0
  57. package/plugins/columnSorting/columnSorting.js +1 -0
  58. package/plugins/columnSorting/columnSorting.mjs +1 -0
  59. package/plugins/columnSorting/columnStatesManager.js +1 -0
  60. package/plugins/columnSorting/columnStatesManager.mjs +1 -0
  61. package/plugins/columnSorting/rootComparator.js +1 -0
  62. package/plugins/columnSorting/rootComparator.mjs +1 -0
  63. package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -0
  64. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -0
  65. package/plugins/contextMenu/predefinedItems/removeRow.js +1 -0
  66. package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -0
  67. package/plugins/copyPaste/copyPaste.js +1 -0
  68. package/plugins/copyPaste/copyPaste.mjs +1 -0
  69. package/plugins/customBorders/customBorders.js +1 -0
  70. package/plugins/customBorders/customBorders.mjs +1 -0
  71. package/plugins/exportFile/dataProvider.js +1 -0
  72. package/plugins/exportFile/dataProvider.mjs +1 -0
  73. package/plugins/filters/component/value.js +1 -0
  74. package/plugins/filters/component/value.mjs +1 -0
  75. package/plugins/filters/condition/beginsWith.js +1 -0
  76. package/plugins/filters/condition/beginsWith.mjs +1 -0
  77. package/plugins/filters/condition/between.js +1 -0
  78. package/plugins/filters/condition/between.mjs +1 -0
  79. package/plugins/filters/condition/byValue.js +1 -0
  80. package/plugins/filters/condition/byValue.mjs +1 -0
  81. package/plugins/filters/condition/contains.js +1 -0
  82. package/plugins/filters/condition/contains.mjs +1 -0
  83. package/plugins/filters/condition/date/after.js +1 -0
  84. package/plugins/filters/condition/date/after.mjs +1 -0
  85. package/plugins/filters/condition/date/before.js +1 -0
  86. package/plugins/filters/condition/date/before.mjs +1 -0
  87. package/plugins/filters/condition/endsWith.js +1 -0
  88. package/plugins/filters/condition/endsWith.mjs +1 -0
  89. package/plugins/filters/condition/equal.js +1 -0
  90. package/plugins/filters/condition/equal.mjs +1 -0
  91. package/plugins/filters/condition/greaterThan.js +1 -0
  92. package/plugins/filters/condition/greaterThan.mjs +1 -0
  93. package/plugins/filters/condition/greaterThanOrEqual.js +1 -0
  94. package/plugins/filters/condition/greaterThanOrEqual.mjs +1 -0
  95. package/plugins/filters/condition/lessThan.js +1 -0
  96. package/plugins/filters/condition/lessThan.mjs +1 -0
  97. package/plugins/filters/condition/lessThanOrEqual.js +1 -0
  98. package/plugins/filters/condition/lessThanOrEqual.mjs +1 -0
  99. package/plugins/filters/conditionCollection.js +1 -0
  100. package/plugins/filters/conditionCollection.mjs +1 -0
  101. package/plugins/filters/filters.js +1 -0
  102. package/plugins/filters/filters.mjs +1 -0
  103. package/plugins/filters/ui/multipleSelect.js +1 -0
  104. package/plugins/filters/ui/multipleSelect.mjs +1 -0
  105. package/plugins/formulas/formulas.js +1 -0
  106. package/plugins/formulas/formulas.mjs +1 -0
  107. package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +1 -0
  108. package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +1 -0
  109. package/plugins/hiddenColumns/contextMenuItem/showColumn.js +1 -0
  110. package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +1 -0
  111. package/plugins/hiddenRows/contextMenuItem/hideRow.js +1 -0
  112. package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +1 -0
  113. package/plugins/hiddenRows/contextMenuItem/showRow.js +1 -0
  114. package/plugins/hiddenRows/contextMenuItem/showRow.mjs +1 -0
  115. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -0
  116. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -0
  117. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -0
  118. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -0
  119. package/plugins/manualRowMove/manualRowMove.js +5 -1
  120. package/plugins/manualRowMove/manualRowMove.mjs +5 -1
  121. package/plugins/mergeCells/calculations/autofill.js +1 -0
  122. package/plugins/mergeCells/calculations/autofill.mjs +1 -0
  123. package/plugins/mergeCells/cellsCollection.js +1 -0
  124. package/plugins/mergeCells/cellsCollection.mjs +1 -0
  125. package/plugins/mergeCells/mergeCells.js +1 -0
  126. package/plugins/mergeCells/mergeCells.mjs +1 -0
  127. package/plugins/multiColumnSorting/rootComparator.js +1 -0
  128. package/plugins/multiColumnSorting/rootComparator.mjs +1 -0
  129. package/plugins/nestedHeaders/stateManager/headersTree.js +1 -0
  130. package/plugins/nestedHeaders/stateManager/headersTree.mjs +1 -0
  131. package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -0
  132. package/plugins/nestedHeaders/stateManager/settingsNormalizer.mjs +1 -0
  133. package/plugins/nestedRows/data/dataManager.js +1 -0
  134. package/plugins/nestedRows/data/dataManager.mjs +1 -0
  135. package/plugins/nestedRows/nestedRows.js +1 -0
  136. package/plugins/nestedRows/nestedRows.mjs +1 -0
  137. package/plugins/nestedRows/ui/collapsing.js +1 -0
  138. package/plugins/nestedRows/ui/collapsing.mjs +1 -0
  139. package/plugins/nestedRows/utils/rowMoveController.js +1 -0
  140. package/plugins/nestedRows/utils/rowMoveController.mjs +1 -0
  141. package/plugins/persistentState/storage.js +1 -0
  142. package/plugins/persistentState/storage.mjs +1 -0
  143. package/plugins/registry.js +1 -0
  144. package/plugins/registry.mjs +1 -0
  145. package/plugins/undoRedo/undoRedo.js +1 -0
  146. package/plugins/undoRedo/undoRedo.mjs +1 -0
  147. package/selection/highlight/highlight.js +1 -0
  148. package/selection/highlight/highlight.mjs +1 -0
  149. package/selection/selection.js +1 -0
  150. package/selection/selection.mjs +1 -0
  151. package/selection/utils.js +1 -0
  152. package/selection/utils.mjs +1 -0
  153. package/settings.d.ts +1 -0
  154. package/shortcuts/context.js +1 -0
  155. package/shortcuts/context.mjs +1 -0
  156. package/tableView.js +1 -0
  157. package/tableView.mjs +1 -0
  158. package/translations/indexMapper.js +8 -56
  159. package/translations/indexMapper.mjs +9 -56
  160. package/translations/maps/linkedPhysicalIndexToValueMap.js +1 -0
  161. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +1 -0
  162. package/translations/maps/utils/indexesSequence.js +1 -0
  163. package/translations/maps/utils/indexesSequence.mjs +1 -0
  164. package/translations/maps/utils/physicallyIndexed.js +1 -0
  165. package/translations/maps/utils/physicallyIndexed.mjs +1 -0
  166. package/utils/dataStructures/priorityMap.js +1 -0
  167. package/utils/dataStructures/priorityMap.mjs +1 -0
  168. package/utils/dataStructures/tree.js +1 -0
  169. package/utils/dataStructures/tree.mjs +1 -0
  170. package/utils/dataStructures/uniqueMap.js +1 -0
  171. package/utils/dataStructures/uniqueMap.mjs +1 -0
  172. package/utils/dataStructures/uniqueSet.js +1 -0
  173. package/utils/dataStructures/uniqueSet.mjs +1 -0
  174. package/utils/ghostTable.js +1 -0
  175. package/utils/ghostTable.mjs +1 -0
  176. package/utils/staticRegister.js +1 -0
  177. package/utils/staticRegister.mjs +1 -0
@@ -5,6 +5,7 @@ require("core-js/modules/es.array.iterator.js");
5
5
  require("core-js/modules/es.string.iterator.js");
6
6
  require("core-js/modules/web.dom-collections.iterator.js");
7
7
  require("core-js/modules/es.array.slice.js");
8
+ require("core-js/modules/es.regexp.to-string.js");
8
9
  require("core-js/modules/es.function.name.js");
9
10
  require("core-js/modules/es.array.from.js");
10
11
  require("core-js/modules/es.regexp.exec.js");
@@ -17,6 +17,7 @@ import "core-js/modules/es.array.iterator.js";
17
17
  import "core-js/modules/es.string.iterator.js";
18
18
  import "core-js/modules/web.dom-collections.iterator.js";
19
19
  import "core-js/modules/es.array.slice.js";
20
+ import "core-js/modules/es.regexp.to-string.js";
20
21
  import "core-js/modules/es.function.name.js";
21
22
  import "core-js/modules/es.array.from.js";
22
23
  import "core-js/modules/es.regexp.exec.js";
@@ -5,6 +5,7 @@ require("core-js/modules/es.array.iterator.js");
5
5
  require("core-js/modules/es.string.iterator.js");
6
6
  require("core-js/modules/web.dom-collections.iterator.js");
7
7
  require("core-js/modules/es.array.slice.js");
8
+ require("core-js/modules/es.regexp.to-string.js");
8
9
  require("core-js/modules/es.function.name.js");
9
10
  require("core-js/modules/es.array.from.js");
10
11
  require("core-js/modules/es.regexp.exec.js");
@@ -20,6 +20,7 @@ import "core-js/modules/es.array.iterator.js";
20
20
  import "core-js/modules/es.string.iterator.js";
21
21
  import "core-js/modules/web.dom-collections.iterator.js";
22
22
  import "core-js/modules/es.array.slice.js";
23
+ import "core-js/modules/es.regexp.to-string.js";
23
24
  import "core-js/modules/es.function.name.js";
24
25
  import "core-js/modules/es.array.from.js";
25
26
  import "core-js/modules/es.regexp.exec.js";
@@ -4,6 +4,7 @@ require("core-js/modules/es.symbol.iterator.js");
4
4
  require("core-js/modules/es.array.iterator.js");
5
5
  require("core-js/modules/web.dom-collections.iterator.js");
6
6
  require("core-js/modules/es.array.slice.js");
7
+ require("core-js/modules/es.regexp.to-string.js");
7
8
  require("core-js/modules/es.regexp.exec.js");
8
9
  exports.__esModule = true;
9
10
  exports.default = void 0;
@@ -24,6 +24,7 @@ import "core-js/modules/es.symbol.iterator.js";
24
24
  import "core-js/modules/es.array.iterator.js";
25
25
  import "core-js/modules/web.dom-collections.iterator.js";
26
26
  import "core-js/modules/es.array.slice.js";
27
+ import "core-js/modules/es.regexp.to-string.js";
27
28
  import "core-js/modules/es.regexp.exec.js";
28
29
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
30
  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, _toPropertyKey(descriptor.key), descriptor); } }
package/CHANGELOG.md CHANGED
@@ -9,6 +9,20 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
9
 
10
10
  <!-- UNVERSIONED -->
11
11
 
12
+ ## [13.0.0] - 2023-06-20
13
+
14
+ ### Added
15
+ - **Breaking change**: Angular: Rewritten the Angular wrapper to be based on Angular@12 and to support Angular versions 12 and above. [#10396](https://github.com/handsontable/handsontable/pull/10396)
16
+
17
+ ### Changed
18
+ - **Breaking change**: Swapping `beforeChange` and `afterSetDataAtCell`/`afterSetDataAtRowProp` hooks order [#677](https://github.com/handsontable/handsontable/pull/677)
19
+
20
+ ### Removed
21
+ - **Breaking change**: Removed the the deprecated hooks, methods and options for 13.0.0. [#10407](https://github.com/handsontable/handsontable/issues/10407)
22
+
23
+ ### Fixed
24
+ - Changed margins for context-menu in RTL mode and fixed problem with wrong position for check inside Read only entry [#10375](https://github.com/handsontable/handsontable/pull/10375)
25
+
12
26
  ## [12.4.0] - 2023-05-23
13
27
 
14
28
  ### Added
package/base.js CHANGED
@@ -44,8 +44,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
44
44
  Handsontable.CellCoords = _src.CellCoords;
45
45
  Handsontable.CellRange = _src.CellRange;
46
46
  Handsontable.packageName = 'handsontable';
47
- Handsontable.buildDate = "23/05/2023 08:49:12";
48
- Handsontable.version = "12.4.0-next-e18d05a-20230523";
47
+ Handsontable.buildDate = "13/06/2023 14:32:06";
48
+ Handsontable.version = "13.0.0-next-900887e-20230613";
49
49
  Handsontable.languages = {
50
50
  dictionaryKeys: _registry.dictionaryKeys,
51
51
  getLanguageDictionary: _registry.getLanguageDictionary,
package/base.mjs CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
35
35
  Handsontable.CellCoords = CellCoords;
36
36
  Handsontable.CellRange = CellRange;
37
37
  Handsontable.packageName = 'handsontable';
38
- Handsontable.buildDate = "23/05/2023 08:49:26";
39
- Handsontable.version = "12.4.0-next-e18d05a-20230523";
38
+ Handsontable.buildDate = "13/06/2023 14:32:21";
39
+ Handsontable.version = "13.0.0-next-900887e-20230613";
40
40
  Handsontable.languages = {
41
41
  dictionaryKeys: dictionaryKeys,
42
42
  getLanguageDictionary: getLanguageDictionary,
package/core.d.ts CHANGED
@@ -18,8 +18,8 @@ import { Plugins } from './plugins';
18
18
  import { CellType } from './cellTypes';
19
19
  import { ShortcutManager } from './shortcuts';
20
20
 
21
- type AlterActions = 'insert_row' | 'insert_row_above' | 'insert_row_below' |
22
- 'insert_col' | 'insert_col_start' | 'insert_col_end' |
21
+ type AlterActions = 'insert_row_above' | 'insert_row_below' |
22
+ 'insert_col_start' | 'insert_col_end' |
23
23
  'remove_row' | 'remove_col';
24
24
 
25
25
  export default class Core {
@@ -113,8 +113,7 @@ export default class Core {
113
113
  listen(): void;
114
114
  loadData(data: CellValue[][] | RowObject[], source?: string): void;
115
115
  populateFromArray(row: number, col: number, input: CellValue[][], endRow?: number,
116
- endCol?: number, source?: string, method?: 'shift_down' | 'shift_right' | 'overwrite',
117
- direction?: 'left' | 'right' | 'up' | 'down', deltas?: any[]): void;
116
+ endCol?: number, source?: string, method?: 'shift_down' | 'shift_right' | 'overwrite'): void;
118
117
  propToCol(prop: string | number): number;
119
118
  redo(): void;
120
119
  refreshDimensions(): void;
package/core.js CHANGED
@@ -3,8 +3,8 @@
3
3
  require("core-js/modules/es.symbol.js");
4
4
  require("core-js/modules/es.symbol.description.js");
5
5
  require("core-js/modules/es.symbol.iterator.js");
6
+ require("core-js/modules/es.regexp.to-string.js");
6
7
  require("core-js/modules/es.function.name.js");
7
- require("core-js/modules/es.object.freeze.js");
8
8
  exports.__esModule = true;
9
9
  exports.default = Core;
10
10
  require("core-js/modules/es.array.iterator.js");
@@ -23,6 +23,7 @@ require("core-js/modules/es.array.fill.js");
23
23
  require("core-js/modules/es.array.map.js");
24
24
  require("core-js/modules/es.regexp.exec.js");
25
25
  require("core-js/modules/es.string.replace.js");
26
+ require("core-js/modules/es.array.filter.js");
26
27
  require("core-js/modules/es.array.from.js");
27
28
  require("core-js/modules/es.array.index-of.js");
28
29
  require("core-js/modules/es.array.reverse.js");
@@ -34,8 +35,6 @@ var _element = require("./helpers/dom/element");
34
35
  var _function = require("./helpers/function");
35
36
  var _mixed = require("./helpers/mixed");
36
37
  var _browser = require("./helpers/browser");
37
- var _console = require("./helpers/console");
38
- var _templateLiteralTag = require("./helpers/templateLiteralTag");
39
38
  var _editorManager = _interopRequireDefault(require("./editorManager"));
40
39
  var _eventManager = _interopRequireDefault(require("./eventManager"));
41
40
  var _object = require("./helpers/object");
@@ -60,10 +59,8 @@ var _selection = require("./selection");
60
59
  var _dataMap = require("./dataMap");
61
60
  var _uniqueMap = require("./utils/dataStructures/uniqueMap");
62
61
  var _shortcuts = require("./shortcuts");
63
- var _templateObject, _templateObject2;
64
62
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
65
63
  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); }
66
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
67
64
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
68
65
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
69
66
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
@@ -76,6 +73,13 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
76
73
  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; }
77
74
  var SHORTCUTS_GROUP = 'gridDefault';
78
75
  var activeGuid = null;
76
+
77
+ /**
78
+ * A set of deprecated feature names.
79
+ *
80
+ * @type {Set<string>}
81
+ */
82
+ // eslint-disable-next-line no-unused-vars
79
83
  var deprecationWarns = new Set();
80
84
 
81
85
  /* eslint-disable jsdoc/require-description-complete-sentence */
@@ -504,13 +508,6 @@ function Core(rootElement, userSettings) {
504
508
 
505
509
  /* eslint-disable no-case-declarations */
506
510
  switch (action) {
507
- case 'insert_row':
508
- // backward compatibility
509
- if (!deprecationWarns.has(action)) {
510
- deprecationWarns.add(action);
511
- (0, _console.warn)((0, _templateLiteralTag.toSingleLine)(_templateObject || (_templateObject = _taggedTemplateLiteral(["The `", "` action of the `alter()` method is deprecated and will be removed \n in the next major release of Handsontable. Use the `insert_row_above` action instead."], ["The \\`", "\\` action of the \\`alter()\\` method is deprecated and will be removed\\x20\n in the next major release of Handsontable. Use the \\`insert_row_above\\` action instead."])), action));
512
- }
513
- // falls through
514
511
  case 'insert_row_below':
515
512
  case 'insert_row_above':
516
513
  var numberOfSourceRows = instance.countSourceRows();
@@ -521,11 +518,9 @@ function Core(rootElement, userSettings) {
521
518
  // `above` is the default behavior for creating new rows
522
519
  var insertRowMode = action === 'insert_row_below' ? 'below' : 'above';
523
520
 
524
- // The line below ensures backward compatibility of the `alter()` method's `insert_row` action.
525
- // Calling the `insert_row` action with no arguments adds a new row at the end of the data set.
526
521
  // Calling the `insert_row_above` action adds a new row at the beginning of the data set.
527
522
  // eslint-disable-next-line no-param-reassign
528
- index = (_index = index) !== null && _index !== void 0 ? _index : action === 'insert_row' || insertRowMode === 'below' ? numberOfSourceRows : 0;
523
+ index = (_index = index) !== null && _index !== void 0 ? _index : insertRowMode === 'below' ? numberOfSourceRows : 0;
529
524
  var _datamap$createRow = datamap.createRow(index, amount, {
530
525
  source: source,
531
526
  mode: insertRowMode
@@ -564,23 +559,14 @@ function Core(rootElement, userSettings) {
564
559
  }
565
560
 
566
561
  break;
567
- case 'insert_col':
568
- // backward compatibility
569
- if (!deprecationWarns.has(action)) {
570
- deprecationWarns.add(action);
571
- (0, _console.warn)((0, _templateLiteralTag.toSingleLine)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["The `", "` action of the `alter()` method is deprecated and will be removed \n in the next major release of Handsontable. Use the `insert_col_start` action instead."], ["The \\`", "\\` action of the \\`alter()\\` method is deprecated and will be removed\\x20\n in the next major release of Handsontable. Use the \\`insert_col_start\\` action instead."])), action));
572
- }
573
- // falls through
574
562
  case 'insert_col_start':
575
563
  case 'insert_col_end':
576
564
  // "start" is a default behavior for creating new columns
577
565
  var insertColumnMode = action === 'insert_col_end' ? 'end' : 'start';
578
566
 
579
- // The line below ensures backward compatibility of the `alter()` method's `insert_col` action.
580
- // Calling the `insert_col` action with no arguments adds a new column to the right of the data set.
581
567
  // Calling the `insert_col_start` action adds a new column to the left of the data set.
582
568
  // eslint-disable-next-line no-param-reassign
583
- index = (_index2 = index) !== null && _index2 !== void 0 ? _index2 : action === 'insert_col' || insertColumnMode === 'end' ? instance.countSourceCols() : 0;
569
+ index = (_index2 = index) !== null && _index2 !== void 0 ? _index2 : insertColumnMode === 'end' ? instance.countSourceCols() : 0;
584
570
  var _datamap$createCol = datamap.createCol(index, amount, {
585
571
  source: source,
586
572
  mode: insertColumnMode
@@ -851,13 +837,9 @@ function Core(rootElement, userSettings) {
851
837
  * @param {object} [end] End selection position (only for drag-down mode). Visual indexes.
852
838
  * @param {string} [source="populateFromArray"] Source information string.
853
839
  * @param {string} [method="overwrite"] Populate method. Possible options: `shift_down`, `shift_right`, `overwrite`.
854
- * @param {string} direction (left|right|up|down) String specifying the direction.
855
- * @param {Array} deltas The deltas array. A difference between values of adjacent cells.
856
- * Useful **only** when the type of handled cells is `numeric`.
857
840
  * @returns {object|undefined} Ending td in pasted area (only if any cell was changed).
858
841
  */
859
- populateFromArray: function populateFromArray(start, input, end, source, method, direction, deltas) {
860
- // TODO: either remove or implement the `direction` argument. Currently it's not working at all.
842
+ populateFromArray: function populateFromArray(start, input, end, source, method) {
861
843
  var r;
862
844
  var rlen;
863
845
  var c;
@@ -945,11 +927,6 @@ function Core(rootElement, userSettings) {
945
927
  // overwrite and other not specified options
946
928
  current.row = start.row;
947
929
  current.col = start.col;
948
- var selected = {
949
- // selected range
950
- row: end && start ? end.row - start.row + 1 : 1,
951
- col: end && start ? end.col - start.col + 1 : 1
952
- };
953
930
  var skippedRow = 0;
954
931
  var skippedColumn = 0;
955
932
  var pushData = true;
@@ -1010,16 +987,6 @@ function Core(rootElement, userSettings) {
1010
987
  var visualColumn = c - skippedColumn;
1011
988
  var value = getInputValue(visualRow, visualColumn);
1012
989
  var orgValue = instance.getDataAtCell(current.row, current.col);
1013
- var index = {
1014
- row: visualRow,
1015
- col: visualColumn
1016
- };
1017
- if (source === 'Autofill.fill') {
1018
- var result = instance.runHooks('beforeAutofillInsidePopulate', index, direction, input, deltas, {}, selected);
1019
- if (result) {
1020
- value = (0, _mixed.isUndefined)(result.value) ? value : result.value;
1021
- }
1022
- }
1023
990
  if (value !== null && _typeof(value) === 'object') {
1024
991
  // when 'value' is array and 'orgValue' is null, set 'orgValue' to
1025
992
  // an empty array so that the null value can be compared to 'value'
@@ -1189,15 +1156,8 @@ function Core(rootElement, userSettings) {
1189
1156
  return;
1190
1157
  }
1191
1158
  var activeEditor = instance.getActiveEditor();
1192
- var beforeChangeResult = instance.runHooks('beforeChange', changes, source || 'edit');
1193
- var shouldBeCanceled = true;
1194
- if (beforeChangeResult === false) {
1195
- if (activeEditor) {
1196
- activeEditor.cancelChanges();
1197
- }
1198
- return;
1199
- }
1200
1159
  var waitingForValidator = new ValidatorsQueue();
1160
+ var shouldBeCanceled = true;
1201
1161
  waitingForValidator.onQueueEmpty = function (isValid) {
1202
1162
  if (activeEditor && shouldBeCanceled) {
1203
1163
  activeEditor.cancelChanges();
@@ -1206,43 +1166,37 @@ function Core(rootElement, userSettings) {
1206
1166
  };
1207
1167
 
1208
1168
  for (var i = changes.length - 1; i >= 0; i--) {
1209
- if (changes[i] === null) {
1210
- changes.splice(i, 1);
1211
- } else {
1212
- var _changes$i = _slicedToArray(changes[i], 4),
1213
- row = _changes$i[0],
1214
- prop = _changes$i[1],
1215
- newValue = _changes$i[3];
1216
- var col = datamap.propToCol(prop);
1217
- var cellProperties = instance.getCellMeta(row, col);
1218
- if (cellProperties.type === 'numeric' && typeof newValue === 'string' && (0, _number.isNumericLike)(newValue)) {
1219
- changes[i][3] = getParsedNumber(newValue);
1220
- }
1169
+ var _changes$i = _slicedToArray(changes[i], 4),
1170
+ row = _changes$i[0],
1171
+ prop = _changes$i[1],
1172
+ newValue = _changes$i[3];
1173
+ var col = datamap.propToCol(prop);
1174
+ var cellProperties = instance.getCellMeta(row, col);
1175
+ if (cellProperties.type === 'numeric' && typeof newValue === 'string' && (0, _number.isNumericLike)(newValue)) {
1176
+ changes[i][3] = getParsedNumber(newValue);
1177
+ }
1221
1178
 
1222
- /* eslint-disable no-loop-func */
1223
- if (instance.getCellValidator(cellProperties)) {
1224
- waitingForValidator.addValidatorToQueue();
1225
- instance.validateCell(changes[i][3], cellProperties, function (index, cellPropertiesReference) {
1226
- return function (result) {
1227
- if (typeof result !== 'boolean') {
1228
- throw new Error('Validation error: result is not boolean');
1229
- }
1230
- if (result === false && cellPropertiesReference.allowInvalid === false) {
1231
- shouldBeCanceled = false;
1232
- changes.splice(index, 1); // cancel the change
1233
- cellPropertiesReference.valid = true; // we cancelled the change, so cell value is still valid
1234
-
1235
- var cell = instance.getCell(cellPropertiesReference.visualRow, cellPropertiesReference.visualCol);
1236
- if (cell !== null) {
1237
- (0, _element.removeClass)(cell, tableMeta.invalidCellClassName);
1238
- }
1239
- // index -= 1;
1179
+ /* eslint-disable no-loop-func */
1180
+ if (instance.getCellValidator(cellProperties)) {
1181
+ waitingForValidator.addValidatorToQueue();
1182
+ instance.validateCell(changes[i][3], cellProperties, function (index, cellPropertiesReference) {
1183
+ return function (result) {
1184
+ if (typeof result !== 'boolean') {
1185
+ throw new Error('Validation error: result is not boolean');
1186
+ }
1187
+ if (result === false && cellPropertiesReference.allowInvalid === false) {
1188
+ shouldBeCanceled = false;
1189
+ changes.splice(index, 1); // cancel the change
1190
+ cellPropertiesReference.valid = true; // we cancelled the change, so cell value is still valid
1191
+
1192
+ var cell = instance.getCell(cellPropertiesReference.visualRow, cellPropertiesReference.visualCol);
1193
+ if (cell !== null) {
1194
+ (0, _element.removeClass)(cell, tableMeta.invalidCellClassName);
1240
1195
  }
1241
-
1242
- waitingForValidator.removeValidatorFormQueue();
1243
- };
1244
- }(i, cellProperties), source);
1245
- }
1196
+ }
1197
+ waitingForValidator.removeValidatorFormQueue();
1198
+ };
1199
+ }(i, cellProperties), source);
1246
1200
  }
1247
1201
  }
1248
1202
  waitingForValidator.checkIfQueueIsEmpty();
@@ -1432,6 +1386,31 @@ function Core(rootElement, userSettings) {
1432
1386
  return [[row, propOrCol, value]];
1433
1387
  }
1434
1388
 
1389
+ /**
1390
+ * Process changes prepared for applying to the dataset (unifying list of changes, closing an editor - when needed,
1391
+ * calling a hook).
1392
+ *
1393
+ * @private
1394
+ * @param {Array} changes Array of changes in format `[[row, col, value],...]`.
1395
+ * @param {string} [source] String that identifies how this change will be described in the changes array (useful in afterChange or beforeChange callback). Set to 'edit' if left empty.
1396
+ * @returns {Array} List of changes finally applied to the dataset.
1397
+ */
1398
+ function processChanges(changes, source) {
1399
+ var activeEditor = instance.getActiveEditor();
1400
+ var beforeChangeResult = instance.runHooks('beforeChange', changes, source || 'edit');
1401
+ // The `beforeChange` hook could add a `null` for purpose of cancelling some dataset's change.
1402
+ var filteredChanges = changes.filter(function (change) {
1403
+ return change !== null;
1404
+ });
1405
+ if (beforeChangeResult === false || filteredChanges.length === 0) {
1406
+ if (activeEditor) {
1407
+ activeEditor.cancelChanges();
1408
+ }
1409
+ return [];
1410
+ }
1411
+ return filteredChanges;
1412
+ }
1413
+
1435
1414
  /**
1436
1415
  * @description
1437
1416
  * Set new value to a cell. To change many cells at once (recommended way), pass an array of `changes` in format
@@ -1469,9 +1448,10 @@ function Core(rootElement, userSettings) {
1469
1448
  if (!changeSource && _typeof(row) === 'object') {
1470
1449
  changeSource = column;
1471
1450
  }
1472
- instance.runHooks('afterSetDataAtCell', changes, changeSource);
1473
- validateChanges(changes, changeSource, function () {
1474
- applyChanges(changes, changeSource);
1451
+ var processedChanges = processChanges(changes, source);
1452
+ instance.runHooks('afterSetDataAtCell', processedChanges, changeSource);
1453
+ validateChanges(processedChanges, changeSource, function () {
1454
+ applyChanges(processedChanges, changeSource);
1475
1455
  });
1476
1456
  };
1477
1457
 
@@ -1499,9 +1479,10 @@ function Core(rootElement, userSettings) {
1499
1479
  if (!changeSource && _typeof(row) === 'object') {
1500
1480
  changeSource = prop;
1501
1481
  }
1502
- instance.runHooks('afterSetDataAtRowProp', changes, changeSource);
1503
- validateChanges(changes, changeSource, function () {
1504
- applyChanges(changes, changeSource);
1482
+ var processedChanges = processChanges(changes, source);
1483
+ instance.runHooks('afterSetDataAtRowProp', processedChanges, changeSource);
1484
+ validateChanges(processedChanges, changeSource, function () {
1485
+ applyChanges(processedChanges, changeSource);
1505
1486
  });
1506
1487
  };
1507
1488
 
@@ -1576,18 +1557,15 @@ function Core(rootElement, userSettings) {
1576
1557
  * @param {number} [endCol] End visual column index (use when you want to cut input when certain column is reached).
1577
1558
  * @param {string} [source=populateFromArray] Used to identify this call in the resulting events (beforeChange, afterChange).
1578
1559
  * @param {string} [method=overwrite] Populate method, possible values: `'shift_down'`, `'shift_right'`, `'overwrite'`.
1579
- * @param {string} direction Populate direction, possible values: `'left'`, `'right'`, `'up'`, `'down'`.
1580
- * @param {Array} deltas The deltas array. A difference between values of adjacent cells.
1581
- * Useful **only** when the type of handled cells is `numeric`.
1582
1560
  * @returns {object|undefined} Ending td in pasted area (only if any cell was changed).
1583
1561
  */
1584
- this.populateFromArray = function (row, column, input, endRow, endCol, source, method, direction, deltas) {
1562
+ this.populateFromArray = function (row, column, input, endRow, endCol, source, method) {
1585
1563
  if (!(_typeof(input) === 'object' && _typeof(input[0]) === 'object')) {
1586
1564
  throw new Error('populateFromArray parameter `input` must be an array of arrays'); // API changed in 0.9-beta2, let's check if you use it correctly
1587
1565
  }
1588
1566
 
1589
1567
  var c = typeof endRow === 'number' ? instance._createCellCoords(endRow, endCol) : null;
1590
- return grid.populateFromArray(instance._createCellCoords(row, column), input, c, source, method, direction, deltas);
1568
+ return grid.populateFromArray(instance._createCellCoords(row, column), input, c, source, method);
1591
1569
  };
1592
1570
 
1593
1571
  /**
@@ -2513,10 +2491,11 @@ function Core(rootElement, userSettings) {
2513
2491
  * | `'insert_col_start'` | Inserts columns before the `index` column. | Inserts columns before the first column. |
2514
2492
  * | `'insert_col_end'` | Inserts columns after the `index` column. | Inserts columns after the last column. |
2515
2493
  * | `'remove_col'` | Removes columns, starting from the `index` column. | Removes columns, starting from the last column. |
2516
- * | `'insert_row'` (<b>Deprecated</b>) | Inserts rows above the `index` row. | Inserts rows below the last row. |
2517
- * | `'insert_col'` (<b>Deprecated</b>) | Inserts columns before the `index` column. | Inserts columns after the last column. |
2518
2494
  *
2519
- * The behavior of `'insert_col_start'`, `'insert_col_end'`, and `'insert_col'` depends on your [`layoutDirection`](@/api/options.md#layoutdirection).
2495
+ * Additional information about `'insert_col_start'` and `'insert_col_end'`:
2496
+ * - Their behavior depends on your [`layoutDirection`](@/api/options.md#layoutdirection).
2497
+ * - If the provided `index` is higher than the actual number of columns, Handsontable doesn't generate
2498
+ * the columns missing in between. Instead, the new columns are inserted next to the last column.
2520
2499
  *
2521
2500
  * @memberof Core#
2522
2501
  * @function alter
@@ -2528,8 +2507,6 @@ function Core(rootElement, userSettings) {
2528
2507
  * <li> `'insert_col_start'` </li>
2529
2508
  * <li> `'insert_col_end'` </li>
2530
2509
  * <li> `'remove_col'` </li>
2531
- * <li> `'insert_row'` (<b>Deprecated</b>) </li>
2532
- * <li> `'insert_col'` (<b>Deprecated</b>) </li>
2533
2510
  * </ul>
2534
2511
  * @param {number|number[]} [index] A visual index of the row/column before or after which the new row/column will be
2535
2512
  * inserted or removed. Can also be an array of arrays, in format `[[index, amount],...]`.
@@ -3240,10 +3217,16 @@ function Core(rootElement, userSettings) {
3240
3217
  };
3241
3218
 
3242
3219
  /**
3243
- * Validates all cells using their validator functions and calls callback when finished.
3220
+ * Validates every cell in the data set,
3221
+ * using a [validator function](@/guides/cell-functions/cell-validator.md) configured for each cell.
3244
3222
  *
3245
- * If one of the cells is invalid, the callback will be fired with `'valid'` arguments as `false` - otherwise it
3246
- * would equal `true`.
3223
+ * Doesn't validate cells that are currently [trimmed](@/guides/rows/row-trimming.md),
3224
+ * [hidden](@/guides/rows/row-hiding.md), or [filtered](@/guides/columns/column-filter.md),
3225
+ * as such cells are not included in the data set until you bring them back again.
3226
+ *
3227
+ * After the validation, the `callback` function is fired, with the `valid` argument set to:
3228
+ * - `true` for valid cells
3229
+ * - `false` for invalid cells
3247
3230
  *
3248
3231
  * @memberof Core#
3249
3232
  * @function validateCells