handsontable 14.0.0-next-4fd76bc-20231114 → 14.0.0-next-bdc44e7-20231115
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.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/focusCatcher/index.js +3 -3
- package/core/focusCatcher/index.mjs +3 -3
- package/dataMap/metaManager/metaSchema.js +7 -7
- package/dataMap/metaManager/metaSchema.mjs +7 -7
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +393 -267
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +147 -147
- package/dist/handsontable.js +393 -267
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +22 -22
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/package.json +1 -1
- package/plugins/manualColumnMove/manualColumnMove.js +31 -28
- package/plugins/manualColumnMove/manualColumnMove.mjs +29 -26
- package/plugins/manualColumnResize/manualColumnResize.js +161 -105
- package/plugins/manualColumnResize/manualColumnResize.mjs +160 -104
- package/plugins/manualRowMove/manualRowMove.js +31 -28
- package/plugins/manualRowMove/manualRowMove.mjs +29 -26
- package/plugins/manualRowResize/manualRowResize.js +160 -104
- package/plugins/manualRowResize/manualRowResize.mjs +159 -103
- package/settings.d.ts +1 -1
@@ -25,8 +25,8 @@
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
27
27
|
*
|
28
|
-
* Version: 14.0.0-next-
|
29
|
-
* Release date:
|
28
|
+
* Version: 14.0.0-next-bdc44e7-20231115
|
29
|
+
* Release date: 22/11/2023 (built at 15/11/2023 14:48:47)
|
30
30
|
*/
|
31
31
|
(function webpackUniversalModuleDefinition(root, factory) {
|
32
32
|
if(typeof exports === 'object' && typeof module === 'object')
|
@@ -43033,8 +43033,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
|
|
43033
43033
|
Handsontable.CellCoords = _src.CellCoords;
|
43034
43034
|
Handsontable.CellRange = _src.CellRange;
|
43035
43035
|
Handsontable.packageName = 'handsontable';
|
43036
|
-
Handsontable.buildDate = "
|
43037
|
-
Handsontable.version = "14.0.0-next-
|
43036
|
+
Handsontable.buildDate = "15/11/2023 14:48:47";
|
43037
|
+
Handsontable.version = "14.0.0-next-bdc44e7-20231115";
|
43038
43038
|
Handsontable.languages = {
|
43039
43039
|
dictionaryKeys: _registry.dictionaryKeys,
|
43040
43040
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
@@ -53183,7 +53183,7 @@ const domMessages = {
|
|
53183
53183
|
function _injectProductInfo(key, element) {
|
53184
53184
|
const hasValidType = !isEmpty(key);
|
53185
53185
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
53186
|
-
const hotVersion = "14.0.0-next-
|
53186
|
+
const hotVersion = "14.0.0-next-bdc44e7-20231115";
|
53187
53187
|
let keyValidityDate;
|
53188
53188
|
let consoleMessageState = 'invalid';
|
53189
53189
|
let domMessageState = 'invalid';
|
@@ -53191,7 +53191,7 @@ function _injectProductInfo(key, element) {
|
|
53191
53191
|
const schemaValidity = _checkKeySchema(key);
|
53192
53192
|
if (hasValidType || isNonCommercial || schemaValidity) {
|
53193
53193
|
if (schemaValidity) {
|
53194
|
-
const releaseDate = (0, _moment.default)("
|
53194
|
+
const releaseDate = (0, _moment.default)("22/11/2023", 'DD/MM/YYYY');
|
53195
53195
|
const releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
|
53196
53196
|
const keyValidityDays = _extractTime(key);
|
53197
53197
|
keyValidityDate = (0, _moment.default)((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
|
@@ -90638,7 +90638,7 @@ var _default = () => {
|
|
90638
90638
|
*/
|
90639
90639
|
multiColumnSorting: undefined,
|
90640
90640
|
/**
|
90641
|
-
* When set to `true`, the `navigableHeaders` option lets you navigate [row headers](@/guides/rows/row-header.md) and [column headers](@/guides/columns/column-header.md), using the arrow keys or the <kbd>**Tab**</kbd> key (if the [`
|
90641
|
+
* When set to `true`, the `navigableHeaders` option lets you navigate [row headers](@/guides/rows/row-header.md) and [column headers](@/guides/columns/column-header.md), using the arrow keys or the <kbd>**Tab**</kbd> key (if the [`tabNavigation`](#tabNavigation) option is set to `true`).
|
90642
90642
|
*
|
90643
90643
|
* @since 14.0.0
|
90644
90644
|
* @memberof Options#
|
@@ -90657,27 +90657,27 @@ var _default = () => {
|
|
90657
90657
|
*/
|
90658
90658
|
navigableHeaders: false,
|
90659
90659
|
/**
|
90660
|
-
* When set to `
|
90660
|
+
* When set to `false`, the `tabNavigation` option changes the behavior of the
|
90661
90661
|
* <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keyboard shortcuts. The Handsontable
|
90662
|
-
* no more captures that shortcuts to make the grid navigation available (`
|
90662
|
+
* no more captures that shortcuts to make the grid navigation available (`tabNavigation: true`)
|
90663
90663
|
* but returns control to the browser so the native page navigation is possible.
|
90664
90664
|
*
|
90665
90665
|
* @since 14.0.0
|
90666
90666
|
* @memberof Options#
|
90667
90667
|
* @type {boolean}
|
90668
|
-
* @default
|
90668
|
+
* @default true
|
90669
90669
|
* @category Core
|
90670
90670
|
*
|
90671
90671
|
* @example
|
90672
90672
|
* ```js
|
90673
90673
|
* // you can't navigate row and column headers using <kbd>Tab</kbd> or <kbd>Shift</kbd>+<kbd>Tab</kbd> keyboard shortcuts
|
90674
|
-
*
|
90674
|
+
* tabNavigation: false,
|
90675
90675
|
*
|
90676
90676
|
* // default behavior: you can navigate row and column headers using <kbd>Tab</kbd> or <kbd>Shift</kbd>+<kbd>Tab</kbd> keyboard shortcuts
|
90677
|
-
*
|
90677
|
+
* tabNavigation: true,
|
90678
90678
|
* ```
|
90679
90679
|
*/
|
90680
|
-
|
90680
|
+
tabNavigation: true,
|
90681
90681
|
/**
|
90682
90682
|
* @description
|
90683
90683
|
* The `nestedHeaders` option configures the [`NestedHeaders`](@/api/nestedHeaders.md) plugin.
|
@@ -93397,7 +93397,7 @@ function installFocusCatcher(hot) {
|
|
93397
93397
|
...shortcutOptions,
|
93398
93398
|
callback: () => {
|
93399
93399
|
isTabOrShiftTabPressed = true;
|
93400
|
-
if (hot.getSelectedRangeLast() && hot.getSettings().
|
93400
|
+
if (hot.getSelectedRangeLast() && !hot.getSettings().tabNavigation) {
|
93401
93401
|
isSavingCoordsEnabled = false;
|
93402
93402
|
}
|
93403
93403
|
},
|
@@ -93406,12 +93406,12 @@ function installFocusCatcher(hot) {
|
|
93406
93406
|
...shortcutOptions,
|
93407
93407
|
callback: event => {
|
93408
93408
|
const {
|
93409
|
-
|
93409
|
+
tabNavigation,
|
93410
93410
|
autoWrapRow
|
93411
93411
|
} = hot.getSettings();
|
93412
93412
|
isTabOrShiftTabPressed = false;
|
93413
93413
|
isSavingCoordsEnabled = true;
|
93414
|
-
if (
|
93414
|
+
if (!tabNavigation || !hot.selection.isSelected() || autoWrapRow && rowWrapState.wrapped && rowWrapState.flipped || !autoWrapRow && rowWrapState.wrapped) {
|
93415
93415
|
if (autoWrapRow && rowWrapState.wrapped && rowWrapState.flipped) {
|
93416
93416
|
recentlyAddedFocusCoords = event.shiftKey ? getMostTopStartPosition(hot) : getMostBottomEndPosition(hot);
|
93417
93417
|
}
|
@@ -126499,7 +126499,6 @@ var _interopRequireDefault = __webpack_require__(198);
|
|
126499
126499
|
exports.__esModule = true;
|
126500
126500
|
__webpack_require__(205);
|
126501
126501
|
__webpack_require__(275);
|
126502
|
-
var _defineProperty2 = _interopRequireDefault(__webpack_require__(454));
|
126503
126502
|
var _classPrivateFieldSet2 = _interopRequireDefault(__webpack_require__(469));
|
126504
126503
|
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(466));
|
126505
126504
|
var _base = __webpack_require__(756);
|
@@ -126508,8 +126507,8 @@ var _array = __webpack_require__(446);
|
|
126508
126507
|
var _element = __webpack_require__(304);
|
126509
126508
|
var _event = __webpack_require__(459);
|
126510
126509
|
var _number = __webpack_require__(474);
|
126511
|
-
var
|
126512
|
-
var
|
126510
|
+
var _backlight2 = _interopRequireDefault(__webpack_require__(932));
|
126511
|
+
var _guideline2 = _interopRequireDefault(__webpack_require__(934));
|
126513
126512
|
__webpack_require__(935);
|
126514
126513
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
126515
126514
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
@@ -126551,6 +126550,8 @@ const CSS_AFTER_SELECTION = 'after-selection--columns';
|
|
126551
126550
|
* @class ManualColumnMove
|
126552
126551
|
* @plugin ManualColumnMove
|
126553
126552
|
*/
|
126553
|
+
var _backlight = /*#__PURE__*/new WeakMap();
|
126554
|
+
var _guideline = /*#__PURE__*/new WeakMap();
|
126554
126555
|
var _columnsToMove = /*#__PURE__*/new WeakMap();
|
126555
126556
|
var _countCols = /*#__PURE__*/new WeakMap();
|
126556
126557
|
var _pressed = /*#__PURE__*/new WeakMap();
|
@@ -126612,17 +126613,21 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
126612
126613
|
/**
|
126613
126614
|
* Backlight UI object.
|
126614
126615
|
*
|
126615
|
-
* @private
|
126616
126616
|
* @type {object}
|
126617
126617
|
*/
|
126618
|
-
(
|
126618
|
+
_classPrivateFieldInitSpec(this, _backlight, {
|
126619
|
+
writable: true,
|
126620
|
+
value: new _backlight2.default(this.hot)
|
126621
|
+
});
|
126619
126622
|
/**
|
126620
126623
|
* Guideline UI object.
|
126621
126624
|
*
|
126622
|
-
* @private
|
126623
126625
|
* @type {object}
|
126624
126626
|
*/
|
126625
|
-
(
|
126627
|
+
_classPrivateFieldInitSpec(this, _guideline, {
|
126628
|
+
writable: true,
|
126629
|
+
value: new _guideline2.default(this.hot)
|
126630
|
+
});
|
126626
126631
|
/**
|
126627
126632
|
* @type {number[]}
|
126628
126633
|
*/
|
@@ -126757,8 +126762,8 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
126757
126762
|
disablePlugin() {
|
126758
126763
|
(0, _element.removeClass)(this.hot.rootElement, CSS_PLUGIN);
|
126759
126764
|
this.unregisterEvents();
|
126760
|
-
this.
|
126761
|
-
this.
|
126765
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).destroy();
|
126766
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).destroy();
|
126762
126767
|
super.disablePlugin();
|
126763
126768
|
}
|
126764
126769
|
|
@@ -126995,8 +127000,8 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
126995
127000
|
let tdOffsetStart = this.hot.view.THEAD.offsetLeft + this.getColumnsWidth(0, (0, _classPrivateFieldGet2.default)(this, _hoveredColumn) - 1);
|
126996
127001
|
const hiderWidth = wtTable.hider.offsetWidth;
|
126997
127002
|
const tbodyOffsetLeft = wtTable.TBODY.offsetLeft;
|
126998
|
-
const backlightElemMarginStart = this.
|
126999
|
-
const backlightElemWidth = this.
|
127003
|
+
const backlightElemMarginStart = (0, _classPrivateFieldGet2.default)(this, _backlight).getOffset().start;
|
127004
|
+
const backlightElemWidth = (0, _classPrivateFieldGet2.default)(this, _backlight).getSize().width;
|
127000
127005
|
let rowHeaderWidth = 0;
|
127001
127006
|
let mouseOffsetStart = 0;
|
127002
127007
|
if (this.hot.isRtl()) {
|
@@ -127050,8 +127055,8 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
127050
127055
|
} else if (scrollableElement.scrollX !== undefined && (0, _classPrivateFieldGet2.default)(this, _hoveredColumn) < (0, _classPrivateFieldGet2.default)(this, _fixedColumnsStart)) {
|
127051
127056
|
guidelineStart -= (0, _classPrivateFieldGet2.default)(this, _rootElementOffset) <= scrollableElement.scrollX ? (0, _classPrivateFieldGet2.default)(this, _rootElementOffset) : 0;
|
127052
127057
|
}
|
127053
|
-
this.
|
127054
|
-
this.
|
127058
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(null, backlightStart);
|
127059
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).setPosition(null, guidelineStart);
|
127055
127060
|
}
|
127056
127061
|
|
127057
127062
|
/**
|
@@ -127081,15 +127086,15 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
127081
127086
|
* @private
|
127082
127087
|
*/
|
127083
127088
|
buildPluginUI() {
|
127084
|
-
this.
|
127085
|
-
this.
|
127089
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).build();
|
127090
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).build();
|
127086
127091
|
}
|
127087
127092
|
/**
|
127088
127093
|
* Destroys the plugin instance.
|
127089
127094
|
*/
|
127090
127095
|
destroy() {
|
127091
|
-
this.
|
127092
|
-
this.
|
127096
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).destroy();
|
127097
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).destroy();
|
127093
127098
|
super.destroy();
|
127094
127099
|
}
|
127095
127100
|
}
|
@@ -127106,11 +127111,11 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
|
127106
127111
|
(0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);
|
127107
127112
|
return;
|
127108
127113
|
}
|
127109
|
-
const guidelineIsNotReady = this.
|
127110
|
-
const backlightIsNotReady = this.
|
127114
|
+
const guidelineIsNotReady = (0, _classPrivateFieldGet2.default)(this, _guideline).isBuilt() && !(0, _classPrivateFieldGet2.default)(this, _guideline).isAppended();
|
127115
|
+
const backlightIsNotReady = (0, _classPrivateFieldGet2.default)(this, _backlight).isBuilt() && !(0, _classPrivateFieldGet2.default)(this, _backlight).isAppended();
|
127111
127116
|
if (guidelineIsNotReady && backlightIsNotReady) {
|
127112
|
-
this.
|
127113
|
-
this.
|
127117
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).appendTo(wtTable.hider);
|
127118
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).appendTo(wtTable.hider);
|
127114
127119
|
}
|
127115
127120
|
const {
|
127116
127121
|
from,
|
@@ -127138,9 +127143,9 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
|
127138
127143
|
const offsetX = Math.abs(eventOffsetX - (this.hot.isRtl() ? TD.offsetWidth : 0));
|
127139
127144
|
const inlineOffset = this.getColumnsWidth(start, coords.col - 1) + offsetX;
|
127140
127145
|
const inlinePos = this.getColumnsWidth(countColumnsFrom, start - 1) + (fixedColumnsStart ? horizontalScrollPosition : 0) + inlineOffset;
|
127141
|
-
this.
|
127142
|
-
this.
|
127143
|
-
this.
|
127146
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(topPos, inlinePos);
|
127147
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setSize(this.getColumnsWidth(start, end), wtTable.hider.offsetHeight - topPos);
|
127148
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setOffset(null, -inlineOffset);
|
127144
127149
|
(0, _element.addClass)(this.hot.rootElement, CSS_ON_MOVING);
|
127145
127150
|
} else {
|
127146
127151
|
(0, _element.removeClass)(this.hot.rootElement, CSS_AFTER_SELECTION);
|
@@ -127201,8 +127206,8 @@ function _onAfterScrollVertically2() {
|
|
127201
127206
|
const headerHeight = wtTable.getColumnHeaderHeight(0) + 1;
|
127202
127207
|
const scrollTop = wtTable.holder.scrollTop;
|
127203
127208
|
const posTop = headerHeight + scrollTop;
|
127204
|
-
this.
|
127205
|
-
this.
|
127209
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(posTop);
|
127210
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setSize(null, wtTable.hider.offsetHeight - posTop);
|
127206
127211
|
}
|
127207
127212
|
function _onAfterLoadData2() {
|
127208
127213
|
this.moveBySettingsOrLoad();
|
@@ -127482,13 +127487,12 @@ exports.ManualColumnResize = _manualColumnResize.ManualColumnResize;
|
|
127482
127487
|
"use strict";
|
127483
127488
|
|
127484
127489
|
|
127490
|
+
__webpack_require__(275);
|
127485
127491
|
var _interopRequireDefault = __webpack_require__(198);
|
127486
127492
|
exports.__esModule = true;
|
127487
127493
|
__webpack_require__(205);
|
127488
|
-
__webpack_require__(275);
|
127489
|
-
var _defineProperty2 = _interopRequireDefault(__webpack_require__(454));
|
127490
|
-
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(466));
|
127491
127494
|
var _classPrivateFieldSet2 = _interopRequireDefault(__webpack_require__(469));
|
127495
|
+
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(466));
|
127492
127496
|
var _base = __webpack_require__(756);
|
127493
127497
|
var _element = __webpack_require__(304);
|
127494
127498
|
var _array = __webpack_require__(446);
|
@@ -127518,6 +127522,21 @@ const PERSISTENT_STATE_KEY = 'manualColumnWidths';
|
|
127518
127522
|
* - handle - the draggable element that sets the desired width of the column.
|
127519
127523
|
* - guide - the helper guide that shows the desired width as a vertical guide.
|
127520
127524
|
*/
|
127525
|
+
var _currentTH = /*#__PURE__*/new WeakMap();
|
127526
|
+
var _currentCol = /*#__PURE__*/new WeakMap();
|
127527
|
+
var _selectedCols = /*#__PURE__*/new WeakMap();
|
127528
|
+
var _currentWidth = /*#__PURE__*/new WeakMap();
|
127529
|
+
var _newSize = /*#__PURE__*/new WeakMap();
|
127530
|
+
var _startY = /*#__PURE__*/new WeakMap();
|
127531
|
+
var _startWidth = /*#__PURE__*/new WeakMap();
|
127532
|
+
var _startOffset = /*#__PURE__*/new WeakMap();
|
127533
|
+
var _handle = /*#__PURE__*/new WeakMap();
|
127534
|
+
var _guide = /*#__PURE__*/new WeakMap();
|
127535
|
+
var _pressed = /*#__PURE__*/new WeakMap();
|
127536
|
+
var _isTriggeredByRMB = /*#__PURE__*/new WeakMap();
|
127537
|
+
var _dblclick = /*#__PURE__*/new WeakMap();
|
127538
|
+
var _autoresizeTimeout = /*#__PURE__*/new WeakMap();
|
127539
|
+
var _columnWidthsMap = /*#__PURE__*/new WeakMap();
|
127521
127540
|
var _config = /*#__PURE__*/new WeakMap();
|
127522
127541
|
var _onMapInit = /*#__PURE__*/new WeakSet();
|
127523
127542
|
var _onMouseOver = /*#__PURE__*/new WeakSet();
|
@@ -127597,66 +127616,110 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127597
127616
|
* @private
|
127598
127617
|
*/
|
127599
127618
|
_classPrivateMethodInitSpec(this, _onMapInit);
|
127600
|
-
(
|
127619
|
+
_classPrivateFieldInitSpec(this, _currentTH, {
|
127620
|
+
writable: true,
|
127621
|
+
value: null
|
127622
|
+
});
|
127601
127623
|
/**
|
127602
127624
|
* @type {number}
|
127603
127625
|
*/
|
127604
|
-
(
|
127626
|
+
_classPrivateFieldInitSpec(this, _currentCol, {
|
127627
|
+
writable: true,
|
127628
|
+
value: null
|
127629
|
+
});
|
127605
127630
|
/**
|
127606
127631
|
* @type {number[]}
|
127607
127632
|
*/
|
127608
|
-
(
|
127633
|
+
_classPrivateFieldInitSpec(this, _selectedCols, {
|
127634
|
+
writable: true,
|
127635
|
+
value: []
|
127636
|
+
});
|
127609
127637
|
/**
|
127610
127638
|
* @type {number}
|
127611
127639
|
*/
|
127612
|
-
(
|
127640
|
+
_classPrivateFieldInitSpec(this, _currentWidth, {
|
127641
|
+
writable: true,
|
127642
|
+
value: null
|
127643
|
+
});
|
127613
127644
|
/**
|
127614
127645
|
* @type {number}
|
127615
127646
|
*/
|
127616
|
-
(
|
127647
|
+
_classPrivateFieldInitSpec(this, _newSize, {
|
127648
|
+
writable: true,
|
127649
|
+
value: null
|
127650
|
+
});
|
127617
127651
|
/**
|
127618
127652
|
* @type {number}
|
127619
127653
|
*/
|
127620
|
-
(
|
127654
|
+
_classPrivateFieldInitSpec(this, _startY, {
|
127655
|
+
writable: true,
|
127656
|
+
value: null
|
127657
|
+
});
|
127621
127658
|
/**
|
127622
127659
|
* @type {number}
|
127623
127660
|
*/
|
127624
|
-
(
|
127661
|
+
_classPrivateFieldInitSpec(this, _startWidth, {
|
127662
|
+
writable: true,
|
127663
|
+
value: null
|
127664
|
+
});
|
127625
127665
|
/**
|
127626
127666
|
* @type {number}
|
127627
127667
|
*/
|
127628
|
-
(
|
127668
|
+
_classPrivateFieldInitSpec(this, _startOffset, {
|
127669
|
+
writable: true,
|
127670
|
+
value: null
|
127671
|
+
});
|
127629
127672
|
/**
|
127630
127673
|
* @type {HTMLElement}
|
127631
127674
|
*/
|
127632
|
-
(
|
127675
|
+
_classPrivateFieldInitSpec(this, _handle, {
|
127676
|
+
writable: true,
|
127677
|
+
value: this.hot.rootDocument.createElement('DIV')
|
127678
|
+
});
|
127633
127679
|
/**
|
127634
127680
|
* @type {HTMLElement}
|
127635
127681
|
*/
|
127636
|
-
(
|
127682
|
+
_classPrivateFieldInitSpec(this, _guide, {
|
127683
|
+
writable: true,
|
127684
|
+
value: this.hot.rootDocument.createElement('DIV')
|
127685
|
+
});
|
127637
127686
|
/**
|
127638
127687
|
* @type {boolean}
|
127639
127688
|
*/
|
127640
|
-
(
|
127689
|
+
_classPrivateFieldInitSpec(this, _pressed, {
|
127690
|
+
writable: true,
|
127691
|
+
value: null
|
127692
|
+
});
|
127641
127693
|
/**
|
127642
127694
|
* @type {boolean}
|
127643
127695
|
*/
|
127644
|
-
(
|
127696
|
+
_classPrivateFieldInitSpec(this, _isTriggeredByRMB, {
|
127697
|
+
writable: true,
|
127698
|
+
value: false
|
127699
|
+
});
|
127645
127700
|
/**
|
127646
127701
|
* @type {number}
|
127647
127702
|
*/
|
127648
|
-
(
|
127703
|
+
_classPrivateFieldInitSpec(this, _dblclick, {
|
127704
|
+
writable: true,
|
127705
|
+
value: 0
|
127706
|
+
});
|
127649
127707
|
/**
|
127650
127708
|
* @type {number}
|
127651
127709
|
*/
|
127652
|
-
(
|
127710
|
+
_classPrivateFieldInitSpec(this, _autoresizeTimeout, {
|
127711
|
+
writable: true,
|
127712
|
+
value: null
|
127713
|
+
});
|
127653
127714
|
/**
|
127654
127715
|
* PhysicalIndexToValueMap to keep and track widths for physical column indexes.
|
127655
127716
|
*
|
127656
|
-
* @private
|
127657
127717
|
* @type {PhysicalIndexToValueMap}
|
127658
127718
|
*/
|
127659
|
-
(
|
127719
|
+
_classPrivateFieldInitSpec(this, _columnWidthsMap, {
|
127720
|
+
writable: true,
|
127721
|
+
value: void 0
|
127722
|
+
});
|
127660
127723
|
/**
|
127661
127724
|
* Private pool to save configuration from updateSettings.
|
127662
127725
|
*
|
@@ -127666,8 +127729,8 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127666
127729
|
writable: true,
|
127667
127730
|
value: void 0
|
127668
127731
|
});
|
127669
|
-
(0, _element.addClass)(this
|
127670
|
-
(0, _element.addClass)(this
|
127732
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'manualColumnResizer');
|
127733
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'manualColumnResizerGuide');
|
127671
127734
|
}
|
127672
127735
|
|
127673
127736
|
/**
|
@@ -127695,9 +127758,9 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127695
127758
|
if (this.enabled) {
|
127696
127759
|
return;
|
127697
127760
|
}
|
127698
|
-
this
|
127699
|
-
this.
|
127700
|
-
this.hot.columnIndexMapper.registerMap(this.pluginName,
|
127761
|
+
(0, _classPrivateFieldSet2.default)(this, _columnWidthsMap, new _translations.PhysicalIndexToValueMap());
|
127762
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).addLocalHook('init', () => _classPrivateMethodGet(this, _onMapInit, _onMapInit2).call(this));
|
127763
|
+
this.hot.columnIndexMapper.registerMap(this.pluginName, (0, _classPrivateFieldGet2.default)(this, _columnWidthsMap));
|
127701
127764
|
this.addHook('modifyColWidth', (width, col) => _classPrivateMethodGet(this, _onModifyColWidth, _onModifyColWidth2).call(this, width, col));
|
127702
127765
|
this.addHook('beforeStretchingColumnWidth', (stretchedWidth, column) => _classPrivateMethodGet(this, _onBeforeStretchingColumnWidth, _onBeforeStretchingColumnWidth2).call(this, stretchedWidth, column));
|
127703
127766
|
this.addHook('beforeColumnResize', (newSize, column, isDoubleClick) => _classPrivateMethodGet(this, _onBeforeColumnResize, _onBeforeColumnResize2).call(this, newSize, column, isDoubleClick));
|
@@ -127721,7 +127784,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127721
127784
|
* Disables the plugin functionality for this Handsontable instance.
|
127722
127785
|
*/
|
127723
127786
|
disablePlugin() {
|
127724
|
-
(0, _classPrivateFieldSet2.default)(this, _config, this.
|
127787
|
+
(0, _classPrivateFieldSet2.default)(this, _config, (0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).getValues());
|
127725
127788
|
this.hot.columnIndexMapper.unregisterMap(this.pluginName);
|
127726
127789
|
super.disablePlugin();
|
127727
127790
|
}
|
@@ -127732,7 +127795,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127732
127795
|
* @fires Hooks#persistentStateSave
|
127733
127796
|
*/
|
127734
127797
|
saveManualColumnWidths() {
|
127735
|
-
this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, this.
|
127798
|
+
this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, (0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).getValues());
|
127736
127799
|
}
|
127737
127800
|
|
127738
127801
|
/**
|
@@ -127757,7 +127820,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127757
127820
|
setManualSize(column, width) {
|
127758
127821
|
const newWidth = Math.max(width, 20);
|
127759
127822
|
const physicalColumn = this.hot.toPhysicalColumn(column);
|
127760
|
-
this.
|
127823
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).setValueAtIndex(physicalColumn, newWidth);
|
127761
127824
|
return newWidth;
|
127762
127825
|
}
|
127763
127826
|
|
@@ -127768,7 +127831,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127768
127831
|
*/
|
127769
127832
|
clearManualSize(column) {
|
127770
127833
|
const physicalColumn = this.hot.toPhysicalColumn(column);
|
127771
|
-
this.
|
127834
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).setValueAtIndex(physicalColumn, null);
|
127772
127835
|
}
|
127773
127836
|
/**
|
127774
127837
|
* Set the resize handle position.
|
@@ -127780,34 +127843,34 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127780
127843
|
if (!TH.parentNode) {
|
127781
127844
|
return;
|
127782
127845
|
}
|
127783
|
-
this
|
127846
|
+
(0, _classPrivateFieldSet2.default)(this, _currentTH, TH);
|
127784
127847
|
const {
|
127785
127848
|
_wt: wt
|
127786
127849
|
} = this.hot.view;
|
127787
|
-
const cellCoords = wt.wtTable.getCoords(
|
127850
|
+
const cellCoords = wt.wtTable.getCoords((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
127788
127851
|
const col = cellCoords.col;
|
127789
127852
|
|
127790
127853
|
// Ignore column headers.
|
127791
127854
|
if (col < 0) {
|
127792
127855
|
return;
|
127793
127856
|
}
|
127794
|
-
const headerHeight = (0, _element.outerHeight)(
|
127795
|
-
const box = this.
|
127857
|
+
const headerHeight = (0, _element.outerHeight)((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
127858
|
+
const box = (0, _classPrivateFieldGet2.default)(this, _currentTH).getBoundingClientRect();
|
127796
127859
|
// Read "fixedColumnsStart" through the Walkontable as in that context, the fixed columns
|
127797
127860
|
// are modified (reduced by the number of hidden columns) by TableView module.
|
127798
127861
|
const fixedColumn = col < wt.getSetting('fixedColumnsStart');
|
127799
127862
|
let relativeHeaderPosition;
|
127800
127863
|
if (fixedColumn) {
|
127801
|
-
relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this
|
127864
|
+
relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition((0, _classPrivateFieldGet2.default)(this, _currentTH), cellCoords.row, cellCoords.col);
|
127802
127865
|
}
|
127803
127866
|
|
127804
127867
|
// If the TH is not a child of the top-left overlay, recalculate using
|
127805
127868
|
// the top overlay - as this overlay contains the rest of the headers.
|
127806
127869
|
if (!relativeHeaderPosition) {
|
127807
|
-
relativeHeaderPosition = wt.wtOverlays.topOverlay.getRelativeCellPosition(this
|
127870
|
+
relativeHeaderPosition = wt.wtOverlays.topOverlay.getRelativeCellPosition((0, _classPrivateFieldGet2.default)(this, _currentTH), cellCoords.row, cellCoords.col);
|
127808
127871
|
}
|
127809
|
-
this
|
127810
|
-
this
|
127872
|
+
(0, _classPrivateFieldSet2.default)(this, _currentCol, this.hot.columnIndexMapper.getVisualFromRenderableIndex(col));
|
127873
|
+
(0, _classPrivateFieldSet2.default)(this, _selectedCols, []);
|
127811
127874
|
const isFullColumnSelected = this.hot.selection.isSelectedByCorner() || this.hot.selection.isSelectedByColumnHeader();
|
127812
127875
|
if (this.hot.selection.isSelected() && isFullColumnSelected) {
|
127813
127876
|
const selectionRanges = this.hot.getSelectedRange();
|
@@ -127817,23 +127880,23 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127817
127880
|
|
127818
127881
|
// Add every selected column for resize action.
|
127819
127882
|
(0, _number.rangeEach)(fromColumn, toColumn, columnIndex => {
|
127820
|
-
if (!this.
|
127821
|
-
this.
|
127883
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _selectedCols).includes(columnIndex)) {
|
127884
|
+
(0, _classPrivateFieldGet2.default)(this, _selectedCols).push(columnIndex);
|
127822
127885
|
}
|
127823
127886
|
});
|
127824
127887
|
});
|
127825
127888
|
}
|
127826
127889
|
|
127827
127890
|
// Resizing element beyond the current selection (also when there is no selection).
|
127828
|
-
if (!this.
|
127829
|
-
this
|
127891
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _selectedCols).includes((0, _classPrivateFieldGet2.default)(this, _currentCol))) {
|
127892
|
+
(0, _classPrivateFieldSet2.default)(this, _selectedCols, [(0, _classPrivateFieldGet2.default)(this, _currentCol)]);
|
127830
127893
|
}
|
127831
|
-
this
|
127832
|
-
this
|
127833
|
-
this.
|
127834
|
-
this.
|
127835
|
-
this.
|
127836
|
-
this.hot.rootElement.appendChild(
|
127894
|
+
(0, _classPrivateFieldSet2.default)(this, _startOffset, relativeHeaderPosition.start - 6);
|
127895
|
+
(0, _classPrivateFieldSet2.default)(this, _startWidth, parseInt(box.width, 10));
|
127896
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style.top = `${relativeHeaderPosition.top}px`;
|
127897
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style[this.inlineDir] = `${(0, _classPrivateFieldGet2.default)(this, _startOffset) + (0, _classPrivateFieldGet2.default)(this, _startWidth)}px`;
|
127898
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style.height = `${headerHeight}px`;
|
127899
|
+
this.hot.rootElement.appendChild((0, _classPrivateFieldGet2.default)(this, _handle));
|
127837
127900
|
}
|
127838
127901
|
|
127839
127902
|
/**
|
@@ -127842,7 +127905,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127842
127905
|
* @private
|
127843
127906
|
*/
|
127844
127907
|
refreshHandlePosition() {
|
127845
|
-
this.
|
127908
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style[this.inlineDir] = `${(0, _classPrivateFieldGet2.default)(this, _startOffset) + (0, _classPrivateFieldGet2.default)(this, _currentWidth)}px`;
|
127846
127909
|
}
|
127847
127910
|
|
127848
127911
|
/**
|
@@ -127851,15 +127914,15 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127851
127914
|
* @private
|
127852
127915
|
*/
|
127853
127916
|
setupGuidePosition() {
|
127854
|
-
const handleHeight = parseInt((0, _element.outerHeight)(
|
127855
|
-
const handleBottomPosition = parseInt(this.
|
127917
|
+
const handleHeight = parseInt((0, _element.outerHeight)((0, _classPrivateFieldGet2.default)(this, _handle)), 10);
|
127918
|
+
const handleBottomPosition = parseInt((0, _classPrivateFieldGet2.default)(this, _handle).style.top, 10) + handleHeight;
|
127856
127919
|
const maximumVisibleElementHeight = parseInt(this.hot.view.maximumVisibleElementHeight(0), 10);
|
127857
|
-
(0, _element.addClass)(this
|
127858
|
-
(0, _element.addClass)(this
|
127859
|
-
this.
|
127920
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'active');
|
127921
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'active');
|
127922
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style.top = `${handleBottomPosition}px`;
|
127860
127923
|
this.refreshGuidePosition();
|
127861
|
-
this.
|
127862
|
-
this.hot.rootElement.appendChild(
|
127924
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style.height = `${maximumVisibleElementHeight - handleHeight}px`;
|
127925
|
+
this.hot.rootElement.appendChild((0, _classPrivateFieldGet2.default)(this, _guide));
|
127863
127926
|
}
|
127864
127927
|
|
127865
127928
|
/**
|
@@ -127868,7 +127931,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127868
127931
|
* @private
|
127869
127932
|
*/
|
127870
127933
|
refreshGuidePosition() {
|
127871
|
-
this.
|
127934
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style[this.inlineDir] = (0, _classPrivateFieldGet2.default)(this, _handle).style[this.inlineDir];
|
127872
127935
|
}
|
127873
127936
|
|
127874
127937
|
/**
|
@@ -127877,8 +127940,8 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127877
127940
|
* @private
|
127878
127941
|
*/
|
127879
127942
|
hideHandleAndGuide() {
|
127880
|
-
(0, _element.removeClass)(this
|
127881
|
-
(0, _element.removeClass)(this
|
127943
|
+
(0, _element.removeClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'active');
|
127944
|
+
(0, _element.removeClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'active');
|
127882
127945
|
}
|
127883
127946
|
|
127884
127947
|
/**
|
@@ -127922,37 +127985,37 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127922
127985
|
this.hot.view.adjustElementsSize(true);
|
127923
127986
|
};
|
127924
127987
|
const resize = (column, forceRender) => {
|
127925
|
-
const hookNewSize = this.hot.runHooks('beforeColumnResize', this
|
127988
|
+
const hookNewSize = this.hot.runHooks('beforeColumnResize', (0, _classPrivateFieldGet2.default)(this, _newSize), column, true);
|
127926
127989
|
if (hookNewSize !== undefined) {
|
127927
|
-
this
|
127990
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, hookNewSize);
|
127928
127991
|
}
|
127929
127992
|
if (this.hot.getSettings().stretchH === 'all') {
|
127930
127993
|
this.clearManualSize(column);
|
127931
127994
|
} else {
|
127932
|
-
this.setManualSize(column,
|
127995
|
+
this.setManualSize(column, (0, _classPrivateFieldGet2.default)(this, _newSize)); // double click sets by auto row size plugin
|
127933
127996
|
}
|
127934
127997
|
|
127935
127998
|
this.saveManualColumnWidths();
|
127936
|
-
this.hot.runHooks('afterColumnResize', this
|
127999
|
+
this.hot.runHooks('afterColumnResize', (0, _classPrivateFieldGet2.default)(this, _newSize), column, true);
|
127937
128000
|
if (forceRender) {
|
127938
128001
|
render();
|
127939
128002
|
}
|
127940
128003
|
};
|
127941
|
-
if (this
|
127942
|
-
const selectedColsLength = this.
|
128004
|
+
if ((0, _classPrivateFieldGet2.default)(this, _dblclick) >= 2) {
|
128005
|
+
const selectedColsLength = (0, _classPrivateFieldGet2.default)(this, _selectedCols).length;
|
127943
128006
|
if (selectedColsLength > 1) {
|
127944
|
-
(0, _array.arrayEach)(this
|
128007
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedCols), selectedCol => {
|
127945
128008
|
resize(selectedCol);
|
127946
128009
|
});
|
127947
128010
|
render();
|
127948
128011
|
} else {
|
127949
|
-
(0, _array.arrayEach)(this
|
128012
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedCols), selectedCol => {
|
127950
128013
|
resize(selectedCol, true);
|
127951
128014
|
});
|
127952
128015
|
}
|
127953
128016
|
}
|
127954
|
-
this
|
127955
|
-
this
|
128017
|
+
(0, _classPrivateFieldSet2.default)(this, _dblclick, 0);
|
128018
|
+
(0, _classPrivateFieldSet2.default)(this, _autoresizeTimeout, null);
|
127956
128019
|
}
|
127957
128020
|
/**
|
127958
128021
|
* Binds the mouse events.
|
@@ -127968,7 +128031,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
127968
128031
|
this.eventManager.addEventListener(rootElement, 'mousedown', e => _classPrivateMethodGet(this, _onMouseDown, _onMouseDown2).call(this, e));
|
127969
128032
|
this.eventManager.addEventListener(rootWindow, 'mousemove', e => _classPrivateMethodGet(this, _onMouseMove, _onMouseMove2).call(this, e));
|
127970
128033
|
this.eventManager.addEventListener(rootWindow, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
|
127971
|
-
this.eventManager.addEventListener(this
|
128034
|
+
this.eventManager.addEventListener((0, _classPrivateFieldGet2.default)(this, _handle), 'contextmenu', () => _classPrivateMethodGet(this, _onContextMenu, _onContextMenu2).call(this));
|
127972
128035
|
}
|
127973
128036
|
/**
|
127974
128037
|
* Destroys the plugin instance.
|
@@ -127984,20 +128047,20 @@ function _onMapInit2() {
|
|
127984
128047
|
if (typeof loadedManualColumnWidths !== 'undefined') {
|
127985
128048
|
this.hot.batchExecution(() => {
|
127986
128049
|
loadedManualColumnWidths.forEach((width, physicalIndex) => {
|
127987
|
-
this.
|
128050
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).setValueAtIndex(physicalIndex, width);
|
127988
128051
|
});
|
127989
128052
|
}, true);
|
127990
128053
|
} else if (Array.isArray(initialSetting)) {
|
127991
128054
|
this.hot.batchExecution(() => {
|
127992
128055
|
initialSetting.forEach((width, physicalIndex) => {
|
127993
|
-
this.
|
128056
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).setValueAtIndex(physicalIndex, width);
|
127994
128057
|
});
|
127995
128058
|
}, true);
|
127996
128059
|
(0, _classPrivateFieldSet2.default)(this, _config, initialSetting);
|
127997
128060
|
} else if (initialSetting === true && Array.isArray((0, _classPrivateFieldGet2.default)(this, _config))) {
|
127998
128061
|
this.hot.batchExecution(() => {
|
127999
128062
|
(0, _classPrivateFieldGet2.default)(this, _config).forEach((width, physicalIndex) => {
|
128000
|
-
this.
|
128063
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).setValueAtIndex(physicalIndex, width);
|
128001
128064
|
});
|
128002
128065
|
}, true);
|
128003
128066
|
}
|
@@ -128010,7 +128073,7 @@ function _onMouseOver2(event) {
|
|
128010
128073
|
}
|
128011
128074
|
|
128012
128075
|
// A "mouseover" action is triggered right after executing "contextmenu" event. It should be ignored.
|
128013
|
-
if (this
|
128076
|
+
if ((0, _classPrivateFieldGet2.default)(this, _isTriggeredByRMB) === true) {
|
128014
128077
|
return;
|
128015
128078
|
}
|
128016
128079
|
if (this.checkIfColumnHeader(event.target)) {
|
@@ -128020,7 +128083,7 @@ function _onMouseOver2(event) {
|
|
128020
128083
|
}
|
128021
128084
|
const colspan = th.getAttribute('colspan');
|
128022
128085
|
if (th && (colspan === null || colspan === '1')) {
|
128023
|
-
if (!
|
128086
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
128024
128087
|
this.setupHandlePosition(th);
|
128025
128088
|
}
|
128026
128089
|
}
|
@@ -128028,24 +128091,24 @@ function _onMouseOver2(event) {
|
|
128028
128091
|
}
|
128029
128092
|
function _onMouseDown2(event) {
|
128030
128093
|
if ((0, _element.hasClass)(event.target, 'manualColumnResizer')) {
|
128031
|
-
this.setupHandlePosition(
|
128094
|
+
this.setupHandlePosition((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
128032
128095
|
this.setupGuidePosition();
|
128033
|
-
this
|
128034
|
-
if (this
|
128035
|
-
this
|
128036
|
-
this.hot._registerTimeout(
|
128096
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, true);
|
128097
|
+
if ((0, _classPrivateFieldGet2.default)(this, _autoresizeTimeout) === null) {
|
128098
|
+
(0, _classPrivateFieldSet2.default)(this, _autoresizeTimeout, setTimeout(() => this.afterMouseDownTimeout(), 500));
|
128099
|
+
this.hot._registerTimeout((0, _classPrivateFieldGet2.default)(this, _autoresizeTimeout));
|
128037
128100
|
}
|
128038
|
-
this.
|
128101
|
+
(0, _classPrivateFieldSet2.default)(this, _dblclick, (0, _classPrivateFieldGet2.default)(this, _dblclick) + 1);
|
128039
128102
|
this.startX = event.pageX;
|
128040
|
-
this
|
128103
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, (0, _classPrivateFieldGet2.default)(this, _startWidth));
|
128041
128104
|
}
|
128042
128105
|
}
|
128043
128106
|
function _onMouseMove2(event) {
|
128044
|
-
if (
|
128107
|
+
if ((0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
128045
128108
|
const change = (event.pageX - this.startX) * this.hot.getDirectionFactor();
|
128046
|
-
this
|
128047
|
-
(0, _array.arrayEach)(this
|
128048
|
-
this
|
128109
|
+
(0, _classPrivateFieldSet2.default)(this, _currentWidth, (0, _classPrivateFieldGet2.default)(this, _startWidth) + change);
|
128110
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedCols), selectedCol => {
|
128111
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, this.setManualSize(selectedCol, (0, _classPrivateFieldGet2.default)(this, _currentWidth)));
|
128049
128112
|
});
|
128050
128113
|
this.refreshHandlePosition();
|
128051
128114
|
this.refreshGuidePosition();
|
@@ -128058,50 +128121,50 @@ function _onMouseUp2() {
|
|
128058
128121
|
this.hot.view.adjustElementsSize(true);
|
128059
128122
|
};
|
128060
128123
|
const resize = (column, forceRender) => {
|
128061
|
-
this.hot.runHooks('beforeColumnResize', this
|
128124
|
+
this.hot.runHooks('beforeColumnResize', (0, _classPrivateFieldGet2.default)(this, _newSize), column, false);
|
128062
128125
|
if (forceRender) {
|
128063
128126
|
render();
|
128064
128127
|
}
|
128065
128128
|
this.saveManualColumnWidths();
|
128066
|
-
this.hot.runHooks('afterColumnResize', this
|
128129
|
+
this.hot.runHooks('afterColumnResize', (0, _classPrivateFieldGet2.default)(this, _newSize), column, false);
|
128067
128130
|
};
|
128068
|
-
if (
|
128131
|
+
if ((0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
128069
128132
|
this.hideHandleAndGuide();
|
128070
|
-
this
|
128071
|
-
if (this
|
128072
|
-
const selectedColsLength = this.
|
128133
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, false);
|
128134
|
+
if ((0, _classPrivateFieldGet2.default)(this, _newSize) !== (0, _classPrivateFieldGet2.default)(this, _startWidth)) {
|
128135
|
+
const selectedColsLength = (0, _classPrivateFieldGet2.default)(this, _selectedCols).length;
|
128073
128136
|
if (selectedColsLength > 1) {
|
128074
|
-
(0, _array.arrayEach)(this
|
128137
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedCols), selectedCol => {
|
128075
128138
|
resize(selectedCol);
|
128076
128139
|
});
|
128077
128140
|
render();
|
128078
128141
|
} else {
|
128079
|
-
(0, _array.arrayEach)(this
|
128142
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedCols), selectedCol => {
|
128080
128143
|
resize(selectedCol, true);
|
128081
128144
|
});
|
128082
128145
|
}
|
128083
128146
|
}
|
128084
|
-
this.setupHandlePosition(
|
128147
|
+
this.setupHandlePosition((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
128085
128148
|
}
|
128086
128149
|
}
|
128087
128150
|
function _onContextMenu2() {
|
128088
128151
|
this.hideHandleAndGuide();
|
128089
|
-
this.hot.rootElement.removeChild(
|
128090
|
-
this.hot.rootElement.removeChild(
|
128091
|
-
this
|
128092
|
-
this
|
128152
|
+
this.hot.rootElement.removeChild((0, _classPrivateFieldGet2.default)(this, _handle));
|
128153
|
+
this.hot.rootElement.removeChild((0, _classPrivateFieldGet2.default)(this, _guide));
|
128154
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, false);
|
128155
|
+
(0, _classPrivateFieldSet2.default)(this, _isTriggeredByRMB, true);
|
128093
128156
|
|
128094
128157
|
// There is thrown "mouseover" event right after opening a context menu. This flag inform that handle
|
128095
128158
|
// shouldn't be drawn just after removing it.
|
128096
128159
|
this.hot._registerImmediate(() => {
|
128097
|
-
this
|
128160
|
+
(0, _classPrivateFieldSet2.default)(this, _isTriggeredByRMB, false);
|
128098
128161
|
});
|
128099
128162
|
}
|
128100
128163
|
function _onModifyColWidth2(width, column) {
|
128101
128164
|
let newWidth = width;
|
128102
128165
|
if (this.enabled) {
|
128103
128166
|
const physicalColumn = this.hot.toPhysicalColumn(column);
|
128104
|
-
const columnWidth = this.
|
128167
|
+
const columnWidth = (0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).getValueAtIndex(physicalColumn);
|
128105
128168
|
if (this.hot.getSettings()[PLUGIN_KEY] && columnWidth) {
|
128106
128169
|
newWidth = columnWidth;
|
128107
128170
|
}
|
@@ -128109,7 +128172,7 @@ function _onModifyColWidth2(width, column) {
|
|
128109
128172
|
return newWidth;
|
128110
128173
|
}
|
128111
128174
|
function _onBeforeStretchingColumnWidth2(stretchedWidth, column) {
|
128112
|
-
let width = this.
|
128175
|
+
let width = (0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).getValueAtIndex(column);
|
128113
128176
|
if (width === null) {
|
128114
128177
|
width = stretchedWidth;
|
128115
128178
|
}
|
@@ -128144,7 +128207,6 @@ var _interopRequireDefault = __webpack_require__(198);
|
|
128144
128207
|
exports.__esModule = true;
|
128145
128208
|
__webpack_require__(205);
|
128146
128209
|
__webpack_require__(275);
|
128147
|
-
var _defineProperty2 = _interopRequireDefault(__webpack_require__(454));
|
128148
128210
|
var _classPrivateFieldSet2 = _interopRequireDefault(__webpack_require__(469));
|
128149
128211
|
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(466));
|
128150
128212
|
var _base = __webpack_require__(756);
|
@@ -128152,8 +128214,8 @@ var _pluginHooks = _interopRequireDefault(__webpack_require__(461));
|
|
128152
128214
|
var _array = __webpack_require__(446);
|
128153
128215
|
var _element = __webpack_require__(304);
|
128154
128216
|
var _number = __webpack_require__(474);
|
128155
|
-
var
|
128156
|
-
var
|
128217
|
+
var _backlight2 = _interopRequireDefault(__webpack_require__(940));
|
128218
|
+
var _guideline2 = _interopRequireDefault(__webpack_require__(942));
|
128157
128219
|
__webpack_require__(943);
|
128158
128220
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
128159
128221
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
@@ -128194,6 +128256,8 @@ const CSS_AFTER_SELECTION = 'after-selection--rows';
|
|
128194
128256
|
* @class ManualRowMove
|
128195
128257
|
* @plugin ManualRowMove
|
128196
128258
|
*/
|
128259
|
+
var _backlight = /*#__PURE__*/new WeakMap();
|
128260
|
+
var _guideline = /*#__PURE__*/new WeakMap();
|
128197
128261
|
var _rowsToMove = /*#__PURE__*/new WeakMap();
|
128198
128262
|
var _pressed = /*#__PURE__*/new WeakMap();
|
128199
128263
|
var _target = /*#__PURE__*/new WeakMap();
|
@@ -128248,17 +128312,21 @@ class ManualRowMove extends _base.BasePlugin {
|
|
128248
128312
|
/**
|
128249
128313
|
* Backlight UI object.
|
128250
128314
|
*
|
128251
|
-
* @private
|
128252
128315
|
* @type {object}
|
128253
128316
|
*/
|
128254
|
-
(
|
128317
|
+
_classPrivateFieldInitSpec(this, _backlight, {
|
128318
|
+
writable: true,
|
128319
|
+
value: new _backlight2.default(this.hot)
|
128320
|
+
});
|
128255
128321
|
/**
|
128256
128322
|
* Guideline UI object.
|
128257
128323
|
*
|
128258
|
-
* @private
|
128259
128324
|
* @type {object}
|
128260
128325
|
*/
|
128261
|
-
(
|
128326
|
+
_classPrivateFieldInitSpec(this, _guideline, {
|
128327
|
+
writable: true,
|
128328
|
+
value: new _guideline2.default(this.hot)
|
128329
|
+
});
|
128262
128330
|
/**
|
128263
128331
|
* @type {number[]}
|
128264
128332
|
*/
|
@@ -128358,8 +128426,8 @@ class ManualRowMove extends _base.BasePlugin {
|
|
128358
128426
|
disablePlugin() {
|
128359
128427
|
(0, _element.removeClass)(this.hot.rootElement, CSS_PLUGIN);
|
128360
128428
|
this.unregisterEvents();
|
128361
|
-
this.
|
128362
|
-
this.
|
128429
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).destroy();
|
128430
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).destroy();
|
128363
128431
|
super.disablePlugin();
|
128364
128432
|
}
|
128365
128433
|
|
@@ -128624,8 +128692,8 @@ class ManualRowMove extends _base.BasePlugin {
|
|
128624
128692
|
const pixelsRelToTableStart = (0, _classPrivateFieldGet2.default)(this, _target).eventPageY - pixelsAbove + tableScroll;
|
128625
128693
|
const hiderHeight = wtTable.hider.offsetHeight;
|
128626
128694
|
const tbodyOffsetTop = wtTable.TBODY.offsetTop;
|
128627
|
-
const backlightElemMarginTop = this.
|
128628
|
-
const backlightElemHeight = this.
|
128695
|
+
const backlightElemMarginTop = (0, _classPrivateFieldGet2.default)(this, _backlight).getOffset().top;
|
128696
|
+
const backlightElemHeight = (0, _classPrivateFieldGet2.default)(this, _backlight).getSize().height;
|
128629
128697
|
const tdMiddle = TD.offsetHeight / 2;
|
128630
128698
|
const tdHeight = TD.offsetHeight;
|
128631
128699
|
let tdStartPixel = this.hot.view.THEAD.offsetHeight + this.getRowsHeight(0, coords.row - 1);
|
@@ -128658,8 +128726,8 @@ class ManualRowMove extends _base.BasePlugin {
|
|
128658
128726
|
// prevent display guideline below table
|
128659
128727
|
guidelineTop = hiderHeight - 1;
|
128660
128728
|
}
|
128661
|
-
this.
|
128662
|
-
this.
|
128729
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(backlightTop);
|
128730
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).setPosition(guidelineTop);
|
128663
128731
|
}
|
128664
128732
|
|
128665
128733
|
/**
|
@@ -128689,15 +128757,15 @@ class ManualRowMove extends _base.BasePlugin {
|
|
128689
128757
|
* @private
|
128690
128758
|
*/
|
128691
128759
|
buildPluginUI() {
|
128692
|
-
this.
|
128693
|
-
this.
|
128760
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).build();
|
128761
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).build();
|
128694
128762
|
}
|
128695
128763
|
/**
|
128696
128764
|
* Destroys the plugin instance.
|
128697
128765
|
*/
|
128698
128766
|
destroy() {
|
128699
|
-
this.
|
128700
|
-
this.
|
128767
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).destroy();
|
128768
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).destroy();
|
128701
128769
|
super.destroy();
|
128702
128770
|
}
|
128703
128771
|
}
|
@@ -128715,11 +128783,11 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
|
128715
128783
|
(0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);
|
128716
128784
|
return;
|
128717
128785
|
}
|
128718
|
-
const guidelineIsNotReady = this.
|
128719
|
-
const backlightIsNotReady = this.
|
128786
|
+
const guidelineIsNotReady = (0, _classPrivateFieldGet2.default)(this, _guideline).isBuilt() && !(0, _classPrivateFieldGet2.default)(this, _guideline).isAppended();
|
128787
|
+
const backlightIsNotReady = (0, _classPrivateFieldGet2.default)(this, _backlight).isBuilt() && !(0, _classPrivateFieldGet2.default)(this, _backlight).isAppended();
|
128720
128788
|
if (guidelineIsNotReady && backlightIsNotReady) {
|
128721
|
-
this.
|
128722
|
-
this.
|
128789
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).appendTo(wtTable.hider);
|
128790
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).appendTo(wtTable.hider);
|
128723
128791
|
}
|
128724
128792
|
const {
|
128725
128793
|
from,
|
@@ -128736,9 +128804,9 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
|
128736
128804
|
(0, _classPrivateFieldSet2.default)(this, _rowsToMove, this.prepareRowsToMoving());
|
128737
128805
|
const leftPos = wtTable.holder.scrollLeft + wtViewport.getRowHeaderWidth();
|
128738
128806
|
const topOffset = this.getRowsHeight(start, coords.row - 1) + event.offsetY;
|
128739
|
-
this.
|
128740
|
-
this.
|
128741
|
-
this.
|
128807
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(null, leftPos);
|
128808
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setSize(wtTable.hider.offsetWidth - leftPos, this.getRowsHeight(start, end));
|
128809
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setOffset(-topOffset, null);
|
128742
128810
|
(0, _element.addClass)(this.hot.rootElement, CSS_ON_MOVING);
|
128743
128811
|
this.refreshPositions();
|
128744
128812
|
} else {
|
@@ -128799,8 +128867,8 @@ function _onAfterScrollHorizontally2() {
|
|
128799
128867
|
const headerWidth = this.hot.view._wt.wtViewport.getRowHeaderWidth();
|
128800
128868
|
const scrollLeft = wtTable.holder.scrollLeft;
|
128801
128869
|
const posLeft = headerWidth + scrollLeft;
|
128802
|
-
this.
|
128803
|
-
this.
|
128870
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(null, posLeft);
|
128871
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setSize(wtTable.hider.offsetWidth - posLeft);
|
128804
128872
|
}
|
128805
128873
|
function _onAfterLoadData2() {
|
128806
128874
|
this.moveBySettingsOrLoad();
|
@@ -129066,13 +129134,12 @@ exports.ManualRowResize = _manualRowResize.ManualRowResize;
|
|
129066
129134
|
"use strict";
|
129067
129135
|
|
129068
129136
|
|
129137
|
+
__webpack_require__(275);
|
129069
129138
|
var _interopRequireDefault = __webpack_require__(198);
|
129070
129139
|
exports.__esModule = true;
|
129071
129140
|
__webpack_require__(205);
|
129072
|
-
__webpack_require__(275);
|
129073
|
-
var _defineProperty2 = _interopRequireDefault(__webpack_require__(454));
|
129074
|
-
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(466));
|
129075
129141
|
var _classPrivateFieldSet2 = _interopRequireDefault(__webpack_require__(469));
|
129142
|
+
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(466));
|
129076
129143
|
var _base = __webpack_require__(756);
|
129077
129144
|
var _element = __webpack_require__(304);
|
129078
129145
|
var _array = __webpack_require__(446);
|
@@ -129103,6 +129170,21 @@ const PERSISTENT_STATE_KEY = 'manualRowHeights';
|
|
129103
129170
|
* - handle - the draggable element that sets the desired height of the row.
|
129104
129171
|
* - guide - the helper guide that shows the desired height as a horizontal guide.
|
129105
129172
|
*/
|
129173
|
+
var _currentTH = /*#__PURE__*/new WeakMap();
|
129174
|
+
var _currentRow = /*#__PURE__*/new WeakMap();
|
129175
|
+
var _selectedRows = /*#__PURE__*/new WeakMap();
|
129176
|
+
var _currentHeight = /*#__PURE__*/new WeakMap();
|
129177
|
+
var _newSize = /*#__PURE__*/new WeakMap();
|
129178
|
+
var _startY = /*#__PURE__*/new WeakMap();
|
129179
|
+
var _startHeight = /*#__PURE__*/new WeakMap();
|
129180
|
+
var _startOffset = /*#__PURE__*/new WeakMap();
|
129181
|
+
var _handle = /*#__PURE__*/new WeakMap();
|
129182
|
+
var _guide = /*#__PURE__*/new WeakMap();
|
129183
|
+
var _pressed = /*#__PURE__*/new WeakMap();
|
129184
|
+
var _isTriggeredByRMB = /*#__PURE__*/new WeakMap();
|
129185
|
+
var _dblclick = /*#__PURE__*/new WeakMap();
|
129186
|
+
var _autoresizeTimeout = /*#__PURE__*/new WeakMap();
|
129187
|
+
var _rowHeightsMap = /*#__PURE__*/new WeakMap();
|
129106
129188
|
var _config = /*#__PURE__*/new WeakMap();
|
129107
129189
|
var _onMouseOver = /*#__PURE__*/new WeakSet();
|
129108
129190
|
var _onMouseDown = /*#__PURE__*/new WeakSet();
|
@@ -129166,66 +129248,110 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129166
129248
|
* @param {MouseEvent} event The mouse event.
|
129167
129249
|
*/
|
129168
129250
|
_classPrivateMethodInitSpec(this, _onMouseOver);
|
129169
|
-
(
|
129251
|
+
_classPrivateFieldInitSpec(this, _currentTH, {
|
129252
|
+
writable: true,
|
129253
|
+
value: null
|
129254
|
+
});
|
129170
129255
|
/**
|
129171
129256
|
* @type {number}
|
129172
129257
|
*/
|
129173
|
-
(
|
129258
|
+
_classPrivateFieldInitSpec(this, _currentRow, {
|
129259
|
+
writable: true,
|
129260
|
+
value: null
|
129261
|
+
});
|
129174
129262
|
/**
|
129175
129263
|
* @type {number[]}
|
129176
129264
|
*/
|
129177
|
-
(
|
129265
|
+
_classPrivateFieldInitSpec(this, _selectedRows, {
|
129266
|
+
writable: true,
|
129267
|
+
value: []
|
129268
|
+
});
|
129178
129269
|
/**
|
129179
129270
|
* @type {number}
|
129180
129271
|
*/
|
129181
|
-
(
|
129272
|
+
_classPrivateFieldInitSpec(this, _currentHeight, {
|
129273
|
+
writable: true,
|
129274
|
+
value: null
|
129275
|
+
});
|
129182
129276
|
/**
|
129183
129277
|
* @type {number}
|
129184
129278
|
*/
|
129185
|
-
(
|
129279
|
+
_classPrivateFieldInitSpec(this, _newSize, {
|
129280
|
+
writable: true,
|
129281
|
+
value: null
|
129282
|
+
});
|
129186
129283
|
/**
|
129187
129284
|
* @type {number}
|
129188
129285
|
*/
|
129189
|
-
(
|
129286
|
+
_classPrivateFieldInitSpec(this, _startY, {
|
129287
|
+
writable: true,
|
129288
|
+
value: null
|
129289
|
+
});
|
129190
129290
|
/**
|
129191
129291
|
* @type {number}
|
129192
129292
|
*/
|
129193
|
-
(
|
129293
|
+
_classPrivateFieldInitSpec(this, _startHeight, {
|
129294
|
+
writable: true,
|
129295
|
+
value: null
|
129296
|
+
});
|
129194
129297
|
/**
|
129195
129298
|
* @type {number}
|
129196
129299
|
*/
|
129197
|
-
(
|
129300
|
+
_classPrivateFieldInitSpec(this, _startOffset, {
|
129301
|
+
writable: true,
|
129302
|
+
value: null
|
129303
|
+
});
|
129198
129304
|
/**
|
129199
129305
|
* @type {HTMLElement}
|
129200
129306
|
*/
|
129201
|
-
(
|
129307
|
+
_classPrivateFieldInitSpec(this, _handle, {
|
129308
|
+
writable: true,
|
129309
|
+
value: this.hot.rootDocument.createElement('DIV')
|
129310
|
+
});
|
129202
129311
|
/**
|
129203
129312
|
* @type {HTMLElement}
|
129204
129313
|
*/
|
129205
|
-
(
|
129314
|
+
_classPrivateFieldInitSpec(this, _guide, {
|
129315
|
+
writable: true,
|
129316
|
+
value: this.hot.rootDocument.createElement('DIV')
|
129317
|
+
});
|
129206
129318
|
/**
|
129207
129319
|
* @type {boolean}
|
129208
129320
|
*/
|
129209
|
-
(
|
129321
|
+
_classPrivateFieldInitSpec(this, _pressed, {
|
129322
|
+
writable: true,
|
129323
|
+
value: false
|
129324
|
+
});
|
129210
129325
|
/**
|
129211
129326
|
* @type {boolean}
|
129212
129327
|
*/
|
129213
|
-
(
|
129328
|
+
_classPrivateFieldInitSpec(this, _isTriggeredByRMB, {
|
129329
|
+
writable: true,
|
129330
|
+
value: false
|
129331
|
+
});
|
129214
129332
|
/**
|
129215
129333
|
* @type {number}
|
129216
129334
|
*/
|
129217
|
-
(
|
129335
|
+
_classPrivateFieldInitSpec(this, _dblclick, {
|
129336
|
+
writable: true,
|
129337
|
+
value: 0
|
129338
|
+
});
|
129218
129339
|
/**
|
129219
129340
|
* @type {number}
|
129220
129341
|
*/
|
129221
|
-
(
|
129342
|
+
_classPrivateFieldInitSpec(this, _autoresizeTimeout, {
|
129343
|
+
writable: true,
|
129344
|
+
value: null
|
129345
|
+
});
|
129222
129346
|
/**
|
129223
129347
|
* PhysicalIndexToValueMap to keep and track widths for physical row indexes.
|
129224
129348
|
*
|
129225
|
-
* @private
|
129226
129349
|
* @type {PhysicalIndexToValueMap}
|
129227
129350
|
*/
|
129228
|
-
(
|
129351
|
+
_classPrivateFieldInitSpec(this, _rowHeightsMap, {
|
129352
|
+
writable: true,
|
129353
|
+
value: void 0
|
129354
|
+
});
|
129229
129355
|
/**
|
129230
129356
|
* Private pool to save configuration from updateSettings.
|
129231
129357
|
*
|
@@ -129235,8 +129361,8 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129235
129361
|
writable: true,
|
129236
129362
|
value: void 0
|
129237
129363
|
});
|
129238
|
-
(0, _element.addClass)(this
|
129239
|
-
(0, _element.addClass)(this
|
129364
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'manualRowResizer');
|
129365
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'manualRowResizerGuide');
|
129240
129366
|
}
|
129241
129367
|
|
129242
129368
|
/**
|
@@ -129264,9 +129390,9 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129264
129390
|
if (this.enabled) {
|
129265
129391
|
return;
|
129266
129392
|
}
|
129267
|
-
this
|
129268
|
-
this.
|
129269
|
-
this.hot.rowIndexMapper.registerMap(this.pluginName,
|
129393
|
+
(0, _classPrivateFieldSet2.default)(this, _rowHeightsMap, new _translations.PhysicalIndexToValueMap());
|
129394
|
+
(0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).addLocalHook('init', () => _classPrivateMethodGet(this, _onMapInit, _onMapInit2).call(this));
|
129395
|
+
this.hot.rowIndexMapper.registerMap(this.pluginName, (0, _classPrivateFieldGet2.default)(this, _rowHeightsMap));
|
129270
129396
|
this.addHook('modifyRowHeight', (height, row) => _classPrivateMethodGet(this, _onModifyRowHeight, _onModifyRowHeight2).call(this, height, row));
|
129271
129397
|
this.bindEvents();
|
129272
129398
|
super.enablePlugin();
|
@@ -129288,7 +129414,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129288
129414
|
* Disables the plugin functionality for this Handsontable instance.
|
129289
129415
|
*/
|
129290
129416
|
disablePlugin() {
|
129291
|
-
(0, _classPrivateFieldSet2.default)(this, _config, this.
|
129417
|
+
(0, _classPrivateFieldSet2.default)(this, _config, (0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).getValues());
|
129292
129418
|
this.hot.rowIndexMapper.unregisterMap(this.pluginName);
|
129293
129419
|
super.disablePlugin();
|
129294
129420
|
}
|
@@ -129300,7 +129426,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129300
129426
|
* @fires Hooks#persistentStateSave
|
129301
129427
|
*/
|
129302
129428
|
saveManualRowHeights() {
|
129303
|
-
this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, this.
|
129429
|
+
this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, (0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).getValues());
|
129304
129430
|
}
|
129305
129431
|
|
129306
129432
|
/**
|
@@ -129326,7 +129452,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129326
129452
|
setManualSize(row, height) {
|
129327
129453
|
const physicalRow = this.hot.toPhysicalRow(row);
|
129328
129454
|
const newHeight = Math.max(height, _src.ViewportRowsCalculator.DEFAULT_HEIGHT);
|
129329
|
-
this.
|
129455
|
+
(0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).setValueAtIndex(physicalRow, newHeight);
|
129330
129456
|
return newHeight;
|
129331
129457
|
}
|
129332
129458
|
|
@@ -129337,40 +129463,40 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129337
129463
|
* @param {HTMLCellElement} TH TH HTML element.
|
129338
129464
|
*/
|
129339
129465
|
setupHandlePosition(TH) {
|
129340
|
-
this
|
129466
|
+
(0, _classPrivateFieldSet2.default)(this, _currentTH, TH);
|
129341
129467
|
const {
|
129342
129468
|
view
|
129343
129469
|
} = this.hot;
|
129344
129470
|
const {
|
129345
129471
|
_wt: wt
|
129346
129472
|
} = view;
|
129347
|
-
const cellCoords = wt.wtTable.getCoords(
|
129473
|
+
const cellCoords = wt.wtTable.getCoords((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
129348
129474
|
const row = cellCoords.row;
|
129349
129475
|
|
129350
129476
|
// Ignore row headers.
|
129351
129477
|
if (row < 0) {
|
129352
129478
|
return;
|
129353
129479
|
}
|
129354
|
-
const headerWidth = (0, _element.outerWidth)(
|
129355
|
-
const box = this.
|
129480
|
+
const headerWidth = (0, _element.outerWidth)((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
129481
|
+
const box = (0, _classPrivateFieldGet2.default)(this, _currentTH).getBoundingClientRect();
|
129356
129482
|
// Read "fixedRowsTop" and "fixedRowsBottom" through the Walkontable as in that context, the fixed
|
129357
129483
|
// rows are modified (reduced by the number of hidden rows) by TableView module.
|
129358
129484
|
const fixedRowTop = row < wt.getSetting('fixedRowsTop');
|
129359
129485
|
const fixedRowBottom = row >= view.countNotHiddenRowIndexes(0, 1) - wt.getSetting('fixedRowsBottom');
|
129360
129486
|
let relativeHeaderPosition;
|
129361
129487
|
if (fixedRowTop) {
|
129362
|
-
relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this
|
129488
|
+
relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition((0, _classPrivateFieldGet2.default)(this, _currentTH), cellCoords.row, cellCoords.col);
|
129363
129489
|
} else if (fixedRowBottom) {
|
129364
|
-
relativeHeaderPosition = wt.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(this
|
129490
|
+
relativeHeaderPosition = wt.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition((0, _classPrivateFieldGet2.default)(this, _currentTH), cellCoords.row, cellCoords.col);
|
129365
129491
|
}
|
129366
129492
|
|
129367
129493
|
// If the TH is not a child of the top-left/bottom-left overlay, recalculate using
|
129368
129494
|
// the left overlay - as this overlay contains the rest of the headers.
|
129369
129495
|
if (!relativeHeaderPosition) {
|
129370
|
-
relativeHeaderPosition = wt.wtOverlays.inlineStartOverlay.getRelativeCellPosition(this
|
129496
|
+
relativeHeaderPosition = wt.wtOverlays.inlineStartOverlay.getRelativeCellPosition((0, _classPrivateFieldGet2.default)(this, _currentTH), cellCoords.row, cellCoords.col);
|
129371
129497
|
}
|
129372
|
-
this
|
129373
|
-
this
|
129498
|
+
(0, _classPrivateFieldSet2.default)(this, _currentRow, this.hot.rowIndexMapper.getVisualFromRenderableIndex(row));
|
129499
|
+
(0, _classPrivateFieldSet2.default)(this, _selectedRows, []);
|
129374
129500
|
const isFullRowSelected = this.hot.selection.isSelectedByCorner() || this.hot.selection.isSelectedByRowHeader();
|
129375
129501
|
if (this.hot.selection.isSelected() && isFullRowSelected) {
|
129376
129502
|
const selectionRanges = this.hot.getSelectedRange();
|
@@ -129380,23 +129506,23 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129380
129506
|
|
129381
129507
|
// Add every selected row for resize action.
|
129382
129508
|
(0, _number.rangeEach)(fromRow, toRow, rowIndex => {
|
129383
|
-
if (!this.
|
129384
|
-
this.
|
129509
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _selectedRows).includes(rowIndex)) {
|
129510
|
+
(0, _classPrivateFieldGet2.default)(this, _selectedRows).push(rowIndex);
|
129385
129511
|
}
|
129386
129512
|
});
|
129387
129513
|
});
|
129388
129514
|
}
|
129389
129515
|
|
129390
129516
|
// Resizing element beyond the current selection (also when there is no selection).
|
129391
|
-
if (!this.
|
129392
|
-
this
|
129517
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _selectedRows).includes((0, _classPrivateFieldGet2.default)(this, _currentRow))) {
|
129518
|
+
(0, _classPrivateFieldSet2.default)(this, _selectedRows, [(0, _classPrivateFieldGet2.default)(this, _currentRow)]);
|
129393
129519
|
}
|
129394
|
-
this
|
129395
|
-
this
|
129396
|
-
this.
|
129397
|
-
this.
|
129398
|
-
this.
|
129399
|
-
this.hot.rootElement.appendChild(
|
129520
|
+
(0, _classPrivateFieldSet2.default)(this, _startOffset, relativeHeaderPosition.top - 6);
|
129521
|
+
(0, _classPrivateFieldSet2.default)(this, _startHeight, parseInt(box.height, 10));
|
129522
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style.top = `${(0, _classPrivateFieldGet2.default)(this, _startOffset) + (0, _classPrivateFieldGet2.default)(this, _startHeight)}px`;
|
129523
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style[this.inlineDir] = `${relativeHeaderPosition.start}px`;
|
129524
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style.width = `${headerWidth}px`;
|
129525
|
+
this.hot.rootElement.appendChild((0, _classPrivateFieldGet2.default)(this, _handle));
|
129400
129526
|
}
|
129401
129527
|
|
129402
129528
|
/**
|
@@ -129405,7 +129531,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129405
129531
|
* @private
|
129406
129532
|
*/
|
129407
129533
|
refreshHandlePosition() {
|
129408
|
-
this.
|
129534
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style.top = `${(0, _classPrivateFieldGet2.default)(this, _startOffset) + (0, _classPrivateFieldGet2.default)(this, _currentHeight)}px`;
|
129409
129535
|
}
|
129410
129536
|
|
129411
129537
|
/**
|
@@ -129414,15 +129540,15 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129414
129540
|
* @private
|
129415
129541
|
*/
|
129416
129542
|
setupGuidePosition() {
|
129417
|
-
const handleWidth = parseInt((0, _element.outerWidth)(
|
129418
|
-
const handleEndPosition = parseInt(this.
|
129543
|
+
const handleWidth = parseInt((0, _element.outerWidth)((0, _classPrivateFieldGet2.default)(this, _handle)), 10);
|
129544
|
+
const handleEndPosition = parseInt((0, _classPrivateFieldGet2.default)(this, _handle).style[this.inlineDir], 10) + handleWidth;
|
129419
129545
|
const maximumVisibleElementWidth = parseInt(this.hot.view.maximumVisibleElementWidth(0), 10);
|
129420
|
-
(0, _element.addClass)(this
|
129421
|
-
(0, _element.addClass)(this
|
129422
|
-
this.
|
129423
|
-
this.
|
129424
|
-
this.
|
129425
|
-
this.hot.rootElement.appendChild(
|
129546
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'active');
|
129547
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'active');
|
129548
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style.top = (0, _classPrivateFieldGet2.default)(this, _handle).style.top;
|
129549
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style[this.inlineDir] = `${handleEndPosition}px`;
|
129550
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style.width = `${maximumVisibleElementWidth - handleWidth}px`;
|
129551
|
+
this.hot.rootElement.appendChild((0, _classPrivateFieldGet2.default)(this, _guide));
|
129426
129552
|
}
|
129427
129553
|
|
129428
129554
|
/**
|
@@ -129431,7 +129557,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129431
129557
|
* @private
|
129432
129558
|
*/
|
129433
129559
|
refreshGuidePosition() {
|
129434
|
-
this.
|
129560
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style.top = (0, _classPrivateFieldGet2.default)(this, _handle).style.top;
|
129435
129561
|
}
|
129436
129562
|
|
129437
129563
|
/**
|
@@ -129440,8 +129566,8 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129440
129566
|
* @private
|
129441
129567
|
*/
|
129442
129568
|
hideHandleAndGuide() {
|
129443
|
-
(0, _element.removeClass)(this
|
129444
|
-
(0, _element.removeClass)(this
|
129569
|
+
(0, _element.removeClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'active');
|
129570
|
+
(0, _element.removeClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'active');
|
129445
129571
|
}
|
129446
129572
|
|
129447
129573
|
/**
|
@@ -129484,10 +129610,10 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129484
129610
|
getActualRowHeight(row) {
|
129485
129611
|
// TODO: this should utilize `this.hot.getRowHeight` after it's fixed and working properly.
|
129486
129612
|
const walkontableHeight = this.hot.view._wt.wtTable.getRowHeight(row);
|
129487
|
-
if (walkontableHeight !== undefined && this
|
129613
|
+
if (walkontableHeight !== undefined && (0, _classPrivateFieldGet2.default)(this, _newSize) < walkontableHeight) {
|
129488
129614
|
return walkontableHeight;
|
129489
129615
|
}
|
129490
|
-
return this
|
129616
|
+
return (0, _classPrivateFieldGet2.default)(this, _newSize);
|
129491
129617
|
}
|
129492
129618
|
/**
|
129493
129619
|
* Auto-size row after doubleclick - callback.
|
@@ -129505,30 +129631,30 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129505
129631
|
const resize = (row, forceRender) => {
|
129506
129632
|
const hookNewSize = this.hot.runHooks('beforeRowResize', this.getActualRowHeight(row), row, true);
|
129507
129633
|
if (hookNewSize !== undefined) {
|
129508
|
-
this
|
129634
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, hookNewSize);
|
129509
129635
|
}
|
129510
|
-
this.setManualSize(row,
|
129636
|
+
this.setManualSize(row, (0, _classPrivateFieldGet2.default)(this, _newSize)); // double click sets auto row size
|
129511
129637
|
|
129512
129638
|
this.hot.runHooks('afterRowResize', this.getActualRowHeight(row), row, true);
|
129513
129639
|
if (forceRender) {
|
129514
129640
|
render();
|
129515
129641
|
}
|
129516
129642
|
};
|
129517
|
-
if (this
|
129518
|
-
const selectedRowsLength = this.
|
129643
|
+
if ((0, _classPrivateFieldGet2.default)(this, _dblclick) >= 2) {
|
129644
|
+
const selectedRowsLength = (0, _classPrivateFieldGet2.default)(this, _selectedRows).length;
|
129519
129645
|
if (selectedRowsLength > 1) {
|
129520
|
-
(0, _array.arrayEach)(this
|
129646
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedRows), selectedRow => {
|
129521
129647
|
resize(selectedRow);
|
129522
129648
|
});
|
129523
129649
|
render();
|
129524
129650
|
} else {
|
129525
|
-
(0, _array.arrayEach)(this
|
129651
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedRows), selectedRow => {
|
129526
129652
|
resize(selectedRow, true);
|
129527
129653
|
});
|
129528
129654
|
}
|
129529
129655
|
}
|
129530
|
-
this
|
129531
|
-
this
|
129656
|
+
(0, _classPrivateFieldSet2.default)(this, _dblclick, 0);
|
129657
|
+
(0, _classPrivateFieldSet2.default)(this, _autoresizeTimeout, null);
|
129532
129658
|
}
|
129533
129659
|
/**
|
129534
129660
|
* Binds the mouse events.
|
@@ -129544,7 +129670,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
129544
129670
|
this.eventManager.addEventListener(rootElement, 'mousedown', e => _classPrivateMethodGet(this, _onMouseDown, _onMouseDown2).call(this, e));
|
129545
129671
|
this.eventManager.addEventListener(rootWindow, 'mousemove', e => _classPrivateMethodGet(this, _onMouseMove, _onMouseMove2).call(this, e));
|
129546
129672
|
this.eventManager.addEventListener(rootWindow, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
|
129547
|
-
this.eventManager.addEventListener(this
|
129673
|
+
this.eventManager.addEventListener((0, _classPrivateFieldGet2.default)(this, _handle), 'contextmenu', () => _classPrivateMethodGet(this, _onContextMenu, _onContextMenu2).call(this));
|
129548
129674
|
}
|
129549
129675
|
/**
|
129550
129676
|
* Destroys the plugin instance.
|
@@ -129562,13 +129688,13 @@ function _onMouseOver2(event) {
|
|
129562
129688
|
}
|
129563
129689
|
|
129564
129690
|
// A "mouseover" action is triggered right after executing "contextmenu" event. It should be ignored.
|
129565
|
-
if (this
|
129691
|
+
if ((0, _classPrivateFieldGet2.default)(this, _isTriggeredByRMB) === true) {
|
129566
129692
|
return;
|
129567
129693
|
}
|
129568
129694
|
if (this.checkIfRowHeader(event.target)) {
|
129569
129695
|
const th = this.getClosestTHParent(event.target);
|
129570
129696
|
if (th) {
|
129571
|
-
if (!
|
129697
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
129572
129698
|
this.setupHandlePosition(th);
|
129573
129699
|
}
|
129574
129700
|
}
|
@@ -129576,23 +129702,23 @@ function _onMouseOver2(event) {
|
|
129576
129702
|
}
|
129577
129703
|
function _onMouseDown2(event) {
|
129578
129704
|
if ((0, _element.hasClass)(event.target, 'manualRowResizer')) {
|
129579
|
-
this.setupHandlePosition(
|
129705
|
+
this.setupHandlePosition((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
129580
129706
|
this.setupGuidePosition();
|
129581
|
-
this
|
129582
|
-
if (this
|
129583
|
-
this
|
129584
|
-
this.hot._registerTimeout(
|
129707
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, true);
|
129708
|
+
if ((0, _classPrivateFieldGet2.default)(this, _autoresizeTimeout) === null) {
|
129709
|
+
(0, _classPrivateFieldSet2.default)(this, _autoresizeTimeout, setTimeout(() => this.afterMouseDownTimeout(), 500));
|
129710
|
+
this.hot._registerTimeout((0, _classPrivateFieldGet2.default)(this, _autoresizeTimeout));
|
129585
129711
|
}
|
129586
|
-
this.
|
129587
|
-
this
|
129588
|
-
this
|
129712
|
+
(0, _classPrivateFieldSet2.default)(this, _dblclick, (0, _classPrivateFieldGet2.default)(this, _dblclick) + 1);
|
129713
|
+
(0, _classPrivateFieldSet2.default)(this, _startY, event.pageY);
|
129714
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, (0, _classPrivateFieldGet2.default)(this, _startHeight));
|
129589
129715
|
}
|
129590
129716
|
}
|
129591
129717
|
function _onMouseMove2(event) {
|
129592
|
-
if (
|
129593
|
-
this
|
129594
|
-
(0, _array.arrayEach)(this
|
129595
|
-
this
|
129718
|
+
if ((0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
129719
|
+
(0, _classPrivateFieldSet2.default)(this, _currentHeight, (0, _classPrivateFieldGet2.default)(this, _startHeight) + (event.pageY - (0, _classPrivateFieldGet2.default)(this, _startY)));
|
129720
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedRows), selectedRow => {
|
129721
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, this.setManualSize(selectedRow, (0, _classPrivateFieldGet2.default)(this, _currentHeight)));
|
129596
129722
|
});
|
129597
129723
|
this.refreshHandlePosition();
|
129598
129724
|
this.refreshGuidePosition();
|
@@ -129612,43 +129738,43 @@ function _onMouseUp2() {
|
|
129612
129738
|
this.saveManualRowHeights();
|
129613
129739
|
this.hot.runHooks('afterRowResize', this.getActualRowHeight(row), row, false);
|
129614
129740
|
};
|
129615
|
-
if (
|
129741
|
+
if ((0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
129616
129742
|
this.hideHandleAndGuide();
|
129617
|
-
this
|
129618
|
-
if (this
|
129619
|
-
const selectedRowsLength = this.
|
129743
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, false);
|
129744
|
+
if ((0, _classPrivateFieldGet2.default)(this, _newSize) !== (0, _classPrivateFieldGet2.default)(this, _startHeight)) {
|
129745
|
+
const selectedRowsLength = (0, _classPrivateFieldGet2.default)(this, _selectedRows).length;
|
129620
129746
|
if (selectedRowsLength > 1) {
|
129621
|
-
(0, _array.arrayEach)(this
|
129747
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedRows), selectedRow => {
|
129622
129748
|
runHooks(selectedRow);
|
129623
129749
|
});
|
129624
129750
|
render();
|
129625
129751
|
} else {
|
129626
|
-
(0, _array.arrayEach)(this
|
129752
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedRows), selectedRow => {
|
129627
129753
|
runHooks(selectedRow, true);
|
129628
129754
|
});
|
129629
129755
|
}
|
129630
129756
|
}
|
129631
|
-
this.setupHandlePosition(
|
129757
|
+
this.setupHandlePosition((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
129632
129758
|
}
|
129633
129759
|
}
|
129634
129760
|
function _onContextMenu2() {
|
129635
129761
|
this.hideHandleAndGuide();
|
129636
|
-
this.hot.rootElement.removeChild(
|
129637
|
-
this.hot.rootElement.removeChild(
|
129638
|
-
this
|
129639
|
-
this
|
129762
|
+
this.hot.rootElement.removeChild((0, _classPrivateFieldGet2.default)(this, _handle));
|
129763
|
+
this.hot.rootElement.removeChild((0, _classPrivateFieldGet2.default)(this, _guide));
|
129764
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, false);
|
129765
|
+
(0, _classPrivateFieldSet2.default)(this, _isTriggeredByRMB, true);
|
129640
129766
|
|
129641
129767
|
// There is thrown "mouseover" event right after opening a context menu. This flag inform that handle
|
129642
129768
|
// shouldn't be drawn just after removing it.
|
129643
129769
|
this.hot._registerImmediate(() => {
|
129644
|
-
this
|
129770
|
+
(0, _classPrivateFieldSet2.default)(this, _isTriggeredByRMB, false);
|
129645
129771
|
});
|
129646
129772
|
}
|
129647
129773
|
function _onModifyRowHeight2(height, row) {
|
129648
129774
|
let newHeight = height;
|
129649
129775
|
if (this.enabled) {
|
129650
129776
|
const physicalRow = this.hot.toPhysicalRow(row);
|
129651
|
-
const rowHeight = this.
|
129777
|
+
const rowHeight = (0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).getValueAtIndex(physicalRow);
|
129652
129778
|
if (this.hot.getSettings()[PLUGIN_KEY] && rowHeight) {
|
129653
129779
|
newHeight = rowHeight;
|
129654
129780
|
}
|
@@ -129661,16 +129787,16 @@ function _onMapInit2() {
|
|
129661
129787
|
this.hot.batchExecution(() => {
|
129662
129788
|
if (typeof loadedManualRowHeights !== 'undefined') {
|
129663
129789
|
loadedManualRowHeights.forEach((height, index) => {
|
129664
|
-
this.
|
129790
|
+
(0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).setValueAtIndex(index, height);
|
129665
129791
|
});
|
129666
129792
|
} else if (Array.isArray(initialSetting)) {
|
129667
129793
|
initialSetting.forEach((height, index) => {
|
129668
|
-
this.
|
129794
|
+
(0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).setValueAtIndex(index, height);
|
129669
129795
|
});
|
129670
129796
|
(0, _classPrivateFieldSet2.default)(this, _config, initialSetting);
|
129671
129797
|
} else if (initialSetting === true && Array.isArray((0, _classPrivateFieldGet2.default)(this, _config))) {
|
129672
129798
|
(0, _classPrivateFieldGet2.default)(this, _config).forEach((height, index) => {
|
129673
|
-
this.
|
129799
|
+
(0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).setValueAtIndex(index, height);
|
129674
129800
|
});
|
129675
129801
|
}
|
129676
129802
|
}, true);
|