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