handsontable 0.0.0-next-48677e7-20230509 → 0.0.0-next-c73b24c-20230510
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.js +13 -40
- package/3rdparty/walkontable/src/cell/coords.mjs +13 -40
- package/3rdparty/walkontable/src/cell/range.js +25 -29
- package/3rdparty/walkontable/src/cell/range.mjs +24 -28
- 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 +10 -12
- package/3rdparty/walkontable/src/event.mjs +10 -12
- 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 +7 -8
- package/3rdparty/walkontable/src/overlay/_base.mjs +7 -8
- package/3rdparty/walkontable/src/overlay/bottom.js +6 -7
- package/3rdparty/walkontable/src/overlay/bottom.mjs +6 -7
- 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 +10 -9
- package/3rdparty/walkontable/src/overlay/top.mjs +10 -9
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +10 -12
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +10 -12
- package/3rdparty/walkontable/src/overlays.js +55 -64
- package/3rdparty/walkontable/src/overlays.mjs +55 -64
- package/3rdparty/walkontable/src/renderer/table.js +0 -2
- package/3rdparty/walkontable/src/renderer/table.mjs +0 -2
- package/3rdparty/walkontable/src/scroll.js +20 -23
- package/3rdparty/walkontable/src/scroll.mjs +20 -23
- package/3rdparty/walkontable/src/selection.js +354 -0
- package/3rdparty/walkontable/src/selection.mjs +348 -0
- package/3rdparty/walkontable/src/settings.js +13 -15
- package/3rdparty/walkontable/src/settings.mjs +13 -15
- 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 +101 -33
- package/3rdparty/walkontable/src/table.mjs +102 -34
- package/base.js +2 -4
- package/base.mjs +2 -2
- package/core.d.ts +0 -4
- package/core.js +24 -52
- package/core.mjs +24 -52
- package/dataMap/dataSource.js +5 -5
- package/dataMap/dataSource.mjs +5 -5
- package/dataMap/metaManager/metaSchema.js +1 -8
- package/dataMap/metaManager/metaSchema.mjs +1 -8
- package/dist/handsontable.css +2 -7
- package/dist/handsontable.full.css +2 -7
- package/dist/handsontable.full.js +9101 -9413
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +123 -115
- package/dist/handsontable.js +8761 -9074
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +11 -3
- package/dist/languages/all.js +133 -0
- package/dist/languages/ar-AR.js +7 -0
- package/dist/languages/cs-CZ.js +7 -0
- package/dist/languages/de-CH.js +7 -0
- package/dist/languages/de-DE.js +7 -0
- package/dist/languages/en-US.js +7 -0
- package/dist/languages/es-MX.js +7 -0
- package/dist/languages/fr-FR.js +7 -0
- package/dist/languages/it-IT.js +7 -0
- package/dist/languages/ja-JP.js +7 -0
- package/dist/languages/ko-KR.js +7 -0
- package/dist/languages/lv-LV.js +7 -0
- package/dist/languages/nb-NO.js +7 -0
- package/dist/languages/nl-NL.js +7 -0
- package/dist/languages/pl-PL.js +7 -0
- package/dist/languages/pt-BR.js +7 -0
- package/dist/languages/ru-RU.js +7 -0
- package/dist/languages/sr-SP.js +7 -0
- package/dist/languages/zh-CN.js +7 -0
- package/dist/languages/zh-TW.js +7 -0
- package/editorManager.js +3 -7
- package/editorManager.mjs +3 -7
- package/editors/textEditor/textEditor.js +16 -3
- package/editors/textEditor/textEditor.mjs +17 -4
- package/helpers/dom/element.js +0 -11
- package/helpers/dom/element.mjs +0 -10
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/i18n/languages/ar-AR.js +7 -1
- package/i18n/languages/cs-CZ.js +7 -1
- package/i18n/languages/de-CH.js +7 -1
- package/i18n/languages/de-DE.js +7 -1
- package/i18n/languages/en-US.js +7 -1
- package/i18n/languages/es-MX.js +7 -1
- package/i18n/languages/fr-FR.js +7 -1
- package/i18n/languages/it-IT.js +7 -1
- package/i18n/languages/ja-JP.js +7 -1
- package/i18n/languages/ko-KR.js +7 -1
- package/i18n/languages/lv-LV.js +7 -1
- package/i18n/languages/nb-NO.js +7 -1
- package/i18n/languages/nl-NL.js +7 -1
- package/i18n/languages/pl-PL.js +7 -1
- package/i18n/languages/pt-BR.js +7 -1
- package/i18n/languages/ru-RU.js +7 -1
- package/i18n/languages/sr-SP.js +7 -1
- package/i18n/languages/zh-CN.js +7 -1
- package/i18n/languages/zh-TW.js +7 -1
- package/languages/all.js +133 -0
- package/languages/ar-AR.js +7 -0
- package/languages/cs-CZ.js +7 -0
- package/languages/de-CH.js +7 -0
- package/languages/de-DE.js +7 -0
- package/languages/en-US.js +7 -0
- package/languages/es-MX.js +7 -0
- package/languages/fr-FR.js +7 -0
- package/languages/index.js +133 -0
- package/languages/it-IT.js +7 -0
- package/languages/ja-JP.js +7 -0
- package/languages/ko-KR.js +7 -0
- package/languages/lv-LV.js +7 -0
- package/languages/nb-NO.js +7 -0
- package/languages/nl-NL.js +7 -0
- package/languages/pl-PL.js +7 -0
- package/languages/pt-BR.js +7 -0
- package/languages/ru-RU.js +7 -0
- package/languages/sr-SP.js +7 -0
- package/languages/zh-CN.js +7 -0
- package/languages/zh-TW.js +7 -0
- package/package.json +3 -2
- package/pluginHooks.js +17 -7
- package/pluginHooks.mjs +16 -4
- package/plugins/autoRowSize/autoRowSize.js +2 -2
- package/plugins/autoRowSize/autoRowSize.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +93 -12
- package/plugins/copyPaste/copyPaste.mjs +93 -12
- package/plugins/copyPaste/copyableRanges.js +25 -31
- package/plugins/copyPaste/copyableRanges.mjs +18 -24
- package/plugins/copyPaste/focusableElement.js +219 -0
- package/plugins/copyPaste/focusableElement.mjs +213 -0
- package/plugins/customBorders/customBorders.js +2 -6
- package/plugins/customBorders/customBorders.mjs +3 -7
- package/plugins/filters/filters.js +5 -0
- package/plugins/filters/filters.mjs +5 -0
- package/plugins/formulas/formulas.js +190 -168
- package/plugins/formulas/formulas.mjs +190 -168
- package/plugins/formulas/indexSyncer/axisSyncer.js +379 -0
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +374 -0
- package/plugins/formulas/indexSyncer/index.js +225 -0
- package/plugins/formulas/indexSyncer/index.mjs +219 -0
- package/plugins/mergeCells/mergeCells.js +16 -0
- package/plugins/mergeCells/mergeCells.mjs +16 -0
- package/plugins/nestedHeaders/nestedHeaders.js +4 -3
- package/plugins/nestedHeaders/nestedHeaders.mjs +4 -3
- package/plugins/nestedHeaders/stateManager/headersTree.js +23 -26
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +20 -23
- package/plugins/nestedHeaders/stateManager/index.js +3 -3
- package/plugins/nestedHeaders/stateManager/matrixGenerator.js +1 -0
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
- package/plugins/nestedHeaders/utils/ghostTable.js +30 -35
- package/plugins/nestedHeaders/utils/ghostTable.mjs +30 -35
- package/plugins/registry.js +3 -1
- package/plugins/undoRedo/undoRedo.js +0 -1
- package/plugins/undoRedo/undoRedo.mjs +0 -1
- package/renderers/baseRenderer/baseRenderer.js +0 -3
- package/renderers/baseRenderer/baseRenderer.mjs +0 -3
- package/selection/highlight/constants.js +16 -0
- package/selection/highlight/constants.mjs +6 -0
- package/selection/highlight/highlight.js +133 -335
- package/selection/highlight/highlight.mjs +129 -325
- 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 +21 -12
- package/selection/highlight/visualSelection.mjs +21 -12
- package/selection/index.js +7 -4
- package/selection/index.mjs +3 -2
- package/selection/selection.js +46 -88
- package/selection/selection.mjs +44 -82
- package/settings.d.ts +0 -1
- package/tableView.js +66 -94
- package/tableView.mjs +66 -94
- package/translations/changesObservable/observable.js +41 -46
- package/translations/changesObservable/observable.mjs +36 -41
- package/translations/changesObservable/observer.js +1 -1
- package/translations/indexMapper.js +21 -0
- package/translations/indexMapper.mjs +21 -0
- package/utils/dataStructures/tree.js +15 -18
- package/utils/dataStructures/tree.mjs +15 -18
- package/utils/parseTable.js +5 -1
- package/utils/parseTable.mjs +5 -1
- 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 -334
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -328
- package/3rdparty/walkontable/src/selection/scanner.js +0 -363
- package/3rdparty/walkontable/src/selection/scanner.mjs +0 -359
- package/3rdparty/walkontable/src/selection/selection.js +0 -133
- package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
- package/focusManager.d.ts +0 -12
- package/focusManager.js +0 -249
- package/focusManager.mjs +0 -245
- 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
@@ -1,60 +1,45 @@
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
|
-
var _Symbol$iterator;
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
5
2
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
6
3
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
7
4
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
8
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
9
6
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
10
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
+
import "core-js/modules/es.array.fill.js";
|
11
12
|
import "core-js/modules/es.array.iterator.js";
|
12
13
|
import "core-js/modules/es.map.js";
|
13
14
|
import "core-js/modules/es.object.to-string.js";
|
14
15
|
import "core-js/modules/es.string.iterator.js";
|
15
16
|
import "core-js/modules/web.dom-collections.iterator.js";
|
16
|
-
import "core-js/modules/es.array.fill.js";
|
17
17
|
import "core-js/modules/es.array.includes.js";
|
18
18
|
import "core-js/modules/es.string.includes.js";
|
19
19
|
import "core-js/modules/es.array.concat.js";
|
20
20
|
import "core-js/modules/es.symbol.iterator.js";
|
21
21
|
import "core-js/modules/es.symbol.js";
|
22
22
|
import "core-js/modules/es.symbol.description.js";
|
23
|
-
import "core-js/modules/es.weak-set.js";
|
24
23
|
import "core-js/modules/es.symbol.to-primitive.js";
|
25
24
|
import "core-js/modules/es.date.to-primitive.js";
|
26
25
|
import "core-js/modules/es.number.constructor.js";
|
27
|
-
import "core-js/modules/es.array.from.js";
|
28
|
-
import "core-js/modules/es.array.slice.js";
|
29
|
-
import "core-js/modules/es.function.name.js";
|
30
|
-
import "core-js/modules/es.regexp.exec.js";
|
31
26
|
import "core-js/modules/es.object.keys.js";
|
32
27
|
import "core-js/modules/es.array.filter.js";
|
33
28
|
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
34
29
|
import "core-js/modules/web.dom-collections.for-each.js";
|
35
30
|
import "core-js/modules/es.object.get-own-property-descriptors.js";
|
31
|
+
import "core-js/modules/es.array.from.js";
|
32
|
+
import "core-js/modules/es.array.slice.js";
|
33
|
+
import "core-js/modules/es.function.name.js";
|
34
|
+
import "core-js/modules/es.regexp.exec.js";
|
36
35
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
37
36
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
38
37
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
39
|
-
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
40
|
-
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
41
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
42
38
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
43
39
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
44
|
-
|
45
|
-
import {
|
46
|
-
import { createHighlight as createAreaLayeredHighlight } from "./types/areaLayered.mjs";
|
47
|
-
import { createHighlight as createAreaHighlight } from "./types/area.mjs";
|
48
|
-
import { createHighlight as _createColumnHighlight } from "./types/column.mjs";
|
49
|
-
import { createHighlight as createFocusHighlight } from "./types/focus.mjs";
|
50
|
-
import { createHighlight as createCustomHighlight } from "./types/customSelection.mjs";
|
51
|
-
import { createHighlight as createFillHighlight } from "./types/fill.mjs";
|
52
|
-
import { createHighlight as createHeaderHighlight } from "./types/header.mjs";
|
53
|
-
import { createHighlight as _createRowHighlight } from "./types/row.mjs";
|
54
|
-
import { HIGHLIGHT_ACTIVE_HEADER_TYPE, HIGHLIGHT_AREA_TYPE, HIGHLIGHT_FOCUS_TYPE, HIGHLIGHT_CUSTOM_SELECTION_TYPE, HIGHLIGHT_FILL_TYPE, HIGHLIGHT_HEADER_TYPE, HIGHLIGHT_ROW_TYPE, HIGHLIGHT_COLUMN_TYPE } from "../../3rdparty/walkontable/src/index.mjs";
|
40
|
+
import { createHighlight } from "./types/index.mjs";
|
41
|
+
import { ACTIVE_HEADER_TYPE, AREA_TYPE, CELL_TYPE, CUSTOM_SELECTION_TYPE, FILL_TYPE, HEADER_TYPE } from "./constants.mjs";
|
55
42
|
import { arrayEach } from "./../../helpers/array.mjs";
|
56
|
-
export { HIGHLIGHT_ACTIVE_HEADER_TYPE as ACTIVE_HEADER_TYPE, HIGHLIGHT_AREA_TYPE as AREA_TYPE, HIGHLIGHT_FOCUS_TYPE as FOCUS_TYPE, HIGHLIGHT_CUSTOM_SELECTION_TYPE as CUSTOM_SELECTION_TYPE, HIGHLIGHT_FILL_TYPE as FILL_TYPE, HIGHLIGHT_HEADER_TYPE as HEADER_TYPE, HIGHLIGHT_ROW_TYPE as ROW_TYPE, HIGHLIGHT_COLUMN_TYPE as COLUMN_TYPE };
|
57
|
-
|
58
43
|
/**
|
59
44
|
* Highlight class responsible for managing Walkontable Selection classes.
|
60
45
|
*
|
@@ -70,130 +55,68 @@ export { HIGHLIGHT_ACTIVE_HEADER_TYPE as ACTIVE_HEADER_TYPE, HIGHLIGHT_AREA_TYPE
|
|
70
55
|
* @class Highlight
|
71
56
|
* @util
|
72
57
|
*/
|
73
|
-
var
|
74
|
-
_Symbol$iterator = Symbol.iterator;
|
75
|
-
var Highlight = /*#__PURE__*/function () {
|
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
|
-
|
58
|
+
var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
171
59
|
function Highlight(options) {
|
172
60
|
_classCallCheck(this, Highlight);
|
173
61
|
/**
|
174
|
-
*
|
62
|
+
* Options consumed by Highlight class and Walkontable Selection classes.
|
175
63
|
*
|
176
|
-
* @
|
177
|
-
* @param {Function} highlightFactory The function factory.
|
178
|
-
* @returns {VisualSelection}
|
64
|
+
* @type {object}
|
179
65
|
*/
|
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", []);
|
194
66
|
this.options = options;
|
195
|
-
|
196
|
-
|
67
|
+
/**
|
68
|
+
* The property which describes which layer level of the visual selection will be modified.
|
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 = [];
|
197
120
|
}
|
198
121
|
|
199
122
|
/**
|
@@ -209,14 +132,11 @@ var Highlight = /*#__PURE__*/function () {
|
|
209
132
|
var type = highlightType;
|
210
133
|
|
211
134
|
// Legacy compatibility.
|
212
|
-
if (highlightType ===
|
135
|
+
if (highlightType === CELL_TYPE) {
|
213
136
|
type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
|
214
137
|
}
|
215
138
|
|
216
|
-
var disableHighlight =
|
217
|
-
if (coords.isCell()) {
|
218
|
-
disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
|
219
|
-
}
|
139
|
+
var disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
|
220
140
|
if (typeof disableHighlight === 'string') {
|
221
141
|
disableHighlight = [disableHighlight];
|
222
142
|
}
|
@@ -238,15 +158,14 @@ var Highlight = /*#__PURE__*/function () {
|
|
238
158
|
}
|
239
159
|
|
240
160
|
/**
|
241
|
-
* Get Walkontable Selection instance created for controlling highlight of the currently
|
242
|
-
* focused cell (or header).
|
161
|
+
* Get Walkontable Selection instance created for controlling highlight of the currently selected/edited cell.
|
243
162
|
*
|
244
163
|
* @returns {Selection}
|
245
164
|
*/
|
246
165
|
}, {
|
247
|
-
key: "
|
248
|
-
value: function
|
249
|
-
return this.
|
166
|
+
key: "getCell",
|
167
|
+
value: function getCell() {
|
168
|
+
return this.cell;
|
250
169
|
}
|
251
170
|
|
252
171
|
/**
|
@@ -261,38 +180,25 @@ var Highlight = /*#__PURE__*/function () {
|
|
261
180
|
}
|
262
181
|
|
263
182
|
/**
|
264
|
-
*
|
265
|
-
*
|
183
|
+
* Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
|
184
|
+
* of the multiple selected cells.
|
266
185
|
*
|
267
186
|
* @returns {Selection}
|
268
187
|
*/
|
269
188
|
}, {
|
270
|
-
key: "
|
271
|
-
value: function
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
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);
|
189
|
+
key: "createOrGetArea",
|
190
|
+
value: function createOrGetArea() {
|
191
|
+
var layerLevel = this.layerLevel;
|
192
|
+
var area;
|
193
|
+
if (this.areas.has(layerLevel)) {
|
194
|
+
area = this.areas.get(layerLevel);
|
195
|
+
} else {
|
196
|
+
area = createHighlight(AREA_TYPE, _objectSpread({
|
197
|
+
layerLevel: layerLevel
|
198
|
+
}, this.options));
|
199
|
+
this.areas.set(layerLevel, area);
|
200
|
+
}
|
201
|
+
return area;
|
296
202
|
}
|
297
203
|
|
298
204
|
/**
|
@@ -307,38 +213,23 @@ var Highlight = /*#__PURE__*/function () {
|
|
307
213
|
}
|
308
214
|
|
309
215
|
/**
|
310
|
-
*
|
311
|
-
*
|
312
|
-
*
|
313
|
-
* @returns {Selection}
|
314
|
-
*/
|
315
|
-
}, {
|
316
|
-
key: "createRowHeader",
|
317
|
-
value: function createRowHeader() {
|
318
|
-
return _classPrivateMethodGet(this, _createHighlight, _createHighlight2).call(this, this.rowHeaders, createHeaderHighlight);
|
319
|
-
}
|
320
|
-
|
321
|
-
/**
|
322
|
-
* Get all Walkontable Selection instances which describes the state of the visual highlight of the headers.
|
323
|
-
*
|
324
|
-
* @returns {Selection[]}
|
325
|
-
*/
|
326
|
-
}, {
|
327
|
-
key: "getRowHeaders",
|
328
|
-
value: function getRowHeaders() {
|
329
|
-
return _toConsumableArray(this.rowHeaders.values());
|
330
|
-
}
|
331
|
-
|
332
|
-
/**
|
333
|
-
* Creates (if not exist in the cache) Walkontable Selection instance created for controlling
|
334
|
-
* header highlight for columns.
|
216
|
+
* Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
|
217
|
+
* of the multiple selected header cells.
|
335
218
|
*
|
336
219
|
* @returns {Selection}
|
337
220
|
*/
|
338
221
|
}, {
|
339
|
-
key: "
|
340
|
-
value: function
|
341
|
-
|
222
|
+
key: "createOrGetHeader",
|
223
|
+
value: function createOrGetHeader() {
|
224
|
+
var layerLevel = this.layerLevel;
|
225
|
+
var header;
|
226
|
+
if (this.headers.has(layerLevel)) {
|
227
|
+
header = this.headers.get(layerLevel);
|
228
|
+
} else {
|
229
|
+
header = createHighlight(HEADER_TYPE, _objectSpread({}, this.options));
|
230
|
+
this.headers.set(layerLevel, header);
|
231
|
+
}
|
232
|
+
return header;
|
342
233
|
}
|
343
234
|
|
344
235
|
/**
|
@@ -347,44 +238,29 @@ var Highlight = /*#__PURE__*/function () {
|
|
347
238
|
* @returns {Selection[]}
|
348
239
|
*/
|
349
240
|
}, {
|
350
|
-
key: "
|
351
|
-
value: function
|
352
|
-
return _toConsumableArray(this.
|
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());
|
241
|
+
key: "getHeaders",
|
242
|
+
value: function getHeaders() {
|
243
|
+
return _toConsumableArray(this.headers.values());
|
376
244
|
}
|
377
245
|
|
378
246
|
/**
|
379
|
-
*
|
380
|
-
*
|
247
|
+
* Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight
|
248
|
+
* of the multiple selected active header cells.
|
381
249
|
*
|
382
250
|
* @returns {Selection}
|
383
251
|
*/
|
384
252
|
}, {
|
385
|
-
key: "
|
386
|
-
value: function
|
387
|
-
|
253
|
+
key: "createOrGetActiveHeader",
|
254
|
+
value: function createOrGetActiveHeader() {
|
255
|
+
var layerLevel = this.layerLevel;
|
256
|
+
var header;
|
257
|
+
if (this.activeHeaders.has(layerLevel)) {
|
258
|
+
header = this.activeHeaders.get(layerLevel);
|
259
|
+
} else {
|
260
|
+
header = createHighlight(ACTIVE_HEADER_TYPE, _objectSpread({}, this.options));
|
261
|
+
this.activeHeaders.set(layerLevel, header);
|
262
|
+
}
|
263
|
+
return header;
|
388
264
|
}
|
389
265
|
|
390
266
|
/**
|
@@ -393,55 +269,9 @@ var Highlight = /*#__PURE__*/function () {
|
|
393
269
|
* @returns {Selection[]}
|
394
270
|
*/
|
395
271
|
}, {
|
396
|
-
key: "
|
397
|
-
value: function
|
398
|
-
return _toConsumableArray(this.
|
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());
|
272
|
+
key: "getActiveHeaders",
|
273
|
+
value: function getActiveHeaders() {
|
274
|
+
return _toConsumableArray(this.activeHeaders.values());
|
445
275
|
}
|
446
276
|
|
447
277
|
/**
|
@@ -463,7 +293,7 @@ var Highlight = /*#__PURE__*/function () {
|
|
463
293
|
}, {
|
464
294
|
key: "addCustomSelection",
|
465
295
|
value: function addCustomSelection(selectionInstance) {
|
466
|
-
this.customSelections.push(
|
296
|
+
this.customSelections.push(createHighlight(CUSTOM_SELECTION_TYPE, _objectSpread(_objectSpread({}, this.options), selectionInstance)));
|
467
297
|
}
|
468
298
|
|
469
299
|
/**
|
@@ -472,56 +302,30 @@ var Highlight = /*#__PURE__*/function () {
|
|
472
302
|
}, {
|
473
303
|
key: "clear",
|
474
304
|
value: function clear() {
|
475
|
-
this.
|
305
|
+
this.cell.clear();
|
476
306
|
this.fill.clear();
|
477
307
|
arrayEach(this.areas.values(), function (highlight) {
|
478
308
|
return void highlight.clear();
|
479
309
|
});
|
480
|
-
arrayEach(this.
|
481
|
-
return void highlight.clear();
|
482
|
-
});
|
483
|
-
arrayEach(this.rowHeaders.values(), function (highlight) {
|
310
|
+
arrayEach(this.headers.values(), function (highlight) {
|
484
311
|
return void highlight.clear();
|
485
312
|
});
|
486
|
-
arrayEach(this.
|
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) {
|
313
|
+
arrayEach(this.activeHeaders.values(), function (highlight) {
|
499
314
|
return void highlight.clear();
|
500
315
|
});
|
501
316
|
}
|
502
|
-
|
503
|
-
key: _Symbol$iterator,
|
504
|
-
value:
|
317
|
+
|
505
318
|
/**
|
506
319
|
* This object can be iterate over using `for of` syntax or using internal `arrayEach` helper.
|
507
320
|
*
|
508
321
|
* @returns {Selection[]}
|
509
322
|
*/
|
510
|
-
|
511
|
-
|
323
|
+
}, {
|
324
|
+
key: _Symbol$iterator,
|
325
|
+
value: function value() {
|
326
|
+
return [this.cell, this.fill].concat(_toConsumableArray(this.areas.values()), _toConsumableArray(this.headers.values()), _toConsumableArray(this.activeHeaders.values()), _toConsumableArray(this.customSelections))[Symbol.iterator]();
|
512
327
|
}
|
513
328
|
}]);
|
514
329
|
return Highlight;
|
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
|
-
}
|
330
|
+
}(Symbol.iterator);
|
527
331
|
export default Highlight;
|
@@ -18,8 +18,8 @@ require("core-js/modules/es.array.iterator.js");
|
|
18
18
|
require("core-js/modules/es.string.iterator.js");
|
19
19
|
require("core-js/modules/web.dom-collections.iterator.js");
|
20
20
|
exports.__esModule = true;
|
21
|
-
exports.
|
22
|
-
var
|
21
|
+
exports.default = void 0;
|
22
|
+
var _constants = require("../constants");
|
23
23
|
var _visualSelection = _interopRequireDefault(require("../visualSelection"));
|
24
24
|
var _excluded = ["activeHeaderClassName"];
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -31,10 +31,6 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
31
31
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
32
32
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
33
33
|
/**
|
34
|
-
* Creates the new instance of Selection, responsible for highlighting column or row headers
|
35
|
-
* only when the whole column or row is selected.
|
36
|
-
* This type of selection can occur multiple times.
|
37
|
-
*
|
38
34
|
* @param {object} highlightParams A configuration object to create a highlight.
|
39
35
|
* @param {string} highlightParams.activeHeaderClassName Highlighted headers' class name.
|
40
36
|
* @returns {Selection}
|
@@ -42,9 +38,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
42
38
|
function createHighlight(_ref) {
|
43
39
|
var activeHeaderClassName = _ref.activeHeaderClassName,
|
44
40
|
restOptions = _objectWithoutProperties(_ref, _excluded);
|
45
|
-
|
46
|
-
|
41
|
+
var s = new _visualSelection.default(_objectSpread(_objectSpread({
|
42
|
+
highlightHeaderClassName: activeHeaderClassName
|
47
43
|
}, restOptions), {}, {
|
48
|
-
selectionType:
|
44
|
+
selectionType: _constants.ACTIVE_HEADER_TYPE
|
49
45
|
}));
|
50
|
-
|
46
|
+
return s;
|
47
|
+
}
|
48
|
+
var _default = createHighlight;
|
49
|
+
exports.default = _default;
|
@@ -23,23 +23,21 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
23
23
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
24
24
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
25
25
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
26
|
-
import {
|
26
|
+
import { ACTIVE_HEADER_TYPE } from "../constants.mjs";
|
27
27
|
import VisualSelection from "../visualSelection.mjs";
|
28
28
|
/**
|
29
|
-
* Creates the new instance of Selection, responsible for highlighting column or row headers
|
30
|
-
* only when the whole column or row is selected.
|
31
|
-
* This type of selection can occur multiple times.
|
32
|
-
*
|
33
29
|
* @param {object} highlightParams A configuration object to create a highlight.
|
34
30
|
* @param {string} highlightParams.activeHeaderClassName Highlighted headers' class name.
|
35
31
|
* @returns {Selection}
|
36
32
|
*/
|
37
|
-
|
33
|
+
function createHighlight(_ref) {
|
38
34
|
var activeHeaderClassName = _ref.activeHeaderClassName,
|
39
35
|
restOptions = _objectWithoutProperties(_ref, _excluded);
|
40
|
-
|
41
|
-
|
36
|
+
var s = new VisualSelection(_objectSpread(_objectSpread({
|
37
|
+
highlightHeaderClassName: activeHeaderClassName
|
42
38
|
}, restOptions), {}, {
|
43
|
-
selectionType:
|
39
|
+
selectionType: ACTIVE_HEADER_TYPE
|
44
40
|
}));
|
45
|
-
|
41
|
+
return s;
|
42
|
+
}
|
43
|
+
export default createHighlight;
|