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