handsontable 0.0.0-next-5e7f0fe-20230504 → 0.0.0-next-48677e7-20230509
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.js +40 -13
- package/3rdparty/walkontable/src/cell/coords.mjs +40 -13
- package/3rdparty/walkontable/src/cell/range.js +29 -25
- package/3rdparty/walkontable/src/cell/range.mjs +28 -24
- 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 +12 -10
- package/3rdparty/walkontable/src/event.mjs +12 -10
- 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 +8 -7
- package/3rdparty/walkontable/src/overlay/_base.mjs +8 -7
- package/3rdparty/walkontable/src/overlay/bottom.js +7 -6
- package/3rdparty/walkontable/src/overlay/bottom.mjs +7 -6
- 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 +9 -10
- package/3rdparty/walkontable/src/overlay/top.mjs +9 -10
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +12 -10
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +12 -10
- package/3rdparty/walkontable/src/overlays.js +64 -55
- package/3rdparty/walkontable/src/overlays.mjs +64 -55
- package/3rdparty/walkontable/src/renderer/table.js +2 -0
- package/3rdparty/walkontable/src/renderer/table.mjs +2 -0
- package/3rdparty/walkontable/src/scroll.js +23 -20
- package/3rdparty/walkontable/src/scroll.mjs +23 -20
- 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 +334 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +328 -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/settings.js +15 -13
- package/3rdparty/walkontable/src/settings.mjs +15 -13
- 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 +33 -101
- package/3rdparty/walkontable/src/table.mjs +34 -102
- package/base.js +4 -2
- package/base.mjs +2 -2
- package/core.d.ts +4 -0
- package/core.js +49 -8
- package/core.mjs +49 -8
- package/dataMap/dataSource.js +5 -5
- package/dataMap/dataSource.mjs +5 -5
- package/dataMap/metaManager/metaSchema.js +7 -0
- package/dataMap/metaManager/metaSchema.mjs +7 -0
- package/dist/handsontable.css +7 -2
- package/dist/handsontable.full.css +7 -2
- package/dist/handsontable.full.js +9409 -9084
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +115 -123
- package/dist/handsontable.js +9497 -9171
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +3 -11
- package/dist/languages/all.js +0 -133
- package/dist/languages/ar-AR.js +0 -7
- package/dist/languages/cs-CZ.js +0 -7
- package/dist/languages/de-CH.js +0 -7
- package/dist/languages/de-DE.js +0 -7
- package/dist/languages/en-US.js +0 -7
- package/dist/languages/es-MX.js +0 -7
- package/dist/languages/fr-FR.js +0 -7
- package/dist/languages/it-IT.js +0 -7
- package/dist/languages/ja-JP.js +0 -7
- package/dist/languages/ko-KR.js +0 -7
- package/dist/languages/lv-LV.js +0 -7
- package/dist/languages/nb-NO.js +0 -7
- package/dist/languages/nl-NL.js +0 -7
- package/dist/languages/pl-PL.js +0 -7
- package/dist/languages/pt-BR.js +0 -7
- package/dist/languages/ru-RU.js +0 -7
- package/dist/languages/sr-SP.js +0 -7
- package/dist/languages/zh-CN.js +0 -7
- package/dist/languages/zh-TW.js +0 -7
- package/editorManager.js +7 -3
- package/editorManager.mjs +7 -3
- package/editors/textEditor/textEditor.js +3 -16
- package/editors/textEditor/textEditor.mjs +4 -17
- package/focusManager.d.ts +12 -0
- package/focusManager.js +249 -0
- package/focusManager.mjs +245 -0
- package/helpers/dom/element.js +11 -0
- package/helpers/dom/element.mjs +10 -0
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/i18n/languages/ar-AR.js +1 -7
- package/i18n/languages/cs-CZ.js +1 -7
- package/i18n/languages/de-CH.js +1 -7
- package/i18n/languages/de-DE.js +1 -7
- package/i18n/languages/en-US.js +1 -7
- package/i18n/languages/es-MX.js +1 -7
- package/i18n/languages/fr-FR.js +1 -7
- package/i18n/languages/it-IT.js +1 -7
- package/i18n/languages/ja-JP.js +1 -7
- package/i18n/languages/ko-KR.js +1 -7
- package/i18n/languages/lv-LV.js +1 -7
- package/i18n/languages/nb-NO.js +1 -7
- package/i18n/languages/nl-NL.js +1 -7
- package/i18n/languages/pl-PL.js +1 -7
- package/i18n/languages/pt-BR.js +1 -7
- package/i18n/languages/ru-RU.js +1 -7
- package/i18n/languages/sr-SP.js +1 -7
- package/i18n/languages/zh-CN.js +1 -7
- package/i18n/languages/zh-TW.js +1 -7
- package/languages/all.js +0 -133
- package/languages/ar-AR.js +0 -7
- package/languages/cs-CZ.js +0 -7
- package/languages/de-CH.js +0 -7
- package/languages/de-DE.js +0 -7
- package/languages/en-US.js +0 -7
- package/languages/es-MX.js +0 -7
- package/languages/fr-FR.js +0 -7
- package/languages/index.js +0 -133
- package/languages/it-IT.js +0 -7
- package/languages/ja-JP.js +0 -7
- package/languages/ko-KR.js +0 -7
- package/languages/lv-LV.js +0 -7
- package/languages/nb-NO.js +0 -7
- package/languages/nl-NL.js +0 -7
- package/languages/pl-PL.js +0 -7
- package/languages/pt-BR.js +0 -7
- package/languages/ru-RU.js +0 -7
- package/languages/sr-SP.js +0 -7
- package/languages/zh-CN.js +0 -7
- package/languages/zh-TW.js +0 -7
- package/package.json +2 -3
- package/pluginHooks.js +7 -17
- package/pluginHooks.mjs +4 -16
- package/plugins/autoRowSize/autoRowSize.js +2 -2
- package/plugins/autoRowSize/autoRowSize.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +12 -93
- package/plugins/copyPaste/copyPaste.mjs +12 -93
- package/plugins/copyPaste/copyableRanges.js +31 -25
- package/plugins/copyPaste/copyableRanges.mjs +24 -18
- package/plugins/customBorders/customBorders.js +6 -2
- package/plugins/customBorders/customBorders.mjs +7 -3
- package/plugins/filters/filters.js +0 -5
- package/plugins/filters/filters.mjs +0 -5
- package/plugins/formulas/formulas.js +168 -190
- package/plugins/formulas/formulas.mjs +168 -190
- package/plugins/mergeCells/mergeCells.js +0 -16
- package/plugins/mergeCells/mergeCells.mjs +0 -16
- package/plugins/nestedHeaders/nestedHeaders.js +3 -4
- package/plugins/nestedHeaders/nestedHeaders.mjs +3 -4
- package/plugins/nestedHeaders/stateManager/headersTree.js +26 -23
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +23 -20
- package/plugins/nestedHeaders/stateManager/index.js +3 -3
- package/plugins/nestedHeaders/stateManager/matrixGenerator.js +0 -1
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
- package/plugins/nestedHeaders/utils/ghostTable.js +35 -30
- package/plugins/nestedHeaders/utils/ghostTable.mjs +35 -30
- package/plugins/registry.js +1 -3
- package/plugins/undoRedo/undoRedo.js +1 -0
- package/plugins/undoRedo/undoRedo.mjs +1 -0
- package/renderers/baseRenderer/baseRenderer.js +3 -0
- package/renderers/baseRenderer/baseRenderer.mjs +3 -0
- package/selection/highlight/highlight.js +335 -133
- package/selection/highlight/highlight.mjs +325 -129
- 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 +12 -21
- package/selection/highlight/visualSelection.mjs +12 -21
- package/selection/index.js +4 -7
- package/selection/index.mjs +2 -3
- package/selection/selection.js +88 -46
- package/selection/selection.mjs +82 -44
- package/settings.d.ts +1 -0
- package/tableView.js +94 -66
- package/tableView.mjs +94 -66
- package/translations/changesObservable/observable.js +46 -41
- package/translations/changesObservable/observable.mjs +41 -36
- package/translations/changesObservable/observer.js +1 -1
- package/translations/indexMapper.js +0 -21
- package/translations/indexMapper.mjs +0 -21
- package/utils/dataStructures/tree.js +18 -15
- package/utils/dataStructures/tree.mjs +18 -15
- package/utils/parseTable.js +1 -5
- package/utils/parseTable.mjs +1 -5
- package/3rdparty/walkontable/src/selection.js +0 -354
- package/3rdparty/walkontable/src/selection.mjs +0 -348
- package/plugins/copyPaste/focusableElement.js +0 -219
- package/plugins/copyPaste/focusableElement.mjs +0 -213
- package/plugins/formulas/indexSyncer/axisSyncer.js +0 -379
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -374
- package/plugins/formulas/indexSyncer/index.js +0 -225
- package/plugins/formulas/indexSyncer/index.mjs +0 -219
- 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,68 +70,130 @@ 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 () {
|
76
|
+
/**
|
77
|
+
* Options consumed by Highlight class and Walkontable Selection classes.
|
78
|
+
*
|
79
|
+
* @type {object}
|
80
|
+
*/
|
81
|
+
|
82
|
+
/**
|
83
|
+
* The property which describes which layer level of the visual selection will be modified.
|
84
|
+
* This option is valid only for `area` and `header` highlight types which occurs multiple times on
|
85
|
+
* the table (as a non-consecutive selection).
|
86
|
+
*
|
87
|
+
* An order of the layers is the same as the order of added new non-consecutive selections.
|
88
|
+
*
|
89
|
+
* @type {number}
|
90
|
+
* @default 0
|
91
|
+
*/
|
92
|
+
|
93
|
+
/**
|
94
|
+
* `cell` highlight object which describes attributes for the currently selected cell.
|
95
|
+
* It can only occur only once on the table.
|
96
|
+
*
|
97
|
+
* @type {Selection}
|
98
|
+
*/
|
99
|
+
|
100
|
+
/**
|
101
|
+
* `fill` highlight object which describes attributes for the borders for autofill functionality.
|
102
|
+
* It can only occur only once on the table.
|
103
|
+
*
|
104
|
+
* @type {Selection}
|
105
|
+
*/
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Collection of the `area` highlights. That objects describes attributes for the borders and selection of
|
109
|
+
* the multiple selected cells. It can occur multiple times on the table.
|
110
|
+
*
|
111
|
+
* @type {Map.<number, Selection>}
|
112
|
+
*/
|
113
|
+
|
114
|
+
/**
|
115
|
+
* Collection of the `highlight` highlights. That objects describes attributes for the borders and selection of
|
116
|
+
* the multiple selected cells. It can occur multiple times on the table.
|
117
|
+
*
|
118
|
+
* @type {Map.<number, Selection>}
|
119
|
+
*/
|
120
|
+
|
121
|
+
/**
|
122
|
+
* Collection of the `header` highlights. That objects describes attributes for the selection of
|
123
|
+
* the multiple selected rows in the table header. It can occur multiple times on the table.
|
124
|
+
*
|
125
|
+
* @type {Map.<number, Selection>}
|
126
|
+
*/
|
127
|
+
|
128
|
+
/**
|
129
|
+
* Collection of the `header` highlights. That objects describes attributes for the selection of
|
130
|
+
* the multiple selected columns in the table header. It can occur multiple times on the table.
|
131
|
+
*
|
132
|
+
* @type {Map.<number, Selection>}
|
133
|
+
*/
|
134
|
+
|
135
|
+
/**
|
136
|
+
* Collection of the `active-header` highlights. That objects describes attributes for the selection of
|
137
|
+
* the multiple selected rows in the table header. The table headers which have selected all items in
|
138
|
+
* a row will be marked as `active-header`.
|
139
|
+
*
|
140
|
+
* @type {Map.<number, Selection>}
|
141
|
+
*/
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Collection of the `active-header` highlights. That objects describes attributes for the selection of
|
145
|
+
* the multiple selected columns in the table header. The table headers which have selected all items in
|
146
|
+
* a row will be marked as `active-header`.
|
147
|
+
*
|
148
|
+
* @type {Map.<number, Selection>}
|
149
|
+
*/
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Collection of the `rows` highlights. That objects describes attributes for the selection of
|
153
|
+
* the multiple selected cells in a row. It can occur multiple times on the table.
|
154
|
+
*
|
155
|
+
* @type {Map.<number, Selection>}
|
156
|
+
*/
|
157
|
+
|
158
|
+
/**
|
159
|
+
* Collection of the `columns` highlights. That objects describes attributes for the selection of
|
160
|
+
* the multiple selected cells in a column. It can occur multiple times on the table.
|
161
|
+
*
|
162
|
+
* @type {Map.<number, Selection>}
|
163
|
+
*/
|
164
|
+
|
165
|
+
/**
|
166
|
+
* Collection of the `custom-selection`, holder for example borders added through CustomBorders plugin.
|
167
|
+
*
|
168
|
+
* @type {Selection[]}
|
169
|
+
*/
|
170
|
+
|
59
171
|
function Highlight(options) {
|
60
172
|
_classCallCheck(this, Highlight);
|
61
173
|
/**
|
62
|
-
*
|
174
|
+
* Creates (if not exist in the cache) Walkontable Selection instance.
|
63
175
|
*
|
64
|
-
* @
|
176
|
+
* @param {Map} cacheMap The map where the instance will be cached.
|
177
|
+
* @param {Function} highlightFactory The function factory.
|
178
|
+
* @returns {VisualSelection}
|
65
179
|
*/
|
180
|
+
_classPrivateMethodInitSpec(this, _createHighlight);
|
181
|
+
_defineProperty(this, "options", void 0);
|
182
|
+
_defineProperty(this, "layerLevel", 0);
|
183
|
+
_defineProperty(this, "focus", void 0);
|
184
|
+
_defineProperty(this, "fill", void 0);
|
185
|
+
_defineProperty(this, "layeredAreas", new Map());
|
186
|
+
_defineProperty(this, "areas", new Map());
|
187
|
+
_defineProperty(this, "rowHeaders", new Map());
|
188
|
+
_defineProperty(this, "columnHeaders", new Map());
|
189
|
+
_defineProperty(this, "activeRowHeaders", new Map());
|
190
|
+
_defineProperty(this, "activeColumnHeaders", new Map());
|
191
|
+
_defineProperty(this, "rowHighlights", new Map());
|
192
|
+
_defineProperty(this, "columnHighlights", new Map());
|
193
|
+
_defineProperty(this, "customSelections", []);
|
66
194
|
this.options = options;
|
67
|
-
|
68
|
-
|
69
|
-
* This option is valid only for `area` and `header` highlight types which occurs multiple times on
|
70
|
-
* the table (as a non-consecutive selection).
|
71
|
-
*
|
72
|
-
* An order of the layers is the same as the order of added new non-consecutive selections.
|
73
|
-
*
|
74
|
-
* @type {number}
|
75
|
-
* @default 0
|
76
|
-
*/
|
77
|
-
this.layerLevel = 0;
|
78
|
-
/**
|
79
|
-
* `cell` highlight object which describes attributes for the currently selected cell.
|
80
|
-
* It can only occur only once on the table.
|
81
|
-
*
|
82
|
-
* @type {Selection}
|
83
|
-
*/
|
84
|
-
this.cell = createHighlight(CELL_TYPE, options);
|
85
|
-
/**
|
86
|
-
* `fill` highlight object which describes attributes for the borders for autofill functionality.
|
87
|
-
* It can only occur only once on the table.
|
88
|
-
*
|
89
|
-
* @type {Selection}
|
90
|
-
*/
|
91
|
-
this.fill = createHighlight(FILL_TYPE, options);
|
92
|
-
/**
|
93
|
-
* Collection of the `area` highlights. That objects describes attributes for the borders and selection of
|
94
|
-
* the multiple selected cells. It can occur multiple times on the table.
|
95
|
-
*
|
96
|
-
* @type {Map.<number, Selection>}
|
97
|
-
*/
|
98
|
-
this.areas = new Map();
|
99
|
-
/**
|
100
|
-
* Collection of the `header` highlights. That objects describes attributes for the selection of
|
101
|
-
* the multiple selected rows and columns in the table header. It can occur multiple times on the table.
|
102
|
-
*
|
103
|
-
* @type {Map.<number, Selection>}
|
104
|
-
*/
|
105
|
-
this.headers = new Map();
|
106
|
-
/**
|
107
|
-
* Collection of the `active-header` highlights. That objects describes attributes for the selection of
|
108
|
-
* the multiple selected rows and columns in the table header. The table headers which have selected all items in
|
109
|
-
* a row will be marked as `active-header`.
|
110
|
-
*
|
111
|
-
* @type {Map.<number, Selection>}
|
112
|
-
*/
|
113
|
-
this.activeHeaders = new Map();
|
114
|
-
/**
|
115
|
-
* Collection of the `custom-selection`, holder for example borders added through CustomBorders plugin.
|
116
|
-
*
|
117
|
-
* @type {Selection[]}
|
118
|
-
*/
|
119
|
-
this.customSelections = [];
|
195
|
+
this.focus = createFocusHighlight(options);
|
196
|
+
this.fill = createFillHighlight(options);
|
120
197
|
}
|
121
198
|
|
122
199
|
/**
|
@@ -132,11 +209,14 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
|
132
209
|
var type = highlightType;
|
133
210
|
|
134
211
|
// Legacy compatibility.
|
135
|
-
if (highlightType ===
|
212
|
+
if (highlightType === HIGHLIGHT_FOCUS_TYPE) {
|
136
213
|
type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
|
137
214
|
}
|
138
215
|
|
139
|
-
var disableHighlight =
|
216
|
+
var disableHighlight = false;
|
217
|
+
if (coords.isCell()) {
|
218
|
+
disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
|
219
|
+
}
|
140
220
|
if (typeof disableHighlight === 'string') {
|
141
221
|
disableHighlight = [disableHighlight];
|
142
222
|
}
|
@@ -158,14 +238,15 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
|
158
238
|
}
|
159
239
|
|
160
240
|
/**
|
161
|
-
* Get Walkontable Selection instance created for controlling highlight of the currently
|
241
|
+
* Get Walkontable Selection instance created for controlling highlight of the currently
|
242
|
+
* focused cell (or header).
|
162
243
|
*
|
163
244
|
* @returns {Selection}
|
164
245
|
*/
|
165
246
|
}, {
|
166
|
-
key: "
|
167
|
-
value: function
|
168
|
-
return this.
|
247
|
+
key: "getFocus",
|
248
|
+
value: function getFocus() {
|
249
|
+
return this.focus;
|
169
250
|
}
|
170
251
|
|
171
252
|
/**
|
@@ -180,25 +261,38 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
|
180
261
|
}
|
181
262
|
|
182
263
|
/**
|
183
|
-
*
|
184
|
-
*
|
264
|
+
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
265
|
+
* `area` highlights.
|
185
266
|
*
|
186
267
|
* @returns {Selection}
|
187
268
|
*/
|
188
269
|
}, {
|
189
|
-
key: "
|
190
|
-
value: function
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
270
|
+
key: "createLayeredArea",
|
271
|
+
value: function createLayeredArea() {
|
272
|
+
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.layeredAreas, createAreaLayeredHighlight);
|
273
|
+
}
|
274
|
+
|
275
|
+
/**
|
276
|
+
* Get all Walkontable Selection instances which describes the state of the visual highlight of the cells.
|
277
|
+
*
|
278
|
+
* @returns {Selection[]}
|
279
|
+
*/
|
280
|
+
}, {
|
281
|
+
key: "getLayeredAreas",
|
282
|
+
value: function getLayeredAreas() {
|
283
|
+
return _toConsumableArray(this.layeredAreas.values());
|
284
|
+
}
|
285
|
+
|
286
|
+
/**
|
287
|
+
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
288
|
+
* `highlight` highlights.
|
289
|
+
*
|
290
|
+
* @returns {Selection}
|
291
|
+
*/
|
292
|
+
}, {
|
293
|
+
key: "createArea",
|
294
|
+
value: function createArea() {
|
295
|
+
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.areas, createAreaHighlight);
|
202
296
|
}
|
203
297
|
|
204
298
|
/**
|
@@ -213,23 +307,15 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
|
213
307
|
}
|
214
308
|
|
215
309
|
/**
|
216
|
-
*
|
217
|
-
*
|
310
|
+
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
311
|
+
* header highlight for rows.
|
218
312
|
*
|
219
313
|
* @returns {Selection}
|
220
314
|
*/
|
221
315
|
}, {
|
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;
|
316
|
+
key: "createRowHeader",
|
317
|
+
value: function createRowHeader() {
|
318
|
+
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.rowHeaders, createHeaderHighlight);
|
233
319
|
}
|
234
320
|
|
235
321
|
/**
|
@@ -238,29 +324,67 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
|
238
324
|
* @returns {Selection[]}
|
239
325
|
*/
|
240
326
|
}, {
|
241
|
-
key: "
|
242
|
-
value: function
|
243
|
-
return _toConsumableArray(this.
|
327
|
+
key: "getRowHeaders",
|
328
|
+
value: function getRowHeaders() {
|
329
|
+
return _toConsumableArray(this.rowHeaders.values());
|
244
330
|
}
|
245
331
|
|
246
332
|
/**
|
247
|
-
*
|
248
|
-
*
|
333
|
+
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
334
|
+
* header highlight for columns.
|
249
335
|
*
|
250
336
|
* @returns {Selection}
|
251
337
|
*/
|
252
338
|
}, {
|
253
|
-
key: "
|
254
|
-
value: function
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
339
|
+
key: "createColumnHeader",
|
340
|
+
value: function createColumnHeader() {
|
341
|
+
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.columnHeaders, createHeaderHighlight);
|
342
|
+
}
|
343
|
+
|
344
|
+
/**
|
345
|
+
* Get all Walkontable Selection instances which describes the state of the visual highlight of the headers.
|
346
|
+
*
|
347
|
+
* @returns {Selection[]}
|
348
|
+
*/
|
349
|
+
}, {
|
350
|
+
key: "getColumnHeaders",
|
351
|
+
value: function getColumnHeaders() {
|
352
|
+
return _toConsumableArray(this.columnHeaders.values());
|
353
|
+
}
|
354
|
+
|
355
|
+
/**
|
356
|
+
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
357
|
+
* highlight for active row headers.
|
358
|
+
*
|
359
|
+
* @returns {Selection}
|
360
|
+
*/
|
361
|
+
}, {
|
362
|
+
key: "createActiveRowHeader",
|
363
|
+
value: function createActiveRowHeader() {
|
364
|
+
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.activeRowHeaders, createActiveHighlight);
|
365
|
+
}
|
366
|
+
|
367
|
+
/**
|
368
|
+
* Get all Walkontable Selection instances which describes the state of the visual highlight of the active headers.
|
369
|
+
*
|
370
|
+
* @returns {Selection[]}
|
371
|
+
*/
|
372
|
+
}, {
|
373
|
+
key: "getActiveRowHeaders",
|
374
|
+
value: function getActiveRowHeaders() {
|
375
|
+
return _toConsumableArray(this.activeRowHeaders.values());
|
376
|
+
}
|
377
|
+
|
378
|
+
/**
|
379
|
+
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
380
|
+
* highlight for active column headers.
|
381
|
+
*
|
382
|
+
* @returns {Selection}
|
383
|
+
*/
|
384
|
+
}, {
|
385
|
+
key: "createActiveColumnHeader",
|
386
|
+
value: function createActiveColumnHeader() {
|
387
|
+
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.activeColumnHeaders, createActiveHighlight);
|
264
388
|
}
|
265
389
|
|
266
390
|
/**
|
@@ -269,9 +393,55 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
|
269
393
|
* @returns {Selection[]}
|
270
394
|
*/
|
271
395
|
}, {
|
272
|
-
key: "
|
273
|
-
value: function
|
274
|
-
return _toConsumableArray(this.
|
396
|
+
key: "getActiveColumnHeaders",
|
397
|
+
value: function getActiveColumnHeaders() {
|
398
|
+
return _toConsumableArray(this.activeColumnHeaders.values());
|
399
|
+
}
|
400
|
+
|
401
|
+
/**
|
402
|
+
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
403
|
+
* highlight cells in a row.
|
404
|
+
*
|
405
|
+
* @returns {Selection}
|
406
|
+
*/
|
407
|
+
}, {
|
408
|
+
key: "createRowHighlight",
|
409
|
+
value: function createRowHighlight() {
|
410
|
+
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.rowHighlights, _createRowHighlight);
|
411
|
+
}
|
412
|
+
|
413
|
+
/**
|
414
|
+
* Get all Walkontable Selection instances which describes the state of the rows highlighting.
|
415
|
+
*
|
416
|
+
* @returns {Selection[]}
|
417
|
+
*/
|
418
|
+
}, {
|
419
|
+
key: "getRowHighlights",
|
420
|
+
value: function getRowHighlights() {
|
421
|
+
return _toConsumableArray(this.rowHighlights.values());
|
422
|
+
}
|
423
|
+
|
424
|
+
/**
|
425
|
+
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
426
|
+
* highlight cells in a column.
|
427
|
+
*
|
428
|
+
* @returns {Selection}
|
429
|
+
*/
|
430
|
+
}, {
|
431
|
+
key: "createColumnHighlight",
|
432
|
+
value: function createColumnHighlight() {
|
433
|
+
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.columnHighlights, _createColumnHighlight);
|
434
|
+
}
|
435
|
+
|
436
|
+
/**
|
437
|
+
* Get all Walkontable Selection instances which describes the state of the columns highlighting.
|
438
|
+
*
|
439
|
+
* @returns {Selection[]}
|
440
|
+
*/
|
441
|
+
}, {
|
442
|
+
key: "getColumnHighlights",
|
443
|
+
value: function getColumnHighlights() {
|
444
|
+
return _toConsumableArray(this.columnHighlights.values());
|
275
445
|
}
|
276
446
|
|
277
447
|
/**
|
@@ -293,7 +463,7 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
|
293
463
|
}, {
|
294
464
|
key: "addCustomSelection",
|
295
465
|
value: function addCustomSelection(selectionInstance) {
|
296
|
-
this.customSelections.push(
|
466
|
+
this.customSelections.push(createCustomHighlight(_objectSpread(_objectSpread({}, this.options), selectionInstance)));
|
297
467
|
}
|
298
468
|
|
299
469
|
/**
|
@@ -302,30 +472,56 @@ var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
|
302
472
|
}, {
|
303
473
|
key: "clear",
|
304
474
|
value: function clear() {
|
305
|
-
this.
|
475
|
+
this.focus.clear();
|
306
476
|
this.fill.clear();
|
307
477
|
arrayEach(this.areas.values(), function (highlight) {
|
308
478
|
return void highlight.clear();
|
309
479
|
});
|
310
|
-
arrayEach(this.
|
480
|
+
arrayEach(this.layeredAreas.values(), function (highlight) {
|
481
|
+
return void highlight.clear();
|
482
|
+
});
|
483
|
+
arrayEach(this.rowHeaders.values(), function (highlight) {
|
311
484
|
return void highlight.clear();
|
312
485
|
});
|
313
|
-
arrayEach(this.
|
486
|
+
arrayEach(this.columnHeaders.values(), function (highlight) {
|
487
|
+
return void highlight.clear();
|
488
|
+
});
|
489
|
+
arrayEach(this.activeRowHeaders.values(), function (highlight) {
|
490
|
+
return void highlight.clear();
|
491
|
+
});
|
492
|
+
arrayEach(this.activeColumnHeaders.values(), function (highlight) {
|
493
|
+
return void highlight.clear();
|
494
|
+
});
|
495
|
+
arrayEach(this.rowHighlights.values(), function (highlight) {
|
496
|
+
return void highlight.clear();
|
497
|
+
});
|
498
|
+
arrayEach(this.columnHighlights.values(), function (highlight) {
|
314
499
|
return void highlight.clear();
|
315
500
|
});
|
316
501
|
}
|
317
|
-
|
502
|
+
}, {
|
503
|
+
key: _Symbol$iterator,
|
504
|
+
value:
|
318
505
|
/**
|
319
506
|
* This object can be iterate over using `for of` syntax or using internal `arrayEach` helper.
|
320
507
|
*
|
321
508
|
* @returns {Selection[]}
|
322
509
|
*/
|
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]();
|
510
|
+
function value() {
|
511
|
+
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.rowHighlights.values()), _toConsumableArray(this.columnHighlights.values()), _toConsumableArray(this.customSelections))[Symbol.iterator]();
|
327
512
|
}
|
328
513
|
}]);
|
329
514
|
return Highlight;
|
330
|
-
}(
|
515
|
+
}();
|
516
|
+
function _createHighlight2(cacheMap, highlightFactory) {
|
517
|
+
var layerLevel = this.layerLevel;
|
518
|
+
if (cacheMap.has(layerLevel)) {
|
519
|
+
return cacheMap.get(layerLevel);
|
520
|
+
}
|
521
|
+
var highlight = highlightFactory(_objectSpread({
|
522
|
+
layerLevel: layerLevel
|
523
|
+
}, this.options));
|
524
|
+
cacheMap.set(layerLevel, highlight);
|
525
|
+
return highlight;
|
526
|
+
}
|
331
527
|
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
|
+
}
|