handsontable 0.0.0-next-93e34dc-20230601 → 0.0.0-next-b7cca45-20230605
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
- package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
- package/3rdparty/walkontable/src/cell/coords.d.ts +1 -6
- package/3rdparty/walkontable/src/cell/coords.js +12 -61
- package/3rdparty/walkontable/src/cell/coords.mjs +12 -61
- package/3rdparty/walkontable/src/cell/range.d.ts +2 -9
- package/3rdparty/walkontable/src/cell/range.js +7 -44
- package/3rdparty/walkontable/src/cell/range.mjs +7 -44
- package/3rdparty/walkontable/src/core/_base.js +3 -9
- package/3rdparty/walkontable/src/core/_base.mjs +3 -9
- package/3rdparty/walkontable/src/core/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +2 -2
- package/3rdparty/walkontable/src/core/core.js +2 -3
- package/3rdparty/walkontable/src/core/core.mjs +2 -3
- package/3rdparty/walkontable/src/event.js +7 -7
- package/3rdparty/walkontable/src/event.mjs +7 -7
- package/3rdparty/walkontable/src/facade/core.js +2 -2
- package/3rdparty/walkontable/src/facade/core.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +2 -10
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +1 -1
- package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
- package/3rdparty/walkontable/src/overlay/top.js +4 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +4 -2
- package/3rdparty/walkontable/src/selection.js +354 -0
- package/3rdparty/walkontable/src/selection.mjs +348 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
- package/3rdparty/walkontable/src/table.js +79 -7
- package/3rdparty/walkontable/src/table.mjs +80 -8
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +3 -5
- package/core.js +300 -82
- package/core.mjs +300 -82
- package/dataMap/metaManager/metaSchema.js +0 -15
- package/dataMap/metaManager/metaSchema.mjs +0 -15
- package/dist/handsontable.css +3 -8
- package/dist/handsontable.full.css +3 -8
- package/dist/handsontable.full.js +9926 -12218
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +120 -120
- package/dist/handsontable.js +14628 -16920
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +4 -4
- package/editorManager.js +82 -20
- package/editorManager.mjs +86 -25
- package/editors/textEditor/textEditor.js +11 -3
- package/editors/textEditor/textEditor.mjs +12 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/number.d.ts +0 -1
- package/helpers/number.js +0 -18
- package/helpers/number.mjs +0 -17
- package/package.json +1 -1
- package/pluginHooks.js +1 -1
- package/pluginHooks.mjs +1 -1
- package/plugins/copyPaste/copyPaste.js +1 -5
- package/plugins/copyPaste/copyPaste.mjs +1 -5
- package/plugins/customBorders/customBorders.js +52 -18
- package/plugins/customBorders/customBorders.mjs +53 -19
- package/plugins/mergeCells/mergeCells.js +18 -5
- package/plugins/mergeCells/mergeCells.mjs +18 -5
- package/plugins/nestedHeaders/nestedHeaders.js +9 -89
- package/plugins/nestedHeaders/nestedHeaders.mjs +9 -89
- package/plugins/nestedHeaders/stateManager/index.js +0 -37
- package/plugins/nestedHeaders/stateManager/index.mjs +0 -37
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
- package/selection/highlight/constants.js +16 -0
- package/selection/highlight/constants.mjs +6 -0
- package/selection/highlight/highlight.js +88 -311
- package/selection/highlight/highlight.mjs +84 -301
- package/selection/highlight/types/activeHeader.js +9 -10
- package/selection/highlight/types/activeHeader.mjs +8 -10
- package/selection/highlight/types/area.js +27 -12
- package/selection/highlight/types/area.mjs +30 -16
- package/selection/highlight/types/{focus.js → cell.js} +8 -5
- package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
- package/selection/highlight/types/customSelection.js +10 -7
- package/selection/highlight/types/customSelection.mjs +9 -7
- package/selection/highlight/types/fill.js +8 -5
- package/selection/highlight/types/fill.mjs +7 -5
- package/selection/highlight/types/header.js +20 -10
- package/selection/highlight/types/header.mjs +19 -10
- package/selection/highlight/types/{row.js → index.js} +31 -27
- package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
- package/selection/highlight/visualSelection.js +28 -23
- package/selection/highlight/visualSelection.mjs +28 -23
- package/selection/index.js +7 -4
- package/selection/index.mjs +3 -2
- package/selection/mouseEventHandler.js +1 -1
- package/selection/mouseEventHandler.mjs +1 -1
- package/selection/range.js +8 -8
- package/selection/range.mjs +8 -8
- package/selection/selection.js +180 -296
- package/selection/selection.mjs +179 -291
- package/selection/transformation.js +96 -233
- package/selection/transformation.mjs +93 -230
- package/selection/utils.js +35 -12
- package/selection/utils.mjs +35 -13
- package/settings.d.ts +0 -1
- package/tableView.js +9 -58
- package/tableView.mjs +9 -58
- package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
- package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
- package/3rdparty/walkontable/src/selection/constants.js +0 -63
- package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
- package/3rdparty/walkontable/src/selection/index.js +0 -30
- package/3rdparty/walkontable/src/selection/index.mjs +0 -5
- package/3rdparty/walkontable/src/selection/manager.js +0 -328
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -322
- package/3rdparty/walkontable/src/selection/scanner.js +0 -363
- package/3rdparty/walkontable/src/selection/scanner.mjs +0 -359
- package/3rdparty/walkontable/src/selection/selection.js +0 -133
- package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
- package/selection/highlight/types/areaLayered.js +0 -54
- package/selection/highlight/types/areaLayered.mjs +0 -49
- package/selection/highlight/types/column.js +0 -50
- package/selection/highlight/types/column.mjs +0 -45
- package/shortcutContexts/commands/editor/closeAndSave.js +0 -15
- package/shortcutContexts/commands/editor/closeAndSave.mjs +0 -10
- package/shortcutContexts/commands/editor/closeWithoutSaving.js +0 -13
- package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +0 -8
- package/shortcutContexts/commands/editor/fastOpen.js +0 -16
- package/shortcutContexts/commands/editor/fastOpen.mjs +0 -11
- package/shortcutContexts/commands/editor/index.js +0 -16
- package/shortcutContexts/commands/editor/index.mjs +0 -12
- package/shortcutContexts/commands/editor/open.js +0 -29
- package/shortcutContexts/commands/editor/open.mjs +0 -24
- package/shortcutContexts/commands/emptySelectedCells.js +0 -12
- package/shortcutContexts/commands/emptySelectedCells.mjs +0 -7
- package/shortcutContexts/commands/extendCellsSelection/down.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +0 -21
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +0 -16
- package/shortcutContexts/commands/extendCellsSelection/index.js +0 -24
- package/shortcutContexts/commands/extendCellsSelection/index.mjs +0 -20
- package/shortcutContexts/commands/extendCellsSelection/left.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/right.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +0 -22
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +0 -12
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +0 -12
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +0 -39
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +0 -34
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +0 -39
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +0 -34
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +0 -22
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +0 -17
- package/shortcutContexts/commands/extendCellsSelection/up.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +0 -21
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +0 -16
- package/shortcutContexts/commands/index.js +0 -51
- package/shortcutContexts/commands/index.mjs +0 -47
- package/shortcutContexts/commands/moveCellSelection/down.js +0 -12
- package/shortcutContexts/commands/moveCellSelection/down.mjs +0 -7
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/index.js +0 -28
- package/shortcutContexts/commands/moveCellSelection/index.mjs +0 -24
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/left.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/left.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/right.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/right.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +0 -17
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +0 -12
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +0 -35
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +0 -30
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +0 -35
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +0 -30
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +0 -18
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +0 -13
- package/shortcutContexts/commands/moveCellSelection/up.js +0 -12
- package/shortcutContexts/commands/moveCellSelection/up.mjs +0 -7
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +0 -6
- package/shortcutContexts/commands/populateSelectedCellsData.js +0 -35
- package/shortcutContexts/commands/populateSelectedCellsData.mjs +0 -30
- package/shortcutContexts/commands/selectAll.js +0 -11
- package/shortcutContexts/commands/selectAll.mjs +0 -6
- package/shortcutContexts/constants.js +0 -19
- package/shortcutContexts/constants.mjs +0 -12
- package/shortcutContexts/editor.js +0 -29
- package/shortcutContexts/editor.mjs +0 -25
- package/shortcutContexts/grid.js +0 -232
- package/shortcutContexts/grid.mjs +0 -228
- package/shortcutContexts/index.js +0 -29
- package/shortcutContexts/index.mjs +0 -15
@@ -1,12 +1,14 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
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); }
|
4
|
+
require("core-js/modules/es.object.keys.js");
|
5
|
+
require("core-js/modules/es.array.index-of.js");
|
6
|
+
require("core-js/modules/es.symbol.js");
|
3
7
|
require("core-js/modules/es.symbol.to-primitive.js");
|
4
8
|
require("core-js/modules/es.date.to-primitive.js");
|
5
|
-
require("core-js/modules/es.symbol.js");
|
6
9
|
require("core-js/modules/es.symbol.description.js");
|
7
10
|
require("core-js/modules/es.object.to-string.js");
|
8
11
|
require("core-js/modules/es.number.constructor.js");
|
9
|
-
require("core-js/modules/es.object.keys.js");
|
10
12
|
require("core-js/modules/es.array.filter.js");
|
11
13
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
12
14
|
require("core-js/modules/web.dom-collections.for-each.js");
|
@@ -15,31 +17,44 @@ require("core-js/modules/es.symbol.iterator.js");
|
|
15
17
|
require("core-js/modules/es.array.iterator.js");
|
16
18
|
require("core-js/modules/es.string.iterator.js");
|
17
19
|
require("core-js/modules/web.dom-collections.iterator.js");
|
18
|
-
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); }
|
19
20
|
exports.__esModule = true;
|
20
|
-
exports.
|
21
|
-
require("
|
22
|
-
var _src = require("../../../3rdparty/walkontable/src");
|
21
|
+
exports.default = void 0;
|
22
|
+
var _constants = require("../constants");
|
23
23
|
var _visualSelection = _interopRequireDefault(require("../visualSelection"));
|
24
|
+
var _excluded = ["layerLevel", "areaCornerVisible"];
|
24
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
26
|
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; }
|
26
27
|
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; }
|
27
28
|
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; }
|
28
29
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
29
30
|
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); }
|
30
|
-
function
|
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
|
+
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; }
|
31
33
|
/**
|
32
34
|
* Creates the new instance of Selection responsible for highlighting area of the selected multiple cells.
|
33
35
|
*
|
34
36
|
* @param {object} highlightParams A configuration object to create a highlight.
|
37
|
+
* @param {number} highlightParams.layerLevel Layer level.
|
35
38
|
* @param {object} highlightParams.areaCornerVisible Function to determine if area's corner should be visible.
|
36
39
|
* @returns {Selection}
|
37
40
|
*/
|
38
41
|
function createHighlight(_ref) {
|
39
|
-
var
|
40
|
-
|
41
|
-
|
42
|
+
var layerLevel = _ref.layerLevel,
|
43
|
+
areaCornerVisible = _ref.areaCornerVisible,
|
44
|
+
restOptions = _objectWithoutProperties(_ref, _excluded);
|
45
|
+
var s = new _visualSelection.default(_objectSpread(_objectSpread({
|
46
|
+
className: 'area',
|
47
|
+
markIntersections: true,
|
48
|
+
layerLevel: Math.min(layerLevel, 7),
|
49
|
+
border: {
|
50
|
+
width: 1,
|
51
|
+
color: '#4b89ff',
|
52
|
+
cornerVisible: areaCornerVisible
|
53
|
+
}
|
42
54
|
}, restOptions), {}, {
|
43
|
-
selectionType:
|
55
|
+
selectionType: _constants.AREA_TYPE
|
44
56
|
}));
|
45
|
-
|
57
|
+
return s;
|
58
|
+
}
|
59
|
+
var _default = createHighlight;
|
60
|
+
exports.default = _default;
|
@@ -1,17 +1,12 @@
|
|
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
|
-
|
3
|
-
|
4
|
-
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
6
|
-
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); }
|
7
|
-
import "core-js/modules/es.object.assign.js";
|
2
|
+
import "core-js/modules/es.object.keys.js";
|
3
|
+
import "core-js/modules/es.array.index-of.js";
|
4
|
+
import "core-js/modules/es.symbol.js";
|
8
5
|
import "core-js/modules/es.symbol.to-primitive.js";
|
9
6
|
import "core-js/modules/es.date.to-primitive.js";
|
10
|
-
import "core-js/modules/es.symbol.js";
|
11
7
|
import "core-js/modules/es.symbol.description.js";
|
12
8
|
import "core-js/modules/es.object.to-string.js";
|
13
9
|
import "core-js/modules/es.number.constructor.js";
|
14
|
-
import "core-js/modules/es.object.keys.js";
|
15
10
|
import "core-js/modules/es.array.filter.js";
|
16
11
|
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
17
12
|
import "core-js/modules/web.dom-collections.for-each.js";
|
@@ -20,21 +15,40 @@ import "core-js/modules/es.symbol.iterator.js";
|
|
20
15
|
import "core-js/modules/es.array.iterator.js";
|
21
16
|
import "core-js/modules/es.string.iterator.js";
|
22
17
|
import "core-js/modules/web.dom-collections.iterator.js";
|
23
|
-
|
24
|
-
|
18
|
+
var _excluded = ["layerLevel", "areaCornerVisible"];
|
19
|
+
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; }
|
20
|
+
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; }
|
21
|
+
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; }
|
22
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
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
|
+
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
|
+
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 { AREA_TYPE } from "../constants.mjs";
|
25
27
|
import VisualSelection from "../visualSelection.mjs";
|
26
28
|
/**
|
27
29
|
* Creates the new instance of Selection responsible for highlighting area of the selected multiple cells.
|
28
30
|
*
|
29
31
|
* @param {object} highlightParams A configuration object to create a highlight.
|
32
|
+
* @param {number} highlightParams.layerLevel Layer level.
|
30
33
|
* @param {object} highlightParams.areaCornerVisible Function to determine if area's corner should be visible.
|
31
34
|
* @returns {Selection}
|
32
35
|
*/
|
33
|
-
|
34
|
-
var
|
35
|
-
|
36
|
-
|
36
|
+
function createHighlight(_ref) {
|
37
|
+
var layerLevel = _ref.layerLevel,
|
38
|
+
areaCornerVisible = _ref.areaCornerVisible,
|
39
|
+
restOptions = _objectWithoutProperties(_ref, _excluded);
|
40
|
+
var s = new VisualSelection(_objectSpread(_objectSpread({
|
41
|
+
className: 'area',
|
42
|
+
markIntersections: true,
|
43
|
+
layerLevel: Math.min(layerLevel, 7),
|
44
|
+
border: {
|
45
|
+
width: 1,
|
46
|
+
color: '#4b89ff',
|
47
|
+
cornerVisible: areaCornerVisible
|
48
|
+
}
|
37
49
|
}, restOptions), {}, {
|
38
|
-
selectionType:
|
50
|
+
selectionType: AREA_TYPE
|
39
51
|
}));
|
40
|
-
|
52
|
+
return s;
|
53
|
+
}
|
54
|
+
export default createHighlight;
|
@@ -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 = ["cellCornerVisible"];
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -41,7 +41,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
41
41
|
function createHighlight(_ref) {
|
42
42
|
var cellCornerVisible = _ref.cellCornerVisible,
|
43
43
|
restOptions = _objectWithoutProperties(_ref, _excluded);
|
44
|
-
|
44
|
+
var s = new _visualSelection.default(_objectSpread(_objectSpread({
|
45
45
|
className: 'current',
|
46
46
|
border: {
|
47
47
|
width: 2,
|
@@ -49,6 +49,9 @@ function createHighlight(_ref) {
|
|
49
49
|
cornerVisible: cellCornerVisible
|
50
50
|
}
|
51
51
|
}, restOptions), {}, {
|
52
|
-
selectionType:
|
52
|
+
selectionType: _constants.CELL_TYPE
|
53
53
|
}));
|
54
|
-
|
54
|
+
return s;
|
55
|
+
}
|
56
|
+
var _default = createHighlight;
|
57
|
+
exports.default = _default;
|
@@ -23,7 +23,7 @@ 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 { CELL_TYPE } from "../constants.mjs";
|
27
27
|
import VisualSelection from "../visualSelection.mjs";
|
28
28
|
/**
|
29
29
|
* Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection
|
@@ -33,10 +33,10 @@ import VisualSelection from "../visualSelection.mjs";
|
|
33
33
|
* @param {Function} highlightParams.cellCornerVisible Function to determine if cell's corner should be visible.
|
34
34
|
* @returns {Selection}
|
35
35
|
*/
|
36
|
-
|
36
|
+
function createHighlight(_ref) {
|
37
37
|
var cellCornerVisible = _ref.cellCornerVisible,
|
38
38
|
restOptions = _objectWithoutProperties(_ref, _excluded);
|
39
|
-
|
39
|
+
var s = new VisualSelection(_objectSpread(_objectSpread({
|
40
40
|
className: 'current',
|
41
41
|
border: {
|
42
42
|
width: 2,
|
@@ -44,6 +44,8 @@ export function createHighlight(_ref) {
|
|
44
44
|
cornerVisible: cellCornerVisible
|
45
45
|
}
|
46
46
|
}, restOptions), {}, {
|
47
|
-
selectionType:
|
47
|
+
selectionType: CELL_TYPE
|
48
48
|
}));
|
49
|
-
|
49
|
+
return s;
|
50
|
+
}
|
51
|
+
export default createHighlight;
|
@@ -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 = ["border", "visualCellRange"];
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -31,8 +31,8 @@ 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 currently selected cell.
|
35
|
-
*
|
34
|
+
* Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection
|
35
|
+
* can present on the table only one at the time.
|
36
36
|
*
|
37
37
|
* @param {object} highlightParams A configuration object to create a highlight.
|
38
38
|
* @param {object} highlightParams.border Border configuration.
|
@@ -43,7 +43,10 @@ function createHighlight(_ref) {
|
|
43
43
|
var border = _ref.border,
|
44
44
|
visualCellRange = _ref.visualCellRange,
|
45
45
|
restOptions = _objectWithoutProperties(_ref, _excluded);
|
46
|
-
|
47
|
-
selectionType:
|
46
|
+
var s = new _visualSelection.default(_objectSpread(_objectSpread(_objectSpread({}, border), restOptions), {}, {
|
47
|
+
selectionType: _constants.CUSTOM_SELECTION_TYPE
|
48
48
|
}), visualCellRange);
|
49
|
-
|
49
|
+
return s;
|
50
|
+
}
|
51
|
+
var _default = createHighlight;
|
52
|
+
exports.default = _default;
|
@@ -23,22 +23,24 @@ 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 { CUSTOM_SELECTION_TYPE } from "../constants.mjs";
|
27
27
|
import VisualSelection from "../visualSelection.mjs";
|
28
28
|
/**
|
29
|
-
* Creates the new instance of Selection responsible for highlighting currently selected cell.
|
30
|
-
*
|
29
|
+
* Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection
|
30
|
+
* can present on the table only one at the time.
|
31
31
|
*
|
32
32
|
* @param {object} highlightParams A configuration object to create a highlight.
|
33
33
|
* @param {object} highlightParams.border Border configuration.
|
34
34
|
* @param {object} highlightParams.visualCellRange Function to translate visual to renderable coords.
|
35
35
|
* @returns {Selection}
|
36
36
|
*/
|
37
|
-
|
37
|
+
function createHighlight(_ref) {
|
38
38
|
var border = _ref.border,
|
39
39
|
visualCellRange = _ref.visualCellRange,
|
40
40
|
restOptions = _objectWithoutProperties(_ref, _excluded);
|
41
|
-
|
42
|
-
selectionType:
|
41
|
+
var s = new VisualSelection(_objectSpread(_objectSpread(_objectSpread({}, border), restOptions), {}, {
|
42
|
+
selectionType: CUSTOM_SELECTION_TYPE
|
43
43
|
}), visualCellRange);
|
44
|
-
|
44
|
+
return s;
|
45
|
+
}
|
46
|
+
export default createHighlight;
|
@@ -17,9 +17,9 @@ require("core-js/modules/es.string.iterator.js");
|
|
17
17
|
require("core-js/modules/web.dom-collections.iterator.js");
|
18
18
|
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); }
|
19
19
|
exports.__esModule = true;
|
20
|
-
exports.
|
20
|
+
exports.default = void 0;
|
21
21
|
require("core-js/modules/es.object.assign.js");
|
22
|
-
var
|
22
|
+
var _constants = require("../constants");
|
23
23
|
var _visualSelection = _interopRequireDefault(require("../visualSelection"));
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
25
|
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; }
|
@@ -37,13 +37,16 @@ function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("
|
|
37
37
|
*/
|
38
38
|
function createHighlight(_ref) {
|
39
39
|
var restOptions = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
40
|
-
|
40
|
+
var s = new _visualSelection.default(_objectSpread(_objectSpread({
|
41
41
|
className: 'fill',
|
42
42
|
border: {
|
43
43
|
width: 1,
|
44
44
|
color: '#ff0000'
|
45
45
|
}
|
46
46
|
}, restOptions), {}, {
|
47
|
-
selectionType:
|
47
|
+
selectionType: _constants.FILL_TYPE
|
48
48
|
}));
|
49
|
-
|
49
|
+
return s;
|
50
|
+
}
|
51
|
+
var _default = createHighlight;
|
52
|
+
exports.default = _default;
|
@@ -21,7 +21,7 @@ import "core-js/modules/es.array.iterator.js";
|
|
21
21
|
import "core-js/modules/es.string.iterator.js";
|
22
22
|
import "core-js/modules/web.dom-collections.iterator.js";
|
23
23
|
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
24
|
-
import {
|
24
|
+
import { FILL_TYPE } from "../constants.mjs";
|
25
25
|
import VisualSelection from "../visualSelection.mjs";
|
26
26
|
/**
|
27
27
|
* Creates the new instance of Selection, responsible for highlighting cells which are covered by fill handle
|
@@ -30,15 +30,17 @@ import VisualSelection from "../visualSelection.mjs";
|
|
30
30
|
* @param {object} highlightParams A configuration object to create a highlight.
|
31
31
|
* @returns {Selection}
|
32
32
|
*/
|
33
|
-
|
33
|
+
function createHighlight(_ref) {
|
34
34
|
var restOptions = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
35
|
-
|
35
|
+
var s = new VisualSelection(_objectSpread(_objectSpread({
|
36
36
|
className: 'fill',
|
37
37
|
border: {
|
38
38
|
width: 1,
|
39
39
|
color: '#ff0000'
|
40
40
|
}
|
41
41
|
}, restOptions), {}, {
|
42
|
-
selectionType:
|
42
|
+
selectionType: FILL_TYPE
|
43
43
|
}));
|
44
|
-
|
44
|
+
return s;
|
45
|
+
}
|
46
|
+
export default createHighlight;
|
@@ -18,10 +18,10 @@ 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
|
-
var _excluded = ["headerClassName"];
|
24
|
+
var _excluded = ["headerClassName", "rowClassName", "columnClassName"];
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
26
26
|
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; }
|
27
27
|
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; }
|
@@ -31,20 +31,30 @@ 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
|
35
|
-
*
|
36
|
-
* This type of selection can occur multiple times.
|
34
|
+
* Creates the new instance of Selection, responsible for highlighting row and column headers. This type of selection
|
35
|
+
* can occur multiple times.
|
37
36
|
*
|
38
37
|
* @param {object} highlightParams A configuration object to create a highlight.
|
39
38
|
* @param {string} highlightParams.headerClassName Highlighted headers' class name.
|
39
|
+
* @param {string} highlightParams.rowClassName Highlighted row' class name.
|
40
|
+
* @param {string} highlightParams.columnClassName Highlighted column' class name.
|
40
41
|
* @returns {Selection}
|
41
42
|
*/
|
42
43
|
function createHighlight(_ref) {
|
43
44
|
var headerClassName = _ref.headerClassName,
|
45
|
+
rowClassName = _ref.rowClassName,
|
46
|
+
columnClassName = _ref.columnClassName,
|
44
47
|
restOptions = _objectWithoutProperties(_ref, _excluded);
|
45
|
-
|
46
|
-
className:
|
48
|
+
var s = new _visualSelection.default(_objectSpread(_objectSpread({
|
49
|
+
className: 'highlight',
|
50
|
+
highlightHeaderClassName: headerClassName,
|
51
|
+
highlightRowClassName: rowClassName,
|
52
|
+
highlightColumnClassName: columnClassName
|
47
53
|
}, restOptions), {}, {
|
48
|
-
|
54
|
+
highlightOnlyClosestHeader: true,
|
55
|
+
selectionType: _constants.HEADER_TYPE
|
49
56
|
}));
|
50
|
-
|
57
|
+
return s;
|
58
|
+
}
|
59
|
+
var _default = createHighlight;
|
60
|
+
exports.default = _default;
|
@@ -15,7 +15,7 @@ import "core-js/modules/es.symbol.iterator.js";
|
|
15
15
|
import "core-js/modules/es.array.iterator.js";
|
16
16
|
import "core-js/modules/es.string.iterator.js";
|
17
17
|
import "core-js/modules/web.dom-collections.iterator.js";
|
18
|
-
var _excluded = ["headerClassName"];
|
18
|
+
var _excluded = ["headerClassName", "rowClassName", "columnClassName"];
|
19
19
|
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; }
|
20
20
|
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; }
|
21
21
|
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; }
|
@@ -23,23 +23,32 @@ 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 { HEADER_TYPE } from "../constants.mjs";
|
27
27
|
import VisualSelection from "../visualSelection.mjs";
|
28
28
|
/**
|
29
|
-
* Creates the new instance of Selection, responsible for highlighting
|
30
|
-
*
|
31
|
-
* This type of selection can occur multiple times.
|
29
|
+
* Creates the new instance of Selection, responsible for highlighting row and column headers. This type of selection
|
30
|
+
* can occur multiple times.
|
32
31
|
*
|
33
32
|
* @param {object} highlightParams A configuration object to create a highlight.
|
34
33
|
* @param {string} highlightParams.headerClassName Highlighted headers' class name.
|
34
|
+
* @param {string} highlightParams.rowClassName Highlighted row' class name.
|
35
|
+
* @param {string} highlightParams.columnClassName Highlighted column' class name.
|
35
36
|
* @returns {Selection}
|
36
37
|
*/
|
37
|
-
|
38
|
+
function createHighlight(_ref) {
|
38
39
|
var headerClassName = _ref.headerClassName,
|
40
|
+
rowClassName = _ref.rowClassName,
|
41
|
+
columnClassName = _ref.columnClassName,
|
39
42
|
restOptions = _objectWithoutProperties(_ref, _excluded);
|
40
|
-
|
41
|
-
className:
|
43
|
+
var s = new VisualSelection(_objectSpread(_objectSpread({
|
44
|
+
className: 'highlight',
|
45
|
+
highlightHeaderClassName: headerClassName,
|
46
|
+
highlightRowClassName: rowClassName,
|
47
|
+
highlightColumnClassName: columnClassName
|
42
48
|
}, restOptions), {}, {
|
43
|
-
|
49
|
+
highlightOnlyClosestHeader: true,
|
50
|
+
selectionType: HEADER_TYPE
|
44
51
|
}));
|
45
|
-
|
52
|
+
return s;
|
53
|
+
}
|
54
|
+
export default createHighlight;
|
@@ -1,14 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
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); }
|
4
3
|
require("core-js/modules/es.object.keys.js");
|
5
|
-
require("core-js/modules/es.array.index-of.js");
|
6
|
-
require("core-js/modules/es.symbol.js");
|
7
|
-
require("core-js/modules/es.symbol.to-primitive.js");
|
8
|
-
require("core-js/modules/es.date.to-primitive.js");
|
9
|
-
require("core-js/modules/es.symbol.description.js");
|
10
|
-
require("core-js/modules/es.object.to-string.js");
|
11
|
-
require("core-js/modules/es.number.constructor.js");
|
12
4
|
require("core-js/modules/es.array.filter.js");
|
13
5
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
14
6
|
require("core-js/modules/web.dom-collections.for-each.js");
|
@@ -19,32 +11,44 @@ require("core-js/modules/es.string.iterator.js");
|
|
19
11
|
require("core-js/modules/web.dom-collections.iterator.js");
|
20
12
|
exports.__esModule = true;
|
21
13
|
exports.createHighlight = createHighlight;
|
22
|
-
|
23
|
-
|
24
|
-
|
14
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
15
|
+
require("core-js/modules/es.date.to-primitive.js");
|
16
|
+
require("core-js/modules/es.symbol.js");
|
17
|
+
require("core-js/modules/es.symbol.description.js");
|
18
|
+
require("core-js/modules/es.object.to-string.js");
|
19
|
+
require("core-js/modules/es.number.constructor.js");
|
20
|
+
var _staticRegister2 = _interopRequireDefault(require("./../../../utils/staticRegister"));
|
21
|
+
var _constants = require("../constants");
|
22
|
+
var _activeHeader = _interopRequireDefault(require("./activeHeader"));
|
23
|
+
var _area = _interopRequireDefault(require("./area"));
|
24
|
+
var _cell = _interopRequireDefault(require("./cell"));
|
25
|
+
var _customSelection = _interopRequireDefault(require("./customSelection"));
|
26
|
+
var _fill = _interopRequireDefault(require("./fill"));
|
27
|
+
var _header = _interopRequireDefault(require("./header"));
|
25
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
29
|
+
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); }
|
26
30
|
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; }
|
27
31
|
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; }
|
28
32
|
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; }
|
29
33
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
30
34
|
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); }
|
31
|
-
|
32
|
-
|
35
|
+
var _staticRegister = (0, _staticRegister2.default)('highlight/types'),
|
36
|
+
register = _staticRegister.register,
|
37
|
+
getItem = _staticRegister.getItem;
|
38
|
+
register(_constants.ACTIVE_HEADER_TYPE, _activeHeader.default);
|
39
|
+
register(_constants.AREA_TYPE, _area.default);
|
40
|
+
register(_constants.CELL_TYPE, _cell.default);
|
41
|
+
register(_constants.CUSTOM_SELECTION_TYPE, _customSelection.default);
|
42
|
+
register(_constants.FILL_TYPE, _fill.default);
|
43
|
+
register(_constants.HEADER_TYPE, _header.default);
|
44
|
+
|
33
45
|
/**
|
34
|
-
*
|
35
|
-
*
|
36
|
-
* This type of selection can occur multiple times.
|
37
|
-
*
|
38
|
-
* @param {object} highlightParams A configuration object to create a highlight.
|
39
|
-
* @param {string} highlightParams.rowClassName Highlighted row' class name.
|
46
|
+
* @param {string} highlightType The selection type.
|
47
|
+
* @param {object} options The selection options.
|
40
48
|
* @returns {Selection}
|
41
49
|
*/
|
42
|
-
function createHighlight(
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
className: rowClassName
|
47
|
-
}, restOptions), {}, {
|
48
|
-
selectionType: _src.HIGHLIGHT_ROW_TYPE
|
49
|
-
}));
|
50
|
+
function createHighlight(highlightType, options) {
|
51
|
+
return getItem(highlightType)(_objectSpread({
|
52
|
+
type: highlightType
|
53
|
+
}, options));
|
50
54
|
}
|