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