handsontable 0.0.0-next-30065c6-20250405 → 0.0.0-next-ff10728-20250410
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/cell/range.js +0 -14
- package/3rdparty/walkontable/src/cell/range.mjs +0 -14
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +1 -4
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +1 -4
- package/3rdparty/walkontable/src/selection/border/border.js +0 -5
- package/3rdparty/walkontable/src/selection/border/border.mjs +0 -5
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +4 -3
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +4 -3
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +10 -8
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +10 -8
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +4 -3
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +4 -3
- package/3rdparty/walkontable/src/table.js +2 -5
- package/3rdparty/walkontable/src/table.mjs +2 -5
- package/CHANGELOG.md +0 -39
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/focusCatcher/focusDetector.js +1 -1
- package/core/focusCatcher/focusDetector.mjs +2 -2
- package/core/hooks/constants.js +0 -8
- package/core/hooks/constants.mjs +0 -8
- package/core/hooks/index.d.ts +0 -1
- package/core.d.ts +1 -0
- package/core.js +25 -32
- package/core.mjs +26 -33
- package/dataMap/dataMap.js +7 -0
- package/dataMap/dataMap.mjs +7 -0
- package/dataMap/metaManager/metaSchema.js +0 -1
- package/dataMap/metaManager/metaSchema.mjs +0 -1
- package/dist/handsontable.css +3 -3
- package/dist/handsontable.full.css +3 -3
- package/dist/handsontable.full.js +350 -437
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +17 -17
- package/dist/handsontable.js +350 -437
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +18 -18
- package/editorManager.js +7 -1
- package/editorManager.mjs +7 -1
- package/editors/autocompleteEditor/autocompleteEditor.js +4 -14
- package/editors/autocompleteEditor/autocompleteEditor.mjs +4 -14
- package/editors/textEditor/textEditor.js +1 -1
- package/editors/textEditor/textEditor.mjs +2 -2
- package/helpers/browser.js +1 -1
- package/helpers/browser.mjs +1 -1
- package/helpers/dom/element.js +2 -2
- package/helpers/dom/element.mjs +1 -1
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/helpers/object.js +0 -3
- package/helpers/object.mjs +0 -3
- package/package.json +1 -1
- package/plugins/autoColumnSize/autoColumnSize.js +1 -1
- package/plugins/autoColumnSize/autoColumnSize.mjs +1 -1
- package/plugins/autoRowSize/autoRowSize.js +6 -1
- package/plugins/autoRowSize/autoRowSize.mjs +6 -1
- package/plugins/columnSorting/columnSorting.js +4 -0
- package/plugins/columnSorting/columnSorting.mjs +4 -0
- package/plugins/comments/comments.js +0 -1
- package/plugins/comments/comments.mjs +0 -1
- package/plugins/contextMenu/menu/defaultShortcutsList.js +2 -2
- package/plugins/contextMenu/menu/defaultShortcutsList.mjs +2 -2
- package/plugins/contextMenu/menu/menu.js +0 -1
- package/plugins/contextMenu/menu/menu.mjs +0 -1
- package/plugins/contextMenu/menu/positioner.js +2 -10
- package/plugins/contextMenu/menu/positioner.mjs +2 -10
- package/plugins/copyPaste/copyPaste.js +15 -12
- package/plugins/copyPaste/copyPaste.mjs +16 -13
- package/plugins/copyPaste/pasteEvent.js +0 -3
- package/plugins/copyPaste/pasteEvent.mjs +0 -3
- package/plugins/filters/filters.js +24 -25
- package/plugins/filters/filters.mjs +24 -25
- package/plugins/filters/ui/multipleSelect.js +1 -7
- package/plugins/filters/ui/multipleSelect.mjs +1 -7
- package/plugins/hiddenColumns/hiddenColumns.js +1 -1
- package/plugins/hiddenColumns/hiddenColumns.mjs +1 -1
- package/plugins/hiddenRows/hiddenRows.js +1 -1
- package/plugins/hiddenRows/hiddenRows.mjs +1 -1
- package/plugins/manualColumnResize/manualColumnResize.js +6 -4
- package/plugins/manualColumnResize/manualColumnResize.mjs +6 -4
- package/plugins/manualRowResize/manualRowResize.js +6 -4
- package/plugins/manualRowResize/manualRowResize.mjs +6 -4
- package/plugins/mergeCells/mergeCells.js +29 -8
- package/plugins/mergeCells/mergeCells.mjs +29 -8
- package/plugins/mergeCells/renderer.js +0 -15
- package/plugins/mergeCells/renderer.mjs +0 -15
- package/plugins/nestedRows/data/dataManager.js +2 -2
- package/plugins/nestedRows/data/dataManager.mjs +2 -2
- package/plugins/undoRedo/actions/removeColumn.js +14 -19
- package/plugins/undoRedo/actions/removeColumn.mjs +14 -19
- package/plugins/undoRedo/actions/removeRow.js +4 -12
- package/plugins/undoRedo/actions/removeRow.mjs +4 -12
- package/selection/selection.js +1 -3
- package/selection/selection.mjs +1 -3
- package/styles/handsontable.css +15 -14
- package/styles/handsontable.min.css +3 -3
- package/styles/ht-theme-horizon.css +2 -2
- package/styles/ht-theme-horizon.min.css +2 -2
- package/styles/ht-theme-main.css +2 -2
- package/styles/ht-theme-main.min.css +2 -2
- package/tableView.js +8 -5
- package/tableView.mjs +8 -5
- package/utils/ghostTable.js +0 -3
- package/utils/ghostTable.mjs +0 -3
- package/plugins/mergeCells/utils.js +0 -31
- package/plugins/mergeCells/utils.mjs +0 -27
package/editorManager.js
CHANGED
|
@@ -80,7 +80,13 @@ class EditorManager {
|
|
|
80
80
|
this.selection = _selection;
|
|
81
81
|
this.eventManager = new _eventManager.default(hotInstance);
|
|
82
82
|
this.hot.addHook('afterDocumentKeyDown', event => _assertClassBrand(_EditorManager_brand, this, _onAfterDocumentKeyDown).call(this, event));
|
|
83
|
-
|
|
83
|
+
|
|
84
|
+
// Open editor when text composition is started (IME editor)
|
|
85
|
+
this.eventManager.addEventListener(this.hot.rootDocument.documentElement, 'compositionstart', event => {
|
|
86
|
+
if (!this.destroyed && this.hot.isListening()) {
|
|
87
|
+
this.openEditor('', event);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
84
90
|
this.hot.view._wt.update('onCellDblClick', (event, coords, elem) => _assertClassBrand(_EditorManager_brand, this, _onCellDblClick).call(this, event, coords, elem));
|
|
85
91
|
}
|
|
86
92
|
|
package/editorManager.mjs
CHANGED
|
@@ -76,7 +76,13 @@ class EditorManager {
|
|
|
76
76
|
this.selection = _selection;
|
|
77
77
|
this.eventManager = new EventManager(hotInstance);
|
|
78
78
|
this.hot.addHook('afterDocumentKeyDown', event => _assertClassBrand(_EditorManager_brand, this, _onAfterDocumentKeyDown).call(this, event));
|
|
79
|
-
|
|
79
|
+
|
|
80
|
+
// Open editor when text composition is started (IME editor)
|
|
81
|
+
this.eventManager.addEventListener(this.hot.rootDocument.documentElement, 'compositionstart', event => {
|
|
82
|
+
if (!this.destroyed && this.hot.isListening()) {
|
|
83
|
+
this.openEditor('', event);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
80
86
|
this.hot.view._wt.update('onCellDblClick', (event, coords, elem) => _assertClassBrand(_EditorManager_brand, this, _onCellDblClick).call(this, event, coords, elem));
|
|
81
87
|
}
|
|
82
88
|
|
|
@@ -15,7 +15,6 @@ var _string = require("../../helpers/string");
|
|
|
15
15
|
var _unicode = require("../../helpers/unicode");
|
|
16
16
|
var _textRenderer = require("../../renderers/textRenderer");
|
|
17
17
|
var _a11y = require("../../helpers/a11y");
|
|
18
|
-
var _function = require("../../helpers/function");
|
|
19
18
|
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
|
20
19
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
21
20
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
@@ -31,7 +30,6 @@ const EDITOR_TYPE = exports.EDITOR_TYPE = 'autocomplete';
|
|
|
31
30
|
* @class AutocompleteEditor
|
|
32
31
|
*/
|
|
33
32
|
var _idPrefix = /*#__PURE__*/new WeakMap();
|
|
34
|
-
var _focusDebounced = /*#__PURE__*/new WeakMap();
|
|
35
33
|
var _AutocompleteEditor_brand = /*#__PURE__*/new WeakSet();
|
|
36
34
|
class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
37
35
|
constructor() {
|
|
@@ -64,12 +62,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
|
64
62
|
* @type {string}
|
|
65
63
|
*/
|
|
66
64
|
_classPrivateFieldInitSpec(this, _idPrefix, this.hot.guid.slice(0, 9));
|
|
67
|
-
/**
|
|
68
|
-
* Runs focus method after debounce.
|
|
69
|
-
*/
|
|
70
|
-
_classPrivateFieldInitSpec(this, _focusDebounced, (0, _function.debounce)(() => {
|
|
71
|
-
this.focus();
|
|
72
|
-
}, 100));
|
|
73
65
|
/**
|
|
74
66
|
* Filters and sorts by relevance.
|
|
75
67
|
*
|
|
@@ -155,6 +147,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
|
155
147
|
}
|
|
156
148
|
return this.TEXTAREA.value;
|
|
157
149
|
}
|
|
150
|
+
|
|
158
151
|
/**
|
|
159
152
|
* Creates an editor's elements and adds necessary CSS classnames.
|
|
160
153
|
*/
|
|
@@ -200,10 +193,10 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
|
200
193
|
this.showEditableElement();
|
|
201
194
|
this.focus();
|
|
202
195
|
this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
|
|
203
|
-
this.htEditor.addHook('afterScroll', _classPrivateFieldGet(_focusDebounced, this));
|
|
204
196
|
this.htEditor.updateSettings({
|
|
205
197
|
colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] : undefined,
|
|
206
198
|
autoColumnSize: true,
|
|
199
|
+
autoRowSize: true,
|
|
207
200
|
renderer: (hotInstance, TD, row, col, prop, value, cellProperties) => {
|
|
208
201
|
(0, _textRenderer.textRenderer)(hotInstance, TD, row, col, prop, value, cellProperties);
|
|
209
202
|
const {
|
|
@@ -475,10 +468,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
|
475
468
|
const maxItems = Math.min(this.cellProperties.visibleRows, this.strippedChoices.length);
|
|
476
469
|
const height = Array.from({
|
|
477
470
|
length: maxItems
|
|
478
|
-
}, (_, i) => i).reduce((
|
|
479
|
-
const rowHeight = this.htEditor.getRowHeight(index) || this.htEditor.view.getDefaultRowHeight();
|
|
480
|
-
return totalHeight + rowHeight;
|
|
481
|
-
}, 0);
|
|
471
|
+
}, (_, i) => i).reduce((h, index) => h + this.htEditor.getRowHeight(index), 0);
|
|
482
472
|
return height + borderVerticalCompensation + 1;
|
|
483
473
|
}
|
|
484
474
|
|
|
@@ -576,7 +566,7 @@ exports.AutocompleteEditor = AutocompleteEditor;
|
|
|
576
566
|
function _fixDropdownWidth() {
|
|
577
567
|
if (this.htEditor.view.hasVerticalScroll()) {
|
|
578
568
|
this.htEditor.updateSettings({
|
|
579
|
-
width: this.
|
|
569
|
+
width: this.htEditor.getSettings().width + (0, _element.getScrollbarWidth)(this.hot.rootDocument)
|
|
580
570
|
});
|
|
581
571
|
}
|
|
582
572
|
}
|
|
@@ -20,7 +20,6 @@ import { stripTags } from "../../helpers/string.mjs";
|
|
|
20
20
|
import { KEY_CODES, isPrintableChar } from "../../helpers/unicode.mjs";
|
|
21
21
|
import { textRenderer } from "../../renderers/textRenderer/index.mjs";
|
|
22
22
|
import { A11Y_ACTIVEDESCENDANT, A11Y_AUTOCOMPLETE, A11Y_COMBOBOX, A11Y_CONTROLS, A11Y_EXPANDED, A11Y_HASPOPUP, A11Y_LISTBOX, A11Y_LIVE, A11Y_OPTION, A11Y_POSINSET, A11Y_PRESENTATION, A11Y_RELEVANT, A11Y_SELECTED, A11Y_SETSIZE, A11Y_TEXT } from "../../helpers/a11y.mjs";
|
|
23
|
-
import { debounce } from "../../helpers/function.mjs";
|
|
24
23
|
export const EDITOR_TYPE = 'autocomplete';
|
|
25
24
|
|
|
26
25
|
/**
|
|
@@ -28,7 +27,6 @@ export const EDITOR_TYPE = 'autocomplete';
|
|
|
28
27
|
* @class AutocompleteEditor
|
|
29
28
|
*/
|
|
30
29
|
var _idPrefix = /*#__PURE__*/new WeakMap();
|
|
31
|
-
var _focusDebounced = /*#__PURE__*/new WeakMap();
|
|
32
30
|
var _AutocompleteEditor_brand = /*#__PURE__*/new WeakSet();
|
|
33
31
|
export class AutocompleteEditor extends HandsontableEditor {
|
|
34
32
|
constructor() {
|
|
@@ -61,12 +59,6 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
|
61
59
|
* @type {string}
|
|
62
60
|
*/
|
|
63
61
|
_classPrivateFieldInitSpec(this, _idPrefix, this.hot.guid.slice(0, 9));
|
|
64
|
-
/**
|
|
65
|
-
* Runs focus method after debounce.
|
|
66
|
-
*/
|
|
67
|
-
_classPrivateFieldInitSpec(this, _focusDebounced, debounce(() => {
|
|
68
|
-
this.focus();
|
|
69
|
-
}, 100));
|
|
70
62
|
/**
|
|
71
63
|
* Filters and sorts by relevance.
|
|
72
64
|
*
|
|
@@ -152,6 +144,7 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
|
152
144
|
}
|
|
153
145
|
return this.TEXTAREA.value;
|
|
154
146
|
}
|
|
147
|
+
|
|
155
148
|
/**
|
|
156
149
|
* Creates an editor's elements and adds necessary CSS classnames.
|
|
157
150
|
*/
|
|
@@ -197,10 +190,10 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
|
197
190
|
this.showEditableElement();
|
|
198
191
|
this.focus();
|
|
199
192
|
this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
|
|
200
|
-
this.htEditor.addHook('afterScroll', _classPrivateFieldGet(_focusDebounced, this));
|
|
201
193
|
this.htEditor.updateSettings({
|
|
202
194
|
colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] : undefined,
|
|
203
195
|
autoColumnSize: true,
|
|
196
|
+
autoRowSize: true,
|
|
204
197
|
renderer: (hotInstance, TD, row, col, prop, value, cellProperties) => {
|
|
205
198
|
textRenderer(hotInstance, TD, row, col, prop, value, cellProperties);
|
|
206
199
|
const {
|
|
@@ -472,10 +465,7 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
|
472
465
|
const maxItems = Math.min(this.cellProperties.visibleRows, this.strippedChoices.length);
|
|
473
466
|
const height = Array.from({
|
|
474
467
|
length: maxItems
|
|
475
|
-
}, (_, i) => i).reduce((
|
|
476
|
-
const rowHeight = this.htEditor.getRowHeight(index) || this.htEditor.view.getDefaultRowHeight();
|
|
477
|
-
return totalHeight + rowHeight;
|
|
478
|
-
}, 0);
|
|
468
|
+
}, (_, i) => i).reduce((h, index) => h + this.htEditor.getRowHeight(index), 0);
|
|
479
469
|
return height + borderVerticalCompensation + 1;
|
|
480
470
|
}
|
|
481
471
|
|
|
@@ -572,7 +562,7 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
|
572
562
|
function _fixDropdownWidth() {
|
|
573
563
|
if (this.htEditor.view.hasVerticalScroll()) {
|
|
574
564
|
this.htEditor.updateSettings({
|
|
575
|
-
width: this.
|
|
565
|
+
width: this.htEditor.getSettings().width + getScrollbarWidth(this.hot.rootDocument)
|
|
576
566
|
});
|
|
577
567
|
}
|
|
578
568
|
}
|
|
@@ -123,7 +123,7 @@ class TextEditor extends _baseEditor.BaseEditor {
|
|
|
123
123
|
*/
|
|
124
124
|
close() {
|
|
125
125
|
this.autoResize.unObserve();
|
|
126
|
-
if ((0, _element.
|
|
126
|
+
if ((0, _element.isThisHotChild)(this.hot.rootDocument.activeElement, this.hot.rootElement)) {
|
|
127
127
|
this.hot.listen(); // don't refocus the table if user focused some cell outside of HT on purpose
|
|
128
128
|
}
|
|
129
129
|
this.hideEditableElement();
|
|
@@ -5,7 +5,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
5
5
|
import { BaseEditor, EDITOR_STATE } from "../baseEditor/index.mjs";
|
|
6
6
|
import EventManager from "../../eventManager.mjs";
|
|
7
7
|
import { isEdge, isIOS } from "../../helpers/browser.mjs";
|
|
8
|
-
import { addClass,
|
|
8
|
+
import { addClass, isThisHotChild, setCaretPosition, hasClass, removeClass, setAttribute } from "../../helpers/dom/element.mjs";
|
|
9
9
|
import { rangeEach } from "../../helpers/number.mjs";
|
|
10
10
|
import { createInputElementResizer } from "../../utils/autoResize.mjs";
|
|
11
11
|
import { isDefined } from "../../helpers/mixed.mjs";
|
|
@@ -119,7 +119,7 @@ export class TextEditor extends BaseEditor {
|
|
|
119
119
|
*/
|
|
120
120
|
close() {
|
|
121
121
|
this.autoResize.unObserve();
|
|
122
|
-
if (
|
|
122
|
+
if (isThisHotChild(this.hot.rootDocument.activeElement, this.hot.rootElement)) {
|
|
123
123
|
this.hot.listen(); // don't refocus the table if user focused some cell outside of HT on purpose
|
|
124
124
|
}
|
|
125
125
|
this.hideEditableElement();
|
package/helpers/browser.js
CHANGED
|
@@ -41,7 +41,7 @@ const platforms = {
|
|
|
41
41
|
mac: tester(platform => /^Mac/.test(platform)),
|
|
42
42
|
win: tester(platform => /^Win/.test(platform)),
|
|
43
43
|
linux: tester(platform => /^Linux/.test(platform)),
|
|
44
|
-
ios: tester(
|
|
44
|
+
ios: tester(ua => /iPhone|iPad|iPod/i.test(ua))
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
/**
|
package/helpers/browser.mjs
CHANGED
|
@@ -23,7 +23,7 @@ const platforms = {
|
|
|
23
23
|
mac: tester(platform => /^Mac/.test(platform)),
|
|
24
24
|
win: tester(platform => /^Win/.test(platform)),
|
|
25
25
|
linux: tester(platform => /^Linux/.test(platform)),
|
|
26
|
-
ios: tester(
|
|
26
|
+
ios: tester(ua => /iPhone|iPad|iPod/i.test(ua))
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
/**
|
package/helpers/dom/element.js
CHANGED
|
@@ -38,8 +38,8 @@ exports.isChildOf = isChildOf;
|
|
|
38
38
|
exports.isDetached = isDetached;
|
|
39
39
|
exports.isHTMLElement = isHTMLElement;
|
|
40
40
|
exports.isInput = isInput;
|
|
41
|
-
exports.isInternalElement = isInternalElement;
|
|
42
41
|
exports.isOutsideInput = isOutsideInput;
|
|
42
|
+
exports.isThisHotChild = isThisHotChild;
|
|
43
43
|
exports.isVisible = isVisible;
|
|
44
44
|
exports.makeElementContentEditableAndSelectItsContent = makeElementContentEditableAndSelectItsContent;
|
|
45
45
|
exports.matchesCSSRules = matchesCSSRules;
|
|
@@ -100,7 +100,7 @@ function getParent(element) {
|
|
|
100
100
|
* @param {HTMLElement} thisHotContainer The Handsontable container.
|
|
101
101
|
* @returns {boolean}
|
|
102
102
|
*/
|
|
103
|
-
function
|
|
103
|
+
function isThisHotChild(element, thisHotContainer) {
|
|
104
104
|
const closestHandsontableContainer = element.closest('.handsontable');
|
|
105
105
|
return !!closestHandsontableContainer && (closestHandsontableContainer.parentNode === thisHotContainer || closestHandsontableContainer === thisHotContainer);
|
|
106
106
|
}
|
package/helpers/dom/element.mjs
CHANGED
|
@@ -39,7 +39,7 @@ export function getParent(element) {
|
|
|
39
39
|
* @param {HTMLElement} thisHotContainer The Handsontable container.
|
|
40
40
|
* @returns {boolean}
|
|
41
41
|
*/
|
|
42
|
-
export function
|
|
42
|
+
export function isThisHotChild(element, thisHotContainer) {
|
|
43
43
|
const closestHandsontableContainer = element.closest('.handsontable');
|
|
44
44
|
return !!closestHandsontableContainer && (closestHandsontableContainer.parentNode === thisHotContainer || closestHandsontableContainer === thisHotContainer);
|
|
45
45
|
}
|
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-ff10728-20250410";
|
|
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)("
|
|
145
|
+
const releaseDate = (0, _moment.default)("20/02/2025", '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 = "0.0.0-next-
|
|
127
|
+
const hotVersion = "0.0.0-next-ff10728-20250410";
|
|
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("
|
|
135
|
+
const releaseDate = moment("20/02/2025", '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/helpers/object.js
CHANGED
|
@@ -281,9 +281,6 @@ function getProperty(object, name) {
|
|
|
281
281
|
* @param {*} value Value to be assigned at the provided property.
|
|
282
282
|
*/
|
|
283
283
|
function setProperty(object, name, value) {
|
|
284
|
-
if (typeof name !== 'string') {
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
284
|
const names = name.split('.');
|
|
288
285
|
let workingObject = object;
|
|
289
286
|
names.forEach((propName, index) => {
|
package/helpers/object.mjs
CHANGED
|
@@ -262,9 +262,6 @@ export function getProperty(object, name) {
|
|
|
262
262
|
* @param {*} value Value to be assigned at the provided property.
|
|
263
263
|
*/
|
|
264
264
|
export function setProperty(object, name, value) {
|
|
265
|
-
if (typeof name !== 'string') {
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
265
|
const names = name.split('.');
|
|
269
266
|
let workingObject = object;
|
|
270
267
|
names.forEach((propName, index) => {
|
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-ff10728-20250410",
|
|
14
14
|
"main": "index",
|
|
15
15
|
"module": "index.mjs",
|
|
16
16
|
"jsnext:main": "index.mjs",
|
|
@@ -325,7 +325,7 @@ class AutoColumnSize extends _base.BasePlugin {
|
|
|
325
325
|
if (firstVisibleColumn === -1 || lastVisibleColumn === -1) {
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
|
-
const overwriteCache = this.hot.
|
|
328
|
+
const overwriteCache = this.hot.renderCall;
|
|
329
329
|
this.calculateColumnsWidth({
|
|
330
330
|
from: firstVisibleColumn,
|
|
331
331
|
to: lastVisibleColumn
|
|
@@ -321,7 +321,7 @@ export class AutoColumnSize extends BasePlugin {
|
|
|
321
321
|
if (firstVisibleColumn === -1 || lastVisibleColumn === -1) {
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
|
-
const overwriteCache = this.hot.
|
|
324
|
+
const overwriteCache = this.hot.renderCall;
|
|
325
325
|
this.calculateColumnsWidth({
|
|
326
326
|
from: firstVisibleColumn,
|
|
327
327
|
to: lastVisibleColumn
|
|
@@ -304,7 +304,7 @@ class AutoRowSize extends _base.BasePlugin {
|
|
|
304
304
|
if (firstVisibleRow === -1 || lastVisibleRow === -1) {
|
|
305
305
|
return;
|
|
306
306
|
}
|
|
307
|
-
const overwriteCache = this.hot.
|
|
307
|
+
const overwriteCache = this.hot.renderCall;
|
|
308
308
|
this.calculateRowsHeight({
|
|
309
309
|
from: firstVisibleRow,
|
|
310
310
|
to: lastVisibleRow
|
|
@@ -405,6 +405,11 @@ class AutoRowSize extends _base.BasePlugin {
|
|
|
405
405
|
|
|
406
406
|
// @TODO Should call once per render cycle, currently fired separately in different plugins
|
|
407
407
|
this.hot.view.adjustElementsSize();
|
|
408
|
+
|
|
409
|
+
// tmp
|
|
410
|
+
if (this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender) {
|
|
411
|
+
this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw();
|
|
412
|
+
}
|
|
408
413
|
}
|
|
409
414
|
};
|
|
410
415
|
const syncLimit = this.getSyncCalculationLimit();
|
|
@@ -300,7 +300,7 @@ export class AutoRowSize extends BasePlugin {
|
|
|
300
300
|
if (firstVisibleRow === -1 || lastVisibleRow === -1) {
|
|
301
301
|
return;
|
|
302
302
|
}
|
|
303
|
-
const overwriteCache = this.hot.
|
|
303
|
+
const overwriteCache = this.hot.renderCall;
|
|
304
304
|
this.calculateRowsHeight({
|
|
305
305
|
from: firstVisibleRow,
|
|
306
306
|
to: lastVisibleRow
|
|
@@ -401,6 +401,11 @@ export class AutoRowSize extends BasePlugin {
|
|
|
401
401
|
|
|
402
402
|
// @TODO Should call once per render cycle, currently fired separately in different plugins
|
|
403
403
|
this.hot.view.adjustElementsSize();
|
|
404
|
+
|
|
405
|
+
// tmp
|
|
406
|
+
if (this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender) {
|
|
407
|
+
this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw();
|
|
408
|
+
}
|
|
404
409
|
}
|
|
405
410
|
};
|
|
406
411
|
const syncLimit = this.getSyncCalculationLimit();
|
|
@@ -304,6 +304,10 @@ class ColumnSorting extends _base.BasePlugin {
|
|
|
304
304
|
this.hot.runHooks('afterColumnSort', currentSortConfig, sortPossible ? destinationSortConfigs : currentSortConfig, sortPossible);
|
|
305
305
|
if (sortPossible) {
|
|
306
306
|
this.hot.render();
|
|
307
|
+
// TODO: Workaround? This triggers fast redraw. One test won't pass after removal.
|
|
308
|
+
// It should be refactored / described.
|
|
309
|
+
this.hot.forceFullRender = false;
|
|
310
|
+
this.hot.view.render();
|
|
307
311
|
}
|
|
308
312
|
}
|
|
309
313
|
|
|
@@ -301,6 +301,10 @@ export class ColumnSorting extends BasePlugin {
|
|
|
301
301
|
this.hot.runHooks('afterColumnSort', currentSortConfig, sortPossible ? destinationSortConfigs : currentSortConfig, sortPossible);
|
|
302
302
|
if (sortPossible) {
|
|
303
303
|
this.hot.render();
|
|
304
|
+
// TODO: Workaround? This triggers fast redraw. One test won't pass after removal.
|
|
305
|
+
// It should be refactored / described.
|
|
306
|
+
this.hot.forceFullRender = false;
|
|
307
|
+
this.hot.view.render();
|
|
304
308
|
}
|
|
305
309
|
}
|
|
306
310
|
|
|
@@ -234,7 +234,6 @@ class Comments extends _base.BasePlugin {
|
|
|
234
234
|
this.addHook('afterScroll', () => _assertClassBrand(_Comments_brand, this, _onAfterScroll).call(this));
|
|
235
235
|
this.addHook('afterBeginEditing', () => this.hide());
|
|
236
236
|
this.addHook('afterDocumentKeyDown', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
|
|
237
|
-
this.addHook('beforeCompositionStart', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
|
|
238
237
|
this.addHook('afterSetTheme', function () {
|
|
239
238
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
240
239
|
args[_key2] = arguments[_key2];
|
|
@@ -230,7 +230,6 @@ export class Comments extends BasePlugin {
|
|
|
230
230
|
this.addHook('afterScroll', () => _assertClassBrand(_Comments_brand, this, _onAfterScroll).call(this));
|
|
231
231
|
this.addHook('afterBeginEditing', () => this.hide());
|
|
232
232
|
this.addHook('afterDocumentKeyDown', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
|
|
233
|
-
this.addHook('beforeCompositionStart', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
|
|
234
233
|
this.addHook('afterSetTheme', function () {
|
|
235
234
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
236
235
|
args[_key2] = arguments[_key2];
|
|
@@ -39,7 +39,7 @@ function createDefaultShortcutsList(menu) {
|
|
|
39
39
|
keys: [['ArrowUp']],
|
|
40
40
|
callback: () => menu.getNavigator().toPreviousItem()
|
|
41
41
|
}, {
|
|
42
|
-
keys: [[
|
|
42
|
+
keys: [['ArrowRight']],
|
|
43
43
|
callback: () => {
|
|
44
44
|
const selection = hotMenu.getSelectedLast();
|
|
45
45
|
if (selection) {
|
|
@@ -50,7 +50,7 @@ function createDefaultShortcutsList(menu) {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}, {
|
|
53
|
-
keys: [[
|
|
53
|
+
keys: [['ArrowLeft']],
|
|
54
54
|
callback: () => {
|
|
55
55
|
const selection = hotMenu.getSelectedLast();
|
|
56
56
|
if (selection && menu.isSubMenu()) {
|
|
@@ -35,7 +35,7 @@ export function createDefaultShortcutsList(menu) {
|
|
|
35
35
|
keys: [['ArrowUp']],
|
|
36
36
|
callback: () => menu.getNavigator().toPreviousItem()
|
|
37
37
|
}, {
|
|
38
|
-
keys: [[
|
|
38
|
+
keys: [['ArrowRight']],
|
|
39
39
|
callback: () => {
|
|
40
40
|
const selection = hotMenu.getSelectedLast();
|
|
41
41
|
if (selection) {
|
|
@@ -46,7 +46,7 @@ export function createDefaultShortcutsList(menu) {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}, {
|
|
49
|
-
keys: [[
|
|
49
|
+
keys: [['ArrowLeft']],
|
|
50
50
|
callback: () => {
|
|
51
51
|
const selection = hotMenu.getSelectedLast();
|
|
52
52
|
if (selection && menu.isSubMenu()) {
|
|
@@ -293,7 +293,6 @@ class Menu {
|
|
|
293
293
|
layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr',
|
|
294
294
|
ariaTags: false,
|
|
295
295
|
themeName: this.hot.getCurrentThemeName(),
|
|
296
|
-
beforeRefreshDimensions: () => false,
|
|
297
296
|
beforeOnCellMouseOver: (event, coords) => {
|
|
298
297
|
_classPrivateFieldGet(_navigator, this).setCurrentPage(coords.row);
|
|
299
298
|
},
|
|
@@ -289,7 +289,6 @@ export class Menu {
|
|
|
289
289
|
layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr',
|
|
290
290
|
ariaTags: false,
|
|
291
291
|
themeName: this.hot.getCurrentThemeName(),
|
|
292
|
-
beforeRefreshDimensions: () => false,
|
|
293
292
|
beforeOnCellMouseOver: (event, coords) => {
|
|
294
293
|
_classPrivateFieldGet(_navigator, this).setCurrentPage(coords.row);
|
|
295
294
|
},
|
|
@@ -143,11 +143,7 @@ class Positioner {
|
|
|
143
143
|
setPositionAboveCursor() {
|
|
144
144
|
let top = _classPrivateFieldGet(_offset, this).above + _classPrivateFieldGet(_cursor, this).top - _classPrivateFieldGet(_container, this).offsetHeight;
|
|
145
145
|
if (_classPrivateFieldGet(_parentContainer, this)) {
|
|
146
|
-
|
|
147
|
-
const style = rootWindow.getComputedStyle(_classPrivateFieldGet(_parentContainer, this).querySelector('.ht_master'));
|
|
148
|
-
const paddingTop = Number.parseInt(style.paddingTop, 10);
|
|
149
|
-
const borderTop = Number.parseInt(style.borderTop, 10);
|
|
150
|
-
top = _classPrivateFieldGet(_cursor, this).top + _classPrivateFieldGet(_cursor, this).cellHeight - _classPrivateFieldGet(_container, this).scrollHeight + paddingTop + borderTop;
|
|
146
|
+
top = _classPrivateFieldGet(_cursor, this).top + _classPrivateFieldGet(_cursor, this).cellHeight - _classPrivateFieldGet(_container, this).offsetHeight + 3;
|
|
151
147
|
}
|
|
152
148
|
_classPrivateFieldGet(_container, this).style.top = `${top}px`;
|
|
153
149
|
}
|
|
@@ -158,11 +154,7 @@ class Positioner {
|
|
|
158
154
|
setPositionBelowCursor() {
|
|
159
155
|
let top = _classPrivateFieldGet(_offset, this).below + _classPrivateFieldGet(_cursor, this).top + 1;
|
|
160
156
|
if (_classPrivateFieldGet(_parentContainer, this)) {
|
|
161
|
-
|
|
162
|
-
const style = rootWindow.getComputedStyle(_classPrivateFieldGet(_parentContainer, this).querySelector('.ht_master'));
|
|
163
|
-
const paddingTop = Number.parseInt(style.paddingTop, 10);
|
|
164
|
-
const borderTop = Number.parseInt(style.borderTop, 10);
|
|
165
|
-
top = _classPrivateFieldGet(_cursor, this).top - paddingTop - borderTop - 1;
|
|
157
|
+
top = _classPrivateFieldGet(_cursor, this).top - 1;
|
|
166
158
|
}
|
|
167
159
|
_classPrivateFieldGet(_container, this).style.top = `${top}px`;
|
|
168
160
|
}
|
|
@@ -140,11 +140,7 @@ export class Positioner {
|
|
|
140
140
|
setPositionAboveCursor() {
|
|
141
141
|
let top = _classPrivateFieldGet(_offset, this).above + _classPrivateFieldGet(_cursor, this).top - _classPrivateFieldGet(_container, this).offsetHeight;
|
|
142
142
|
if (_classPrivateFieldGet(_parentContainer, this)) {
|
|
143
|
-
|
|
144
|
-
const style = rootWindow.getComputedStyle(_classPrivateFieldGet(_parentContainer, this).querySelector('.ht_master'));
|
|
145
|
-
const paddingTop = Number.parseInt(style.paddingTop, 10);
|
|
146
|
-
const borderTop = Number.parseInt(style.borderTop, 10);
|
|
147
|
-
top = _classPrivateFieldGet(_cursor, this).top + _classPrivateFieldGet(_cursor, this).cellHeight - _classPrivateFieldGet(_container, this).scrollHeight + paddingTop + borderTop;
|
|
143
|
+
top = _classPrivateFieldGet(_cursor, this).top + _classPrivateFieldGet(_cursor, this).cellHeight - _classPrivateFieldGet(_container, this).offsetHeight + 3;
|
|
148
144
|
}
|
|
149
145
|
_classPrivateFieldGet(_container, this).style.top = `${top}px`;
|
|
150
146
|
}
|
|
@@ -155,11 +151,7 @@ export class Positioner {
|
|
|
155
151
|
setPositionBelowCursor() {
|
|
156
152
|
let top = _classPrivateFieldGet(_offset, this).below + _classPrivateFieldGet(_cursor, this).top + 1;
|
|
157
153
|
if (_classPrivateFieldGet(_parentContainer, this)) {
|
|
158
|
-
|
|
159
|
-
const style = rootWindow.getComputedStyle(_classPrivateFieldGet(_parentContainer, this).querySelector('.ht_master'));
|
|
160
|
-
const paddingTop = Number.parseInt(style.paddingTop, 10);
|
|
161
|
-
const borderTop = Number.parseInt(style.borderTop, 10);
|
|
162
|
-
top = _classPrivateFieldGet(_cursor, this).top - paddingTop - borderTop - 1;
|
|
154
|
+
top = _classPrivateFieldGet(_cursor, this).top - 1;
|
|
163
155
|
}
|
|
164
156
|
_classPrivateFieldGet(_container, this).style.top = `${top}px`;
|
|
165
157
|
}
|
|
@@ -256,9 +256,6 @@ class CopyPaste extends _base.BasePlugin {
|
|
|
256
256
|
return _assertClassBrand(_CopyPaste_brand, _this, _onAfterSelection).call(_this, ...args);
|
|
257
257
|
});
|
|
258
258
|
this.addHook('afterSelectionEnd', () => _assertClassBrand(_CopyPaste_brand, this, _onAfterSelectionEnd).call(this));
|
|
259
|
-
|
|
260
|
-
// Events are attached to the document, not the root table element - as it should,
|
|
261
|
-
// for Chrome 133 and lower to copy/paste/cut work properly (#dev-2277).
|
|
262
259
|
this.eventManager.addEventListener(this.hot.rootDocument, 'copy', function () {
|
|
263
260
|
return _this.onCopy(...arguments);
|
|
264
261
|
});
|
|
@@ -565,10 +562,12 @@ class CopyPaste extends _base.BasePlugin {
|
|
|
565
562
|
* @private
|
|
566
563
|
*/
|
|
567
564
|
onCopy(event) {
|
|
568
|
-
|
|
565
|
+
var _event$target, _this$hot$getSelected;
|
|
569
566
|
const focusedElement = this.hot.getFocusManager().getRefocusElement();
|
|
570
|
-
const isHotInput =
|
|
571
|
-
|
|
567
|
+
const isHotInput = (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.hasAttribute('data-hot-input');
|
|
568
|
+
const selectedCell = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
|
569
|
+
const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
|
|
570
|
+
if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCopy, this) || this.isEditorOpened() || (0, _element.isHTMLElement)(event.target) && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
|
|
572
571
|
return;
|
|
573
572
|
}
|
|
574
573
|
event.preventDefault();
|
|
@@ -598,10 +597,12 @@ class CopyPaste extends _base.BasePlugin {
|
|
|
598
597
|
* @private
|
|
599
598
|
*/
|
|
600
599
|
onCut(event) {
|
|
601
|
-
|
|
600
|
+
var _event$target2, _this$hot$getSelected2;
|
|
602
601
|
const focusedElement = this.hot.getFocusManager().getRefocusElement();
|
|
603
|
-
const isHotInput =
|
|
604
|
-
|
|
602
|
+
const isHotInput = (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.hasAttribute('data-hot-input');
|
|
603
|
+
const selectedCell = (_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.highlight;
|
|
604
|
+
const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
|
|
605
|
+
if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCut, this) || this.isEditorOpened() || (0, _element.isHTMLElement)(event.target) && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
|
|
605
606
|
return;
|
|
606
607
|
}
|
|
607
608
|
event.preventDefault();
|
|
@@ -630,10 +631,12 @@ class CopyPaste extends _base.BasePlugin {
|
|
|
630
631
|
* @private
|
|
631
632
|
*/
|
|
632
633
|
onPaste(event) {
|
|
633
|
-
|
|
634
|
+
var _event$target3, _this$hot$getSelected3;
|
|
634
635
|
const focusedElement = this.hot.getFocusManager().getRefocusElement();
|
|
635
|
-
const isHotInput =
|
|
636
|
-
|
|
636
|
+
const isHotInput = (_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.hasAttribute('data-hot-input');
|
|
637
|
+
const selectedCell = (_this$hot$getSelected3 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected3 === void 0 ? void 0 : _this$hot$getSelected3.highlight;
|
|
638
|
+
const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
|
|
639
|
+
if (!this.hot.isListening() || this.isEditorOpened() || !this.hot.getSelected() || (0, _element.isHTMLElement)(event.target) && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
|
|
637
640
|
return;
|
|
638
641
|
}
|
|
639
642
|
event.preventDefault();
|