handsontable 0.0.0-next-48677e7-20230509 → 0.0.0-next-834f47e-20230509

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.

Files changed (227) hide show
  1. package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
  2. package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
  3. package/3rdparty/walkontable/src/cell/coords.js +13 -40
  4. package/3rdparty/walkontable/src/cell/coords.mjs +13 -40
  5. package/3rdparty/walkontable/src/cell/range.js +25 -29
  6. package/3rdparty/walkontable/src/cell/range.mjs +24 -28
  7. package/3rdparty/walkontable/src/core/_base.js +3 -9
  8. package/3rdparty/walkontable/src/core/_base.mjs +3 -9
  9. package/3rdparty/walkontable/src/core/clone.js +2 -2
  10. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  11. package/3rdparty/walkontable/src/core/core.js +2 -3
  12. package/3rdparty/walkontable/src/core/core.mjs +2 -3
  13. package/3rdparty/walkontable/src/event.js +10 -12
  14. package/3rdparty/walkontable/src/event.mjs +10 -12
  15. package/3rdparty/walkontable/src/facade/core.js +2 -2
  16. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  17. package/3rdparty/walkontable/src/index.js +2 -10
  18. package/3rdparty/walkontable/src/index.mjs +2 -2
  19. package/3rdparty/walkontable/src/overlay/_base.js +7 -8
  20. package/3rdparty/walkontable/src/overlay/_base.mjs +7 -8
  21. package/3rdparty/walkontable/src/overlay/bottom.js +6 -7
  22. package/3rdparty/walkontable/src/overlay/bottom.mjs +6 -7
  23. package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
  24. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
  25. package/3rdparty/walkontable/src/overlay/top.js +10 -9
  26. package/3rdparty/walkontable/src/overlay/top.mjs +10 -9
  27. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +10 -12
  28. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +10 -12
  29. package/3rdparty/walkontable/src/overlays.js +55 -64
  30. package/3rdparty/walkontable/src/overlays.mjs +55 -64
  31. package/3rdparty/walkontable/src/renderer/table.js +0 -2
  32. package/3rdparty/walkontable/src/renderer/table.mjs +0 -2
  33. package/3rdparty/walkontable/src/scroll.js +20 -23
  34. package/3rdparty/walkontable/src/scroll.mjs +20 -23
  35. package/3rdparty/walkontable/src/selection.js +354 -0
  36. package/3rdparty/walkontable/src/selection.mjs +348 -0
  37. package/3rdparty/walkontable/src/settings.js +13 -15
  38. package/3rdparty/walkontable/src/settings.mjs +13 -15
  39. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
  40. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
  41. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
  42. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
  43. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
  44. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
  45. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
  46. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
  47. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
  48. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
  49. package/3rdparty/walkontable/src/table.js +101 -33
  50. package/3rdparty/walkontable/src/table.mjs +102 -34
  51. package/base.js +2 -4
  52. package/base.mjs +2 -2
  53. package/core.d.ts +0 -4
  54. package/core.js +19 -52
  55. package/core.mjs +19 -52
  56. package/dataMap/dataSource.js +5 -5
  57. package/dataMap/dataSource.mjs +5 -5
  58. package/dataMap/metaManager/metaSchema.js +1 -8
  59. package/dataMap/metaManager/metaSchema.mjs +1 -8
  60. package/dist/handsontable.css +2 -7
  61. package/dist/handsontable.full.css +2 -7
  62. package/dist/handsontable.full.js +9162 -9474
  63. package/dist/handsontable.full.min.css +3 -3
  64. package/dist/handsontable.full.min.js +123 -115
  65. package/dist/handsontable.js +8763 -9076
  66. package/dist/handsontable.min.css +3 -3
  67. package/dist/handsontable.min.js +11 -3
  68. package/dist/languages/all.js +133 -0
  69. package/dist/languages/ar-AR.js +7 -0
  70. package/dist/languages/cs-CZ.js +7 -0
  71. package/dist/languages/de-CH.js +7 -0
  72. package/dist/languages/de-DE.js +7 -0
  73. package/dist/languages/en-US.js +7 -0
  74. package/dist/languages/es-MX.js +7 -0
  75. package/dist/languages/fr-FR.js +7 -0
  76. package/dist/languages/it-IT.js +7 -0
  77. package/dist/languages/ja-JP.js +7 -0
  78. package/dist/languages/ko-KR.js +7 -0
  79. package/dist/languages/lv-LV.js +7 -0
  80. package/dist/languages/nb-NO.js +7 -0
  81. package/dist/languages/nl-NL.js +7 -0
  82. package/dist/languages/pl-PL.js +7 -0
  83. package/dist/languages/pt-BR.js +7 -0
  84. package/dist/languages/ru-RU.js +7 -0
  85. package/dist/languages/sr-SP.js +7 -0
  86. package/dist/languages/zh-CN.js +7 -0
  87. package/dist/languages/zh-TW.js +7 -0
  88. package/editorManager.js +3 -7
  89. package/editorManager.mjs +3 -7
  90. package/editors/textEditor/textEditor.js +16 -3
  91. package/editors/textEditor/textEditor.mjs +17 -4
  92. package/helpers/dom/element.js +0 -11
  93. package/helpers/dom/element.mjs +0 -10
  94. package/helpers/mixed.js +1 -1
  95. package/helpers/mixed.mjs +1 -1
  96. package/i18n/languages/ar-AR.js +7 -1
  97. package/i18n/languages/cs-CZ.js +7 -1
  98. package/i18n/languages/de-CH.js +7 -1
  99. package/i18n/languages/de-DE.js +7 -1
  100. package/i18n/languages/en-US.js +7 -1
  101. package/i18n/languages/es-MX.js +7 -1
  102. package/i18n/languages/fr-FR.js +7 -1
  103. package/i18n/languages/it-IT.js +7 -1
  104. package/i18n/languages/ja-JP.js +7 -1
  105. package/i18n/languages/ko-KR.js +7 -1
  106. package/i18n/languages/lv-LV.js +7 -1
  107. package/i18n/languages/nb-NO.js +7 -1
  108. package/i18n/languages/nl-NL.js +7 -1
  109. package/i18n/languages/pl-PL.js +7 -1
  110. package/i18n/languages/pt-BR.js +7 -1
  111. package/i18n/languages/ru-RU.js +7 -1
  112. package/i18n/languages/sr-SP.js +7 -1
  113. package/i18n/languages/zh-CN.js +7 -1
  114. package/i18n/languages/zh-TW.js +7 -1
  115. package/languages/all.js +133 -0
  116. package/languages/ar-AR.js +7 -0
  117. package/languages/cs-CZ.js +7 -0
  118. package/languages/de-CH.js +7 -0
  119. package/languages/de-DE.js +7 -0
  120. package/languages/en-US.js +7 -0
  121. package/languages/es-MX.js +7 -0
  122. package/languages/fr-FR.js +7 -0
  123. package/languages/index.js +133 -0
  124. package/languages/it-IT.js +7 -0
  125. package/languages/ja-JP.js +7 -0
  126. package/languages/ko-KR.js +7 -0
  127. package/languages/lv-LV.js +7 -0
  128. package/languages/nb-NO.js +7 -0
  129. package/languages/nl-NL.js +7 -0
  130. package/languages/pl-PL.js +7 -0
  131. package/languages/pt-BR.js +7 -0
  132. package/languages/ru-RU.js +7 -0
  133. package/languages/sr-SP.js +7 -0
  134. package/languages/zh-CN.js +7 -0
  135. package/languages/zh-TW.js +7 -0
  136. package/package.json +3 -2
  137. package/pluginHooks.js +17 -7
  138. package/pluginHooks.mjs +16 -4
  139. package/plugins/autoRowSize/autoRowSize.js +2 -2
  140. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  141. package/plugins/copyPaste/copyPaste.js +93 -12
  142. package/plugins/copyPaste/copyPaste.mjs +93 -12
  143. package/plugins/copyPaste/copyableRanges.js +25 -31
  144. package/plugins/copyPaste/copyableRanges.mjs +18 -24
  145. package/plugins/copyPaste/focusableElement.js +219 -0
  146. package/plugins/copyPaste/focusableElement.mjs +213 -0
  147. package/plugins/customBorders/customBorders.js +2 -6
  148. package/plugins/customBorders/customBorders.mjs +3 -7
  149. package/plugins/filters/filters.js +5 -0
  150. package/plugins/filters/filters.mjs +5 -0
  151. package/plugins/formulas/formulas.js +190 -168
  152. package/plugins/formulas/formulas.mjs +190 -168
  153. package/plugins/formulas/indexSyncer/axisSyncer.js +379 -0
  154. package/plugins/formulas/indexSyncer/axisSyncer.mjs +374 -0
  155. package/plugins/formulas/indexSyncer/index.js +225 -0
  156. package/plugins/formulas/indexSyncer/index.mjs +219 -0
  157. package/plugins/mergeCells/mergeCells.js +16 -0
  158. package/plugins/mergeCells/mergeCells.mjs +16 -0
  159. package/plugins/nestedHeaders/nestedHeaders.js +4 -3
  160. package/plugins/nestedHeaders/nestedHeaders.mjs +4 -3
  161. package/plugins/nestedHeaders/stateManager/headersTree.js +23 -26
  162. package/plugins/nestedHeaders/stateManager/headersTree.mjs +20 -23
  163. package/plugins/nestedHeaders/stateManager/index.js +3 -3
  164. package/plugins/nestedHeaders/stateManager/matrixGenerator.js +1 -0
  165. package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
  166. package/plugins/nestedHeaders/utils/ghostTable.js +30 -35
  167. package/plugins/nestedHeaders/utils/ghostTable.mjs +30 -35
  168. package/plugins/registry.js +3 -1
  169. package/plugins/undoRedo/undoRedo.js +0 -1
  170. package/plugins/undoRedo/undoRedo.mjs +0 -1
  171. package/renderers/baseRenderer/baseRenderer.js +0 -3
  172. package/renderers/baseRenderer/baseRenderer.mjs +0 -3
  173. package/selection/highlight/constants.js +16 -0
  174. package/selection/highlight/constants.mjs +6 -0
  175. package/selection/highlight/highlight.js +133 -335
  176. package/selection/highlight/highlight.mjs +129 -325
  177. package/selection/highlight/types/activeHeader.js +9 -10
  178. package/selection/highlight/types/activeHeader.mjs +8 -10
  179. package/selection/highlight/types/area.js +27 -12
  180. package/selection/highlight/types/area.mjs +30 -16
  181. package/selection/highlight/types/{focus.js → cell.js} +8 -5
  182. package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
  183. package/selection/highlight/types/customSelection.js +10 -7
  184. package/selection/highlight/types/customSelection.mjs +9 -7
  185. package/selection/highlight/types/fill.js +8 -5
  186. package/selection/highlight/types/fill.mjs +7 -5
  187. package/selection/highlight/types/header.js +20 -10
  188. package/selection/highlight/types/header.mjs +19 -10
  189. package/selection/highlight/types/{row.js → index.js} +31 -27
  190. package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
  191. package/selection/highlight/visualSelection.js +21 -12
  192. package/selection/highlight/visualSelection.mjs +21 -12
  193. package/selection/index.js +7 -4
  194. package/selection/index.mjs +3 -2
  195. package/selection/selection.js +46 -88
  196. package/selection/selection.mjs +44 -82
  197. package/settings.d.ts +0 -1
  198. package/tableView.js +66 -94
  199. package/tableView.mjs +66 -94
  200. package/translations/changesObservable/observable.js +41 -46
  201. package/translations/changesObservable/observable.mjs +36 -41
  202. package/translations/changesObservable/observer.js +1 -1
  203. package/translations/indexMapper.js +21 -0
  204. package/translations/indexMapper.mjs +21 -0
  205. package/utils/dataStructures/tree.js +15 -18
  206. package/utils/dataStructures/tree.mjs +15 -18
  207. package/utils/parseTable.js +5 -1
  208. package/utils/parseTable.mjs +5 -1
  209. package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
  210. package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
  211. package/3rdparty/walkontable/src/selection/constants.js +0 -63
  212. package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
  213. package/3rdparty/walkontable/src/selection/index.js +0 -30
  214. package/3rdparty/walkontable/src/selection/index.mjs +0 -5
  215. package/3rdparty/walkontable/src/selection/manager.js +0 -334
  216. package/3rdparty/walkontable/src/selection/manager.mjs +0 -328
  217. package/3rdparty/walkontable/src/selection/scanner.js +0 -363
  218. package/3rdparty/walkontable/src/selection/scanner.mjs +0 -359
  219. package/3rdparty/walkontable/src/selection/selection.js +0 -133
  220. package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
  221. package/focusManager.d.ts +0 -12
  222. package/focusManager.js +0 -249
  223. package/focusManager.mjs +0 -245
  224. package/selection/highlight/types/areaLayered.js +0 -54
  225. package/selection/highlight/types/areaLayered.mjs +0 -49
  226. package/selection/highlight/types/column.js +0 -50
  227. package/selection/highlight/types/column.mjs +0 -45
@@ -17,11 +17,10 @@ require("core-js/modules/es.symbol.js");
17
17
  require("core-js/modules/es.symbol.description.js");
18
18
  require("core-js/modules/es.object.to-string.js");
19
19
  require("core-js/modules/es.number.constructor.js");
20
- var _element = require("../../../../../helpers/dom/element");
21
- var _event = require("../../../../../helpers/dom/event");
22
- var _object = require("../../../../../helpers/object");
23
- var _browser = require("../../../../../helpers/browser");
24
- var _constants = require("./constants");
20
+ var _element = require("../../../helpers/dom/element");
21
+ var _event = require("../../../helpers/dom/event");
22
+ var _object = require("../../../helpers/object");
23
+ var _browser = require("../../../helpers/browser");
25
24
  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); }
26
25
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
26
  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."); }
@@ -64,7 +63,13 @@ var Border = /*#__PURE__*/function () {
64
63
  this.bottomStyle = null;
65
64
  this.startStyle = null;
66
65
  this.endStyle = null;
67
- this.cornerDefaultStyle = _constants.CORNER_DEFAULT_STYLE;
66
+ this.cornerDefaultStyle = {
67
+ width: '6px',
68
+ height: '6px',
69
+ borderWidth: '1px',
70
+ borderStyle: 'solid',
71
+ borderColor: '#FFF'
72
+ };
68
73
  // Offset to moving the corner to be centered relative to the grid.
69
74
  this.cornerCenterPointOffset = -(parseInt(this.cornerDefaultStyle.width, 10) / 2);
70
75
  this.corner = null;
@@ -293,7 +298,7 @@ var Border = /*#__PURE__*/function () {
293
298
  }, {
294
299
  key: "isPartRange",
295
300
  value: function isPartRange(row, col) {
296
- var areaSelection = this.wot.selectionManager.getAreaSelection();
301
+ var areaSelection = this.wot.selections.createOrGetArea();
297
302
  if (areaSelection.cellRange) {
298
303
  if (row !== areaSelection.cellRange.to.row || col !== areaSelection.cellRange.to.col) {
299
304
  return true;
@@ -25,11 +25,10 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
26
26
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
27
27
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
28
- import { addClass, hasClass, removeClass, getComputedStyle, getTrimmingContainer, innerWidth, innerHeight, offset, outerHeight, outerWidth } from "../../../../../helpers/dom/element.mjs";
29
- import { stopImmediatePropagation } from "../../../../../helpers/dom/event.mjs";
30
- import { objectEach } from "../../../../../helpers/object.mjs";
31
- import { isMobileBrowser } from "../../../../../helpers/browser.mjs";
32
- import { CORNER_DEFAULT_STYLE } from "./constants.mjs";
28
+ import { addClass, hasClass, removeClass, getComputedStyle, getTrimmingContainer, innerWidth, innerHeight, offset, outerHeight, outerWidth } from "../../../helpers/dom/element.mjs";
29
+ import { stopImmediatePropagation } from "../../../helpers/dom/event.mjs";
30
+ import { objectEach } from "../../../helpers/object.mjs";
31
+ import { isMobileBrowser } from "../../../helpers/browser.mjs";
33
32
  /**
34
33
  *
35
34
  */
@@ -60,7 +59,13 @@ var Border = /*#__PURE__*/function () {
60
59
  this.bottomStyle = null;
61
60
  this.startStyle = null;
62
61
  this.endStyle = null;
63
- this.cornerDefaultStyle = CORNER_DEFAULT_STYLE;
62
+ this.cornerDefaultStyle = {
63
+ width: '6px',
64
+ height: '6px',
65
+ borderWidth: '1px',
66
+ borderStyle: 'solid',
67
+ borderColor: '#FFF'
68
+ };
64
69
  // Offset to moving the corner to be centered relative to the grid.
65
70
  this.cornerCenterPointOffset = -(parseInt(this.cornerDefaultStyle.width, 10) / 2);
66
71
  this.corner = null;
@@ -289,7 +294,7 @@ var Border = /*#__PURE__*/function () {
289
294
  }, {
290
295
  key: "isPartRange",
291
296
  value: function isPartRange(row, col) {
292
- var areaSelection = this.wot.selectionManager.getAreaSelection();
297
+ var areaSelection = this.wot.selections.createOrGetArea();
293
298
  if (areaSelection.cellRange) {
294
299
  if (row !== areaSelection.cellRange.to.row || col !== areaSelection.cellRange.to.col) {
295
300
  return true;
@@ -47,27 +47,24 @@ var _isRtl = /*#__PURE__*/new WeakMap();
47
47
  * ```
48
48
  */
49
49
  var CellCoords = /*#__PURE__*/function () {
50
- /**
51
- * A visual row index.
52
- *
53
- * @type {number}
54
- */
55
-
56
- /**
57
- * A visual column index.
58
- *
59
- * @type {number}
60
- */
61
-
62
- /**
63
- * @type {boolean}
64
- */
65
-
66
50
  function CellCoords(row, column) {
67
51
  var isRtl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
68
52
  _classCallCheck(this, CellCoords);
53
+ /**
54
+ * A visual row index.
55
+ *
56
+ * @type {number}
57
+ */
69
58
  _defineProperty(this, "row", null);
59
+ /**
60
+ * A visual column index.
61
+ *
62
+ * @type {number}
63
+ */
70
64
  _defineProperty(this, "col", null);
65
+ /**
66
+ * @type {boolean}
67
+ */
71
68
  _classPrivateFieldInitSpec(this, _isRtl, {
72
69
  writable: true,
73
70
  value: false
@@ -124,30 +121,6 @@ var CellCoords = /*#__PURE__*/function () {
124
121
  return this.row === cellCoords.row && this.col === cellCoords.col;
125
122
  }
126
123
 
127
- /**
128
- * Checks if the coordinates point to the headers range. If one of the axis (row or col) point to
129
- * the header (negative value) then method returns `true`.
130
- *
131
- * @returns {boolean}
132
- */
133
- }, {
134
- key: "isHeader",
135
- value: function isHeader() {
136
- return !this.isCell();
137
- }
138
-
139
- /**
140
- * Checks if the coordinates point to the cells range. If all axis (row and col) point to
141
- * the cell (positive value) then method returns `true`.
142
- *
143
- * @returns {boolean}
144
- */
145
- }, {
146
- key: "isCell",
147
- value: function isCell() {
148
- return this.row >= 0 && this.col >= 0;
149
- }
150
-
151
124
  /**
152
125
  * Checks if another set of coordinates (`testedCoords`)
153
126
  * is south-east of the coordinates in your `CellCoords` instance.
@@ -43,27 +43,24 @@ var _isRtl = /*#__PURE__*/new WeakMap();
43
43
  * ```
44
44
  */
45
45
  var CellCoords = /*#__PURE__*/function () {
46
- /**
47
- * A visual row index.
48
- *
49
- * @type {number}
50
- */
51
-
52
- /**
53
- * A visual column index.
54
- *
55
- * @type {number}
56
- */
57
-
58
- /**
59
- * @type {boolean}
60
- */
61
-
62
46
  function CellCoords(row, column) {
63
47
  var isRtl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
64
48
  _classCallCheck(this, CellCoords);
49
+ /**
50
+ * A visual row index.
51
+ *
52
+ * @type {number}
53
+ */
65
54
  _defineProperty(this, "row", null);
55
+ /**
56
+ * A visual column index.
57
+ *
58
+ * @type {number}
59
+ */
66
60
  _defineProperty(this, "col", null);
61
+ /**
62
+ * @type {boolean}
63
+ */
67
64
  _classPrivateFieldInitSpec(this, _isRtl, {
68
65
  writable: true,
69
66
  value: false
@@ -120,30 +117,6 @@ var CellCoords = /*#__PURE__*/function () {
120
117
  return this.row === cellCoords.row && this.col === cellCoords.col;
121
118
  }
122
119
 
123
- /**
124
- * Checks if the coordinates point to the headers range. If one of the axis (row or col) point to
125
- * the header (negative value) then method returns `true`.
126
- *
127
- * @returns {boolean}
128
- */
129
- }, {
130
- key: "isHeader",
131
- value: function isHeader() {
132
- return !this.isCell();
133
- }
134
-
135
- /**
136
- * Checks if the coordinates point to the cells range. If all axis (row and col) point to
137
- * the cell (positive value) then method returns `true`.
138
- *
139
- * @returns {boolean}
140
- */
141
- }, {
142
- key: "isCell",
143
- value: function isCell() {
144
- return this.row >= 0 && this.col >= 0;
145
- }
146
-
147
120
  /**
148
121
  * Checks if another set of coordinates (`testedCoords`)
149
122
  * is south-east of the coordinates in your `CellCoords` instance.
@@ -32,7 +32,6 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
32
32
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
33
33
  function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
34
34
  function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
35
- var _isRtl = /*#__PURE__*/new WeakMap();
36
35
  /* eslint-disable jsdoc/require-description-complete-sentence */
37
36
  /**
38
37
  * @description
@@ -52,43 +51,40 @@ var _isRtl = /*#__PURE__*/new WeakMap();
52
51
  * import Handsontable, { CellRange } from '/handsontable/base';
53
52
  * ```
54
53
  */
54
+ var _isRtl = /*#__PURE__*/new WeakMap();
55
55
  var CellRange = /*#__PURE__*/function () {
56
- /**
57
- * Used to draw bold border around a cell where selection was started and to edit the cell
58
- * when you press Enter. The highlight cannot point to headers (negative values) so its
59
- * coordinates object is normalized while assigning.
60
- *
61
- * @private
62
- * @type {CellCoords}
63
- */
64
-
65
- /**
66
- * Usually the same as highlight, but in Excel there is distinction - one can change
67
- * highlight within a selection.
68
- *
69
- * @private
70
- * @type {CellCoords}
71
- */
72
-
73
- /**
74
- * End selection.
75
- *
76
- * @private
77
- * @type {CellCoords}
78
- */
79
-
80
- /**
81
- * @type {boolean}
82
- */
83
-
84
56
  function CellRange(highlight) {
85
57
  var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : highlight;
86
58
  var to = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : highlight;
87
59
  var isRtl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
88
60
  _classCallCheck(this, CellRange);
61
+ /**
62
+ * Used to draw bold border around a cell where selection was started and to edit the cell
63
+ * when you press Enter. The highlight cannot point to headers (negative values) so its
64
+ * coordinates object is normalized while assigning.
65
+ *
66
+ * @private
67
+ * @type {CellCoords}
68
+ */
89
69
  _defineProperty(this, "highlight", null);
70
+ /**
71
+ * Usually the same as highlight, but in Excel there is distinction - one can change
72
+ * highlight within a selection.
73
+ *
74
+ * @private
75
+ * @type {CellCoords}
76
+ */
90
77
  _defineProperty(this, "from", null);
78
+ /**
79
+ * End selection.
80
+ *
81
+ * @private
82
+ * @type {CellCoords}
83
+ */
91
84
  _defineProperty(this, "to", null);
85
+ /**
86
+ * @type {boolean}
87
+ */
92
88
  _classPrivateFieldInitSpec(this, _isRtl, {
93
89
  writable: true,
94
90
  value: false
@@ -48,42 +48,38 @@ import CellCoords from "./../cell/coords.mjs";
48
48
  */
49
49
  var _isRtl = /*#__PURE__*/new WeakMap();
50
50
  var CellRange = /*#__PURE__*/function () {
51
- /**
52
- * Used to draw bold border around a cell where selection was started and to edit the cell
53
- * when you press Enter. The highlight cannot point to headers (negative values) so its
54
- * coordinates object is normalized while assigning.
55
- *
56
- * @private
57
- * @type {CellCoords}
58
- */
59
-
60
- /**
61
- * Usually the same as highlight, but in Excel there is distinction - one can change
62
- * highlight within a selection.
63
- *
64
- * @private
65
- * @type {CellCoords}
66
- */
67
-
68
- /**
69
- * End selection.
70
- *
71
- * @private
72
- * @type {CellCoords}
73
- */
74
-
75
- /**
76
- * @type {boolean}
77
- */
78
-
79
51
  function CellRange(highlight) {
80
52
  var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : highlight;
81
53
  var to = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : highlight;
82
54
  var isRtl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
83
55
  _classCallCheck(this, CellRange);
56
+ /**
57
+ * Used to draw bold border around a cell where selection was started and to edit the cell
58
+ * when you press Enter. The highlight cannot point to headers (negative values) so its
59
+ * coordinates object is normalized while assigning.
60
+ *
61
+ * @private
62
+ * @type {CellCoords}
63
+ */
84
64
  _defineProperty(this, "highlight", null);
65
+ /**
66
+ * Usually the same as highlight, but in Excel there is distinction - one can change
67
+ * highlight within a selection.
68
+ *
69
+ * @private
70
+ * @type {CellCoords}
71
+ */
85
72
  _defineProperty(this, "from", null);
73
+ /**
74
+ * End selection.
75
+ *
76
+ * @private
77
+ * @type {CellCoords}
78
+ */
86
79
  _defineProperty(this, "to", null);
80
+ /**
81
+ * @type {boolean}
82
+ */
87
83
  _classPrivateFieldInitSpec(this, _isRtl, {
88
84
  writable: true,
89
85
  value: false
@@ -41,7 +41,7 @@ var CoreAbstract = /*#__PURE__*/function () {
41
41
  _defineProperty(this, "wtScroll", void 0);
42
42
  _defineProperty(this, "wtViewport", void 0);
43
43
  _defineProperty(this, "wtOverlays", void 0);
44
- _defineProperty(this, "selectionManager", void 0);
44
+ _defineProperty(this, "selections", void 0);
45
45
  _defineProperty(this, "wtEvent", void 0);
46
46
  /**
47
47
  * The walkontable instance id.
@@ -348,8 +348,8 @@ var CoreAbstract = /*#__PURE__*/function () {
348
348
  return wot.wtOverlays; // TODO refactoring: move outside dao, use IOC
349
349
  },
350
350
 
351
- get selectionManager() {
352
- return wot.selectionManager; // TODO refactoring: move outside dao, use IOC
351
+ get selections() {
352
+ return wot.selections; // TODO refactoring: move outside dao, use IOC
353
353
  },
354
354
 
355
355
  get drawn() {
@@ -398,12 +398,6 @@ var CoreAbstract = /*#__PURE__*/function () {
398
398
  },
399
399
  get countRowsVisible() {
400
400
  return wot.wtViewport.rowsVisibleCalculator.count;
401
- },
402
- get columnHeaders() {
403
- return wot.wtSettings.getSetting('columnHeaders');
404
- },
405
- get rowHeaders() {
406
- return wot.wtSettings.getSetting('rowHeaders');
407
401
  }
408
402
  };
409
403
  }
@@ -36,7 +36,7 @@ var CoreAbstract = /*#__PURE__*/function () {
36
36
  _defineProperty(this, "wtScroll", void 0);
37
37
  _defineProperty(this, "wtViewport", void 0);
38
38
  _defineProperty(this, "wtOverlays", void 0);
39
- _defineProperty(this, "selectionManager", void 0);
39
+ _defineProperty(this, "selections", void 0);
40
40
  _defineProperty(this, "wtEvent", void 0);
41
41
  /**
42
42
  * The walkontable instance id.
@@ -343,8 +343,8 @@ var CoreAbstract = /*#__PURE__*/function () {
343
343
  return wot.wtOverlays; // TODO refactoring: move outside dao, use IOC
344
344
  },
345
345
 
346
- get selectionManager() {
347
- return wot.selectionManager; // TODO refactoring: move outside dao, use IOC
346
+ get selections() {
347
+ return wot.selections; // TODO refactoring: move outside dao, use IOC
348
348
  },
349
349
 
350
350
  get drawn() {
@@ -393,12 +393,6 @@ var CoreAbstract = /*#__PURE__*/function () {
393
393
  },
394
394
  get countRowsVisible() {
395
395
  return wot.wtViewport.rowsVisibleCalculator.count;
396
- },
397
- get columnHeaders() {
398
- return wot.wtSettings.getSetting('columnHeaders');
399
- },
400
- get rowHeaders() {
401
- return wot.wtSettings.getSetting('rowHeaders');
402
396
  }
403
397
  };
404
398
  }
@@ -54,8 +54,8 @@ var Clone = /*#__PURE__*/function (_CoreAbstract) {
54
54
  _this.cloneOverlay = clone.overlay;
55
55
  _this.wtTable = _this.cloneOverlay.createTable(_this.getTableDao(), facadeGetter, _this.domBindings, _this.wtSettings);
56
56
  _this.wtViewport = clone.viewport;
57
- _this.selectionManager = clone.selectionManager;
58
- _this.wtEvent = new _event.default(facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable, _this.selectionManager, clone.event);
57
+ _this.selections = clone.selections;
58
+ _this.wtEvent = new _event.default(facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable, _this.selections, clone.event);
59
59
  _this.findOriginalHeaders();
60
60
  return _this;
61
61
  }
@@ -49,8 +49,8 @@ var Clone = /*#__PURE__*/function (_CoreAbstract) {
49
49
  _this.cloneOverlay = clone.overlay;
50
50
  _this.wtTable = _this.cloneOverlay.createTable(_this.getTableDao(), facadeGetter, _this.domBindings, _this.wtSettings);
51
51
  _this.wtViewport = clone.viewport;
52
- _this.selectionManager = clone.selectionManager;
53
- _this.wtEvent = new Event(facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable, _this.selectionManager, clone.event);
52
+ _this.selections = clone.selections;
53
+ _this.wtEvent = new Event(facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable, _this.selections, clone.event);
54
54
  _this.findOriginalHeaders();
55
55
  return _this;
56
56
  }
@@ -22,7 +22,6 @@ var _settings = _interopRequireDefault(require("../settings"));
22
22
  var _master = _interopRequireDefault(require("../table/master"));
23
23
  var _viewport = _interopRequireDefault(require("../viewport"));
24
24
  var _base = _interopRequireDefault(require("./_base"));
25
- var _manager = require("../selection/manager");
26
25
  var _object = require("../../../../helpers/object");
27
26
  var _element = require("../../../../helpers/dom/element");
28
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -56,8 +55,8 @@ var Walkontable = /*#__PURE__*/function (_CoreAbstract) {
56
55
 
57
56
  _this.wtTable = new _master.default(_this.getTableDao(), facadeGetter, _this.domBindings, _this.wtSettings);
58
57
  _this.wtViewport = new _viewport.default(_this.getViewportDao(), _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable);
59
- _this.selectionManager = new _manager.SelectionManager(_this.wtSettings.getSetting('selections'));
60
- _this.wtEvent = new _event.default(facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable, _this.selectionManager);
58
+ _this.selections = _this.wtSettings.getSetting('selections');
59
+ _this.wtEvent = new _event.default(facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable, _this.selections);
61
60
  _this.wtOverlays = new _overlays.default( // TODO create DAO and remove reference to the Walkontable instance.
62
61
  _assertThisInitialized(_this), facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable);
63
62
  _this.exportSettingsAsClassNames();
@@ -30,7 +30,6 @@ import Settings from "../settings.mjs";
30
30
  import MasterTable from "../table/master.mjs";
31
31
  import Viewport from "../viewport.mjs";
32
32
  import CoreAbstract from "./_base.mjs";
33
- import { SelectionManager } from "../selection/manager.mjs";
34
33
  import { objectEach } from "../../../../helpers/object.mjs";
35
34
  import { addClass, removeClass } from "../../../../helpers/dom/element.mjs";
36
35
  /**
@@ -51,8 +50,8 @@ var Walkontable = /*#__PURE__*/function (_CoreAbstract) {
51
50
 
52
51
  _this.wtTable = new MasterTable(_this.getTableDao(), facadeGetter, _this.domBindings, _this.wtSettings);
53
52
  _this.wtViewport = new Viewport(_this.getViewportDao(), _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable);
54
- _this.selectionManager = new SelectionManager(_this.wtSettings.getSetting('selections'));
55
- _this.wtEvent = new Event(facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable, _this.selectionManager);
53
+ _this.selections = _this.wtSettings.getSetting('selections');
54
+ _this.wtEvent = new Event(facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable, _this.selections);
56
55
  _this.wtOverlays = new Overlays( // TODO create DAO and remove reference to the Walkontable instance.
57
56
  _assertThisInitialized(_this), facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable);
58
57
  _this.exportSettingsAsClassNames();
@@ -38,16 +38,16 @@ var Event = /*#__PURE__*/function () {
38
38
  * @param {Settings} wtSettings The walkontable settings.
39
39
  * @param {EventManager} eventManager The walkontable event manager.
40
40
  * @param {Table} wtTable The table.
41
- * @param {SelectionManager} selectionManager Selections.
41
+ * @param {Selections} selections Selections.
42
42
  * @param {Event} [parent=null] The main Event instance.
43
43
  */
44
- function Event(facadeGetter, domBindings, wtSettings, eventManager, wtTable, selectionManager) {
44
+ function Event(facadeGetter, domBindings, wtSettings, eventManager, wtTable, selections) {
45
45
  var parent = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
46
46
  _classCallCheck(this, Event);
47
47
  this.wtSettings = wtSettings;
48
48
  this.domBindings = domBindings;
49
49
  this.wtTable = wtTable;
50
- this.selectionManager = selectionManager;
50
+ this.selections = selections;
51
51
  this.parent = parent;
52
52
 
53
53
  /**
@@ -62,8 +62,7 @@ var Event = /*#__PURE__*/function () {
62
62
  * Should be use only for passing face called external origin methods, like registered event listeners.
63
63
  * It provides backward compatibility by getting instance facade.
64
64
  *
65
- * @todo Consider about removing this from Event class, because it make relationship into facade (implicit circular
66
- * dependency).
65
+ * @todo Consider about removing this from Event class, because it make relationship into facade (implicit circular dependency).
67
66
  * @todo Con. Maybe passing listener caller as an ioc from faced resolves this issue. To rethink later.
68
67
  *
69
68
  * @type {FacadeGetter}
@@ -181,11 +180,11 @@ var Event = /*#__PURE__*/function () {
181
180
  cell.coords = this.wtTable.getCoords(TD);
182
181
  cell.TD = TD;
183
182
  } else if ((0, _element.hasClass)(elem, 'wtBorder') && (0, _element.hasClass)(elem, 'current')) {
184
- cell.coords = this.selectionManager.getFocusSelection().cellRange.highlight;
183
+ cell.coords = this.selections.getCell().cellRange.highlight;
185
184
  cell.TD = this.wtTable.getCell(cell.coords);
186
185
  } else if ((0, _element.hasClass)(elem, 'wtBorder') && (0, _element.hasClass)(elem, 'area')) {
187
- if (this.selectionManager.getAreaSelection().cellRange) {
188
- cell.coords = this.selectionManager.getAreaSelection().cellRange.to;
186
+ if (this.selections.createOrGetArea().cellRange) {
187
+ cell.coords = this.selections.createOrGetArea().cellRange.to;
189
188
  cell.TD = this.wtTable.getCell(cell.coords);
190
189
  }
191
190
  }
@@ -206,9 +205,8 @@ var Event = /*#__PURE__*/function () {
206
205
  var getParentNode = (0, _function.partial)(_element.getParent, event.target);
207
206
  var realTarget = event.target;
208
207
 
209
- // ignore non-TD focusable elements from mouse down processing
210
- // (https://github.com/handsontable/handsontable/issues/3555)
211
- if (!['TD', 'TH'].includes(activeElement.nodeName) && (realTarget === activeElement || getParentNode(0) === activeElement || getParentNode(1) === activeElement)) {
208
+ // ignore focusable element from mouse down processing (https://github.com/handsontable/handsontable/issues/3555)
209
+ if (realTarget === activeElement || getParentNode(0) === activeElement || getParentNode(1) === activeElement) {
212
210
  return;
213
211
  }
214
212
  var cell = this.parentCell(realTarget);
@@ -336,7 +334,7 @@ var Event = /*#__PURE__*/function () {
336
334
  key: "onTouchStart",
337
335
  value: function onTouchStart(event) {
338
336
  var priv = privatePool.get(this);
339
- priv.selectedCellBeforeTouchEnd = this.selectionManager.getFocusSelection().cellRange;
337
+ priv.selectedCellBeforeTouchEnd = this.selections.getCell().cellRange;
340
338
  this.touchApplied = true;
341
339
  this.onMouseDown(event);
342
340
  }
@@ -34,16 +34,16 @@ var Event = /*#__PURE__*/function () {
34
34
  * @param {Settings} wtSettings The walkontable settings.
35
35
  * @param {EventManager} eventManager The walkontable event manager.
36
36
  * @param {Table} wtTable The table.
37
- * @param {SelectionManager} selectionManager Selections.
37
+ * @param {Selections} selections Selections.
38
38
  * @param {Event} [parent=null] The main Event instance.
39
39
  */
40
- function Event(facadeGetter, domBindings, wtSettings, eventManager, wtTable, selectionManager) {
40
+ function Event(facadeGetter, domBindings, wtSettings, eventManager, wtTable, selections) {
41
41
  var parent = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
42
42
  _classCallCheck(this, Event);
43
43
  this.wtSettings = wtSettings;
44
44
  this.domBindings = domBindings;
45
45
  this.wtTable = wtTable;
46
- this.selectionManager = selectionManager;
46
+ this.selections = selections;
47
47
  this.parent = parent;
48
48
 
49
49
  /**
@@ -58,8 +58,7 @@ var Event = /*#__PURE__*/function () {
58
58
  * Should be use only for passing face called external origin methods, like registered event listeners.
59
59
  * It provides backward compatibility by getting instance facade.
60
60
  *
61
- * @todo Consider about removing this from Event class, because it make relationship into facade (implicit circular
62
- * dependency).
61
+ * @todo Consider about removing this from Event class, because it make relationship into facade (implicit circular dependency).
63
62
  * @todo Con. Maybe passing listener caller as an ioc from faced resolves this issue. To rethink later.
64
63
  *
65
64
  * @type {FacadeGetter}
@@ -177,11 +176,11 @@ var Event = /*#__PURE__*/function () {
177
176
  cell.coords = this.wtTable.getCoords(TD);
178
177
  cell.TD = TD;
179
178
  } else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'current')) {
180
- cell.coords = this.selectionManager.getFocusSelection().cellRange.highlight;
179
+ cell.coords = this.selections.getCell().cellRange.highlight;
181
180
  cell.TD = this.wtTable.getCell(cell.coords);
182
181
  } else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'area')) {
183
- if (this.selectionManager.getAreaSelection().cellRange) {
184
- cell.coords = this.selectionManager.getAreaSelection().cellRange.to;
182
+ if (this.selections.createOrGetArea().cellRange) {
183
+ cell.coords = this.selections.createOrGetArea().cellRange.to;
185
184
  cell.TD = this.wtTable.getCell(cell.coords);
186
185
  }
187
186
  }
@@ -202,9 +201,8 @@ var Event = /*#__PURE__*/function () {
202
201
  var getParentNode = partial(getParent, event.target);
203
202
  var realTarget = event.target;
204
203
 
205
- // ignore non-TD focusable elements from mouse down processing
206
- // (https://github.com/handsontable/handsontable/issues/3555)
207
- if (!['TD', 'TH'].includes(activeElement.nodeName) && (realTarget === activeElement || getParentNode(0) === activeElement || getParentNode(1) === activeElement)) {
204
+ // ignore focusable element from mouse down processing (https://github.com/handsontable/handsontable/issues/3555)
205
+ if (realTarget === activeElement || getParentNode(0) === activeElement || getParentNode(1) === activeElement) {
208
206
  return;
209
207
  }
210
208
  var cell = this.parentCell(realTarget);
@@ -332,7 +330,7 @@ var Event = /*#__PURE__*/function () {
332
330
  key: "onTouchStart",
333
331
  value: function onTouchStart(event) {
334
332
  var priv = privatePool.get(this);
335
- priv.selectedCellBeforeTouchEnd = this.selectionManager.getFocusSelection().cellRange;
333
+ priv.selectedCellBeforeTouchEnd = this.selections.getCell().cellRange;
336
334
  this.touchApplied = true;
337
335
  this.onMouseDown(event);
338
336
  }
@@ -82,9 +82,9 @@ var WalkontableFacade = /*#__PURE__*/function () {
82
82
  return this._wot.cloneOverlay; // todo create facade
83
83
  }
84
84
  }, {
85
- key: "selectionManager",
85
+ key: "selections",
86
86
  get: function get() {
87
- return this._wot.selectionManager; // todo create facade
87
+ return this._wot.selections; // todo create facade
88
88
  }
89
89
  }, {
90
90
  key: "wtViewport",
@@ -77,9 +77,9 @@ var WalkontableFacade = /*#__PURE__*/function () {
77
77
  return this._wot.cloneOverlay; // todo create facade
78
78
  }
79
79
  }, {
80
- key: "selectionManager",
80
+ key: "selections",
81
81
  get: function get() {
82
- return this._wot.selectionManager; // todo create facade
82
+ return this._wot.selections; // todo create facade
83
83
  }
84
84
  }, {
85
85
  key: "wtViewport",