handsontable 0.0.0-next-48677e7-20230509 → 0.0.0-next-c73b24c-20230510

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (227) hide show
  1. package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
  2. package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
  3. package/3rdparty/walkontable/src/cell/coords.js +13 -40
  4. package/3rdparty/walkontable/src/cell/coords.mjs +13 -40
  5. package/3rdparty/walkontable/src/cell/range.js +25 -29
  6. package/3rdparty/walkontable/src/cell/range.mjs +24 -28
  7. package/3rdparty/walkontable/src/core/_base.js +3 -9
  8. package/3rdparty/walkontable/src/core/_base.mjs +3 -9
  9. package/3rdparty/walkontable/src/core/clone.js +2 -2
  10. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  11. package/3rdparty/walkontable/src/core/core.js +2 -3
  12. package/3rdparty/walkontable/src/core/core.mjs +2 -3
  13. package/3rdparty/walkontable/src/event.js +10 -12
  14. package/3rdparty/walkontable/src/event.mjs +10 -12
  15. package/3rdparty/walkontable/src/facade/core.js +2 -2
  16. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  17. package/3rdparty/walkontable/src/index.js +2 -10
  18. package/3rdparty/walkontable/src/index.mjs +2 -2
  19. package/3rdparty/walkontable/src/overlay/_base.js +7 -8
  20. package/3rdparty/walkontable/src/overlay/_base.mjs +7 -8
  21. package/3rdparty/walkontable/src/overlay/bottom.js +6 -7
  22. package/3rdparty/walkontable/src/overlay/bottom.mjs +6 -7
  23. package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
  24. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
  25. package/3rdparty/walkontable/src/overlay/top.js +10 -9
  26. package/3rdparty/walkontable/src/overlay/top.mjs +10 -9
  27. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +10 -12
  28. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +10 -12
  29. package/3rdparty/walkontable/src/overlays.js +55 -64
  30. package/3rdparty/walkontable/src/overlays.mjs +55 -64
  31. package/3rdparty/walkontable/src/renderer/table.js +0 -2
  32. package/3rdparty/walkontable/src/renderer/table.mjs +0 -2
  33. package/3rdparty/walkontable/src/scroll.js +20 -23
  34. package/3rdparty/walkontable/src/scroll.mjs +20 -23
  35. package/3rdparty/walkontable/src/selection.js +354 -0
  36. package/3rdparty/walkontable/src/selection.mjs +348 -0
  37. package/3rdparty/walkontable/src/settings.js +13 -15
  38. package/3rdparty/walkontable/src/settings.mjs +13 -15
  39. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
  40. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
  41. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
  42. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
  43. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
  44. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
  45. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
  46. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
  47. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
  48. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
  49. package/3rdparty/walkontable/src/table.js +101 -33
  50. package/3rdparty/walkontable/src/table.mjs +102 -34
  51. package/base.js +2 -4
  52. package/base.mjs +2 -2
  53. package/core.d.ts +0 -4
  54. package/core.js +24 -52
  55. package/core.mjs +24 -52
  56. package/dataMap/dataSource.js +5 -5
  57. package/dataMap/dataSource.mjs +5 -5
  58. package/dataMap/metaManager/metaSchema.js +1 -8
  59. package/dataMap/metaManager/metaSchema.mjs +1 -8
  60. package/dist/handsontable.css +2 -7
  61. package/dist/handsontable.full.css +2 -7
  62. package/dist/handsontable.full.js +9101 -9413
  63. package/dist/handsontable.full.min.css +3 -3
  64. package/dist/handsontable.full.min.js +123 -115
  65. package/dist/handsontable.js +8761 -9074
  66. package/dist/handsontable.min.css +3 -3
  67. package/dist/handsontable.min.js +11 -3
  68. package/dist/languages/all.js +133 -0
  69. package/dist/languages/ar-AR.js +7 -0
  70. package/dist/languages/cs-CZ.js +7 -0
  71. package/dist/languages/de-CH.js +7 -0
  72. package/dist/languages/de-DE.js +7 -0
  73. package/dist/languages/en-US.js +7 -0
  74. package/dist/languages/es-MX.js +7 -0
  75. package/dist/languages/fr-FR.js +7 -0
  76. package/dist/languages/it-IT.js +7 -0
  77. package/dist/languages/ja-JP.js +7 -0
  78. package/dist/languages/ko-KR.js +7 -0
  79. package/dist/languages/lv-LV.js +7 -0
  80. package/dist/languages/nb-NO.js +7 -0
  81. package/dist/languages/nl-NL.js +7 -0
  82. package/dist/languages/pl-PL.js +7 -0
  83. package/dist/languages/pt-BR.js +7 -0
  84. package/dist/languages/ru-RU.js +7 -0
  85. package/dist/languages/sr-SP.js +7 -0
  86. package/dist/languages/zh-CN.js +7 -0
  87. package/dist/languages/zh-TW.js +7 -0
  88. package/editorManager.js +3 -7
  89. package/editorManager.mjs +3 -7
  90. package/editors/textEditor/textEditor.js +16 -3
  91. package/editors/textEditor/textEditor.mjs +17 -4
  92. package/helpers/dom/element.js +0 -11
  93. package/helpers/dom/element.mjs +0 -10
  94. package/helpers/mixed.js +1 -1
  95. package/helpers/mixed.mjs +1 -1
  96. package/i18n/languages/ar-AR.js +7 -1
  97. package/i18n/languages/cs-CZ.js +7 -1
  98. package/i18n/languages/de-CH.js +7 -1
  99. package/i18n/languages/de-DE.js +7 -1
  100. package/i18n/languages/en-US.js +7 -1
  101. package/i18n/languages/es-MX.js +7 -1
  102. package/i18n/languages/fr-FR.js +7 -1
  103. package/i18n/languages/it-IT.js +7 -1
  104. package/i18n/languages/ja-JP.js +7 -1
  105. package/i18n/languages/ko-KR.js +7 -1
  106. package/i18n/languages/lv-LV.js +7 -1
  107. package/i18n/languages/nb-NO.js +7 -1
  108. package/i18n/languages/nl-NL.js +7 -1
  109. package/i18n/languages/pl-PL.js +7 -1
  110. package/i18n/languages/pt-BR.js +7 -1
  111. package/i18n/languages/ru-RU.js +7 -1
  112. package/i18n/languages/sr-SP.js +7 -1
  113. package/i18n/languages/zh-CN.js +7 -1
  114. package/i18n/languages/zh-TW.js +7 -1
  115. package/languages/all.js +133 -0
  116. package/languages/ar-AR.js +7 -0
  117. package/languages/cs-CZ.js +7 -0
  118. package/languages/de-CH.js +7 -0
  119. package/languages/de-DE.js +7 -0
  120. package/languages/en-US.js +7 -0
  121. package/languages/es-MX.js +7 -0
  122. package/languages/fr-FR.js +7 -0
  123. package/languages/index.js +133 -0
  124. package/languages/it-IT.js +7 -0
  125. package/languages/ja-JP.js +7 -0
  126. package/languages/ko-KR.js +7 -0
  127. package/languages/lv-LV.js +7 -0
  128. package/languages/nb-NO.js +7 -0
  129. package/languages/nl-NL.js +7 -0
  130. package/languages/pl-PL.js +7 -0
  131. package/languages/pt-BR.js +7 -0
  132. package/languages/ru-RU.js +7 -0
  133. package/languages/sr-SP.js +7 -0
  134. package/languages/zh-CN.js +7 -0
  135. package/languages/zh-TW.js +7 -0
  136. package/package.json +3 -2
  137. package/pluginHooks.js +17 -7
  138. package/pluginHooks.mjs +16 -4
  139. package/plugins/autoRowSize/autoRowSize.js +2 -2
  140. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  141. package/plugins/copyPaste/copyPaste.js +93 -12
  142. package/plugins/copyPaste/copyPaste.mjs +93 -12
  143. package/plugins/copyPaste/copyableRanges.js +25 -31
  144. package/plugins/copyPaste/copyableRanges.mjs +18 -24
  145. package/plugins/copyPaste/focusableElement.js +219 -0
  146. package/plugins/copyPaste/focusableElement.mjs +213 -0
  147. package/plugins/customBorders/customBorders.js +2 -6
  148. package/plugins/customBorders/customBorders.mjs +3 -7
  149. package/plugins/filters/filters.js +5 -0
  150. package/plugins/filters/filters.mjs +5 -0
  151. package/plugins/formulas/formulas.js +190 -168
  152. package/plugins/formulas/formulas.mjs +190 -168
  153. package/plugins/formulas/indexSyncer/axisSyncer.js +379 -0
  154. package/plugins/formulas/indexSyncer/axisSyncer.mjs +374 -0
  155. package/plugins/formulas/indexSyncer/index.js +225 -0
  156. package/plugins/formulas/indexSyncer/index.mjs +219 -0
  157. package/plugins/mergeCells/mergeCells.js +16 -0
  158. package/plugins/mergeCells/mergeCells.mjs +16 -0
  159. package/plugins/nestedHeaders/nestedHeaders.js +4 -3
  160. package/plugins/nestedHeaders/nestedHeaders.mjs +4 -3
  161. package/plugins/nestedHeaders/stateManager/headersTree.js +23 -26
  162. package/plugins/nestedHeaders/stateManager/headersTree.mjs +20 -23
  163. package/plugins/nestedHeaders/stateManager/index.js +3 -3
  164. package/plugins/nestedHeaders/stateManager/matrixGenerator.js +1 -0
  165. package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
  166. package/plugins/nestedHeaders/utils/ghostTable.js +30 -35
  167. package/plugins/nestedHeaders/utils/ghostTable.mjs +30 -35
  168. package/plugins/registry.js +3 -1
  169. package/plugins/undoRedo/undoRedo.js +0 -1
  170. package/plugins/undoRedo/undoRedo.mjs +0 -1
  171. package/renderers/baseRenderer/baseRenderer.js +0 -3
  172. package/renderers/baseRenderer/baseRenderer.mjs +0 -3
  173. package/selection/highlight/constants.js +16 -0
  174. package/selection/highlight/constants.mjs +6 -0
  175. package/selection/highlight/highlight.js +133 -335
  176. package/selection/highlight/highlight.mjs +129 -325
  177. package/selection/highlight/types/activeHeader.js +9 -10
  178. package/selection/highlight/types/activeHeader.mjs +8 -10
  179. package/selection/highlight/types/area.js +27 -12
  180. package/selection/highlight/types/area.mjs +30 -16
  181. package/selection/highlight/types/{focus.js → cell.js} +8 -5
  182. package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
  183. package/selection/highlight/types/customSelection.js +10 -7
  184. package/selection/highlight/types/customSelection.mjs +9 -7
  185. package/selection/highlight/types/fill.js +8 -5
  186. package/selection/highlight/types/fill.mjs +7 -5
  187. package/selection/highlight/types/header.js +20 -10
  188. package/selection/highlight/types/header.mjs +19 -10
  189. package/selection/highlight/types/{row.js → index.js} +31 -27
  190. package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
  191. package/selection/highlight/visualSelection.js +21 -12
  192. package/selection/highlight/visualSelection.mjs +21 -12
  193. package/selection/index.js +7 -4
  194. package/selection/index.mjs +3 -2
  195. package/selection/selection.js +46 -88
  196. package/selection/selection.mjs +44 -82
  197. package/settings.d.ts +0 -1
  198. package/tableView.js +66 -94
  199. package/tableView.mjs +66 -94
  200. package/translations/changesObservable/observable.js +41 -46
  201. package/translations/changesObservable/observable.mjs +36 -41
  202. package/translations/changesObservable/observer.js +1 -1
  203. package/translations/indexMapper.js +21 -0
  204. package/translations/indexMapper.mjs +21 -0
  205. package/utils/dataStructures/tree.js +15 -18
  206. package/utils/dataStructures/tree.mjs +15 -18
  207. package/utils/parseTable.js +5 -1
  208. package/utils/parseTable.mjs +5 -1
  209. package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
  210. package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
  211. package/3rdparty/walkontable/src/selection/constants.js +0 -63
  212. package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
  213. package/3rdparty/walkontable/src/selection/index.js +0 -30
  214. package/3rdparty/walkontable/src/selection/index.mjs +0 -5
  215. package/3rdparty/walkontable/src/selection/manager.js +0 -334
  216. package/3rdparty/walkontable/src/selection/manager.mjs +0 -328
  217. package/3rdparty/walkontable/src/selection/scanner.js +0 -363
  218. package/3rdparty/walkontable/src/selection/scanner.mjs +0 -359
  219. package/3rdparty/walkontable/src/selection/selection.js +0 -133
  220. package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
  221. package/focusManager.d.ts +0 -12
  222. package/focusManager.js +0 -249
  223. package/focusManager.mjs +0 -245
  224. package/selection/highlight/types/areaLayered.js +0 -54
  225. package/selection/highlight/types/areaLayered.mjs +0 -49
  226. package/selection/highlight/types/column.js +0 -50
  227. package/selection/highlight/types/column.mjs +0 -45
@@ -1,60 +1,45 @@
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; }
5
2
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
3
  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."); }
7
4
  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); }
8
5
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
9
6
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
7
  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";
11
12
  import "core-js/modules/es.array.iterator.js";
12
13
  import "core-js/modules/es.map.js";
13
14
  import "core-js/modules/es.object.to-string.js";
14
15
  import "core-js/modules/es.string.iterator.js";
15
16
  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";
24
23
  import "core-js/modules/es.symbol.to-primitive.js";
25
24
  import "core-js/modules/es.date.to-primitive.js";
26
25
  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";
31
26
  import "core-js/modules/es.object.keys.js";
32
27
  import "core-js/modules/es.array.filter.js";
33
28
  import "core-js/modules/es.object.get-own-property-descriptor.js";
34
29
  import "core-js/modules/web.dom-collections.for-each.js";
35
30
  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";
36
35
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
37
36
  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); } }
38
37
  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; }
42
38
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
43
39
  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); }
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";
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";
55
42
  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
-
58
43
  /**
59
44
  * Highlight class responsible for managing Walkontable Selection classes.
60
45
  *
@@ -70,130 +55,68 @@ export { HIGHLIGHT_ACTIVE_HEADER_TYPE as ACTIVE_HEADER_TYPE, HIGHLIGHT_AREA_TYPE
70
55
  * @class Highlight
71
56
  * @util
72
57
  */
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
-
58
+ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
171
59
  function Highlight(options) {
172
60
  _classCallCheck(this, Highlight);
173
61
  /**
174
- * Creates (if not exist in the cache) Walkontable Selection instance.
62
+ * Options consumed by Highlight class and Walkontable Selection classes.
175
63
  *
176
- * @param {Map} cacheMap The map where the instance will be cached.
177
- * @param {Function} highlightFactory The function factory.
178
- * @returns {VisualSelection}
64
+ * @type {object}
179
65
  */
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", []);
194
66
  this.options = options;
195
- this.focus = createFocusHighlight(options);
196
- this.fill = createFillHighlight(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 = [];
197
120
  }
198
121
 
199
122
  /**
@@ -209,14 +132,11 @@ var Highlight = /*#__PURE__*/function () {
209
132
  var type = highlightType;
210
133
 
211
134
  // Legacy compatibility.
212
- if (highlightType === HIGHLIGHT_FOCUS_TYPE) {
135
+ if (highlightType === CELL_TYPE) {
213
136
  type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
214
137
  }
215
138
 
216
- var disableHighlight = false;
217
- if (coords.isCell()) {
218
- disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
219
- }
139
+ var disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
220
140
  if (typeof disableHighlight === 'string') {
221
141
  disableHighlight = [disableHighlight];
222
142
  }
@@ -238,15 +158,14 @@ var Highlight = /*#__PURE__*/function () {
238
158
  }
239
159
 
240
160
  /**
241
- * Get Walkontable Selection instance created for controlling highlight of the currently
242
- * focused cell (or header).
161
+ * Get Walkontable Selection instance created for controlling highlight of the currently selected/edited cell.
243
162
  *
244
163
  * @returns {Selection}
245
164
  */
246
165
  }, {
247
- key: "getFocus",
248
- value: function getFocus() {
249
- return this.focus;
166
+ key: "getCell",
167
+ value: function getCell() {
168
+ return this.cell;
250
169
  }
251
170
 
252
171
  /**
@@ -261,38 +180,25 @@ var Highlight = /*#__PURE__*/function () {
261
180
  }
262
181
 
263
182
  /**
264
- * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
265
- * `area` highlights.
183
+ * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
184
+ * of the multiple selected cells.
266
185
  *
267
186
  * @returns {Selection}
268
187
  */
269
188
  }, {
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);
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;
296
202
  }
297
203
 
298
204
  /**
@@ -307,38 +213,23 @@ var Highlight = /*#__PURE__*/function () {
307
213
  }
308
214
 
309
215
  /**
310
- * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
311
- * header highlight for rows.
312
- *
313
- * @returns {Selection}
314
- */
315
- }, {
316
- key: "createRowHeader",
317
- value: function createRowHeader() {
318
- return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.rowHeaders, createHeaderHighlight);
319
- }
320
-
321
- /**
322
- * Get all Walkontable Selection instances which describes the state of the visual highlight of the headers.
323
- *
324
- * @returns {Selection[]}
325
- */
326
- }, {
327
- key: "getRowHeaders",
328
- value: function getRowHeaders() {
329
- return _toConsumableArray(this.rowHeaders.values());
330
- }
331
-
332
- /**
333
- * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
334
- * header highlight for columns.
216
+ * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
217
+ * of the multiple selected header cells.
335
218
  *
336
219
  * @returns {Selection}
337
220
  */
338
221
  }, {
339
- key: "createColumnHeader",
340
- value: function createColumnHeader() {
341
- return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.columnHeaders, createHeaderHighlight);
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;
342
233
  }
343
234
 
344
235
  /**
@@ -347,44 +238,29 @@ var Highlight = /*#__PURE__*/function () {
347
238
  * @returns {Selection[]}
348
239
  */
349
240
  }, {
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());
241
+ key: "getHeaders",
242
+ value: function getHeaders() {
243
+ return _toConsumableArray(this.headers.values());
376
244
  }
377
245
 
378
246
  /**
379
- * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
380
- * highlight for active column headers.
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.
381
249
  *
382
250
  * @returns {Selection}
383
251
  */
384
252
  }, {
385
- key: "createActiveColumnHeader",
386
- value: function createActiveColumnHeader() {
387
- return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.activeColumnHeaders, createActiveHighlight);
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;
388
264
  }
389
265
 
390
266
  /**
@@ -393,55 +269,9 @@ var Highlight = /*#__PURE__*/function () {
393
269
  * @returns {Selection[]}
394
270
  */
395
271
  }, {
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());
272
+ key: "getActiveHeaders",
273
+ value: function getActiveHeaders() {
274
+ return _toConsumableArray(this.activeHeaders.values());
445
275
  }
446
276
 
447
277
  /**
@@ -463,7 +293,7 @@ var Highlight = /*#__PURE__*/function () {
463
293
  }, {
464
294
  key: "addCustomSelection",
465
295
  value: function addCustomSelection(selectionInstance) {
466
- this.customSelections.push(createCustomHighlight(_objectSpread(_objectSpread({}, this.options), selectionInstance)));
296
+ this.customSelections.push(createHighlight(CUSTOM_SELECTION_TYPE, _objectSpread(_objectSpread({}, this.options), selectionInstance)));
467
297
  }
468
298
 
469
299
  /**
@@ -472,56 +302,30 @@ var Highlight = /*#__PURE__*/function () {
472
302
  }, {
473
303
  key: "clear",
474
304
  value: function clear() {
475
- this.focus.clear();
305
+ this.cell.clear();
476
306
  this.fill.clear();
477
307
  arrayEach(this.areas.values(), function (highlight) {
478
308
  return void highlight.clear();
479
309
  });
480
- arrayEach(this.layeredAreas.values(), function (highlight) {
481
- return void highlight.clear();
482
- });
483
- arrayEach(this.rowHeaders.values(), function (highlight) {
310
+ arrayEach(this.headers.values(), function (highlight) {
484
311
  return void highlight.clear();
485
312
  });
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) {
313
+ arrayEach(this.activeHeaders.values(), function (highlight) {
499
314
  return void highlight.clear();
500
315
  });
501
316
  }
502
- }, {
503
- key: _Symbol$iterator,
504
- value:
317
+
505
318
  /**
506
319
  * This object can be iterate over using `for of` syntax or using internal `arrayEach` helper.
507
320
  *
508
321
  * @returns {Selection[]}
509
322
  */
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]();
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]();
512
327
  }
513
328
  }]);
514
329
  return Highlight;
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
- }
330
+ }(Symbol.iterator);
527
331
  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.createHighlight = createHighlight;
22
- var _src = require("../../../3rdparty/walkontable/src");
21
+ exports.default = void 0;
22
+ var _constants = require("../constants");
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,10 +31,6 @@ 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
- *
38
34
  * @param {object} highlightParams A configuration object to create a highlight.
39
35
  * @param {string} highlightParams.activeHeaderClassName Highlighted headers' class name.
40
36
  * @returns {Selection}
@@ -42,9 +38,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
42
38
  function createHighlight(_ref) {
43
39
  var activeHeaderClassName = _ref.activeHeaderClassName,
44
40
  restOptions = _objectWithoutProperties(_ref, _excluded);
45
- return new _visualSelection.default(_objectSpread(_objectSpread({
46
- className: activeHeaderClassName
41
+ var s = new _visualSelection.default(_objectSpread(_objectSpread({
42
+ highlightHeaderClassName: activeHeaderClassName
47
43
  }, restOptions), {}, {
48
- selectionType: _src.HIGHLIGHT_ACTIVE_HEADER_TYPE
44
+ selectionType: _constants.ACTIVE_HEADER_TYPE
49
45
  }));
50
- }
46
+ return s;
47
+ }
48
+ var _default = createHighlight;
49
+ exports.default = _default;
@@ -23,23 +23,21 @@ 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 { HIGHLIGHT_ACTIVE_HEADER_TYPE } from "../../../3rdparty/walkontable/src/index.mjs";
26
+ import { ACTIVE_HEADER_TYPE } from "../constants.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
- *
33
29
  * @param {object} highlightParams A configuration object to create a highlight.
34
30
  * @param {string} highlightParams.activeHeaderClassName Highlighted headers' class name.
35
31
  * @returns {Selection}
36
32
  */
37
- export function createHighlight(_ref) {
33
+ function createHighlight(_ref) {
38
34
  var activeHeaderClassName = _ref.activeHeaderClassName,
39
35
  restOptions = _objectWithoutProperties(_ref, _excluded);
40
- return new VisualSelection(_objectSpread(_objectSpread({
41
- className: activeHeaderClassName
36
+ var s = new VisualSelection(_objectSpread(_objectSpread({
37
+ highlightHeaderClassName: activeHeaderClassName
42
38
  }, restOptions), {}, {
43
- selectionType: HIGHLIGHT_ACTIVE_HEADER_TYPE
39
+ selectionType: ACTIVE_HEADER_TYPE
44
40
  }));
45
- }
41
+ return s;
42
+ }
43
+ export default createHighlight;