handsontable 14.0.0-next-1127661-20231114 → 14.0.0-next-ae5997a-20231116

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.
Files changed (33) hide show
  1. package/base.js +2 -2
  2. package/base.mjs +2 -2
  3. package/core/focusCatcher/index.js +4 -5
  4. package/core/focusCatcher/index.mjs +4 -5
  5. package/dataMap/metaManager/metaSchema.js +7 -7
  6. package/dataMap/metaManager/metaSchema.mjs +7 -7
  7. package/dist/handsontable.css +2 -2
  8. package/dist/handsontable.full.css +2 -2
  9. package/dist/handsontable.full.js +411 -309
  10. package/dist/handsontable.full.min.css +2 -2
  11. package/dist/handsontable.full.min.js +147 -147
  12. package/dist/handsontable.js +411 -309
  13. package/dist/handsontable.min.css +2 -2
  14. package/dist/handsontable.min.js +22 -22
  15. package/editors/textEditor/textEditor.js +4 -27
  16. package/editors/textEditor/textEditor.mjs +4 -27
  17. package/helpers/mixed.js +2 -2
  18. package/helpers/mixed.mjs +2 -2
  19. package/package.json +1 -1
  20. package/pluginHooks.d.ts +2 -2
  21. package/plugins/manualColumnMove/manualColumnMove.js +31 -28
  22. package/plugins/manualColumnMove/manualColumnMove.mjs +29 -26
  23. package/plugins/manualColumnResize/manualColumnResize.js +161 -105
  24. package/plugins/manualColumnResize/manualColumnResize.mjs +160 -104
  25. package/plugins/manualRowMove/manualRowMove.js +31 -28
  26. package/plugins/manualRowMove/manualRowMove.mjs +29 -26
  27. package/plugins/manualRowResize/manualRowResize.js +160 -104
  28. package/plugins/manualRowResize/manualRowResize.mjs +159 -103
  29. package/selection/transformation.js +12 -12
  30. package/selection/transformation.mjs +13 -13
  31. package/settings.d.ts +1 -1
  32. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -1
  33. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -1
@@ -388,6 +388,7 @@ class TextEditor extends _baseEditor.BaseEditor {
388
388
  registerShortcuts() {
389
389
  const shortcutManager = this.hot.getShortcutManager();
390
390
  const editorContext = shortcutManager.getContext('editor');
391
+ const gridContext = shortcutManager.getContext('grid');
391
392
  const contextConfig = {
392
393
  runOnlyIf: () => (0, _mixed.isDefined)(this.hot.getSelected()),
393
394
  group: SHORTCUTS_GROUP
@@ -396,21 +397,9 @@ class TextEditor extends _baseEditor.BaseEditor {
396
397
  this.hot.rootDocument.execCommand('insertText', false, '\n');
397
398
  };
398
399
  editorContext.addShortcuts([{
399
- keys: [['Tab']],
400
- // TODO: Duplicated part of code (callback to shortcut).
401
- callback: event => {
402
- const tableMeta = this.hot.getSettings();
403
- const tabMoves = typeof tableMeta.tabMoves === 'function' ? tableMeta.tabMoves(event) : tableMeta.tabMoves;
404
- this.hot.selection.transformStart(tabMoves.row, tabMoves.col, true);
405
- }
406
- }, {
407
- keys: [['Shift', 'Tab']],
408
- // TODO: Duplicated part of code (callback to shortcut).
409
- callback: event => {
410
- const tableMeta = this.hot.getSettings();
411
- const tabMoves = typeof tableMeta.tabMoves === 'function' ? tableMeta.tabMoves(event) : tableMeta.tabMoves;
412
- this.hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
413
- }
400
+ keys: [['Tab'], ['Shift', 'Tab'], ['PageUp'], ['PageDown']],
401
+ forwardToContext: gridContext,
402
+ callback: () => {}
414
403
  }, {
415
404
  keys: [['Control', 'Enter']],
416
405
  callback: () => {
@@ -436,18 +425,6 @@ class TextEditor extends _baseEditor.BaseEditor {
436
425
  insertNewLine();
437
426
  return false; // Will block closing editor.
438
427
  }
439
- }, {
440
- // TODO: Duplicated part of code (callback to shortcut)
441
- keys: [['PageUp']],
442
- callback: () => {
443
- this.hot.selection.transformStart(-this.hot.countVisibleRows(), 0);
444
- }
445
- }, {
446
- // TODO: Duplicated part of code (callback to shortcut)
447
- keys: [['PageDown']],
448
- callback: () => {
449
- this.hot.selection.transformStart(this.hot.countVisibleRows(), 0);
450
- }
451
428
  }, {
452
429
  keys: [['Home']],
453
430
  callback: (event, _ref) => {
@@ -384,6 +384,7 @@ export class TextEditor extends BaseEditor {
384
384
  registerShortcuts() {
385
385
  const shortcutManager = this.hot.getShortcutManager();
386
386
  const editorContext = shortcutManager.getContext('editor');
387
+ const gridContext = shortcutManager.getContext('grid');
387
388
  const contextConfig = {
388
389
  runOnlyIf: () => isDefined(this.hot.getSelected()),
389
390
  group: SHORTCUTS_GROUP
@@ -392,21 +393,9 @@ export class TextEditor extends BaseEditor {
392
393
  this.hot.rootDocument.execCommand('insertText', false, '\n');
393
394
  };
394
395
  editorContext.addShortcuts([{
395
- keys: [['Tab']],
396
- // TODO: Duplicated part of code (callback to shortcut).
397
- callback: event => {
398
- const tableMeta = this.hot.getSettings();
399
- const tabMoves = typeof tableMeta.tabMoves === 'function' ? tableMeta.tabMoves(event) : tableMeta.tabMoves;
400
- this.hot.selection.transformStart(tabMoves.row, tabMoves.col, true);
401
- }
402
- }, {
403
- keys: [['Shift', 'Tab']],
404
- // TODO: Duplicated part of code (callback to shortcut).
405
- callback: event => {
406
- const tableMeta = this.hot.getSettings();
407
- const tabMoves = typeof tableMeta.tabMoves === 'function' ? tableMeta.tabMoves(event) : tableMeta.tabMoves;
408
- this.hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
409
- }
396
+ keys: [['Tab'], ['Shift', 'Tab'], ['PageUp'], ['PageDown']],
397
+ forwardToContext: gridContext,
398
+ callback: () => {}
410
399
  }, {
411
400
  keys: [['Control', 'Enter']],
412
401
  callback: () => {
@@ -432,18 +421,6 @@ export class TextEditor extends BaseEditor {
432
421
  insertNewLine();
433
422
  return false; // Will block closing editor.
434
423
  }
435
- }, {
436
- // TODO: Duplicated part of code (callback to shortcut)
437
- keys: [['PageUp']],
438
- callback: () => {
439
- this.hot.selection.transformStart(-this.hot.countVisibleRows(), 0);
440
- }
441
- }, {
442
- // TODO: Duplicated part of code (callback to shortcut)
443
- keys: [['PageDown']],
444
- callback: () => {
445
- this.hot.selection.transformStart(this.hot.countVisibleRows(), 0);
446
- }
447
424
  }, {
448
425
  keys: [['Home']],
449
426
  callback: (event, _ref) => {
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 = "14.0.0-next-1127661-20231114";
137
+ const hotVersion = "14.0.0-next-ae5997a-20231116";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
@@ -142,7 +142,7 @@ function _injectProductInfo(key, element) {
142
142
  const schemaValidity = _checkKeySchema(key);
143
143
  if (hasValidType || isNonCommercial || schemaValidity) {
144
144
  if (schemaValidity) {
145
- const releaseDate = (0, _moment.default)("16/11/2023", 'DD/MM/YYYY');
145
+ const releaseDate = (0, _moment.default)("22/11/2023", 'DD/MM/YYYY');
146
146
  const releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
147
147
  const keyValidityDays = _extractTime(key);
148
148
  keyValidityDate = (0, _moment.default)((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
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 = "14.0.0-next-1127661-20231114";
127
+ const hotVersion = "14.0.0-next-ae5997a-20231116";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
@@ -132,7 +132,7 @@ export function _injectProductInfo(key, element) {
132
132
  const schemaValidity = _checkKeySchema(key);
133
133
  if (hasValidType || isNonCommercial || schemaValidity) {
134
134
  if (schemaValidity) {
135
- const releaseDate = moment("16/11/2023", 'DD/MM/YYYY');
135
+ const releaseDate = moment("22/11/2023", 'DD/MM/YYYY');
136
136
  const releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
137
137
  const keyValidityDays = _extractTime(key);
138
138
  keyValidityDate = moment((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
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": "14.0.0-next-1127661-20231114",
13
+ "version": "14.0.0-next-ae5997a-20231116",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
package/pluginHooks.d.ts CHANGED
@@ -166,7 +166,7 @@ export interface Events {
166
166
  beforeColumnMove?: (movedColumns: number[], finalIndex: number, dropIndex: number | undefined, movePossible: boolean) => void | boolean;
167
167
  beforeColumnResize?: (newSize: number, column: number, isDoubleClick: boolean) => void | number;
168
168
  beforeColumnSort?: (currentSortConfig: ColumnSortingConfig[], destinationSortConfigs: ColumnSortingConfig[]) => void | boolean;
169
- beforeColumnWrap?: (isAutoWrapEnabled: boolean, newCoords: CellCoords, isColumnFlipped: boolean) => void;
169
+ beforeColumnWrap?: (isActionInterrupted: { value: boolean }, newCoords: CellCoords, isColumnFlipped: boolean) => void;
170
170
  beforeColumnUnfreeze?: (columnIndex: number, isUnfreezingPerformed: boolean) => void | boolean;
171
171
  beforeContextMenuSetItems?: (menuItems: ContextMenuMenuItemConfig[]) => void;
172
172
  beforeContextMenuShow?: (context: ContextMenu) => void;
@@ -207,7 +207,7 @@ export interface Events {
207
207
  beforeRenderer?: (TD: HTMLTableCellElement, row: number, column: number, prop: string | number, value: CellValue, cellProperties: CellProperties) => void;
208
208
  beforeRowMove?: (movedRows: number[], finalIndex: number, dropIndex: number | undefined, movePossible: boolean) => void;
209
209
  beforeRowResize?: (newSize: number, row: number, isDoubleClick: boolean) => number | void;
210
- beforeRowWrap?: (isAutoWrapEnabled: boolean, newCoords: CellCoords, isRowFlipped: boolean) => void;
210
+ beforeRowWrap?: (isActionInterrupted: { value: boolean }, newCoords: CellCoords, isRowFlipped: boolean) => void;
211
211
  beforeSelectColumns?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
212
212
  beforeSelectionHighlightSet?: () => void;
213
213
  beforeSelectRows?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
@@ -9,15 +9,12 @@ var _array = require("../../helpers/array");
9
9
  var _element = require("../../helpers/dom/element");
10
10
  var _event = require("../../helpers/dom/event");
11
11
  var _number = require("../../helpers/number");
12
- var _backlight = _interopRequireDefault(require("./ui/backlight"));
13
- var _guideline = _interopRequireDefault(require("./ui/guideline"));
12
+ var _backlight2 = _interopRequireDefault(require("./ui/backlight"));
13
+ var _guideline2 = _interopRequireDefault(require("./ui/guideline"));
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
16
16
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
17
17
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
18
- function _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; }
19
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
20
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
21
18
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
22
19
  function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
23
20
  function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
@@ -60,6 +57,8 @@ const CSS_AFTER_SELECTION = 'after-selection--columns';
60
57
  * @class ManualColumnMove
61
58
  * @plugin ManualColumnMove
62
59
  */
60
+ var _backlight = /*#__PURE__*/new WeakMap();
61
+ var _guideline = /*#__PURE__*/new WeakMap();
63
62
  var _columnsToMove = /*#__PURE__*/new WeakMap();
64
63
  var _countCols = /*#__PURE__*/new WeakMap();
65
64
  var _pressed = /*#__PURE__*/new WeakMap();
@@ -121,17 +120,21 @@ class ManualColumnMove extends _base.BasePlugin {
121
120
  /**
122
121
  * Backlight UI object.
123
122
  *
124
- * @private
125
123
  * @type {object}
126
124
  */
127
- _defineProperty(this, "backlight", new _backlight.default(this.hot));
125
+ _classPrivateFieldInitSpec(this, _backlight, {
126
+ writable: true,
127
+ value: new _backlight2.default(this.hot)
128
+ });
128
129
  /**
129
130
  * Guideline UI object.
130
131
  *
131
- * @private
132
132
  * @type {object}
133
133
  */
134
- _defineProperty(this, "guideline", new _guideline.default(this.hot));
134
+ _classPrivateFieldInitSpec(this, _guideline, {
135
+ writable: true,
136
+ value: new _guideline2.default(this.hot)
137
+ });
135
138
  /**
136
139
  * @type {number[]}
137
140
  */
@@ -266,8 +269,8 @@ class ManualColumnMove extends _base.BasePlugin {
266
269
  disablePlugin() {
267
270
  (0, _element.removeClass)(this.hot.rootElement, CSS_PLUGIN);
268
271
  this.unregisterEvents();
269
- this.backlight.destroy();
270
- this.guideline.destroy();
272
+ _classPrivateFieldGet(this, _backlight).destroy();
273
+ _classPrivateFieldGet(this, _guideline).destroy();
271
274
  super.disablePlugin();
272
275
  }
273
276
 
@@ -504,8 +507,8 @@ class ManualColumnMove extends _base.BasePlugin {
504
507
  let tdOffsetStart = this.hot.view.THEAD.offsetLeft + this.getColumnsWidth(0, _classPrivateFieldGet(this, _hoveredColumn) - 1);
505
508
  const hiderWidth = wtTable.hider.offsetWidth;
506
509
  const tbodyOffsetLeft = wtTable.TBODY.offsetLeft;
507
- const backlightElemMarginStart = this.backlight.getOffset().start;
508
- const backlightElemWidth = this.backlight.getSize().width;
510
+ const backlightElemMarginStart = _classPrivateFieldGet(this, _backlight).getOffset().start;
511
+ const backlightElemWidth = _classPrivateFieldGet(this, _backlight).getSize().width;
509
512
  let rowHeaderWidth = 0;
510
513
  let mouseOffsetStart = 0;
511
514
  if (this.hot.isRtl()) {
@@ -559,8 +562,8 @@ class ManualColumnMove extends _base.BasePlugin {
559
562
  } else if (scrollableElement.scrollX !== undefined && _classPrivateFieldGet(this, _hoveredColumn) < _classPrivateFieldGet(this, _fixedColumnsStart)) {
560
563
  guidelineStart -= _classPrivateFieldGet(this, _rootElementOffset) <= scrollableElement.scrollX ? _classPrivateFieldGet(this, _rootElementOffset) : 0;
561
564
  }
562
- this.backlight.setPosition(null, backlightStart);
563
- this.guideline.setPosition(null, guidelineStart);
565
+ _classPrivateFieldGet(this, _backlight).setPosition(null, backlightStart);
566
+ _classPrivateFieldGet(this, _guideline).setPosition(null, guidelineStart);
564
567
  }
565
568
 
566
569
  /**
@@ -590,15 +593,15 @@ class ManualColumnMove extends _base.BasePlugin {
590
593
  * @private
591
594
  */
592
595
  buildPluginUI() {
593
- this.backlight.build();
594
- this.guideline.build();
596
+ _classPrivateFieldGet(this, _backlight).build();
597
+ _classPrivateFieldGet(this, _guideline).build();
595
598
  }
596
599
  /**
597
600
  * Destroys the plugin instance.
598
601
  */
599
602
  destroy() {
600
- this.backlight.destroy();
601
- this.guideline.destroy();
603
+ _classPrivateFieldGet(this, _backlight).destroy();
604
+ _classPrivateFieldGet(this, _guideline).destroy();
602
605
  super.destroy();
603
606
  }
604
607
  }
@@ -615,11 +618,11 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
615
618
  (0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);
616
619
  return;
617
620
  }
618
- const guidelineIsNotReady = this.guideline.isBuilt() && !this.guideline.isAppended();
619
- const backlightIsNotReady = this.backlight.isBuilt() && !this.backlight.isAppended();
621
+ const guidelineIsNotReady = _classPrivateFieldGet(this, _guideline).isBuilt() && !_classPrivateFieldGet(this, _guideline).isAppended();
622
+ const backlightIsNotReady = _classPrivateFieldGet(this, _backlight).isBuilt() && !_classPrivateFieldGet(this, _backlight).isAppended();
620
623
  if (guidelineIsNotReady && backlightIsNotReady) {
621
- this.guideline.appendTo(wtTable.hider);
622
- this.backlight.appendTo(wtTable.hider);
624
+ _classPrivateFieldGet(this, _guideline).appendTo(wtTable.hider);
625
+ _classPrivateFieldGet(this, _backlight).appendTo(wtTable.hider);
623
626
  }
624
627
  const {
625
628
  from,
@@ -647,9 +650,9 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
647
650
  const offsetX = Math.abs(eventOffsetX - (this.hot.isRtl() ? TD.offsetWidth : 0));
648
651
  const inlineOffset = this.getColumnsWidth(start, coords.col - 1) + offsetX;
649
652
  const inlinePos = this.getColumnsWidth(countColumnsFrom, start - 1) + (fixedColumnsStart ? horizontalScrollPosition : 0) + inlineOffset;
650
- this.backlight.setPosition(topPos, inlinePos);
651
- this.backlight.setSize(this.getColumnsWidth(start, end), wtTable.hider.offsetHeight - topPos);
652
- this.backlight.setOffset(null, -inlineOffset);
653
+ _classPrivateFieldGet(this, _backlight).setPosition(topPos, inlinePos);
654
+ _classPrivateFieldGet(this, _backlight).setSize(this.getColumnsWidth(start, end), wtTable.hider.offsetHeight - topPos);
655
+ _classPrivateFieldGet(this, _backlight).setOffset(null, -inlineOffset);
653
656
  (0, _element.addClass)(this.hot.rootElement, CSS_ON_MOVING);
654
657
  } else {
655
658
  (0, _element.removeClass)(this.hot.rootElement, CSS_AFTER_SELECTION);
@@ -710,8 +713,8 @@ function _onAfterScrollVertically2() {
710
713
  const headerHeight = wtTable.getColumnHeaderHeight(0) + 1;
711
714
  const scrollTop = wtTable.holder.scrollTop;
712
715
  const posTop = headerHeight + scrollTop;
713
- this.backlight.setPosition(posTop);
714
- this.backlight.setSize(null, wtTable.hider.offsetHeight - posTop);
716
+ _classPrivateFieldGet(this, _backlight).setPosition(posTop);
717
+ _classPrivateFieldGet(this, _backlight).setSize(null, wtTable.hider.offsetHeight - posTop);
715
718
  }
716
719
  function _onAfterLoadData2() {
717
720
  this.moveBySettingsOrLoad();
@@ -3,9 +3,6 @@ import "core-js/modules/es.error.cause.js";
3
3
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
4
4
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
5
5
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
6
- 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; }
7
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
8
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
6
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
10
7
  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; } }
11
8
  function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
@@ -56,6 +53,8 @@ const CSS_AFTER_SELECTION = 'after-selection--columns';
56
53
  * @class ManualColumnMove
57
54
  * @plugin ManualColumnMove
58
55
  */
56
+ var _backlight = /*#__PURE__*/new WeakMap();
57
+ var _guideline = /*#__PURE__*/new WeakMap();
59
58
  var _columnsToMove = /*#__PURE__*/new WeakMap();
60
59
  var _countCols = /*#__PURE__*/new WeakMap();
61
60
  var _pressed = /*#__PURE__*/new WeakMap();
@@ -117,17 +116,21 @@ export class ManualColumnMove extends BasePlugin {
117
116
  /**
118
117
  * Backlight UI object.
119
118
  *
120
- * @private
121
119
  * @type {object}
122
120
  */
123
- _defineProperty(this, "backlight", new BacklightUI(this.hot));
121
+ _classPrivateFieldInitSpec(this, _backlight, {
122
+ writable: true,
123
+ value: new BacklightUI(this.hot)
124
+ });
124
125
  /**
125
126
  * Guideline UI object.
126
127
  *
127
- * @private
128
128
  * @type {object}
129
129
  */
130
- _defineProperty(this, "guideline", new GuidelineUI(this.hot));
130
+ _classPrivateFieldInitSpec(this, _guideline, {
131
+ writable: true,
132
+ value: new GuidelineUI(this.hot)
133
+ });
131
134
  /**
132
135
  * @type {number[]}
133
136
  */
@@ -262,8 +265,8 @@ export class ManualColumnMove extends BasePlugin {
262
265
  disablePlugin() {
263
266
  removeClass(this.hot.rootElement, CSS_PLUGIN);
264
267
  this.unregisterEvents();
265
- this.backlight.destroy();
266
- this.guideline.destroy();
268
+ _classPrivateFieldGet(this, _backlight).destroy();
269
+ _classPrivateFieldGet(this, _guideline).destroy();
267
270
  super.disablePlugin();
268
271
  }
269
272
 
@@ -500,8 +503,8 @@ export class ManualColumnMove extends BasePlugin {
500
503
  let tdOffsetStart = this.hot.view.THEAD.offsetLeft + this.getColumnsWidth(0, _classPrivateFieldGet(this, _hoveredColumn) - 1);
501
504
  const hiderWidth = wtTable.hider.offsetWidth;
502
505
  const tbodyOffsetLeft = wtTable.TBODY.offsetLeft;
503
- const backlightElemMarginStart = this.backlight.getOffset().start;
504
- const backlightElemWidth = this.backlight.getSize().width;
506
+ const backlightElemMarginStart = _classPrivateFieldGet(this, _backlight).getOffset().start;
507
+ const backlightElemWidth = _classPrivateFieldGet(this, _backlight).getSize().width;
505
508
  let rowHeaderWidth = 0;
506
509
  let mouseOffsetStart = 0;
507
510
  if (this.hot.isRtl()) {
@@ -555,8 +558,8 @@ export class ManualColumnMove extends BasePlugin {
555
558
  } else if (scrollableElement.scrollX !== undefined && _classPrivateFieldGet(this, _hoveredColumn) < _classPrivateFieldGet(this, _fixedColumnsStart)) {
556
559
  guidelineStart -= _classPrivateFieldGet(this, _rootElementOffset) <= scrollableElement.scrollX ? _classPrivateFieldGet(this, _rootElementOffset) : 0;
557
560
  }
558
- this.backlight.setPosition(null, backlightStart);
559
- this.guideline.setPosition(null, guidelineStart);
561
+ _classPrivateFieldGet(this, _backlight).setPosition(null, backlightStart);
562
+ _classPrivateFieldGet(this, _guideline).setPosition(null, guidelineStart);
560
563
  }
561
564
 
562
565
  /**
@@ -586,15 +589,15 @@ export class ManualColumnMove extends BasePlugin {
586
589
  * @private
587
590
  */
588
591
  buildPluginUI() {
589
- this.backlight.build();
590
- this.guideline.build();
592
+ _classPrivateFieldGet(this, _backlight).build();
593
+ _classPrivateFieldGet(this, _guideline).build();
591
594
  }
592
595
  /**
593
596
  * Destroys the plugin instance.
594
597
  */
595
598
  destroy() {
596
- this.backlight.destroy();
597
- this.guideline.destroy();
599
+ _classPrivateFieldGet(this, _backlight).destroy();
600
+ _classPrivateFieldGet(this, _guideline).destroy();
598
601
  super.destroy();
599
602
  }
600
603
  }
@@ -610,11 +613,11 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
610
613
  removeClass(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);
611
614
  return;
612
615
  }
613
- const guidelineIsNotReady = this.guideline.isBuilt() && !this.guideline.isAppended();
614
- const backlightIsNotReady = this.backlight.isBuilt() && !this.backlight.isAppended();
616
+ const guidelineIsNotReady = _classPrivateFieldGet(this, _guideline).isBuilt() && !_classPrivateFieldGet(this, _guideline).isAppended();
617
+ const backlightIsNotReady = _classPrivateFieldGet(this, _backlight).isBuilt() && !_classPrivateFieldGet(this, _backlight).isAppended();
615
618
  if (guidelineIsNotReady && backlightIsNotReady) {
616
- this.guideline.appendTo(wtTable.hider);
617
- this.backlight.appendTo(wtTable.hider);
619
+ _classPrivateFieldGet(this, _guideline).appendTo(wtTable.hider);
620
+ _classPrivateFieldGet(this, _backlight).appendTo(wtTable.hider);
618
621
  }
619
622
  const {
620
623
  from,
@@ -642,9 +645,9 @@ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
642
645
  const offsetX = Math.abs(eventOffsetX - (this.hot.isRtl() ? TD.offsetWidth : 0));
643
646
  const inlineOffset = this.getColumnsWidth(start, coords.col - 1) + offsetX;
644
647
  const inlinePos = this.getColumnsWidth(countColumnsFrom, start - 1) + (fixedColumnsStart ? horizontalScrollPosition : 0) + inlineOffset;
645
- this.backlight.setPosition(topPos, inlinePos);
646
- this.backlight.setSize(this.getColumnsWidth(start, end), wtTable.hider.offsetHeight - topPos);
647
- this.backlight.setOffset(null, -inlineOffset);
648
+ _classPrivateFieldGet(this, _backlight).setPosition(topPos, inlinePos);
649
+ _classPrivateFieldGet(this, _backlight).setSize(this.getColumnsWidth(start, end), wtTable.hider.offsetHeight - topPos);
650
+ _classPrivateFieldGet(this, _backlight).setOffset(null, -inlineOffset);
648
651
  addClass(this.hot.rootElement, CSS_ON_MOVING);
649
652
  } else {
650
653
  removeClass(this.hot.rootElement, CSS_AFTER_SELECTION);
@@ -705,8 +708,8 @@ function _onAfterScrollVertically2() {
705
708
  const headerHeight = wtTable.getColumnHeaderHeight(0) + 1;
706
709
  const scrollTop = wtTable.holder.scrollTop;
707
710
  const posTop = headerHeight + scrollTop;
708
- this.backlight.setPosition(posTop);
709
- this.backlight.setSize(null, wtTable.hider.offsetHeight - posTop);
711
+ _classPrivateFieldGet(this, _backlight).setPosition(posTop);
712
+ _classPrivateFieldGet(this, _backlight).setSize(null, wtTable.hider.offsetHeight - posTop);
710
713
  }
711
714
  function _onAfterLoadData2() {
712
715
  this.moveBySettingsOrLoad();