handsontable 0.0.0-next-a01036f-20230508 → 0.0.0-next-48677e7-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/cell/coords.js +40 -13
  2. package/3rdparty/walkontable/src/cell/coords.mjs +40 -13
  3. package/3rdparty/walkontable/src/cell/range.js +29 -25
  4. package/3rdparty/walkontable/src/cell/range.mjs +28 -24
  5. package/3rdparty/walkontable/src/core/_base.js +9 -3
  6. package/3rdparty/walkontable/src/core/_base.mjs +9 -3
  7. package/3rdparty/walkontable/src/core/clone.js +2 -2
  8. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  9. package/3rdparty/walkontable/src/core/core.js +3 -2
  10. package/3rdparty/walkontable/src/core/core.mjs +3 -2
  11. package/3rdparty/walkontable/src/event.js +12 -10
  12. package/3rdparty/walkontable/src/event.mjs +12 -10
  13. package/3rdparty/walkontable/src/facade/core.js +2 -2
  14. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  15. package/3rdparty/walkontable/src/index.js +10 -2
  16. package/3rdparty/walkontable/src/index.mjs +2 -2
  17. package/3rdparty/walkontable/src/overlay/_base.js +8 -7
  18. package/3rdparty/walkontable/src/overlay/_base.mjs +8 -7
  19. package/3rdparty/walkontable/src/overlay/bottom.js +7 -6
  20. package/3rdparty/walkontable/src/overlay/bottom.mjs +7 -6
  21. package/3rdparty/walkontable/src/overlay/inlineStart.js +2 -4
  22. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -4
  23. package/3rdparty/walkontable/src/overlay/top.js +9 -10
  24. package/3rdparty/walkontable/src/overlay/top.mjs +9 -10
  25. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +12 -10
  26. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +12 -10
  27. package/3rdparty/walkontable/src/overlays.js +64 -55
  28. package/3rdparty/walkontable/src/overlays.mjs +64 -55
  29. package/3rdparty/walkontable/src/renderer/table.js +2 -0
  30. package/3rdparty/walkontable/src/renderer/table.mjs +2 -0
  31. package/3rdparty/walkontable/src/scroll.js +23 -20
  32. package/3rdparty/walkontable/src/scroll.mjs +23 -20
  33. package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
  34. package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
  35. package/3rdparty/walkontable/src/selection/border/constants.js +18 -0
  36. package/3rdparty/walkontable/src/selection/border/constants.mjs +13 -0
  37. package/3rdparty/walkontable/src/selection/constants.js +63 -0
  38. package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
  39. package/3rdparty/walkontable/src/selection/index.js +30 -0
  40. package/3rdparty/walkontable/src/selection/index.mjs +5 -0
  41. package/3rdparty/walkontable/src/selection/manager.js +334 -0
  42. package/3rdparty/walkontable/src/selection/manager.mjs +328 -0
  43. package/3rdparty/walkontable/src/selection/scanner.js +363 -0
  44. package/3rdparty/walkontable/src/selection/scanner.mjs +359 -0
  45. package/3rdparty/walkontable/src/selection/selection.js +133 -0
  46. package/3rdparty/walkontable/src/selection/selection.mjs +127 -0
  47. package/3rdparty/walkontable/src/settings.js +15 -13
  48. package/3rdparty/walkontable/src/settings.mjs +15 -13
  49. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
  50. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
  51. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
  52. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
  53. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
  54. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
  55. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
  56. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
  57. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
  58. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
  59. package/3rdparty/walkontable/src/table.js +33 -101
  60. package/3rdparty/walkontable/src/table.mjs +34 -102
  61. package/base.js +4 -2
  62. package/base.mjs +2 -2
  63. package/core.d.ts +4 -0
  64. package/core.js +52 -19
  65. package/core.mjs +52 -19
  66. package/dataMap/dataSource.js +5 -5
  67. package/dataMap/dataSource.mjs +5 -5
  68. package/dataMap/metaManager/metaSchema.js +8 -1
  69. package/dataMap/metaManager/metaSchema.mjs +8 -1
  70. package/dist/handsontable.css +7 -2
  71. package/dist/handsontable.full.css +7 -2
  72. package/dist/handsontable.full.js +9413 -9096
  73. package/dist/handsontable.full.min.css +3 -3
  74. package/dist/handsontable.full.min.js +115 -123
  75. package/dist/handsontable.js +9501 -9183
  76. package/dist/handsontable.min.css +3 -3
  77. package/dist/handsontable.min.js +3 -11
  78. package/dist/languages/all.js +0 -133
  79. package/dist/languages/ar-AR.js +0 -7
  80. package/dist/languages/cs-CZ.js +0 -7
  81. package/dist/languages/de-CH.js +0 -7
  82. package/dist/languages/de-DE.js +0 -7
  83. package/dist/languages/en-US.js +0 -7
  84. package/dist/languages/es-MX.js +0 -7
  85. package/dist/languages/fr-FR.js +0 -7
  86. package/dist/languages/it-IT.js +0 -7
  87. package/dist/languages/ja-JP.js +0 -7
  88. package/dist/languages/ko-KR.js +0 -7
  89. package/dist/languages/lv-LV.js +0 -7
  90. package/dist/languages/nb-NO.js +0 -7
  91. package/dist/languages/nl-NL.js +0 -7
  92. package/dist/languages/pl-PL.js +0 -7
  93. package/dist/languages/pt-BR.js +0 -7
  94. package/dist/languages/ru-RU.js +0 -7
  95. package/dist/languages/sr-SP.js +0 -7
  96. package/dist/languages/zh-CN.js +0 -7
  97. package/dist/languages/zh-TW.js +0 -7
  98. package/editorManager.js +7 -3
  99. package/editorManager.mjs +7 -3
  100. package/editors/textEditor/textEditor.js +3 -16
  101. package/editors/textEditor/textEditor.mjs +4 -17
  102. package/focusManager.d.ts +12 -0
  103. package/focusManager.js +249 -0
  104. package/focusManager.mjs +245 -0
  105. package/helpers/dom/element.js +11 -0
  106. package/helpers/dom/element.mjs +10 -0
  107. package/helpers/mixed.js +1 -1
  108. package/helpers/mixed.mjs +1 -1
  109. package/i18n/languages/ar-AR.js +1 -7
  110. package/i18n/languages/cs-CZ.js +1 -7
  111. package/i18n/languages/de-CH.js +1 -7
  112. package/i18n/languages/de-DE.js +1 -7
  113. package/i18n/languages/en-US.js +1 -7
  114. package/i18n/languages/es-MX.js +1 -7
  115. package/i18n/languages/fr-FR.js +1 -7
  116. package/i18n/languages/it-IT.js +1 -7
  117. package/i18n/languages/ja-JP.js +1 -7
  118. package/i18n/languages/ko-KR.js +1 -7
  119. package/i18n/languages/lv-LV.js +1 -7
  120. package/i18n/languages/nb-NO.js +1 -7
  121. package/i18n/languages/nl-NL.js +1 -7
  122. package/i18n/languages/pl-PL.js +1 -7
  123. package/i18n/languages/pt-BR.js +1 -7
  124. package/i18n/languages/ru-RU.js +1 -7
  125. package/i18n/languages/sr-SP.js +1 -7
  126. package/i18n/languages/zh-CN.js +1 -7
  127. package/i18n/languages/zh-TW.js +1 -7
  128. package/languages/all.js +0 -133
  129. package/languages/ar-AR.js +0 -7
  130. package/languages/cs-CZ.js +0 -7
  131. package/languages/de-CH.js +0 -7
  132. package/languages/de-DE.js +0 -7
  133. package/languages/en-US.js +0 -7
  134. package/languages/es-MX.js +0 -7
  135. package/languages/fr-FR.js +0 -7
  136. package/languages/index.js +0 -133
  137. package/languages/it-IT.js +0 -7
  138. package/languages/ja-JP.js +0 -7
  139. package/languages/ko-KR.js +0 -7
  140. package/languages/lv-LV.js +0 -7
  141. package/languages/nb-NO.js +0 -7
  142. package/languages/nl-NL.js +0 -7
  143. package/languages/pl-PL.js +0 -7
  144. package/languages/pt-BR.js +0 -7
  145. package/languages/ru-RU.js +0 -7
  146. package/languages/sr-SP.js +0 -7
  147. package/languages/zh-CN.js +0 -7
  148. package/languages/zh-TW.js +0 -7
  149. package/package.json +2 -3
  150. package/pluginHooks.js +7 -17
  151. package/pluginHooks.mjs +4 -16
  152. package/plugins/autoRowSize/autoRowSize.js +2 -2
  153. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  154. package/plugins/copyPaste/copyPaste.js +12 -93
  155. package/plugins/copyPaste/copyPaste.mjs +12 -93
  156. package/plugins/copyPaste/copyableRanges.js +31 -25
  157. package/plugins/copyPaste/copyableRanges.mjs +24 -18
  158. package/plugins/customBorders/customBorders.js +6 -2
  159. package/plugins/customBorders/customBorders.mjs +7 -3
  160. package/plugins/filters/filters.js +0 -5
  161. package/plugins/filters/filters.mjs +0 -5
  162. package/plugins/formulas/formulas.js +168 -190
  163. package/plugins/formulas/formulas.mjs +168 -190
  164. package/plugins/mergeCells/mergeCells.js +0 -16
  165. package/plugins/mergeCells/mergeCells.mjs +0 -16
  166. package/plugins/nestedHeaders/nestedHeaders.js +3 -4
  167. package/plugins/nestedHeaders/nestedHeaders.mjs +3 -4
  168. package/plugins/nestedHeaders/stateManager/headersTree.js +26 -23
  169. package/plugins/nestedHeaders/stateManager/headersTree.mjs +23 -20
  170. package/plugins/nestedHeaders/stateManager/index.js +3 -3
  171. package/plugins/nestedHeaders/stateManager/matrixGenerator.js +0 -1
  172. package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
  173. package/plugins/nestedHeaders/utils/ghostTable.js +35 -30
  174. package/plugins/nestedHeaders/utils/ghostTable.mjs +35 -30
  175. package/plugins/registry.js +1 -3
  176. package/plugins/undoRedo/undoRedo.js +1 -0
  177. package/plugins/undoRedo/undoRedo.mjs +1 -0
  178. package/renderers/baseRenderer/baseRenderer.js +3 -0
  179. package/renderers/baseRenderer/baseRenderer.mjs +3 -0
  180. package/selection/highlight/highlight.js +335 -133
  181. package/selection/highlight/highlight.mjs +325 -129
  182. package/selection/highlight/types/activeHeader.js +10 -9
  183. package/selection/highlight/types/activeHeader.mjs +10 -8
  184. package/selection/highlight/types/area.js +12 -27
  185. package/selection/highlight/types/area.mjs +16 -30
  186. package/selection/highlight/types/areaLayered.js +54 -0
  187. package/selection/highlight/types/areaLayered.mjs +49 -0
  188. package/selection/highlight/types/column.js +50 -0
  189. package/selection/highlight/types/column.mjs +45 -0
  190. package/selection/highlight/types/customSelection.js +7 -10
  191. package/selection/highlight/types/customSelection.mjs +7 -9
  192. package/selection/highlight/types/fill.js +5 -8
  193. package/selection/highlight/types/fill.mjs +5 -7
  194. package/selection/highlight/types/{cell.js → focus.js} +5 -8
  195. package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
  196. package/selection/highlight/types/header.js +10 -20
  197. package/selection/highlight/types/header.mjs +10 -19
  198. package/selection/highlight/types/{index.js → row.js} +27 -31
  199. package/selection/highlight/types/{index.mjs → row.mjs} +24 -29
  200. package/selection/highlight/visualSelection.js +12 -21
  201. package/selection/highlight/visualSelection.mjs +12 -21
  202. package/selection/index.js +4 -7
  203. package/selection/index.mjs +2 -3
  204. package/selection/selection.js +88 -46
  205. package/selection/selection.mjs +82 -44
  206. package/settings.d.ts +1 -0
  207. package/tableView.js +94 -66
  208. package/tableView.mjs +94 -66
  209. package/translations/changesObservable/observable.js +46 -41
  210. package/translations/changesObservable/observable.mjs +41 -36
  211. package/translations/changesObservable/observer.js +1 -1
  212. package/translations/indexMapper.js +0 -21
  213. package/translations/indexMapper.mjs +0 -21
  214. package/utils/dataStructures/tree.js +18 -15
  215. package/utils/dataStructures/tree.mjs +18 -15
  216. package/utils/parseTable.js +1 -5
  217. package/utils/parseTable.mjs +1 -5
  218. package/3rdparty/walkontable/src/selection.js +0 -354
  219. package/3rdparty/walkontable/src/selection.mjs +0 -348
  220. package/plugins/copyPaste/focusableElement.js +0 -219
  221. package/plugins/copyPaste/focusableElement.mjs +0 -213
  222. package/plugins/formulas/indexSyncer/axisSyncer.js +0 -379
  223. package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -374
  224. package/plugins/formulas/indexSyncer/index.js +0 -225
  225. package/plugins/formulas/indexSyncer/index.mjs +0 -219
  226. package/selection/highlight/constants.js +0 -16
  227. package/selection/highlight/constants.mjs +0 -6
@@ -31,6 +31,13 @@ import Clone from "../core/clone.mjs";
31
31
  * @property {Walkontable} wot The Walkontable instance.
32
32
  */
33
33
  export var Overlay = /*#__PURE__*/function () {
34
+ /**
35
+ * The Walkontable settings.
36
+ *
37
+ * @private
38
+ * @type {Settings}
39
+ */
40
+
34
41
  /**
35
42
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
36
43
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -40,12 +47,6 @@ export var Overlay = /*#__PURE__*/function () {
40
47
  */
41
48
  function Overlay(wotInstance, facadeGetter, type, wtSettings, domBindings) {
42
49
  _classCallCheck(this, Overlay);
43
- /**
44
- * The Walkontable settings.
45
- *
46
- * @private
47
- * @type {Settings}
48
- */
49
50
  _defineProperty(this, "wtSettings", null);
50
51
  defineGetter(this, 'wot', wotInstance, {
51
52
  writable: false
@@ -302,7 +303,7 @@ export var Overlay = /*#__PURE__*/function () {
302
303
  // todo ioc , or factor func if used only here
303
304
  event: this.wot.wtEvent,
304
305
  // todo ioc , or factory func if used only here
305
- selections: this.wot.selections // todo ioc , or factory func if used only here
306
+ selectionManager: this.wot.selectionManager // todo ioc , or factory func if used only here
306
307
  });
307
308
  }
308
309
 
@@ -41,6 +41,13 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
41
41
  var BottomOverlay = /*#__PURE__*/function (_Overlay) {
42
42
  _inherits(BottomOverlay, _Overlay);
43
43
  var _super = _createSuper(BottomOverlay);
44
+ /**
45
+ * Cached value which holds the previous value of the `fixedRowsBottom` option.
46
+ * It is used as a comparison value that can be used to detect changes in that value.
47
+ *
48
+ * @type {number}
49
+ */
50
+
44
51
  /**
45
52
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
46
53
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -51,12 +58,6 @@ var BottomOverlay = /*#__PURE__*/function (_Overlay) {
51
58
  var _this;
52
59
  _classCallCheck(this, BottomOverlay);
53
60
  _this = _super.call(this, wotInstance, facadeGetter, _constants.CLONE_BOTTOM, wtSettings, domBindings);
54
- /**
55
- * Cached value which holds the previous value of the `fixedRowsBottom` option.
56
- * It is used as a comparison value that can be used to detect changes in that value.
57
- *
58
- * @type {number}
59
- */
60
61
  _defineProperty(_assertThisInitialized(_this), "cachedFixedRowsBottom", -1);
61
62
  _this.cachedFixedRowsBottom = _this.wtSettings.getSetting('fixedRowsBottom');
62
63
  return _this;
@@ -36,6 +36,13 @@ import { CLONE_BOTTOM } from "./constants.mjs";
36
36
  export var BottomOverlay = /*#__PURE__*/function (_Overlay) {
37
37
  _inherits(BottomOverlay, _Overlay);
38
38
  var _super = _createSuper(BottomOverlay);
39
+ /**
40
+ * Cached value which holds the previous value of the `fixedRowsBottom` option.
41
+ * It is used as a comparison value that can be used to detect changes in that value.
42
+ *
43
+ * @type {number}
44
+ */
45
+
39
46
  /**
40
47
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
41
48
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -46,12 +53,6 @@ export var BottomOverlay = /*#__PURE__*/function (_Overlay) {
46
53
  var _this;
47
54
  _classCallCheck(this, BottomOverlay);
48
55
  _this = _super.call(this, wotInstance, facadeGetter, CLONE_BOTTOM, wtSettings, domBindings);
49
- /**
50
- * Cached value which holds the previous value of the `fixedRowsBottom` option.
51
- * It is used as a comparison value that can be used to detect changes in that value.
52
- *
53
- * @type {number}
54
- */
55
56
  _defineProperty(_assertThisInitialized(_this), "cachedFixedRowsBottom", -1);
56
57
  _this.cachedFixedRowsBottom = _this.wtSettings.getSetting('fixedRowsBottom');
57
58
  return _this;
@@ -19,6 +19,7 @@ require("core-js/modules/es.object.get-prototype-of.js");
19
19
  var _element = require("../../../../helpers/dom/element");
20
20
  var _inlineStart = _interopRequireDefault(require("../table/inlineStart"));
21
21
  var _base = require("./_base");
22
+ var _selection = require("../selection");
22
23
  var _constants = require("./constants");
23
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
25
  function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
@@ -211,11 +212,8 @@ var InlineStartOverlay = /*#__PURE__*/function (_Overlay) {
211
212
  }, {
212
213
  key: "adjustRootChildrenSize",
213
214
  value: function adjustRootChildrenSize() {
214
- var _selections$getCell$g;
215
215
  var holder = this.clone.wtTable.holder;
216
- var selections = this.wot.selections;
217
- var facade = this.facadeGetter();
218
- var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(facade).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);
216
+ var selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(_selection.CORNER_DEFAULT_STYLE.width, 10) / 2 : 0;
219
217
  this.clone.wtTable.hider.style.height = this.hider.style.height;
220
218
  holder.style.height = holder.parentNode.style.height;
221
219
  // Add selection corner protruding part to the holder total width to make sure that
@@ -28,6 +28,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
28
28
  import { addClass, getScrollbarWidth, getScrollLeft, getWindowScrollTop, hasClass, outerWidth, removeClass, setOverlayPosition, resetCssTransform } from "../../../../helpers/dom/element.mjs";
29
29
  import InlineStartOverlayTable from "../table/inlineStart.mjs";
30
30
  import { Overlay } from "./_base.mjs";
31
+ import { CORNER_DEFAULT_STYLE } from "../selection/index.mjs";
31
32
  import { CLONE_INLINE_START } from "./constants.mjs";
32
33
  /**
33
34
  * @class InlineStartOverlay
@@ -206,11 +207,8 @@ export var InlineStartOverlay = /*#__PURE__*/function (_Overlay) {
206
207
  }, {
207
208
  key: "adjustRootChildrenSize",
208
209
  value: function adjustRootChildrenSize() {
209
- var _selections$getCell$g;
210
210
  var holder = this.clone.wtTable.holder;
211
- var selections = this.wot.selections;
212
- var facade = this.facadeGetter();
213
- var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(facade).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);
211
+ var selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(CORNER_DEFAULT_STYLE.width, 10) / 2 : 0;
214
212
  this.clone.wtTable.hider.style.height = this.hider.style.height;
215
213
  holder.style.height = holder.parentNode.style.height;
216
214
  // Add selection corner protruding part to the holder total width to make sure that
@@ -18,6 +18,7 @@ require("core-js/modules/es.number.constructor.js");
18
18
  var _element = require("../../../../helpers/dom/element");
19
19
  var _top = _interopRequireDefault(require("./../table/top"));
20
20
  var _base = require("./_base");
21
+ var _selection = require("../selection");
21
22
  var _constants = require("./constants");
22
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
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); }
@@ -41,6 +42,13 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
41
42
  var TopOverlay = /*#__PURE__*/function (_Overlay) {
42
43
  _inherits(TopOverlay, _Overlay);
43
44
  var _super = _createSuper(TopOverlay);
45
+ /**
46
+ * Cached value which holds the previous value of the `fixedRowsTop` option.
47
+ * It is used as a comparison value that can be used to detect changes in this value.
48
+ *
49
+ * @type {number}
50
+ */
51
+
44
52
  /**
45
53
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
46
54
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -51,12 +59,6 @@ var TopOverlay = /*#__PURE__*/function (_Overlay) {
51
59
  var _this;
52
60
  _classCallCheck(this, TopOverlay);
53
61
  _this = _super.call(this, wotInstance, facadeGetter, _constants.CLONE_TOP, wtSettings, domBindings);
54
- /**
55
- * Cached value which holds the previous value of the `fixedRowsTop` option.
56
- * It is used as a comparison value that can be used to detect changes in this value.
57
- *
58
- * @type {number}
59
- */
60
62
  _defineProperty(_assertThisInitialized(_this), "cachedFixedRowsTop", -1);
61
63
  _this.cachedFixedRowsTop = _this.wtSettings.getSetting('fixedRowsTop');
62
64
  return _this;
@@ -240,11 +242,8 @@ var TopOverlay = /*#__PURE__*/function (_Overlay) {
240
242
  }, {
241
243
  key: "adjustRootChildrenSize",
242
244
  value: function adjustRootChildrenSize() {
243
- var _selections$getCell$g;
244
245
  var holder = this.clone.wtTable.holder;
245
- var selections = this.wot.selections;
246
- var facade = this.facadeGetter();
247
- var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(facade).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);
246
+ var selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(_selection.CORNER_DEFAULT_STYLE.height, 10) / 2 : 0;
248
247
  this.clone.wtTable.hider.style.width = this.hider.style.width;
249
248
  holder.style.width = holder.parentNode.style.width;
250
249
  // Add selection corner protruding part to the holder total height to make sure that
@@ -29,6 +29,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
29
29
  import { addClass, getScrollbarWidth, getScrollTop, getWindowScrollLeft, hasClass, outerHeight, removeClass, setOverlayPosition, resetCssTransform } from "../../../../helpers/dom/element.mjs";
30
30
  import TopOverlayTable from "./../table/top.mjs";
31
31
  import { Overlay } from "./_base.mjs";
32
+ import { CORNER_DEFAULT_STYLE } from "../selection/index.mjs";
32
33
  import { CLONE_TOP } from "./constants.mjs";
33
34
  /**
34
35
  * @class TopOverlay
@@ -36,6 +37,13 @@ import { CLONE_TOP } from "./constants.mjs";
36
37
  export var TopOverlay = /*#__PURE__*/function (_Overlay) {
37
38
  _inherits(TopOverlay, _Overlay);
38
39
  var _super = _createSuper(TopOverlay);
40
+ /**
41
+ * Cached value which holds the previous value of the `fixedRowsTop` option.
42
+ * It is used as a comparison value that can be used to detect changes in this value.
43
+ *
44
+ * @type {number}
45
+ */
46
+
39
47
  /**
40
48
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
41
49
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -46,12 +54,6 @@ export var TopOverlay = /*#__PURE__*/function (_Overlay) {
46
54
  var _this;
47
55
  _classCallCheck(this, TopOverlay);
48
56
  _this = _super.call(this, wotInstance, facadeGetter, CLONE_TOP, wtSettings, domBindings);
49
- /**
50
- * Cached value which holds the previous value of the `fixedRowsTop` option.
51
- * It is used as a comparison value that can be used to detect changes in this value.
52
- *
53
- * @type {number}
54
- */
55
57
  _defineProperty(_assertThisInitialized(_this), "cachedFixedRowsTop", -1);
56
58
  _this.cachedFixedRowsTop = _this.wtSettings.getSetting('fixedRowsTop');
57
59
  return _this;
@@ -235,11 +237,8 @@ export var TopOverlay = /*#__PURE__*/function (_Overlay) {
235
237
  }, {
236
238
  key: "adjustRootChildrenSize",
237
239
  value: function adjustRootChildrenSize() {
238
- var _selections$getCell$g;
239
240
  var holder = this.clone.wtTable.holder;
240
- var selections = this.wot.selections;
241
- var facade = this.facadeGetter();
242
- var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(facade).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);
241
+ var selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(CORNER_DEFAULT_STYLE.height, 10) / 2 : 0;
243
242
  this.clone.wtTable.hider.style.width = this.hider.style.width;
244
243
  holder.style.width = holder.parentNode.style.width;
245
244
  // Add selection corner protruding part to the holder total height to make sure that
@@ -41,6 +41,18 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
41
41
  var TopInlineStartCornerOverlay = /*#__PURE__*/function (_Overlay) {
42
42
  _inherits(TopInlineStartCornerOverlay, _Overlay);
43
43
  var _super = _createSuper(TopInlineStartCornerOverlay);
44
+ /**
45
+ * The instance of the Top overlay.
46
+ *
47
+ * @type {TopOverlay}
48
+ */
49
+
50
+ /**
51
+ * The instance of the InlineStart overlay.
52
+ *
53
+ * @type {InlineStartOverlay}
54
+ */
55
+
44
56
  /**
45
57
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
46
58
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -53,17 +65,7 @@ var TopInlineStartCornerOverlay = /*#__PURE__*/function (_Overlay) {
53
65
  var _this;
54
66
  _classCallCheck(this, TopInlineStartCornerOverlay);
55
67
  _this = _super.call(this, wotInstance, facadeGetter, _constants.CLONE_TOP_INLINE_START_CORNER, wtSettings, domBindings);
56
- /**
57
- * The instance of the Top overlay.
58
- *
59
- * @type {TopOverlay}
60
- */
61
68
  _defineProperty(_assertThisInitialized(_this), "topOverlay", void 0);
62
- /**
63
- * The instance of the InlineStart overlay.
64
- *
65
- * @type {InlineStartOverlay}
66
- */
67
69
  _defineProperty(_assertThisInitialized(_this), "inlineStartOverlay", void 0);
68
70
  _this.topOverlay = topOverlay;
69
71
  _this.inlineStartOverlay = inlineStartOverlay;
@@ -36,6 +36,18 @@ import { CLONE_TOP_INLINE_START_CORNER } from "./constants.mjs";
36
36
  export var TopInlineStartCornerOverlay = /*#__PURE__*/function (_Overlay) {
37
37
  _inherits(TopInlineStartCornerOverlay, _Overlay);
38
38
  var _super = _createSuper(TopInlineStartCornerOverlay);
39
+ /**
40
+ * The instance of the Top overlay.
41
+ *
42
+ * @type {TopOverlay}
43
+ */
44
+
45
+ /**
46
+ * The instance of the InlineStart overlay.
47
+ *
48
+ * @type {InlineStartOverlay}
49
+ */
50
+
39
51
  /**
40
52
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
41
53
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -48,17 +60,7 @@ export var TopInlineStartCornerOverlay = /*#__PURE__*/function (_Overlay) {
48
60
  var _this;
49
61
  _classCallCheck(this, TopInlineStartCornerOverlay);
50
62
  _this = _super.call(this, wotInstance, facadeGetter, CLONE_TOP_INLINE_START_CORNER, wtSettings, domBindings);
51
- /**
52
- * The instance of the Top overlay.
53
- *
54
- * @type {TopOverlay}
55
- */
56
63
  _defineProperty(_assertThisInitialized(_this), "topOverlay", void 0);
57
- /**
58
- * The instance of the InlineStart overlay.
59
- *
60
- * @type {InlineStartOverlay}
61
- */
62
64
  _defineProperty(_assertThisInitialized(_this), "inlineStartOverlay", void 0);
63
65
  _this.topOverlay = topOverlay;
64
66
  _this.inlineStartOverlay = inlineStartOverlay;
@@ -37,6 +37,70 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
37
37
  * @class Overlays
38
38
  */
39
39
  var Overlays = /*#__PURE__*/function () {
40
+ /**
41
+ * Walkontable instance's reference.
42
+ *
43
+ * @protected
44
+ * @type {Walkontable}
45
+ */
46
+
47
+ /**
48
+ * Refer to the TopOverlay instance.
49
+ *
50
+ * @protected
51
+ * @type {TopOverlay}
52
+ */
53
+
54
+ /**
55
+ * Refer to the BottomOverlay instance.
56
+ *
57
+ * @protected
58
+ * @type {BottomOverlay}
59
+ */
60
+
61
+ /**
62
+ * Refer to the InlineStartOverlay or instance.
63
+ *
64
+ * @protected
65
+ * @type {InlineStartOverlay}
66
+ */
67
+
68
+ /**
69
+ * Refer to the TopInlineStartCornerOverlay instance.
70
+ *
71
+ * @protected
72
+ * @type {TopInlineStartCornerOverlay}
73
+ */
74
+
75
+ /**
76
+ * Refer to the BottomInlineStartCornerOverlay instance.
77
+ *
78
+ * @protected
79
+ * @type {BottomInlineStartCornerOverlay}
80
+ */
81
+
82
+ /**
83
+ * Browser line height for purposes of translating mouse wheel.
84
+ *
85
+ * @private
86
+ * @type {number}
87
+ */
88
+
89
+ /**
90
+ * The walkontable settings.
91
+ *
92
+ * @protected
93
+ * @type {Settings}
94
+ */
95
+
96
+ /**
97
+ * The instance of the ResizeObserver that observes the size of the Walkontable wrapper element.
98
+ * In case of the size change detection the `onContainerElementResize` is fired.
99
+ *
100
+ * @private
101
+ * @type {ResizeObserver}
102
+ */
103
+
40
104
  /**
41
105
  * @param {Walkontable} wotInstance The Walkontable instance. @todo refactoring remove.
42
106
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -48,69 +112,14 @@ var Overlays = /*#__PURE__*/function () {
48
112
  function Overlays(wotInstance, facadeGetter, domBindings, wtSettings, eventManager, wtTable) {
49
113
  var _this = this;
50
114
  _classCallCheck(this, Overlays);
51
- /**
52
- * Walkontable instance's reference.
53
- *
54
- * @protected
55
- * @type {Walkontable}
56
- */
57
115
  _defineProperty(this, "wot", null);
58
- /**
59
- * Refer to the TopOverlay instance.
60
- *
61
- * @protected
62
- * @type {TopOverlay}
63
- */
64
116
  _defineProperty(this, "topOverlay", null);
65
- /**
66
- * Refer to the BottomOverlay instance.
67
- *
68
- * @protected
69
- * @type {BottomOverlay}
70
- */
71
117
  _defineProperty(this, "bottomOverlay", null);
72
- /**
73
- * Refer to the InlineStartOverlay or instance.
74
- *
75
- * @protected
76
- * @type {InlineStartOverlay}
77
- */
78
118
  _defineProperty(this, "inlineStartOverlay", null);
79
- /**
80
- * Refer to the TopInlineStartCornerOverlay instance.
81
- *
82
- * @protected
83
- * @type {TopInlineStartCornerOverlay}
84
- */
85
119
  _defineProperty(this, "topInlineStartCornerOverlay", null);
86
- /**
87
- * Refer to the BottomInlineStartCornerOverlay instance.
88
- *
89
- * @protected
90
- * @type {BottomInlineStartCornerOverlay}
91
- */
92
120
  _defineProperty(this, "bottomInlineStartCornerOverlay", null);
93
- /**
94
- * Browser line height for purposes of translating mouse wheel.
95
- *
96
- * @private
97
- * @type {number}
98
- */
99
121
  _defineProperty(this, "browserLineHeight", undefined);
100
- /**
101
- * The walkontable settings.
102
- *
103
- * @protected
104
- * @type {Settings}
105
- */
106
122
  _defineProperty(this, "wtSettings", null);
107
- /**
108
- * The instance of the ResizeObserver that observes the size of the Walkontable wrapper element.
109
- * In case of the size change detection the `onContainerElementResize` is fired.
110
- *
111
- * @private
112
- * @type {ResizeObserver}
113
- */
114
123
  _defineProperty(this, "resizeObserver", new ResizeObserver(function (entries) {
115
124
  (0, _feature.requestAnimationFrame)(function () {
116
125
  if (!Array.isArray(entries) || !entries.length) {
@@ -33,6 +33,70 @@ import { InlineStartOverlay, TopOverlay, TopInlineStartCornerOverlay, BottomOver
33
33
  * @class Overlays
34
34
  */
35
35
  var Overlays = /*#__PURE__*/function () {
36
+ /**
37
+ * Walkontable instance's reference.
38
+ *
39
+ * @protected
40
+ * @type {Walkontable}
41
+ */
42
+
43
+ /**
44
+ * Refer to the TopOverlay instance.
45
+ *
46
+ * @protected
47
+ * @type {TopOverlay}
48
+ */
49
+
50
+ /**
51
+ * Refer to the BottomOverlay instance.
52
+ *
53
+ * @protected
54
+ * @type {BottomOverlay}
55
+ */
56
+
57
+ /**
58
+ * Refer to the InlineStartOverlay or instance.
59
+ *
60
+ * @protected
61
+ * @type {InlineStartOverlay}
62
+ */
63
+
64
+ /**
65
+ * Refer to the TopInlineStartCornerOverlay instance.
66
+ *
67
+ * @protected
68
+ * @type {TopInlineStartCornerOverlay}
69
+ */
70
+
71
+ /**
72
+ * Refer to the BottomInlineStartCornerOverlay instance.
73
+ *
74
+ * @protected
75
+ * @type {BottomInlineStartCornerOverlay}
76
+ */
77
+
78
+ /**
79
+ * Browser line height for purposes of translating mouse wheel.
80
+ *
81
+ * @private
82
+ * @type {number}
83
+ */
84
+
85
+ /**
86
+ * The walkontable settings.
87
+ *
88
+ * @protected
89
+ * @type {Settings}
90
+ */
91
+
92
+ /**
93
+ * The instance of the ResizeObserver that observes the size of the Walkontable wrapper element.
94
+ * In case of the size change detection the `onContainerElementResize` is fired.
95
+ *
96
+ * @private
97
+ * @type {ResizeObserver}
98
+ */
99
+
36
100
  /**
37
101
  * @param {Walkontable} wotInstance The Walkontable instance. @todo refactoring remove.
38
102
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -44,69 +108,14 @@ var Overlays = /*#__PURE__*/function () {
44
108
  function Overlays(wotInstance, facadeGetter, domBindings, wtSettings, eventManager, wtTable) {
45
109
  var _this = this;
46
110
  _classCallCheck(this, Overlays);
47
- /**
48
- * Walkontable instance's reference.
49
- *
50
- * @protected
51
- * @type {Walkontable}
52
- */
53
111
  _defineProperty(this, "wot", null);
54
- /**
55
- * Refer to the TopOverlay instance.
56
- *
57
- * @protected
58
- * @type {TopOverlay}
59
- */
60
112
  _defineProperty(this, "topOverlay", null);
61
- /**
62
- * Refer to the BottomOverlay instance.
63
- *
64
- * @protected
65
- * @type {BottomOverlay}
66
- */
67
113
  _defineProperty(this, "bottomOverlay", null);
68
- /**
69
- * Refer to the InlineStartOverlay or instance.
70
- *
71
- * @protected
72
- * @type {InlineStartOverlay}
73
- */
74
114
  _defineProperty(this, "inlineStartOverlay", null);
75
- /**
76
- * Refer to the TopInlineStartCornerOverlay instance.
77
- *
78
- * @protected
79
- * @type {TopInlineStartCornerOverlay}
80
- */
81
115
  _defineProperty(this, "topInlineStartCornerOverlay", null);
82
- /**
83
- * Refer to the BottomInlineStartCornerOverlay instance.
84
- *
85
- * @protected
86
- * @type {BottomInlineStartCornerOverlay}
87
- */
88
116
  _defineProperty(this, "bottomInlineStartCornerOverlay", null);
89
- /**
90
- * Browser line height for purposes of translating mouse wheel.
91
- *
92
- * @private
93
- * @type {number}
94
- */
95
117
  _defineProperty(this, "browserLineHeight", undefined);
96
- /**
97
- * The walkontable settings.
98
- *
99
- * @protected
100
- * @type {Settings}
101
- */
102
118
  _defineProperty(this, "wtSettings", null);
103
- /**
104
- * The instance of the ResizeObserver that observes the size of the Walkontable wrapper element.
105
- * In case of the size change detection the `onContainerElementResize` is fired.
106
- *
107
- * @private
108
- * @type {ResizeObserver}
109
- */
110
119
  _defineProperty(this, "resizeObserver", new ResizeObserver(function (entries) {
111
120
  requestAnimationFrame(function () {
112
121
  if (!Array.isArray(entries) || !entries.length) {
@@ -315,6 +315,8 @@ var TableRenderer = /*#__PURE__*/function () {
315
315
  if (TR.firstChild) {
316
316
  var sourceRowIndex = this.renderedRowToSource(visibleRowIndex);
317
317
  var rowHeight = this.rowUtils.getHeight(sourceRowIndex);
318
+ TR.ariaRowIndex = "".concat(sourceRowIndex);
319
+ TR.setAttribute('role', 'row');
318
320
  if (rowHeight) {
319
321
  // Decrease height. 1 pixel will be "replaced" by 1px border top
320
322
  TR.firstChild.style.height = "".concat(rowHeight - 1, "px");
@@ -311,6 +311,8 @@ var TableRenderer = /*#__PURE__*/function () {
311
311
  if (TR.firstChild) {
312
312
  var sourceRowIndex = this.renderedRowToSource(visibleRowIndex);
313
313
  var rowHeight = this.rowUtils.getHeight(sourceRowIndex);
314
+ TR.ariaRowIndex = "".concat(sourceRowIndex);
315
+ TR.setAttribute('role', 'row');
314
316
  if (rowHeight) {
315
317
  // Decrease height. 1 pixel will be "replaced" by 1px border top
316
318
  TR.firstChild.style.height = "".concat(rowHeight - 1, "px");
@@ -25,33 +25,36 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
25
25
  * @class Scroll
26
26
  */
27
27
  var Scroll = /*#__PURE__*/function () {
28
+ /**
29
+ * The data access object.
30
+ *
31
+ * @protected
32
+ * @type {ScrollDao}
33
+ */
34
+
35
+ /**
36
+ * Holds the last column reached by the scroll, which determines the scroll snapping direction
37
+ * (left or right) for a next horizontal scroll.
38
+ *
39
+ * @protected
40
+ * @type {number}
41
+ */
42
+
43
+ /**
44
+ * Holds the last row reached by the scroll, which determines the scroll snapping direction
45
+ * (top or bottom) for a next vertical scroll.
46
+ *
47
+ * @protected
48
+ * @type {number}
49
+ */
50
+
28
51
  /**
29
52
  * @param {ScrollDao} dataAccessObject Tha data access object.
30
53
  */
31
54
  function Scroll(dataAccessObject) {
32
55
  _classCallCheck(this, Scroll);
33
- /**
34
- * The data access object.
35
- *
36
- * @protected
37
- * @type {ScrollDao}
38
- */
39
56
  _defineProperty(this, "dataAccessObject", void 0);
40
- /**
41
- * Holds the last column reached by the scroll, which determines the scroll snapping direction
42
- * (left or right) for a next horizontal scroll.
43
- *
44
- * @protected
45
- * @type {number}
46
- */
47
57
  _defineProperty(this, "lastScrolledColumnPos", -1);
48
- /**
49
- * Holds the last row reached by the scroll, which determines the scroll snapping direction
50
- * (top or bottom) for a next vertical scroll.
51
- *
52
- * @protected
53
- * @type {number}
54
- */
55
58
  _defineProperty(this, "lastScrolledRowPos", -1);
56
59
  this.dataAccessObject = dataAccessObject;
57
60
  }