handsontable 0.0.0-next-6d7bdba-20230620 → 0.0.0-next-06a64be-20230621

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