handsontable 0.0.0-next-40cdda4-20240118 → 0.0.0-next-ff99030-20240119
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/scroll.js +6 -0
- package/3rdparty/walkontable/src/scroll.mjs +6 -0
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +71 -12
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +5 -5
- package/dist/handsontable.js +71 -12
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +17 -17
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/pluginHooks.d.ts +2 -2
- package/pluginHooks.js +4 -2
- package/pluginHooks.mjs +4 -2
- package/plugins/dropdownMenu/dropdownMenu.js +58 -4
- package/plugins/dropdownMenu/dropdownMenu.mjs +58 -4
- package/selection/selection.js +1 -1
- package/selection/selection.mjs +1 -1
package/helpers/mixed.js
CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
|
|
134
134
|
function _injectProductInfo(key, element) {
|
135
135
|
const hasValidType = !isEmpty(key);
|
136
136
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
137
|
-
const hotVersion = "0.0.0-next-
|
137
|
+
const hotVersion = "0.0.0-next-ff99030-20240119";
|
138
138
|
let keyValidityDate;
|
139
139
|
let consoleMessageState = 'invalid';
|
140
140
|
let domMessageState = 'invalid';
|
package/helpers/mixed.mjs
CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
|
|
124
124
|
export function _injectProductInfo(key, element) {
|
125
125
|
const hasValidType = !isEmpty(key);
|
126
126
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
127
|
-
const hotVersion = "0.0.0-next-
|
127
|
+
const hotVersion = "0.0.0-next-ff99030-20240119";
|
128
128
|
let keyValidityDate;
|
129
129
|
let consoleMessageState = 'invalid';
|
130
130
|
let domMessageState = 'invalid';
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"url": "https://github.com/handsontable/handsontable/issues"
|
11
11
|
},
|
12
12
|
"author": "Handsoncode <hello@handsontable.com>",
|
13
|
-
"version": "0.0.0-next-
|
13
|
+
"version": "0.0.0-next-ff99030-20240119",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
package/pluginHooks.d.ts
CHANGED
@@ -229,8 +229,8 @@ export interface Events {
|
|
229
229
|
beforeUpdateData?: (sourceData: CellValue[], initialLoad: boolean, source: string | undefined) => void;
|
230
230
|
beforeValidate?: (value: CellValue, row: number, prop: string | number, source?: ChangeSource) => void;
|
231
231
|
beforeValueRender?: (value: CellValue, cellProperties: CellProperties) => void;
|
232
|
-
beforeViewportScrollVertically?: (visualRow: number) => number;
|
233
|
-
beforeViewportScrollHorizontally?: (visualColumn: number) => number;
|
232
|
+
beforeViewportScrollVertically?: (visualRow: number) => number | boolean;
|
233
|
+
beforeViewportScrollHorizontally?: (visualColumn: number) => number | boolean;
|
234
234
|
beforeViewportScroll?: () => void;
|
235
235
|
beforeViewRender?: (isForced: boolean, skipRender: { skipRender?: boolean }) => void;
|
236
236
|
construct?: () => void;
|
package/pluginHooks.js
CHANGED
@@ -555,7 +555,8 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
555
555
|
* @since 14.0.0
|
556
556
|
* @event Hooks#beforeViewportScrollVertically
|
557
557
|
* @param {number} visualRow Visual row index.
|
558
|
-
* @returns {number} Returns modified row index (or the same as passed in the method argument) to which
|
558
|
+
* @returns {number | boolean} Returns modified row index (or the same as passed in the method argument) to which
|
559
|
+
* the viewport will be scrolled. If the returned value is `false`, the scrolling will be canceled.
|
559
560
|
*/
|
560
561
|
'beforeViewportScrollVertically',
|
561
562
|
/**
|
@@ -565,7 +566,8 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
565
566
|
* @since 14.0.0
|
566
567
|
* @event Hooks#beforeViewportScrollHorizontally
|
567
568
|
* @param {number} visualColumn Visual column index.
|
568
|
-
* @returns {number} Returns modified column index (or the same as passed in the method argument) to which
|
569
|
+
* @returns {number | boolean} Returns modified column index (or the same as passed in the method argument) to which
|
570
|
+
* the viewport will be scrolled. If the returned value is `false`, the scrolling will be canceled.
|
569
571
|
*/
|
570
572
|
'beforeViewportScrollHorizontally',
|
571
573
|
/**
|
package/pluginHooks.mjs
CHANGED
@@ -551,7 +551,8 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
551
551
|
* @since 14.0.0
|
552
552
|
* @event Hooks#beforeViewportScrollVertically
|
553
553
|
* @param {number} visualRow Visual row index.
|
554
|
-
* @returns {number} Returns modified row index (or the same as passed in the method argument) to which
|
554
|
+
* @returns {number | boolean} Returns modified row index (or the same as passed in the method argument) to which
|
555
|
+
* the viewport will be scrolled. If the returned value is `false`, the scrolling will be canceled.
|
555
556
|
*/
|
556
557
|
'beforeViewportScrollVertically',
|
557
558
|
/**
|
@@ -561,7 +562,8 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
561
562
|
* @since 14.0.0
|
562
563
|
* @event Hooks#beforeViewportScrollHorizontally
|
563
564
|
* @param {number} visualColumn Visual column index.
|
564
|
-
* @returns {number} Returns modified column index (or the same as passed in the method argument) to which
|
565
|
+
* @returns {number | boolean} Returns modified column index (or the same as passed in the method argument) to which
|
566
|
+
* the viewport will be scrolled. If the returned value is `false`, the scrolling will be canceled.
|
565
567
|
*/
|
566
568
|
'beforeViewportScrollHorizontally',
|
567
569
|
/**
|
@@ -15,10 +15,16 @@ var _predefinedItems = require("../contextMenu/predefinedItems");
|
|
15
15
|
var _a11y = require("../../helpers/a11y");
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
17
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
18
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
18
19
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
19
20
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
20
21
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
21
22
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
23
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
24
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
25
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
26
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
27
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
22
28
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
23
29
|
_pluginHooks.default.getSingleton().register('afterDropdownMenuDefaultOptions');
|
24
30
|
_pluginHooks.default.getSingleton().register('beforeDropdownMenuShow');
|
@@ -80,6 +86,7 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
80
86
|
* ```
|
81
87
|
* :::
|
82
88
|
*/
|
89
|
+
var _isButtonClicked = /*#__PURE__*/new WeakMap();
|
83
90
|
var _addCustomShortcuts = /*#__PURE__*/new WeakSet();
|
84
91
|
var _onTableClick = /*#__PURE__*/new WeakSet();
|
85
92
|
var _onAfterGetColHeader = /*#__PURE__*/new WeakSet();
|
@@ -87,6 +94,8 @@ var _onMenuBeforeOpen = /*#__PURE__*/new WeakSet();
|
|
87
94
|
var _onMenuAfterOpen = /*#__PURE__*/new WeakSet();
|
88
95
|
var _onSubMenuAfterOpen = /*#__PURE__*/new WeakSet();
|
89
96
|
var _onMenuAfterClose = /*#__PURE__*/new WeakSet();
|
97
|
+
var _onBeforeViewportScrollHorizontally = /*#__PURE__*/new WeakSet();
|
98
|
+
var _onBeforeOnCellMouseDown = /*#__PURE__*/new WeakSet();
|
90
99
|
class DropdownMenu extends _base.BasePlugin {
|
91
100
|
static get PLUGIN_KEY() {
|
92
101
|
return PLUGIN_KEY;
|
@@ -118,6 +127,21 @@ class DropdownMenu extends _base.BasePlugin {
|
|
118
127
|
super(hotInstance);
|
119
128
|
|
120
129
|
// One listener for enable/disable functionality
|
130
|
+
/**
|
131
|
+
* Hook sets the internal flag to `true` when the button is clicked.
|
132
|
+
*
|
133
|
+
* @param {MouseEvent} event The mouse event object.
|
134
|
+
*/
|
135
|
+
_classPrivateMethodInitSpec(this, _onBeforeOnCellMouseDown);
|
136
|
+
/**
|
137
|
+
* Hook allows blocking horizontal scroll when the menu is opened by clicking on
|
138
|
+
* the column header button. This prevents from scrolling the viewport (jump effect) when
|
139
|
+
* the button is clicked.
|
140
|
+
*
|
141
|
+
* @param {number} visualColumn Visual column index.
|
142
|
+
* @returns {number | null}
|
143
|
+
*/
|
144
|
+
_classPrivateMethodInitSpec(this, _onBeforeViewportScrollHorizontally);
|
121
145
|
/**
|
122
146
|
* On menu after close listener.
|
123
147
|
*
|
@@ -182,6 +206,15 @@ class DropdownMenu extends _base.BasePlugin {
|
|
182
206
|
* @type {Menu}
|
183
207
|
*/
|
184
208
|
_defineProperty(this, "menu", null);
|
209
|
+
/**
|
210
|
+
* Flag which determines if the button that opens the menu was clicked.
|
211
|
+
*
|
212
|
+
* @type {boolean}
|
213
|
+
*/
|
214
|
+
_classPrivateFieldInitSpec(this, _isButtonClicked, {
|
215
|
+
writable: true,
|
216
|
+
value: false
|
217
|
+
});
|
185
218
|
this.hot.addHook('afterGetColHeader', (col, TH) => _classPrivateMethodGet(this, _onAfterGetColHeader, _onAfterGetColHeader2).call(this, col, TH));
|
186
219
|
}
|
187
220
|
|
@@ -207,6 +240,18 @@ class DropdownMenu extends _base.BasePlugin {
|
|
207
240
|
return;
|
208
241
|
}
|
209
242
|
this.itemsFactory = new _itemsFactory.ItemsFactory(this.hot, DropdownMenu.DEFAULT_ITEMS);
|
243
|
+
this.addHook('beforeOnCellMouseDown', function () {
|
244
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
245
|
+
args[_key] = arguments[_key];
|
246
|
+
}
|
247
|
+
return _classPrivateMethodGet(_this, _onBeforeOnCellMouseDown, _onBeforeOnCellMouseDown2).call(_this, ...args);
|
248
|
+
});
|
249
|
+
this.addHook('beforeViewportScrollHorizontally', function () {
|
250
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
251
|
+
args[_key2] = arguments[_key2];
|
252
|
+
}
|
253
|
+
return _classPrivateMethodGet(_this, _onBeforeViewportScrollHorizontally, _onBeforeViewportScrollHorizontally2).call(_this, ...args);
|
254
|
+
});
|
210
255
|
const settings = this.hot.getSettings()[PLUGIN_KEY];
|
211
256
|
const predefinedItems = {
|
212
257
|
items: this.itemsFactory.getItems(settings)
|
@@ -236,8 +281,8 @@ class DropdownMenu extends _base.BasePlugin {
|
|
236
281
|
this.menu.addLocalHook('afterSubmenuOpen', subMenuInstance => _classPrivateMethodGet(this, _onSubMenuAfterOpen, _onSubMenuAfterOpen2).call(this, subMenuInstance));
|
237
282
|
this.menu.addLocalHook('afterClose', () => _classPrivateMethodGet(this, _onMenuAfterClose, _onMenuAfterClose2).call(this));
|
238
283
|
this.menu.addLocalHook('executeCommand', function () {
|
239
|
-
for (var
|
240
|
-
params[
|
284
|
+
for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
285
|
+
params[_key3] = arguments[_key3];
|
241
286
|
}
|
242
287
|
return _this.executeCommand.call(_this, ...params);
|
243
288
|
});
|
@@ -410,8 +455,8 @@ class DropdownMenu extends _base.BasePlugin {
|
|
410
455
|
* @param {*} params Additional parameters passed to the command executor.
|
411
456
|
*/
|
412
457
|
executeCommand(commandName) {
|
413
|
-
for (var
|
414
|
-
params[
|
458
|
+
for (var _len4 = arguments.length, params = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
459
|
+
params[_key4 - 1] = arguments[_key4];
|
415
460
|
}
|
416
461
|
this.commandExecutor.execute(commandName, ...params);
|
417
462
|
}
|
@@ -455,6 +500,7 @@ function _onTableClick2(event) {
|
|
455
500
|
if ((0, _element.hasClass)(event.target, BUTTON_CLASS_NAME)) {
|
456
501
|
const offset = (0, _utils.getDocumentOffsetByElement)(this.menu.container, this.hot.rootDocument);
|
457
502
|
const rect = event.target.getBoundingClientRect();
|
503
|
+
_classPrivateFieldSet(this, _isButtonClicked, false);
|
458
504
|
this.open({
|
459
505
|
left: rect.left + offset.left,
|
460
506
|
top: rect.top + event.target.offsetHeight + 3 + offset.top
|
@@ -516,6 +562,14 @@ function _onMenuAfterClose2() {
|
|
516
562
|
this.hot.listen();
|
517
563
|
this.hot.runHooks('afterDropdownMenuHide', this);
|
518
564
|
}
|
565
|
+
function _onBeforeViewportScrollHorizontally2(visualColumn) {
|
566
|
+
return _classPrivateFieldGet(this, _isButtonClicked) ? null : visualColumn;
|
567
|
+
}
|
568
|
+
function _onBeforeOnCellMouseDown2(event) {
|
569
|
+
if ((0, _element.hasClass)(event.target, BUTTON_CLASS_NAME)) {
|
570
|
+
_classPrivateFieldSet(this, _isButtonClicked, true);
|
571
|
+
}
|
572
|
+
}
|
519
573
|
DropdownMenu.SEPARATOR = {
|
520
574
|
name: _predefinedItems.SEPARATOR
|
521
575
|
};
|
@@ -1,9 +1,15 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
3
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
3
4
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
4
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
5
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
6
7
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
9
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
10
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
11
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
12
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
7
13
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
8
14
|
import { BasePlugin } from "../base/index.mjs";
|
9
15
|
import { arrayEach } from "../../helpers/array.mjs";
|
@@ -76,6 +82,7 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
76
82
|
* ```
|
77
83
|
* :::
|
78
84
|
*/
|
85
|
+
var _isButtonClicked = /*#__PURE__*/new WeakMap();
|
79
86
|
var _addCustomShortcuts = /*#__PURE__*/new WeakSet();
|
80
87
|
var _onTableClick = /*#__PURE__*/new WeakSet();
|
81
88
|
var _onAfterGetColHeader = /*#__PURE__*/new WeakSet();
|
@@ -83,6 +90,8 @@ var _onMenuBeforeOpen = /*#__PURE__*/new WeakSet();
|
|
83
90
|
var _onMenuAfterOpen = /*#__PURE__*/new WeakSet();
|
84
91
|
var _onSubMenuAfterOpen = /*#__PURE__*/new WeakSet();
|
85
92
|
var _onMenuAfterClose = /*#__PURE__*/new WeakSet();
|
93
|
+
var _onBeforeViewportScrollHorizontally = /*#__PURE__*/new WeakSet();
|
94
|
+
var _onBeforeOnCellMouseDown = /*#__PURE__*/new WeakSet();
|
86
95
|
export class DropdownMenu extends BasePlugin {
|
87
96
|
static get PLUGIN_KEY() {
|
88
97
|
return PLUGIN_KEY;
|
@@ -114,6 +123,21 @@ export class DropdownMenu extends BasePlugin {
|
|
114
123
|
super(hotInstance);
|
115
124
|
|
116
125
|
// One listener for enable/disable functionality
|
126
|
+
/**
|
127
|
+
* Hook sets the internal flag to `true` when the button is clicked.
|
128
|
+
*
|
129
|
+
* @param {MouseEvent} event The mouse event object.
|
130
|
+
*/
|
131
|
+
_classPrivateMethodInitSpec(this, _onBeforeOnCellMouseDown);
|
132
|
+
/**
|
133
|
+
* Hook allows blocking horizontal scroll when the menu is opened by clicking on
|
134
|
+
* the column header button. This prevents from scrolling the viewport (jump effect) when
|
135
|
+
* the button is clicked.
|
136
|
+
*
|
137
|
+
* @param {number} visualColumn Visual column index.
|
138
|
+
* @returns {number | null}
|
139
|
+
*/
|
140
|
+
_classPrivateMethodInitSpec(this, _onBeforeViewportScrollHorizontally);
|
117
141
|
/**
|
118
142
|
* On menu after close listener.
|
119
143
|
*
|
@@ -178,6 +202,15 @@ export class DropdownMenu extends BasePlugin {
|
|
178
202
|
* @type {Menu}
|
179
203
|
*/
|
180
204
|
_defineProperty(this, "menu", null);
|
205
|
+
/**
|
206
|
+
* Flag which determines if the button that opens the menu was clicked.
|
207
|
+
*
|
208
|
+
* @type {boolean}
|
209
|
+
*/
|
210
|
+
_classPrivateFieldInitSpec(this, _isButtonClicked, {
|
211
|
+
writable: true,
|
212
|
+
value: false
|
213
|
+
});
|
181
214
|
this.hot.addHook('afterGetColHeader', (col, TH) => _classPrivateMethodGet(this, _onAfterGetColHeader, _onAfterGetColHeader2).call(this, col, TH));
|
182
215
|
}
|
183
216
|
|
@@ -203,6 +236,18 @@ export class DropdownMenu extends BasePlugin {
|
|
203
236
|
return;
|
204
237
|
}
|
205
238
|
this.itemsFactory = new ItemsFactory(this.hot, DropdownMenu.DEFAULT_ITEMS);
|
239
|
+
this.addHook('beforeOnCellMouseDown', function () {
|
240
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
241
|
+
args[_key] = arguments[_key];
|
242
|
+
}
|
243
|
+
return _classPrivateMethodGet(_this, _onBeforeOnCellMouseDown, _onBeforeOnCellMouseDown2).call(_this, ...args);
|
244
|
+
});
|
245
|
+
this.addHook('beforeViewportScrollHorizontally', function () {
|
246
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
247
|
+
args[_key2] = arguments[_key2];
|
248
|
+
}
|
249
|
+
return _classPrivateMethodGet(_this, _onBeforeViewportScrollHorizontally, _onBeforeViewportScrollHorizontally2).call(_this, ...args);
|
250
|
+
});
|
206
251
|
const settings = this.hot.getSettings()[PLUGIN_KEY];
|
207
252
|
const predefinedItems = {
|
208
253
|
items: this.itemsFactory.getItems(settings)
|
@@ -232,8 +277,8 @@ export class DropdownMenu extends BasePlugin {
|
|
232
277
|
this.menu.addLocalHook('afterSubmenuOpen', subMenuInstance => _classPrivateMethodGet(this, _onSubMenuAfterOpen, _onSubMenuAfterOpen2).call(this, subMenuInstance));
|
233
278
|
this.menu.addLocalHook('afterClose', () => _classPrivateMethodGet(this, _onMenuAfterClose, _onMenuAfterClose2).call(this));
|
234
279
|
this.menu.addLocalHook('executeCommand', function () {
|
235
|
-
for (var
|
236
|
-
params[
|
280
|
+
for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
281
|
+
params[_key3] = arguments[_key3];
|
237
282
|
}
|
238
283
|
return _this.executeCommand.call(_this, ...params);
|
239
284
|
});
|
@@ -406,8 +451,8 @@ export class DropdownMenu extends BasePlugin {
|
|
406
451
|
* @param {*} params Additional parameters passed to the command executor.
|
407
452
|
*/
|
408
453
|
executeCommand(commandName) {
|
409
|
-
for (var
|
410
|
-
params[
|
454
|
+
for (var _len4 = arguments.length, params = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
455
|
+
params[_key4 - 1] = arguments[_key4];
|
411
456
|
}
|
412
457
|
this.commandExecutor.execute(commandName, ...params);
|
413
458
|
}
|
@@ -450,6 +495,7 @@ function _onTableClick2(event) {
|
|
450
495
|
if (hasClass(event.target, BUTTON_CLASS_NAME)) {
|
451
496
|
const offset = getDocumentOffsetByElement(this.menu.container, this.hot.rootDocument);
|
452
497
|
const rect = event.target.getBoundingClientRect();
|
498
|
+
_classPrivateFieldSet(this, _isButtonClicked, false);
|
453
499
|
this.open({
|
454
500
|
left: rect.left + offset.left,
|
455
501
|
top: rect.top + event.target.offsetHeight + 3 + offset.top
|
@@ -511,6 +557,14 @@ function _onMenuAfterClose2() {
|
|
511
557
|
this.hot.listen();
|
512
558
|
this.hot.runHooks('afterDropdownMenuHide', this);
|
513
559
|
}
|
560
|
+
function _onBeforeViewportScrollHorizontally2(visualColumn) {
|
561
|
+
return _classPrivateFieldGet(this, _isButtonClicked) ? null : visualColumn;
|
562
|
+
}
|
563
|
+
function _onBeforeOnCellMouseDown2(event) {
|
564
|
+
if (hasClass(event.target, BUTTON_CLASS_NAME)) {
|
565
|
+
_classPrivateFieldSet(this, _isButtonClicked, true);
|
566
|
+
}
|
567
|
+
}
|
514
568
|
DropdownMenu.SEPARATOR = {
|
515
569
|
name: SEPARATOR
|
516
570
|
};
|
package/selection/selection.js
CHANGED
package/selection/selection.mjs
CHANGED