handsontable 0.0.0-next-bfb0e3a-20240403 → 0.0.0-next-5a535ed-20240403
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +17 -12
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +17 -12
- package/3rdparty/walkontable/src/calculator/viewportRows.js +15 -10
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +15 -10
- package/3rdparty/walkontable/src/cell/coords.js +17 -12
- package/3rdparty/walkontable/src/cell/coords.mjs +17 -12
- package/3rdparty/walkontable/src/cell/range.d.ts +1 -2
- package/3rdparty/walkontable/src/cell/range.js +28 -40
- package/3rdparty/walkontable/src/cell/range.mjs +28 -40
- package/3rdparty/walkontable/src/core/_base.js +1 -1
- package/3rdparty/walkontable/src/core/_base.mjs +1 -1
- package/3rdparty/walkontable/src/event.js +104 -72
- package/3rdparty/walkontable/src/event.mjs +104 -72
- package/3rdparty/walkontable/src/overlays.js +1 -1
- package/3rdparty/walkontable/src/overlays.mjs +1 -1
- package/3rdparty/walkontable/src/scroll.js +17 -15
- package/3rdparty/walkontable/src/scroll.mjs +17 -15
- package/3rdparty/walkontable/src/selection/manager.js +69 -48
- package/3rdparty/walkontable/src/selection/manager.mjs +69 -48
- package/3rdparty/walkontable/src/selection/scanner.js +42 -33
- package/3rdparty/walkontable/src/selection/scanner.mjs +42 -33
- package/3rdparty/walkontable/src/utils/columnStretching.js +44 -27
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +44 -27
- package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/viewportScroll/index.js +1 -4
- package/core/viewportScroll/index.mjs +1 -4
- package/core.d.ts +3 -4
- package/core.js +22 -77
- package/core.mjs +22 -77
- package/dataMap/dataSource.js +1 -1
- package/dataMap/dataSource.mjs +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
- package/dataMap/metaManager/metaSchema.js +1 -1
- package/dataMap/metaManager/metaSchema.mjs +1 -1
- package/dataMap/replaceData.js +1 -1
- package/dataMap/replaceData.mjs +1 -1
- package/dist/handsontable.css +4 -4
- package/dist/handsontable.full.css +4 -4
- package/dist/handsontable.full.js +9117 -8969
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +292 -292
- package/dist/handsontable.js +6569 -6874
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +25 -25
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/hr-HR.min.js +1 -1
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +23 -25
- package/editorManager.mjs +23 -25
- package/editors/autocompleteEditor/autocompleteEditor.js +10 -6
- package/editors/autocompleteEditor/autocompleteEditor.mjs +10 -6
- package/editors/selectEditor/selectEditor.js +19 -20
- package/editors/selectEditor/selectEditor.mjs +19 -20
- package/eventManager.js +1 -1
- package/eventManager.mjs +1 -1
- package/focusManager.js +82 -64
- package/focusManager.mjs +82 -64
- package/helpers/dom/element.js +1 -1
- package/helpers/dom/element.mjs +1 -1
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/object.js +2 -2
- package/helpers/object.mjs +2 -2
- package/index.d.ts +0 -10
- package/package.json +2 -7
- package/pluginHooks.d.ts +3 -4
- package/pluginHooks.js +38 -99
- package/pluginHooks.mjs +38 -99
- package/plugins/autoColumnSize/autoColumnSize.js +65 -49
- package/plugins/autoColumnSize/autoColumnSize.mjs +65 -49
- package/plugins/autoRowSize/autoRowSize.js +34 -28
- package/plugins/autoRowSize/autoRowSize.mjs +34 -28
- package/plugins/autofill/autofill.js +38 -30
- package/plugins/autofill/autofill.mjs +38 -30
- package/plugins/base/base.js +17 -12
- package/plugins/base/base.mjs +17 -12
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
- package/plugins/collapsibleColumns/collapsibleColumns.js +50 -59
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +50 -59
- package/plugins/columnSorting/columnSorting.js +45 -49
- package/plugins/columnSorting/columnSorting.mjs +45 -49
- package/plugins/columnSummary/columnSummary.js +26 -22
- package/plugins/columnSummary/columnSummary.mjs +26 -22
- package/plugins/comments/comments.js +158 -116
- package/plugins/comments/comments.mjs +158 -116
- package/plugins/contextMenu/contextMenu.js +26 -20
- package/plugins/contextMenu/contextMenu.mjs +26 -20
- package/plugins/contextMenu/itemsFactory.js +1 -1
- package/plugins/contextMenu/itemsFactory.mjs +1 -1
- package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
- package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
- package/plugins/contextMenu/menu/menu.js +21 -13
- package/plugins/contextMenu/menu/menu.mjs +21 -13
- package/plugins/contextMenu/menu/positioner.js +58 -41
- package/plugins/contextMenu/menu/positioner.mjs +58 -41
- package/plugins/copyPaste/copyPaste.js +157 -116
- package/plugins/copyPaste/copyPaste.mjs +157 -116
- package/plugins/copyPaste/copyableRanges.js +66 -43
- package/plugins/copyPaste/copyableRanges.mjs +66 -43
- package/plugins/customBorders/customBorders.js +13 -11
- package/plugins/customBorders/customBorders.mjs +13 -11
- package/plugins/dragToScroll/dragToScroll.js +6 -6
- package/plugins/dragToScroll/dragToScroll.mjs +6 -6
- package/plugins/dropdownMenu/dropdownMenu.js +106 -80
- package/plugins/dropdownMenu/dropdownMenu.mjs +106 -80
- package/plugins/exportFile/dataProvider.js +1 -1
- package/plugins/exportFile/dataProvider.mjs +1 -1
- package/plugins/filters/component/actionBar.js +9 -9
- package/plugins/filters/component/actionBar.mjs +8 -8
- package/plugins/filters/component/condition.js +15 -13
- package/plugins/filters/component/condition.mjs +15 -13
- package/plugins/filters/component/operators.js +6 -6
- package/plugins/filters/component/operators.mjs +6 -6
- package/plugins/filters/component/value.js +28 -24
- package/plugins/filters/component/value.mjs +28 -24
- package/plugins/filters/conditionUpdateObserver.js +24 -22
- package/plugins/filters/conditionUpdateObserver.mjs +24 -22
- package/plugins/filters/dataFilter.js +1 -1
- package/plugins/filters/dataFilter.mjs +1 -1
- package/plugins/filters/filters.js +95 -81
- package/plugins/filters/filters.mjs +95 -81
- package/plugins/filters/ui/input.js +19 -13
- package/plugins/filters/ui/input.mjs +19 -13
- package/plugins/filters/ui/link.js +13 -8
- package/plugins/filters/ui/link.mjs +13 -8
- package/plugins/filters/ui/multipleSelect.js +112 -85
- package/plugins/filters/ui/multipleSelect.mjs +112 -85
- package/plugins/filters/ui/radioInput.js +20 -12
- package/plugins/filters/ui/radioInput.mjs +20 -12
- package/plugins/filters/ui/select.js +72 -50
- package/plugins/filters/ui/select.mjs +71 -49
- package/plugins/formulas/formulas.js +326 -268
- package/plugins/formulas/formulas.mjs +327 -269
- package/plugins/formulas/indexSyncer/axisSyncer.js +61 -38
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +61 -38
- package/plugins/formulas/indexSyncer/index.js +48 -25
- package/plugins/formulas/indexSyncer/index.mjs +48 -25
- package/plugins/hiddenColumns/hiddenColumns.js +83 -64
- package/plugins/hiddenColumns/hiddenColumns.mjs +83 -64
- package/plugins/hiddenRows/hiddenRows.js +82 -63
- package/plugins/hiddenRows/hiddenRows.mjs +82 -63
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +32 -24
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +33 -25
- package/plugins/manualColumnMove/manualColumnMove.js +170 -126
- package/plugins/manualColumnMove/manualColumnMove.mjs +170 -126
- package/plugins/manualColumnResize/manualColumnResize.js +230 -169
- package/plugins/manualColumnResize/manualColumnResize.mjs +230 -169
- package/plugins/manualRowMove/manualRowMove.js +128 -99
- package/plugins/manualRowMove/manualRowMove.mjs +128 -99
- package/plugins/manualRowResize/manualRowResize.js +209 -150
- package/plugins/manualRowResize/manualRowResize.mjs +209 -150
- package/plugins/mergeCells/calculations/selection.js +71 -2
- package/plugins/mergeCells/calculations/selection.mjs +71 -2
- package/plugins/mergeCells/cellsCollection.js +1 -117
- package/plugins/mergeCells/cellsCollection.mjs +1 -117
- package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
- package/plugins/mergeCells/mergeCells.js +397 -499
- package/plugins/mergeCells/mergeCells.mjs +397 -499
- package/plugins/multiColumnSorting/multiColumnSorting.js +2 -8
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -8
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
- package/plugins/nestedHeaders/nestedHeaders.js +253 -205
- package/plugins/nestedHeaders/nestedHeaders.mjs +254 -206
- package/plugins/nestedHeaders/stateManager/headersTree.js +32 -21
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +32 -21
- package/plugins/nestedHeaders/stateManager/index.js +41 -30
- package/plugins/nestedHeaders/stateManager/index.mjs +41 -30
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +30 -19
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +30 -19
- package/plugins/nestedRows/data/dataManager.js +1 -1
- package/plugins/nestedRows/data/dataManager.mjs +1 -1
- package/plugins/nestedRows/nestedRows.js +182 -151
- package/plugins/nestedRows/nestedRows.mjs +183 -152
- package/plugins/nestedRows/ui/contextMenu.js +15 -11
- package/plugins/nestedRows/ui/contextMenu.mjs +14 -10
- package/plugins/nestedRows/utils/rowMoveController.js +1 -1
- package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
- package/plugins/persistentState/storage.js +2 -2
- package/plugins/persistentState/storage.mjs +2 -2
- package/plugins/search/search.js +7 -7
- package/plugins/search/search.mjs +7 -7
- package/plugins/touchScroll/touchScroll.js +19 -15
- package/plugins/touchScroll/touchScroll.mjs +20 -16
- package/plugins/trimRows/trimRows.js +6 -6
- package/plugins/trimRows/trimRows.mjs +6 -6
- package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
- package/selection/highlight/highlight.js +14 -14
- package/selection/highlight/highlight.mjs +13 -13
- package/selection/highlight/visualSelection.js +0 -2
- package/selection/highlight/visualSelection.mjs +0 -2
- package/selection/selection.js +67 -225
- package/selection/selection.mjs +66 -224
- package/selection/transformation.js +118 -149
- package/selection/transformation.mjs +118 -149
- package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
- package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
- package/shortcutContexts/commands/editor/open.js +3 -18
- package/shortcutContexts/commands/editor/open.mjs +3 -18
- package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
- package/shortcutContexts/grid.js +3 -9
- package/shortcutContexts/grid.mjs +3 -9
- package/shortcuts/context.js +1 -2
- package/shortcuts/context.mjs +1 -2
- package/tableView.js +78 -52
- package/tableView.mjs +78 -52
- package/translations/changesObservable/observable.js +38 -21
- package/translations/changesObservable/observable.mjs +38 -21
- package/translations/changesObservable/observer.js +12 -7
- package/translations/changesObservable/observer.mjs +11 -6
- package/translations/mapCollections/aggregatedCollection.js +1 -1
- package/translations/mapCollections/aggregatedCollection.mjs +1 -1
- package/translations/maps/indexMap.js +1 -1
- package/translations/maps/indexMap.mjs +1 -1
- package/utils/dataStructures/linkedList.js +1 -6
- package/utils/dataStructures/linkedList.mjs +1 -6
- package/utils/dataStructures/tree.js +1 -1
- package/utils/dataStructures/tree.mjs +1 -1
- package/utils/interval.js +44 -26
- package/utils/interval.mjs +44 -26
- package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
- package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
- package/i18n/languages/ar-AR.d.ts +0 -5
- package/i18n/languages/cs-CZ.d.ts +0 -5
- package/i18n/languages/hr-HR.d.ts +0 -5
- package/i18n/languages/sr-SP.d.ts +0 -5
- package/plugins/mergeCells/focusOrder.js +0 -305
- package/plugins/mergeCells/focusOrder.mjs +0 -300
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
5
4
|
require("core-js/modules/es.array.push.js");
|
5
|
+
require("core-js/modules/es.error.cause.js");
|
6
6
|
var _base = require("../base");
|
7
7
|
var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
|
8
8
|
var _array = require("../../helpers/array");
|
@@ -15,9 +15,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
15
15
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
16
16
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
17
17
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
18
|
-
function _classPrivateFieldSet(
|
19
|
-
function
|
20
|
-
function
|
18
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
19
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
20
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
21
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
22
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
23
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
21
24
|
_pluginHooks.default.getSingleton().register('beforeColumnMove');
|
22
25
|
_pluginHooks.default.getSingleton().register('afterColumnMove');
|
23
26
|
const PLUGIN_KEY = exports.PLUGIN_KEY = 'manualColumnMove';
|
@@ -65,10 +68,45 @@ var _hoveredColumn = /*#__PURE__*/new WeakMap();
|
|
65
68
|
var _rootElementOffset = /*#__PURE__*/new WeakMap();
|
66
69
|
var _hasRowHeaders = /*#__PURE__*/new WeakMap();
|
67
70
|
var _fixedColumnsStart = /*#__PURE__*/new WeakMap();
|
68
|
-
var
|
71
|
+
var _onBeforeOnCellMouseDown = /*#__PURE__*/new WeakSet();
|
72
|
+
var _onMouseMove = /*#__PURE__*/new WeakSet();
|
73
|
+
var _onBeforeOnCellMouseOver = /*#__PURE__*/new WeakSet();
|
74
|
+
var _onMouseUp = /*#__PURE__*/new WeakSet();
|
75
|
+
var _onAfterScrollVertically = /*#__PURE__*/new WeakSet();
|
76
|
+
var _onAfterLoadData = /*#__PURE__*/new WeakSet();
|
69
77
|
class ManualColumnMove extends _base.BasePlugin {
|
70
78
|
constructor() {
|
71
79
|
super(...arguments);
|
80
|
+
/**
|
81
|
+
* Callback for the `afterLoadData` hook.
|
82
|
+
*
|
83
|
+
* @private
|
84
|
+
*/
|
85
|
+
_classPrivateMethodInitSpec(this, _onAfterLoadData);
|
86
|
+
/**
|
87
|
+
* `afterScrollHorizontally` hook callback. Fired the table was scrolled horizontally.
|
88
|
+
*/
|
89
|
+
_classPrivateMethodInitSpec(this, _onAfterScrollVertically);
|
90
|
+
/**
|
91
|
+
* `onMouseUp` hook callback.
|
92
|
+
*/
|
93
|
+
_classPrivateMethodInitSpec(this, _onMouseUp);
|
94
|
+
/**
|
95
|
+
* 'beforeOnCellMouseOver' hook callback. Fired when pointer was over cell.
|
96
|
+
*
|
97
|
+
* @param {MouseEvent} event `mouseover` event properties.
|
98
|
+
* @param {CellCoords} coords Visual cell coordinates where was fired event.
|
99
|
+
* @param {HTMLElement} TD Cell represented as HTMLElement.
|
100
|
+
* @param {object} controller An object with properties `row`, `column` and `cell`. Each property contains
|
101
|
+
* a boolean value that allows or disallows changing the selection for that particular area.
|
102
|
+
*/
|
103
|
+
_classPrivateMethodInitSpec(this, _onBeforeOnCellMouseOver);
|
104
|
+
/**
|
105
|
+
* 'mouseMove' event callback. Fired when pointer move on document.documentElement.
|
106
|
+
*
|
107
|
+
* @param {MouseEvent} event `mousemove` event properties.
|
108
|
+
*/
|
109
|
+
_classPrivateMethodInitSpec(this, _onMouseMove);
|
72
110
|
/**
|
73
111
|
* Change the behavior of selection / dragging.
|
74
112
|
*
|
@@ -78,55 +116,88 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
78
116
|
* @param {object} controller An object with properties `row`, `column` and `cell`. Each property contains
|
79
117
|
* a boolean value that allows or disallows changing the selection for that particular area.
|
80
118
|
*/
|
81
|
-
_classPrivateMethodInitSpec(this,
|
119
|
+
_classPrivateMethodInitSpec(this, _onBeforeOnCellMouseDown);
|
82
120
|
/**
|
83
121
|
* Backlight UI object.
|
84
122
|
*
|
85
123
|
* @type {object}
|
86
124
|
*/
|
87
|
-
_classPrivateFieldInitSpec(this, _backlight,
|
125
|
+
_classPrivateFieldInitSpec(this, _backlight, {
|
126
|
+
writable: true,
|
127
|
+
value: new _backlight2.default(this.hot)
|
128
|
+
});
|
88
129
|
/**
|
89
130
|
* Guideline UI object.
|
90
131
|
*
|
91
132
|
* @type {object}
|
92
133
|
*/
|
93
|
-
_classPrivateFieldInitSpec(this, _guideline,
|
134
|
+
_classPrivateFieldInitSpec(this, _guideline, {
|
135
|
+
writable: true,
|
136
|
+
value: new _guideline2.default(this.hot)
|
137
|
+
});
|
94
138
|
/**
|
95
139
|
* @type {number[]}
|
96
140
|
*/
|
97
|
-
_classPrivateFieldInitSpec(this, _columnsToMove,
|
141
|
+
_classPrivateFieldInitSpec(this, _columnsToMove, {
|
142
|
+
writable: true,
|
143
|
+
value: []
|
144
|
+
});
|
98
145
|
/**
|
99
146
|
* @type {number}
|
100
147
|
*/
|
101
|
-
_classPrivateFieldInitSpec(this, _countCols,
|
148
|
+
_classPrivateFieldInitSpec(this, _countCols, {
|
149
|
+
writable: true,
|
150
|
+
value: 0
|
151
|
+
});
|
102
152
|
/**
|
103
153
|
* @type {boolean}
|
104
154
|
*/
|
105
|
-
_classPrivateFieldInitSpec(this, _pressed,
|
155
|
+
_classPrivateFieldInitSpec(this, _pressed, {
|
156
|
+
writable: true,
|
157
|
+
value: false
|
158
|
+
});
|
106
159
|
/**
|
107
160
|
* @type {object}
|
108
161
|
*/
|
109
|
-
_classPrivateFieldInitSpec(this, _target, {
|
162
|
+
_classPrivateFieldInitSpec(this, _target, {
|
163
|
+
writable: true,
|
164
|
+
value: {}
|
165
|
+
});
|
110
166
|
/**
|
111
167
|
* @type {number}
|
112
168
|
*/
|
113
|
-
_classPrivateFieldInitSpec(this, _cachedDropIndex,
|
169
|
+
_classPrivateFieldInitSpec(this, _cachedDropIndex, {
|
170
|
+
writable: true,
|
171
|
+
value: void 0
|
172
|
+
});
|
114
173
|
/**
|
115
174
|
* @type {number}
|
116
175
|
*/
|
117
|
-
_classPrivateFieldInitSpec(this, _hoveredColumn,
|
176
|
+
_classPrivateFieldInitSpec(this, _hoveredColumn, {
|
177
|
+
writable: true,
|
178
|
+
value: void 0
|
179
|
+
});
|
118
180
|
/**
|
119
181
|
* @type {number}
|
120
182
|
*/
|
121
|
-
_classPrivateFieldInitSpec(this, _rootElementOffset,
|
183
|
+
_classPrivateFieldInitSpec(this, _rootElementOffset, {
|
184
|
+
writable: true,
|
185
|
+
value: void 0
|
186
|
+
});
|
122
187
|
/**
|
123
188
|
* @type {boolean}
|
124
189
|
*/
|
125
|
-
_classPrivateFieldInitSpec(this, _hasRowHeaders,
|
190
|
+
_classPrivateFieldInitSpec(this, _hasRowHeaders, {
|
191
|
+
writable: true,
|
192
|
+
value: void 0
|
193
|
+
});
|
126
194
|
/**
|
127
195
|
* @type {number}
|
128
196
|
*/
|
129
|
-
_classPrivateFieldInitSpec(this, _fixedColumnsStart,
|
197
|
+
_classPrivateFieldInitSpec(this, _fixedColumnsStart, {
|
198
|
+
writable: true,
|
199
|
+
value: void 0
|
200
|
+
});
|
130
201
|
}
|
131
202
|
static get PLUGIN_KEY() {
|
132
203
|
return PLUGIN_KEY;
|
@@ -156,20 +227,20 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
156
227
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
157
228
|
args[_key] = arguments[_key];
|
158
229
|
}
|
159
|
-
return
|
230
|
+
return _classPrivateMethodGet(_this, _onBeforeOnCellMouseDown, _onBeforeOnCellMouseDown2).call(_this, ...args);
|
160
231
|
});
|
161
232
|
this.addHook('beforeOnCellMouseOver', function () {
|
162
233
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
163
234
|
args[_key2] = arguments[_key2];
|
164
235
|
}
|
165
|
-
return
|
236
|
+
return _classPrivateMethodGet(_this, _onBeforeOnCellMouseOver, _onBeforeOnCellMouseOver2).call(_this, ...args);
|
166
237
|
});
|
167
|
-
this.addHook('afterScrollVertically', () =>
|
238
|
+
this.addHook('afterScrollVertically', () => _classPrivateMethodGet(this, _onAfterScrollVertically, _onAfterScrollVertically2).call(this));
|
168
239
|
this.addHook('afterLoadData', function () {
|
169
240
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
170
241
|
args[_key3] = arguments[_key3];
|
171
242
|
}
|
172
|
-
return
|
243
|
+
return _classPrivateMethodGet(_this, _onAfterLoadData, _onAfterLoadData2).call(_this, ...args);
|
173
244
|
});
|
174
245
|
this.buildPluginUI();
|
175
246
|
this.registerEvents();
|
@@ -198,8 +269,8 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
198
269
|
disablePlugin() {
|
199
270
|
(0, _element.removeClass)(this.hot.rootElement, CSS_PLUGIN);
|
200
271
|
this.unregisterEvents();
|
201
|
-
_classPrivateFieldGet(
|
202
|
-
_classPrivateFieldGet(
|
272
|
+
_classPrivateFieldGet(this, _backlight).destroy();
|
273
|
+
_classPrivateFieldGet(this, _guideline).destroy();
|
203
274
|
super.disablePlugin();
|
204
275
|
}
|
205
276
|
|
@@ -228,10 +299,10 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
228
299
|
* @returns {boolean}
|
229
300
|
*/
|
230
301
|
moveColumns(columns, finalIndex) {
|
231
|
-
const dropIndex = _classPrivateFieldGet(
|
302
|
+
const dropIndex = _classPrivateFieldGet(this, _cachedDropIndex);
|
232
303
|
const movePossible = this.isMovePossible(columns, finalIndex);
|
233
304
|
const beforeMoveHook = this.hot.runHooks('beforeColumnMove', columns, finalIndex, dropIndex, movePossible);
|
234
|
-
_classPrivateFieldSet(
|
305
|
+
_classPrivateFieldSet(this, _cachedDropIndex, undefined);
|
235
306
|
if (beforeMoveHook === false) {
|
236
307
|
return;
|
237
308
|
}
|
@@ -269,7 +340,7 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
269
340
|
*/
|
270
341
|
dragColumns(columns, dropIndex) {
|
271
342
|
const finalIndex = this.countFinalIndex(columns, dropIndex);
|
272
|
-
_classPrivateFieldSet(
|
343
|
+
_classPrivateFieldSet(this, _cachedDropIndex, dropIndex);
|
273
344
|
return this.moveColumns(columns, finalIndex);
|
274
345
|
}
|
275
346
|
|
@@ -425,7 +496,7 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
425
496
|
*/
|
426
497
|
refreshPositions() {
|
427
498
|
const firstVisible = this.hot.view.getFirstFullyVisibleColumn();
|
428
|
-
if (this.isFixedColumnsStart(_classPrivateFieldGet(
|
499
|
+
if (this.isFixedColumnsStart(_classPrivateFieldGet(this, _hoveredColumn)) && firstVisible > 0) {
|
429
500
|
this.hot.scrollViewportTo({
|
430
501
|
col: this.hot.columnIndexMapper.getNearestNotHiddenIndex(firstVisible - 1, -1)
|
431
502
|
});
|
@@ -433,45 +504,45 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
433
504
|
const wtTable = this.hot.view._wt.wtTable;
|
434
505
|
const scrollableElement = this.hot.view._wt.wtOverlays.scrollableElement;
|
435
506
|
const scrollStart = typeof scrollableElement.scrollX === 'number' ? scrollableElement.scrollX : scrollableElement.scrollLeft;
|
436
|
-
let tdOffsetStart = this.hot.view.THEAD.offsetLeft + this.getColumnsWidth(0, _classPrivateFieldGet(
|
507
|
+
let tdOffsetStart = this.hot.view.THEAD.offsetLeft + this.getColumnsWidth(0, _classPrivateFieldGet(this, _hoveredColumn) - 1);
|
437
508
|
const hiderWidth = wtTable.hider.offsetWidth;
|
438
509
|
const tbodyOffsetLeft = wtTable.TBODY.offsetLeft;
|
439
|
-
const backlightElemMarginStart = _classPrivateFieldGet(
|
440
|
-
const backlightElemWidth = _classPrivateFieldGet(
|
510
|
+
const backlightElemMarginStart = _classPrivateFieldGet(this, _backlight).getOffset().start;
|
511
|
+
const backlightElemWidth = _classPrivateFieldGet(this, _backlight).getSize().width;
|
441
512
|
let rowHeaderWidth = 0;
|
442
513
|
let mouseOffsetStart = 0;
|
443
514
|
if (this.hot.isRtl()) {
|
444
515
|
const rootWindow = this.hot.rootWindow;
|
445
516
|
const containerWidth = (0, _element.outerWidth)(this.hot.rootElement);
|
446
|
-
const gridMostRightPos = rootWindow.innerWidth - _classPrivateFieldGet(
|
447
|
-
mouseOffsetStart = rootWindow.innerWidth - _classPrivateFieldGet(
|
517
|
+
const gridMostRightPos = rootWindow.innerWidth - _classPrivateFieldGet(this, _rootElementOffset) - containerWidth;
|
518
|
+
mouseOffsetStart = rootWindow.innerWidth - _classPrivateFieldGet(this, _target).eventPageX - gridMostRightPos - (scrollableElement.scrollX === undefined ? scrollStart : 0);
|
448
519
|
} else {
|
449
|
-
mouseOffsetStart = _classPrivateFieldGet(
|
520
|
+
mouseOffsetStart = _classPrivateFieldGet(this, _target).eventPageX - (_classPrivateFieldGet(this, _rootElementOffset) - (scrollableElement.scrollX === undefined ? scrollStart : 0));
|
450
521
|
}
|
451
|
-
if (_classPrivateFieldGet(
|
522
|
+
if (_classPrivateFieldGet(this, _hasRowHeaders)) {
|
452
523
|
rowHeaderWidth = this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth;
|
453
524
|
}
|
454
|
-
if (this.isFixedColumnsStart(_classPrivateFieldGet(
|
525
|
+
if (this.isFixedColumnsStart(_classPrivateFieldGet(this, _hoveredColumn))) {
|
455
526
|
tdOffsetStart += scrollStart;
|
456
527
|
}
|
457
528
|
tdOffsetStart += rowHeaderWidth;
|
458
|
-
if (_classPrivateFieldGet(
|
529
|
+
if (_classPrivateFieldGet(this, _hoveredColumn) < 0) {
|
459
530
|
// if hover on rowHeader
|
460
|
-
if (_classPrivateFieldGet(
|
461
|
-
_classPrivateFieldGet(
|
531
|
+
if (_classPrivateFieldGet(this, _fixedColumnsStart) > 0) {
|
532
|
+
_classPrivateFieldGet(this, _target).col = 0;
|
462
533
|
} else {
|
463
|
-
_classPrivateFieldGet(
|
534
|
+
_classPrivateFieldGet(this, _target).col = firstVisible > 0 ? firstVisible - 1 : firstVisible;
|
464
535
|
}
|
465
|
-
} else if (_classPrivateFieldGet(
|
466
|
-
const newCoordsCol = _classPrivateFieldGet(
|
536
|
+
} else if (_classPrivateFieldGet(this, _target).TD.offsetWidth / 2 + tdOffsetStart <= mouseOffsetStart) {
|
537
|
+
const newCoordsCol = _classPrivateFieldGet(this, _hoveredColumn) >= _classPrivateFieldGet(this, _countCols) ? _classPrivateFieldGet(this, _countCols) - 1 : _classPrivateFieldGet(this, _hoveredColumn);
|
467
538
|
|
468
539
|
// if hover on right part of TD
|
469
|
-
_classPrivateFieldGet(
|
540
|
+
_classPrivateFieldGet(this, _target).col = newCoordsCol + 1;
|
470
541
|
// unfortunately first column is bigger than rest
|
471
|
-
tdOffsetStart += _classPrivateFieldGet(
|
542
|
+
tdOffsetStart += _classPrivateFieldGet(this, _target).TD.offsetWidth;
|
472
543
|
} else {
|
473
544
|
// elsewhere on table
|
474
|
-
_classPrivateFieldGet(
|
545
|
+
_classPrivateFieldGet(this, _target).col = _classPrivateFieldGet(this, _hoveredColumn);
|
475
546
|
}
|
476
547
|
let backlightStart = mouseOffsetStart;
|
477
548
|
let guidelineStart = tdOffsetStart;
|
@@ -488,11 +559,11 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
488
559
|
} else if (guidelineStart === 0) {
|
489
560
|
// guideline has got `margin-left: -1px` as default
|
490
561
|
guidelineStart = 1;
|
491
|
-
} else if (scrollableElement.scrollX !== undefined && _classPrivateFieldGet(
|
492
|
-
guidelineStart -= _classPrivateFieldGet(
|
562
|
+
} else if (scrollableElement.scrollX !== undefined && _classPrivateFieldGet(this, _hoveredColumn) < _classPrivateFieldGet(this, _fixedColumnsStart)) {
|
563
|
+
guidelineStart -= _classPrivateFieldGet(this, _rootElementOffset) <= scrollableElement.scrollX ? _classPrivateFieldGet(this, _rootElementOffset) : 0;
|
493
564
|
}
|
494
|
-
_classPrivateFieldGet(
|
495
|
-
_classPrivateFieldGet(
|
565
|
+
_classPrivateFieldGet(this, _backlight).setPosition(null, backlightStart);
|
566
|
+
_classPrivateFieldGet(this, _guideline).setPosition(null, guidelineStart);
|
496
567
|
}
|
497
568
|
|
498
569
|
/**
|
@@ -504,8 +575,8 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
504
575
|
const {
|
505
576
|
documentElement
|
506
577
|
} = this.hot.rootDocument;
|
507
|
-
this.eventManager.addEventListener(documentElement, 'mousemove', event =>
|
508
|
-
this.eventManager.addEventListener(documentElement, 'mouseup', () =>
|
578
|
+
this.eventManager.addEventListener(documentElement, 'mousemove', event => _classPrivateMethodGet(this, _onMouseMove, _onMouseMove2).call(this, event));
|
579
|
+
this.eventManager.addEventListener(documentElement, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
|
509
580
|
}
|
510
581
|
|
511
582
|
/**
|
@@ -522,43 +593,36 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
522
593
|
* @private
|
523
594
|
*/
|
524
595
|
buildPluginUI() {
|
525
|
-
_classPrivateFieldGet(
|
526
|
-
_classPrivateFieldGet(
|
596
|
+
_classPrivateFieldGet(this, _backlight).build();
|
597
|
+
_classPrivateFieldGet(this, _guideline).build();
|
527
598
|
}
|
528
|
-
|
529
|
-
/**
|
530
|
-
* Callback for the `afterLoadData` hook.
|
531
|
-
*
|
532
|
-
* @private
|
533
|
-
*/
|
534
|
-
|
535
599
|
/**
|
536
600
|
* Destroys the plugin instance.
|
537
601
|
*/
|
538
602
|
destroy() {
|
539
|
-
_classPrivateFieldGet(
|
540
|
-
_classPrivateFieldGet(
|
603
|
+
_classPrivateFieldGet(this, _backlight).destroy();
|
604
|
+
_classPrivateFieldGet(this, _guideline).destroy();
|
541
605
|
super.destroy();
|
542
606
|
}
|
543
607
|
}
|
544
608
|
exports.ManualColumnMove = ManualColumnMove;
|
545
|
-
function
|
609
|
+
function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
546
610
|
const wtTable = this.hot.view._wt.wtTable;
|
547
611
|
const isHeaderSelection = this.hot.selection.isSelectedByColumnHeader();
|
548
612
|
const selection = this.hot.getSelectedRangeLast();
|
549
613
|
// This block action shouldn't be handled below.
|
550
614
|
const isSortingElement = (0, _element.hasClass)(event.target, 'sortAction');
|
551
|
-
if (!selection || !isHeaderSelection || _classPrivateFieldGet(
|
552
|
-
_classPrivateFieldSet(
|
553
|
-
_classPrivateFieldGet(
|
615
|
+
if (!selection || !isHeaderSelection || _classPrivateFieldGet(this, _pressed) || event.button !== 0 || isSortingElement) {
|
616
|
+
_classPrivateFieldSet(this, _pressed, false);
|
617
|
+
_classPrivateFieldGet(this, _columnsToMove).length = 0;
|
554
618
|
(0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);
|
555
619
|
return;
|
556
620
|
}
|
557
|
-
const guidelineIsNotReady = _classPrivateFieldGet(
|
558
|
-
const backlightIsNotReady = _classPrivateFieldGet(
|
621
|
+
const guidelineIsNotReady = _classPrivateFieldGet(this, _guideline).isBuilt() && !_classPrivateFieldGet(this, _guideline).isAppended();
|
622
|
+
const backlightIsNotReady = _classPrivateFieldGet(this, _backlight).isBuilt() && !_classPrivateFieldGet(this, _backlight).isAppended();
|
559
623
|
if (guidelineIsNotReady && backlightIsNotReady) {
|
560
|
-
_classPrivateFieldGet(
|
561
|
-
_classPrivateFieldGet(
|
624
|
+
_classPrivateFieldGet(this, _guideline).appendTo(wtTable.hider);
|
625
|
+
_classPrivateFieldGet(this, _backlight).appendTo(wtTable.hider);
|
562
626
|
}
|
563
627
|
const {
|
564
628
|
from,
|
@@ -568,61 +632,47 @@ function _onBeforeOnCellMouseDown(event, coords, TD, controller) {
|
|
568
632
|
const end = Math.max(from.col, to.col);
|
569
633
|
if (coords.row < 0 && coords.col >= start && coords.col <= end) {
|
570
634
|
controller.column = true;
|
571
|
-
_classPrivateFieldSet(
|
635
|
+
_classPrivateFieldSet(this, _pressed, true);
|
572
636
|
const eventOffsetX = TD.firstChild ? (0, _event.offsetRelativeTo)(event, TD.firstChild).x : event.offsetX;
|
573
|
-
_classPrivateFieldGet(
|
574
|
-
_classPrivateFieldSet(
|
575
|
-
_classPrivateFieldGet(
|
576
|
-
_classPrivateFieldGet(
|
577
|
-
_classPrivateFieldSet(
|
578
|
-
_classPrivateFieldSet(
|
579
|
-
_classPrivateFieldSet(
|
580
|
-
_classPrivateFieldSet(
|
581
|
-
_classPrivateFieldSet(
|
582
|
-
const countColumnsFrom = _classPrivateFieldGet(
|
637
|
+
_classPrivateFieldGet(this, _target).eventPageX = event.pageX;
|
638
|
+
_classPrivateFieldSet(this, _hoveredColumn, coords.col);
|
639
|
+
_classPrivateFieldGet(this, _target).TD = TD;
|
640
|
+
_classPrivateFieldGet(this, _target).col = coords.col;
|
641
|
+
_classPrivateFieldSet(this, _columnsToMove, this.prepareColumnsToMoving(start, end));
|
642
|
+
_classPrivateFieldSet(this, _hasRowHeaders, !!this.hot.getSettings().rowHeaders);
|
643
|
+
_classPrivateFieldSet(this, _countCols, this.hot.countCols());
|
644
|
+
_classPrivateFieldSet(this, _fixedColumnsStart, this.hot.getSettings().fixedColumnsStart);
|
645
|
+
_classPrivateFieldSet(this, _rootElementOffset, (0, _element.offset)(this.hot.rootElement).left);
|
646
|
+
const countColumnsFrom = _classPrivateFieldGet(this, _hasRowHeaders) ? -1 : 0;
|
583
647
|
const topPos = wtTable.holder.scrollTop + wtTable.getColumnHeaderHeight(0) + 1;
|
584
|
-
const fixedColumnsStart = coords.col < _classPrivateFieldGet(
|
648
|
+
const fixedColumnsStart = coords.col < _classPrivateFieldGet(this, _fixedColumnsStart);
|
585
649
|
const horizontalScrollPosition = this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset();
|
586
650
|
const offsetX = Math.abs(eventOffsetX - (this.hot.isRtl() ? TD.offsetWidth : 0));
|
587
651
|
const inlineOffset = this.getColumnsWidth(start, coords.col - 1) + offsetX;
|
588
652
|
const inlinePos = this.getColumnsWidth(countColumnsFrom, start - 1) + (fixedColumnsStart ? horizontalScrollPosition : 0) + inlineOffset;
|
589
|
-
_classPrivateFieldGet(
|
590
|
-
_classPrivateFieldGet(
|
591
|
-
_classPrivateFieldGet(
|
653
|
+
_classPrivateFieldGet(this, _backlight).setPosition(topPos, inlinePos);
|
654
|
+
_classPrivateFieldGet(this, _backlight).setSize(this.getColumnsWidth(start, end), wtTable.hider.offsetHeight - topPos);
|
655
|
+
_classPrivateFieldGet(this, _backlight).setOffset(null, -inlineOffset);
|
592
656
|
(0, _element.addClass)(this.hot.rootElement, CSS_ON_MOVING);
|
593
657
|
} else {
|
594
658
|
(0, _element.removeClass)(this.hot.rootElement, CSS_AFTER_SELECTION);
|
595
|
-
_classPrivateFieldSet(
|
596
|
-
_classPrivateFieldGet(
|
659
|
+
_classPrivateFieldSet(this, _pressed, false);
|
660
|
+
_classPrivateFieldGet(this, _columnsToMove).length = 0;
|
597
661
|
}
|
598
662
|
}
|
599
|
-
|
600
|
-
|
601
|
-
*
|
602
|
-
* @param {MouseEvent} event `mousemove` event properties.
|
603
|
-
*/
|
604
|
-
function _onMouseMove(event) {
|
605
|
-
if (!_classPrivateFieldGet(_pressed, this)) {
|
663
|
+
function _onMouseMove2(event) {
|
664
|
+
if (!_classPrivateFieldGet(this, _pressed)) {
|
606
665
|
return;
|
607
666
|
}
|
608
|
-
_classPrivateFieldGet(
|
667
|
+
_classPrivateFieldGet(this, _target).eventPageX = event.pageX;
|
609
668
|
this.refreshPositions();
|
610
669
|
}
|
611
|
-
|
612
|
-
* 'beforeOnCellMouseOver' hook callback. Fired when pointer was over cell.
|
613
|
-
*
|
614
|
-
* @param {MouseEvent} event `mouseover` event properties.
|
615
|
-
* @param {CellCoords} coords Visual cell coordinates where was fired event.
|
616
|
-
* @param {HTMLElement} TD Cell represented as HTMLElement.
|
617
|
-
* @param {object} controller An object with properties `row`, `column` and `cell`. Each property contains
|
618
|
-
* a boolean value that allows or disallows changing the selection for that particular area.
|
619
|
-
*/
|
620
|
-
function _onBeforeOnCellMouseOver(event, coords, TD, controller) {
|
670
|
+
function _onBeforeOnCellMouseOver2(event, coords, TD, controller) {
|
621
671
|
const selectedRange = this.hot.getSelectedRangeLast();
|
622
|
-
if (!selectedRange || !_classPrivateFieldGet(
|
672
|
+
if (!selectedRange || !_classPrivateFieldGet(this, _pressed)) {
|
623
673
|
return;
|
624
674
|
}
|
625
|
-
if (_classPrivateFieldGet(
|
675
|
+
if (_classPrivateFieldGet(this, _columnsToMove).indexOf(coords.col) > -1) {
|
626
676
|
(0, _element.removeClass)(this.hot.rootElement, CSS_SHOW_UI);
|
627
677
|
} else {
|
628
678
|
(0, _element.addClass)(this.hot.rootElement, CSS_SHOW_UI);
|
@@ -630,17 +680,14 @@ function _onBeforeOnCellMouseOver(event, coords, TD, controller) {
|
|
630
680
|
controller.row = true;
|
631
681
|
controller.column = true;
|
632
682
|
controller.cell = true;
|
633
|
-
_classPrivateFieldSet(
|
634
|
-
_classPrivateFieldGet(
|
683
|
+
_classPrivateFieldSet(this, _hoveredColumn, coords.col);
|
684
|
+
_classPrivateFieldGet(this, _target).TD = TD;
|
635
685
|
}
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
const columnsLen = _classPrivateFieldGet(_columnsToMove, this).length;
|
642
|
-
_classPrivateFieldSet(_hoveredColumn, this, undefined);
|
643
|
-
_classPrivateFieldSet(_pressed, this, false);
|
686
|
+
function _onMouseUp2() {
|
687
|
+
const target = _classPrivateFieldGet(this, _target).col;
|
688
|
+
const columnsLen = _classPrivateFieldGet(this, _columnsToMove).length;
|
689
|
+
_classPrivateFieldSet(this, _hoveredColumn, undefined);
|
690
|
+
_classPrivateFieldSet(this, _pressed, false);
|
644
691
|
(0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI, CSS_AFTER_SELECTION]);
|
645
692
|
if (this.hot.selection.isSelectedByColumnHeader()) {
|
646
693
|
(0, _element.addClass)(this.hot.rootElement, CSS_AFTER_SELECTION);
|
@@ -648,10 +695,10 @@ function _onMouseUp() {
|
|
648
695
|
if (columnsLen < 1 || target === undefined) {
|
649
696
|
return;
|
650
697
|
}
|
651
|
-
const firstMovedVisualColumn = _classPrivateFieldGet(
|
698
|
+
const firstMovedVisualColumn = _classPrivateFieldGet(this, _columnsToMove)[0];
|
652
699
|
const firstMovedPhysicalColumn = this.hot.toPhysicalColumn(firstMovedVisualColumn);
|
653
|
-
const movePerformed = this.dragColumns(_classPrivateFieldGet(
|
654
|
-
_classPrivateFieldGet(
|
700
|
+
const movePerformed = this.dragColumns(_classPrivateFieldGet(this, _columnsToMove), target);
|
701
|
+
_classPrivateFieldGet(this, _columnsToMove).length = 0;
|
655
702
|
if (movePerformed === true) {
|
656
703
|
this.persistentStateSave();
|
657
704
|
this.hot.render();
|
@@ -661,17 +708,14 @@ function _onMouseUp() {
|
|
661
708
|
this.hot.selectColumns(selectionStart, selectionEnd);
|
662
709
|
}
|
663
710
|
}
|
664
|
-
|
665
|
-
* `afterScrollHorizontally` hook callback. Fired the table was scrolled horizontally.
|
666
|
-
*/
|
667
|
-
function _onAfterScrollVertically() {
|
711
|
+
function _onAfterScrollVertically2() {
|
668
712
|
const wtTable = this.hot.view._wt.wtTable;
|
669
713
|
const headerHeight = wtTable.getColumnHeaderHeight(0) + 1;
|
670
714
|
const scrollTop = wtTable.holder.scrollTop;
|
671
715
|
const posTop = headerHeight + scrollTop;
|
672
|
-
_classPrivateFieldGet(
|
673
|
-
_classPrivateFieldGet(
|
716
|
+
_classPrivateFieldGet(this, _backlight).setPosition(posTop);
|
717
|
+
_classPrivateFieldGet(this, _backlight).setSize(null, wtTable.hider.offsetHeight - posTop);
|
674
718
|
}
|
675
|
-
function
|
719
|
+
function _onAfterLoadData2() {
|
676
720
|
this.moveBySettingsOrLoad();
|
677
721
|
}
|