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,70 +1,49 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
require("core-js/modules/es.symbol.to-primitive.js");
|
4
|
-
require("core-js/modules/es.date.to-primitive.js");
|
5
|
-
require("core-js/modules/es.number.constructor.js");
|
6
|
-
require("core-js/modules/es.array.from.js");
|
7
|
-
require("core-js/modules/es.array.slice.js");
|
8
|
-
require("core-js/modules/es.function.name.js");
|
9
|
-
require("core-js/modules/es.regexp.exec.js");
|
10
3
|
require("core-js/modules/es.object.keys.js");
|
11
4
|
require("core-js/modules/es.array.filter.js");
|
12
5
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
13
6
|
require("core-js/modules/web.dom-collections.for-each.js");
|
14
7
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
15
|
-
|
8
|
+
require("core-js/modules/es.array.from.js");
|
9
|
+
require("core-js/modules/es.array.slice.js");
|
10
|
+
require("core-js/modules/es.function.name.js");
|
11
|
+
require("core-js/modules/es.regexp.exec.js");
|
16
12
|
exports.__esModule = true;
|
17
13
|
exports.default = void 0;
|
14
|
+
require("core-js/modules/es.array.fill.js");
|
18
15
|
require("core-js/modules/es.array.iterator.js");
|
19
16
|
require("core-js/modules/es.map.js");
|
20
17
|
require("core-js/modules/es.object.to-string.js");
|
21
18
|
require("core-js/modules/es.string.iterator.js");
|
22
19
|
require("core-js/modules/web.dom-collections.iterator.js");
|
23
|
-
require("core-js/modules/es.array.fill.js");
|
24
20
|
require("core-js/modules/es.array.includes.js");
|
25
21
|
require("core-js/modules/es.string.includes.js");
|
26
22
|
require("core-js/modules/es.array.concat.js");
|
27
23
|
require("core-js/modules/es.symbol.iterator.js");
|
28
24
|
require("core-js/modules/es.symbol.js");
|
29
25
|
require("core-js/modules/es.symbol.description.js");
|
30
|
-
require("core-js/modules/es.
|
31
|
-
|
32
|
-
|
33
|
-
var
|
34
|
-
var
|
35
|
-
var _focus = require("./types/focus");
|
36
|
-
var _customSelection = require("./types/customSelection");
|
37
|
-
var _fill = require("./types/fill");
|
38
|
-
var _header = require("./types/header");
|
39
|
-
var _row = require("./types/row");
|
40
|
-
var _src = require("../../3rdparty/walkontable/src");
|
41
|
-
exports.ACTIVE_HEADER_TYPE = _src.HIGHLIGHT_ACTIVE_HEADER_TYPE;
|
42
|
-
exports.AREA_TYPE = _src.HIGHLIGHT_AREA_TYPE;
|
43
|
-
exports.FOCUS_TYPE = _src.HIGHLIGHT_FOCUS_TYPE;
|
44
|
-
exports.CUSTOM_SELECTION_TYPE = _src.HIGHLIGHT_CUSTOM_SELECTION_TYPE;
|
45
|
-
exports.FILL_TYPE = _src.HIGHLIGHT_FILL_TYPE;
|
46
|
-
exports.HEADER_TYPE = _src.HIGHLIGHT_HEADER_TYPE;
|
47
|
-
exports.ROW_TYPE = _src.HIGHLIGHT_ROW_TYPE;
|
48
|
-
exports.COLUMN_TYPE = _src.HIGHLIGHT_COLUMN_TYPE;
|
26
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
27
|
+
require("core-js/modules/es.date.to-primitive.js");
|
28
|
+
require("core-js/modules/es.number.constructor.js");
|
29
|
+
var _types = require("./types");
|
30
|
+
var _constants = require("./constants");
|
49
31
|
var _array = require("./../../helpers/array");
|
50
|
-
|
51
|
-
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; }
|
52
|
-
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; }
|
32
|
+
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); }
|
53
33
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
54
34
|
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."); }
|
55
35
|
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); }
|
56
36
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
57
37
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
58
38
|
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; }
|
39
|
+
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; }
|
40
|
+
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; }
|
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; }
|
59
42
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
60
43
|
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); } }
|
61
44
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
62
|
-
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
63
|
-
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
64
|
-
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; }
|
65
45
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
66
46
|
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); }
|
67
|
-
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
68
47
|
/**
|
69
48
|
* Highlight class responsible for managing Walkontable Selection classes.
|
70
49
|
*
|
@@ -80,25 +59,15 @@ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(
|
|
80
59
|
* @class Highlight
|
81
60
|
* @util
|
82
61
|
*/
|
83
|
-
var
|
84
|
-
_Symbol$iterator = Symbol.iterator;
|
85
|
-
var Highlight = /*#__PURE__*/function () {
|
62
|
+
var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
86
63
|
function Highlight(options) {
|
87
64
|
_classCallCheck(this, Highlight);
|
88
|
-
/**
|
89
|
-
* Creates (if not exist in the cache) Walkontable Selection instance.
|
90
|
-
*
|
91
|
-
* @param {Map} cacheMap The map where the instance will be cached.
|
92
|
-
* @param {Function} highlightFactory The function factory.
|
93
|
-
* @returns {VisualSelection}
|
94
|
-
*/
|
95
|
-
_classPrivateMethodInitSpec(this, _createHighlight);
|
96
65
|
/**
|
97
66
|
* Options consumed by Highlight class and Walkontable Selection classes.
|
98
67
|
*
|
99
68
|
* @type {object}
|
100
69
|
*/
|
101
|
-
|
70
|
+
this.options = options;
|
102
71
|
/**
|
103
72
|
* The property which describes which layer level of the visual selection will be modified.
|
104
73
|
* This option is valid only for `area` and `header` highlight types which occurs multiple times on
|
@@ -109,96 +78,49 @@ var Highlight = /*#__PURE__*/function () {
|
|
109
78
|
* @type {number}
|
110
79
|
* @default 0
|
111
80
|
*/
|
112
|
-
|
81
|
+
this.layerLevel = 0;
|
113
82
|
/**
|
114
83
|
* `cell` highlight object which describes attributes for the currently selected cell.
|
115
84
|
* It can only occur only once on the table.
|
116
85
|
*
|
117
86
|
* @type {Selection}
|
118
87
|
*/
|
119
|
-
|
88
|
+
this.cell = (0, _types.createHighlight)(_constants.CELL_TYPE, options);
|
120
89
|
/**
|
121
90
|
* `fill` highlight object which describes attributes for the borders for autofill functionality.
|
122
91
|
* It can only occur only once on the table.
|
123
92
|
*
|
124
93
|
* @type {Selection}
|
125
94
|
*/
|
126
|
-
|
95
|
+
this.fill = (0, _types.createHighlight)(_constants.FILL_TYPE, options);
|
127
96
|
/**
|
128
97
|
* Collection of the `area` highlights. That objects describes attributes for the borders and selection of
|
129
98
|
* the multiple selected cells. It can occur multiple times on the table.
|
130
99
|
*
|
131
100
|
* @type {Map.<number, Selection>}
|
132
101
|
*/
|
133
|
-
|
134
|
-
/**
|
135
|
-
* Collection of the `highlight` highlights. That objects describes attributes for the borders and selection of
|
136
|
-
* the multiple selected cells. It can occur multiple times on the table.
|
137
|
-
*
|
138
|
-
* @type {Map.<number, Selection>}
|
139
|
-
*/
|
140
|
-
_defineProperty(this, "areas", new Map());
|
141
|
-
/**
|
142
|
-
* Collection of the `header` highlights. That objects describes attributes for the selection of
|
143
|
-
* the multiple selected rows in the table header. It can occur multiple times on the table.
|
144
|
-
*
|
145
|
-
* @type {Map.<number, Selection>}
|
146
|
-
*/
|
147
|
-
_defineProperty(this, "rowHeaders", new Map());
|
102
|
+
this.areas = new Map();
|
148
103
|
/**
|
149
104
|
* Collection of the `header` highlights. That objects describes attributes for the selection of
|
150
|
-
* the multiple selected columns in the table header. It can occur multiple times on the table.
|
151
|
-
*
|
152
|
-
* @type {Map.<number, Selection>}
|
153
|
-
*/
|
154
|
-
_defineProperty(this, "columnHeaders", new Map());
|
155
|
-
/**
|
156
|
-
* Collection of the `active-header` highlights. That objects describes attributes for the selection of
|
157
|
-
* the multiple selected rows in the table header. The table headers which have selected all items in
|
158
|
-
* a row will be marked as `active-header`.
|
105
|
+
* the multiple selected rows and columns in the table header. It can occur multiple times on the table.
|
159
106
|
*
|
160
107
|
* @type {Map.<number, Selection>}
|
161
108
|
*/
|
162
|
-
|
109
|
+
this.headers = new Map();
|
163
110
|
/**
|
164
111
|
* Collection of the `active-header` highlights. That objects describes attributes for the selection of
|
165
|
-
* the multiple selected columns in the table header. The table headers which have selected all items in
|
112
|
+
* the multiple selected rows and columns in the table header. The table headers which have selected all items in
|
166
113
|
* a row will be marked as `active-header`.
|
167
114
|
*
|
168
115
|
* @type {Map.<number, Selection>}
|
169
116
|
*/
|
170
|
-
|
171
|
-
/**
|
172
|
-
* Collection of the `active-header` highlights. That objects describes attributes for the selection of
|
173
|
-
* the selected corner in the table header. The table headers which have selected all items in
|
174
|
-
* a row will be marked as `active-header`.
|
175
|
-
*
|
176
|
-
* @type {Map.<number, Selection>}
|
177
|
-
*/
|
178
|
-
_defineProperty(this, "activeCornerHeaders", new Map());
|
179
|
-
/**
|
180
|
-
* Collection of the `rows` highlights. That objects describes attributes for the selection of
|
181
|
-
* the multiple selected cells in a row. It can occur multiple times on the table.
|
182
|
-
*
|
183
|
-
* @type {Map.<number, Selection>}
|
184
|
-
*/
|
185
|
-
_defineProperty(this, "rowHighlights", new Map());
|
186
|
-
/**
|
187
|
-
* Collection of the `columns` highlights. That objects describes attributes for the selection of
|
188
|
-
* the multiple selected cells in a column. It can occur multiple times on the table.
|
189
|
-
*
|
190
|
-
* @type {Map.<number, Selection>}
|
191
|
-
*/
|
192
|
-
_defineProperty(this, "columnHighlights", new Map());
|
117
|
+
this.activeHeaders = new Map();
|
193
118
|
/**
|
194
119
|
* Collection of the `custom-selection`, holder for example borders added through CustomBorders plugin.
|
195
120
|
*
|
196
121
|
* @type {Selection[]}
|
197
122
|
*/
|
198
|
-
|
199
|
-
this.options = options;
|
200
|
-
this.focus = (0, _focus.createHighlight)(options);
|
201
|
-
this.fill = (0, _fill.createHighlight)(options);
|
123
|
+
this.customSelections = [];
|
202
124
|
}
|
203
125
|
|
204
126
|
/**
|
@@ -214,14 +136,11 @@ var Highlight = /*#__PURE__*/function () {
|
|
214
136
|
var type = highlightType;
|
215
137
|
|
216
138
|
// Legacy compatibility.
|
217
|
-
if (highlightType ===
|
139
|
+
if (highlightType === _constants.CELL_TYPE) {
|
218
140
|
type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
|
219
141
|
}
|
220
142
|
|
221
|
-
var disableHighlight =
|
222
|
-
if (coords.isCell()) {
|
223
|
-
disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
|
224
|
-
}
|
143
|
+
var disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
|
225
144
|
if (typeof disableHighlight === 'string') {
|
226
145
|
disableHighlight = [disableHighlight];
|
227
146
|
}
|
@@ -243,15 +162,14 @@ var Highlight = /*#__PURE__*/function () {
|
|
243
162
|
}
|
244
163
|
|
245
164
|
/**
|
246
|
-
* Get Walkontable Selection instance created for controlling highlight of the currently
|
247
|
-
* focused cell (or header).
|
165
|
+
* Get Walkontable Selection instance created for controlling highlight of the currently selected/edited cell.
|
248
166
|
*
|
249
167
|
* @returns {Selection}
|
250
168
|
*/
|
251
169
|
}, {
|
252
|
-
key: "
|
253
|
-
value: function
|
254
|
-
return this.
|
170
|
+
key: "getCell",
|
171
|
+
value: function getCell() {
|
172
|
+
return this.cell;
|
255
173
|
}
|
256
174
|
|
257
175
|
/**
|
@@ -266,38 +184,25 @@ var Highlight = /*#__PURE__*/function () {
|
|
266
184
|
}
|
267
185
|
|
268
186
|
/**
|
269
|
-
*
|
270
|
-
*
|
271
|
-
*
|
272
|
-
* @returns {Selection}
|
273
|
-
*/
|
274
|
-
}, {
|
275
|
-
key: "createLayeredArea",
|
276
|
-
value: function createLayeredArea() {
|
277
|
-
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.layeredAreas, _areaLayered.createHighlight);
|
278
|
-
}
|
279
|
-
|
280
|
-
/**
|
281
|
-
* Get all Walkontable Selection instances which describes the state of the visual highlight of the cells.
|
282
|
-
*
|
283
|
-
* @returns {Selection[]}
|
284
|
-
*/
|
285
|
-
}, {
|
286
|
-
key: "getLayeredAreas",
|
287
|
-
value: function getLayeredAreas() {
|
288
|
-
return _toConsumableArray(this.layeredAreas.values());
|
289
|
-
}
|
290
|
-
|
291
|
-
/**
|
292
|
-
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
293
|
-
* `highlight` highlights.
|
187
|
+
* Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
|
188
|
+
* of the multiple selected cells.
|
294
189
|
*
|
295
190
|
* @returns {Selection}
|
296
191
|
*/
|
297
192
|
}, {
|
298
|
-
key: "
|
299
|
-
value: function
|
300
|
-
|
193
|
+
key: "createOrGetArea",
|
194
|
+
value: function createOrGetArea() {
|
195
|
+
var layerLevel = this.layerLevel;
|
196
|
+
var area;
|
197
|
+
if (this.areas.has(layerLevel)) {
|
198
|
+
area = this.areas.get(layerLevel);
|
199
|
+
} else {
|
200
|
+
area = (0, _types.createHighlight)(_constants.AREA_TYPE, _objectSpread({
|
201
|
+
layerLevel: layerLevel
|
202
|
+
}, this.options));
|
203
|
+
this.areas.set(layerLevel, area);
|
204
|
+
}
|
205
|
+
return area;
|
301
206
|
}
|
302
207
|
|
303
208
|
/**
|
@@ -312,38 +217,23 @@ var Highlight = /*#__PURE__*/function () {
|
|
312
217
|
}
|
313
218
|
|
314
219
|
/**
|
315
|
-
*
|
316
|
-
*
|
317
|
-
*
|
318
|
-
* @returns {Selection}
|
319
|
-
*/
|
320
|
-
}, {
|
321
|
-
key: "createRowHeader",
|
322
|
-
value: function createRowHeader() {
|
323
|
-
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.rowHeaders, _header.createHighlight);
|
324
|
-
}
|
325
|
-
|
326
|
-
/**
|
327
|
-
* Get all Walkontable Selection instances which describes the state of the visual highlight of the headers.
|
328
|
-
*
|
329
|
-
* @returns {Selection[]}
|
330
|
-
*/
|
331
|
-
}, {
|
332
|
-
key: "getRowHeaders",
|
333
|
-
value: function getRowHeaders() {
|
334
|
-
return _toConsumableArray(this.rowHeaders.values());
|
335
|
-
}
|
336
|
-
|
337
|
-
/**
|
338
|
-
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
339
|
-
* header highlight for columns.
|
220
|
+
* Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
|
221
|
+
* of the multiple selected header cells.
|
340
222
|
*
|
341
223
|
* @returns {Selection}
|
342
224
|
*/
|
343
225
|
}, {
|
344
|
-
key: "
|
345
|
-
value: function
|
346
|
-
|
226
|
+
key: "createOrGetHeader",
|
227
|
+
value: function createOrGetHeader() {
|
228
|
+
var layerLevel = this.layerLevel;
|
229
|
+
var header;
|
230
|
+
if (this.headers.has(layerLevel)) {
|
231
|
+
header = this.headers.get(layerLevel);
|
232
|
+
} else {
|
233
|
+
header = (0, _types.createHighlight)(_constants.HEADER_TYPE, _objectSpread({}, this.options));
|
234
|
+
this.headers.set(layerLevel, header);
|
235
|
+
}
|
236
|
+
return header;
|
347
237
|
}
|
348
238
|
|
349
239
|
/**
|
@@ -352,44 +242,29 @@ var Highlight = /*#__PURE__*/function () {
|
|
352
242
|
* @returns {Selection[]}
|
353
243
|
*/
|
354
244
|
}, {
|
355
|
-
key: "
|
356
|
-
value: function
|
357
|
-
return _toConsumableArray(this.
|
358
|
-
}
|
359
|
-
|
360
|
-
/**
|
361
|
-
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
362
|
-
* highlight for active row headers.
|
363
|
-
*
|
364
|
-
* @returns {Selection}
|
365
|
-
*/
|
366
|
-
}, {
|
367
|
-
key: "createActiveRowHeader",
|
368
|
-
value: function createActiveRowHeader() {
|
369
|
-
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.activeRowHeaders, _activeHeader.createHighlight);
|
370
|
-
}
|
371
|
-
|
372
|
-
/**
|
373
|
-
* Get all Walkontable Selection instances which describes the state of the visual highlight of the active headers.
|
374
|
-
*
|
375
|
-
* @returns {Selection[]}
|
376
|
-
*/
|
377
|
-
}, {
|
378
|
-
key: "getActiveRowHeaders",
|
379
|
-
value: function getActiveRowHeaders() {
|
380
|
-
return _toConsumableArray(this.activeRowHeaders.values());
|
245
|
+
key: "getHeaders",
|
246
|
+
value: function getHeaders() {
|
247
|
+
return _toConsumableArray(this.headers.values());
|
381
248
|
}
|
382
249
|
|
383
250
|
/**
|
384
|
-
*
|
385
|
-
*
|
251
|
+
* Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
|
252
|
+
* of the multiple selected active header cells.
|
386
253
|
*
|
387
254
|
* @returns {Selection}
|
388
255
|
*/
|
389
256
|
}, {
|
390
|
-
key: "
|
391
|
-
value: function
|
392
|
-
|
257
|
+
key: "createOrGetActiveHeader",
|
258
|
+
value: function createOrGetActiveHeader() {
|
259
|
+
var layerLevel = this.layerLevel;
|
260
|
+
var header;
|
261
|
+
if (this.activeHeaders.has(layerLevel)) {
|
262
|
+
header = this.activeHeaders.get(layerLevel);
|
263
|
+
} else {
|
264
|
+
header = (0, _types.createHighlight)(_constants.ACTIVE_HEADER_TYPE, _objectSpread({}, this.options));
|
265
|
+
this.activeHeaders.set(layerLevel, header);
|
266
|
+
}
|
267
|
+
return header;
|
393
268
|
}
|
394
269
|
|
395
270
|
/**
|
@@ -398,78 +273,9 @@ var Highlight = /*#__PURE__*/function () {
|
|
398
273
|
* @returns {Selection[]}
|
399
274
|
*/
|
400
275
|
}, {
|
401
|
-
key: "
|
402
|
-
value: function
|
403
|
-
return _toConsumableArray(this.
|
404
|
-
}
|
405
|
-
|
406
|
-
/**
|
407
|
-
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
408
|
-
* highlight for the headers corner.
|
409
|
-
*
|
410
|
-
* @returns {Selection}
|
411
|
-
*/
|
412
|
-
}, {
|
413
|
-
key: "createActiveCornerHeader",
|
414
|
-
value: function createActiveCornerHeader() {
|
415
|
-
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.activeCornerHeaders, _activeHeader.createHighlight);
|
416
|
-
}
|
417
|
-
|
418
|
-
/**
|
419
|
-
* Get all Walkontable Selection instances which describes the state of the visual highlight of the headers corner.
|
420
|
-
*
|
421
|
-
* @returns {Selection[]}
|
422
|
-
*/
|
423
|
-
}, {
|
424
|
-
key: "getActiveCornerHeaders",
|
425
|
-
value: function getActiveCornerHeaders() {
|
426
|
-
return _toConsumableArray(this.activeCornerHeaders.values());
|
427
|
-
}
|
428
|
-
|
429
|
-
/**
|
430
|
-
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
431
|
-
* highlight cells in a row.
|
432
|
-
*
|
433
|
-
* @returns {Selection}
|
434
|
-
*/
|
435
|
-
}, {
|
436
|
-
key: "createRowHighlight",
|
437
|
-
value: function createRowHighlight() {
|
438
|
-
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.rowHighlights, _row.createHighlight);
|
439
|
-
}
|
440
|
-
|
441
|
-
/**
|
442
|
-
* Get all Walkontable Selection instances which describes the state of the rows highlighting.
|
443
|
-
*
|
444
|
-
* @returns {Selection[]}
|
445
|
-
*/
|
446
|
-
}, {
|
447
|
-
key: "getRowHighlights",
|
448
|
-
value: function getRowHighlights() {
|
449
|
-
return _toConsumableArray(this.rowHighlights.values());
|
450
|
-
}
|
451
|
-
|
452
|
-
/**
|
453
|
-
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
454
|
-
* highlight cells in a column.
|
455
|
-
*
|
456
|
-
* @returns {Selection}
|
457
|
-
*/
|
458
|
-
}, {
|
459
|
-
key: "createColumnHighlight",
|
460
|
-
value: function createColumnHighlight() {
|
461
|
-
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.columnHighlights, _column.createHighlight);
|
462
|
-
}
|
463
|
-
|
464
|
-
/**
|
465
|
-
* Get all Walkontable Selection instances which describes the state of the columns highlighting.
|
466
|
-
*
|
467
|
-
* @returns {Selection[]}
|
468
|
-
*/
|
469
|
-
}, {
|
470
|
-
key: "getColumnHighlights",
|
471
|
-
value: function getColumnHighlights() {
|
472
|
-
return _toConsumableArray(this.columnHighlights.values());
|
276
|
+
key: "getActiveHeaders",
|
277
|
+
value: function getActiveHeaders() {
|
278
|
+
return _toConsumableArray(this.activeHeaders.values());
|
473
279
|
}
|
474
280
|
|
475
281
|
/**
|
@@ -491,7 +297,7 @@ var Highlight = /*#__PURE__*/function () {
|
|
491
297
|
}, {
|
492
298
|
key: "addCustomSelection",
|
493
299
|
value: function addCustomSelection(selectionInstance) {
|
494
|
-
this.customSelections.push((0,
|
300
|
+
this.customSelections.push((0, _types.createHighlight)(_constants.CUSTOM_SELECTION_TYPE, _objectSpread(_objectSpread({}, this.options), selectionInstance)));
|
495
301
|
}
|
496
302
|
|
497
303
|
/**
|
@@ -500,60 +306,31 @@ var Highlight = /*#__PURE__*/function () {
|
|
500
306
|
}, {
|
501
307
|
key: "clear",
|
502
308
|
value: function clear() {
|
503
|
-
this.
|
309
|
+
this.cell.clear();
|
504
310
|
this.fill.clear();
|
505
311
|
(0, _array.arrayEach)(this.areas.values(), function (highlight) {
|
506
312
|
return void highlight.clear();
|
507
313
|
});
|
508
|
-
(0, _array.arrayEach)(this.
|
509
|
-
return void highlight.clear();
|
510
|
-
});
|
511
|
-
(0, _array.arrayEach)(this.rowHeaders.values(), function (highlight) {
|
512
|
-
return void highlight.clear();
|
513
|
-
});
|
514
|
-
(0, _array.arrayEach)(this.columnHeaders.values(), function (highlight) {
|
515
|
-
return void highlight.clear();
|
516
|
-
});
|
517
|
-
(0, _array.arrayEach)(this.activeRowHeaders.values(), function (highlight) {
|
518
|
-
return void highlight.clear();
|
519
|
-
});
|
520
|
-
(0, _array.arrayEach)(this.activeColumnHeaders.values(), function (highlight) {
|
314
|
+
(0, _array.arrayEach)(this.headers.values(), function (highlight) {
|
521
315
|
return void highlight.clear();
|
522
316
|
});
|
523
|
-
(0, _array.arrayEach)(this.
|
524
|
-
return void highlight.clear();
|
525
|
-
});
|
526
|
-
(0, _array.arrayEach)(this.rowHighlights.values(), function (highlight) {
|
527
|
-
return void highlight.clear();
|
528
|
-
});
|
529
|
-
(0, _array.arrayEach)(this.columnHighlights.values(), function (highlight) {
|
317
|
+
(0, _array.arrayEach)(this.activeHeaders.values(), function (highlight) {
|
530
318
|
return void highlight.clear();
|
531
319
|
});
|
532
320
|
}
|
533
|
-
|
534
|
-
key: _Symbol$iterator,
|
535
|
-
value:
|
321
|
+
|
536
322
|
/**
|
537
323
|
* This object can be iterate over using `for of` syntax or using internal `arrayEach` helper.
|
538
324
|
*
|
539
325
|
* @returns {Selection[]}
|
540
326
|
*/
|
541
|
-
|
542
|
-
|
327
|
+
}, {
|
328
|
+
key: _Symbol$iterator,
|
329
|
+
value: function value() {
|
330
|
+
return [this.cell, this.fill].concat(_toConsumableArray(this.areas.values()), _toConsumableArray(this.headers.values()), _toConsumableArray(this.activeHeaders.values()), _toConsumableArray(this.customSelections))[Symbol.iterator]();
|
543
331
|
}
|
544
332
|
}]);
|
545
333
|
return Highlight;
|
546
|
-
}();
|
547
|
-
function _createHighlight2(cacheMap, highlightFactory) {
|
548
|
-
var layerLevel = this.layerLevel;
|
549
|
-
if (cacheMap.has(layerLevel)) {
|
550
|
-
return cacheMap.get(layerLevel);
|
551
|
-
}
|
552
|
-
var highlight = highlightFactory(_objectSpread({
|
553
|
-
layerLevel: layerLevel
|
554
|
-
}, this.options));
|
555
|
-
cacheMap.set(layerLevel, highlight);
|
556
|
-
return highlight;
|
557
|
-
}
|
334
|
+
}(Symbol.iterator);
|
558
335
|
var _default = Highlight;
|
559
336
|
exports.default = _default;
|