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
package/dist/handsontable.js
CHANGED
@@ -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')
|
@@ -105,8 +105,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
|
|
105
105
|
Handsontable.CellCoords = _src.CellCoords;
|
106
106
|
Handsontable.CellRange = _src.CellRange;
|
107
107
|
Handsontable.packageName = 'handsontable';
|
108
|
-
Handsontable.buildDate = "
|
109
|
-
Handsontable.version = "14.0.0-next-
|
108
|
+
Handsontable.buildDate = "15/11/2023 14:48:47";
|
109
|
+
Handsontable.version = "14.0.0-next-bdc44e7-20231115";
|
110
110
|
Handsontable.languages = {
|
111
111
|
dictionaryKeys: _registry.dictionaryKeys,
|
112
112
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
@@ -8542,7 +8542,7 @@ const domMessages = {
|
|
8542
8542
|
function _injectProductInfo(key, element) {
|
8543
8543
|
const hasValidType = !isEmpty(key);
|
8544
8544
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
8545
|
-
const hotVersion = "14.0.0-next-
|
8545
|
+
const hotVersion = "14.0.0-next-bdc44e7-20231115";
|
8546
8546
|
let keyValidityDate;
|
8547
8547
|
let consoleMessageState = 'invalid';
|
8548
8548
|
let domMessageState = 'invalid';
|
@@ -8550,7 +8550,7 @@ function _injectProductInfo(key, element) {
|
|
8550
8550
|
const schemaValidity = _checkKeySchema(key);
|
8551
8551
|
if (hasValidType || isNonCommercial || schemaValidity) {
|
8552
8552
|
if (schemaValidity) {
|
8553
|
-
const releaseDate = (0, _moment.default)("
|
8553
|
+
const releaseDate = (0, _moment.default)("22/11/2023", 'DD/MM/YYYY');
|
8554
8554
|
const releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
|
8555
8555
|
const keyValidityDays = _extractTime(key);
|
8556
8556
|
keyValidityDate = (0, _moment.default)((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
|
@@ -39203,7 +39203,7 @@ var _default = () => {
|
|
39203
39203
|
*/
|
39204
39204
|
multiColumnSorting: undefined,
|
39205
39205
|
/**
|
39206
|
-
* 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 [`
|
39206
|
+
* 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`).
|
39207
39207
|
*
|
39208
39208
|
* @since 14.0.0
|
39209
39209
|
* @memberof Options#
|
@@ -39222,27 +39222,27 @@ var _default = () => {
|
|
39222
39222
|
*/
|
39223
39223
|
navigableHeaders: false,
|
39224
39224
|
/**
|
39225
|
-
* When set to `
|
39225
|
+
* When set to `false`, the `tabNavigation` option changes the behavior of the
|
39226
39226
|
* <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keyboard shortcuts. The Handsontable
|
39227
|
-
* no more captures that shortcuts to make the grid navigation available (`
|
39227
|
+
* no more captures that shortcuts to make the grid navigation available (`tabNavigation: true`)
|
39228
39228
|
* but returns control to the browser so the native page navigation is possible.
|
39229
39229
|
*
|
39230
39230
|
* @since 14.0.0
|
39231
39231
|
* @memberof Options#
|
39232
39232
|
* @type {boolean}
|
39233
|
-
* @default
|
39233
|
+
* @default true
|
39234
39234
|
* @category Core
|
39235
39235
|
*
|
39236
39236
|
* @example
|
39237
39237
|
* ```js
|
39238
39238
|
* // you can't navigate row and column headers using <kbd>Tab</kbd> or <kbd>Shift</kbd>+<kbd>Tab</kbd> keyboard shortcuts
|
39239
|
-
*
|
39239
|
+
* tabNavigation: false,
|
39240
39240
|
*
|
39241
39241
|
* // default behavior: you can navigate row and column headers using <kbd>Tab</kbd> or <kbd>Shift</kbd>+<kbd>Tab</kbd> keyboard shortcuts
|
39242
|
-
*
|
39242
|
+
* tabNavigation: true,
|
39243
39243
|
* ```
|
39244
39244
|
*/
|
39245
|
-
|
39245
|
+
tabNavigation: true,
|
39246
39246
|
/**
|
39247
39247
|
* @description
|
39248
39248
|
* The `nestedHeaders` option configures the [`NestedHeaders`](@/api/nestedHeaders.md) plugin.
|
@@ -41962,7 +41962,7 @@ function installFocusCatcher(hot) {
|
|
41962
41962
|
...shortcutOptions,
|
41963
41963
|
callback: () => {
|
41964
41964
|
isTabOrShiftTabPressed = true;
|
41965
|
-
if (hot.getSelectedRangeLast() && hot.getSettings().
|
41965
|
+
if (hot.getSelectedRangeLast() && !hot.getSettings().tabNavigation) {
|
41966
41966
|
isSavingCoordsEnabled = false;
|
41967
41967
|
}
|
41968
41968
|
},
|
@@ -41971,12 +41971,12 @@ function installFocusCatcher(hot) {
|
|
41971
41971
|
...shortcutOptions,
|
41972
41972
|
callback: event => {
|
41973
41973
|
const {
|
41974
|
-
|
41974
|
+
tabNavigation,
|
41975
41975
|
autoWrapRow
|
41976
41976
|
} = hot.getSettings();
|
41977
41977
|
isTabOrShiftTabPressed = false;
|
41978
41978
|
isSavingCoordsEnabled = true;
|
41979
|
-
if (
|
41979
|
+
if (!tabNavigation || !hot.selection.isSelected() || autoWrapRow && rowWrapState.wrapped && rowWrapState.flipped || !autoWrapRow && rowWrapState.wrapped) {
|
41980
41980
|
if (autoWrapRow && rowWrapState.wrapped && rowWrapState.flipped) {
|
41981
41981
|
recentlyAddedFocusCoords = event.shiftKey ? getMostTopStartPosition(hot) : getMostBottomEndPosition(hot);
|
41982
41982
|
}
|
@@ -73771,7 +73771,6 @@ var _interopRequireDefault = __webpack_require__(1);
|
|
73771
73771
|
exports.__esModule = true;
|
73772
73772
|
__webpack_require__(8);
|
73773
73773
|
__webpack_require__(78);
|
73774
|
-
var _defineProperty2 = _interopRequireDefault(__webpack_require__(121));
|
73775
73774
|
var _classPrivateFieldSet2 = _interopRequireDefault(__webpack_require__(136));
|
73776
73775
|
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(133));
|
73777
73776
|
var _base = __webpack_require__(423);
|
@@ -73780,8 +73779,8 @@ var _array = __webpack_require__(113);
|
|
73780
73779
|
var _element = __webpack_require__(107);
|
73781
73780
|
var _event = __webpack_require__(126);
|
73782
73781
|
var _number = __webpack_require__(141);
|
73783
|
-
var
|
73784
|
-
var
|
73782
|
+
var _backlight2 = _interopRequireDefault(__webpack_require__(599));
|
73783
|
+
var _guideline2 = _interopRequireDefault(__webpack_require__(601));
|
73785
73784
|
__webpack_require__(602);
|
73786
73785
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
73787
73786
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
@@ -73823,6 +73822,8 @@ const CSS_AFTER_SELECTION = 'after-selection--columns';
|
|
73823
73822
|
* @class ManualColumnMove
|
73824
73823
|
* @plugin ManualColumnMove
|
73825
73824
|
*/
|
73825
|
+
var _backlight = /*#__PURE__*/new WeakMap();
|
73826
|
+
var _guideline = /*#__PURE__*/new WeakMap();
|
73826
73827
|
var _columnsToMove = /*#__PURE__*/new WeakMap();
|
73827
73828
|
var _countCols = /*#__PURE__*/new WeakMap();
|
73828
73829
|
var _pressed = /*#__PURE__*/new WeakMap();
|
@@ -73884,17 +73885,21 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
73884
73885
|
/**
|
73885
73886
|
* Backlight UI object.
|
73886
73887
|
*
|
73887
|
-
* @private
|
73888
73888
|
* @type {object}
|
73889
73889
|
*/
|
73890
|
-
(
|
73890
|
+
_classPrivateFieldInitSpec(this, _backlight, {
|
73891
|
+
writable: true,
|
73892
|
+
value: new _backlight2.default(this.hot)
|
73893
|
+
});
|
73891
73894
|
/**
|
73892
73895
|
* Guideline UI object.
|
73893
73896
|
*
|
73894
|
-
* @private
|
73895
73897
|
* @type {object}
|
73896
73898
|
*/
|
73897
|
-
(
|
73899
|
+
_classPrivateFieldInitSpec(this, _guideline, {
|
73900
|
+
writable: true,
|
73901
|
+
value: new _guideline2.default(this.hot)
|
73902
|
+
});
|
73898
73903
|
/**
|
73899
73904
|
* @type {number[]}
|
73900
73905
|
*/
|
@@ -74029,8 +74034,8 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
74029
74034
|
disablePlugin() {
|
74030
74035
|
(0, _element.removeClass)(this.hot.rootElement, CSS_PLUGIN);
|
74031
74036
|
this.unregisterEvents();
|
74032
|
-
this.
|
74033
|
-
this.
|
74037
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).destroy();
|
74038
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).destroy();
|
74034
74039
|
super.disablePlugin();
|
74035
74040
|
}
|
74036
74041
|
|
@@ -74267,8 +74272,8 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
74267
74272
|
let tdOffsetStart = this.hot.view.THEAD.offsetLeft + this.getColumnsWidth(0, (0, _classPrivateFieldGet2.default)(this, _hoveredColumn) - 1);
|
74268
74273
|
const hiderWidth = wtTable.hider.offsetWidth;
|
74269
74274
|
const tbodyOffsetLeft = wtTable.TBODY.offsetLeft;
|
74270
|
-
const backlightElemMarginStart = this.
|
74271
|
-
const backlightElemWidth = this.
|
74275
|
+
const backlightElemMarginStart = (0, _classPrivateFieldGet2.default)(this, _backlight).getOffset().start;
|
74276
|
+
const backlightElemWidth = (0, _classPrivateFieldGet2.default)(this, _backlight).getSize().width;
|
74272
74277
|
let rowHeaderWidth = 0;
|
74273
74278
|
let mouseOffsetStart = 0;
|
74274
74279
|
if (this.hot.isRtl()) {
|
@@ -74322,8 +74327,8 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
74322
74327
|
} else if (scrollableElement.scrollX !== undefined && (0, _classPrivateFieldGet2.default)(this, _hoveredColumn) < (0, _classPrivateFieldGet2.default)(this, _fixedColumnsStart)) {
|
74323
74328
|
guidelineStart -= (0, _classPrivateFieldGet2.default)(this, _rootElementOffset) <= scrollableElement.scrollX ? (0, _classPrivateFieldGet2.default)(this, _rootElementOffset) : 0;
|
74324
74329
|
}
|
74325
|
-
this.
|
74326
|
-
this.
|
74330
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(null, backlightStart);
|
74331
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).setPosition(null, guidelineStart);
|
74327
74332
|
}
|
74328
74333
|
|
74329
74334
|
/**
|
@@ -74353,15 +74358,15 @@ class ManualColumnMove extends _base.BasePlugin {
|
|
74353
74358
|
* @private
|
74354
74359
|
*/
|
74355
74360
|
buildPluginUI() {
|
74356
|
-
this.
|
74357
|
-
this.
|
74361
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).build();
|
74362
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).build();
|
74358
74363
|
}
|
74359
74364
|
/**
|
74360
74365
|
* Destroys the plugin instance.
|
74361
74366
|
*/
|
74362
74367
|
destroy() {
|
74363
|
-
this.
|
74364
|
-
this.
|
74368
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).destroy();
|
74369
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).destroy();
|
74365
74370
|
super.destroy();
|
74366
74371
|
}
|
74367
74372
|
}
|
@@ -74378,11 +74383,11 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
|
74378
74383
|
(0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);
|
74379
74384
|
return;
|
74380
74385
|
}
|
74381
|
-
const guidelineIsNotReady = this.
|
74382
|
-
const backlightIsNotReady = this.
|
74386
|
+
const guidelineIsNotReady = (0, _classPrivateFieldGet2.default)(this, _guideline).isBuilt() && !(0, _classPrivateFieldGet2.default)(this, _guideline).isAppended();
|
74387
|
+
const backlightIsNotReady = (0, _classPrivateFieldGet2.default)(this, _backlight).isBuilt() && !(0, _classPrivateFieldGet2.default)(this, _backlight).isAppended();
|
74383
74388
|
if (guidelineIsNotReady && backlightIsNotReady) {
|
74384
|
-
this.
|
74385
|
-
this.
|
74389
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).appendTo(wtTable.hider);
|
74390
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).appendTo(wtTable.hider);
|
74386
74391
|
}
|
74387
74392
|
const {
|
74388
74393
|
from,
|
@@ -74410,9 +74415,9 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
|
74410
74415
|
const offsetX = Math.abs(eventOffsetX - (this.hot.isRtl() ? TD.offsetWidth : 0));
|
74411
74416
|
const inlineOffset = this.getColumnsWidth(start, coords.col - 1) + offsetX;
|
74412
74417
|
const inlinePos = this.getColumnsWidth(countColumnsFrom, start - 1) + (fixedColumnsStart ? horizontalScrollPosition : 0) + inlineOffset;
|
74413
|
-
this.
|
74414
|
-
this.
|
74415
|
-
this.
|
74418
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(topPos, inlinePos);
|
74419
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setSize(this.getColumnsWidth(start, end), wtTable.hider.offsetHeight - topPos);
|
74420
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setOffset(null, -inlineOffset);
|
74416
74421
|
(0, _element.addClass)(this.hot.rootElement, CSS_ON_MOVING);
|
74417
74422
|
} else {
|
74418
74423
|
(0, _element.removeClass)(this.hot.rootElement, CSS_AFTER_SELECTION);
|
@@ -74473,8 +74478,8 @@ function _onAfterScrollVertically2() {
|
|
74473
74478
|
const headerHeight = wtTable.getColumnHeaderHeight(0) + 1;
|
74474
74479
|
const scrollTop = wtTable.holder.scrollTop;
|
74475
74480
|
const posTop = headerHeight + scrollTop;
|
74476
|
-
this.
|
74477
|
-
this.
|
74481
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(posTop);
|
74482
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setSize(null, wtTable.hider.offsetHeight - posTop);
|
74478
74483
|
}
|
74479
74484
|
function _onAfterLoadData2() {
|
74480
74485
|
this.moveBySettingsOrLoad();
|
@@ -74754,13 +74759,12 @@ exports.ManualColumnResize = _manualColumnResize.ManualColumnResize;
|
|
74754
74759
|
"use strict";
|
74755
74760
|
|
74756
74761
|
|
74762
|
+
__webpack_require__(78);
|
74757
74763
|
var _interopRequireDefault = __webpack_require__(1);
|
74758
74764
|
exports.__esModule = true;
|
74759
74765
|
__webpack_require__(8);
|
74760
|
-
__webpack_require__(78);
|
74761
|
-
var _defineProperty2 = _interopRequireDefault(__webpack_require__(121));
|
74762
|
-
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(133));
|
74763
74766
|
var _classPrivateFieldSet2 = _interopRequireDefault(__webpack_require__(136));
|
74767
|
+
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(133));
|
74764
74768
|
var _base = __webpack_require__(423);
|
74765
74769
|
var _element = __webpack_require__(107);
|
74766
74770
|
var _array = __webpack_require__(113);
|
@@ -74790,6 +74794,21 @@ const PERSISTENT_STATE_KEY = 'manualColumnWidths';
|
|
74790
74794
|
* - handle - the draggable element that sets the desired width of the column.
|
74791
74795
|
* - guide - the helper guide that shows the desired width as a vertical guide.
|
74792
74796
|
*/
|
74797
|
+
var _currentTH = /*#__PURE__*/new WeakMap();
|
74798
|
+
var _currentCol = /*#__PURE__*/new WeakMap();
|
74799
|
+
var _selectedCols = /*#__PURE__*/new WeakMap();
|
74800
|
+
var _currentWidth = /*#__PURE__*/new WeakMap();
|
74801
|
+
var _newSize = /*#__PURE__*/new WeakMap();
|
74802
|
+
var _startY = /*#__PURE__*/new WeakMap();
|
74803
|
+
var _startWidth = /*#__PURE__*/new WeakMap();
|
74804
|
+
var _startOffset = /*#__PURE__*/new WeakMap();
|
74805
|
+
var _handle = /*#__PURE__*/new WeakMap();
|
74806
|
+
var _guide = /*#__PURE__*/new WeakMap();
|
74807
|
+
var _pressed = /*#__PURE__*/new WeakMap();
|
74808
|
+
var _isTriggeredByRMB = /*#__PURE__*/new WeakMap();
|
74809
|
+
var _dblclick = /*#__PURE__*/new WeakMap();
|
74810
|
+
var _autoresizeTimeout = /*#__PURE__*/new WeakMap();
|
74811
|
+
var _columnWidthsMap = /*#__PURE__*/new WeakMap();
|
74793
74812
|
var _config = /*#__PURE__*/new WeakMap();
|
74794
74813
|
var _onMapInit = /*#__PURE__*/new WeakSet();
|
74795
74814
|
var _onMouseOver = /*#__PURE__*/new WeakSet();
|
@@ -74869,66 +74888,110 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
74869
74888
|
* @private
|
74870
74889
|
*/
|
74871
74890
|
_classPrivateMethodInitSpec(this, _onMapInit);
|
74872
|
-
(
|
74891
|
+
_classPrivateFieldInitSpec(this, _currentTH, {
|
74892
|
+
writable: true,
|
74893
|
+
value: null
|
74894
|
+
});
|
74873
74895
|
/**
|
74874
74896
|
* @type {number}
|
74875
74897
|
*/
|
74876
|
-
(
|
74898
|
+
_classPrivateFieldInitSpec(this, _currentCol, {
|
74899
|
+
writable: true,
|
74900
|
+
value: null
|
74901
|
+
});
|
74877
74902
|
/**
|
74878
74903
|
* @type {number[]}
|
74879
74904
|
*/
|
74880
|
-
(
|
74905
|
+
_classPrivateFieldInitSpec(this, _selectedCols, {
|
74906
|
+
writable: true,
|
74907
|
+
value: []
|
74908
|
+
});
|
74881
74909
|
/**
|
74882
74910
|
* @type {number}
|
74883
74911
|
*/
|
74884
|
-
(
|
74912
|
+
_classPrivateFieldInitSpec(this, _currentWidth, {
|
74913
|
+
writable: true,
|
74914
|
+
value: null
|
74915
|
+
});
|
74885
74916
|
/**
|
74886
74917
|
* @type {number}
|
74887
74918
|
*/
|
74888
|
-
(
|
74919
|
+
_classPrivateFieldInitSpec(this, _newSize, {
|
74920
|
+
writable: true,
|
74921
|
+
value: null
|
74922
|
+
});
|
74889
74923
|
/**
|
74890
74924
|
* @type {number}
|
74891
74925
|
*/
|
74892
|
-
(
|
74926
|
+
_classPrivateFieldInitSpec(this, _startY, {
|
74927
|
+
writable: true,
|
74928
|
+
value: null
|
74929
|
+
});
|
74893
74930
|
/**
|
74894
74931
|
* @type {number}
|
74895
74932
|
*/
|
74896
|
-
(
|
74933
|
+
_classPrivateFieldInitSpec(this, _startWidth, {
|
74934
|
+
writable: true,
|
74935
|
+
value: null
|
74936
|
+
});
|
74897
74937
|
/**
|
74898
74938
|
* @type {number}
|
74899
74939
|
*/
|
74900
|
-
(
|
74940
|
+
_classPrivateFieldInitSpec(this, _startOffset, {
|
74941
|
+
writable: true,
|
74942
|
+
value: null
|
74943
|
+
});
|
74901
74944
|
/**
|
74902
74945
|
* @type {HTMLElement}
|
74903
74946
|
*/
|
74904
|
-
(
|
74947
|
+
_classPrivateFieldInitSpec(this, _handle, {
|
74948
|
+
writable: true,
|
74949
|
+
value: this.hot.rootDocument.createElement('DIV')
|
74950
|
+
});
|
74905
74951
|
/**
|
74906
74952
|
* @type {HTMLElement}
|
74907
74953
|
*/
|
74908
|
-
(
|
74954
|
+
_classPrivateFieldInitSpec(this, _guide, {
|
74955
|
+
writable: true,
|
74956
|
+
value: this.hot.rootDocument.createElement('DIV')
|
74957
|
+
});
|
74909
74958
|
/**
|
74910
74959
|
* @type {boolean}
|
74911
74960
|
*/
|
74912
|
-
(
|
74961
|
+
_classPrivateFieldInitSpec(this, _pressed, {
|
74962
|
+
writable: true,
|
74963
|
+
value: null
|
74964
|
+
});
|
74913
74965
|
/**
|
74914
74966
|
* @type {boolean}
|
74915
74967
|
*/
|
74916
|
-
(
|
74968
|
+
_classPrivateFieldInitSpec(this, _isTriggeredByRMB, {
|
74969
|
+
writable: true,
|
74970
|
+
value: false
|
74971
|
+
});
|
74917
74972
|
/**
|
74918
74973
|
* @type {number}
|
74919
74974
|
*/
|
74920
|
-
(
|
74975
|
+
_classPrivateFieldInitSpec(this, _dblclick, {
|
74976
|
+
writable: true,
|
74977
|
+
value: 0
|
74978
|
+
});
|
74921
74979
|
/**
|
74922
74980
|
* @type {number}
|
74923
74981
|
*/
|
74924
|
-
(
|
74982
|
+
_classPrivateFieldInitSpec(this, _autoresizeTimeout, {
|
74983
|
+
writable: true,
|
74984
|
+
value: null
|
74985
|
+
});
|
74925
74986
|
/**
|
74926
74987
|
* PhysicalIndexToValueMap to keep and track widths for physical column indexes.
|
74927
74988
|
*
|
74928
|
-
* @private
|
74929
74989
|
* @type {PhysicalIndexToValueMap}
|
74930
74990
|
*/
|
74931
|
-
(
|
74991
|
+
_classPrivateFieldInitSpec(this, _columnWidthsMap, {
|
74992
|
+
writable: true,
|
74993
|
+
value: void 0
|
74994
|
+
});
|
74932
74995
|
/**
|
74933
74996
|
* Private pool to save configuration from updateSettings.
|
74934
74997
|
*
|
@@ -74938,8 +75001,8 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
74938
75001
|
writable: true,
|
74939
75002
|
value: void 0
|
74940
75003
|
});
|
74941
|
-
(0, _element.addClass)(this
|
74942
|
-
(0, _element.addClass)(this
|
75004
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'manualColumnResizer');
|
75005
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'manualColumnResizerGuide');
|
74943
75006
|
}
|
74944
75007
|
|
74945
75008
|
/**
|
@@ -74967,9 +75030,9 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
74967
75030
|
if (this.enabled) {
|
74968
75031
|
return;
|
74969
75032
|
}
|
74970
|
-
this
|
74971
|
-
this.
|
74972
|
-
this.hot.columnIndexMapper.registerMap(this.pluginName,
|
75033
|
+
(0, _classPrivateFieldSet2.default)(this, _columnWidthsMap, new _translations.PhysicalIndexToValueMap());
|
75034
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).addLocalHook('init', () => _classPrivateMethodGet(this, _onMapInit, _onMapInit2).call(this));
|
75035
|
+
this.hot.columnIndexMapper.registerMap(this.pluginName, (0, _classPrivateFieldGet2.default)(this, _columnWidthsMap));
|
74973
75036
|
this.addHook('modifyColWidth', (width, col) => _classPrivateMethodGet(this, _onModifyColWidth, _onModifyColWidth2).call(this, width, col));
|
74974
75037
|
this.addHook('beforeStretchingColumnWidth', (stretchedWidth, column) => _classPrivateMethodGet(this, _onBeforeStretchingColumnWidth, _onBeforeStretchingColumnWidth2).call(this, stretchedWidth, column));
|
74975
75038
|
this.addHook('beforeColumnResize', (newSize, column, isDoubleClick) => _classPrivateMethodGet(this, _onBeforeColumnResize, _onBeforeColumnResize2).call(this, newSize, column, isDoubleClick));
|
@@ -74993,7 +75056,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
74993
75056
|
* Disables the plugin functionality for this Handsontable instance.
|
74994
75057
|
*/
|
74995
75058
|
disablePlugin() {
|
74996
|
-
(0, _classPrivateFieldSet2.default)(this, _config, this.
|
75059
|
+
(0, _classPrivateFieldSet2.default)(this, _config, (0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).getValues());
|
74997
75060
|
this.hot.columnIndexMapper.unregisterMap(this.pluginName);
|
74998
75061
|
super.disablePlugin();
|
74999
75062
|
}
|
@@ -75004,7 +75067,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75004
75067
|
* @fires Hooks#persistentStateSave
|
75005
75068
|
*/
|
75006
75069
|
saveManualColumnWidths() {
|
75007
|
-
this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, this.
|
75070
|
+
this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, (0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).getValues());
|
75008
75071
|
}
|
75009
75072
|
|
75010
75073
|
/**
|
@@ -75029,7 +75092,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75029
75092
|
setManualSize(column, width) {
|
75030
75093
|
const newWidth = Math.max(width, 20);
|
75031
75094
|
const physicalColumn = this.hot.toPhysicalColumn(column);
|
75032
|
-
this.
|
75095
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).setValueAtIndex(physicalColumn, newWidth);
|
75033
75096
|
return newWidth;
|
75034
75097
|
}
|
75035
75098
|
|
@@ -75040,7 +75103,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75040
75103
|
*/
|
75041
75104
|
clearManualSize(column) {
|
75042
75105
|
const physicalColumn = this.hot.toPhysicalColumn(column);
|
75043
|
-
this.
|
75106
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).setValueAtIndex(physicalColumn, null);
|
75044
75107
|
}
|
75045
75108
|
/**
|
75046
75109
|
* Set the resize handle position.
|
@@ -75052,34 +75115,34 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75052
75115
|
if (!TH.parentNode) {
|
75053
75116
|
return;
|
75054
75117
|
}
|
75055
|
-
this
|
75118
|
+
(0, _classPrivateFieldSet2.default)(this, _currentTH, TH);
|
75056
75119
|
const {
|
75057
75120
|
_wt: wt
|
75058
75121
|
} = this.hot.view;
|
75059
|
-
const cellCoords = wt.wtTable.getCoords(
|
75122
|
+
const cellCoords = wt.wtTable.getCoords((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
75060
75123
|
const col = cellCoords.col;
|
75061
75124
|
|
75062
75125
|
// Ignore column headers.
|
75063
75126
|
if (col < 0) {
|
75064
75127
|
return;
|
75065
75128
|
}
|
75066
|
-
const headerHeight = (0, _element.outerHeight)(
|
75067
|
-
const box = this.
|
75129
|
+
const headerHeight = (0, _element.outerHeight)((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
75130
|
+
const box = (0, _classPrivateFieldGet2.default)(this, _currentTH).getBoundingClientRect();
|
75068
75131
|
// Read "fixedColumnsStart" through the Walkontable as in that context, the fixed columns
|
75069
75132
|
// are modified (reduced by the number of hidden columns) by TableView module.
|
75070
75133
|
const fixedColumn = col < wt.getSetting('fixedColumnsStart');
|
75071
75134
|
let relativeHeaderPosition;
|
75072
75135
|
if (fixedColumn) {
|
75073
|
-
relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this
|
75136
|
+
relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition((0, _classPrivateFieldGet2.default)(this, _currentTH), cellCoords.row, cellCoords.col);
|
75074
75137
|
}
|
75075
75138
|
|
75076
75139
|
// If the TH is not a child of the top-left overlay, recalculate using
|
75077
75140
|
// the top overlay - as this overlay contains the rest of the headers.
|
75078
75141
|
if (!relativeHeaderPosition) {
|
75079
|
-
relativeHeaderPosition = wt.wtOverlays.topOverlay.getRelativeCellPosition(this
|
75142
|
+
relativeHeaderPosition = wt.wtOverlays.topOverlay.getRelativeCellPosition((0, _classPrivateFieldGet2.default)(this, _currentTH), cellCoords.row, cellCoords.col);
|
75080
75143
|
}
|
75081
|
-
this
|
75082
|
-
this
|
75144
|
+
(0, _classPrivateFieldSet2.default)(this, _currentCol, this.hot.columnIndexMapper.getVisualFromRenderableIndex(col));
|
75145
|
+
(0, _classPrivateFieldSet2.default)(this, _selectedCols, []);
|
75083
75146
|
const isFullColumnSelected = this.hot.selection.isSelectedByCorner() || this.hot.selection.isSelectedByColumnHeader();
|
75084
75147
|
if (this.hot.selection.isSelected() && isFullColumnSelected) {
|
75085
75148
|
const selectionRanges = this.hot.getSelectedRange();
|
@@ -75089,23 +75152,23 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75089
75152
|
|
75090
75153
|
// Add every selected column for resize action.
|
75091
75154
|
(0, _number.rangeEach)(fromColumn, toColumn, columnIndex => {
|
75092
|
-
if (!this.
|
75093
|
-
this.
|
75155
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _selectedCols).includes(columnIndex)) {
|
75156
|
+
(0, _classPrivateFieldGet2.default)(this, _selectedCols).push(columnIndex);
|
75094
75157
|
}
|
75095
75158
|
});
|
75096
75159
|
});
|
75097
75160
|
}
|
75098
75161
|
|
75099
75162
|
// Resizing element beyond the current selection (also when there is no selection).
|
75100
|
-
if (!this.
|
75101
|
-
this
|
75163
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _selectedCols).includes((0, _classPrivateFieldGet2.default)(this, _currentCol))) {
|
75164
|
+
(0, _classPrivateFieldSet2.default)(this, _selectedCols, [(0, _classPrivateFieldGet2.default)(this, _currentCol)]);
|
75102
75165
|
}
|
75103
|
-
this
|
75104
|
-
this
|
75105
|
-
this.
|
75106
|
-
this.
|
75107
|
-
this.
|
75108
|
-
this.hot.rootElement.appendChild(
|
75166
|
+
(0, _classPrivateFieldSet2.default)(this, _startOffset, relativeHeaderPosition.start - 6);
|
75167
|
+
(0, _classPrivateFieldSet2.default)(this, _startWidth, parseInt(box.width, 10));
|
75168
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style.top = `${relativeHeaderPosition.top}px`;
|
75169
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style[this.inlineDir] = `${(0, _classPrivateFieldGet2.default)(this, _startOffset) + (0, _classPrivateFieldGet2.default)(this, _startWidth)}px`;
|
75170
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style.height = `${headerHeight}px`;
|
75171
|
+
this.hot.rootElement.appendChild((0, _classPrivateFieldGet2.default)(this, _handle));
|
75109
75172
|
}
|
75110
75173
|
|
75111
75174
|
/**
|
@@ -75114,7 +75177,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75114
75177
|
* @private
|
75115
75178
|
*/
|
75116
75179
|
refreshHandlePosition() {
|
75117
|
-
this.
|
75180
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style[this.inlineDir] = `${(0, _classPrivateFieldGet2.default)(this, _startOffset) + (0, _classPrivateFieldGet2.default)(this, _currentWidth)}px`;
|
75118
75181
|
}
|
75119
75182
|
|
75120
75183
|
/**
|
@@ -75123,15 +75186,15 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75123
75186
|
* @private
|
75124
75187
|
*/
|
75125
75188
|
setupGuidePosition() {
|
75126
|
-
const handleHeight = parseInt((0, _element.outerHeight)(
|
75127
|
-
const handleBottomPosition = parseInt(this.
|
75189
|
+
const handleHeight = parseInt((0, _element.outerHeight)((0, _classPrivateFieldGet2.default)(this, _handle)), 10);
|
75190
|
+
const handleBottomPosition = parseInt((0, _classPrivateFieldGet2.default)(this, _handle).style.top, 10) + handleHeight;
|
75128
75191
|
const maximumVisibleElementHeight = parseInt(this.hot.view.maximumVisibleElementHeight(0), 10);
|
75129
|
-
(0, _element.addClass)(this
|
75130
|
-
(0, _element.addClass)(this
|
75131
|
-
this.
|
75192
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'active');
|
75193
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'active');
|
75194
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style.top = `${handleBottomPosition}px`;
|
75132
75195
|
this.refreshGuidePosition();
|
75133
|
-
this.
|
75134
|
-
this.hot.rootElement.appendChild(
|
75196
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style.height = `${maximumVisibleElementHeight - handleHeight}px`;
|
75197
|
+
this.hot.rootElement.appendChild((0, _classPrivateFieldGet2.default)(this, _guide));
|
75135
75198
|
}
|
75136
75199
|
|
75137
75200
|
/**
|
@@ -75140,7 +75203,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75140
75203
|
* @private
|
75141
75204
|
*/
|
75142
75205
|
refreshGuidePosition() {
|
75143
|
-
this.
|
75206
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style[this.inlineDir] = (0, _classPrivateFieldGet2.default)(this, _handle).style[this.inlineDir];
|
75144
75207
|
}
|
75145
75208
|
|
75146
75209
|
/**
|
@@ -75149,8 +75212,8 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75149
75212
|
* @private
|
75150
75213
|
*/
|
75151
75214
|
hideHandleAndGuide() {
|
75152
|
-
(0, _element.removeClass)(this
|
75153
|
-
(0, _element.removeClass)(this
|
75215
|
+
(0, _element.removeClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'active');
|
75216
|
+
(0, _element.removeClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'active');
|
75154
75217
|
}
|
75155
75218
|
|
75156
75219
|
/**
|
@@ -75194,37 +75257,37 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75194
75257
|
this.hot.view.adjustElementsSize(true);
|
75195
75258
|
};
|
75196
75259
|
const resize = (column, forceRender) => {
|
75197
|
-
const hookNewSize = this.hot.runHooks('beforeColumnResize', this
|
75260
|
+
const hookNewSize = this.hot.runHooks('beforeColumnResize', (0, _classPrivateFieldGet2.default)(this, _newSize), column, true);
|
75198
75261
|
if (hookNewSize !== undefined) {
|
75199
|
-
this
|
75262
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, hookNewSize);
|
75200
75263
|
}
|
75201
75264
|
if (this.hot.getSettings().stretchH === 'all') {
|
75202
75265
|
this.clearManualSize(column);
|
75203
75266
|
} else {
|
75204
|
-
this.setManualSize(column,
|
75267
|
+
this.setManualSize(column, (0, _classPrivateFieldGet2.default)(this, _newSize)); // double click sets by auto row size plugin
|
75205
75268
|
}
|
75206
75269
|
|
75207
75270
|
this.saveManualColumnWidths();
|
75208
|
-
this.hot.runHooks('afterColumnResize', this
|
75271
|
+
this.hot.runHooks('afterColumnResize', (0, _classPrivateFieldGet2.default)(this, _newSize), column, true);
|
75209
75272
|
if (forceRender) {
|
75210
75273
|
render();
|
75211
75274
|
}
|
75212
75275
|
};
|
75213
|
-
if (this
|
75214
|
-
const selectedColsLength = this.
|
75276
|
+
if ((0, _classPrivateFieldGet2.default)(this, _dblclick) >= 2) {
|
75277
|
+
const selectedColsLength = (0, _classPrivateFieldGet2.default)(this, _selectedCols).length;
|
75215
75278
|
if (selectedColsLength > 1) {
|
75216
|
-
(0, _array.arrayEach)(this
|
75279
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedCols), selectedCol => {
|
75217
75280
|
resize(selectedCol);
|
75218
75281
|
});
|
75219
75282
|
render();
|
75220
75283
|
} else {
|
75221
|
-
(0, _array.arrayEach)(this
|
75284
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedCols), selectedCol => {
|
75222
75285
|
resize(selectedCol, true);
|
75223
75286
|
});
|
75224
75287
|
}
|
75225
75288
|
}
|
75226
|
-
this
|
75227
|
-
this
|
75289
|
+
(0, _classPrivateFieldSet2.default)(this, _dblclick, 0);
|
75290
|
+
(0, _classPrivateFieldSet2.default)(this, _autoresizeTimeout, null);
|
75228
75291
|
}
|
75229
75292
|
/**
|
75230
75293
|
* Binds the mouse events.
|
@@ -75240,7 +75303,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
75240
75303
|
this.eventManager.addEventListener(rootElement, 'mousedown', e => _classPrivateMethodGet(this, _onMouseDown, _onMouseDown2).call(this, e));
|
75241
75304
|
this.eventManager.addEventListener(rootWindow, 'mousemove', e => _classPrivateMethodGet(this, _onMouseMove, _onMouseMove2).call(this, e));
|
75242
75305
|
this.eventManager.addEventListener(rootWindow, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
|
75243
|
-
this.eventManager.addEventListener(this
|
75306
|
+
this.eventManager.addEventListener((0, _classPrivateFieldGet2.default)(this, _handle), 'contextmenu', () => _classPrivateMethodGet(this, _onContextMenu, _onContextMenu2).call(this));
|
75244
75307
|
}
|
75245
75308
|
/**
|
75246
75309
|
* Destroys the plugin instance.
|
@@ -75256,20 +75319,20 @@ function _onMapInit2() {
|
|
75256
75319
|
if (typeof loadedManualColumnWidths !== 'undefined') {
|
75257
75320
|
this.hot.batchExecution(() => {
|
75258
75321
|
loadedManualColumnWidths.forEach((width, physicalIndex) => {
|
75259
|
-
this.
|
75322
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).setValueAtIndex(physicalIndex, width);
|
75260
75323
|
});
|
75261
75324
|
}, true);
|
75262
75325
|
} else if (Array.isArray(initialSetting)) {
|
75263
75326
|
this.hot.batchExecution(() => {
|
75264
75327
|
initialSetting.forEach((width, physicalIndex) => {
|
75265
|
-
this.
|
75328
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).setValueAtIndex(physicalIndex, width);
|
75266
75329
|
});
|
75267
75330
|
}, true);
|
75268
75331
|
(0, _classPrivateFieldSet2.default)(this, _config, initialSetting);
|
75269
75332
|
} else if (initialSetting === true && Array.isArray((0, _classPrivateFieldGet2.default)(this, _config))) {
|
75270
75333
|
this.hot.batchExecution(() => {
|
75271
75334
|
(0, _classPrivateFieldGet2.default)(this, _config).forEach((width, physicalIndex) => {
|
75272
|
-
this.
|
75335
|
+
(0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).setValueAtIndex(physicalIndex, width);
|
75273
75336
|
});
|
75274
75337
|
}, true);
|
75275
75338
|
}
|
@@ -75282,7 +75345,7 @@ function _onMouseOver2(event) {
|
|
75282
75345
|
}
|
75283
75346
|
|
75284
75347
|
// A "mouseover" action is triggered right after executing "contextmenu" event. It should be ignored.
|
75285
|
-
if (this
|
75348
|
+
if ((0, _classPrivateFieldGet2.default)(this, _isTriggeredByRMB) === true) {
|
75286
75349
|
return;
|
75287
75350
|
}
|
75288
75351
|
if (this.checkIfColumnHeader(event.target)) {
|
@@ -75292,7 +75355,7 @@ function _onMouseOver2(event) {
|
|
75292
75355
|
}
|
75293
75356
|
const colspan = th.getAttribute('colspan');
|
75294
75357
|
if (th && (colspan === null || colspan === '1')) {
|
75295
|
-
if (!
|
75358
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
75296
75359
|
this.setupHandlePosition(th);
|
75297
75360
|
}
|
75298
75361
|
}
|
@@ -75300,24 +75363,24 @@ function _onMouseOver2(event) {
|
|
75300
75363
|
}
|
75301
75364
|
function _onMouseDown2(event) {
|
75302
75365
|
if ((0, _element.hasClass)(event.target, 'manualColumnResizer')) {
|
75303
|
-
this.setupHandlePosition(
|
75366
|
+
this.setupHandlePosition((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
75304
75367
|
this.setupGuidePosition();
|
75305
|
-
this
|
75306
|
-
if (this
|
75307
|
-
this
|
75308
|
-
this.hot._registerTimeout(
|
75368
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, true);
|
75369
|
+
if ((0, _classPrivateFieldGet2.default)(this, _autoresizeTimeout) === null) {
|
75370
|
+
(0, _classPrivateFieldSet2.default)(this, _autoresizeTimeout, setTimeout(() => this.afterMouseDownTimeout(), 500));
|
75371
|
+
this.hot._registerTimeout((0, _classPrivateFieldGet2.default)(this, _autoresizeTimeout));
|
75309
75372
|
}
|
75310
|
-
this.
|
75373
|
+
(0, _classPrivateFieldSet2.default)(this, _dblclick, (0, _classPrivateFieldGet2.default)(this, _dblclick) + 1);
|
75311
75374
|
this.startX = event.pageX;
|
75312
|
-
this
|
75375
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, (0, _classPrivateFieldGet2.default)(this, _startWidth));
|
75313
75376
|
}
|
75314
75377
|
}
|
75315
75378
|
function _onMouseMove2(event) {
|
75316
|
-
if (
|
75379
|
+
if ((0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
75317
75380
|
const change = (event.pageX - this.startX) * this.hot.getDirectionFactor();
|
75318
|
-
this
|
75319
|
-
(0, _array.arrayEach)(this
|
75320
|
-
this
|
75381
|
+
(0, _classPrivateFieldSet2.default)(this, _currentWidth, (0, _classPrivateFieldGet2.default)(this, _startWidth) + change);
|
75382
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedCols), selectedCol => {
|
75383
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, this.setManualSize(selectedCol, (0, _classPrivateFieldGet2.default)(this, _currentWidth)));
|
75321
75384
|
});
|
75322
75385
|
this.refreshHandlePosition();
|
75323
75386
|
this.refreshGuidePosition();
|
@@ -75330,50 +75393,50 @@ function _onMouseUp2() {
|
|
75330
75393
|
this.hot.view.adjustElementsSize(true);
|
75331
75394
|
};
|
75332
75395
|
const resize = (column, forceRender) => {
|
75333
|
-
this.hot.runHooks('beforeColumnResize', this
|
75396
|
+
this.hot.runHooks('beforeColumnResize', (0, _classPrivateFieldGet2.default)(this, _newSize), column, false);
|
75334
75397
|
if (forceRender) {
|
75335
75398
|
render();
|
75336
75399
|
}
|
75337
75400
|
this.saveManualColumnWidths();
|
75338
|
-
this.hot.runHooks('afterColumnResize', this
|
75401
|
+
this.hot.runHooks('afterColumnResize', (0, _classPrivateFieldGet2.default)(this, _newSize), column, false);
|
75339
75402
|
};
|
75340
|
-
if (
|
75403
|
+
if ((0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
75341
75404
|
this.hideHandleAndGuide();
|
75342
|
-
this
|
75343
|
-
if (this
|
75344
|
-
const selectedColsLength = this.
|
75405
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, false);
|
75406
|
+
if ((0, _classPrivateFieldGet2.default)(this, _newSize) !== (0, _classPrivateFieldGet2.default)(this, _startWidth)) {
|
75407
|
+
const selectedColsLength = (0, _classPrivateFieldGet2.default)(this, _selectedCols).length;
|
75345
75408
|
if (selectedColsLength > 1) {
|
75346
|
-
(0, _array.arrayEach)(this
|
75409
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedCols), selectedCol => {
|
75347
75410
|
resize(selectedCol);
|
75348
75411
|
});
|
75349
75412
|
render();
|
75350
75413
|
} else {
|
75351
|
-
(0, _array.arrayEach)(this
|
75414
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedCols), selectedCol => {
|
75352
75415
|
resize(selectedCol, true);
|
75353
75416
|
});
|
75354
75417
|
}
|
75355
75418
|
}
|
75356
|
-
this.setupHandlePosition(
|
75419
|
+
this.setupHandlePosition((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
75357
75420
|
}
|
75358
75421
|
}
|
75359
75422
|
function _onContextMenu2() {
|
75360
75423
|
this.hideHandleAndGuide();
|
75361
|
-
this.hot.rootElement.removeChild(
|
75362
|
-
this.hot.rootElement.removeChild(
|
75363
|
-
this
|
75364
|
-
this
|
75424
|
+
this.hot.rootElement.removeChild((0, _classPrivateFieldGet2.default)(this, _handle));
|
75425
|
+
this.hot.rootElement.removeChild((0, _classPrivateFieldGet2.default)(this, _guide));
|
75426
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, false);
|
75427
|
+
(0, _classPrivateFieldSet2.default)(this, _isTriggeredByRMB, true);
|
75365
75428
|
|
75366
75429
|
// There is thrown "mouseover" event right after opening a context menu. This flag inform that handle
|
75367
75430
|
// shouldn't be drawn just after removing it.
|
75368
75431
|
this.hot._registerImmediate(() => {
|
75369
|
-
this
|
75432
|
+
(0, _classPrivateFieldSet2.default)(this, _isTriggeredByRMB, false);
|
75370
75433
|
});
|
75371
75434
|
}
|
75372
75435
|
function _onModifyColWidth2(width, column) {
|
75373
75436
|
let newWidth = width;
|
75374
75437
|
if (this.enabled) {
|
75375
75438
|
const physicalColumn = this.hot.toPhysicalColumn(column);
|
75376
|
-
const columnWidth = this.
|
75439
|
+
const columnWidth = (0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).getValueAtIndex(physicalColumn);
|
75377
75440
|
if (this.hot.getSettings()[PLUGIN_KEY] && columnWidth) {
|
75378
75441
|
newWidth = columnWidth;
|
75379
75442
|
}
|
@@ -75381,7 +75444,7 @@ function _onModifyColWidth2(width, column) {
|
|
75381
75444
|
return newWidth;
|
75382
75445
|
}
|
75383
75446
|
function _onBeforeStretchingColumnWidth2(stretchedWidth, column) {
|
75384
|
-
let width = this.
|
75447
|
+
let width = (0, _classPrivateFieldGet2.default)(this, _columnWidthsMap).getValueAtIndex(column);
|
75385
75448
|
if (width === null) {
|
75386
75449
|
width = stretchedWidth;
|
75387
75450
|
}
|
@@ -75416,7 +75479,6 @@ var _interopRequireDefault = __webpack_require__(1);
|
|
75416
75479
|
exports.__esModule = true;
|
75417
75480
|
__webpack_require__(8);
|
75418
75481
|
__webpack_require__(78);
|
75419
|
-
var _defineProperty2 = _interopRequireDefault(__webpack_require__(121));
|
75420
75482
|
var _classPrivateFieldSet2 = _interopRequireDefault(__webpack_require__(136));
|
75421
75483
|
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(133));
|
75422
75484
|
var _base = __webpack_require__(423);
|
@@ -75424,8 +75486,8 @@ var _pluginHooks = _interopRequireDefault(__webpack_require__(128));
|
|
75424
75486
|
var _array = __webpack_require__(113);
|
75425
75487
|
var _element = __webpack_require__(107);
|
75426
75488
|
var _number = __webpack_require__(141);
|
75427
|
-
var
|
75428
|
-
var
|
75489
|
+
var _backlight2 = _interopRequireDefault(__webpack_require__(607));
|
75490
|
+
var _guideline2 = _interopRequireDefault(__webpack_require__(609));
|
75429
75491
|
__webpack_require__(610);
|
75430
75492
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
75431
75493
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
@@ -75466,6 +75528,8 @@ const CSS_AFTER_SELECTION = 'after-selection--rows';
|
|
75466
75528
|
* @class ManualRowMove
|
75467
75529
|
* @plugin ManualRowMove
|
75468
75530
|
*/
|
75531
|
+
var _backlight = /*#__PURE__*/new WeakMap();
|
75532
|
+
var _guideline = /*#__PURE__*/new WeakMap();
|
75469
75533
|
var _rowsToMove = /*#__PURE__*/new WeakMap();
|
75470
75534
|
var _pressed = /*#__PURE__*/new WeakMap();
|
75471
75535
|
var _target = /*#__PURE__*/new WeakMap();
|
@@ -75520,17 +75584,21 @@ class ManualRowMove extends _base.BasePlugin {
|
|
75520
75584
|
/**
|
75521
75585
|
* Backlight UI object.
|
75522
75586
|
*
|
75523
|
-
* @private
|
75524
75587
|
* @type {object}
|
75525
75588
|
*/
|
75526
|
-
(
|
75589
|
+
_classPrivateFieldInitSpec(this, _backlight, {
|
75590
|
+
writable: true,
|
75591
|
+
value: new _backlight2.default(this.hot)
|
75592
|
+
});
|
75527
75593
|
/**
|
75528
75594
|
* Guideline UI object.
|
75529
75595
|
*
|
75530
|
-
* @private
|
75531
75596
|
* @type {object}
|
75532
75597
|
*/
|
75533
|
-
(
|
75598
|
+
_classPrivateFieldInitSpec(this, _guideline, {
|
75599
|
+
writable: true,
|
75600
|
+
value: new _guideline2.default(this.hot)
|
75601
|
+
});
|
75534
75602
|
/**
|
75535
75603
|
* @type {number[]}
|
75536
75604
|
*/
|
@@ -75630,8 +75698,8 @@ class ManualRowMove extends _base.BasePlugin {
|
|
75630
75698
|
disablePlugin() {
|
75631
75699
|
(0, _element.removeClass)(this.hot.rootElement, CSS_PLUGIN);
|
75632
75700
|
this.unregisterEvents();
|
75633
|
-
this.
|
75634
|
-
this.
|
75701
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).destroy();
|
75702
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).destroy();
|
75635
75703
|
super.disablePlugin();
|
75636
75704
|
}
|
75637
75705
|
|
@@ -75896,8 +75964,8 @@ class ManualRowMove extends _base.BasePlugin {
|
|
75896
75964
|
const pixelsRelToTableStart = (0, _classPrivateFieldGet2.default)(this, _target).eventPageY - pixelsAbove + tableScroll;
|
75897
75965
|
const hiderHeight = wtTable.hider.offsetHeight;
|
75898
75966
|
const tbodyOffsetTop = wtTable.TBODY.offsetTop;
|
75899
|
-
const backlightElemMarginTop = this.
|
75900
|
-
const backlightElemHeight = this.
|
75967
|
+
const backlightElemMarginTop = (0, _classPrivateFieldGet2.default)(this, _backlight).getOffset().top;
|
75968
|
+
const backlightElemHeight = (0, _classPrivateFieldGet2.default)(this, _backlight).getSize().height;
|
75901
75969
|
const tdMiddle = TD.offsetHeight / 2;
|
75902
75970
|
const tdHeight = TD.offsetHeight;
|
75903
75971
|
let tdStartPixel = this.hot.view.THEAD.offsetHeight + this.getRowsHeight(0, coords.row - 1);
|
@@ -75930,8 +75998,8 @@ class ManualRowMove extends _base.BasePlugin {
|
|
75930
75998
|
// prevent display guideline below table
|
75931
75999
|
guidelineTop = hiderHeight - 1;
|
75932
76000
|
}
|
75933
|
-
this.
|
75934
|
-
this.
|
76001
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(backlightTop);
|
76002
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).setPosition(guidelineTop);
|
75935
76003
|
}
|
75936
76004
|
|
75937
76005
|
/**
|
@@ -75961,15 +76029,15 @@ class ManualRowMove extends _base.BasePlugin {
|
|
75961
76029
|
* @private
|
75962
76030
|
*/
|
75963
76031
|
buildPluginUI() {
|
75964
|
-
this.
|
75965
|
-
this.
|
76032
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).build();
|
76033
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).build();
|
75966
76034
|
}
|
75967
76035
|
/**
|
75968
76036
|
* Destroys the plugin instance.
|
75969
76037
|
*/
|
75970
76038
|
destroy() {
|
75971
|
-
this.
|
75972
|
-
this.
|
76039
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).destroy();
|
76040
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).destroy();
|
75973
76041
|
super.destroy();
|
75974
76042
|
}
|
75975
76043
|
}
|
@@ -75987,11 +76055,11 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
|
75987
76055
|
(0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);
|
75988
76056
|
return;
|
75989
76057
|
}
|
75990
|
-
const guidelineIsNotReady = this.
|
75991
|
-
const backlightIsNotReady = this.
|
76058
|
+
const guidelineIsNotReady = (0, _classPrivateFieldGet2.default)(this, _guideline).isBuilt() && !(0, _classPrivateFieldGet2.default)(this, _guideline).isAppended();
|
76059
|
+
const backlightIsNotReady = (0, _classPrivateFieldGet2.default)(this, _backlight).isBuilt() && !(0, _classPrivateFieldGet2.default)(this, _backlight).isAppended();
|
75992
76060
|
if (guidelineIsNotReady && backlightIsNotReady) {
|
75993
|
-
this.
|
75994
|
-
this.
|
76061
|
+
(0, _classPrivateFieldGet2.default)(this, _guideline).appendTo(wtTable.hider);
|
76062
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).appendTo(wtTable.hider);
|
75995
76063
|
}
|
75996
76064
|
const {
|
75997
76065
|
from,
|
@@ -76008,9 +76076,9 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
|
76008
76076
|
(0, _classPrivateFieldSet2.default)(this, _rowsToMove, this.prepareRowsToMoving());
|
76009
76077
|
const leftPos = wtTable.holder.scrollLeft + wtViewport.getRowHeaderWidth();
|
76010
76078
|
const topOffset = this.getRowsHeight(start, coords.row - 1) + event.offsetY;
|
76011
|
-
this.
|
76012
|
-
this.
|
76013
|
-
this.
|
76079
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(null, leftPos);
|
76080
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setSize(wtTable.hider.offsetWidth - leftPos, this.getRowsHeight(start, end));
|
76081
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setOffset(-topOffset, null);
|
76014
76082
|
(0, _element.addClass)(this.hot.rootElement, CSS_ON_MOVING);
|
76015
76083
|
this.refreshPositions();
|
76016
76084
|
} else {
|
@@ -76071,8 +76139,8 @@ function _onAfterScrollHorizontally2() {
|
|
76071
76139
|
const headerWidth = this.hot.view._wt.wtViewport.getRowHeaderWidth();
|
76072
76140
|
const scrollLeft = wtTable.holder.scrollLeft;
|
76073
76141
|
const posLeft = headerWidth + scrollLeft;
|
76074
|
-
this.
|
76075
|
-
this.
|
76142
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setPosition(null, posLeft);
|
76143
|
+
(0, _classPrivateFieldGet2.default)(this, _backlight).setSize(wtTable.hider.offsetWidth - posLeft);
|
76076
76144
|
}
|
76077
76145
|
function _onAfterLoadData2() {
|
76078
76146
|
this.moveBySettingsOrLoad();
|
@@ -76338,13 +76406,12 @@ exports.ManualRowResize = _manualRowResize.ManualRowResize;
|
|
76338
76406
|
"use strict";
|
76339
76407
|
|
76340
76408
|
|
76409
|
+
__webpack_require__(78);
|
76341
76410
|
var _interopRequireDefault = __webpack_require__(1);
|
76342
76411
|
exports.__esModule = true;
|
76343
76412
|
__webpack_require__(8);
|
76344
|
-
__webpack_require__(78);
|
76345
|
-
var _defineProperty2 = _interopRequireDefault(__webpack_require__(121));
|
76346
|
-
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(133));
|
76347
76413
|
var _classPrivateFieldSet2 = _interopRequireDefault(__webpack_require__(136));
|
76414
|
+
var _classPrivateFieldGet2 = _interopRequireDefault(__webpack_require__(133));
|
76348
76415
|
var _base = __webpack_require__(423);
|
76349
76416
|
var _element = __webpack_require__(107);
|
76350
76417
|
var _array = __webpack_require__(113);
|
@@ -76375,6 +76442,21 @@ const PERSISTENT_STATE_KEY = 'manualRowHeights';
|
|
76375
76442
|
* - handle - the draggable element that sets the desired height of the row.
|
76376
76443
|
* - guide - the helper guide that shows the desired height as a horizontal guide.
|
76377
76444
|
*/
|
76445
|
+
var _currentTH = /*#__PURE__*/new WeakMap();
|
76446
|
+
var _currentRow = /*#__PURE__*/new WeakMap();
|
76447
|
+
var _selectedRows = /*#__PURE__*/new WeakMap();
|
76448
|
+
var _currentHeight = /*#__PURE__*/new WeakMap();
|
76449
|
+
var _newSize = /*#__PURE__*/new WeakMap();
|
76450
|
+
var _startY = /*#__PURE__*/new WeakMap();
|
76451
|
+
var _startHeight = /*#__PURE__*/new WeakMap();
|
76452
|
+
var _startOffset = /*#__PURE__*/new WeakMap();
|
76453
|
+
var _handle = /*#__PURE__*/new WeakMap();
|
76454
|
+
var _guide = /*#__PURE__*/new WeakMap();
|
76455
|
+
var _pressed = /*#__PURE__*/new WeakMap();
|
76456
|
+
var _isTriggeredByRMB = /*#__PURE__*/new WeakMap();
|
76457
|
+
var _dblclick = /*#__PURE__*/new WeakMap();
|
76458
|
+
var _autoresizeTimeout = /*#__PURE__*/new WeakMap();
|
76459
|
+
var _rowHeightsMap = /*#__PURE__*/new WeakMap();
|
76378
76460
|
var _config = /*#__PURE__*/new WeakMap();
|
76379
76461
|
var _onMouseOver = /*#__PURE__*/new WeakSet();
|
76380
76462
|
var _onMouseDown = /*#__PURE__*/new WeakSet();
|
@@ -76438,66 +76520,110 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76438
76520
|
* @param {MouseEvent} event The mouse event.
|
76439
76521
|
*/
|
76440
76522
|
_classPrivateMethodInitSpec(this, _onMouseOver);
|
76441
|
-
(
|
76523
|
+
_classPrivateFieldInitSpec(this, _currentTH, {
|
76524
|
+
writable: true,
|
76525
|
+
value: null
|
76526
|
+
});
|
76442
76527
|
/**
|
76443
76528
|
* @type {number}
|
76444
76529
|
*/
|
76445
|
-
(
|
76530
|
+
_classPrivateFieldInitSpec(this, _currentRow, {
|
76531
|
+
writable: true,
|
76532
|
+
value: null
|
76533
|
+
});
|
76446
76534
|
/**
|
76447
76535
|
* @type {number[]}
|
76448
76536
|
*/
|
76449
|
-
(
|
76537
|
+
_classPrivateFieldInitSpec(this, _selectedRows, {
|
76538
|
+
writable: true,
|
76539
|
+
value: []
|
76540
|
+
});
|
76450
76541
|
/**
|
76451
76542
|
* @type {number}
|
76452
76543
|
*/
|
76453
|
-
(
|
76544
|
+
_classPrivateFieldInitSpec(this, _currentHeight, {
|
76545
|
+
writable: true,
|
76546
|
+
value: null
|
76547
|
+
});
|
76454
76548
|
/**
|
76455
76549
|
* @type {number}
|
76456
76550
|
*/
|
76457
|
-
(
|
76551
|
+
_classPrivateFieldInitSpec(this, _newSize, {
|
76552
|
+
writable: true,
|
76553
|
+
value: null
|
76554
|
+
});
|
76458
76555
|
/**
|
76459
76556
|
* @type {number}
|
76460
76557
|
*/
|
76461
|
-
(
|
76558
|
+
_classPrivateFieldInitSpec(this, _startY, {
|
76559
|
+
writable: true,
|
76560
|
+
value: null
|
76561
|
+
});
|
76462
76562
|
/**
|
76463
76563
|
* @type {number}
|
76464
76564
|
*/
|
76465
|
-
(
|
76565
|
+
_classPrivateFieldInitSpec(this, _startHeight, {
|
76566
|
+
writable: true,
|
76567
|
+
value: null
|
76568
|
+
});
|
76466
76569
|
/**
|
76467
76570
|
* @type {number}
|
76468
76571
|
*/
|
76469
|
-
(
|
76572
|
+
_classPrivateFieldInitSpec(this, _startOffset, {
|
76573
|
+
writable: true,
|
76574
|
+
value: null
|
76575
|
+
});
|
76470
76576
|
/**
|
76471
76577
|
* @type {HTMLElement}
|
76472
76578
|
*/
|
76473
|
-
(
|
76579
|
+
_classPrivateFieldInitSpec(this, _handle, {
|
76580
|
+
writable: true,
|
76581
|
+
value: this.hot.rootDocument.createElement('DIV')
|
76582
|
+
});
|
76474
76583
|
/**
|
76475
76584
|
* @type {HTMLElement}
|
76476
76585
|
*/
|
76477
|
-
(
|
76586
|
+
_classPrivateFieldInitSpec(this, _guide, {
|
76587
|
+
writable: true,
|
76588
|
+
value: this.hot.rootDocument.createElement('DIV')
|
76589
|
+
});
|
76478
76590
|
/**
|
76479
76591
|
* @type {boolean}
|
76480
76592
|
*/
|
76481
|
-
(
|
76593
|
+
_classPrivateFieldInitSpec(this, _pressed, {
|
76594
|
+
writable: true,
|
76595
|
+
value: false
|
76596
|
+
});
|
76482
76597
|
/**
|
76483
76598
|
* @type {boolean}
|
76484
76599
|
*/
|
76485
|
-
(
|
76600
|
+
_classPrivateFieldInitSpec(this, _isTriggeredByRMB, {
|
76601
|
+
writable: true,
|
76602
|
+
value: false
|
76603
|
+
});
|
76486
76604
|
/**
|
76487
76605
|
* @type {number}
|
76488
76606
|
*/
|
76489
|
-
(
|
76607
|
+
_classPrivateFieldInitSpec(this, _dblclick, {
|
76608
|
+
writable: true,
|
76609
|
+
value: 0
|
76610
|
+
});
|
76490
76611
|
/**
|
76491
76612
|
* @type {number}
|
76492
76613
|
*/
|
76493
|
-
(
|
76614
|
+
_classPrivateFieldInitSpec(this, _autoresizeTimeout, {
|
76615
|
+
writable: true,
|
76616
|
+
value: null
|
76617
|
+
});
|
76494
76618
|
/**
|
76495
76619
|
* PhysicalIndexToValueMap to keep and track widths for physical row indexes.
|
76496
76620
|
*
|
76497
|
-
* @private
|
76498
76621
|
* @type {PhysicalIndexToValueMap}
|
76499
76622
|
*/
|
76500
|
-
(
|
76623
|
+
_classPrivateFieldInitSpec(this, _rowHeightsMap, {
|
76624
|
+
writable: true,
|
76625
|
+
value: void 0
|
76626
|
+
});
|
76501
76627
|
/**
|
76502
76628
|
* Private pool to save configuration from updateSettings.
|
76503
76629
|
*
|
@@ -76507,8 +76633,8 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76507
76633
|
writable: true,
|
76508
76634
|
value: void 0
|
76509
76635
|
});
|
76510
|
-
(0, _element.addClass)(this
|
76511
|
-
(0, _element.addClass)(this
|
76636
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'manualRowResizer');
|
76637
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'manualRowResizerGuide');
|
76512
76638
|
}
|
76513
76639
|
|
76514
76640
|
/**
|
@@ -76536,9 +76662,9 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76536
76662
|
if (this.enabled) {
|
76537
76663
|
return;
|
76538
76664
|
}
|
76539
|
-
this
|
76540
|
-
this.
|
76541
|
-
this.hot.rowIndexMapper.registerMap(this.pluginName,
|
76665
|
+
(0, _classPrivateFieldSet2.default)(this, _rowHeightsMap, new _translations.PhysicalIndexToValueMap());
|
76666
|
+
(0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).addLocalHook('init', () => _classPrivateMethodGet(this, _onMapInit, _onMapInit2).call(this));
|
76667
|
+
this.hot.rowIndexMapper.registerMap(this.pluginName, (0, _classPrivateFieldGet2.default)(this, _rowHeightsMap));
|
76542
76668
|
this.addHook('modifyRowHeight', (height, row) => _classPrivateMethodGet(this, _onModifyRowHeight, _onModifyRowHeight2).call(this, height, row));
|
76543
76669
|
this.bindEvents();
|
76544
76670
|
super.enablePlugin();
|
@@ -76560,7 +76686,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76560
76686
|
* Disables the plugin functionality for this Handsontable instance.
|
76561
76687
|
*/
|
76562
76688
|
disablePlugin() {
|
76563
|
-
(0, _classPrivateFieldSet2.default)(this, _config, this.
|
76689
|
+
(0, _classPrivateFieldSet2.default)(this, _config, (0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).getValues());
|
76564
76690
|
this.hot.rowIndexMapper.unregisterMap(this.pluginName);
|
76565
76691
|
super.disablePlugin();
|
76566
76692
|
}
|
@@ -76572,7 +76698,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76572
76698
|
* @fires Hooks#persistentStateSave
|
76573
76699
|
*/
|
76574
76700
|
saveManualRowHeights() {
|
76575
|
-
this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, this.
|
76701
|
+
this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, (0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).getValues());
|
76576
76702
|
}
|
76577
76703
|
|
76578
76704
|
/**
|
@@ -76598,7 +76724,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76598
76724
|
setManualSize(row, height) {
|
76599
76725
|
const physicalRow = this.hot.toPhysicalRow(row);
|
76600
76726
|
const newHeight = Math.max(height, _src.ViewportRowsCalculator.DEFAULT_HEIGHT);
|
76601
|
-
this.
|
76727
|
+
(0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).setValueAtIndex(physicalRow, newHeight);
|
76602
76728
|
return newHeight;
|
76603
76729
|
}
|
76604
76730
|
|
@@ -76609,40 +76735,40 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76609
76735
|
* @param {HTMLCellElement} TH TH HTML element.
|
76610
76736
|
*/
|
76611
76737
|
setupHandlePosition(TH) {
|
76612
|
-
this
|
76738
|
+
(0, _classPrivateFieldSet2.default)(this, _currentTH, TH);
|
76613
76739
|
const {
|
76614
76740
|
view
|
76615
76741
|
} = this.hot;
|
76616
76742
|
const {
|
76617
76743
|
_wt: wt
|
76618
76744
|
} = view;
|
76619
|
-
const cellCoords = wt.wtTable.getCoords(
|
76745
|
+
const cellCoords = wt.wtTable.getCoords((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
76620
76746
|
const row = cellCoords.row;
|
76621
76747
|
|
76622
76748
|
// Ignore row headers.
|
76623
76749
|
if (row < 0) {
|
76624
76750
|
return;
|
76625
76751
|
}
|
76626
|
-
const headerWidth = (0, _element.outerWidth)(
|
76627
|
-
const box = this.
|
76752
|
+
const headerWidth = (0, _element.outerWidth)((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
76753
|
+
const box = (0, _classPrivateFieldGet2.default)(this, _currentTH).getBoundingClientRect();
|
76628
76754
|
// Read "fixedRowsTop" and "fixedRowsBottom" through the Walkontable as in that context, the fixed
|
76629
76755
|
// rows are modified (reduced by the number of hidden rows) by TableView module.
|
76630
76756
|
const fixedRowTop = row < wt.getSetting('fixedRowsTop');
|
76631
76757
|
const fixedRowBottom = row >= view.countNotHiddenRowIndexes(0, 1) - wt.getSetting('fixedRowsBottom');
|
76632
76758
|
let relativeHeaderPosition;
|
76633
76759
|
if (fixedRowTop) {
|
76634
|
-
relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this
|
76760
|
+
relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition((0, _classPrivateFieldGet2.default)(this, _currentTH), cellCoords.row, cellCoords.col);
|
76635
76761
|
} else if (fixedRowBottom) {
|
76636
|
-
relativeHeaderPosition = wt.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(this
|
76762
|
+
relativeHeaderPosition = wt.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition((0, _classPrivateFieldGet2.default)(this, _currentTH), cellCoords.row, cellCoords.col);
|
76637
76763
|
}
|
76638
76764
|
|
76639
76765
|
// If the TH is not a child of the top-left/bottom-left overlay, recalculate using
|
76640
76766
|
// the left overlay - as this overlay contains the rest of the headers.
|
76641
76767
|
if (!relativeHeaderPosition) {
|
76642
|
-
relativeHeaderPosition = wt.wtOverlays.inlineStartOverlay.getRelativeCellPosition(this
|
76768
|
+
relativeHeaderPosition = wt.wtOverlays.inlineStartOverlay.getRelativeCellPosition((0, _classPrivateFieldGet2.default)(this, _currentTH), cellCoords.row, cellCoords.col);
|
76643
76769
|
}
|
76644
|
-
this
|
76645
|
-
this
|
76770
|
+
(0, _classPrivateFieldSet2.default)(this, _currentRow, this.hot.rowIndexMapper.getVisualFromRenderableIndex(row));
|
76771
|
+
(0, _classPrivateFieldSet2.default)(this, _selectedRows, []);
|
76646
76772
|
const isFullRowSelected = this.hot.selection.isSelectedByCorner() || this.hot.selection.isSelectedByRowHeader();
|
76647
76773
|
if (this.hot.selection.isSelected() && isFullRowSelected) {
|
76648
76774
|
const selectionRanges = this.hot.getSelectedRange();
|
@@ -76652,23 +76778,23 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76652
76778
|
|
76653
76779
|
// Add every selected row for resize action.
|
76654
76780
|
(0, _number.rangeEach)(fromRow, toRow, rowIndex => {
|
76655
|
-
if (!this.
|
76656
|
-
this.
|
76781
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _selectedRows).includes(rowIndex)) {
|
76782
|
+
(0, _classPrivateFieldGet2.default)(this, _selectedRows).push(rowIndex);
|
76657
76783
|
}
|
76658
76784
|
});
|
76659
76785
|
});
|
76660
76786
|
}
|
76661
76787
|
|
76662
76788
|
// Resizing element beyond the current selection (also when there is no selection).
|
76663
|
-
if (!this.
|
76664
|
-
this
|
76789
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _selectedRows).includes((0, _classPrivateFieldGet2.default)(this, _currentRow))) {
|
76790
|
+
(0, _classPrivateFieldSet2.default)(this, _selectedRows, [(0, _classPrivateFieldGet2.default)(this, _currentRow)]);
|
76665
76791
|
}
|
76666
|
-
this
|
76667
|
-
this
|
76668
|
-
this.
|
76669
|
-
this.
|
76670
|
-
this.
|
76671
|
-
this.hot.rootElement.appendChild(
|
76792
|
+
(0, _classPrivateFieldSet2.default)(this, _startOffset, relativeHeaderPosition.top - 6);
|
76793
|
+
(0, _classPrivateFieldSet2.default)(this, _startHeight, parseInt(box.height, 10));
|
76794
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style.top = `${(0, _classPrivateFieldGet2.default)(this, _startOffset) + (0, _classPrivateFieldGet2.default)(this, _startHeight)}px`;
|
76795
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style[this.inlineDir] = `${relativeHeaderPosition.start}px`;
|
76796
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style.width = `${headerWidth}px`;
|
76797
|
+
this.hot.rootElement.appendChild((0, _classPrivateFieldGet2.default)(this, _handle));
|
76672
76798
|
}
|
76673
76799
|
|
76674
76800
|
/**
|
@@ -76677,7 +76803,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76677
76803
|
* @private
|
76678
76804
|
*/
|
76679
76805
|
refreshHandlePosition() {
|
76680
|
-
this.
|
76806
|
+
(0, _classPrivateFieldGet2.default)(this, _handle).style.top = `${(0, _classPrivateFieldGet2.default)(this, _startOffset) + (0, _classPrivateFieldGet2.default)(this, _currentHeight)}px`;
|
76681
76807
|
}
|
76682
76808
|
|
76683
76809
|
/**
|
@@ -76686,15 +76812,15 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76686
76812
|
* @private
|
76687
76813
|
*/
|
76688
76814
|
setupGuidePosition() {
|
76689
|
-
const handleWidth = parseInt((0, _element.outerWidth)(
|
76690
|
-
const handleEndPosition = parseInt(this.
|
76815
|
+
const handleWidth = parseInt((0, _element.outerWidth)((0, _classPrivateFieldGet2.default)(this, _handle)), 10);
|
76816
|
+
const handleEndPosition = parseInt((0, _classPrivateFieldGet2.default)(this, _handle).style[this.inlineDir], 10) + handleWidth;
|
76691
76817
|
const maximumVisibleElementWidth = parseInt(this.hot.view.maximumVisibleElementWidth(0), 10);
|
76692
|
-
(0, _element.addClass)(this
|
76693
|
-
(0, _element.addClass)(this
|
76694
|
-
this.
|
76695
|
-
this.
|
76696
|
-
this.
|
76697
|
-
this.hot.rootElement.appendChild(
|
76818
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'active');
|
76819
|
+
(0, _element.addClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'active');
|
76820
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style.top = (0, _classPrivateFieldGet2.default)(this, _handle).style.top;
|
76821
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style[this.inlineDir] = `${handleEndPosition}px`;
|
76822
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style.width = `${maximumVisibleElementWidth - handleWidth}px`;
|
76823
|
+
this.hot.rootElement.appendChild((0, _classPrivateFieldGet2.default)(this, _guide));
|
76698
76824
|
}
|
76699
76825
|
|
76700
76826
|
/**
|
@@ -76703,7 +76829,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76703
76829
|
* @private
|
76704
76830
|
*/
|
76705
76831
|
refreshGuidePosition() {
|
76706
|
-
this.
|
76832
|
+
(0, _classPrivateFieldGet2.default)(this, _guide).style.top = (0, _classPrivateFieldGet2.default)(this, _handle).style.top;
|
76707
76833
|
}
|
76708
76834
|
|
76709
76835
|
/**
|
@@ -76712,8 +76838,8 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76712
76838
|
* @private
|
76713
76839
|
*/
|
76714
76840
|
hideHandleAndGuide() {
|
76715
|
-
(0, _element.removeClass)(this
|
76716
|
-
(0, _element.removeClass)(this
|
76841
|
+
(0, _element.removeClass)((0, _classPrivateFieldGet2.default)(this, _handle), 'active');
|
76842
|
+
(0, _element.removeClass)((0, _classPrivateFieldGet2.default)(this, _guide), 'active');
|
76717
76843
|
}
|
76718
76844
|
|
76719
76845
|
/**
|
@@ -76756,10 +76882,10 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76756
76882
|
getActualRowHeight(row) {
|
76757
76883
|
// TODO: this should utilize `this.hot.getRowHeight` after it's fixed and working properly.
|
76758
76884
|
const walkontableHeight = this.hot.view._wt.wtTable.getRowHeight(row);
|
76759
|
-
if (walkontableHeight !== undefined && this
|
76885
|
+
if (walkontableHeight !== undefined && (0, _classPrivateFieldGet2.default)(this, _newSize) < walkontableHeight) {
|
76760
76886
|
return walkontableHeight;
|
76761
76887
|
}
|
76762
|
-
return this
|
76888
|
+
return (0, _classPrivateFieldGet2.default)(this, _newSize);
|
76763
76889
|
}
|
76764
76890
|
/**
|
76765
76891
|
* Auto-size row after doubleclick - callback.
|
@@ -76777,30 +76903,30 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76777
76903
|
const resize = (row, forceRender) => {
|
76778
76904
|
const hookNewSize = this.hot.runHooks('beforeRowResize', this.getActualRowHeight(row), row, true);
|
76779
76905
|
if (hookNewSize !== undefined) {
|
76780
|
-
this
|
76906
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, hookNewSize);
|
76781
76907
|
}
|
76782
|
-
this.setManualSize(row,
|
76908
|
+
this.setManualSize(row, (0, _classPrivateFieldGet2.default)(this, _newSize)); // double click sets auto row size
|
76783
76909
|
|
76784
76910
|
this.hot.runHooks('afterRowResize', this.getActualRowHeight(row), row, true);
|
76785
76911
|
if (forceRender) {
|
76786
76912
|
render();
|
76787
76913
|
}
|
76788
76914
|
};
|
76789
|
-
if (this
|
76790
|
-
const selectedRowsLength = this.
|
76915
|
+
if ((0, _classPrivateFieldGet2.default)(this, _dblclick) >= 2) {
|
76916
|
+
const selectedRowsLength = (0, _classPrivateFieldGet2.default)(this, _selectedRows).length;
|
76791
76917
|
if (selectedRowsLength > 1) {
|
76792
|
-
(0, _array.arrayEach)(this
|
76918
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedRows), selectedRow => {
|
76793
76919
|
resize(selectedRow);
|
76794
76920
|
});
|
76795
76921
|
render();
|
76796
76922
|
} else {
|
76797
|
-
(0, _array.arrayEach)(this
|
76923
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedRows), selectedRow => {
|
76798
76924
|
resize(selectedRow, true);
|
76799
76925
|
});
|
76800
76926
|
}
|
76801
76927
|
}
|
76802
|
-
this
|
76803
|
-
this
|
76928
|
+
(0, _classPrivateFieldSet2.default)(this, _dblclick, 0);
|
76929
|
+
(0, _classPrivateFieldSet2.default)(this, _autoresizeTimeout, null);
|
76804
76930
|
}
|
76805
76931
|
/**
|
76806
76932
|
* Binds the mouse events.
|
@@ -76816,7 +76942,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
76816
76942
|
this.eventManager.addEventListener(rootElement, 'mousedown', e => _classPrivateMethodGet(this, _onMouseDown, _onMouseDown2).call(this, e));
|
76817
76943
|
this.eventManager.addEventListener(rootWindow, 'mousemove', e => _classPrivateMethodGet(this, _onMouseMove, _onMouseMove2).call(this, e));
|
76818
76944
|
this.eventManager.addEventListener(rootWindow, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
|
76819
|
-
this.eventManager.addEventListener(this
|
76945
|
+
this.eventManager.addEventListener((0, _classPrivateFieldGet2.default)(this, _handle), 'contextmenu', () => _classPrivateMethodGet(this, _onContextMenu, _onContextMenu2).call(this));
|
76820
76946
|
}
|
76821
76947
|
/**
|
76822
76948
|
* Destroys the plugin instance.
|
@@ -76834,13 +76960,13 @@ function _onMouseOver2(event) {
|
|
76834
76960
|
}
|
76835
76961
|
|
76836
76962
|
// A "mouseover" action is triggered right after executing "contextmenu" event. It should be ignored.
|
76837
|
-
if (this
|
76963
|
+
if ((0, _classPrivateFieldGet2.default)(this, _isTriggeredByRMB) === true) {
|
76838
76964
|
return;
|
76839
76965
|
}
|
76840
76966
|
if (this.checkIfRowHeader(event.target)) {
|
76841
76967
|
const th = this.getClosestTHParent(event.target);
|
76842
76968
|
if (th) {
|
76843
|
-
if (!
|
76969
|
+
if (!(0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
76844
76970
|
this.setupHandlePosition(th);
|
76845
76971
|
}
|
76846
76972
|
}
|
@@ -76848,23 +76974,23 @@ function _onMouseOver2(event) {
|
|
76848
76974
|
}
|
76849
76975
|
function _onMouseDown2(event) {
|
76850
76976
|
if ((0, _element.hasClass)(event.target, 'manualRowResizer')) {
|
76851
|
-
this.setupHandlePosition(
|
76977
|
+
this.setupHandlePosition((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
76852
76978
|
this.setupGuidePosition();
|
76853
|
-
this
|
76854
|
-
if (this
|
76855
|
-
this
|
76856
|
-
this.hot._registerTimeout(
|
76979
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, true);
|
76980
|
+
if ((0, _classPrivateFieldGet2.default)(this, _autoresizeTimeout) === null) {
|
76981
|
+
(0, _classPrivateFieldSet2.default)(this, _autoresizeTimeout, setTimeout(() => this.afterMouseDownTimeout(), 500));
|
76982
|
+
this.hot._registerTimeout((0, _classPrivateFieldGet2.default)(this, _autoresizeTimeout));
|
76857
76983
|
}
|
76858
|
-
this.
|
76859
|
-
this
|
76860
|
-
this
|
76984
|
+
(0, _classPrivateFieldSet2.default)(this, _dblclick, (0, _classPrivateFieldGet2.default)(this, _dblclick) + 1);
|
76985
|
+
(0, _classPrivateFieldSet2.default)(this, _startY, event.pageY);
|
76986
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, (0, _classPrivateFieldGet2.default)(this, _startHeight));
|
76861
76987
|
}
|
76862
76988
|
}
|
76863
76989
|
function _onMouseMove2(event) {
|
76864
|
-
if (
|
76865
|
-
this
|
76866
|
-
(0, _array.arrayEach)(this
|
76867
|
-
this
|
76990
|
+
if ((0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
76991
|
+
(0, _classPrivateFieldSet2.default)(this, _currentHeight, (0, _classPrivateFieldGet2.default)(this, _startHeight) + (event.pageY - (0, _classPrivateFieldGet2.default)(this, _startY)));
|
76992
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedRows), selectedRow => {
|
76993
|
+
(0, _classPrivateFieldSet2.default)(this, _newSize, this.setManualSize(selectedRow, (0, _classPrivateFieldGet2.default)(this, _currentHeight)));
|
76868
76994
|
});
|
76869
76995
|
this.refreshHandlePosition();
|
76870
76996
|
this.refreshGuidePosition();
|
@@ -76884,43 +77010,43 @@ function _onMouseUp2() {
|
|
76884
77010
|
this.saveManualRowHeights();
|
76885
77011
|
this.hot.runHooks('afterRowResize', this.getActualRowHeight(row), row, false);
|
76886
77012
|
};
|
76887
|
-
if (
|
77013
|
+
if ((0, _classPrivateFieldGet2.default)(this, _pressed)) {
|
76888
77014
|
this.hideHandleAndGuide();
|
76889
|
-
this
|
76890
|
-
if (this
|
76891
|
-
const selectedRowsLength = this.
|
77015
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, false);
|
77016
|
+
if ((0, _classPrivateFieldGet2.default)(this, _newSize) !== (0, _classPrivateFieldGet2.default)(this, _startHeight)) {
|
77017
|
+
const selectedRowsLength = (0, _classPrivateFieldGet2.default)(this, _selectedRows).length;
|
76892
77018
|
if (selectedRowsLength > 1) {
|
76893
|
-
(0, _array.arrayEach)(this
|
77019
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedRows), selectedRow => {
|
76894
77020
|
runHooks(selectedRow);
|
76895
77021
|
});
|
76896
77022
|
render();
|
76897
77023
|
} else {
|
76898
|
-
(0, _array.arrayEach)(this
|
77024
|
+
(0, _array.arrayEach)((0, _classPrivateFieldGet2.default)(this, _selectedRows), selectedRow => {
|
76899
77025
|
runHooks(selectedRow, true);
|
76900
77026
|
});
|
76901
77027
|
}
|
76902
77028
|
}
|
76903
|
-
this.setupHandlePosition(
|
77029
|
+
this.setupHandlePosition((0, _classPrivateFieldGet2.default)(this, _currentTH));
|
76904
77030
|
}
|
76905
77031
|
}
|
76906
77032
|
function _onContextMenu2() {
|
76907
77033
|
this.hideHandleAndGuide();
|
76908
|
-
this.hot.rootElement.removeChild(
|
76909
|
-
this.hot.rootElement.removeChild(
|
76910
|
-
this
|
76911
|
-
this
|
77034
|
+
this.hot.rootElement.removeChild((0, _classPrivateFieldGet2.default)(this, _handle));
|
77035
|
+
this.hot.rootElement.removeChild((0, _classPrivateFieldGet2.default)(this, _guide));
|
77036
|
+
(0, _classPrivateFieldSet2.default)(this, _pressed, false);
|
77037
|
+
(0, _classPrivateFieldSet2.default)(this, _isTriggeredByRMB, true);
|
76912
77038
|
|
76913
77039
|
// There is thrown "mouseover" event right after opening a context menu. This flag inform that handle
|
76914
77040
|
// shouldn't be drawn just after removing it.
|
76915
77041
|
this.hot._registerImmediate(() => {
|
76916
|
-
this
|
77042
|
+
(0, _classPrivateFieldSet2.default)(this, _isTriggeredByRMB, false);
|
76917
77043
|
});
|
76918
77044
|
}
|
76919
77045
|
function _onModifyRowHeight2(height, row) {
|
76920
77046
|
let newHeight = height;
|
76921
77047
|
if (this.enabled) {
|
76922
77048
|
const physicalRow = this.hot.toPhysicalRow(row);
|
76923
|
-
const rowHeight = this.
|
77049
|
+
const rowHeight = (0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).getValueAtIndex(physicalRow);
|
76924
77050
|
if (this.hot.getSettings()[PLUGIN_KEY] && rowHeight) {
|
76925
77051
|
newHeight = rowHeight;
|
76926
77052
|
}
|
@@ -76933,16 +77059,16 @@ function _onMapInit2() {
|
|
76933
77059
|
this.hot.batchExecution(() => {
|
76934
77060
|
if (typeof loadedManualRowHeights !== 'undefined') {
|
76935
77061
|
loadedManualRowHeights.forEach((height, index) => {
|
76936
|
-
this.
|
77062
|
+
(0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).setValueAtIndex(index, height);
|
76937
77063
|
});
|
76938
77064
|
} else if (Array.isArray(initialSetting)) {
|
76939
77065
|
initialSetting.forEach((height, index) => {
|
76940
|
-
this.
|
77066
|
+
(0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).setValueAtIndex(index, height);
|
76941
77067
|
});
|
76942
77068
|
(0, _classPrivateFieldSet2.default)(this, _config, initialSetting);
|
76943
77069
|
} else if (initialSetting === true && Array.isArray((0, _classPrivateFieldGet2.default)(this, _config))) {
|
76944
77070
|
(0, _classPrivateFieldGet2.default)(this, _config).forEach((height, index) => {
|
76945
|
-
this.
|
77071
|
+
(0, _classPrivateFieldGet2.default)(this, _rowHeightsMap).setValueAtIndex(index, height);
|
76946
77072
|
});
|
76947
77073
|
}
|
76948
77074
|
}, true);
|