handsontable 0.0.0-next-93e34dc-20230601 → 0.0.0-next-b7cca45-20230605
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.
- package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
- package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
- package/3rdparty/walkontable/src/cell/coords.d.ts +1 -6
- package/3rdparty/walkontable/src/cell/coords.js +12 -61
- package/3rdparty/walkontable/src/cell/coords.mjs +12 -61
- package/3rdparty/walkontable/src/cell/range.d.ts +2 -9
- package/3rdparty/walkontable/src/cell/range.js +7 -44
- package/3rdparty/walkontable/src/cell/range.mjs +7 -44
- package/3rdparty/walkontable/src/core/_base.js +3 -9
- package/3rdparty/walkontable/src/core/_base.mjs +3 -9
- package/3rdparty/walkontable/src/core/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +2 -2
- package/3rdparty/walkontable/src/core/core.js +2 -3
- package/3rdparty/walkontable/src/core/core.mjs +2 -3
- package/3rdparty/walkontable/src/event.js +7 -7
- package/3rdparty/walkontable/src/event.mjs +7 -7
- package/3rdparty/walkontable/src/facade/core.js +2 -2
- package/3rdparty/walkontable/src/facade/core.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +2 -10
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +1 -1
- package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
- package/3rdparty/walkontable/src/overlay/top.js +4 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +4 -2
- package/3rdparty/walkontable/src/selection.js +354 -0
- package/3rdparty/walkontable/src/selection.mjs +348 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
- package/3rdparty/walkontable/src/table.js +79 -7
- package/3rdparty/walkontable/src/table.mjs +80 -8
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +3 -5
- package/core.js +300 -82
- package/core.mjs +300 -82
- package/dataMap/metaManager/metaSchema.js +0 -15
- package/dataMap/metaManager/metaSchema.mjs +0 -15
- package/dist/handsontable.css +3 -8
- package/dist/handsontable.full.css +3 -8
- package/dist/handsontable.full.js +9926 -12218
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +120 -120
- package/dist/handsontable.js +14628 -16920
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +4 -4
- package/editorManager.js +82 -20
- package/editorManager.mjs +86 -25
- package/editors/textEditor/textEditor.js +11 -3
- package/editors/textEditor/textEditor.mjs +12 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/number.d.ts +0 -1
- package/helpers/number.js +0 -18
- package/helpers/number.mjs +0 -17
- package/package.json +1 -1
- package/pluginHooks.js +1 -1
- package/pluginHooks.mjs +1 -1
- package/plugins/copyPaste/copyPaste.js +1 -5
- package/plugins/copyPaste/copyPaste.mjs +1 -5
- package/plugins/customBorders/customBorders.js +52 -18
- package/plugins/customBorders/customBorders.mjs +53 -19
- package/plugins/mergeCells/mergeCells.js +18 -5
- package/plugins/mergeCells/mergeCells.mjs +18 -5
- package/plugins/nestedHeaders/nestedHeaders.js +9 -89
- package/plugins/nestedHeaders/nestedHeaders.mjs +9 -89
- package/plugins/nestedHeaders/stateManager/index.js +0 -37
- package/plugins/nestedHeaders/stateManager/index.mjs +0 -37
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
- package/selection/highlight/constants.js +16 -0
- package/selection/highlight/constants.mjs +6 -0
- package/selection/highlight/highlight.js +88 -311
- package/selection/highlight/highlight.mjs +84 -301
- package/selection/highlight/types/activeHeader.js +9 -10
- package/selection/highlight/types/activeHeader.mjs +8 -10
- package/selection/highlight/types/area.js +27 -12
- package/selection/highlight/types/area.mjs +30 -16
- package/selection/highlight/types/{focus.js → cell.js} +8 -5
- package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
- package/selection/highlight/types/customSelection.js +10 -7
- package/selection/highlight/types/customSelection.mjs +9 -7
- package/selection/highlight/types/fill.js +8 -5
- package/selection/highlight/types/fill.mjs +7 -5
- package/selection/highlight/types/header.js +20 -10
- package/selection/highlight/types/header.mjs +19 -10
- package/selection/highlight/types/{row.js → index.js} +31 -27
- package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
- package/selection/highlight/visualSelection.js +28 -23
- package/selection/highlight/visualSelection.mjs +28 -23
- package/selection/index.js +7 -4
- package/selection/index.mjs +3 -2
- package/selection/mouseEventHandler.js +1 -1
- package/selection/mouseEventHandler.mjs +1 -1
- package/selection/range.js +8 -8
- package/selection/range.mjs +8 -8
- package/selection/selection.js +180 -296
- package/selection/selection.mjs +179 -291
- package/selection/transformation.js +96 -233
- package/selection/transformation.mjs +93 -230
- package/selection/utils.js +35 -12
- package/selection/utils.mjs +35 -13
- package/settings.d.ts +0 -1
- package/tableView.js +9 -58
- package/tableView.mjs +9 -58
- package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
- package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
- package/3rdparty/walkontable/src/selection/constants.js +0 -63
- package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
- package/3rdparty/walkontable/src/selection/index.js +0 -30
- package/3rdparty/walkontable/src/selection/index.mjs +0 -5
- package/3rdparty/walkontable/src/selection/manager.js +0 -328
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -322
- package/3rdparty/walkontable/src/selection/scanner.js +0 -363
- package/3rdparty/walkontable/src/selection/scanner.mjs +0 -359
- package/3rdparty/walkontable/src/selection/selection.js +0 -133
- package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
- package/selection/highlight/types/areaLayered.js +0 -54
- package/selection/highlight/types/areaLayered.mjs +0 -49
- package/selection/highlight/types/column.js +0 -50
- package/selection/highlight/types/column.mjs +0 -45
- package/shortcutContexts/commands/editor/closeAndSave.js +0 -15
- package/shortcutContexts/commands/editor/closeAndSave.mjs +0 -10
- package/shortcutContexts/commands/editor/closeWithoutSaving.js +0 -13
- package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +0 -8
- package/shortcutContexts/commands/editor/fastOpen.js +0 -16
- package/shortcutContexts/commands/editor/fastOpen.mjs +0 -11
- package/shortcutContexts/commands/editor/index.js +0 -16
- package/shortcutContexts/commands/editor/index.mjs +0 -12
- package/shortcutContexts/commands/editor/open.js +0 -29
- package/shortcutContexts/commands/editor/open.mjs +0 -24
- package/shortcutContexts/commands/emptySelectedCells.js +0 -12
- package/shortcutContexts/commands/emptySelectedCells.mjs +0 -7
- package/shortcutContexts/commands/extendCellsSelection/down.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +0 -21
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +0 -16
- package/shortcutContexts/commands/extendCellsSelection/index.js +0 -24
- package/shortcutContexts/commands/extendCellsSelection/index.mjs +0 -20
- package/shortcutContexts/commands/extendCellsSelection/left.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/right.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +0 -22
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +0 -12
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +0 -12
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +0 -39
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +0 -34
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +0 -39
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +0 -34
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +0 -22
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +0 -17
- package/shortcutContexts/commands/extendCellsSelection/up.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +0 -21
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +0 -16
- package/shortcutContexts/commands/index.js +0 -51
- package/shortcutContexts/commands/index.mjs +0 -47
- package/shortcutContexts/commands/moveCellSelection/down.js +0 -12
- package/shortcutContexts/commands/moveCellSelection/down.mjs +0 -7
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/index.js +0 -28
- package/shortcutContexts/commands/moveCellSelection/index.mjs +0 -24
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/left.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/left.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/right.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/right.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +0 -17
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +0 -12
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +0 -35
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +0 -30
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +0 -35
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +0 -30
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +0 -18
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +0 -13
- package/shortcutContexts/commands/moveCellSelection/up.js +0 -12
- package/shortcutContexts/commands/moveCellSelection/up.mjs +0 -7
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +0 -6
- package/shortcutContexts/commands/populateSelectedCellsData.js +0 -35
- package/shortcutContexts/commands/populateSelectedCellsData.mjs +0 -30
- package/shortcutContexts/commands/selectAll.js +0 -11
- package/shortcutContexts/commands/selectAll.mjs +0 -6
- package/shortcutContexts/constants.js +0 -19
- package/shortcutContexts/constants.mjs +0 -12
- package/shortcutContexts/editor.js +0 -29
- package/shortcutContexts/editor.mjs +0 -25
- package/shortcutContexts/grid.js +0 -232
- package/shortcutContexts/grid.mjs +0 -228
- package/shortcutContexts/index.js +0 -29
- package/shortcutContexts/index.mjs +0 -15
@@ -1,60 +1,45 @@
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
|
-
var _Symbol$iterator;
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
5
2
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
6
3
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
7
4
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
8
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
9
6
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
10
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
+
import "core-js/modules/es.array.fill.js";
|
11
12
|
import "core-js/modules/es.array.iterator.js";
|
12
13
|
import "core-js/modules/es.map.js";
|
13
14
|
import "core-js/modules/es.object.to-string.js";
|
14
15
|
import "core-js/modules/es.string.iterator.js";
|
15
16
|
import "core-js/modules/web.dom-collections.iterator.js";
|
16
|
-
import "core-js/modules/es.array.fill.js";
|
17
17
|
import "core-js/modules/es.array.includes.js";
|
18
18
|
import "core-js/modules/es.string.includes.js";
|
19
19
|
import "core-js/modules/es.array.concat.js";
|
20
20
|
import "core-js/modules/es.symbol.iterator.js";
|
21
21
|
import "core-js/modules/es.symbol.js";
|
22
22
|
import "core-js/modules/es.symbol.description.js";
|
23
|
-
import "core-js/modules/es.weak-set.js";
|
24
23
|
import "core-js/modules/es.symbol.to-primitive.js";
|
25
24
|
import "core-js/modules/es.date.to-primitive.js";
|
26
25
|
import "core-js/modules/es.number.constructor.js";
|
27
|
-
import "core-js/modules/es.array.from.js";
|
28
|
-
import "core-js/modules/es.array.slice.js";
|
29
|
-
import "core-js/modules/es.function.name.js";
|
30
|
-
import "core-js/modules/es.regexp.exec.js";
|
31
26
|
import "core-js/modules/es.object.keys.js";
|
32
27
|
import "core-js/modules/es.array.filter.js";
|
33
28
|
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
34
29
|
import "core-js/modules/web.dom-collections.for-each.js";
|
35
30
|
import "core-js/modules/es.object.get-own-property-descriptors.js";
|
31
|
+
import "core-js/modules/es.array.from.js";
|
32
|
+
import "core-js/modules/es.array.slice.js";
|
33
|
+
import "core-js/modules/es.function.name.js";
|
34
|
+
import "core-js/modules/es.regexp.exec.js";
|
36
35
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
37
36
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
38
37
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
39
|
-
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
40
|
-
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
41
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
42
38
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
43
39
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
44
|
-
|
45
|
-
import {
|
46
|
-
import { createHighlight as createAreaLayeredHighlight } from "./types/areaLayered.mjs";
|
47
|
-
import { createHighlight as createAreaHighlight } from "./types/area.mjs";
|
48
|
-
import { createHighlight as _createColumnHighlight } from "./types/column.mjs";
|
49
|
-
import { createHighlight as createFocusHighlight } from "./types/focus.mjs";
|
50
|
-
import { createHighlight as createCustomHighlight } from "./types/customSelection.mjs";
|
51
|
-
import { createHighlight as createFillHighlight } from "./types/fill.mjs";
|
52
|
-
import { createHighlight as createHeaderHighlight } from "./types/header.mjs";
|
53
|
-
import { createHighlight as _createRowHighlight } from "./types/row.mjs";
|
54
|
-
import { HIGHLIGHT_ACTIVE_HEADER_TYPE, HIGHLIGHT_AREA_TYPE, HIGHLIGHT_FOCUS_TYPE, HIGHLIGHT_CUSTOM_SELECTION_TYPE, HIGHLIGHT_FILL_TYPE, HIGHLIGHT_HEADER_TYPE, HIGHLIGHT_ROW_TYPE, HIGHLIGHT_COLUMN_TYPE } from "../../3rdparty/walkontable/src/index.mjs";
|
40
|
+
import { createHighlight } from "./types/index.mjs";
|
41
|
+
import { ACTIVE_HEADER_TYPE, AREA_TYPE, CELL_TYPE, CUSTOM_SELECTION_TYPE, FILL_TYPE, HEADER_TYPE } from "./constants.mjs";
|
55
42
|
import { arrayEach } from "./../../helpers/array.mjs";
|
56
|
-
export { HIGHLIGHT_ACTIVE_HEADER_TYPE as ACTIVE_HEADER_TYPE, HIGHLIGHT_AREA_TYPE as AREA_TYPE, HIGHLIGHT_FOCUS_TYPE as FOCUS_TYPE, HIGHLIGHT_CUSTOM_SELECTION_TYPE as CUSTOM_SELECTION_TYPE, HIGHLIGHT_FILL_TYPE as FILL_TYPE, HIGHLIGHT_HEADER_TYPE as HEADER_TYPE, HIGHLIGHT_ROW_TYPE as ROW_TYPE, HIGHLIGHT_COLUMN_TYPE as COLUMN_TYPE };
|
57
|
-
|
58
43
|
/**
|
59
44
|
* Highlight class responsible for managing Walkontable Selection classes.
|
60
45
|
*
|
@@ -70,25 +55,15 @@ export { HIGHLIGHT_ACTIVE_HEADER_TYPE as ACTIVE_HEADER_TYPE, HIGHLIGHT_AREA_TYPE
|
|
70
55
|
* @class Highlight
|
71
56
|
* @util
|
72
57
|
*/
|
73
|
-
var
|
74
|
-
_Symbol$iterator = Symbol.iterator;
|
75
|
-
var Highlight = /*#__PURE__*/function () {
|
58
|
+
var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
76
59
|
function Highlight(options) {
|
77
60
|
_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);
|
86
61
|
/**
|
87
62
|
* Options consumed by Highlight class and Walkontable Selection classes.
|
88
63
|
*
|
89
64
|
* @type {object}
|
90
65
|
*/
|
91
|
-
|
66
|
+
this.options = options;
|
92
67
|
/**
|
93
68
|
* The property which describes which layer level of the visual selection will be modified.
|
94
69
|
* This option is valid only for `area` and `header` highlight types which occurs multiple times on
|
@@ -99,96 +74,49 @@ var Highlight = /*#__PURE__*/function () {
|
|
99
74
|
* @type {number}
|
100
75
|
* @default 0
|
101
76
|
*/
|
102
|
-
|
77
|
+
this.layerLevel = 0;
|
103
78
|
/**
|
104
79
|
* `cell` highlight object which describes attributes for the currently selected cell.
|
105
80
|
* It can only occur only once on the table.
|
106
81
|
*
|
107
82
|
* @type {Selection}
|
108
83
|
*/
|
109
|
-
|
84
|
+
this.cell = createHighlight(CELL_TYPE, options);
|
110
85
|
/**
|
111
86
|
* `fill` highlight object which describes attributes for the borders for autofill functionality.
|
112
87
|
* It can only occur only once on the table.
|
113
88
|
*
|
114
89
|
* @type {Selection}
|
115
90
|
*/
|
116
|
-
|
91
|
+
this.fill = createHighlight(FILL_TYPE, options);
|
117
92
|
/**
|
118
93
|
* Collection of the `area` highlights. That objects describes attributes for the borders and selection of
|
119
94
|
* the multiple selected cells. It can occur multiple times on the table.
|
120
95
|
*
|
121
96
|
* @type {Map.<number, Selection>}
|
122
97
|
*/
|
123
|
-
|
124
|
-
/**
|
125
|
-
* Collection of the `highlight` highlights. That objects describes attributes for the borders and selection of
|
126
|
-
* the multiple selected cells. It can occur multiple times on the table.
|
127
|
-
*
|
128
|
-
* @type {Map.<number, Selection>}
|
129
|
-
*/
|
130
|
-
_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());
|
98
|
+
this.areas = new Map();
|
138
99
|
/**
|
139
100
|
* Collection of the `header` highlights. That objects describes attributes for the selection of
|
140
|
-
* the multiple selected columns in the table header. It can occur multiple times on the table.
|
101
|
+
* the multiple selected rows and columns in the table header. It can occur multiple times on the table.
|
141
102
|
*
|
142
103
|
* @type {Map.<number, Selection>}
|
143
104
|
*/
|
144
|
-
|
105
|
+
this.headers = new Map();
|
145
106
|
/**
|
146
107
|
* Collection of the `active-header` highlights. That objects describes attributes for the selection of
|
147
|
-
* the multiple selected rows in the table header. The table headers which have selected all items in
|
108
|
+
* the multiple selected rows and columns in the table header. The table headers which have selected all items in
|
148
109
|
* a row will be marked as `active-header`.
|
149
110
|
*
|
150
111
|
* @type {Map.<number, Selection>}
|
151
112
|
*/
|
152
|
-
|
153
|
-
/**
|
154
|
-
* Collection of the `active-header` highlights. That objects describes attributes for the selection of
|
155
|
-
* the multiple selected columns in the table header. The table headers which have selected all items in
|
156
|
-
* a row will be marked as `active-header`.
|
157
|
-
*
|
158
|
-
* @type {Map.<number, Selection>}
|
159
|
-
*/
|
160
|
-
_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());
|
113
|
+
this.activeHeaders = new Map();
|
183
114
|
/**
|
184
115
|
* Collection of the `custom-selection`, holder for example borders added through CustomBorders plugin.
|
185
116
|
*
|
186
117
|
* @type {Selection[]}
|
187
118
|
*/
|
188
|
-
|
189
|
-
this.options = options;
|
190
|
-
this.focus = createFocusHighlight(options);
|
191
|
-
this.fill = createFillHighlight(options);
|
119
|
+
this.customSelections = [];
|
192
120
|
}
|
193
121
|
|
194
122
|
/**
|
@@ -204,14 +132,11 @@ var Highlight = /*#__PURE__*/function () {
|
|
204
132
|
var type = highlightType;
|
205
133
|
|
206
134
|
// Legacy compatibility.
|
207
|
-
if (highlightType ===
|
135
|
+
if (highlightType === CELL_TYPE) {
|
208
136
|
type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
|
209
137
|
}
|
210
138
|
|
211
|
-
var disableHighlight =
|
212
|
-
if (coords.isCell()) {
|
213
|
-
disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
|
214
|
-
}
|
139
|
+
var disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
|
215
140
|
if (typeof disableHighlight === 'string') {
|
216
141
|
disableHighlight = [disableHighlight];
|
217
142
|
}
|
@@ -233,15 +158,14 @@ var Highlight = /*#__PURE__*/function () {
|
|
233
158
|
}
|
234
159
|
|
235
160
|
/**
|
236
|
-
* Get Walkontable Selection instance created for controlling highlight of the currently
|
237
|
-
* focused cell (or header).
|
161
|
+
* Get Walkontable Selection instance created for controlling highlight of the currently selected/edited cell.
|
238
162
|
*
|
239
163
|
* @returns {Selection}
|
240
164
|
*/
|
241
165
|
}, {
|
242
|
-
key: "
|
243
|
-
value: function
|
244
|
-
return this.
|
166
|
+
key: "getCell",
|
167
|
+
value: function getCell() {
|
168
|
+
return this.cell;
|
245
169
|
}
|
246
170
|
|
247
171
|
/**
|
@@ -256,38 +180,25 @@ var Highlight = /*#__PURE__*/function () {
|
|
256
180
|
}
|
257
181
|
|
258
182
|
/**
|
259
|
-
*
|
260
|
-
*
|
261
|
-
*
|
262
|
-
* @returns {Selection}
|
263
|
-
*/
|
264
|
-
}, {
|
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.
|
183
|
+
* Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
|
184
|
+
* of the multiple selected cells.
|
284
185
|
*
|
285
186
|
* @returns {Selection}
|
286
187
|
*/
|
287
188
|
}, {
|
288
|
-
key: "
|
289
|
-
value: function
|
290
|
-
|
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;
|
291
202
|
}
|
292
203
|
|
293
204
|
/**
|
@@ -302,38 +213,23 @@ var Highlight = /*#__PURE__*/function () {
|
|
302
213
|
}
|
303
214
|
|
304
215
|
/**
|
305
|
-
*
|
306
|
-
*
|
216
|
+
* Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
|
217
|
+
* of the multiple selected header cells.
|
307
218
|
*
|
308
219
|
* @returns {Selection}
|
309
220
|
*/
|
310
221
|
}, {
|
311
|
-
key: "
|
312
|
-
value: function
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
key: "getRowHeaders",
|
323
|
-
value: function getRowHeaders() {
|
324
|
-
return _toConsumableArray(this.rowHeaders.values());
|
325
|
-
}
|
326
|
-
|
327
|
-
/**
|
328
|
-
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
329
|
-
* header highlight for columns.
|
330
|
-
*
|
331
|
-
* @returns {Selection}
|
332
|
-
*/
|
333
|
-
}, {
|
334
|
-
key: "createColumnHeader",
|
335
|
-
value: function createColumnHeader() {
|
336
|
-
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.columnHeaders, createHeaderHighlight);
|
222
|
+
key: "createOrGetHeader",
|
223
|
+
value: function createOrGetHeader() {
|
224
|
+
var layerLevel = this.layerLevel;
|
225
|
+
var header;
|
226
|
+
if (this.headers.has(layerLevel)) {
|
227
|
+
header = this.headers.get(layerLevel);
|
228
|
+
} else {
|
229
|
+
header = createHighlight(HEADER_TYPE, _objectSpread({}, this.options));
|
230
|
+
this.headers.set(layerLevel, header);
|
231
|
+
}
|
232
|
+
return header;
|
337
233
|
}
|
338
234
|
|
339
235
|
/**
|
@@ -342,44 +238,29 @@ var Highlight = /*#__PURE__*/function () {
|
|
342
238
|
* @returns {Selection[]}
|
343
239
|
*/
|
344
240
|
}, {
|
345
|
-
key: "
|
346
|
-
value: function
|
347
|
-
return _toConsumableArray(this.
|
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());
|
241
|
+
key: "getHeaders",
|
242
|
+
value: function getHeaders() {
|
243
|
+
return _toConsumableArray(this.headers.values());
|
371
244
|
}
|
372
245
|
|
373
246
|
/**
|
374
|
-
*
|
375
|
-
*
|
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.
|
376
249
|
*
|
377
250
|
* @returns {Selection}
|
378
251
|
*/
|
379
252
|
}, {
|
380
|
-
key: "
|
381
|
-
value: function
|
382
|
-
|
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;
|
383
264
|
}
|
384
265
|
|
385
266
|
/**
|
@@ -388,78 +269,9 @@ var Highlight = /*#__PURE__*/function () {
|
|
388
269
|
* @returns {Selection[]}
|
389
270
|
*/
|
390
271
|
}, {
|
391
|
-
key: "
|
392
|
-
value: function
|
393
|
-
return _toConsumableArray(this.
|
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());
|
272
|
+
key: "getActiveHeaders",
|
273
|
+
value: function getActiveHeaders() {
|
274
|
+
return _toConsumableArray(this.activeHeaders.values());
|
463
275
|
}
|
464
276
|
|
465
277
|
/**
|
@@ -481,7 +293,7 @@ var Highlight = /*#__PURE__*/function () {
|
|
481
293
|
}, {
|
482
294
|
key: "addCustomSelection",
|
483
295
|
value: function addCustomSelection(selectionInstance) {
|
484
|
-
this.customSelections.push(
|
296
|
+
this.customSelections.push(createHighlight(CUSTOM_SELECTION_TYPE, _objectSpread(_objectSpread({}, this.options), selectionInstance)));
|
485
297
|
}
|
486
298
|
|
487
299
|
/**
|
@@ -490,59 +302,30 @@ var Highlight = /*#__PURE__*/function () {
|
|
490
302
|
}, {
|
491
303
|
key: "clear",
|
492
304
|
value: function clear() {
|
493
|
-
this.
|
305
|
+
this.cell.clear();
|
494
306
|
this.fill.clear();
|
495
307
|
arrayEach(this.areas.values(), function (highlight) {
|
496
308
|
return void highlight.clear();
|
497
309
|
});
|
498
|
-
arrayEach(this.
|
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) {
|
310
|
+
arrayEach(this.headers.values(), function (highlight) {
|
511
311
|
return void highlight.clear();
|
512
312
|
});
|
513
|
-
arrayEach(this.
|
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) {
|
313
|
+
arrayEach(this.activeHeaders.values(), function (highlight) {
|
520
314
|
return void highlight.clear();
|
521
315
|
});
|
522
316
|
}
|
523
|
-
|
524
|
-
key: _Symbol$iterator,
|
525
|
-
value:
|
317
|
+
|
526
318
|
/**
|
527
319
|
* This object can be iterate over using `for of` syntax or using internal `arrayEach` helper.
|
528
320
|
*
|
529
321
|
* @returns {Selection[]}
|
530
322
|
*/
|
531
|
-
|
532
|
-
|
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]();
|
533
327
|
}
|
534
328
|
}]);
|
535
329
|
return Highlight;
|
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
|
-
}
|
330
|
+
}(Symbol.iterator);
|
548
331
|
export default Highlight;
|
@@ -18,8 +18,8 @@ require("core-js/modules/es.array.iterator.js");
|
|
18
18
|
require("core-js/modules/es.string.iterator.js");
|
19
19
|
require("core-js/modules/web.dom-collections.iterator.js");
|
20
20
|
exports.__esModule = true;
|
21
|
-
exports.
|
22
|
-
var
|
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
|
-
|
46
|
-
|
41
|
+
var s = new _visualSelection.default(_objectSpread(_objectSpread({
|
42
|
+
highlightHeaderClassName: activeHeaderClassName
|
47
43
|
}, restOptions), {}, {
|
48
|
-
selectionType:
|
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 {
|
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
|
-
|
33
|
+
function createHighlight(_ref) {
|
38
34
|
var activeHeaderClassName = _ref.activeHeaderClassName,
|
39
35
|
restOptions = _objectWithoutProperties(_ref, _excluded);
|
40
|
-
|
41
|
-
|
36
|
+
var s = new VisualSelection(_objectSpread(_objectSpread({
|
37
|
+
highlightHeaderClassName: activeHeaderClassName
|
42
38
|
}, restOptions), {}, {
|
43
|
-
selectionType:
|
39
|
+
selectionType: ACTIVE_HEADER_TYPE
|
44
40
|
}));
|
45
|
-
|
41
|
+
return s;
|
42
|
+
}
|
43
|
+
export default createHighlight;
|