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
@@ -1,49 +1,72 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.symbol.to-primitive.js");
4
+ require("core-js/modules/es.date.to-primitive.js");
5
+ require("core-js/modules/es.number.constructor.js");
6
+ require("core-js/modules/es.array.from.js");
7
+ require("core-js/modules/es.array.slice.js");
8
+ require("core-js/modules/es.function.name.js");
9
+ require("core-js/modules/es.regexp.exec.js");
3
10
  require("core-js/modules/es.object.keys.js");
4
11
  require("core-js/modules/es.array.filter.js");
5
12
  require("core-js/modules/es.object.get-own-property-descriptor.js");
6
13
  require("core-js/modules/web.dom-collections.for-each.js");
7
14
  require("core-js/modules/es.object.get-own-property-descriptors.js");
8
- require("core-js/modules/es.array.from.js");
9
- require("core-js/modules/es.array.slice.js");
10
- require("core-js/modules/es.function.name.js");
11
- require("core-js/modules/es.regexp.exec.js");
15
+ 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); }
12
16
  exports.__esModule = true;
13
17
  exports.default = void 0;
14
- require("core-js/modules/es.array.fill.js");
15
18
  require("core-js/modules/es.array.iterator.js");
16
19
  require("core-js/modules/es.map.js");
17
20
  require("core-js/modules/es.object.to-string.js");
18
21
  require("core-js/modules/es.string.iterator.js");
19
22
  require("core-js/modules/web.dom-collections.iterator.js");
23
+ require("core-js/modules/es.array.fill.js");
20
24
  require("core-js/modules/es.array.includes.js");
21
25
  require("core-js/modules/es.string.includes.js");
22
26
  require("core-js/modules/es.array.concat.js");
23
27
  require("core-js/modules/es.symbol.iterator.js");
24
28
  require("core-js/modules/es.symbol.js");
25
29
  require("core-js/modules/es.symbol.description.js");
26
- require("core-js/modules/es.symbol.to-primitive.js");
27
- require("core-js/modules/es.date.to-primitive.js");
28
- require("core-js/modules/es.number.constructor.js");
29
- var _types = require("./types");
30
- var _constants = require("./constants");
30
+ require("core-js/modules/es.weak-set.js");
31
+ var _activeHeader = require("./types/activeHeader");
32
+ var _areaLayered = require("./types/areaLayered");
33
+ var _area = require("./types/area");
34
+ var _column = require("./types/column");
35
+ var _focus = require("./types/focus");
36
+ var _customSelection = require("./types/customSelection");
37
+ var _fill = require("./types/fill");
38
+ var _header = require("./types/header");
39
+ var _row = require("./types/row");
40
+ var _src = require("../../3rdparty/walkontable/src");
41
+ exports.ACTIVE_HEADER_TYPE = _src.HIGHLIGHT_ACTIVE_HEADER_TYPE;
42
+ exports.AREA_TYPE = _src.HIGHLIGHT_AREA_TYPE;
43
+ exports.FOCUS_TYPE = _src.HIGHLIGHT_FOCUS_TYPE;
44
+ exports.CUSTOM_SELECTION_TYPE = _src.HIGHLIGHT_CUSTOM_SELECTION_TYPE;
45
+ exports.FILL_TYPE = _src.HIGHLIGHT_FILL_TYPE;
46
+ exports.HEADER_TYPE = _src.HIGHLIGHT_HEADER_TYPE;
47
+ exports.ROW_TYPE = _src.HIGHLIGHT_ROW_TYPE;
48
+ exports.COLUMN_TYPE = _src.HIGHLIGHT_COLUMN_TYPE;
31
49
  var _array = require("./../../helpers/array");
32
- 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); }
50
+ var _Symbol$iterator;
51
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
52
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
33
53
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
34
54
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
35
55
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
36
56
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
37
57
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
38
58
  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; }
39
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
40
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
41
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
42
59
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
43
60
  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); } }
44
61
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
62
+ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
63
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
64
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
45
65
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
46
66
  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); }
67
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
68
+ var _createHighlight = /*#__PURE__*/new WeakSet();
69
+ _Symbol$iterator = Symbol.iterator;
47
70
  /**
48
71
  * Highlight class responsible for managing Walkontable Selection classes.
49
72
  *
@@ -59,68 +82,128 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
59
82
  * @class Highlight
60
83
  * @util
61
84
  */
62
- var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
85
+ var Highlight = /*#__PURE__*/function () {
86
+ /**
87
+ * Options consumed by Highlight class and Walkontable Selection classes.
88
+ *
89
+ * @type {object}
90
+ */
91
+
92
+ /**
93
+ * The property which describes which layer level of the visual selection will be modified.
94
+ * This option is valid only for `area` and `header` highlight types which occurs multiple times on
95
+ * the table (as a non-consecutive selection).
96
+ *
97
+ * An order of the layers is the same as the order of added new non-consecutive selections.
98
+ *
99
+ * @type {number}
100
+ * @default 0
101
+ */
102
+
103
+ /**
104
+ * `cell` highlight object which describes attributes for the currently selected cell.
105
+ * It can only occur only once on the table.
106
+ *
107
+ * @type {Selection}
108
+ */
109
+
110
+ /**
111
+ * `fill` highlight object which describes attributes for the borders for autofill functionality.
112
+ * It can only occur only once on the table.
113
+ *
114
+ * @type {Selection}
115
+ */
116
+
117
+ /**
118
+ * Collection of the `area` highlights. That objects describes attributes for the borders and selection of
119
+ * the multiple selected cells. It can occur multiple times on the table.
120
+ *
121
+ * @type {Map.<number, Selection>}
122
+ */
123
+
124
+ /**
125
+ * Collection of the `highlight` highlights. That objects describes attributes for the borders and selection of
126
+ * the multiple selected cells. It can occur multiple times on the table.
127
+ *
128
+ * @type {Map.<number, Selection>}
129
+ */
130
+
131
+ /**
132
+ * Collection of the `header` highlights. That objects describes attributes for the selection of
133
+ * the multiple selected rows in the table header. It can occur multiple times on the table.
134
+ *
135
+ * @type {Map.<number, Selection>}
136
+ */
137
+
138
+ /**
139
+ * Collection of the `header` highlights. That objects describes attributes for the selection of
140
+ * the multiple selected columns in the table header. It can occur multiple times on the table.
141
+ *
142
+ * @type {Map.<number, Selection>}
143
+ */
144
+
145
+ /**
146
+ * Collection of the `active-header` highlights. That objects describes attributes for the selection of
147
+ * the multiple selected rows in the table header. The table headers which have selected all items in
148
+ * a row will be marked as `active-header`.
149
+ *
150
+ * @type {Map.<number, Selection>}
151
+ */
152
+
153
+ /**
154
+ * Collection of the `active-header` highlights. That objects describes attributes for the selection of
155
+ * the multiple selected columns in the table header. The table headers which have selected all items in
156
+ * a row will be marked as `active-header`.
157
+ *
158
+ * @type {Map.<number, Selection>}
159
+ */
160
+
161
+ /**
162
+ * Collection of the `rows` highlights. That objects describes attributes for the selection of
163
+ * the multiple selected cells in a row. It can occur multiple times on the table.
164
+ *
165
+ * @type {Map.<number, Selection>}
166
+ */
167
+
168
+ /**
169
+ * Collection of the `columns` highlights. That objects describes attributes for the selection of
170
+ * the multiple selected cells in a column. It can occur multiple times on the table.
171
+ *
172
+ * @type {Map.<number, Selection>}
173
+ */
174
+
175
+ /**
176
+ * Collection of the `custom-selection`, holder for example borders added through CustomBorders plugin.
177
+ *
178
+ * @type {Selection[]}
179
+ */
180
+
63
181
  function Highlight(options) {
64
182
  _classCallCheck(this, Highlight);
65
183
  /**
66
- * Options consumed by Highlight class and Walkontable Selection classes.
184
+ * Creates (if not exist in the cache) Walkontable Selection instance.
67
185
  *
68
- * @type {object}
186
+ * @param {Map} cacheMap The map where the instance will be cached.
187
+ * @param {Function} highlightFactory The function factory.
188
+ * @returns {VisualSelection}
69
189
  */
190
+ _classPrivateMethodInitSpec(this, _createHighlight);
191
+ _defineProperty(this, "options", void 0);
192
+ _defineProperty(this, "layerLevel", 0);
193
+ _defineProperty(this, "focus", void 0);
194
+ _defineProperty(this, "fill", void 0);
195
+ _defineProperty(this, "layeredAreas", new Map());
196
+ _defineProperty(this, "areas", new Map());
197
+ _defineProperty(this, "rowHeaders", new Map());
198
+ _defineProperty(this, "columnHeaders", new Map());
199
+ _defineProperty(this, "activeRowHeaders", new Map());
200
+ _defineProperty(this, "activeColumnHeaders", new Map());
201
+ _defineProperty(this, "rowHighlights", new Map());
202
+ _defineProperty(this, "columnHighlights", new Map());
203
+ _defineProperty(this, "customSelections", []);
70
204
  this.options = options;
71
- /**
72
- * The property which describes which layer level of the visual selection will be modified.
73
- * This option is valid only for `area` and `header` highlight types which occurs multiple times on
74
- * the table (as a non-consecutive selection).
75
- *
76
- * An order of the layers is the same as the order of added new non-consecutive selections.
77
- *
78
- * @type {number}
79
- * @default 0
80
- */
81
- this.layerLevel = 0;
82
- /**
83
- * `cell` highlight object which describes attributes for the currently selected cell.
84
- * It can only occur only once on the table.
85
- *
86
- * @type {Selection}
87
- */
88
- this.cell = (0, _types.createHighlight)(_constants.CELL_TYPE, options);
89
- /**
90
- * `fill` highlight object which describes attributes for the borders for autofill functionality.
91
- * It can only occur only once on the table.
92
- *
93
- * @type {Selection}
94
- */
95
- this.fill = (0, _types.createHighlight)(_constants.FILL_TYPE, options);
96
- /**
97
- * Collection of the `area` highlights. That objects describes attributes for the borders and selection of
98
- * the multiple selected cells. It can occur multiple times on the table.
99
- *
100
- * @type {Map.<number, Selection>}
101
- */
102
- this.areas = new Map();
103
- /**
104
- * Collection of the `header` highlights. That objects describes attributes for the selection of
105
- * the multiple selected rows and columns in the table header. It can occur multiple times on the table.
106
- *
107
- * @type {Map.<number, Selection>}
108
- */
109
- this.headers = new Map();
110
- /**
111
- * Collection of the `active-header` highlights. That objects describes attributes for the selection of
112
- * the multiple selected rows and columns in the table header. The table headers which have selected all items in
113
- * a row will be marked as `active-header`.
114
- *
115
- * @type {Map.<number, Selection>}
116
- */
117
- this.activeHeaders = new Map();
118
- /**
119
- * Collection of the `custom-selection`, holder for example borders added through CustomBorders plugin.
120
- *
121
- * @type {Selection[]}
122
- */
123
- this.customSelections = [];
205
+ this.focus = (0, _focus.createHighlight)(options);
206
+ this.fill = (0, _fill.createHighlight)(options);
124
207
  }
125
208
 
126
209
  /**
@@ -136,11 +219,14 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
136
219
  var type = highlightType;
137
220
 
138
221
  // Legacy compatibility.
139
- if (highlightType === _constants.CELL_TYPE) {
222
+ if (highlightType === _src.HIGHLIGHT_FOCUS_TYPE) {
140
223
  type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
141
224
  }
142
225
 
143
- var disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
226
+ var disableHighlight = false;
227
+ if (coords.isCell()) {
228
+ disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
229
+ }
144
230
  if (typeof disableHighlight === 'string') {
145
231
  disableHighlight = [disableHighlight];
146
232
  }
@@ -162,14 +248,15 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
162
248
  }
163
249
 
164
250
  /**
165
- * Get Walkontable Selection instance created for controlling highlight of the currently selected/edited cell.
251
+ * Get Walkontable Selection instance created for controlling highlight of the currently
252
+ * focused cell (or header).
166
253
  *
167
254
  * @returns {Selection}
168
255
  */
169
256
  }, {
170
- key: "getCell",
171
- value: function getCell() {
172
- return this.cell;
257
+ key: "getFocus",
258
+ value: function getFocus() {
259
+ return this.focus;
173
260
  }
174
261
 
175
262
  /**
@@ -184,25 +271,38 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
184
271
  }
185
272
 
186
273
  /**
187
- * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
188
- * of the multiple selected cells.
274
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
275
+ * `area` highlights.
189
276
  *
190
277
  * @returns {Selection}
191
278
  */
192
279
  }, {
193
- key: "createOrGetArea",
194
- value: function createOrGetArea() {
195
- var layerLevel = this.layerLevel;
196
- var area;
197
- if (this.areas.has(layerLevel)) {
198
- area = this.areas.get(layerLevel);
199
- } else {
200
- area = (0, _types.createHighlight)(_constants.AREA_TYPE, _objectSpread({
201
- layerLevel: layerLevel
202
- }, this.options));
203
- this.areas.set(layerLevel, area);
204
- }
205
- return area;
280
+ key: "createLayeredArea",
281
+ value: function createLayeredArea() {
282
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.layeredAreas, _areaLayered.createHighlight);
283
+ }
284
+
285
+ /**
286
+ * Get all Walkontable Selection instances which describes the state of the visual highlight of the cells.
287
+ *
288
+ * @returns {Selection[]}
289
+ */
290
+ }, {
291
+ key: "getLayeredAreas",
292
+ value: function getLayeredAreas() {
293
+ return _toConsumableArray(this.layeredAreas.values());
294
+ }
295
+
296
+ /**
297
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
298
+ * `highlight` highlights.
299
+ *
300
+ * @returns {Selection}
301
+ */
302
+ }, {
303
+ key: "createArea",
304
+ value: function createArea() {
305
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.areas, _area.createHighlight);
206
306
  }
207
307
 
208
308
  /**
@@ -217,23 +317,15 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
217
317
  }
218
318
 
219
319
  /**
220
- * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
221
- * of the multiple selected header cells.
320
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
321
+ * header highlight for rows.
222
322
  *
223
323
  * @returns {Selection}
224
324
  */
225
325
  }, {
226
- key: "createOrGetHeader",
227
- value: function createOrGetHeader() {
228
- var layerLevel = this.layerLevel;
229
- var header;
230
- if (this.headers.has(layerLevel)) {
231
- header = this.headers.get(layerLevel);
232
- } else {
233
- header = (0, _types.createHighlight)(_constants.HEADER_TYPE, _objectSpread({}, this.options));
234
- this.headers.set(layerLevel, header);
235
- }
236
- return header;
326
+ key: "createRowHeader",
327
+ value: function createRowHeader() {
328
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.rowHeaders, _header.createHighlight);
237
329
  }
238
330
 
239
331
  /**
@@ -242,29 +334,67 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
242
334
  * @returns {Selection[]}
243
335
  */
244
336
  }, {
245
- key: "getHeaders",
246
- value: function getHeaders() {
247
- return _toConsumableArray(this.headers.values());
337
+ key: "getRowHeaders",
338
+ value: function getRowHeaders() {
339
+ return _toConsumableArray(this.rowHeaders.values());
248
340
  }
249
341
 
250
342
  /**
251
- * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
252
- * of the multiple selected active header cells.
343
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
344
+ * header highlight for columns.
253
345
  *
254
346
  * @returns {Selection}
255
347
  */
256
348
  }, {
257
- key: "createOrGetActiveHeader",
258
- value: function createOrGetActiveHeader() {
259
- var layerLevel = this.layerLevel;
260
- var header;
261
- if (this.activeHeaders.has(layerLevel)) {
262
- header = this.activeHeaders.get(layerLevel);
263
- } else {
264
- header = (0, _types.createHighlight)(_constants.ACTIVE_HEADER_TYPE, _objectSpread({}, this.options));
265
- this.activeHeaders.set(layerLevel, header);
266
- }
267
- return header;
349
+ key: "createColumnHeader",
350
+ value: function createColumnHeader() {
351
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.columnHeaders, _header.createHighlight);
352
+ }
353
+
354
+ /**
355
+ * Get all Walkontable Selection instances which describes the state of the visual highlight of the headers.
356
+ *
357
+ * @returns {Selection[]}
358
+ */
359
+ }, {
360
+ key: "getColumnHeaders",
361
+ value: function getColumnHeaders() {
362
+ return _toConsumableArray(this.columnHeaders.values());
363
+ }
364
+
365
+ /**
366
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
367
+ * highlight for active row headers.
368
+ *
369
+ * @returns {Selection}
370
+ */
371
+ }, {
372
+ key: "createActiveRowHeader",
373
+ value: function createActiveRowHeader() {
374
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.activeRowHeaders, _activeHeader.createHighlight);
375
+ }
376
+
377
+ /**
378
+ * Get all Walkontable Selection instances which describes the state of the visual highlight of the active headers.
379
+ *
380
+ * @returns {Selection[]}
381
+ */
382
+ }, {
383
+ key: "getActiveRowHeaders",
384
+ value: function getActiveRowHeaders() {
385
+ return _toConsumableArray(this.activeRowHeaders.values());
386
+ }
387
+
388
+ /**
389
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
390
+ * highlight for active column headers.
391
+ *
392
+ * @returns {Selection}
393
+ */
394
+ }, {
395
+ key: "createActiveColumnHeader",
396
+ value: function createActiveColumnHeader() {
397
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.activeColumnHeaders, _activeHeader.createHighlight);
268
398
  }
269
399
 
270
400
  /**
@@ -273,9 +403,55 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
273
403
  * @returns {Selection[]}
274
404
  */
275
405
  }, {
276
- key: "getActiveHeaders",
277
- value: function getActiveHeaders() {
278
- return _toConsumableArray(this.activeHeaders.values());
406
+ key: "getActiveColumnHeaders",
407
+ value: function getActiveColumnHeaders() {
408
+ return _toConsumableArray(this.activeColumnHeaders.values());
409
+ }
410
+
411
+ /**
412
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
413
+ * highlight cells in a row.
414
+ *
415
+ * @returns {Selection}
416
+ */
417
+ }, {
418
+ key: "createRowHighlight",
419
+ value: function createRowHighlight() {
420
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.rowHighlights, _row.createHighlight);
421
+ }
422
+
423
+ /**
424
+ * Get all Walkontable Selection instances which describes the state of the rows highlighting.
425
+ *
426
+ * @returns {Selection[]}
427
+ */
428
+ }, {
429
+ key: "getRowHighlights",
430
+ value: function getRowHighlights() {
431
+ return _toConsumableArray(this.rowHighlights.values());
432
+ }
433
+
434
+ /**
435
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
436
+ * highlight cells in a column.
437
+ *
438
+ * @returns {Selection}
439
+ */
440
+ }, {
441
+ key: "createColumnHighlight",
442
+ value: function createColumnHighlight() {
443
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.columnHighlights, _column.createHighlight);
444
+ }
445
+
446
+ /**
447
+ * Get all Walkontable Selection instances which describes the state of the columns highlighting.
448
+ *
449
+ * @returns {Selection[]}
450
+ */
451
+ }, {
452
+ key: "getColumnHighlights",
453
+ value: function getColumnHighlights() {
454
+ return _toConsumableArray(this.columnHighlights.values());
279
455
  }
280
456
 
281
457
  /**
@@ -297,7 +473,7 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
297
473
  }, {
298
474
  key: "addCustomSelection",
299
475
  value: function addCustomSelection(selectionInstance) {
300
- this.customSelections.push((0, _types.createHighlight)(_constants.CUSTOM_SELECTION_TYPE, _objectSpread(_objectSpread({}, this.options), selectionInstance)));
476
+ this.customSelections.push((0, _customSelection.createHighlight)(_objectSpread(_objectSpread({}, this.options), selectionInstance)));
301
477
  }
302
478
 
303
479
  /**
@@ -306,31 +482,57 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
306
482
  }, {
307
483
  key: "clear",
308
484
  value: function clear() {
309
- this.cell.clear();
485
+ this.focus.clear();
310
486
  this.fill.clear();
311
487
  (0, _array.arrayEach)(this.areas.values(), function (highlight) {
312
488
  return void highlight.clear();
313
489
  });
314
- (0, _array.arrayEach)(this.headers.values(), function (highlight) {
490
+ (0, _array.arrayEach)(this.layeredAreas.values(), function (highlight) {
491
+ return void highlight.clear();
492
+ });
493
+ (0, _array.arrayEach)(this.rowHeaders.values(), function (highlight) {
494
+ return void highlight.clear();
495
+ });
496
+ (0, _array.arrayEach)(this.columnHeaders.values(), function (highlight) {
315
497
  return void highlight.clear();
316
498
  });
317
- (0, _array.arrayEach)(this.activeHeaders.values(), function (highlight) {
499
+ (0, _array.arrayEach)(this.activeRowHeaders.values(), function (highlight) {
500
+ return void highlight.clear();
501
+ });
502
+ (0, _array.arrayEach)(this.activeColumnHeaders.values(), function (highlight) {
503
+ return void highlight.clear();
504
+ });
505
+ (0, _array.arrayEach)(this.rowHighlights.values(), function (highlight) {
506
+ return void highlight.clear();
507
+ });
508
+ (0, _array.arrayEach)(this.columnHighlights.values(), function (highlight) {
318
509
  return void highlight.clear();
319
510
  });
320
511
  }
321
-
512
+ }, {
513
+ key: _Symbol$iterator,
514
+ value:
322
515
  /**
323
516
  * This object can be iterate over using `for of` syntax or using internal `arrayEach` helper.
324
517
  *
325
518
  * @returns {Selection[]}
326
519
  */
327
- }, {
328
- key: _Symbol$iterator,
329
- value: function value() {
330
- return [this.cell, this.fill].concat(_toConsumableArray(this.areas.values()), _toConsumableArray(this.headers.values()), _toConsumableArray(this.activeHeaders.values()), _toConsumableArray(this.customSelections))[Symbol.iterator]();
520
+ function value() {
521
+ return [this.focus, this.fill].concat(_toConsumableArray(this.areas.values()), _toConsumableArray(this.layeredAreas.values()), _toConsumableArray(this.rowHeaders.values()), _toConsumableArray(this.columnHeaders.values()), _toConsumableArray(this.activeRowHeaders.values()), _toConsumableArray(this.activeColumnHeaders.values()), _toConsumableArray(this.rowHighlights.values()), _toConsumableArray(this.columnHighlights.values()), _toConsumableArray(this.customSelections))[Symbol.iterator]();
331
522
  }
332
523
  }]);
333
524
  return Highlight;
334
- }(Symbol.iterator);
525
+ }();
526
+ function _createHighlight2(cacheMap, highlightFactory) {
527
+ var layerLevel = this.layerLevel;
528
+ if (cacheMap.has(layerLevel)) {
529
+ return cacheMap.get(layerLevel);
530
+ }
531
+ var highlight = highlightFactory(_objectSpread({
532
+ layerLevel: layerLevel
533
+ }, this.options));
534
+ cacheMap.set(layerLevel, highlight);
535
+ return highlight;
536
+ }
335
537
  var _default = Highlight;
336
538
  exports.default = _default;