handsontable 0.0.0-next-ecc62fd-20230525 → 0.0.0-next-93e34dc-20230601
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 +328 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +322 -0
- package/3rdparty/walkontable/src/selection/scanner.js +363 -0
- package/3rdparty/walkontable/src/selection/scanner.mjs +359 -0
- package/3rdparty/walkontable/src/selection/selection.js +133 -0
- package/3rdparty/walkontable/src/selection/selection.mjs +127 -0
- package/3rdparty/walkontable/src/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/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +5 -3
- package/core.js +82 -300
- package/core.mjs +82 -300
- package/dataMap/metaManager/metaSchema.js +15 -0
- package/dataMap/metaManager/metaSchema.mjs +15 -0
- package/dist/handsontable.css +8 -3
- package/dist/handsontable.full.css +8 -3
- package/dist/handsontable.full.js +12245 -9953
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +120 -120
- package/dist/handsontable.js +15898 -13606
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +4 -4
- package/editorManager.js +20 -82
- package/editorManager.mjs +25 -86
- package/editors/textEditor/textEditor.js +3 -11
- package/editors/textEditor/textEditor.mjs +4 -12
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- 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.js +1 -1
- package/pluginHooks.mjs +1 -1
- package/plugins/copyPaste/copyPaste.js +5 -1
- package/plugins/copyPaste/copyPaste.mjs +5 -1
- package/plugins/customBorders/customBorders.js +18 -52
- package/plugins/customBorders/customBorders.mjs +19 -53
- package/plugins/mergeCells/mergeCells.js +5 -18
- package/plugins/mergeCells/mergeCells.mjs +5 -18
- package/plugins/nestedHeaders/nestedHeaders.js +89 -9
- package/plugins/nestedHeaders/nestedHeaders.mjs +89 -9
- package/plugins/nestedHeaders/stateManager/index.js +37 -0
- package/plugins/nestedHeaders/stateManager/index.mjs +37 -0
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
- package/selection/highlight/highlight.js +311 -88
- package/selection/highlight/highlight.mjs +301 -84
- 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 +23 -28
- package/selection/highlight/visualSelection.mjs +23 -28
- 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 +296 -180
- package/selection/selection.mjs +291 -179
- package/selection/transformation.js +233 -96
- package/selection/transformation.mjs +230 -93
- package/selection/utils.js +12 -35
- package/selection/utils.mjs +13 -35
- 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 +24 -0
- package/shortcutContexts/commands/extendCellsSelection/index.mjs +20 -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/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 +39 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +34 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +39 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +34 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +22 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +17 -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 +51 -0
- package/shortcutContexts/commands/index.mjs +47 -0
- package/shortcutContexts/commands/moveCellSelection/down.js +12 -0
- package/shortcutContexts/commands/moveCellSelection/down.mjs +7 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +11 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +6 -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 +35 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +30 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +35 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +30 -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 +11 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +6 -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 +232 -0
- package/shortcutContexts/grid.mjs +228 -0
- package/shortcutContexts/index.js +29 -0
- package/shortcutContexts/index.mjs +15 -0
- package/tableView.js +58 -9
- package/tableView.mjs +58 -9
- package/3rdparty/walkontable/src/selection.js +0 -354
- package/3rdparty/walkontable/src/selection.mjs +0 -348
- package/selection/highlight/constants.js +0 -16
- package/selection/highlight/constants.mjs +0 -6
@@ -34,16 +34,16 @@ var Event = /*#__PURE__*/function () {
|
|
34
34
|
* @param {Settings} wtSettings The walkontable settings.
|
35
35
|
* @param {EventManager} eventManager The walkontable event manager.
|
36
36
|
* @param {Table} wtTable The table.
|
37
|
-
* @param {
|
37
|
+
* @param {SelectionManager} selectionManager Selections.
|
38
38
|
* @param {Event} [parent=null] The main Event instance.
|
39
39
|
*/
|
40
|
-
function Event(facadeGetter, domBindings, wtSettings, eventManager, wtTable,
|
40
|
+
function Event(facadeGetter, domBindings, wtSettings, eventManager, wtTable, selectionManager) {
|
41
41
|
var parent = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
|
42
42
|
_classCallCheck(this, Event);
|
43
43
|
this.wtSettings = wtSettings;
|
44
44
|
this.domBindings = domBindings;
|
45
45
|
this.wtTable = wtTable;
|
46
|
-
this.
|
46
|
+
this.selectionManager = selectionManager;
|
47
47
|
this.parent = parent;
|
48
48
|
|
49
49
|
/**
|
@@ -176,11 +176,11 @@ var Event = /*#__PURE__*/function () {
|
|
176
176
|
cell.coords = this.wtTable.getCoords(TD);
|
177
177
|
cell.TD = TD;
|
178
178
|
} else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'current')) {
|
179
|
-
cell.coords = this.
|
179
|
+
cell.coords = this.selectionManager.getFocusSelection().cellRange.highlight;
|
180
180
|
cell.TD = this.wtTable.getCell(cell.coords);
|
181
181
|
} else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'area')) {
|
182
|
-
if (this.
|
183
|
-
cell.coords = this.
|
182
|
+
if (this.selectionManager.getAreaSelection().cellRange) {
|
183
|
+
cell.coords = this.selectionManager.getAreaSelection().cellRange.to;
|
184
184
|
cell.TD = this.wtTable.getCell(cell.coords);
|
185
185
|
}
|
186
186
|
}
|
@@ -330,7 +330,7 @@ var Event = /*#__PURE__*/function () {
|
|
330
330
|
key: "onTouchStart",
|
331
331
|
value: function onTouchStart(event) {
|
332
332
|
var priv = privatePool.get(this);
|
333
|
-
priv.selectedCellBeforeTouchEnd = this.
|
333
|
+
priv.selectedCellBeforeTouchEnd = this.selectionManager.getFocusSelection().cellRange;
|
334
334
|
this.touchApplied = true;
|
335
335
|
this.onMouseDown(event);
|
336
336
|
}
|
@@ -82,9 +82,9 @@ var WalkontableFacade = /*#__PURE__*/function () {
|
|
82
82
|
return this._wot.cloneOverlay; // todo create facade
|
83
83
|
}
|
84
84
|
}, {
|
85
|
-
key: "
|
85
|
+
key: "selectionManager",
|
86
86
|
get: function get() {
|
87
|
-
return this._wot.
|
87
|
+
return this._wot.selectionManager; // todo create facade
|
88
88
|
}
|
89
89
|
}, {
|
90
90
|
key: "wtViewport",
|
@@ -77,9 +77,9 @@ var WalkontableFacade = /*#__PURE__*/function () {
|
|
77
77
|
return this._wot.cloneOverlay; // todo create facade
|
78
78
|
}
|
79
79
|
}, {
|
80
|
-
key: "
|
80
|
+
key: "selectionManager",
|
81
81
|
get: function get() {
|
82
|
-
return this._wot.
|
82
|
+
return this._wot.selectionManager; // todo create facade
|
83
83
|
}
|
84
84
|
}, {
|
85
85
|
key: "wtViewport",
|
@@ -23,8 +23,16 @@ exports.CellRange = _range.default;
|
|
23
23
|
var _core = _interopRequireDefault(require("./facade/core"));
|
24
24
|
exports.default = _core.default;
|
25
25
|
exports.Core = _core.default;
|
26
|
-
var _selection =
|
27
|
-
exports.Selection = _selection.
|
26
|
+
var _selection = require("./selection");
|
27
|
+
exports.Selection = _selection.Selection;
|
28
|
+
exports.HIGHLIGHT_ACTIVE_HEADER_TYPE = _selection.ACTIVE_HEADER_TYPE;
|
29
|
+
exports.HIGHLIGHT_AREA_TYPE = _selection.AREA_TYPE;
|
30
|
+
exports.HIGHLIGHT_FOCUS_TYPE = _selection.FOCUS_TYPE;
|
31
|
+
exports.HIGHLIGHT_FILL_TYPE = _selection.FILL_TYPE;
|
32
|
+
exports.HIGHLIGHT_HEADER_TYPE = _selection.HEADER_TYPE;
|
33
|
+
exports.HIGHLIGHT_ROW_TYPE = _selection.ROW_TYPE;
|
34
|
+
exports.HIGHLIGHT_COLUMN_TYPE = _selection.COLUMN_TYPE;
|
35
|
+
exports.HIGHLIGHT_CUSTOM_SELECTION_TYPE = _selection.CUSTOM_SELECTION_TYPE;
|
28
36
|
var Renderer = _interopRequireWildcard(require("./renderer"));
|
29
37
|
exports.Renderer = Renderer;
|
30
38
|
var _orderView = require("./utils/orderView");
|
@@ -3,8 +3,8 @@ import ViewportRowsCalculator from "./calculator/viewportRows.mjs";
|
|
3
3
|
import CellCoords from "./cell/coords.mjs";
|
4
4
|
import CellRange from "./cell/range.mjs";
|
5
5
|
import Walkontable from "./facade/core.mjs";
|
6
|
-
import Selection from "./selection.mjs";
|
6
|
+
import { Selection, ACTIVE_HEADER_TYPE, AREA_TYPE, FOCUS_TYPE, FILL_TYPE, HEADER_TYPE, ROW_TYPE, COLUMN_TYPE, CUSTOM_SELECTION_TYPE } from "./selection/index.mjs";
|
7
7
|
import * as Renderer from "./renderer/index.mjs";
|
8
8
|
import { OrderView, SharedOrderView } from "./utils/orderView/index.mjs";
|
9
9
|
import { getListenersCounter } from "../../../eventManager.mjs";
|
10
|
-
export { ViewportColumnsCalculator, ViewportRowsCalculator, CellCoords, CellRange, Walkontable as default, Walkontable as Core, Selection, Renderer, OrderView, SharedOrderView, getListenersCounter };
|
10
|
+
export { ViewportColumnsCalculator, ViewportRowsCalculator, CellCoords, CellRange, Walkontable as default, Walkontable as Core, Selection, ACTIVE_HEADER_TYPE as HIGHLIGHT_ACTIVE_HEADER_TYPE, AREA_TYPE as HIGHLIGHT_AREA_TYPE, FOCUS_TYPE as HIGHLIGHT_FOCUS_TYPE, FILL_TYPE as HIGHLIGHT_FILL_TYPE, HEADER_TYPE as HIGHLIGHT_HEADER_TYPE, ROW_TYPE as HIGHLIGHT_ROW_TYPE, COLUMN_TYPE as HIGHLIGHT_COLUMN_TYPE, CUSTOM_SELECTION_TYPE as HIGHLIGHT_CUSTOM_SELECTION_TYPE, Renderer, OrderView, SharedOrderView, getListenersCounter };
|
@@ -307,7 +307,7 @@ var Overlay = /*#__PURE__*/function () {
|
|
307
307
|
// todo ioc , or factor func if used only here
|
308
308
|
event: this.wot.wtEvent,
|
309
309
|
// todo ioc , or factory func if used only here
|
310
|
-
|
310
|
+
selectionManager: this.wot.selectionManager // todo ioc , or factory func if used only here
|
311
311
|
});
|
312
312
|
}
|
313
313
|
|
@@ -302,7 +302,7 @@ export var Overlay = /*#__PURE__*/function () {
|
|
302
302
|
// todo ioc , or factor func if used only here
|
303
303
|
event: this.wot.wtEvent,
|
304
304
|
// todo ioc , or factory func if used only here
|
305
|
-
|
305
|
+
selectionManager: this.wot.selectionManager // todo ioc , or factory func if used only here
|
306
306
|
});
|
307
307
|
}
|
308
308
|
|
@@ -19,6 +19,7 @@ require("core-js/modules/es.object.get-prototype-of.js");
|
|
19
19
|
var _element = require("../../../../helpers/dom/element");
|
20
20
|
var _inlineStart = _interopRequireDefault(require("../table/inlineStart"));
|
21
21
|
var _base = require("./_base");
|
22
|
+
var _selection = require("../selection");
|
22
23
|
var _constants = require("./constants");
|
23
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
24
25
|
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
@@ -211,11 +212,8 @@ var InlineStartOverlay = /*#__PURE__*/function (_Overlay) {
|
|
211
212
|
}, {
|
212
213
|
key: "adjustRootChildrenSize",
|
213
214
|
value: function adjustRootChildrenSize() {
|
214
|
-
var _selections$getCell$g;
|
215
215
|
var holder = this.clone.wtTable.holder;
|
216
|
-
var
|
217
|
-
var facade = this.facadeGetter();
|
218
|
-
var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(facade).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);
|
216
|
+
var selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(_selection.CORNER_DEFAULT_STYLE.width, 10) / 2 : 0;
|
219
217
|
this.clone.wtTable.hider.style.height = this.hider.style.height;
|
220
218
|
holder.style.height = holder.parentNode.style.height;
|
221
219
|
// Add selection corner protruding part to the holder total width to make sure that
|
@@ -28,6 +28,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
28
28
|
import { addClass, getScrollbarWidth, getScrollLeft, getWindowScrollTop, hasClass, outerWidth, removeClass, setOverlayPosition, resetCssTransform } from "../../../../helpers/dom/element.mjs";
|
29
29
|
import InlineStartOverlayTable from "../table/inlineStart.mjs";
|
30
30
|
import { Overlay } from "./_base.mjs";
|
31
|
+
import { CORNER_DEFAULT_STYLE } from "../selection/index.mjs";
|
31
32
|
import { CLONE_INLINE_START } from "./constants.mjs";
|
32
33
|
/**
|
33
34
|
* @class InlineStartOverlay
|
@@ -206,11 +207,8 @@ export var InlineStartOverlay = /*#__PURE__*/function (_Overlay) {
|
|
206
207
|
}, {
|
207
208
|
key: "adjustRootChildrenSize",
|
208
209
|
value: function adjustRootChildrenSize() {
|
209
|
-
var _selections$getCell$g;
|
210
210
|
var holder = this.clone.wtTable.holder;
|
211
|
-
var
|
212
|
-
var facade = this.facadeGetter();
|
213
|
-
var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(facade).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);
|
211
|
+
var selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(CORNER_DEFAULT_STYLE.width, 10) / 2 : 0;
|
214
212
|
this.clone.wtTable.hider.style.height = this.hider.style.height;
|
215
213
|
holder.style.height = holder.parentNode.style.height;
|
216
214
|
// Add selection corner protruding part to the holder total width to make sure that
|
@@ -18,6 +18,7 @@ require("core-js/modules/es.number.constructor.js");
|
|
18
18
|
var _element = require("../../../../helpers/dom/element");
|
19
19
|
var _top = _interopRequireDefault(require("./../table/top"));
|
20
20
|
var _base = require("./_base");
|
21
|
+
var _selection = require("../selection");
|
21
22
|
var _constants = require("./constants");
|
22
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
24
|
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); }
|
@@ -240,11 +241,8 @@ var TopOverlay = /*#__PURE__*/function (_Overlay) {
|
|
240
241
|
}, {
|
241
242
|
key: "adjustRootChildrenSize",
|
242
243
|
value: function adjustRootChildrenSize() {
|
243
|
-
var _selections$getCell$g;
|
244
244
|
var holder = this.clone.wtTable.holder;
|
245
|
-
var
|
246
|
-
var facade = this.facadeGetter();
|
247
|
-
var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(facade).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);
|
245
|
+
var selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(_selection.CORNER_DEFAULT_STYLE.height, 10) / 2 : 0;
|
248
246
|
this.clone.wtTable.hider.style.width = this.hider.style.width;
|
249
247
|
holder.style.width = holder.parentNode.style.width;
|
250
248
|
// Add selection corner protruding part to the holder total height to make sure that
|
@@ -29,6 +29,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
29
29
|
import { addClass, getScrollbarWidth, getScrollTop, getWindowScrollLeft, hasClass, outerHeight, removeClass, setOverlayPosition, resetCssTransform } from "../../../../helpers/dom/element.mjs";
|
30
30
|
import TopOverlayTable from "./../table/top.mjs";
|
31
31
|
import { Overlay } from "./_base.mjs";
|
32
|
+
import { CORNER_DEFAULT_STYLE } from "../selection/index.mjs";
|
32
33
|
import { CLONE_TOP } from "./constants.mjs";
|
33
34
|
/**
|
34
35
|
* @class TopOverlay
|
@@ -235,11 +236,8 @@ export var TopOverlay = /*#__PURE__*/function (_Overlay) {
|
|
235
236
|
}, {
|
236
237
|
key: "adjustRootChildrenSize",
|
237
238
|
value: function adjustRootChildrenSize() {
|
238
|
-
var _selections$getCell$g;
|
239
239
|
var holder = this.clone.wtTable.holder;
|
240
|
-
var
|
241
|
-
var facade = this.facadeGetter();
|
242
|
-
var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(facade).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);
|
240
|
+
var selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(CORNER_DEFAULT_STYLE.height, 10) / 2 : 0;
|
243
241
|
this.clone.wtTable.hider.style.width = this.hider.style.width;
|
244
242
|
holder.style.width = holder.parentNode.style.width;
|
245
243
|
// Add selection corner protruding part to the holder total height to make sure that
|
@@ -17,10 +17,11 @@ require("core-js/modules/es.symbol.js");
|
|
17
17
|
require("core-js/modules/es.symbol.description.js");
|
18
18
|
require("core-js/modules/es.object.to-string.js");
|
19
19
|
require("core-js/modules/es.number.constructor.js");
|
20
|
-
var _element = require("
|
21
|
-
var _event = require("
|
22
|
-
var _object = require("
|
23
|
-
var _browser = require("
|
20
|
+
var _element = require("../../../../../helpers/dom/element");
|
21
|
+
var _event = require("../../../../../helpers/dom/event");
|
22
|
+
var _object = require("../../../../../helpers/object");
|
23
|
+
var _browser = require("../../../../../helpers/browser");
|
24
|
+
var _constants = require("./constants");
|
24
25
|
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); }
|
25
26
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
26
27
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -63,13 +64,7 @@ var Border = /*#__PURE__*/function () {
|
|
63
64
|
this.bottomStyle = null;
|
64
65
|
this.startStyle = null;
|
65
66
|
this.endStyle = null;
|
66
|
-
this.cornerDefaultStyle =
|
67
|
-
width: '6px',
|
68
|
-
height: '6px',
|
69
|
-
borderWidth: '1px',
|
70
|
-
borderStyle: 'solid',
|
71
|
-
borderColor: '#FFF'
|
72
|
-
};
|
67
|
+
this.cornerDefaultStyle = _constants.CORNER_DEFAULT_STYLE;
|
73
68
|
// Offset to moving the corner to be centered relative to the grid.
|
74
69
|
this.cornerCenterPointOffset = -(parseInt(this.cornerDefaultStyle.width, 10) / 2);
|
75
70
|
this.corner = null;
|
@@ -298,7 +293,7 @@ var Border = /*#__PURE__*/function () {
|
|
298
293
|
}, {
|
299
294
|
key: "isPartRange",
|
300
295
|
value: function isPartRange(row, col) {
|
301
|
-
var areaSelection = this.wot.
|
296
|
+
var areaSelection = this.wot.selectionManager.getAreaSelection();
|
302
297
|
if (areaSelection.cellRange) {
|
303
298
|
if (row !== areaSelection.cellRange.to.row || col !== areaSelection.cellRange.to.col) {
|
304
299
|
return true;
|
@@ -25,10 +25,11 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
25
25
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
26
26
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
27
27
|
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); }
|
28
|
-
import { addClass, hasClass, removeClass, getComputedStyle, getTrimmingContainer, innerWidth, innerHeight, offset, outerHeight, outerWidth } from "
|
29
|
-
import { stopImmediatePropagation } from "
|
30
|
-
import { objectEach } from "
|
31
|
-
import { isMobileBrowser } from "
|
28
|
+
import { addClass, hasClass, removeClass, getComputedStyle, getTrimmingContainer, innerWidth, innerHeight, offset, outerHeight, outerWidth } from "../../../../../helpers/dom/element.mjs";
|
29
|
+
import { stopImmediatePropagation } from "../../../../../helpers/dom/event.mjs";
|
30
|
+
import { objectEach } from "../../../../../helpers/object.mjs";
|
31
|
+
import { isMobileBrowser } from "../../../../../helpers/browser.mjs";
|
32
|
+
import { CORNER_DEFAULT_STYLE } from "./constants.mjs";
|
32
33
|
/**
|
33
34
|
*
|
34
35
|
*/
|
@@ -59,13 +60,7 @@ var Border = /*#__PURE__*/function () {
|
|
59
60
|
this.bottomStyle = null;
|
60
61
|
this.startStyle = null;
|
61
62
|
this.endStyle = null;
|
62
|
-
this.cornerDefaultStyle =
|
63
|
-
width: '6px',
|
64
|
-
height: '6px',
|
65
|
-
borderWidth: '1px',
|
66
|
-
borderStyle: 'solid',
|
67
|
-
borderColor: '#FFF'
|
68
|
-
};
|
63
|
+
this.cornerDefaultStyle = CORNER_DEFAULT_STYLE;
|
69
64
|
// Offset to moving the corner to be centered relative to the grid.
|
70
65
|
this.cornerCenterPointOffset = -(parseInt(this.cornerDefaultStyle.width, 10) / 2);
|
71
66
|
this.corner = null;
|
@@ -294,7 +289,7 @@ var Border = /*#__PURE__*/function () {
|
|
294
289
|
}, {
|
295
290
|
key: "isPartRange",
|
296
291
|
value: function isPartRange(row, col) {
|
297
|
-
var areaSelection = this.wot.
|
292
|
+
var areaSelection = this.wot.selectionManager.getAreaSelection();
|
298
293
|
if (areaSelection.cellRange) {
|
299
294
|
if (row !== areaSelection.cellRange.to.row || col !== areaSelection.cellRange.to.col) {
|
300
295
|
return true;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.CORNER_DEFAULT_STYLE = void 0;
|
5
|
+
require("core-js/modules/es.object.freeze.js");
|
6
|
+
/**
|
7
|
+
* Default border corner style.
|
8
|
+
*
|
9
|
+
* @type {object}
|
10
|
+
*/
|
11
|
+
var CORNER_DEFAULT_STYLE = Object.freeze({
|
12
|
+
width: '6px',
|
13
|
+
height: '6px',
|
14
|
+
borderWidth: '1px',
|
15
|
+
borderStyle: 'solid',
|
16
|
+
borderColor: '#FFF'
|
17
|
+
});
|
18
|
+
exports.CORNER_DEFAULT_STYLE = CORNER_DEFAULT_STYLE;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import "core-js/modules/es.object.freeze.js";
|
2
|
+
/**
|
3
|
+
* Default border corner style.
|
4
|
+
*
|
5
|
+
* @type {object}
|
6
|
+
*/
|
7
|
+
export var CORNER_DEFAULT_STYLE = Object.freeze({
|
8
|
+
width: '6px',
|
9
|
+
height: '6px',
|
10
|
+
borderWidth: '1px',
|
11
|
+
borderStyle: 'solid',
|
12
|
+
borderColor: '#FFF'
|
13
|
+
});
|
@@ -0,0 +1,63 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.ROW_TYPE = exports.HEADER_TYPE = exports.FOCUS_TYPE = exports.FILL_TYPE = exports.CUSTOM_SELECTION_TYPE = exports.COLUMN_TYPE = exports.AREA_TYPE = exports.ACTIVE_HEADER_TYPE = void 0;
|
5
|
+
/**
|
6
|
+
* Selection type that is visible only if the row or column header is clicked. If that happened
|
7
|
+
* all row or column header layers are highlighted.
|
8
|
+
*
|
9
|
+
* @type {string}
|
10
|
+
*/
|
11
|
+
var ACTIVE_HEADER_TYPE = 'active-header';
|
12
|
+
/**
|
13
|
+
* Selection type that is visible only if the a cell or cells are clicked. If that happened
|
14
|
+
* only the most closest to the cells row or column header is highlighted.
|
15
|
+
*
|
16
|
+
* @type {string}
|
17
|
+
*/
|
18
|
+
exports.ACTIVE_HEADER_TYPE = ACTIVE_HEADER_TYPE;
|
19
|
+
var HEADER_TYPE = 'header';
|
20
|
+
/**
|
21
|
+
* Selection type that is visible when a cell or cells are clicked. The selected cells are
|
22
|
+
* highlighted.
|
23
|
+
*
|
24
|
+
* @type {string}
|
25
|
+
*/
|
26
|
+
exports.HEADER_TYPE = HEADER_TYPE;
|
27
|
+
var AREA_TYPE = 'area';
|
28
|
+
/**
|
29
|
+
* Selection type defines a cell that follows the user (keyboard navigation).
|
30
|
+
*
|
31
|
+
* @type {string}
|
32
|
+
*/
|
33
|
+
exports.AREA_TYPE = AREA_TYPE;
|
34
|
+
var FOCUS_TYPE = 'focus';
|
35
|
+
/**
|
36
|
+
* Selection type defines borders for the autofill functionality.
|
37
|
+
*
|
38
|
+
* @type {string}
|
39
|
+
*/
|
40
|
+
exports.FOCUS_TYPE = FOCUS_TYPE;
|
41
|
+
var FILL_TYPE = 'fill';
|
42
|
+
/**
|
43
|
+
* Selection type defines highlights for the `currentRowClassName` option.
|
44
|
+
*
|
45
|
+
* @type {string}
|
46
|
+
*/
|
47
|
+
exports.FILL_TYPE = FILL_TYPE;
|
48
|
+
var ROW_TYPE = 'row';
|
49
|
+
/**
|
50
|
+
* Selection type defines highlights for the `currentColumnClassName` option.
|
51
|
+
*
|
52
|
+
* @type {string}
|
53
|
+
*/
|
54
|
+
exports.ROW_TYPE = ROW_TYPE;
|
55
|
+
var COLUMN_TYPE = 'column';
|
56
|
+
/**
|
57
|
+
* Selection type defines highlights managed by the CustomBorders plugin.
|
58
|
+
*
|
59
|
+
* @type {string}
|
60
|
+
*/
|
61
|
+
exports.COLUMN_TYPE = COLUMN_TYPE;
|
62
|
+
var CUSTOM_SELECTION_TYPE = 'custom-selection';
|
63
|
+
exports.CUSTOM_SELECTION_TYPE = CUSTOM_SELECTION_TYPE;
|
@@ -0,0 +1,51 @@
|
|
1
|
+
/**
|
2
|
+
* Selection type that is visible only if the row or column header is clicked. If that happened
|
3
|
+
* all row or column header layers are highlighted.
|
4
|
+
*
|
5
|
+
* @type {string}
|
6
|
+
*/
|
7
|
+
export var ACTIVE_HEADER_TYPE = 'active-header';
|
8
|
+
/**
|
9
|
+
* Selection type that is visible only if the a cell or cells are clicked. If that happened
|
10
|
+
* only the most closest to the cells row or column header is highlighted.
|
11
|
+
*
|
12
|
+
* @type {string}
|
13
|
+
*/
|
14
|
+
export var HEADER_TYPE = 'header';
|
15
|
+
/**
|
16
|
+
* Selection type that is visible when a cell or cells are clicked. The selected cells are
|
17
|
+
* highlighted.
|
18
|
+
*
|
19
|
+
* @type {string}
|
20
|
+
*/
|
21
|
+
export var AREA_TYPE = 'area';
|
22
|
+
/**
|
23
|
+
* Selection type defines a cell that follows the user (keyboard navigation).
|
24
|
+
*
|
25
|
+
* @type {string}
|
26
|
+
*/
|
27
|
+
export var FOCUS_TYPE = 'focus';
|
28
|
+
/**
|
29
|
+
* Selection type defines borders for the autofill functionality.
|
30
|
+
*
|
31
|
+
* @type {string}
|
32
|
+
*/
|
33
|
+
export var FILL_TYPE = 'fill';
|
34
|
+
/**
|
35
|
+
* Selection type defines highlights for the `currentRowClassName` option.
|
36
|
+
*
|
37
|
+
* @type {string}
|
38
|
+
*/
|
39
|
+
export var ROW_TYPE = 'row';
|
40
|
+
/**
|
41
|
+
* Selection type defines highlights for the `currentColumnClassName` option.
|
42
|
+
*
|
43
|
+
* @type {string}
|
44
|
+
*/
|
45
|
+
export var COLUMN_TYPE = 'column';
|
46
|
+
/**
|
47
|
+
* Selection type defines highlights managed by the CustomBorders plugin.
|
48
|
+
*
|
49
|
+
* @type {string}
|
50
|
+
*/
|
51
|
+
export var CUSTOM_SELECTION_TYPE = 'custom-selection';
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
require("core-js/modules/es.object.to-string.js");
|
4
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
5
|
+
require("core-js/modules/es.object.keys.js");
|
6
|
+
exports.__esModule = true;
|
7
|
+
var _exportNames = {
|
8
|
+
SelectionManager: true,
|
9
|
+
Selection: true
|
10
|
+
};
|
11
|
+
exports.SelectionManager = void 0;
|
12
|
+
var _selection = _interopRequireDefault(require("./selection"));
|
13
|
+
exports.Selection = _selection.default;
|
14
|
+
var _constants = require("./constants");
|
15
|
+
Object.keys(_constants).forEach(function (key) {
|
16
|
+
if (key === "default" || key === "__esModule") return;
|
17
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
18
|
+
if (key in exports && exports[key] === _constants[key]) return;
|
19
|
+
exports[key] = _constants[key];
|
20
|
+
});
|
21
|
+
var _constants2 = require("./border/constants");
|
22
|
+
Object.keys(_constants2).forEach(function (key) {
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
24
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
25
|
+
if (key in exports && exports[key] === _constants2[key]) return;
|
26
|
+
exports[key] = _constants2[key];
|
27
|
+
});
|
28
|
+
var _manager = require("./manager");
|
29
|
+
exports.SelectionManager = _manager.SelectionManager;
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|