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