handsontable 15.0.1-next-ab94a4c-20250207 → 15.1.0-next-5e493ee-20250207
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/3rdparty/walkontable/src/index.js +2 -0
- package/3rdparty/walkontable/src/index.mjs +2 -1
- package/3rdparty/walkontable/src/overlays.js +2 -39
- package/3rdparty/walkontable/src/overlays.mjs +2 -39
- package/3rdparty/walkontable/src/renderer/_base.js +3 -4
- package/3rdparty/walkontable/src/renderer/_base.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/cells.js +7 -11
- package/3rdparty/walkontable/src/renderer/cells.mjs +6 -9
- package/3rdparty/walkontable/src/renderer/colGroup.js +6 -7
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +5 -5
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +4 -5
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +3 -3
- package/3rdparty/walkontable/src/renderer/index.js +18 -19
- package/3rdparty/walkontable/src/renderer/index.mjs +6 -6
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -7
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +5 -5
- package/3rdparty/walkontable/src/renderer/rows.js +23 -11
- package/3rdparty/walkontable/src/renderer/rows.mjs +23 -10
- package/3rdparty/walkontable/src/renderer/table.js +1 -1
- package/3rdparty/walkontable/src/renderer/table.mjs +1 -1
- package/3rdparty/walkontable/src/selection/border/border.js +10 -2
- package/3rdparty/walkontable/src/selection/border/border.mjs +10 -2
- package/3rdparty/walkontable/src/utils/nodesPool.js +21 -6
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +21 -6
- package/3rdparty/walkontable/src/utils/orderView/index.js +4 -5
- package/3rdparty/walkontable/src/utils/orderView/index.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +3 -4
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/view.js +60 -76
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +59 -74
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/index.js +138 -0
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/index.mjs +135 -0
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.js +72 -0
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.mjs +68 -0
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +4 -5
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +3 -3
- package/CHANGELOG.md +48 -2
- package/README.md +3 -3
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/cellTypes/dropdownType/dropdownType.js +4 -2
- package/cellTypes/dropdownType/dropdownType.mjs +4 -2
- package/core.js +39 -38
- package/core.mjs +36 -35
- package/dataMap/dataMap.js +8 -0
- package/dataMap/dataMap.mjs +8 -0
- package/dataMap/dataSource.js +4 -0
- package/dataMap/dataSource.mjs +4 -0
- package/dataMap/metaManager/lazyFactoryMap.js +8 -5
- package/dataMap/metaManager/lazyFactoryMap.mjs +8 -5
- package/dataMap/metaManager/metaSchema.js +24 -9
- package/dataMap/metaManager/metaSchema.mjs +24 -9
- package/dist/handsontable.css +6 -2
- package/dist/handsontable.full.css +6 -2
- package/dist/handsontable.full.js +8026 -6927
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +530 -528
- package/dist/handsontable.js +3833 -2914
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +35 -33
- package/editors/autocompleteEditor/autocompleteEditor.js +1 -3
- package/editors/autocompleteEditor/autocompleteEditor.mjs +1 -3
- package/editors/dateEditor/dateEditor.js +4 -0
- package/editors/dateEditor/dateEditor.mjs +4 -0
- package/editors/dropdownEditor/dropdownEditor.js +3 -16
- package/editors/dropdownEditor/dropdownEditor.mjs +3 -16
- package/editors/handsontableEditor/handsontableEditor.js +4 -4
- package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
- package/focusManager.js +1 -1
- package/focusManager.mjs +1 -1
- package/helpers/dom/element.d.ts +0 -1
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/helpers/object.js +4 -0
- package/helpers/object.mjs +4 -0
- package/package.json +2 -2
- package/plugins/base/base.js +0 -7
- package/plugins/base/base.mjs +0 -7
- package/plugins/comments/comments.js +12 -3
- package/plugins/comments/comments.mjs +12 -3
- package/plugins/contextMenu/contextMenu.js +2 -7
- package/plugins/contextMenu/contextMenu.mjs +2 -7
- package/plugins/contextMenu/menu/menu.js +2 -2
- package/plugins/contextMenu/menu/menu.mjs +2 -2
- package/plugins/contextMenu/predefinedItems/clearColumn.js +15 -4
- package/plugins/contextMenu/predefinedItems/clearColumn.mjs +15 -4
- package/plugins/copyPaste/copyPaste.js +6 -12
- package/plugins/copyPaste/copyPaste.mjs +6 -12
- package/plugins/filters/conditionCollection.js +8 -7
- package/plugins/filters/conditionCollection.mjs +8 -7
- package/plugins/filters/filters.js +26 -16
- package/plugins/filters/filters.mjs +26 -16
- package/plugins/filters/utils.js +7 -24
- package/plugins/filters/utils.mjs +7 -24
- package/plugins/hiddenColumns/hiddenColumns.js +1 -3
- package/plugins/hiddenColumns/hiddenColumns.mjs +1 -3
- package/plugins/hiddenRows/hiddenRows.js +1 -3
- package/plugins/hiddenRows/hiddenRows.mjs +1 -3
- package/plugins/manualRowMove/manualRowMove.js +1 -1
- package/plugins/manualRowMove/manualRowMove.mjs +1 -1
- package/plugins/mergeCells/calculations/autofill.js +60 -44
- package/plugins/mergeCells/calculations/autofill.mjs +60 -44
- package/plugins/mergeCells/cellsCollection.js +25 -8
- package/plugins/mergeCells/cellsCollection.mjs +25 -8
- package/plugins/mergeCells/mergeCells.js +15 -16
- package/plugins/mergeCells/mergeCells.mjs +15 -16
- package/plugins/nestedHeaders/nestedHeaders.js +6 -1
- package/plugins/nestedHeaders/nestedHeaders.mjs +6 -1
- package/plugins/nestedHeaders/stateManager/index.js +1 -2
- package/plugins/nestedHeaders/stateManager/index.mjs +1 -2
- package/plugins/nestedHeaders/utils/ghostTable.js +4 -0
- package/plugins/nestedHeaders/utils/ghostTable.mjs +4 -0
- package/plugins/nestedRows/utils/rowMoveController.js +1 -6
- package/plugins/nestedRows/utils/rowMoveController.mjs +1 -6
- package/plugins/undoRedo/actions/_base.js +19 -0
- package/plugins/undoRedo/actions/_base.mjs +15 -0
- package/plugins/undoRedo/actions/cellAlignment.js +85 -0
- package/plugins/undoRedo/actions/cellAlignment.mjs +81 -0
- package/plugins/undoRedo/actions/columnMove.js +84 -0
- package/plugins/undoRedo/actions/columnMove.mjs +80 -0
- package/plugins/undoRedo/actions/columnSort.js +73 -0
- package/plugins/undoRedo/actions/columnSort.mjs +69 -0
- package/plugins/undoRedo/actions/createColumn.js +60 -0
- package/plugins/undoRedo/actions/createColumn.mjs +56 -0
- package/plugins/undoRedo/actions/createRow.js +65 -0
- package/plugins/undoRedo/actions/createRow.mjs +61 -0
- package/plugins/undoRedo/actions/dataChange.js +123 -0
- package/plugins/undoRedo/actions/dataChange.mjs +119 -0
- package/plugins/undoRedo/actions/filters.js +66 -0
- package/plugins/undoRedo/actions/filters.mjs +62 -0
- package/plugins/undoRedo/actions/index.js +27 -0
- package/plugins/undoRedo/actions/index.mjs +23 -0
- package/plugins/undoRedo/actions/mergeCells.js +63 -0
- package/plugins/undoRedo/actions/mergeCells.mjs +59 -0
- package/plugins/undoRedo/actions/removeColumn.js +176 -0
- package/plugins/undoRedo/actions/removeColumn.mjs +172 -0
- package/plugins/undoRedo/actions/removeRow.js +119 -0
- package/plugins/undoRedo/actions/removeRow.mjs +115 -0
- package/plugins/undoRedo/actions/rowMove.js +84 -0
- package/plugins/undoRedo/actions/rowMove.mjs +80 -0
- package/plugins/undoRedo/actions/unmergeCells.js +56 -0
- package/plugins/undoRedo/actions/unmergeCells.mjs +52 -0
- package/plugins/undoRedo/index.js +3 -4
- package/plugins/undoRedo/index.mjs +1 -2
- package/plugins/undoRedo/undoRedo.js +277 -879
- package/plugins/undoRedo/undoRedo.mjs +277 -880
- package/plugins/undoRedo/utils.js +37 -0
- package/plugins/undoRedo/utils.mjs +33 -0
- package/renderers/checkboxRenderer/checkboxRenderer.js +8 -1
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +8 -1
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +1 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +1 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +2 -1
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +2 -1
- package/styles/handsontable.css +75 -103
- 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 +17 -1
- package/tableView.mjs +17 -1
- package/utils/autoResize.js +1 -1
- package/utils/autoResize.mjs +1 -1
- package/utils/parseTable.js +1 -1
- package/utils/parseTable.mjs +1 -1
- package/validators/dateValidator/dateValidator.js +1 -1
- package/validators/dateValidator/dateValidator.mjs +1 -1
@@ -298,9 +298,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
298
298
|
}
|
299
299
|
const orderByRelevanceLength = Array.isArray(orderByRelevance) ? orderByRelevance.length : 0;
|
300
300
|
if (filterSetting === false) {
|
301
|
-
|
302
|
-
highlightIndex = orderByRelevance[0];
|
303
|
-
}
|
301
|
+
highlightIndex = orderByRelevanceLength > 0 ? orderByRelevance[0] : 0;
|
304
302
|
} else {
|
305
303
|
const sorted = [];
|
306
304
|
for (let i = 0, choicesCount = choices.length; i < choicesCount; i++) {
|
@@ -295,9 +295,7 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
295
295
|
}
|
296
296
|
const orderByRelevanceLength = Array.isArray(orderByRelevance) ? orderByRelevance.length : 0;
|
297
297
|
if (filterSetting === false) {
|
298
|
-
|
299
|
-
highlightIndex = orderByRelevance[0];
|
300
|
-
}
|
298
|
+
highlightIndex = orderByRelevanceLength > 0 ? orderByRelevance[0] : 0;
|
301
299
|
} else {
|
302
300
|
const sorted = [];
|
303
301
|
for (let i = 0, choicesCount = choices.length; i < choicesCount; i++) {
|
@@ -9,6 +9,7 @@ var _textEditor = require("../textEditor");
|
|
9
9
|
var _element = require("../../helpers/dom/element");
|
10
10
|
var _object = require("../../helpers/object");
|
11
11
|
var _unicode = require("../../helpers/unicode");
|
12
|
+
var _browser = require("../../helpers/browser");
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
13
14
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
14
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
@@ -272,6 +273,9 @@ class DateEditor extends _textEditor.TextEditor {
|
|
272
273
|
if (origOnSelect) {
|
273
274
|
origOnSelect();
|
274
275
|
}
|
276
|
+
if ((0, _browser.isMobileBrowser)()) {
|
277
|
+
this.hideDatepicker();
|
278
|
+
}
|
275
279
|
};
|
276
280
|
options.onClose = () => {
|
277
281
|
if (!this.parentDestroyed) {
|
@@ -9,6 +9,7 @@ import { TextEditor } from "../textEditor/index.mjs";
|
|
9
9
|
import { addClass, removeClass, hasClass, outerHeight, outerWidth } from "../../helpers/dom/element.mjs";
|
10
10
|
import { deepExtend } from "../../helpers/object.mjs";
|
11
11
|
import { isFunctionKey } from "../../helpers/unicode.mjs";
|
12
|
+
import { isMobileBrowser } from "../../helpers/browser.mjs";
|
12
13
|
export const EDITOR_TYPE = 'date';
|
13
14
|
const SHORTCUTS_GROUP_EDITOR = 'dateEditor';
|
14
15
|
|
@@ -268,6 +269,9 @@ export class DateEditor extends TextEditor {
|
|
268
269
|
if (origOnSelect) {
|
269
270
|
origOnSelect();
|
270
271
|
}
|
272
|
+
if (isMobileBrowser()) {
|
273
|
+
this.hideDatepicker();
|
274
|
+
}
|
271
275
|
};
|
272
276
|
options.onClose = () => {
|
273
277
|
if (!this.parentDestroyed) {
|
@@ -4,7 +4,6 @@ exports.__esModule = true;
|
|
4
4
|
require("core-js/modules/esnext.iterator.constructor.js");
|
5
5
|
require("core-js/modules/esnext.iterator.filter.js");
|
6
6
|
var _autocompleteEditor = require("../autocompleteEditor");
|
7
|
-
var _hooks = require("../../core/hooks");
|
8
7
|
const EDITOR_TYPE = exports.EDITOR_TYPE = 'dropdown';
|
9
8
|
|
10
9
|
/**
|
@@ -25,21 +24,9 @@ class DropdownEditor extends _autocompleteEditor.AutocompleteEditor {
|
|
25
24
|
* @param {object} cellProperties The cell meta object (see {@link Core#getCellMeta}).
|
26
25
|
*/
|
27
26
|
prepare(row, col, prop, td, value, cellProperties) {
|
27
|
+
cellProperties.filter = false;
|
28
|
+
cellProperties.strict = true;
|
28
29
|
super.prepare(row, col, prop, td, value, cellProperties);
|
29
|
-
this.cellProperties.filter = false;
|
30
|
-
this.cellProperties.strict = true;
|
31
30
|
}
|
32
31
|
}
|
33
|
-
exports.DropdownEditor = DropdownEditor;
|
34
|
-
_hooks.Hooks.getSingleton().add('beforeValidate', function (value, row, col) {
|
35
|
-
const visualColumnIndex = this.propToCol(col);
|
36
|
-
if (Number.isInteger(visualColumnIndex)) {
|
37
|
-
const cellMeta = this.getCellMeta(row, visualColumnIndex);
|
38
|
-
if (cellMeta.editor === DropdownEditor) {
|
39
|
-
if (cellMeta.strict === undefined) {
|
40
|
-
cellMeta.filter = false;
|
41
|
-
cellMeta.strict = true;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
45
|
-
});
|
32
|
+
exports.DropdownEditor = DropdownEditor;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import "core-js/modules/esnext.iterator.constructor.js";
|
2
2
|
import "core-js/modules/esnext.iterator.filter.js";
|
3
3
|
import { AutocompleteEditor } from "../autocompleteEditor/index.mjs";
|
4
|
-
import { Hooks } from "../../core/hooks/index.mjs";
|
5
4
|
export const EDITOR_TYPE = 'dropdown';
|
6
5
|
|
7
6
|
/**
|
@@ -22,20 +21,8 @@ export class DropdownEditor extends AutocompleteEditor {
|
|
22
21
|
* @param {object} cellProperties The cell meta object (see {@link Core#getCellMeta}).
|
23
22
|
*/
|
24
23
|
prepare(row, col, prop, td, value, cellProperties) {
|
24
|
+
cellProperties.filter = false;
|
25
|
+
cellProperties.strict = true;
|
25
26
|
super.prepare(row, col, prop, td, value, cellProperties);
|
26
|
-
this.cellProperties.filter = false;
|
27
|
-
this.cellProperties.strict = true;
|
28
27
|
}
|
29
|
-
}
|
30
|
-
Hooks.getSingleton().add('beforeValidate', function (value, row, col) {
|
31
|
-
const visualColumnIndex = this.propToCol(col);
|
32
|
-
if (Number.isInteger(visualColumnIndex)) {
|
33
|
-
const cellMeta = this.getCellMeta(row, visualColumnIndex);
|
34
|
-
if (cellMeta.editor === DropdownEditor) {
|
35
|
-
if (cellMeta.strict === undefined) {
|
36
|
-
cellMeta.filter = false;
|
37
|
-
cellMeta.strict = true;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
}
|
41
|
-
});
|
28
|
+
}
|
@@ -183,13 +183,13 @@ class HandsontableEditor extends _textEditor.TextEditor {
|
|
183
183
|
*/
|
184
184
|
assignHooks() {
|
185
185
|
this.hot.addHook('afterDestroy', () => {
|
186
|
-
|
187
|
-
|
188
|
-
}
|
186
|
+
var _this$htEditor;
|
187
|
+
(_this$htEditor = this.htEditor) === null || _this$htEditor === void 0 || _this$htEditor.destroy();
|
189
188
|
});
|
190
189
|
this.hot.addHook('afterSetTheme', (themeName, firstRun) => {
|
191
190
|
if (!firstRun) {
|
192
|
-
|
191
|
+
var _this$htEditor2;
|
192
|
+
(_this$htEditor2 = this.htEditor) === null || _this$htEditor2 === void 0 || _this$htEditor2.useTheme(themeName);
|
193
193
|
}
|
194
194
|
});
|
195
195
|
}
|
@@ -180,13 +180,13 @@ export class HandsontableEditor extends TextEditor {
|
|
180
180
|
*/
|
181
181
|
assignHooks() {
|
182
182
|
this.hot.addHook('afterDestroy', () => {
|
183
|
-
|
184
|
-
|
185
|
-
}
|
183
|
+
var _this$htEditor;
|
184
|
+
(_this$htEditor = this.htEditor) === null || _this$htEditor === void 0 || _this$htEditor.destroy();
|
186
185
|
});
|
187
186
|
this.hot.addHook('afterSetTheme', (themeName, firstRun) => {
|
188
187
|
if (!firstRun) {
|
189
|
-
|
188
|
+
var _this$htEditor2;
|
189
|
+
(_this$htEditor2 = this.htEditor) === null || _this$htEditor2 === void 0 || _this$htEditor2.useTheme(themeName);
|
190
190
|
}
|
191
191
|
});
|
192
192
|
}
|
package/focusManager.js
CHANGED
@@ -261,7 +261,7 @@ function _focusCell() {
|
|
261
261
|
*/
|
262
262
|
function _focusEditorElement() {
|
263
263
|
_assertClassBrand(_FocusManager_brand, this, _getSelectedCell).call(this, selectedCell => {
|
264
|
-
if (this.getFocusMode() === FOCUS_MODES.MIXED && selectedCell.nodeName === 'TD') {
|
264
|
+
if (this.getFocusMode() === FOCUS_MODES.MIXED && (selectedCell === null || selectedCell === void 0 ? void 0 : selectedCell.nodeName) === 'TD') {
|
265
265
|
this.refocusToEditorTextarea();
|
266
266
|
}
|
267
267
|
});
|
package/focusManager.mjs
CHANGED
@@ -257,7 +257,7 @@ function _focusCell() {
|
|
257
257
|
*/
|
258
258
|
function _focusEditorElement() {
|
259
259
|
_assertClassBrand(_FocusManager_brand, this, _getSelectedCell).call(this, selectedCell => {
|
260
|
-
if (this.getFocusMode() === FOCUS_MODES.MIXED && selectedCell.nodeName === 'TD') {
|
260
|
+
if (this.getFocusMode() === FOCUS_MODES.MIXED && (selectedCell === null || selectedCell === void 0 ? void 0 : selectedCell.nodeName) === 'TD') {
|
261
261
|
this.refocusToEditorTextarea();
|
262
262
|
}
|
263
263
|
});
|
package/helpers/dom/element.d.ts
CHANGED
@@ -24,7 +24,6 @@ export function getScrollableElement(element: HTMLElement): HTMLElement;
|
|
24
24
|
export function getTrimmingContainer(base: HTMLElement): HTMLElement;
|
25
25
|
export function getStyle(element: HTMLElement, prop: string, rootWindow?: Window): string;
|
26
26
|
export function matchesCSSRules(element: Element, rule: CSSRule): boolean;
|
27
|
-
export function getComputedStyle(element: HTMLElement, rootWindow?: Window): any;
|
28
27
|
export function outerWidth(element: HTMLElement): number;
|
29
28
|
export function outerHeight(element: HTMLElement): number;
|
30
29
|
export function innerHeight(element: HTMLElement): number;
|
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 = "15.0
|
137
|
+
const hotVersion = "15.1.0-next-5e493ee-20250207";
|
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)("12/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 = "15.0
|
127
|
+
const hotVersion = "15.1.0-next-5e493ee-20250207";
|
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("12/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
@@ -284,6 +284,10 @@ function setProperty(object, name, value) {
|
|
284
284
|
const names = name.split('.');
|
285
285
|
let workingObject = object;
|
286
286
|
names.forEach((propName, index) => {
|
287
|
+
if (propName === '__proto__' || propName === 'constructor' || propName === 'prototype') {
|
288
|
+
// Security: prototype-polluting is not allowed
|
289
|
+
return;
|
290
|
+
}
|
287
291
|
if (index !== names.length - 1) {
|
288
292
|
if (!hasOwnProperty(workingObject, propName)) {
|
289
293
|
workingObject[propName] = {};
|
package/helpers/object.mjs
CHANGED
@@ -265,6 +265,10 @@ export function setProperty(object, name, value) {
|
|
265
265
|
const names = name.split('.');
|
266
266
|
let workingObject = object;
|
267
267
|
names.forEach((propName, index) => {
|
268
|
+
if (propName === '__proto__' || propName === 'constructor' || propName === 'prototype') {
|
269
|
+
// Security: prototype-polluting is not allowed
|
270
|
+
return;
|
271
|
+
}
|
268
272
|
if (index !== names.length - 1) {
|
269
273
|
if (!hasOwnProperty(workingObject, propName)) {
|
270
274
|
workingObject[propName] = {};
|
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": "15.0
|
13
|
+
"version": "15.1.0-next-5e493ee-20250207",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
@@ -99,7 +99,7 @@
|
|
99
99
|
"webpack-remove-empty-scripts": "^1.0.4"
|
100
100
|
},
|
101
101
|
"optionalDependencies": {
|
102
|
-
"hyperformula": "^
|
102
|
+
"hyperformula": "^3.0.0"
|
103
103
|
},
|
104
104
|
"license": "SEE LICENSE IN LICENSE.txt",
|
105
105
|
"typings": "./index.d.ts",
|
package/plugins/base/base.js
CHANGED
@@ -142,13 +142,6 @@ class BasePlugin {
|
|
142
142
|
if (!initializedPlugins) {
|
143
143
|
initializedPlugins = (0, _registry.getPluginsNames)();
|
144
144
|
}
|
145
|
-
|
146
|
-
// Workaround for the UndoRedo plugin which, currently doesn't follow the plugin architecture.
|
147
|
-
// Without this line the `callOnPluginsReady` callback won't be triggered after all plugin
|
148
|
-
// initialization.
|
149
|
-
if (initializedPlugins.indexOf('UndoRedo') >= 0) {
|
150
|
-
initializedPlugins.splice(initializedPlugins.indexOf('UndoRedo'), 1);
|
151
|
-
}
|
152
145
|
if (initializedPlugins.indexOf(this.pluginName) >= 0) {
|
153
146
|
initializedPlugins.splice(initializedPlugins.indexOf(this.pluginName), 1);
|
154
147
|
}
|
package/plugins/base/base.mjs
CHANGED
@@ -138,13 +138,6 @@ export class BasePlugin {
|
|
138
138
|
if (!initializedPlugins) {
|
139
139
|
initializedPlugins = getPluginsNames();
|
140
140
|
}
|
141
|
-
|
142
|
-
// Workaround for the UndoRedo plugin which, currently doesn't follow the plugin architecture.
|
143
|
-
// Without this line the `callOnPluginsReady` callback won't be triggered after all plugin
|
144
|
-
// initialization.
|
145
|
-
if (initializedPlugins.indexOf('UndoRedo') >= 0) {
|
146
|
-
initializedPlugins.splice(initializedPlugins.indexOf('UndoRedo'), 1);
|
147
|
-
}
|
148
141
|
if (initializedPlugins.indexOf(this.pluginName) >= 0) {
|
149
142
|
initializedPlugins.splice(initializedPlugins.indexOf(this.pluginName), 1);
|
150
143
|
}
|
@@ -316,6 +316,16 @@ class Comments extends _base.BasePlugin {
|
|
316
316
|
runOnlyIf: () => _classPrivateFieldGet(_editor, this).isVisible() && _classPrivateFieldGet(_editor, this).isFocused(),
|
317
317
|
group: SHORTCUTS_GROUP
|
318
318
|
});
|
319
|
+
pluginContext.addShortcut({
|
320
|
+
keys: [['Shift', 'Tab'], ['Tab']],
|
321
|
+
forwardToContext: manager.getContext('grid'),
|
322
|
+
callback: () => {
|
323
|
+
_classPrivateFieldGet(_editor, this).setValue(_classPrivateFieldGet(_commentValueBeforeSave, this));
|
324
|
+
this.hide();
|
325
|
+
manager.setActiveContextName('grid');
|
326
|
+
},
|
327
|
+
group: SHORTCUTS_GROUP
|
328
|
+
});
|
319
329
|
}
|
320
330
|
|
321
331
|
/**
|
@@ -529,7 +539,6 @@ class Comments extends _base.BasePlugin {
|
|
529
539
|
* @param {boolean} [force=false] If `true` then recalculation will be forced.
|
530
540
|
*/
|
531
541
|
refreshEditor() {
|
532
|
-
var _renderableRow, _renderableColumn;
|
533
542
|
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
534
543
|
if (!force && (!this.range.from || !_classPrivateFieldGet(_editor, this).isVisible())) {
|
535
544
|
return;
|
@@ -558,8 +567,8 @@ class Comments extends _base.BasePlugin {
|
|
558
567
|
}
|
559
568
|
const isBeforeRenderedRows = renderableRow === null;
|
560
569
|
const isBeforeRenderedColumns = renderableColumn === null;
|
561
|
-
renderableRow =
|
562
|
-
renderableColumn =
|
570
|
+
renderableRow = renderableRow !== null && renderableRow !== void 0 ? renderableRow : 0;
|
571
|
+
renderableColumn = renderableColumn !== null && renderableColumn !== void 0 ? renderableColumn : 0;
|
563
572
|
const {
|
564
573
|
rootWindow,
|
565
574
|
view: {
|
@@ -312,6 +312,16 @@ export class Comments extends BasePlugin {
|
|
312
312
|
runOnlyIf: () => _classPrivateFieldGet(_editor, this).isVisible() && _classPrivateFieldGet(_editor, this).isFocused(),
|
313
313
|
group: SHORTCUTS_GROUP
|
314
314
|
});
|
315
|
+
pluginContext.addShortcut({
|
316
|
+
keys: [['Shift', 'Tab'], ['Tab']],
|
317
|
+
forwardToContext: manager.getContext('grid'),
|
318
|
+
callback: () => {
|
319
|
+
_classPrivateFieldGet(_editor, this).setValue(_classPrivateFieldGet(_commentValueBeforeSave, this));
|
320
|
+
this.hide();
|
321
|
+
manager.setActiveContextName('grid');
|
322
|
+
},
|
323
|
+
group: SHORTCUTS_GROUP
|
324
|
+
});
|
315
325
|
}
|
316
326
|
|
317
327
|
/**
|
@@ -525,7 +535,6 @@ export class Comments extends BasePlugin {
|
|
525
535
|
* @param {boolean} [force=false] If `true` then recalculation will be forced.
|
526
536
|
*/
|
527
537
|
refreshEditor() {
|
528
|
-
var _renderableRow, _renderableColumn;
|
529
538
|
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
530
539
|
if (!force && (!this.range.from || !_classPrivateFieldGet(_editor, this).isVisible())) {
|
531
540
|
return;
|
@@ -554,8 +563,8 @@ export class Comments extends BasePlugin {
|
|
554
563
|
}
|
555
564
|
const isBeforeRenderedRows = renderableRow === null;
|
556
565
|
const isBeforeRenderedColumns = renderableColumn === null;
|
557
|
-
renderableRow =
|
558
|
-
renderableColumn =
|
566
|
+
renderableRow = renderableRow !== null && renderableRow !== void 0 ? renderableRow : 0;
|
567
|
+
renderableColumn = renderableColumn !== null && renderableColumn !== void 0 ? renderableColumn : 0;
|
559
568
|
const {
|
560
569
|
rootWindow,
|
561
570
|
view: {
|
@@ -237,14 +237,9 @@ class ContextMenu extends _base.BasePlugin {
|
|
237
237
|
this.prepareMenuItems();
|
238
238
|
this.menu.open();
|
239
239
|
const themeHasTableBorder = this.menu.tableBorderWidth > 0;
|
240
|
-
if (!themeHasTableBorder) {
|
241
|
-
offset.below += 1;
|
242
|
-
offset.right += 1;
|
243
|
-
offset.above -= 1;
|
244
|
-
offset.left -= 1;
|
245
|
-
}
|
246
240
|
(0, _object.objectEach)(offset, (value, key) => {
|
247
|
-
|
241
|
+
const valueWithoutBorder = ['below', 'right'].includes(key) ? value + 1 : value - 1;
|
242
|
+
this.menu.setOffset(key, themeHasTableBorder ? value : valueWithoutBorder);
|
248
243
|
});
|
249
244
|
this.menu.setPosition(position);
|
250
245
|
}
|
@@ -234,14 +234,9 @@ export class ContextMenu extends BasePlugin {
|
|
234
234
|
this.prepareMenuItems();
|
235
235
|
this.menu.open();
|
236
236
|
const themeHasTableBorder = this.menu.tableBorderWidth > 0;
|
237
|
-
if (!themeHasTableBorder) {
|
238
|
-
offset.below += 1;
|
239
|
-
offset.right += 1;
|
240
|
-
offset.above -= 1;
|
241
|
-
offset.left -= 1;
|
242
|
-
}
|
243
237
|
objectEach(offset, (value, key) => {
|
244
|
-
|
238
|
+
const valueWithoutBorder = ['below', 'right'].includes(key) ? value + 1 : value - 1;
|
239
|
+
this.menu.setOffset(key, themeHasTableBorder ? value : valueWithoutBorder);
|
245
240
|
});
|
246
241
|
this.menu.setPosition(position);
|
247
242
|
}
|
@@ -612,13 +612,13 @@ class Menu {
|
|
612
612
|
className = className.toString();
|
613
613
|
}
|
614
614
|
}
|
615
|
-
className = className.replace(/[^A-z0-9]/g, '_');
|
615
|
+
className = className.replace(/[^A-Za-z0-9]/g, '_');
|
616
616
|
className = `${this.options.className}Sub_${className}`;
|
617
617
|
container = doc.querySelector(`.${this.options.className}.${className}`);
|
618
618
|
}
|
619
619
|
if (!container) {
|
620
620
|
container = doc.createElement('div');
|
621
|
-
(0, _element.addClass)(container, `htMenu ${this.options.className}`);
|
621
|
+
(0, _element.addClass)(container, `htMenu handsontable ${this.options.className}`);
|
622
622
|
if (className) {
|
623
623
|
(0, _element.addClass)(container, className);
|
624
624
|
}
|
@@ -608,13 +608,13 @@ export class Menu {
|
|
608
608
|
className = className.toString();
|
609
609
|
}
|
610
610
|
}
|
611
|
-
className = className.replace(/[^A-z0-9]/g, '_');
|
611
|
+
className = className.replace(/[^A-Za-z0-9]/g, '_');
|
612
612
|
className = `${this.options.className}Sub_${className}`;
|
613
613
|
container = doc.querySelector(`.${this.options.className}.${className}`);
|
614
614
|
}
|
615
615
|
if (!container) {
|
616
616
|
container = doc.createElement('div');
|
617
|
-
addClass(container, `htMenu ${this.options.className}`);
|
617
|
+
addClass(container, `htMenu handsontable ${this.options.className}`);
|
618
618
|
if (className) {
|
619
619
|
addClass(container, className);
|
620
620
|
}
|
@@ -25,13 +25,24 @@ function clearColumnItem() {
|
|
25
25
|
},
|
26
26
|
disabled() {
|
27
27
|
const range = this.getSelectedRangeLast();
|
28
|
-
if (!range) {
|
28
|
+
if (!range || range.isSingleHeader() && range.highlight.col < 0 || !this.selection.isSelectedByColumnHeader()) {
|
29
29
|
return true;
|
30
30
|
}
|
31
|
-
|
31
|
+
let atLeastOneNonReadOnly = false;
|
32
|
+
range.forAll((row, col) => {
|
33
|
+
if (row < 0 || col < 0) {
|
34
|
+
return true;
|
35
|
+
}
|
36
|
+
const {
|
37
|
+
readOnly
|
38
|
+
} = this.getCellMeta(row, col);
|
39
|
+
if (!readOnly) {
|
40
|
+
atLeastOneNonReadOnly = true;
|
41
|
+
return false;
|
42
|
+
}
|
32
43
|
return true;
|
33
|
-
}
|
34
|
-
return !
|
44
|
+
});
|
45
|
+
return !atLeastOneNonReadOnly;
|
35
46
|
}
|
36
47
|
};
|
37
48
|
}
|
@@ -19,13 +19,24 @@ export default function clearColumnItem() {
|
|
19
19
|
},
|
20
20
|
disabled() {
|
21
21
|
const range = this.getSelectedRangeLast();
|
22
|
-
if (!range) {
|
22
|
+
if (!range || range.isSingleHeader() && range.highlight.col < 0 || !this.selection.isSelectedByColumnHeader()) {
|
23
23
|
return true;
|
24
24
|
}
|
25
|
-
|
25
|
+
let atLeastOneNonReadOnly = false;
|
26
|
+
range.forAll((row, col) => {
|
27
|
+
if (row < 0 || col < 0) {
|
28
|
+
return true;
|
29
|
+
}
|
30
|
+
const {
|
31
|
+
readOnly
|
32
|
+
} = this.getCellMeta(row, col);
|
33
|
+
if (!readOnly) {
|
34
|
+
atLeastOneNonReadOnly = true;
|
35
|
+
return false;
|
36
|
+
}
|
26
37
|
return true;
|
27
|
-
}
|
28
|
-
return !
|
38
|
+
});
|
39
|
+
return !atLeastOneNonReadOnly;
|
29
40
|
}
|
30
41
|
};
|
31
42
|
}
|
@@ -562,12 +562,10 @@ class CopyPaste extends _base.BasePlugin {
|
|
562
562
|
* @private
|
563
563
|
*/
|
564
564
|
onCopy(event) {
|
565
|
-
var _event$target
|
565
|
+
var _event$target;
|
566
566
|
const focusedElement = this.hot.getFocusManager().getRefocusElement();
|
567
567
|
const isHotInput = (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.hasAttribute('data-hot-input');
|
568
|
-
|
569
|
-
const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
|
570
|
-
if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCopy, this) || this.isEditorOpened() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
|
568
|
+
if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCopy, this) || this.isEditorOpened() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body)) {
|
571
569
|
return;
|
572
570
|
}
|
573
571
|
event.preventDefault();
|
@@ -597,12 +595,10 @@ class CopyPaste extends _base.BasePlugin {
|
|
597
595
|
* @private
|
598
596
|
*/
|
599
597
|
onCut(event) {
|
600
|
-
var _event$target2
|
598
|
+
var _event$target2;
|
601
599
|
const focusedElement = this.hot.getFocusManager().getRefocusElement();
|
602
600
|
const isHotInput = (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.hasAttribute('data-hot-input');
|
603
|
-
|
604
|
-
const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
|
605
|
-
if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCut, this) || this.isEditorOpened() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
|
601
|
+
if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCut, this) || this.isEditorOpened() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body)) {
|
606
602
|
return;
|
607
603
|
}
|
608
604
|
event.preventDefault();
|
@@ -631,12 +627,10 @@ class CopyPaste extends _base.BasePlugin {
|
|
631
627
|
* @private
|
632
628
|
*/
|
633
629
|
onPaste(event) {
|
634
|
-
var _event$target3
|
630
|
+
var _event$target3;
|
635
631
|
const focusedElement = this.hot.getFocusManager().getRefocusElement();
|
636
632
|
const isHotInput = (_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.hasAttribute('data-hot-input');
|
637
|
-
|
638
|
-
const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
|
639
|
-
if (!this.hot.isListening() || this.isEditorOpened() || !this.hot.getSelected() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
|
633
|
+
if (!this.hot.isListening() || this.isEditorOpened() || !this.hot.getSelected() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body)) {
|
640
634
|
return;
|
641
635
|
}
|
642
636
|
event.preventDefault();
|
@@ -558,12 +558,10 @@ export class CopyPaste extends BasePlugin {
|
|
558
558
|
* @private
|
559
559
|
*/
|
560
560
|
onCopy(event) {
|
561
|
-
var _event$target
|
561
|
+
var _event$target;
|
562
562
|
const focusedElement = this.hot.getFocusManager().getRefocusElement();
|
563
563
|
const isHotInput = (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.hasAttribute('data-hot-input');
|
564
|
-
|
565
|
-
const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
|
566
|
-
if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCopy, this) || this.isEditorOpened() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
|
564
|
+
if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCopy, this) || this.isEditorOpened() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body)) {
|
567
565
|
return;
|
568
566
|
}
|
569
567
|
event.preventDefault();
|
@@ -593,12 +591,10 @@ export class CopyPaste extends BasePlugin {
|
|
593
591
|
* @private
|
594
592
|
*/
|
595
593
|
onCut(event) {
|
596
|
-
var _event$target2
|
594
|
+
var _event$target2;
|
597
595
|
const focusedElement = this.hot.getFocusManager().getRefocusElement();
|
598
596
|
const isHotInput = (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.hasAttribute('data-hot-input');
|
599
|
-
|
600
|
-
const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
|
601
|
-
if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCut, this) || this.isEditorOpened() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
|
597
|
+
if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCut, this) || this.isEditorOpened() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body)) {
|
602
598
|
return;
|
603
599
|
}
|
604
600
|
event.preventDefault();
|
@@ -627,12 +623,10 @@ export class CopyPaste extends BasePlugin {
|
|
627
623
|
* @private
|
628
624
|
*/
|
629
625
|
onPaste(event) {
|
630
|
-
var _event$target3
|
626
|
+
var _event$target3;
|
631
627
|
const focusedElement = this.hot.getFocusManager().getRefocusElement();
|
632
628
|
const isHotInput = (_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.hasAttribute('data-hot-input');
|
633
|
-
|
634
|
-
const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
|
635
|
-
if (!this.hot.isListening() || this.isEditorOpened() || !this.hot.getSelected() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
|
629
|
+
if (!this.hot.isListening() || this.isEditorOpened() || !this.hot.getSelected() || event.target instanceof HTMLElement && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body)) {
|
636
630
|
return;
|
637
631
|
}
|
638
632
|
event.preventDefault();
|