handsontable 0.0.0-next-b7cca45-20230605 → 0.0.0-next-aa25cac-20230607

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 (223) hide show
  1. package/3rdparty/walkontable/src/cell/coords.d.ts +6 -1
  2. package/3rdparty/walkontable/src/cell/coords.js +61 -12
  3. package/3rdparty/walkontable/src/cell/coords.mjs +61 -12
  4. package/3rdparty/walkontable/src/cell/range.d.ts +9 -2
  5. package/3rdparty/walkontable/src/cell/range.js +44 -7
  6. package/3rdparty/walkontable/src/cell/range.mjs +44 -7
  7. package/3rdparty/walkontable/src/core/_base.js +9 -3
  8. package/3rdparty/walkontable/src/core/_base.mjs +9 -3
  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 +3 -2
  12. package/3rdparty/walkontable/src/core/core.mjs +3 -2
  13. package/3rdparty/walkontable/src/event.js +7 -7
  14. package/3rdparty/walkontable/src/event.mjs +7 -7
  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 +10 -2
  18. package/3rdparty/walkontable/src/index.mjs +2 -2
  19. package/3rdparty/walkontable/src/overlay/_base.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
  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 +2 -4
  24. package/3rdparty/walkontable/src/overlay/top.mjs +2 -4
  25. package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
  26. package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
  27. package/3rdparty/walkontable/src/selection/border/constants.js +18 -0
  28. package/3rdparty/walkontable/src/selection/border/constants.mjs +13 -0
  29. package/3rdparty/walkontable/src/selection/constants.js +63 -0
  30. package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
  31. package/3rdparty/walkontable/src/selection/index.js +30 -0
  32. package/3rdparty/walkontable/src/selection/index.mjs +5 -0
  33. package/3rdparty/walkontable/src/selection/manager.js +328 -0
  34. package/3rdparty/walkontable/src/selection/manager.mjs +322 -0
  35. package/3rdparty/walkontable/src/selection/scanner.js +363 -0
  36. package/3rdparty/walkontable/src/selection/scanner.mjs +359 -0
  37. package/3rdparty/walkontable/src/selection/selection.js +133 -0
  38. package/3rdparty/walkontable/src/selection/selection.mjs +127 -0
  39. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
  40. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
  41. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
  42. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
  43. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
  44. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
  45. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
  46. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
  47. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
  48. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
  49. package/3rdparty/walkontable/src/table.js +7 -79
  50. package/3rdparty/walkontable/src/table.mjs +8 -80
  51. package/base.js +2 -2
  52. package/base.mjs +2 -2
  53. package/core.d.ts +5 -3
  54. package/core.js +123 -308
  55. package/core.mjs +123 -308
  56. package/dataMap/metaManager/metaSchema.js +15 -0
  57. package/dataMap/metaManager/metaSchema.mjs +15 -0
  58. package/dist/handsontable.css +8 -3
  59. package/dist/handsontable.full.css +8 -3
  60. package/dist/handsontable.full.js +12578 -10028
  61. package/dist/handsontable.full.min.css +3 -3
  62. package/dist/handsontable.full.min.js +120 -120
  63. package/dist/handsontable.js +18881 -16331
  64. package/dist/handsontable.min.css +3 -3
  65. package/dist/handsontable.min.js +4 -4
  66. package/editorManager.js +21 -82
  67. package/editorManager.mjs +26 -86
  68. package/editors/textEditor/textEditor.js +3 -11
  69. package/editors/textEditor/textEditor.mjs +4 -12
  70. package/helpers/mixed.js +1 -1
  71. package/helpers/mixed.mjs +1 -1
  72. package/helpers/number.d.ts +1 -0
  73. package/helpers/number.js +18 -0
  74. package/helpers/number.mjs +17 -0
  75. package/package.json +1 -1
  76. package/pluginHooks.d.ts +5 -1
  77. package/pluginHooks.js +89 -1
  78. package/pluginHooks.mjs +89 -1
  79. package/plugins/copyPaste/copyPaste.js +5 -1
  80. package/plugins/copyPaste/copyPaste.mjs +5 -1
  81. package/plugins/customBorders/customBorders.js +18 -52
  82. package/plugins/customBorders/customBorders.mjs +19 -53
  83. package/plugins/mergeCells/mergeCells.js +5 -18
  84. package/plugins/mergeCells/mergeCells.mjs +5 -18
  85. package/plugins/nestedHeaders/nestedHeaders.js +132 -10
  86. package/plugins/nestedHeaders/nestedHeaders.mjs +132 -10
  87. package/plugins/nestedHeaders/stateManager/index.js +37 -0
  88. package/plugins/nestedHeaders/stateManager/index.mjs +37 -0
  89. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  90. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  91. package/selection/highlight/highlight.js +311 -88
  92. package/selection/highlight/highlight.mjs +301 -84
  93. package/selection/highlight/types/activeHeader.js +10 -9
  94. package/selection/highlight/types/activeHeader.mjs +10 -8
  95. package/selection/highlight/types/area.js +12 -27
  96. package/selection/highlight/types/area.mjs +16 -30
  97. package/selection/highlight/types/areaLayered.js +54 -0
  98. package/selection/highlight/types/areaLayered.mjs +49 -0
  99. package/selection/highlight/types/column.js +50 -0
  100. package/selection/highlight/types/column.mjs +45 -0
  101. package/selection/highlight/types/customSelection.js +7 -10
  102. package/selection/highlight/types/customSelection.mjs +7 -9
  103. package/selection/highlight/types/fill.js +5 -8
  104. package/selection/highlight/types/fill.mjs +5 -7
  105. package/selection/highlight/types/{cell.js → focus.js} +5 -8
  106. package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
  107. package/selection/highlight/types/header.js +10 -20
  108. package/selection/highlight/types/header.mjs +10 -19
  109. package/selection/highlight/types/{index.js → row.js} +27 -31
  110. package/selection/highlight/types/{index.mjs → row.mjs} +24 -29
  111. package/selection/highlight/visualSelection.js +31 -27
  112. package/selection/highlight/visualSelection.mjs +31 -27
  113. package/selection/index.js +4 -7
  114. package/selection/index.mjs +2 -3
  115. package/selection/mouseEventHandler.js +1 -1
  116. package/selection/mouseEventHandler.mjs +1 -1
  117. package/selection/range.js +8 -8
  118. package/selection/range.mjs +8 -8
  119. package/selection/selection.js +315 -180
  120. package/selection/selection.mjs +310 -179
  121. package/selection/transformation.js +233 -96
  122. package/selection/transformation.mjs +230 -93
  123. package/selection/utils.js +12 -35
  124. package/selection/utils.mjs +13 -35
  125. package/settings.d.ts +1 -0
  126. package/shortcutContexts/commands/editor/closeAndSave.js +15 -0
  127. package/shortcutContexts/commands/editor/closeAndSave.mjs +10 -0
  128. package/shortcutContexts/commands/editor/closeWithoutSaving.js +13 -0
  129. package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +8 -0
  130. package/shortcutContexts/commands/editor/fastOpen.js +16 -0
  131. package/shortcutContexts/commands/editor/fastOpen.mjs +11 -0
  132. package/shortcutContexts/commands/editor/index.js +16 -0
  133. package/shortcutContexts/commands/editor/index.mjs +12 -0
  134. package/shortcutContexts/commands/editor/open.js +29 -0
  135. package/shortcutContexts/commands/editor/open.mjs +24 -0
  136. package/shortcutContexts/commands/emptySelectedCells.js +12 -0
  137. package/shortcutContexts/commands/emptySelectedCells.mjs +7 -0
  138. package/shortcutContexts/commands/extendCellsSelection/down.js +15 -0
  139. package/shortcutContexts/commands/extendCellsSelection/down.mjs +10 -0
  140. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +21 -0
  141. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +16 -0
  142. package/shortcutContexts/commands/extendCellsSelection/index.js +26 -0
  143. package/shortcutContexts/commands/extendCellsSelection/index.mjs +22 -0
  144. package/shortcutContexts/commands/extendCellsSelection/left.js +15 -0
  145. package/shortcutContexts/commands/extendCellsSelection/left.mjs +10 -0
  146. package/shortcutContexts/commands/extendCellsSelection/right.js +15 -0
  147. package/shortcutContexts/commands/extendCellsSelection/right.mjs +10 -0
  148. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +19 -0
  149. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +14 -0
  150. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +22 -0
  151. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +17 -0
  152. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +17 -0
  153. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +12 -0
  154. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +17 -0
  155. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +12 -0
  156. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +39 -0
  157. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +34 -0
  158. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +39 -0
  159. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +34 -0
  160. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +22 -0
  161. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +17 -0
  162. package/shortcutContexts/commands/extendCellsSelection/toRows.js +19 -0
  163. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +14 -0
  164. package/shortcutContexts/commands/extendCellsSelection/up.js +15 -0
  165. package/shortcutContexts/commands/extendCellsSelection/up.mjs +10 -0
  166. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +21 -0
  167. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +16 -0
  168. package/shortcutContexts/commands/index.js +51 -0
  169. package/shortcutContexts/commands/index.mjs +47 -0
  170. package/shortcutContexts/commands/moveCellSelection/down.js +12 -0
  171. package/shortcutContexts/commands/moveCellSelection/down.mjs +7 -0
  172. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +11 -0
  173. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +6 -0
  174. package/shortcutContexts/commands/moveCellSelection/index.js +28 -0
  175. package/shortcutContexts/commands/moveCellSelection/index.mjs +24 -0
  176. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +13 -0
  177. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +8 -0
  178. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +13 -0
  179. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +8 -0
  180. package/shortcutContexts/commands/moveCellSelection/left.js +11 -0
  181. package/shortcutContexts/commands/moveCellSelection/left.mjs +6 -0
  182. package/shortcutContexts/commands/moveCellSelection/right.js +11 -0
  183. package/shortcutContexts/commands/moveCellSelection/right.mjs +6 -0
  184. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +16 -0
  185. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +11 -0
  186. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +17 -0
  187. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +12 -0
  188. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +13 -0
  189. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +8 -0
  190. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +16 -0
  191. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +11 -0
  192. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +35 -0
  193. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +30 -0
  194. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +35 -0
  195. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +30 -0
  196. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +16 -0
  197. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +11 -0
  198. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +18 -0
  199. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +13 -0
  200. package/shortcutContexts/commands/moveCellSelection/up.js +12 -0
  201. package/shortcutContexts/commands/moveCellSelection/up.mjs +7 -0
  202. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +11 -0
  203. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +6 -0
  204. package/shortcutContexts/commands/populateSelectedCellsData.js +35 -0
  205. package/shortcutContexts/commands/populateSelectedCellsData.mjs +30 -0
  206. package/shortcutContexts/commands/selectAll.js +11 -0
  207. package/shortcutContexts/commands/selectAll.mjs +6 -0
  208. package/shortcutContexts/constants.js +19 -0
  209. package/shortcutContexts/constants.mjs +12 -0
  210. package/shortcutContexts/editor.js +29 -0
  211. package/shortcutContexts/editor.mjs +25 -0
  212. package/shortcutContexts/grid.js +244 -0
  213. package/shortcutContexts/grid.mjs +240 -0
  214. package/shortcutContexts/index.js +29 -0
  215. package/shortcutContexts/index.mjs +15 -0
  216. package/shortcuts/manager.js +2 -0
  217. package/shortcuts/manager.mjs +2 -0
  218. package/tableView.js +58 -9
  219. package/tableView.mjs +58 -9
  220. package/3rdparty/walkontable/src/selection.js +0 -354
  221. package/3rdparty/walkontable/src/selection.mjs +0 -348
  222. package/selection/highlight/constants.js +0 -16
  223. 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,15 +70,25 @@ 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 () {
59
76
  function Highlight(options) {
60
77
  _classCallCheck(this, Highlight);
78
+ /**
79
+ * Creates (if not exist in the cache) Walkontable Selection instance.
80
+ *
81
+ * @param {Map} cacheMap The map where the instance will be cached.
82
+ * @param {Function} highlightFactory The function factory.
83
+ * @returns {VisualSelection}
84
+ */
85
+ _classPrivateMethodInitSpec(this, _createHighlight);
61
86
  /**
62
87
  * Options consumed by Highlight class and Walkontable Selection classes.
63
88
  *
64
89
  * @type {object}
65
90
  */
66
- this.options = options;
91
+ _defineProperty(this, "options", void 0);
67
92
  /**
68
93
  * The property which describes which layer level of the visual selection will be modified.
69
94
  * This option is valid only for `area` and `header` highlight types which occurs multiple times on
@@ -74,49 +99,96 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
74
99
  * @type {number}
75
100
  * @default 0
76
101
  */
77
- this.layerLevel = 0;
102
+ _defineProperty(this, "layerLevel", 0);
78
103
  /**
79
104
  * `cell` highlight object which describes attributes for the currently selected cell.
80
105
  * It can only occur only once on the table.
81
106
  *
82
107
  * @type {Selection}
83
108
  */
84
- this.cell = createHighlight(CELL_TYPE, options);
109
+ _defineProperty(this, "focus", void 0);
85
110
  /**
86
111
  * `fill` highlight object which describes attributes for the borders for autofill functionality.
87
112
  * It can only occur only once on the table.
88
113
  *
89
114
  * @type {Selection}
90
115
  */
91
- this.fill = createHighlight(FILL_TYPE, options);
116
+ _defineProperty(this, "fill", void 0);
92
117
  /**
93
118
  * Collection of the `area` highlights. That objects describes attributes for the borders and selection of
94
119
  * the multiple selected cells. It can occur multiple times on the table.
95
120
  *
96
121
  * @type {Map.<number, Selection>}
97
122
  */
98
- this.areas = new Map();
123
+ _defineProperty(this, "layeredAreas", new Map());
124
+ /**
125
+ * Collection of the `highlight` highlights. That objects describes attributes for the borders and selection of
126
+ * the multiple selected cells. It can occur multiple times on the table.
127
+ *
128
+ * @type {Map.<number, Selection>}
129
+ */
130
+ _defineProperty(this, "areas", new Map());
131
+ /**
132
+ * Collection of the `header` highlights. That objects describes attributes for the selection of
133
+ * the multiple selected rows in the table header. It can occur multiple times on the table.
134
+ *
135
+ * @type {Map.<number, Selection>}
136
+ */
137
+ _defineProperty(this, "rowHeaders", new Map());
99
138
  /**
100
139
  * 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.
140
+ * the multiple selected columns in the table header. It can occur multiple times on the table.
102
141
  *
103
142
  * @type {Map.<number, Selection>}
104
143
  */
105
- this.headers = new Map();
144
+ _defineProperty(this, "columnHeaders", new Map());
106
145
  /**
107
146
  * 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
147
+ * the multiple selected rows in the table header. The table headers which have selected all items in
109
148
  * a row will be marked as `active-header`.
110
149
  *
111
150
  * @type {Map.<number, Selection>}
112
151
  */
113
- this.activeHeaders = new Map();
152
+ _defineProperty(this, "activeRowHeaders", new Map());
153
+ /**
154
+ * Collection of the `active-header` highlights. That objects describes attributes for the selection of
155
+ * the multiple selected columns in the table header. The table headers which have selected all items in
156
+ * a row will be marked as `active-header`.
157
+ *
158
+ * @type {Map.<number, Selection>}
159
+ */
160
+ _defineProperty(this, "activeColumnHeaders", new Map());
161
+ /**
162
+ * Collection of the `active-header` highlights. That objects describes attributes for the selection of
163
+ * the selected corner in the table header. The table headers which have selected all items in
164
+ * a row will be marked as `active-header`.
165
+ *
166
+ * @type {Map.<number, Selection>}
167
+ */
168
+ _defineProperty(this, "activeCornerHeaders", new Map());
169
+ /**
170
+ * Collection of the `rows` highlights. That objects describes attributes for the selection of
171
+ * the multiple selected cells in a row. It can occur multiple times on the table.
172
+ *
173
+ * @type {Map.<number, Selection>}
174
+ */
175
+ _defineProperty(this, "rowHighlights", new Map());
176
+ /**
177
+ * Collection of the `columns` highlights. That objects describes attributes for the selection of
178
+ * the multiple selected cells in a column. It can occur multiple times on the table.
179
+ *
180
+ * @type {Map.<number, Selection>}
181
+ */
182
+ _defineProperty(this, "columnHighlights", new Map());
114
183
  /**
115
184
  * Collection of the `custom-selection`, holder for example borders added through CustomBorders plugin.
116
185
  *
117
186
  * @type {Selection[]}
118
187
  */
119
- this.customSelections = [];
188
+ _defineProperty(this, "customSelections", []);
189
+ this.options = options;
190
+ this.focus = createFocusHighlight(options);
191
+ this.fill = createFillHighlight(options);
120
192
  }
121
193
 
122
194
  /**
@@ -132,11 +204,14 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
132
204
  var type = highlightType;
133
205
 
134
206
  // Legacy compatibility.
135
- if (highlightType === CELL_TYPE) {
207
+ if (highlightType === HIGHLIGHT_FOCUS_TYPE) {
136
208
  type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
137
209
  }
138
210
 
139
- var disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
211
+ var disableHighlight = false;
212
+ if (coords.isCell()) {
213
+ disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
214
+ }
140
215
  if (typeof disableHighlight === 'string') {
141
216
  disableHighlight = [disableHighlight];
142
217
  }
@@ -158,14 +233,15 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
158
233
  }
159
234
 
160
235
  /**
161
- * Get Walkontable Selection instance created for controlling highlight of the currently selected/edited cell.
236
+ * Get Walkontable Selection instance created for controlling highlight of the currently
237
+ * focused cell (or header).
162
238
  *
163
239
  * @returns {Selection}
164
240
  */
165
241
  }, {
166
- key: "getCell",
167
- value: function getCell() {
168
- return this.cell;
242
+ key: "getFocus",
243
+ value: function getFocus() {
244
+ return this.focus;
169
245
  }
170
246
 
171
247
  /**
@@ -180,25 +256,38 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
180
256
  }
181
257
 
182
258
  /**
183
- * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
184
- * of the multiple selected cells.
259
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
260
+ * `area` highlights.
185
261
  *
186
262
  * @returns {Selection}
187
263
  */
188
264
  }, {
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;
265
+ key: "createLayeredArea",
266
+ value: function createLayeredArea() {
267
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.layeredAreas, createAreaLayeredHighlight);
268
+ }
269
+
270
+ /**
271
+ * Get all Walkontable Selection instances which describes the state of the visual highlight of the cells.
272
+ *
273
+ * @returns {Selection[]}
274
+ */
275
+ }, {
276
+ key: "getLayeredAreas",
277
+ value: function getLayeredAreas() {
278
+ return _toConsumableArray(this.layeredAreas.values());
279
+ }
280
+
281
+ /**
282
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
283
+ * `highlight` highlights.
284
+ *
285
+ * @returns {Selection}
286
+ */
287
+ }, {
288
+ key: "createArea",
289
+ value: function createArea() {
290
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.areas, createAreaHighlight);
202
291
  }
203
292
 
204
293
  /**
@@ -213,23 +302,15 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
213
302
  }
214
303
 
215
304
  /**
216
- * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
217
- * of the multiple selected header cells.
305
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
306
+ * header highlight for rows.
218
307
  *
219
308
  * @returns {Selection}
220
309
  */
221
310
  }, {
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;
311
+ key: "createRowHeader",
312
+ value: function createRowHeader() {
313
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.rowHeaders, createHeaderHighlight);
233
314
  }
234
315
 
235
316
  /**
@@ -238,29 +319,67 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
238
319
  * @returns {Selection[]}
239
320
  */
240
321
  }, {
241
- key: "getHeaders",
242
- value: function getHeaders() {
243
- return _toConsumableArray(this.headers.values());
322
+ key: "getRowHeaders",
323
+ value: function getRowHeaders() {
324
+ return _toConsumableArray(this.rowHeaders.values());
244
325
  }
245
326
 
246
327
  /**
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.
328
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
329
+ * header highlight for columns.
249
330
  *
250
331
  * @returns {Selection}
251
332
  */
252
333
  }, {
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;
334
+ key: "createColumnHeader",
335
+ value: function createColumnHeader() {
336
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.columnHeaders, createHeaderHighlight);
337
+ }
338
+
339
+ /**
340
+ * Get all Walkontable Selection instances which describes the state of the visual highlight of the headers.
341
+ *
342
+ * @returns {Selection[]}
343
+ */
344
+ }, {
345
+ key: "getColumnHeaders",
346
+ value: function getColumnHeaders() {
347
+ return _toConsumableArray(this.columnHeaders.values());
348
+ }
349
+
350
+ /**
351
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
352
+ * highlight for active row headers.
353
+ *
354
+ * @returns {Selection}
355
+ */
356
+ }, {
357
+ key: "createActiveRowHeader",
358
+ value: function createActiveRowHeader() {
359
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.activeRowHeaders, createActiveHighlight);
360
+ }
361
+
362
+ /**
363
+ * Get all Walkontable Selection instances which describes the state of the visual highlight of the active headers.
364
+ *
365
+ * @returns {Selection[]}
366
+ */
367
+ }, {
368
+ key: "getActiveRowHeaders",
369
+ value: function getActiveRowHeaders() {
370
+ return _toConsumableArray(this.activeRowHeaders.values());
371
+ }
372
+
373
+ /**
374
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
375
+ * highlight for active column headers.
376
+ *
377
+ * @returns {Selection}
378
+ */
379
+ }, {
380
+ key: "createActiveColumnHeader",
381
+ value: function createActiveColumnHeader() {
382
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.activeColumnHeaders, createActiveHighlight);
264
383
  }
265
384
 
266
385
  /**
@@ -269,9 +388,78 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
269
388
  * @returns {Selection[]}
270
389
  */
271
390
  }, {
272
- key: "getActiveHeaders",
273
- value: function getActiveHeaders() {
274
- return _toConsumableArray(this.activeHeaders.values());
391
+ key: "getActiveColumnHeaders",
392
+ value: function getActiveColumnHeaders() {
393
+ return _toConsumableArray(this.activeColumnHeaders.values());
394
+ }
395
+
396
+ /**
397
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
398
+ * highlight for the headers corner.
399
+ *
400
+ * @returns {Selection}
401
+ */
402
+ }, {
403
+ key: "createActiveCornerHeader",
404
+ value: function createActiveCornerHeader() {
405
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.activeCornerHeaders, createActiveHighlight);
406
+ }
407
+
408
+ /**
409
+ * Get all Walkontable Selection instances which describes the state of the visual highlight of the headers corner.
410
+ *
411
+ * @returns {Selection[]}
412
+ */
413
+ }, {
414
+ key: "getActiveCornerHeaders",
415
+ value: function getActiveCornerHeaders() {
416
+ return _toConsumableArray(this.activeCornerHeaders.values());
417
+ }
418
+
419
+ /**
420
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
421
+ * highlight cells in a row.
422
+ *
423
+ * @returns {Selection}
424
+ */
425
+ }, {
426
+ key: "createRowHighlight",
427
+ value: function createRowHighlight() {
428
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.rowHighlights, _createRowHighlight);
429
+ }
430
+
431
+ /**
432
+ * Get all Walkontable Selection instances which describes the state of the rows highlighting.
433
+ *
434
+ * @returns {Selection[]}
435
+ */
436
+ }, {
437
+ key: "getRowHighlights",
438
+ value: function getRowHighlights() {
439
+ return _toConsumableArray(this.rowHighlights.values());
440
+ }
441
+
442
+ /**
443
+ * Creates (if not exist in the cache) Walkontable Selection instance created for controlling
444
+ * highlight cells in a column.
445
+ *
446
+ * @returns {Selection}
447
+ */
448
+ }, {
449
+ key: "createColumnHighlight",
450
+ value: function createColumnHighlight() {
451
+ return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.columnHighlights, _createColumnHighlight);
452
+ }
453
+
454
+ /**
455
+ * Get all Walkontable Selection instances which describes the state of the columns highlighting.
456
+ *
457
+ * @returns {Selection[]}
458
+ */
459
+ }, {
460
+ key: "getColumnHighlights",
461
+ value: function getColumnHighlights() {
462
+ return _toConsumableArray(this.columnHighlights.values());
275
463
  }
276
464
 
277
465
  /**
@@ -293,7 +481,7 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
293
481
  }, {
294
482
  key: "addCustomSelection",
295
483
  value: function addCustomSelection(selectionInstance) {
296
- this.customSelections.push(createHighlight(CUSTOM_SELECTION_TYPE, _objectSpread(_objectSpread({}, this.options), selectionInstance)));
484
+ this.customSelections.push(createCustomHighlight(_objectSpread(_objectSpread({}, this.options), selectionInstance)));
297
485
  }
298
486
 
299
487
  /**
@@ -302,30 +490,59 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
302
490
  }, {
303
491
  key: "clear",
304
492
  value: function clear() {
305
- this.cell.clear();
493
+ this.focus.clear();
306
494
  this.fill.clear();
307
495
  arrayEach(this.areas.values(), function (highlight) {
308
496
  return void highlight.clear();
309
497
  });
310
- arrayEach(this.headers.values(), function (highlight) {
498
+ arrayEach(this.layeredAreas.values(), function (highlight) {
499
+ return void highlight.clear();
500
+ });
501
+ arrayEach(this.rowHeaders.values(), function (highlight) {
502
+ return void highlight.clear();
503
+ });
504
+ arrayEach(this.columnHeaders.values(), function (highlight) {
505
+ return void highlight.clear();
506
+ });
507
+ arrayEach(this.activeRowHeaders.values(), function (highlight) {
508
+ return void highlight.clear();
509
+ });
510
+ arrayEach(this.activeColumnHeaders.values(), function (highlight) {
311
511
  return void highlight.clear();
312
512
  });
313
- arrayEach(this.activeHeaders.values(), function (highlight) {
513
+ arrayEach(this.activeCornerHeaders.values(), function (highlight) {
514
+ return void highlight.clear();
515
+ });
516
+ arrayEach(this.rowHighlights.values(), function (highlight) {
517
+ return void highlight.clear();
518
+ });
519
+ arrayEach(this.columnHighlights.values(), function (highlight) {
314
520
  return void highlight.clear();
315
521
  });
316
522
  }
317
-
523
+ }, {
524
+ key: _Symbol$iterator,
525
+ value:
318
526
  /**
319
527
  * This object can be iterate over using `for of` syntax or using internal `arrayEach` helper.
320
528
  *
321
529
  * @returns {Selection[]}
322
530
  */
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]();
531
+ function value() {
532
+ 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.activeCornerHeaders.values()), _toConsumableArray(this.rowHighlights.values()), _toConsumableArray(this.columnHighlights.values()), _toConsumableArray(this.customSelections))[Symbol.iterator]();
327
533
  }
328
534
  }]);
329
535
  return Highlight;
330
- }(Symbol.iterator);
536
+ }();
537
+ function _createHighlight2(cacheMap, highlightFactory) {
538
+ var layerLevel = this.layerLevel;
539
+ if (cacheMap.has(layerLevel)) {
540
+ return cacheMap.get(layerLevel);
541
+ }
542
+ var highlight = highlightFactory(_objectSpread({
543
+ layerLevel: layerLevel
544
+ }, this.options));
545
+ cacheMap.set(layerLevel, highlight);
546
+ return highlight;
547
+ }
331
548
  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
+ }